@livepeer-frameworks/player-react 0.0.4 → 0.1.1

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 (54) hide show
  1. package/README.md +16 -5
  2. package/dist/cjs/index.js +1 -1
  3. package/dist/cjs/index.js.map +1 -1
  4. package/dist/esm/index.js +1 -1
  5. package/dist/esm/index.js.map +1 -1
  6. package/dist/types/components/PlayerControls.d.ts +2 -0
  7. package/dist/types/components/StatsPanel.d.ts +2 -14
  8. package/dist/types/hooks/useMetaTrack.d.ts +1 -1
  9. package/dist/types/hooks/usePlayerController.d.ts +2 -0
  10. package/dist/types/hooks/useStreamState.d.ts +1 -1
  11. package/dist/types/hooks/useTelemetry.d.ts +1 -1
  12. package/dist/types/hooks/useViewerEndpoints.d.ts +2 -2
  13. package/dist/types/types.d.ts +1 -1
  14. package/dist/types/ui/button.d.ts +1 -1
  15. package/package.json +1 -1
  16. package/src/components/DevModePanel.tsx +249 -170
  17. package/src/components/Icons.tsx +105 -25
  18. package/src/components/IdleScreen.tsx +262 -142
  19. package/src/components/LoadingScreen.tsx +171 -153
  20. package/src/components/LogoOverlay.tsx +3 -6
  21. package/src/components/Player.tsx +86 -74
  22. package/src/components/PlayerControls.tsx +351 -263
  23. package/src/components/PlayerErrorBoundary.tsx +6 -13
  24. package/src/components/SeekBar.tsx +96 -88
  25. package/src/components/SkipIndicator.tsx +2 -12
  26. package/src/components/SpeedIndicator.tsx +2 -11
  27. package/src/components/StatsPanel.tsx +65 -34
  28. package/src/components/StreamStateOverlay.tsx +105 -49
  29. package/src/components/SubtitleRenderer.tsx +29 -29
  30. package/src/components/ThumbnailOverlay.tsx +5 -6
  31. package/src/components/TitleOverlay.tsx +2 -8
  32. package/src/components/players/DashJsPlayer.tsx +13 -11
  33. package/src/components/players/HlsJsPlayer.tsx +13 -11
  34. package/src/components/players/MewsWsPlayer/index.tsx +13 -11
  35. package/src/components/players/MistPlayer.tsx +13 -11
  36. package/src/components/players/MistWebRTCPlayer/index.tsx +19 -10
  37. package/src/components/players/NativePlayer.tsx +10 -12
  38. package/src/components/players/VideoJsPlayer.tsx +13 -11
  39. package/src/context/PlayerContext.tsx +4 -8
  40. package/src/context/index.ts +3 -3
  41. package/src/hooks/useMetaTrack.ts +28 -28
  42. package/src/hooks/usePlaybackQuality.ts +3 -3
  43. package/src/hooks/usePlayerController.ts +186 -140
  44. package/src/hooks/usePlayerSelection.ts +6 -6
  45. package/src/hooks/useStreamState.ts +53 -58
  46. package/src/hooks/useTelemetry.ts +19 -4
  47. package/src/hooks/useViewerEndpoints.ts +40 -30
  48. package/src/index.tsx +36 -28
  49. package/src/types.ts +9 -9
  50. package/src/ui/badge.tsx +6 -5
  51. package/src/ui/button.tsx +9 -8
  52. package/src/ui/context-menu.tsx +42 -61
  53. package/src/ui/select.tsx +13 -7
  54. package/src/ui/slider.tsx +18 -29
package/dist/cjs/index.js CHANGED
@@ -1,2 +1,2 @@
1
- var e=require("react/jsx-runtime"),t=require("react"),n=require("@livepeer-frameworks/player-core"),r=require("@radix-ui/react-slider"),a=require("@radix-ui/react-context-menu"),o=require("lucide-react"),s=require("@radix-ui/react-slot"),i=require("class-variance-authority");function l(e){var t=Object.create(null);return e&&Object.keys(e).forEach(function(n){if("default"!==n){var r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:function(){return e[n]}})}}),t.default=e,Object.freeze(t)}var c=l(t),u=l(r),d=l(a);function f(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function v(e,t,n,r,a,o,s){try{var i=e[o](s),l=i.value}catch(e){return void n(e)}i.done?t(l):Promise.resolve(l).then(r,a)}function m(e){return function(){var t=this,n=arguments;return new Promise(function(r,a){var o=e.apply(t,n);function s(e){v(o,r,a,s,i,"next",e)}function i(e){v(o,r,a,s,i,"throw",e)}s(void 0)})}}function h(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,L(r.key),r)}}function p(e,t,n){return(t=L(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function C(e){return C=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},C(e)}function g(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(g=function(){return!!e})()}function x(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function b(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?x(Object(n),!0).forEach(function(t){p(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):x(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function w(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}function y(){var e,t,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",a=n.toStringTag||"@@toStringTag";function o(n,r,a,o){var l=r&&r.prototype instanceof i?r:i,c=Object.create(l.prototype);return k(c,"_invoke",function(n,r,a){var o,i,l,c=0,u=a||[],d=!1,f={p:0,n:0,v:e,a:v,f:v.bind(e,4),d:function(t,n){return o=t,i=0,l=e,f.n=n,s}};function v(n,r){for(i=n,l=r,t=0;!d&&c&&!a&&t<u.length;t++){var a,o=u[t],v=f.p,m=o[2];n>3?(a=m===r)&&(l=o[(i=o[4])?5:(i=3,3)],o[4]=o[5]=e):o[0]<=v&&((a=n<2&&v<o[1])?(i=0,f.v=r,f.n=o[1]):v<m&&(a=n<3||o[0]>r||r>m)&&(o[4]=n,o[5]=r,f.n=m,i=0))}if(a||n>1)return s;throw d=!0,r}return function(a,u,m){if(c>1)throw TypeError("Generator is already running");for(d&&1===u&&v(u,m),i=u,l=m;(t=i<2?e:l)||!d;){o||(i?i<3?(i>1&&(f.n=-1),v(i,l)):f.n=l:f.v=l);try{if(c=2,o){if(i||(a="next"),t=o[a]){if(!(t=t.call(o,l)))throw TypeError("iterator result is not an object");if(!t.done)return t;l=t.value,i<2&&(i=0)}else 1===i&&(t=o.return)&&t.call(o),i<2&&(l=TypeError("The iterator does not provide a '"+a+"' method"),i=1);o=e}else if((t=(d=f.n<0)?l:n.call(r,f))!==s)break}catch(t){o=e,i=1,l=t}finally{c=1}}return{value:t,done:d}}}(n,a,o),!0),c}var s={};function i(){}function l(){}function c(){}t=Object.getPrototypeOf;var u=[][r]?t(t([][r]())):(k(t={},r,function(){return this}),t),d=c.prototype=i.prototype=Object.create(u);function f(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,c):(e.__proto__=c,k(e,a,"GeneratorFunction")),e.prototype=Object.create(d),e}return l.prototype=c,k(d,"constructor",c),k(c,"constructor",l),l.displayName="GeneratorFunction",k(c,a,"GeneratorFunction"),k(d),k(d,a,"Generator"),k(d,r,function(){return this}),k(d,"toString",function(){return"[object Generator]"}),(y=function(){return{w:o,m:f}})()}function k(e,t,n,r){var a=Object.defineProperty;try{a({},"",{})}catch(e){a=0}k=function(e,t,n,r){function o(t,n){k(e,t,function(e){return this._invoke(t,n,e)})}t?a?a(e,t,{value:n,enumerable:!r,configurable:!r,writable:!r}):e[t]=n:(o("next",0),o("throw",1),o("return",2))},k(e,t,n,r)}function A(e){if(null!=e){var t=e["function"==typeof Symbol&&Symbol.iterator||"@@iterator"],n=0;if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length))return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}}}throw new TypeError(typeof e+" is not iterable")}function j(e,t){return j=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},j(e,t)}function N(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,a,o,s,i=[],l=!0,c=!1;try{if(o=(n=n.call(e)).next,0===t);else for(;!(l=(r=o.call(n)).done)&&(i.push(r.value),i.length!==t);l=!0);}catch(e){c=!0,a=e}finally{try{if(!l&&null!=n.return&&(s=n.return(),Object(s)!==s))return}finally{if(c)throw a}}return i}}(e,t)||E(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function S(e){return function(e){if(Array.isArray(e))return f(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||E(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function L(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e,"string");return"symbol"==typeof t?t:t+""}function E(e,t){if(e){if("string"==typeof e)return f(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?f(e,t):void 0}}var M=153/69,I=["#7aa2f7","#bb9af7","#9ece6a","#73daca","#7dcfff","#f7768e","#e0af68","#2ac3de"],T=function(e){if(0===I.length)return null!=e?e:"#ffffff";if(1===I.length)return I[0];var t;do{t=I[Math.floor(Math.random()*I.length)]}while(t===e);return t},q=function(n){var r=n.parentRef,a=n.scale,o=void 0===a?.15:a,s=N(t.useState({top:0,left:0}),2),i=s[0],l=s[1],c=t.useRef(i);t.useEffect(function(){c.current=i},[i]);var u=N(t.useState({width:153,height:69}),2),d=u[0],f=u[1],v=t.useRef(d);t.useEffect(function(){v.current=d},[d]);var m=t.useRef({x:1.8,y:1.6}),h=N(t.useState(T()),2),p=h[0],C=h[1],g=t.useCallback(function(){var e=r.current;if(e){var t=e.clientWidth,n=e.clientHeight;if(0!==t&&0!==n){var a=n*o,s=t*o,i=s/M;i>a&&(s=(i=a)*M);var u={width:Math.max(20,s),height:Math.max(20,i)};v.current=u,f(u);var d=Math.max(0,n-u.height),h=Math.max(0,t-u.width),p={top:Math.random()*d,left:Math.random()*h};c.current=p,l(p);var C=Math.max(1.2,Math.min(u.width,u.height)/70);m.current={x:C*(Math.random()>.5?1:-1),y:C*(Math.random()>.5?1:-1)}}}},[r,o]);return t.useEffect(function(){if(r.current){if(g(),"undefined"!=typeof ResizeObserver){var e=new ResizeObserver(function(){return g()});return e.observe(r.current),function(){return e.disconnect()}}var t=function(){return g()};return window.addEventListener("resize",t),function(){return window.removeEventListener("resize",t)}}},[r,g]),t.useEffect(function(){var e,t=performance.now(),n=function(a){var o=r.current,s=v.current;if(o&&0!==s.width&&0!==s.height){var i=a-t;t=a;var u=Math.min(i/16,2),d=o.clientHeight-s.height,f=o.clientWidth-s.width,h=c.current,p=h.top,g=h.left,x=m.current,b=x.x,w=x.y,y=!1;g+=b*u,((p+=w*u)<=0||p>=d)&&(w=-w,p=Math.max(0,Math.min(d,p)),y=!0),(g<=0||g>=f)&&(b=-b,g=Math.max(0,Math.min(f,g)),y=!0),m.current={x:b,y:w};var k={top:p,left:g};c.current=k,l(k),y&&C(function(e){return T(e)}),e=requestAnimationFrame(n)}else e=requestAnimationFrame(n)};return e=requestAnimationFrame(n),function(){return cancelAnimationFrame(e)}},[r]),e.jsx("div",{className:"fw-player-dvd",style:{top:"".concat(i.top,"px"),left:"".concat(i.left,"px"),width:"".concat(d.width,"px"),height:"".concat(d.height,"px")},children:e.jsx("svg",{width:"100%",height:"100%",viewBox:"0 0 153 69",fill:p,className:"select-none",children:e.jsx("g",{children:e.jsx("path",{d:"M140.186,63.52h-1.695l-0.692,5.236h-0.847l0.77-5.236h-1.693l0.076-0.694h4.158L140.186,63.52L140.186,63.52z M146.346,68.756h-0.848v-4.545l0,0l-2.389,4.545l-1-4.545l0,0l-1.462,4.545h-0.771l1.924-5.931h0.695l0.924,4.006l2.078-4.006 h0.848V68.756L146.346,68.756z M126.027,0.063H95.352c0,0-8.129,9.592-9.654,11.434c-8.064,9.715-9.523,12.32-9.779,13.02 c0.063-0.699-0.256-3.304-3.686-13.148C71.282,8.7,68.359,0.062,68.359,0.062H57.881V0L32.35,0.063H13.169l-1.97,8.131 l14.543,0.062h3.365c9.336,0,15.055,3.747,13.467,10.354c-1.717,7.24-9.91,10.416-18.545,10.416h-3.24l4.191-17.783H10.502 L4.34,37.219h20.578c15.432,0,30.168-8.13,32.709-18.608c0.508-1.906,0.443-6.67-0.764-9.527c0-0.127-0.063-0.191-0.127-0.444 c-0.064-0.063-0.127-0.509,0.127-0.571c0.128-0.062,0.383,0.189,0.445,0.254c0.127,0.317,0.19,0.57,0.19,0.57l13.083,36.965 l33.344-37.6h14.1h3.365c9.337,0,15.055,3.747,13.528,10.354c-1.778,7.24-9.972,10.416-18.608,10.416h-3.238l4.191-17.783h-14.481 l-6.159,25.976h20.576c15.434,0,30.232-8.13,32.709-18.608C152.449,8.193,141.523,0.063,126.027,0.063L126.027,0.063z M71.091,45.981c-39.123,0-70.816,4.512-70.816,10.035c0,5.59,31.693,10.034,70.816,10.034c39.121,0,70.877-4.444,70.877-10.034 C141.968,50.493,110.212,45.981,71.091,45.981L71.091,45.981z M68.55,59.573c-8.956,0-16.196-1.523-16.196-3.365 c0-1.84,7.239-3.303,16.196-3.303c8.955,0,16.195,1.463,16.195,3.303C84.745,58.050,77.505,59.573,68.55,59.573L68.55,59.573z"})})})})},R="data:image/svg+xml,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22UTF-8%22%20standalone%3D%22no%22%3F%3E%3C!DOCTYPE%20svg%20PUBLIC%20%22-%2F%2FW3C%2F%2FDTD%20SVG%201.1%2F%2FEN%22%20%22http%3A%2F%2Fwww.w3.org%2FGraphics%2FSVG%2F1.1%2FDTD%2Fsvg11.dtd%22%3E%3Csvg%20width%3D%22100%25%22%20height%3D%22100%25%22%20viewBox%3D%220%200%2015806%2015806%22%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%20xml%3Aspace%3D%22preserve%22%20xmlns%3Aserif%3D%22http%3A%2F%2Fwww.serif.com%2F%22%20style%3D%22fill-rule%3Aevenodd%3Bclip-rule%3Aevenodd%3Bstroke-linejoin%3Around%3Bstroke-miterlimit%3A2%3B%22%3E%20%20%20%20%3Cg%20transform%3D%22matrix%285.55556%2C0%2C0%2C5.55556%2C0%2C0%29%22%3E%20%20%20%20%20%20%20%20%3Cg%20transform%3D%22matrix%288.31462%2C0%2C0%2C8.31462%2C8.22267e-14%2C-6.49389e-14%29%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cg%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cg%20transform%3D%22matrix%281%2C0%2C0%2C1%2C-217.125%2C-368.902%29%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M488.82%2C596.09C489.36%2C595.2%20489.89%2C594.31%20490.41%2C593.41C490.5%2C593.25%20490.59%2C593.09%20490.68%2C592.93C499.43%2C577.56%20504.8%2C560.03%20505.8%2C541.33C505.82%2C541.05%20505.83%2C540.77%20505.85%2C540.49C505.88%2C539.79%20505.91%2C539.09%20505.93%2C538.38C505.96%2C537.46%20505.97%2C536.54%20505.98%2C535.61C505.98%2C535.41%20505.99%2C535.2%20505.99%2C535L505.99%2C534.72C505.99%2C469.43%20453.06%2C416.51%20387.78%2C416.51C322.5%2C416.51%20269.57%2C469.44%20269.57%2C534.72C269.57%2C582.95%20298.45%2C624.43%20339.86%2C642.81C342.17%2C641.83%20344.82%2C641.6%20347.6%2C642.5C347.71%2C642.48%20348.06%2C642.58%20348.8%2C642.93C349.87%2C642.59%20351.08%2C642.46%20352.17%2C642.22C354.63%2C641.68%20357.12%2C641.33%20359.58%2C640.81C365.15%2C639.64%20370.59%2C637.89%20376.16%2C636.73C382.32%2C635.45%20388.69%2C638.46%20390.44%2C644.84C391.16%2C647.46%20390.81%2C650.38%20389.65%2C652.91C430.42%2C652.28%20466.17%2C631.01%20486.93%2C599.09C487.1%2C598.83%20487.27%2C598.57%20487.44%2C598.31C487.91%2C597.57%20488.37%2C596.83%20488.83%2C596.09L488.82%2C596.09Z%22%20style%3D%22fill%3Argb%2826%2C26%2C26%29%3Bfill-rule%3Anonzero%3B%22%2F%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cg%20transform%3D%22matrix%281%2C0%2C0%2C1%2C-217.125%2C-368.902%29%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M398.87%2C484.2L399.88%2C505.89L410.28%2C509.55L395.52%2C509.55L394.43%2C479.48L415.2%2C479.48L398.87%2C484.2Z%22%20style%3D%22fill%3Argb%2877%2C77%2C77%29%3Bfill-rule%3Anonzero%3B%22%2F%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cg%20transform%3D%22matrix%281%2C0%2C0%2C1%2C-217.125%2C-368.902%29%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M407.52%2C632.43L407.52%2C632.37L405.83%2C567.81L405.91%2C560.75L420.81%2C555.3L399.31%2C556L402.95%2C630.22C404.49%2C630.89%20406.02%2C631.62%20407.53%2C632.42L407.52%2C632.43Z%22%20style%3D%22fill%3Argb%2877%2C77%2C77%29%3Bfill-rule%3Anonzero%3B%22%2F%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cg%20transform%3D%22matrix%281%2C0%2C0%2C1%2C-217.125%2C-368.902%29%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M315.75%2C435.86L315.75%2C445.19C315.75%2C445.19%20343.09%2C444.1%20343.09%2C467.32L343.09%2C491.12L366.17%2C476.2L467.27%2C476.2C473.14%2C476.2%20478.98%2C477.27%20484.41%2C479.5C489.4%2C481.55%20494.15%2C484.61%20494.15%2C488.82L494.15%2C442.41L406.24%2C442.41L406.24%2C435.92L315.75%2C435.86Z%22%20style%3D%22fill%3Argb%28242%2C242%2C242%29%3Bfill-rule%3Anonzero%3B%22%2F%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M384.52%2C549.53C383%2C549.84%20374.5%2C554.81%20372.41%2C555.99C361.06%2C562.39%20350.66%2C570.29%20340.56%2C578.47L343.55%2C511.3C357.29%2C499.76%20372.89%2C489.71%20389.69%2C483.46L391.34%2C511.85L380.41%2C515.68L465.05%2C515.68L465.05%2C549.54L384.51%2C549.54L384.52%2C549.53Z%22%20style%3D%22fill%3Argb%28242%2C242%2C242%29%3Bfill-rule%3Anonzero%3B%22%2F%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M384.62%2C620.15C386.3%2C618.47%20388.78%2C617.44%20391.15%2C617.44C392.32%2C617.44%20393.42%2C617.66%20394.43%2C618.05L391.53%2C561.24C376.44%2C568.54%20361.62%2C576.78%20348.45%2C587.23C346.53%2C588.75%20339.44%2C594.3%20338.53%2C595.88C338.16%2C596.53%20338.08%2C596.77%20337.99%2C597.52C336.15%2C611.29%20341.68%2C626.24%20327.48%2C635.06C325.4%2C636.35%20322.28%2C637.18%20320.41%2C638.36C319.72%2C638.79%20319.26%2C638.87%20319.46%2C639.87L357.68%2C640.77L357.68%2C621.03C357.68%2C620.82%20358.79%2C618.46%20359.07%2C618.05C362%2C613.76%20368.64%2C613.05%20372.45%2C616.63C373.18%2C617.32%20375.15%2C620.84%20375.15%2C621.57L375.15%2C626.68C376.32%2C626.01%20377.56%2C625.46%20378.87%2C625.04C380.03%2C624.43%20381.23%2C623.94%20382.45%2C623.58C382.94%2C622.27%20383.71%2C621.04%20384.62%2C620.14L384.62%2C620.15Z%22%20style%3D%22fill%3Argb%28242%2C242%2C242%29%3Bfill-rule%3Anonzero%3B%22%2F%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cg%20transform%3D%22matrix%281%2C0%2C0%2C1%2C-217.125%2C-368.902%29%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Crect%20x%3D%22336.59%22%20y%3D%22428.82%22%20width%3D%2255.13%22%20height%3D%228.66%22%20style%3D%22fill%3Argb%28242%2C242%2C242%29%3B%22%2F%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cg%20transform%3D%22matrix%281%2C0%2C0%2C1%2C-217.125%2C-368.902%29%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M370.43%2C405.41L381.28%2C405.41L381.28%2C428.82L347.02%2C428.82C347.02%2C415.9%20357.51%2C405.41%20370.43%2C405.41Z%22%20style%3D%22fill%3Argb%28242%2C242%2C242%29%3Bfill-rule%3Anonzero%3B%22%2F%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cg%20transform%3D%22matrix%281%2C0%2C0%2C1%2C-217.125%2C-368.902%29%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M375.15%2C621.59L375.15%2C646.4L399.31%2C643.32L393.82%2C606.12%22%20style%3D%22fill%3Argb%28242%2C242%2C242%29%3Bfill-rule%3Anonzero%3B%22%2F%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cg%20transform%3D%22matrix%281%2C0%2C0%2C1%2C-217.125%2C-368.902%29%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M434.95%2C641.77C427.45%2C636.79%20420.54%2C630.98%20414.13%2C624.68C378.86%2C650.1%20331.68%2C660.51%20289.92%2C645.24C276.7%2C656.38%20260.2%2C663.03%20243.21%2C666.13C245.28%2C668.42%20247.17%2C670.85%20249%2C673.36C259.11%2C673.75%20269.41%2C673.79%20279.47%2C672.94C316.6%2C669.77%20351.78%2C651.88%20389.38%2C653.26C420.31%2C654.4%20448.46%2C670.95%20479.26%2C673.24C493.74%2C674.31%20510.78%2C671.04%20524.28%2C665.72C524.6%2C665.6%20525.17%2C665.63%20525.1%2C665.2C493.55%2C667.12%20461.22%2C659.22%20434.94%2C641.78L434.95%2C641.77Z%22%20style%3D%22fill%3Argb%28242%2C242%2C242%29%3Bfill-rule%3Anonzero%3B%22%2F%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M431.64%2C681.28C431.71%2C681.82%20430.99%2C681.55%20430.67%2C681.5C428.7%2C681.19%20426.49%2C680.36%20424.48%2C679.92C400.81%2C674.72%20375.35%2C672.69%20351.2%2C675.65C341.11%2C676.89%20331.28%2C679.62%20321.24%2C681.22C300.45%2C684.53%20278.62%2C685.74%20257.83%2C682.01C273.85%2C682.14%20289.66%2C680.16%20305.21%2C676.54C319.99%2C673.09%20334.95%2C667.38%20350.01%2C665.52C377.55%2C662.11%20406.29%2C671.7%20431.64%2C681.28Z%22%20style%3D%22fill%3Argb%28242%2C242%2C242%29%3Bfill-rule%3Anonzero%3B%22%2F%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M376.31%2C636.41L367.67%2C639.94C342.05%2C648.2%20314.13%2C646.84%20288.76%2C638.37C280.1%2C644.46%20271.14%2C650.64%20260.82%2C653.56L267.06%2C649.22C276.19%2C642.22%20285.08%2C634.65%20291.47%2C624.98C294.79%2C626.43%20297.92%2C628.31%20301.23%2C629.78C323.76%2C639.82%20352.12%2C642.31%20376.31%2C636.41Z%22%20style%3D%22fill%3Argb%28242%2C242%2C242%29%3Bfill-rule%3Anonzero%3B%22%2F%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M496.44%2C679.79L493.62%2C680.99C455.11%2C696.09%20422.32%2C666.01%20385.12%2C661.7L374.61%2C660.13C397.05%2C658.33%20419.03%2C663.62%20440.24%2C670.18C445.86%2C671.92%20451.4%2C674.13%20457.03%2C675.77C469.67%2C679.46%20483.33%2C681.19%20496.45%2C679.8L496.44%2C679.79Z%22%20style%3D%22fill%3Argb%28242%2C242%2C242%29%3Bfill-rule%3Anonzero%3B%22%2F%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M502.72%2C658.04L499.89%2C658.33C480.42%2C655.87%20461.58%2C649.56%20444.59%2C639.91C442.86%2C638.93%20440.96%2C637.83%20439.42%2C636.58C447.9%2C638.94%20456.77%2C635.92%20464.33%2C632.12C472.21%2C646.13%20487.36%2C654.62%20502.73%2C658.03L502.72%2C658.04Z%22%20style%3D%22fill%3Argb%28242%2C242%2C242%29%3Bfill-rule%3Anonzero%3B%22%2F%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M440%2C690.82C440.07%2C691.36%20439.35%2C691.09%20439.03%2C691.04C435.69%2C690.51%20432.35%2C689.64%20429.02%2C689.11C398.16%2C684.21%20366.77%2C684.02%20335.64%2C686.06C335.32%2C686.08%20334.23%2C686.27%20334.29%2C685.75C369.06%2C676.79%20406.04%2C680.41%20440%2C690.82Z%22%20style%3D%22fill%3Argb%28242%2C242%2C242%29%3Bfill-rule%3Anonzero%3B%22%2F%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cg%20transform%3D%22matrix%281%2C0%2C0%2C1%2C-217.125%2C-368.902%29%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M313.56%2C572.87L313.69%2C572.14L313.94%2C572.49L313.56%2C572.87Z%22%20style%3D%22fill%3Argb%282%2C38%2C43%29%3Bfill-opacity%3A0.6%3Bfill-rule%3Anonzero%3B%22%2F%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cg%20transform%3D%22matrix%281%2C0%2C0%2C1%2C-217.125%2C-368.902%29%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M539.06%2C620.51C542.62%2C613.83%20545.72%2C606.95%20548.35%2C599.91C560.45%2C567.54%20562.63%2C531.85%20554.01%2C497.83C553.56%2C496.03%20551.73%2C494.94%20549.93%2C495.4C548.14%2C495.85%20547.05%2C497.68%20547.5%2C499.47C555.79%2C532.17%20553.69%2C566.46%20542.08%2C597.56C539.98%2C603.18%20537.56%2C608.71%20534.84%2C614.1C532.63%2C618.48%20530.21%2C622.77%20527.59%2C626.96C527.3%2C627.44%20527%2C627.91%20526.69%2C628.38C525.42%2C630.39%20524.1%2C632.37%20522.71%2C634.32C522.05%2C635.28%20521.36%2C636.24%20520.66%2C637.19C519.76%2C638.42%20518.84%2C639.63%20517.89%2C640.84C512.56%2C647.71%20506.62%2C654.2%20500.09%2C660.26C498.25%2C661.96%20496.36%2C663.64%20494.43%2C665.27C490.48%2C668.61%20486.33%2C671.8%20482%2C674.81C478.57%2C677.19%20474.88%2C679.59%20471.13%2C681.77C467.82%2C683.69%20464.47%2C685.45%20461.2%2C686.92C461.06%2C686.99%20460.92%2C687.06%20460.79%2C687.14L460.76%2C687.16L460.74%2C687.16L460.58%2C687.29L460.43%2C687.41L460.37%2C687.45L460.3%2C687.51L460.11%2C687.7L460.07%2C687.75L460.05%2C687.77L460.03%2C687.8L460%2C687.83C459.77%2C688.11%20459.57%2C688.43%20459.44%2C688.79C459.3%2C689.15%20459.23%2C689.53%20459.22%2C689.9L459.22%2C690.26L459.25%2C690.42L459.29%2C690.67L459.35%2C690.9C459.39%2C691.06%20459.45%2C691.21%20459.51%2C691.36C459.58%2C691.5%20459.65%2C691.64%20459.73%2C691.77L459.75%2C691.79L459.77%2C691.82L459.88%2C691.98L460%2C692.13L460.04%2C692.19L460.34%2C692.49L460.36%2C692.49L460.42%2C692.56C460.7%2C692.79%20461.02%2C692.98%20461.38%2C693.12L483.09%2C701.39L504.75%2C709.65C504.94%2C709.72%20505.13%2C709.78%20505.34%2C709.82C506.31%2C710.21%20507.44%2C710.1%20508.32%2C709.48C508.49%2C709.37%20508.64%2C709.23%20508.79%2C709.08L556.35%2C659.8C557.38%2C658.73%20557.5%2C657.12%20556.75%2C655.92L539.06%2C620.51Z%22%20style%3D%22fill%3Argb%28242%2C242%2C242%29%3Bfill-rule%3Anonzero%3B%22%2F%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cg%20transform%3D%22matrix%281%2C0%2C0%2C1%2C-217.125%2C-368.902%29%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M427.7%2C697.67C395%2C705.96%20360.71%2C703.86%20329.62%2C692.24C313.96%2C686.39%20299.11%2C678.13%20285.67%2C667.54C283.67%2C665.98%20281.69%2C664.35%20279.75%2C662.67C272.21%2C656.14%20265.17%2C648.83%20258.77%2C640.77C257.46%2C639.14%20256.18%2C637.46%20254.94%2C635.76C254.57%2C635.27%20254.21%2C634.78%20253.85%2C634.28C253.35%2C633.58%20252.85%2C632.88%20252.36%2C632.17C249.98%2C628.73%20247.59%2C625.05%20245.4%2C621.29C243.51%2C618.05%20241.78%2C614.76%20240.33%2C611.54C240.3%2C611.48%20240.28%2C611.43%20240.25%2C611.37C240.25%2C611.35%20240.23%2C611.32%20240.22%2C611.3C240.16%2C611.18%20240.1%2C611.07%20240.03%2C610.96L240.01%2C610.93L240.01%2C610.9L239.89%2C610.74L239.77%2C610.6L239.72%2C610.54L239.66%2C610.47L239.56%2C610.36L239.47%2C610.28L239.43%2C610.24L239.4%2C610.22L239.38%2C610.19L239.34%2C610.17C239.29%2C610.13%20239.24%2C610.09%20239.19%2C610.05C238.95%2C609.87%20238.68%2C609.72%20238.39%2C609.61C238.02%2C609.47%20237.65%2C609.4%20237.28%2C609.39L236.91%2C609.39L236.75%2C609.42L236.51%2C609.46L236.27%2C609.52C236.12%2C609.56%20235.97%2C609.62%20235.81%2C609.68C235.67%2C609.75%20235.54%2C609.82%20235.41%2C609.9L235.35%2C609.94L235.19%2C610.05L234.99%2C610.21L234.92%2C610.27L234.73%2C610.46L234.69%2C610.51L234.61%2C610.59C234.38%2C610.87%20234.19%2C611.19%20234.05%2C611.55L225.78%2C633.25L217.53%2C654.92C217.45%2C655.11%20217.39%2C655.3%20217.35%2C655.51C216.96%2C656.48%20217.08%2C657.61%20217.69%2C658.49C217.8%2C658.66%20217.94%2C658.81%20218.09%2C658.96L267.38%2C706.52C268.44%2C707.55%20270.05%2C707.67%20271.25%2C706.92L306.67%2C689.23C313.34%2C692.79%20320.22%2C695.89%20327.26%2C698.52C359.63%2C710.62%20395.32%2C712.8%20429.34%2C704.18C431.14%2C703.72%20432.23%2C701.9%20431.78%2C700.1C431.32%2C698.31%20429.5%2C697.22%20427.7%2C697.67Z%22%20style%3D%22fill%3Argb%28242%2C242%2C242%29%3Bfill-rule%3Anonzero%3B%22%2F%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cg%20transform%3D%22matrix%281%2C0%2C0%2C1%2C-217.125%2C-368.902%29%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M222.39%2C582.08C222.84%2C583.87%20224.67%2C584.96%20226.46%2C584.51C228.26%2C584.05%20229.35%2C582.23%20228.89%2C580.43C220.61%2C547.74%20222.7%2C513.44%20234.32%2C482.35C240.43%2C466.01%20249.16%2C450.55%20260.42%2C436.66C266.85%2C428.7%20274.11%2C421.26%20282.17%2C414.47C286.06%2C411.19%20290.14%2C408.06%20294.4%2C405.1C297.83%2C402.71%20301.52%2C400.32%20305.27%2C398.13C308.57%2C396.21%20311.92%2C394.45%20315.2%2C392.98C315.34%2C392.92%20315.48%2C392.84%20315.61%2C392.76L315.63%2C392.74L315.66%2C392.74L315.82%2C392.62L315.97%2C392.5L316.03%2C392.45L316.09%2C392.39L316.2%2C392.29L316.28%2C392.2L316.33%2C392.16L316.35%2C392.13L316.37%2C392.11L316.4%2C392.07C316.63%2C391.79%20316.82%2C391.48%20316.96%2C391.12C317.1%2C390.75%20317.17%2C390.38%20317.18%2C390.01L317.18%2C389.78L317.17%2C389.64L317.15%2C389.48L317.11%2C389.24L317.05%2C389C317.01%2C388.85%20316.95%2C388.7%20316.88%2C388.55C316.82%2C388.4%20316.74%2C388.27%20316.66%2C388.14L316.64%2C388.11L316.64%2C388.08L316.52%2C387.92L316.4%2C387.77L316.35%2C387.72L316.29%2C387.65L316.06%2C387.42L316.03%2C387.4L316.01%2C387.37L315.97%2C387.35C315.69%2C387.11%20315.37%2C386.92%20315.02%2C386.79L293.31%2C378.51L271.65%2C370.26C271.46%2C370.18%20271.26%2C370.12%20271.06%2C370.08C270.08%2C369.7%20268.96%2C369.81%20268.08%2C370.42C267.91%2C370.54%20267.75%2C370.67%20267.61%2C370.82L220.05%2C420.11C219.02%2C421.18%20218.89%2C422.78%20219.65%2C423.98L237.33%2C459.4C233.77%2C466.07%20230.67%2C472.95%20228.04%2C480C215.95%2C512.36%20213.77%2C548.05%20222.39%2C582.08Z%22%20style%3D%22fill%3Argb%28242%2C242%2C242%29%3Bfill-rule%3Anonzero%3B%22%2F%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cg%20transform%3D%22matrix%281%2C0%2C0%2C1%2C-217.125%2C-368.902%29%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M519.68%2C441.65C520.78%2C443.12%20521.85%2C444.61%20522.91%2C446.13C525.3%2C449.56%20527.69%2C453.25%20529.88%2C457C531.8%2C460.3%20533.56%2C463.65%20535.03%2C466.93C535.09%2C467.07%20535.17%2C467.21%20535.25%2C467.34L535.27%2C467.36L535.27%2C467.39L535.39%2C467.55L535.51%2C467.7L535.56%2C467.76L535.62%2C467.82L535.72%2C467.93L535.81%2C468.01L535.85%2C468.05L535.88%2C468.07L535.9%2C468.1L535.94%2C468.13C536.22%2C468.36%20536.54%2C468.55%20536.89%2C468.69C537.26%2C468.83%20537.63%2C468.89%20538%2C468.9L538.37%2C468.9L538.53%2C468.88L538.77%2C468.84L539.01%2C468.78C539.16%2C468.73%20539.31%2C468.68%20539.46%2C468.61C539.61%2C468.54%20539.74%2C468.47%20539.87%2C468.39L539.9%2C468.37L539.93%2C468.37L540.09%2C468.25L540.24%2C468.13L540.29%2C468.08L540.36%2C468.02L540.59%2C467.79L540.61%2C467.76L540.64%2C467.74L540.66%2C467.7C540.9%2C467.42%20541.09%2C467.1%20541.22%2C466.74L549.5%2C445.04L557.75%2C423.38C557.83%2C423.19%20557.89%2C422.99%20557.93%2C422.79C558.32%2C421.81%20558.2%2C420.69%20557.59%2C419.81C557.47%2C419.64%20557.34%2C419.48%20557.19%2C419.33L507.9%2C371.78C506.84%2C370.75%20505.23%2C370.62%20504.03%2C371.38L468.61%2C389.06C461.94%2C385.5%20455.06%2C382.4%20448.01%2C379.77C415.65%2C367.68%20379.96%2C365.5%20345.93%2C374.12C344.14%2C374.57%20343.05%2C376.4%20343.5%2C378.19C343.96%2C379.98%20345.78%2C381.08%20347.58%2C380.62C380.27%2C372.34%20414.57%2C374.43%20445.66%2C386.05C461.19%2C391.85%20475.94%2C400.04%20489.29%2C410.5C500.52%2C419.29%20510.77%2C429.7%20519.68%2C441.65Z%22%20style%3D%22fill%3Argb%28242%2C242%2C242%29%3Bfill-rule%3Anonzero%3B%22%2F%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%3C%2Fg%3E%3C%2Fsvg%3E",F=function(n){var r=n.index,a=N(t.useState({top:0,left:0}),2),o=a[0],s=a[1],i=N(t.useState(40),2),l=i[0],c=i[1],u=N(t.useState(0),2),d=u[0],f=u[1],v=function(){return{top:80*Math.random()+10,left:80*Math.random()+10}},m=function(){return 60*Math.random()+30};t.useEffect(function(){s(v()),c(m());var e=function(){f(.15),setTimeout(function(){f(0),setTimeout(function(){s(v()),c(m()),setTimeout(function(){e()},200)},1500)},4e3+3e3*Math.random())},t=setTimeout(e,500*r);return function(){return clearTimeout(t)}},[r]);var h=["rgba(122, 162, 247, 0.2)","rgba(187, 154, 247, 0.2)","rgba(158, 206, 106, 0.2)","rgba(115, 218, 202, 0.2)","rgba(125, 207, 255, 0.2)","rgba(247, 118, 142, 0.2)","rgba(224, 175, 104, 0.2)","rgba(42, 195, 222, 0.2)"];return e.jsx("div",{style:{position:"absolute",top:"".concat(o.top,"%"),left:"".concat(o.left,"%"),width:"".concat(l,"px"),height:"".concat(l,"px"),borderRadius:"50%",background:h[r%h.length],opacity:d,transition:"opacity 1s ease-in-out",pointerEvents:"none",userSelect:"none"}})},B=function(n){var r=n.containerRef,a=n.scale,o=void 0===a?.2:a,s=n.onHitmarker,i=N(t.useState(100),2),l=i[0],c=i[1],u=N(t.useState({x:0,y:0}),2),d=u[0],f=u[1],v=N(t.useState(!1),2),m=v[0],h=v[1];t.useEffect(function(){if(r.current){var e=r.current.clientWidth,t=r.current.clientHeight,n=Math.min(e,t);c(n*o)}},[r,o]);var p=function(e){if(r.current){var t=r.current.getBoundingClientRect(),n=t.left+t.width/2,a=t.top+t.height/2,o=e.clientX-n,s=e.clientY-a,i=Math.sqrt(o*o+s*s),c=1.5*l;if(i<c&&i>0){var u=(c-i)/c*50;f({x:-o/i*u,y:-s/i*u}),h(!0)}else f({x:0,y:0}),h(!1)}},C=function(){f({x:0,y:0}),h(!1)};return t.useEffect(function(){if(r.current){var e=r.current;return e.addEventListener("mousemove",p),e.addEventListener("mouseleave",C),function(){e.removeEventListener("mousemove",p),e.removeEventListener("mouseleave",C)}}},[l,r]),e.jsxs("div",{style:{position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -50%) translate(".concat(d.x,"px, ").concat(d.y,"px)"),display:"flex",alignItems:"center",justifyContent:"center",zIndex:10,transition:"transform 0.3s ease-out",userSelect:"none"},children:[e.jsx("div",{style:{position:"absolute",width:"".concat(1.4*l,"px"),height:"".concat(1.4*l,"px"),borderRadius:"50%",background:"rgba(122, 162, 247, 0.15)",animation:m?"logoPulse 1s ease-in-out infinite":"logoPulse 3s ease-in-out infinite",transform:m?"scale(1.2)":"scale(1)",transition:"transform 0.3s ease-out",pointerEvents:"none"}}),e.jsx("img",{src:R,alt:"FrameWorks Logo",onClick:function(e){e.stopPropagation(),s&&s({clientX:e.clientX,clientY:e.clientY})},style:{width:"".concat(l,"px"),height:"".concat(l,"px"),position:"relative",zIndex:1,filter:m?"drop-shadow(0 6px 12px rgba(36, 40, 59, 0.4)) brightness(1.1)":"drop-shadow(0 4px 8px rgba(36, 40, 59, 0.3))",transform:m?"scale(1.1)":"scale(1)",transition:"all 0.3s ease-out",cursor:m?"pointer":"default",userSelect:"none",WebkitUserDrag:"none"}})]})};function P(t){var n=t.status,r="w-5 h-5";return"INITIALIZING"!==n&&"BOOTING"!==n&&"WAITING_FOR_DATA"!==n&&n?"OFFLINE"===n?e.jsx("svg",{className:r,fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",style:{color:"hsl(var(--tn-red, 348 100% 72%))"},children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M18.364 5.636a9 9 0 010 12.728m0 0l-2.829-2.829m2.829 2.829L21 21M15.536 8.464a5 5 0 010 7.072m0 0l-2.829-2.829m-4.243 2.829a4.978 4.978 0 01-1.414-2.83m-1.414 5.658a9 9 0 01-2.167-9.238m7.824 2.167a1 1 0 111.414 1.414m-1.414-1.414L3 3m8.293 8.293l1.414 1.414"})}):"ERROR"===n||"INVALID"===n?e.jsx("svg",{className:r,fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",style:{color:"hsl(var(--tn-red, 348 100% 72%))"},children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z"})}):e.jsxs("svg",{className:"".concat(r," animate-spin"),fill:"none",viewBox:"0 0 24 24",style:{color:"hsl(var(--tn-cyan, 193 100% 75%))"},children:[e.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),e.jsx("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})]}):e.jsxs("svg",{className:"".concat(r," animate-spin"),fill:"none",viewBox:"0 0 24 24",style:{color:"hsl(var(--tn-yellow, 40 95% 64%))"},children:[e.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),e.jsx("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})]})}var D=function(t){var n=t.status,r=t.message,a=t.percentage,o=t.error,s=t.onRetry,i=("ERROR"===n||"INVALID"===n)&&s,l="INITIALIZING"===n&&void 0!==a,c=o||r;return e.jsxs("div",{style:{position:"absolute",bottom:"16px",left:"50%",transform:"translateX(-50%)",zIndex:20,display:"flex",flexDirection:"column",alignItems:"center",gap:"8px",maxWidth:"280px",textAlign:"center"},children:[e.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"8px",color:"#787c99",fontSize:"13px",fontFamily:"-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif"},children:[e.jsx(P,{status:n}),e.jsx("span",{children:c})]}),l&&e.jsx("div",{style:{width:"160px",height:"4px",background:"rgba(65, 72, 104, 0.4)",borderRadius:"2px",overflow:"hidden"},children:e.jsx("div",{style:{width:"".concat(Math.min(100,a),"%"),height:"100%",background:"hsl(var(--tn-cyan, 193 100% 75%))",transition:"width 0.3s ease-out"}})}),i&&e.jsx("button",{type:"button",onClick:s,style:{padding:"6px 16px",background:"transparent",border:"1px solid rgba(122, 162, 247, 0.4)",borderRadius:"4px",color:"#7aa2f7",fontSize:"11px",fontWeight:500,cursor:"pointer",transition:"all 0.2s ease",fontFamily:"-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif"},onMouseEnter:function(e){e.currentTarget.style.background="rgba(122, 162, 247, 0.1)"},onMouseLeave:function(e){e.currentTarget.style.background="transparent"},children:"Retry"})]})},O=function(){try{var e=new(window.AudioContext||window.webkitAudioContext),t=e.createOscillator(),n=e.createOscillator(),r=e.createGain(),a=e.createGain(),o=e.createGain();t.connect(r),n.connect(a),r.connect(o),a.connect(o),o.connect(e.destination),t.frequency.setValueAtTime(1800,e.currentTime),t.frequency.exponentialRampToValueAtTime(900,e.currentTime+.08),n.frequency.setValueAtTime(3600,e.currentTime),n.frequency.exponentialRampToValueAtTime(1800,e.currentTime+.04),t.type="triangle",n.type="sine",r.gain.setValueAtTime(0,e.currentTime),r.gain.linearRampToValueAtTime(.4,e.currentTime+.002),r.gain.exponentialRampToValueAtTime(.001,e.currentTime+.12),a.gain.setValueAtTime(0,e.currentTime),a.gain.linearRampToValueAtTime(.3,e.currentTime+.001),a.gain.exponentialRampToValueAtTime(.001,e.currentTime+.06),o.gain.setValueAtTime(.5,e.currentTime);var s=e.currentTime,i=s+.15;t.start(s),n.start(s),t.stop(i),n.stop(i)}catch(e){}},z=function(n){var r=n.status,a=n.message,o=void 0===a?"Waiting for stream...":a,s=n.percentage,i=n.error,l=n.onRetry,c=t.useRef(null),u=N(t.useState([]),2),d=u[0],f=u[1];return t.useEffect(function(){var e="idle-screen-animations";if(!document.getElementById(e)){var t=document.createElement("style");t.id=e,t.textContent="\n @keyframes fadeInOut {\n 0%, 100% { opacity: 0.6; }\n 50% { opacity: 0.9; }\n }\n @keyframes logoPulse {\n 0%, 100% { opacity: 0.15; transform: scale(1); }\n 50% { opacity: 0.25; transform: scale(1.05); }\n }\n @keyframes floatUp {\n 0% { transform: translateY(100vh) rotate(0deg); opacity: 0; }\n 10% { opacity: 0.6; }\n 90% { opacity: 0.6; }\n 100% { transform: translateY(-100px) rotate(360deg); opacity: 0; }\n }\n @keyframes gradientShift {\n 0%, 100% { background-position: 0% 50%; }\n 50% { background-position: 100% 50%; }\n }\n @keyframes hitmarkerFade45 {\n 0% { opacity: 1; transform: translate(-50%, -50%) rotate(45deg) scale(0.5); }\n 20% { opacity: 1; transform: translate(-50%, -50%) rotate(45deg) scale(1.2); }\n 100% { opacity: 0; transform: translate(-50%, -50%) rotate(45deg) scale(1); }\n }\n @keyframes hitmarkerFadeNeg45 {\n 0% { opacity: 1; transform: translate(-50%, -50%) rotate(-45deg) scale(0.5); }\n 20% { opacity: 1; transform: translate(-50%, -50%) rotate(-45deg) scale(1.2); }\n 100% { opacity: 0; transform: translate(-50%, -50%) rotate(-45deg) scale(1); }\n }\n ",document.head.appendChild(t)}},[]),e.jsxs("div",{ref:c,className:"fw-player-root",style:{position:"absolute",inset:0,zIndex:5,background:"\n linear-gradient(135deg,\n hsl(var(--tn-bg-dark, 235 21% 11%)) 0%,\n hsl(var(--tn-bg, 233 23% 17%)) 25%,\n hsl(var(--tn-bg-dark, 235 21% 11%)) 50%,\n hsl(var(--tn-bg, 233 23% 17%)) 75%,\n hsl(var(--tn-bg-dark, 235 21% 11%)) 100%\n )\n ",backgroundSize:"400% 400%",animation:"gradientShift 16s ease-in-out infinite",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",overflow:"hidden",borderRadius:"0",userSelect:"none"},children:[d.map(function(t){return e.jsxs("div",{style:{position:"absolute",left:"".concat(t.x,"px"),top:"".concat(t.y,"px"),transform:"translate(-50%, -50%)",pointerEvents:"none",zIndex:100,width:"40px",height:"40px"},children:[e.jsx("div",{style:{position:"absolute",top:"25%",left:"25%",width:"12px",height:"3px",backgroundColor:"#ffffff",transform:"translate(-50%, -50%) rotate(45deg)",animation:"hitmarkerFade45 0.6s ease-out forwards",boxShadow:"0 0 8px rgba(255, 255, 255, 0.8)",borderRadius:"1px"}}),e.jsx("div",{style:{position:"absolute",top:"25%",left:"75%",width:"12px",height:"3px",backgroundColor:"#ffffff",transform:"translate(-50%, -50%) rotate(-45deg)",animation:"hitmarkerFadeNeg45 0.6s ease-out forwards",boxShadow:"0 0 8px rgba(255, 255, 255, 0.8)",borderRadius:"1px"}}),e.jsx("div",{style:{position:"absolute",top:"75%",left:"25%",width:"12px",height:"3px",backgroundColor:"#ffffff",transform:"translate(-50%, -50%) rotate(-45deg)",animation:"hitmarkerFadeNeg45 0.6s ease-out forwards",boxShadow:"0 0 8px rgba(255, 255, 255, 0.8)",borderRadius:"1px"}}),e.jsx("div",{style:{position:"absolute",top:"75%",left:"75%",width:"12px",height:"3px",backgroundColor:"#ffffff",transform:"translate(-50%, -50%) rotate(45deg)",animation:"hitmarkerFade45 0.6s ease-out forwards",boxShadow:"0 0 8px rgba(255, 255, 255, 0.8)",borderRadius:"1px"}})]},t.id)}),S(Array(12)).map(function(t,n){return e.jsx("div",{style:{position:"absolute",left:"".concat(100*Math.random(),"%"),width:"".concat(4*Math.random()+2,"px"),height:"".concat(4*Math.random()+2,"px"),borderRadius:"50%",background:["#7aa2f7","#bb9af7","#9ece6a","#73daca","#7dcfff","#f7768e","#e0af68","#2ac3de"][n%8],opacity:0,animation:"floatUp ".concat(8+4*Math.random(),"s linear infinite"),animationDelay:"".concat(8*Math.random(),"s"),pointerEvents:"none"}},"particle-".concat(n))}),S(Array(8)).map(function(t,n){return e.jsx(F,{index:n},n)}),e.jsx(B,{containerRef:c,onHitmarker:function(e){if(c.current){var t=c.current.getBoundingClientRect(),n=e.clientX-t.left,r=e.clientY-t.top,a={id:Date.now()+Math.random(),x:n,y:r};f(function(e){return[].concat(S(e),[a])}),function(){try{var e=new Audio("data:audio/mpeg;base64,SUQzBAAAAAAANFRDT04AAAAHAAADT3RoZXIAVFNTRQAAAA8AAANMYXZmNTcuODMuMTAwAAAAAAAAAAAAAAD/+1QAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABJbmZvAAAADwAAAAYAAAnAADs7Ozs7Ozs7Ozs7Ozs7OztiYmJiYmJiYmJiYmJiYmJiYomJiYmJiYmJiYmJiYmJiYmxsbGxsbGxsbGxsbGxsbGxsdjY2NjY2NjY2NjY2NjY2NjY/////////////////////wAAAABMYXZjNTcuMTAAAAAAAAAAAAAAAAAkAkAAAAAAAAAJwOuMZun/+5RkAA8S/F23AGAaAi0AF0AAAAAInXsEAIRXyQ8D4OQgjEhE3cO7ujuHF0XCOu4G7xKbi3Funu7u7p9dw7unu7u7p7u7u6fXcW7om7u7uiU3dxdT67u7p7uHdxelN3cW6fXcW7oXXd3eJTd3d0+u4t3iXdw4up70W4uiPruLDzMw8Pz79Y99JfkyfPv5/h9uTJoy79Y99Y97q3vyZPJk0ZfrL6x73Vn+J35dKKS/STQyQ8CAiCPNuRAOOqquAx+fzJeBKDAsgAMBuWcBsHKhjJTcCwIALyAvABbI0ZIcCmP8jHJe8gZAdVRp2TpnU/kUXV4iQuBAAkAQgisLPvwQ2Jz7wIkIpQ8QOl/KFy75w+2HpTFnRqXLQo0fzlSYRe5Ce9yZMEzRM4xesu95Mo8QQsoMH4gLg+fJqkmY3GZJE2kwGfMECJiAdIttoEa2yotfC7jsS2mjKgbzAfEMeiwZpGSUFCQwPKQiWXh0TnkNor5SmrKvwHlX2zFxKxPCzRL/+5RkIwADvUxLawwb0GdF6Y1hJlgNNJk+DSRwyQwI6AD2JCiBmhaff0dzCEBjgFABAcDNFc3YAEV4hQn0L/QvQnevom+n13eIjoTvABLrHg/L9RzdWXYonHbbbE2K0pX+gkL2g56RiwrbuWwhoABzQoMKOAIGAfE4UKk6BhSIJpECBq0CEYmZKYIiAJt72H24dNou7y/Ee7a/3v+MgySemSTYmnBAFwIAAGfCJ8/D9YfkwQEBcP38uA1d/EB1T5dZKEsgnuhwZirY5fIMRMdRn7U4OcN2m5NWeYdcPBwXDBOsJF1DBYks62pAURqz1hGoGHH/QIoRC80tYAJ8g4f3MPD51sywAbhAn/X9P/75tvZww3gZ3pYPDx/+ACO/7//ffHj/D/AAfATC4DYGFA3MRABo0lqWjBOl2yAda1C1BdhduXgm8FGnAQB/lDiEi6j9qw9EHigIIOLB6F1eIPd+T6Agc4//lMo6+k3tdttJY2gArU7cN07m2FLSm4gCjyz/+5RECwACwSRZawkdLFGi2mVh5h4LfFdPVPGACViTavaeMAAV0UkkEsDhxxJwqF04on002mZah8w9+5ItfSAoyZa1dchnPpLmAEKrVMRA//sD8w0WsB4xiw4JqaZMB45TdpIuXXUPf8Bpa35p/jQIAOAuZkmUeJoM5W6L2gqqO6rTuHjUTDnhy4QiK348vtFysOizShoHbBpsPRYcSINCbiN4XOLPPAgq3dW2Ga7SlyiKXBV7W1RQl5BiiVGkwayJfEnPxgXkQeZxxzyhTuLO2XFUDDstoc6CkM1J8QZAjUN3bM8580cRygNfmPAELGjIH0Z/0A+8csyH/4eHvgAf8APgABmZ98AARAADP////Dw8PHEmIpgGttpJQJsmZjq5nPQ8j5VqWW1evqdjP182PA6tHJZgkC5iSbEQkyJSz/BvP3eucLKN0+Wiza4feKKFBqiAEBAMXyYni5NZc16CDl/QY9j6BAcWSmQYcIcoMHYoQNBiIBgIBUAzQUMSnjj/+5RkCwADsFLffjEAAjrJe63JHACO6WtlnPMACKaCK1uMMADU5dI6JhW2cam98UlRmY4ihyKFrNsgpZd5PYgBALnYofKEt82De0GbW1DLibvFDK+bSeOm8qKdqUFZ7uiK8XMPHyqm3pTxUvcunUfxXEo9RNe5b/8vfCD3kzDN7vTtHyaIcntVDAYBAUBAAAAQBI2vguYNsHWm5AR3mZtZib8WAHFvz2Kf9//iYvlRB/+n///////////+UH7XoIDMoJAEAMtj8JshJPRwklVqNSpYnalfE+VzNCAISCoxVHEpIo/WrTiMvP7VTujOPnOglLbMLN/pq/d2Y4lRJIkSnPlUSJEjSKJqM41d88zWtMzP+fCOORmc9NeM+f1nnO//efM52/fG/ef385+5u+u1bRJkwU8FAkEItZpkRYeQYcAgZTEYlaZa2yROLeC0qdX73rZJJ/d2f6v6Or0u/+5FBYcng0MlCiQTR9GUU5LScmSuSlH00IWqXA6jlw4BEcD/+5REEAAi3RtU+eYbGF1E+lk9g0YJzLUgh7BlQVGTZJD0jKhhTNVilqrMzFRK+x/szcMKBWKep4NP1A0DR6RESkTp5Z1Q9Y8REgqMg1DpUBPleeqlRQcerBpMjiURHVD4XwAALhAgbxxlxYD5OFkG8oQRPB2EpsxSCNVlgcYUqoAyiVJmaARlkwplICfPoUy/zWEzM2pcNYzAQNJDSniEYecSEqxFEzQqEvUFGnvzwUfcRlpZ9T2LCR5QdDQDDhKICAjpJCagpRo9UQRPClZZlg6Ep9DMTkTl+okuhRIVIzAQEf9L+Mx/DUjqmqN6kX7M36lS4zgLyJV3iV6j3xF8kJduJawVw1nndAlBaLLgJupwsTcLkxmJgFLgSzoCmHjSNGSqkGPCpnNqTXIwolf6qlVWN+q/su37HzgrES1pWGg3KnWh0FXCVniJ9K5b4iCrpLEuIcFTqwkVLFiqgaDqCCSMVWqxBAVCFOLVrVahm2ahUThUKJnmFCw15hD0Qhb/+5REEAhCYSRCSQEb4FOGaBUMI6JIRYC0QIB2SQsgGpgwDghgIlS6FU8VBXDoiBp5Y9gtkVnhEhYBdJFQ7kQ3w1yp0NB2CoNPEttZ1/aeDUAAA26FEghWgEKNVAVWkFAQEmMK2Uwk/qI0hqUb/4epVIZH1ai6szf6kzH1f2arxYGS9FcOsN5UlJLQt///+oo0FRDTUQ0FBQr9f5LxXP+mEUfk0AIrf/5GRmQ0//mX//ZbLP5b5GrWSz+WSkZMrWyyyy2GRqyggVRyMv////////st//sn/yyVDI1l8mVgoYGDCOqiqIQBxmvxWCggTpZZZD//aWfyyWf/y/7KGDA0ssBggTof9k/+WS/8slQyMp/5Nfln8WAqGcUbULCrKxT9ISF+kKsxQWpMQU1FMy4xMDCqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqo=");e.volume=.3,e.play().catch(function(){return O()})}catch(e){O()}}(),setTimeout(function(){f(function(e){return e.filter(function(e){return e.id!==a.id})})},600)}}}),e.jsx(q,{parentRef:c,scale:.08}),e.jsx(D,{status:r,message:o,percentage:s,error:i,onRetry:l}),e.jsx("div",{style:{position:"absolute",top:0,left:0,right:0,bottom:0,background:"\n radial-gradient(circle at 20% 80%, rgba(122, 162, 247, 0.03) 0%, transparent 50%),\n radial-gradient(circle at 80% 20%, rgba(187, 154, 247, 0.03) 0%, transparent 50%),\n radial-gradient(circle at 40% 40%, rgba(158, 206, 106, 0.02) 0%, transparent 50%)\n ",pointerEvents:"none"}})]})},V=function(t){var r=t.title,a=t.description,o=t.isVisible,s=t.className;return r||a?e.jsxs("div",{className:n.cn("fw-title-overlay absolute inset-x-0 top-0 z-20 pointer-events-none","bg-gradient-to-b from-black/70 via-black/40 to-transparent","px-4 py-3 transition-opacity duration-300",o?"opacity-100":"opacity-0",s),children:[r&&e.jsx("h2",{className:"text-white text-sm font-medium truncate max-w-[80%]",children:r}),a&&e.jsx("p",{className:"text-white/70 text-xs mt-0.5 line-clamp-2 max-w-[70%]",children:a})]}):null},W=function(t){var r,a,o,s,i,l,c,u,d,f,v,m=t.isOpen,h=t.onClose,p=t.metadata,C=t.streamState,g=t.quality,x=t.videoElement,b=t.protocol,w=t.nodeId,y=t.geoDistance;if(!m)return null;var k,A=x,j=A?"".concat(A.videoWidth,"x").concat(A.videoHeight):"—",N=A&&A.buffered.length>0?(A.buffered.end(A.buffered.length-1)-A.currentTime).toFixed(1):"—",S=null!==(r=null==A||null===(a=A.playbackRate)||void 0===a?void 0:a.toFixed(2))&&void 0!==r?r:"1.00",L=null!==(o=null==g||null===(s=g.score)||void 0===s?void 0:s.toFixed(0))&&void 0!==o?o:"—",E=null!=g&&g.bitrate?"".concat((g.bitrate/1e3).toFixed(0)," kbps"):"—",M=null!==(i=null==g||null===(l=g.frameDropRate)||void 0===l?void 0:l.toFixed(1))&&void 0!==i?i:"—",I=null!==(c=null==g?void 0:g.stallCount)&&void 0!==c?c:0,T=null!=g&&g.latency?"".concat(Math.round(g.latency)," ms"):"—",q=null!==(u=null!==(d=null==C?void 0:C.viewers)&&void 0!==d?d:null==p?void 0:p.viewers)&&void 0!==u?u:"—",R=null!==(f=null!==(v=null==C?void 0:C.status)&&void 0!==v?v:null==p?void 0:p.status)&&void 0!==f?f:"—",F=[{label:"Resolution",value:j},{label:"Buffer",value:"".concat(N,"s")},{label:"Latency",value:T},{label:"Bitrate",value:E},{label:"Quality Score",value:"".concat(L,"/100")},{label:"Frame Drop Rate",value:"".concat(M,"%")},{label:"Stalls",value:String(I)},{label:"Playback Rate",value:"".concat(S,"x")},{label:"Protocol",value:null!=b?b:"—"},{label:"Node",value:null!=w?w:"—"},{label:"Geo Distance",value:y?"".concat(y.toFixed(0)," km"):"—"},{label:"Viewers",value:String(q)},{label:"Status",value:R},{label:"Tracks",value:null!=C&&null!==(k=C.tracks)&&void 0!==k&&k.length?C.tracks.map(function(e){return"video"===e.type?"".concat(e.codec," ").concat(e.width,"x").concat(e.height,"@").concat(e.bps?Math.round(e.bps/1e3)+"kbps":"?"):"".concat(e.codec," ").concat(e.channels,"ch")}).join(", "):"—"}];if(null!=p&&p.title&&F.unshift({label:"Title",value:p.title}),null!=p&&p.durationSeconds){var B=Math.floor(p.durationSeconds/60),P=p.durationSeconds%60;F.push({label:"Duration",value:"".concat(B,":").concat(String(P).padStart(2,"0"))})}if(null!=p&&p.recordingSizeBytes){var D=(p.recordingSizeBytes/1048576).toFixed(1);F.push({label:"Size",value:"".concat(D," MB")})}return e.jsxs("div",{className:n.cn("fw-stats-panel absolute top-2 right-2 z-30","bg-black border border-white/10 rounded","text-white text-xs font-mono","max-w-[320px] max-h-[80%] overflow-auto","shadow-lg"),style:{backgroundColor:"#000000"},children:[e.jsxs("div",{className:"flex items-center justify-between px-3 py-2 border-b border-white/10",children:[e.jsx("span",{className:"text-white/70 text-[10px] uppercase tracking-wider",children:"Stats Overlay"}),e.jsx("button",{type:"button",onClick:h,className:"text-white/50 hover:text-white transition-colors p-1 -mr-1","aria-label":"Close stats panel",children:e.jsx("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",stroke:"currentColor",strokeWidth:"1.5",children:e.jsx("path",{d:"M2 2l8 8M10 2l-8 8"})})})]}),e.jsx("div",{className:"px-3 py-2 space-y-1",children:F.map(function(t){var n=t.label,r=t.value;return e.jsxs("div",{className:"flex justify-between gap-4",children:[e.jsx("span",{className:"text-white/50 shrink-0",children:n}),e.jsx("span",{className:"text-white/90 truncate text-right",children:r})]},n)})})]})},U=["enabled","onStateChange","onStreamStateChange","onError","onReady"],Q={state:"booting",streamState:null,endpoints:null,metadata:null,videoElement:null,currentTime:0,duration:NaN,isPlaying:!1,isPaused:!0,isBuffering:!1,isMuted:!0,volume:1,error:null,isPassiveError:!1,hasPlaybackStarted:!1,isHoldingSpeed:!1,holdSpeed:2,isHovering:!1,shouldShowControls:!1,isLoopEnabled:!1,isFullscreen:!1,isPiPActive:!1,isEffectivelyLive:!1,shouldShowIdleScreen:!0,currentPlayerInfo:null,currentSourceInfo:null,playbackQuality:null,subtitlesEnabled:!1,qualities:[],textTracks:[],streamInfo:null};function Y(e){var r=e.enabled,a=void 0===r||r,o=e.onStateChange,s=e.onStreamStateChange,i=e.onError,l=e.onReady,c=w(e,U),u=t.useRef(null),d=t.useRef(null),f=N(t.useState(Q),2),v=f[0],h=f[1],p=t.useRef(c);p.current=c,t.useEffect(function(){if(a){var e=u.current;if(e){var t=new n.PlayerController({contentId:p.current.contentId,contentType:p.current.contentType,endpoints:p.current.endpoints,gatewayUrl:p.current.gatewayUrl,mistUrl:p.current.mistUrl,authToken:p.current.authToken,autoplay:p.current.autoplay,muted:p.current.muted,controls:p.current.controls,poster:p.current.poster,debug:p.current.debug});d.current=t;var r=[],c=function(){if(d.current){var e=d.current;h(function(t){return b(b({},t),{},{isPlaying:e.isPlaying(),isPaused:e.isPaused(),isBuffering:e.isBuffering(),isMuted:e.isMuted(),volume:e.getVolume(),hasPlaybackStarted:e.hasPlaybackStarted(),shouldShowControls:e.shouldShowControls(),shouldShowIdleScreen:e.shouldShowIdleScreen(),playbackQuality:e.getPlaybackQuality(),isLoopEnabled:e.isLoopEnabled(),subtitlesEnabled:e.isSubtitlesEnabled(),qualities:e.getQualities(),streamInfo:e.getStreamInfo()})})}};return r.push(t.on("stateChange",function(e){var t=e.state;h(function(e){return b(b({},e),{},{state:t})}),null==o||o(t)})),r.push(t.on("streamStateChange",function(e){var n=e.state;h(function(e){return b(b({},e),{},{streamState:n,isEffectivelyLive:t.isEffectivelyLive(),shouldShowIdleScreen:t.shouldShowIdleScreen()})}),null==s||s(n)})),r.push(t.on("timeUpdate",function(e){var t=e.currentTime,n=e.duration;h(function(e){return b(b({},e),{},{currentTime:t,duration:n})})})),r.push(t.on("error",function(e){var n=e.error;h(function(e){return b(b({},e),{},{error:n,isPassiveError:t.isPassiveError()})}),null==i||i(n)})),r.push(t.on("errorCleared",function(){h(function(e){return b(b({},e),{},{error:null,isPassiveError:!1})})})),r.push(t.on("ready",function(e){var n=e.videoElement;h(function(e){return b(b({},e),{},{videoElement:n,endpoints:t.getEndpoints(),metadata:t.getMetadata(),streamInfo:t.getStreamInfo(),isEffectivelyLive:t.isEffectivelyLive(),shouldShowIdleScreen:t.shouldShowIdleScreen(),currentPlayerInfo:t.getCurrentPlayerInfo(),currentSourceInfo:t.getCurrentSourceInfo(),qualities:t.getQualities()})}),null==l||l(n),n.addEventListener("play",c),n.addEventListener("pause",c),n.addEventListener("waiting",c),n.addEventListener("playing",c),r.push(function(){n.removeEventListener("play",c),n.removeEventListener("pause",c),n.removeEventListener("waiting",c),n.removeEventListener("playing",c)})})),r.push(t.on("playerSelected",function(e){e.player;var n=e.source;h(function(e){return b(b({},e),{},{currentPlayerInfo:t.getCurrentPlayerInfo(),currentSourceInfo:{url:n.url,type:n.type},qualities:t.getQualities()})})})),r.push(t.on("volumeChange",function(e){var t=e.volume,n=e.muted;h(function(e){return b(b({},e),{},{volume:t,isMuted:n})})})),r.push(t.on("loopChange",function(e){var t=e.isLoopEnabled;h(function(e){return b(b({},e),{},{isLoopEnabled:t})})})),r.push(t.on("fullscreenChange",function(e){var t=e.isFullscreen;h(function(e){return b(b({},e),{},{isFullscreen:t})})})),r.push(t.on("pipChange",function(e){var t=e.isPiP;h(function(e){return b(b({},e),{},{isPiPActive:t})})})),r.push(t.on("holdSpeedStart",function(e){var t=e.speed;h(function(e){return b(b({},e),{},{isHoldingSpeed:!0,holdSpeed:t})})})),r.push(t.on("holdSpeedEnd",function(){h(function(e){return b(b({},e),{},{isHoldingSpeed:!1})})})),r.push(t.on("hoverStart",function(){h(function(e){return b(b({},e),{},{isHovering:!0,shouldShowControls:!0})})})),r.push(t.on("hoverEnd",function(){h(function(e){return b(b({},e),{},{isHovering:!1,shouldShowControls:t.shouldShowControls()})})})),r.push(t.on("captionsChange",function(e){var t=e.enabled;h(function(e){return b(b({},e),{},{subtitlesEnabled:t})})})),t.attach(e).catch(function(e){console.warn("[usePlayerController] Attach failed:",e)}),h(function(e){return b(b({},e),{},{isLoopEnabled:t.isLoopEnabled()})}),function(){r.forEach(function(e){return e()}),t.destroy(),d.current=null,h(Q)}}}},[a,e.contentId,e.contentType]);var C=t.useCallback(m(y().m(function e(){var t;return y().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,null===(t=d.current)||void 0===t?void 0:t.play();case 1:return e.a(2)}},e)})),[]),g=t.useCallback(function(){var e;null===(e=d.current)||void 0===e||e.pause()},[]),x=t.useCallback(function(){var e;null===(e=d.current)||void 0===e||e.togglePlay()},[]),k=t.useCallback(function(e){var t;null===(t=d.current)||void 0===t||t.seek(e)},[]),A=t.useCallback(function(e){var t;null===(t=d.current)||void 0===t||t.seekBy(e)},[]),j=t.useCallback(function(e){var t;null===(t=d.current)||void 0===t||t.setVolume(e)},[]),S=t.useCallback(function(){var e;null===(e=d.current)||void 0===e||e.toggleMute()},[]),L=t.useCallback(function(){var e;null===(e=d.current)||void 0===e||e.toggleLoop()},[]),E=t.useCallback(m(y().m(function e(){var t;return y().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,null===(t=d.current)||void 0===t?void 0:t.toggleFullscreen();case 1:return e.a(2)}},e)})),[]),M=t.useCallback(m(y().m(function e(){var t;return y().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,null===(t=d.current)||void 0===t?void 0:t.togglePictureInPicture();case 1:return e.a(2)}},e)})),[]),I=t.useCallback(function(){var e;null===(e=d.current)||void 0===e||e.toggleSubtitles()},[]),T=t.useCallback(function(){var e;null===(e=d.current)||void 0===e||e.clearError(),h(function(e){return b(b({},e),{},{error:null,isPassiveError:!1})})},[]),q=t.useCallback(m(y().m(function e(){var t;return y().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,null===(t=d.current)||void 0===t?void 0:t.retry();case 1:return e.a(2)}},e)})),[]),R=t.useCallback(m(y().m(function e(){var t;return y().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,null===(t=d.current)||void 0===t?void 0:t.reload();case 1:return e.a(2)}},e)})),[]),F=t.useCallback(function(){var e,t;return null!==(e=null===(t=d.current)||void 0===t?void 0:t.getQualities())&&void 0!==e?e:[]},[]),B=t.useCallback(function(e){var t;null===(t=d.current)||void 0===t||t.selectQuality(e)},[]),P=t.useCallback(function(){var e;null===(e=d.current)||void 0===e||e.handleMouseEnter()},[]),D=t.useCallback(function(){var e;null===(e=d.current)||void 0===e||e.handleMouseLeave()},[]),O=t.useCallback(function(){var e;null===(e=d.current)||void 0===e||e.handleMouseMove()},[]),z=t.useCallback(function(){var e;null===(e=d.current)||void 0===e||e.handleTouchStart()},[]),V=t.useCallback(function(){var e=m(y().m(function e(t){var n;return y().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,null===(n=d.current)||void 0===n?void 0:n.setDevModeOptions(t);case 1:return e.a(2)}},e)}));return function(t){return e.apply(this,arguments)}}(),[]);return{containerRef:u,state:v,controller:d.current,play:C,pause:g,togglePlay:x,seek:k,seekBy:A,setVolume:j,toggleMute:S,toggleLoop:L,toggleFullscreen:E,togglePiP:M,toggleSubtitles:I,clearError:T,retry:q,reload:R,getQualities:F,selectQuality:B,handleMouseEnter:P,handleMouseLeave:D,handleMouseMove:O,handleTouchStart:z,setDevModeOptions:V}}var J=t.createContext(null);function G(){return t.useContext(J)}var H=["className","trackClassName","thumbClassName","showTrack","hoverThumb","accentColor","orientation"],Z=c.forwardRef(function(t,r){var a=t.className,o=t.trackClassName,s=t.thumbClassName,i=t.showTrack,l=void 0===i||i;t.hoverThumb;var c=t.accentColor,d=void 0!==c&&c,f=t.orientation,v=void 0===f?"horizontal":f,m=w(t,H),h=d?"bg-[hsl(var(--tn-cyan,195_100%_50%))]":"bg-white/90",p=d?"bg-[hsl(var(--tn-cyan,195_100%_50%))]":"bg-white";return e.jsxs(u.Root,b(b({ref:r,orientation:v,className:n.cn("group relative flex touch-none select-none items-center cursor-pointer","horizontal"===v?"w-full h-5":"h-full flex-col w-5",a)},m),{},{children:[l&&e.jsx(u.Track,{className:n.cn("absolute rounded-full bg-white/30 transition-all duration-150","horizontal"===v?"inset-x-0 h-1 group-hover:h-1.5":"inset-y-0 w-1 group-hover:w-1.5",o),children:e.jsx(u.Range,{className:n.cn("absolute rounded-full transition-all duration-150","horizontal"===v?"h-full":"w-full bottom-0",h)})}),e.jsx(u.Thumb,{className:n.cn("block rounded-full border-0 cursor-pointer shadow-md transition-all duration-150","w-2.5 h-2.5 group-hover:w-3.5 group-hover:h-3.5","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-white/50","disabled:pointer-events-none disabled:opacity-50",p,s)})]}))});Z.displayName=u.Root.displayName;var X=function(r){var a=r.currentTime,o=r.duration,s=r.buffered,i=r.disabled,l=void 0!==i&&i,c=r.onSeek,u=r.className,d=r.isLive,f=void 0!==d&&d,v=r.seekableStart,m=void 0===v?0:v,h=r.liveEdge,p=r.commitOnRelease,C=void 0!==p&&p,g=t.useRef(null),x=N(t.useState(!1),2),b=x[0],w=x[1],y=N(t.useState(!1),2),k=y[0],A=y[1],j=N(t.useState(null),2),S=j[0],L=j[1],E=t.useRef(null),M=N(t.useState(0),2),I=M[0],T=M[1],q=N(t.useState(0),2),R=q[0],F=q[1],B=null!=h?h:o,P=B-m,D=null!=S?S:a,O=t.useMemo(function(){if(f&&P>0){var e=D-m;return Math.min(100,Math.max(0,e/P*100))}return!Number.isFinite(o)||o<=0?0:Math.min(100,Math.max(0,D/o*100))},[D,o,f,m,P]),z=t.useMemo(function(){if(!s||0===s.length)return[];var e=f?m:0,t=(f?B:o)-e;if(!Number.isFinite(t)||t<=0)return[];for(var n=[],r=0;r<s.length;r++){var a=s.start(r)-e,i=s.end(r)-e;n.push({startPercent:Math.min(100,Math.max(0,a/t*100)),endPercent:Math.min(100,Math.max(0,i/t*100))})}return n},[s,o,f,m,B]),V=t.useCallback(function(e){if(!Number.isFinite(e)||e<0)return"0:00";var t=Math.floor(e),n=Math.floor(t/3600),r=Math.floor(t%3600/60),a=t%60;return n>0?"".concat(n,":").concat(String(r).padStart(2,"0"),":").concat(String(a).padStart(2,"0")):"".concat(r,":").concat(String(a).padStart(2,"0"))},[]),W=t.useCallback(function(e,t){var n=t-e;if(n<1)return"LIVE";var r=Math.floor(n),a=Math.floor(r/3600),o=Math.floor(r%3600/60),s=r%60;return a>0?"-".concat(a,":").concat(String(o).padStart(2,"0"),":").concat(String(s).padStart(2,"0")):"-".concat(o,":").concat(String(s).padStart(2,"0"))},[]),U=t.useCallback(function(e){if(!g.current)return 0;var t=g.current.getBoundingClientRect(),n=e-t.left,r=Math.min(1,Math.max(0,n/t.width));if(f&&Number.isFinite(P)&&P>0)return m+r*P;if(Number.isFinite(o)&&o>0)return r*o;if(Number.isFinite(h)&&h>0){var s=Number.isFinite(m)?m:0,i=h-s;if(i>0)return s+r*i}return r*(a||1)},[o,f,m,P,h,a]),Q=t.useCallback(function(e){if(g.current&&!l){var t=g.current.getBoundingClientRect(),n=e.clientX-t.left,r=Math.min(1,Math.max(0,n/t.width));T(100*r),F(U(e.clientX))}},[l,U]),Y=t.useCallback(function(e){if(!l&&(f||Number.isFinite(o))){var t=U(e.clientX);null==c||c(t),L(null),E.current=null}},[l,o,f,U,c]),J=t.useCallback(function(e){if(!l&&(f||Number.isFinite(o))){e.preventDefault(),A(!0);var t=function(e){var t=U(e.clientX);C?(L(t),E.current=t):null==c||c(t)},n=function(){A(!1),document.removeEventListener("mousemove",t),document.removeEventListener("mouseup",n);var e=E.current;C&&null!==e&&(null==c||c(e),L(null),E.current=null)};document.addEventListener("mousemove",t),document.addEventListener("mouseup",n);var r=U(e.clientX);C?(L(r),E.current=r):null==c||c(r)}},[l,o,f,U,c,C]),G=b||k,H=f?P>0:Number.isFinite(o);return e.jsxs("div",{ref:g,className:n.cn("group relative w-full h-6 flex items-center cursor-pointer",l&&"opacity-50 cursor-not-allowed",u),onMouseEnter:function(){return!l&&w(!0)},onMouseLeave:function(){w(!1),A(!1)},onMouseMove:Q,onClick:Y,onMouseDown:J,role:"slider","aria-label":"Seek","aria-valuemin":f?m:0,"aria-valuemax":f?B:o||100,"aria-valuenow":D,"aria-valuetext":f?W(D,B):V(D),tabIndex:l?-1:0,children:[e.jsxs("div",{className:n.cn("fw-seek-track",k&&"fw-seek-track--active"),children:[z.map(function(t,n){return e.jsx("div",{className:"fw-seek-buffered",style:{left:"".concat(t.startPercent,"%"),width:"".concat(t.endPercent-t.startPercent,"%")}},n)}),e.jsx("div",{className:"fw-seek-progress",style:{width:"".concat(O,"%")}})]}),e.jsx("div",{className:n.cn("fw-seek-thumb",G?"fw-seek-thumb--active":"fw-seek-thumb--hidden"),style:{left:"".concat(O,"%")}}),b&&!k&&H&&e.jsx("div",{className:"fw-seek-tooltip",style:{left:"".concat(I,"%")},children:f?W(R,B):V(R)})]})},K=["isPlaying"],_=["isMuted"],$=["isFullscreen"],ee=function(t){var n=t.size,r=void 0===n?16:n,a=t.color,o=void 0===a?"currentColor":a,s=t.className,i=void 0===s?"":s;return e.jsx("svg",{width:r,height:r,viewBox:"0 0 24 24",fill:"none",className:i,"aria-hidden":"true",children:e.jsx("path",{d:"M8 5v14l11-7z",fill:o})})},te=function(t){var n=t.size,r=void 0===n?16:n,a=t.color,o=void 0===a?"currentColor":a,s=t.className,i=void 0===s?"":s;return e.jsxs("svg",{width:r,height:r,viewBox:"0 0 24 24",fill:"none",className:i,"aria-hidden":"true",children:[e.jsx("rect",{x:"6",y:"4",width:"4",height:"16",fill:o}),e.jsx("rect",{x:"14",y:"4",width:"4",height:"16",fill:o})]})},ne=function(t){var n=t.size,r=void 0===n?16:n,a=t.color,o=void 0===a?"currentColor":a,s=t.className,i=void 0===s?"":s;return e.jsxs("svg",{width:r,height:r,viewBox:"0 0 24 24",fill:"none",className:i,"aria-hidden":"true",children:[e.jsx("path",{d:"M12 5V1L7 6l5 5V7c3.31 0 6 2.69 6 6s-2.69 6-6 6-6-2.69-6-6H4c0 4.42 3.58 8 8 8s8-3.58 8-8-3.58-8-8-8z",fill:o}),e.jsx("text",{x:"12",y:"15",fontSize:"7",fontWeight:"bold",fill:o,textAnchor:"middle",children:"10"})]})},re=function(t){var n=t.size,r=void 0===n?16:n,a=t.color,o=void 0===a?"currentColor":a,s=t.className,i=void 0===s?"":s;return e.jsxs("svg",{width:r,height:r,viewBox:"0 0 24 24",fill:"none",className:i,"aria-hidden":"true",children:[e.jsx("path",{d:"M12 5V1l5 5-5 5V7c-3.31 0-6 2.69-6 6s2.69 6 6 6 6-2.69 6-6h2c0 4.42-3.58 8-8 8s-8-3.58-8-8 3.58-8 8-8z",fill:o}),e.jsx("text",{x:"12",y:"15",fontSize:"7",fontWeight:"bold",fill:o,textAnchor:"middle",children:"10"})]})},ae=function(t){var n=t.size,r=void 0===n?16:n,a=t.color,o=void 0===a?"currentColor":a,s=t.className,i=void 0===s?"":s;return e.jsxs("svg",{width:r,height:r,viewBox:"0 0 24 24",fill:"none",className:i,"aria-hidden":"true",children:[e.jsx("polygon",{points:"11,5 6,9 2,9 2,15 6,15 11,19",fill:o}),e.jsx("path",{d:"M19.07 4.93a10 10 0 0 1 0 14.14M15.54 8.46a5 5 0 0 1 0 7.07",stroke:o,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})]})},oe=function(t){var n=t.size,r=void 0===n?16:n,a=t.color,o=void 0===a?"currentColor":a,s=t.className,i=void 0===s?"":s;return e.jsxs("svg",{width:r,height:r,viewBox:"0 0 24 24",fill:"none",className:i,"aria-hidden":"true",children:[e.jsx("polygon",{points:"11,5 6,9 2,9 2,15 6,15 11,19",fill:o}),e.jsx("line",{x1:"23",y1:"9",x2:"17",y2:"15",stroke:o,strokeWidth:"2",strokeLinecap:"round"}),e.jsx("line",{x1:"17",y1:"9",x2:"23",y2:"15",stroke:o,strokeWidth:"2",strokeLinecap:"round"})]})},se=function(t){var n=t.size,r=void 0===n?16:n,a=t.color,o=void 0===a?"currentColor":a,s=t.className,i=void 0===s?"":s;return e.jsx("svg",{width:r,height:r,viewBox:"0 0 24 24",fill:"none",className:i,"aria-hidden":"true",children:e.jsx("path",{d:"M8 3H5a2 2 0 0 0-2 2v3m18 0V5a2 2 0 0 0-2-2h-3M3 16v3a2 2 0 0 0 2 2h3m8 0h3a2 2 0 0 0 2-2v-3",stroke:o,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})})},ie=function(t){var n=t.size,r=void 0===n?16:n,a=t.color,o=void 0===a?"currentColor":a,s=t.className,i=void 0===s?"":s;return e.jsx("svg",{width:r,height:r,viewBox:"0 0 24 24",fill:"none",className:i,"aria-hidden":"true",children:e.jsx("path",{d:"M8 3v3a2 2 0 0 1-2 2H3M21 8h-3a2 2 0 0 1-2-2V3M3 16h3a2 2 0 0 1 2 2v3M16 21v-3a2 2 0 0 1 2-2h3",stroke:o,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})})},le=function(t){var n=t.size,r=void 0===n?16:n,a=t.color,o=void 0===a?"currentColor":a,s=t.className,i=void 0===s?"":s;return e.jsxs("svg",{width:r,height:r,viewBox:"0 0 24 24",fill:"none",className:i,"aria-hidden":"true",children:[e.jsx("rect",{x:"2",y:"3",width:"20",height:"14",rx:"2",ry:"2",stroke:o,strokeWidth:"2",fill:"none"}),e.jsx("rect",{x:"8",y:"10",width:"10",height:"6",rx:"1",ry:"1",fill:o})]})},ce=function(t){var n=t.size,r=void 0===n?16:n,a=t.color,o=void 0===a?"currentColor":a,s=t.className,i=void 0===s?"":s;return e.jsxs("svg",{width:r,height:r,viewBox:"0 0 24 24",fill:"none",className:i,"aria-hidden":"true",children:[e.jsx("path",{d:"M12 15a3 3 0 1 0 0-6 3 3 0 0 0 0 6Z",stroke:o,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),e.jsx("path",{d:"M19.4 15a1.65 1.65 0 0 0 .33 1.82l.06.06a2 2 0 0 1 0 2.83 2 2 0 0 1-2.83 0l-.06-.06a1.65 1.65 0 0 0-1.82-.33 1.65 1.65 0 0 0-1 1.51V21a2 2 0 0 1-2 2 2 2 0 0 1-2-2v-.09A1.65 1.65 0 0 0 9 19.4a1.65 1.65 0 0 0-1.82.33l-.06.06a2 2 0 0 1-2.83 0 2 2 0 0 1 0-2.83l.06-.06a1.65 1.65 0 0 0 .33-1.82 1.65 1.65 0 0 0-1.51-1H3a2 2 0 0 1-2-2 2 2 0 0 1 2-2h.09A1.65 1.65 0 0 0 4.6 9a1.65 1.65 0 0 0-.33-1.82l-.06-.06a2 2 0 0 1 0-2.83 2 2 0 0 1 2.83 0l.06.06a1.65 1.65 0 0 0 1.82.33H9a1.65 1.65 0 0 0 1-1.51V3a2 2 0 0 1 2-2 2 2 0 0 1 2 2v.09a1.65 1.65 0 0 0 1 1.51 1.65 1.65 0 0 0 1.82-.33l.06-.06a2 2 0 0 1 2.83 0 2 2 0 0 1 0 2.83l-.06.06a1.65 1.65 0 0 0-.33 1.82V9a1.65 1.65 0 0 0 1.51 1H21a2 2 0 0 1 2 2 2 2 0 0 1-2 2h-.09a1.65 1.65 0 0 0-1.51 1Z",stroke:o,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})]})},ue=function(t){var n=t.isPlaying,r=w(t,K);return n?e.jsx(te,b({},r)):e.jsx(ee,b({},r))},de=function(t){var n=t.isMuted,r=w(t,_);return n?e.jsx(oe,b({},r)):e.jsx(ae,b({},r))},fe=function(t){var n=t.isFullscreen,r=w(t,$);return n?e.jsx(ie,b({},r)):e.jsx(se,b({},r))},ve=function(t){var n=t.size,r=void 0===n?16:n,a=t.color,o=void 0===a?"currentColor":a,s=t.className,i=void 0===s?"":s;return e.jsxs("svg",{width:r,height:r,viewBox:"0 0 24 24",fill:"none",className:i,"aria-hidden":"true",children:[e.jsx("rect",{x:"4",y:"13",width:"4",height:"7",fill:o}),e.jsx("rect",{x:"10",y:"9",width:"4",height:"11",fill:o}),e.jsx("rect",{x:"16",y:"4",width:"4",height:"16",fill:o})]})},me=function(t){var n=t.size,r=void 0===n?16:n,a=t.color,o=void 0===a?"currentColor":a,s=t.className,i=void 0===s?"":s;return e.jsxs("svg",{width:r,height:r,viewBox:"0 0 24 24",fill:"none",className:i,"aria-hidden":"true",children:[e.jsx("path",{d:"M5 5v14l11-7z",fill:o}),e.jsx("rect",{x:"17",y:"5",width:"3",height:"14",fill:o})]})},he=function(r){var a,o,s,i,l,c,u,d=r.currentTime,f=r.duration,v=r.isVisible,m=void 0===v||v;r.className;var h=r.onSeek,p=r.mistStreamInfo,C=r.disabled,g=void 0!==C&&C,x=r.playbackMode,b=void 0===x?"auto":x,w=r.onModeChange,y=r.sourceType,k=r.isContentLive,A=r.videoElement,j=r.qualities,S=void 0===j?[]:j,L=r.onSelectQuality,E=r.isMuted,M=r.volume,I=r.onVolumeChange,T=r.onToggleMute,q=r.isPlaying,R=r.onTogglePlay,F=r.onToggleFullscreen,B=r.isFullscreen;r.isLoopEnabled,r.onToggleLoop;var P=G(),D=null==P||null===(a=P.state)||void 0===a?void 0:a.videoElement,O=null==P?void 0:P.controller,z=N(t.useState(null),2),V=z[0],W=z[1],U=t.useRef(null),Q=t.useCallback(function(){var e,t,n;return A||D||(null!=O&&null!==(e=O.getVideoElement)&&void 0!==e&&e.call(O)?O.getVideoElement():null!==(t=null!==(n=document.querySelector(".fw-player-video"))&&void 0!==n?n:document.querySelector('[data-player-container="true"] video'))&&void 0!==t?t:document.querySelector(".fw-player-container video"))},[A,D,O]);t.useEffect(function(){var e;return(e=Q())&&e!==V&&W(e),V||(U.current=setInterval(function(){var e=Q();e&&(W(e),U.current&&(clearInterval(U.current),U.current=null))},100),setTimeout(function(){U.current&&(clearInterval(U.current),U.current=null)},5e3)),function(){U.current&&(clearInterval(U.current),U.current=null)}},[D,O,Q,V]);var Y=null==p||null===(o=p.meta)||void 0===o?void 0:o.tracks,J=t.useMemo(function(){var e;if(S&&S.length>0)return S;var t=null==O||null===(e=O.getQualities)||void 0===e?void 0:e.call(O);return t&&t.length>0?t:Y?Object.entries(Y).filter(function(e){return"video"===N(e,2)[1].type}).map(function(e){var t=N(e,2),n=t[0],r=t[1];return{id:n,label:r.height?"".concat(r.height,"p"):r.codec,width:r.width,height:r.height,bitrate:r.bps}}).sort(function(e,t){return(t.height||0)-(e.height||0)}):[]},[S,O,Y]),H=null!==(s=null==O||null===(i=O.getTextTracks)||void 0===i?void 0:i.call(O))&&void 0!==s?s:[],K=N(t.useState(!1),2),_=K[0],$=K[1],ee=N(t.useState(!1),2),te=ee[0],ae=ee[1],oe=N(t.useState(!1),2),se=oe[0],ie=oe[1],le=N(t.useState(!0),2),ve=le[0],he=le[1],pe=N(t.useState(void 0),2),Ce=pe[0],ge=pe[1],xe=N(t.useState(function(){return V?Math.round(100*V.volume):100}),2),be=xe[0],we=xe[1],ye=N(t.useState(function(){var e;return null!==(e=null==V?void 0:V.playbackRate)&&void 0!==e?e:1}),2),ke=ye[0],Ae=ye[1],je=null!=q?q:_,Ne=null!=E?E:te,Se=null!=B?B:se,Le=void 0!==M?Math.round(100*M):be,Ee=N(t.useState("auto"),2),Me=Ee[0],Ie=Ee[1],Te=N(t.useState("none"),2),qe=Te[0],Re=Te[1],Fe=N(t.useState(!1),2),Be=Fe[0],Pe=Fe[1],De=N(t.useState(!0),2),Oe=De[0],ze=De[1];t.useEffect(function(){if(Be){var e=function(e){var t=e.target;t&&!t.closest(".fw-settings-menu")&&Pe(!1)},t=setTimeout(function(){window.addEventListener("click",e)},0);return function(){clearTimeout(t),window.removeEventListener("click",e)}}},[Be]);var Ve=null==p||null===(l=p.meta)||void 0===l?void 0:l.buffer_window,We=t.useMemo(function(){return n.isLiveContent(k,p,f)},[k,p,f]),Ue=t.useMemo(function(){return n.isMediaStreamSource(V)},[V]),Qe=t.useMemo(function(){return n.supportsPlaybackRate(V)},[V]),Ye=t.useMemo(function(){return n.calculateSeekableRange({isLive:We,video:V,mistStreamInfo:p,currentTime:d,duration:f})},[We,V,p,d,f]),Je=Ye.seekableStart,Ge=Ye.liveEdge,He=null==O||null===(c=O.getSeekableStart)||void 0===c?void 0:c.call(O),Ze=null==O||null===(u=O.getLiveEdge)||void 0===u?void 0:u.call(O),Xe=Number.isFinite(He)&&Number.isFinite(Ze)&&Ze>=He&&(Ze>0||He>0),Ke=Xe?He:Je,_e=Xe?Ze:Ge,$e=We&&Number.isFinite(_e)&&Number.isFinite(Ke)&&_e>Ke,et=We,tt=t.useMemo(function(){return n.calculateLiveThresholds(y,Ue,Ve)},[y,Ue,Ve]),nt=t.useMemo(function(){return O&&"function"==typeof O.canSeekStream?O.canSeekStream():n.canSeekStream({video:V,isLive:We,duration:f,bufferWindowMs:Ve})},[V,We,f,Ve,O]);t.useEffect(function(){if(We){var e=n.calculateIsNearLive(d,_e,tt,Oe);e!==Oe&&ze(e)}else ze(!0)},[We,_e,d,tt,Oe]);var rt=t.useRef(!1);t.useEffect(function(){if(V){var e=function(){return $(!V.paused)},t=function(){var e=V.muted||0===V.volume;ae(e),we(Math.round(100*V.volume))},n=function(){"undefined"!=typeof document&&ie(!!document.fullscreenElement)},r=function(){return Ae(V.playbackRate)};return e(),t(),n(),r(),V.addEventListener("play",e),V.addEventListener("pause",e),V.addEventListener("playing",e),V.addEventListener("volumechange",t),V.addEventListener("ratechange",r),"undefined"!=typeof document&&document.addEventListener("fullscreenchange",n),function(){V.removeEventListener("play",e),V.removeEventListener("pause",e),V.removeEventListener("playing",e),V.removeEventListener("volumechange",t),V.removeEventListener("ratechange",r),"undefined"!=typeof document&&document.removeEventListener("fullscreenchange",n)}}},[V,We]),t.useEffect(function(){rt.current=!1},[V]),t.useEffect(function(){var e=H.find(function(e){return e.active});Re(e?e.id:"none")},[H]),t.useEffect(function(){if(V){var e=function(){var e,t,n=null!==(e=null==O||null===(t=O.getBufferedRanges)||void 0===t?void 0:t.call(O))&&void 0!==e?e:V.buffered;ge(n)};return e(),V.addEventListener("progress",e),V.addEventListener("loadeddata",e),function(){V.removeEventListener("progress",e),V.removeEventListener("loadeddata",e)}}},[V]),t.useEffect(function(){if(V){var e=function(){if(V.srcObject instanceof MediaStream){var e=V.srcObject.getAudioTracks();he(e.length>0)}else{var t=V;t.audioTracks&&void 0!==t.audioTracks.length?he(t.audioTracks.length>0):he(!0)}};return e(),V.addEventListener("loadedmetadata",e),function(){return V.removeEventListener("loadedmetadata",e)}}he(!0)},[V]);var at=function(){var e,t,n;if(!g)if(T)T();else{var r=null!=V?V:document.querySelector(".fw-player-video");if(r){var a=!(null!==(e=null==O||null===(t=O.isMuted)||void 0===t?void 0:t.call(O))&&void 0!==e?e:r.muted);null==O||null===(n=O.setMuted)||void 0===n||n.call(O,a),r.muted=a,ae(a),we(a?0:Math.round(100*r.volume))}}},ot=function(e){var t;g||(Ie(e),L?L(e):null==O||null===(t=O.selectQuality)||void 0===t||t.call(O,e))},st=function(e){var t,n;g||(Re(e),"none"===e?null==O||null===(t=O.selectTextTrack)||void 0===t||t.call(O,null):null==O||null===(n=O.selectTextTrack)||void 0===n||n.call(O,e))},it=t.useMemo(function(){return n.formatTimeDisplay({isLive:We,currentTime:d,duration:f,liveEdge:_e,seekableStart:Ke,unixoffset:null==p?void 0:p.unixoffset})},[We,d,f,_e,Ke,null==p?void 0:p.unixoffset]),lt=N(t.useState(!1),2),ct=lt[0],ut=lt[1],dt=N(t.useState(!1),2),ft=dt[0],vt=dt[1],mt=ct||ft;return e.jsx("div",{className:n.cn("fw-player-surface fw-controls-wrapper",m?"fw-controls-wrapper--visible":"fw-controls-wrapper--hidden"),children:e.jsxs("div",{className:"fw-control-bar pointer-events-auto",onClick:function(e){return e.stopPropagation()},children:[nt&&e.jsx("div",{className:"fw-seek-wrapper",children:e.jsx(X,{currentTime:d,duration:f,buffered:Ce,disabled:g,isLive:We,seekableStart:Ke,liveEdge:_e,commitOnRelease:et,onSeek:function(e){h?h(e):V&&(V.currentTime=e)}})}),e.jsxs("div",{className:"fw-controls-row",children:[e.jsxs("div",{className:"fw-controls-left",children:[e.jsxs("div",{className:"fw-control-group",children:[e.jsx("button",{type:"button",className:"fw-btn-flush","aria-label":je?"Pause":"Play",onClick:function(){var e,t,n;g||(R?R():(V||O)&&(null===(e=null!==(t=null==O||null===(n=O.isPaused)||void 0===n?void 0:n.call(O))&&void 0!==t?t:null==V?void 0:V.paused)||void 0===e||e?null!=O&&O.play?O.play().catch(function(){}):V&&V.play().catch(function(){}):null!=O&&O.pause?O.pause():V&&V.pause()))},children:e.jsx(ue,{isPlaying:je,size:18})}),nt&&e.jsxs(e.Fragment,{children:[e.jsx("button",{type:"button",className:"fw-btn-flush hidden sm:flex","aria-label":"Skip back 10 seconds",onClick:function(){var e=Math.max(0,d-10);if(h)h(e);else{var t=Q();t&&(t.currentTime=e)}},children:e.jsx(ne,{size:16})}),e.jsx("button",{type:"button",className:"fw-btn-flush hidden sm:flex","aria-label":"Skip forward 10 seconds",onClick:function(){var e=Number.isFinite(f)?f:d+10,t=Math.min(e,d+10);if(h)h(t);else{var n=Q();n&&(n.currentTime=t)}},children:e.jsx(re,{size:16})})]})]}),e.jsxs("div",{className:n.cn("fw-volume-group",mt&&"fw-volume-group--expanded",!ve&&"fw-volume-group--disabled"),onMouseEnter:function(){return ve&&ut(!0)},onMouseLeave:function(){ut(!1),vt(!1)},onFocusCapture:function(){return ve&&vt(!0)},onBlurCapture:function(e){e.currentTarget.contains(e.relatedTarget)||vt(!1)},onClick:function(e){ve&&e.target===e.currentTarget&&at()},children:[e.jsx("button",{type:"button",className:"fw-volume-btn","aria-label":ve?Ne?"Unmute":"Mute":"No audio",onClick:ve?at:void 0,disabled:!ve,children:e.jsx(de,{isMuted:Ne||!ve,size:16})}),e.jsx("div",{className:n.cn("fw-volume-slider-wrapper",mt?"fw-volume-slider-wrapper--expanded":"fw-volume-slider-wrapper--collapsed"),children:e.jsx(Z,{orientation:"horizontal","aria-label":"Volume",max:100,step:1,value:[Le],onValueChange:function(e){var t;if(!g){var n=Math.max(0,Math.min(100,null!==(t=e[0])&&void 0!==t?t:0));if(I)I(n/100);else{var r=null!=V?V:document.querySelector(".fw-player-video");r&&(r.volume=n/100,r.muted=0===n,we(n),ae(0===n))}}},className:"w-full",disabled:!ve})})]}),e.jsx("div",{className:"fw-control-group",children:e.jsx("span",{className:"fw-time-display",children:it})}),We&&e.jsx("div",{className:"fw-control-group",children:e.jsxs("button",{type:"button",onClick:function(){var e;g||null==O||null===(e=O.jumpToLive)||void 0===e||e.call(O)},disabled:!$e||Oe,className:n.cn("fw-live-badge",!$e||Oe?"fw-live-badge--active":"fw-live-badge--behind",!$e&&"fw-live-badge--nodvr"),title:$e?Oe?"At live edge":"Jump to live":"Live only (DVR disabled)",children:["LIVE",!$e&&e.jsx("span",{className:"fw-live-badge__nodvr",children:"NO DVR"}),!Oe&&$e&&e.jsx(me,{size:10})]})})]}),e.jsxs("div",{className:"fw-controls-right",children:[e.jsxs("div",{className:"fw-control-group relative",children:[e.jsx("button",{type:"button",className:n.cn("fw-btn-flush group",Be&&"fw-btn-flush--active"),"aria-label":"Settings",title:"Settings",onClick:function(){return Pe(!Be)},children:e.jsx(ce,{size:16,className:"transition-transform group-hover:rotate-90"})}),Be&&e.jsxs("div",{className:"fw-player-surface fw-settings-menu",children:[w&&!1!==k&&e.jsxs("div",{className:"fw-settings-section",children:[e.jsx("div",{className:"fw-settings-label",children:"Mode"}),e.jsx("div",{className:"fw-settings-options",children:["auto","low-latency","quality"].map(function(t){return e.jsx("button",{className:n.cn("fw-settings-btn",b===t&&"fw-settings-btn--active"),onClick:function(){w(t),Pe(!1)},children:"low-latency"===t?"Fast":"quality"===t?"Stable":"Auto"},t)})})]}),Qe&&e.jsxs("div",{className:"fw-settings-section",children:[e.jsx("div",{className:"fw-settings-label",children:"Speed"}),e.jsx("div",{className:"fw-settings-options fw-settings-options--wrap",children:n.SPEED_PRESETS.map(function(t){return e.jsxs("button",{className:n.cn("fw-settings-btn",ke===t&&"fw-settings-btn--active"),onClick:function(){!function(e){if(!g){var t=Number(e);if(Ae(t),null!=O&&O.setPlaybackRate)O.setPlaybackRate(t);else{var n=Q();n&&(n.playbackRate=t)}}}(String(t)),Pe(!1)},children:[t,"x"]},t)})})]}),J.length>0&&e.jsxs("div",{className:"fw-settings-section",children:[e.jsx("div",{className:"fw-settings-label",children:"Quality"}),e.jsxs("div",{className:"fw-settings-list",children:[e.jsx("button",{className:n.cn("fw-settings-list-item","auto"===Me&&"fw-settings-list-item--active"),onClick:function(){ot("auto"),Pe(!1)},children:"Auto"}),J.map(function(t){return e.jsx("button",{className:n.cn("fw-settings-list-item",Me===t.id&&"fw-settings-list-item--active"),onClick:function(){ot(t.id),Pe(!1)},children:t.label},t.id)})]})]}),H.length>0&&e.jsxs("div",{className:"fw-settings-section",children:[e.jsx("div",{className:"fw-settings-label",children:"Captions"}),e.jsxs("div",{className:"fw-settings-list",children:[e.jsx("button",{className:n.cn("fw-settings-list-item","none"===qe&&"fw-settings-list-item--active"),onClick:function(){st("none"),Pe(!1)},children:"Off"}),H.map(function(t){return e.jsx("button",{className:n.cn("fw-settings-list-item",qe===t.id&&"fw-settings-list-item--active"),onClick:function(){st(t.id),Pe(!1)},children:t.label||t.id},t.id)})]})]})]})]}),e.jsx("div",{className:"fw-control-group",children:e.jsx("button",{type:"button",className:"fw-btn-flush","aria-label":"Toggle fullscreen",onClick:function(){if(!g)if(F)F();else if("undefined"!=typeof document){var e=document.querySelector('[data-player-container="true"]');e&&(document.fullscreenElement?document.exitFullscreen().catch(function(){}):e.requestFullscreen().catch(function(){}))}},children:e.jsx(fe,{isFullscreen:Se,size:16})})})]})]})]})})},pe={"html5/application/vnd.apple.mpegurl":"HLS","dash/video/mp4":"DASH","html5/video/mp4":"MP4","html5/video/webm":"WebM",whep:"WHEP","mist/html":"Mist","mist/legacy":"Auto","ws/video/mp4":"MEWS"},Ce=function(r){var a,o,s,i=r.onSettingsChange,l=r.playbackMode,c=void 0===l?"auto":l,u=r.onModeChange,d=r.onReload,f=r.streamInfo,v=r.mistStreamInfo,h=r.currentPlayer,p=r.currentSource,C=r.videoElement,g=r.protocol,x=r.nodeId,b=r.isVisible,w=void 0===b||b,k=r.isOpen,A=r.onOpenChange,j=N(t.useState(!1),2),S=j[0],L=j[1],E=void 0!==k?k:S,M=t.useCallback(function(e){A?A(e):L(e)},[A]),I=N(t.useState("config"),2),T=I[0],q=I[1],R=N(t.useState(0),2);R[0];var F=R[1],B=N(t.useState(null),2),P=B[0],D=B[1],O=N(t.useState(!1),2),z=O[0],V=O[1],W=N(t.useState(!1),2),U=W[0],Q=W[1],Y=t.useRef(null),J=t.useRef(null),G=N(t.useState(1),2),H=G[0],Z=G[1],X=N(t.useState(100),2),K=X[0],_=X[1],$=N(t.useState(0),2),ee=$[0],te=$[1],ne=N(t.useState(0),2),re=ne[0],ae=ne[1],oe=N(t.useState(null),2),se=oe[0],ie=oe[1],le=t.useRef(null);t.useEffect(function(){return C&&E&&(J.current||(J.current=new n.QualityMonitor({sampleInterval:500,onSample:function(e){_(e.score),te(e.stallCount),ae(e.frameDropRate),J.current&&Z(J.current.getPlaybackScore())}})),J.current.start(C)),function(){J.current&&J.current.stop()}},[C,E]),t.useEffect(function(){if(E&&"stats"===T){var e=function(){var e=m(y().m(function e(){var t,r;return y().w(function(e){for(;;)switch(e.p=e.n){case 0:if(e.p=0,!(t=n.globalPlayerManager.getCurrentPlayer())||!t.getStats){e.n=2;break}return e.n=1,t.getStats();case 1:(r=e.v)&&ie(r);case 2:e.n=4;break;case 3:e.p=3,e.v;case 4:return e.a(2)}},e,null,[[0,3]])}));return function(){return e.apply(this,arguments)}}();return e(),le.current=setInterval(e,500),function(){le.current&&(clearInterval(le.current),le.current=null)}}},[E,T]);var ce=t.useMemo(function(){if(!f)return[];try{return n.globalPlayerManager.getAllCombinations(f,c)}catch(e){return[]}},[f,c]),ue=t.useMemo(function(){return ce.filter(function(e){return e.compatible})},[ce]),de=t.useMemo(function(){return h&&p&&0!==ce.length?ce.findIndex(function(e){return e.player===h.shortname&&e.sourceType===p.type}):-1},[h,p,ce]),fe=t.useMemo(function(){return h&&p&&0!==ue.length?ue.findIndex(function(e){return e.player===h.shortname&&e.sourceType===p.type}):-1},[h,p,ue]),ve=t.useCallback(function(){null==d||d()},[d]),me=t.useCallback(function(){if(0!==ue.length){var e=((fe>=0?fe:-1)+1)%ue.length,t=ue[e];F(e),i({forcePlayer:t.player,forceType:t.sourceType,forceSource:t.sourceIndex})}},[ue,fe,i]),he=t.useCallback(function(e){var t=ce[e];t&&(F(e),i({forcePlayer:t.player,forceType:t.sourceType,forceSource:t.sourceIndex}))},[ce,i]),Ce=N(t.useState(null),2),ge=Ce[0],xe=Ce[1];return t.useEffect(function(){if(E&&"stats"===T){var e=function(){var e=n.globalPlayerManager.getCurrentPlayer(),t=(null==e?void 0:e.getVideoElement())||C;xe(t?{resolution:"".concat(t.videoWidth,"x").concat(t.videoHeight),buffered:t.buffered.length>0?(t.buffered.end(t.buffered.length-1)-t.currentTime).toFixed(1):"0",playbackRate:t.playbackRate.toFixed(2),currentTime:t.currentTime.toFixed(1),duration:isFinite(t.duration)?t.duration.toFixed(1):"live",readyState:t.readyState,networkState:t.networkState}:null)};e();var t=setInterval(e,500);return function(){return clearInterval(t)}}},[E,T,C]),E?e.jsxs("div",{className:"fw-dev-panel",children:[e.jsxs("div",{className:"fw-dev-header",children:[e.jsx("button",{type:"button",onClick:function(){return q("config")},className:n.cn("fw-dev-tab","config"===T&&"fw-dev-tab--active"),children:"Config"}),e.jsx("button",{type:"button",onClick:function(){return q("stats")},className:n.cn("fw-dev-tab","stats"===T&&"fw-dev-tab--active"),children:"Stats"}),e.jsx("div",{className:"fw-dev-spacer"}),e.jsx("button",{type:"button",onClick:function(){return M(!1)},className:"fw-dev-close","aria-label":"Close dev mode panel",children:e.jsx("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",stroke:"currentColor",strokeWidth:"1.5",children:e.jsx("path",{d:"M2 2l8 8M10 2l-8 8"})})})]}),"config"===T&&e.jsxs("div",{ref:Y,className:"fw-dev-body",children:[e.jsxs("div",{className:"fw-dev-section",children:[e.jsx("div",{className:"fw-dev-label",children:"Active"}),e.jsxs("div",{className:"fw-dev-value",children:[(null==h?void 0:h.name)||"None"," ",e.jsx("span",{className:"fw-dev-value-arrow",children:"→"})," ",pe[(null==p?void 0:p.type)||""]||(null==p?void 0:p.type)||"—"]}),x&&e.jsxs("div",{className:"fw-dev-value-muted",children:["Node: ",x]})]}),e.jsxs("div",{className:"fw-dev-section",children:[e.jsx("div",{className:"fw-dev-label",children:"Playback Mode"}),e.jsx("div",{className:"fw-dev-mode-group",children:["auto","low-latency","quality"].map(function(t){return e.jsx("button",{type:"button",onClick:function(){return null==u?void 0:u(t)},className:n.cn("fw-dev-mode-btn",c===t&&"fw-dev-mode-btn--active"),children:"low-latency"===t?"Low Lat":t.charAt(0).toUpperCase()+t.slice(1)},t)})}),e.jsxs("div",{className:"fw-dev-mode-desc",children:["auto"===c&&"Balanced: MP4/WS → WHEP → HLS","low-latency"===c&&"WHEP/WebRTC first (<1s delay)","quality"===c&&"MP4/WS first, HLS fallback"]})]}),e.jsxs("div",{className:"fw-dev-actions",children:[e.jsx("button",{type:"button",onClick:ve,className:"fw-dev-action-btn",children:"Reload"}),e.jsx("button",{type:"button",onClick:me,className:"fw-dev-action-btn",children:"Next Option"})]}),e.jsxs("div",{className:"fw-dev-section",style:{padding:0,borderBottom:0},children:[e.jsxs("div",{className:"fw-dev-list-header",children:[e.jsxs("span",{className:"fw-dev-list-title",children:["Player Options (",ue.length,")"]}),ce.length>ue.length&&e.jsxs("button",{type:"button",onClick:function(){return Q(!U)},className:"fw-dev-list-toggle",children:[e.jsx("svg",{width:"10",height:"10",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",className:n.cn("fw-dev-chevron",U&&"fw-dev-chevron--open"),children:e.jsx("path",{d:"M6 9l6 6 6-6"})}),U?"Hide":"Show"," disabled (",ce.length-ue.length,")"]})]}),0===ce.length?e.jsx("div",{className:"fw-dev-list-empty",children:"No stream info available"}):e.jsx("div",{children:ce.map(function(t,r){var a,o,s,i,l=!0===t.codecIncompatible;if(!t.compatible&&!l&&!U)return null;var u=de===r,d=pe[t.sourceType]||t.sourceType.split("/").pop();return e.jsxs("div",{onMouseEnter:function(e){if(D(r),Y.current){var t=Y.current,n=e.currentTarget,a=t.getBoundingClientRect(),o=(n.getBoundingClientRect().top-a.top)/a.height;V(o>.6)}},onMouseLeave:function(){return D(null)},className:"fw-dev-combo",children:[e.jsxs("button",{type:"button",onClick:function(){return he(r)},className:n.cn("fw-dev-combo-btn",u&&"fw-dev-combo-btn--active",!t.compatible&&!l&&"fw-dev-combo-btn--disabled",l&&"fw-dev-combo-btn--codec-warn"),children:[e.jsx("span",{className:n.cn("fw-dev-combo-rank",u?"fw-dev-combo-rank--active":t.compatible||l?l?"fw-dev-combo-rank--warn":"":"fw-dev-combo-rank--disabled"),children:t.compatible?r+1:l?"⚠":"—"}),e.jsxs("span",{className:"fw-dev-combo-name",children:[t.playerName," ",e.jsx("span",{className:"fw-dev-combo-arrow",children:"→"})," ",e.jsx("span",{className:n.cn("fw-dev-combo-type",t.compatible||l?l?"fw-dev-combo-type--warn":"":"fw-dev-combo-type--disabled"),children:d})]}),e.jsx("span",{className:n.cn("fw-dev-combo-score",t.compatible||l?l?"fw-dev-combo-score--low":t.score>=2?"fw-dev-combo-score--high":t.score>=1.5?"fw-dev-combo-score--mid":"fw-dev-combo-score--low":"fw-dev-combo-score--disabled"),children:t.score.toFixed(2)})]}),P===r&&e.jsxs("div",{className:n.cn("fw-dev-tooltip",z?"fw-dev-tooltip--above":"fw-dev-tooltip--below"),children:[e.jsxs("div",{className:"fw-dev-tooltip-header",children:[e.jsx("div",{className:"fw-dev-tooltip-title",children:t.playerName}),e.jsx("div",{className:"fw-dev-tooltip-subtitle",children:t.sourceType}),(null===(a=t.scoreBreakdown)||void 0===a?void 0:a.trackTypes)&&t.scoreBreakdown.trackTypes.length>0&&e.jsxs("div",{className:"fw-dev-tooltip-tracks",children:["Tracks: ",e.jsx("span",{className:"fw-dev-tooltip-value",children:t.scoreBreakdown.trackTypes.join(", ")})]})]}),t.compatible&&t.scoreBreakdown?e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"fw-dev-tooltip-score",children:["Score: ",t.score.toFixed(2)]}),e.jsxs("div",{className:"fw-dev-tooltip-row",children:["Tracks [",t.scoreBreakdown.trackTypes.join(", "),"]: ",e.jsx("span",{className:"fw-dev-tooltip-value",children:t.scoreBreakdown.trackScore.toFixed(2)})," ",e.jsxs("span",{className:"fw-dev-tooltip-weight",children:["x",t.scoreBreakdown.weights.tracks]})]}),e.jsxs("div",{className:"fw-dev-tooltip-row",children:["Priority: ",e.jsx("span",{className:"fw-dev-tooltip-value",children:t.scoreBreakdown.priorityScore.toFixed(2)})," ",e.jsxs("span",{className:"fw-dev-tooltip-weight",children:["x",t.scoreBreakdown.weights.priority]})]}),e.jsxs("div",{className:"fw-dev-tooltip-row",children:["Source: ",e.jsx("span",{className:"fw-dev-tooltip-value",children:t.scoreBreakdown.sourceScore.toFixed(2)})," ",e.jsxs("span",{className:"fw-dev-tooltip-weight",children:["x",t.scoreBreakdown.weights.source]})]}),void 0!==t.scoreBreakdown.reliabilityScore&&e.jsxs("div",{className:"fw-dev-tooltip-row",children:["Reliability: ",e.jsx("span",{className:"fw-dev-tooltip-value",children:t.scoreBreakdown.reliabilityScore.toFixed(2)})," ",e.jsxs("span",{className:"fw-dev-tooltip-weight",children:["x",null!==(o=t.scoreBreakdown.weights.reliability)&&void 0!==o?o:0]})]}),void 0!==t.scoreBreakdown.modeBonus&&0!==t.scoreBreakdown.modeBonus&&e.jsxs("div",{className:"fw-dev-tooltip-row",children:["Mode (",c,"): ",e.jsxs("span",{className:"fw-dev-tooltip-bonus",children:["+",t.scoreBreakdown.modeBonus.toFixed(2)]})," ",e.jsxs("span",{className:"fw-dev-tooltip-weight",children:["x",null!==(s=t.scoreBreakdown.weights.mode)&&void 0!==s?s:0]})]}),void 0!==t.scoreBreakdown.routingBonus&&0!==t.scoreBreakdown.routingBonus&&e.jsxs("div",{className:"fw-dev-tooltip-row",children:["Routing: ",e.jsxs("span",{className:t.scoreBreakdown.routingBonus>0?"fw-dev-tooltip-bonus":"fw-dev-tooltip-penalty",children:[t.scoreBreakdown.routingBonus>0?"+":"",t.scoreBreakdown.routingBonus.toFixed(2)]})," ",e.jsxs("span",{className:"fw-dev-tooltip-weight",children:["x",null!==(i=t.scoreBreakdown.weights.routing)&&void 0!==i?i:0]})]})]}):e.jsx("div",{className:"fw-dev-tooltip-error",children:t.incompatibleReason||"Incompatible"})]})]},"".concat(t.player,"-").concat(t.sourceType))})})]})]}),"stats"===T&&e.jsxs("div",{className:"fw-dev-body",children:[e.jsxs("div",{className:"fw-dev-section",children:[e.jsx("div",{className:"fw-dev-label",children:"Playback Rate"}),e.jsxs("div",{className:"fw-dev-rate",children:[e.jsxs("div",{className:n.cn("fw-dev-rate-value",H>=.95&&H<=1.05?"fw-dev-stat-value--good":H>1.05?"fw-dev-stat-value--accent":H>=.75?"fw-dev-stat-value--warn":"fw-dev-stat-value--bad"),children:[H.toFixed(2),"×"]}),e.jsx("div",{className:"fw-dev-rate-status",children:H>=.95&&H<=1.05?"realtime":H>1.05?"catching up":H>=.75?"slightly slow":"stalling"})]}),e.jsxs("div",{className:"fw-dev-rate-stats",children:[e.jsxs("span",{className:K>=75?"fw-dev-stat-value--good":"fw-dev-stat-value--bad",children:["Quality: ",K,"/100"]}),e.jsxs("span",{className:0===ee?"fw-dev-stat-value--good":"fw-dev-stat-value--warn",children:["Stalls: ",ee]}),e.jsxs("span",{className:re<1?"fw-dev-stat-value--good":"fw-dev-stat-value--bad",children:["Drops: ",re.toFixed(1),"%"]})]})]}),ge?e.jsxs("div",{children:[e.jsxs("div",{className:"fw-dev-stat",children:[e.jsx("span",{className:"fw-dev-stat-label",children:"Resolution"}),e.jsx("span",{className:"fw-dev-stat-value",children:ge.resolution})]}),e.jsxs("div",{className:"fw-dev-stat",children:[e.jsx("span",{className:"fw-dev-stat-label",children:"Buffer"}),e.jsxs("span",{className:"fw-dev-stat-value",children:[ge.buffered,"s"]})]}),e.jsxs("div",{className:"fw-dev-stat",children:[e.jsx("span",{className:"fw-dev-stat-label",children:"Playback Rate"}),e.jsxs("span",{className:"fw-dev-stat-value",children:[ge.playbackRate,"x"]})]}),e.jsxs("div",{className:"fw-dev-stat",children:[e.jsx("span",{className:"fw-dev-stat-label",children:"Time"}),e.jsxs("span",{className:"fw-dev-stat-value",children:[ge.currentTime," / ",ge.duration]})]}),e.jsxs("div",{className:"fw-dev-stat",children:[e.jsx("span",{className:"fw-dev-stat-label",children:"Ready State"}),e.jsx("span",{className:"fw-dev-stat-value",children:ge.readyState})]}),e.jsxs("div",{className:"fw-dev-stat",children:[e.jsx("span",{className:"fw-dev-stat-label",children:"Network State"}),e.jsx("span",{className:"fw-dev-stat-value",children:ge.networkState})]}),g&&e.jsxs("div",{className:"fw-dev-stat",children:[e.jsx("span",{className:"fw-dev-stat-label",children:"Protocol"}),e.jsx("span",{className:"fw-dev-stat-value",children:g})]}),x&&e.jsxs("div",{className:"fw-dev-stat",children:[e.jsx("span",{className:"fw-dev-stat-label",children:"Node ID"}),e.jsx("span",{className:"fw-dev-stat-value truncate",style:{maxWidth:"150px"},children:x})]})]}):e.jsx("div",{className:"fw-dev-list-empty",children:"No video element available"}),se&&e.jsxs("div",{children:[e.jsx("div",{className:"fw-dev-list-header fw-dev-section-header",children:e.jsx("span",{className:"fw-dev-list-title",children:"hls"===se.type?"HLS.js Stats":"webrtc"===se.type?"WebRTC Stats":"Player Stats"})}),"hls"===se.type&&e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"fw-dev-stat",children:[e.jsx("span",{className:"fw-dev-stat-label",children:"Bitrate"}),e.jsx("span",{className:"fw-dev-stat-value--accent",children:se.currentBitrate>0?"".concat(Math.round(se.currentBitrate/1e3)," kbps"):"N/A"})]}),e.jsxs("div",{className:"fw-dev-stat",children:[e.jsx("span",{className:"fw-dev-stat-label",children:"Bandwidth Est."}),e.jsx("span",{className:"fw-dev-stat-value",children:se.bandwidthEstimate>0?"".concat(Math.round(se.bandwidthEstimate/1e3)," kbps"):"N/A"})]}),e.jsxs("div",{className:"fw-dev-stat",children:[e.jsx("span",{className:"fw-dev-stat-label",children:"Level"}),e.jsxs("span",{className:"fw-dev-stat-value",children:[se.currentLevel>=0?se.currentLevel:"Auto"," / ",(null===(a=se.levels)||void 0===a?void 0:a.length)||0]})]}),void 0!==se.latency&&e.jsxs("div",{className:"fw-dev-stat",children:[e.jsx("span",{className:"fw-dev-stat-label",children:"Latency"}),e.jsxs("span",{className:se.latency>5e3?"fw-dev-stat-value--warn":"fw-dev-stat-value",children:[Math.round(se.latency)," ms"]})]})]}),"webrtc"===se.type&&e.jsxs(e.Fragment,{children:[se.video&&e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"fw-dev-stat",children:[e.jsx("span",{className:"fw-dev-stat-label",children:"Video Bitrate"}),e.jsx("span",{className:"fw-dev-stat-value--accent",children:se.video.bitrate>0?"".concat(Math.round(se.video.bitrate/1e3)," kbps"):"N/A"})]}),e.jsxs("div",{className:"fw-dev-stat",children:[e.jsx("span",{className:"fw-dev-stat-label",children:"FPS"}),e.jsx("span",{className:"fw-dev-stat-value",children:Math.round(se.video.framesPerSecond||0)})]}),e.jsxs("div",{className:"fw-dev-stat",children:[e.jsx("span",{className:"fw-dev-stat-label",children:"Frames"}),e.jsxs("span",{className:"fw-dev-stat-value",children:[se.video.framesDecoded," decoded,"," ",e.jsxs("span",{className:se.video.frameDropRate>1?"fw-dev-stat-value--bad":"fw-dev-stat-value--good",children:[se.video.framesDropped," dropped"]})]})]}),e.jsxs("div",{className:"fw-dev-stat",children:[e.jsx("span",{className:"fw-dev-stat-label",children:"Packet Loss"}),e.jsxs("span",{className:se.video.packetLossRate>1?"fw-dev-stat-value--bad":"fw-dev-stat-value--good",children:[se.video.packetLossRate.toFixed(2),"%"]})]}),e.jsxs("div",{className:"fw-dev-stat",children:[e.jsx("span",{className:"fw-dev-stat-label",children:"Jitter"}),e.jsxs("span",{className:se.video.jitter>30?"fw-dev-stat-value--warn":"fw-dev-stat-value",children:[se.video.jitter.toFixed(1)," ms"]})]}),e.jsxs("div",{className:"fw-dev-stat",children:[e.jsx("span",{className:"fw-dev-stat-label",children:"Jitter Buffer"}),e.jsxs("span",{className:"fw-dev-stat-value",children:[se.video.jitterBufferDelay.toFixed(1)," ms"]})]})]}),se.network&&e.jsxs("div",{className:"fw-dev-stat",children:[e.jsx("span",{className:"fw-dev-stat-label",children:"RTT"}),e.jsxs("span",{className:se.network.rtt>200?"fw-dev-stat-value--warn":"fw-dev-stat-value",children:[Math.round(se.network.rtt)," ms"]})]})]})]}),(null==v||null===(o=v.meta)||void 0===o?void 0:o.tracks)&&Object.keys(v.meta.tracks).length>0&&e.jsxs("div",{children:[e.jsx("div",{className:"fw-dev-list-header fw-dev-section-header",children:e.jsxs("span",{className:"fw-dev-list-title",children:["Tracks (",Object.keys(v.meta.tracks).length,")"]})}),Object.entries(v.meta.tracks).map(function(t){var r=N(t,2),a=r[0],o=r[1];return e.jsxs("div",{className:"fw-dev-track",children:[e.jsxs("div",{className:"fw-dev-track-header",children:[e.jsx("span",{className:n.cn("fw-dev-track-badge","video"===o.type?"fw-dev-track-badge--video":"audio"===o.type?"fw-dev-track-badge--audio":"fw-dev-track-badge--other"),children:o.type}),e.jsx("span",{className:"fw-dev-track-codec",children:o.codec}),e.jsxs("span",{className:"fw-dev-track-id",children:["#",a]})]}),e.jsxs("div",{className:"fw-dev-track-meta",children:["video"===o.type&&o.width&&o.height&&e.jsxs("span",{children:[o.width,"×",o.height]}),o.bps&&e.jsxs("span",{children:[Math.round(o.bps/1e3)," kbps"]}),o.fpks&&e.jsxs("span",{children:[Math.round(o.fpks/1e3)," fps"]}),"audio"===o.type&&o.channels&&e.jsxs("span",{children:[o.channels,"ch"]}),"audio"===o.type&&o.rate&&e.jsxs("span",{children:[o.rate," Hz"]}),o.lang&&e.jsx("span",{children:o.lang})]})]},a)})]}),v&&(!(null!==(s=v.meta)&&void 0!==s&&s.tracks)||0===Object.keys(v.meta.tracks).length)&&e.jsx("div",{className:"fw-dev-no-tracks",children:e.jsxs("span",{className:"fw-dev-no-tracks-text",children:["No track data available",v.type&&e.jsxs("span",{className:"fw-dev-no-tracks-type",children:["(",v.type,")"]})]})})]})]}):e.jsx("button",{type:"button",onClick:function(){return M(!0)},className:n.cn("fw-dev-toggle",!w&&"fw-dev-toggle--hidden"),title:"Advanced Settings","aria-label":"Open advanced settings panel",children:e.jsx("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:e.jsx("path",{d:"M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.77-3.77a6 6 0 0 1-7.94 7.94l-6.91 6.91a2.12 2.12 0 0 1-3-3l6.91-6.91a6 6 0 0 1 7.94-7.94l-3.76 3.76z"})})})},ge=function(t){var r=t.isVisible,a=t.speed,o=t.className;return e.jsx("div",{className:n.cn("fw-speed-indicator absolute inset-0 z-30 pointer-events-none","flex items-center justify-center","transition-opacity duration-150",r?"opacity-100":"opacity-0",o),children:e.jsxs("div",{className:n.cn("bg-black/80 text-white px-4 py-2 rounded-full","text-lg font-semibold tabular-nums","flex items-center gap-2","backdrop-blur-sm border border-white/20","transform transition-transform duration-150",r?"scale-100":"scale-90"),children:[e.jsx(xe,{className:"w-5 h-5"}),e.jsxs("span",{children:[a,"x"]})]})})},xe=function(t){var n=t.className;return e.jsx("svg",{viewBox:"0 0 24 24",fill:"currentColor",className:n,"aria-hidden":"true",children:e.jsx("path",{d:"M4 18l8.5-6L4 6v12zm9-12v12l8.5-6L13 6z"})})},be=function(r){var a=r.direction,o=r.seconds,s=void 0===o?10:o,i=r.className,l=r.onHide,c=N(t.useState(!1),2),u=c[0],d=c[1];if(t.useEffect(function(){if(a){d(!0);var e=setTimeout(function(){d(!1),null==l||l()},600);return function(){return clearTimeout(e)}}},[a,l]),!a)return null;var f="back"===a;return e.jsxs("div",{className:n.cn("fw-skip-indicator absolute inset-0 z-30 pointer-events-none","flex items-center",f?"justify-start pl-8":"justify-end pr-8",i),children:[e.jsx("div",{className:n.cn("absolute top-0 bottom-0 w-1/3",f?"left-0":"right-0","bg-white/10",u&&"animate-pulse")}),e.jsxs("div",{className:n.cn("relative flex flex-col items-center gap-1 text-white","transition-all duration-200",u?"opacity-100 scale-100":"opacity-0 scale-75"),children:[e.jsx("div",{className:"flex",children:f?e.jsxs(e.Fragment,{children:[e.jsx(we,{className:"w-8 h-8"}),e.jsx(we,{className:"w-8 h-8 -ml-4"})]}):e.jsxs(e.Fragment,{children:[e.jsx(ye,{className:"w-8 h-8"}),e.jsx(ye,{className:"w-8 h-8 -ml-4"})]})}),e.jsx("span",{className:"text-sm font-semibold tabular-nums",children:f?"-".concat(s,"s"):"+".concat(s,"s")})]})]})},we=function(t){var n=t.className;return e.jsx("svg",{viewBox:"0 0 24 24",fill:"currentColor",className:n,"aria-hidden":"true",children:e.jsx("path",{d:"M11 18V6l-8.5 6 8.5 6zm.5-6l8.5 6V6l-8.5 6z"})})},ye=function(t){var n=t.className;return e.jsx("svg",{viewBox:"0 0 24 24",fill:"currentColor",className:n,"aria-hidden":"true",children:e.jsx("path",{d:"M4 18l8.5-6L4 6v12zm9-12v12l8.5-6L13 6z"})})},ke=["className","inset","children"],Ae=["className"],je=["className","style"],Ne=["className","inset"],Se=["className","children","checked"],Le=["className","children"],Ee=["className","inset"],Me=["className"],Ie=d.Root,Te=d.Trigger;c.forwardRef(function(t,r){var a=t.className,s=t.inset,i=t.children,l=w(t,ke);return e.jsxs(d.SubTrigger,b(b({ref:r,className:n.cn("fw-context-menu-item",s&&"fw-context-menu-item--inset",a)},l),{},{children:[i,e.jsx(o.ChevronRight,{className:"ml-auto h-4 w-4"})]}))}).displayName=d.SubTrigger.displayName,c.forwardRef(function(t,r){var a=t.className,o=w(t,Ae);return e.jsx(d.SubContent,b({ref:r,className:n.cn("fw-player-surface fw-context-menu",a)},o))}).displayName=d.SubContent.displayName;var qe=c.forwardRef(function(t,r){var a=t.className,o=t.style,s=w(t,je);return e.jsx(d.Portal,{children:e.jsx(d.Content,b({ref:r,className:n.cn("fw-player-surface fw-context-menu",a),style:b({backgroundColor:"hsl(235 19% 13%)",color:"hsl(229 35% 75%)",border:"1px solid rgba(90, 96, 127, 0.3)"},o)},s))})});qe.displayName=d.Content.displayName;var Re=c.forwardRef(function(t,r){var a=t.className,o=t.inset,s=w(t,Ne);return e.jsx(d.Item,b({ref:r,className:n.cn("fw-context-menu-item",o&&"fw-context-menu-item--inset",a)},s))});Re.displayName=d.Item.displayName,c.forwardRef(function(t,r){var a=t.className,s=t.children,i=t.checked,l=w(t,Se);return e.jsxs(d.CheckboxItem,b(b({ref:r,className:n.cn("fw-context-menu-checkbox",a),checked:i},l),{},{children:[e.jsx("span",{className:"fw-context-menu-indicator",children:e.jsx(d.ItemIndicator,{children:e.jsx(o.Check,{className:"h-4 w-4"})})}),s]}))}).displayName=d.CheckboxItem.displayName,c.forwardRef(function(t,r){var a=t.className,s=t.children,i=w(t,Le);return e.jsxs(d.RadioItem,b(b({ref:r,className:n.cn("fw-context-menu-checkbox",a)},i),{},{children:[e.jsx("span",{className:"fw-context-menu-indicator",children:e.jsx(d.ItemIndicator,{children:e.jsx(o.Circle,{className:"h-2 w-2 fill-current"})})}),s]}))}).displayName=d.RadioItem.displayName,c.forwardRef(function(t,r){var a=t.className,o=t.inset,s=w(t,Ee);return e.jsx(d.Label,b({ref:r,className:n.cn("fw-context-menu-label",o&&"fw-context-menu-item--inset",a)},s))}).displayName=d.Label.displayName;var Fe=c.forwardRef(function(t,r){var a=t.className,o=w(t,Me);return e.jsx(d.Separator,b({ref:r,className:n.cn("fw-context-menu-separator",a)},o))});Fe.displayName=d.Separator.displayName;var Be=function(r){var a,o,s,i,l,c,u,d,f,v,m,h,p,C,g,x=r.contentId,b=r.contentType,w=r.thumbnailUrl,y=void 0===w?null:w,k=r.options,A=r.endpoints,j=r.onStateChange,S=N(t.useState(!1),2),L=S[0],E=S[1],M=N(t.useState(!1),2),I=M[0],T=M[1],q=N(t.useState(null),2),R=q[0],F=q[1],B=N(t.useState((null==k?void 0:k.playbackMode)||"auto"),2),P=B[0],D=B[1],O=Y({contentId:x,contentType:b,endpoints:A,gatewayUrl:null==k?void 0:k.gatewayUrl,mistUrl:null==k?void 0:k.mistUrl,authToken:null==k?void 0:k.authToken,autoplay:!1!==(null==k?void 0:k.autoplay),muted:!1!==(null==k?void 0:k.muted),controls:!0===(null==k?void 0:k.stockControls),poster:y||void 0,debug:null==k?void 0:k.debug,onStateChange:function(e){null==j||j(e)},onError:function(e){console.warn("[Player] Error:",e)}}),U=O.containerRef,Q=O.state,J=O.controller,G=O.togglePlay,H=O.toggleMute,Z=O.toggleLoop,X=O.toggleFullscreen,K=O.togglePiP,_=O.setVolume,$=O.selectQuality,ee=O.clearError,te=O.retry,ne=O.reload,re=O.handleMouseEnter,ae=O.handleMouseLeave,oe=O.handleMouseMove,se=O.setDevModeOptions,ie=t.useCallback(function(e){se({forcePlayer:e.forcePlayer,forceType:e.forceType,forceSource:e.forceSource})},[se]),ue=t.useCallback(function(e){D(e),se({playbackMode:e})},[se]),de=t.useCallback(function(){ee(),ne()},[ee,ne]),fe=t.useCallback(function(){E(function(e){return!e})},[]),me=t.useCallback(function(){F(null)},[]),pe=null===(a=Q.endpoints)||void 0===a?void 0:a.primary,xe="mist-legacy"===(null===(o=Q.currentPlayerInfo)||void 0===o?void 0:o.shortname),we=!0===(null==k?void 0:k.stockControls)||xe,ye=(Q.isHovering||Q.isPaused)&&!Q.shouldShowIdleScreen&&!Q.isBuffering&&!Q.error,ke=!Q.shouldShowIdleScreen&&Q.isBuffering&&!Q.error&&Q.hasPlaybackStarted,Ae=!(null!==(s=Q.endpoints)&&void 0!==s&&s.primary)&&"booting"!==Q.state,je=null!=k&&k.gatewayUrl&&"gateway_loading"===Q.state?"Resolving viewing endpoint...":"Waiting for endpoint...";return e.jsxs(Ie,{children:[e.jsx(Te,{asChild:!0,children:e.jsxs("div",{className:n.cn("fw-player-surface fw-player-root w-full h-full overflow-hidden",(null==k?void 0:k.devMode)&&"flex"),"data-player-container":"true",tabIndex:0,onMouseEnter:re,onMouseLeave:ae,onMouseMove:oe,children:[e.jsxs("div",{className:n.cn("relative",null!=k&&k.devMode?"flex-1 min-w-0":"w-full h-full"),children:[e.jsx("div",{ref:U,className:"fw-player-container"}),e.jsx(V,{title:null===(i=Q.metadata)||void 0===i?void 0:i.title,description:null===(l=Q.metadata)||void 0===l?void 0:l.description,isVisible:ye}),e.jsx(W,{isOpen:L,onClose:fe,metadata:Q.metadata,streamState:null!==(c=Q.streamState)&&void 0!==c&&c.isOnline?{status:Q.streamState.status,viewers:null===(u=Q.metadata)||void 0===u?void 0:u.viewers,tracks:null!==(d=Q.streamState.streamInfo)&&void 0!==d&&null!==(d=d.meta)&&void 0!==d&&d.tracks?Object.values(Q.streamState.streamInfo.meta.tracks).map(function(e){return{type:e.type,codec:e.codec,width:e.width,height:e.height,bps:e.bps}}):[]}:null,quality:Q.playbackQuality,videoElement:Q.videoElement,protocol:null==pe?void 0:pe.protocol,nodeId:null==pe?void 0:pe.nodeId,geoDistance:null==pe?void 0:pe.geoDistance}),(null==k?void 0:k.devMode)&&!I&&e.jsx(Ce,{onSettingsChange:ie,playbackMode:P,onModeChange:ue,onReload:de,streamInfo:Q.streamInfo,mistStreamInfo:null===(f=Q.streamState)||void 0===f?void 0:f.streamInfo,currentPlayer:Q.currentPlayerInfo,currentSource:Q.currentSourceInfo,videoElement:Q.videoElement,protocol:null==pe?void 0:pe.protocol,nodeId:null==pe?void 0:pe.nodeId,isVisible:!1,isOpen:!1,onOpenChange:T}),Q.isHoldingSpeed&&e.jsx(ge,{isVisible:!0,speed:Q.holdSpeed}),e.jsx(be,{direction:R,seconds:10,onHide:me}),Ae&&e.jsx(z,{status:"OFFLINE",message:je}),!Ae&&Q.shouldShowIdleScreen&&e.jsx(z,{status:Q.isEffectivelyLive?null===(v=Q.streamState)||void 0===v?void 0:v.status:void 0,message:Q.isEffectivelyLive?null===(m=Q.streamState)||void 0===m?void 0:m.message:"Loading video...",percentage:Q.isEffectivelyLive?null===(h=Q.streamState)||void 0===h?void 0:h.percentage:void 0}),ke&&e.jsx("div",{role:"status","aria-live":"polite",className:"fw-player-surface absolute inset-0 flex items-center justify-center bg-black/40 backdrop-blur-sm z-20",children:e.jsxs("div",{className:"flex items-center gap-3 rounded-lg border border-white/10 bg-black/70 px-4 py-3 text-sm text-white shadow-lg",children:[e.jsx("div",{className:"w-4 h-4 border-2 border-white/30 border-t-white rounded-full animate-spin"}),e.jsx("span",{children:"Buffering..."})]})}),!Q.shouldShowIdleScreen&&Q.error&&e.jsx("div",{role:"alert","aria-live":"assertive",className:n.cn("fw-error-overlay",Q.isPassiveError?"fw-error-overlay--passive":"fw-error-overlay--fullscreen"),children:e.jsxs("div",{className:n.cn("fw-error-popup",Q.isPassiveError?"fw-error-popup--passive":"fw-error-popup--fullscreen"),children:[e.jsxs("div",{className:n.cn("fw-error-header",Q.isPassiveError?"fw-error-header--warning":"fw-error-header--error"),children:[e.jsx("span",{className:n.cn("fw-error-title",Q.isPassiveError?"fw-error-title--warning":"fw-error-title--error"),children:Q.isPassiveError?"Warning":"Error"}),e.jsx("button",{type:"button",className:"fw-error-close",onClick:ee,"aria-label":"Dismiss",children:e.jsx("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",children:e.jsx("path",{d:"M9 3L3 9M3 3L9 9",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"})})})]}),e.jsx("div",{className:"fw-error-body",children:e.jsx("p",{className:"fw-error-message",children:"Playback issue"})}),e.jsx("div",{className:"fw-error-actions",children:e.jsx("button",{type:"button",className:"fw-error-btn","aria-label":"Retry playback",onClick:function(){ee(),te()},children:"Retry"})})]})}),!we&&e.jsx(he,{currentTime:Q.currentTime,duration:Q.duration,isVisible:Q.shouldShowControls,onSeek:function(e){return null==J?void 0:J.seek(e)},showStatsButton:!1,isStatsOpen:L,onStatsToggle:fe,mistStreamInfo:null===(p=Q.streamState)||void 0===p?void 0:p.streamInfo,disabled:!Q.videoElement,playbackMode:P,onModeChange:ue,sourceType:null===(C=Q.currentSourceInfo)||void 0===C?void 0:C.type,isContentLive:Q.isEffectivelyLive,videoElement:Q.videoElement,qualities:Q.qualities,onSelectQuality:$,isMuted:Q.isMuted,volume:Q.volume,onVolumeChange:_,onToggleMute:H,isPlaying:Q.isPlaying,onTogglePlay:G,onToggleFullscreen:X,isFullscreen:Q.isFullscreen,isLoopEnabled:Q.isLoopEnabled,onToggleLoop:Z})]}),(null==k?void 0:k.devMode)&&I&&e.jsx(Ce,{onSettingsChange:ie,playbackMode:P,onModeChange:ue,onReload:de,streamInfo:Q.streamInfo,mistStreamInfo:null===(g=Q.streamState)||void 0===g?void 0:g.streamInfo,currentPlayer:Q.currentPlayerInfo,currentSource:Q.currentSourceInfo,videoElement:Q.videoElement,protocol:null==pe?void 0:pe.protocol,nodeId:null==pe?void 0:pe.nodeId,isVisible:!0,isOpen:!0,onOpenChange:T})]})}),e.jsxs(qe,{children:[e.jsxs(Re,{onClick:fe,className:"gap-2",children:[e.jsx(ve,{size:14,className:"opacity-70 flex-shrink-0"}),e.jsx("span",{children:L?"Hide Stats":"Stats"})]}),(null==k?void 0:k.devMode)&&e.jsxs(e.Fragment,{children:[e.jsx(Fe,{}),e.jsxs(Re,{onClick:function(){return T(!I)},className:"gap-2",children:[e.jsx(ce,{size:14,className:"opacity-70 flex-shrink-0"}),e.jsx("span",{children:I?"Hide Settings":"Settings"})]})]}),e.jsx(Fe,{}),e.jsxs(Re,{onClick:K,className:"gap-2",children:[e.jsx(le,{size:14,className:"opacity-70 flex-shrink-0"}),e.jsx("span",{children:"Picture-in-Picture"})]}),e.jsxs(Re,{onClick:Z,className:"gap-2",children:[e.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"opacity-70 flex-shrink-0",children:[e.jsx("polyline",{points:"17 1 21 5 17 9"}),e.jsx("path",{d:"M3 11V9a4 4 0 0 1 4-4h14"}),e.jsx("polyline",{points:"7 23 3 19 7 15"}),e.jsx("path",{d:"M21 13v2a4 4 0 0 1-4 4H3"})]}),e.jsx("span",{children:Q.isLoopEnabled?"Disable Loop":"Enable Loop"})]})]})]})},Pe=function(n){var r=n.index,a=N(t.useState({top:0,left:0}),2),o=a[0],s=a[1],i=N(t.useState(40),2),l=i[0],c=i[1],u=N(t.useState(0),2),d=u[0],f=u[1],v=function(){return{top:80*Math.random()+10,left:80*Math.random()+10}},m=function(){return 60*Math.random()+30};t.useEffect(function(){s(v()),c(m());var e=function(){f(.15),setTimeout(function(){f(0),setTimeout(function(){s(v()),c(m()),setTimeout(function(){e()},200)},1500)},4e3+3e3*Math.random())},t=setTimeout(e,500*r);return function(){clearTimeout(t)}},[r]);var h=["rgba(122, 162, 247, 0.2)","rgba(187, 154, 247, 0.2)","rgba(158, 206, 106, 0.2)","rgba(115, 218, 202, 0.2)","rgba(125, 207, 255, 0.2)","rgba(247, 118, 142, 0.2)","rgba(224, 175, 104, 0.2)","rgba(42, 195, 222, 0.2)"];return e.jsx("div",{style:{position:"absolute",top:"".concat(o.top,"%"),left:"".concat(o.left,"%"),width:"".concat(l,"px"),height:"".concat(l,"px"),borderRadius:"50%",background:h[r%h.length],opacity:d,transition:"opacity 1s ease-in-out",pointerEvents:"none",userSelect:"none",WebkitUserSelect:"none",MozUserSelect:"none",msUserSelect:"none"}})},De=function(n){var r=n.containerRef,a=n.scale,o=void 0===a?.2:a,s=n.onHitmarker,i=N(t.useState(100),2),l=i[0],c=i[1],u=N(t.useState({x:0,y:0}),2),d=u[0],f=u[1],v=N(t.useState(!1),2),m=v[0],h=v[1];t.useEffect(function(){if(r.current){var e=r.current.clientWidth,t=r.current.clientHeight,n=Math.min(e,t);c(n*o)}},[r,o]);var p=function(e){if(r.current){var t=r.current.getBoundingClientRect(),n=t.left+t.width/2,a=t.top+t.height/2,o=e.clientX-n,s=e.clientY-a,i=Math.sqrt(o*o+s*s),c=1.5*l;if(i<c&&i>0){var u=(c-i)/c*50;f({x:-o/i*u,y:-s/i*u}),h(!0)}else f({x:0,y:0}),h(!1)}},C=function(){f({x:0,y:0}),h(!1)};return t.useEffect(function(){if(r.current){var e=r.current;return e.addEventListener("mousemove",p),e.addEventListener("mouseleave",C),function(){e.removeEventListener("mousemove",p),e.removeEventListener("mouseleave",C)}}},[l,r]),e.jsxs("div",{style:{position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -50%) translate(".concat(d.x,"px, ").concat(d.y,"px)"),display:"flex",alignItems:"center",justifyContent:"center",zIndex:10,transition:"transform 0.3s ease-out",userSelect:"none",WebkitUserSelect:"none",MozUserSelect:"none",msUserSelect:"none"},children:[e.jsx("div",{style:{position:"absolute",width:"".concat(1.4*l,"px"),height:"".concat(1.4*l,"px"),borderRadius:"50%",background:"rgba(122, 162, 247, 0.15)",animation:m?"logoPulse 1s ease-in-out infinite":"logoPulse 3s ease-in-out infinite",transform:m?"scale(1.2)":"scale(1)",transition:"transform 0.3s ease-out",userSelect:"none",WebkitUserSelect:"none",MozUserSelect:"none",msUserSelect:"none",pointerEvents:"none"}}),e.jsx("img",{src:R,alt:"FrameWorks Logo",onClick:function(e){e.stopPropagation(),s&&s({clientX:e.clientX,clientY:e.clientY})},style:{width:"".concat(l,"px"),height:"".concat(l,"px"),position:"relative",zIndex:1,filter:m?"drop-shadow(0 6px 12px rgba(36, 40, 59, 0.4)) brightness(1.1)":"drop-shadow(0 4px 8px rgba(36, 40, 59, 0.3))",transform:m?"scale(1.1)":"scale(1)",transition:"all 0.3s ease-out",cursor:m?"pointer":"default",userSelect:"none",WebkitUserSelect:"none",MozUserSelect:"none",msUserSelect:"none",WebkitUserDrag:"none",WebkitTouchCallout:"none"}})]})},Oe=["className","variant","size","asChild"],ze=i.cva("inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 ring-offset-background",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",outline:"border border-border bg-transparent hover:bg-accent hover:text-accent-foreground",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90",subtle:"bg-muted text-muted-foreground hover:bg-muted/80",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-10 px-4 py-2",sm:"h-9 rounded-md px-3",lg:"h-11 rounded-md px-8",icon:"h-9 w-9"}},defaultVariants:{variant:"default",size:"default"}}),Ve=c.forwardRef(function(t,r){var a=t.className,o=t.variant,i=t.size,l=t.asChild,c=void 0!==l&&l,u=w(t,Oe),d=c?s.Slot:"button";return e.jsx(d,b({className:n.cn(ze({variant:o,size:i,className:a})),ref:r},u))});function We(t){var n="w-5 h-5";switch(t.status){case"ONLINE":return e.jsx("svg",{className:"".concat(n," fw-status-online"),fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M5 13l4 4L19 7"})});case"OFFLINE":return e.jsx("svg",{className:"".concat(n," fw-status-offline"),fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M18.364 5.636a9 9 0 010 12.728m0 0l-2.829-2.829m2.829 2.829L21 21M15.536 8.464a5 5 0 010 7.072m0 0l-2.829-2.829m-4.243 2.829a4.978 4.978 0 01-1.414-2.83m-1.414 5.658a9 9 0 01-2.167-9.238m7.824 2.167a1 1 0 111.414 1.414m-1.414-1.414L3 3m8.293 8.293l1.414 1.414"})});case"INITIALIZING":case"BOOTING":case"WAITING_FOR_DATA":return e.jsxs("svg",{className:"".concat(n," fw-status-warning animate-spin"),fill:"none",viewBox:"0 0 24 24",children:[e.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),e.jsx("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})]});case"SHUTTING_DOWN":return e.jsx("svg",{className:"".concat(n," fw-status-warning"),fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M13 10V3L4 14h7v7l9-11h-7z"})});default:return e.jsx("svg",{className:"".concat(n," fw-status-offline"),fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z"})})}}function Ue(e){switch(e){case"ONLINE":return"ONLINE";case"OFFLINE":return"OFFLINE";case"INITIALIZING":return"INITIALIZING";case"BOOTING":return"STARTING";case"WAITING_FOR_DATA":return"WAITING";case"SHUTTING_DOWN":return"ENDING";case"ERROR":return"ERROR";case"INVALID":return"INVALID";default:return"STATUS"}}Ve.displayName="Button";var Qe=function(){function n(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,n),(t=function(e,t,n){return t=C(t),function(e,t){if(t&&("object"==typeof t||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,g()?Reflect.construct(t,n||[],C(e).constructor):t.apply(e,n))}(this,n,[e])).handleRetry=function(){var e,n;t.setState({hasError:!1,error:null}),null===(e=(n=t.props).onRetry)||void 0===e||e.call(n)},t.state={hasError:!1,error:null},t}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&j(e,t)}(n,t.Component),r=n,o=[{key:"getDerivedStateFromError",value:function(e){return{hasError:!0,error:e}}}],(a=[{key:"componentDidCatch",value:function(e,t){var n,r;console.error("[PlayerErrorBoundary] Caught error:",e,t),null===(n=(r=this.props).onError)||void 0===n||n.call(r,e,t)}},{key:"render",value:function(){var t;return this.state.hasError?this.props.fallback?this.props.fallback:e.jsxs("div",{className:"fw-player-error flex min-h-[280px] flex-col items-center justify-center gap-4 rounded-xl bg-slate-950 p-6 text-center text-white",children:[e.jsx("div",{className:"text-lg font-semibold text-red-400",children:"Playback Error"}),e.jsx("p",{className:"max-w-sm text-sm text-slate-400",children:(null===(t=this.state.error)||void 0===t?void 0:t.message)||"An unexpected error occurred while loading the player."}),e.jsx(Ve,{type:"button",variant:"secondary",onClick:this.handleRetry,className:"mt-2",children:"Try Again"})]}):this.props.children}}])&&h(r.prototype,a),o&&h(r,o),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,a,o}(),Ye=["className","variant"],Je=i.cva("inline-flex items-center rounded-full border border-transparent px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 ring-offset-background",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/80",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",outline:"border-border text-foreground"}},defaultVariants:{variant:"default"}}),Ge={status:"OFFLINE",isOnline:!1,message:"Connecting...",lastUpdate:0};function He(e,t){return Ze.apply(this,arguments)}function Ze(){return Ze=m(y().m(function e(t,n){var r,a,o,s,i,l,c=arguments;return y().w(function(e){for(;;)switch(e.n){case 0:r=c.length>2&&void 0!==c[2]?c[2]:3,a=c.length>3&&void 0!==c[3]?c[3]:500,o=null,s=y().m(function e(){var s,i,c,u;return y().w(function(e){for(;;)switch(e.p=e.n){case 0:return e.p=0,e.n=1,fetch(t,n);case 1:return s=e.v,e.a(2,{v:s});case 2:if(e.p=2,u=e.v,o=u instanceof Error?u:new Error("Fetch failed"),null===(i=n.signal)||void 0===i||!i.aborted){e.n=3;break}throw o;case 3:if(!(l<r-1)){e.n=4;break}return c=a*Math.pow(2,l),console.warn("[useViewerEndpoints] Retry ".concat(l+1,"/").concat(r-1," after ").concat(c,"ms")),e.n=4,new Promise(function(e){return setTimeout(e,c)});case 4:return e.a(2)}},e,null,[[0,2]])}),l=0;case 1:if(!(l<r)){e.n=4;break}return e.d(A(s()),2);case 2:if(!(i=e.v)){e.n=3;break}return e.a(2,i.v);case 3:l++,e.n=1;break;case 4:throw null!=o?o:new Error("Gateway unreachable after retries");case 5:return e.a(2)}},e)})),Ze.apply(this,arguments)}Object.defineProperty(exports,"GatewayClient",{enumerable:!0,get:function(){return n.GatewayClient}}),Object.defineProperty(exports,"PlayerController",{enumerable:!0,get:function(){return n.PlayerController}}),Object.defineProperty(exports,"PlayerManager",{enumerable:!0,get:function(){return n.PlayerManager}}),Object.defineProperty(exports,"QualityMonitor",{enumerable:!0,get:function(){return n.QualityMonitor}}),Object.defineProperty(exports,"StreamStateClient",{enumerable:!0,get:function(){return n.StreamStateClient}}),Object.defineProperty(exports,"cn",{enumerable:!0,get:function(){return n.cn}}),Object.defineProperty(exports,"globalPlayerManager",{enumerable:!0,get:function(){return n.globalPlayerManager}}),exports.Badge=function(t){var r=t.className,a=t.variant,o=w(t,Ye);return e.jsx("div",b({className:n.cn(Je({variant:a}),r)},o))},exports.Button=Ve,exports.ClosedCaptionsIcon=function(t){var n=t.size,r=void 0===n?16:n,a=t.color,o=void 0===a?"currentColor":a,s=t.className,i=void 0===s?"":s;return e.jsxs("svg",{width:r,height:r,viewBox:"0 0 24 24",fill:"none",className:i,"aria-hidden":"true",children:[e.jsx("rect",{x:"2",y:"4",width:"20",height:"16",rx:"2",ry:"2",stroke:o,strokeWidth:"2",fill:"none"}),e.jsx("path",{d:"M8 10c0-.6.4-1 1-1h1c.6 0 1 .4 1 1v4c0 .6-.4 1-1 1H9c-.6 0-1-.4-1-1v-4zM14 10c0-.6.4-1 1-1h1c.6 0 1 .4 1 1v4c0 .6-.4 1-1 1h-1c-.6 0-1-.4-1-1v-4z",fill:o})]})},exports.DevModePanel=Ce,exports.FullscreenExitIcon=ie,exports.FullscreenIcon=se,exports.FullscreenToggleIcon=fe,exports.IdleScreen=z,exports.LiveIcon=function(t){var n=t.size,r=void 0===n?16:n,a=t.color,o=void 0===a?"currentColor":a,s=t.className,i=void 0===s?"":s;return e.jsxs("svg",{width:r,height:r,viewBox:"0 0 24 24",fill:"none",className:i,"aria-hidden":"true",children:[e.jsx("circle",{cx:"12",cy:"12",r:"3",fill:o}),e.jsx("path",{d:"M12 1v6M12 17v6M4.22 4.22l4.24 4.24M15.54 15.54l4.24 4.24M1 12h6M17 12h6M4.22 19.78l4.24-4.24M15.54 8.46l4.24-4.24",stroke:o,strokeWidth:"2",strokeLinecap:"round"})]})},exports.LoadingScreen=function(n){var r=n.message,a=void 0===r?"Waiting for source...":r,o=t.useRef(null),s=N(t.useState([]),2),i=s[0],l=s[1],c=function(){try{for(var e=new(window.AudioContext||window.webkitAudioContext),t=e.createOscillator(),n=e.createOscillator(),r=e.createBuffer(1,.1*e.sampleRate,e.sampleRate),a=e.createBufferSource(),o=r.getChannelData(0),s=0;s<o.length;s++)o[s]=2*Math.random()-1;a.buffer=r;var i=e.createGain(),l=e.createGain(),c=e.createGain(),u=e.createGain();t.connect(i),n.connect(l),a.connect(c),i.connect(u),l.connect(u),c.connect(u),u.connect(e.destination),t.frequency.setValueAtTime(1800,e.currentTime),t.frequency.exponentialRampToValueAtTime(900,e.currentTime+.08),n.frequency.setValueAtTime(3600,e.currentTime),n.frequency.exponentialRampToValueAtTime(1800,e.currentTime+.04),t.type="triangle",n.type="sine",i.gain.setValueAtTime(0,e.currentTime),i.gain.linearRampToValueAtTime(.4,e.currentTime+.002),i.gain.exponentialRampToValueAtTime(.001,e.currentTime+.12),l.gain.setValueAtTime(0,e.currentTime),l.gain.linearRampToValueAtTime(.3,e.currentTime+.001),l.gain.exponentialRampToValueAtTime(.001,e.currentTime+.06),c.gain.setValueAtTime(0,e.currentTime),c.gain.linearRampToValueAtTime(.2,e.currentTime+.001),c.gain.exponentialRampToValueAtTime(.001,e.currentTime+.01),u.gain.setValueAtTime(.5,e.currentTime);var d=e.currentTime,f=d+.15;t.start(d),n.start(d),a.start(d),t.stop(f),n.stop(f),a.stop(d+.02)}catch(e){console.log("Audio context not available")}};return t.useEffect(function(){var e="loading-screen-animations";if(!document.getElementById(e)){var t=document.createElement("style");t.id=e,t.textContent="\n @keyframes fadeInOut {\n 0%, 100% {\n opacity: 0.6;\n }\n 50% {\n opacity: 0.9;\n }\n }\n\n @keyframes logoPulse {\n 0%, 100% {\n opacity: 0.15;\n transform: scale(1);\n }\n 50% {\n opacity: 0.25;\n transform: scale(1.05);\n }\n }\n\n @keyframes shimmer {\n 0% {\n background-position: -200px 0;\n }\n 100% {\n background-position: calc(200px + 100%) 0;\n }\n }\n\n @keyframes floatUp {\n 0% {\n transform: translateY(100vh) rotate(0deg);\n opacity: 0;\n }\n 10% {\n opacity: 0.6;\n }\n 90% {\n opacity: 0.6;\n }\n 100% {\n transform: translateY(-100px) rotate(360deg);\n opacity: 0;\n }\n }\n\n @keyframes gradientShift {\n 0%, 100% {\n background-position: 0% 50%;\n }\n 50% {\n background-position: 100% 50%;\n }\n }\n\n @keyframes hitmarkerFade {\n 0% {\n opacity: 1;\n transform: scale(0.5);\n }\n 20% {\n opacity: 1;\n transform: scale(1.2);\n }\n 100% {\n opacity: 0;\n transform: scale(1);\n }\n }\n\n @keyframes hitmarkerFade45 {\n 0% {\n opacity: 1;\n transform: translate(-50%, -50%) rotate(45deg) scale(0.5);\n }\n 20% {\n opacity: 1;\n transform: translate(-50%, -50%) rotate(45deg) scale(1.2);\n }\n 100% {\n opacity: 0;\n transform: translate(-50%, -50%) rotate(45deg) scale(1);\n }\n }\n\n @keyframes hitmarkerFadeNeg45 {\n 0% {\n opacity: 1;\n transform: translate(-50%, -50%) rotate(-45deg) scale(0.5);\n }\n 20% {\n opacity: 1;\n transform: translate(-50%, -50%) rotate(-45deg) scale(1.2);\n }\n 100% {\n opacity: 0;\n transform: translate(-50%, -50%) rotate(-45deg) scale(1);\n }\n }\n ",document.head.appendChild(t)}},[]),e.jsxs("div",{ref:o,className:"fw-player-root",style:{position:"relative",width:"100%",height:"100%",minHeight:"300px",background:"\n linear-gradient(135deg,\n hsl(var(--tn-bg-dark, 235 21% 11%)) 0%,\n hsl(var(--tn-bg, 233 23% 17%)) 25%,\n hsl(var(--tn-bg-dark, 235 21% 11%)) 50%,\n hsl(var(--tn-bg, 233 23% 17%)) 75%,\n hsl(var(--tn-bg-dark, 235 21% 11%)) 100%\n )\n ",backgroundSize:"400% 400%",animation:"gradientShift 16s ease-in-out infinite",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",overflow:"hidden",borderRadius:"0",userSelect:"none",WebkitUserSelect:"none",MozUserSelect:"none",msUserSelect:"none"},children:[i.map(function(t){return e.jsxs("div",{style:{position:"absolute",left:"".concat(t.x,"px"),top:"".concat(t.y,"px"),transform:"translate(-50%, -50%)",pointerEvents:"none",zIndex:100,width:"40px",height:"40px"},children:[e.jsx("div",{style:{position:"absolute",top:"25%",left:"25%",width:"12px",height:"3px",backgroundColor:"#ffffff",transform:"translate(-50%, -50%) rotate(45deg)",animation:"hitmarkerFade45 0.6s ease-out forwards",boxShadow:"0 0 8px rgba(255, 255, 255, 0.8)",borderRadius:"1px"}}),e.jsx("div",{style:{position:"absolute",top:"25%",left:"75%",width:"12px",height:"3px",backgroundColor:"#ffffff",transform:"translate(-50%, -50%) rotate(-45deg)",animation:"hitmarkerFadeNeg45 0.6s ease-out forwards",boxShadow:"0 0 8px rgba(255, 255, 255, 0.8)",borderRadius:"1px"}}),e.jsx("div",{style:{position:"absolute",top:"75%",left:"25%",width:"12px",height:"3px",backgroundColor:"#ffffff",transform:"translate(-50%, -50%) rotate(-45deg)",animation:"hitmarkerFadeNeg45 0.6s ease-out forwards",boxShadow:"0 0 8px rgba(255, 255, 255, 0.8)",borderRadius:"1px"}}),e.jsx("div",{style:{position:"absolute",top:"75%",left:"75%",width:"12px",height:"3px",backgroundColor:"#ffffff",transform:"translate(-50%, -50%) rotate(45deg)",animation:"hitmarkerFade45 0.6s ease-out forwards",boxShadow:"0 0 8px rgba(255, 255, 255, 0.8)",borderRadius:"1px"}})]},t.id)}),S(Array(12)).map(function(t,n){return e.jsx("div",{style:{position:"absolute",left:"".concat(100*Math.random(),"%"),width:"".concat(4*Math.random()+2,"px"),height:"".concat(4*Math.random()+2,"px"),borderRadius:"50%",background:["#7aa2f7","#bb9af7","#9ece6a","#73daca","#7dcfff","#f7768e","#e0af68","#2ac3de"][n%8],opacity:0,animation:"floatUp ".concat(8+4*Math.random(),"s linear infinite"),animationDelay:"".concat(8*Math.random(),"s"),pointerEvents:"none",userSelect:"none"}},"particle-".concat(n))}),S(Array(8)).map(function(t,n){return e.jsx(Pe,{index:n},n)}),e.jsx(De,{containerRef:o,onHitmarker:function(e){if(o.current){var t=o.current.getBoundingClientRect(),n=e.clientX-t.left,r=e.clientY-t.top,a={id:Date.now()+Math.random(),x:n,y:r};l(function(e){return[].concat(S(e),[a])}),function(){try{var e=new Audio("data:audio/mpeg;base64,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");e.volume=.3,e.play().catch(function(){c()})}catch(e){c()}}(),setTimeout(function(){l(function(e){return e.filter(function(e){return e.id!==a.id})})},600)}}}),e.jsx(q,{parentRef:o,scale:.08}),e.jsx("div",{style:{position:"absolute",bottom:"20%",left:"50%",transform:"translateX(-50%)",color:"#a9b1d6",fontSize:"16px",fontWeight:"500",textAlign:"center",animation:"fadeInOut 2s ease-in-out infinite",textShadow:"0 2px 4px rgba(36, 40, 59, 0.5)",fontFamily:"-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif",userSelect:"none",WebkitUserSelect:"none",MozUserSelect:"none",msUserSelect:"none",pointerEvents:"none"},children:a}),e.jsx("div",{style:{position:"absolute",top:0,left:0,right:0,bottom:0,background:"\n radial-gradient(circle at 20% 80%, rgba(122, 162, 247, 0.03) 0%, transparent 50%),\n radial-gradient(circle at 80% 20%, rgba(187, 154, 247, 0.03) 0%, transparent 50%),\n radial-gradient(circle at 40% 40%, rgba(158, 206, 106, 0.02) 0%, transparent 50%)\n ",pointerEvents:"none",userSelect:"none"}})]})},exports.PauseIcon=te,exports.PictureInPictureIcon=le,exports.PlayIcon=ee,exports.PlayPauseIcon=ue,exports.Player=function(t){return e.jsx(Be,b({},t))},exports.PlayerContext=J,exports.PlayerControls=he,exports.PlayerErrorBoundary=Qe,exports.PlayerProvider=function(t){var n=t.children,r=Y(t.config);return e.jsx(J.Provider,{value:r,children:n})},exports.SeekToLiveIcon=me,exports.SettingsIcon=ce,exports.SkipBackIcon=ne,exports.SkipForwardIcon=re,exports.Slider=Z,exports.StatsIcon=ve,exports.StatsPanel=W,exports.StreamStateOverlay=function(t){var n=t.status,r=t.message,a=t.percentage,o=t.onRetry,s=t.visible,i=void 0===s||s,l=t.className,c=void 0===l?"":l;if(!i||"ONLINE"===n)return null;var u="ERROR"===n||"INVALID"===n||"OFFLINE"===n,d="INITIALIZING"===n&&void 0!==a;return e.jsx("div",{className:"absolute inset-0 z-20 flex items-center justify-center ".concat(c),style:{backgroundColor:"hsl(var(--tn-bg-dark) / 0.8)",backdropFilter:"blur(4px)"},role:"status","aria-live":"polite",children:e.jsxs("div",{className:"fw-slab w-[280px] max-w-[90%]",style:{backgroundColor:"hsl(var(--tn-bg) / 0.95)"},children:[e.jsxs("div",{className:"fw-slab-header flex items-center gap-2",children:[e.jsx(We,{status:n}),e.jsx("span",{children:Ue(n)})]}),e.jsxs("div",{className:"fw-slab-body",children:[e.jsx("p",{className:"text-sm",style:{color:"hsl(var(--tn-fg))"},children:r}),d&&e.jsxs("div",{className:"mt-3",children:[e.jsx("div",{className:"h-1.5 w-full overflow-hidden",style:{backgroundColor:"hsl(var(--tn-bg-visual))"},children:e.jsx("div",{className:"h-full transition-all duration-300",style:{width:"".concat(Math.min(100,a),"%"),backgroundColor:"hsl(var(--tn-yellow))"}})}),e.jsxs("p",{className:"mt-1.5 text-xs font-mono",style:{color:"hsl(var(--tn-fg-dark))"},children:[Math.round(a),"%"]})]}),"OFFLINE"===n&&e.jsx("p",{className:"mt-2 text-xs",style:{color:"hsl(var(--tn-fg-dark))"},children:"The stream will start when the broadcaster goes live"}),("BOOTING"===n||"WAITING_FOR_DATA"===n)&&e.jsx("p",{className:"mt-2 text-xs",style:{color:"hsl(var(--tn-fg-dark))"},children:"Please wait while the stream prepares..."}),!u&&e.jsxs("div",{className:"mt-3 flex items-center gap-2 text-xs",style:{color:"hsl(var(--tn-fg-dark))"},children:[e.jsx("span",{className:"h-1.5 w-1.5 animate-pulse",style:{backgroundColor:"hsl(var(--tn-cyan))"}}),e.jsx("span",{children:"Checking stream status..."})]})]}),u&&o&&e.jsx("div",{className:"fw-slab-actions",children:e.jsx("button",{type:"button",onClick:o,className:"fw-btn-flush py-2.5 text-xs font-medium uppercase tracking-wide",style:{color:"hsl(var(--tn-blue))"},"aria-label":"Retry connection",children:"Retry Connection"})})]})})},exports.ThumbnailOverlay=function(t){var r=t.thumbnailUrl,a=t.onPlay,o=t.message,s=t.showUnmuteMessage,i=void 0!==s&&s,l=t.style,c=t.className,u=function(e){e.stopPropagation(),null==a||a()};return e.jsxs("div",{role:"button",tabIndex:0,onClick:u,onKeyDown:function(e){"Enter"!==e.key&&" "!==e.key||(e.preventDefault(),u(e))},style:l,className:n.cn("fw-player-thumbnail relative flex h-full min-h-[280px] w-full cursor-pointer items-center justify-center overflow-hidden rounded-xl bg-slate-950 text-foreground outline-none transition focus-visible:ring-2 focus-visible:ring-primary focus-visible:ring-offset-2 focus-visible:ring-offset-background",c),children:[r&&e.jsx("div",{className:"absolute inset-0 bg-cover bg-center",style:{backgroundImage:"url(".concat(r,")")}}),e.jsx("div",{className:n.cn("absolute inset-0 bg-slate-950/70",!r&&"bg-gradient-to-br from-slate-900 via-slate-950 to-slate-900")}),e.jsx("div",{className:"relative z-10 flex max-w-[320px] flex-col items-center gap-4 px-6 text-center text-sm sm:gap-6",children:i?e.jsxs("div",{className:"w-full rounded-lg border border-white/15 bg-black/80 p-4 text-sm text-white shadow-lg backdrop-blur",children:[e.jsxs("div",{className:"mb-1 flex items-center justify-center gap-2 text-base font-semibold text-primary",children:[e.jsx("span",{"aria-hidden":"true",children:"🔇"})," Click to unmute"]}),e.jsx("p",{className:"text-xs text-white/80",children:"Stream is playing muted — tap to enable sound."})]}):e.jsxs(e.Fragment,{children:[e.jsx(Ve,{type:"button",size:"icon",variant:"secondary",className:"h-20 w-20 rounded-full bg-primary/90 text-primary-foreground shadow-lg shadow-primary/40 transition hover:bg-primary focus-visible:bg-primary","aria-label":"Play stream",children:e.jsx("svg",{viewBox:"0 0 24 24",fill:"currentColor",className:"ml-0.5 h-8 w-8","aria-hidden":"true",children:e.jsx("path",{d:"M8 5v14l11-7z"})})}),e.jsxs("div",{className:"w-full rounded-lg border border-white/10 bg-black/70 p-5 text-white shadow-inner backdrop-blur",children:[e.jsx("p",{className:"text-base font-semibold text-primary",children:null!=o?o:"Click to play"}),e.jsx("p",{className:"mt-1 text-xs text-white/70",children:o?"Start streaming instantly":"Jump into the live feed"})]})]})})]})},exports.TitleOverlay=V,exports.VolumeIcon=de,exports.VolumeOffIcon=oe,exports.VolumeUpIcon=ae,exports.useMetaTrack=function(e){var r=e.mistBaseUrl,a=e.streamName,o=e.subscriptions,s=e.enabled,i=void 0===s||s,l=N(t.useState(!1),2),c=l[0],u=l[1],d=N(t.useState("disconnected"),2),f=d[0],v=d[1],m=N(t.useState([]),2),h=m[0],p=m[1],C=t.useRef(null);return t.useEffect(function(){if(!i||!r||!a)return C.current&&(C.current.disconnect(),C.current=null),u(!1),void v("disconnected");C.current=new n.MetaTrackManager({mistBaseUrl:r,streamName:a,subscriptions:o,debug:!1});var e=function(){if(C.current){var e=C.current.getState();v(e),u("connected"===e),p(C.current.getSubscribedTracks())}},t=setInterval(e,500);return C.current.connect(),e(),function(){clearInterval(t),C.current&&(C.current.disconnect(),C.current=null),u(!1),v("disconnected")}},[i,r,a,o]),{isConnected:c,connectionState:f,subscribedTracks:h,subscribe:t.useCallback(function(e,t){if(!C.current)return function(){};var n=C.current.subscribe(e,t);return p(C.current.getSubscribedTracks()),function(){n(),C.current&&p(C.current.getSubscribedTracks())}},[]),unsubscribe:t.useCallback(function(e,t){C.current&&(C.current.unsubscribe(e,t),p(C.current.getSubscribedTracks()))},[]),connect:t.useCallback(function(){var e;null===(e=C.current)||void 0===e||e.connect()},[]),disconnect:t.useCallback(function(){var e;null===(e=C.current)||void 0===e||e.disconnect()},[]),setPlaybackTime:t.useCallback(function(e){var t;null===(t=C.current)||void 0===t||t.setPlaybackTime(e)},[]),onSeek:t.useCallback(function(e){var t;null===(t=C.current)||void 0===t||t.onSeek(e)},[])}},exports.usePlaybackQuality=function(e){var r=e.videoElement,a=e.enabled,o=void 0===a||a,s=e.sampleInterval,i=void 0===s?500:s,l=e.thresholds,c=e.onQualityDegraded,u=N(t.useState(null),2),d=u[0],f=u[1],v=N(t.useState(!1),2),m=v[0],h=v[1],p=t.useRef(null);return t.useEffect(function(){return p.current=new n.QualityMonitor({sampleInterval:i,thresholds:l,onQualityDegraded:c,onSample:f}),function(){var e;null===(e=p.current)||void 0===e||e.stop(),p.current=null}},[i,l,c]),t.useEffect(function(){var e;return o&&r&&p.current?(p.current.start(r),h(!0),function(){var e;null===(e=p.current)||void 0===e||e.stop(),h(!1)}):(null===(e=p.current)||void 0===e||e.stop(),void h(!1))},[r,o]),{quality:d,isMonitoring:m,getCurrentQuality:t.useCallback(function(){var e,t;return null!==(e=null===(t=p.current)||void 0===t?void 0:t.getCurrentQuality())&&void 0!==e?e:null},[]),getAverageQuality:t.useCallback(function(){var e,t;return null!==(e=null===(t=p.current)||void 0===t?void 0:t.getAverageQuality())&&void 0!==e?e:null},[]),getHistory:t.useCallback(function(){var e,t;return null!==(e=null===(t=p.current)||void 0===t?void 0:t.getHistory())&&void 0!==e?e:[]},[]),resetStallCounters:t.useCallback(function(){var e;null===(e=p.current)||void 0===e||e.resetStallCounters()},[]),getTotalStallMs:t.useCallback(function(){var e,t;return null!==(e=null===(t=p.current)||void 0===t?void 0:t.getTotalStallMs())&&void 0!==e?e:0},[])}},exports.usePlayerContext=function(){var e=t.useContext(J);if(!e)throw new Error("usePlayerContext must be used within a PlayerProvider");return e},exports.usePlayerContextOptional=G,exports.usePlayerController=Y,exports.usePlayerSelection=function(e,n){var r=n.streamInfo,a=n.playbackMode,o=n.debug,s=N(t.useState(null),2),i=s[0],l=s[1],c=N(t.useState([]),2),u=c[0],d=c[1],f=N(t.useState(!1),2),v=f[0],m=f[1];return t.useEffect(function(){var t=e.on("selection-changed",function(e){var t;o&&console.log("[usePlayerSelection] Selection changed:",null==e?void 0:e.player,null==e||null===(t=e.source)||void 0===t?void 0:t.type),l(e)}),n=e.on("combinations-updated",function(e){o&&console.log("[usePlayerSelection] Combinations updated:",e.length),d(e),m(!0)});return function(){t(),n()}},[e,o]),t.useEffect(function(){if(!r)return l(null),d([]),void m(!1);e.getAllCombinations(r,a)},[e,r,a]),{selection:i,combinations:u,ready:v,refresh:t.useCallback(function(){r&&(e.invalidateCache(),e.getAllCombinations(r,a))},[e,r,a])}},exports.useStreamState=function(e){var n=e.mistBaseUrl,r=e.streamName,a=e.pollInterval,o=void 0===a?3e3:a,s=e.enabled,i=void 0===s||s,l=e.useWebSocket,c=void 0===l||l,u=e.debug,d=void 0!==u&&u,f=N(t.useState(Ge),2),v=f[0],h=f[1],p=N(t.useState(!1),2),C=p[0],g=p[1],x=t.useRef(null),w=t.useRef(null),k=t.useRef(null),A=t.useRef(!0),j=t.useCallback(function(e){var t;if(A.current)if(e.error){var n=(t=e.error.toLowerCase()).includes("offline")?"OFFLINE":t.includes("initializing")?"INITIALIZING":t.includes("booting")?"BOOTING":t.includes("waiting for data")?"WAITING_FOR_DATA":t.includes("shutting down")?"SHUTTING_DOWN":t.includes("invalid")?"INVALID":"ERROR",r=e.on_error||function(e,t){switch(e){case"ONLINE":return"Stream is online";case"OFFLINE":return"Stream is offline";case"INITIALIZING":return void 0!==t?"Initializing... ".concat(Math.round(10*t)/10,"%"):"Stream is initializing";case"BOOTING":return"Stream is starting up";case"WAITING_FOR_DATA":return"Waiting for stream data";case"SHUTTING_DOWN":return"Stream is shutting down";case"INVALID":return"Stream status is invalid";default:return"Stream error"}}(n,e.perc);h(function(t){return{status:n,isOnline:!1,message:r,percentage:e.perc,lastUpdate:Date.now(),error:e.error,streamInfo:t.streamInfo}})}else h(function(t){var n,r,a,o,s=b(b(b({},t.streamInfo),e),{},{source:e.source||(null===(n=t.streamInfo)||void 0===n?void 0:n.source),meta:b(b(b({},null===(r=t.streamInfo)||void 0===r?void 0:r.meta),e.meta),{},{tracks:(null===(a=e.meta)||void 0===a?void 0:a.tracks)||(null===(o=t.streamInfo)||void 0===o||null===(o=o.meta)||void 0===o?void 0:o.tracks)})});return{status:"ONLINE",isOnline:!0,message:"Stream is online",lastUpdate:Date.now(),streamInfo:s}})},[]),S=t.useCallback(m(y().m(function e(){var t,a,s,l,u,d,f;return y().w(function(e){for(;;)switch(e.p=e.n){case 0:if(A.current&&i){e.n=1;break}return e.a(2);case 1:return e.p=1,t="".concat(n.replace(/\/$/,""),"/json_").concat(encodeURIComponent(r),".js"),a="".concat(t,"?metaeverywhere=1&inclzero=1"),e.n=2,fetch(a,{method:"GET",headers:{Accept:"application/json"}});case 2:if((s=e.v).ok){e.n=3;break}throw new Error("HTTP ".concat(s.status));case 3:return e.n=4,s.text();case 4:l=e.v,(u=l.match(/^[^(]+\(([\s\S]*)\);?$/))&&(l=u[1]),d=JSON.parse(l),j(d),e.n=7;break;case 5:if(e.p=5,f=e.v,A.current){e.n=6;break}return e.a(2);case 6:h(function(e){return b(b({},e),{},{status:"ERROR",isOnline:!1,message:f instanceof Error?f.message:"Connection failed",lastUpdate:Date.now(),error:f instanceof Error?f.message:"Unknown error"})});case 7:A.current&&i&&!c&&(w.current=setTimeout(S,o));case 8:return e.a(2)}},e,null,[[1,5]])})),[n,r,i,c,o,j]),L=t.useCallback(function(){if(A.current&&i&&c){k.current&&(clearTimeout(k.current),k.current=null),x.current&&(x.current.close(),x.current=null);try{var e=n.replace(/^http:/,"ws:").replace(/^https:/,"wss:").replace(/\/$/,""),t="".concat(e,"/json_").concat(encodeURIComponent(r),".js?metaeverywhere=1&inclzero=1"),a=new WebSocket(t);x.current=a,k.current=setTimeout(function(){a.readyState<=WebSocket.OPEN&&(d&&console.debug("[useStreamState] WebSocket timeout (5s), falling back to HTTP polling"),a.close(),S())},5e3),a.onopen=function(){d&&console.debug("[useStreamState] WebSocket connected"),g(!0)},a.onmessage=function(e){k.current&&(clearTimeout(k.current),k.current=null);try{var t=JSON.parse(e.data);j(t)}catch(e){console.warn("[useStreamState] Failed to parse WebSocket message:",e)}},a.onerror=function(e){console.warn("[useStreamState] WebSocket error, falling back to HTTP polling"),k.current&&(clearTimeout(k.current),k.current=null),a.close()},a.onclose=function(){x.current=null,g(!1),A.current&&i&&(d&&console.debug("[useStreamState] WebSocket closed, starting HTTP polling"),S())}}catch(e){console.warn("[useStreamState] WebSocket connection failed:",e),S()}}},[n,r,i,c,d,j,S]),E=t.useCallback(function(){var e;c&&(null===(e=x.current)||void 0===e?void 0:e.readyState)===WebSocket.OPEN||S()},[c,S]);return t.useEffect(function(){if(A.current=!0,i&&n&&r){h(b(b({},Ge),{},{message:"Connecting...",lastUpdate:Date.now()}));var e=function(){var e=m(y().m(function e(){return y().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,S();case 1:c&&A.current&&L();case 2:return e.a(2)}},e)}));return function(){return e.apply(this,arguments)}}();return e(),function(){A.current=!1,d&&console.debug("[useStreamState] cleanup starting, mountedRef set to false"),k.current&&(clearTimeout(k.current),k.current=null),x.current&&(x.current.onclose=null,x.current.onerror=null,x.current.onmessage=null,x.current.onopen=null,x.current.close(),x.current=null),w.current&&(clearTimeout(w.current),w.current=null)}}h(Ge)},[i,n,r,c,d,L,S]),b(b({},v),{},{refetch:E,socketRef:x,socketReady:C})},exports.useTelemetry=function(e){var r,a,o=e.enabled,s=e.endpoint,i=e.interval,l=e.authToken,c=e.batchSize,u=e.videoElement,d=e.contentId,f=e.contentType,v=e.playerType,m=e.protocol,h=e.getQuality,p=t.useRef(null);t.useEffect(function(){var e;return o&&s&&d?(p.current=new n.TelemetryReporter({endpoint:s,authToken:l,interval:i,batchSize:c,contentId:d,contentType:f,playerType:v,protocol:m}),function(){var e;null===(e=p.current)||void 0===e||e.stop(),p.current=null}):(null===(e=p.current)||void 0===e||e.stop(),void(p.current=null))},[o,s,l,i,c,d,f,v,m]),t.useEffect(function(){if(o&&u&&p.current)return p.current.start(u,h),function(){var e;null===(e=p.current)||void 0===e||e.stop()}},[o,u,h]);var C=t.useCallback(function(e,t){var n;null===(n=p.current)||void 0===n||n.recordError(e,t)},[]),g=t.useCallback(function(){var e,t;return null!==(e=null===(t=p.current)||void 0===t?void 0:t.getSessionId())&&void 0!==e?e:null},[]),x=t.useCallback(function(){var e,t;return null!==(e=null===(t=p.current)||void 0===t?void 0:t.isActive())&&void 0!==e&&e},[]);return{sessionId:null!==(r=null===(a=p.current)||void 0===a?void 0:a.getSessionId())&&void 0!==r?r:null,recordError:C,getSessionId:g,isActive:x}},exports.useViewerEndpoints=function(e){var n=e.gatewayUrl,r=e.contentType,a=e.contentId,o=e.authToken,s=N(t.useState(null),2),i=s[0],l=s[1],c=N(t.useState("idle"),2),u=c[0],d=c[1],f=N(t.useState(null),2),v=f[0],h=f[1],p=t.useRef(null);return t.useEffect(function(){var e;if(n&&r&&a){d("loading"),h(null),null===(e=p.current)||void 0===e||e.abort();var t=new AbortController;return p.current=t,m(y().m(function e(){var s,i,c,u,f,v,m,p,C,g,x;return y().w(function(e){for(;;)switch(e.p=e.n){case 0:return e.p=0,u=n.replace(/\/$/,""),e.n=1,He(u,{method:"POST",headers:b({"Content-Type":"application/json"},o?{Authorization:"Bearer ".concat(o)}:{}),body:JSON.stringify({query:"\n query ResolveViewer($contentType: String!, $contentId: String!) {\n resolveViewerEndpoint(contentType: $contentType, contentId: $contentId) {\n primary { nodeId baseUrl protocol url geoDistance loadScore outputs }\n fallbacks { nodeId baseUrl protocol url geoDistance loadScore outputs }\n metadata { contentType contentId title description durationSeconds status isLive viewers recordingSizeBytes clipSource createdAt }\n }\n }\n ",variables:{contentType:r,contentId:a}}),signal:t.signal});case 1:if((f=e.v).ok){e.n=2;break}throw new Error("Gateway GQL error ".concat(f.status));case 2:return e.n=3,f.json();case 3:if(v=e.v,null===(s=v.errors)||void 0===s||!s.length){e.n=4;break}throw new Error((null===(i=v.errors[0])||void 0===i?void 0:i.message)||"GraphQL error");case 4:if(m=null===(c=v.data)||void 0===c?void 0:c.resolveViewerEndpoint,p=null==m?void 0:m.primary,C=Array.isArray(null==m?void 0:m.fallbacks)?m.fallbacks:[],p){e.n=5;break}throw new Error("No endpoints");case 5:if(p.outputs&&"string"==typeof p.outputs)try{p.outputs=JSON.parse(p.outputs)}catch(e){}C&&C.forEach(function(e){if(e.outputs&&"string"==typeof e.outputs)try{e.outputs=JSON.parse(e.outputs)}catch(e){}}),l({primary:p,fallbacks:C,metadata:null==m?void 0:m.metadata}),d("ready"),e.n=8;break;case 6:if(e.p=6,x=e.v,!t.signal.aborted){e.n=7;break}return e.a(2);case 7:g=x instanceof Error?x.message:"Unknown gateway error",console.error("[useViewerEndpoints] Gateway resolution failed:",g),h(g),d("error");case 8:return e.a(2)}},e,null,[[0,6]])}))(),function(){return t.abort()}}},[n,r,a,o]),{endpoints:i,status:u,error:v}};
1
+ var e=require("react/jsx-runtime"),t=require("react"),n=require("@livepeer-frameworks/player-core"),r=require("@radix-ui/react-slider"),a=require("@radix-ui/react-context-menu"),o=require("lucide-react"),i=require("@radix-ui/react-slot"),s=require("class-variance-authority");function l(e){var t=Object.create(null);return e&&Object.keys(e).forEach(function(n){if("default"!==n){var r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:function(){return e[n]}})}}),t.default=e,Object.freeze(t)}var c=l(t),u=l(r),d=l(a);function f(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function v(e,t,n,r,a,o,i){try{var s=e[o](i),l=s.value}catch(e){return void n(e)}s.done?t(l):Promise.resolve(l).then(r,a)}function m(e){return function(){var t=this,n=arguments;return new Promise(function(r,a){var o=e.apply(t,n);function i(e){v(o,r,a,i,s,"next",e)}function s(e){v(o,r,a,i,s,"throw",e)}i(void 0)})}}function h(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,L(r.key),r)}}function p(e,t,n){return(t=L(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function C(e){return C=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},C(e)}function g(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(g=function(){return!!e})()}function x(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function b(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?x(Object(n),!0).forEach(function(t){p(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):x(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function w(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}function y(){var e,t,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",a=n.toStringTag||"@@toStringTag";function o(n,r,a,o){var l=r&&r.prototype instanceof s?r:s,c=Object.create(l.prototype);return k(c,"_invoke",function(n,r,a){var o,s,l,c=0,u=a||[],d=!1,f={p:0,n:0,v:e,a:v,f:v.bind(e,4),d:function(t,n){return o=t,s=0,l=e,f.n=n,i}};function v(n,r){for(s=n,l=r,t=0;!d&&c&&!a&&t<u.length;t++){var a,o=u[t],v=f.p,m=o[2];n>3?(a=m===r)&&(l=o[(s=o[4])?5:(s=3,3)],o[4]=o[5]=e):o[0]<=v&&((a=n<2&&v<o[1])?(s=0,f.v=r,f.n=o[1]):v<m&&(a=n<3||o[0]>r||r>m)&&(o[4]=n,o[5]=r,f.n=m,s=0))}if(a||n>1)return i;throw d=!0,r}return function(a,u,m){if(c>1)throw TypeError("Generator is already running");for(d&&1===u&&v(u,m),s=u,l=m;(t=s<2?e:l)||!d;){o||(s?s<3?(s>1&&(f.n=-1),v(s,l)):f.n=l:f.v=l);try{if(c=2,o){if(s||(a="next"),t=o[a]){if(!(t=t.call(o,l)))throw TypeError("iterator result is not an object");if(!t.done)return t;l=t.value,s<2&&(s=0)}else 1===s&&(t=o.return)&&t.call(o),s<2&&(l=TypeError("The iterator does not provide a '"+a+"' method"),s=1);o=e}else if((t=(d=f.n<0)?l:n.call(r,f))!==i)break}catch(t){o=e,s=1,l=t}finally{c=1}}return{value:t,done:d}}}(n,a,o),!0),c}var i={};function s(){}function l(){}function c(){}t=Object.getPrototypeOf;var u=[][r]?t(t([][r]())):(k(t={},r,function(){return this}),t),d=c.prototype=s.prototype=Object.create(u);function f(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,c):(e.__proto__=c,k(e,a,"GeneratorFunction")),e.prototype=Object.create(d),e}return l.prototype=c,k(d,"constructor",c),k(c,"constructor",l),l.displayName="GeneratorFunction",k(c,a,"GeneratorFunction"),k(d),k(d,a,"Generator"),k(d,r,function(){return this}),k(d,"toString",function(){return"[object Generator]"}),(y=function(){return{w:o,m:f}})()}function k(e,t,n,r){var a=Object.defineProperty;try{a({},"",{})}catch(e){a=0}k=function(e,t,n,r){function o(t,n){k(e,t,function(e){return this._invoke(t,n,e)})}t?a?a(e,t,{value:n,enumerable:!r,configurable:!r,writable:!r}):e[t]=n:(o("next",0),o("throw",1),o("return",2))},k(e,t,n,r)}function A(e){if(null!=e){var t=e["function"==typeof Symbol&&Symbol.iterator||"@@iterator"],n=0;if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length))return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}}}throw new TypeError(typeof e+" is not iterable")}function j(e,t){return j=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},j(e,t)}function N(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,a,o,i,s=[],l=!0,c=!1;try{if(o=(n=n.call(e)).next,0===t);else for(;!(l=(r=o.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(e){c=!0,a=e}finally{try{if(!l&&null!=n.return&&(i=n.return(),Object(i)!==i))return}finally{if(c)throw a}}return s}}(e,t)||E(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function S(e){return function(e){if(Array.isArray(e))return f(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||E(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function L(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e,"string");return"symbol"==typeof t?t:t+""}function E(e,t){if(e){if("string"==typeof e)return f(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?f(e,t):void 0}}var M=153/69,T=["#7aa2f7","#bb9af7","#9ece6a","#73daca","#7dcfff","#f7768e","#e0af68","#2ac3de"],I=function(e){if(0===T.length)return null!=e?e:"#ffffff";if(1===T.length)return T[0];var t;do{t=T[Math.floor(Math.random()*T.length)]}while(t===e);return t},q=function(n){var r=n.parentRef,a=n.scale,o=void 0===a?.15:a,i=N(t.useState({top:0,left:0}),2),s=i[0],l=i[1],c=t.useRef(s);t.useEffect(function(){c.current=s},[s]);var u=N(t.useState({width:153,height:69}),2),d=u[0],f=u[1],v=t.useRef(d);t.useEffect(function(){v.current=d},[d]);var m=t.useRef({x:1.8,y:1.6}),h=N(t.useState(I()),2),p=h[0],C=h[1],g=t.useCallback(function(){var e=r.current;if(e){var t=e.clientWidth,n=e.clientHeight;if(0!==t&&0!==n){var a=n*o,i=t*o,s=i/M;s>a&&(i=(s=a)*M);var u={width:Math.max(20,i),height:Math.max(20,s)};v.current=u,f(u);var d=Math.max(0,n-u.height),h=Math.max(0,t-u.width),p={top:Math.random()*d,left:Math.random()*h};c.current=p,l(p);var C=Math.max(1.2,Math.min(u.width,u.height)/70);m.current={x:C*(Math.random()>.5?1:-1),y:C*(Math.random()>.5?1:-1)}}}},[r,o]);return t.useEffect(function(){if(r.current){if(g(),"undefined"!=typeof ResizeObserver){var e=new ResizeObserver(function(){return g()});return e.observe(r.current),function(){return e.disconnect()}}var t=function(){return g()};return window.addEventListener("resize",t),function(){return window.removeEventListener("resize",t)}}},[r,g]),t.useEffect(function(){var e,t=performance.now(),n=function(a){var o=r.current,i=v.current;if(o&&0!==i.width&&0!==i.height){var s=a-t;t=a;var u=Math.min(s/16,2),d=o.clientHeight-i.height,f=o.clientWidth-i.width,h=c.current,p=h.top,g=h.left,x=m.current,b=x.x,w=x.y,y=!1;g+=b*u,((p+=w*u)<=0||p>=d)&&(w=-w,p=Math.max(0,Math.min(d,p)),y=!0),(g<=0||g>=f)&&(b=-b,g=Math.max(0,Math.min(f,g)),y=!0),m.current={x:b,y:w};var k={top:p,left:g};c.current=k,l(k),y&&C(function(e){return I(e)}),e=requestAnimationFrame(n)}else e=requestAnimationFrame(n)};return e=requestAnimationFrame(n),function(){return cancelAnimationFrame(e)}},[r]),e.jsx("div",{className:"fw-player-dvd",style:{top:"".concat(s.top,"px"),left:"".concat(s.left,"px"),width:"".concat(d.width,"px"),height:"".concat(d.height,"px")},children:e.jsx("svg",{width:"100%",height:"100%",viewBox:"0 0 153 69",fill:p,className:"select-none",children:e.jsx("g",{children:e.jsx("path",{d:"M140.186,63.52h-1.695l-0.692,5.236h-0.847l0.77-5.236h-1.693l0.076-0.694h4.158L140.186,63.52L140.186,63.52z M146.346,68.756h-0.848v-4.545l0,0l-2.389,4.545l-1-4.545l0,0l-1.462,4.545h-0.771l1.924-5.931h0.695l0.924,4.006l2.078-4.006 h0.848V68.756L146.346,68.756z M126.027,0.063H95.352c0,0-8.129,9.592-9.654,11.434c-8.064,9.715-9.523,12.32-9.779,13.02 c0.063-0.699-0.256-3.304-3.686-13.148C71.282,8.7,68.359,0.062,68.359,0.062H57.881V0L32.35,0.063H13.169l-1.97,8.131 l14.543,0.062h3.365c9.336,0,15.055,3.747,13.467,10.354c-1.717,7.24-9.91,10.416-18.545,10.416h-3.24l4.191-17.783H10.502 L4.34,37.219h20.578c15.432,0,30.168-8.13,32.709-18.608c0.508-1.906,0.443-6.67-0.764-9.527c0-0.127-0.063-0.191-0.127-0.444 c-0.064-0.063-0.127-0.509,0.127-0.571c0.128-0.062,0.383,0.189,0.445,0.254c0.127,0.317,0.19,0.57,0.19,0.57l13.083,36.965 l33.344-37.6h14.1h3.365c9.337,0,15.055,3.747,13.528,10.354c-1.778,7.24-9.972,10.416-18.608,10.416h-3.238l4.191-17.783h-14.481 l-6.159,25.976h20.576c15.434,0,30.232-8.13,32.709-18.608C152.449,8.193,141.523,0.063,126.027,0.063L126.027,0.063z M71.091,45.981c-39.123,0-70.816,4.512-70.816,10.035c0,5.59,31.693,10.034,70.816,10.034c39.121,0,70.877-4.444,70.877-10.034 C141.968,50.493,110.212,45.981,71.091,45.981L71.091,45.981z M68.55,59.573c-8.956,0-16.196-1.523-16.196-3.365 c0-1.84,7.239-3.303,16.196-3.303c8.955,0,16.195,1.463,16.195,3.303C84.745,58.050,77.505,59.573,68.55,59.573L68.55,59.573z"})})})})},R="data:image/svg+xml,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22UTF-8%22%20standalone%3D%22no%22%3F%3E%3C!DOCTYPE%20svg%20PUBLIC%20%22-%2F%2FW3C%2F%2FDTD%20SVG%201.1%2F%2FEN%22%20%22http%3A%2F%2Fwww.w3.org%2FGraphics%2FSVG%2F1.1%2FDTD%2Fsvg11.dtd%22%3E%3Csvg%20width%3D%22100%25%22%20height%3D%22100%25%22%20viewBox%3D%220%200%2015806%2015806%22%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%20xml%3Aspace%3D%22preserve%22%20xmlns%3Aserif%3D%22http%3A%2F%2Fwww.serif.com%2F%22%20style%3D%22fill-rule%3Aevenodd%3Bclip-rule%3Aevenodd%3Bstroke-linejoin%3Around%3Bstroke-miterlimit%3A2%3B%22%3E%20%20%20%20%3Cg%20transform%3D%22matrix%285.55556%2C0%2C0%2C5.55556%2C0%2C0%29%22%3E%20%20%20%20%20%20%20%20%3Cg%20transform%3D%22matrix%288.31462%2C0%2C0%2C8.31462%2C8.22267e-14%2C-6.49389e-14%29%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cg%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cg%20transform%3D%22matrix%281%2C0%2C0%2C1%2C-217.125%2C-368.902%29%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M488.82%2C596.09C489.36%2C595.2%20489.89%2C594.31%20490.41%2C593.41C490.5%2C593.25%20490.59%2C593.09%20490.68%2C592.93C499.43%2C577.56%20504.8%2C560.03%20505.8%2C541.33C505.82%2C541.05%20505.83%2C540.77%20505.85%2C540.49C505.88%2C539.79%20505.91%2C539.09%20505.93%2C538.38C505.96%2C537.46%20505.97%2C536.54%20505.98%2C535.61C505.98%2C535.41%20505.99%2C535.2%20505.99%2C535L505.99%2C534.72C505.99%2C469.43%20453.06%2C416.51%20387.78%2C416.51C322.5%2C416.51%20269.57%2C469.44%20269.57%2C534.72C269.57%2C582.95%20298.45%2C624.43%20339.86%2C642.81C342.17%2C641.83%20344.82%2C641.6%20347.6%2C642.5C347.71%2C642.48%20348.06%2C642.58%20348.8%2C642.93C349.87%2C642.59%20351.08%2C642.46%20352.17%2C642.22C354.63%2C641.68%20357.12%2C641.33%20359.58%2C640.81C365.15%2C639.64%20370.59%2C637.89%20376.16%2C636.73C382.32%2C635.45%20388.69%2C638.46%20390.44%2C644.84C391.16%2C647.46%20390.81%2C650.38%20389.65%2C652.91C430.42%2C652.28%20466.17%2C631.01%20486.93%2C599.09C487.1%2C598.83%20487.27%2C598.57%20487.44%2C598.31C487.91%2C597.57%20488.37%2C596.83%20488.83%2C596.09L488.82%2C596.09Z%22%20style%3D%22fill%3Argb%2826%2C26%2C26%29%3Bfill-rule%3Anonzero%3B%22%2F%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cg%20transform%3D%22matrix%281%2C0%2C0%2C1%2C-217.125%2C-368.902%29%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M398.87%2C484.2L399.88%2C505.89L410.28%2C509.55L395.52%2C509.55L394.43%2C479.48L415.2%2C479.48L398.87%2C484.2Z%22%20style%3D%22fill%3Argb%2877%2C77%2C77%29%3Bfill-rule%3Anonzero%3B%22%2F%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cg%20transform%3D%22matrix%281%2C0%2C0%2C1%2C-217.125%2C-368.902%29%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M407.52%2C632.43L407.52%2C632.37L405.83%2C567.81L405.91%2C560.75L420.81%2C555.3L399.31%2C556L402.95%2C630.22C404.49%2C630.89%20406.02%2C631.62%20407.53%2C632.42L407.52%2C632.43Z%22%20style%3D%22fill%3Argb%2877%2C77%2C77%29%3Bfill-rule%3Anonzero%3B%22%2F%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cg%20transform%3D%22matrix%281%2C0%2C0%2C1%2C-217.125%2C-368.902%29%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M315.75%2C435.86L315.75%2C445.19C315.75%2C445.19%20343.09%2C444.1%20343.09%2C467.32L343.09%2C491.12L366.17%2C476.2L467.27%2C476.2C473.14%2C476.2%20478.98%2C477.27%20484.41%2C479.5C489.4%2C481.55%20494.15%2C484.61%20494.15%2C488.82L494.15%2C442.41L406.24%2C442.41L406.24%2C435.92L315.75%2C435.86Z%22%20style%3D%22fill%3Argb%28242%2C242%2C242%29%3Bfill-rule%3Anonzero%3B%22%2F%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M384.52%2C549.53C383%2C549.84%20374.5%2C554.81%20372.41%2C555.99C361.06%2C562.39%20350.66%2C570.29%20340.56%2C578.47L343.55%2C511.3C357.29%2C499.76%20372.89%2C489.71%20389.69%2C483.46L391.34%2C511.85L380.41%2C515.68L465.05%2C515.68L465.05%2C549.54L384.51%2C549.54L384.52%2C549.53Z%22%20style%3D%22fill%3Argb%28242%2C242%2C242%29%3Bfill-rule%3Anonzero%3B%22%2F%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M384.62%2C620.15C386.3%2C618.47%20388.78%2C617.44%20391.15%2C617.44C392.32%2C617.44%20393.42%2C617.66%20394.43%2C618.05L391.53%2C561.24C376.44%2C568.54%20361.62%2C576.78%20348.45%2C587.23C346.53%2C588.75%20339.44%2C594.3%20338.53%2C595.88C338.16%2C596.53%20338.08%2C596.77%20337.99%2C597.52C336.15%2C611.29%20341.68%2C626.24%20327.48%2C635.06C325.4%2C636.35%20322.28%2C637.18%20320.41%2C638.36C319.72%2C638.79%20319.26%2C638.87%20319.46%2C639.87L357.68%2C640.77L357.68%2C621.03C357.68%2C620.82%20358.79%2C618.46%20359.07%2C618.05C362%2C613.76%20368.64%2C613.05%20372.45%2C616.63C373.18%2C617.32%20375.15%2C620.84%20375.15%2C621.57L375.15%2C626.68C376.32%2C626.01%20377.56%2C625.46%20378.87%2C625.04C380.03%2C624.43%20381.23%2C623.94%20382.45%2C623.58C382.94%2C622.27%20383.71%2C621.04%20384.62%2C620.14L384.62%2C620.15Z%22%20style%3D%22fill%3Argb%28242%2C242%2C242%29%3Bfill-rule%3Anonzero%3B%22%2F%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cg%20transform%3D%22matrix%281%2C0%2C0%2C1%2C-217.125%2C-368.902%29%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Crect%20x%3D%22336.59%22%20y%3D%22428.82%22%20width%3D%2255.13%22%20height%3D%228.66%22%20style%3D%22fill%3Argb%28242%2C242%2C242%29%3B%22%2F%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cg%20transform%3D%22matrix%281%2C0%2C0%2C1%2C-217.125%2C-368.902%29%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M370.43%2C405.41L381.28%2C405.41L381.28%2C428.82L347.02%2C428.82C347.02%2C415.9%20357.51%2C405.41%20370.43%2C405.41Z%22%20style%3D%22fill%3Argb%28242%2C242%2C242%29%3Bfill-rule%3Anonzero%3B%22%2F%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cg%20transform%3D%22matrix%281%2C0%2C0%2C1%2C-217.125%2C-368.902%29%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M375.15%2C621.59L375.15%2C646.4L399.31%2C643.32L393.82%2C606.12%22%20style%3D%22fill%3Argb%28242%2C242%2C242%29%3Bfill-rule%3Anonzero%3B%22%2F%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cg%20transform%3D%22matrix%281%2C0%2C0%2C1%2C-217.125%2C-368.902%29%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M434.95%2C641.77C427.45%2C636.79%20420.54%2C630.98%20414.13%2C624.68C378.86%2C650.1%20331.68%2C660.51%20289.92%2C645.24C276.7%2C656.38%20260.2%2C663.03%20243.21%2C666.13C245.28%2C668.42%20247.17%2C670.85%20249%2C673.36C259.11%2C673.75%20269.41%2C673.79%20279.47%2C672.94C316.6%2C669.77%20351.78%2C651.88%20389.38%2C653.26C420.31%2C654.4%20448.46%2C670.95%20479.26%2C673.24C493.74%2C674.31%20510.78%2C671.04%20524.28%2C665.72C524.6%2C665.6%20525.17%2C665.63%20525.1%2C665.2C493.55%2C667.12%20461.22%2C659.22%20434.94%2C641.78L434.95%2C641.77Z%22%20style%3D%22fill%3Argb%28242%2C242%2C242%29%3Bfill-rule%3Anonzero%3B%22%2F%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M431.64%2C681.28C431.71%2C681.82%20430.99%2C681.55%20430.67%2C681.5C428.7%2C681.19%20426.49%2C680.36%20424.48%2C679.92C400.81%2C674.72%20375.35%2C672.69%20351.2%2C675.65C341.11%2C676.89%20331.28%2C679.62%20321.24%2C681.22C300.45%2C684.53%20278.62%2C685.74%20257.83%2C682.01C273.85%2C682.14%20289.66%2C680.16%20305.21%2C676.54C319.99%2C673.09%20334.95%2C667.38%20350.01%2C665.52C377.55%2C662.11%20406.29%2C671.7%20431.64%2C681.28Z%22%20style%3D%22fill%3Argb%28242%2C242%2C242%29%3Bfill-rule%3Anonzero%3B%22%2F%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M376.31%2C636.41L367.67%2C639.94C342.05%2C648.2%20314.13%2C646.84%20288.76%2C638.37C280.1%2C644.46%20271.14%2C650.64%20260.82%2C653.56L267.06%2C649.22C276.19%2C642.22%20285.08%2C634.65%20291.47%2C624.98C294.79%2C626.43%20297.92%2C628.31%20301.23%2C629.78C323.76%2C639.82%20352.12%2C642.31%20376.31%2C636.41Z%22%20style%3D%22fill%3Argb%28242%2C242%2C242%29%3Bfill-rule%3Anonzero%3B%22%2F%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M496.44%2C679.79L493.62%2C680.99C455.11%2C696.09%20422.32%2C666.01%20385.12%2C661.7L374.61%2C660.13C397.05%2C658.33%20419.03%2C663.62%20440.24%2C670.18C445.86%2C671.92%20451.4%2C674.13%20457.03%2C675.77C469.67%2C679.46%20483.33%2C681.19%20496.45%2C679.8L496.44%2C679.79Z%22%20style%3D%22fill%3Argb%28242%2C242%2C242%29%3Bfill-rule%3Anonzero%3B%22%2F%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M502.72%2C658.04L499.89%2C658.33C480.42%2C655.87%20461.58%2C649.56%20444.59%2C639.91C442.86%2C638.93%20440.96%2C637.83%20439.42%2C636.58C447.9%2C638.94%20456.77%2C635.92%20464.33%2C632.12C472.21%2C646.13%20487.36%2C654.62%20502.73%2C658.03L502.72%2C658.04Z%22%20style%3D%22fill%3Argb%28242%2C242%2C242%29%3Bfill-rule%3Anonzero%3B%22%2F%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M440%2C690.82C440.07%2C691.36%20439.35%2C691.09%20439.03%2C691.04C435.69%2C690.51%20432.35%2C689.64%20429.02%2C689.11C398.16%2C684.21%20366.77%2C684.02%20335.64%2C686.06C335.32%2C686.08%20334.23%2C686.27%20334.29%2C685.75C369.06%2C676.79%20406.04%2C680.41%20440%2C690.82Z%22%20style%3D%22fill%3Argb%28242%2C242%2C242%29%3Bfill-rule%3Anonzero%3B%22%2F%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cg%20transform%3D%22matrix%281%2C0%2C0%2C1%2C-217.125%2C-368.902%29%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M313.56%2C572.87L313.69%2C572.14L313.94%2C572.49L313.56%2C572.87Z%22%20style%3D%22fill%3Argb%282%2C38%2C43%29%3Bfill-opacity%3A0.6%3Bfill-rule%3Anonzero%3B%22%2F%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cg%20transform%3D%22matrix%281%2C0%2C0%2C1%2C-217.125%2C-368.902%29%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M539.06%2C620.51C542.62%2C613.83%20545.72%2C606.95%20548.35%2C599.91C560.45%2C567.54%20562.63%2C531.85%20554.01%2C497.83C553.56%2C496.03%20551.73%2C494.94%20549.93%2C495.4C548.14%2C495.85%20547.05%2C497.68%20547.5%2C499.47C555.79%2C532.17%20553.69%2C566.46%20542.08%2C597.56C539.98%2C603.18%20537.56%2C608.71%20534.84%2C614.1C532.63%2C618.48%20530.21%2C622.77%20527.59%2C626.96C527.3%2C627.44%20527%2C627.91%20526.69%2C628.38C525.42%2C630.39%20524.1%2C632.37%20522.71%2C634.32C522.05%2C635.28%20521.36%2C636.24%20520.66%2C637.19C519.76%2C638.42%20518.84%2C639.63%20517.89%2C640.84C512.56%2C647.71%20506.62%2C654.2%20500.09%2C660.26C498.25%2C661.96%20496.36%2C663.64%20494.43%2C665.27C490.48%2C668.61%20486.33%2C671.8%20482%2C674.81C478.57%2C677.19%20474.88%2C679.59%20471.13%2C681.77C467.82%2C683.69%20464.47%2C685.45%20461.2%2C686.92C461.06%2C686.99%20460.92%2C687.06%20460.79%2C687.14L460.76%2C687.16L460.74%2C687.16L460.58%2C687.29L460.43%2C687.41L460.37%2C687.45L460.3%2C687.51L460.11%2C687.7L460.07%2C687.75L460.05%2C687.77L460.03%2C687.8L460%2C687.83C459.77%2C688.11%20459.57%2C688.43%20459.44%2C688.79C459.3%2C689.15%20459.23%2C689.53%20459.22%2C689.9L459.22%2C690.26L459.25%2C690.42L459.29%2C690.67L459.35%2C690.9C459.39%2C691.06%20459.45%2C691.21%20459.51%2C691.36C459.58%2C691.5%20459.65%2C691.64%20459.73%2C691.77L459.75%2C691.79L459.77%2C691.82L459.88%2C691.98L460%2C692.13L460.04%2C692.19L460.34%2C692.49L460.36%2C692.49L460.42%2C692.56C460.7%2C692.79%20461.02%2C692.98%20461.38%2C693.12L483.09%2C701.39L504.75%2C709.65C504.94%2C709.72%20505.13%2C709.78%20505.34%2C709.82C506.31%2C710.21%20507.44%2C710.1%20508.32%2C709.48C508.49%2C709.37%20508.64%2C709.23%20508.79%2C709.08L556.35%2C659.8C557.38%2C658.73%20557.5%2C657.12%20556.75%2C655.92L539.06%2C620.51Z%22%20style%3D%22fill%3Argb%28242%2C242%2C242%29%3Bfill-rule%3Anonzero%3B%22%2F%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cg%20transform%3D%22matrix%281%2C0%2C0%2C1%2C-217.125%2C-368.902%29%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M427.7%2C697.67C395%2C705.96%20360.71%2C703.86%20329.62%2C692.24C313.96%2C686.39%20299.11%2C678.13%20285.67%2C667.54C283.67%2C665.98%20281.69%2C664.35%20279.75%2C662.67C272.21%2C656.14%20265.17%2C648.83%20258.77%2C640.77C257.46%2C639.14%20256.18%2C637.46%20254.94%2C635.76C254.57%2C635.27%20254.21%2C634.78%20253.85%2C634.28C253.35%2C633.58%20252.85%2C632.88%20252.36%2C632.17C249.98%2C628.73%20247.59%2C625.05%20245.4%2C621.29C243.51%2C618.05%20241.78%2C614.76%20240.33%2C611.54C240.3%2C611.48%20240.28%2C611.43%20240.25%2C611.37C240.25%2C611.35%20240.23%2C611.32%20240.22%2C611.3C240.16%2C611.18%20240.1%2C611.07%20240.03%2C610.96L240.01%2C610.93L240.01%2C610.9L239.89%2C610.74L239.77%2C610.6L239.72%2C610.54L239.66%2C610.47L239.56%2C610.36L239.47%2C610.28L239.43%2C610.24L239.4%2C610.22L239.38%2C610.19L239.34%2C610.17C239.29%2C610.13%20239.24%2C610.09%20239.19%2C610.05C238.95%2C609.87%20238.68%2C609.72%20238.39%2C609.61C238.02%2C609.47%20237.65%2C609.4%20237.28%2C609.39L236.91%2C609.39L236.75%2C609.42L236.51%2C609.46L236.27%2C609.52C236.12%2C609.56%20235.97%2C609.62%20235.81%2C609.68C235.67%2C609.75%20235.54%2C609.82%20235.41%2C609.9L235.35%2C609.94L235.19%2C610.05L234.99%2C610.21L234.92%2C610.27L234.73%2C610.46L234.69%2C610.51L234.61%2C610.59C234.38%2C610.87%20234.19%2C611.19%20234.05%2C611.55L225.78%2C633.25L217.53%2C654.92C217.45%2C655.11%20217.39%2C655.3%20217.35%2C655.51C216.96%2C656.48%20217.08%2C657.61%20217.69%2C658.49C217.8%2C658.66%20217.94%2C658.81%20218.09%2C658.96L267.38%2C706.52C268.44%2C707.55%20270.05%2C707.67%20271.25%2C706.92L306.67%2C689.23C313.34%2C692.79%20320.22%2C695.89%20327.26%2C698.52C359.63%2C710.62%20395.32%2C712.8%20429.34%2C704.18C431.14%2C703.72%20432.23%2C701.9%20431.78%2C700.1C431.32%2C698.31%20429.5%2C697.22%20427.7%2C697.67Z%22%20style%3D%22fill%3Argb%28242%2C242%2C242%29%3Bfill-rule%3Anonzero%3B%22%2F%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cg%20transform%3D%22matrix%281%2C0%2C0%2C1%2C-217.125%2C-368.902%29%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M222.39%2C582.08C222.84%2C583.87%20224.67%2C584.96%20226.46%2C584.51C228.26%2C584.05%20229.35%2C582.23%20228.89%2C580.43C220.61%2C547.74%20222.7%2C513.44%20234.32%2C482.35C240.43%2C466.01%20249.16%2C450.55%20260.42%2C436.66C266.85%2C428.7%20274.11%2C421.26%20282.17%2C414.47C286.06%2C411.19%20290.14%2C408.06%20294.4%2C405.1C297.83%2C402.71%20301.52%2C400.32%20305.27%2C398.13C308.57%2C396.21%20311.92%2C394.45%20315.2%2C392.98C315.34%2C392.92%20315.48%2C392.84%20315.61%2C392.76L315.63%2C392.74L315.66%2C392.74L315.82%2C392.62L315.97%2C392.5L316.03%2C392.45L316.09%2C392.39L316.2%2C392.29L316.28%2C392.2L316.33%2C392.16L316.35%2C392.13L316.37%2C392.11L316.4%2C392.07C316.63%2C391.79%20316.82%2C391.48%20316.96%2C391.12C317.1%2C390.75%20317.17%2C390.38%20317.18%2C390.01L317.18%2C389.78L317.17%2C389.64L317.15%2C389.48L317.11%2C389.24L317.05%2C389C317.01%2C388.85%20316.95%2C388.7%20316.88%2C388.55C316.82%2C388.4%20316.74%2C388.27%20316.66%2C388.14L316.64%2C388.11L316.64%2C388.08L316.52%2C387.92L316.4%2C387.77L316.35%2C387.72L316.29%2C387.65L316.06%2C387.42L316.03%2C387.4L316.01%2C387.37L315.97%2C387.35C315.69%2C387.11%20315.37%2C386.92%20315.02%2C386.79L293.31%2C378.51L271.65%2C370.26C271.46%2C370.18%20271.26%2C370.12%20271.06%2C370.08C270.08%2C369.7%20268.96%2C369.81%20268.08%2C370.42C267.91%2C370.54%20267.75%2C370.67%20267.61%2C370.82L220.05%2C420.11C219.02%2C421.18%20218.89%2C422.78%20219.65%2C423.98L237.33%2C459.4C233.77%2C466.07%20230.67%2C472.95%20228.04%2C480C215.95%2C512.36%20213.77%2C548.05%20222.39%2C582.08Z%22%20style%3D%22fill%3Argb%28242%2C242%2C242%29%3Bfill-rule%3Anonzero%3B%22%2F%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cg%20transform%3D%22matrix%281%2C0%2C0%2C1%2C-217.125%2C-368.902%29%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M519.68%2C441.65C520.78%2C443.12%20521.85%2C444.61%20522.91%2C446.13C525.3%2C449.56%20527.69%2C453.25%20529.88%2C457C531.8%2C460.3%20533.56%2C463.65%20535.03%2C466.93C535.09%2C467.07%20535.17%2C467.21%20535.25%2C467.34L535.27%2C467.36L535.27%2C467.39L535.39%2C467.55L535.51%2C467.7L535.56%2C467.76L535.62%2C467.82L535.72%2C467.93L535.81%2C468.01L535.85%2C468.05L535.88%2C468.07L535.9%2C468.1L535.94%2C468.13C536.22%2C468.36%20536.54%2C468.55%20536.89%2C468.69C537.26%2C468.83%20537.63%2C468.89%20538%2C468.9L538.37%2C468.9L538.53%2C468.88L538.77%2C468.84L539.01%2C468.78C539.16%2C468.73%20539.31%2C468.68%20539.46%2C468.61C539.61%2C468.54%20539.74%2C468.47%20539.87%2C468.39L539.9%2C468.37L539.93%2C468.37L540.09%2C468.25L540.24%2C468.13L540.29%2C468.08L540.36%2C468.02L540.59%2C467.79L540.61%2C467.76L540.64%2C467.74L540.66%2C467.7C540.9%2C467.42%20541.09%2C467.1%20541.22%2C466.74L549.5%2C445.04L557.75%2C423.38C557.83%2C423.19%20557.89%2C422.99%20557.93%2C422.79C558.32%2C421.81%20558.2%2C420.69%20557.59%2C419.81C557.47%2C419.64%20557.34%2C419.48%20557.19%2C419.33L507.9%2C371.78C506.84%2C370.75%20505.23%2C370.62%20504.03%2C371.38L468.61%2C389.06C461.94%2C385.5%20455.06%2C382.4%20448.01%2C379.77C415.65%2C367.68%20379.96%2C365.5%20345.93%2C374.12C344.14%2C374.57%20343.05%2C376.4%20343.5%2C378.19C343.96%2C379.98%20345.78%2C381.08%20347.58%2C380.62C380.27%2C372.34%20414.57%2C374.43%20445.66%2C386.05C461.19%2C391.85%20475.94%2C400.04%20489.29%2C410.5C500.52%2C419.29%20510.77%2C429.7%20519.68%2C441.65Z%22%20style%3D%22fill%3Argb%28242%2C242%2C242%29%3Bfill-rule%3Anonzero%3B%22%2F%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%3C%2Fg%3E%3C%2Fsvg%3E",F=function(n){var r=n.index,a=N(t.useState({top:0,left:0}),2),o=a[0],i=a[1],s=N(t.useState(40),2),l=s[0],c=s[1],u=N(t.useState(0),2),d=u[0],f=u[1],v=function(){return{top:80*Math.random()+10,left:80*Math.random()+10}},m=function(){return 60*Math.random()+30};t.useEffect(function(){i(v()),c(m());var e=function(){f(.15),setTimeout(function(){f(0),setTimeout(function(){i(v()),c(m()),setTimeout(function(){e()},200)},1500)},4e3+3e3*Math.random())},t=setTimeout(e,500*r);return function(){return clearTimeout(t)}},[r]);var h=["rgba(122, 162, 247, 0.2)","rgba(187, 154, 247, 0.2)","rgba(158, 206, 106, 0.2)","rgba(115, 218, 202, 0.2)","rgba(125, 207, 255, 0.2)","rgba(247, 118, 142, 0.2)","rgba(224, 175, 104, 0.2)","rgba(42, 195, 222, 0.2)"];return e.jsx("div",{style:{position:"absolute",top:"".concat(o.top,"%"),left:"".concat(o.left,"%"),width:"".concat(l,"px"),height:"".concat(l,"px"),borderRadius:"50%",background:h[r%h.length],opacity:d,transition:"opacity 1s ease-in-out",pointerEvents:"none",userSelect:"none"}})},B=function(n){var r=n.containerRef,a=n.scale,o=void 0===a?.2:a,i=n.onHitmarker,s=N(t.useState(100),2),l=s[0],c=s[1],u=N(t.useState({x:0,y:0}),2),d=u[0],f=u[1],v=N(t.useState(!1),2),m=v[0],h=v[1];t.useEffect(function(){if(r.current){var e=r.current.clientWidth,t=r.current.clientHeight,n=Math.min(e,t);c(n*o)}},[r,o]);var p=function(e){if(r.current){var t=r.current.getBoundingClientRect(),n=t.left+t.width/2,a=t.top+t.height/2,o=e.clientX-n,i=e.clientY-a,s=Math.sqrt(o*o+i*i),c=1.5*l;if(s<c&&s>0){var u=(c-s)/c*50;f({x:-o/s*u,y:-i/s*u}),h(!0)}else f({x:0,y:0}),h(!1)}},C=function(){f({x:0,y:0}),h(!1)};return t.useEffect(function(){if(r.current){var e=r.current;return e.addEventListener("mousemove",p),e.addEventListener("mouseleave",C),function(){e.removeEventListener("mousemove",p),e.removeEventListener("mouseleave",C)}}},[l,r]),e.jsxs("div",{style:{position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -50%) translate(".concat(d.x,"px, ").concat(d.y,"px)"),display:"flex",alignItems:"center",justifyContent:"center",zIndex:10,transition:"transform 0.3s ease-out",userSelect:"none"},children:[e.jsx("div",{style:{position:"absolute",width:"".concat(1.4*l,"px"),height:"".concat(1.4*l,"px"),borderRadius:"50%",background:"rgba(122, 162, 247, 0.15)",animation:m?"logoPulse 1s ease-in-out infinite":"logoPulse 3s ease-in-out infinite",transform:m?"scale(1.2)":"scale(1)",transition:"transform 0.3s ease-out",pointerEvents:"none"}}),e.jsx("img",{src:R,alt:"FrameWorks Logo",onClick:function(e){e.stopPropagation(),i&&i({clientX:e.clientX,clientY:e.clientY})},style:{width:"".concat(l,"px"),height:"".concat(l,"px"),position:"relative",zIndex:1,filter:m?"drop-shadow(0 6px 12px rgba(36, 40, 59, 0.4)) brightness(1.1)":"drop-shadow(0 4px 8px rgba(36, 40, 59, 0.3))",transform:m?"scale(1.1)":"scale(1)",transition:"all 0.3s ease-out",cursor:m?"pointer":"default",userSelect:"none",WebkitUserDrag:"none"}})]})};function P(t){var n=t.status,r="w-5 h-5";return"INITIALIZING"!==n&&"BOOTING"!==n&&"WAITING_FOR_DATA"!==n&&n?"OFFLINE"===n?e.jsx("svg",{className:r,fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",style:{color:"hsl(var(--tn-red, 348 100% 72%))"},children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M18.364 5.636a9 9 0 010 12.728m0 0l-2.829-2.829m2.829 2.829L21 21M15.536 8.464a5 5 0 010 7.072m0 0l-2.829-2.829m-4.243 2.829a4.978 4.978 0 01-1.414-2.83m-1.414 5.658a9 9 0 01-2.167-9.238m7.824 2.167a1 1 0 111.414 1.414m-1.414-1.414L3 3m8.293 8.293l1.414 1.414"})}):"ERROR"===n||"INVALID"===n?e.jsx("svg",{className:r,fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",style:{color:"hsl(var(--tn-red, 348 100% 72%))"},children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z"})}):e.jsxs("svg",{className:"".concat(r," animate-spin"),fill:"none",viewBox:"0 0 24 24",style:{color:"hsl(var(--tn-cyan, 193 100% 75%))"},children:[e.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),e.jsx("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})]}):e.jsxs("svg",{className:"".concat(r," animate-spin"),fill:"none",viewBox:"0 0 24 24",style:{color:"hsl(var(--tn-yellow, 40 95% 64%))"},children:[e.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),e.jsx("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})]})}var D=function(t){var n=t.status,r=t.message,a=t.percentage,o=t.error,i=t.onRetry,s=("ERROR"===n||"INVALID"===n)&&i,l="INITIALIZING"===n&&void 0!==a,c=o||r;return e.jsxs("div",{style:{position:"absolute",bottom:"16px",left:"50%",transform:"translateX(-50%)",zIndex:20,display:"flex",flexDirection:"column",alignItems:"center",gap:"8px",maxWidth:"280px",textAlign:"center"},children:[e.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"8px",color:"#787c99",fontSize:"13px",fontFamily:"-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif"},children:[e.jsx(P,{status:n}),e.jsx("span",{children:c})]}),l&&e.jsx("div",{style:{width:"160px",height:"4px",background:"rgba(65, 72, 104, 0.4)",borderRadius:"2px",overflow:"hidden"},children:e.jsx("div",{style:{width:"".concat(Math.min(100,a),"%"),height:"100%",background:"hsl(var(--tn-cyan, 193 100% 75%))",transition:"width 0.3s ease-out"}})}),s&&e.jsx("button",{type:"button",onClick:i,style:{padding:"6px 16px",background:"transparent",border:"1px solid rgba(122, 162, 247, 0.4)",borderRadius:"4px",color:"#7aa2f7",fontSize:"11px",fontWeight:500,cursor:"pointer",transition:"all 0.2s ease",fontFamily:"-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif"},onMouseEnter:function(e){e.currentTarget.style.background="rgba(122, 162, 247, 0.1)"},onMouseLeave:function(e){e.currentTarget.style.background="transparent"},children:"Retry"})]})},O=function(){try{var e=new(window.AudioContext||window.webkitAudioContext),t=e.createOscillator(),n=e.createOscillator(),r=e.createGain(),a=e.createGain(),o=e.createGain();t.connect(r),n.connect(a),r.connect(o),a.connect(o),o.connect(e.destination),t.frequency.setValueAtTime(1800,e.currentTime),t.frequency.exponentialRampToValueAtTime(900,e.currentTime+.08),n.frequency.setValueAtTime(3600,e.currentTime),n.frequency.exponentialRampToValueAtTime(1800,e.currentTime+.04),t.type="triangle",n.type="sine",r.gain.setValueAtTime(0,e.currentTime),r.gain.linearRampToValueAtTime(.4,e.currentTime+.002),r.gain.exponentialRampToValueAtTime(.001,e.currentTime+.12),a.gain.setValueAtTime(0,e.currentTime),a.gain.linearRampToValueAtTime(.3,e.currentTime+.001),a.gain.exponentialRampToValueAtTime(.001,e.currentTime+.06),o.gain.setValueAtTime(.5,e.currentTime);var i=e.currentTime,s=i+.15;t.start(i),n.start(i),t.stop(s),n.stop(s)}catch(e){}},z=function(n){var r=n.status,a=n.message,o=void 0===a?"Waiting for stream...":a,i=n.percentage,s=n.error,l=n.onRetry,c=t.useRef(null),u=N(t.useState([]),2),d=u[0],f=u[1];return t.useEffect(function(){var e="idle-screen-animations";if(!document.getElementById(e)){var t=document.createElement("style");t.id=e,t.textContent="\n @keyframes fadeInOut {\n 0%, 100% { opacity: 0.6; }\n 50% { opacity: 0.9; }\n }\n @keyframes logoPulse {\n 0%, 100% { opacity: 0.15; transform: scale(1); }\n 50% { opacity: 0.25; transform: scale(1.05); }\n }\n @keyframes floatUp {\n 0% { transform: translateY(100vh) rotate(0deg); opacity: 0; }\n 10% { opacity: 0.6; }\n 90% { opacity: 0.6; }\n 100% { transform: translateY(-100px) rotate(360deg); opacity: 0; }\n }\n @keyframes gradientShift {\n 0%, 100% { background-position: 0% 50%; }\n 50% { background-position: 100% 50%; }\n }\n @keyframes hitmarkerFade45 {\n 0% { opacity: 1; transform: translate(-50%, -50%) rotate(45deg) scale(0.5); }\n 20% { opacity: 1; transform: translate(-50%, -50%) rotate(45deg) scale(1.2); }\n 100% { opacity: 0; transform: translate(-50%, -50%) rotate(45deg) scale(1); }\n }\n @keyframes hitmarkerFadeNeg45 {\n 0% { opacity: 1; transform: translate(-50%, -50%) rotate(-45deg) scale(0.5); }\n 20% { opacity: 1; transform: translate(-50%, -50%) rotate(-45deg) scale(1.2); }\n 100% { opacity: 0; transform: translate(-50%, -50%) rotate(-45deg) scale(1); }\n }\n ",document.head.appendChild(t)}},[]),e.jsxs("div",{ref:c,className:"fw-player-root",style:{position:"absolute",inset:0,zIndex:5,background:"\n linear-gradient(135deg,\n hsl(var(--tn-bg-dark, 235 21% 11%)) 0%,\n hsl(var(--tn-bg, 233 23% 17%)) 25%,\n hsl(var(--tn-bg-dark, 235 21% 11%)) 50%,\n hsl(var(--tn-bg, 233 23% 17%)) 75%,\n hsl(var(--tn-bg-dark, 235 21% 11%)) 100%\n )\n ",backgroundSize:"400% 400%",animation:"gradientShift 16s ease-in-out infinite",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",overflow:"hidden",borderRadius:"0",userSelect:"none"},children:[d.map(function(t){return e.jsxs("div",{style:{position:"absolute",left:"".concat(t.x,"px"),top:"".concat(t.y,"px"),transform:"translate(-50%, -50%)",pointerEvents:"none",zIndex:100,width:"40px",height:"40px"},children:[e.jsx("div",{style:{position:"absolute",top:"25%",left:"25%",width:"12px",height:"3px",backgroundColor:"#ffffff",transform:"translate(-50%, -50%) rotate(45deg)",animation:"hitmarkerFade45 0.6s ease-out forwards",boxShadow:"0 0 8px rgba(255, 255, 255, 0.8)",borderRadius:"1px"}}),e.jsx("div",{style:{position:"absolute",top:"25%",left:"75%",width:"12px",height:"3px",backgroundColor:"#ffffff",transform:"translate(-50%, -50%) rotate(-45deg)",animation:"hitmarkerFadeNeg45 0.6s ease-out forwards",boxShadow:"0 0 8px rgba(255, 255, 255, 0.8)",borderRadius:"1px"}}),e.jsx("div",{style:{position:"absolute",top:"75%",left:"25%",width:"12px",height:"3px",backgroundColor:"#ffffff",transform:"translate(-50%, -50%) rotate(-45deg)",animation:"hitmarkerFadeNeg45 0.6s ease-out forwards",boxShadow:"0 0 8px rgba(255, 255, 255, 0.8)",borderRadius:"1px"}}),e.jsx("div",{style:{position:"absolute",top:"75%",left:"75%",width:"12px",height:"3px",backgroundColor:"#ffffff",transform:"translate(-50%, -50%) rotate(45deg)",animation:"hitmarkerFade45 0.6s ease-out forwards",boxShadow:"0 0 8px rgba(255, 255, 255, 0.8)",borderRadius:"1px"}})]},t.id)}),S(Array(12)).map(function(t,n){return e.jsx("div",{style:{position:"absolute",left:"".concat(100*Math.random(),"%"),width:"".concat(4*Math.random()+2,"px"),height:"".concat(4*Math.random()+2,"px"),borderRadius:"50%",background:["#7aa2f7","#bb9af7","#9ece6a","#73daca","#7dcfff","#f7768e","#e0af68","#2ac3de"][n%8],opacity:0,animation:"floatUp ".concat(8+4*Math.random(),"s linear infinite"),animationDelay:"".concat(8*Math.random(),"s"),pointerEvents:"none"}},"particle-".concat(n))}),S(Array(8)).map(function(t,n){return e.jsx(F,{index:n},n)}),e.jsx(B,{containerRef:c,onHitmarker:function(e){if(c.current){var t=c.current.getBoundingClientRect(),n=e.clientX-t.left,r=e.clientY-t.top,a={id:Date.now()+Math.random(),x:n,y:r};f(function(e){return[].concat(S(e),[a])}),function(){try{var e=new Audio("data:audio/mpeg;base64,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");e.volume=.3,e.play().catch(function(){return O()})}catch(e){O()}}(),setTimeout(function(){f(function(e){return e.filter(function(e){return e.id!==a.id})})},600)}}}),e.jsx(q,{parentRef:c,scale:.08}),e.jsx(D,{status:r,message:o,percentage:i,error:s,onRetry:l}),e.jsx("div",{style:{position:"absolute",top:0,left:0,right:0,bottom:0,background:"\n radial-gradient(circle at 20% 80%, rgba(122, 162, 247, 0.03) 0%, transparent 50%),\n radial-gradient(circle at 80% 20%, rgba(187, 154, 247, 0.03) 0%, transparent 50%),\n radial-gradient(circle at 40% 40%, rgba(158, 206, 106, 0.02) 0%, transparent 50%)\n ",pointerEvents:"none"}})]})},V=function(t){var r=t.title,a=t.description,o=t.isVisible,i=t.className;return r||a?e.jsxs("div",{className:n.cn("fw-title-overlay absolute inset-x-0 top-0 z-20 pointer-events-none","bg-gradient-to-b from-black/70 via-black/40 to-transparent","px-4 py-3 transition-opacity duration-300",o?"opacity-100":"opacity-0",i),children:[r&&e.jsx("h2",{className:"text-white text-sm font-medium truncate max-w-[80%]",children:r}),a&&e.jsx("p",{className:"text-white/70 text-xs mt-0.5 line-clamp-2 max-w-[70%]",children:a})]}):null},U=function(t){var r,a,o,i,s,l,c,u,d,f,v,m,h,p=t.isOpen,C=t.onClose,g=t.metadata,x=t.streamState,b=t.quality,w=t.videoElement,y=t.protocol,k=t.nodeId,A=t.geoDistance;if(!p)return null;var j,N,S=w,L=S?"".concat(S.videoWidth,"x").concat(S.videoHeight):"—",E=S&&S.buffered.length>0?(S.buffered.end(S.buffered.length-1)-S.currentTime).toFixed(1):"—",M=null!==(r=null==S||null===(a=S.playbackRate)||void 0===a?void 0:a.toFixed(2))&&void 0!==r?r:"1.00",T=null!==(o=null==b||null===(i=b.score)||void 0===i?void 0:i.toFixed(0))&&void 0!==o?o:"—",I=null!=b&&b.bitrate?"".concat((b.bitrate/1e3).toFixed(0)," kbps"):"—",q=null!==(s=null==b||null===(l=b.frameDropRate)||void 0===l?void 0:l.toFixed(1))&&void 0!==s?s:"—",R=null!==(c=null==b?void 0:b.stallCount)&&void 0!==c?c:0,F=null!=b&&b.latency?"".concat(Math.round(b.latency)," ms"):"—",B=null!==(u=null==g?void 0:g.viewers)&&void 0!==u?u:"—",P=null!==(d=null!==(f=null==x?void 0:x.status)&&void 0!==f?f:null==g?void 0:g.status)&&void 0!==d?d:"—",D=null!==(v=null==g?void 0:g.mist)&&void 0!==v?v:null==x?void 0:x.streamInfo,O=null!==(m=null==D?void 0:D.type)&&void 0!==m?m:"—",z=null==D||null===(h=D.meta)||void 0===h?void 0:h.buffer_window,V=null==D?void 0:D.lastms,U=null==D?void 0:D.unixoffset,W=[{label:"Resolution",value:L},{label:"Buffer",value:"".concat(E,"s")},{label:"Latency",value:F},{label:"Bitrate",value:I},{label:"Quality Score",value:"".concat(T,"/100")},{label:"Frame Drop Rate",value:"".concat(q,"%")},{label:"Stalls",value:String(R)},{label:"Playback Rate",value:"".concat(M,"x")},{label:"Protocol",value:null!=y?y:"—"},{label:"Node",value:null!=k?k:"—"},{label:"Geo Distance",value:A?"".concat(A.toFixed(0)," km"):"—"},{label:"Viewers",value:String(B)},{label:"Status",value:P},{label:"Tracks",value:(N=null!==(j=null==g?void 0:g.tracks)&&void 0!==j?j:function(){var e,t=null==D||null===(e=D.meta)||void 0===e?void 0:e.tracks;if(t)return Object.values(t).map(function(e){return{type:e.type,codec:e.codec,width:e.width,height:e.height,bitrate:"number"==typeof e.bps?Math.round(e.bps):void 0,fps:"number"==typeof e.fpks?e.fpks/1e3:void 0,channels:e.channels,sampleRate:e.rate}})}(),null!=N&&N.length?N.map(function(e){var t;if("video"===e.type){var n,r=e.width&&e.height?"".concat(e.width,"x").concat(e.height):"?",a=e.bitrate?"".concat(Math.round(e.bitrate/1e3),"kbps"):"?";return"".concat(null!==(n=e.codec)&&void 0!==n?n:"?"," ").concat(r,"@").concat(a)}var o=e.channels?"".concat(e.channels,"ch"):"?";return"".concat(null!==(t=e.codec)&&void 0!==t?t:"?"," ").concat(o)}).join(", "):"—")},{label:"Mist Type",value:O},{label:"Mist Buffer Window",value:null!=z?String(z):"—"},{label:"Mist Lastms",value:null!=V?String(V):"—"},{label:"Mist Unixoffset",value:null!=U?String(U):"—"}];if(null!=g&&g.title&&W.unshift({label:"Title",value:g.title}),null!=g&&g.durationSeconds){var Q=Math.floor(g.durationSeconds/60),Y=g.durationSeconds%60;W.push({label:"Duration",value:"".concat(Q,":").concat(String(Y).padStart(2,"0"))})}if(null!=g&&g.recordingSizeBytes){var J=(g.recordingSizeBytes/1048576).toFixed(1);W.push({label:"Size",value:"".concat(J," MB")})}return e.jsxs("div",{className:n.cn("fw-stats-panel absolute top-2 right-2 z-30","bg-black border border-white/10 rounded","text-white text-xs font-mono","max-w-[320px] max-h-[80%] overflow-auto","shadow-lg"),style:{backgroundColor:"#000000"},children:[e.jsxs("div",{className:"flex items-center justify-between px-3 py-2 border-b border-white/10",children:[e.jsx("span",{className:"text-white/70 text-[10px] uppercase tracking-wider",children:"Stats Overlay"}),e.jsx("button",{type:"button",onClick:C,className:"text-white/50 hover:text-white transition-colors p-1 -mr-1","aria-label":"Close stats panel",children:e.jsx("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",stroke:"currentColor",strokeWidth:"1.5",children:e.jsx("path",{d:"M2 2l8 8M10 2l-8 8"})})})]}),e.jsx("div",{className:"px-3 py-2 space-y-1",children:W.map(function(t){var n=t.label,r=t.value;return e.jsxs("div",{className:"flex justify-between gap-4",children:[e.jsx("span",{className:"text-white/50 shrink-0",children:n}),e.jsx("span",{className:"text-white/90 truncate text-right",children:r})]},n)})})]})},W=["enabled","onStateChange","onStreamStateChange","onError","onReady"],Q={state:"booting",streamState:null,endpoints:null,metadata:null,videoElement:null,currentTime:0,duration:NaN,isPlaying:!1,isPaused:!0,isBuffering:!1,isMuted:!0,volume:1,error:null,isPassiveError:!1,hasPlaybackStarted:!1,isHoldingSpeed:!1,holdSpeed:2,isHovering:!1,shouldShowControls:!1,isLoopEnabled:!1,isFullscreen:!1,isPiPActive:!1,isEffectivelyLive:!1,shouldShowIdleScreen:!0,currentPlayerInfo:null,currentSourceInfo:null,playbackQuality:null,subtitlesEnabled:!1,qualities:[],textTracks:[],streamInfo:null};function Y(e){var r=e.enabled,a=void 0===r||r,o=e.onStateChange,i=e.onStreamStateChange,s=e.onError,l=e.onReady,c=w(e,W),u=t.useRef(null),d=t.useRef(null),f=N(t.useState(Q),2),v=f[0],h=f[1],p=t.useRef(c);p.current=c,t.useEffect(function(){if(a){var e=u.current;if(e){var t=new n.PlayerController({contentId:p.current.contentId,contentType:p.current.contentType,endpoints:p.current.endpoints,gatewayUrl:p.current.gatewayUrl,mistUrl:p.current.mistUrl,authToken:p.current.authToken,autoplay:p.current.autoplay,muted:p.current.muted,controls:p.current.controls,poster:p.current.poster,debug:p.current.debug});d.current=t;var r=[];return r.push(t.on("stateChange",function(e){var t=e.state;h(function(e){return b(b({},e),{},{state:t})}),null==o||o(t)})),r.push(t.on("streamStateChange",function(e){var n=e.state;h(function(e){return b(b({},e),{},{streamState:n,metadata:t.getMetadata(),isEffectivelyLive:t.isEffectivelyLive(),shouldShowIdleScreen:t.shouldShowIdleScreen()})}),null==i||i(n)})),r.push(t.on("timeUpdate",function(e){var t=e.currentTime,n=e.duration;h(function(e){return b(b({},e),{},{currentTime:t,duration:n})})})),r.push(t.on("error",function(e){var n=e.error;h(function(e){return b(b({},e),{},{error:n,isPassiveError:t.isPassiveError()})}),null==s||s(n)})),r.push(t.on("errorCleared",function(){h(function(e){return b(b({},e),{},{error:null,isPassiveError:!1})})})),r.push(t.on("ready",function(e){var n=e.videoElement;h(function(e){return b(b({},e),{},{videoElement:n,endpoints:t.getEndpoints(),metadata:t.getMetadata(),streamInfo:t.getStreamInfo(),isEffectivelyLive:t.isEffectivelyLive(),shouldShowIdleScreen:t.shouldShowIdleScreen(),currentPlayerInfo:t.getCurrentPlayerInfo(),currentSourceInfo:t.getCurrentSourceInfo(),qualities:t.getQualities()})}),null==l||l(n);var a=function(){var e,t;null!==(e=d.current)&&void 0!==e&&null!==(t=e.shouldSuppressVideoEvents)&&void 0!==t&&t.call(e)||function(){if(d.current){var e=d.current;h(function(t){return b(b({},t),{},{isPlaying:e.isPlaying(),isPaused:e.isPaused(),isBuffering:e.isBuffering(),isMuted:e.isMuted(),volume:e.getVolume(),hasPlaybackStarted:e.hasPlaybackStarted(),shouldShowControls:e.shouldShowControls(),shouldShowIdleScreen:e.shouldShowIdleScreen(),playbackQuality:e.getPlaybackQuality(),isLoopEnabled:e.isLoopEnabled(),subtitlesEnabled:e.isSubtitlesEnabled(),qualities:e.getQualities(),streamInfo:e.getStreamInfo()})})}}()};n.addEventListener("play",a),n.addEventListener("pause",a),n.addEventListener("waiting",a),n.addEventListener("playing",a),r.push(function(){n.removeEventListener("play",a),n.removeEventListener("pause",a),n.removeEventListener("waiting",a),n.removeEventListener("playing",a)})})),r.push(t.on("playerSelected",function(e){e.player;var n=e.source;h(function(e){return b(b({},e),{},{currentPlayerInfo:t.getCurrentPlayerInfo(),currentSourceInfo:{url:n.url,type:n.type},qualities:t.getQualities()})})})),r.push(t.on("volumeChange",function(e){var t=e.volume,n=e.muted;h(function(e){return b(b({},e),{},{volume:t,isMuted:n})})})),r.push(t.on("loopChange",function(e){var t=e.isLoopEnabled;h(function(e){return b(b({},e),{},{isLoopEnabled:t})})})),r.push(t.on("fullscreenChange",function(e){var t=e.isFullscreen;h(function(e){return b(b({},e),{},{isFullscreen:t})})})),r.push(t.on("pipChange",function(e){var t=e.isPiP;h(function(e){return b(b({},e),{},{isPiPActive:t})})})),r.push(t.on("holdSpeedStart",function(e){var t=e.speed;h(function(e){return b(b({},e),{},{isHoldingSpeed:!0,holdSpeed:t})})})),r.push(t.on("holdSpeedEnd",function(){h(function(e){return b(b({},e),{},{isHoldingSpeed:!1})})})),r.push(t.on("hoverStart",function(){h(function(e){return b(b({},e),{},{isHovering:!0,shouldShowControls:!0})})})),r.push(t.on("hoverEnd",function(){h(function(e){return b(b({},e),{},{isHovering:!1,shouldShowControls:t.shouldShowControls()})})})),r.push(t.on("captionsChange",function(e){var t=e.enabled;h(function(e){return b(b({},e),{},{subtitlesEnabled:t})})})),t.attach(e).catch(function(e){console.warn("[usePlayerController] Attach failed:",e)}),h(function(e){return b(b({},e),{},{isLoopEnabled:t.isLoopEnabled()})}),function(){r.forEach(function(e){return e()}),t.destroy(),d.current=null,h(Q)}}}},[a,e.contentId,e.contentType]);var C=t.useCallback(m(y().m(function e(){var t;return y().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,null===(t=d.current)||void 0===t?void 0:t.play();case 1:return e.a(2)}},e)})),[]),g=t.useCallback(function(){var e;null===(e=d.current)||void 0===e||e.pause()},[]),x=t.useCallback(function(){var e;null===(e=d.current)||void 0===e||e.togglePlay()},[]),k=t.useCallback(function(e){var t;null===(t=d.current)||void 0===t||t.seek(e)},[]),A=t.useCallback(function(e){var t;null===(t=d.current)||void 0===t||t.seekBy(e)},[]),j=t.useCallback(function(e){var t;null===(t=d.current)||void 0===t||t.setVolume(e)},[]),S=t.useCallback(function(){var e;null===(e=d.current)||void 0===e||e.toggleMute()},[]),L=t.useCallback(function(){var e;null===(e=d.current)||void 0===e||e.toggleLoop()},[]),E=t.useCallback(m(y().m(function e(){var t;return y().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,null===(t=d.current)||void 0===t?void 0:t.toggleFullscreen();case 1:return e.a(2)}},e)})),[]),M=t.useCallback(m(y().m(function e(){var t;return y().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,null===(t=d.current)||void 0===t?void 0:t.togglePictureInPicture();case 1:return e.a(2)}},e)})),[]),T=t.useCallback(function(){var e;null===(e=d.current)||void 0===e||e.toggleSubtitles()},[]),I=t.useCallback(function(){var e;null===(e=d.current)||void 0===e||e.clearError(),h(function(e){return b(b({},e),{},{error:null,isPassiveError:!1})})},[]),q=t.useCallback(function(){var e;null===(e=d.current)||void 0===e||e.jumpToLive()},[]),R=t.useCallback(m(y().m(function e(){var t;return y().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,null===(t=d.current)||void 0===t?void 0:t.retry();case 1:return e.a(2)}},e)})),[]),F=t.useCallback(m(y().m(function e(){var t;return y().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,null===(t=d.current)||void 0===t?void 0:t.reload();case 1:return e.a(2)}},e)})),[]),B=t.useCallback(function(){var e,t;return null!==(e=null===(t=d.current)||void 0===t?void 0:t.getQualities())&&void 0!==e?e:[]},[]),P=t.useCallback(function(e){var t;null===(t=d.current)||void 0===t||t.selectQuality(e)},[]),D=t.useCallback(function(){var e;null===(e=d.current)||void 0===e||e.handleMouseEnter()},[]),O=t.useCallback(function(){var e;null===(e=d.current)||void 0===e||e.handleMouseLeave()},[]),z=t.useCallback(function(){var e;null===(e=d.current)||void 0===e||e.handleMouseMove()},[]),V=t.useCallback(function(){var e;null===(e=d.current)||void 0===e||e.handleTouchStart()},[]),U=t.useCallback(function(){var e=m(y().m(function e(t){var n;return y().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,null===(n=d.current)||void 0===n?void 0:n.setDevModeOptions(t);case 1:return e.a(2)}},e)}));return function(t){return e.apply(this,arguments)}}(),[]);return{containerRef:u,state:v,controller:d.current,play:C,pause:g,togglePlay:x,seek:k,seekBy:A,jumpToLive:q,setVolume:j,toggleMute:S,toggleLoop:L,toggleFullscreen:E,togglePiP:M,toggleSubtitles:T,clearError:I,retry:R,reload:F,getQualities:B,selectQuality:P,handleMouseEnter:D,handleMouseLeave:O,handleMouseMove:z,handleTouchStart:V,setDevModeOptions:U}}var J=t.createContext(null);function G(){return t.useContext(J)}var H=["className","trackClassName","thumbClassName","showTrack","hoverThumb","accentColor","orientation"],Z=c.forwardRef(function(t,r){var a=t.className,o=t.trackClassName,i=t.thumbClassName,s=t.showTrack,l=void 0===s||s;t.hoverThumb;var c=t.accentColor,d=void 0!==c&&c,f=t.orientation,v=void 0===f?"horizontal":f,m=w(t,H),h=d?"bg-[hsl(var(--tn-cyan,195_100%_50%))]":"bg-white/90",p=d?"bg-[hsl(var(--tn-cyan,195_100%_50%))]":"bg-white";return e.jsxs(u.Root,b(b({ref:r,orientation:v,className:n.cn("group relative flex touch-none select-none items-center cursor-pointer","horizontal"===v?"w-full h-5":"h-full flex-col w-5",a)},m),{},{children:[l&&e.jsx(u.Track,{className:n.cn("absolute rounded-full bg-white/30 transition-all duration-150","horizontal"===v?"inset-x-0 h-1 group-hover:h-1.5":"inset-y-0 w-1 group-hover:w-1.5",o),children:e.jsx(u.Range,{className:n.cn("absolute rounded-full transition-all duration-150","horizontal"===v?"h-full":"w-full bottom-0",h)})}),e.jsx(u.Thumb,{className:n.cn("block rounded-full border-0 cursor-pointer shadow-md transition-all duration-150","w-2.5 h-2.5 group-hover:w-3.5 group-hover:h-3.5","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-white/50","disabled:pointer-events-none disabled:opacity-50",p,i)})]}))});Z.displayName=u.Root.displayName;var X=function(r){var a=r.currentTime,o=r.duration,i=r.buffered,s=r.disabled,l=void 0!==s&&s,c=r.onSeek,u=r.className,d=r.isLive,f=void 0!==d&&d,v=r.seekableStart,m=void 0===v?0:v,h=r.liveEdge,p=r.commitOnRelease,C=void 0!==p&&p,g=t.useRef(null),x=N(t.useState(!1),2),b=x[0],w=x[1],y=N(t.useState(!1),2),k=y[0],A=y[1],j=N(t.useState(null),2),S=j[0],L=j[1],E=t.useRef(null),M=N(t.useState(0),2),T=M[0],I=M[1],q=N(t.useState(0),2),R=q[0],F=q[1],B=null!=h?h:o,P=B-m,D=null!=S?S:a,O=t.useMemo(function(){if(f&&P>0){var e=D-m;return Math.min(100,Math.max(0,e/P*100))}return!Number.isFinite(o)||o<=0?0:Math.min(100,Math.max(0,D/o*100))},[D,o,f,m,P]),z=t.useMemo(function(){if(!i||0===i.length)return[];var e=f?m:0,t=(f?B:o)-e;if(!Number.isFinite(t)||t<=0)return[];for(var n=[],r=0;r<i.length;r++){var a=i.start(r)-e,s=i.end(r)-e;n.push({startPercent:Math.min(100,Math.max(0,a/t*100)),endPercent:Math.min(100,Math.max(0,s/t*100))})}return n},[i,o,f,m,B]),V=t.useCallback(function(e){if(!Number.isFinite(e)||e<0)return"0:00";var t=Math.floor(e),n=Math.floor(t/3600),r=Math.floor(t%3600/60),a=t%60;return n>0?"".concat(n,":").concat(String(r).padStart(2,"0"),":").concat(String(a).padStart(2,"0")):"".concat(r,":").concat(String(a).padStart(2,"0"))},[]),U=t.useCallback(function(e,t){var n=t-e;if(n<1)return"LIVE";var r=Math.floor(n),a=Math.floor(r/3600),o=Math.floor(r%3600/60),i=r%60;return a>0?"-".concat(a,":").concat(String(o).padStart(2,"0"),":").concat(String(i).padStart(2,"0")):"-".concat(o,":").concat(String(i).padStart(2,"0"))},[]),W=t.useCallback(function(e){if(!g.current)return 0;var t=g.current.getBoundingClientRect(),n=e-t.left,r=Math.min(1,Math.max(0,n/t.width));if(f&&Number.isFinite(P)&&P>0)return m+r*P;if(Number.isFinite(o)&&o>0)return r*o;if(void 0!==h&&Number.isFinite(h)&&h>0){var i=Number.isFinite(m)?m:0,s=h-i;if(s>0)return i+r*s}return r*(a||1)},[o,f,m,P,h,a]),Q=t.useCallback(function(e){if(g.current&&!l){var t=g.current.getBoundingClientRect(),n=e.clientX-t.left,r=Math.min(1,Math.max(0,n/t.width));I(100*r),F(W(e.clientX))}},[l,W]),Y=t.useCallback(function(e){if(!l&&(f||Number.isFinite(o))){var t=W(e.clientX);null==c||c(t),L(null),E.current=null}},[l,o,f,W,c]),J=t.useCallback(function(e){if(!l&&(f||Number.isFinite(o))){e.preventDefault(),A(!0);var t=function(e){var t=W(e.clientX);C?(L(t),E.current=t):null==c||c(t)},n=function(){A(!1),document.removeEventListener("mousemove",t),document.removeEventListener("mouseup",n);var e=E.current;C&&null!==e&&(null==c||c(e),L(null),E.current=null)};document.addEventListener("mousemove",t),document.addEventListener("mouseup",n);var r=W(e.clientX);C?(L(r),E.current=r):null==c||c(r)}},[l,o,f,W,c,C]),G=b||k,H=f?P>0:Number.isFinite(o);return e.jsxs("div",{ref:g,className:n.cn("group relative w-full h-6 flex items-center cursor-pointer",l&&"opacity-50 cursor-not-allowed",u),onMouseEnter:function(){return!l&&w(!0)},onMouseLeave:function(){w(!1),A(!1)},onMouseMove:Q,onClick:Y,onMouseDown:J,role:"slider","aria-label":"Seek","aria-valuemin":f?m:0,"aria-valuemax":f?B:o||100,"aria-valuenow":D,"aria-valuetext":f?U(D,B):V(D),tabIndex:l?-1:0,children:[e.jsxs("div",{className:n.cn("fw-seek-track",k&&"fw-seek-track--active"),children:[z.map(function(t,n){return e.jsx("div",{className:"fw-seek-buffered",style:{left:"".concat(t.startPercent,"%"),width:"".concat(t.endPercent-t.startPercent,"%")}},n)}),e.jsx("div",{className:"fw-seek-progress",style:{width:"".concat(O,"%")}})]}),e.jsx("div",{className:n.cn("fw-seek-thumb",G?"fw-seek-thumb--active":"fw-seek-thumb--hidden"),style:{left:"".concat(O,"%")}}),b&&!k&&H&&e.jsx("div",{className:"fw-seek-tooltip",style:{left:"".concat(T,"%")},children:f?U(R,B):V(R)})]})},K=["isPlaying"],_=["isMuted"],$=["isFullscreen"],ee=function(t){var n=t.size,r=void 0===n?16:n,a=t.color,o=void 0===a?"currentColor":a,i=t.className,s=void 0===i?"":i;return e.jsx("svg",{width:r,height:r,viewBox:"0 0 24 24",fill:"none",className:s,"aria-hidden":"true",children:e.jsx("path",{d:"M8 5v14l11-7z",fill:o})})},te=function(t){var n=t.size,r=void 0===n?16:n,a=t.color,o=void 0===a?"currentColor":a,i=t.className,s=void 0===i?"":i;return e.jsxs("svg",{width:r,height:r,viewBox:"0 0 24 24",fill:"none",className:s,"aria-hidden":"true",children:[e.jsx("rect",{x:"6",y:"4",width:"4",height:"16",fill:o}),e.jsx("rect",{x:"14",y:"4",width:"4",height:"16",fill:o})]})},ne=function(t){var n=t.size,r=void 0===n?16:n,a=t.color,o=void 0===a?"currentColor":a,i=t.className,s=void 0===i?"":i;return e.jsxs("svg",{width:r,height:r,viewBox:"0 0 24 24",fill:"none",className:s,"aria-hidden":"true",children:[e.jsx("path",{d:"M12 5V1L7 6l5 5V7c3.31 0 6 2.69 6 6s-2.69 6-6 6-6-2.69-6-6H4c0 4.42 3.58 8 8 8s8-3.58 8-8-3.58-8-8-8z",fill:o}),e.jsx("text",{x:"12",y:"15",fontSize:"7",fontWeight:"bold",fill:o,textAnchor:"middle",children:"10"})]})},re=function(t){var n=t.size,r=void 0===n?16:n,a=t.color,o=void 0===a?"currentColor":a,i=t.className,s=void 0===i?"":i;return e.jsxs("svg",{width:r,height:r,viewBox:"0 0 24 24",fill:"none",className:s,"aria-hidden":"true",children:[e.jsx("path",{d:"M12 5V1l5 5-5 5V7c-3.31 0-6 2.69-6 6s2.69 6 6 6 6-2.69 6-6h2c0 4.42-3.58 8-8 8s-8-3.58-8-8 3.58-8 8-8z",fill:o}),e.jsx("text",{x:"12",y:"15",fontSize:"7",fontWeight:"bold",fill:o,textAnchor:"middle",children:"10"})]})},ae=function(t){var n=t.size,r=void 0===n?16:n,a=t.color,o=void 0===a?"currentColor":a,i=t.className,s=void 0===i?"":i;return e.jsxs("svg",{width:r,height:r,viewBox:"0 0 24 24",fill:"none",className:s,"aria-hidden":"true",children:[e.jsx("polygon",{points:"11,5 6,9 2,9 2,15 6,15 11,19",fill:o}),e.jsx("path",{d:"M19.07 4.93a10 10 0 0 1 0 14.14M15.54 8.46a5 5 0 0 1 0 7.07",stroke:o,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})]})},oe=function(t){var n=t.size,r=void 0===n?16:n,a=t.color,o=void 0===a?"currentColor":a,i=t.className,s=void 0===i?"":i;return e.jsxs("svg",{width:r,height:r,viewBox:"0 0 24 24",fill:"none",className:s,"aria-hidden":"true",children:[e.jsx("polygon",{points:"11,5 6,9 2,9 2,15 6,15 11,19",fill:o}),e.jsx("line",{x1:"23",y1:"9",x2:"17",y2:"15",stroke:o,strokeWidth:"2",strokeLinecap:"round"}),e.jsx("line",{x1:"17",y1:"9",x2:"23",y2:"15",stroke:o,strokeWidth:"2",strokeLinecap:"round"})]})},ie=function(t){var n=t.size,r=void 0===n?16:n,a=t.color,o=void 0===a?"currentColor":a,i=t.className,s=void 0===i?"":i;return e.jsx("svg",{width:r,height:r,viewBox:"0 0 24 24",fill:"none",className:s,"aria-hidden":"true",children:e.jsx("path",{d:"M8 3H5a2 2 0 0 0-2 2v3m18 0V5a2 2 0 0 0-2-2h-3M3 16v3a2 2 0 0 0 2 2h3m8 0h3a2 2 0 0 0 2-2v-3",stroke:o,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})})},se=function(t){var n=t.size,r=void 0===n?16:n,a=t.color,o=void 0===a?"currentColor":a,i=t.className,s=void 0===i?"":i;return e.jsx("svg",{width:r,height:r,viewBox:"0 0 24 24",fill:"none",className:s,"aria-hidden":"true",children:e.jsx("path",{d:"M8 3v3a2 2 0 0 1-2 2H3M21 8h-3a2 2 0 0 1-2-2V3M3 16h3a2 2 0 0 1 2 2v3M16 21v-3a2 2 0 0 1 2-2h3",stroke:o,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})})},le=function(t){var n=t.size,r=void 0===n?16:n,a=t.color,o=void 0===a?"currentColor":a,i=t.className,s=void 0===i?"":i;return e.jsxs("svg",{width:r,height:r,viewBox:"0 0 24 24",fill:"none",className:s,"aria-hidden":"true",children:[e.jsx("rect",{x:"2",y:"3",width:"20",height:"14",rx:"2",ry:"2",stroke:o,strokeWidth:"2",fill:"none"}),e.jsx("rect",{x:"8",y:"10",width:"10",height:"6",rx:"1",ry:"1",fill:o})]})},ce=function(t){var n=t.size,r=void 0===n?16:n,a=t.color,o=void 0===a?"currentColor":a,i=t.className,s=void 0===i?"":i;return e.jsxs("svg",{width:r,height:r,viewBox:"0 0 24 24",fill:"none",className:s,"aria-hidden":"true",children:[e.jsx("path",{d:"M12 15a3 3 0 1 0 0-6 3 3 0 0 0 0 6Z",stroke:o,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),e.jsx("path",{d:"M19.4 15a1.65 1.65 0 0 0 .33 1.82l.06.06a2 2 0 0 1 0 2.83 2 2 0 0 1-2.83 0l-.06-.06a1.65 1.65 0 0 0-1.82-.33 1.65 1.65 0 0 0-1 1.51V21a2 2 0 0 1-2 2 2 2 0 0 1-2-2v-.09A1.65 1.65 0 0 0 9 19.4a1.65 1.65 0 0 0-1.82.33l-.06.06a2 2 0 0 1-2.83 0 2 2 0 0 1 0-2.83l.06-.06a1.65 1.65 0 0 0 .33-1.82 1.65 1.65 0 0 0-1.51-1H3a2 2 0 0 1-2-2 2 2 0 0 1 2-2h.09A1.65 1.65 0 0 0 4.6 9a1.65 1.65 0 0 0-.33-1.82l-.06-.06a2 2 0 0 1 0-2.83 2 2 0 0 1 2.83 0l.06.06a1.65 1.65 0 0 0 1.82.33H9a1.65 1.65 0 0 0 1-1.51V3a2 2 0 0 1 2-2 2 2 0 0 1 2 2v.09a1.65 1.65 0 0 0 1 1.51 1.65 1.65 0 0 0 1.82-.33l.06-.06a2 2 0 0 1 2.83 0 2 2 0 0 1 0 2.83l-.06.06a1.65 1.65 0 0 0-.33 1.82V9a1.65 1.65 0 0 0 1.51 1H21a2 2 0 0 1 2 2 2 2 0 0 1-2 2h-.09a1.65 1.65 0 0 0-1.51 1Z",stroke:o,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})]})},ue=function(t){var n=t.isPlaying,r=w(t,K);return n?e.jsx(te,b({},r)):e.jsx(ee,b({},r))},de=function(t){var n=t.isMuted,r=w(t,_);return n?e.jsx(oe,b({},r)):e.jsx(ae,b({},r))},fe=function(t){var n=t.isFullscreen,r=w(t,$);return n?e.jsx(se,b({},r)):e.jsx(ie,b({},r))},ve=function(t){var n=t.size,r=void 0===n?16:n,a=t.color,o=void 0===a?"currentColor":a,i=t.className,s=void 0===i?"":i;return e.jsxs("svg",{width:r,height:r,viewBox:"0 0 24 24",fill:"none",className:s,"aria-hidden":"true",children:[e.jsx("rect",{x:"4",y:"13",width:"4",height:"7",fill:o}),e.jsx("rect",{x:"10",y:"9",width:"4",height:"11",fill:o}),e.jsx("rect",{x:"16",y:"4",width:"4",height:"16",fill:o})]})},me=function(t){var n=t.size,r=void 0===n?16:n,a=t.color,o=void 0===a?"currentColor":a,i=t.className,s=void 0===i?"":i;return e.jsxs("svg",{width:r,height:r,viewBox:"0 0 24 24",fill:"none",className:s,"aria-hidden":"true",children:[e.jsx("path",{d:"M5 5v14l11-7z",fill:o}),e.jsx("rect",{x:"17",y:"5",width:"3",height:"14",fill:o})]})},he=function(r){var a,o,i,s,l,c,u,d,f,v=r.currentTime,m=r.duration,h=r.isVisible,p=void 0===h||h;r._className;var C=r.onSeek,g=r.mistStreamInfo,x=r.disabled,b=void 0!==x&&x,w=r.playbackMode,y=void 0===w?"auto":w,k=r.onModeChange,A=r.sourceType,j=r.isContentLive,L=r.videoElement,E=r.qualities,M=void 0===E?[]:E,T=r.onSelectQuality,I=r.isMuted,q=r.volume,R=r.onVolumeChange,F=r.onToggleMute,B=r.isPlaying,P=r.onTogglePlay,D=r.onToggleFullscreen,O=r.isFullscreen;r.isLoopEnabled,r.onToggleLoop;var z=r.onJumpToLive,V=G(),U=null==V||null===(a=V.state)||void 0===a?void 0:a.videoElement,W=null==V?void 0:V.controller,Q=N(t.useState(null),2),Y=Q[0],J=Q[1],H=t.useRef(null),K=t.useCallback(function(){var e,t,n;return L||U||(null!=W&&null!==(e=W.getVideoElement)&&void 0!==e&&e.call(W)?W.getVideoElement():null!==(t=null!==(n=document.querySelector(".fw-player-video"))&&void 0!==n?n:document.querySelector('[data-player-container="true"] video'))&&void 0!==t?t:document.querySelector(".fw-player-container video"))},[L,U,W]);t.useEffect(function(){var e;return(e=K())&&e!==Y&&J(e),Y||(H.current=setInterval(function(){var e=K();e&&(J(e),H.current&&(clearInterval(H.current),H.current=null))},100),setTimeout(function(){H.current&&(clearInterval(H.current),H.current=null)},5e3)),function(){H.current&&(clearInterval(H.current),H.current=null)}},[U,W,K,Y]);var _=null==g||null===(o=g.meta)||void 0===o?void 0:o.tracks,$=t.useMemo(function(){var e;if(M&&M.length>0)return M;var t=null==W||null===(e=W.getQualities)||void 0===e?void 0:e.call(W);return t&&t.length>0?t:_?Object.entries(_).filter(function(e){return"video"===N(e,2)[1].type}).map(function(e){var t=N(e,2),n=t[0],r=t[1];return{id:n,label:r.height?"".concat(r.height,"p"):r.codec,width:r.width,height:r.height,bitrate:r.bps}}).sort(function(e,t){return(t.height||0)-(e.height||0)}):[]},[M,W,_]),ee=null!==(i=null==W||null===(s=W.getTextTracks)||void 0===s?void 0:s.call(W))&&void 0!==i?i:[],te=N(t.useState(!1),2),ae=te[0],oe=te[1],ie=N(t.useState(!1),2),se=ie[0],le=ie[1],ve=N(t.useState(!1),2),he=ve[0],pe=ve[1],Ce=N(t.useState(!0),2),ge=Ce[0],xe=Ce[1],be=N(t.useState(void 0),2),we=be[0],ye=be[1],ke=N(t.useState(function(){return Y?Math.round(100*Y.volume):100}),2),Ae=ke[0],je=ke[1],Ne=N(t.useState(function(){var e;return null!==(e=null==Y?void 0:Y.playbackRate)&&void 0!==e?e:1}),2),Se=Ne[0],Le=Ne[1],Ee=null!=B?B:ae,Me=null!=I?I:se,Te=null!=O?O:he,Ie=void 0!==q?Math.round(100*q):Ae,qe=N(t.useState("auto"),2),Re=qe[0],Fe=qe[1],Be=N(t.useState("none"),2),Pe=Be[0],De=Be[1],Oe=N(t.useState(!1),2),ze=Oe[0],Ve=Oe[1],Ue=N(t.useState(!0),2),We=Ue[0],Qe=Ue[1];t.useEffect(function(){if(ze){var e=function(e){var t=e.target;t&&!t.closest(".fw-settings-menu")&&Ve(!1)},t=setTimeout(function(){window.addEventListener("click",e)},0);return function(){clearTimeout(t),window.removeEventListener("click",e)}}},[ze]);var Ye=t.useCallback(function(e){if(e){var t=Object.values(e);if(0!==t.length){var n=t.map(function(e){return e.firstms}).filter(function(e){return void 0!==e}),r=t.map(function(e){return e.lastms}).filter(function(e){return void 0!==e});if(0!==n.length&&0!==r.length){var a=Math.max.apply(Math,S(n)),o=Math.min.apply(Math,S(r))-a;if(Number.isFinite(o)&&!(o<=0))return o}}}},[]),Je=null!==(l=null==g||null===(c=g.meta)||void 0===c?void 0:c.buffer_window)&&void 0!==l?l:Ye(null==g||null===(u=g.meta)||void 0===u?void 0:u.tracks),Ge=t.useMemo(function(){return n.isLiveContent(j,g,m)},[j,g,m]),He=t.useMemo(function(){return n.isMediaStreamSource(Y)},[Y]),Ze=t.useMemo(function(){return n.supportsPlaybackRate(Y)},[Y]),Xe=n.isMediaStreamSource(Y)&&void 0!==Je&&Je>0&&"whep"!==A&&"webrtc"!==A,Ke=t.useMemo(function(){return n.calculateSeekableRange({isLive:Ge,video:Y,mistStreamInfo:g,currentTime:v,duration:m,allowMediaStreamDvr:Xe})},[Ge,Y,g,v,m,Xe]),_e=Ke.seekableStart,$e=Ke.liveEdge,et=null==W||null===(d=W.getSeekableStart)||void 0===d?void 0:d.call(W),tt=null==W||null===(f=W.getLiveEdge)||void 0===f?void 0:f.call(W),nt=Number.isFinite(et)&&Number.isFinite(tt)&&tt>=et&&(tt>0||et>0),rt=nt?et:_e,at=nt?tt:$e,ot=Ge&&Number.isFinite(at)&&Number.isFinite(rt)&&at>rt,it=Ge,st=t.useMemo(function(){return n.calculateLiveThresholds(A,He,Je)},[A,He,Je]),lt=t.useMemo(function(){return W&&"function"==typeof W.canSeekStream?W.canSeekStream():n.canSeekStream({video:Y,isLive:Ge,duration:m,bufferWindowMs:Je})},[Y,Ge,m,Je,W])&&(!Ge||ot);t.useEffect(function(){if(Ge){var e=n.calculateIsNearLive(v,at,st,We);e!==We&&Qe(e)}else Qe(!0)},[Ge,at,v,st,We]);var ct=t.useRef(!1);t.useEffect(function(){if(Y){var e=function(){return oe(!Y.paused)},t=function(){var e=Y.muted||0===Y.volume;le(e),je(Math.round(100*Y.volume))},n=function(){"undefined"!=typeof document&&pe(!!document.fullscreenElement)},r=function(){return Le(Y.playbackRate)};return e(),t(),n(),r(),Y.addEventListener("play",e),Y.addEventListener("pause",e),Y.addEventListener("playing",e),Y.addEventListener("volumechange",t),Y.addEventListener("ratechange",r),"undefined"!=typeof document&&document.addEventListener("fullscreenchange",n),function(){Y.removeEventListener("play",e),Y.removeEventListener("pause",e),Y.removeEventListener("playing",e),Y.removeEventListener("volumechange",t),Y.removeEventListener("ratechange",r),"undefined"!=typeof document&&document.removeEventListener("fullscreenchange",n)}}},[Y,Ge]),t.useEffect(function(){ct.current=!1},[Y]),t.useEffect(function(){var e=ee.find(function(e){return e.active});De(e?e.id:"none")},[ee]),t.useEffect(function(){if(Y){var e=function(){var e,t,n=null!==(e=null==W||null===(t=W.getBufferedRanges)||void 0===t?void 0:t.call(W))&&void 0!==e?e:Y.buffered;ye(n)};return e(),Y.addEventListener("progress",e),Y.addEventListener("loadeddata",e),function(){Y.removeEventListener("progress",e),Y.removeEventListener("loadeddata",e)}}},[Y]),t.useEffect(function(){if(Y){var e=function(){if(Y.srcObject instanceof MediaStream){var e=Y.srcObject.getAudioTracks();xe(e.length>0)}else{var t=Y;t.audioTracks&&void 0!==t.audioTracks.length?xe(t.audioTracks.length>0):xe(!0)}};return e(),Y.addEventListener("loadedmetadata",e),function(){return Y.removeEventListener("loadedmetadata",e)}}xe(!0)},[Y]);var ut=function(){var e,t,n;if(!b)if(F)F();else{var r=null!=Y?Y:document.querySelector(".fw-player-video");if(r){var a=!(null!==(e=null==W||null===(t=W.isMuted)||void 0===t?void 0:t.call(W))&&void 0!==e?e:r.muted);null==W||null===(n=W.setMuted)||void 0===n||n.call(W,a),r.muted=a,le(a),je(a?0:Math.round(100*r.volume))}}},dt=function(e){var t;b||(Fe(e),T?T(e):null==W||null===(t=W.selectQuality)||void 0===t||t.call(W,e))},ft=function(e){var t,n;b||(De(e),"none"===e?null==W||null===(t=W.selectTextTrack)||void 0===t||t.call(W,null):null==W||null===(n=W.selectTextTrack)||void 0===n||n.call(W,e))},vt=t.useMemo(function(){return n.formatTimeDisplay({isLive:Ge,currentTime:v,duration:m,liveEdge:at,seekableStart:rt,unixoffset:null==g?void 0:g.unixoffset})},[Ge,v,m,at,rt,null==g?void 0:g.unixoffset]),mt=N(t.useState(!1),2),ht=mt[0],pt=mt[1],Ct=N(t.useState(!1),2),gt=Ct[0],xt=Ct[1],bt=ht||gt;return e.jsx("div",{className:n.cn("fw-player-surface fw-controls-wrapper",p?"fw-controls-wrapper--visible":"fw-controls-wrapper--hidden"),children:e.jsxs("div",{className:"fw-control-bar pointer-events-auto",onClick:function(e){return e.stopPropagation()},children:[lt&&e.jsx("div",{className:"fw-seek-wrapper",children:e.jsx(X,{currentTime:v,duration:m,buffered:we,disabled:b,isLive:Ge,seekableStart:rt,liveEdge:at,commitOnRelease:it,onSeek:function(e){C?C(e):Y&&(Y.currentTime=e)}})}),e.jsxs("div",{className:"fw-controls-row",children:[e.jsxs("div",{className:"fw-controls-left",children:[e.jsxs("div",{className:"fw-control-group",children:[e.jsx("button",{type:"button",className:"fw-btn-flush","aria-label":Ee?"Pause":"Play",onClick:function(){var e,t,n;b||(P?P():(Y||W)&&(null===(e=null!==(t=null==W||null===(n=W.isPaused)||void 0===n?void 0:n.call(W))&&void 0!==t?t:null==Y?void 0:Y.paused)||void 0===e||e?null!=W&&W.play?W.play().catch(function(){}):Y&&Y.play().catch(function(){}):null!=W&&W.pause?W.pause():Y&&Y.pause()))},children:e.jsx(ue,{isPlaying:Ee,size:18})}),lt&&e.jsxs(e.Fragment,{children:[e.jsx("button",{type:"button",className:"fw-btn-flush hidden sm:flex","aria-label":"Skip back 10 seconds",onClick:function(){var e=Math.max(0,v-10);if(C)C(e);else{var t=K();t&&(t.currentTime=e)}},children:e.jsx(ne,{size:16})}),e.jsx("button",{type:"button",className:"fw-btn-flush hidden sm:flex","aria-label":"Skip forward 10 seconds",onClick:function(){var e=Number.isFinite(m)?m:v+10,t=Math.min(e,v+10);if(C)C(t);else{var n=K();n&&(n.currentTime=t)}},children:e.jsx(re,{size:16})})]})]}),e.jsxs("div",{className:n.cn("fw-volume-group",bt&&"fw-volume-group--expanded",!ge&&"fw-volume-group--disabled"),onMouseEnter:function(){return ge&&pt(!0)},onMouseLeave:function(){pt(!1),xt(!1)},onFocusCapture:function(){return ge&&xt(!0)},onBlurCapture:function(e){e.currentTarget.contains(e.relatedTarget)||xt(!1)},onClick:function(e){ge&&e.target===e.currentTarget&&ut()},children:[e.jsx("button",{type:"button",className:"fw-volume-btn","aria-label":ge?Me?"Unmute":"Mute":"No audio",onClick:ge?ut:void 0,disabled:!ge,children:e.jsx(de,{isMuted:Me||!ge,size:16})}),e.jsx("div",{className:n.cn("fw-volume-slider-wrapper",bt?"fw-volume-slider-wrapper--expanded":"fw-volume-slider-wrapper--collapsed"),children:e.jsx(Z,{orientation:"horizontal","aria-label":"Volume",max:100,step:1,value:[Ie],onValueChange:function(e){var t;if(!b){var n=Math.max(0,Math.min(100,null!==(t=e[0])&&void 0!==t?t:0));if(R)R(n/100);else{var r=null!=Y?Y:document.querySelector(".fw-player-video");r&&(r.volume=n/100,r.muted=0===n,je(n),le(0===n))}}},className:"w-full",disabled:!ge})})]}),e.jsx("div",{className:"fw-control-group",children:e.jsx("span",{className:"fw-time-display",children:vt})}),Ge&&e.jsx("div",{className:"fw-control-group",children:e.jsxs("button",{type:"button",onClick:function(){var e;b||(z?z():null==W||null===(e=W.jumpToLive)||void 0===e||e.call(W))},disabled:!ot||We,className:n.cn("fw-live-badge",!ot||We?"fw-live-badge--active":"fw-live-badge--behind"),title:ot?We?"At live edge":"Jump to live":"Live only",children:["LIVE",!We&&ot&&e.jsx(me,{size:10})]})})]}),e.jsxs("div",{className:"fw-controls-right",children:[e.jsxs("div",{className:"fw-control-group relative",children:[e.jsx("button",{type:"button",className:n.cn("fw-btn-flush group",ze&&"fw-btn-flush--active"),"aria-label":"Settings",title:"Settings",onClick:function(){return Ve(!ze)},children:e.jsx(ce,{size:16,className:"transition-transform group-hover:rotate-90"})}),ze&&e.jsxs("div",{className:"fw-player-surface fw-settings-menu",children:[k&&!1!==j&&e.jsxs("div",{className:"fw-settings-section",children:[e.jsx("div",{className:"fw-settings-label",children:"Mode"}),e.jsx("div",{className:"fw-settings-options",children:["auto","low-latency","quality"].map(function(t){return e.jsx("button",{className:n.cn("fw-settings-btn",y===t&&"fw-settings-btn--active"),onClick:function(){k(t),Ve(!1)},children:"low-latency"===t?"Fast":"quality"===t?"Stable":"Auto"},t)})})]}),Ze&&e.jsxs("div",{className:"fw-settings-section",children:[e.jsx("div",{className:"fw-settings-label",children:"Speed"}),e.jsx("div",{className:"fw-settings-options fw-settings-options--wrap",children:n.SPEED_PRESETS.map(function(t){return e.jsxs("button",{className:n.cn("fw-settings-btn",Se===t&&"fw-settings-btn--active"),onClick:function(){!function(e){if(!b){var t=Number(e);if(Le(t),null!=W&&W.setPlaybackRate)W.setPlaybackRate(t);else{var n=K();n&&(n.playbackRate=t)}}}(String(t)),Ve(!1)},children:[t,"x"]},t)})})]}),$.length>0&&e.jsxs("div",{className:"fw-settings-section",children:[e.jsx("div",{className:"fw-settings-label",children:"Quality"}),e.jsxs("div",{className:"fw-settings-list",children:[e.jsx("button",{className:n.cn("fw-settings-list-item","auto"===Re&&"fw-settings-list-item--active"),onClick:function(){dt("auto"),Ve(!1)},children:"Auto"}),$.map(function(t){return e.jsx("button",{className:n.cn("fw-settings-list-item",Re===t.id&&"fw-settings-list-item--active"),onClick:function(){dt(t.id),Ve(!1)},children:t.label},t.id)})]})]}),ee.length>0&&e.jsxs("div",{className:"fw-settings-section",children:[e.jsx("div",{className:"fw-settings-label",children:"Captions"}),e.jsxs("div",{className:"fw-settings-list",children:[e.jsx("button",{className:n.cn("fw-settings-list-item","none"===Pe&&"fw-settings-list-item--active"),onClick:function(){ft("none"),Ve(!1)},children:"Off"}),ee.map(function(t){return e.jsx("button",{className:n.cn("fw-settings-list-item",Pe===t.id&&"fw-settings-list-item--active"),onClick:function(){ft(t.id),Ve(!1)},children:t.label||t.id},t.id)})]})]})]})]}),e.jsx("div",{className:"fw-control-group",children:e.jsx("button",{type:"button",className:"fw-btn-flush","aria-label":"Toggle fullscreen",onClick:function(){if(!b)if(D)D();else if("undefined"!=typeof document){var e=document.querySelector('[data-player-container="true"]');e&&(document.fullscreenElement?document.exitFullscreen().catch(function(){}):e.requestFullscreen().catch(function(){}))}},children:e.jsx(fe,{isFullscreen:Te,size:16})})})]})]})]})})},pe={"html5/application/vnd.apple.mpegurl":"HLS","dash/video/mp4":"DASH","html5/video/mp4":"MP4","html5/video/webm":"WebM",whep:"WHEP","mist/html":"Mist","mist/legacy":"Auto","ws/video/mp4":"MEWS"},Ce=function(r){var a,o,i,s=r.onSettingsChange,l=r.playbackMode,c=void 0===l?"auto":l,u=r.onModeChange,d=r.onReload,f=r.streamInfo,v=r.mistStreamInfo,h=r.currentPlayer,p=r.currentSource,C=r.videoElement,g=r.protocol,x=r.nodeId;r.isVisible;var b=r.isOpen,w=r.onOpenChange,k=N(t.useState(!1),2),A=k[0],j=k[1],S=void 0!==b?b:A,L=t.useCallback(function(e){w?w(e):j(e)},[w]),E=N(t.useState("config"),2),M=E[0],T=E[1],I=N(t.useState(0),2)[1],q=N(t.useState(null),2),R=q[0],F=q[1],B=N(t.useState(!1),2),P=B[0],D=B[1],O=N(t.useState(!1),2),z=O[0],V=O[1],U=t.useRef(null),W=t.useRef(null),Q=N(t.useState(1),2),Y=Q[0],J=Q[1],G=N(t.useState(100),2),H=G[0],Z=G[1],X=N(t.useState(0),2),K=X[0],_=X[1],$=N(t.useState(0),2),ee=$[0],te=$[1],ne=N(t.useState(null),2),re=ne[0],ae=ne[1],oe=t.useRef(null);t.useEffect(function(){return C&&S&&(W.current||(W.current=new n.QualityMonitor({sampleInterval:500,onSample:function(e){Z(e.score),_(e.stallCount),te(e.frameDropRate),W.current&&J(W.current.getPlaybackScore())}})),W.current.start(C)),function(){W.current&&W.current.stop()}},[C,S]),t.useEffect(function(){if(S&&"stats"===M){var e=function(){var e=m(y().m(function e(){var t,r;return y().w(function(e){for(;;)switch(e.p=e.n){case 0:if(e.p=0,!(t=n.globalPlayerManager.getCurrentPlayer())||!t.getStats){e.n=2;break}return e.n=1,t.getStats();case 1:(r=e.v)&&ae(r);case 2:e.n=4;break;case 3:e.p=3,e.v;case 4:return e.a(2)}},e,null,[[0,3]])}));return function(){return e.apply(this,arguments)}}();return e(),oe.current=setInterval(e,500),function(){oe.current&&(clearInterval(oe.current),oe.current=null)}}},[S,M]);var ie=t.useMemo(function(){if(!f)return[];try{return n.globalPlayerManager.getAllCombinations(f,c)}catch(e){return[]}},[f,c]),se=t.useMemo(function(){return ie.filter(function(e){return e.compatible})},[ie]),le=t.useMemo(function(){return h&&p&&0!==ie.length?ie.findIndex(function(e){return e.player===h.shortname&&e.sourceType===p.type}):-1},[h,p,ie]),ce=t.useMemo(function(){return h&&p&&0!==se.length?se.findIndex(function(e){return e.player===h.shortname&&e.sourceType===p.type}):-1},[h,p,se]),ue=t.useCallback(function(){null==d||d()},[d]),de=t.useCallback(function(){if(0!==se.length){var e=((ce>=0?ce:-1)+1)%se.length,t=se[e];I(e),s({forcePlayer:t.player,forceType:t.sourceType,forceSource:t.sourceIndex})}},[se,ce,s]),fe=t.useCallback(function(e){var t=ie[e];t&&(I(e),s({forcePlayer:t.player,forceType:t.sourceType,forceSource:t.sourceIndex}))},[ie,s]),ve=N(t.useState(null),2),me=ve[0],he=ve[1];return t.useEffect(function(){if(S&&"stats"===M){var e=function(){var e=n.globalPlayerManager.getCurrentPlayer(),t=(null==e?void 0:e.getVideoElement())||C;he(t?{resolution:"".concat(t.videoWidth,"x").concat(t.videoHeight),buffered:t.buffered.length>0?(t.buffered.end(t.buffered.length-1)-t.currentTime).toFixed(1):"0",playbackRate:t.playbackRate.toFixed(2),currentTime:t.currentTime.toFixed(1),duration:isFinite(t.duration)?t.duration.toFixed(1):"live",readyState:t.readyState,networkState:t.networkState}:null)};e();var t=setInterval(e,500);return function(){return clearInterval(t)}}},[S,M,C]),S?e.jsxs("div",{className:"fw-dev-panel",children:[e.jsxs("div",{className:"fw-dev-header",children:[e.jsx("button",{type:"button",onClick:function(){return T("config")},className:n.cn("fw-dev-tab","config"===M&&"fw-dev-tab--active"),children:"Config"}),e.jsx("button",{type:"button",onClick:function(){return T("stats")},className:n.cn("fw-dev-tab","stats"===M&&"fw-dev-tab--active"),children:"Stats"}),e.jsx("div",{className:"fw-dev-spacer"}),e.jsx("button",{type:"button",onClick:function(){return L(!1)},className:"fw-dev-close","aria-label":"Close dev mode panel",children:e.jsx("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",stroke:"currentColor",strokeWidth:"1.5",children:e.jsx("path",{d:"M2 2l8 8M10 2l-8 8"})})})]}),"config"===M&&e.jsxs("div",{ref:U,className:"fw-dev-body",children:[e.jsxs("div",{className:"fw-dev-section",children:[e.jsx("div",{className:"fw-dev-label",children:"Active"}),e.jsxs("div",{className:"fw-dev-value",children:[(null==h?void 0:h.name)||"None"," ",e.jsx("span",{className:"fw-dev-value-arrow",children:"→"})," ",pe[(null==p?void 0:p.type)||""]||(null==p?void 0:p.type)||"—"]}),x&&e.jsxs("div",{className:"fw-dev-value-muted",children:["Node: ",x]})]}),e.jsxs("div",{className:"fw-dev-section",children:[e.jsx("div",{className:"fw-dev-label",children:"Playback Mode"}),e.jsx("div",{className:"fw-dev-mode-group",children:["auto","low-latency","quality"].map(function(t){return e.jsx("button",{type:"button",onClick:function(){return null==u?void 0:u(t)},className:n.cn("fw-dev-mode-btn",c===t&&"fw-dev-mode-btn--active"),children:"low-latency"===t?"Low Lat":t.charAt(0).toUpperCase()+t.slice(1)},t)})}),e.jsxs("div",{className:"fw-dev-mode-desc",children:["auto"===c&&"Balanced: MP4/WS → WHEP → HLS","low-latency"===c&&"WHEP/WebRTC first (<1s delay)","quality"===c&&"MP4/WS first, HLS fallback"]})]}),e.jsxs("div",{className:"fw-dev-actions",children:[e.jsx("button",{type:"button",onClick:ue,className:"fw-dev-action-btn",children:"Reload"}),e.jsx("button",{type:"button",onClick:de,className:"fw-dev-action-btn",children:"Next Option"})]}),e.jsxs("div",{className:"fw-dev-section",style:{padding:0,borderBottom:0},children:[e.jsxs("div",{className:"fw-dev-list-header",children:[e.jsxs("span",{className:"fw-dev-list-title",children:["Player Options (",se.length,")"]}),ie.length>se.length&&e.jsxs("button",{type:"button",onClick:function(){return V(!z)},className:"fw-dev-list-toggle",children:[e.jsx("svg",{width:"10",height:"10",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",className:n.cn("fw-dev-chevron",z&&"fw-dev-chevron--open"),children:e.jsx("path",{d:"M6 9l6 6 6-6"})}),z?"Hide":"Show"," disabled (",ie.length-se.length,")"]})]}),0===ie.length?e.jsx("div",{className:"fw-dev-list-empty",children:"No stream info available"}):e.jsx("div",{children:ie.map(function(t,r){var a,o,i,s,l=!0===t.codecIncompatible;if(!t.compatible&&!l&&!z)return null;var u=le===r,d=pe[t.sourceType]||t.sourceType.split("/").pop();return e.jsxs("div",{onMouseEnter:function(e){if(F(r),U.current){var t=U.current,n=e.currentTarget,a=t.getBoundingClientRect(),o=(n.getBoundingClientRect().top-a.top)/a.height;D(o>.6)}},onMouseLeave:function(){return F(null)},className:"fw-dev-combo",children:[e.jsxs("button",{type:"button",onClick:function(){return fe(r)},className:n.cn("fw-dev-combo-btn",u&&"fw-dev-combo-btn--active",!t.compatible&&!l&&"fw-dev-combo-btn--disabled",l&&"fw-dev-combo-btn--codec-warn"),children:[e.jsx("span",{className:n.cn("fw-dev-combo-rank",u?"fw-dev-combo-rank--active":t.compatible||l?l?"fw-dev-combo-rank--warn":"":"fw-dev-combo-rank--disabled"),children:t.compatible?r+1:l?"⚠":"—"}),e.jsxs("span",{className:"fw-dev-combo-name",children:[t.playerName," ",e.jsx("span",{className:"fw-dev-combo-arrow",children:"→"})," ",e.jsx("span",{className:n.cn("fw-dev-combo-type",t.compatible||l?l?"fw-dev-combo-type--warn":"":"fw-dev-combo-type--disabled"),children:d})]}),e.jsx("span",{className:n.cn("fw-dev-combo-score",t.compatible||l?l?"fw-dev-combo-score--low":t.score>=2?"fw-dev-combo-score--high":t.score>=1.5?"fw-dev-combo-score--mid":"fw-dev-combo-score--low":"fw-dev-combo-score--disabled"),children:t.score.toFixed(2)})]}),R===r&&e.jsxs("div",{className:n.cn("fw-dev-tooltip",P?"fw-dev-tooltip--above":"fw-dev-tooltip--below"),children:[e.jsxs("div",{className:"fw-dev-tooltip-header",children:[e.jsx("div",{className:"fw-dev-tooltip-title",children:t.playerName}),e.jsx("div",{className:"fw-dev-tooltip-subtitle",children:t.sourceType}),(null===(a=t.scoreBreakdown)||void 0===a?void 0:a.trackTypes)&&t.scoreBreakdown.trackTypes.length>0&&e.jsxs("div",{className:"fw-dev-tooltip-tracks",children:["Tracks: ",e.jsx("span",{className:"fw-dev-tooltip-value",children:t.scoreBreakdown.trackTypes.join(", ")})]})]}),t.compatible&&t.scoreBreakdown?e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"fw-dev-tooltip-score",children:["Score: ",t.score.toFixed(2)]}),e.jsxs("div",{className:"fw-dev-tooltip-row",children:["Tracks [",t.scoreBreakdown.trackTypes.join(", "),"]: ",e.jsx("span",{className:"fw-dev-tooltip-value",children:t.scoreBreakdown.trackScore.toFixed(2)})," ",e.jsxs("span",{className:"fw-dev-tooltip-weight",children:["x",t.scoreBreakdown.weights.tracks]})]}),e.jsxs("div",{className:"fw-dev-tooltip-row",children:["Priority: ",e.jsx("span",{className:"fw-dev-tooltip-value",children:t.scoreBreakdown.priorityScore.toFixed(2)})," ",e.jsxs("span",{className:"fw-dev-tooltip-weight",children:["x",t.scoreBreakdown.weights.priority]})]}),e.jsxs("div",{className:"fw-dev-tooltip-row",children:["Source: ",e.jsx("span",{className:"fw-dev-tooltip-value",children:t.scoreBreakdown.sourceScore.toFixed(2)})," ",e.jsxs("span",{className:"fw-dev-tooltip-weight",children:["x",t.scoreBreakdown.weights.source]})]}),void 0!==t.scoreBreakdown.reliabilityScore&&e.jsxs("div",{className:"fw-dev-tooltip-row",children:["Reliability: ",e.jsx("span",{className:"fw-dev-tooltip-value",children:t.scoreBreakdown.reliabilityScore.toFixed(2)})," ",e.jsxs("span",{className:"fw-dev-tooltip-weight",children:["x",null!==(o=t.scoreBreakdown.weights.reliability)&&void 0!==o?o:0]})]}),void 0!==t.scoreBreakdown.modeBonus&&0!==t.scoreBreakdown.modeBonus&&e.jsxs("div",{className:"fw-dev-tooltip-row",children:["Mode (",c,"): ",e.jsxs("span",{className:"fw-dev-tooltip-bonus",children:["+",t.scoreBreakdown.modeBonus.toFixed(2)]})," ",e.jsxs("span",{className:"fw-dev-tooltip-weight",children:["x",null!==(i=t.scoreBreakdown.weights.mode)&&void 0!==i?i:0]})]}),void 0!==t.scoreBreakdown.routingBonus&&0!==t.scoreBreakdown.routingBonus&&e.jsxs("div",{className:"fw-dev-tooltip-row",children:["Routing: ",e.jsxs("span",{className:t.scoreBreakdown.routingBonus>0?"fw-dev-tooltip-bonus":"fw-dev-tooltip-penalty",children:[t.scoreBreakdown.routingBonus>0?"+":"",t.scoreBreakdown.routingBonus.toFixed(2)]})," ",e.jsxs("span",{className:"fw-dev-tooltip-weight",children:["x",null!==(s=t.scoreBreakdown.weights.routing)&&void 0!==s?s:0]})]})]}):e.jsx("div",{className:"fw-dev-tooltip-error",children:t.incompatibleReason||"Incompatible"})]})]},"".concat(t.player,"-").concat(t.sourceType))})})]})]}),"stats"===M&&e.jsxs("div",{className:"fw-dev-body",children:[e.jsxs("div",{className:"fw-dev-section",children:[e.jsx("div",{className:"fw-dev-label",children:"Playback Rate"}),e.jsxs("div",{className:"fw-dev-rate",children:[e.jsxs("div",{className:n.cn("fw-dev-rate-value",Y>=.95&&Y<=1.05?"fw-dev-stat-value--good":Y>1.05?"fw-dev-stat-value--accent":Y>=.75?"fw-dev-stat-value--warn":"fw-dev-stat-value--bad"),children:[Y.toFixed(2),"×"]}),e.jsx("div",{className:"fw-dev-rate-status",children:Y>=.95&&Y<=1.05?"realtime":Y>1.05?"catching up":Y>=.75?"slightly slow":"stalling"})]}),e.jsxs("div",{className:"fw-dev-rate-stats",children:[e.jsxs("span",{className:H>=75?"fw-dev-stat-value--good":"fw-dev-stat-value--bad",children:["Quality: ",H,"/100"]}),e.jsxs("span",{className:0===K?"fw-dev-stat-value--good":"fw-dev-stat-value--warn",children:["Stalls: ",K]}),e.jsxs("span",{className:ee<1?"fw-dev-stat-value--good":"fw-dev-stat-value--bad",children:["Drops: ",ee.toFixed(1),"%"]})]})]}),me?e.jsxs("div",{children:[e.jsxs("div",{className:"fw-dev-stat",children:[e.jsx("span",{className:"fw-dev-stat-label",children:"Resolution"}),e.jsx("span",{className:"fw-dev-stat-value",children:me.resolution})]}),e.jsxs("div",{className:"fw-dev-stat",children:[e.jsx("span",{className:"fw-dev-stat-label",children:"Buffer"}),e.jsxs("span",{className:"fw-dev-stat-value",children:[me.buffered,"s"]})]}),e.jsxs("div",{className:"fw-dev-stat",children:[e.jsx("span",{className:"fw-dev-stat-label",children:"Playback Rate"}),e.jsxs("span",{className:"fw-dev-stat-value",children:[me.playbackRate,"x"]})]}),e.jsxs("div",{className:"fw-dev-stat",children:[e.jsx("span",{className:"fw-dev-stat-label",children:"Time"}),e.jsxs("span",{className:"fw-dev-stat-value",children:[me.currentTime," / ",me.duration]})]}),e.jsxs("div",{className:"fw-dev-stat",children:[e.jsx("span",{className:"fw-dev-stat-label",children:"Ready State"}),e.jsx("span",{className:"fw-dev-stat-value",children:me.readyState})]}),e.jsxs("div",{className:"fw-dev-stat",children:[e.jsx("span",{className:"fw-dev-stat-label",children:"Network State"}),e.jsx("span",{className:"fw-dev-stat-value",children:me.networkState})]}),g&&e.jsxs("div",{className:"fw-dev-stat",children:[e.jsx("span",{className:"fw-dev-stat-label",children:"Protocol"}),e.jsx("span",{className:"fw-dev-stat-value",children:g})]}),x&&e.jsxs("div",{className:"fw-dev-stat",children:[e.jsx("span",{className:"fw-dev-stat-label",children:"Node ID"}),e.jsx("span",{className:"fw-dev-stat-value truncate",style:{maxWidth:"150px"},children:x})]})]}):e.jsx("div",{className:"fw-dev-list-empty",children:"No video element available"}),re&&e.jsxs("div",{children:[e.jsx("div",{className:"fw-dev-list-header fw-dev-section-header",children:e.jsx("span",{className:"fw-dev-list-title",children:"hls"===re.type?"HLS.js Stats":"webrtc"===re.type?"WebRTC Stats":"Player Stats"})}),"hls"===re.type&&e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"fw-dev-stat",children:[e.jsx("span",{className:"fw-dev-stat-label",children:"Bitrate"}),e.jsx("span",{className:"fw-dev-stat-value--accent",children:re.currentBitrate>0?"".concat(Math.round(re.currentBitrate/1e3)," kbps"):"N/A"})]}),e.jsxs("div",{className:"fw-dev-stat",children:[e.jsx("span",{className:"fw-dev-stat-label",children:"Bandwidth Est."}),e.jsx("span",{className:"fw-dev-stat-value",children:re.bandwidthEstimate>0?"".concat(Math.round(re.bandwidthEstimate/1e3)," kbps"):"N/A"})]}),e.jsxs("div",{className:"fw-dev-stat",children:[e.jsx("span",{className:"fw-dev-stat-label",children:"Level"}),e.jsxs("span",{className:"fw-dev-stat-value",children:[re.currentLevel>=0?re.currentLevel:"Auto"," / ",(null===(a=re.levels)||void 0===a?void 0:a.length)||0]})]}),void 0!==re.latency&&e.jsxs("div",{className:"fw-dev-stat",children:[e.jsx("span",{className:"fw-dev-stat-label",children:"Latency"}),e.jsxs("span",{className:re.latency>5e3?"fw-dev-stat-value--warn":"fw-dev-stat-value",children:[Math.round(re.latency)," ms"]})]})]}),"webrtc"===re.type&&e.jsxs(e.Fragment,{children:[re.video&&e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"fw-dev-stat",children:[e.jsx("span",{className:"fw-dev-stat-label",children:"Video Bitrate"}),e.jsx("span",{className:"fw-dev-stat-value--accent",children:re.video.bitrate>0?"".concat(Math.round(re.video.bitrate/1e3)," kbps"):"N/A"})]}),e.jsxs("div",{className:"fw-dev-stat",children:[e.jsx("span",{className:"fw-dev-stat-label",children:"FPS"}),e.jsx("span",{className:"fw-dev-stat-value",children:Math.round(re.video.framesPerSecond||0)})]}),e.jsxs("div",{className:"fw-dev-stat",children:[e.jsx("span",{className:"fw-dev-stat-label",children:"Frames"}),e.jsxs("span",{className:"fw-dev-stat-value",children:[re.video.framesDecoded," decoded,"," ",e.jsxs("span",{className:re.video.frameDropRate>1?"fw-dev-stat-value--bad":"fw-dev-stat-value--good",children:[re.video.framesDropped," dropped"]})]})]}),e.jsxs("div",{className:"fw-dev-stat",children:[e.jsx("span",{className:"fw-dev-stat-label",children:"Packet Loss"}),e.jsxs("span",{className:re.video.packetLossRate>1?"fw-dev-stat-value--bad":"fw-dev-stat-value--good",children:[re.video.packetLossRate.toFixed(2),"%"]})]}),e.jsxs("div",{className:"fw-dev-stat",children:[e.jsx("span",{className:"fw-dev-stat-label",children:"Jitter"}),e.jsxs("span",{className:re.video.jitter>30?"fw-dev-stat-value--warn":"fw-dev-stat-value",children:[re.video.jitter.toFixed(1)," ms"]})]}),e.jsxs("div",{className:"fw-dev-stat",children:[e.jsx("span",{className:"fw-dev-stat-label",children:"Jitter Buffer"}),e.jsxs("span",{className:"fw-dev-stat-value",children:[re.video.jitterBufferDelay.toFixed(1)," ms"]})]})]}),re.network&&e.jsxs("div",{className:"fw-dev-stat",children:[e.jsx("span",{className:"fw-dev-stat-label",children:"RTT"}),e.jsxs("span",{className:re.network.rtt>200?"fw-dev-stat-value--warn":"fw-dev-stat-value",children:[Math.round(re.network.rtt)," ms"]})]})]})]}),(null==v||null===(o=v.meta)||void 0===o?void 0:o.tracks)&&Object.keys(v.meta.tracks).length>0&&e.jsxs("div",{children:[e.jsx("div",{className:"fw-dev-list-header fw-dev-section-header",children:e.jsxs("span",{className:"fw-dev-list-title",children:["Tracks (",Object.keys(v.meta.tracks).length,")"]})}),Object.entries(v.meta.tracks).map(function(t){var r=N(t,2),a=r[0],o=r[1];return e.jsxs("div",{className:"fw-dev-track",children:[e.jsxs("div",{className:"fw-dev-track-header",children:[e.jsx("span",{className:n.cn("fw-dev-track-badge","video"===o.type?"fw-dev-track-badge--video":"audio"===o.type?"fw-dev-track-badge--audio":"fw-dev-track-badge--other"),children:o.type}),e.jsx("span",{className:"fw-dev-track-codec",children:o.codec}),e.jsxs("span",{className:"fw-dev-track-id",children:["#",a]})]}),e.jsxs("div",{className:"fw-dev-track-meta",children:["video"===o.type&&o.width&&o.height&&e.jsxs("span",{children:[o.width,"×",o.height]}),o.bps&&e.jsxs("span",{children:[Math.round(o.bps/1e3)," kbps"]}),o.fpks&&e.jsxs("span",{children:[Math.round(o.fpks/1e3)," fps"]}),"audio"===o.type&&o.channels&&e.jsxs("span",{children:[o.channels,"ch"]}),"audio"===o.type&&o.rate&&e.jsxs("span",{children:[o.rate," Hz"]}),o.lang&&e.jsx("span",{children:o.lang})]})]},a)})]}),v&&(!(null!==(i=v.meta)&&void 0!==i&&i.tracks)||0===Object.keys(v.meta.tracks).length)&&e.jsx("div",{className:"fw-dev-no-tracks",children:e.jsxs("span",{className:"fw-dev-no-tracks-text",children:["No track data available",v.type&&e.jsxs("span",{className:"fw-dev-no-tracks-type",children:["(",v.type,")"]})]})})]})]}):null},ge=function(t){var r=t.isVisible,a=t.speed,o=t.className;return e.jsx("div",{className:n.cn("fw-speed-indicator absolute top-3 right-3 z-30 pointer-events-none","transition-opacity duration-150",r?"opacity-100":"opacity-0",o),children:e.jsxs("div",{className:n.cn("bg-black/60 text-white px-2.5 py-1 rounded-md","text-xs font-semibold tabular-nums","flex items-center gap-2","border border-white/15","transform transition-transform duration-150",r?"scale-100":"scale-90"),children:[e.jsx(xe,{className:"w-4 h-4"}),e.jsxs("span",{children:[a,"x"]})]})})},xe=function(t){var n=t.className;return e.jsx("svg",{viewBox:"0 0 24 24",fill:"currentColor",className:n,"aria-hidden":"true",children:e.jsx("path",{d:"M4 18l8.5-6L4 6v12zm9-12v12l8.5-6L13 6z"})})},be=function(r){var a=r.direction,o=r.seconds,i=void 0===o?10:o,s=r.className,l=r.onHide,c=N(t.useState(!1),2),u=c[0],d=c[1];if(t.useEffect(function(){if(a){d(!0);var e=setTimeout(function(){d(!1),null==l||l()},600);return function(){return clearTimeout(e)}}},[a,l]),!a)return null;var f="back"===a;return e.jsxs("div",{className:n.cn("fw-skip-indicator absolute inset-0 z-30 pointer-events-none","flex items-center",f?"justify-start pl-8":"justify-end pr-8",s),children:[e.jsx("div",{className:n.cn("absolute top-0 bottom-0 w-1/3",f?"left-0":"right-0","bg-white/10",u&&"animate-pulse")}),e.jsxs("div",{className:n.cn("relative flex flex-col items-center gap-1 text-white","transition-all duration-200",u?"opacity-100 scale-100":"opacity-0 scale-75"),children:[e.jsx("div",{className:"flex",children:f?e.jsxs(e.Fragment,{children:[e.jsx(we,{className:"w-8 h-8"}),e.jsx(we,{className:"w-8 h-8 -ml-4"})]}):e.jsxs(e.Fragment,{children:[e.jsx(ye,{className:"w-8 h-8"}),e.jsx(ye,{className:"w-8 h-8 -ml-4"})]})}),e.jsx("span",{className:"text-sm font-semibold tabular-nums",children:f?"-".concat(i,"s"):"+".concat(i,"s")})]})]})},we=function(t){var n=t.className;return e.jsx("svg",{viewBox:"0 0 24 24",fill:"currentColor",className:n,"aria-hidden":"true",children:e.jsx("path",{d:"M11 18V6l-8.5 6 8.5 6zm.5-6l8.5 6V6l-8.5 6z"})})},ye=function(t){var n=t.className;return e.jsx("svg",{viewBox:"0 0 24 24",fill:"currentColor",className:n,"aria-hidden":"true",children:e.jsx("path",{d:"M4 18l8.5-6L4 6v12zm9-12v12l8.5-6L13 6z"})})},ke=["className","inset","children"],Ae=["className"],je=["className","style"],Ne=["className","inset"],Se=["className","children","checked"],Le=["className","children"],Ee=["className","inset"],Me=["className"],Te=d.Root,Ie=d.Trigger;c.forwardRef(function(t,r){var a=t.className,i=t.inset,s=t.children,l=w(t,ke);return e.jsxs(d.SubTrigger,b(b({ref:r,className:n.cn("fw-context-menu-item",i&&"fw-context-menu-item--inset",a)},l),{},{children:[s,e.jsx(o.ChevronRight,{className:"ml-auto h-4 w-4"})]}))}).displayName=d.SubTrigger.displayName,c.forwardRef(function(t,r){var a=t.className,o=w(t,Ae);return e.jsx(d.SubContent,b({ref:r,className:n.cn("fw-player-surface fw-context-menu",a)},o))}).displayName=d.SubContent.displayName;var qe=c.forwardRef(function(t,r){var a=t.className,o=t.style,i=w(t,je);return e.jsx(d.Portal,{children:e.jsx(d.Content,b({ref:r,className:n.cn("fw-player-surface fw-context-menu",a),style:b({backgroundColor:"hsl(235 19% 13%)",color:"hsl(229 35% 75%)",border:"1px solid rgba(90, 96, 127, 0.3)"},o)},i))})});qe.displayName=d.Content.displayName;var Re=c.forwardRef(function(t,r){var a=t.className,o=t.inset,i=w(t,Ne);return e.jsx(d.Item,b({ref:r,className:n.cn("fw-context-menu-item",o&&"fw-context-menu-item--inset",a)},i))});Re.displayName=d.Item.displayName,c.forwardRef(function(t,r){var a=t.className,i=t.children,s=t.checked,l=w(t,Se);return e.jsxs(d.CheckboxItem,b(b({ref:r,className:n.cn("fw-context-menu-checkbox",a),checked:s},l),{},{children:[e.jsx("span",{className:"fw-context-menu-indicator",children:e.jsx(d.ItemIndicator,{children:e.jsx(o.Check,{className:"h-4 w-4"})})}),i]}))}).displayName=d.CheckboxItem.displayName,c.forwardRef(function(t,r){var a=t.className,i=t.children,s=w(t,Le);return e.jsxs(d.RadioItem,b(b({ref:r,className:n.cn("fw-context-menu-checkbox",a)},s),{},{children:[e.jsx("span",{className:"fw-context-menu-indicator",children:e.jsx(d.ItemIndicator,{children:e.jsx(o.Circle,{className:"h-2 w-2 fill-current"})})}),i]}))}).displayName=d.RadioItem.displayName,c.forwardRef(function(t,r){var a=t.className,o=t.inset,i=w(t,Ee);return e.jsx(d.Label,b({ref:r,className:n.cn("fw-context-menu-label",o&&"fw-context-menu-item--inset",a)},i))}).displayName=d.Label.displayName;var Fe=c.forwardRef(function(t,r){var a=t.className,o=w(t,Me);return e.jsx(d.Separator,b({ref:r,className:n.cn("fw-context-menu-separator",a)},o))});Fe.displayName=d.Separator.displayName;var Be=function(r){var a,o,i,s,l,c,u,d,f,v,m,h,p=r.contentId,C=r.contentType,g=r.thumbnailUrl,x=void 0===g?null:g,b=r.options,w=r.endpoints,y=r.onStateChange,k=N(t.useState(!1),2),A=k[0],j=k[1],S=N(t.useState(!1),2),L=S[0],E=S[1],M=N(t.useState(null),2),T=M[0],I=M[1],q=N(t.useState((null==b?void 0:b.playbackMode)||"auto"),2),R=q[0],F=q[1],B=Y({contentId:p,contentType:C,endpoints:w,gatewayUrl:null==b?void 0:b.gatewayUrl,mistUrl:null==b?void 0:b.mistUrl,authToken:null==b?void 0:b.authToken,autoplay:!1!==(null==b?void 0:b.autoplay),muted:!1!==(null==b?void 0:b.muted),controls:!0===(null==b?void 0:b.stockControls),poster:x||void 0,debug:null==b?void 0:b.debug,onStateChange:function(e){null==y||y(e)},onError:function(e){console.warn("[Player] Error:",e)}}),P=B.containerRef,D=B.state,O=B.controller,W=B.togglePlay,Q=B.toggleMute,J=B.toggleLoop,G=B.toggleFullscreen,H=B.togglePiP,Z=B.setVolume,X=B.selectQuality,K=B.clearError,_=B.retry,$=B.reload,ee=B.jumpToLive,te=B.handleMouseEnter,ne=B.handleMouseLeave,re=B.handleMouseMove,ae=B.setDevModeOptions,oe=t.useCallback(function(e){ae({forcePlayer:e.forcePlayer,forceType:e.forceType,forceSource:e.forceSource})},[ae]),ie=t.useCallback(function(e){F(e),ae({playbackMode:e})},[ae]),se=t.useCallback(function(){K(),$()},[K,$]),ue=t.useCallback(function(){j(function(e){return!e})},[]),de=t.useCallback(function(){I(null)},[]),fe=null===(a=D.endpoints)||void 0===a?void 0:a.primary,me="mist-legacy"===(null===(o=D.currentPlayerInfo)||void 0===o?void 0:o.shortname),pe=!0===(null==b?void 0:b.stockControls)||me,xe=(D.isHovering||D.isPaused)&&!D.shouldShowIdleScreen&&!D.isBuffering&&!D.error,we=!D.shouldShowIdleScreen&&D.isBuffering&&!D.error&&D.hasPlaybackStarted,ye=!(null!==(i=D.endpoints)&&void 0!==i&&i.primary)&&"booting"!==D.state,ke=null!=b&&b.gatewayUrl&&"gateway_loading"===D.state?"Resolving viewing endpoint...":"Waiting for endpoint...";return e.jsxs(Te,{children:[e.jsx(Ie,{asChild:!0,children:e.jsxs("div",{className:n.cn("fw-player-surface fw-player-root w-full h-full overflow-hidden",(null==b?void 0:b.devMode)&&"flex"),"data-player-container":"true",tabIndex:0,onMouseEnter:te,onMouseLeave:ne,onMouseMove:re,children:[e.jsxs("div",{className:n.cn("relative",null!=b&&b.devMode?"flex-1 min-w-0":"w-full h-full"),children:[e.jsx("div",{ref:P,className:"fw-player-container"}),e.jsx(V,{title:null===(s=D.metadata)||void 0===s?void 0:s.title,description:null===(l=D.metadata)||void 0===l?void 0:l.description,isVisible:xe}),e.jsx(U,{isOpen:A,onClose:ue,metadata:D.metadata,streamState:D.streamState,quality:D.playbackQuality,videoElement:D.videoElement,protocol:null==fe?void 0:fe.protocol,nodeId:null==fe?void 0:fe.nodeId,geoDistance:null==fe?void 0:fe.geoDistance}),(null==b?void 0:b.devMode)&&!L&&e.jsx(Ce,{onSettingsChange:oe,playbackMode:R,onModeChange:ie,onReload:se,streamInfo:D.streamInfo,mistStreamInfo:null===(c=D.streamState)||void 0===c?void 0:c.streamInfo,currentPlayer:D.currentPlayerInfo,currentSource:D.currentSourceInfo,videoElement:D.videoElement,protocol:null==fe?void 0:fe.protocol,nodeId:null==fe?void 0:fe.nodeId,isVisible:!1,isOpen:!1,onOpenChange:E}),D.isHoldingSpeed&&e.jsx(ge,{isVisible:!0,speed:D.holdSpeed}),e.jsx(be,{direction:T,seconds:10,onHide:de}),ye&&e.jsx(z,{status:"OFFLINE",message:ke}),!ye&&D.shouldShowIdleScreen&&e.jsx(z,{status:D.isEffectivelyLive?null===(u=D.streamState)||void 0===u?void 0:u.status:void 0,message:D.isEffectivelyLive?null===(d=D.streamState)||void 0===d?void 0:d.message:"Loading video...",percentage:D.isEffectivelyLive?null===(f=D.streamState)||void 0===f?void 0:f.percentage:void 0}),we&&e.jsx("div",{role:"status","aria-live":"polite",className:"fw-player-surface absolute inset-0 flex items-center justify-center bg-black/40 backdrop-blur-sm z-20",children:e.jsxs("div",{className:"flex items-center gap-3 rounded-lg border border-white/10 bg-black/70 px-4 py-3 text-sm text-white shadow-lg",children:[e.jsx("div",{className:"w-4 h-4 border-2 border-white/30 border-t-white rounded-full animate-spin"}),e.jsx("span",{children:"Buffering..."})]})}),!D.shouldShowIdleScreen&&D.error&&e.jsx("div",{role:"alert","aria-live":"assertive",className:n.cn("fw-error-overlay",D.isPassiveError?"fw-error-overlay--passive":"fw-error-overlay--fullscreen"),children:e.jsxs("div",{className:n.cn("fw-error-popup",D.isPassiveError?"fw-error-popup--passive":"fw-error-popup--fullscreen"),children:[e.jsxs("div",{className:n.cn("fw-error-header",D.isPassiveError?"fw-error-header--warning":"fw-error-header--error"),children:[e.jsx("span",{className:n.cn("fw-error-title",D.isPassiveError?"fw-error-title--warning":"fw-error-title--error"),children:D.isPassiveError?"Warning":"Error"}),e.jsx("button",{type:"button",className:"fw-error-close",onClick:K,"aria-label":"Dismiss",children:e.jsx("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",children:e.jsx("path",{d:"M9 3L3 9M3 3L9 9",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"})})})]}),e.jsx("div",{className:"fw-error-body",children:e.jsx("p",{className:"fw-error-message",children:"Playback issue"})}),e.jsx("div",{className:"fw-error-actions",children:e.jsx("button",{type:"button",className:"fw-error-btn","aria-label":"Retry playback",onClick:function(){K(),_()},children:"Retry"})})]})}),!pe&&e.jsx(he,{currentTime:D.currentTime,duration:D.duration,isVisible:D.shouldShowControls,onSeek:function(e){return null==O?void 0:O.seek(e)},showStatsButton:!1,isStatsOpen:A,onStatsToggle:ue,mistStreamInfo:null===(v=D.streamState)||void 0===v?void 0:v.streamInfo,disabled:!D.videoElement,playbackMode:R,onModeChange:ie,sourceType:null===(m=D.currentSourceInfo)||void 0===m?void 0:m.type,isContentLive:D.isEffectivelyLive,videoElement:D.videoElement,qualities:D.qualities,onSelectQuality:X,isMuted:D.isMuted,volume:D.volume,onVolumeChange:Z,onToggleMute:Q,isPlaying:D.isPlaying,onTogglePlay:W,onToggleFullscreen:G,isFullscreen:D.isFullscreen,isLoopEnabled:D.isLoopEnabled,onToggleLoop:J,onJumpToLive:ee})]}),(null==b?void 0:b.devMode)&&L&&e.jsx(Ce,{onSettingsChange:oe,playbackMode:R,onModeChange:ie,onReload:se,streamInfo:D.streamInfo,mistStreamInfo:null===(h=D.streamState)||void 0===h?void 0:h.streamInfo,currentPlayer:D.currentPlayerInfo,currentSource:D.currentSourceInfo,videoElement:D.videoElement,protocol:null==fe?void 0:fe.protocol,nodeId:null==fe?void 0:fe.nodeId,isVisible:!0,isOpen:!0,onOpenChange:E})]})}),e.jsxs(qe,{children:[e.jsxs(Re,{onClick:ue,className:"gap-2",children:[e.jsx(ve,{size:14,className:"opacity-70 flex-shrink-0"}),e.jsx("span",{children:A?"Hide Stats":"Stats"})]}),(null==b?void 0:b.devMode)&&e.jsxs(e.Fragment,{children:[e.jsx(Fe,{}),e.jsxs(Re,{onClick:function(){return E(!L)},className:"gap-2",children:[e.jsx(ce,{size:14,className:"opacity-70 flex-shrink-0"}),e.jsx("span",{children:L?"Hide Settings":"Settings"})]})]}),e.jsx(Fe,{}),e.jsxs(Re,{onClick:H,className:"gap-2",children:[e.jsx(le,{size:14,className:"opacity-70 flex-shrink-0"}),e.jsx("span",{children:"Picture-in-Picture"})]}),e.jsxs(Re,{onClick:J,className:"gap-2",children:[e.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"opacity-70 flex-shrink-0",children:[e.jsx("polyline",{points:"17 1 21 5 17 9"}),e.jsx("path",{d:"M3 11V9a4 4 0 0 1 4-4h14"}),e.jsx("polyline",{points:"7 23 3 19 7 15"}),e.jsx("path",{d:"M21 13v2a4 4 0 0 1-4 4H3"})]}),e.jsx("span",{children:D.isLoopEnabled?"Disable Loop":"Enable Loop"})]})]})]})},Pe=function(n){var r=n.index,a=N(t.useState({top:0,left:0}),2),o=a[0],i=a[1],s=N(t.useState(40),2),l=s[0],c=s[1],u=N(t.useState(0),2),d=u[0],f=u[1],v=function(){return{top:80*Math.random()+10,left:80*Math.random()+10}},m=function(){return 60*Math.random()+30};t.useEffect(function(){i(v()),c(m());var e=function(){f(.15),setTimeout(function(){f(0),setTimeout(function(){i(v()),c(m()),setTimeout(function(){e()},200)},1500)},4e3+3e3*Math.random())},t=setTimeout(e,500*r);return function(){clearTimeout(t)}},[r]);var h=["rgba(122, 162, 247, 0.2)","rgba(187, 154, 247, 0.2)","rgba(158, 206, 106, 0.2)","rgba(115, 218, 202, 0.2)","rgba(125, 207, 255, 0.2)","rgba(247, 118, 142, 0.2)","rgba(224, 175, 104, 0.2)","rgba(42, 195, 222, 0.2)"];return e.jsx("div",{style:{position:"absolute",top:"".concat(o.top,"%"),left:"".concat(o.left,"%"),width:"".concat(l,"px"),height:"".concat(l,"px"),borderRadius:"50%",background:h[r%h.length],opacity:d,transition:"opacity 1s ease-in-out",pointerEvents:"none",userSelect:"none",WebkitUserSelect:"none",MozUserSelect:"none",msUserSelect:"none"}})},De=function(n){var r=n.containerRef,a=n.scale,o=void 0===a?.2:a,i=n.onHitmarker,s=N(t.useState(100),2),l=s[0],c=s[1],u=N(t.useState({x:0,y:0}),2),d=u[0],f=u[1],v=N(t.useState(!1),2),m=v[0],h=v[1];t.useEffect(function(){if(r.current){var e=r.current.clientWidth,t=r.current.clientHeight,n=Math.min(e,t);c(n*o)}},[r,o]);var p=function(e){if(r.current){var t=r.current.getBoundingClientRect(),n=t.left+t.width/2,a=t.top+t.height/2,o=e.clientX-n,i=e.clientY-a,s=Math.sqrt(o*o+i*i),c=1.5*l;if(s<c&&s>0){var u=(c-s)/c*50;f({x:-o/s*u,y:-i/s*u}),h(!0)}else f({x:0,y:0}),h(!1)}},C=function(){f({x:0,y:0}),h(!1)};return t.useEffect(function(){if(r.current){var e=r.current;return e.addEventListener("mousemove",p),e.addEventListener("mouseleave",C),function(){e.removeEventListener("mousemove",p),e.removeEventListener("mouseleave",C)}}},[l,r]),e.jsxs("div",{style:{position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -50%) translate(".concat(d.x,"px, ").concat(d.y,"px)"),display:"flex",alignItems:"center",justifyContent:"center",zIndex:10,transition:"transform 0.3s ease-out",userSelect:"none",WebkitUserSelect:"none",MozUserSelect:"none",msUserSelect:"none"},children:[e.jsx("div",{style:{position:"absolute",width:"".concat(1.4*l,"px"),height:"".concat(1.4*l,"px"),borderRadius:"50%",background:"rgba(122, 162, 247, 0.15)",animation:m?"logoPulse 1s ease-in-out infinite":"logoPulse 3s ease-in-out infinite",transform:m?"scale(1.2)":"scale(1)",transition:"transform 0.3s ease-out",userSelect:"none",WebkitUserSelect:"none",MozUserSelect:"none",msUserSelect:"none",pointerEvents:"none"}}),e.jsx("img",{src:R,alt:"FrameWorks Logo",onClick:function(e){e.stopPropagation(),i&&i({clientX:e.clientX,clientY:e.clientY})},style:{width:"".concat(l,"px"),height:"".concat(l,"px"),position:"relative",zIndex:1,filter:m?"drop-shadow(0 6px 12px rgba(36, 40, 59, 0.4)) brightness(1.1)":"drop-shadow(0 4px 8px rgba(36, 40, 59, 0.3))",transform:m?"scale(1.1)":"scale(1)",transition:"all 0.3s ease-out",cursor:m?"pointer":"default",userSelect:"none",WebkitUserSelect:"none",MozUserSelect:"none",msUserSelect:"none",WebkitUserDrag:"none",WebkitTouchCallout:"none"}})]})},Oe=["className","variant","size","asChild"],ze=s.cva("inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 ring-offset-background",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",outline:"border border-border bg-transparent hover:bg-accent hover:text-accent-foreground",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90",subtle:"bg-muted text-muted-foreground hover:bg-muted/80",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-10 px-4 py-2",sm:"h-9 rounded-md px-3",lg:"h-11 rounded-md px-8",icon:"h-9 w-9"}},defaultVariants:{variant:"default",size:"default"}}),Ve=c.forwardRef(function(t,r){var a=t.className,o=t.variant,s=t.size,l=t.asChild,c=void 0!==l&&l,u=w(t,Oe),d=c?i.Slot:"button";return e.jsx(d,b({className:n.cn(ze({variant:o,size:s,className:a})),ref:r},u))});function Ue(t){var n="w-5 h-5";switch(t.status){case"ONLINE":return e.jsx("svg",{className:"".concat(n," fw-status-online"),fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M5 13l4 4L19 7"})});case"OFFLINE":return e.jsx("svg",{className:"".concat(n," fw-status-offline"),fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M18.364 5.636a9 9 0 010 12.728m0 0l-2.829-2.829m2.829 2.829L21 21M15.536 8.464a5 5 0 010 7.072m0 0l-2.829-2.829m-4.243 2.829a4.978 4.978 0 01-1.414-2.83m-1.414 5.658a9 9 0 01-2.167-9.238m7.824 2.167a1 1 0 111.414 1.414m-1.414-1.414L3 3m8.293 8.293l1.414 1.414"})});case"INITIALIZING":case"BOOTING":case"WAITING_FOR_DATA":return e.jsxs("svg",{className:"".concat(n," fw-status-warning animate-spin"),fill:"none",viewBox:"0 0 24 24",children:[e.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),e.jsx("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})]});case"SHUTTING_DOWN":return e.jsx("svg",{className:"".concat(n," fw-status-warning"),fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M13 10V3L4 14h7v7l9-11h-7z"})});default:return e.jsx("svg",{className:"".concat(n," fw-status-offline"),fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z"})})}}function We(e){switch(e){case"ONLINE":return"ONLINE";case"OFFLINE":return"OFFLINE";case"INITIALIZING":return"INITIALIZING";case"BOOTING":return"STARTING";case"WAITING_FOR_DATA":return"WAITING";case"SHUTTING_DOWN":return"ENDING";case"ERROR":return"ERROR";case"INVALID":return"INVALID";default:return"STATUS"}}Ve.displayName="Button";var Qe=function(){function n(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,n),(t=function(e,t,n){return t=C(t),function(e,t){if(t&&("object"==typeof t||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,g()?Reflect.construct(t,n||[],C(e).constructor):t.apply(e,n))}(this,n,[e])).handleRetry=function(){var e,n;t.setState({hasError:!1,error:null}),null===(e=(n=t.props).onRetry)||void 0===e||e.call(n)},t.state={hasError:!1,error:null},t}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&j(e,t)}(n,t.Component),r=n,o=[{key:"getDerivedStateFromError",value:function(e){return{hasError:!0,error:e}}}],(a=[{key:"componentDidCatch",value:function(e,t){var n,r;console.error("[PlayerErrorBoundary] Caught error:",e,t),null===(n=(r=this.props).onError)||void 0===n||n.call(r,e,t)}},{key:"render",value:function(){var t;return this.state.hasError?this.props.fallback?this.props.fallback:e.jsxs("div",{className:"fw-player-error flex min-h-[280px] flex-col items-center justify-center gap-4 rounded-xl bg-slate-950 p-6 text-center text-white",children:[e.jsx("div",{className:"text-lg font-semibold text-red-400",children:"Playback Error"}),e.jsx("p",{className:"max-w-sm text-sm text-slate-400",children:(null===(t=this.state.error)||void 0===t?void 0:t.message)||"An unexpected error occurred while loading the player."}),e.jsx(Ve,{type:"button",variant:"secondary",onClick:this.handleRetry,className:"mt-2",children:"Try Again"})]}):this.props.children}}])&&h(r.prototype,a),o&&h(r,o),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,a,o}(),Ye=["className","variant"],Je=s.cva("inline-flex items-center rounded-full border border-transparent px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 ring-offset-background",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/80",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",outline:"border-border text-foreground"}},defaultVariants:{variant:"default"}}),Ge={status:"OFFLINE",isOnline:!1,message:"Connecting...",lastUpdate:0};function He(e,t){return Ze.apply(this,arguments)}function Ze(){return Ze=m(y().m(function e(t,n){var r,a,o,i,s,l,c=arguments;return y().w(function(e){for(;;)switch(e.n){case 0:r=c.length>2&&void 0!==c[2]?c[2]:3,a=c.length>3&&void 0!==c[3]?c[3]:500,o=null,i=y().m(function e(){var i,s,c,u;return y().w(function(e){for(;;)switch(e.p=e.n){case 0:return e.p=0,e.n=1,fetch(t,n);case 1:return i=e.v,e.a(2,{v:i});case 2:if(e.p=2,u=e.v,o=u instanceof Error?u:new Error("Fetch failed"),null===(s=n.signal)||void 0===s||!s.aborted){e.n=3;break}throw o;case 3:if(!(l<r-1)){e.n=4;break}return c=a*Math.pow(2,l),console.warn("[useViewerEndpoints] Retry ".concat(l+1,"/").concat(r-1," after ").concat(c,"ms")),e.n=4,new Promise(function(e){return setTimeout(e,c)});case 4:return e.a(2)}},e,null,[[0,2]])}),l=0;case 1:if(!(l<r)){e.n=4;break}return e.d(A(i()),2);case 2:if(!(s=e.v)){e.n=3;break}return e.a(2,s.v);case 3:l++,e.n=1;break;case 4:throw null!=o?o:new Error("Gateway unreachable after retries");case 5:return e.a(2)}},e)})),Ze.apply(this,arguments)}Object.defineProperty(exports,"GatewayClient",{enumerable:!0,get:function(){return n.GatewayClient}}),Object.defineProperty(exports,"PlayerController",{enumerable:!0,get:function(){return n.PlayerController}}),Object.defineProperty(exports,"PlayerManager",{enumerable:!0,get:function(){return n.PlayerManager}}),Object.defineProperty(exports,"QualityMonitor",{enumerable:!0,get:function(){return n.QualityMonitor}}),Object.defineProperty(exports,"StreamStateClient",{enumerable:!0,get:function(){return n.StreamStateClient}}),Object.defineProperty(exports,"cn",{enumerable:!0,get:function(){return n.cn}}),Object.defineProperty(exports,"globalPlayerManager",{enumerable:!0,get:function(){return n.globalPlayerManager}}),exports.Badge=function(t){var r=t.className,a=t.variant,o=w(t,Ye);return e.jsx("div",b({className:n.cn(Je({variant:a}),r)},o))},exports.Button=Ve,exports.ClosedCaptionsIcon=function(t){var n=t.size,r=void 0===n?16:n,a=t.color,o=void 0===a?"currentColor":a,i=t.className,s=void 0===i?"":i;return e.jsxs("svg",{width:r,height:r,viewBox:"0 0 24 24",fill:"none",className:s,"aria-hidden":"true",children:[e.jsx("rect",{x:"2",y:"4",width:"20",height:"16",rx:"2",ry:"2",stroke:o,strokeWidth:"2",fill:"none"}),e.jsx("path",{d:"M8 10c0-.6.4-1 1-1h1c.6 0 1 .4 1 1v4c0 .6-.4 1-1 1H9c-.6 0-1-.4-1-1v-4zM14 10c0-.6.4-1 1-1h1c.6 0 1 .4 1 1v4c0 .6-.4 1-1 1h-1c-.6 0-1-.4-1-1v-4z",fill:o})]})},exports.DevModePanel=Ce,exports.FullscreenExitIcon=se,exports.FullscreenIcon=ie,exports.FullscreenToggleIcon=fe,exports.IdleScreen=z,exports.LiveIcon=function(t){var n=t.size,r=void 0===n?16:n,a=t.color,o=void 0===a?"currentColor":a,i=t.className,s=void 0===i?"":i;return e.jsxs("svg",{width:r,height:r,viewBox:"0 0 24 24",fill:"none",className:s,"aria-hidden":"true",children:[e.jsx("circle",{cx:"12",cy:"12",r:"3",fill:o}),e.jsx("path",{d:"M12 1v6M12 17v6M4.22 4.22l4.24 4.24M15.54 15.54l4.24 4.24M1 12h6M17 12h6M4.22 19.78l4.24-4.24M15.54 8.46l4.24-4.24",stroke:o,strokeWidth:"2",strokeLinecap:"round"})]})},exports.LoadingScreen=function(n){var r=n.message,a=void 0===r?"Waiting for source...":r,o=t.useRef(null),i=N(t.useState([]),2),s=i[0],l=i[1],c=function(){try{for(var e=new(window.AudioContext||window.webkitAudioContext),t=e.createOscillator(),n=e.createOscillator(),r=e.createBuffer(1,.1*e.sampleRate,e.sampleRate),a=e.createBufferSource(),o=r.getChannelData(0),i=0;i<o.length;i++)o[i]=2*Math.random()-1;a.buffer=r;var s=e.createGain(),l=e.createGain(),c=e.createGain(),u=e.createGain();t.connect(s),n.connect(l),a.connect(c),s.connect(u),l.connect(u),c.connect(u),u.connect(e.destination),t.frequency.setValueAtTime(1800,e.currentTime),t.frequency.exponentialRampToValueAtTime(900,e.currentTime+.08),n.frequency.setValueAtTime(3600,e.currentTime),n.frequency.exponentialRampToValueAtTime(1800,e.currentTime+.04),t.type="triangle",n.type="sine",s.gain.setValueAtTime(0,e.currentTime),s.gain.linearRampToValueAtTime(.4,e.currentTime+.002),s.gain.exponentialRampToValueAtTime(.001,e.currentTime+.12),l.gain.setValueAtTime(0,e.currentTime),l.gain.linearRampToValueAtTime(.3,e.currentTime+.001),l.gain.exponentialRampToValueAtTime(.001,e.currentTime+.06),c.gain.setValueAtTime(0,e.currentTime),c.gain.linearRampToValueAtTime(.2,e.currentTime+.001),c.gain.exponentialRampToValueAtTime(.001,e.currentTime+.01),u.gain.setValueAtTime(.5,e.currentTime);var d=e.currentTime,f=d+.15;t.start(d),n.start(d),a.start(d),t.stop(f),n.stop(f),a.stop(d+.02)}catch(e){console.log("Audio context not available")}};return t.useEffect(function(){var e="loading-screen-animations";if(!document.getElementById(e)){var t=document.createElement("style");t.id=e,t.textContent="\n @keyframes fadeInOut {\n 0%, 100% {\n opacity: 0.6;\n }\n 50% {\n opacity: 0.9;\n }\n }\n\n @keyframes logoPulse {\n 0%, 100% {\n opacity: 0.15;\n transform: scale(1);\n }\n 50% {\n opacity: 0.25;\n transform: scale(1.05);\n }\n }\n\n @keyframes shimmer {\n 0% {\n background-position: -200px 0;\n }\n 100% {\n background-position: calc(200px + 100%) 0;\n }\n }\n\n @keyframes floatUp {\n 0% {\n transform: translateY(100vh) rotate(0deg);\n opacity: 0;\n }\n 10% {\n opacity: 0.6;\n }\n 90% {\n opacity: 0.6;\n }\n 100% {\n transform: translateY(-100px) rotate(360deg);\n opacity: 0;\n }\n }\n\n @keyframes gradientShift {\n 0%, 100% {\n background-position: 0% 50%;\n }\n 50% {\n background-position: 100% 50%;\n }\n }\n\n @keyframes hitmarkerFade {\n 0% {\n opacity: 1;\n transform: scale(0.5);\n }\n 20% {\n opacity: 1;\n transform: scale(1.2);\n }\n 100% {\n opacity: 0;\n transform: scale(1);\n }\n }\n\n @keyframes hitmarkerFade45 {\n 0% {\n opacity: 1;\n transform: translate(-50%, -50%) rotate(45deg) scale(0.5);\n }\n 20% {\n opacity: 1;\n transform: translate(-50%, -50%) rotate(45deg) scale(1.2);\n }\n 100% {\n opacity: 0;\n transform: translate(-50%, -50%) rotate(45deg) scale(1);\n }\n }\n\n @keyframes hitmarkerFadeNeg45 {\n 0% {\n opacity: 1;\n transform: translate(-50%, -50%) rotate(-45deg) scale(0.5);\n }\n 20% {\n opacity: 1;\n transform: translate(-50%, -50%) rotate(-45deg) scale(1.2);\n }\n 100% {\n opacity: 0;\n transform: translate(-50%, -50%) rotate(-45deg) scale(1);\n }\n }\n ",document.head.appendChild(t)}},[]),e.jsxs("div",{ref:o,className:"fw-player-root",style:{position:"relative",width:"100%",height:"100%",minHeight:"300px",background:"\n linear-gradient(135deg,\n hsl(var(--tn-bg-dark, 235 21% 11%)) 0%,\n hsl(var(--tn-bg, 233 23% 17%)) 25%,\n hsl(var(--tn-bg-dark, 235 21% 11%)) 50%,\n hsl(var(--tn-bg, 233 23% 17%)) 75%,\n hsl(var(--tn-bg-dark, 235 21% 11%)) 100%\n )\n ",backgroundSize:"400% 400%",animation:"gradientShift 16s ease-in-out infinite",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",overflow:"hidden",borderRadius:"0",userSelect:"none",WebkitUserSelect:"none",MozUserSelect:"none",msUserSelect:"none"},children:[s.map(function(t){return e.jsxs("div",{style:{position:"absolute",left:"".concat(t.x,"px"),top:"".concat(t.y,"px"),transform:"translate(-50%, -50%)",pointerEvents:"none",zIndex:100,width:"40px",height:"40px"},children:[e.jsx("div",{style:{position:"absolute",top:"25%",left:"25%",width:"12px",height:"3px",backgroundColor:"#ffffff",transform:"translate(-50%, -50%) rotate(45deg)",animation:"hitmarkerFade45 0.6s ease-out forwards",boxShadow:"0 0 8px rgba(255, 255, 255, 0.8)",borderRadius:"1px"}}),e.jsx("div",{style:{position:"absolute",top:"25%",left:"75%",width:"12px",height:"3px",backgroundColor:"#ffffff",transform:"translate(-50%, -50%) rotate(-45deg)",animation:"hitmarkerFadeNeg45 0.6s ease-out forwards",boxShadow:"0 0 8px rgba(255, 255, 255, 0.8)",borderRadius:"1px"}}),e.jsx("div",{style:{position:"absolute",top:"75%",left:"25%",width:"12px",height:"3px",backgroundColor:"#ffffff",transform:"translate(-50%, -50%) rotate(-45deg)",animation:"hitmarkerFadeNeg45 0.6s ease-out forwards",boxShadow:"0 0 8px rgba(255, 255, 255, 0.8)",borderRadius:"1px"}}),e.jsx("div",{style:{position:"absolute",top:"75%",left:"75%",width:"12px",height:"3px",backgroundColor:"#ffffff",transform:"translate(-50%, -50%) rotate(45deg)",animation:"hitmarkerFade45 0.6s ease-out forwards",boxShadow:"0 0 8px rgba(255, 255, 255, 0.8)",borderRadius:"1px"}})]},t.id)}),S(Array(12)).map(function(t,n){return e.jsx("div",{style:{position:"absolute",left:"".concat(100*Math.random(),"%"),width:"".concat(4*Math.random()+2,"px"),height:"".concat(4*Math.random()+2,"px"),borderRadius:"50%",background:["#7aa2f7","#bb9af7","#9ece6a","#73daca","#7dcfff","#f7768e","#e0af68","#2ac3de"][n%8],opacity:0,animation:"floatUp ".concat(8+4*Math.random(),"s linear infinite"),animationDelay:"".concat(8*Math.random(),"s"),pointerEvents:"none",userSelect:"none"}},"particle-".concat(n))}),S(Array(8)).map(function(t,n){return e.jsx(Pe,{index:n},n)}),e.jsx(De,{containerRef:o,onHitmarker:function(e){if(o.current){var t=o.current.getBoundingClientRect(),n=e.clientX-t.left,r=e.clientY-t.top,a={id:Date.now()+Math.random(),x:n,y:r};l(function(e){return[].concat(S(e),[a])}),function(){try{var e=new Audio("data:audio/mpeg;base64,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");e.volume=.3,e.play().catch(function(){c()})}catch(e){c()}}(),setTimeout(function(){l(function(e){return e.filter(function(e){return e.id!==a.id})})},600)}}}),e.jsx(q,{parentRef:o,scale:.08}),e.jsx("div",{style:{position:"absolute",bottom:"20%",left:"50%",transform:"translateX(-50%)",color:"#a9b1d6",fontSize:"16px",fontWeight:"500",textAlign:"center",animation:"fadeInOut 2s ease-in-out infinite",textShadow:"0 2px 4px rgba(36, 40, 59, 0.5)",fontFamily:"-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif",userSelect:"none",WebkitUserSelect:"none",MozUserSelect:"none",msUserSelect:"none",pointerEvents:"none"},children:a}),e.jsx("div",{style:{position:"absolute",top:0,left:0,right:0,bottom:0,background:"\n radial-gradient(circle at 20% 80%, rgba(122, 162, 247, 0.03) 0%, transparent 50%),\n radial-gradient(circle at 80% 20%, rgba(187, 154, 247, 0.03) 0%, transparent 50%),\n radial-gradient(circle at 40% 40%, rgba(158, 206, 106, 0.02) 0%, transparent 50%)\n ",pointerEvents:"none",userSelect:"none"}})]})},exports.PauseIcon=te,exports.PictureInPictureIcon=le,exports.PlayIcon=ee,exports.PlayPauseIcon=ue,exports.Player=function(t){return e.jsx(Be,b({},t))},exports.PlayerContext=J,exports.PlayerControls=he,exports.PlayerErrorBoundary=Qe,exports.PlayerProvider=function(t){var n=t.children,r=Y(t.config);return e.jsx(J.Provider,{value:r,children:n})},exports.SeekToLiveIcon=me,exports.SettingsIcon=ce,exports.SkipBackIcon=ne,exports.SkipForwardIcon=re,exports.Slider=Z,exports.StatsIcon=ve,exports.StatsPanel=U,exports.StreamStateOverlay=function(t){var n=t.status,r=t.message,a=t.percentage,o=t.onRetry,i=t.visible,s=void 0===i||i,l=t.className,c=void 0===l?"":l;if(!s||"ONLINE"===n)return null;var u="ERROR"===n||"INVALID"===n||"OFFLINE"===n,d="INITIALIZING"===n&&void 0!==a;return e.jsx("div",{className:"absolute inset-0 z-20 flex items-center justify-center ".concat(c),style:{backgroundColor:"hsl(var(--tn-bg-dark) / 0.8)",backdropFilter:"blur(4px)"},role:"status","aria-live":"polite",children:e.jsxs("div",{className:"fw-slab w-[280px] max-w-[90%]",style:{backgroundColor:"hsl(var(--tn-bg) / 0.95)"},children:[e.jsxs("div",{className:"fw-slab-header flex items-center gap-2",children:[e.jsx(Ue,{status:n}),e.jsx("span",{children:We(n)})]}),e.jsxs("div",{className:"fw-slab-body",children:[e.jsx("p",{className:"text-sm",style:{color:"hsl(var(--tn-fg))"},children:r}),d&&e.jsxs("div",{className:"mt-3",children:[e.jsx("div",{className:"h-1.5 w-full overflow-hidden",style:{backgroundColor:"hsl(var(--tn-bg-visual))"},children:e.jsx("div",{className:"h-full transition-all duration-300",style:{width:"".concat(Math.min(100,a),"%"),backgroundColor:"hsl(var(--tn-yellow))"}})}),e.jsxs("p",{className:"mt-1.5 text-xs font-mono",style:{color:"hsl(var(--tn-fg-dark))"},children:[Math.round(a),"%"]})]}),"OFFLINE"===n&&e.jsx("p",{className:"mt-2 text-xs",style:{color:"hsl(var(--tn-fg-dark))"},children:"The stream will start when the broadcaster goes live"}),("BOOTING"===n||"WAITING_FOR_DATA"===n)&&e.jsx("p",{className:"mt-2 text-xs",style:{color:"hsl(var(--tn-fg-dark))"},children:"Please wait while the stream prepares..."}),!u&&e.jsxs("div",{className:"mt-3 flex items-center gap-2 text-xs",style:{color:"hsl(var(--tn-fg-dark))"},children:[e.jsx("span",{className:"h-1.5 w-1.5 animate-pulse",style:{backgroundColor:"hsl(var(--tn-cyan))"}}),e.jsx("span",{children:"Checking stream status..."})]})]}),u&&o&&e.jsx("div",{className:"fw-slab-actions",children:e.jsx("button",{type:"button",onClick:o,className:"fw-btn-flush py-2.5 text-xs font-medium uppercase tracking-wide",style:{color:"hsl(var(--tn-blue))"},"aria-label":"Retry connection",children:"Retry Connection"})})]})})},exports.ThumbnailOverlay=function(t){var r=t.thumbnailUrl,a=t.onPlay,o=t.message,i=t.showUnmuteMessage,s=void 0!==i&&i,l=t.style,c=t.className,u=function(e){e.stopPropagation(),null==a||a()};return e.jsxs("div",{role:"button",tabIndex:0,onClick:u,onKeyDown:function(e){"Enter"!==e.key&&" "!==e.key||(e.preventDefault(),u(e))},style:l,className:n.cn("fw-player-thumbnail relative flex h-full min-h-[280px] w-full cursor-pointer items-center justify-center overflow-hidden rounded-xl bg-slate-950 text-foreground outline-none transition focus-visible:ring-2 focus-visible:ring-primary focus-visible:ring-offset-2 focus-visible:ring-offset-background",c),children:[r&&e.jsx("div",{className:"absolute inset-0 bg-cover bg-center",style:{backgroundImage:"url(".concat(r,")")}}),e.jsx("div",{className:n.cn("absolute inset-0 bg-slate-950/70",!r&&"bg-gradient-to-br from-slate-900 via-slate-950 to-slate-900")}),e.jsx("div",{className:"relative z-10 flex max-w-[320px] flex-col items-center gap-4 px-6 text-center text-sm sm:gap-6",children:s?e.jsxs("div",{className:"w-full rounded-lg border border-white/15 bg-black/80 p-4 text-sm text-white shadow-lg backdrop-blur",children:[e.jsxs("div",{className:"mb-1 flex items-center justify-center gap-2 text-base font-semibold text-primary",children:[e.jsx("span",{"aria-hidden":"true",children:"🔇"})," Click to unmute"]}),e.jsx("p",{className:"text-xs text-white/80",children:"Stream is playing muted — tap to enable sound."})]}):e.jsxs(e.Fragment,{children:[e.jsx(Ve,{type:"button",size:"icon",variant:"secondary",className:"h-20 w-20 rounded-full bg-primary/90 text-primary-foreground shadow-lg shadow-primary/40 transition hover:bg-primary focus-visible:bg-primary","aria-label":"Play stream",children:e.jsx("svg",{viewBox:"0 0 24 24",fill:"currentColor",className:"ml-0.5 h-8 w-8","aria-hidden":"true",children:e.jsx("path",{d:"M8 5v14l11-7z"})})}),e.jsxs("div",{className:"w-full rounded-lg border border-white/10 bg-black/70 p-5 text-white shadow-inner backdrop-blur",children:[e.jsx("p",{className:"text-base font-semibold text-primary",children:null!=o?o:"Click to play"}),e.jsx("p",{className:"mt-1 text-xs text-white/70",children:o?"Start streaming instantly":"Jump into the live feed"})]})]})})]})},exports.TitleOverlay=V,exports.VolumeIcon=de,exports.VolumeOffIcon=oe,exports.VolumeUpIcon=ae,exports.useMetaTrack=function(e){var r=e.mistBaseUrl,a=e.streamName,o=e.subscriptions,i=e.enabled,s=void 0===i||i,l=N(t.useState(!1),2),c=l[0],u=l[1],d=N(t.useState("disconnected"),2),f=d[0],v=d[1],m=N(t.useState([]),2),h=m[0],p=m[1],C=t.useRef(null);return t.useEffect(function(){if(!s||!r||!a)return C.current&&(C.current.disconnect(),C.current=null),u(!1),void v("disconnected");C.current=new n.MetaTrackManager({mistBaseUrl:r,streamName:a,subscriptions:o,debug:!1});var e=function(){if(C.current){var e=C.current.getState();v(e),u("connected"===e),p(C.current.getSubscribedTracks())}},t=setInterval(e,500);return C.current.connect(),e(),function(){clearInterval(t),C.current&&(C.current.disconnect(),C.current=null),u(!1),v("disconnected")}},[s,r,a,o]),{isConnected:c,connectionState:f,subscribedTracks:h,subscribe:t.useCallback(function(e,t){if(!C.current)return function(){};var n=C.current.subscribe(e,t);return p(C.current.getSubscribedTracks()),function(){n(),C.current&&p(C.current.getSubscribedTracks())}},[]),unsubscribe:t.useCallback(function(e,t){C.current&&(C.current.unsubscribe(e,t),p(C.current.getSubscribedTracks()))},[]),connect:t.useCallback(function(){var e;null===(e=C.current)||void 0===e||e.connect()},[]),disconnect:t.useCallback(function(){var e;null===(e=C.current)||void 0===e||e.disconnect()},[]),setPlaybackTime:t.useCallback(function(e){var t;null===(t=C.current)||void 0===t||t.setPlaybackTime(e)},[]),onSeek:t.useCallback(function(e){var t;null===(t=C.current)||void 0===t||t.onSeek(e)},[])}},exports.usePlaybackQuality=function(e){var r=e.videoElement,a=e.enabled,o=void 0===a||a,i=e.sampleInterval,s=void 0===i?500:i,l=e.thresholds,c=e.onQualityDegraded,u=N(t.useState(null),2),d=u[0],f=u[1],v=N(t.useState(!1),2),m=v[0],h=v[1],p=t.useRef(null);return t.useEffect(function(){return p.current=new n.QualityMonitor({sampleInterval:s,thresholds:l,onQualityDegraded:c,onSample:f}),function(){var e;null===(e=p.current)||void 0===e||e.stop(),p.current=null}},[s,l,c]),t.useEffect(function(){var e;return o&&r&&p.current?(p.current.start(r),h(!0),function(){var e;null===(e=p.current)||void 0===e||e.stop(),h(!1)}):(null===(e=p.current)||void 0===e||e.stop(),void h(!1))},[r,o]),{quality:d,isMonitoring:m,getCurrentQuality:t.useCallback(function(){var e,t;return null!==(e=null===(t=p.current)||void 0===t?void 0:t.getCurrentQuality())&&void 0!==e?e:null},[]),getAverageQuality:t.useCallback(function(){var e,t;return null!==(e=null===(t=p.current)||void 0===t?void 0:t.getAverageQuality())&&void 0!==e?e:null},[]),getHistory:t.useCallback(function(){var e,t;return null!==(e=null===(t=p.current)||void 0===t?void 0:t.getHistory())&&void 0!==e?e:[]},[]),resetStallCounters:t.useCallback(function(){var e;null===(e=p.current)||void 0===e||e.resetStallCounters()},[]),getTotalStallMs:t.useCallback(function(){var e,t;return null!==(e=null===(t=p.current)||void 0===t?void 0:t.getTotalStallMs())&&void 0!==e?e:0},[])}},exports.usePlayerContext=function(){var e=t.useContext(J);if(!e)throw new Error("usePlayerContext must be used within a PlayerProvider");return e},exports.usePlayerContextOptional=G,exports.usePlayerController=Y,exports.usePlayerSelection=function(e,n){var r=n.streamInfo,a=n.playbackMode,o=n.debug,i=N(t.useState(null),2),s=i[0],l=i[1],c=N(t.useState([]),2),u=c[0],d=c[1],f=N(t.useState(!1),2),v=f[0],m=f[1];return t.useEffect(function(){var t=e.on("selection-changed",function(e){var t;o&&console.log("[usePlayerSelection] Selection changed:",null==e?void 0:e.player,null==e||null===(t=e.source)||void 0===t?void 0:t.type),l(e)}),n=e.on("combinations-updated",function(e){o&&console.log("[usePlayerSelection] Combinations updated:",e.length),d(e),m(!0)});return function(){t(),n()}},[e,o]),t.useEffect(function(){if(!r)return l(null),d([]),void m(!1);e.getAllCombinations(r,a)},[e,r,a]),{selection:s,combinations:u,ready:v,refresh:t.useCallback(function(){r&&(e.invalidateCache(),e.getAllCombinations(r,a))},[e,r,a])}},exports.useStreamState=function(e){var n=e.mistBaseUrl,r=e.streamName,a=e.pollInterval,o=void 0===a?3e3:a,i=e.enabled,s=void 0===i||i,l=e.useWebSocket,c=void 0===l||l,u=e.debug,d=void 0!==u&&u,f=N(t.useState(Ge),2),v=f[0],h=f[1],p=N(t.useState(!1),2),C=p[0],g=p[1],x=t.useRef(null),w=t.useRef(null),k=t.useRef(null),A=t.useRef(!0),j=t.useCallback(function(e){var t;if(A.current)if(e.error){var n=(t=e.error.toLowerCase()).includes("offline")?"OFFLINE":t.includes("initializing")?"INITIALIZING":t.includes("booting")?"BOOTING":t.includes("waiting for data")?"WAITING_FOR_DATA":t.includes("shutting down")?"SHUTTING_DOWN":t.includes("invalid")?"INVALID":"ERROR",r=e.on_error||function(e,t){switch(e){case"ONLINE":return"Stream is online";case"OFFLINE":return"Stream is offline";case"INITIALIZING":return void 0!==t?"Initializing... ".concat(Math.round(10*t)/10,"%"):"Stream is initializing";case"BOOTING":return"Stream is starting up";case"WAITING_FOR_DATA":return"Waiting for stream data";case"SHUTTING_DOWN":return"Stream is shutting down";case"INVALID":return"Stream status is invalid";default:return"Stream error"}}(n,e.perc);h(function(t){return{status:n,isOnline:!1,message:r,percentage:e.perc,lastUpdate:Date.now(),error:e.error,streamInfo:t.streamInfo}})}else h(function(t){var n,r,a,o,i=b(b(b({},t.streamInfo),e),{},{source:e.source||(null===(n=t.streamInfo)||void 0===n?void 0:n.source),meta:b(b(b({},null===(r=t.streamInfo)||void 0===r?void 0:r.meta),e.meta),{},{tracks:(null===(a=e.meta)||void 0===a?void 0:a.tracks)||(null===(o=t.streamInfo)||void 0===o||null===(o=o.meta)||void 0===o?void 0:o.tracks)})});return{status:"ONLINE",isOnline:!0,message:"Stream is online",lastUpdate:Date.now(),streamInfo:i}})},[]),S=t.useCallback(m(y().m(function e(){var t,a,i,l,u,d,f;return y().w(function(e){for(;;)switch(e.p=e.n){case 0:if(A.current&&s){e.n=1;break}return e.a(2);case 1:return e.p=1,t="".concat(n.replace(/\/$/,""),"/json_").concat(encodeURIComponent(r),".js"),a="".concat(t,"?metaeverywhere=1&inclzero=1"),e.n=2,fetch(a,{method:"GET",headers:{Accept:"application/json"}});case 2:if((i=e.v).ok){e.n=3;break}throw new Error("HTTP ".concat(i.status));case 3:return e.n=4,i.text();case 4:l=e.v,(u=l.match(/^[^(]+\(([\s\S]*)\);?$/))&&(l=u[1]),d=JSON.parse(l),j(d),e.n=7;break;case 5:if(e.p=5,f=e.v,A.current){e.n=6;break}return e.a(2);case 6:h(function(e){return b(b({},e),{},{status:"ERROR",isOnline:!1,message:f instanceof Error?f.message:"Connection failed",lastUpdate:Date.now(),error:f instanceof Error?f.message:"Unknown error"})});case 7:A.current&&s&&!c&&(w.current=setTimeout(S,o));case 8:return e.a(2)}},e,null,[[1,5]])})),[n,r,s,c,o,j]),L=t.useCallback(function(){if(A.current&&s&&c){k.current&&(clearTimeout(k.current),k.current=null),x.current&&(x.current.close(),x.current=null);try{var e=n.replace(/^http:/,"ws:").replace(/^https:/,"wss:").replace(/\/$/,""),t="".concat(e,"/json_").concat(encodeURIComponent(r),".js?metaeverywhere=1&inclzero=1"),a=new WebSocket(t);x.current=a,k.current=setTimeout(function(){a.readyState<=WebSocket.OPEN&&(d&&console.debug("[useStreamState] WebSocket timeout (5s), falling back to HTTP polling"),a.close(),S())},5e3),a.onopen=function(){d&&console.debug("[useStreamState] WebSocket connected"),g(!0)},a.onmessage=function(e){k.current&&(clearTimeout(k.current),k.current=null);try{var t=JSON.parse(e.data);j(t)}catch(e){console.warn("[useStreamState] Failed to parse WebSocket message:",e)}},a.onerror=function(e){console.warn("[useStreamState] WebSocket error, falling back to HTTP polling"),k.current&&(clearTimeout(k.current),k.current=null),a.close()},a.onclose=function(){x.current=null,g(!1),A.current&&s&&(d&&console.debug("[useStreamState] WebSocket closed, starting HTTP polling"),S())}}catch(e){console.warn("[useStreamState] WebSocket connection failed:",e),S()}}},[n,r,s,c,d,j,S]),E=t.useCallback(function(){var e;c&&(null===(e=x.current)||void 0===e?void 0:e.readyState)===WebSocket.OPEN||S()},[c,S]);return t.useEffect(function(){if(A.current=!0,s&&n&&r){h(b(b({},Ge),{},{message:"Connecting...",lastUpdate:Date.now()}));var e=function(){var e=m(y().m(function e(){return y().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,S();case 1:c&&A.current&&L();case 2:return e.a(2)}},e)}));return function(){return e.apply(this,arguments)}}();return e(),function(){A.current=!1,d&&console.debug("[useStreamState] cleanup starting, mountedRef set to false"),k.current&&(clearTimeout(k.current),k.current=null),x.current&&(x.current.onclose=null,x.current.onerror=null,x.current.onmessage=null,x.current.onopen=null,x.current.close(),x.current=null),w.current&&(clearTimeout(w.current),w.current=null)}}h(Ge)},[s,n,r,c,d,L,S]),b(b({},v),{},{refetch:E,socketRef:x,socketReady:C})},exports.useTelemetry=function(e){var r,a,o=e.enabled,i=e.endpoint,s=e.interval,l=e.authToken,c=e.batchSize,u=e.videoElement,d=e.contentId,f=e.contentType,v=e.playerType,m=e.protocol,h=e.getQuality,p=t.useRef(null);t.useEffect(function(){var e;return o&&i&&d?(p.current=new n.TelemetryReporter({endpoint:i,authToken:l,interval:s,batchSize:c,contentId:d,contentType:f,playerType:v,protocol:m}),function(){var e;null===(e=p.current)||void 0===e||e.stop(),p.current=null}):(null===(e=p.current)||void 0===e||e.stop(),void(p.current=null))},[o,i,l,s,c,d,f,v,m]),t.useEffect(function(){if(o&&u&&p.current)return p.current.start(u,h),function(){var e;null===(e=p.current)||void 0===e||e.stop()}},[o,u,h]);var C=t.useCallback(function(e,t){var n;null===(n=p.current)||void 0===n||n.recordError(e,t)},[]),g=t.useCallback(function(){var e,t;return null!==(e=null===(t=p.current)||void 0===t?void 0:t.getSessionId())&&void 0!==e?e:null},[]),x=t.useCallback(function(){var e,t;return null!==(e=null===(t=p.current)||void 0===t?void 0:t.isActive())&&void 0!==e&&e},[]);return{sessionId:null!==(r=null===(a=p.current)||void 0===a?void 0:a.getSessionId())&&void 0!==r?r:null,recordError:C,getSessionId:g,isActive:x}},exports.useViewerEndpoints=function(e){var n=e.gatewayUrl;e.contentType;var r=e.contentId,a=e.authToken,o=N(t.useState(null),2),i=o[0],s=o[1],l=N(t.useState("idle"),2),c=l[0],u=l[1],d=N(t.useState(null),2),f=d[0],v=d[1],h=t.useRef(null);return t.useEffect(function(){var e;if(n&&r){u("loading"),v(null),null===(e=h.current)||void 0===e||e.abort();var t=new AbortController;return h.current=t,m(y().m(function e(){var o,i,l,c,d,f,m,h,p,C,g;return y().w(function(e){for(;;)switch(e.p=e.n){case 0:return e.p=0,c=n.replace(/\/$/,""),e.n=1,He(c,{method:"POST",headers:b({"Content-Type":"application/json"},a?{Authorization:"Bearer ".concat(a)}:{}),body:JSON.stringify({query:"\n query ResolveViewer($contentId: String!) {\n resolveViewerEndpoint(contentId: $contentId) {\n primary { nodeId baseUrl protocol url geoDistance loadScore outputs }\n fallbacks { nodeId baseUrl protocol url geoDistance loadScore outputs }\n metadata { contentType contentId title description durationSeconds status isLive viewers recordingSizeBytes clipSource createdAt }\n }\n }\n ",variables:{contentId:r}}),signal:t.signal});case 1:if((d=e.v).ok){e.n=2;break}throw new Error("Gateway GQL error ".concat(d.status));case 2:return e.n=3,d.json();case 3:if(f=e.v,null===(o=f.errors)||void 0===o||!o.length){e.n=4;break}throw new Error((null===(i=f.errors[0])||void 0===i?void 0:i.message)||"GraphQL error");case 4:if(m=null===(l=f.data)||void 0===l?void 0:l.resolveViewerEndpoint,h=null==m?void 0:m.primary,p=Array.isArray(null==m?void 0:m.fallbacks)?m.fallbacks:[],h){e.n=5;break}throw new Error("No endpoints");case 5:if(h.outputs&&"string"==typeof h.outputs)try{h.outputs=JSON.parse(h.outputs)}catch(e){}p&&p.forEach(function(e){if(e.outputs&&"string"==typeof e.outputs)try{e.outputs=JSON.parse(e.outputs)}catch(e){}}),s({primary:h,fallbacks:p,metadata:null==m?void 0:m.metadata}),u("ready"),e.n=8;break;case 6:if(e.p=6,g=e.v,!t.signal.aborted){e.n=7;break}return e.a(2);case 7:C=g instanceof Error?g.message:"Unknown gateway error",console.error("[useViewerEndpoints] Gateway resolution failed:",C),v(C),u("error");case 8:return e.a(2)}},e,null,[[0,6]])}))(),function(){return t.abort()}}},[n,r,a]),{endpoints:i,status:c,error:f}};
2
2
  //# sourceMappingURL=index.js.map