1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7390],{23312:function(e,t,n){var s=n(85893);n(67294),t.Z=function(e){let{color:t="white",width:n=24,height:r=24}=e;return(0,s.jsxs)("svg",{width:n,height:r,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,s.jsx)("path",{d:"M16 4L16 20.0235",stroke:t,"stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"}),(0,s.jsx)("path",{d:"M8 4L8 20.0235",stroke:t,"stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"})]})}},44710:function(e,t,n){var s=n(85893);n(67294),t.Z=function(e){let{color:t="white",width:n=24,height:r=24}=e;return(0,s.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:n,height:r,viewBox:"0 0 24 24",fill:"none",children:(0,s.jsx)("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M8.06943 19.7662L18.3807 13.1512C18.7666 12.8973 19 12.4589 19 11.9881C19 11.5173 18.7666 11.0789 18.3807 10.825L8.03401 4.21004C7.62651 3.94603 7.1117 3.92981 6.68921 4.16758C6.26671 4.40542 6.00287 4.85991 6.00009 5.35494V18.6213C5.99439 19.1283 6.26307 19.5967 6.69756 19.8371C7.13206 20.0775 7.66054 20.0502 8.06943 19.7662Z",stroke:t,"stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"})})}},41680:function(e,t,n){var s=n(85893);n(67294),t.Z=function(e){let{color:t="#F11A42",width:n=24,height:r=24}=e;return(0,s.jsxs)("svg",{width:n,height:r,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,s.jsx)("path",{d:"M7.26666 8.88865H3.88806C3.78514 8.88865 3.68643 8.92952 3.61365 9.00234C3.5409 9.07508 3.5 9.17379 3.5 9.27671V14.7096C3.5 14.8125 3.5409 14.9112 3.61365 14.9839C3.68643 15.0568 3.78514 15.0976 3.88806 15.0976H7.26666C7.446 15.0977 7.61979 15.16 7.75851 15.2737L12.1955 18.9118C12.2533 18.9544 12.3219 18.98 12.3935 18.9859C12.4651 18.9918 12.5369 18.9778 12.601 18.9453C12.665 18.9128 12.7188 18.8632 12.7563 18.802C12.7938 18.7407 12.8136 18.6703 12.8135 18.5984V5.38781C12.8134 5.3161 12.7935 5.24577 12.7559 5.18467C12.7183 5.12361 12.6645 5.07411 12.6005 5.04172C12.5365 5.00937 12.4647 4.99539 12.3932 5.00133C12.3217 5.00731 12.2533 5.03293 12.1955 5.07546L7.75851 8.71351C7.61968 8.82696 7.44588 8.88881 7.26666 8.88865Z",stroke:t,"stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"}),(0,s.jsx)("path",{d:"M16.7227 15.0982C17.1951 14.1567 17.4988 13.1186 17.4988 11.9937C17.4988 10.8533 17.2077 9.8399 16.7227 8.88916",stroke:t,"stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"}),(0,s.jsx)("path",{d:"M18.9492 17.4263C19.8941 15.7771 20.5015 14.3218 20.5015 11.9934C20.5015 9.66501 19.9194 8.22437 18.9492 6.56055",stroke:t,"stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"}),(0,s.jsx)("line",{x1:"20",y1:"4.06066",x2:"3.06066",y2:"21",stroke:t,"stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"})]})}},47864:function(e,t,n){var s=n(85893);n(67294),t.Z=function(e){let{color:t="white",width:n=20,height:r=16}=e;return(0,s.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:n,height:r,viewBox:"0 0 20 16",fill:"none",children:[(0,s.jsx)("path",{d:"M5.26666 4.88865H1.88806C1.78514 4.88865 1.68643 4.92952 1.61365 5.00234C1.5409 5.07508 1.5 5.17379 1.5 5.27671V10.7096C1.5 10.8125 1.5409 10.9112 1.61365 10.9839C1.68643 11.0568 1.78514 11.0976 1.88806 11.0976H5.26666C5.446 11.0977 5.61979 11.16 5.75851 11.2737L10.1955 14.9118C10.2533 14.9544 10.3219 14.98 10.3935 14.9859C10.4651 14.9918 10.5369 14.9778 10.601 14.9453C10.665 14.9128 10.7188 14.8632 10.7563 14.802C10.7938 14.7407 10.8136 14.6703 10.8135 14.5984V1.38781C10.8134 1.3161 10.7935 1.24577 10.7559 1.18467C10.7183 1.12361 10.6645 1.07411 10.6005 1.04172C10.5365 1.00937 10.4647 0.995393 10.3932 1.00133C10.3217 1.00731 10.2533 1.03293 10.1955 1.07546L5.75851 4.71351C5.61968 4.82696 5.44588 4.88881 5.26666 4.88865Z",stroke:t,"stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"}),(0,s.jsx)("path",{d:"M14.7227 11.0982C15.1951 10.1567 15.4988 9.11856 15.4988 7.99367C15.4988 6.85325 15.2077 5.8399 14.7227 4.88916",stroke:t,"stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"}),(0,s.jsx)("path",{d:"M16.9492 13.4263C17.8941 11.7771 18.5015 10.3218 18.5015 7.99344C18.5015 5.66501 17.9194 4.22437 16.9492 2.56055",stroke:t,"stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"})]})}},78579:function(e,t,n){var s=n(85893),r=n(93041),i=n(67294),o=n(58728),a=n(23312),l=n(44710),u=n(41680),c=n(47864),d=n(31534);t.Z=e=>{let{hlsUrl:t,title:n,className:p="",showControls:h=!0,autoPlay:m=!1,muted:f=!1,setShowVideo:v}=e,g=(0,i.useRef)(null),x=(0,i.useRef)(null),[w,b]=(0,i.useState)(!1),[y,k]=(0,i.useState)(f),[j,C]=(0,i.useState)(0),[M,N]=(0,i.useState)(0),[S,E]=(0,i.useState)(!0),[T,L]=(0,i.useState)(null);(0,i.useEffect)(()=>
1{if(!g.current)return;let e=g.current;if(x.current&&(x.current.destroy(),x.current=null),r.ZP.isSupported()){let n=new r.ZP({enableWorker:!0,lowLatencyMode:!0,backBufferLength:90});x.current=n,n.on(r.ZP.Events.MEDIA_ATTACHED,()=>{console.log("HLS media attached"),n.loadSource(t)}),n.on(r.ZP.Events.MANIFEST_PARSED,()=>{console.log("HLS manifest parsed"),E(!1),L(null),m&&e.play().catch(e=>{console.warn("Autoplay failed:",e)})}),n.on(r.ZP.Events.ERROR,(e,t)=>{console.error("HLS error:",t),L("Video playback error: ".concat(t.details)),E(!1)}),n.attachMedia(e)}else e.canPlayType("application/vnd.apple.mpegurl")?e.src=t:L("HLS is not supported in this browser"),E(!1);return()=>{x.current&&(x.current.destroy(),x.current=null)}},[t,m]),(0,i.useEffect)(()=>{let e=g.current;if(!e)return;let t=()=>b(!0),n=()=>b(!1),s=()=>C(e.currentTime),r=()=>N(e.duration),i=()=>E(!0),o=()=>E(!1);return e.addEventListener("play",t),e.addEventListener("pause",n),e.addEventListener("timeupdate",s),e.addEventListener("loadedmetadata",r),e.addEventListener("loadstart",i),e.addEventListener("canplay",o),()=>{e.removeEventListener("play",t),e.removeEventListener("pause",n),e.removeEventListener("timeupdate",s),e.removeEventListener("loadedmetadata",r),e.removeEventListener("loadstart",i),e.removeEventListener("canplay",o)}},[]);let D=e=>"".concat(Math.floor(e/60),":").concat(Math.floor(e%60).toString().padStart(2,"0"));return t?T?(0,s.jsx)("div",{className:"flex h-64 items-center justify-center bg-gray-100 ".concat(p),children:(0,s.jsxs)("div",{className:"text-center",children:[(0,s.jsx)("p",{className:"mb-2 text-red-500",children:"Error loading video"}),(0,s.jsx)("p",{className:"text-sm text-gray-500",children:T})]})}):(0,s.jsxs)("div",{className:"group relative overflow-hidden rounded-lg bg-black pb-24 pt-14 ".concat(p),children:[(0,s.jsx)("video",{ref:g,className:"h-full w-full object-contain",muted:y,playsInline:!0,controls:!h}),S&&(0,s.jsx)("div",{className:"absolute inset-0 flex items-center justify-center bg-black bg-opacity-50",children:(0,s.jsx)("div",{className:"h-12 w-12 animate-spin rounded-full border-b-2 border-white"})}),h&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)("div",{className:"absolute left-4 top-4 hidden items-center gap-2 group-hover:flex",children:[v&&(0,s.jsx)(d.Z,{onClick:()=>{var e;null===(e=g.current)||void 0===e||e.pause(),v(!1)},children:(0,s.jsx)(o.Z,{color:"#FFFFFF"})}),(0,s.jsx)("span",{className:"rounded bg-black bg-opacity-50 px-2 py-1 text-sm font-medium text-white",children:n})]}),(0,s.jsxs)("div",{className:"absolute bottom-12 left-1/2 hidden -translate-x-1/2 transform gap-2 group-hover:flex",children:[(0,s.jsx)(d.Z,{onClick:()=>{g.current&&(g.current.muted=!g.current.muted,k(!y))},children:y?(0,s.jsx)(u.Z,{}):(0,s.jsx)(c.Z,{})}),(0,s.jsx)(d.Z,{onClick:()=>{g.current&&(w?g.current.pause():g.current.play().catch(e=>{console.error("Failed to play video:",e),L("Failed to play video")}))},children:w?(0,s.jsx)(a.Z,{}):(0,s.jsx)(l.Z,{})})]}),(0,s.jsxs)("div",{className:"absolute bottom-0 left-0 right-0 bg-gradient-to-t from-black to-transparent p-4",children:[(0,s.jsx)("div",{className:"h-1 w-full cursor-pointer rounded bg-gray-600",onClick:e=>{if(!g.current||!M)return;let t=e.currentTarget.getBoundingClientRect(),n=(e.clientX-t.left)/t.width;g.current.currentTime=n*M},children:(0,s.jsx)("div",{className:"h-full rounded bg-white",style:{width:"".concat(M?j/M*100:0,"%")}})}),(0,s.jsxs)("div",{className:"mt-1 flex justify-between text-xs text-white",children:[(0,s.jsx)("span",{children:D(j)}),(0,s.jsx)("span",{children:D(M)})]})]})]})]}):(0,s.jsx)("div",{className:"flex h-64 items-center justify-center bg-gray-100 ".concat(p),children:(0,s.jsx)("p",{className:"text-gray-500",children:"No video available"})})}},92821:function(e,t,n){n.d(t,{Z:function(){return h}});var s=n(85893),r=n(67294),i=n(94578);function o(e){return e&&e.stopPropagation&&e.stopPropagation(),e&&e.preventDefault&&e.preventDefault(),!1}function a(e){return null==e?[]:Array.isArray(e)?e.slice():[e]}function l(e){return null!==e&&1===e.length?e[0]:e.slice()}function u(e){Object.keys(e).forEach(t=>{"undefined"!=typeof document&&document.addEventListener(t,e[t],!1)})}function c(e,t){let n;return d(((n=e)<=t.min&&(n=t.min),n>=t.max&&(n=t.max),n),t)}function d(e,t){let n=(e-t.min)%t.step,s=e-n;return 2*Math.abs(n)>=t.step&&(s+=n>0?t.step:-t.step),parseFloat(s.toFixed(5))}let p=function(e){function t(t){var n;(n=e.call(this,t)||this).onKeyUp=()=>{n.onEnd()},n.onMouseUp=()=>{n.onEnd(n.getMouseEventMap())},n.onTouchEnd=e=>{e.preventDefault(),n.onEnd(n.getTouchEventMap())},n.onBlur=()=>{n.setState({index:-1},n.onEnd(n.getKeyDownEventMap()))},n.onMouseMove=e=>
1{n.setState({pending:!0});let t=n.getMousePosition(e),s=n.getDiffPosition(t[0]),r=n.getValueFromPosition(s);n.move(r)},n.onTouchMove=e=>{if(e.touches.length>1)return;n.setState({pending:!0});let t=n.getTouchPosition(e);if(void 0===n.isScrolling){let e=t[0]-n.startPosition[0],s=t[1]-n.startPosition[1];n.isScrolling=Math.abs(s)>Math.abs(e)}if(n.isScrolling)return void n.setState({index:-1});let s=n.getDiffPosition(t[0]),r=n.getValueFromPosition(s);n.move(r)},n.onKeyDown=e=>{if(!(e.ctrlKey||e.shiftKey||e.altKey||e.metaKey))switch(n.setState({pending:!0}),e.key){case"ArrowLeft":case"ArrowDown":case"Left":case"Down":e.preventDefault(),n.moveDownByStep();break;case"ArrowRight":case"ArrowUp":case"Right":case"Up":e.preventDefault(),n.moveUpByStep();break;case"Home":e.preventDefault(),n.move(n.props.min);break;case"End":e.preventDefault(),n.move(n.props.max);break;case"PageDown":e.preventDefault(),n.moveDownByStep(n.props.pageFn(n.props.step));break;case"PageUp":e.preventDefault(),n.moveUpByStep(n.props.pageFn(n.props.step))}},n.onSliderMouseDown=e=>{if(!n.props.disabled&&2!==e.button){if(n.setState({pending:!0}),!n.props.snapDragDisabled){let t=n.getMousePosition(e);n.forceValueFromPosition(t[0],e=>{n.start(e,t[0]),u(n.getMouseEventMap())})}o(e)}},n.onSliderClick=e=>{if(!n.props.disabled&&n.props.onSliderClick&&!n.hasMoved){let t=n.getMousePosition(e),s=c(n.calcValue(n.calcOffsetFromPosition(t[0])),n.props);n.props.onSliderClick(s)}},n.createOnKeyDown=e=>t=>{n.props.disabled||(n.start(e),u(n.getKeyDownEventMap()),o(t))},n.createOnMouseDown=e=>t=>{if(n.props.disabled||2===t.button)return;n.setState({pending:!0});let s=n.getMousePosition(t);n.start(e,s[0]),u(n.getMouseEventMap()),o(t)},n.createOnTouchStart=e=>t=>{if(n.props.disabled||t.touches.length>1)return;n.setState({pending:!0});let s=n.getTouchPosition(t);n.startPosition=s,n.isScrolling=void 0,n.start(e,s[0]),u(n.getTouchEventMap()),t.stopPropagation&&t.stopPropagation()},n.handleResize=()=>{let e=window.setTimeout(()=>{n.pendingResizeTimeouts.shift(),n.resize()},0);n.pendingResizeTimeouts.push(e)},n.renderThumb=(e,t)=>{let s=n.props.thumbClassName+" "+n.props.thumbClassName+"-"+t+" "+(n.state.index===t?n.props.thumbActiveClassName:""),r={ref:e=>{n["thumb"+t]=e},key:n.props.thumbClassName+"-"+t,className:s,style:e,onMouseDown:n.createOnMouseDown(t),onTouchStart:n.createOnTouchStart(t),onFocus:n.createOnKeyDown(t),tabIndex:0,role:"slider","aria-orientation":n.props.orientation,"aria-valuenow":n.state.value[t],"aria-valuemin":n.props.min,"aria-valuemax":n.props.max,"aria-label":Array.isArray(n.props.ariaLabel)?n.props.ariaLabel[t]:n.props.ariaLabel,"aria-labelledby":Array.isArray(n.props.ariaLabelledby)?n.props.ariaLabelledby[t]:n.props.ariaLabelledby,"aria-disabled":n.props.disabled},i={index:t,value:l(n.state.value),valueNow:n.state.value[t]};return n.props.ariaValuetext&&(r["aria-valuetext"]="string"==typeof n.props.ariaValuetext?n.props.ariaValuetext:n.props.ariaValuetext(i)),n.props.renderThumb(r,i)},n.renderTrack=(e,t,s)=>{let r={key:n.props.trackClassName+"-"+e,className:n.props.trackClassName+" "+n.props.trackClassName+"-"+e,style:n.buildTrackStyle(t,n.state.upperBound-s)},i={index:e,value:l(n.state.value)};return n.props.renderTrack(r,i)};let s=a(t.value);s.length||(s=a(t.defaultValue)),n.pendingResizeTimeouts=[];let i=[];for(let e=0;e<s.length;e+=1)s[e]=c(s[e],t),i.push(e);return n.resizeObserver=null,n.resizeElementRef=r.createRef(),n.state={index:-1,upperBound:0,sliderLength:0,value:s,zIndices:i},n}(0,i.Z)(t,e);var n=t.prototype;return n.componentDidMount=function(){"undefined"!=typeof window&&(this.resizeObserver=new ResizeObserver(this.handleResize),this.resizeObserver.observe(this.resizeElementRef.current),this.resize())},t.getDerivedStateFromProps=function(e,t){let n=a(e.value);return n.length?t.pending?null:{value:n.map(t=>c(t,e))}:null},n.componentDidUpdate=function(){0===this.state.upperBound&&this.resize()},n.componentWillUnmount=function(){this.clearPendingResizeTimeouts(),this.resizeObserver&&this.resizeObserver.disconnect()},n.onEnd=function(e){e&&function(e){Object.keys(e).forEach(t=>{"undefined"!=typeof document&&document.removeEventListener(t,e[t],!1)})}(e),this.hasMoved&&this.fireChangeEvent("onAfterChange"),this.setState({pen
1ding:!1}),this.hasMoved=!1},n.getValue=function(){return l(this.state.value)},n.getClosestIndex=function(e){let t=Number.MAX_VALUE,n=-1,{value:s}=this.state,r=s.length;for(let i=0;i<r;i+=1){let r=Math.abs(e-this.calcOffset(s[i]));r<t&&(t=r,n=i)}return n},n.getMousePosition=function(e){return[e["page"+this.axisKey()],e["page"+this.orthogonalAxisKey()]]},n.getTouchPosition=function(e){let t=e.touches[0];return[t["page"+this.axisKey()],t["page"+this.orthogonalAxisKey()]]},n.getKeyDownEventMap=function(){return{keydown:this.onKeyDown,keyup:this.onKeyUp,focusout:this.onBlur}},n.getMouseEventMap=function(){return{mousemove:this.onMouseMove,mouseup:this.onMouseUp}},n.getTouchEventMap=function(){return{touchmove:this.onTouchMove,touchend:this.onTouchEnd}},n.getValueFromPosition=function(e){let t=e/(this.state.sliderLength-this.state.thumbSize)*(this.props.max-this.props.min);return c(this.state.startValue+t,this.props)},n.getDiffPosition=function(e){let t=e-this.state.startPosition;return this.props.invert&&(t*=-1),t},n.resize=function(){let{slider:e,thumb0:t}=this;if(!e||!t)return;let n=this.sizeKey(),s=e.getBoundingClientRect(),r=e[n],i=s[this.posMaxKey()],o=s[this.posMinKey()],a=t.getBoundingClientRect()[n.replace("client","").toLowerCase()],l=r-a,u=Math.abs(i-o);this.state.upperBound===l&&this.state.sliderLength===u&&this.state.thumbSize===a||this.setState({upperBound:l,sliderLength:u,thumbSize:a})},n.calcOffset=function(e){let t=this.props.max-this.props.min;return 0===t?0:(e-this.props.min)/t*this.state.upperBound},n.calcValue=function(e){return e/this.state.upperBound*(this.props.max-this.props.min)+this.props.min},n.calcOffsetFromPosition=function(e){let{slider:t}=this,n=t.getBoundingClientRect(),s=n[this.posMaxKey()],r=n[this.posMinKey()],i=e-(window["page"+this.axisKey()+"Offset"]+(this.props.invert?s:r));return this.props.invert&&(i=this.state.sliderLength-i),i-=this.state.thumbSize/2},n.forceValueFromPosition=function(e,t){let n=this.calcOffsetFromPosition(e),s=this.getClosestIndex(n),r=c(this.calcValue(n),this.props),i=this.state.value.slice();i[s]=r;for(let e=0;e<i.length-1;e+=1)if(i[e+1]-i[e]<this.props.minDistance)return;this.fireChangeEvent("onBeforeChange"),this.hasMoved=!0,this.setState({value:i},()=>{t(s),this.fireChangeEvent("onChange")})},n.clearPendingResizeTimeouts=function(){do clearTimeout(this.pendingResizeTimeouts.shift());while(this.pendingResizeTimeouts.length)},n.start=function(e,t){let n=this["thumb"+e];n&&n.focus();let{zIndices:s}=this.state;s.splice(s.indexOf(e),1),s.push(e),this.setState(n=>({startValue:n.value[e],startPosition:void 0!==t?t:n.startPosition,index:e,zIndices:s}))},n.moveUpByStep=function(e){void 0===e&&(e=this.props.step);let t=this.state.value[this.state.index],n=c(this.props.invert&&"horizontal"===this.props.orientation?t-e:t+e,this.props);
1this.move(Math.min(n,this.props.max))},n.moveDownByStep=function(e){void 0===e&&(e=this.props.step);let t=this.state.value[this.state.index],n=c(this.props.invert&&"horizontal"===this.props.orientation?t+e:t-e,this.props);this.move(Math.max(n,this.props.min))},n.move=function(e){let t=this.state.value.slice(),{index:n}=this.state,{length:s}=t,r=t[n];if(e===r)return;this.hasMoved||this.fireChangeEvent("onBeforeChange"),this.hasMoved=!0;let{pearling:i,max:o,min:a,minDistance:l}=this.props;if(!i){if(n>0){let s=t[n-1];e<s+l&&(e=s+l)}if(n<s-1){let s=t[n+1];e>s-l&&(e=s-l)}}t[n]=e,i&&s>1&&(e>r?(this.pushSucceeding(t,l,n),function(e,t,n,s){for(let r=0;r<e;r+=1){let i=s-r*n;t[e-1-r]>i&&(t[e-1-r]=i)}}(s,t,l,o)):e<r&&(this.pushPreceding(t,l,n),function(e,t,n,s){for(let r=0;r<e;r+=1){let e=s+r*n;t[r]<e&&(t[r]=e)}}(s,t,l,a))),this.setState({value:t},this.fireChangeEvent.bind(this,"onChange"))},n.pushSucceeding=function(e,t,n){let s,r;for(r=e[s=n]+t;null!==e[s+1]&&r>e[s+1];s+=1,r=e[s]+t)e[s+1]=d(r,this.props)},n.pushPreceding=function(e,t,n){for(let s=n,r=e[s]-t;null!==e[s-1]&&r<e[s-1];s-=1,r=e[s]-t)e[s-1]=d(r,this.props)},n.axisKey=function(){return"vertical"===this.props.orientation?"Y":"X"},n.orthogonalAxisKey=function(){return"vertical"===this.props.orientation?"X":"Y"},n.posMinKey=function(){return"vertical"===this.props.orientation?this.props.invert?"bottom":"top":this.props.invert?"right":"left"},n.posMaxKey=function(){return"vertical"===this.props.orientation?this.props.invert?"top":"bottom":this.props.invert?"left":"right"},n.sizeKey=function(){return"vertical"===this.props.orientation?"clientHeight":"clientWidth"},n.fireChangeEvent=function(e){this.props[e]&&this.props[e](l(this.state.value),this.state.index)},n.buildThumbStyle=function(e,t){let n={position:"absolute",touchAction:"none",willChange:this.state.index>=0?this.posMinKey():void 0,zIndex:this.state.zIndices.indexOf(t)+1};return n[this.posMinKey()]=e+"px",n},n.buildTrackStyle=function(e,t){let n={position:"absolute",willChange:this.state.index>=0?this.posMinKey()+","+this.posMaxKey():void 0};return n[this.posMinKey()]=e,n[this.posMaxKey()]=t,n},n.buildMarkStyle=function(e){var t;return(t={position:"absolute"})[this.posMinKey()]=e,t},n.renderThumbs=function(e){let{length:t}=e,n=[];for(let s=0;s<t;s+=1)n[s]=this.buildThumbStyle(e[s],s);let s=[];for(let e=0;e<t;e+=1)s[e]=this.renderThumb(n[e],e);return s},n.renderTracks=function(e){let t=[],n=e.length-1;t.push(this.renderTrack(0,0,e[0]));for(let s=0;s<n;s+=1)t.push(this.renderTrack(s+1,e[s],e[s+1]));return t.push(this.renderTrack(n+1,e[n],this.state.upperBound)),t},n.renderMarks=function(){let{marks:e}=this.props,t=this.props.max-this.props.min+1;return"boolean"==typeof e?e=Array.from({length:t}).map((e,t)=>t):"number"==typeof e&&(e=Array.from({length:t}).map((e,t)=>t).filter(t=>t%e==0)),e.map(parseFloat).sort((e,t)=>e-t).map(e=>{let t=this.calcOffset(e),n={key:e,className:this.props.markClassName,style:this.buildMarkStyle(t)};return this.props.renderMark(n)})},n.render=function(){let e=[],{value:t}=this.state,n=t.length;for(let s=0;s<n;s+=1)e[s]=this.calcOffset(t[s],s);let s=this.props.withTracks?this.renderTracks(e):null,i=this.renderThumbs(e),o=this.props.marks?this.renderMarks():null;return r.createElement("div",{ref:e=>{this.slider=e,this.resizeElementRef.current=e},style:{position:"relative"},className:this.props.className+(this.props.disabled?" disabled":""),onMouseDown:this.onSliderMouseDown,onClick:this.onSliderClick},s,i,o)},t}(r.Component);p.displayName="ReactSlider",p.defaultProps={min:0,max:100,step:1,pageFn:e=>10*e,minDistance:0,defaultValue:0,orientation:"horizontal",className:"slider",thumbClassName:"thumb",thumbActiveClassName:"active",trackClassName:"track",markClassName:"mark",withTracks:!0,pearling:!1,disabled:!1,snapDragDisabled:!1,invert:!1,marks:[],renderThumb:e=>r.createElement("div",e),renderTrack:e=>r.createElement("div",e),renderMark:e=>r.createElement("span",e)};var h=e=>{let{min:t,max:n,onChange:i,onSliderClick:o,defaultStart:a,defaultEnd:l}=e,[u,c]=(0,r.useState)([null!=a?a:t,null!=l?l:n]);return(0,r.useEffect)(()=>{c([null!=a?a:t,null!=l?l:n])},[a,l,t,n]),(0,s.jsxs)("div",{className:"my-[25px] flex items-center gap-[10px]",children:[u[0],(0,s.jsx)(p,{className:"h-2 w-full rounded bg-gray-100",thumbClassName:"h-[18px] -top-1/2 w-[18px] bg-orange-500 rounded-full cursor-pointer",onSliderClick:e=>{null==o||o(e)},min:t,max:n,step:1,value:u,onChange:e=>{c(e),i(e[0],e[1])},renderThumb:e=>(0,s.jsx)("div",{...e}),renderTrack:(e,t)=>(0,s.jsx)("div",{...e,style:{...e.style,height:"100%",borderRadius:"999px",background:1===t.index?"#1A1C1E":"#F0F0F4"}})}),u[1]]})}},7390:function(e,t,n){n.r(t),n.d(t,{default:function(){return E}});var s=n(85893),r=n(75605),i=n(25675),o=n.n(i),a=n(89774),l=n(67294),u=n(59827),c=n(50259),d=n(44710),p=n(16190);let h=e=>{let{draggableRef:t,calculateFor:n="topLeft"}=e,[s,r]=(0,l.useState)(),[i,o]=(0,l.useState)({x:0,y:0}),[a,u]=(0,l.useState)(!1);(0,l.useEffect)(()=>{o({x:window.innerWidth-340,y:window.innerHeight-605})},[]);let c=(0,l.useCallback)((e,t,s,r)=>{if("bottomRight"===n){o({x:Math.max(Math.min(window.innerWidth-e,window.innerWidth-(s+e)),0
1),y:Math.max(Math.min(window.innerHeight-t,window.innerHeight-(r+t)),0)});return}o({x:Math.min(Math.max(0,s),window.innerWidth-e),y:Math.min(Math.max(0,r),window.innerHeight-t)})},[n]),d=e=>{e.preventDefault(),u(!1)},p=(0,l.useCallback)(e=>{let{current:n}=t;if(!a||!n)return;e.preventDefault();let{clientX:r,clientY:i}=e,o={x:s.startX-r,y:s.startY-i},{top:l,left:u,width:d,height:p}=s;c(d,p,u-o.x,l-o.y)},[a,s,t,c]);return(0,l.useEffect)(()=>(document.addEventListener("mousemove",p),document.addEventListener("mouseup",d),()=>{document.removeEventListener("mousemove",p),document.removeEventListener("mouseup",d)}),[p]),{position:i,handleMouseDown:e=>{e.preventDefault();let{clientX:n,clientY:s}=e,i=t.current;if(!i)return;let{top:o,left:a,width:l,height:c}=i.getBoundingClientRect();u(!0),r({startX:n,startY:s,top:o,left:a,width:l,height:c})},recalculate:(e,n)=>{let{current:s}=t;if(!s)return;let{top:r,left:i,width:o,height:a}=s.getBoundingClientRect();c(null!=e?e:o,null!=n?n:a,i,r)}}};var m=n(61997),f=n(2819),v=n(81808),g=n(65482),x=n(76750),w=n(422),b=n(78579),y=n(92821),k=n(31534),j=n(58728),C=n(23312),M=n(41680),N=n(47864),S=e=>{let{isTrimModal:t=!1,videoWidth:n=340,videoHeight:r=605,videoRef:i,videoSrc:o,videoName:a,videoMuted:u,videoPlaying:c,setShowVideo:p,handleMouseDown:h,toggleMute:m,setVideoPlaying:f,jumpToTime:v,startTime:g,stopTime:x}=e;return(0,l.useEffect)(()=>{let e=i.current;if(e)return e.onplay=()=>f(!0),e.onpause=()=>f(!1),e.ontimeupdate=()=>{void 0!==g&&void 0!==x&&e.currentTime>=x&&(e.pause(),f(!1),v(g))},()=>{e.onplay=null,e.onpause=null,e.ontimeupdate=null}},[f,i,x,v,g]),(0,s.jsxs)("div",{className:"group relative bg-black",style:{width:"".concat(n,"px"),height:"".concat(r,"px")},children:[(0,s.jsx)("video",{onMouseDown:h,ref:i,src:o,className:"h-full w-full"}),(0,s.jsxs)("div",{className:"absolute left-4 top-[14px] hidden items-center gap-[10.68px] group-hover:flex",children:[!t&&(0,s.jsx)(k.Z,{onClick:()=>{var e;null===(e=i.current)||void 0===e||e.pause(),p(!1)},children:(0,s.jsx)(j.Z,{color:"#FFFFFF"})}),(0,s.jsx)("span",{className:"line-clamp-1 text-[12.463px] font-medium leading-[124.3%] text-[#FDFEFF]",children:a})]}),(0,s.jsxs)("div",{className:"absolute bottom-4 left-1/2 hidden -translate-x-1/2 transform gap-[7.12px] group-hover:flex",children:[(0,s.jsx)(k.Z,{onClick:m,children:u?(0,s.jsx)(M.Z,{}):(0,s.jsx)(N.Z,{})}),c?(0,s.jsx)(k.Z,{onClick:()=>{var e;null===(e=i.current)||void 0===e||e.pause(),f(!1)},children:(0,s.jsx)(C.Z,{})}):(0,s.jsx)(k.Z,{onClick:()=>{var e;null===(e=i.current)||void 0===e||e.play(),f(!0)},children:(0,s.jsx)(d.Z,{})})]})]})},E=e=>{let{hlsUrl:t}=e,{t:n}=(0,a.$G)(),i=(0,f.TL)(),{formProps:j}=(0,p.ZQ)(),{watch:C,register:M,setValue:N,clearErrors:E,errors:T}=j,{promotionalVideoUrl:L}=T,D=C("promotionalVideoUrl"),[P,F]=(0,l.useState)(!1),{videoLength:z,previewVideoRef:R,ffmpegRef:Z,videoSrc:A,setVideoSrc:B,localUpload:V,videoName:K,setVideoName:U,videoPlaying:O,setVideoPlaying:H,videoMuted:I,setVideoMuted:W}=(0,m.m)(),_=(0,l.useRef)(null),[X,Y]=(0,l.useState)(0),[$,q]=(0,l.useState)(20),[G,Q]=(0,l.useState)(!1),[J,ee]=(0,l.useState)(!0),et=(0,l.useRef)(null),en=(0,l.useRef)(null),{position:es,handleMouseDown:er}=h({draggableRef:en}),[ei,eo]=(0,l.useState)(!1),ea=()=>{eo(!0)},el=()=>{eo(!1)};(0,l.useEffect)(()=>{z&&z>20&&(ea(),ee(!1),Y(0),q(z))},[z]),(0,l.useEffect)(()=>{t&&F(!0)},[t]),(0,l.useEffect)(()=>{(async()=>{let e="https://unpkg.com/@ffmpeg/[email protected]/dist/umd",t=Z.current;t.on("log",e=>{let{message:t}=e;console.log(t)}),await t.load({coreURL:await (0,r.Wn)("".concat(e,"/ffmpeg-core.js"),"text/javascript"),wasmURL:await (0,r.Wn)("".concat(e,"/ffmpeg-core.wasm"),"application/wasm")})})()},[]);let eu=()=>{var e;B(""),U(""),(null===(e=et.current)||void 0===e?void 0:e.value)&&(et.current.value=""),N("promotionalVideoUrl","")},ec=()=>{eu(),el()},ed=async()=>{if($-X>20){i((0,v.fz)({show:!0,variant:"error",message:"Video length must be 20 seconds or less."}));return}em(),Q(!0);try{let e=Z.current,t=await (0,r.dc)(A);await e.writeFile("input.mp4",t),await e.exec(["-ss",X.toString(),"-accurate_seek","-i","input.mp4","-to",$.toString(),"-c:v","copy","-c:a","copy","output.mp4"]);let n=await e.readFile("output.mp4");R.current&&(R.current.src=URL.createObjectURL(new Blob([n.buffer],{type:"video/mp4"})),el(),ee(!0))}catch(e){console.error("Error trimming video:",e)}finally{Q(!1)}},ep=e=>{_.current&&(_.current.currentTime=e)},eh=()=>{_.current&&(_.current.muted=!_.current.muted),R.current&&(R.current.muted=!R.current.muted),W(e=>!e)},em=()=>{_.current&&_.current.pause(),R.current&&R.current.pause(),H(!1)};return(0,s.jsxs)("div",{className:"mb-3 flex flex-col gap-5 rounded-lg bg-gray-100 p-5",children:[(0,s.jsxs)("div",{className:"text-[15px]",children:[n("pages.events.labels.upload-promo-video")," ",(0,s.jsxs)("span",{className:"text-gray-400",children:["(",n("common.labels.optional"),")"]})]}),(0,s.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,s.jsxs)("div",{className:"flex items-center gap-4",children:[(0,s.jsxs)(g.z,{className:"flex h-fit w-fit gap-2 px-3 py-[5px] text-xs",variant:"primary",loading:G,onClick:()=>{var e;null===(e=et.current)||void 0===e||e.click()},disabled:!!D,children:[(0,s.jsx)(u.Z,{width:13,height:16}),n("pages.events.labels.upload-video")]}),(A||t)&&(0,s.jsxs)("div",{className:"flex gap-2",children:[(0,s.jsx)(g.z,{variant:"white",className:"h-[26px] w-[26px] p-1",onClick:eu,children:(0,s.jsx)(o(),{src:c.Z,alt:"deleteIcon",width:16,height:16})}),!J&&(0,s.jsx)(k.Z,{className:"h-[26px] w-[26px]",onClick:()=>{ee(!0)},children:(0,s.jsx)(d.Z,{width:10,height:10})})]})]}),(0,s.jsxs)("div",{className:"text-xs text-gray-400",children:[n("common.labels.file-requirement"),": MP4 |"," ",n("common.labels.video-orientation"),": ",n("common.labels.portrait")," ","| ",n("common.labels.max-length"),":"," ",n("common.labels.number-seconds",{number:20})]})]}),!A&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("div",{className:"h-[2px] bg-white"}),(0,s.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,s.jsxs)("div",{className:"text-xs text-gray-400",children:[n("pages.events.labels.add-youtube-link"),":"]}),(0,s.jsxs)("div",{className:"flex items-center gap-4",children:[(0,s.jsx)(x.Z,{label:n("pages.events.labels.video-url"),fieldName:"promotionalVideoUrl",error:L,register:M,validation:{pattern:{value:/^(https?:\/\/)?(www\.)?(youtube\.com|youtu\.be)\/.+/,message:n("messages.errors.common.invalid-youtube-url")}}}),D&&(0,s.jsx)(g.z,{variant:"white",className:"h-[26px] w-[26px] p-1",onClick:()=>{N("promotionalVideoUrl",""),E("promotionalVideoUrl")},children:(0,s.jsx)(o(),{src:c.Z,alt:"deleteIcon",width:16,height:16})})]})]})]}),(0,s.jsx)("input",{ref:et,className:"pointer-events-none hidden",type:"file",accept:"video/mp4",onChange:V}),t&&P&&(0,s.jsx)("div",{ref:en,className:"fixed z-10 ".concat(!J&&"pointer-events-none hidden"),style:{to
1p:es.y,left:es.x},children:(0,s.jsx)("div",{onMouseDown:er,children:(0,s.jsx)(b.Z,{className:"w-[400px] shrink-0",hlsUrl:t,title:"Promotional Video",setShowVideo:ee})})}),A&&(0,s.jsx)("div",{ref:en,className:"fixed z-10 ".concat(!J&&"pointer-events-none hidden"),style:{top:es.y,left:es.x},children:(0,s.jsx)(S,{handleMouseDown:er,videoRef:R,setShowVideo:ee,setVideoPlaying:H,toggleMute:eh,videoMuted:I,videoName:K,videoPlaying:O,videoSrc:A,jumpToTime:ep})}),(0,s.jsxs)(w.u,{isOpen:ei,onClose:ec,className:"w-[500px]",children:[(0,s.jsx)("div",{className:"text-[28px] font-bold",children:n("pages.events.labels.trim-promo-video")}),(0,s.jsx)("div",{className:"text-sm text-gray-400",children:n("common.labels.max-video-length",{number:20})}),(0,s.jsx)("div",{className:"mt-[30px] flex justify-center",children:(0,s.jsx)(S,{isTrimModal:!0,handleMouseDown:er,videoRef:_,setShowVideo:ee,setVideoPlaying:H,toggleMute:eh,videoMuted:I,videoName:K,videoPlaying:O,videoSrc:A,videoWidth:240,videoHeight:428,jumpToTime:ep,startTime:X,stopTime:$})}),(0,s.jsx)(y.Z,{min:0,max:z,onChange:(e,t)=>
1{em(),e!==X?(ep(e),Y(e)):(ep(t),q(t))}}),(0,s.jsxs)("div",{className:"flex justify-center gap-[15px]",children:[(0,s.jsx)(g.z,{className:"w-[150px]",variant:"gray",onClick:ec,children:n("common.labels.cancel-upload")}),(0,s.jsx)(g.z,{className:"w-[150px]",variant:"orange",loading:G,loadingText:"Trimming...",onClick:ed,children:n("common.labels.trim-video")})]})]})]})}},31534:function(e,t,n){var s=n(85893);n(67294),t.Z=e=>{let{onClick:t,children:n,className:r}=e;return(0,s.jsx)("div",{className:"flex h-10 w-10 cursor-pointer select-none items-center justify-center rounded-[20px] bg-black p-2 hover:bg-gray-800 ".concat(r),onClick:t,children:n})}},75605:function(e,t,n){n.d(t,{dc:function(){return o},Wn:function(){return l}});let s=Error("failed to get response body reader"),r=Error("failed to complete download"),i=e=>new Promise((t,n)=>{let s=new FileReader;s.onload=()=>{let{result:e}=s;e instanceof ArrayBuffer?t(new Uint8Array(e)):t(new Uint8Array)},s.onerror=e=>{n(Error(`File could not be read! Code=${e?.target?.error?.code||-1}`))},s.readAsArrayBuffer(e)}),o=async e=>{let t;if("string"==typeof e)t=/data:_data\/([a-zA-Z]*);base64,([^"]*)/.test(e)?atob(e.split(",")[1]).split("").map(e=>e.charCodeAt(0)):await (await fetch(e)).arrayBuffer();else if(e instanceof URL)t=await (await fetch(e)).arrayBuffer();else{if(!(e instanceof File||e instanceof Blob))return new Uint8Array;t=await i(e)}return new Uint8Array(t)},a=async(e,t)=>{let n;let i=await fetch(e);try{let o=parseInt(i.headers.get("Content-Length")||"-1"),a=i.body?.getReader();if(!a)throw s;let l=[],u=0;for(;;){let{done:n,value:s}=await a.read(),i=s?s.length:0;if(n){if(-1!=o&&o!==u)throw r;t&&t({url:e,total:o,received:u,delta:i,done:n});break}l.push(s),u+=i,t&&t({url:e,total:o,received:u,delta:i,done:n})}let c=new Uint8Array(u),d=0;for(let e of l)c.set(e,d),d+=e.length;n=c.buffer}catch(s){console.log("failed to send download progress event: ",s),n=await i.arrayBuffer(),t&&t({url:e,total:n.byteLength,received:n.byteLength,delta:0,done:!0})}return n},l=async(e,t,n=!1,s)=>{let r=new Blob([n?await a(e,s):await (await fetch(e)).arrayBuffer()],{type:t});return URL.createObjectURL(r)}}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.