hamrahi-player-library 1.3.2 → 1.3.4
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.
- package/dist/hamrahi-player-library.css +1 -1
- package/dist/hamrahi-player-library.js +1 -1
- package/dist/hamrahi-player-library.umd.cjs +3 -3
- package/dist/{index-CfIGIWPD.js → index-DU3oN56B.js} +6 -5
- package/dist/{main-CHJtvCfE.js → main-DGdOyBpa.js} +3 -3
- package/dist/{multiLiveVideoTag-Cqslysue.js → multiLiveVideoTag-BxW5xu6d.js} +2 -2
- package/dist/{nonStaticVideoTag-y4XaLDWi.js → nonStaticVideoTag-xJRGZQoz.js} +2 -2
- package/dist/{paramsErrorPopover-hM82f9Za.js → paramsErrorPopover-DnN-R6Sd.js} +2 -2
- package/dist/{player-6Rt43_WH.js → player-BISLXKj_.js} +2 -2
- package/dist/{player-Clu9po4U.js → player-DY_dSDTS.js} +3 -3
- package/dist/{playerCore.actions-BDh4JLD1.js → playerCore.actions-B3RkZRIQ.js} +1 -1
- package/dist/{popover-BFc-wIoZ.js → popover-4vpo8JNh.js} +2 -2
- package/dist/src/videoPlayerLibrary/shared/interfaces/interfaces.d.ts +1 -0
- package/dist/{staticVideoTag-BM4ALwoM.js → staticVideoTag-COIeszCA.js} +2 -2
- package/dist/{touchVolumeBrightness-xs_Y2qwc.js → touchVolumeBrightness-DRR4oB4M.js} +1 -1
- package/dist/{videoPlayer-BuyhkPuM.js → videoPlayer-BHPkZNmM.js} +4 -4
- package/dist/{viewersChart-BCJTSu54.js → viewersChart-DZialbKt.js} +1 -1
- package/package.json +1 -1
|
@@ -59,7 +59,7 @@ Take a look at the reducer(s) handling this action type: ${m.type}.
|
|
|
59
59
|
|
|
60
60
|
Check the render method of \``+fe+"`."}return""}}function Ot(fe){return""}var At={};function Ye(fe){{var Se=Pt();if(!Se){var De=typeof fe=="string"?fe:fe.displayName||fe.name;De&&(Se=`
|
|
61
61
|
|
|
62
|
-
Check the top-level render call using <`+De+">.")}return Se}}function jt(fe,Se){{if(!fe._store||fe._store.validated||fe.key!=null)return;fe._store.validated=!0;var De=Ye(Se);if(At[De])return;At[De]=!0;var ze="";fe&&fe._owner&&fe._owner!==Rt.current&&(ze=" It was passed a child from "+oe(fe._owner.type)+"."),vt(fe),C('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',De,ze),vt(null)}}function Mt(fe,Se){{if(typeof fe!="object")return;if(Oe(fe))for(var De=0;De<fe.length;De++){var ze=fe[De];_t(ze)&&jt(ze,Se)}else if(_t(fe))fe._store&&(fe._store.validated=!0);else if(fe){var Qe=v(fe);if(typeof Qe=="function"&&Qe!==fe.entries)for(var Je=Qe.call(fe),Xe;!(Xe=Je.next()).done;)_t(Xe.value)&&jt(Xe.value,Se)}}}function Nt(fe){{var Se=fe.type;if(Se==null||typeof Se=="string")return;var De;if(typeof Se=="function")De=Se.propTypes;else if(typeof Se=="object"&&(Se.$$typeof===l||Se.$$typeof===u))De=Se.propTypes;else return;if(De){var ze=oe(Se);je(De,fe.props,"prop",ze,fe)}else if(Se.PropTypes!==void 0&&!wt){wt=!0;var Qe=oe(Se);C("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",Qe||"Unknown")}typeof Se.getDefaultProps=="function"&&!Se.getDefaultProps.isReactClassApproved&&C("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function Ht(fe){{for(var Se=Object.keys(fe.props),De=0;De<Se.length;De++){var ze=Se[De];if(ze!=="children"&&ze!=="key"){vt(fe),C("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",ze),vt(null);break}}fe.ref!==null&&(vt(fe),C("Invalid attribute `ref` supplied to `React.Fragment`."),vt(null))}}function It(fe,Se,De,ze,Qe,Je){{var Xe=M(fe);if(!Xe){var We="";(fe===void 0||typeof fe=="object"&&fe!==null&&Object.keys(fe).length===0)&&(We+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var ht=Ot();ht?We+=ht:We+=Pt();var ot;fe===null?ot="null":Oe(fe)?ot="array":fe!==void 0&&fe.$$typeof===e?(ot="<"+(oe(fe.type)||"Unknown")+" />",We=" Did you accidentally export a JSX literal instead of a component?"):ot=typeof fe,C("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",ot,We)}var lt=Et(fe,Se,De,Qe,Je);if(lt==null)return lt;if(Xe){var pt=Se.children;if(pt!==void 0)if(ze)if(Oe(pt)){for(var St=0;St<pt.length;St++)Mt(pt[St],fe);Object.freeze&&Object.freeze(pt)}else C("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else Mt(pt,fe)}return fe===n?Ht(lt):Nt(lt),lt}}function $t(fe,Se,De){return It(fe,Se,De,!0)}function Dt(fe,Se,De){return It(fe,Se,De,!1)}var Bt=Dt,zt=$t;V$1.Fragment=n,V$1.jsx=Bt,V$1.jsxs=zt}()),V$1}process.env.NODE_ENV==="production"?se.exports=Cr():se.exports=Er();var c$1=se.exports;const xr={undo:"يعود",undoing:"العودة",operationWasUndone:"تمت إرجاع العملية",errorInOperation:"خطأ في التشغيل"},Rr={undo:"undo",undoing:"undoing",operationWasUndone:"The operation was undone",errorInOperation:"error in operation"},Tr={undo:"برگرداندن",undoing:"در حال بازگردانی",operationWasUndone:"عملیات بازگردانده شد",errorInOperation:"خطا در انجام عملیات"},wr=i=>{const e=i.split("-"),t={top:"unset",bottom:"unset",right:"unset",left:"unset"};return e[0]==="top"?t.top=10:t.bottom=10,e[1]==="right"?t.right=10:t.left=10,t},Sr=(i,e)=>i?e!=="unset"?"animate__bounceInLeft":"animate__bounceInRight":e!=="unset"?"animate__bounceOutLeft":"animate__bounceOutRight",ne=i=>Object.fromEntries(Object.entries(i).filter(([e,t])=>t!==void 0)),jr=()=>{let i="xxxxxxxx-xxxx-Mxxx-Nxxx-x".replace(/[xMN]/g,e=>{let t;return e==="M"?t=Math.floor(1+Math.random()*5):e==="N"?t=Math.floor(8+Math.random()*4):t=Math.floor(Math.random()*16),t.toString(16)});return i+=Date.now().toString(16),i},ie=i=>{switch(i){case"en":return Rr;case"ar":return xr;default:return Tr}};var Or=function(){function i(t){this.subscriber=t}var e=i.prototype;return e.remove=function(){this.subscriber&&(this.subscriber.removeSubscription(this),this.subscriber=null)},i}(),kr=Or;function Fr(i,e){i.prototype=Object.create(e.prototype),i.prototype.constructor=i,i.__proto__=e}var Pr=kr,Lr=function(i){Fr(e,i);function e(t,n,s){var r;return r=i.call(this,t)||this,r.listener=n,r.context=s,r}return e}(Pr),Me=Lr,$r=process.env.NODE_ENV!=="production"?function(i){if(i===void 0)throw new Error("invariant(...): Second argument must be a string.")}:function(i){};function Nr(i,e){for(var t=arguments.length,n=new Array(t>2?t-2:0),s=2;s<t;s++)n[s-2]=arguments[s];if($r(e),!i){var r;if(e===void 0)r=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var a=0;r=new Error(e.replace(/%s/g,function(){return String(n[a++])})),r.name="Invariant Violation"}throw r.framesToPop=1,r}}var Ie=Nr,$e=Ie,Ar=function(){function i(){this._subscriptionsForType={},this._currentSubscription=null}var e=i.prototype;return e.addSubscription=function(t,n){n.subscriber!==this&&(process.env.NODE_ENV!=="production"?$e(!1,"The subscriber of the subscription is incorrectly set."):$e(!1)),this._subscriptionsForType[t]||(this._subscriptionsForType[t]=[]);var s=this._subscriptionsForType[t].length;return this._subscriptionsForType[t].push(n),n.eventType=t,n.key=s,n},e.removeAllSubscriptions=function(t){t===void 0?this._subscriptionsForType={}:delete this._subscriptionsForType[t]},e.removeSubscription=function(t){var n=t.eventType,s=t.key,r=this._subscriptionsForType[n];r&&delete r[s]},e.getSubscriptionsForType=function(t){return this._subscriptionsForType[t]},i}(),Dr=Ar;function G$1(i){return function(){return i}}var P=function(){};P.thatReturns=G$1,P.thatReturnsFalse=G$1(!1),P.thatReturnsTrue=G$1(!0),P.thatReturnsNull=G$1(null),P.thatReturnsThis=function(){return this},P.thatReturnsArgument=function(i){return i};var Mr=P,Ir=Me,Vr=Dr,Ne=Ie,Wr=Mr,Br=function(){function i(){this._subscriber=new Vr,this._currentSubscription=null}var e=i.prototype;return e.addListener=function(t,n,s){return this._subscriber.addSubscription(t,new Ir(this._subscriber,n,s))},e.once=function(t,n,s){var r=this;return this.addListener(t,function(){r.removeCurrentListener(),n.apply(s,arguments)})},e.removeAllListeners=function(t){this._subscriber.removeAllSubscriptions(t)},e.removeCurrentListener=function(){this._currentSubscription||(process.env.NODE_ENV!=="production"?Ne(!1,"Not in an emitting cycle; there is no current subscription"):Ne(!1)),this._subscriber.removeSubscription(this._currentSubscription)},e.listeners=function(t){var n=this._subscriber.getSubscriptionsForType(t);return n?n.filter(Wr.thatReturnsTrue).map(function(s){return s.listener}):[]},e.emit=function(t){var n=this._subscriber.getSubscriptionsForType(t);if(n){for(var s=Object.keys(n),r=0;r<s.length;r++){var a=s[r],o=n[a];o&&(this._currentSubscription=o,this.__emitToSubscription.apply(this,[o].concat(Array.prototype.slice.call(arguments))))}this._currentSubscription=null}},e.__emitToSubscription=function(t,n){var s=Array.prototype.slice.call(arguments,2);t.listener.apply(t.context,s)},i}(),Ur=Br,Yr={EventEmitter:Ur},Hr=Yr;const W$1=new Hr.EventEmitter,Zr=({className:i,onClick:e,theme:t})=>c$1.jsxs("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:i,onClick:e,style:{marginTop:"1px"},children:[c$1.jsx("path",{className:`${t==="dark"?"fill-red-dark":"fill-red-light"}`,opacity:"0.8",d:"M21.76 15.92L15.36 4.4C14.5 2.85 13.31 2 12 2C10.69 2 9.49998 2.85 8.63998 4.4L2.23998 15.92C1.42998 17.39 1.33998 18.8 1.98998 19.91C2.63998 21.02 3.91998 21.63 5.59998 21.63H18.4C20.08 21.63 21.36 21.02 22.01 19.91C22.66 18.8 22.57 17.38 21.76 15.92Z"}),c$1.jsx("path",{className:"fill_gray_color",d:"M12 14.75C11.59 14.75 11.25 14.41 11.25 14V9C11.25 8.59 11.59 8.25 12 8.25C12.41 8.25 12.75 8.59 12.75 9V14C12.75 14.41 12.41 14.75 12 14.75Z"}),c$1.jsx("path",{className:"fill_gray_color",d:"M12 18.0005C11.94 18.0005 11.87 17.9905 11.8 17.9805C11.74 17.9705 11.68 17.9505 11.62 17.9205C11.56 17.9005 11.5 17.8705 11.44 17.8305C11.39 17.7905 11.34 17.7505 11.29 17.7105C11.11 17.5205 11 17.2605 11 17.0005C11 16.7405 11.11 16.4805 11.29 16.2905C11.34 16.2505 11.39 16.2105 11.44 16.1705C11.5 16.1305 11.56 16.1005 11.62 16.0805C11.68 16.0505 11.74 16.0305 11.8 16.0205C11.93 15.9905 12.07 15.9905 12.19 16.0205C12.26 16.0305 12.32 16.0505 12.38 16.0805C12.44 16.1005 12.5 16.1305 12.56 16.1705C12.61 16.2105 12.66 16.2505 12.71 16.2905C12.89 16.4805 13 16.7405 13 17.0005C13 17.2605 12.89 17.5205 12.71 17.7105C12.66 17.7505 12.61 17.7905 12.56 17.8305C12.5 17.8705 12.44 17.9005 12.38 17.9205C12.32 17.9505 12.26 17.9705 12.19 17.9805C12.13 17.9905 12.06 18.0005 12 18.0005Z"})]}),qr=({className:i,onClick:e,theme:t})=>c$1.jsxs("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:i,onClick:e,style:{marginTop:"1px"},children:[c$1.jsx("path",{className:`${t==="dark"?"fill-lime-dark":"fill-lime-light"}`,opacity:"0.8",d:"M16.19 2H7.81C4.17 2 2 4.17 2 7.81V16.18C2 19.83 4.17 22 7.81 22H16.18C19.82 22 21.99 19.83 21.99 16.19V7.81C22 4.17 19.83 2 16.19 2Z"}),c$1.jsx("path",{className:"fill_gray_color",d:"M10.5799 15.5796C10.3799 15.5796 10.1899 15.4996 10.0499 15.3596L7.21994 12.5296C6.92994 12.2396 6.92994 11.7596 7.21994 11.4696C7.50994 11.1796 7.98994 11.1796 8.27994 11.4696L10.5799 13.7696L15.7199 8.62961C16.0099 8.33961 16.4899 8.33961 16.7799 8.62961C17.0699 8.91961 17.0699 9.39961 16.7799 9.68961L11.1099 15.3596C10.9699 15.4996 10.7799 15.5796 10.5799 15.5796Z"})]}),Gr=({className:i,onClick:e,theme:t})=>c$1.jsxs("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:i,onClick:e,style:{marginTop:"1px"},children:[c$1.jsx("path",{className:`${t==="dark"?"fill-orange-dark":"fill-orange-light"}`,opacity:"0.8",d:"M16.34 2H7.67C4.28 2 2 4.38 2 7.92V16.09C2 19.62 4.28 22 7.67 22H16.34C19.73 22 22 19.62 22 16.09V7.92C22 4.38 19.73 2 16.34 2Z"}),c$1.jsx("path",{className:"fill_gray_color",d:"M11 15.7825V11.3625C11 11.1305 11.0922 10.9079 11.2563 10.7438C11.4204 10.5797 11.6429 10.4875 11.875 10.4875C12.1071 10.4875 12.3296 10.5797 12.4937 10.7438C12.6578 10.9079 12.75 11.1305 12.75 11.3625V15.7825C12.75 16.0146 12.6578 16.2372 12.4937 16.4013C12.3296 16.5654 12.1071 16.6575 11.875 16.6575C11.6429 16.6575 11.4204 16.5654 11.2563 16.4013C11.0922 16.2372 11 16.0146 11 15.7825V15.7825ZM11.005 8.18955C11.0044 8.01539 11.0556 7.84499 11.1522 7.70002C11.2487 7.55505 11.3861 7.44206 11.547 7.37542C11.7079 7.30877 11.885 7.29149 12.0558 7.32576C12.2265 7.36004 12.3832 7.44432 12.506 7.56789C12.6287 7.69147 12.7119 7.84875 12.745 8.01973C12.7781 8.19072 12.7596 8.36769 12.6918 8.52813C12.6241 8.68858 12.5102 8.82525 12.3645 8.92077C12.2189 9.01628 12.0482 9.06633 11.874 9.06455C11.6432 9.06218 11.4227 8.96905 11.26 8.80529C11.0974 8.64154 11.0058 8.42034 11.005 8.18955Z"})]}),Jr=()=>c$1.jsx("div",{className:"promise-loader"}),zr=({type:i,theme:e})=>{let t=c$1.jsx(c$1.Fragment,{});return i==="success"?t=c$1.jsx(qr,{theme:e}):i==="warning"?t=c$1.jsx(Gr,{theme:e}):i==="error"?t=c$1.jsx(Zr,{theme:e}):i==="promise"&&(t=c$1.jsx(Jr,{})),c$1.jsx("div",{style:{flex:"none"},children:t})},Kr=({className:i,onClick:e,theme:t})=>c$1.jsxs("svg",{width:"18",height:"18",viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:i,onClick:e,children:[c$1.jsx("path",{className:`${t==="dark"?"toast_undo-fill-dark":"toast_undo-fill-light"}`,d:"M11.3477 14.2949H5.34766C5.04016 14.2949 4.78516 14.0399 4.78516 13.7324C4.78516 13.4249 5.04016 13.1699 5.34766 13.1699H11.3477C13.1027 13.1699 14.5352 11.7374 14.5352 9.98242C14.5352 8.22742 13.1027 6.79492 11.3477 6.79492H3.09766C2.79016 6.79492 2.53516 6.53992 2.53516 6.23242C2.53516 5.92492 2.79016 5.66992 3.09766 5.66992H11.3477C13.7252 5.66992 15.6602 7.60492 15.6602 9.98242C15.6602 12.3599 13.7252 14.2949 11.3477 14.2949Z"}),c$1.jsx("path",{className:`${t==="dark"?"toast_undo-fill-dark":"toast_undo-fill-light"}`,d:"M4.82242 8.67016C4.67992 8.67016 4.53742 8.61766 4.42492 8.50516L2.50492 6.58516C2.28742 6.36766 2.28742 6.00766 2.50492 5.79016L4.42492 3.87016C4.64242 3.65266 5.00242 3.65266 5.21992 3.87016C5.43742 4.08766 5.43742 4.44766 5.21992 4.66516L3.69742 6.18766L5.21992 7.71016C5.43742 7.92766 5.43742 8.28766 5.21992 8.50516C5.11492 8.61766 4.96492 8.67016 4.82242 8.67016Z"})]}),Xr=({toastInfo:i,callbackFunction:e,theme:t,texts:n,lang:s})=>{const[r,a]=React2.useState(!1),o=()=>{a(!0);const l=e();if(l&&!r){const d=jr();ae({title:n.undoing,type:"promise",id:`toast-promise-${d}`}),l.then(()=>{Ae(`toast-promise-${d}`),ae({...i,title:n.operationWasUndone,type:i.type??"success",callbackFunction:void 0,lang:s})}).catch(()=>{Ae(`toast-promise-${d}`),ae({...i,title:n.errorInOperation,type:"error",callbackFunction:void 0,lang:s})})}else a(!1)};return c$1.jsxs("div",{className:`toast_undo ${t==="dark"?"toast_undo-dark":"toast_undo-light"}`,style:{cursor:r?"default":"pointer"},onClick:r?()=>{}:()=>o(),children:[c$1.jsx(Kr,{theme:t}),c$1.jsx("span",{dir:"auto",children:n.undo})]})},Qr=({type:i,positionX:e,showToast:t,setShowToast:n,autoClose:s,theme:r,isHover:a})=>{const[o,l]=React2.useState(100),d=React2.useRef(null),f=React2.useRef(a);React2.useEffect(()=>{f.current=a},[a]),React2.useEffect(()=>(t&&l(100),s&&t&&(d.current=setInterval(()=>{f.current||l(g=>g-1e3/s)},10)),()=>clearInterval(d.current)),[t]);const u=()=>{clearInterval(d.current),n(!1)};let p;React2.useEffect(()=>(o<=0&&u(),()=>clearTimeout(p)),[o]);let m="";return i==="success"?m=r==="dark"?"toast_progressBar-lime-dark":"toast_progressBar-lime-light":i==="warning"?m=r==="dark"?"toast_progressBar-orange-dark":"toast_progressBar-orange-light":i==="error"&&(m=r==="dark"?"toast_progressBar-red-dark":"toast_progressBar-red-light"),c$1.jsx("div",{className:"toast_progressBar",children:c$1.jsx("div",{style:{left:e==="left"?0:"unset",right:e==="right"?0:"unset",width:`${o}%`},className:`toast_progressBar-inner ${m}`})})},et=({className:i,onClick:e})=>c$1.jsx("svg",{width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:{flex:"none"},className:i,onClick:e,children:c$1.jsx("path",{d:"M14 1.41L12.59 0L7 5.59L1.41 0L0 1.41L5.59 7L0 12.59L1.41 14L7 8.41L12.59 14L14 12.59L8.41 7L14 1.41Z"})}),rt=({toastInfo:i,toastPosition:e,toasts:t,setToasts:n,texts:s,lang:r})=>{const[a,o]=React2.useState(!0),[l,d]=React2.useState(!1);React2.useEffect(()=>{let u;return a===!1&&(u=setTimeout(()=>o(void 0),1e3)),()=>clearTimeout(u)},[a]);const f=Sr(a,e.left);return c$1.jsx(c$1.Fragment,{children:a!==void 0&&c$1.jsxs("div",{className:`toast ${r==="en"&&"toast-ltr"} ${i.theme==="dark"?"toast_dark":"toast_light"} animate__animated ${f}`,style:{boxShadow:"0px 4px 4px rgba(0, 0, 0, 0.25)"},id:i.id,onMouseOver:()=>d(!0),onMouseOut:()=>d(!1),children:[c$1.jsx(zr,{type:i.type,theme:i.theme}),c$1.jsx("p",{dir:"auto",className:`toast_title ${r==="en"?"toast_title_ltr":"toast_title_rtl"}`,children:i.title}),i.type!=="promise"&&i.callbackFunction&&c$1.jsx(Xr,{toastInfo:i,callbackFunction:i.callbackFunction,theme:i.theme,toasts:t,setToasts:n,texts:s,lang:r}),i.type!=="promise"&&i.autoClose&&c$1.jsx(Qr,{type:i.type,positionX:e.left!=="unset"?"left":"right",showToast:a,setShowToast:o,autoClose:i.autoClose,theme:i.theme,isHover:l}),i.type!=="promise"&&c$1.jsx(et,{className:`toast_closeIcon ${i.theme==="dark"?"toast_closeIcon-dark":"toast_closeIcon-light"}`,onClick:()=>o(!1)})]})})},nt=i=>{const[e,t]=React2.useState([]),[n,s]=React2.useState(ie(i.lang?i.lang:"fa")),r=React2.useRef({position:"bottom-right",theme:"light",autoClose:5e3,lang:i.lang?i.lang:"fa"});React2.useEffect(()=>(W$1.addListener("toast",o=>{const l=ne(o);let d={};const f={...r.current,...l,id:o.id?`mobin-toast-${o.id}`:void 0};d=ie(f.lang),s(d),t(u=>[...u,f])}),W$1.addListener("closeToast",o=>{t(l=>l.filter(d=>d.id!==`mobin-toast-${o}`))}),()=>W$1.removeAllListeners()),[]),React2.useEffect(()=>{r.current={...r.current,...ne(i)}},[i.theme]),React2.useEffect(()=>{r.current={...r.current,...ne(i)},s(ie(i.lang?i.lang:"fa"))},[i.lang]);const a=wr(r.current.position);return c$1.jsx(c$1.Fragment,{children:e.length?c$1.jsx("div",{className:"toast-wrapper",style:{...a},children:e.map(o=>c$1.jsx(rt,{lang:i.lang,toastInfo:o,toastPosition:a,toasts:e,setToasts:t,texts:n},o.id))}):c$1.jsx(c$1.Fragment,{})})},ae=({id:i,title:e,type:t,position:n,theme:s,autoClose:r,callbackFunction:a,lang:o})=>{W$1.emit("toast",{id:i,title:e,type:t,position:n,theme:s,autoClose:r,callbackFunction:a,lang:o})},Ae=i=>W$1.emit("closeToast",i),firstQuizQuestion=i=>i.questions[0],lastQuizQuestion=(i,e)=>i.questions[i.questions.length-1],lastQuizQuestionStatus=i=>i.questions.length?lastQuizQuestion(i).status:void 0,generalOptionals=["src","googleIndex","snapshot","fullscreen","autoplay","t","h","theme","provider","fullrate","e-cover","cover","uid","user_id","user_ids","preview","isAuth","authentication","site","xToken","width","height","chart","onFinished","showModuleTitle","scrollElementId","onSnapshot","isMarkersChange","featureSet","uuid","handleRedirectCards","homeButtonClickFlag","redirectOnEndedUrl","lang"],allParams=["src","type","id","fullscreen","autoplay","portrait","t","h","isGeneral","raw","theme","provider","fullrate","snapshot","cover","user_id","user_ids","preview","isAuth","authentication","site","e-url","e-cover","width","height","chart","onFinished","shoiwModuleTitle","scrollElementId","onSnapshot","isMarkersChange","quiz","featureSet","uuid","homeButtonClickFlag","redirectOnEndedUrl","lang"],quizConditions={required:["type","quiz","id"],optionals:[...generalOptionals]},isGeneralConditions={required:["type","isGeneral","src"],optionals:[...generalOptionals,"portrait"]},staticConditions={required:["e-url","type"],optionals:[...generalOptionals]},nonStaticConditions={required:["id","type"],optionals:[...generalOptionals,"portrait"]},rawConditions={required:["raw","type","id"],optionals:[...generalOptionals,"portrait"]},conditions=i=>{var Nt;const{trailer:e,params:t,details:n,gif:s,isComplexPortrait:r,isComplexDesktop:a,markers:o,subtitles:l,question:d,emojis:f,onlineViewers:u,alternative_Lives:p,recommendationList:m,multiAudio:g,isLiveError:y,isValidAddress:v,isFetchDetails:b,token:C,selectedOptionId:_,emojiList1:R,emojiList2:E,selectedSubtitle:F,playList:O,videoElementSizeInfo:A,chartPoints:N,isReady:M}=store.getState().videoData,{firstPlay:Z,lock:X,canPlayVideo:oe,qualityLevels:le,manualQuality:de,activeElements:ue,isLoading:ce,isLive:pe,isEnded:he,isAutoPlay:Y,play:ge,isFullScreen:xe,autoQuality:be,showMiniPlayer:Ce,loadedFragmentsCount:ke}=store.getState().controller,{trailerPopover:me,settingPopover:ye,markersListPopover:we,sharePopover:_e,feedbackPopover:Re,multiLivesPopover:Ee,fullRatePopover:ve,autoPlayPopover:qe,recommendListPopover:Ge,speedPopover:tt,tagsPopover:st,personalMarkersPopover:He,bookmarksPopover:Be,chatPopover:Fe,loginPopover:je,chatEmojisPopover:Ve,commentPopover:Oe,playListCardPopover:Ue,playListPopover:Ze,pollPopover:Ke,downloadPopover:it}=store.getState().popovers,{canAddComment:dt,canShowSubmittedComment:xt,commentsCount:mt,comments:ut,commentDefaultMessages:bt}=store.getState().comments,{selectedTags:at,inputTagSearch:Ct}=store.getState().tags,{isLogin:gt,settings:ct,bookmarkId:kt,avatar_url:Et,name:Rt,phone_number:Lt,videoSettings:vt,showContinuousPlayback:wt}=store.getState().user,{chatEnabled:_t,showChat:Pt,defaultMessages:Ot,pinMessage:At}=store.getState().chats,{quiz:Ye,chances:jt}=store.getState().quiz,Mt=store.getState().miniPlayer;switch(i){case ConditionName.showHeader:return!Z&&oe&&!qe;case ConditionName.showMain:return!X||Z;case ConditionName.showFooter:return!Z&&oe;case ConditionName.showGif:return!Z&&t.type==="live"&&ct.poll_emoji&&s;case ConditionName.showElapsedTime:return t.type!=="live"||staticFormats(t.type);case ConditionName.showLiveStatus:return t.type==="live"&&!Z&&!X&&(isIOS()&&isTouchScreenPortrait()||!isIOS())&&!he;case ConditionName.showLiveStatusInComplexPortrait:return t.type==="live"&&!he;case ConditionName.showTouchVolumeBrightness:return!Z&&isTouchScreenLandscape()&&!X&&!he&&t.raw!=="true";case ConditionName.showBackwardForward:return!Z&&isTouchScreen()&&!X&&t.raw!=="true"&&(!he||he&&t.type!=="live");case ConditionName.showPoll:return ct.poll_emoji&&!Z&&d&&d.active&&!X&&t.type==="live"&&(isIOS()&&isTouchScreenPortrait()||!isIOS());case ConditionName.showFullRate:return!staticFormats(t.type)&&!Z&&t.fullrate==="true"&&ve!==void 0;case ConditionName.showTitle:return!staticFormats(t.type)&&t.type!=="live"&&t.isGeneral!=="true"&&!X;case ConditionName.showSnapShot:return!Z&&t.portrait!=="true"&&t.snapshot==="true"&&(!staticFormats(t.type)||isWhiteListUrl(t.src));case ConditionName.showInstagramEmoji:return ct.poll_emoji&&f&&t.type==="live"&&!Z&&!r;case ConditionName.showEmojiComplexPortrait:return ct.poll_emoji&&f&&t.type==="live";case ConditionName.showOnlineViewers:return!!u&&u>0&&(!r||t.quiz==="true");case ConditionName.showMultiLivePopover:return Ee;case ConditionName.showMarkerListPopover:return we;case ConditionName.showFullRatePopover:return ve;case ConditionName.showAutoPlayPopover:return qe&&he&&t.portrait==="true"&&!Ce&&m&&m.length>0;case ConditionName.showRecommendListPopover:return Ge;case ConditionName.showSettingPopover:return ye;case ConditionName.showSpeedPopover:return tt;case ConditionName.showTagsPopover:return st;case ConditionName.showPersonalMarkerPopover:return He;case ConditionName.showBookmarksPopover:return!!Be;case ConditionName.showFeedbackPopover:return Re;case ConditionName.showChatPopover:return!!Fe;case ConditionName.showTrailerPopover:return me;case ConditionName.showLoginPopover:return je;case ConditionName.showAutoPlayListTouchIcon:return he&&!qe&&isTouchScreenLandscape()&&t.portrait==="true"&&!isIOS()&&!X&&m&&m.length>0;case ConditionName.showMultiLive:return p&&p.length>0&&ct.poll_emoji;case ConditionName.showBigReplayIcon:return he&&t.portrait==="true"&&isTouchScreen()&&(isIOS()&&isTouchScreenPortrait()||!isIOS());case ConditionName.showReplayIcon:return t.portrait==="true"&&!isIOS()&&!isTouchScreen()&&Ce!==!0;case ConditionName.showPlayNextIcon:return t.portrait==="true"&&!isIOS()&&(!isTouchScreen()||isTouchScreenLandscape())&&t.isGeneral!=="true"&&Ce!==!0;case ConditionName.showAutoPlayToggleIcon:return t.portrait==="true"&&t.isGeneral!=="true"&&(isIOS()&&isTouchScreenPortrait()||!isIOS())&&Ce!==!0;case ConditionName.showSettingIcon:return!staticFormats(t.type)&&!isIOS();case ConditionName.showLikeDislike:return!staticFormats(t.type)&&t.portrait==="true"&&t.isGeneral!=="true"&&!a&&!r;case ConditionName.showBanner:return Z&&n.banner;case ConditionName.showBannerStaticFiles:return Z&&t.cover;case ConditionName.showSpeedIcon:return t.type!=="live";case ConditionName.showShareInSetting:return!r&&!a;case ConditionName.showPlayListIcon:return O&&O.length>0&&(xe||!xe&&t.portrait!=="true")&&Ce!==!0;case ConditionName.showPlayListTabTouchscreen:return O&&O.length>0&&isTouchScreen();case ConditionName.showCommentComponent:return dt||!dt&&mt>0;case ConditionName.showModuleTitle:return t.showModuleTitle==="true";case ConditionName.showProgressbar:return!(isIOS()&&t.type==="live")&&!(t.type==="live"&&he);case ConditionName.showAgeClassification:return n.pg_state&&!X;case ConditionName.showChat:return t.type==="live"&&_t&&Pt;case ConditionName.showMiniPlayer:return Ce;case ConditionName.showPictureInPicture:return Ce!==!0&&!isIOS()&&t.site!=="zarebin.ir";case ConditionName.showPersonalMarker:return t.authentication==="true"&&(t.featureSet===void 0||t.featureSet.personalMarker!=="false");case ConditionName.showFeedback:return t.featureSet===void 0||t.featureSet.feedback!=="false";case ConditionName.trackerEnabled:return(t.featureSet===void 0||t.featureSet.enableTracker!=="false")&&t.quiz!=="true";case ConditionName.showTabNavigator:return t.authentication==="true"&&(t.featureSet===void 0||t.featureSet.profileFooter!=="false");case ConditionName.showBookmark:return t.authentication==="true"&&(t.featureSet===void 0||t.featureSet.bookmark!=="false");case ConditionName.shareButton:return t.featureSet===void 0||t.featureSet.shareButton!=="false";case ConditionName.showCommentSection:return t.featureSet===void 0||t.featureSet.showCommentSection!=="false";case ConditionName.showVideoUploadTime:return t.featureSet===void 0||t.featureSet.videoUploadTime!=="false";case ConditionName.showVideoViewers:return t.featureSet===void 0||t.featureSet.videoViewers!=="false";case ConditionName.showRecommendationList:return t.featureSet===void 0||t.featureSet.recommendationList!=="false";case ConditionName.showPlaylist:return t.featureSet===void 0||t.featureSet.playlist!=="false";case ConditionName.show_Chat:return t.featureSet===void 0||t.featureSet.chat!=="false";case ConditionName.showSubtitle:return!!F&&(!Ce||isFullMobilePortrait());case ConditionName.hidePopovers:return!we&&!ye&&!Re&&!_e&&!Ee;case ConditionName.isRaw:return t.raw;case ConditionName.isParamsPortrait:return t.portrait==="true";case ConditionName.isComplexPortrait:return r;case ConditionName.isComplexDarkModePortrait:return r&&t.theme==="dark";case ConditionName.isComplexDesktop:return a;case ConditionName.isLandscape:return window.innerHeight<=window.innerWidth;case ConditionName.isTouchScreen:return isTouchScreen();case ConditionName.isTouchScreenPortrait:return isTouchScreenPortrait();case ConditionName.isTouchScreenLandscape:return isTouchScreenLandscape();case ConditionName.isActiveElements:return ue;case ConditionName.isPlay:return ge;case ConditionName.isPlayMiniPlayer:return Mt.play;case ConditionName.isFirstPlay:return Z;case ConditionName.isLock:return X;case ConditionName.isIOS:return isIOS();case ConditionName.isIOSLive:return isIOS()&&t.type==="live";case ConditionName.isLoading:return ce;case ConditionName.isLive:return pe;case ConditionName.isLiveParam:return t.type==="live";case ConditionName.isLiveError:return y;case ConditionName.isDarkMode:return t.theme==="dark";case ConditionName.isStaticFormat:return staticFormats(t.type);case ConditionName.isEnded:return he;case ConditionName.isAutoPlay:return Y;case ConditionName.isFullScreen:return xe;case ConditionName.isGeneral:return t.isGeneral==="true";case ConditionName.isValidAddress:return v;case ConditionName.isFetchDetails:return b;case ConditionName.isAutoQuality:return ct.quality===-1;case ConditionName.isAuth:return C&&t.isAuth==="true";case ConditionName.isChildClassification:return n.pg_state&&n.pg_state<14;case ConditionName.isTeenagerClassification:return n.pg_state&&n.pg_state>=14&&n.pg_state<18;case ConditionName.isYoungClassification:return n.pg_state&&n.pg_state>=18;case ConditionName.isSelectedSubtitle:return!!l&&l.length>0&&F;case ConditionName.isZarebinSite:return t.site==="zarebin.ir";case ConditionName.isUserIdsParamsEqualAll:return!!t.user_ids&&t.user_ids==="all";case ConditionName.isMiniPlayer:return(t.portrait!=="true"||Ce)&&A.width<520;case ConditionName.isFullMobilePortrait:return isFullMobilePortrait();case ConditionName.isLogin:return gt;case ConditionName.isSpinSettingsIcon:return ct.quality===-1?be===void 0:ct.quality!==de;case ConditionName.isVttFitHeight:return A.height<600||isTouchScreen();case ConditionName.isBookmark:return kt!==void 0;case ConditionName.isPressKeySpace:return!X;case ConditionName.isPressKeyK:return!X;case ConditionName.isPressKeyI:return!X&&!Z&&!Ce;case ConditionName.isPressKeyF:return!X&&!Z&&!Ce;case ConditionName.isPressKeyS:return t.type!=="live"&&!X&&!Z;case ConditionName.isPressKeyC:return!X&&!Z&&!Ce&&!!l&&l.length>0;case ConditionName.isPressKeyArrowRight:return!Z&&!X;case ConditionName.isPressKeyArrowLeft:return!Z&&!X;case ConditionName.isPressKeyL:return!Z;case ConditionName.isPressKeyN:return m&&m.length>0&&!Z&&!X;case ConditionName.isPressKeyQ:return p&&p.length>0&&!Z&&!X;case ConditionName.isPressKeyE:return o.length!==0&&!Z&&!X;case ConditionName.isPressKeyM:return!Z&&!X;case ConditionName.isSendTimelineLog:return!staticFormats(t.type);case ConditionName.isPointsQuiz:return!!Ye&&Object.keys(Ye).length>0&&Ye.type===QuizTypes.Points;case ConditionName.isReady:return M;case ConditionName.isProduction:return getStatus()==="production";case ConditionName.isPaymentSuccess:return getStatus()==="production";case ConditionName.isPopoverOpen:return[we,ye,_e,Re,Ee,Ke,qe,Ge,st,tt,Ze,Ue,Oe,He,Be,Fe,Ve,me,je,it].some(Bt=>!!Bt);case ConditionName.isOnPermise:return envs.onPermise==="true";case ConditionName.isArabicLang:return t.lang===Lang.ar;case ConditionName.backgroundColorInLightMode:return a||r;case ConditionName.heightScreen:return!r&&!a&&!t.height;case ConditionName.playByClickPoster:return Z&&n.banner&&!wt;case ConditionName.hasMarkers:return o.length!==0;case ConditionName.hasTitle:return n.title;case ConditionName.hasDescription:return n.description;case ConditionName.hasClipboard:return navigator&&navigator.clipboard&&navigator.clipboard.writeText;case ConditionName.hasRecommendationList:return m&&m.length>0;case ConditionName.hasTags:return n.tag;case ConditionName.hasPreviewTime:return t.preview==="true";case ConditionName.hasEmojis:return f;case ConditionName.hasEmojiList1Or2:return f&&!!f.emoji_list_1||f&&!!f.emoji_list_2;case ConditionName.hasBanner:return n.banner;case ConditionName.hasMultiAudio:return g.length>0;case ConditionName.hasDownloadLinks:return n.download_links.length>0&&(t.featureSet===void 0||t.featureSet.downloadUrl!=="false");case ConditionName.hasStreamLink:return n.stream_link;case ConditionName.hasPoll:return d&&Object.keys(d).length>0;case ConditionName.hasUserIds:return!!t.user_ids;case ConditionName.hasAlternativeLives:return p&&p.length>0;case ConditionName.hasManualQuality:return de!=null;case ConditionName.hasSound:return!!ct.volume;case ConditionName.hasVtt:return!!n.vtt||!!n.vtt_mobile;case ConditionName.hasAutoPlay:return t.autoplay==="true";case ConditionName.hasPlayList:return O&&O.length>0&&(isTouchScreen()&&Ze||!isTouchScreen());case ConditionName.hasXToken:return!!t.xToken;case ConditionName.hasMovieDetails:return n.content_type!==null&&n.content_type!==void 0;case ConditionName.hasMovieContentType:return n.content_type!==null;case ConditionName.hasMovieReleaseYear:return!!n.release_year;case ConditionName.hasIMDB:return n.imdb_rate!==null;case ConditionName.hasSelectedTags:return!!at.length;case ConditionName.hasInputTagSearch:return!!Ct;case ConditionName.hasFullScreenParams:return t.fullscreen==="true";case ConditionName.hasPreviewParams:return t.preview==="true";case ConditionName.hasChart:return t.chart==="true"&&!staticFormats(t.type);case ConditionName.hasChartPoints:return!!N.length;case ConditionName.hasOnFinishedParams:return!!t.onFinished;case ConditionName.hasOnSnapshotParams:return!!t.onSnapshot;case ConditionName.hasXTokenParamOrSendXToken:const It=new URLSearchParams(window.location.search).get("xToken"),$t=api.get("xToken");return!!It||!!$t;case ConditionName.hasUserAvatar:return!!Et;case ConditionName.hasUserName:return!!Rt;case ConditionName.hasUserPhoneNumber:return!!Lt;case ConditionName.hasScrollElementId:return!!t.scrollElementId&&Ce!==void 0&&(a||t.portrait==="false")&&!isTouchScreen();case ConditionName.hasSportProvider:return t.provider==="sport";case ConditionName.hasSidebar:const Dt=document.getElementById("__container");return a&&(O&&O.length>0&&(t.featureSet===void 0||t.featureSet.playlist!=="false")||t.featureSet===void 0||t.featureSet.chat!=="false"||m&&m.length>0&&(t.featureSet===void 0||t.featureSet.recommendationList!=="false")||gt)&&(Dt?Dt.getBoundingClientRect().width:window.innerWidth)>900;case ConditionName.isBeforeRequest_Playlist_Chat_Recommendation:return t.type!=="live"&&O===void 0&&(t.featureSet===void 0||t.featureSet.playlist!=="false")||(t.featureSet===void 0||t.featureSet.recommendationList!=="false")&&m===void 0;case ConditionName.isBeforeRequestComments:return ut===void 0&&!isTouchScreen()&&(dt||!dt&&mt>0);case ConditionName.isVisibilityChange:return t.type==="live"&&!document.pictureInPictureElement;case ConditionName.hasTrailer:return e.length!==0;case ConditionName.hasHParam:return t.h==="true";case ConditionName.hasPreviewStart:return n.preview_start;case ConditionName.hasPreviewEnd:return n.preview_end;case ConditionName.hasSubtitles:return!!l&&l.length>0&&t.quiz!=="true";case ConditionName.hasSubtitlesInDetails:return n.subtitles&&n.subtitles.length>0&&t.quiz!=="true";case ConditionName.hasHomeButtonClickFlag:return!!t.homeButtonClickFlag;case ConditionName.hasContinuousPlayback:return!!vt.time&&wt&&!t.t&&((Nt=t.featureSet)==null?void 0:Nt.continuousPlayback)==="true";case ConditionName.hasPermittedLoadedFragment:return ke.length>=Number(getInitialLoadedFragmentCount());case ConditionName.hasAllParams:return allParams.length===Object.keys(VideoDataSliceState.params).length;case ConditionName.hasDefaultMessages:return!!Ot.length;case ConditionName.hasPinMessage:return!!At;case ConditionName.hasCommentDefaultMessages:return!!bt&&!!bt.length;case ConditionName.hasActiveCue:return F&&F.activeCues&&F.activeCues.length>0;case ConditionName.hasTimeMachine:return t.type!=="live"||t.type==="live"&&n.time_machine!==null;case ConditionName.has360:return!!n.is_360;case ConditionName.hasRedirectOnEndedUrlParams:return!!t.redirectOnEndedUrl;case ConditionName.hasDaaniTokenParams:return!!t.daaniToken;case ConditionName.getRecommendationList:return t.portrait==="true"&&t.quiz!=="true"&&b;case ConditionName.getLiveDetailsInIntervals:return y&&t.type==="live"&&t.isGeneral!=="true";case ConditionName.getDetails:return!!t.type&&t.id&&t.isGeneral!=="true";case ConditionName.getMarkers:return["vod","archive","clip"].includes(String(t.type))&&t.id&&t.isGeneral!=="true"&&t.quiz!=="true"&&!t.hideMarkers&&b;case ConditionName.getPlayList:return!staticFormats(t.type)&&t.type!=="live"&&!isFullMobilePortrait()&&b;case ConditionName.firstGetDataIntervalAPI:return t.type==="live"&&t.isGeneral!=="true";case ConditionName.getUserSetting:return gt&&t.quiz!=="true"&&b;case ConditionName.getVideoMetaData:return gt&&t.quiz!=="true"&&b;case ConditionName.getUserProfile:return!!t.xToken&&b;case ConditionName.footerPaddingZero:return t.type!=="live"||t.type==="live"&&isTouchScreen()||isTouchScreenPortrait();case ConditionName.manaulPostAPI:return!!_||R.length>0||E.length>0;case ConditionName.canAccessVideo:return!!(t.h==="true"&&getAccessToken());case ConditionName.canAddComment:return dt;case ConditionName.canShowSubmittedComment:return xt;case ConditionName.canPlayVideo:return oe;case ConditionName.chatEnabled:return _t;case ConditionName.filterLastGif:return+le[le.length-2]==+le[ct.quality===-1?be??de:de];case ConditionName.instagramEmojiAnimation:return!isTouchScreen()||isTouchScreen()&&!ue;case ConditionName.handleOverflowHidden:return!a||a&&xe;case ConditionName.thresholdOnlineViewers:return!!u&&u>=n.online_viewer_threshold;case ConditionName.setSubtitleFirstPlay:return n.subtitles&&n.subtitles.length>0&&!Z&&!staticFormats(t.type);case ConditionName.showQuizPopover:return t.xToken||firstQuizQuestion(Ye);case ConditionName.isQuizStatusEqual1:return!!Ye&&Object.keys(Ye).length>0&&Ye.questions.length>0&&lastQuizQuestionStatus(Ye)===1;case ConditionName.isQuizStatusEqual2:return!!Ye&&Object.keys(Ye).length>0&&Ye.questions.length>0&&lastQuizQuestionStatus(Ye)===2;case ConditionName.isQuizStatusEqual4:return!!(Ye&&Object.keys(Ye).length>0&&Ye.questions&&Ye.questions.length>0&&lastQuizQuestionStatus(Ye)===4);case ConditionName.isQuizEnd:return!!Ye&&Object.keys(Ye).length>0&&Ye.questions&&Ye.number_of_questions===Ye.questions.length&&lastQuizQuestionStatus(Ye)===4;case ConditionName.hasQuizParams:return t.quiz==="true";case ConditionName.hasQuiz:return!!Ye&&Object.keys(Ye).length>0&&!Z;case ConditionName.hasQuizQuestion:return!!Ye&&Ye.questions&&Ye.questions.length;case ConditionName.hasChances:return jt!==-1;case ConditionName.sendUserTrackerRequest:return!!Ye&&Object.keys(Ye).length>0&&Ye.questions.length===0&&!Z&&t.xToken}},whiteListTargets=getWhiteListTargets().split(","),whiteListGeneralUrl=getWhiteListGeneralUrl().split(","),activeElementsTime=3e3,showLoaderTime=3e3,livePlayRetryDuration=3e3,RetryCountGeneralDataFetch=3,RetryTimeDelayGeneralDataFetch=5,durationWatched=60,continuousePlaybackIntervalTime=6e4,footerPadding=()=>conditions(ConditionName.footerPaddingZero)?0:64,featureToggle="ft",sidebarWidth=357,LiveDelay=6,LiveWindow=12,videoTag=()=>document.getElementById("player-tag"),miniPlayerVideoTag=()=>document.getElementById("mini-player-video-tag"),multiLiveVideo=()=>document.getElementById("multilive-player"),progressBar=()=>document.getElementById("time-progress-bar"),progressBarWidth=()=>store.getState().videoData.videoElementSizeInfo.width-2*footerPadding(),seenPoll=()=>JSON.parse(localStorage.getItem("seen-poll")),livePoll=()=>JSON.parse(localStorage.getItem("live-poll"));/*! *****************************************************************************
|
|
62
|
+
Check the top-level render call using <`+De+">.")}return Se}}function jt(fe,Se){{if(!fe._store||fe._store.validated||fe.key!=null)return;fe._store.validated=!0;var De=Ye(Se);if(At[De])return;At[De]=!0;var ze="";fe&&fe._owner&&fe._owner!==Rt.current&&(ze=" It was passed a child from "+oe(fe._owner.type)+"."),vt(fe),C('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',De,ze),vt(null)}}function Mt(fe,Se){{if(typeof fe!="object")return;if(Oe(fe))for(var De=0;De<fe.length;De++){var ze=fe[De];_t(ze)&&jt(ze,Se)}else if(_t(fe))fe._store&&(fe._store.validated=!0);else if(fe){var Qe=v(fe);if(typeof Qe=="function"&&Qe!==fe.entries)for(var Je=Qe.call(fe),Xe;!(Xe=Je.next()).done;)_t(Xe.value)&&jt(Xe.value,Se)}}}function Nt(fe){{var Se=fe.type;if(Se==null||typeof Se=="string")return;var De;if(typeof Se=="function")De=Se.propTypes;else if(typeof Se=="object"&&(Se.$$typeof===l||Se.$$typeof===u))De=Se.propTypes;else return;if(De){var ze=oe(Se);je(De,fe.props,"prop",ze,fe)}else if(Se.PropTypes!==void 0&&!wt){wt=!0;var Qe=oe(Se);C("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",Qe||"Unknown")}typeof Se.getDefaultProps=="function"&&!Se.getDefaultProps.isReactClassApproved&&C("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function Ht(fe){{for(var Se=Object.keys(fe.props),De=0;De<Se.length;De++){var ze=Se[De];if(ze!=="children"&&ze!=="key"){vt(fe),C("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",ze),vt(null);break}}fe.ref!==null&&(vt(fe),C("Invalid attribute `ref` supplied to `React.Fragment`."),vt(null))}}function It(fe,Se,De,ze,Qe,Je){{var Xe=M(fe);if(!Xe){var We="";(fe===void 0||typeof fe=="object"&&fe!==null&&Object.keys(fe).length===0)&&(We+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var ht=Ot();ht?We+=ht:We+=Pt();var ot;fe===null?ot="null":Oe(fe)?ot="array":fe!==void 0&&fe.$$typeof===e?(ot="<"+(oe(fe.type)||"Unknown")+" />",We=" Did you accidentally export a JSX literal instead of a component?"):ot=typeof fe,C("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",ot,We)}var lt=Et(fe,Se,De,Qe,Je);if(lt==null)return lt;if(Xe){var pt=Se.children;if(pt!==void 0)if(ze)if(Oe(pt)){for(var St=0;St<pt.length;St++)Mt(pt[St],fe);Object.freeze&&Object.freeze(pt)}else C("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else Mt(pt,fe)}return fe===n?Ht(lt):Nt(lt),lt}}function $t(fe,Se,De){return It(fe,Se,De,!0)}function Dt(fe,Se,De){return It(fe,Se,De,!1)}var Bt=Dt,zt=$t;V$1.Fragment=n,V$1.jsx=Bt,V$1.jsxs=zt}()),V$1}process.env.NODE_ENV==="production"?se.exports=Cr():se.exports=Er();var c$1=se.exports;const xr={undo:"يعود",undoing:"العودة",operationWasUndone:"تمت إرجاع العملية",errorInOperation:"خطأ في التشغيل"},Rr={undo:"undo",undoing:"undoing",operationWasUndone:"The operation was undone",errorInOperation:"error in operation"},Tr={undo:"برگرداندن",undoing:"در حال بازگردانی",operationWasUndone:"عملیات بازگردانده شد",errorInOperation:"خطا در انجام عملیات"},wr=i=>{const e=i.split("-"),t={top:"unset",bottom:"unset",right:"unset",left:"unset"};return e[0]==="top"?t.top=10:t.bottom=10,e[1]==="right"?t.right=10:t.left=10,t},Sr=(i,e)=>i?e!=="unset"?"animate__bounceInLeft":"animate__bounceInRight":e!=="unset"?"animate__bounceOutLeft":"animate__bounceOutRight",ne=i=>Object.fromEntries(Object.entries(i).filter(([e,t])=>t!==void 0)),jr=()=>{let i="xxxxxxxx-xxxx-Mxxx-Nxxx-x".replace(/[xMN]/g,e=>{let t;return e==="M"?t=Math.floor(1+Math.random()*5):e==="N"?t=Math.floor(8+Math.random()*4):t=Math.floor(Math.random()*16),t.toString(16)});return i+=Date.now().toString(16),i},ie=i=>{switch(i){case"en":return Rr;case"ar":return xr;default:return Tr}};var Or=function(){function i(t){this.subscriber=t}var e=i.prototype;return e.remove=function(){this.subscriber&&(this.subscriber.removeSubscription(this),this.subscriber=null)},i}(),kr=Or;function Fr(i,e){i.prototype=Object.create(e.prototype),i.prototype.constructor=i,i.__proto__=e}var Pr=kr,Lr=function(i){Fr(e,i);function e(t,n,s){var r;return r=i.call(this,t)||this,r.listener=n,r.context=s,r}return e}(Pr),Me=Lr,$r=process.env.NODE_ENV!=="production"?function(i){if(i===void 0)throw new Error("invariant(...): Second argument must be a string.")}:function(i){};function Nr(i,e){for(var t=arguments.length,n=new Array(t>2?t-2:0),s=2;s<t;s++)n[s-2]=arguments[s];if($r(e),!i){var r;if(e===void 0)r=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var a=0;r=new Error(e.replace(/%s/g,function(){return String(n[a++])})),r.name="Invariant Violation"}throw r.framesToPop=1,r}}var Ie=Nr,$e=Ie,Ar=function(){function i(){this._subscriptionsForType={},this._currentSubscription=null}var e=i.prototype;return e.addSubscription=function(t,n){n.subscriber!==this&&(process.env.NODE_ENV!=="production"?$e(!1,"The subscriber of the subscription is incorrectly set."):$e(!1)),this._subscriptionsForType[t]||(this._subscriptionsForType[t]=[]);var s=this._subscriptionsForType[t].length;return this._subscriptionsForType[t].push(n),n.eventType=t,n.key=s,n},e.removeAllSubscriptions=function(t){t===void 0?this._subscriptionsForType={}:delete this._subscriptionsForType[t]},e.removeSubscription=function(t){var n=t.eventType,s=t.key,r=this._subscriptionsForType[n];r&&delete r[s]},e.getSubscriptionsForType=function(t){return this._subscriptionsForType[t]},i}(),Dr=Ar;function G$1(i){return function(){return i}}var P=function(){};P.thatReturns=G$1,P.thatReturnsFalse=G$1(!1),P.thatReturnsTrue=G$1(!0),P.thatReturnsNull=G$1(null),P.thatReturnsThis=function(){return this},P.thatReturnsArgument=function(i){return i};var Mr=P,Ir=Me,Vr=Dr,Ne=Ie,Wr=Mr,Br=function(){function i(){this._subscriber=new Vr,this._currentSubscription=null}var e=i.prototype;return e.addListener=function(t,n,s){return this._subscriber.addSubscription(t,new Ir(this._subscriber,n,s))},e.once=function(t,n,s){var r=this;return this.addListener(t,function(){r.removeCurrentListener(),n.apply(s,arguments)})},e.removeAllListeners=function(t){this._subscriber.removeAllSubscriptions(t)},e.removeCurrentListener=function(){this._currentSubscription||(process.env.NODE_ENV!=="production"?Ne(!1,"Not in an emitting cycle; there is no current subscription"):Ne(!1)),this._subscriber.removeSubscription(this._currentSubscription)},e.listeners=function(t){var n=this._subscriber.getSubscriptionsForType(t);return n?n.filter(Wr.thatReturnsTrue).map(function(s){return s.listener}):[]},e.emit=function(t){var n=this._subscriber.getSubscriptionsForType(t);if(n){for(var s=Object.keys(n),r=0;r<s.length;r++){var a=s[r],o=n[a];o&&(this._currentSubscription=o,this.__emitToSubscription.apply(this,[o].concat(Array.prototype.slice.call(arguments))))}this._currentSubscription=null}},e.__emitToSubscription=function(t,n){var s=Array.prototype.slice.call(arguments,2);t.listener.apply(t.context,s)},i}(),Ur=Br,Yr={EventEmitter:Ur},Hr=Yr;const W$1=new Hr.EventEmitter,Zr=({className:i,onClick:e,theme:t})=>c$1.jsxs("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:i,onClick:e,style:{marginTop:"1px"},children:[c$1.jsx("path",{className:`${t==="dark"?"fill-red-dark":"fill-red-light"}`,opacity:"0.8",d:"M21.76 15.92L15.36 4.4C14.5 2.85 13.31 2 12 2C10.69 2 9.49998 2.85 8.63998 4.4L2.23998 15.92C1.42998 17.39 1.33998 18.8 1.98998 19.91C2.63998 21.02 3.91998 21.63 5.59998 21.63H18.4C20.08 21.63 21.36 21.02 22.01 19.91C22.66 18.8 22.57 17.38 21.76 15.92Z"}),c$1.jsx("path",{className:"fill_gray_color",d:"M12 14.75C11.59 14.75 11.25 14.41 11.25 14V9C11.25 8.59 11.59 8.25 12 8.25C12.41 8.25 12.75 8.59 12.75 9V14C12.75 14.41 12.41 14.75 12 14.75Z"}),c$1.jsx("path",{className:"fill_gray_color",d:"M12 18.0005C11.94 18.0005 11.87 17.9905 11.8 17.9805C11.74 17.9705 11.68 17.9505 11.62 17.9205C11.56 17.9005 11.5 17.8705 11.44 17.8305C11.39 17.7905 11.34 17.7505 11.29 17.7105C11.11 17.5205 11 17.2605 11 17.0005C11 16.7405 11.11 16.4805 11.29 16.2905C11.34 16.2505 11.39 16.2105 11.44 16.1705C11.5 16.1305 11.56 16.1005 11.62 16.0805C11.68 16.0505 11.74 16.0305 11.8 16.0205C11.93 15.9905 12.07 15.9905 12.19 16.0205C12.26 16.0305 12.32 16.0505 12.38 16.0805C12.44 16.1005 12.5 16.1305 12.56 16.1705C12.61 16.2105 12.66 16.2505 12.71 16.2905C12.89 16.4805 13 16.7405 13 17.0005C13 17.2605 12.89 17.5205 12.71 17.7105C12.66 17.7505 12.61 17.7905 12.56 17.8305C12.5 17.8705 12.44 17.9005 12.38 17.9205C12.32 17.9505 12.26 17.9705 12.19 17.9805C12.13 17.9905 12.06 18.0005 12 18.0005Z"})]}),qr=({className:i,onClick:e,theme:t})=>c$1.jsxs("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:i,onClick:e,style:{marginTop:"1px"},children:[c$1.jsx("path",{className:`${t==="dark"?"fill-lime-dark":"fill-lime-light"}`,opacity:"0.8",d:"M16.19 2H7.81C4.17 2 2 4.17 2 7.81V16.18C2 19.83 4.17 22 7.81 22H16.18C19.82 22 21.99 19.83 21.99 16.19V7.81C22 4.17 19.83 2 16.19 2Z"}),c$1.jsx("path",{className:"fill_gray_color",d:"M10.5799 15.5796C10.3799 15.5796 10.1899 15.4996 10.0499 15.3596L7.21994 12.5296C6.92994 12.2396 6.92994 11.7596 7.21994 11.4696C7.50994 11.1796 7.98994 11.1796 8.27994 11.4696L10.5799 13.7696L15.7199 8.62961C16.0099 8.33961 16.4899 8.33961 16.7799 8.62961C17.0699 8.91961 17.0699 9.39961 16.7799 9.68961L11.1099 15.3596C10.9699 15.4996 10.7799 15.5796 10.5799 15.5796Z"})]}),Gr=({className:i,onClick:e,theme:t})=>c$1.jsxs("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:i,onClick:e,style:{marginTop:"1px"},children:[c$1.jsx("path",{className:`${t==="dark"?"fill-orange-dark":"fill-orange-light"}`,opacity:"0.8",d:"M16.34 2H7.67C4.28 2 2 4.38 2 7.92V16.09C2 19.62 4.28 22 7.67 22H16.34C19.73 22 22 19.62 22 16.09V7.92C22 4.38 19.73 2 16.34 2Z"}),c$1.jsx("path",{className:"fill_gray_color",d:"M11 15.7825V11.3625C11 11.1305 11.0922 10.9079 11.2563 10.7438C11.4204 10.5797 11.6429 10.4875 11.875 10.4875C12.1071 10.4875 12.3296 10.5797 12.4937 10.7438C12.6578 10.9079 12.75 11.1305 12.75 11.3625V15.7825C12.75 16.0146 12.6578 16.2372 12.4937 16.4013C12.3296 16.5654 12.1071 16.6575 11.875 16.6575C11.6429 16.6575 11.4204 16.5654 11.2563 16.4013C11.0922 16.2372 11 16.0146 11 15.7825V15.7825ZM11.005 8.18955C11.0044 8.01539 11.0556 7.84499 11.1522 7.70002C11.2487 7.55505 11.3861 7.44206 11.547 7.37542C11.7079 7.30877 11.885 7.29149 12.0558 7.32576C12.2265 7.36004 12.3832 7.44432 12.506 7.56789C12.6287 7.69147 12.7119 7.84875 12.745 8.01973C12.7781 8.19072 12.7596 8.36769 12.6918 8.52813C12.6241 8.68858 12.5102 8.82525 12.3645 8.92077C12.2189 9.01628 12.0482 9.06633 11.874 9.06455C11.6432 9.06218 11.4227 8.96905 11.26 8.80529C11.0974 8.64154 11.0058 8.42034 11.005 8.18955Z"})]}),Jr=()=>c$1.jsx("div",{className:"promise-loader"}),zr=({type:i,theme:e})=>{let t=c$1.jsx(c$1.Fragment,{});return i==="success"?t=c$1.jsx(qr,{theme:e}):i==="warning"?t=c$1.jsx(Gr,{theme:e}):i==="error"?t=c$1.jsx(Zr,{theme:e}):i==="promise"&&(t=c$1.jsx(Jr,{})),c$1.jsx("div",{style:{flex:"none"},children:t})},Kr=({className:i,onClick:e,theme:t})=>c$1.jsxs("svg",{width:"18",height:"18",viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:i,onClick:e,children:[c$1.jsx("path",{className:`${t==="dark"?"toast_undo-fill-dark":"toast_undo-fill-light"}`,d:"M11.3477 14.2949H5.34766C5.04016 14.2949 4.78516 14.0399 4.78516 13.7324C4.78516 13.4249 5.04016 13.1699 5.34766 13.1699H11.3477C13.1027 13.1699 14.5352 11.7374 14.5352 9.98242C14.5352 8.22742 13.1027 6.79492 11.3477 6.79492H3.09766C2.79016 6.79492 2.53516 6.53992 2.53516 6.23242C2.53516 5.92492 2.79016 5.66992 3.09766 5.66992H11.3477C13.7252 5.66992 15.6602 7.60492 15.6602 9.98242C15.6602 12.3599 13.7252 14.2949 11.3477 14.2949Z"}),c$1.jsx("path",{className:`${t==="dark"?"toast_undo-fill-dark":"toast_undo-fill-light"}`,d:"M4.82242 8.67016C4.67992 8.67016 4.53742 8.61766 4.42492 8.50516L2.50492 6.58516C2.28742 6.36766 2.28742 6.00766 2.50492 5.79016L4.42492 3.87016C4.64242 3.65266 5.00242 3.65266 5.21992 3.87016C5.43742 4.08766 5.43742 4.44766 5.21992 4.66516L3.69742 6.18766L5.21992 7.71016C5.43742 7.92766 5.43742 8.28766 5.21992 8.50516C5.11492 8.61766 4.96492 8.67016 4.82242 8.67016Z"})]}),Xr=({toastInfo:i,callbackFunction:e,theme:t,texts:n,lang:s})=>{const[r,a]=React2.useState(!1),o=()=>{a(!0);const l=e();if(l&&!r){const d=jr();ae({title:n.undoing,type:"promise",id:`toast-promise-${d}`}),l.then(()=>{Ae(`toast-promise-${d}`),ae({...i,title:n.operationWasUndone,type:i.type??"success",callbackFunction:void 0,lang:s})}).catch(()=>{Ae(`toast-promise-${d}`),ae({...i,title:n.errorInOperation,type:"error",callbackFunction:void 0,lang:s})})}else a(!1)};return c$1.jsxs("div",{className:`toast_undo ${t==="dark"?"toast_undo-dark":"toast_undo-light"}`,style:{cursor:r?"default":"pointer"},onClick:r?()=>{}:()=>o(),children:[c$1.jsx(Kr,{theme:t}),c$1.jsx("span",{dir:"auto",children:n.undo})]})},Qr=({type:i,positionX:e,showToast:t,setShowToast:n,autoClose:s,theme:r,isHover:a})=>{const[o,l]=React2.useState(100),d=React2.useRef(null),f=React2.useRef(a);React2.useEffect(()=>{f.current=a},[a]),React2.useEffect(()=>(t&&l(100),s&&t&&(d.current=setInterval(()=>{f.current||l(g=>g-1e3/s)},10)),()=>clearInterval(d.current)),[t]);const u=()=>{clearInterval(d.current),n(!1)};let p;React2.useEffect(()=>(o<=0&&u(),()=>clearTimeout(p)),[o]);let m="";return i==="success"?m=r==="dark"?"toast_progressBar-lime-dark":"toast_progressBar-lime-light":i==="warning"?m=r==="dark"?"toast_progressBar-orange-dark":"toast_progressBar-orange-light":i==="error"&&(m=r==="dark"?"toast_progressBar-red-dark":"toast_progressBar-red-light"),c$1.jsx("div",{className:"toast_progressBar",children:c$1.jsx("div",{style:{left:e==="left"?0:"unset",right:e==="right"?0:"unset",width:`${o}%`},className:`toast_progressBar-inner ${m}`})})},et=({className:i,onClick:e})=>c$1.jsx("svg",{width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:{flex:"none"},className:i,onClick:e,children:c$1.jsx("path",{d:"M14 1.41L12.59 0L7 5.59L1.41 0L0 1.41L5.59 7L0 12.59L1.41 14L7 8.41L12.59 14L14 12.59L8.41 7L14 1.41Z"})}),rt=({toastInfo:i,toastPosition:e,toasts:t,setToasts:n,texts:s,lang:r})=>{const[a,o]=React2.useState(!0),[l,d]=React2.useState(!1);React2.useEffect(()=>{let u;return a===!1&&(u=setTimeout(()=>o(void 0),1e3)),()=>clearTimeout(u)},[a]);const f=Sr(a,e.left);return c$1.jsx(c$1.Fragment,{children:a!==void 0&&c$1.jsxs("div",{className:`toast ${r==="en"&&"toast-ltr"} ${i.theme==="dark"?"toast_dark":"toast_light"} animate__animated ${f}`,style:{boxShadow:"0px 4px 4px rgba(0, 0, 0, 0.25)"},id:i.id,onMouseOver:()=>d(!0),onMouseOut:()=>d(!1),children:[c$1.jsx(zr,{type:i.type,theme:i.theme}),c$1.jsx("p",{dir:"auto",className:`toast_title ${r==="en"?"toast_title_ltr":"toast_title_rtl"}`,children:i.title}),i.type!=="promise"&&i.callbackFunction&&c$1.jsx(Xr,{toastInfo:i,callbackFunction:i.callbackFunction,theme:i.theme,toasts:t,setToasts:n,texts:s,lang:r}),i.type!=="promise"&&i.autoClose&&c$1.jsx(Qr,{type:i.type,positionX:e.left!=="unset"?"left":"right",showToast:a,setShowToast:o,autoClose:i.autoClose,theme:i.theme,isHover:l}),i.type!=="promise"&&c$1.jsx(et,{className:`toast_closeIcon ${i.theme==="dark"?"toast_closeIcon-dark":"toast_closeIcon-light"}`,onClick:()=>o(!1)})]})})},nt=i=>{const[e,t]=React2.useState([]),[n,s]=React2.useState(ie(i.lang?i.lang:"fa")),r=React2.useRef({position:"bottom-right",theme:"light",autoClose:5e3,lang:i.lang?i.lang:"fa"});React2.useEffect(()=>(W$1.addListener("toast",o=>{const l=ne(o);let d={};const f={...r.current,...l,id:o.id?`mobin-toast-${o.id}`:void 0};d=ie(f.lang),s(d),t(u=>[...u,f])}),W$1.addListener("closeToast",o=>{t(l=>l.filter(d=>d.id!==`mobin-toast-${o}`))}),()=>W$1.removeAllListeners()),[]),React2.useEffect(()=>{r.current={...r.current,...ne(i)}},[i.theme]),React2.useEffect(()=>{r.current={...r.current,...ne(i)},s(ie(i.lang?i.lang:"fa"))},[i.lang]);const a=wr(r.current.position);return c$1.jsx(c$1.Fragment,{children:e.length?c$1.jsx("div",{className:"toast-wrapper",style:{...a},children:e.map(o=>c$1.jsx(rt,{lang:i.lang,toastInfo:o,toastPosition:a,toasts:e,setToasts:t,texts:n},o.id))}):c$1.jsx(c$1.Fragment,{})})},ae=({id:i,title:e,type:t,position:n,theme:s,autoClose:r,callbackFunction:a,lang:o})=>{W$1.emit("toast",{id:i,title:e,type:t,position:n,theme:s,autoClose:r,callbackFunction:a,lang:o})},Ae=i=>W$1.emit("closeToast",i),firstQuizQuestion=i=>i.questions[0],lastQuizQuestion=(i,e)=>i.questions[i.questions.length-1],lastQuizQuestionStatus=i=>i.questions.length?lastQuizQuestion(i).status:void 0,generalOptionals=["src","googleIndex","snapshot","fullscreen","autoplay","t","h","theme","provider","fullrate","e-cover","cover","uid","user_id","user_ids","preview","isAuth","authentication","site","xToken","width","height","chart","onFinished","showModuleTitle","scrollElementId","onSnapshot","isMarkersChange","featureSet","uuid","handleRedirectCards","homeButtonClickFlag","redirectOnEndedUrl","lang"],allParams=["src","type","id","fullscreen","autoplay","portrait","t","h","isGeneral","raw","theme","provider","fullrate","snapshot","cover","user_id","user_ids","preview","isAuth","authentication","site","e-url","e-cover","width","height","chart","onFinished","shoiwModuleTitle","scrollElementId","onSnapshot","isMarkersChange","quiz","featureSet","uuid","homeButtonClickFlag","redirectOnEndedUrl","lang"],quizConditions={required:["type","quiz","id"],optionals:[...generalOptionals]},isGeneralConditions={required:["type","isGeneral","src"],optionals:[...generalOptionals,"portrait"]},staticConditions={required:["e-url","type"],optionals:[...generalOptionals]},nonStaticConditions={required:["id","type"],optionals:[...generalOptionals,"portrait"]},rawConditions={required:["raw","type","id"],optionals:[...generalOptionals,"portrait"]},conditions=i=>{var Nt;const{trailer:e,params:t,details:n,gif:s,isComplexPortrait:r,isComplexDesktop:a,markers:o,subtitles:l,question:d,emojis:f,onlineViewers:u,alternative_Lives:p,recommendationList:m,multiAudio:g,isLiveError:y,isValidAddress:v,isFetchDetails:b,token:C,selectedOptionId:_,emojiList1:R,emojiList2:E,selectedSubtitle:F,playList:O,videoElementSizeInfo:A,chartPoints:N,isReady:M}=store.getState().videoData,{firstPlay:Z,lock:X,canPlayVideo:oe,qualityLevels:le,manualQuality:de,activeElements:ue,isLoading:ce,isLive:pe,isEnded:he,isAutoPlay:Y,play:ge,isFullScreen:xe,autoQuality:be,showMiniPlayer:Ce,loadedFragmentsCount:ke}=store.getState().controller,{trailerPopover:me,settingPopover:ye,markersListPopover:we,sharePopover:_e,feedbackPopover:Re,multiLivesPopover:Ee,fullRatePopover:ve,autoPlayPopover:qe,recommendListPopover:Ge,speedPopover:tt,tagsPopover:st,personalMarkersPopover:He,bookmarksPopover:Be,chatPopover:Fe,loginPopover:je,chatEmojisPopover:Ve,commentPopover:Oe,playListCardPopover:Ue,playListPopover:Ze,pollPopover:Ke,downloadPopover:it}=store.getState().popovers,{canAddComment:dt,canShowSubmittedComment:xt,commentsCount:mt,comments:ut,commentDefaultMessages:bt}=store.getState().comments,{selectedTags:at,inputTagSearch:Ct}=store.getState().tags,{isLogin:gt,settings:ct,bookmarkId:kt,avatar_url:Et,name:Rt,phone_number:Lt,videoSettings:vt,showContinuousPlayback:wt}=store.getState().user,{chatEnabled:_t,showChat:Pt,defaultMessages:Ot,pinMessage:At}=store.getState().chats,{quiz:Ye,chances:jt}=store.getState().quiz,Mt=store.getState().miniPlayer;switch(i){case ConditionName.showHeader:return!Z&&oe&&!qe;case ConditionName.showMain:return!X||Z;case ConditionName.showFooter:return!Z&&oe;case ConditionName.showGif:return!Z&&t.type==="live"&&ct.poll_emoji&&s;case ConditionName.showElapsedTime:return t.type!=="live"||staticFormats(t.type);case ConditionName.showLiveStatus:return t.type==="live"&&!Z&&!X&&(isIOS()&&isTouchScreenPortrait()||!isIOS())&&!he;case ConditionName.showLiveStatusInComplexPortrait:return t.type==="live"&&!he;case ConditionName.showTouchVolumeBrightness:return!Z&&isTouchScreenLandscape()&&!X&&!he&&t.raw!=="true";case ConditionName.showBackwardForward:return!Z&&isTouchScreen()&&!X&&t.raw!=="true"&&(!he||he&&t.type!=="live");case ConditionName.showPoll:return ct.poll_emoji&&!Z&&d&&d.active&&!X&&t.type==="live"&&(isIOS()&&isTouchScreenPortrait()||!isIOS());case ConditionName.showFullRate:return!staticFormats(t.type)&&!Z&&t.fullrate==="true"&&ve!==void 0;case ConditionName.showTitle:return!staticFormats(t.type)&&t.type!=="live"&&t.isGeneral!=="true"&&!X;case ConditionName.showSnapShot:return!Z&&t.portrait!=="true"&&t.snapshot==="true"&&(!staticFormats(t.type)||isWhiteListUrl(t.src));case ConditionName.showInstagramEmoji:return ct.poll_emoji&&f&&t.type==="live"&&!Z&&!r;case ConditionName.showEmojiComplexPortrait:return ct.poll_emoji&&f&&t.type==="live";case ConditionName.showOnlineViewers:return!!u&&u>0&&(!r||t.quiz==="true");case ConditionName.showMultiLivePopover:return Ee;case ConditionName.showMarkerListPopover:return we;case ConditionName.showFullRatePopover:return ve;case ConditionName.showAutoPlayPopover:return qe&&he&&t.portrait==="true"&&!Ce&&m&&m.length>0;case ConditionName.showRecommendListPopover:return Ge;case ConditionName.showSettingPopover:return ye;case ConditionName.showSpeedPopover:return tt;case ConditionName.showTagsPopover:return st;case ConditionName.showPersonalMarkerPopover:return He;case ConditionName.showBookmarksPopover:return!!Be;case ConditionName.showFeedbackPopover:return Re;case ConditionName.showChatPopover:return!!Fe;case ConditionName.showTrailerPopover:return me;case ConditionName.showLoginPopover:return je;case ConditionName.showAutoPlayListTouchIcon:return he&&!qe&&isTouchScreenLandscape()&&t.portrait==="true"&&!isIOS()&&!X&&m&&m.length>0;case ConditionName.showMultiLive:return p&&p.length>0&&ct.poll_emoji;case ConditionName.showBigReplayIcon:return he&&t.portrait==="true"&&isTouchScreen()&&(isIOS()&&isTouchScreenPortrait()||!isIOS());case ConditionName.showReplayIcon:return t.portrait==="true"&&!isIOS()&&!isTouchScreen()&&Ce!==!0;case ConditionName.showPlayNextIcon:return t.portrait==="true"&&!isIOS()&&(!isTouchScreen()||isTouchScreenLandscape())&&t.isGeneral!=="true"&&Ce!==!0;case ConditionName.showAutoPlayToggleIcon:return t.portrait==="true"&&t.isGeneral!=="true"&&(isIOS()&&isTouchScreenPortrait()||!isIOS())&&Ce!==!0;case ConditionName.showSettingIcon:return!staticFormats(t.type)&&!isIOS();case ConditionName.showLikeDislike:return!staticFormats(t.type)&&t.portrait==="true"&&t.isGeneral!=="true"&&!a&&!r;case ConditionName.showBanner:return Z&&n.banner;case ConditionName.showBannerStaticFiles:return Z&&t.cover;case ConditionName.showSpeedIcon:return t.type!=="live";case ConditionName.showShareInSetting:return!r&&!a;case ConditionName.showPlayListIcon:return O&&O.length>0&&(xe||!xe&&t.portrait!=="true")&&Ce!==!0;case ConditionName.showPlayListTabTouchscreen:return O&&O.length>0&&isTouchScreen();case ConditionName.showCommentComponent:return dt||!dt&&mt>0;case ConditionName.showModuleTitle:return t.showModuleTitle==="true";case ConditionName.showProgressbar:return!(isIOS()&&t.type==="live")&&!(t.type==="live"&&he);case ConditionName.showAgeClassification:return n.pg_state&&!X;case ConditionName.showChat:return t.type==="live"&&_t&&Pt;case ConditionName.showMiniPlayer:return Ce;case ConditionName.showPictureInPicture:return Ce!==!0&&!isIOS()&&t.site!=="zarebin.ir";case ConditionName.showPersonalMarker:return t.authentication==="true"&&(t.featureSet===void 0||t.featureSet.personalMarker!=="false");case ConditionName.showFeedback:return t.featureSet===void 0||t.featureSet.feedback!=="false";case ConditionName.trackerEnabled:return(t.featureSet===void 0||t.featureSet.enableTracker!=="false")&&t.quiz!=="true";case ConditionName.showTabNavigator:return t.authentication==="true"&&(t.featureSet===void 0||t.featureSet.profileFooter!=="false");case ConditionName.showBookmark:return t.authentication==="true"&&(t.featureSet===void 0||t.featureSet.bookmark!=="false");case ConditionName.shareButton:return t.featureSet===void 0||t.featureSet.shareButton!=="false";case ConditionName.showCommentSection:return t.featureSet===void 0||t.featureSet.showCommentSection!=="false";case ConditionName.showVideoUploadTime:return t.featureSet===void 0||t.featureSet.videoUploadTime!=="false";case ConditionName.showVideoViewers:return t.featureSet===void 0||t.featureSet.videoViewers!=="false";case ConditionName.showRecommendationList:return t.featureSet===void 0||t.featureSet.recommendationList!=="false";case ConditionName.showPlaylist:return t.featureSet===void 0||t.featureSet.playlist!=="false";case ConditionName.show_Chat:return t.featureSet===void 0||t.featureSet.chat!=="false";case ConditionName.showSubtitle:return!!F&&(!Ce||isFullMobilePortrait());case ConditionName.hidePopovers:return!we&&!ye&&!Re&&!_e&&!Ee;case ConditionName.isRaw:return t.raw;case ConditionName.isParamsPortrait:return t.portrait==="true";case ConditionName.isComplexPortrait:return r;case ConditionName.isComplexDarkModePortrait:return r&&t.theme==="dark";case ConditionName.isComplexDesktop:return a;case ConditionName.isLandscape:return window.innerHeight<=window.innerWidth;case ConditionName.isTouchScreen:return isTouchScreen();case ConditionName.isTouchScreenPortrait:return isTouchScreenPortrait();case ConditionName.isTouchScreenLandscape:return isTouchScreenLandscape();case ConditionName.isActiveElements:return ue;case ConditionName.isPlay:return ge;case ConditionName.isPlayMiniPlayer:return Mt.play;case ConditionName.isFirstPlay:return Z;case ConditionName.isLock:return X;case ConditionName.isIOS:return isIOS();case ConditionName.isIOSLive:return isIOS()&&t.type==="live";case ConditionName.isLoading:return ce;case ConditionName.isLive:return pe;case ConditionName.isLiveParam:return t.type==="live";case ConditionName.isLiveError:return y;case ConditionName.isDarkMode:return t.theme==="dark";case ConditionName.isStaticFormat:return staticFormats(t.type);case ConditionName.isEnded:return he;case ConditionName.isAutoPlay:return Y;case ConditionName.isFullScreen:return xe;case ConditionName.isGeneral:return t.isGeneral==="true";case ConditionName.isValidAddress:return v;case ConditionName.isFetchDetails:return b;case ConditionName.isAutoQuality:return ct.quality===-1;case ConditionName.isAuth:return C&&t.isAuth==="true";case ConditionName.isChildClassification:return n.pg_state&&n.pg_state<14;case ConditionName.isTeenagerClassification:return n.pg_state&&n.pg_state>=14&&n.pg_state<18;case ConditionName.isYoungClassification:return n.pg_state&&n.pg_state>=18;case ConditionName.isSelectedSubtitle:return!!l&&l.length>0&&F;case ConditionName.isZarebinSite:return t.site==="zarebin.ir";case ConditionName.isUserIdsParamsEqualAll:return!!t.user_ids&&t.user_ids==="all";case ConditionName.isMiniPlayer:return(t.portrait!=="true"||Ce)&&A.width<520&&!t.disableMiniPlayer;case ConditionName.isFullMobilePortrait:return t.disableMiniPlayer&&isTouchScreenPortrait()||isFullMobilePortrait();case ConditionName.isLogin:return gt;case ConditionName.isSpinSettingsIcon:return ct.quality===-1?be===void 0:ct.quality!==de;case ConditionName.isVttFitHeight:return A.height<600||isTouchScreen();case ConditionName.isBookmark:return kt!==void 0;case ConditionName.isPressKeySpace:return!X;case ConditionName.isPressKeyK:return!X;case ConditionName.isPressKeyI:return!X&&!Z&&!Ce;case ConditionName.isPressKeyF:return!X&&!Z&&!Ce;case ConditionName.isPressKeyS:return t.type!=="live"&&!X&&!Z;case ConditionName.isPressKeyC:return!X&&!Z&&!Ce&&!!l&&l.length>0;case ConditionName.isPressKeyArrowRight:return!Z&&!X;case ConditionName.isPressKeyArrowLeft:return!Z&&!X;case ConditionName.isPressKeyL:return!Z;case ConditionName.isPressKeyN:return m&&m.length>0&&!Z&&!X;case ConditionName.isPressKeyQ:return p&&p.length>0&&!Z&&!X;case ConditionName.isPressKeyE:return o.length!==0&&!Z&&!X;case ConditionName.isPressKeyM:return!Z&&!X;case ConditionName.isSendTimelineLog:return!staticFormats(t.type);case ConditionName.isPointsQuiz:return!!Ye&&Object.keys(Ye).length>0&&Ye.type===QuizTypes.Points;case ConditionName.isReady:return M;case ConditionName.isProduction:return getStatus()==="production";case ConditionName.isPaymentSuccess:return getStatus()==="production";case ConditionName.isPopoverOpen:return[we,ye,_e,Re,Ee,Ke,qe,Ge,st,tt,Ze,Ue,Oe,He,Be,Fe,Ve,me,je,it].some(Bt=>!!Bt);case ConditionName.isOnPermise:return envs.onPermise==="true";case ConditionName.isArabicLang:return t.lang===Lang.ar;case ConditionName.backgroundColorInLightMode:return a||r;case ConditionName.heightScreen:return!r&&!a&&!t.height;case ConditionName.playByClickPoster:return Z&&n.banner&&!wt;case ConditionName.hasMarkers:return o.length!==0;case ConditionName.hasTitle:return n.title;case ConditionName.hasDescription:return n.description;case ConditionName.hasClipboard:return navigator&&navigator.clipboard&&navigator.clipboard.writeText;case ConditionName.hasRecommendationList:return m&&m.length>0;case ConditionName.hasTags:return n.tag;case ConditionName.hasPreviewTime:return t.preview==="true";case ConditionName.hasEmojis:return f;case ConditionName.hasEmojiList1Or2:return f&&!!f.emoji_list_1||f&&!!f.emoji_list_2;case ConditionName.hasBanner:return n.banner;case ConditionName.hasMultiAudio:return g.length>0;case ConditionName.hasDownloadLinks:return n.download_links.length>0&&(t.featureSet===void 0||t.featureSet.downloadUrl!=="false");case ConditionName.hasStreamLink:return n.stream_link;case ConditionName.hasPoll:return d&&Object.keys(d).length>0;case ConditionName.hasUserIds:return!!t.user_ids;case ConditionName.hasAlternativeLives:return p&&p.length>0;case ConditionName.hasManualQuality:return de!=null;case ConditionName.hasSound:return!!ct.volume;case ConditionName.hasVtt:return!!n.vtt||!!n.vtt_mobile;case ConditionName.hasAutoPlay:return t.autoplay==="true";case ConditionName.hasPlayList:return O&&O.length>0&&(isTouchScreen()&&Ze||!isTouchScreen());case ConditionName.hasXToken:return!!t.xToken;case ConditionName.hasMovieDetails:return n.content_type!==null&&n.content_type!==void 0;case ConditionName.hasMovieContentType:return n.content_type!==null;case ConditionName.hasMovieReleaseYear:return!!n.release_year;case ConditionName.hasIMDB:return n.imdb_rate!==null;case ConditionName.hasSelectedTags:return!!at.length;case ConditionName.hasInputTagSearch:return!!Ct;case ConditionName.hasFullScreenParams:return t.fullscreen==="true";case ConditionName.hasPreviewParams:return t.preview==="true";case ConditionName.hasChart:return t.chart==="true"&&!staticFormats(t.type);case ConditionName.hasChartPoints:return!!N.length;case ConditionName.hasOnFinishedParams:return!!t.onFinished;case ConditionName.hasOnSnapshotParams:return!!t.onSnapshot;case ConditionName.hasXTokenParamOrSendXToken:const It=new URLSearchParams(window.location.search).get("xToken"),$t=api.get("xToken");return!!It||!!$t;case ConditionName.hasUserAvatar:return!!Et;case ConditionName.hasUserName:return!!Rt;case ConditionName.hasUserPhoneNumber:return!!Lt;case ConditionName.hasScrollElementId:return!!t.scrollElementId&&Ce!==void 0&&(a||t.portrait==="false")&&!isTouchScreen();case ConditionName.hasSportProvider:return t.provider==="sport";case ConditionName.hasSidebar:const Dt=document.getElementById("__container");return a&&(O&&O.length>0&&(t.featureSet===void 0||t.featureSet.playlist!=="false")||t.featureSet===void 0||t.featureSet.chat!=="false"||m&&m.length>0&&(t.featureSet===void 0||t.featureSet.recommendationList!=="false")||gt)&&(Dt?Dt.getBoundingClientRect().width:window.innerWidth)>900;case ConditionName.isBeforeRequest_Playlist_Chat_Recommendation:return t.type!=="live"&&O===void 0&&(t.featureSet===void 0||t.featureSet.playlist!=="false")||(t.featureSet===void 0||t.featureSet.recommendationList!=="false")&&m===void 0;case ConditionName.isBeforeRequestComments:return ut===void 0&&!isTouchScreen()&&(dt||!dt&&mt>0);case ConditionName.isVisibilityChange:return t.type==="live"&&!document.pictureInPictureElement;case ConditionName.hasTrailer:return e.length!==0;case ConditionName.hasHParam:return t.h==="true";case ConditionName.hasPreviewStart:return n.preview_start;case ConditionName.hasPreviewEnd:return n.preview_end;case ConditionName.hasSubtitles:return!!l&&l.length>0&&t.quiz!=="true";case ConditionName.hasSubtitlesInDetails:return n.subtitles&&n.subtitles.length>0&&t.quiz!=="true";case ConditionName.hasHomeButtonClickFlag:return!!t.homeButtonClickFlag;case ConditionName.hasContinuousPlayback:return!!vt.time&&wt&&!t.t&&((Nt=t.featureSet)==null?void 0:Nt.continuousPlayback)==="true";case ConditionName.hasPermittedLoadedFragment:return ke.length>=Number(getInitialLoadedFragmentCount());case ConditionName.hasAllParams:return allParams.length===Object.keys(VideoDataSliceState.params).length;case ConditionName.hasDefaultMessages:return!!Ot.length;case ConditionName.hasPinMessage:return!!At;case ConditionName.hasCommentDefaultMessages:return!!bt&&!!bt.length;case ConditionName.hasActiveCue:return F&&F.activeCues&&F.activeCues.length>0;case ConditionName.hasTimeMachine:return t.type!=="live"||t.type==="live"&&n.time_machine!==null;case ConditionName.has360:return!!n.is_360;case ConditionName.hasRedirectOnEndedUrlParams:return!!t.redirectOnEndedUrl;case ConditionName.hasDaaniTokenParams:return!!t.daaniToken;case ConditionName.getRecommendationList:return t.portrait==="true"&&t.quiz!=="true"&&b;case ConditionName.getLiveDetailsInIntervals:return y&&t.type==="live"&&t.isGeneral!=="true";case ConditionName.getDetails:return!!t.type&&t.id&&t.isGeneral!=="true";case ConditionName.getMarkers:return["vod","archive","clip"].includes(String(t.type))&&t.id&&t.isGeneral!=="true"&&t.quiz!=="true"&&!t.hideMarkers&&b;case ConditionName.getPlayList:return!staticFormats(t.type)&&t.type!=="live"&&!isFullMobilePortrait()&&b;case ConditionName.firstGetDataIntervalAPI:return t.type==="live"&&t.isGeneral!=="true";case ConditionName.getUserSetting:return gt&&t.quiz!=="true"&&b;case ConditionName.getVideoMetaData:return gt&&t.quiz!=="true"&&b;case ConditionName.getUserProfile:return!!t.xToken&&b;case ConditionName.footerPaddingZero:return t.type!=="live"||t.type==="live"&&isTouchScreen()||isTouchScreenPortrait();case ConditionName.manaulPostAPI:return!!_||R.length>0||E.length>0;case ConditionName.canAccessVideo:return!!(t.h==="true"&&getAccessToken());case ConditionName.canAddComment:return dt;case ConditionName.canShowSubmittedComment:return xt;case ConditionName.canPlayVideo:return oe;case ConditionName.chatEnabled:return _t;case ConditionName.filterLastGif:return+le[le.length-2]==+le[ct.quality===-1?be??de:de];case ConditionName.instagramEmojiAnimation:return!isTouchScreen()||isTouchScreen()&&!ue;case ConditionName.handleOverflowHidden:return!a||a&&xe;case ConditionName.thresholdOnlineViewers:return!!u&&u>=n.online_viewer_threshold;case ConditionName.setSubtitleFirstPlay:return n.subtitles&&n.subtitles.length>0&&!Z&&!staticFormats(t.type);case ConditionName.showQuizPopover:return t.xToken||firstQuizQuestion(Ye);case ConditionName.isQuizStatusEqual1:return!!Ye&&Object.keys(Ye).length>0&&Ye.questions.length>0&&lastQuizQuestionStatus(Ye)===1;case ConditionName.isQuizStatusEqual2:return!!Ye&&Object.keys(Ye).length>0&&Ye.questions.length>0&&lastQuizQuestionStatus(Ye)===2;case ConditionName.isQuizStatusEqual4:return!!(Ye&&Object.keys(Ye).length>0&&Ye.questions&&Ye.questions.length>0&&lastQuizQuestionStatus(Ye)===4);case ConditionName.isQuizEnd:return!!Ye&&Object.keys(Ye).length>0&&Ye.questions&&Ye.number_of_questions===Ye.questions.length&&lastQuizQuestionStatus(Ye)===4;case ConditionName.hasQuizParams:return t.quiz==="true";case ConditionName.hasQuiz:return!!Ye&&Object.keys(Ye).length>0&&!Z;case ConditionName.hasQuizQuestion:return!!Ye&&Ye.questions&&Ye.questions.length;case ConditionName.hasChances:return jt!==-1;case ConditionName.sendUserTrackerRequest:return!!Ye&&Object.keys(Ye).length>0&&Ye.questions.length===0&&!Z&&t.xToken}},whiteListTargets=getWhiteListTargets().split(","),whiteListGeneralUrl=getWhiteListGeneralUrl().split(","),activeElementsTime=3e3,showLoaderTime=3e3,livePlayRetryDuration=3e3,RetryCountGeneralDataFetch=3,RetryTimeDelayGeneralDataFetch=5,durationWatched=60,continuousePlaybackIntervalTime=6e4,footerPadding=()=>conditions(ConditionName.footerPaddingZero)?0:64,featureToggle="ft",sidebarWidth=357,LiveDelay=6,LiveWindow=12,videoTag=()=>document.getElementById("player-tag"),miniPlayerVideoTag=()=>document.getElementById("mini-player-video-tag"),multiLiveVideo=()=>document.getElementById("multilive-player"),progressBar=()=>document.getElementById("time-progress-bar"),progressBarWidth=()=>store.getState().videoData.videoElementSizeInfo.width-2*footerPadding(),seenPoll=()=>JSON.parse(localStorage.getItem("seen-poll")),livePoll=()=>JSON.parse(localStorage.getItem("live-poll"));/*! *****************************************************************************
|
|
63
63
|
Copyright (c) Microsoft Corporation.
|
|
64
64
|
|
|
65
65
|
Permission to use, copy, modify, and/or distribute this software for any
|
|
@@ -76,7 +76,7 @@ Check the top-level render call using <`+De+">.")}return Se}}function jt(fe,Se){
|
|
|
76
76
|
Shader compile Log: ${e}`,INSUFFICIENT_ARGS:(i,e)=>`Insufficient arguments: given "${i}" for "${e}".`};var ERROR={CODES:ERROR_CODES,MESSAGES};const EVENTS$1={MOUSE_DOWN:"mousedown",MOUSE_MOVE:"mousemove",MOUSE_UP:"mouseup",TOUCH_START:"touchstart",TOUCH_MOVE:"touchmove",TOUCH_END:"touchend",WHEEL:"wheel",RESIZE:"resize",CONTEXT_MENU:"contextmenu",MOUSE_ENTER:"mouseenter",MOUSE_LEAVE:"mouseleave",KEY_DOWN:"keydown",KEY_UP:"keyup",CONTEXT_CREATE_ERROR:"webglcontextcreationerror",CONTEXT_LOST:"webglcontextlost",CONTEXT_RESTORED:"webglcontextrestored",DEVICE_ORIENTATION:"deviceorientation",DEVICE_MOTION:"devicemotion",ORIENTATION_CHANGE:"orientationchange",XR_END:"end"};var MOUSE_BUTTON;(function(i){i[i.LEFT=0]="LEFT",i[i.MIDDLE=1]="MIDDLE",i[i.RIGHT=2]="RIGHT"})(MOUSE_BUTTON||(MOUSE_BUTTON={}));const CURSOR={GRAB:"grab",GRABBING:"grabbing",NONE:""},KEY_DIRECTION=["LEFT","UP","RIGHT","DOWN"];var DIRECTION_KEY_CODE;(function(i){i[i.LEFT=37]="LEFT",i[i.UP=38]="UP",i[i.RIGHT=39]="RIGHT",i[i.DOWN=40]="DOWN"})(DIRECTION_KEY_CODE||(DIRECTION_KEY_CODE={}));const DIRECTION_KEY_NAME={LEFT:"ArrowLeft",UP:"ArrowUp",RIGHT:"ArrowRight",DOWN:"ArrowDown"},FULLSCREEN_ELEMENT=["fullscreenElement","webkitFullscreenElement","webkitCurrentFullScreenElement","mozFullScreenElement","msFullscreenElement"],DEFAULT_CLASS={CTX_LOST:"view360-ctx-lost",IN_VR:"view360-vr-presenting",HOTSPOT_CONTAINER:"view360-hotspots",HOTSPOT:"view360-hotspot",HOTSPOT_VISIBLE:"view360-hotspot-visible"},EVENTS={READY:"ready",LOAD_START:"loadStart",LOAD:"load",PROJECTION_CHANGE:"projectionChange",RESIZE:"resize",BEFORE_RENDER:"beforeRender",RENDER:"render",VIEW_CHANGE:"viewChange",VR_START:"vrStart",VR_END:"vrEnd"},EASING={EASE_OUT_CUBIC:i=>1-Math.pow(1-i,3)};var _a;const CAMERA_EVENTS={ANIMATION_END:"animationEnd"},OBJECT_3D_EVENTS={UPDATE:"update"},CONTROL_EVENTS={INPUT_START:"inputStart",CHANGE:"change",INPUT_END:"inputEnd",ENABLE:"enable",DISABLE:"disable",STATIC_CLICK:"staticClick"},DEG_TO_RAD=Math.PI/180,RAD_TO_DEG=180/Math.PI,DEFAULT_EASING=EASING.EASE_OUT_CUBIC,DEFAULT_ANIMATION_DURATION=300,INFINITE_RANGE={min:-1/0,max:1/0},DEFAULT_PITCH_RANGE={min:-90,max:90},DEFAULT_ZOOM_RANGE={min:.6,max:10};var ROTATE;(function(i){i[i.ZERO=0]="ZERO",i[i.CW_90=1]="CW_90",i[i.CCW_90=2]="CCW_90",i[i.CW_180=3]="CW_180"})(ROTATE||(ROTATE={}));const SESSION_VR="immersive-vr",XR_REFERENCE_SPACE="local",EPSILON$1=(_a=Number.EPSILON)!==null&&_a!==void 0?_a:2220446049250313e-31,isString=i=>typeof i=="string",isElement=i=>!!i&&i.nodeType===Node.ELEMENT_NODE,getNullableElement=(i,e)=>{let t=null;if(isString(i)){const s=(e||document).querySelector(i);if(!s)return null;t=s}else isElement(i)&&(t=i);return t},getElement=(i,e)=>{const t=getNullableElement(i,e);if(!t)throw isString(i)?new View360Error(ERROR.MESSAGES.ELEMENT_NOT_FOUND(i),ERROR.CODES.ELEMENT_NOT_FOUND):new View360Error(ERROR.MESSAGES.WRONG_TYPE(i,["HTMLElement","string"]),ERROR.CODES.WRONG_TYPE);return t},findCanvas=(i,e)=>{const t=i.querySelector(e);if(!t)throw new View360Error(ERROR.MESSAGES.CANVAS_NOT_FOUND,ERROR.CODES.CANVAS_NOT_FOUND);return t},clamp=(i,e,t)=>Math.max(Math.min(i,t),e),lerp=(i,e,t)=>i*(1-t)+e*t,circulate=(i,e,t)=>{const n=Math.abs(t-e);if(i<e){const s=(e-i)%n;i=t-s}else if(i>t){const s=(i-t)%n;i=e+s}return i},getObjectOption=i=>typeof i=="object"?i:{},toVerticalFov=(i,e)=>Math.atan(Math.tan(i*.5)/e)*2,isFullscreen=()=>{if(!document)return!1;for(const i of FULLSCREEN_ELEMENT)if(document[i])return!0;return!1},sensorCanBeEnabledIOS=()=>window.isSecureContext&&!!DeviceMotionEvent&&"requestPermission"in DeviceMotionEvent,hfovToZoom=(i,e)=>{const t=Math.tan(DEG_TO_RAD*i*.5),n=Math.tan(DEG_TO_RAD*e*.5);return t/n},eulerToQuat=(i,e,t,n)=>{identity(i);const s=.01,r=clamp(t,-90+s,90-s);return rotateY(i,i,e*DEG_TO_RAD),rotateX(i,i,r*DEG_TO_RAD),rotateZ(i,i,n*DEG_TO_RAD),i},quatToEuler=i=>{const e=i[0],t=i[1],n=i[2],s=i[3],r=e*e,a=t*t,o=n*n,l=s*s,d=r+a+o+l,f=e*s-t*n;let u,p;if(f>.499995*d)u=Math.PI/2,p=2*Math.atan2(t,e);else if(f<-.499995*d)u=-Math.PI/2,p=-2*Math.atan2(t,e);else{const m=fromValues$3(0,0,1),g=fromValues$3(0,1,0);transformQuat(m,m,i),transformQuat(g,g,i);const y=Math.sqrt(m[0]*m[0]+m[2]*m[2]);u=Math.atan2(-m[1],y),p=Math.atan2(m[0],m[2])}return{pitch:clamp(u*RAD_TO_DEG,-90,90),yaw:circulate(p*RAD_TO_DEG,0,360)}};class Motion{get val(){return this._val}get start(){return this._start}get end(){return this._end}get progress(){return this._progress}get activated(){return this._activated}get duration(){return this._duration}set duration(e){this._duration=e}get loop(){return this._loop}set loop(e){this._loop=e}get range(){return this._range}get easing(){return this._easing}set easing(e){this._easing=e}constructor({duration:e=DEFAULT_ANIMATION_DURATION,loop:t=!1,range:n={min:0,max:1},easing:s=DEFAULT_EASING}={}){this._duration=e,this._loop=t,this._range=n,this._easing=s,this._activated=!1,this.reset(0)}update(e){if(!this._activated)return this._val=this._end,0;const t=this._start,n=this._end,s=this._duration,r=this._val,a=this._loop,o=this._progress+e/s;this._progress=a?circulate(o,0,1):clamp(o,0,1);const l=this._easing(this._progress);return this._val=lerp(t,n,l),!a&&this._progress>=1&&(this._activated=!1),this._val-r}reset(e){const t=this._range,n=clamp(e,t.min,t.max);this._start=n,this._end=n,this._val=n,this._progress=0,this._activated=!1}add(e){const t=this._range;this._start=clamp(this._start+e,t.min,t.max),this._end=clamp(this._end+e,t.min,t.max),this._val=clamp(this._val+e,t.min,t.max)}setNewEndByDelta(e){const t=this._range;this._start=this._val,this._end=clamp(this._end+e,t.min,t.max),this._progress=0,this._activated=!0}setRange(e,t){this._start=clamp(this._start,e,t),this._end=clamp(this._end,e,t),this._range={min:e,max:t}}}class CameraAnimation{get duration(){return this._motion.duration}set duration(e){this._motion.duration=e}get easing(){return this._motion.easing}set easing(e){this._motion.easing=e}constructor(e,t,n,{duration:s=DEFAULT_ANIMATION_DURATION,easing:r=DEFAULT_EASING}={}){this._camera=e,this._motion=new Motion({duration:s,easing:r,range:{min:0,max:1}}),this._from=t,this._to=n,this._finishPromise=new Promise(a=>{this._finish=a}),this._motion.setNewEndByDelta(1)}getFinishPromise(){return this._finishPromise}update(e){const t=this._camera,n=this._from,s=this._to,r=this._motion;r.update(e);const a=r.val,o=create$1(),l=lerp(n.zoom,s.zoom,a);slerp(o,n.rotation,s.rotation,a),t.rotate(o,l),a>=1&&this._finish()}}class Camera extends Component{get aspect(){return this._aspect}get changed(){return this._changed}get yawRange(){return this._initialYawRange}set yawRange(e){this._initialYawRange=e}get pitchRange(){return this._initialPitchRange}set pitchRange(e){this._initialPitchRange=e}get zoomRange(){return this._initialZoomRange}set zoomRange(e){this._initialZoomRange=e}constructor({initialYaw:e,initialPitch:t,initialZoom:n,yawRange:s,pitchRange:r,zoomRange:a,fov:o}){super(),this.yaw=e,this.pitch=t,this.zoom=n,this.rollOffset=0,this.initialYaw=e,this.initialPitch=t,this.initialZoom=n,this.position=create$3(),this.animation=null,this._up=fromValues$3(0,1,0),this._aspect=1,this._initialYawRange=s,this._initialPitchRange=r,this._initialZoomRange=a,this._yawRange=s,this._pitchRange=r,this._zoomRange=a,this.quaternion=create$1(),this._updateQuaternion(),this.viewMatrix=create$4(),this.projectionMatrix=create$4(),this.fov=o,this._maxRenderHeight=-1}destroy(){this.off()}resize(e,t){const n=this._aspect;this._aspect=e/t,this._aspect!==n&&this.updateMatrix()}lookAt({yaw:e=this.yaw,pitch:t=this.pitch,zoom:n=this.zoom}){const s=clone$2(this.quaternion),r=this.zoom;this.yaw=circulate(e,0,360),this.pitch=clamp(t,-90,90),this.zoom=n,this._updateQuaternion();const a=Math.abs(n-r);(!equals(this.quaternion,s)||a>=EPSILON$1*10)&&this.updateMatrix()}rotate(e,t=this.zoom){const n=normalize(create$1(),e),s=equals(this.quaternion,n);copy(this.quaternion,n);const r=this.zoom,{yaw:a,pitch:o}=quatToEuler(n);this.yaw=a,this.pitch=o,this.zoom=t;const l=Math.abs(t-r);(!s||l>=EPSILON$1*10)&&this.updateMatrix()}animateTo({yaw:e=this.yaw,pitch:t=this.pitch,zoom:n=this.zoom,duration:s=0,easing:r=DEFAULT_EASING}={}){return __awaiter(this,void 0,void 0,function*(){if(this.yaw===e&&this.pitch===t&&this.zoom===n)return;const a={rotation:clone$2(this.quaternion),zoom:this.zoom},o={rotation:eulerToQuat(create$1(),e,t,this.rollOffset),zoom:n},l=new CameraAnimation(this,a,o,{duration:s,easing:r}),d=l.getFinishPromise();return this.animation=l,d.then(()=>{this.animation=null,this.trigger(CAMERA_EVENTS.ANIMATION_END,{animation:l})}),d})}restrictYawRange(e,t){this._yawRange={min:e,max:t}}restrictPitchRange(e,t){this._pitchRange={min:e,max:t}}restrictZoomRange(e,t){this._zoomRange={min:e,max:t}}restrictRenderHeight(e){this._maxRenderHeight=e}resetRange(){this._yawRange=this._initialYawRange,this._pitchRange=this._initialPitchRange,this._zoomRange=this._initialZoomRange,this._maxRenderHeight=-1}getYawRange(e){const t=this._yawRange,n=this._maxRenderHeight;if(!t)return INFINITE_RANGE;const s=this.getHorizontalFov(e)*.5;let r=t.min,a=t.max;if(n>0){const o=toVerticalFov(s*DEG_TO_RAD,this._aspect),l=n*.5,d=Math.tan(o),f=Math.sqrt((1+l*l)/(1+d*d)),u=Math.atan(Math.tan(s*DEG_TO_RAD)*f)*RAD_TO_DEG;r=t.min+u,a=t.max-u}return r>a&&(r=0,a=0),{min:r,max:a}}getPitchRange(e){const t=this._pitchRange,n=this._maxRenderHeight;if(!t)return DEFAULT_PITCH_RANGE;let s=t.min,r=t.max;if(n>0){const a=this.getVerticalFov(e)*.5;s=t.min+a,r=t.max-a}return s>r&&(s=0,r=0),{min:Math.max(s,-90),max:Math.min(r,90)}}getZoomRange(){var e;const t=(e=this._zoomRange)!==null&&e!==void 0?e:DEFAULT_ZOOM_RANGE,n=this.getHorizontalFov(t.max),s=this.getHorizontalFov(t.min),r=this.getHorizontalFov(this.zoom);return{min:Math.max(n,1),max:Math.min(s,180),current:r}}getHorizontalFov(e=this.zoom){return this._getZoomedHorizontalFov(e)*RAD_TO_DEG}getVerticalFov(e=this.zoom){const t=this._aspect,n=this._getZoomedHorizontalFov(e);return toVerticalFov(n,t)*RAD_TO_DEG}fovToZoom(e){const t=this.fov,n=Math.tan(DEG_TO_RAD*t*.5),s=Math.tan(DEG_TO_RAD*e*.5);return n/s}updateMatrix(){const e=this._up,t=this._aspect,n=this.viewMatrix,s=this.projectionMatrix,r=this.position,a=this.quaternion,o=create$3(),l=fromValues$3(0,0,-1);transformQuat(l,l,a),transformQuat(o,e,a);const d=this._getZoomedHorizontalFov(),f=toVerticalFov(d,t);lookAt(n,r,l,o),perspective(s,f,t,.1,100),this._changed=!0}onFrameRender(){this._changed=!1}_updateQuaternion(){eulerToQuat(this.quaternion,this.yaw,this.pitch,this.rollOffset)}_getZoomedHorizontalFov(e=this.zoom){return 2*Math.atan(Math.tan(DEG_TO_RAD*this.fov*.5)/e)}}class MouseInput extends Component{constructor(){super(),this._onMouseDown=e=>{const t=this._el;!t||e.button!==MOUSE_BUTTON.LEFT||(e.preventDefault(),t.focus?t.focus():window.focus(),this._prevPos[0]=e.clientX,this._prevPos[1]=e.clientY,window.addEventListener(EVENTS$1.MOUSE_MOVE,this._onMouseMove,!1),window.addEventListener(EVENTS$1.MOUSE_UP,this._onMouseUp,!1),this.trigger(CONTROL_EVENTS.INPUT_START,{srcEvent:e,isTouch:!1,isKeyboard:!1}))},this._onMouseMove=e=>{e.preventDefault();const t=e.clientX,n=e.clientY,s=this._prevPos,r=t-s[0],a=n-s[1];this.trigger(CONTROL_EVENTS.CHANGE,{delta:{x:r,y:a},isTouch:!1,isKeyboard:!1}),s[0]=t,s[1]=n},this._onMouseUp=()=>{this._prevPos[0]=0,this._prevPos[1]=0,window.removeEventListener(EVENTS$1.MOUSE_MOVE,this._onMouseMove,!1),window.removeEventListener(EVENTS$1.MOUSE_UP,this._onMouseUp,!1),this.trigger(CONTROL_EVENTS.INPUT_END,{isTouch:!1,isKeyboard:!1,scrolling:!1})},this._el=null,this._prevPos=[0,0]}enable(e){this._el||(e.addEventListener(EVENTS$1.MOUSE_DOWN,this._onMouseDown),this._el=e)}disable(){const e=this._el;e&&(e.removeEventListener(EVENTS$1.MOUSE_DOWN,this._onMouseDown),window.removeEventListener(EVENTS$1.MOUSE_MOVE,this._onMouseMove,!1),window.removeEventListener(EVENTS$1.MOUSE_UP,this._onMouseUp,!1),this._el=null)}}class TouchInput extends Component{get scrollable(){return this._scrollable}set scrollable(e){this._scrollable=e}constructor(){super(),this._onTouchStart=e=>{if(e.touches.length>1||this._scrolling)return;const t=e.touches[0];this._isFirstTouch=!0,this._prevPos[0]=t.clientX,this._prevPos[1]=t.clientY,this.trigger(CONTROL_EVENTS.INPUT_START,{srcEvent:e,isTouch:!0,isKeyboard:!1})},this._onTouchMove=e=>{if(e.touches.length>1||this._scrolling)return;const t=e.touches[0],n=this._scrollable,s=this._prevPos,r=t.clientX,a=t.clientY,o=r-s[0],l=a-s[1];if(this._isFirstTouch){if(n&&!isFullscreen()&&Math.abs(l)>Math.abs(o)){this._scrolling=!0;return}this._isFirstTouch=!1}e.cancelable!==!1&&e.preventDefault(),this.trigger(CONTROL_EVENTS.CHANGE,{delta:{x:o,y:l},isTouch:!0,isKeyboard:!1}),s[0]=r,s[1]=a},this._onTouchEnd=e=>{if(e.touches.length!==0)return;const t=e.touches[0],n=this._prevPos;t?(n[0]=t.clientX,n[1]=t.clientY):(n[0]=0,n[1]=0,this.trigger(CONTROL_EVENTS.INPUT_END,{isTouch:!0,isKeyboard:!1,scrolling:this._scrolling})),e.cancelable!==!1&&e.preventDefault(),this._scrolling=!1},this._el=null,this._prevPos=[0,0],this._isFirstTouch=!1,this._scrolling=!1,this._scrollable=!1}enable(e){this._el||(e.addEventListener(EVENTS$1.TOUCH_START,this._onTouchStart,{passive:!1}),e.addEventListener(EVENTS$1.TOUCH_MOVE,this._onTouchMove,{passive:!1}),e.addEventListener(EVENTS$1.TOUCH_END,this._onTouchEnd),this._el=e)}disable(){const e=this._el;e&&(e.removeEventListener(EVENTS$1.TOUCH_START,this._onTouchStart),e.removeEventListener(EVENTS$1.TOUCH_MOVE,this._onTouchMove),e.removeEventListener(EVENTS$1.TOUCH_END,this._onTouchEnd),this._el=null)}}class KeyboardInput extends Component{get active(){const e=this._pressed;return e.LEFT||e.UP||e.RIGHT||e.DOWN}constructor(){super(),this._onKeyDown=e=>{if(e.location!==KeyboardEvent.DOM_KEY_LOCATION_STANDARD)return;this._updateKeyPress(e,!0);const t=this._getPressedKeyCount();t<=0||(e.preventDefault(),t===1&&!e.repeat&&this.trigger(CONTROL_EVENTS.INPUT_START,{srcEvent:e,isTouch:!1,isKeyboard:!0}))},this._onKeyUp=e=>{e.location!==KeyboardEvent.DOM_KEY_LOCATION_STANDARD||(this._updateKeyPress(e,!1),this._getPressedKeyCount()>0)||this.trigger(CONTROL_EVENTS.INPUT_END,{isTouch:!1,isKeyboard:!0,scrolling:!1})},this._el=null,this._clearPressedKeys()}enable(e){this._el||(e.addEventListener(EVENTS$1.KEY_DOWN,this._onKeyDown),e.addEventListener(EVENTS$1.KEY_UP,this._onKeyUp),this._el=e,this._clearPressedKeys())}disable(){const e=this._el;e&&(e.removeEventListener(EVENTS$1.KEY_DOWN,this._onKeyDown),e.removeEventListener(EVENTS$1.KEY_UP,this._onKeyUp),this._el=null,this._clearPressedKeys())}update(){const e=this._getDeltaByPressedKeys();(e.x!==0||e.y!==0)&&this.trigger(CONTROL_EVENTS.CHANGE,{delta:e,isTouch:!1,isKeyboard:!0})}_clearPressedKeys(){this._pressed=KEY_DIRECTION.reduce((e,t)=>Object.assign(Object.assign({},e),{[t]:!1}),{})}_updateKeyPress(e,t){const n=this._pressed,s=e.keyCode!=null?DIRECTION_KEY_CODE[e.keyCode]:DIRECTION_KEY_NAME[e.key];s&&(n[s]=t)}_getPressedKeyCount(){return KEY_DIRECTION.filter(e=>this._pressed[e]).length}_getDeltaByPressedKeys(){const e=this._pressed;let t=0,n=0;return e.LEFT&&(t+=1),e.RIGHT&&(t-=1),e.UP&&(n+=1),e.DOWN&&(n-=1),{x:t,y:n}}}class RotateControl extends Component{get enabled(){return this._enabled}get enableBlocked(){return this._enableBlocked}get animating(){return this._keyboardInput.active||this._xMotion.activated||this._yMotion.activated}get yaw(){return this._xMotion}get pitch(){return this._yMotion}get scrollable(){return this._touchInput.scrollable}set scrollable(e){this._touchInput.scrollable=e}get pointerScale(){return this._pointerScale}set pointerScale(e){this._pointerScale=e}get keyboardScale(){return this._keyboardScale}set keyboardScale(e){this._keyboardScale=e}get duration(){return this._duration}set duration(e){this._duration=e,this._xMotion.duration=e,this._yMotion.duration=e}get easing(){return this._easing}set easing(e){this._easing=e,this._xMotion.easing=e,this._yMotion.easing=e}get disablePitch(){return this._disablePitch}set disablePitch(e){this._disablePitch=e}get disableYaw(){return this._disableYaw}set disableYaw(e){this._disableYaw=e}get disableKeyboard(){return this._disableKeyboard}set disableKeyboard(e){this._disableKeyboard=e}constructor(e,t,{duration:n=DEFAULT_ANIMATION_DURATION,easing:s=DEFAULT_EASING,pointerScale:r=[1,1],keyboardScale:a=[1,1],disablePitch:o=!1,disableYaw:l=!1,disableKeyboard:d=!1}={}){super(),this._onInputStart=f=>{this._changedWhileDragging=!1,this.trigger(CONTROL_EVENTS.INPUT_START,Object.assign(Object.assign({},f),{inputType:"rotate"}))},this._onChange=f=>{const u=f.delta,p=1/this._zoomScale,m=this._screenScale,g=this._keyboardScale,y=this._pointerScale;let v;f.isKeyboard?v=[g[0]*p,g[1]*p]:v=[y[0]*m[0]*p,y[1]*m[1]*p];const b=u.x*v[0],C=u.y*v[1];this._xMotion.setNewEndByDelta(b),this._yMotion.setNewEndByDelta(C),this._changedWhileDragging=!0},this._onInputEnd=f=>{this.trigger(CONTROL_EVENTS.INPUT_END,Object.assign(Object.assign({},f),{inputType:"rotate"})),!this._changedWhileDragging&&!f.isKeyboard&&!f.scrolling&&this.trigger(CONTROL_EVENTS.STATIC_CLICK,{isTouch:f.isTouch}),this._changedWhileDragging=!1},this._controlEl=e,this._pointerScale=r,this._keyboardScale=a,this._duration=n,this._easing=s,this._disablePitch=o,this._disableYaw=l,this._disableKeyboard=d,this._enableBlocked=t,this._mouseInput=new MouseInput,this._touchInput=new TouchInput,this._keyboardInput=new KeyboardInput,this._xMotion=new Motion({duration:n,range:INFINITE_RANGE,easing:s}),this._yMotion=new Motion({duration:n,range:DEFAULT_PITCH_RANGE,easing:s}),this._screenScale=[1,1],this._zoomScale=1,this._enabled=!1,this._changedWhileDragging=!1,this._bindInputs()}destroy(){this.disable(),this._mouseInput.off(),this._touchInput.off(),this._keyboardInput.off(),this.off(),this._changedWhileDragging=!1}update(e){if(!this._enabled)return;const t=this._xMotion,n=this._yMotion,s=this._keyboardInput;this._disableKeyboard||s.update(),this._disablePitch||n.update(e),this._disableYaw||t.update(e)}updateRange(e,t){const n=e.getYawRange(t),s=e.getPitchRange(t);this._xMotion.setRange(n.min,n.max),this._yMotion.setRange(s.min,s.max)}setZoomScale(e){this._zoomScale=e}resize(e,t,n,s){const r=toVerticalFov(e*DEG_TO_RAD,t)*RAD_TO_DEG;this._screenScale[0]=e/n,this._screenScale[1]=r/s}enable(){if(this._enabled)return;const e=this._controlEl;this._mouseInput.enable(e),this._touchInput.enable(e),this._keyboardInput.enable(e),this._enabled=!0,this._enableBlocked=!1,this.trigger(CONTROL_EVENTS.ENABLE,{control:this,updateCursor:!0})}disable(){this._enabled&&(this._mouseInput.disable(),this._touchInput.disable(),this._keyboardInput.disable(),this._enabled=!1,this.trigger(CONTROL_EVENTS.DISABLE,{updateCursor:!0}))}sync(e){this.updateRange(e,e.zoom),this._xMotion.reset(e.yaw),this._yMotion.reset(e.pitch)}_bindInputs(){const e=this._mouseInput,t=this._touchInput,n=this._keyboardInput;e.on(CONTROL_EVENTS.INPUT_START,this._onInputStart),e.on(CONTROL_EVENTS.CHANGE,this._onChange),e.on(CONTROL_EVENTS.INPUT_END,this._onInputEnd),t.on(CONTROL_EVENTS.INPUT_START,this._onInputStart),t.on(CONTROL_EVENTS.CHANGE,this._onChange),t.on(CONTROL_EVENTS.INPUT_END,this._onInputEnd),n.on(CONTROL_EVENTS.INPUT_START,this._onInputStart),n.on(CONTROL_EVENTS.CHANGE,this._onChange),n.on(CONTROL_EVENTS.INPUT_END,this._onInputEnd)}}class WheelInput extends Component{get scrollable(){return this._scrollable}set scrollable(e){this._scrollable=e}constructor(){super(),this._onWheel=e=>{const t=this._scrollable;if(e.deltaY===0||t)return;e.preventDefault(),e.stopPropagation(),this._inputTimer<0?this.trigger(CONTROL_EVENTS.INPUT_START,{srcEvent:e,isTouch:!1,isKeyboard:!1}):this._clearTimer();const n=this._baseScale*e.deltaY;this.trigger(CONTROL_EVENTS.CHANGE,{delta:n,isTouch:!1,isKeyboard:!1}),this._inputTimer=window.setTimeout(()=>{this.trigger(CONTROL_EVENTS.INPUT_END,{isTouch:!1,isKeyboard:!1,scrolling:!1}),this._inputTimer=-1},DEFAULT_ANIMATION_DURATION)},this._el=null,this._baseScale=.04,this._scrollable=!1,this._inputTimer=-1}enable(e){this._el||(e.addEventListener(EVENTS$1.WHEEL,this._onWheel,{passive:!1,capture:!1}),this._el=e,this._clearTimer())}disable(){const e=this._el;e&&(e.removeEventListener(EVENTS$1.WHEEL,this._onWheel,!1),this._el=null,this._clearTimer())}_clearTimer(){window.clearTimeout(this._inputTimer),this._inputTimer=-1}}class PinchInput extends Component{constructor(){super(),this._onTouchMove=e=>{const t=e.touches;if(t.length!==2||!e.cancelable)return;e.preventDefault(),e.stopPropagation();const n=this._prevDistance,s=[t[0].pageX-t[1].pageX,t[0].pageY-t[1].pageY],r=Math.sqrt(s[0]*s[0]+s[1]*s[1])*this._baseScale,a=this._isFirstTouch?0:r-n;this._isFirstTouch&&this.trigger(CONTROL_EVENTS.INPUT_START,{srcEvent:e,isTouch:!0,isKeyboard:!1}),this._prevDistance=r,this._isFirstTouch=!1,this.trigger(CONTROL_EVENTS.CHANGE,{delta:a,isTouch:!0,isKeyboard:!1})},this._onTouchEnd=e=>{e.touches.length===0&&(this._isFirstTouch||this.trigger(CONTROL_EVENTS.INPUT_END,{isTouch:!0,isKeyboard:!1,scrolling:!1}),this._prevDistance=-1,this._isFirstTouch=!0)},this._el=null,this._baseScale=-.2,this._prevDistance=-1,this._isFirstTouch=!0}enable(e){this._el||(e.addEventListener(EVENTS$1.TOUCH_MOVE,this._onTouchMove,{passive:!1,capture:!1}),e.addEventListener(EVENTS$1.TOUCH_END,this._onTouchEnd),this._el=e,this._prevDistance=-1,this._isFirstTouch=!0)}disable(){const e=this._el;e&&(e.removeEventListener(EVENTS$1.TOUCH_MOVE,this._onTouchMove,!1),e.removeEventListener(EVENTS$1.TOUCH_END,this._onTouchEnd),this._el=null)}}class ZoomControl extends Component{get enabled(){return this._enabled}get enableBlocked(){return this._enableBlocked}get animating(){return this._motion.activated}get zoom(){return this._motion.val}get scrollable(){return this._wheelInput.scrollable}set scrollable(e){this._wheelInput.scrollable=e}get range(){return this._motion.range}get scale(){return this._scale}set scale(e){this._scale=e}get duration(){return this._motion.duration}get easing(){return this._motion.easing}constructor(e,t,{scale:n=1,duration:s=DEFAULT_ANIMATION_DURATION,easing:r=DEFAULT_EASING}={}){super(),this._onInputStart=a=>{this.trigger(CONTROL_EVENTS.INPUT_START,Object.assign(Object.assign({},a),{inputType:"zoom"}))},this._onChange=({delta:a})=>{const o=this._scale,l=a*o;this._motion.setNewEndByDelta(l)},this._onInputEnd=a=>{this.trigger(CONTROL_EVENTS.INPUT_END,Object.assign(Object.assign({},a),{inputType:"zoom"}))},this._scale=n,this._controlEl=e,this._enableBlocked=t,this._wheelInput=new WheelInput,this._pinchInput=new PinchInput,this._motion=new Motion({duration:s,easing:r,range:INFINITE_RANGE}),this._enabled=!1,this._bindInputs()}destroy(){this.disable(),this._wheelInput.off(),this._pinchInput.off(),this.off()}update(e){if(!this._enabled)return;this._motion.update(e)}enable(){if(this._enabled)return;const e=this._controlEl;this._wheelInput.enable(e),this._pinchInput.enable(e),this._enabled=!0,this._enableBlocked=!1,this.trigger(CONTROL_EVENTS.ENABLE,{control:this,updateCursor:!1})}disable(){this._enabled&&(this._wheelInput.disable(),this._pinchInput.disable(),this._enabled=!1,this.trigger(CONTROL_EVENTS.DISABLE,{updateCursor:!1}))}sync(e){const t=this._motion,n=e.getZoomRange();t.setRange(n.min,n.max),t.reset(n.current)}_bindInputs(){const e=this._wheelInput,t=this._pinchInput;e.on(CONTROL_EVENTS.INPUT_START,this._onInputStart),e.on(CONTROL_EVENTS.CHANGE,this._onChange),e.on(CONTROL_EVENTS.INPUT_END,this._onInputEnd),t.on(CONTROL_EVENTS.INPUT_START,this._onInputStart),t.on(CONTROL_EVENTS.CHANGE,this._onChange),t.on(CONTROL_EVENTS.INPUT_END,this._onInputEnd)}}const ROTATE_CONSTANT={PITCH_DELTA:1,YAW_DELTA_BY_ROLL:2,YAW_DELTA_BY_YAW:3};ROTATE_CONSTANT[ROTATE_CONSTANT.PITCH_DELTA]={targetAxis:[0,1,0],meshPoint:[0,0,1]},ROTATE_CONSTANT[ROTATE_CONSTANT.YAW_DELTA_BY_ROLL]={targetAxis:[0,1,0],meshPoint:[1,0,0]},ROTATE_CONSTANT[ROTATE_CONSTANT.YAW_DELTA_BY_YAW]={targetAxis:[1,0,0],meshPoint:[0,0,1]};class GyroInput extends Component{get enabled(){return this._enabled}get orientationUpdated(){return this._orientationUpdated}get ignoreRoll(){return this._ignoreRoll}set ignoreRoll(e){this._ignoreRoll=e}constructor(){super(),this._onDeviceOrientation=e=>{const t=this._orientation,{alpha:n,beta:s,gamma:r}=e;n==null||s==null||r==null||(t.alpha=n,t.beta=s,t.gamma=r,this._orientationUpdated=!0,this._needsCalibrate&&(this._needsCalibrate=!1,this._calibrateSensor()))},this._updateScreenOrientation=()=>{window.screen&&window.screen.orientation&&window.screen.orientation.angle!==void 0?this._screenOrientation=screen.orientation.angle:window.orientation!==void 0?this._screenOrientation=window.orientation>=0?window.orientation:360+window.orientation:this._screenOrientation=0},this.quaternion=create$1(),this._orientation={alpha:0,beta:90,gamma:0},this._yawOrigin=0,this._yawOffset=0,this._orientationUpdated=!1,this._screenOrientation=0,this._needsCalibrate=!0,this._enabled=!1}enable(){this._enabled||(window.addEventListener(EVENTS$1.DEVICE_ORIENTATION,this._onDeviceOrientation),window.addEventListener(EVENTS$1.ORIENTATION_CHANGE,this._updateScreenOrientation),this._updateScreenOrientation(),this._orientationUpdated=!1,this._needsCalibrate=!0,this._enabled=!0)}disable(){this._enabled&&(window.removeEventListener(EVENTS$1.DEVICE_ORIENTATION,this._onDeviceOrientation),window.removeEventListener(EVENTS$1.ORIENTATION_CHANGE,this._updateScreenOrientation),this._enabled=!1)}update(){this._updateRotation(),this._orientationUpdated=!1}collectDelta(){if(!this._orientationUpdated)return{pitch:0,yaw:0};const e=clone$2(this.quaternion);return this._updateRotation(),this._orientationUpdated=!1,this._toEulerDelta(e,this.quaternion)}setInitialRotation(e){this._yawOrigin=e}_calibrateSensor(){const e=this._yawOrigin,t=this.quaternion;this._yawOffset=0,this._updateRotation();const{yaw:n}=quatToEuler(t);this._yawOffset=n-e,this._updateRotation(),this._needsCalibrate=!1}_updateRotation(){const e=this.quaternion,{alpha:t,beta:n,gamma:s}=this._orientation;identity(e),rotateY(e,e,(t-this._yawOffset)*DEG_TO_RAD),rotateX(e,e,n*DEG_TO_RAD),rotateZ(e,e,-s*DEG_TO_RAD);const r=create$1(),a=-this._screenOrientation*.5*DEG_TO_RAD,o=fromValues$1(-Math.sqrt(.5),0,0,Math.sqrt(.5));set$1(r,0,Math.sin(a),0,Math.cos(a)),multiply(e,e,r),multiply(e,e,o),normalize(e,e)}_toEulerDelta(e,t){return{yaw:this._getDeltaYaw(e,t),pitch:this._getDeltaPitch(e,t)}}_getDeltaYaw(e,t){const n=this._getRotationDelta(e,t,ROTATE_CONSTANT.YAW_DELTA_BY_YAW);return this._getRotationDelta(e,t,ROTATE_CONSTANT.YAW_DELTA_BY_ROLL)*Math.sin(this._extractPitchFromQuat(t))+n}_getDeltaPitch(e,t){return this._getRotationDelta(e,t,ROTATE_CONSTANT.PITCH_DELTA)}_getRotationDelta(e,t,n){const s=fromValues$3(ROTATE_CONSTANT[n].targetAxis[0],ROTATE_CONSTANT[n].targetAxis[1],ROTATE_CONSTANT[n].targetAxis[2]),r=ROTATE_CONSTANT[n].meshPoint,a=clone$2(e),o=clone$2(t);normalize(a,a),normalize(o,o);let l=fromValues$3(0,0,1),d=fromValues$3(0,0,1);transformQuat(l,l,a),transformQuat(d,d,o),transformQuat(s,s,o);const u=dot(s,cross(create$3(),l,d))>0?1:-1,p=fromValues$3(r[0],r[1],r[2]);let m;n!==ROTATE_CONSTANT.YAW_DELTA_BY_YAW?m=fromValues$3(0,u,0):m=fromValues$3(u,0,0),transformQuat(p,p,o),transformQuat(m,m,o);const g=p,y=m,v=create$3();cross(v,g,y),normalize$2(v,v);const b=v[0],C=v[1],_=v[2];d=fromValues$3(r[0],r[1],r[2]),transformQuat(d,d,o),l=fromValues$3(r[0],r[1],r[2]),transformQuat(l,l,a);let R=Math.abs(l[0]*b+l[1]*C+l[2]*_);const E=create$3();subtract(E,l,scale(create$3(),v,R));let F=(E[0]*d[0]+E[1]*d[1]+E[2]*d[2])/(length(E)*length(d));F>1&&(F=1);const O=Math.acos(F),A=cross(create$3(),d,E);R=b*A[0]+C*A[1]+_*A[2];let N;return n!==ROTATE_CONSTANT.YAW_DELTA_BY_YAW?N=R>0?1:-1:N=R<0?1:-1,O*N*u*RAD_TO_DEG}_extractPitchFromQuat(e){const t=fromValues$3(0,0,1);return transformQuat(t,t,e),-1*Math.atan2(t[1],Math.sqrt(Math.pow(t[0],2)+Math.pow(t[2],2)))}}class GyroControl extends Component{get enabled(){return this._input.enabled}get enableBlocked(){return this._enableBlocked}get animating(){return this._input.enabled&&this._input.orientationUpdated}get ignoreRoll(){return this._ignoreRoll}set ignoreRoll(e){this._ignoreRoll=e}static isAvailable(){return __awaiter(this,void 0,void 0,function*(){if(!DeviceMotionEvent)return!1;let e;const t=()=>new Promise(s=>{e=r=>{s(r.rotationRate&&r.rotationRate.alpha!=null)},window.addEventListener(EVENTS$1.DEVICE_MOTION,e)}),n=()=>new Promise(s=>{setTimeout(()=>s(!1),1e3)});return Promise.race([t(),n()]).then(s=>(window.removeEventListener(EVENTS$1.DEVICE_MOTION,e),s))})}static requestSensorPermission(){return __awaiter(this,void 0,void 0,function*(){return sensorCanBeEnabledIOS()?DeviceMotionEvent.requestPermission().then(e=>e==="granted").catch(()=>!1):!0})}constructor(e,{ignoreRoll:t=!0}={}){super(),this._enableBlocked=e,this._ignoreRoll=t,this._input=new GyroInput}destroy(){this.disable(),this._input.off(),this.off()}update(e,t,n,s){this._ignoreRoll?this._updateYawPitch(e,t,n,s):this._updateQuaternion(e,s)}enable(){this._input.enabled||(this._input.enable(),this._enableBlocked=!1,this.trigger(CONTROL_EVENTS.ENABLE,{control:this,updateCursor:!1}))}disable(){this._input.enabled&&(this._input.disable(),this.trigger(CONTROL_EVENTS.DISABLE,{updateCursor:!1}))}sync(){}_updateYawPitch(e,t,n,s){const r=this._input;if(!r.enabled)return;const{yaw:a,pitch:o}=r.collectDelta();t.add(a),n.add(o),e.lookAt({yaw:t.val,pitch:n.val,zoom:s})}_updateQuaternion(e,t){const n=this._input;n.enabled&&(n.update(),e.rotate(n.quaternion,t))}}class PanoControl{get useGrabCursor(){return this._useGrabCursor}set useGrabCursor(e){e!==this._useGrabCursor&&(this._useGrabCursor=e,e&&this._enabled?this._setCursor(CURSOR.GRAB):e||this._setCursor(CURSOR.NONE))}get disableContextMenu(){return this._disableContextMenu}set disableContextMenu(e){e!==this._disableContextMenu&&(this._disableContextMenu=e,e&&this._enabled?this._blockContextMenu():e||this._restoreContextMenu())}get scrollable(){return this._rotateControl.scrollable}set scrollable(e){this._rotateControl.scrollable=e}get wheelScrollable(){return this._zoomControl.scrollable}set wheelScrollable(e){this._zoomControl.scrollable=e}get ignoreZoomScale(){return this._ignoreZoomScale}set ignoreZoomScale(e){this._ignoreZoomScale=e}get enabled(){return this._enabled}get rotate(){return this._rotateControl}get zoom(){return this._zoomControl}get gyro(){return this._gyroControl}get animating(){return this._rotateControl.animating||this._zoomControl.animating||this._gyroControl.animating}constructor(e,t,{useGrabCursor:n,scrollable:s,wheelScrollable:r,disableContextMenu:a,rotate:o,zoom:l,gyro:d}){this._preventContextMenu=f=>{f.preventDefault()},this._onInputStart=f=>{this._useGrabCursor&&!f.isKeyboard&&this._setCursor(CURSOR.GRABBING)},this._onInputEnd=f=>{this._useGrabCursor&&!f.isKeyboard&&this._setCursor(CURSOR.GRAB)},this._onEnable=({control:f,updateCursor:u})=>{u&&this._useGrabCursor&&this._setCursor(CURSOR.GRAB),f.sync(this._camera)},this._onDisable=({updateCursor:f})=>{f&&this._setCursor(CURSOR.NONE)},this._onCameraAnimationEnd=({animation:f})=>{f.getFinishPromise().then(()=>{this.sync()})},this._useGrabCursor=n,this._disableContextMenu=a,this._camera=t,this._controlEl=e,this._ignoreZoomScale=!1,this._enabled=!1,this._rotateControl=new RotateControl(e,!o,getObjectOption(o)),this._zoomControl=new ZoomControl(e,!l,getObjectOption(l)),this._gyroControl=new GyroControl(!d,getObjectOption(d)),this._rotateControl.scrollable=s,this._zoomControl.scrollable=r,this._bindEvents()}destroy(){this.disable(),this._rotateControl.destroy(),this._zoomControl.destroy(),this._setCursor(CURSOR.NONE)}resize(e,t){const n=this._camera;this._rotateControl.resize(n.fov,n.aspect,e,t)}enable(){return __awaiter(this,void 0,void 0,function*(){this._enabled||(this._rotateControl.enableBlocked||this._rotateControl.enable(),this._zoomControl.enableBlocked||this._zoomControl.enable(),this._gyroControl.enableBlocked||(yield GyroControl.isAvailable())&&this._gyroControl.enable(),this.sync(),this._disableContextMenu&&this._blockContextMenu(),this._enabled=!0)})}disable(){this._enabled&&(this._rotateControl.disable(),this._zoomControl.disable(),this._gyroControl.disable(),this._restoreContextMenu(),this._enabled=!1)}update(e){const t=this._camera,n=this._rotateControl,s=this._zoomControl,r=this._gyroControl;s.update(e);const a=hfovToZoom(t.fov,s.zoom),o=this._ignoreZoomScale?1:Math.max(a,1);n.setZoomScale(o),n.updateRange(t,a),n.update(e);const l=n.yaw,d=n.pitch;r.enabled?r.update(t,l,d,a):t.lookAt({yaw:l.val,pitch:d.val,zoom:a})}sync(){const e=this._camera;this._zoomControl.sync(e),this._rotateControl.sync(e)}_blockContextMenu(){this._controlEl.addEventListener(EVENTS$1.CONTEXT_MENU,this._preventContextMenu)}_restoreContextMenu(){this._controlEl.removeEventListener(EVENTS$1.CONTEXT_MENU,this._preventContextMenu)}_setCursor(e){if(!this._useGrabCursor&&e!==CURSOR.NONE)return;const t=this._controlEl;t.style.cursor=e}_bindEvents(){const e=this._rotateControl,t=this._zoomControl;e.on(CONTROL_EVENTS.INPUT_START,this._onInputStart),e.on(CONTROL_EVENTS.INPUT_END,this._onInputEnd),e.on(CONTROL_EVENTS.ENABLE,this._onEnable),e.on(CONTROL_EVENTS.DISABLE,this._onDisable),t.on(CONTROL_EVENTS.ENABLE,this._onEnable),t.on(CONTROL_EVENTS.DISABLE,this._onDisable),this._camera.on(CAMERA_EVENTS.ANIMATION_END,this._onCameraAnimationEnd)}}class Texture{constructor({width:e,height:t,flipY:n}){this.width=e,this.height=t,this.flipY=n,this.wrapS=WebGLRenderingContext.CLAMP_TO_EDGE,this.wrapT=WebGLRenderingContext.CLAMP_TO_EDGE}destroy(){}isVideo(){return!1}isCube(){return!1}}class Texture2D extends Texture{constructor({source:e,width:t,height:n,flipY:s}){super({width:t,height:n,flipY:s}),this.source=e}}class TextureVideo extends Texture2D{destroy(){const e=this.source;e.pause(),e.removeAttribute("src"),e.load()}isVideo(){return!0}isPaused(){const e=this.source;return e.paused||e.ended||e.readyState<=2}hasAudio(){const e=this.source;return e.audioTracks?e.audioTracks.length>0:e.webkitAudioDecodedByteCount!=null?e.webkitAudioDecodedByteCount>0:e.mozHasAudio!=null?e.mozHasAudio:!0}}class TextureCube extends Texture{constructor({sources:e,width:t,height:n,flipY:s}){super({width:t,height:n,flipY:s}),this.sources=e}isCube(){return!0}}class TextureLoader{constructor(){this._loadChecker=new ImReady}load(e,t){return __awaiter(this,void 0,void 0,function*(){if(t)return this.loadVideo(e,getObjectOption(t));if(Array.isArray(e)&&e.length>1)return this.loadCubeImage(e);{const n=Array.isArray(e)?e[0]:e;return this.loadImage(n)}})}loadImage(e){return __awaiter(this,void 0,void 0,function*(){const t=this._toImageArray(e);return this._load(t,n=>{const s=t[0];n(new Texture2D({source:s,width:s.naturalWidth,height:s.naturalHeight,flipY:!0}))})})}loadCubeImage(e){return __awaiter(this,void 0,void 0,function*(){const t=this._toImageArray(e);return this._load(t,n=>{n(new TextureCube({sources:t,width:t[0].naturalWidth,height:t[0].naturalHeight,flipY:!1}))})})}loadVideo(e,t){return __awaiter(this,void 0,void 0,function*(){const n=Object.assign({autoplay:!0,muted:!0,loop:!1,volume:1},t),s=this._toVideoElement(e,n);return this._load([s],r=>{const{autoplay:a,muted:o}=n;s.currentTime=0,a&&o&&s.play().catch(()=>{}),r(new TextureVideo({source:s,width:s.videoWidth,height:s.videoHeight,flipY:!0}))})})}_load(e,t){const n=this._loadChecker;return new Promise((s,r)=>{n.once("ready",a=>{a.errorCount>0||t(s)}),n.once("error",r),n.check(e)})}_toImageArray(e){return(Array.isArray(e)?e:[e]).map(n=>{if(isString(n)){const s=new Image;return s.crossOrigin="anonymous",s.src=n,s}else return n})}_toVideoElement(e,{muted:t,loop:n,volume:s}){if(e instanceof HTMLVideoElement)return e;const r=document.createElement("video");return r.crossOrigin="anonymous",r.playsInline=!0,r.setAttribute("webkit-playsinline",""),r.muted=t,r.volume=s,r.loop=n,Array.isArray(e)?e.forEach(o=>this._appendSourceElement(r,o)):this._appendSourceElement(r,e),r.querySelectorAll("source").length>0&&r.readyState<1&&r.load(),r}_appendSourceElement(e,t){if(t instanceof HTMLSourceElement)return t;const n=document.createElement("source");n.src=t,e.appendChild(n)}}class FrameAnimator{constructor(e,t=window){this.maxDeltaTime=e,this._context=t,this._rafId=-1,this._rafTimer=-1,this._lastUpdateTime=-1}start(e){const t=this._context;if(!t||!e||this._rafId>=0||this._rafTimer>=0)return;const n=(s,r)=>{const a=Date.now(),o=Math.min(a-this._lastUpdateTime,this.maxDeltaTime*1e3);e(o,r),this._lastUpdateTime=a,this._rafId=t.requestAnimationFrame(n)};this._lastUpdateTime=Date.now(),this._rafId=t.requestAnimationFrame(n)}stop(){this._rafId>=0&&this._context.cancelAnimationFrame(this._rafId),this._rafTimer>=0&&clearTimeout(this._rafTimer),this._rafId=-1,this._rafTimer=-1}changeContext(e){this.stop(),this._context=e}}class AutoResizer{get useResizeObserver(){return this._useResizeObserver}get enabled(){return this._enabled}constructor(e,t){this._skipFirstResize=(()=>{let n=!0;return()=>{if(n){n=!1;return}this._onResize()}})(),this._useResizeObserver=e,this._enabled=!1,this._resizeObserver=null,this._onResize=t}enable(e){if(this._enabled&&this.disable(),this._useResizeObserver&&window.ResizeObserver){const t=e.getBoundingClientRect(),n=t.width!==0||t.height!==0,s=new ResizeObserver(n?this._skipFirstResize:this._onResize);s.observe(e),this._resizeObserver=s}else window.addEventListener(EVENTS$1.RESIZE,this._onResize);return this._enabled=!0,this}disable(){if(!this._enabled)return this;const e=this._resizeObserver;return e?(e.disconnect(),this._resizeObserver=null):window.removeEventListener(EVENTS$1.RESIZE,this._onResize),this._enabled=!1,this}}class Autoplay{get enabled(){return this._enabled}get enableBlocked(){return this._enableBlocked}get playing(){return this._enabled&&!this._interrupted}get delay(){return this._delay}set delay(e){this._delay=e}get delayOnMouseLeave(){return this._delayOnMouseLeave}set delayOnMouseLeave(e){this._delayOnMouseLeave=e}get speed(){return this._speed}set speed(e){this._speed=e}get pauseOnHover(){return this._pauseOnHover}set pauseOnHover(e){this._pauseOnHover=e}get canInterrupt(){return this._canInterrupt}set canInterrupt(e){this._canInterrupt=e}get disableOnInterrupt(){return this._disableOnInterrupt}set disableOnInterrupt(e){this._disableOnInterrupt=e}constructor(e,t,n){this._onInputStart=()=>{this._canInterrupt&&(this._interrupted=!0,this._clearTimeout())},this._onInputEnd=()=>{this._setUninterruptedAfterDelay(this._delay)},this._onGyroEnable=()=>{this.disable()},this._onMouseEnter=()=>{this._pauseOnHover&&(this._interrupted=!0,this._hovering=!0)},this._onMouseLeave=()=>{this._pauseOnHover&&(this._hovering=!1,this._setUninterruptedAfterDelay(this._delayOnMouseLeave))},this._camera=e.camera,this._control=e.control,this._element=t,this._enabled=!1,this._interrupted=!1,this._interruptionTimer=-1,this._hovering=!1;const{delay:s=2e3,delayOnMouseLeave:r=0,speed:a=1,pauseOnHover:o=!1,canInterrupt:l=!0,disableOnInterrupt:d=!1}=getObjectOption(n);this._enableBlocked=!n,this._delay=s,this._delayOnMouseLeave=r,this._speed=a,this._pauseOnHover=o,this._canInterrupt=l,this._disableOnInterrupt=d}destroy(){this.disable()}update(e){if(!this._enabled)return;if(this._interrupted){this._disableOnInterrupt&&this.disable();return}const t=this._camera,n=-this._speed*e/100;t.yaw=circulate(t.yaw+n,0,360)}enable(){const e=this._control,t=this._element;this._enabled||e.gyro.enabled||(e.rotate.on(CONTROL_EVENTS.INPUT_START,this._onInputStart),e.rotate.on(CONTROL_EVENTS.INPUT_END,this._onInputEnd),e.zoom.on(CONTROL_EVENTS.INPUT_START,this._onInputStart),e.zoom.on(CONTROL_EVENTS.INPUT_END,this._onInputEnd),e.gyro.on(CONTROL_EVENTS.ENABLE,this._onGyroEnable),t.addEventListener(EVENTS$1.MOUSE_ENTER,this._onMouseEnter,!1),t.addEventListener(EVENTS$1.MOUSE_LEAVE,this._onMouseLeave,!1),this._enabled=!0,this._enableBlocked=!1)}enableAfterDelay(){this.enable(),this._interrupted=!0,this._setUninterruptedAfterDelay(this._delay)}disable(){if(!this._enabled)return;const e=this._control,t=this._element;e.rotate.off(CONTROL_EVENTS.INPUT_START,this._onInputStart),e.rotate.off(CONTROL_EVENTS.INPUT_END,this._onInputEnd),e.zoom.off(CONTROL_EVENTS.INPUT_START,this._onInputStart),e.zoom.off(CONTROL_EVENTS.INPUT_END,this._onInputEnd),e.gyro.off(CONTROL_EVENTS.ENABLE,this._onGyroEnable),t.removeEventListener(EVENTS$1.MOUSE_ENTER,this._onMouseEnter,!1),t.removeEventListener(EVENTS$1.MOUSE_LEAVE,this._onMouseLeave,!1),this._enabled=!1,this._interrupted=!1,this._hovering=!1,this._clearTimeout()}_setUninterruptedAfterDelay(e){this._hovering||(this._clearTimeout(),e>0?this._interruptionTimer=window.setTimeout(()=>{this._interrupted=!1,this._interruptionTimer=-1},e):(this._interrupted=!1,this._interruptionTimer=-1))}_clearTimeout(){this._interruptionTimer>=0&&(window.clearTimeout(this._interruptionTimer),this._interruptionTimer=-1)}}class XRManager extends Component{constructor(e,t={}){super(),this.destroy=()=>{this.exit(),this.off()},this._onSessionEnd=()=>{this.exit(),this.trigger(EVENTS.VR_END)},this._xrSession=null,this._xrRefSpace=null,this._ctx=e,this._options=t}isAvailable(){return __awaiter(this,void 0,void 0,function*(){const e=window.navigator.xr;return e?e.isSessionSupported(SESSION_VR).then(t=>t).catch(()=>!1):!1})}enter(){return __awaiter(this,void 0,void 0,function*(){const e=this._ctx,t=window.navigator.xr;if(!t)return;yield GyroControl.requestSensorPermission();const n=Object.assign({requiredFeatures:[XR_REFERENCE_SPACE]},this._options);yield e.makeXRCompatible();const s=yield t.requestSession(SESSION_VR,n);e.bindXRLayer(s);const r=yield s.requestReferenceSpace(XR_REFERENCE_SPACE);this._setSession(s,r),this.trigger(EVENTS.VR_START,{session:s})})}exit(){const e=this._xrSession;e&&e.end().catch(()=>{}),this._xrSession=null,this._xrRefSpace=null}canRender(e){const t=this._xrRefSpace;return t?!!e.getViewerPose(t):!1}getEyeParams(e){const t=e.session,n=e.getViewerPose(this._xrRefSpace);if(!n)return null;const s=t.renderState.baseLayer;return s?n.views.map(r=>{const a=s.getViewport(r),o=r.transform.inverse.matrix;return{viewport:a,vMatrix:o,pMatrix:r.projectionMatrix}}):null}_setSession(e,t){this._xrSession=e,this._xrRefSpace=t,e.addEventListener(EVENTS$1.XR_END,this._onSessionEnd)}}class Hotspot{constructor(e,t){this.element=e,this.position=t}}class HotspotRenderer{constructor(e,t,{zoom:n=!1}){this._containerEl=getNullableElement(`.${DEFAULT_CLASS.HOTSPOT_CONTAINER}`,e),this._renderer=t,this._hotspots=[],this._zoom=n}refresh(){const e=this._containerEl;if(!e)return;const t=[].slice.apply(e.querySelectorAll(`.${DEFAULT_CLASS.HOTSPOT}`));this._hotspots=t.map(n=>this._parseHotspot(n))}render(e){const t=this._hotspots,n=this._renderer.width*.5,s=this._renderer.height*.5,r=e.zoom,a="translate(-50%, -50%)",o=this._zoom?`scale(${r})`:"";t.forEach(l=>{const d=l.position,f=create$3();if(copy$2(f,d),transformMat4(f,f,e.viewMatrix),transformMat4(f,f,e.projectionMatrix),f[2]>1||f[2]<0){l.element.classList.remove(DEFAULT_CLASS.HOTSPOT_VISIBLE);return}const u=fromValues(f[0]*n+n,-f[1]*s+s);l.element.classList.add(DEFAULT_CLASS.HOTSPOT_VISIBLE),l.element.style.transform=[a,`translate(${u[0]}px, ${u[1]}px)`,o].join(" ")})}_parseHotspot(e){const t=e.dataset.yaw,n=e.dataset.pitch,s=e.dataset.position;if(t||n){const r=t?parseFloat(t):0,a=n?parseFloat(n):0,o=this._yawPitchToVec3(r,a);return new Hotspot(e,o)}else if(s){const r=s.split(" ").map(a=>parseFloat(a));if(r.length<3)throw new View360Error(ERROR.MESSAGES.INSUFFICIENT_ARGS(s,'hotspot attribute "data-position"'),ERROR.CODES.INSUFFICIENT_ARGS);return new Hotspot(e,fromValues$3(r[0],r[1],r[2]))}else{const r=fromValues$3(0,0,-1);return new Hotspot(e,r)}}_yawPitchToVec3(e,t){const n=e*DEG_TO_RAD,s=t*DEG_TO_RAD,r=create$3();return r[1]=Math.sin(s),r[2]=Math.cos(s),r[0]=r[2]*Math.sin(-n),r[2]=-r[2]*Math.cos(-n),r}}class VertexArrayObject{get count(){return this.geometry.indicies.count}constructor(e,t,n){this.obj=e,this.geometry=t,this.buffers=n}}class WebGLContext{get canvas(){return this._canvas}get maxTextureSize(){return this._maxTextureSize}get isWebGL2(){return this._isWebGL2}get supportVAO(){return this._isWebGL2||!!this._extensions.vao}get lost(){return this._contextLost}get debug(){return this._debug}constructor(e,t){this._onContextLost=()=>{this._canvas.classList.add(DEFAULT_CLASS.CTX_LOST),this._contextLost=!0},this._onContextRestore=()=>{this._canvas.classList.remove(DEFAULT_CLASS.CTX_LOST),this._contextLost=!1},this._canvas=e,this._contextLost=!1,this._debug=t,this._extensions={vao:null,loseContext:null}}init(){const e=this._canvas,{gl:t,isWebGL2:n}=this._getContext(e);this._gl=t,this._maxTextureSize=t.getParameter(t.MAX_TEXTURE_SIZE),this._isWebGL2=n,this._isWebGL2||(this._extensions.vao=t.getExtension("OES_vertex_array_object")),this._extensions.loseContext=t.getExtension("WEBGL_lose_context"),e.addEventListener(EVENTS$1.CONTEXT_LOST,this._onContextLost),e.addEventListener(EVENTS$1.CONTEXT_RESTORED,this._onContextRestore)}destroy(){const e=this._gl,t=this._canvas;e&&(e.bindBuffer(e.ARRAY_BUFFER,null),e.bindBuffer(e.ELEMENT_ARRAY_BUFFER,null)),t.removeEventListener(EVENTS$1.CONTEXT_LOST,this._onContextLost),t.removeEventListener(EVENTS$1.CONTEXT_RESTORED,this._onContextRestore)}forceLoseContext(){const e=this._extensions.loseContext;e&&e.loseContext()}forceRestoreContext(){const e=this._extensions.loseContext;e&&e.restoreContext()}clear(){const e=this._gl;e.clear(e.COLOR_BUFFER_BIT)}resize(){const e=this._gl;e.viewport(0,0,e.drawingBufferWidth,e.drawingBufferHeight)}viewport(e,t,n,s){this._gl.viewport(e,t,n,s)}createVAO(e,t){const n=this._createNativeVAO(),s=new VertexArrayObject(n,e,{indicies:this._createBuffer(),position:this._createBuffer(),uv:this._createBuffer()});return n&&(this._bindNativeVAO(n),this._supplyGeometryData(s,t),this._bindNativeVAO(null),this._unbindBuffers()),s}draw(e,t){const n=this._gl;e.obj?this._bindNativeVAO(e.obj):this._supplyGeometryData(e,t),n.drawElements(n.TRIANGLES,e.count,n.UNSIGNED_SHORT,0),e.obj?this._bindNativeVAO(null):this._unbindBuffers()}releaseVAO(e){e.obj&&this._deleteNativeVAO(e.obj),this._deleteBuffer(e.buffers.indicies),this._deleteBuffer(e.buffers.position),this._deleteBuffer(e.buffers.uv)}getUniformLocations(e,t){const n=this._gl,s=Object.keys(t).reduce((r,a)=>(r[a]=n.getUniformLocation(e,a),r),{});return Object.assign(Object.assign({},this._getCommonUniformLocations(e)),s)}updateCommonUniforms(e,t,n){const s=this._gl,r=n.uniformLocations,a=e.matrix,o=create$4();multiply$1(o,t.viewMatrix,a),s.uniformMatrix4fv(r.uMVMatrix,!1,o),s.uniformMatrix4fv(r.uPMatrix,!1,t.projectionMatrix)}updateVRUniforms(e,t,n,s){const r=this._gl,a=e.uniformLocations;r.uniformMatrix4fv(a.uMVMatrix,!1,t),r.uniformMatrix4fv(a.uPMatrix,!1,n),a.uEye&&r.uniform1f(a.uEye,s)}updateUniforms(e){const t=this._gl,n=e.uniforms,s=e.uniformLocations;for(const r in n){const a=n[r],o=s[r];a&&a.needsUpdate&&a.update(t,o,this._isWebGL2)}}releaseShaderResources(e){const t=this._gl,n=e.uniforms;for(const s in n){const r=n[s];r&&r.needsUpdate&&r.destroy(t)}t.deleteProgram(e.program)}useProgram(e){this._gl.useProgram(e.program)}createProgram(e,t){const n=this._gl,s=n.createProgram(),r=this._compileShader(n.VERTEX_SHADER,e),a=this._compileShader(n.FRAGMENT_SHADER,t);if(n.attachShader(s,r),n.attachShader(s,a),n.bindAttribLocation(s,0,"position"),n.bindAttribLocation(s,1,"uv"),n.linkProgram(s),this._debug&&!n.getProgramParameter(s,n.LINK_STATUS)){let o=null;throw n.getShaderParameter(r,n.COMPILE_STATUS)?n.getShaderParameter(a,n.COMPILE_STATUS)||(o=n.getShaderInfoLog(a)):o=n.getShaderInfoLog(r),new View360Error(ERROR.MESSAGES.FAILED_LINKING_PROGRAM(n.getProgramInfoLog(s),o),ERROR.CODES.FAILED_LINKING_PROGRAM)}return n.deleteShader(r),n.deleteShader(a),s}createWebGLTexture(e){const t=this._gl,n=t.createTexture();if(t.bindTexture(t.TEXTURE_2D,n),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MIN_FILTER,t.LINEAR),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MAG_FILTER,t.LINEAR),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_S,e.wrapS),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_T,e.wrapT),!e.isVideo()&&this._isWebGL2){const s=t;s.texStorage2D(s.TEXTURE_2D,1,s.RGBA8,e.width,e.height)}return n}createWebGLCubeTexture(e,t){const n=this._gl,s=n.createTexture();if(n.bindTexture(n.TEXTURE_CUBE_MAP,s),n.texParameteri(n.TEXTURE_CUBE_MAP,n.TEXTURE_MIN_FILTER,n.LINEAR),n.texParameteri(n.TEXTURE_CUBE_MAP,n.TEXTURE_MAG_FILTER,n.LINEAR),n.texParameteri(n.TEXTURE_CUBE_MAP,n.TEXTURE_WRAP_S,e.wrapS),n.texParameteri(n.TEXTURE_CUBE_MAP,n.TEXTURE_WRAP_T,e.wrapT),this._isWebGL2){const r=n;r.texStorage2D(r.TEXTURE_CUBE_MAP,1,r.RGBA8,t,t)}return s}makeXRCompatible(){return __awaiter(this,void 0,void 0,function*(){const e=this._gl,t=e.getContextAttributes();t&&t.xrCompatible!==!0&&(yield e.makeXRCompatible())})}bindXRLayer(e){const t=this._gl,n=new XRWebGLLayer(e,t);e.updateRenderState({baseLayer:n})}bindXRFrame(e){const t=this._gl,s=e.session.renderState.baseLayer;t.bindFramebuffer(t.FRAMEBUFFER,s.framebuffer)}useDefaultFrameBuffer(){const e=this._gl;e.bindFramebuffer(e.FRAMEBUFFER,null)}_createBuffer(){return this._gl.createBuffer()}_deleteBuffer(e){return this._gl.deleteBuffer(e)}_createNativeVAO(){const e=this._gl;if(this._isWebGL2)return e.createVertexArray();{const t=this._extensions.vao;return(t==null?void 0:t.createVertexArrayOES())||null}}_bindNativeVAO(e){const t=this._gl;if(this._isWebGL2)t.bindVertexArray(e);else{const n=this._extensions.vao;n==null||n.bindVertexArrayOES(e)}}_deleteNativeVAO(e){const t=this._gl;if(this._isWebGL2)t.deleteVertexArray(e);else{const n=this._extensions.vao;n==null||n.deleteVertexArrayOES(e)}}_supplyGeometryData(e,t){const n=e.geometry;this._supplyIndiciesData(n.indicies,e.buffers.indicies),this._supplyAttributeData(n.vertices,t.program,"position",e.buffers.position),this._supplyAttributeData(n.uvs,t.program,"uv",e.buffers.uv)}_unbindBuffers(){const e=this._gl;e.bindBuffer(e.ELEMENT_ARRAY_BUFFER,null),e.bindBuffer(e.ARRAY_BUFFER,null)}_supplyIndiciesData(e,t){const n=this._gl;n.bindBuffer(n.ELEMENT_ARRAY_BUFFER,t),n.bufferData(n.ELEMENT_ARRAY_BUFFER,e.data,n.STATIC_DRAW)}_supplyAttributeData(e,t,n,s){const r=this._gl,a=r.getAttribLocation(t,n);a<0||(r.bindBuffer(r.ARRAY_BUFFER,s),r.bufferData(r.ARRAY_BUFFER,e.data,r.STATIC_DRAW),r.vertexAttribPointer(a,e.itemSize,r.FLOAT,!1,0,0),r.enableVertexAttribArray(a))}_compileShader(e,t){const n=this._gl,s=n.createShader(e);return n.shaderSource(s,t),n.compileShader(s),s}_getCommonUniformLocations(e){const t=this._gl;return{uMVMatrix:t.getUniformLocation(e,"uMVMatrix"),uPMatrix:t.getUniformLocation(e,"uPMatrix")}}_getContext(e){const t=["webgl2","webgl","experimental-webgl","webkit-3d","moz-webgl"];let n=null,s=!1;const r={preserveDrawingBuffer:!1,antialias:!1},a=o=>o.statusMessage;e.addEventListener(EVENTS$1.CONTEXT_CREATE_ERROR,a);for(const o of t){try{n=e.getContext(o,r),s=o==="webgl2"}catch{}if(n)break}if(e.removeEventListener(EVENTS$1.CONTEXT_CREATE_ERROR,a),!n)throw new View360Error(ERROR.MESSAGES.WEBGL_NOT_SUPPORTED,ERROR.CODES.WEBGL_NOT_SUPPORTED);return{gl:n,isWebGL2:s}}}class WebGLRenderer{get canvas(){return this._canvas}get width(){return this._elementSize.x}get height(){return this._elementSize.y}get pixelRatio(){return this._pixelRatio}get aspect(){return this._elementSize.x/this._elementSize.y}constructor(e,t){this._canvas=e,this._elementSize={x:0,y:0},this._pixelRatio=1,this.ctx=new WebGLContext(e,t)}destroy(){const e=this._canvas;this.ctx.destroy(),e.width=1,e.height=1}resize(){const e=this._canvas,t=this._elementSize,n=window.devicePixelRatio;t.x=e.clientWidth,t.y=e.clientHeight,e.width=t.x*n,e.height=t.y*n,this._pixelRatio=n,this.ctx.resize()}render(e,t){const n=this.ctx;n.lost||(n.clear(),n.useProgram(e.program),n.updateCommonUniforms(e,t,e.program),e.update({camera:t}),n.updateUniforms(e.program),n.draw(e.vao,e.program))}renderVR(e,t,n){const s=this.ctx,r=t.getEyeParams(n);!r||!e||(s.bindXRFrame(n),s.useProgram(e.program),s.updateUniforms(e.program),r.forEach((a,o)=>{const l=a.viewport,d=multiply$1(create$4(),a.vMatrix,e.matrix);s.viewport(l.x,l.y,l.width,l.height),s.updateVRUniforms(e.program,d,a.pMatrix,o),s.draw(e.vao,e.program)}))}}class View360 extends Component{get rootEl(){return this._rootEl}get renderer(){return this._renderer}get camera(){return this._camera}get control(){return this._control}get vr(){return this._vr}get hotspot(){return this._hotspot}get plugins(){return this._plugins}get projection(){return this._projection}set projection(e){this._initialized&&e?this.load(e):this._projection=e}get mesh(){return this._mesh}get initialized(){return this._initialized}get autoplay(){return this._autoplay}get autoInit(){return this._autoInit}get autoResize(){return this._autoResize}get canvasSelector(){return this._canvasSelector}get useResizeObserver(){return this._useResizeObserver}get tabIndex(){return this._tabIndex}set tabIndex(e){const t=this._renderer.canvas;this._tabIndex=e,e!=null?t.tabIndex=e:t.removeAttribute("tabindex")}get maxDeltaTime(){return this._animator.maxDeltaTime}set maxDeltaTime(e){this._animator.maxDeltaTime=e}get debug(){return this._debug}set debug(e){this._debug=e}get initialYaw(){return this._camera.initialYaw}set initialYaw(e){this._camera.initialYaw=e}get initialPitch(){return this._camera.initialPitch}set initialPitch(e){this._camera.initialPitch=e}get initialZoom(){return this._camera.initialZoom}set initialZoom(e){this._camera.initialZoom=e}get yawRange(){return this._camera.yawRange}set yawRange(e){this._camera.yawRange=e,this._projection&&this._projection.updateCamera(this._camera)}get pitchRange(){return this._camera.pitchRange}set pitchRange(e){this._camera.pitchRange=e,this._projection&&this._projection.updateCamera(this._camera)}get zoomRange(){return this._camera.zoomRange}set zoomRange(e){this._camera.zoomRange=e,this._projection&&this._projection.updateCamera(this._camera)}get fov(){return this._camera.fov}set fov(e){const t=this._camera,n=this._control;t.fov=e,t.updateMatrix(),n.sync()}get rotate(){return this._control.rotate}get zoom(){return this._control.zoom}get gyro(){return this._control.gyro}get useGrabCursor(){return this._control.useGrabCursor}set useGrabCursor(e){this._control.useGrabCursor=e}get disableContextMenu(){return this._control.disableContextMenu}set disableContextMenu(e){this._control.disableContextMenu=e}get scrollable(){return this._control.scrollable}set scrollable(e){this._control.scrollable=e}get wheelScrollable(){return this._control.wheelScrollable}set wheelScrollable(e){this._control.wheelScrollable=e}constructor(e,{projection:t=null,initialYaw:n=0,initialPitch:s=0,initialZoom:r=1,yawRange:a=null,pitchRange:o=null,zoomRange:l=null,fov:d=90,useGrabCursor:f=!0,disableContextMenu:u=!1,rotate:p=!0,zoom:m=!0,gyro:g=!1,scrollable:y=!0,wheelScrollable:v=!1,autoplay:b=!1,hotspot:C={},autoInit:_=!0,autoResize:R=!0,canvasSelector:E="canvas",useResizeObserver:F=!0,on:O={},plugins:A=[],maxDeltaTime:N=1/30,tabIndex:M=0,debug:Z=!1}={}){super(),this.renderFrame=oe=>{const le=this._camera,de=this._renderer,ue=this._control,ce=this._hotspot,pe=this._autoplay,he=this._mesh;he&&(this._emit(EVENTS.BEFORE_RENDER),pe.playing&&(pe.update(oe),ue.sync()),le.animation?le.animation.update(oe):ue.update(oe),de.render(he,le),ce.render(le),le.changed&&this._emit(EVENTS.VIEW_CHANGE,{yaw:le.yaw,pitch:le.pitch,zoom:le.zoom,quaternion:[le.quaternion[0],le.quaternion[1],le.quaternion[2],le.quaternion[3]]}),le.onFrameRender(),this._emit(EVENTS.RENDER))},this._renderFrameOnDemand=oe=>{const le=this._camera,de=this._control,ue=this._autoplay,ce=this._mesh,pe=ce==null?void 0:ce.getTexture();!this._initialized||!pe||!le.animation&&!de.animating&&!ue.playing&&!pe.isVideo()||this.renderFrame(oe)},this._renderVRFrame=(oe,le)=>{const de=this._vr,ue=this._mesh,ce=this._renderer;ue&&(this._emit(EVENTS.BEFORE_RENDER),ce.renderVR(ue,de,le),this._emit(EVENTS.RENDER))},this._rootEl=getElement(e),this._plugins=A,this._initialized=!1,this._autoInit=_,this._autoResize=R,this._canvasSelector=E,this._useResizeObserver=F,this._tabIndex=M,this._debug=Z;const X=findCanvas(this._rootEl,E);this._renderer=new WebGLRenderer(X,Z),this._camera=new Camera({initialYaw:n,initialPitch:s,initialZoom:r,fov:d,yawRange:a,pitchRange:o,zoomRange:l}),this._control=new PanoControl(X,this._camera,{useGrabCursor:f,scrollable:y,wheelScrollable:v,disableContextMenu:u,rotate:p,zoom:m,gyro:g}),this._animator=new FrameAnimator(N),this._autoplay=new Autoplay(this,X,b),this._projection=t,this._mesh=null,this._autoResizer=new AutoResizer(F,()=>this.resize()),this._vr=new XRManager(this._renderer.ctx),this._hotspot=new HotspotRenderer(this._rootEl,this._renderer,C),this._addEventHandlers(O),t&&_&&this.init()}destroy(){this._camera.destroy(),this._animator.stop(),this._renderer.destroy(),this._control.destroy(),this._autoResizer.disable(),this._mesh&&(this._mesh.destroy(this._renderer.ctx),this._mesh=null),this._plugins.forEach(e=>e.destroy(this)),this._initialized=!1}init(){return __awaiter(this,void 0,void 0,function*(){if(!this._projection)throw new View360Error(ERROR.MESSAGES.PROVIDE_PROJECTION_FIRST,ERROR.CODES.PROVIDE_PROJECTION_FIRST);const e=this._renderer,t=this._camera,n=this._control,s=this._animator,r=this._hotspot,a=this._projection,o=e.canvas;this._bindComponentEvents(),e.ctx.init(),this._resizeComponents(),t.updateMatrix(),this._autoResize&&this._autoResizer.enable(o),this._autoplay.enableBlocked||this._autoplay.enable(),this._plugins.forEach(d=>{d.init(this)});const l=yield this._loadTexture(a);this._applyProjection(a,l),r.refresh(),s.start(this._renderFrameOnDemand),yield n.enable(),this._tabIndex!=null&&!o.hasAttribute("tabIndex")&&(o.tabIndex=this._tabIndex),this._initialized=!0,this.renderFrame(0),this._emit(EVENTS.READY)})}load(e){return __awaiter(this,void 0,void 0,function*(){if(!e)return!1;if(this._initialized){const t=yield this._loadTexture(e);this._applyProjection(e,t),this.renderFrame(0)}else this._projection=e,this.init();return!0})}resize(){if(!this._initialized)return;this._resizeComponents(),this.renderFrame(0);const{width:e,height:t}=this._renderer;this._emit(EVENTS.RESIZE,{width:e,height:t})}addPlugins(...e){this._initialized&&e.forEach(t=>{t.init(this)}),this._plugins.push(...e)}removePlugins(...e){e.forEach(t=>{const n=this._plugins.indexOf(t);n<0||(t.destroy(this),this._plugins.splice(n,1))})}_emit(e,...t){const n=t?t[0]:{};this.trigger(e,Object.assign({type:e,target:this},n))}_applyProjection(e,t){const n=this._camera,s=this._control,r=this._renderer,a=this._mesh;a&&a.destroy(r.ctx);const o=e.createMesh(r.ctx,t);e.updateCamera(n),e.updateControl(s),this._mesh=o,this._emit(EVENTS.PROJECTION_CHANGE,{projection:e})}_loadTexture(e){return __awaiter(this,void 0,void 0,function*(){const t=new TextureLoader,{src:n,video:s}=e;this._emit(EVENTS.LOAD_START,{src:n,video:s});const r=yield t.load(n,s);return this._emit(EVENTS.LOAD,{src:n,video:s}),r})}_resizeComponents(){const e=this._renderer,t=this._camera,n=this._control;e.resize(),t.resize(e.width,e.height),n.resize(e.width,e.height)}_addEventHandlers(e){Object.keys(e).forEach(t=>{this.on(t,e[t])})}_bindComponentEvents(){const e=this._rootEl,t=this._control,n=this._animator,s=this._renderer,r=this._vr;[CONTROL_EVENTS.STATIC_CLICK,CONTROL_EVENTS.INPUT_START,CONTROL_EVENTS.INPUT_END].forEach(o=>{t.rotate.on(o,l=>{this._emit(o,l)}),t.zoom.on(o,l=>{this._emit(o,l)})}),r.on(EVENTS.VR_START,o=>{e.classList.add(DEFAULT_CLASS.IN_VR),n.changeContext(o.session),n.start(this._renderVRFrame),this._emit(EVENTS.VR_START)}),r.on(EVENTS.VR_END,()=>{e.classList.remove(DEFAULT_CLASS.IN_VR),s.ctx.useDefaultFrameBuffer(),n.changeContext(window),n.start(this._renderFrameOnDemand),this.resize(),this._emit(EVENTS.VR_END)})}}View360.VERSION="4.0.0-beta.7";class Object3D extends Component{constructor(){super(),this.matrix=create$4(),this.rotation=create$1(),this.position=fromValues$3(0,0,0),this.scale=fromValues$3(1,1,1)}updateMatrix(){fromRotationTranslationScale(this.matrix,this.rotation,this.position,this.scale)}update(e){this.trigger(OBJECT_3D_EVENTS.UPDATE,e)}}class Projection{constructor({src:e,video:t=!1}){this.src=e,this.video=t}updateCamera(e){e.resetRange()}updateControl(e){e.ignoreZoomScale=!1}}class Uniform{constructor(){this.needsUpdate=!0}destroy(e){}}class TriangleMesh extends Object3D{constructor(e,t){super(),this.vao=e,this.program=t}destroy(e){e.releaseVAO(this.vao),e.releaseShaderResources(this.program)}getTexture(){return this.program.uniforms.uTexture.texture}}class ShaderProgram{constructor(e,t,n,s){this.program=e.createProgram(t,n),this.uniforms=s,this.uniformLocations=e.getUniformLocations(this.program,s)}}class VertexData{constructor(e,t){this.data=e,this.itemSize=t,this.count=e.length/t}}class Geometry{constructor(e,t,n){this.vertices=new VertexData(new Float32Array(e),3),this.indicies=new VertexData(new Uint16Array(t),1),this.uvs=new VertexData(new Float32Array(n),2)}}class UniformTexture2D extends Uniform{constructor(e,t){super(),this.texture=t,this._webglTexture=e.createWebGLTexture(t)}destroy(e){this.texture.destroy(),e.deleteTexture(this._webglTexture)}update(e,t,n){const s=this.texture,r=s.isVideo();e.pixelStorei(e.UNPACK_FLIP_Y_WEBGL,s.flipY),e.uniform1i(t,0),e.activeTexture(e.TEXTURE0),e.bindTexture(e.TEXTURE_2D,this._webglTexture),!r&&n?e.texSubImage2D(e.TEXTURE_2D,0,0,0,e.RGBA,e.UNSIGNED_BYTE,s.source):e.texImage2D(e.TEXTURE_2D,0,e.RGBA,e.RGBA,e.UNSIGNED_BYTE,s.source),r||(this.needsUpdate=!1)}}var vs$2=`#define GLSLIFY 1
|
|
77
77
|
attribute vec3 position;attribute vec2 uv;uniform mat4 uMVMatrix;uniform mat4 uPMatrix;varying highp vec2 vUV;void main(){vUV=uv;gl_Position=uPMatrix*uMVMatrix*vec4(position,1.0);}`,fs$2=`#define GLSLIFY 1
|
|
78
78
|
uniform sampler2D uTexture;varying highp vec2 vUV;void main(){gl_FragColor=texture2D(uTexture,vUV.st);}`;class SphereGeometry extends Geometry{constructor(){const n=-.5*Math.PI,s=[],r=[],a=[];let o,l;for(o=0;o<=60;o++){const d=(o/60-.5)*Math.PI,f=Math.sin(d),u=Math.cos(d);for(l=0;l<=60;l++){const p=(l/60-.5)*2*Math.PI+n,m=Math.sin(p),y=Math.cos(p)*u,v=f,b=m*u,C=l/60,_=o/60;if(s.push(C,_),r.push(y,v,b),l!==60&&o!==60){const R=o*61+l,E=R+60+1;a.push(R,R+1,E,E,R+1,E+1)}}}super(r,a,s)}}class EquirectProjection extends Projection{constructor(e){super(e)}createMesh(e,t){const n={uTexture:new UniformTexture2D(e,t)},s=new SphereGeometry,r=new ShaderProgram(e,vs$2,fs$2,n),a=e.createVAO(s,r);return new TriangleMesh(a,r)}}class UniformFloat extends Uniform{constructor(e){super(),this.val=e}update(e,t){e.uniform1f(t,this.val),this.needsUpdate=!1}}class UniformVector4Array extends Uniform{constructor(e){super(),this.val=e}update(e,t){e.uniform4fv(t,this.val.reduce((n,s)=>[...n,...s],[])),this.needsUpdate=!1}}var vs=`#define GLSLIFY 1
|
|
79
|
-
attribute vec3 position;attribute vec2 uv;uniform mat4 uMVMatrix;uniform mat4 uPMatrix;uniform vec4 uTexScaleOffset[2];uniform float uEye;varying highp vec2 vUV;void main(){vec4 scaleOffset=uTexScaleOffset[int(uEye)];vUV=uv.xy*scaleOffset.xy+scaleOffset.zw;gl_Position=uPMatrix*uMVMatrix*vec4(position,1.0);}`;class StereoEquiProjection extends Projection{constructor(e){super(e),this._mode=e.mode}createMesh(e,t){let n,s;switch(this._mode){case StereoEquiProjection.MODE.LEFT_RIGHT:n=[.5,1,0,0],s=[.5,1,.5,0];break;default:n=[1,.5,0,0],s=[1,.5,0,.5]}const r={uTexture:new UniformTexture2D(e,t),uEye:new UniformFloat(0),uTexScaleOffset:new UniformVector4Array([n,s])},a=new SphereGeometry,o=new ShaderProgram(e,vs,fs$2,r),l=e.createVAO(a,o);return new TriangleMesh(l,o)}}StereoEquiProjection.MODE={LEFT_RIGHT:"left_right",TOP_BOTTOM:"top_bottom"};const ar={save:"يحفظ",addPersonalMarker:"أضف علامة شخصية",editPersonalMarker:"تحرير العلامة الشخصية",pleaseSelectMarker:"الرجاء تحديد علامة.",pleaseEnterMarkerName:"الرجاء إدخال اسم العلامة.",maxLengthMarkerName:"يجب ألا يتجاوز طول اسم المؤشر 256 حرفًا.",successAddMarker:"تمت إضافة العلامة بنجاح.",successEditMarker:"تم تحرير العلامة بنجاح.",errorRegisteringTwoMarker:"خطأ في تسجيل علامتين في نفس الوقت.",pleaseLoginFirst:"الرجاء تسجيل الدخول أولا",addMarker:"أضف علامة",markerName:"اسم العلامة",description:"وصف",pleaseEnterMarkerDescription:"أدخل وصفًا للعلامة.",cancel:"انسحب",nextIn:"التالي في",play:"يلعب",visit:"يزور",clickForMoreVideos:"انقر لمزيد من أشرطة الفيديو",hour:"ساعة",minutes:"دقائق",seconds:"ثانیه",currentlyNoItemsSaved:"لا يوجد حاليا أي عناصر محفوظة.",savedList:"القائمة المحفوظة",enterYourOpinion:"أدخل رأيك",notPossibleRegisterComment:"حاليا، ليس من الممكن تسجيل تعليق.",youMustSubmitYourComment:"يجب عليك تقديم تعليقك",notPossibleToRegisterComment:"حاليا، ليس من الممكن تسجيل تعليق.",comeIn:"ادخل",sharing:"مشاركة",recordFeedback:"سجل ردود الفعل",cinematicFilm:"فيلم سينمائي",serial:"مسلسل",subtitle:"الترجمة",translation:"مزدوج",persian:"الفارسية",english:"إنجليزي",arabic:"عربي",turkish:"تركي",playlist:"قائمة التشغيل",playlists:"قوائم التشغيل",showPlaylist:"عرض قائمة التشغيل",suggestedVideos:"الفيديوهات المقترحة",become:"يصبح.",production:"إنتاج",viewPoint:"وجهة نظر",show:"يعرض",saved:"أنقذ",home:"بيت",profile:"حساب تعريفي",previousViewingTime:"وقت المشاهدة السابق",continuousPlaybackText:'سيتم تشغيل الفيديو الخاص بك من وقت المشاهدة السابق. إذا كنت تريد تشغيل الفيديو من البداية، فاختر خيار "مشاهدة الفيديو من البداية".',watchContinuousVideo:"شاهد بقية الفيديو",watchCBeginningVideo:"شاهد الفيديو من البداية",takingPicture:"التقاط الصور",liveChat:"الدردشة الحية",hideLiveChat:"إخفاء الدردشة المباشرة",showLiveChat:"عرض الدردشة الحية",anonymousUser:"مستخدم مجهول",awaitingApprovalByAdmin:"في انتظار موافقة المشرف",approvedByAdmin:"تمت الموافقة عليه من قبل المشرف",closeMessage:"أغلق الرسالة",viewFullPinnedMessage:"عرض الرسالة المثبتة كاملة",pinnedMessage:"رسالة مثبتة",less:"أقل",more:"أكثر",copyLink:"انسخ الرابط",linkWasCopied:"تم نسخ الرابط",download:"تحميل",withQuality:"مع الجودة",selectDownloadQuality:"حدد جودة التنزيل",badSoundAndImageQuality:"جودة الصوت والصورة سيئة",streamLinkFailure:"فشل رابط الدفق",amountOfInternetUsageWasHigh:"كان مقدار استخدام الإنترنت مرتفعًا",programAppearance:"مظهر البرنامج",soundAndImageMismatch:"عدم تطابق الصوت والصورة",noSubtitle:"لا ترجمات",noSubtitle1:"لا ترجمات",accessForMeDifficult:"كان من الصعب بالنسبة لي الوصول إليه",videoContentWasNotGood:"محتوى الفيديو لم يكن جيداً",goodSoundAndImageQuality:"جودة صوت وصورة جيدة",noDisconnection:"لا يوجد انقطاع",amountOfInternetUsage:"حجم استخدام الانترنت",privacyProtection:"حماية الخصوصية",farsiSubtitles:"ترجمات فارسية",easyAccess:"سهولة الوصول",appropriateVideoContent:"محتوى الفيديو المناسب",veryBad:"سيئة للغاية",bad:"سيء",middle:"متوسط",good:"جيد",veryGood:"جيد جدًا",successfullyCommentSubmit:"لقد تم تسجيل تعليقك بنجاح.",ratingZarebin:"",fullRateInternetTraffic:"يتم احتساب حركة المرور الخاصة بك على الإنترنت بالسعر الكامل.",exitFrom:"خروج از",fullScreen:"صفحة كاملة",lock:"قفل",markersList:"قائمة المؤشرات",markers:"نشانگرها",languageSelection:"اختيار اللغة",default:"تقصير",retry:"حاول ثانية",pictureInPicture:"صورة في صورة",video:"فيديو",season:"موسم",section:"جزء",playNextVideo:"قم بتشغيل الفيديو التالي",replay:"اعادتها",pause:"قف",quality:"جودة",automatic:"تلقائي",basedOnYourInternetSpeed:"على أساس سرعة الإنترنت لديك",settings:"إعدادات",choiceQuality:"اختيار الجودة",subtitleSettings:"إعدادات الترجمة",jumpTo:"القفز الى",mute:"صامت",unmute:"مع الصوت",playBackSpeed:"سرعة التشغيل",normalSpeed:"السرعة العادية",subtitleBackgroundColor:"لون خلفية الترجمة",subtitleTextColor:"لون نص الترجمة",subtitleSelection:"اختيار الترجمة",selectSubtitleBackgroundColor:"حدد لون الخلفية للترجمة",selectSubtitleTextColor:"اختر لون نص الترجمة",tagFilter:"مرشح العلامة",tags:"العلامات",separateItemsWithEnter:"افصل العناصر باستخدام Enter",contentType:"نوع المحتوى",search:"يبحث",accordingThisTagVideoNotFound:"حسب العلامة المطلوبة لم يتم العثور على الفيديو!",autoPlay:"اللعب التلقائي",bright:"ساطع",off:"عن",is:"يكون",photo:"صورة",currentlyNoVideoContent:"لا يوجد حاليا أي محتوى فيديو على هذه القناة لهذا البث المباشر.",viewOtherVideos:"يمكنك مشاهدة عمليات البث المباشر الأخرى أو التحقق من جدول البث المباشر المستقبلي لقناتك المطلوبة",enteredAddressNotCorrect:"العنوان الذي تم إدخاله غير صحيح.",first:"أولاً",second:"ثانية",third:"ثالث",fourth:"الرابع",fifth:"الخامس",sixth:"السادس",seventh:"السابع",eighth:"الثامن",ninth:"التاسع",tenth:"العاشر",eleventh:"الحادي عشر",twelfth:"الثاني عشر",thirteenth:"الثالث عشر",fourteenth:"الرابع عشر",fifteenth:"الخامس عشر",sixteenth:"السادس عشر",seventeenth:"السابع عشر",eighteenth:"الثامن عشر",nineteenth:"التاسع عشر",twentieth:"العشرين"},en={save:"Save",addPersonalMarker:"Add Marker",editPersonalMarker:"Edit Marker",pleaseSelectMarker:"Please select a marker.",pleaseEnterMarkerName:"Enter a marker name.",maxLengthMarkerName:"Marker name can’t exceed 256 characters.",successAddMarker:"Marker added successfully.",successEditMarker:"Marker updated successfully.",errorRegisteringTwoMarker:"Could not register marker.",pleaseLoginFirst:"Please log in first.",addMarker:"Add Marker",markerName:"Marker Name",description:"Description",pleaseEnterMarkerDescription:"Enter marker description.",cancel:"Cancel",nextIn:"Next in",play:"Play",visit:"Visit",clickForMoreVideos:"Click for more videos",hour:"Hour",minutes:"Minutes",seconds:"Seconds",currentlyNoItemsSaved:"No saved items yet.",savedList:"Saved List",enterYourOpinion:"Write your comment",notPossibleRegisterComment:"Comments are disabled right now.",youMustSubmitYourComment:"Please log in to comment.",notPossibleToRegisterComment:"Comments are disabled right now.",comeIn:"Login",sharing:"Share",recordFeedback:"Send Feedback",cinematicFilm:"Movie",serial:"Series",subtitle:"Subtitles",translation:"Dubbed",persian:"Persian",english:"English",arabic:"Arabic",turkish:"Turkish",playlist:"Playlist",playlists:"Playlists",showPlaylist:"Show Playlist",suggestedVideos:"Suggested Videos",become:"Become",production:"Production",viewPoint:"Viewpoint",show:"Show",saved:"Saved",home:"Home",profile:"Profile",previousViewingTime:"Last watched time",continuousPlaybackText:"Your video will continue from where you left off. To start from the beginning, choose 'Watch from start'.",watchContinuousVideo:"Continue Watching",watchCBeginningVideo:"Watch from Start",takingPicture:"Take Screenshot",liveChat:"Live Chat",hideLiveChat:"Hide Chat",showLiveChat:"Show Chat",anonymousUser:"Guest User",awaitingApprovalByAdmin:"Pending admin approval",approvedByAdmin:"Approved",closeMessage:"Close",viewFullPinnedMessage:"View full pinned message",pinnedMessage:"Pinned Message",less:"Show less",more:"Show more",copyLink:"Copy Link",linkWasCopied:"Link copied!",download:"Download",withQuality:"Quality",selectDownloadQuality:"Choose download quality",badSoundAndImageQuality:"Poor audio/video quality",streamLinkFailure:"Stream link error",amountOfInternetUsageWasHigh:"High data usage",programAppearance:"App appearance",soundAndImageMismatch:"Audio out of sync",noSubtitle:"No subtitles",noSubtitle1:"Without subtitles",accessForMeDifficult:"Hard to access",videoContentWasNotGood:"Video content wasn’t good",goodSoundAndImageQuality:"Good audio/video quality",noDisconnection:"No interruptions",amountOfInternetUsage:"Data usage",privacyProtection:"Privacy protection",farsiSubtitles:"Persian subtitles",easyAccess:"Easy access",appropriateVideoContent:"Appropriate content",veryBad:"Very Bad",bad:"Bad",middle:"Average",good:"Good",veryGood:"Very Good",successfullyCommentSubmit:"Comment submitted successfully.",ratingZarebin:"Rate Zarebin",fullRateInternetTraffic:"Internet usage will be counted fully.",exitFrom:"Exit",fullScreen:"Fullscreen",lock:"Lock",markersList:"Markers List",markers:"Markers",languageSelection:"Language",default:"Default",retry:"Retry",pictureInPicture:"Picture-in-Picture",video:"Video",season:"Season",section:"Episode",playNextVideo:"Play Next Video",replay:"Replay",pause:"Pause",quality:"Quality",automatic:"Auto",basedOnYourInternetSpeed:"Based on your internet speed",settings:"Settings",choiceQuality:"Select Quality",subtitleSettings:"Subtitle Settings",jumpTo:"Skip to",mute:"Mute",unmute:"Unmute",playBackSpeed:"Playback Speed",normalSpeed:"Normal",subtitleBackgroundColor:"Subtitle Background",subtitleTextColor:"Subtitle Text Color",subtitleSelection:"Select Subtitle",selectSubtitleBackgroundColor:"Choose subtitle background",selectSubtitleTextColor:"Choose subtitle text color",tagFilter:"Tag Filter",tags:"Tags",separateItemsWithEnter:"Separate items with Enter",contentType:"Content Type",search:"Search",accordingThisTagVideoNotFound:"No video found for this tag!",autoPlay:"Autoplay",bright:"Light",off:"Off",is:"is",photo:"Photo",currentlyNoVideoContent:"No video content available for this live stream.",viewOtherVideos:"You can check other live streams or upcoming schedules.",enteredAddressNotCorrect:"The entered address is invalid.",first:"First",second:"Second",third:"Third",fourth:"Fourth",fifth:"Fifth",sixth:"Sixth",seventh:"Seventh",eighth:"Eighth",ninth:"Ninth",tenth:"Tenth",eleventh:"Eleventh",twelfth:"Twelfth",thirteenth:"Thirteenth",fourteenth:"Fourteenth",fifteenth:"Fifteenth",sixteenth:"Sixteenth",seventeenth:"Seventeenth",eighteenth:"Eighteenth",nineteenth:"Nineteenth",twentieth:"Twentieth"},fa={save:"ذخیره",addPersonalMarker:"افزودن نشانگر شخصی",editPersonalMarker:"ویرایش نشانگر شخصی",pleaseSelectMarker:"لطفا یک نشانگر انتخاب نمایید.",pleaseEnterMarkerName:"لطفا نام نشانگر را وارد کنید.",maxLengthMarkerName:"اندازه نام نشانگر نباید بیش از 256 حرف باشد.",successAddMarker:"نشانگر با موفقیت اضافه شد.",successEditMarker:"نشانگر با موفقیت ویرایش شد.",errorRegisteringTwoMarker:"نشانگر با موفقیت ویرایش شد.",pleaseLoginFirst:"لطفا ابتدا وارد شوید.",addMarker:"افزودن نشانگر",markerName:"نام نشانگر",description:"توضیحات",pleaseEnterMarkerDescription:"توضیحات مربوط به نشانگر را وارد کنید.",cancel:"انصراف",nextIn:"بعدی در",play:"پخش",visit:"بازدید",clickForMoreVideos:"ویدیوهای بیشتر کلیک کنید",hour:"ساعت",minutes:"دقیقه",seconds:"ثانیه",currentlyNoItemsSaved:"در حال حاضر هیچ آیتمی ذخیره نشده است.",savedList:"لیست ذخیرهشدهها",enterYourOpinion:"دیدگاه خود را وارد کنید",notPossibleRegisterComment:"در حال حاضر امکان ثبت دیدگاه وجود ندارد.",youMustSubmitYourComment:"شما برای ارسال دیدگاه خود باید",notPossibleToRegisterComment:"در حال حاضر امکان ثبت دیدگاه وجود ندارد.",comeIn:"وارد",sharing:"اشتراک گذاری",recordFeedback:"ثبت بازخورد",cinematicFilm:"فیلم سینمایی",serial:"سریال",subtitle:"زیرنویس",translation:"دوبله",persian:"فارسی",english:"انگلیسی",arabic:"عربی",turkish:"ترکی",playlist:"لیست پخش",playlists:"لیستهای پخش",showPlaylist:"نمایش لیستپخش",suggestedVideos:"ویدیوهای پیشنهادی",become:"شوید.",production:"تولید",viewPoint:"دیدگاه",show:"نمایش",saved:"ذخیرهشدهها",home:"خانه",profile:"پروفایل",previousViewingTime:"زمان مشاهده قبلی",continuousPlaybackText:"ویدیو شما از زمان مشاهده قبلی پخش خواهد شد. در صورت تمایل به پخش ویدیو از ابتدا گزینه “تماشای ویدیو از ابتدا” را انتخاب کنید",watchContinuousVideo:"تماشای ادامه ویدیو",watchCBeginningVideo:"تماشای ویدیو از ابتدا",takingPicture:"عکس گرفتن",liveChat:"گفتوگوی زنده",hideLiveChat:"مخفی کردن گفتگوی زنده",showLiveChat:"نمایش گفتگوی زنده",anonymousUser:"کاربر ناشناس",awaitingApprovalByAdmin:"در انتظار تایید توسط ادمین",approvedByAdmin:"تایید شده توسط ادمین",closeMessage:"بستن پیام",viewFullPinnedMessage:"مشاهده کامل پیام پین شده",pinnedMessage:"پیام پین شده",less:"کمتر",more:"بیشتر",copyLink:"کپی لینک",linkWasCopied:"لینک کپی شد",download:"دانلود",withQuality:"با کیفیت",selectDownloadQuality:"انتخاب کیفیت دانلود",badSoundAndImageQuality:"کیفیت بد صدا و تصویر",streamLinkFailure:"خرابی لینک استریم",amountOfInternetUsageWasHigh:"حجم مصرفی اینترنت زیاد بود",programAppearance:"ظاهر برنامه",soundAndImageMismatch:"عدم تطابق صدا و تصویر",noSubtitle:"نداشتن زیرنویس",noSubtitle1:"بدون زیرنویس",accessForMeDifficult:"دسترسی برام سخت بود",videoContentWasNotGood:"محتوای ویدیو خوب نبود",goodSoundAndImageQuality:"کیفیت خوب صدا و تصویر",noDisconnection:"بدون قطع و وصلی",amountOfInternetUsage:"میزان حجم مصرفی اینترنت",privacyProtection:"حفظ حریم شخصی",farsiSubtitles:"زیرنویس فارسی",easyAccess:"دسترسی آسان",appropriateVideoContent:"محتوای مناسب ویدیو",veryBad:"خیلی بد",bad:"بد",middle:"متوسط",good:"خوب",veryGood:"خیلی خوب",successfullyCommentSubmit:"نظر شما با موفقیت ثبت شد.",ratingZarebin:"امتیاز دادن به ذره بین",fullRateInternetTraffic:"ترافیک اینترنت شما تمام بها محاسبه میشود.",exitFrom:"خروج از",fullScreen:"تمام صفحه",lock:"قفل",markersList:"لیست نشانگرها",markers:"نشانگرها",languageSelection:"انتخاب زبان",default:"پیش فرض",retry:"تلاش مجدد",pictureInPicture:"تصویر در تصویر",video:"ویدیو",season:"فصل",section:"قسمت",playNextVideo:"پخش ویدیوی بعدی ",replay:"بازپخش",pause:"توقف",quality:"کیفیت",automatic:"خودکار",basedOnYourInternetSpeed:"بر اساس سرعت اینترنت شما",settings:"تنظیمات",choiceQuality:"انتخاب کیفیت",subtitleSettings:"تنظیمات زیرنویس",jumpTo:"پرش به",mute:"بی صدا",unmute:"با صدا",playBackSpeed:"سرعت پخش",normalSpeed:"سرعت معمولی",subtitleBackgroundColor:"رنگ پس زمینه زیرنویس",subtitleTextColor:"رنگ متن زیرنویس",subtitleSelection:"انتخاب زیرنویس",selectSubtitleBackgroundColor:"انتخاب رنگ پس زمینه زیرنویس",selectSubtitleTextColor:"انتخاب رنگ متن زیرنویس",tagFilter:"فیلتر تگ",tags:"تگ ها",separateItemsWithEnter:"آیتم ها را با Enter از هم جدا کنید",contentType:"نوع محتوا",search:"جستجو",accordingThisTagVideoNotFound:"با توجه به تگ مورد نظر ویدیویی یافت نشد!",autoPlay:"پخش خودکار",bright:"روشن",off:"خاموش",is:"است",photo:"عکس",currentlyNoVideoContent:"در حال حاضر محتوای ویدیویی در این کانال برای این پخشزنده وجود ندارد.",viewOtherVideos:"شما میتوانید سایر پخش زنده های ما را مشاهده کنید یا برنامه پخش زندههای آینده کانال مورد نظر خود را چک کنید",enteredAddressNotCorrect:"آدرس وارد شده صحیح نیست.",first:"اول",second:"دوم",third:"سوم",fourth:"چهارم",fifth:"پنجم",sixth:"ششم",seventh:"هفتم",eighth:"هشتم",ninth:"نهم",tenth:"دهم",eleventh:"یازدهم",twelfth:"دوازدهم",thirteenth:"سیزدهم",fourteenth:"چهاردهم",fifteenth:"پانزدهم",sixteenth:"شانزدهم",seventeenth:"هفدهم",eighteenth:"هجدهم",nineteenth:"نوزدهم",twentieth:"بیستم"},translate=()=>{const{params:i}=store.getState().videoData;return i.lang===Lang.en?en:i.lang===Lang.ar?ar:fa},PACKET_TYPES=Object.create(null);PACKET_TYPES.open="0",PACKET_TYPES.close="1",PACKET_TYPES.ping="2",PACKET_TYPES.pong="3",PACKET_TYPES.message="4",PACKET_TYPES.upgrade="5",PACKET_TYPES.noop="6";const PACKET_TYPES_REVERSE=Object.create(null);Object.keys(PACKET_TYPES).forEach(i=>{PACKET_TYPES_REVERSE[PACKET_TYPES[i]]=i});const ERROR_PACKET={type:"error",data:"parser error"},withNativeBlob$1=typeof Blob=="function"||typeof Blob<"u"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",withNativeArrayBuffer$2=typeof ArrayBuffer=="function",isView$1=i=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(i):i&&i.buffer instanceof ArrayBuffer,encodePacket=({type:i,data:e},t,n)=>withNativeBlob$1&&e instanceof Blob?t?n(e):encodeBlobAsBase64(e,n):withNativeArrayBuffer$2&&(e instanceof ArrayBuffer||isView$1(e))?t?n(e):encodeBlobAsBase64(new Blob([e]),n):n(PACKET_TYPES[i]+(e||"")),encodeBlobAsBase64=(i,e)=>{const t=new FileReader;return t.onload=function(){const n=t.result.split(",")[1];e("b"+(n||""))},t.readAsDataURL(i)};function toArray(i){return i instanceof Uint8Array?i:i instanceof ArrayBuffer?new Uint8Array(i):new Uint8Array(i.buffer,i.byteOffset,i.byteLength)}let TEXT_ENCODER;function encodePacketToBinary(i,e){if(withNativeBlob$1&&i.data instanceof Blob)return i.data.arrayBuffer().then(toArray).then(e);if(withNativeArrayBuffer$2&&(i.data instanceof ArrayBuffer||isView$1(i.data)))return e(toArray(i.data));encodePacket(i,!1,t=>{TEXT_ENCODER||(TEXT_ENCODER=new TextEncoder),e(TEXT_ENCODER.encode(t))})}const chars="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",lookup$1=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(let i=0;i<chars.length;i++)lookup$1[chars.charCodeAt(i)]=i;const decode$1=i=>{let e=i.length*.75,t=i.length,n,s=0,r,a,o,l;i[i.length-1]==="="&&(e--,i[i.length-2]==="="&&e--);const d=new ArrayBuffer(e),f=new Uint8Array(d);for(n=0;n<t;n+=4)r=lookup$1[i.charCodeAt(n)],a=lookup$1[i.charCodeAt(n+1)],o=lookup$1[i.charCodeAt(n+2)],l=lookup$1[i.charCodeAt(n+3)],f[s++]=r<<2|a>>4,f[s++]=(a&15)<<4|o>>2,f[s++]=(o&3)<<6|l&63;return d},withNativeArrayBuffer$1=typeof ArrayBuffer=="function",decodePacket=(i,e)=>{if(typeof i!="string")return{type:"message",data:mapBinary(i,e)};const t=i.charAt(0);return t==="b"?{type:"message",data:decodeBase64Packet(i.substring(1),e)}:PACKET_TYPES_REVERSE[t]?i.length>1?{type:PACKET_TYPES_REVERSE[t],data:i.substring(1)}:{type:PACKET_TYPES_REVERSE[t]}:ERROR_PACKET},decodeBase64Packet=(i,e)=>{if(withNativeArrayBuffer$1){const t=decode$1(i);return mapBinary(t,e)}else return{base64:!0,data:i}},mapBinary=(i,e)=>{switch(e){case"blob":return i instanceof Blob?i:new Blob([i]);case"arraybuffer":default:return i instanceof ArrayBuffer?i:i.buffer}},SEPARATOR="",encodePayload=(i,e)=>{const t=i.length,n=new Array(t);let s=0;i.forEach((r,a)=>{encodePacket(r,!1,o=>{n[a]=o,++s===t&&e(n.join(SEPARATOR))})})},decodePayload=(i,e)=>{const t=i.split(SEPARATOR),n=[];for(let s=0;s<t.length;s++){const r=decodePacket(t[s],e);if(n.push(r),r.type==="error")break}return n};function createPacketEncoderStream(){return new TransformStream({transform(i,e){encodePacketToBinary(i,t=>{const n=t.length;let s;if(n<126)s=new Uint8Array(1),new DataView(s.buffer).setUint8(0,n);else if(n<65536){s=new Uint8Array(3);const r=new DataView(s.buffer);r.setUint8(0,126),r.setUint16(1,n)}else{s=new Uint8Array(9);const r=new DataView(s.buffer);r.setUint8(0,127),r.setBigUint64(1,BigInt(n))}i.data&&typeof i.data!="string"&&(s[0]|=128),e.enqueue(s),e.enqueue(t)})}})}let TEXT_DECODER;function totalLength(i){return i.reduce((e,t)=>e+t.length,0)}function concatChunks(i,e){if(i[0].length===e)return i.shift();const t=new Uint8Array(e);let n=0;for(let s=0;s<e;s++)t[s]=i[0][n++],n===i[0].length&&(i.shift(),n=0);return i.length&&n<i[0].length&&(i[0]=i[0].slice(n)),t}function createPacketDecoderStream(i,e){TEXT_DECODER||(TEXT_DECODER=new TextDecoder);const t=[];let n=0,s=-1,r=!1;return new TransformStream({transform(a,o){for(t.push(a);;){if(n===0){if(totalLength(t)<1)break;const l=concatChunks(t,1);r=(l[0]&128)===128,s=l[0]&127,s<126?n=3:s===126?n=1:n=2}else if(n===1){if(totalLength(t)<2)break;const l=concatChunks(t,2);s=new DataView(l.buffer,l.byteOffset,l.length).getUint16(0),n=3}else if(n===2){if(totalLength(t)<8)break;const l=concatChunks(t,8),d=new DataView(l.buffer,l.byteOffset,l.length),f=d.getUint32(0);if(f>Math.pow(2,21)-1){o.enqueue(ERROR_PACKET);break}s=f*Math.pow(2,32)+d.getUint32(4),n=3}else{if(totalLength(t)<s)break;const l=concatChunks(t,s);o.enqueue(decodePacket(r?l:TEXT_DECODER.decode(l),e)),n=0}if(s===0||s>i){o.enqueue(ERROR_PACKET);break}}}})}const protocol$1=4;function Emitter(i){if(i)return mixin(i)}function mixin(i){for(var e in Emitter.prototype)i[e]=Emitter.prototype[e];return i}Emitter.prototype.on=Emitter.prototype.addEventListener=function(i,e){return this._callbacks=this._callbacks||{},(this._callbacks["$"+i]=this._callbacks["$"+i]||[]).push(e),this},Emitter.prototype.once=function(i,e){function t(){this.off(i,t),e.apply(this,arguments)}return t.fn=e,this.on(i,t),this},Emitter.prototype.off=Emitter.prototype.removeListener=Emitter.prototype.removeAllListeners=Emitter.prototype.removeEventListener=function(i,e){if(this._callbacks=this._callbacks||{},arguments.length==0)return this._callbacks={},this;var t=this._callbacks["$"+i];if(!t)return this;if(arguments.length==1)return delete this._callbacks["$"+i],this;for(var n,s=0;s<t.length;s++)if(n=t[s],n===e||n.fn===e){t.splice(s,1);break}return t.length===0&&delete this._callbacks["$"+i],this},Emitter.prototype.emit=function(i){this._callbacks=this._callbacks||{};for(var e=new Array(arguments.length-1),t=this._callbacks["$"+i],n=1;n<arguments.length;n++)e[n-1]=arguments[n];if(t){t=t.slice(0);for(var n=0,s=t.length;n<s;++n)t[n].apply(this,e)}return this},Emitter.prototype.emitReserved=Emitter.prototype.emit,Emitter.prototype.listeners=function(i){return this._callbacks=this._callbacks||{},this._callbacks["$"+i]||[]},Emitter.prototype.hasListeners=function(i){return!!this.listeners(i).length};const nextTick=typeof Promise=="function"&&typeof Promise.resolve=="function"?e=>Promise.resolve().then(e):(e,t)=>t(e,0),globalThisShim=typeof self<"u"?self:typeof window<"u"?window:Function("return this")(),defaultBinaryType="arraybuffer";function createCookieJar(){}function pick(i,...e){return e.reduce((t,n)=>(i.hasOwnProperty(n)&&(t[n]=i[n]),t),{})}const NATIVE_SET_TIMEOUT=globalThisShim.setTimeout,NATIVE_CLEAR_TIMEOUT=globalThisShim.clearTimeout;function installTimerFunctions(i,e){e.useNativeTimers?(i.setTimeoutFn=NATIVE_SET_TIMEOUT.bind(globalThisShim),i.clearTimeoutFn=NATIVE_CLEAR_TIMEOUT.bind(globalThisShim)):(i.setTimeoutFn=globalThisShim.setTimeout.bind(globalThisShim),i.clearTimeoutFn=globalThisShim.clearTimeout.bind(globalThisShim))}const BASE64_OVERHEAD=1.33;function byteLength(i){return typeof i=="string"?utf8Length(i):Math.ceil((i.byteLength||i.size)*BASE64_OVERHEAD)}function utf8Length(i){let e=0,t=0;for(let n=0,s=i.length;n<s;n++)e=i.charCodeAt(n),e<128?t+=1:e<2048?t+=2:e<55296||e>=57344?t+=3:(n++,t+=4);return t}function randomString(){return Date.now().toString(36).substring(3)+Math.random().toString(36).substring(2,5)}function encode(i){let e="";for(let t in i)i.hasOwnProperty(t)&&(e.length&&(e+="&"),e+=encodeURIComponent(t)+"="+encodeURIComponent(i[t]));return e}function decode(i){let e={},t=i.split("&");for(let n=0,s=t.length;n<s;n++){let r=t[n].split("=");e[decodeURIComponent(r[0])]=decodeURIComponent(r[1])}return e}class TransportError extends Error{constructor(e,t,n){super(e),this.description=t,this.context=n,this.type="TransportError"}}class Transport extends Emitter{constructor(e){super(),this.writable=!1,installTimerFunctions(this,e),this.opts=e,this.query=e.query,this.socket=e.socket,this.supportsBinary=!e.forceBase64}onError(e,t,n){return super.emitReserved("error",new TransportError(e,t,n)),this}open(){return this.readyState="opening",this.doOpen(),this}close(){return(this.readyState==="opening"||this.readyState==="open")&&(this.doClose(),this.onClose()),this}send(e){this.readyState==="open"&&this.write(e)}onOpen(){this.readyState="open",this.writable=!0,super.emitReserved("open")}onData(e){const t=decodePacket(e,this.socket.binaryType);this.onPacket(t)}onPacket(e){super.emitReserved("packet",e)}onClose(e){this.readyState="closed",super.emitReserved("close",e)}pause(e){}createUri(e,t={}){return e+"://"+this._hostname()+this._port()+this.opts.path+this._query(t)}_hostname(){const e=this.opts.hostname;return e.indexOf(":")===-1?e:"["+e+"]"}_port(){return this.opts.port&&(this.opts.secure&&+(this.opts.port!==443)||!this.opts.secure&&Number(this.opts.port)!==80)?":"+this.opts.port:""}_query(e){const t=encode(e);return t.length?"?"+t:""}}class Polling extends Transport{constructor(){super(...arguments),this._polling=!1}get name(){return"polling"}doOpen(){this._poll()}pause(e){this.readyState="pausing";const t=()=>{this.readyState="paused",e()};if(this._polling||!this.writable){let n=0;this._polling&&(n++,this.once("pollComplete",function(){--n||t()})),this.writable||(n++,this.once("drain",function(){--n||t()}))}else t()}_poll(){this._polling=!0,this.doPoll(),this.emitReserved("poll")}onData(e){const t=n=>{if(this.readyState==="opening"&&n.type==="open"&&this.onOpen(),n.type==="close")return this.onClose({description:"transport closed by the server"}),!1;this.onPacket(n)};decodePayload(e,this.socket.binaryType).forEach(t),this.readyState!=="closed"&&(this._polling=!1,this.emitReserved("pollComplete"),this.readyState==="open"&&this._poll())}doClose(){const e=()=>{this.write([{type:"close"}])};this.readyState==="open"?e():this.once("open",e)}write(e){this.writable=!1,encodePayload(e,t=>{this.doWrite(t,()=>{this.writable=!0,this.emitReserved("drain")})})}uri(){const e=this.opts.secure?"https":"http",t=this.query||{};return this.opts.timestampRequests!==!1&&(t[this.opts.timestampParam]=randomString()),!this.supportsBinary&&!t.sid&&(t.b64=1),this.createUri(e,t)}}let value=!1;try{value=typeof XMLHttpRequest<"u"&&"withCredentials"in new XMLHttpRequest}catch(i){}const hasCORS=value;function empty(){}class BaseXHR extends Polling{constructor(e){if(super(e),typeof location<"u"){const t=location.protocol==="https:";let n=location.port;n||(n=t?"443":"80"),this.xd=typeof location<"u"&&e.hostname!==location.hostname||n!==e.port}}doWrite(e,t){const n=this.request({method:"POST",data:e});n.on("success",t),n.on("error",(s,r)=>{this.onError("xhr post error",s,r)})}doPoll(){const e=this.request();e.on("data",this.onData.bind(this)),e.on("error",(t,n)=>{this.onError("xhr poll error",t,n)}),this.pollXhr=e}}let Request$1=class Ft extends Emitter{constructor(e,t,n){super(),this.createRequest=e,installTimerFunctions(this,n),this._opts=n,this._method=n.method||"GET",this._uri=t,this._data=n.data!==void 0?n.data:null,this._create()}_create(){var e;const t=pick(this._opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");t.xdomain=!!this._opts.xd;const n=this._xhr=this.createRequest(t);try{n.open(this._method,this._uri,!0);try{if(this._opts.extraHeaders){n.setDisableHeaderCheck&&n.setDisableHeaderCheck(!0);for(let s in this._opts.extraHeaders)this._opts.extraHeaders.hasOwnProperty(s)&&n.setRequestHeader(s,this._opts.extraHeaders[s])}}catch{}if(this._method==="POST")try{n.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch{}try{n.setRequestHeader("Accept","*/*")}catch{}(e=this._opts.cookieJar)===null||e===void 0||e.addCookies(n),"withCredentials"in n&&(n.withCredentials=this._opts.withCredentials),this._opts.requestTimeout&&(n.timeout=this._opts.requestTimeout),n.onreadystatechange=()=>{var s;n.readyState===3&&((s=this._opts.cookieJar)===null||s===void 0||s.parseCookies(n.getResponseHeader("set-cookie"))),n.readyState===4&&(n.status===200||n.status===1223?this._onLoad():this.setTimeoutFn(()=>{this._onError(typeof n.status=="number"?n.status:0)},0))},n.send(this._data)}catch(s){this.setTimeoutFn(()=>{this._onError(s)},0);return}typeof document<"u"&&(this._index=Ft.requestsCount++,Ft.requests[this._index]=this)}_onError(e){this.emitReserved("error",e,this._xhr),this._cleanup(!0)}_cleanup(e){if(!(typeof this._xhr>"u"||this._xhr===null)){if(this._xhr.onreadystatechange=empty,e)try{this._xhr.abort()}catch{}typeof document<"u"&&delete Ft.requests[this._index],this._xhr=null}}_onLoad(){const e=this._xhr.responseText;e!==null&&(this.emitReserved("data",e),this.emitReserved("success"),this._cleanup())}abort(){this._cleanup()}};if(Request$1.requestsCount=0,Request$1.requests={},typeof document<"u"){if(typeof attachEvent=="function")attachEvent("onunload",unloadHandler);else if(typeof addEventListener=="function"){const i="onpagehide"in globalThisShim?"pagehide":"unload";addEventListener(i,unloadHandler,!1)}}function unloadHandler(){for(let i in Request$1.requests)Request$1.requests.hasOwnProperty(i)&&Request$1.requests[i].abort()}const hasXHR2=function(){const i=newRequest({xdomain:!1});return i&&i.responseType!==null}();class XHR extends BaseXHR{constructor(e){super(e);const t=e&&e.forceBase64;this.supportsBinary=hasXHR2&&!t}request(e={}){return Object.assign(e,{xd:this.xd},this.opts),new Request$1(newRequest,this.uri(),e)}}function newRequest(i){const e=i.xdomain;try{if(typeof XMLHttpRequest<"u"&&(!e||hasCORS))return new XMLHttpRequest}catch{}if(!e)try{return new globalThisShim[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch{}}const isReactNative=typeof navigator<"u"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";class BaseWS extends Transport{get name(){return"websocket"}doOpen(){const e=this.uri(),t=this.opts.protocols,n=isReactNative?{}:pick(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(n.headers=this.opts.extraHeaders);try{this.ws=this.createSocket(e,t,n)}catch(s){return this.emitReserved("error",s)}this.ws.binaryType=this.socket.binaryType,this.addEventListeners()}addEventListeners(){this.ws.onopen=()=>{this.opts.autoUnref&&this.ws._socket.unref(),this.onOpen()},this.ws.onclose=e=>this.onClose({description:"websocket connection closed",context:e}),this.ws.onmessage=e=>this.onData(e.data),this.ws.onerror=e=>this.onError("websocket error",e)}write(e){this.writable=!1;for(let t=0;t<e.length;t++){const n=e[t],s=t===e.length-1;encodePacket(n,this.supportsBinary,r=>{try{this.doWrite(n,r)}catch{}s&&nextTick(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){typeof this.ws<"u"&&(this.ws.onerror=()=>{},this.ws.close(),this.ws=null)}uri(){const e=this.opts.secure?"wss":"ws",t=this.query||{};return this.opts.timestampRequests&&(t[this.opts.timestampParam]=randomString()),this.supportsBinary||(t.b64=1),this.createUri(e,t)}}const WebSocketCtor=globalThisShim.WebSocket||globalThisShim.MozWebSocket;class WS extends BaseWS{createSocket(e,t,n){return isReactNative?new WebSocketCtor(e,t,n):t?new WebSocketCtor(e,t):new WebSocketCtor(e)}doWrite(e,t){this.ws.send(t)}}class WT extends Transport{get name(){return"webtransport"}doOpen(){try{this._transport=new WebTransport(this.createUri("https"),this.opts.transportOptions[this.name])}catch(e){return this.emitReserved("error",e)}this._transport.closed.then(()=>{this.onClose()}).catch(e=>{this.onError("webtransport error",e)}),this._transport.ready.then(()=>{this._transport.createBidirectionalStream().then(e=>{const t=createPacketDecoderStream(Number.MAX_SAFE_INTEGER,this.socket.binaryType),n=e.readable.pipeThrough(t).getReader(),s=createPacketEncoderStream();s.readable.pipeTo(e.writable),this._writer=s.writable.getWriter();const r=()=>{n.read().then(({done:o,value:l})=>{o||(this.onPacket(l),r())}).catch(o=>{})};r();const a={type:"open"};this.query.sid&&(a.data=`{"sid":"${this.query.sid}"}`),this._writer.write(a).then(()=>this.onOpen())})})}write(e){this.writable=!1;for(let t=0;t<e.length;t++){const n=e[t],s=t===e.length-1;this._writer.write(n).then(()=>{s&&nextTick(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var e;(e=this._transport)===null||e===void 0||e.close()}}const transports={websocket:WS,webtransport:WT,polling:XHR},re=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,parts=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function parse$1(i){if(i.length>8e3)throw"URI too long";const e=i,t=i.indexOf("["),n=i.indexOf("]");t!=-1&&n!=-1&&(i=i.substring(0,t)+i.substring(t,n).replace(/:/g,";")+i.substring(n,i.length));let s=re.exec(i||""),r={},a=14;for(;a--;)r[parts[a]]=s[a]||"";return t!=-1&&n!=-1&&(r.source=e,r.host=r.host.substring(1,r.host.length-1).replace(/;/g,":"),r.authority=r.authority.replace("[","").replace("]","").replace(/;/g,":"),r.ipv6uri=!0),r.pathNames=pathNames(r,r.path),r.queryKey=queryKey(r,r.query),r}function pathNames(i,e){const t=/\/{2,9}/g,n=e.replace(t,"/").split("/");return(e.slice(0,1)=="/"||e.length===0)&&n.splice(0,1),e.slice(-1)=="/"&&n.splice(n.length-1,1),n}function queryKey(i,e){const t={};return e.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(n,s,r){s&&(t[s]=r)}),t}const withEventListeners=typeof addEventListener=="function"&&typeof removeEventListener=="function",OFFLINE_EVENT_LISTENERS=[];withEventListeners&&addEventListener("offline",()=>{OFFLINE_EVENT_LISTENERS.forEach(i=>i())},!1);class SocketWithoutUpgrade extends Emitter{constructor(e,t){if(super(),this.binaryType=defaultBinaryType,this.writeBuffer=[],this._prevBufferLen=0,this._pingInterval=-1,this._pingTimeout=-1,this._maxPayload=-1,this._pingTimeoutTime=1/0,e&&typeof e=="object"&&(t=e,e=null),e){const n=parse$1(e);t.hostname=n.host,t.secure=n.protocol==="https"||n.protocol==="wss",t.port=n.port,n.query&&(t.query=n.query)}else t.host&&(t.hostname=parse$1(t.host).host);installTimerFunctions(this,t),this.secure=t.secure!=null?t.secure:typeof location<"u"&&location.protocol==="https:",t.hostname&&!t.port&&(t.port=this.secure?"443":"80"),this.hostname=t.hostname||(typeof location<"u"?location.hostname:"localhost"),this.port=t.port||(typeof location<"u"&&location.port?location.port:this.secure?"443":"80"),this.transports=[],this._transportsByName={},t.transports.forEach(n=>{const s=n.prototype.name;this.transports.push(s),this._transportsByName[s]=n}),this.opts=Object.assign({path:"/engine.io",agent:!1,withCredentials:!1,upgrade:!0,timestampParam:"t",rememberUpgrade:!1,addTrailingSlash:!0,rejectUnauthorized:!0,perMessageDeflate:{threshold:1024},transportOptions:{},closeOnBeforeunload:!1},t),this.opts.path=this.opts.path.replace(/\/$/,"")+(this.opts.addTrailingSlash?"/":""),typeof this.opts.query=="string"&&(this.opts.query=decode(this.opts.query)),withEventListeners&&(this.opts.closeOnBeforeunload&&(this._beforeunloadEventListener=()=>{this.transport&&(this.transport.removeAllListeners(),this.transport.close())},addEventListener("beforeunload",this._beforeunloadEventListener,!1)),this.hostname!=="localhost"&&(this._offlineEventListener=()=>{this._onClose("transport close",{description:"network connection lost"})},OFFLINE_EVENT_LISTENERS.push(this._offlineEventListener))),this.opts.withCredentials&&(this._cookieJar=void 0),this._open()}createTransport(e){const t=Object.assign({},this.opts.query);t.EIO=protocol$1,t.transport=e,this.id&&(t.sid=this.id);const n=Object.assign({},this.opts,{query:t,socket:this,hostname:this.hostname,secure:this.secure,port:this.port},this.opts.transportOptions[e]);return new this._transportsByName[e](n)}_open(){if(this.transports.length===0){this.setTimeoutFn(()=>{this.emitReserved("error","No transports available")},0);return}const e=this.opts.rememberUpgrade&&SocketWithoutUpgrade.priorWebsocketSuccess&&this.transports.indexOf("websocket")!==-1?"websocket":this.transports[0];this.readyState="opening";const t=this.createTransport(e);t.open(),this.setTransport(t)}setTransport(e){this.transport&&this.transport.removeAllListeners(),this.transport=e,e.on("drain",this._onDrain.bind(this)).on("packet",this._onPacket.bind(this)).on("error",this._onError.bind(this)).on("close",t=>this._onClose("transport close",t))}onOpen(){this.readyState="open",SocketWithoutUpgrade.priorWebsocketSuccess=this.transport.name==="websocket",this.emitReserved("open"),this.flush()}_onPacket(e){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing")switch(this.emitReserved("packet",e),this.emitReserved("heartbeat"),e.type){case"open":this.onHandshake(JSON.parse(e.data));break;case"ping":this._sendPacket("pong"),this.emitReserved("ping"),this.emitReserved("pong"),this._resetPingTimeout();break;case"error":const t=new Error("server error");t.code=e.data,this._onError(t);break;case"message":this.emitReserved("data",e.data),this.emitReserved("message",e.data);break}}onHandshake(e){this.emitReserved("handshake",e),this.id=e.sid,this.transport.query.sid=e.sid,this._pingInterval=e.pingInterval,this._pingTimeout=e.pingTimeout,this._maxPayload=e.maxPayload,this.onOpen(),this.readyState!=="closed"&&this._resetPingTimeout()}_resetPingTimeout(){this.clearTimeoutFn(this._pingTimeoutTimer);const e=this._pingInterval+this._pingTimeout;this._pingTimeoutTime=Date.now()+e,this._pingTimeoutTimer=this.setTimeoutFn(()=>{this._onClose("ping timeout")},e),this.opts.autoUnref&&this._pingTimeoutTimer.unref()}_onDrain(){this.writeBuffer.splice(0,this._prevBufferLen),this._prevBufferLen=0,this.writeBuffer.length===0?this.emitReserved("drain"):this.flush()}flush(){if(this.readyState!=="closed"&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length){const e=this._getWritablePackets();this.transport.send(e),this._prevBufferLen=e.length,this.emitReserved("flush")}}_getWritablePackets(){if(!(this._maxPayload&&this.transport.name==="polling"&&this.writeBuffer.length>1))return this.writeBuffer;let t=1;for(let n=0;n<this.writeBuffer.length;n++){const s=this.writeBuffer[n].data;if(s&&(t+=byteLength(s)),n>0&&t>this._maxPayload)return this.writeBuffer.slice(0,n);t+=2}return this.writeBuffer}_hasPingExpired(){if(!this._pingTimeoutTime)return!0;const e=Date.now()>this._pingTimeoutTime;return e&&(this._pingTimeoutTime=0,nextTick(()=>{this._onClose("ping timeout")},this.setTimeoutFn)),e}write(e,t,n){return this._sendPacket("message",e,t,n),this}send(e,t,n){return this._sendPacket("message",e,t,n),this}_sendPacket(e,t,n,s){if(typeof t=="function"&&(s=t,t=void 0),typeof n=="function"&&(s=n,n=null),this.readyState==="closing"||this.readyState==="closed")return;n=n||{},n.compress=n.compress!==!1;const r={type:e,data:t,options:n};this.emitReserved("packetCreate",r),this.writeBuffer.push(r),s&&this.once("flush",s),this.flush()}close(){const e=()=>{this._onClose("forced close"),this.transport.close()},t=()=>{this.off("upgrade",t),this.off("upgradeError",t),e()},n=()=>{this.once("upgrade",t),this.once("upgradeError",t)};return(this.readyState==="opening"||this.readyState==="open")&&(this.readyState="closing",this.writeBuffer.length?this.once("drain",()=>{this.upgrading?n():e()}):this.upgrading?n():e()),this}_onError(e){if(SocketWithoutUpgrade.priorWebsocketSuccess=!1,this.opts.tryAllTransports&&this.transports.length>1&&this.readyState==="opening")return this.transports.shift(),this._open();this.emitReserved("error",e),this._onClose("transport error",e)}_onClose(e,t){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing"){if(this.clearTimeoutFn(this._pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),withEventListeners&&(this._beforeunloadEventListener&&removeEventListener("beforeunload",this._beforeunloadEventListener,!1),this._offlineEventListener)){const n=OFFLINE_EVENT_LISTENERS.indexOf(this._offlineEventListener);n!==-1&&OFFLINE_EVENT_LISTENERS.splice(n,1)}this.readyState="closed",this.id=null,this.emitReserved("close",e,t),this.writeBuffer=[],this._prevBufferLen=0}}}SocketWithoutUpgrade.protocol=protocol$1;class SocketWithUpgrade extends SocketWithoutUpgrade{constructor(){super(...arguments),this._upgrades=[]}onOpen(){if(super.onOpen(),this.readyState==="open"&&this.opts.upgrade)for(let e=0;e<this._upgrades.length;e++)this._probe(this._upgrades[e])}_probe(e){let t=this.createTransport(e),n=!1;SocketWithoutUpgrade.priorWebsocketSuccess=!1;const s=()=>{n||(t.send([{type:"ping",data:"probe"}]),t.once("packet",u=>{if(!n)if(u.type==="pong"&&u.data==="probe"){if(this.upgrading=!0,this.emitReserved("upgrading",t),!t)return;SocketWithoutUpgrade.priorWebsocketSuccess=t.name==="websocket",this.transport.pause(()=>{n||this.readyState!=="closed"&&(f(),this.setTransport(t),t.send([{type:"upgrade"}]),this.emitReserved("upgrade",t),t=null,this.upgrading=!1,this.flush())})}else{const p=new Error("probe error");p.transport=t.name,this.emitReserved("upgradeError",p)}}))};function r(){n||(n=!0,f(),t.close(),t=null)}const a=u=>{const p=new Error("probe error: "+u);p.transport=t.name,r(),this.emitReserved("upgradeError",p)};function o(){a("transport closed")}function l(){a("socket closed")}function d(u){t&&u.name!==t.name&&r()}const f=()=>{t.removeListener("open",s),t.removeListener("error",a),t.removeListener("close",o),this.off("close",l),this.off("upgrading",d)};t.once("open",s),t.once("error",a),t.once("close",o),this.once("close",l),this.once("upgrading",d),this._upgrades.indexOf("webtransport")!==-1&&e!=="webtransport"?this.setTimeoutFn(()=>{n||t.open()},200):t.open()}onHandshake(e){this._upgrades=this._filterUpgrades(e.upgrades),super.onHandshake(e)}_filterUpgrades(e){const t=[];for(let n=0;n<e.length;n++)~this.transports.indexOf(e[n])&&t.push(e[n]);return t}}let Socket$1=class extends SocketWithUpgrade{constructor(e,t={}){const n=typeof e=="object"?e:t;(!n.transports||n.transports&&typeof n.transports[0]=="string")&&(n.transports=(n.transports||["polling","websocket","webtransport"]).map(s=>transports[s]).filter(s=>!!s)),super(e,n)}};function url(i,e="",t){let n=i;t=t||typeof location<"u"&&location,i==null&&(i=t.protocol+"//"+t.host),typeof i=="string"&&(i.charAt(0)==="/"&&(i.charAt(1)==="/"?i=t.protocol+i:i=t.host+i),/^(https?|wss?):\/\//.test(i)||(typeof t<"u"?i=t.protocol+"//"+i:i="https://"+i),n=parse$1(i)),n.port||(/^(http|ws)$/.test(n.protocol)?n.port="80":/^(http|ws)s$/.test(n.protocol)&&(n.port="443")),n.path=n.path||"/";const r=n.host.indexOf(":")!==-1?"["+n.host+"]":n.host;return n.id=n.protocol+"://"+r+":"+n.port+e,n.href=n.protocol+"://"+r+(t&&t.port===n.port?"":":"+n.port),n}const withNativeArrayBuffer=typeof ArrayBuffer=="function",isView=i=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(i):i.buffer instanceof ArrayBuffer,toString$1=Object.prototype.toString,withNativeBlob=typeof Blob=="function"||typeof Blob<"u"&&toString$1.call(Blob)==="[object BlobConstructor]",withNativeFile=typeof File=="function"||typeof File<"u"&&toString$1.call(File)==="[object FileConstructor]";function isBinary(i){return withNativeArrayBuffer&&(i instanceof ArrayBuffer||isView(i))||withNativeBlob&&i instanceof Blob||withNativeFile&&i instanceof File}function hasBinary(i,e){if(!i||typeof i!="object")return!1;if(Array.isArray(i)){for(let t=0,n=i.length;t<n;t++)if(hasBinary(i[t]))return!0;return!1}if(isBinary(i))return!0;if(i.toJSON&&typeof i.toJSON=="function"&&arguments.length===1)return hasBinary(i.toJSON(),!0);for(const t in i)if(Object.prototype.hasOwnProperty.call(i,t)&&hasBinary(i[t]))return!0;return!1}function deconstructPacket(i){const e=[],t=i.data,n=i;return n.data=_deconstructPacket(t,e),n.attachments=e.length,{packet:n,buffers:e}}function _deconstructPacket(i,e){if(!i)return i;if(isBinary(i)){const t={_placeholder:!0,num:e.length};return e.push(i),t}else if(Array.isArray(i)){const t=new Array(i.length);for(let n=0;n<i.length;n++)t[n]=_deconstructPacket(i[n],e);return t}else if(typeof i=="object"&&!(i instanceof Date)){const t={};for(const n in i)Object.prototype.hasOwnProperty.call(i,n)&&(t[n]=_deconstructPacket(i[n],e));return t}return i}function reconstructPacket(i,e){return i.data=_reconstructPacket(i.data,e),delete i.attachments,i}function _reconstructPacket(i,e){if(!i)return i;if(i&&i._placeholder===!0){if(typeof i.num=="number"&&i.num>=0&&i.num<e.length)return e[i.num];throw new Error("illegal attachments")}else if(Array.isArray(i))for(let t=0;t<i.length;t++)i[t]=_reconstructPacket(i[t],e);else if(typeof i=="object")for(const t in i)Object.prototype.hasOwnProperty.call(i,t)&&(i[t]=_reconstructPacket(i[t],e));return i}const RESERVED_EVENTS$1=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"],protocol=5;var PacketType;(function(i){i[i.CONNECT=0]="CONNECT",i[i.DISCONNECT=1]="DISCONNECT",i[i.EVENT=2]="EVENT",i[i.ACK=3]="ACK",i[i.CONNECT_ERROR=4]="CONNECT_ERROR",i[i.BINARY_EVENT=5]="BINARY_EVENT",i[i.BINARY_ACK=6]="BINARY_ACK"})(PacketType||(PacketType={}));class Encoder{constructor(e){this.replacer=e}encode(e){return(e.type===PacketType.EVENT||e.type===PacketType.ACK)&&hasBinary(e)?this.encodeAsBinary({type:e.type===PacketType.EVENT?PacketType.BINARY_EVENT:PacketType.BINARY_ACK,nsp:e.nsp,data:e.data,id:e.id}):[this.encodeAsString(e)]}encodeAsString(e){let t=""+e.type;return(e.type===PacketType.BINARY_EVENT||e.type===PacketType.BINARY_ACK)&&(t+=e.attachments+"-"),e.nsp&&e.nsp!=="/"&&(t+=e.nsp+","),e.id!=null&&(t+=e.id),e.data!=null&&(t+=JSON.stringify(e.data,this.replacer)),t}encodeAsBinary(e){const t=deconstructPacket(e),n=this.encodeAsString(t.packet),s=t.buffers;return s.unshift(n),s}}function isObject$1(i){return Object.prototype.toString.call(i)==="[object Object]"}class Decoder extends Emitter{constructor(e){super(),this.reviver=e}add(e){let t;if(typeof e=="string"){if(this.reconstructor)throw new Error("got plaintext data when reconstructing a packet");t=this.decodeString(e);const n=t.type===PacketType.BINARY_EVENT;n||t.type===PacketType.BINARY_ACK?(t.type=n?PacketType.EVENT:PacketType.ACK,this.reconstructor=new BinaryReconstructor(t),t.attachments===0&&super.emitReserved("decoded",t)):super.emitReserved("decoded",t)}else if(isBinary(e)||e.base64)if(this.reconstructor)t=this.reconstructor.takeBinaryData(e),t&&(this.reconstructor=null,super.emitReserved("decoded",t));else throw new Error("got binary data when not reconstructing a packet");else throw new Error("Unknown type: "+e)}decodeString(e){let t=0;const n={type:Number(e.charAt(0))};if(PacketType[n.type]===void 0)throw new Error("unknown packet type "+n.type);if(n.type===PacketType.BINARY_EVENT||n.type===PacketType.BINARY_ACK){const r=t+1;for(;e.charAt(++t)!=="-"&&t!=e.length;);const a=e.substring(r,t);if(a!=Number(a)||e.charAt(t)!=="-")throw new Error("Illegal attachments");n.attachments=Number(a)}if(e.charAt(t+1)==="/"){const r=t+1;for(;++t&&!(e.charAt(t)===","||t===e.length););n.nsp=e.substring(r,t)}else n.nsp="/";const s=e.charAt(t+1);if(s!==""&&Number(s)==s){const r=t+1;for(;++t;){const a=e.charAt(t);if(a==null||Number(a)!=a){--t;break}if(t===e.length)break}n.id=Number(e.substring(r,t+1))}if(e.charAt(++t)){const r=this.tryParse(e.substr(t));if(Decoder.isPayloadValid(n.type,r))n.data=r;else throw new Error("invalid payload")}return n}tryParse(e){try{return JSON.parse(e,this.reviver)}catch{return!1}}static isPayloadValid(e,t){switch(e){case PacketType.CONNECT:return isObject$1(t);case PacketType.DISCONNECT:return t===void 0;case PacketType.CONNECT_ERROR:return typeof t=="string"||isObject$1(t);case PacketType.EVENT:case PacketType.BINARY_EVENT:return Array.isArray(t)&&(typeof t[0]=="number"||typeof t[0]=="string"&&RESERVED_EVENTS$1.indexOf(t[0])===-1);case PacketType.ACK:case PacketType.BINARY_ACK:return Array.isArray(t)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}}class BinaryReconstructor{constructor(e){this.packet=e,this.buffers=[],this.reconPack=e}takeBinaryData(e){if(this.buffers.push(e),this.buffers.length===this.reconPack.attachments){const t=reconstructPacket(this.reconPack,this.buffers);return this.finishedReconstruction(),t}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}const parser=Object.freeze(Object.defineProperty({__proto__:null,Decoder,Encoder,get PacketType(){return PacketType},protocol},Symbol.toStringTag,{value:"Module"}));function on(i,e,t){return i.on(e,t),function(){i.off(e,t)}}const RESERVED_EVENTS=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class Socket extends Emitter{constructor(e,t,n){super(),this.connected=!1,this.recovered=!1,this.receiveBuffer=[],this.sendBuffer=[],this._queue=[],this._queueSeq=0,this.ids=0,this.acks={},this.flags={},this.io=e,this.nsp=t,n&&n.auth&&(this.auth=n.auth),this._opts=Object.assign({},n),this.io._autoConnect&&this.open()}get disconnected(){return!this.connected}subEvents(){if(this.subs)return;const e=this.io;this.subs=[on(e,"open",this.onopen.bind(this)),on(e,"packet",this.onpacket.bind(this)),on(e,"error",this.onerror.bind(this)),on(e,"close",this.onclose.bind(this))]}get active(){return!!this.subs}connect(){return this.connected?this:(this.subEvents(),this.io._reconnecting||this.io.open(),this.io._readyState==="open"&&this.onopen(),this)}open(){return this.connect()}send(...e){return e.unshift("message"),this.emit.apply(this,e),this}emit(e,...t){var n,s,r;if(RESERVED_EVENTS.hasOwnProperty(e))throw new Error('"'+e.toString()+'" is a reserved event name');if(t.unshift(e),this._opts.retries&&!this.flags.fromQueue&&!this.flags.volatile)return this._addToQueue(t),this;const a={type:PacketType.EVENT,data:t};if(a.options={},a.options.compress=this.flags.compress!==!1,typeof t[t.length-1]=="function"){const f=this.ids++,u=t.pop();this._registerAckCallback(f,u),a.id=f}const o=(s=(n=this.io.engine)===null||n===void 0?void 0:n.transport)===null||s===void 0?void 0:s.writable,l=this.connected&&!(!((r=this.io.engine)===null||r===void 0)&&r._hasPingExpired());return this.flags.volatile&&!o||(l?(this.notifyOutgoingListeners(a),this.packet(a)):this.sendBuffer.push(a)),this.flags={},this}_registerAckCallback(e,t){var n;const s=(n=this.flags.timeout)!==null&&n!==void 0?n:this._opts.ackTimeout;if(s===void 0){this.acks[e]=t;return}const r=this.io.setTimeoutFn(()=>{delete this.acks[e];for(let o=0;o<this.sendBuffer.length;o++)this.sendBuffer[o].id===e&&this.sendBuffer.splice(o,1);t.call(this,new Error("operation has timed out"))},s),a=(...o)=>{this.io.clearTimeoutFn(r),t.apply(this,o)};a.withError=!0,this.acks[e]=a}emitWithAck(e,...t){return new Promise((n,s)=>{const r=(a,o)=>a?s(a):n(o);r.withError=!0,t.push(r),this.emit(e,...t)})}_addToQueue(e){let t;typeof e[e.length-1]=="function"&&(t=e.pop());const n={id:this._queueSeq++,tryCount:0,pending:!1,args:e,flags:Object.assign({fromQueue:!0},this.flags)};e.push((s,...r)=>n!==this._queue[0]?void 0:(s!==null?n.tryCount>this._opts.retries&&(this._queue.shift(),t&&t(s)):(this._queue.shift(),t&&t(null,...r)),n.pending=!1,this._drainQueue())),this._queue.push(n),this._drainQueue()}_drainQueue(e=!1){if(!this.connected||this._queue.length===0)return;const t=this._queue[0];t.pending&&!e||(t.pending=!0,t.tryCount++,this.flags=t.flags,this.emit.apply(this,t.args))}packet(e){e.nsp=this.nsp,this.io._packet(e)}onopen(){typeof this.auth=="function"?this.auth(e=>{this._sendConnectPacket(e)}):this._sendConnectPacket(this.auth)}_sendConnectPacket(e){this.packet({type:PacketType.CONNECT,data:this._pid?Object.assign({pid:this._pid,offset:this._lastOffset},e):e})}onerror(e){this.connected||this.emitReserved("connect_error",e)}onclose(e,t){this.connected=!1,delete this.id,this.emitReserved("disconnect",e,t),this._clearAcks()}_clearAcks(){Object.keys(this.acks).forEach(e=>{if(!this.sendBuffer.some(n=>String(n.id)===e)){const n=this.acks[e];delete this.acks[e],n.withError&&n.call(this,new Error("socket has been disconnected"))}})}onpacket(e){if(e.nsp===this.nsp)switch(e.type){case PacketType.CONNECT:e.data&&e.data.sid?this.onconnect(e.data.sid,e.data.pid):this.emitReserved("connect_error",new Error("It seems you are trying to reach a Socket.IO server in v2.x with a v3.x client, but they are not compatible (more information here: https://socket.io/docs/v3/migrating-from-2-x-to-3-0/)"));break;case PacketType.EVENT:case PacketType.BINARY_EVENT:this.onevent(e);break;case PacketType.ACK:case PacketType.BINARY_ACK:this.onack(e);break;case PacketType.DISCONNECT:this.ondisconnect();break;case PacketType.CONNECT_ERROR:this.destroy();const n=new Error(e.data.message);n.data=e.data.data,this.emitReserved("connect_error",n);break}}onevent(e){const t=e.data||[];e.id!=null&&t.push(this.ack(e.id)),this.connected?this.emitEvent(t):this.receiveBuffer.push(Object.freeze(t))}emitEvent(e){if(this._anyListeners&&this._anyListeners.length){const t=this._anyListeners.slice();for(const n of t)n.apply(this,e)}super.emit.apply(this,e),this._pid&&e.length&&typeof e[e.length-1]=="string"&&(this._lastOffset=e[e.length-1])}ack(e){const t=this;let n=!1;return function(...s){n||(n=!0,t.packet({type:PacketType.ACK,id:e,data:s}))}}onack(e){const t=this.acks[e.id];typeof t=="function"&&(delete this.acks[e.id],t.withError&&e.data.unshift(null),t.apply(this,e.data))}onconnect(e,t){this.id=e,this.recovered=t&&this._pid===t,this._pid=t,this.connected=!0,this.emitBuffered(),this.emitReserved("connect"),this._drainQueue(!0)}emitBuffered(){this.receiveBuffer.forEach(e=>this.emitEvent(e)),this.receiveBuffer=[],this.sendBuffer.forEach(e=>{this.notifyOutgoingListeners(e),this.packet(e)}),this.sendBuffer=[]}ondisconnect(){this.destroy(),this.onclose("io server disconnect")}destroy(){this.subs&&(this.subs.forEach(e=>e()),this.subs=void 0),this.io._destroy(this)}disconnect(){return this.connected&&this.packet({type:PacketType.DISCONNECT}),this.destroy(),this.connected&&this.onclose("io client disconnect"),this}close(){return this.disconnect()}compress(e){return this.flags.compress=e,this}get volatile(){return this.flags.volatile=!0,this}timeout(e){return this.flags.timeout=e,this}onAny(e){return this._anyListeners=this._anyListeners||[],this._anyListeners.push(e),this}prependAny(e){return this._anyListeners=this._anyListeners||[],this._anyListeners.unshift(e),this}offAny(e){if(!this._anyListeners)return this;if(e){const t=this._anyListeners;for(let n=0;n<t.length;n++)if(e===t[n])return t.splice(n,1),this}else this._anyListeners=[];return this}listenersAny(){return this._anyListeners||[]}onAnyOutgoing(e){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.push(e),this}prependAnyOutgoing(e){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.unshift(e),this}offAnyOutgoing(e){if(!this._anyOutgoingListeners)return this;if(e){const t=this._anyOutgoingListeners;for(let n=0;n<t.length;n++)if(e===t[n])return t.splice(n,1),this}else this._anyOutgoingListeners=[];return this}listenersAnyOutgoing(){return this._anyOutgoingListeners||[]}notifyOutgoingListeners(e){if(this._anyOutgoingListeners&&this._anyOutgoingListeners.length){const t=this._anyOutgoingListeners.slice();for(const n of t)n.apply(this,e.data)}}}function Backoff(i){i=i||{},this.ms=i.min||100,this.max=i.max||1e4,this.factor=i.factor||2,this.jitter=i.jitter>0&&i.jitter<=1?i.jitter:0,this.attempts=0}Backoff.prototype.duration=function(){var i=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var e=Math.random(),t=Math.floor(e*this.jitter*i);i=Math.floor(e*10)&1?i+t:i-t}return Math.min(i,this.max)|0},Backoff.prototype.reset=function(){this.attempts=0},Backoff.prototype.setMin=function(i){this.ms=i},Backoff.prototype.setMax=function(i){this.max=i},Backoff.prototype.setJitter=function(i){this.jitter=i};class Manager extends Emitter{constructor(e,t){var n;super(),this.nsps={},this.subs=[],e&&typeof e=="object"&&(t=e,e=void 0),t=t||{},t.path=t.path||"/socket.io",this.opts=t,installTimerFunctions(this,t),this.reconnection(t.reconnection!==!1),this.reconnectionAttempts(t.reconnectionAttempts||1/0),this.reconnectionDelay(t.reconnectionDelay||1e3),this.reconnectionDelayMax(t.reconnectionDelayMax||5e3),this.randomizationFactor((n=t.randomizationFactor)!==null&&n!==void 0?n:.5),this.backoff=new Backoff({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(t.timeout==null?2e4:t.timeout),this._readyState="closed",this.uri=e;const s=t.parser||parser;this.encoder=new s.Encoder,this.decoder=new s.Decoder,this._autoConnect=t.autoConnect!==!1,this._autoConnect&&this.open()}reconnection(e){return arguments.length?(this._reconnection=!!e,e||(this.skipReconnect=!0),this):this._reconnection}reconnectionAttempts(e){return e===void 0?this._reconnectionAttempts:(this._reconnectionAttempts=e,this)}reconnectionDelay(e){var t;return e===void 0?this._reconnectionDelay:(this._reconnectionDelay=e,(t=this.backoff)===null||t===void 0||t.setMin(e),this)}randomizationFactor(e){var t;return e===void 0?this._randomizationFactor:(this._randomizationFactor=e,(t=this.backoff)===null||t===void 0||t.setJitter(e),this)}reconnectionDelayMax(e){var t;return e===void 0?this._reconnectionDelayMax:(this._reconnectionDelayMax=e,(t=this.backoff)===null||t===void 0||t.setMax(e),this)}timeout(e){return arguments.length?(this._timeout=e,this):this._timeout}maybeReconnectOnOpen(){!this._reconnecting&&this._reconnection&&this.backoff.attempts===0&&this.reconnect()}open(e){if(~this._readyState.indexOf("open"))return this;this.engine=new Socket$1(this.uri,this.opts);const t=this.engine,n=this;this._readyState="opening",this.skipReconnect=!1;const s=on(t,"open",function(){n.onopen(),e&&e()}),r=o=>{this.cleanup(),this._readyState="closed",this.emitReserved("error",o),e?e(o):this.maybeReconnectOnOpen()},a=on(t,"error",r);if(this._timeout!==!1){const o=this._timeout,l=this.setTimeoutFn(()=>{s(),r(new Error("timeout")),t.close()},o);this.opts.autoUnref&&l.unref(),this.subs.push(()=>{this.clearTimeoutFn(l)})}return this.subs.push(s),this.subs.push(a),this}connect(e){return this.open(e)}onopen(){this.cleanup(),this._readyState="open",this.emitReserved("open");const e=this.engine;this.subs.push(on(e,"ping",this.onping.bind(this)),on(e,"data",this.ondata.bind(this)),on(e,"error",this.onerror.bind(this)),on(e,"close",this.onclose.bind(this)),on(this.decoder,"decoded",this.ondecoded.bind(this)))}onping(){this.emitReserved("ping")}ondata(e){try{this.decoder.add(e)}catch(t){this.onclose("parse error",t)}}ondecoded(e){nextTick(()=>{this.emitReserved("packet",e)},this.setTimeoutFn)}onerror(e){this.emitReserved("error",e)}socket(e,t){let n=this.nsps[e];return n?this._autoConnect&&!n.active&&n.connect():(n=new Socket(this,e,t),this.nsps[e]=n),n}_destroy(e){const t=Object.keys(this.nsps);for(const n of t)if(this.nsps[n].active)return;this._close()}_packet(e){const t=this.encoder.encode(e);for(let n=0;n<t.length;n++)this.engine.write(t[n],e.options)}cleanup(){this.subs.forEach(e=>e()),this.subs.length=0,this.decoder.destroy()}_close(){this.skipReconnect=!0,this._reconnecting=!1,this.onclose("forced close")}disconnect(){return this._close()}onclose(e,t){var n;this.cleanup(),(n=this.engine)===null||n===void 0||n.close(),this.backoff.reset(),this._readyState="closed",this.emitReserved("close",e,t),this._reconnection&&!this.skipReconnect&&this.reconnect()}reconnect(){if(this._reconnecting||this.skipReconnect)return this;const e=this;if(this.backoff.attempts>=this._reconnectionAttempts)this.backoff.reset(),this.emitReserved("reconnect_failed"),this._reconnecting=!1;else{const t=this.backoff.duration();this._reconnecting=!0;const n=this.setTimeoutFn(()=>{e.skipReconnect||(this.emitReserved("reconnect_attempt",e.backoff.attempts),!e.skipReconnect&&e.open(s=>{s?(e._reconnecting=!1,e.reconnect(),this.emitReserved("reconnect_error",s)):e.onreconnect()}))},t);this.opts.autoUnref&&n.unref(),this.subs.push(()=>{this.clearTimeoutFn(n)})}}onreconnect(){const e=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",e)}}const cache={};function lookup(i,e){typeof i=="object"&&(e=i,i=void 0),e=e||{};const t=url(i,e.path||"/socket.io"),n=t.source,s=t.id,r=t.path,a=cache[s]&&r in cache[s].nsps,o=e.forceNew||e["force new connection"]||e.multiplex===!1||a;let l;return o?l=new Manager(n,e):(cache[s]||(cache[s]=new Manager(n,e)),l=cache[s]),t.query&&!e.query&&(e.query=t.queryKey),l.socket(t.path,e)}Object.assign(lookup,{Manager,Socket,io:lookup,connect:lookup});const handleGetUsersInChat=async i=>{const e=await axios({url:API().user.profile,method:"post",headers:{"Content-Type":"application/json"},data:i});return responseValidator(e.status)?e.data:[]},submitCommentInChat=async(i,e,t)=>{const n=store.dispatch,{roomId:s,messages:r,messageCount:a,chatType:o}=store.getState().chats,{name:l,avatar_url:d}=store.getState().user,f={room:s,text:t?void 0:e,default_message_id:t??void 0},{data:u,status:p}=await submitChatComment(f);if(responseValidator(p)){if(!t&&o===ChatType.private){const m={name:l,avatar_url:d,created_at:u.created_at,text:e,author:u.author,room_id:s,id:u.id,isConfirmed:!1};n(setMessages(r?[m,...r]:[m])),n(setMessageCount(a+1))}}else ae({title:"ارتباط با سرور دچار مشکل شده است.",type:"error"});i&&i("")},fetchChatMessage=async(i,e)=>{const{roomId:t,messages:n,messageCount:s}=store.getState().chats,r=store.dispatch,{data:a,status:o}=await getAllChatMessages(t,i);if(responseValidator(o)){e(!1);let l=[];s!==0?n?l=[...n,...a.results]:l=[...a.results]:l=[...a.results],r(setMessageCount(a.count)),handleFirstTimeChatRoomMessage(l)}},handleConnectSocket=i=>{const e=store.dispatch,{roomId:t}=store.getState().chats;let n;n=lookup(API().live.liveChat.chat(t)),n.on("connect",async()=>{e(setSocket(n)),fetchChatMessage(0,i),n.on("message",async s=>handleChatRoomMessage(s))})},handleChatRoomMessage=async i=>{const e=store.dispatch,{messages:t,chatType:n}=store.getState().chats,{userId:s}=store.getState().user;if(!Array.isArray(i)){let r;if(n!==ChatType.public&&t&&(r=t.findIndex(o=>o.id===i.id)),r>-1&&t&&t.length){const o=JSON.parse(JSON.stringify(t));o[r].isConfirmed=!0,e(setMessages(o))}else n===ChatType.auto&&s===i.author&&(i.isConfirmed=!0),t&&t.length?e(setMessages([i,...t])):e(setMessages([i]));const{usersInfoInChat:a}=store.getState().chats;if(!a.find(o=>o.id===i.author)){const o=await handleGetUsersInChat([i.author]);o.length&&e(setUsersInfoInChat([...a,...o]))}}},handleFirstTimeChatRoomMessage=async i=>{const e=store.dispatch;if(i.length){e(setMessages(i));let t=[];i.map(s=>t.push(s.author)),t=[...new Set(t)];const n=await handleGetUsersInChat(t);n.length&&e(setUsersInfoInChat(n))}else e(setMessages([]))},handleChatActiveRoom=async i=>{const e=store.dispatch,{params:t}=store.getState().videoData,{roomId:n,chatEnabled:s,socket:r,showChat:a}=store.getState().chats;let o;if(!conditions(ConditionName.hasQuizParams)&&conditions(ConditionName.isParamsPortrait)&&i){let{data:l,status:d}=await apiCaller({url:API().live.liveChat.getRoomId(+String(t.id))});responseValidator(d)&&(n!==l.id&&r&&(e(setMessages([])),e(setChatEnabled(!1))),e(setDefaultMessages(l.default_messages)),e(setPinMessage(l.pin)),e(setRoomId(l.id)),e(setChatType(l.type)),o=l.id)}else s&&r&&(e(setMessages([])),e(setChatEnabled(!1)));s!==!!o&&setTimeout(()=>{a&&e(setChatPopover(!0)),e(setChatEnabled(!!o))},0)},submitChatComment=async i=>{const{data:e,status:t}=await apiCaller({url:API().live.liveChat.sendChatMessage,method:"post",data:i,headers:handleHasXTokenParamOrSendXToken(),retryPolicy:[{codeAbove:400,codeBelow:null,excludeCodes:[],includeCodes:[],delay:2,count:3}]});return{data:e,status:t}},getAllChatMessages=async(i,e)=>{const{data:t,status:n}=await apiCaller({url:API().live.liveChat.getMessageList(i),method:"GET",data:{offset:e,limit:10,ordering:"-created_at"},retryPolicy:[{codeAbove:400,codeBelow:null,excludeCodes:[],includeCodes:[],delay:2,count:3}]});return{data:t,status:n}},feedbackLog=(i,e,t)=>{const{params:n,details:s}=store.getState().videoData;return{category:"feedback",id:Number(n.id),stars:i,text:e,customText:t,type:n.type,src:conditions(ConditionName.hasStreamLink)?s.stream_link:n.src,provider:n.provider}},eventMarkerClickLog=(i,e,t,n,s)=>{const{params:r,details:a}=store.getState().videoData;return{category:"eventMarkerClick",video_id:conditions(ConditionName.isLiveParam)?a.id:Number(r.id),markerId:i,markerTime:e,markerTitle:t,markerDescription:n,markerSticker:s,type:r.type,src:conditions(ConditionName.hasStreamLink)?a.stream_link:r.src,provider:r.provider}},speedChangeLog=i=>{const{params:e,details:t}=store.getState().videoData,{settings:n}=store.getState().user;return{category:"speedChange",previousSelectedSpeed:n.speed,selectedSpeed:i,id:Number(e.id),type:e.type,src:conditions(ConditionName.hasStreamLink)?t.stream_link:e.src,provider:e.provider}},qualityChangeRequestLog=i=>{const{params:e,details:t}=store.getState().videoData,{qualityLevels:n,manualQuality:s,autoQuality:r}=store.getState().controller;return{category:"qualityChangeRequest",currentPlayingQuality:`${n[conditions(ConditionName.isAutoQuality)?r??s:s]}P`,previousSelectedQuality:conditions(ConditionName.isAutoQuality)?"auto":`${n[s]}P`,selectedQuality:i,id:Number(e.id),type:e.type,src:conditions(ConditionName.hasStreamLink)?t.stream_link:e.src,provider:e.provider}},catchUpLoadingLog=i=>{const{params:e,details:t}=store.getState().videoData,{hlsLiveSyncPosition:n,qualityLevels:s,autoQuality:r}=store.getState().controller,{settings:a}=store.getState().user;return{category:"catchUpLoading",previousVideoTime:Number(sessionStorage.getItem("previousVideoTime")),currentVideoTime:n,duration:i,quality:`${conditions(ConditionName.isAutoQuality)?s[r]:s[a.quality]}P`,isAutoQuality:conditions(ConditionName.isAutoQuality),id:Number(e.id),type:e.type,src:conditions(ConditionName.hasStreamLink)?t.stream_link:e.src,provider:e.provider}},shareDialogLog=(i,e,t,n)=>{const{params:s,details:r}=store.getState().videoData;return{category:"shareDialog",id:Number(s.id),type:s.type,src:conditions(ConditionName.hasStreamLink)?r.stream_link:s.src,videoTime:i,eventMarkerId:n,provider:s.provider,jump:e?"true":"false",jumpTime:e?t:void 0}},shareCopyLog=(i,e,t,n)=>{const{params:s,details:r}=store.getState().videoData;return{category:"shareCopy",id:Number(s.id),type:s.type,src:conditions(ConditionName.hasStreamLink)?r.stream_link:s.src,videoTime:i,eventMarkerId:n,jump:e?"true":"false",jumpTime:e?t:void 0,provider:s.provider}},alternativeLiveLog=i=>{const{params:e,details:t}=store.getState().videoData;return{category:"alternativeLiveClick",id:Number(e.id),type:e.type,src:conditions(ConditionName.hasStreamLink)?t.stream_link:e.src,alternativeLiveUserId:i,provider:e.provider}},deActiveSettingLog=()=>{const{params:i,details:e}=store.getState().videoData,{settings:t}=store.getState().user;let n={id:Number(i.id),type:i.type,src:conditions(ConditionName.hasStreamLink)?e.stream_link:i.src,provider:i.provider};return t.poll_emoji?{...n,category:"activeSetting"}:{...n,category:"deactiveSetting",hasOtherLive:conditions(ConditionName.hasAlternativeLives)?"true":"false",hasPoll:conditions(ConditionName.hasPoll)?"true":"false",hasEmoji:conditions(ConditionName.hasEmojiList1Or2)?"true":"false"}},backwardForwardLog=i=>{const{params:e,details:t}=store.getState().videoData;return{category:i==="backward"?"backward":"forward",id:Number(e.id),type:e.type,src:t.stream_link?t.stream_link:e.src,provider:e.provider}},pollModalCloseLog=(i,e,t)=>({category:"pollModalClose",pollId:t,id:Number(i.id),type:i.type,src:e.stream_link?e.stream_link:i.src,provider:i.provider}),tagClickLog=i=>{const{params:e,details:t}=store.getState().videoData;return{category:"tagClick",tagText:i,id:Number(e.id),type:e.type,src:conditions(ConditionName.hasStreamLink)?t.stream_link:e.src}},likeDislikeLog=i=>{const{params:e,details:t}=store.getState().videoData;return{category:i,id:Number(e.id),type:e.type,src:conditions(ConditionName.hasStreamLink)?t.stream_link:e.src}},fullscreenLog=i=>{const{params:e,details:t}=store.getState().videoData;return{category:i,id:Number(e.id),type:e.type,src:conditions(ConditionName.hasStreamLink)?t.stream_link:e.src}},brightnessLog=(i,e)=>{const{params:t,details:n}=store.getState().videoData;return{category:"brightnessChange",source:i,target:e,id:Number(t.id),type:t.type,src:conditions(ConditionName.hasStreamLink)?n.stream_link:t.src}},volumeLog=(i,e)=>{const{params:t,details:n}=store.getState().videoData;return{category:"volumeChange",source:i,target:e,id:Number(t.id),type:t.type,src:conditions(ConditionName.hasStreamLink)?n.stream_link:t.src}},subtitleLog=i=>{const{params:e,details:t}=store.getState().videoData;return{category:"subtitle",language:i,id:Number(e.id),type:e.type,src:conditions(ConditionName.hasStreamLink)?t.stream_link:e.src}},lockLog=i=>{const{params:e,details:t}=store.getState().videoData;return{category:i,id:Number(e.id),type:e.type,src:conditions(ConditionName.hasStreamLink)?t.stream_link:e.src}},recommendationListLog=(i,e,t,n)=>{const{params:s,details:r}=store.getState().videoData;return{category:"recommend",sourcevideoId:conditions(ConditionName.isLiveParam)?r.id:+s.id,targetVideoId:i,sourceUserId:r.user_id,targetUserId:e,sourceType:s.type,targetType:t,listIndex:n,id:Number(s.id),type:s.type,src:conditions(ConditionName.hasStreamLink)?r.stream_link:s.src}},ExceptionsLog=(i,e)=>({category:"error",type:i,message:e}),videoTimelineLog=(i,e)=>{const{params:t,details:n}=store.getState().videoData,{duration:s}=store.getState().controller;return{category:"video-timeline",video_id:conditions(ConditionName.isLiveParam)?n.id:+t.id,video_type:t.type==="archive"?"live":t.type,start:i,end:e,watchedDuration:e-i,video_duration:conditions(ConditionName.isLiveParam)?null:Math.floor(s),clientUUID:getUUID(),user_id:conditions(ConditionName.isLiveParam)?t.id:n.user_id,content_type:n.content_type,content_id:n.content_id}},bookmarkLog=i=>{const{params:e,details:t}=store.getState().videoData;return{category:i,id:conditions(ConditionName.isLiveParam)?t.id:+e.id,type:e.type,src:conditions(ConditionName.hasStreamLink)?t.stream_link:e.src}},autoQualityChangeLog=(i,e,t)=>{const{params:n,details:s}=store.getState().videoData;return{category:"autoQualityChange",sourceQuality:i,targetQuality:e,diffQuality:t,id:Number(n.id),type:n.type,src:conditions(ConditionName.hasStreamLink)?s.stream_link:n.src,provider:n.provider}},pingpongLog=(i,e)=>{const{params:t,details:n}=store.getState().videoData;return{category:"pingpong",id:Number(t.id),type:t.type,src:conditions(ConditionName.hasStreamLink)?n.stream_link:t.src,PingPongDuration:Number((new Date().getTime()-i).toFixed(2)),PingPongSourceQuality:`${e[0]}P`,PingPongTargetQuality:`${e[1]}P`,provider:t.provider}},pausePlayLog=i=>{const{params:e,details:t}=store.getState().videoData;return{category:i?"playVideo":"pauseVideo",id:Number(e.id),type:e.type,src:t.stream_link?t.stream_link:e.src,provider:e.provider}},initLog=(i,e,t,n,s)=>{const{params:r,details:a}=store.getState().videoData,o=Date.now()-s.current+i+e,l=window.performance.memory,d=JSON.parse(JSON.stringify(window.performance.timing));return{category:"initLog",id:Number(r.id),type:r.type,origin:new URL(conditions(ConditionName.hasStreamLink)?a.stream_link:r.src).origin,src:conditions(ConditionName.hasStreamLink)?a.stream_link:r.src,loading:i,bannerLoading:!conditions(ConditionName.hasBanner)||t<0?0:t,waiting:e,firstChunkPlaying:n<0?0:n,totalTime:o,provider:r.provider,performance:flattenObject({memory:l,timing:d},"performance"),userAgent:window.navigator.userAgent}},loadingLog=(i,e,t,n,s)=>{const{params:r,details:a,hlsLiveSyncPosition:o}=store.getState().videoData,{settings:l}=store.getState().user,d=conditions(ConditionName.isLiveParam)?o:videoTag().currentTime,f=Date.now()-t.current;return{category:"loading",id:Number(r.id),type:r.type,src:conditions(ConditionName.hasStreamLink)?a.stream_link:r.src,duration:i,quality:`${e}P`,isAutoQuality:conditions(ConditionName.isAutoQuality),previousLoaderDiff:f,counter:n.current,loadingPercentile:Number((i/f).toFixed(2)),videoTime:d,videoEntranceTime:s,speed:l.speed,provider:r.provider}},playListClickLog=i=>{const{params:e,details:t}=store.getState().videoData;return{category:"playListClick",playlistId:i,id:conditions(ConditionName.isLiveParam)?t.id:+e.id,type:e.type}},videoOfPlaylistClickLog=(i,e,t,n)=>({category:"videoOfPlaylistClick",tag:i,indexNumber:n,videoId:e,videoType:t}),searchLog=i=>{const{selectedTags:e,inputTagSearch:t}=store.getState().tags,{params:n}=store.getState().videoData;return{category:"search",tag:e.join(","),q:conditions(ConditionName.hasInputTagSearch)?t:void 0,user_ids:n.user_ids,video_type:i}},searchResultClickLog=(i,e,t)=>{const{selectedTags:n,inputTagSearch:s}=store.getState().tags,{params:r}=store.getState().videoData,a=handleContentType();return{category:"searchResultClick",tag:n.join(","),q:conditions(ConditionName.hasInputTagSearch)?s:void 0,user_ids:r.user_ids,video_type:a,clickedId:i,clickedIndex:t,clickedType:e}},handleContinuousPlayback=()=>{const{videoSettings:i}=store.getState().user,{params:e}=store.getState().videoData,t=e.type.toString(),n=conditions(ConditionName.isLogin),s=videoTag().currentTime;if(t!=="live"&&s!==0){const r=videoTag().duration,a={video_id:+e.id,video_type:handleVideoType(),time:s===r?0:Math.floor(videoTag().currentTime),is_like:i.is_like};let o=localStorage.getItem("viewedVideos");if(o){let l=JSON.parse(o);l=l.filter(d=>d.video_id!==a.video_id||d.video_type!==a.video_type),l.length<10||l.shift(),l.push(a),localStorage.setItem("viewedVideos",JSON.stringify(l))}else localStorage.setItem("viewedVideos",JSON.stringify([a]));n&&createVideoSettings(a)}},handleApplyContinuousPlayback=()=>{const i=store.dispatch,{params:e}=store.getState().videoData;let t=localStorage.getItem("viewedVideos");if(t){const s=JSON.parse(t).find(r=>r.video_id===Number(e.id)&&r.video_type===handleVideoType());s&&(i(setVideoSettings({is_like:s.is_like,time:s.time})),s.time!==0&&i(setShowContinuousPlayback(!0)))}},handleShowContinuousVideo=i=>{const e=store.dispatch,{videoSettings:t}=store.getState().user;handlePlayPause(i),handleVideoTimeline(t.time),e(setShowContinuousPlayback(!1))},handleGoToFirstVideo=i=>{const e=store.dispatch,{videoSettings:t}=store.getState().user;e(setVideoSettings({...t,time:0})),e(setShowContinuousPlayback(!1)),handlePlayPause(i)},handlePlayPause=i=>{const e=store.dispatch,{params:t}=store.getState().videoData;(i===null||i.target.nodeName!=="INPUT")&&(i!==null&&(i.stopPropagation(),i.preventDefault()),videoTag().paused?videoTag().play():videoTag().pause(),e(setPlay(!videoTag().paused)),t.onPlayPause&&t.onPlayPause(!videoTag().paused))},handlePlayerPauseMiniPlayer=i=>{if(i===null||i.target.nodeName!=="INPUT"){const e=store.dispatch;miniPlayerVideoTag().paused?miniPlayerVideoTag().play():miniPlayerVideoTag().pause(),e(setPlayMiniPlayer(!miniPlayerVideoTag().paused)),videoTag()&&videoTag().played&&(videoTag().pause(),e(setPlay(!1)))}},handlePlayPauseInDOM=i=>{const e=store.dispatch;return i?(videoTag().play(),e(setPlay(!0)),!0):(videoTag().pause(),e(setPlay(!1)),!1)},handleChangeSoundVolume=i=>{const e=store.dispatch,{settings:t}=store.getState().user;e(setUserSettings({...t,volume:i})),conditions(ConditionName.isIOS)?videoTag().muted=!videoTag().muted:videoTag().volume=i/100},handleIsLive=()=>{const i=store.dispatch,{hlsLiveSyncPosition:e}=store.getState().controller;handleVideoTimeline(videoTag().currentTime,e),videoTag().currentTime=e,i(setCurrentTime(e)),progressBar()&&(progressBar().style.width="100%"),i(setIsLive(!0));const t=Date.now();videoTag().play().then(()=>sendFluentLog(catchUpLoadingLog(Date.now()-t)))},handleBackwardForward=(i,e=15,t)=>{if(t&&t.target.nodeName==="INPUT")return;const n=store.dispatch;i==="touchBackward"?i="backward":i==="touchForward"&&(i="forward"),sendFluentLog(backwardForwardLog(i));let s=0;i==="backward"?e===0?s=0:s=videoTag().currentTime-e:i==="forward"&&(e===videoTag().duration?s=e:s=videoTag().currentTime+e),conditions(ConditionName.isLiveParam)&&n(setCurrentTime(s)),conditions(ConditionName.isStaticFormat)||handleVideoTimeline(videoTag().currentTime,videoTag().currentTime+e),videoTag().currentTime=s},handleFullScreen=()=>{const i=store.dispatch,e=document.fullscreenElement;conditions(ConditionName.isIOS)?videoTag().webkitEnterFullScreen?(i(setPlay(!1)),videoTag().webkitEnterFullScreen()):(i(setClearPopoversSlice()),sendFluentLog(fullscreenLog("fullScreen"))):e?(i(setIsFullScreen(!1)),document.exitFullscreen(),conditions(ConditionName.isTouchScreen)&&conditions(ConditionName.isParamsPortrait)&&i(setIsComplexPortrait(!0))):(i(setClearPopoversSlice()),document.documentElement.requestFullscreen(),i(setIsFullScreen(!0)),sendFluentLog(fullscreenLog("fullScreen")),conditions(ConditionName.isTouchScreen)&&conditions(ConditionName.isParamsPortrait)&&i(setIsComplexPortrait(!1)))},handleLockOrientation=()=>{conditions(ConditionName.isTouchScreen)&&!conditions(ConditionName.isIOS)&&(conditions(ConditionName.isLandscape)&&!conditions(ConditionName.isFullScreen)?window.screen.orientation.lock("portrait"):window.screen.orientation.lock("landscape"))},handleLock=i=>{const e=store.dispatch;e(setLock(i==="lock")),sendFluentLog(lockLog(i))},handleVideoTimeline=(i,e)=>{if(conditions(ConditionName.isSendTimelineLog)){const t=store.dispatch,{videoTimelines:n}=store.getState().videoData;let s=Math.floor(i),r=Math.floor(e);n.length===0?t(setVideoTimelines([s>=videoTag().duration&&!conditions(ConditionName.isLive)?r:s])):(n[0]<s&&apiCaller({url:API().videoTimelineLog,method:"post",data:videoTimelineLog(n[0],s)}),r&&r>=videoTag().duration?t(setVideoTimelines([])):t(setVideoTimelines([r])))}},handleVideoElementSizeInfo=()=>{var t;const i=store.dispatch,e=(t=document.getElementById("video-area"))==null?void 0:t.getBoundingClientRect();e.height=e.width*9/16,e&&i(setVideoElementSizeInfo(e))},handleClickVideoCard=(i,e,t)=>{const n=store.dispatch,{params:s,recommendationList:r}=store.getState().videoData;let a=i,o=e;if(r&&r.length&&(!i||!e)){const l=findFirstVideoInRecommendationList();a=i||l.id,o=e||l.type}videoTag()&&(handleVideoTimeline(videoTag().currentTime),conditions(ConditionName.isEnded)||handleContinuousPlayback()),a&&o&&(s.handleRedirectCards&&!t&&s.handleRedirectCards(a,o),clearRedux(),n(setPlayerParams({...s,id:a,type:o,xToken:s.xToken})),n(setIsClickInnerCard(!0)))},detailAPI=i=>{const{params:e}=store.getState().videoData;return getApiUrls().apiUrl+(i||e.id)},detailsConfig={url:"",maxRetryCount:0,headers:{},retryPolicy:[],errorCallback:void 0},liveDetailsConfig=i=>{detailsConfig.url=detailAPI(i);let e=window.location.origin;e=e.replace("https://",""),e=e.replace("http://",""),detailsConfig.url+="?from="+e},nonLiveDetailsConfig=i=>(detailsConfig.url=detailAPI(i),detailsConfig.maxRetryCount=3,detailsConfig.retryPolicy=[{codeAbove:500,codeBelow:null,excludeCodes:[],includeCodes:[409],delay:1,count:3},{codeAbove:null,codeBelow:404,excludeCodes:[403,402,401,400],includeCodes:[],delay:10,count:6}],detailsConfig.errorCallback=(e,t)=>{e!==404&&errorLogProvider({type:"DETAIL_ERROR",message:t?JSON.parse(t).message:""})},detailsConfig),hasIsAuthInParams=()=>{const{token:i}=store.getState().videoData;hasQuestionMark(detailsConfig.url)?detailsConfig.url+=`&token=${i}`:detailsConfig.url+=`?token=${i}`},hasHInParams=()=>{detailsConfig.headers={authorization:`Bearer ${getAccessToken()}`}},hasDaaniToken=()=>{const{daaniToken:i}=store.getState().videoData.params;hasQuestionMark(detailsConfig.url)?detailsConfig.url+=`&ext_user=${i}`:detailsConfig.url+=`?ext_user=${i}`},handleDetailsConfig=i=>(conditions(ConditionName.isLiveParam)?liveDetailsConfig(i):nonLiveDetailsConfig(),conditions(ConditionName.isAuth)&&hasIsAuthInParams(),conditions(ConditionName.hasHParam)&&hasHInParams(),conditions(ConditionName.hasDaaniTokenParams)&&hasDaaniToken(),detailsConfig),videoViewCount=i=>apiCaller({url:API().viewCount(i),data:{uuid:getUUID()}}),handleDetailsInLive=i=>{const e=store.dispatch;e(setLiveId(i.id)),e(setIsLive(!0)),e(setIsLiveError(!1)),conditions(ConditionName.isEnded)?setTimeout(()=>detailSetter(i),LiveDelay*1e3):detailSetter(i)},getLiveAndVodDetails=async i=>{const e=store.dispatch,{params:t}=store.getState().videoData;try{const n=await apiCaller({...handleDetailsConfig(i)});if(responseValidator(n.status)){if(appendQueryParamsToChunks(n.data.stream_link),await axios.head("https://"+weighted_random(n.data.hls_links)+n.data.path),i)return n.data;videoViewCount(n.data.content_id),conditions(ConditionName.isLiveParam)?handleDetailsInLive(n.data):detailSetter(n.data)}else throw new Error(JSON.stringify({status:n.status,message:n.data}))}catch(n){if(JSON.parse(n.message).status===404&&conditions(ConditionName.isLiveParam)&&conditions(ConditionName.hasRedirectOnEndedUrlParams)&&(window.location.href=t.redirectOnEndedUrl),i)return;conditions(ConditionName.isLiveParam)&&e(setIsLiveError(!0)),handlePageTitle(String(t.id)),e(setIsFetchDetails(!0)),e(setErrorType("liveAndVod")),e(setIsValidAddress(!1))}},detailSetter=i=>{const e=store.dispatch,{params:t}=store.getState().videoData;i.title?handlePageTitle(i.title):handlePageTitle(String(t.id)),e(setInfo({...i,stream_link:!!i.stream_link&&addUuidToSrc("https://"+weighted_random(i.hls_links)+i.path)})),e(setIsFetchDetails(!0)),e(setIsValidAddress(!0))},manualGeneralErrorResponseHandler=(i,e,t,n,s,r,a)=>{i!==RetryCountGeneralDataFetch&&i!==1?t(i-1):i===1&&n.length>0&&(n.forEach(o=>clearInterval(o)),s([])),console.error(`get aggregat error: ${r.detail}`)},firstGetDataIntervalAPI=async(i,e,t,n,s,r)=>{const{params:a}=store.getState().videoData,{data:o,status:l}=await apiCaller({url:API().live.generalData});if(responseValidator(l)&&o.config){if(o.backup&&(window.location.href=window.location.href.replace(`id=${a.id}`,`id=${o.backup}`).replace(`&t=${a.t}`,"")),e(RetryCountGeneralDataFetch),t(setConfig(o.config)),n(conditions(ConditionName.hasQuizParams)?o.config.quiz_get_interval:o.config.get_interval),s(o.config.viewers_interval),r(o.config.empoji_poll_interval),t(setEmojis(o.emojis)),t(setOnlineViewers(o.online_viewers)),t(setQuestion(o.question)),t(setAlternative_Lives(o.alternative_lives)),t(setMarkers(o.markers.sort(compare))),t(setGif(o.gif)),t(setQuiz(o.quiz)),handleChatActiveRoom(o.chat_enabled),o.timeline.windows.length){const d=[];o.timeline.windows.map(f=>d.push(f.viewers)),t(setChartPoints(d))}!o&&!o.question&&!o.question.active&&(livePoll()&&livePoll().liveId!==a.id||!livePoll())&&localStorage.setItem("live-poll",JSON.stringify({liveId:a.id,polls:[]}))}else n(RetryTimeDelayGeneralDataFetch),e(i-1),console.error(`get aggregat error: ${o.detail}`)},manualGetDataIntervalAPI=async(i,e,t,n,s,r,a,o,l)=>{const{params:d}=store.getState().videoData,{data:f,status:u}=await apiCaller({url:API().live.generalData});if(responseValidator(u)&&f.config){if(f.backup&&(window.location.href=window.location.href.replace(`id=${d.id}`,`id=${f.backup}`).replace(`&t=${d.t}`,"")),n(RetryCountGeneralDataFetch),s(setConfig(f.config)),(conditions(ConditionName.hasQuizParams)&&f.config.quiz_get_interval!==t||!conditions(ConditionName.hasQuizParams)&&f.config.get_interval!==t)&&a(conditions(ConditionName.hasQuizParams)?f.config.quiz_get_interval:f.config.get_interval),o(f.config.viewers_interval),l(f.config.empoji_poll_interval),s(setEmojis(f.emojis)),s(setOnlineViewers(f.online_viewers)),s(setQuestion(f.question)),s(setAlternative_Lives(f.alternative_lives)),s(setMarkers(f.markers.sort(compare))),s(setGif(f.gif)),handleChatActiveRoom(f.chat_enabled),s(setQuiz(f.quiz)),f.timeline.windows.length){const p=[];f.timeline.windows.map(m=>p.push(m.viewers)),s(setChartPoints(p))}!f.question&&f.question&&!f.question.active&&(livePoll()&&livePoll().liveId!==d.id||!livePoll())&&localStorage.setItem("live-poll",JSON.stringify({liveId:d.id,polls:[]}))}else manualGeneralErrorResponseHandler(i,s,n,e,r,f)},manualPostAPI=async()=>{const i=store.dispatch,{selectedOptionId:e,emojiList1:t,emojiList2:n,params:s,details:r}=store.getState().videoData;if(conditions(ConditionName.manaulPostAPI)){const a={poll:{option_id:e},emoji_list_1:t,emoji_list_2:n,type:s.type,id:r.id,user_id:s.id},{status:o}=await postEmojiPoll(a);responseValidator(o)&&(i(setEmojiList1([])),i(setEmojiList2([])),i(setSelectedOptionId(null)))}},manualGetOnlineViewerIntervalAPI=async()=>await apiCaller({url:API().live.online_viewer}),handleSubtitle=()=>{const i=store.dispatch,{subtitles:e,selectedSubtitle:t}=store.getState().videoData,n=e.find(s=>s.language==="fa");t?(Object.values(videoTag().textTracks).find(s=>s.mode==="showing").mode="disabled",i(setSubtitleText("")),i(setSelectedSubtitle(void 0)),sendFluentLog(subtitleLog("empty"))):n?(n.mode="showing",i(setSelectedSubtitle(n)),sendFluentLog(subtitleLog(n.language))):(videoTag().textTracks[0].mode="showing",i(setSelectedSubtitle(videoTag().textTracks[0])),sendFluentLog(subtitleLog(videoTag().textTracks[0].language)))},handleClickRecommendationCard=(i,e,t,n,s)=>{i&&handleRipple(i,`recommendationList-${e}`,150);const{recommendationList:r}=store.getState().videoData;handleVideoTimeline(videoTag().currentTime),sendFluentLog(recommendationListLog(e??r[0].id,t??r[0].user_id,n??r[0].type,s??1))},combinedMarkers=(i,e)=>{const t=[];i&&i.map(n=>{t.push({banner:"",id:n.id?n.id:n.time,live_id:conditions(ConditionName.isLiveParam)?n.video_id:0,sticker:n.sticker,time:n.time,title:n.name,video_type:n.video_type,video_id:n.video_id,description:n.description,isPersonal:n.id?n.id:n.time})}),store.dispatch(setMarkers([...e,...t].sort(compare)))},handlePlayListTabClick=()=>{const i=store.dispatch,{playList:e}=store.getState().videoData;i(setPlayListPopover(!0)),sendFluentLog(playListClickLog(e[0].id))},handleVideoOfPlaylistClick=(i,e,t,n,s)=>{handleRipple(i,`playList-${t}`,150),sendFluentLog(videoOfPlaylistClickLog(e,t,n,s))},handleContentType=()=>{const{isMovieFilter:i,isSeriesFilter:e}=store.getState().tags;let t;return i&&e?t=`${ContentTypesString.Vod},${ContentTypesString.PlayList}`:i?t=ContentTypesString.Vod:e&&(t=ContentTypesString.PlayList),t},findFirstVideoInRecommendationList=()=>{const{recommendationList:i}=store.getState().videoData,e=i.find(t=>t.type!=="playlist");return{id:e.id,type:e.type,banner:e.banner,title:e.title}},postEmojiPoll=async i=>{const{status:e}=await apiCaller({url:API().live.postData,method:"POST",data:i,retryPolicy:[{codeAbove:null,codeBelow:500,excludeCodes:[500,408,407,406,405,404,403,402,401,400],includeCodes:[409],delay:3,count:3}]});return{status:e}},getPlaylistVideos=async(i,e)=>{const{data:t,status:n}=await apiCaller({url:API().playListVideos(i),method:"GET",data:{offset:e,limit:10},retryPolicy:[{codeAbove:400,codeBelow:null,excludeCodes:[],includeCodes:[],delay:2,count:3}]});return{data:t,status:n}},getAllGeneralMarker=async i=>await getAll(i,[{codeAbove:400,codeBelow:null,excludeCodes:[],includeCodes:[],delay:2,count:3}]),getAllPersonalMarkers=async i=>{const{data:e,status:t}=await apiCaller({url:i,headers:handleHasXTokenParamOrSendXToken(),retryPolicy:[{codeAbove:400,codeBelow:null,excludeCodes:[],includeCodes:[],delay:2,count:3}]});return{data:e,status:t}},getCommentList=async(i,e)=>{const{data:t,status:n}=await apiCaller({url:i,data:{limit:10,offset:e},retryPolicy:[{codeAbove:400,codeBelow:null,excludeCodes:[],includeCodes:[],delay:2,count:3}]});return{data:t,status:n}},submitComment=async(i,e)=>{const{data:t,status:n}=await apiCaller({url:i,method:"POST",data:e,headers:{...handleHasXTokenParamOrSendXToken(),"ACCEPT-LANGUAGE":"fa"},retryPolicy:[{codeAbove:400,codeBelow:null,excludeCodes:[409],includeCodes:[],delay:2,count:3}]});return{data:t,status:n}},getPlayListCards=async i=>{const{data:e,status:t}=await apiCaller({url:i,retryPolicy:[{codeAbove:400,codeBelow:null,excludeCodes:[],includeCodes:[],delay:2,count:3}]});return{data:e,status:t}},getPlaylistHeader=async i=>{const{data:e,status:t}=await apiCaller({url:i,retryPolicy:[{codeAbove:400,codeBelow:null,excludeCodes:[],includeCodes:[],delay:2,count:3}]});return{data:e,status:t}};class InvalidTokenError extends Error{}InvalidTokenError.prototype.name="InvalidTokenError";function b64DecodeUnicode(i){return decodeURIComponent(atob(i).replace(/(.)/g,(e,t)=>{let n=t.charCodeAt(0).toString(16).toUpperCase();return n.length<2&&(n="0"+n),"%"+n}))}function base64UrlDecode(i){let e=i.replace(/-/g,"+").replace(/_/g,"/");switch(e.length%4){case 0:break;case 2:e+="==";break;case 3:e+="=";break;default:throw new Error("base64 string is not of the correct length")}try{return b64DecodeUnicode(e)}catch{return atob(e)}}function jwtDecode(i,e){if(typeof i!="string")throw new InvalidTokenError("Invalid token specified: must be a string");e||(e={});const t=e.header===!0?0:1,n=i.split(".")[t];if(typeof n!="string")throw new InvalidTokenError(`Invalid token specified: missing part #${t+1}`);let s;try{s=base64UrlDecode(n)}catch(r){throw new InvalidTokenError(`Invalid token specified: invalid base64 for part #${t+1} (${r.message})`)}try{return JSON.parse(s)}catch(r){throw new InvalidTokenError(`Invalid token specified: invalid json for part #${t+1} (${r.message})`)}}const checkCanComment=async()=>{const i=store.dispatch,{details:e}=store.getState().videoData,{data:t,status:n}=await apiCaller({url:API().comment.canAddComment(e.content_id)});responseValidator(n)&&(i(setCanAddComment(t.can_comment)),i(setCanShowSubmittedComment(t.comment_hidden_default===0)),i(setCommentsCount(t.comments_count-t.hidden_comments_count)),i(setCommentsCountPagination(t.first_level_comments_count-t.first_level_hidden_comments_count)))},handleGetComments=async(i,e)=>{const t=store.dispatch,{comments:n,usersCommentsProfiles:s}=store.getState().comments,{details:r}=store.getState().videoData,{data:a,status:o}=await getCommentList(API().comment.commentList(r.content_id),i);responseValidator(o)&&a.results&&a.results.length?(n!==void 0&&n.length?t(setComments([...n,...a.results])):t(setComments(a.results)),e(!1),t(setUsersCommentsProfiles(await handleGetUsersComments(a.results,s)))):(n===void 0||n.length===0)&&t(setComments([]))},handleGetReplies=async(i,e,t,n,s,r)=>{get(async(a,o)=>{responseValidator(o)&&(e.length?t([...e,...a.results]):t(a.results),s(await handleGetUsersComments(a.results,n)))},API().comment.replyList(i),{limit:10,offset:e.length-(r?1:0)})},handleSubmitDefaultMessageComment=async i=>{const e=store.dispatch,{details:t}=store.getState().videoData,{comments:n}=store.getState().comments;if(await checkCanComment(),conditions(ConditionName.canAddComment)){const s={text:void 0,default_message_id:i,content:t.content_id,reply_to:void 0},{data:r,status:a}=await submitComment(API().comment.create,s);responseValidator(a)?n?(e(setComments([r,...n])),conditions(ConditionName.isTouchScreen)&&n.length>0&&document.getElementById("touchscreenListComments").scrollIntoView({behavior:"smooth"})):e(setComments([r])):r&&ae({title:r.detail,type:"error"})}},handleSubmitComment=async(i,e,t,n,s,r)=>{const a=store.dispatch,{details:o}=store.getState().videoData,{replyToAuthor:l,comments:d}=store.getState().comments;if(await checkCanComment(),conditions(ConditionName.canAddComment)&&(i||t)){const f={text:i,content:s==="reply"?void 0:o.content_id,reply_to:s==="reply"?l.id:void 0},{data:u,status:p}=await submitComment(API().comment.create,f);responseValidator(p)?(e(""),n(""),conditions(ConditionName.canShowSubmittedComment)?s==="reply"?a(setRealTimeReply(u)):d?(a(setComments([u,...d])),conditions(ConditionName.isTouchScreen)&&d.length>0&&document.getElementById("touchscreenListComments").scrollIntoView({behavior:"smooth"})):a(setComments([u])):ae({title:`${s==="reply"?"پاسخ":"نظر"} شما با موفقیت ثبت شد و پس از تایید نمایش داده می شود.`,type:"success"}),s==="reply"&&(a(setReplyToAuthor({})),r&&r(!1))):ae({title:"خطا در ثبت دیدگاه",type:"error"})}else conditions(ConditionName.canAddComment)||ae({title:"در حال حاضر امکان ثبت دیدگاه وجود ندارد",type:"error"})},handleGetUsersComments=async(i,e)=>{const t=[];i.map(s=>s.author!=="AnonymousUser"&&t.push(s.author));const n=await axios({url:API().user.profile,method:"post",headers:{"Content-Type":"application/json"},data:t});return responseValidator(n.status)?[...e,...n.data]:[]},handleCommentsIdsInLocalStorage=()=>{const i=localStorage.getItem("commentsLikeUnlike");if(i){const{params:e}=store.getState().videoData,t=JSON.parse(i).find(n=>n.videoId===e.id&&n.videoType===e.type);if(t)return t.comments}},handleLikeUnlikeComment=async(i,e,t,n,s)=>{const{params:r}=store.getState().videoData,{status:a}=await apiCaller({url:e?API().comment.like(i):API().comment.unlike(i),data:{uuid:getUUID()}});if(responseValidator(a)){s(e?n+1:n-1),t(e);const o=localStorage.getItem("commentsLikeUnlike");if(o){const l=JSON.parse(o).filter(f=>f.videoId!==r.id||f.videoId===r.id&&f.videoType!==r.type),d=JSON.parse(o).find(f=>f.videoId===r.id&&f.videoType===r.type);if(l)if(d){const f=d.comments.filter(u=>u!==i);e?localStorage.setItem("commentsLikeUnlike",JSON.stringify([...l,{videoId:r.id,videoType:r.type,comments:[...f,i]}])):localStorage.setItem("commentsLikeUnlike",JSON.stringify([...l,{videoId:r.id,videoType:r.type,comments:f}]))}else localStorage.setItem("commentsLikeUnlike",JSON.stringify([...l,{videoId:r.id,videoType:r.type,comments:[i]}]))}else localStorage.setItem("commentsLikeUnlike",JSON.stringify([{videoId:r.id,videoType:r.type,comments:[i]}]))}},handleCloseCommentPopover=()=>{const i=store.dispatch;i(setCommentPopover(!1)),i(setComments(void 0))},isShowCommentSettings=i=>{const{params:e}=store.getState().videoData;return e.xToken?jwtDecode(e.xToken).sub===i:!1},getPointerTime=(i,e="")=>{const{videoElementSizeInfo:t}=store.getState().videoData,{duration:n,hlsLiveSyncPosition:s}=store.getState().controller,r=conditions(ConditionName.isLiveParam)?s:n,a=i.clientX!==void 0?i.clientX:i.touches[0].clientX;if(a<=t.right-footerPadding()&&a>footerPadding()){let l=(a-footerPadding()-t.left)/(t.width-2*footerPadding())*r;return e==="tooltipTime-live"&&(l=r-l),l}},getPointerPosition=i=>{const{videoElementSizeInfo:e}=store.getState().videoData,t=i.clientX!==void 0?i.clientX:i.touches[0].clientX;if(t<=e.right-footerPadding()&&t>footerPadding())return t-footerPadding()-e.left},getMarkerPosition=i=>{const{duration:e,hlsLiveSyncPosition:t}=store.getState().controller,n=conditions(ConditionName.isLiveParam)?t:e;return i*progressBarWidth()/n},hideProgressTooltip=i=>{i&&(i.style.opacity="0.0",i.style.pointerEvents="none",i.style.zIndex=zIndex.vttDisable)},generalStyleTooltipHandler=i=>{i.style.display="block",i.style.zIndex=zIndex.vtt,i.style.opacity=store.getState().videoData.details.vtt?"1.0":"0.6",i.style.pointerEvents="auto",i.style.transition="opacity 1s ease-out"},vttTooltipStyleHandler=(i,e)=>{const{videoElementSizeInfo:t}=store.getState().videoData,n=document.getElementsByClassName("pl-progressTooltip")[0],s=document.getElementById("parent-player");n&&s&&(getPointerPosition(i)>n.getBoundingClientRect().width/2&&getPointerPosition(i)<t.right-t.left-n.getBoundingClientRect().width/2?e.style.left=`${getPointerPosition(i)-n.offsetWidth/2}px`:getPointerPosition(i)<(s.offsetLeft===0?n.offsetWidth:s.offsetLeft)?e.style.left="0px":videoTag().offsetLeft+videoTag().offsetWidth<getPointerPosition(i)+n.offsetWidth&&(e.style.left=`${videoTag().offsetWidth-n.offsetWidth}px`))},showProgressTooltip=(i,e,t)=>{e&&generalStyleTooltipHandler(e),store.getState().videoData.details.vtt?vttTooltipStyleHandler(i,e):e.style.left=`${getPointerPosition(i)-30}px`,store.dispatch(setTooltipTime(Number(getPointerTime(i)))),t.textContent=conditions(ConditionName.isLiveParam)?`-${secondsToHMS(getPointerTime(i,"tooltipTime-live"))}`:`${secondsToHMS(getPointerTime(i))}`},handleTimeTooltip=(i,e=!1)=>{const{videoElementSizeInfo:t}=store.getState().videoData,n=document.querySelector(".pl-progressTooltip"),s=document.querySelector(".pl-progressTimeTooltip"),r=i.clientX!==void 0?i.clientX:i.touches[0].clientX;n&&s&&r<=t.right-footerPadding()&&r>t.left+footerPadding()?(showProgressTooltip(i,n,s),e&&setTimeout(()=>hideProgressTooltip(n),2e3)):hideProgressTooltip(n)},handleProgressTime=i=>{const e=i.clientX!==void 0?i.clientX:i.touches[0].clientX;progressBar()&&(e<=i.view.innerWidth-footerPadding()&&e>footerPadding()?progressBar().style.width=`${getPointerPosition(i)}px`:e<=i.view.innerWidth-footerPadding()?progressBar().style.width=0:e>footerPadding()&&(progressBar().style.width="100%"))},handlePointerDown=(i,e,t)=>{i.preventDefault(),i.stopPropagation(),t(!0);const n=store.dispatch,s=i.clientX!==void 0?i.clientX:i.touches[0].clientX;s<=i.view.innerWidth-footerPadding()&&s>footerPadding()&&(n(setActivePointerProgressBar(!0)),n(setDelayTurnOffControlbar(!0)),sessionStorage.setItem("previousVideoTime",String(videoTag().currentTime)),i.target.setPointerCapture(i.pointerId),e.length>0&&e.map(r=>clearTimeout(r)))},handlePointerMove=i=>{i.preventDefault(),i.stopPropagation();const e=store.dispatch,{activePointerProgressBar:t}=store.getState().controller,{left:n}=store.getState().videoData.videoElementSizeInfo,s=i.clientX!==void 0?i.clientX:i.touches[0].clientX,r=document.querySelector(".pl-progressTooltip");s>n+footerPadding()?(r&&(r.style.display="block !important",r.style.pointerEvents="auto"),t&&(e(setDelayTurnOffControlbar(!0)),handleTimeTooltip(i),handleProgressTime(i),videoTag().pause())):r&&(r.style.display="none !important",r.style.pointerEvents="none")},handlePointerUp=(i,e,t,n)=>{n(!1),i.preventDefault(),i.stopPropagation();const s=store.dispatch,{duration:r,hlsLiveSyncPosition:a}=store.getState().controller,{left:o,right:l}=store.getState().videoData.videoElementSizeInfo,d=conditions(ConditionName.isLiveParam)?a:r;i.target.removeEventListener("pointermove",handlePointerMove);const f=i.clientX!==void 0?i.clientX:i.touches[0].clientX;let u=0;f>o+footerPadding()&&f<l+footerPadding()?u=getPointerTime(i):f<o+footerPadding()?u=0:f>footerPadding()&&(u=d),conditions(ConditionName.isStaticFormat)||handleVideoTimeline(videoTag().currentTime,u),videoTag().currentTime=u,store.getState().controller.activePointerProgressBar&&(s(setActivePointerProgressBar(!1)),s(setDelayTurnOffControlbar(!1)),videoTag().play(),handleTimeTooltip(i,!0),sessionStorage.setItem("current-time",String(u)),handleProgressTime(i),handleTimeout(i,s,e,t))},handleTimeout=(i,e,t,n)=>{const s=n;let r=setTimeout(()=>{const{settingPopover:a,markersListPopover:o}=store.getState().popovers,{delayTurnOffControlbar:l}=store.getState().controller;i.pointerType==="touch"&&!a&&!o&&l&&e(setActiveElements(!1))},activeElementsTime);s.push(r),t(s)},handleCatchUpLoadingLog=()=>{const i=Date.now();videoTag().play().then(()=>sendFluentLog(catchUpLoadingLog(Date.now()-i)))},handleMouseMove=i=>handleTimeTooltip(i),handleMouseOut=()=>{const i=document.querySelector(".pl-progressTooltip");hideProgressTooltip(i)},deconstructTimestamp=i=>{const e=i.split("."),n=e[0].split(":");return{milliseconds:parseInt(e[1],10)||0,seconds:parseInt(n.pop(),10)||0,minutes:parseInt(n.pop(),10)||0,hours:parseInt(n.pop(),10)||0}},getSecondsFromTimestamp=i=>{const e=deconstructTimestamp(i);return parseInt(e.hours*(60*60)+e.minutes*60+e.seconds+e.milliseconds/1e3,10)},getPropsFromDef=i=>{const e=i.split(/#xywh=/i),t=e[0],s=e[1].match(/[0-9]+/gi);return{x:s[0],y:s[1],w:s[2],h:s[3],image:t}},getFullyQualifiedUrl=(i,e)=>i.indexOf("//")>=0?i:e.indexOf("//")===0?[e.replace(/\/$/gi,""),i.trim()].join("/"):e.indexOf("//")>0?[e.trim(),i.trim()].join("/"):i,getVttCss=(i,e)=>{const t={};let n=e.split(/\/\w+\.vtt\s?/)[0];if(i=getFullyQualifiedUrl(i,n),!i.match(/#xywh=/i))return t.background='url("'+i+e.split(/\/\w+\.vtt\s?/)[1]+'")',t;const s=getPropsFromDef(i);return t.background='url("'+s.image+e.split(/\/\w+\.vtt\s?/)[1]+'") no-repeat -'+s.x+"px -"+s.y+"px",t.width=s.w+"px",t.height=s.h+"px",t.url=s.image,t},fetchFile=(i,e)=>{fetch(i).then(t=>{if(!t.ok)throw store.dispatch(setInfo({...store.getState().videoData.details,vtt:void 0,vtt_mobile:void 0})),new Error("Network response was not ok");return t.text()}).then(t=>{const n=[];t.split(/[\r\n][\r\n]/i).forEach(r=>{if(r.match(/([0-9]{2}:)?([0-9]{2}:)?[0-9]{2}(.[0-9]{3})?( ?--> ?)([0-9]{2}:)?([0-9]{2}:)?[0-9]{2}(.[0-9]{3}).*/gi)){const a=r.split(/[\r\n]/i),l=a[0].split(/ ?--> ?/i),d=l[0],f=l[1],u=a[1],p=getVttCss(u,i);n.push({start:getSecondsFromTimestamp(d),end:getSecondsFromTimestamp(f),css:p})}}),e(n)}).catch(t=>{console.error("Error fetching file:",t)})},getStyleForTime=(i,e,t)=>{for(let n=0;n<e.length;++n){const s=e[n];if(i>=s.start&&i<s.end){if(s.css.url&&!t[s.css.url]){const r={background:s.css.background,width:s.css.width,height:s.css.height};return t[s.css.url]=r,r}else if(s.css.url)return t[s.css.url]}}},getFitMaxNumberCard=()=>Math.ceil(window.innerWidth*window.innerHeight/(265*149)),handleGetTags=(i,e,t,n)=>{const{details:s,params:r}=store.getState().videoData,{selectedTags:a,inputTagSearch:o}=store.getState().tags;i&&t.length&&get((l,d)=>{responseValidator(d)&&(l.results.length>0&&n(t.concat(l.results)),e(!1))},API().searchViewers,{tag:a.join(","),q:conditions(ConditionName.hasInputTagSearch)?o:void 0,user_ids:conditions(ConditionName.isUserIdsParamsEqualAll)?void 0:conditions(ConditionName.hasUserIds)?r.user_ids:s.user_id,limit:conditions(ConditionName.isComplexPortrait)?10:getFitMaxNumberCard(),offset:t.length})},handleClickTag=(i,e,t,n)=>{const s=store.dispatch,{details:r,params:a}=store.getState().videoData,{selectedTags:o,inputTagSearch:l}=store.getState().tags,d=handleContentType();sendFluentLog(searchLog(d)),n&&n(!0),get((f,u)=>{responseValidator(u)&&(i(f.count),f.results.length>0?(s(setTagsPopover(!0)),t(f.results)):t([])),n&&n(!1)},API().searchViewers,{tag:o.join(","),q:conditions(ConditionName.hasInputTagSearch)?l:void 0,user_ids:conditions(ConditionName.isUserIdsParamsEqualAll)?void 0:conditions(ConditionName.hasUserIds)?a.user_ids:r.user_id,limit:e.length+(conditions(ConditionName.isComplexPortrait)?10:getFitMaxNumberCard()),offset:0,video_type:d})},handleClickPlayerCardTag=(i,e)=>{const t=store.dispatch,{selectedTags:n}=store.getState().tags;i.preventDefault(),i.stopPropagation(),n.includes(e)||(t(setPlayListCardPopover(!1)),t(setTagsPopover(!0)),t(setSelectedTags([...n,e])),sendFluentLog(tagClickLog(e.trim())))},getAllViewersTagList=async()=>{const{details:i,params:e}=store.getState().videoData,{selectedTags:t}=store.getState().tags;return new Promise(async n=>{try{const s=await getAll(API().viewersTagList(e.type),[],{user_ids:conditions(ConditionName.isUserIdsParamsEqualAll)?void 0:conditions(ConditionName.hasUserIds)?e.user_ids:i.user_id,tag:t.join(",")});n(s)}catch{}})},handleViewersTagList=async()=>{const i=store.dispatch,{selectedTags:e}=store.getState().tags,t=await getAllViewersTagList();if(t){let n=[];t.map(s=>n.push(s.tag.trim())),n=[...new Set(n)],i(setViewersTagsList(n.filter(s=>s!==e[0])))}},handleCloseTagPopover=()=>{const i=store.dispatch;i(setTagsPopover(!1)),i(setSelectedTags([])),i(setInputTagSearch("")),i(setIsMovieFilter(!1)),i(setIsSeriesFilter(!1)),i(setInputFilterTagSearch(""))},handleTagInput=(i,e,t,n,s,r,a)=>{const o=store.dispatch;o(setInputTagSearch(i)),e(!0),clearTimeout(t.current),t.current=setTimeout(()=>{handleClickTag(n,s,r,a),e(!1)},500)},handleCloseSelectedTags=i=>{const e=store.dispatch,{selectedTags:t,viewersTagsList:n}=store.getState().tags;e(setSelectedTags(t.filter(s=>s!==i))),e(setViewersTagsList([i,...n]))},handleClickViewersTagList=i=>{const e=store.dispatch,{selectedTags:t,viewersTagsList:n}=store.getState().tags;e(setSelectedTags([...t,i])),e(setViewersTagsList(n.filter(s=>s!==i)))},handleClearTagInput=(i,e,t)=>{const n=store.dispatch;n(setInputTagSearch("")),handleClickTag(i,e,t)},handleNextTag=(i,e)=>{i.preventDefault(),i.stopPropagation(),e.current.scrollLeft-=e.current.clientWidth},handlePrevTag=(i,e)=>{i.preventDefault(),i.stopPropagation(),e.current.scrollLeft+=e.current.clientWidth},handleScrollLeft=(i,e)=>{i.preventDefault(),i.stopPropagation();const t=document.getElementById(e);t&&(t.scrollLeft-=50)},handleScrollRight=(i,e)=>{i.preventDefault(),i.stopPropagation();const t=document.getElementById(e);t&&(t.scrollLeft+=50)},handleSearchResultClick=(i,e,t,n,s,r)=>{const a=store.dispatch;handleRipple(i,`tagVideoList-${n}`,150),s===ContentTypesString.PlayList?(a(setPlayListCardPopover(!0)),t.current=e):sendFluentLog(searchResultClickLog(n,s,r))},createSettings=async i=>{i={...i,quality:conditions(ConditionName.isAutoQuality)?null:i.quality},conditions(ConditionName.isLogin)&&conditions(ConditionName.trackerEnabled)&&await apiCaller({url:API().user.createSettings,method:"POST",data:i,headers:handleHasXTokenParamOrSendXToken()})},createVideoSettings=async i=>{const{params:e,details:t}=store.getState().videoData;conditions(ConditionName.isLogin)&&conditions(ConditionName.trackerEnabled)&&await apiCaller({url:API().user.createVideoMetaData,method:"POST",data:{video_id:i.video_id??conditions(ConditionName.isLiveParam)?t.id:+e.id,video_type:i.video_type??handleVideoType(),...i},headers:handleHasXTokenParamOrSendXToken()})},handleBookmark=async(i,e,t)=>{if(i&&i.stopPropagation(),conditions(ConditionName.hasXToken)){const n=store.dispatch,{bookmarks:s,bookmarkId:r}=store.getState().user;if(conditions(ConditionName.isBookmark)||t==="delete"){if(conditions(ConditionName.trackerEnabled)){const{status:a,data:o}=await apiCaller({url:API().user.deleteBookmark(e),method:"DELETE",headers:handleHasXTokenParamOrSendXToken()});responseValidator(a)?(n(setBookmarks(s.filter(l=>e?l.id!==e:l.id!==r))),n(setBookmarkId(void 0)),sendFluentLog(bookmarkLog("unBookmark"))):ae({type:"error",title:o.detail})}}else{const{details:a,params:o}=store.getState().videoData,l={object_link:window.location.href,cover_url:a.banner,title:a.title,category:handleGetBookmarkCategory(o.provider)};if(conditions(ConditionName.trackerEnabled)){const{data:d,status:f}=await apiCaller({url:API().user.bookmarks,method:"POST",data:l,headers:handleHasXTokenParamOrSendXToken()});responseValidator(f)?(n(setBookmarks([d,...s])),n(setBookmarkId(d.id)),sendFluentLog(bookmarkLog("bookmark"))):ae({type:"error",title:d.detail})}}}else ae({title:"لطفا ابتدا وارد شوید.",type:"error"})},authToken={key:"HAMRAHI_CLOUD_AUTH_TOKEN",get:()=>{const i=api.get(authToken.key);return i?JSON.parse(i):null},set:i=>api.set(authToken.key,JSON.stringify(i),{expires:1095,sameSite:"none",secure:!0}),remove:()=>api.remove(authToken.key)},handleAutoFullScreen=()=>{const i=store.dispatch,{params:e}=store.getState().videoData,t=n=>{n.requestFullScreen?n.requestFullScreen():n.mozRequestFullScreen?n.mozRequestFullScreen():n.webkitRequestFullScreen&&n.webkitRequestFullScreen()};i(setClearPopoversSlice()),t(document.documentElement),i(setIsFullScreen(e.fullscreen==="true")),conditions(ConditionName.isComplexDesktop)&&i(setIsComplexDesktop(!1)),conditions(ConditionName.isTouchScreen)&&conditions(ConditionName.isParamsPortrait)&&i(setIsComplexPortrait(e.fullscreen!=="true"))},appendQueryParamsToChunksIOS=()=>{let i=".ts",e=XMLHttpRequest.prototype.open;XMLHttpRequest.prototype.open=function(){const{daaniToken:t}=store.getState().videoData.params;let n=`?uuid=${getUUID()}`;conditions(ConditionName.hasDaaniTokenParams)&&(n=`${n}&ext_user=${t}`),arguments[1].endsWith(i)&&(arguments[1]=arguments[1]+n),e.apply(this,arguments)}},handleBufferedTime=(i,e)=>{const t=store.dispatch;e.current=setInterval(()=>{const s=i.target.buffered.end(0)/videoTag().duration*100;t(setBufferedTimeWidth(s))},500)},handleHlsConfig=()=>{const{params:i,streamLinkParams:e}=store.getState().videoData;return{xhrSetup:(t,n)=>{n.split("m3u8")[1]||(n=`${n}${e}`),t.open("GET",n,!0)},startLevel:i.type==="live"?1:-1,debug:!1,enableWorker:!0,liveDurationInfinity:conditions(ConditionName.hasQuizParams)||!conditions(ConditionName.hasTimeMachine),maxLiveSyncPlaybackRate:conditions(ConditionName.hasQuizParams)||!conditions(ConditionName.hasTimeMachine)?2:1,abrBandWidthUpFactor:conditions(ConditionName.hasQuizParams)||!conditions(ConditionName.hasTimeMachine)?.6:.7,abrBandWidthFactor:conditions(ConditionName.hasQuizParams)||!conditions(ConditionName.hasTimeMachine)?.8:.95,backBufferLength:conditions(ConditionName.hasQuizParams)||!conditions(ConditionName.hasTimeMachine)?2:1/0,maxBufferLength:conditions(ConditionName.hasQuizParams)||!conditions(ConditionName.hasTimeMachine)?12:30,maxMaxBufferLength:conditions(ConditionName.hasQuizParams)||!conditions(ConditionName.hasTimeMachine)?600:60,liveSyncDuration:conditions(ConditionName.hasQuizParams)||!conditions(ConditionName.hasTimeMachine)?3:LiveDelay,liveMaxLatencyDuration:conditions(ConditionName.hasQuizParams)||!conditions(ConditionName.hasTimeMachine)?8:void 0,manifestLoadPolicy:{default:{maxTimeToFirstByteMs:1/0,maxLoadTimeMs:2e4,timeoutRetry:{maxNumRetry:10,retryDelayMs:5e3,maxRetryDelayMs:1e4},errorRetry:{maxNumRetry:10,retryDelayMs:5e3,maxRetryDelayMs:1e4}}},fragLoadPolicy:{default:{maxTimeToFirstByteMs:1e4,maxLoadTimeMs:12e4,timeoutRetry:{maxNumRetry:10,retryDelayMs:5e3,maxRetryDelayMs:1e4},errorRetry:{maxNumRetry:10,retryDelayMs:5e3,maxRetryDelayMs:1e4}}},playlistLoadPolicy:{default:{maxTimeToFirstByteMs:1e4,maxLoadTimeMs:2e4,timeoutRetry:{maxNumRetry:10,retryDelayMs:5e3,maxRetryDelayMs:1e4},errorRetry:{maxNumRetry:10,retryDelayMs:5e3,maxRetryDelayMs:1e4}}}}},handleMultiLiveHlsConfig=()=>{const{streamLinkParams:i}=store.getState().videoData;return{xhrSetup:(e,t)=>{t=`${t}${i}`,e.open("GET",t,!0)},startLevel:1,debug:!1,liveSyncDuration:LiveDelay,maxMaxBufferLength:60,playlistLoadPolicy:{default:{maxTimeToFirstByteMs:1e4,maxLoadTimeMs:2e4,timeoutRetry:{maxNumRetry:1e3,retryDelayMs:0,maxRetryDelayMs:0},errorRetry:{maxNumRetry:1e3,retryDelayMs:1e3,maxRetryDelayMs:1e3}}}}},handleManifestParsed=(i,e)=>{const t=store.dispatch;let n=[],s=[""],r=[];if(i.levels.map(a=>{n.push(a.attrs.RESOLUTION.split("x")[1].trim()),s.push(`${(a.bitrate/1e3).toFixed(0)}kbps`),r.push(a.attrs.RESOLUTION)}),i.autoLevelCapping=highestResolutionSupported(r,window.innerWidth,window.innerHeight),t(setQualityLevels(n)),t(setQualityBitrates(s)),["fullscreenchange","webkitfullscreenchange","mozfullscreenchange","msfullscreenchange"].forEach(a=>document.addEventListener(a,()=>{conditions(ConditionName.isAutoQuality)&&(i.autoLevelCapping=highestResolutionSupported(r,window.innerWidth,window.innerHeight),i.nextLevel=-1)},!1)),e.audioTracks.length>0){const a=e.audioTracks.sort(o=>o.default===!0?-1:1);t(setMultiAudio(a))}},handleManifestLoaded=i=>i.audioTrack=0,handleMediaAttached=(i,e)=>{const{params:t,details:n}=store.getState().videoData;let s=conditions(ConditionName.isGeneral)?t.src:n.stream_link;e.loadSource(s),e.on(i.Events.MANIFEST_PARSED,(r,a)=>handleManifestParsed(e,a)),e.on(i.Events.MANIFEST_LOADED,()=>handleManifestLoaded(e))},handleLevels=(i,e,t)=>{if(e.frag.type!=="audio"){const n=store.dispatch,{settings:s}=store.getState().user,{qualityLevels:r,manualQuality:a,autoQuality:o}=store.getState().controller;conditions(ConditionName.isAutoQuality)?conditions(ConditionName.isAutoQuality)&&o===void 0?(i.nextLevel=-1,t(r[e.frag.level]),n(setAutoQuality(e.frag.level))):conditions(ConditionName.isAutoQuality)&&(t(r[e.frag.level]),o!==e.frag.level&&n(setAutoQuality(e.frag.level))):(e.frag.level!==a&&(i.nextLevel=r[s.quality]?s.quality:-1),r[s.quality]?(n(setManualQuality(s.quality)),n(setAutoQuality(void 0))):(t(r[e.frag.level]),n(setAutoQuality(e.frag.level)),n(setUserSettings({...s,quality:-1})),createSettings({...s,quality:null})))}},handleFragBuffered=i=>{var s;const e=store.dispatch;store.getState().controller.loadedFragmentsCount.length<Number(getInitialLoadedFragmentCount())&&e(setLoadedFragmentsCount([...new Set([...store.getState().controller.loadedFragmentsCount,i.abrController.fragCurrent.sn])]));const n=((s=i.mainForwardBufferInfo)==null?void 0:s.end)/videoTag().duration*100;e(setBufferedTimeWidth(n))},handleFragLoading=i=>{const e=store.dispatch;conditions(ConditionName.isLiveParam)&&e(setHlsLivePosition(i.liveSyncPosition))},handleFragChanged=(i,e,t,n)=>{const{params:s,multiAudio:r,selectedAudioId:a}=store.getState().videoData;r&&a!==void 0&&a!==e.audioTrack&&(e.audioTrack=a,e.trigger(i.Events.AUDIO_TRACK_LOADING,r[a])),(s.type||!conditions(ConditionName.isLiveParam))&&handleLevels(e,t,n)},handleFragParsed=(i,e,t)=>{const{type:n}=store.getState().videoData.params;(n||n==="live")&&handleLevels(i,e,t)},handleHlsErrors=(i,e)=>{if(e.event!=="hlsAudioTrackLoading")return{type:"HLS_"+e.type,message:e.error.message}},handlePreview=i=>{const e=store.dispatch,{params:t,details:n}=store.getState().videoData,s=conditions(ConditionName.hasPreviewStart)?n.preview_start:0,r=conditions(ConditionName.hasPreviewEnd)?n.preview_end:videoTag()?videoTag().duration:0;t.preview==="true"&&i.target.currentTime>=r&&(videoTag().currentTime=s,e(setCurrentTime(s)))},handleVideoWaiting=(i,e)=>{const t=store.dispatch;i.preventDefault(),e.current=Date.now(),t(setIsLoading(!0))},handleVideoSeeking=(i,e)=>{const t=store.dispatch;i.preventDefault(),e.current=0,t(setIsLoading(!0))},handleVideoTime=()=>{const{params:i}=store.getState().videoData,{videoSettings:e}=store.getState().user,t=store.dispatch;videoTag().currentTime=i.t?+i.t:e.time,t(setCurrentTime(i.t?+i.t:e.time))},handleVideoPlay=(i,e)=>{const t=store.dispatch,{details:n}=store.getState().videoData;if(i.preventDefault(),e.current=Date.now(),t(setPlay(!0)),conditions(ConditionName.isFirstPlay)){if(conditions(ConditionName.has360)&&(handle360(),setTimeout(()=>handleVideoTime(),200)),!conditions(ConditionName.has360)&&!conditions(ConditionName.isLiveParam)&&handleVideoTime(),conditions(ConditionName.hasFullScreenParams)&&handleAutoFullScreen(),conditions(ConditionName.isFullScreen)&&handleLockOrientation(),conditions(ConditionName.hasPreviewParams)){const s=n.preview_start?n.preview_start:0;videoTag().currentTime=s,t(setCurrentTime(s))}t(setVideoTimelines([Math.floor(videoTag().currentTime)]))}sendFluentLog(pausePlayLog(!0)),t(setSubtitleText(""))},handleVideoPlaying=(i,e,t,n,s,r,a,o)=>{const l=store.dispatch,{autoQuality:d,canPlayVideo:f,firstPlay:u,qualityLevels:p}=store.getState().controller,{settings:m}=store.getState().user,g=m.quality===-1&&d?p[d]:p[m.quality];let y=0;a.current&&(y=Date.now()-a.current),u&&videoTag().played&&sendFluentLog(initLog(e.current,Date.now()-t.current,n.current-t.current,Date.now()-s.current,s)),l(setFirstPlay(!1)),f&&y>0&&g!==void 0&&(r.current=y,a.current=0,sendFluentLog(loadingLog(y,g,s,i,o.current)),i.current=i.current+1,s.current=Date.now())},handleVideoPause=i=>{const e=store.dispatch;i.preventDefault(),sendFluentLog(pausePlayLog(!1)),e(setPlay(!1))},handleVideoTimeUpdate=i=>{const e=store.dispatch,{selectedSubtitle:t}=store.getState().videoData;i.preventDefault(),handlePreview(i),e(setCurrentTime(i.target.currentTime)),conditions(ConditionName.hasActiveCue)&&e(setSubtitleText(t.activeCues[0].text))},handleVideoCanPlay=i=>{const e=store.dispatch,{settings:t}=store.getState().user;if(i.preventDefault(),e(setIsLoading(!1)),e(setCanPlayVideo(!0)),videoTag().volume=t.volume/100,conditions(ConditionName.isIOSLive)||e(setDuration(i.target.duration)),conditions(ConditionName.isIOS)){const n=Object.values(i.target.textTracks);n&&n.length&&e(setSubtitles(Object.values(n[0]).length?n:[]))}else e(setSubtitles(Object.values(i.target.textTracks)))},handleVideoEnded=i=>{const e=store.dispatch,{params:t}=store.getState().videoData;i.preventDefault(),e(setIsLiveError(!0)),e(setIsEnded(!0)),e(setActiveElements(!0)),handleVideoTimeline(videoTag().duration),conditions(ConditionName.hasOnFinishedParams)&&t.onFinished()},handleVideoError=i=>{i.preventDefault();let e=videoTag().error;if(e)switch(e.code){case e.MEDIA_ERR_ABORTED:errorLogProvider({type:"videoTagError",message:"You aborted the video playback."});break;case e.MEDIA_ERR_NETWORK:errorLogProvider({type:"videoTagError",message:"A network error caused the video download to fail part-way."});break;case e.MEDIA_ERR_DECODE:errorLogProvider({type:"videoTagError",message:"The video playback was aborted due to a corruption problem or because the video used features your browser did not support."});break;case e.MEDIA_ERR_SRC_NOT_SUPPORTED:errorLogProvider({type:"videoTagError",message:"The video could not be loaded, either because the server or network failed or because the format is not supported."});break;default:errorLogProvider({type:"videoTagError",message:"An unknown error occurred."});break}else errorLogProvider({type:"videoTagError",message:"An error occurred, but the error object is not available."})},handleIosVideoPlay=(i,e)=>{const t=store.dispatch;i.preventDefault(),e.current=Date.now(),t(setFirstPlay(!1)),conditions(ConditionName.isFirstPlay)&&conditions(ConditionName.has360)&&handle360()},handleIosVideoPlaying=()=>{const i=store.dispatch;i(setIsLoading(!1))},handleIosVideoTimeUpdate=i=>{const e=store.dispatch;i.preventDefault(),e(setCurrentTime(i.target.currentTime)),handlePreview(i)},handleIosVideoEnded=()=>{const{params:i}=store.getState().videoData;conditions(ConditionName.hasOnFinishedParams)&&i.onFinished()},handleStaticVideoPause=i=>{const e=store.dispatch;i.preventDefault(),e(setPlay(!1))},handleStaticVideoPlay=(i,e)=>{const t=store.dispatch;i.preventDefault(),t(setPlay(!0)),e.current=Date.now(),conditions(ConditionName.isFirstPlay)&&conditions(ConditionName.hasFullScreenParams)&&handleAutoFullScreen(),conditions(ConditionName.isFullScreen)&&handleLockOrientation()},handleStaticVideoPlaying=(i,e,t)=>{const n=store.dispatch,{firstPlay:s}=store.getState().controller;n(setIsLoading(!1)),s&&videoTag().played&&sendFluentLog(initLog(Math.round(i.current),Date.now()-e.current,0,Date.now()-t.current,t)),n(setFirstPlay(!1))},handleStaticVideoTimeUpdate=i=>{const e=store.dispatch;i.preventDefault(),e(setCurrentTime(i.target.currentTime)),e(setDuration(i.target.duration))},handleStaticVideoCanPlay=i=>{const e=store.dispatch;i.preventDefault(),e(setIsLoading(!1)),e(setCanPlayVideo(!0))},handleStaticVideoLoadedData=(i,e)=>{i.preventDefault(),handleBufferedTime(i,e)},handleStaticVideoEnded=i=>{const{params:e}=store.getState().videoData;conditions(ConditionName.hasOnFinishedParams)&&e.onFinished(),i.preventDefault()},handleMultiLiveManifestParsed=i=>i.nextLevel=i.levels.findIndex(e=>e.attrs.RESOLUTION.split("x")[1].trim()==="144"),handleMultiLiveMediaAttached=async(i,e)=>{const{multiLives:t}=store.getState().videoData,{stream_link:n}=await getLiveAndVodDetails(t[0].user_id);e.loadSource(n),e.on(i.Events.MANIFEST_PARSED,()=>handleMultiLiveManifestParsed(e))},handleMultiLiveFragLoading=async i=>{const e=store.dispatch;conditions(ConditionName.isLiveParam)&&e(setHlsLivePosition(i.liveSyncPosition))},handleVideoVisibilityChange=i=>{handleVideoTimeline(videoTag().currentTime),handleContinuousPlayback(),conditions(ConditionName.isVisibilityChange)&&(document.hidden?i.stopLoad():i.startLoad())};var resolveConfig$2={},resolveConfig$1={},negateValue={},hasRequiredNegateValue;function requireNegateValue(){return hasRequiredNegateValue||(hasRequiredNegateValue=1,function(i){Object.defineProperty(i,"__esModule",{value:!0}),Object.defineProperty(i,"default",{enumerable:!0,get:function(){return e}});function e(t){if(t=`${t}`,t==="0")return"0";if(/^[+-]?(\d+|\d*\.\d+)(e[+-]?\d+)?(%|\w+)?$/.test(t))return t.replace(/^[+-]?/,s=>s==="-"?"":"-");let n=["var","calc","min","max","clamp"];for(const s of n)if(t.includes(`${s}(`))return`calc(${t} * -1)`}}(negateValue)),negateValue}var corePluginList={},hasRequiredCorePluginList;function requireCorePluginList(){return hasRequiredCorePluginList||(hasRequiredCorePluginList=1,function(i){Object.defineProperty(i,"__esModule",{value:!0}),Object.defineProperty(i,"default",{enumerable:!0,get:function(){return e}});const e=["preflight","container","accessibility","pointerEvents","visibility","position","inset","isolation","zIndex","order","gridColumn","gridColumnStart","gridColumnEnd","gridRow","gridRowStart","gridRowEnd","float","clear","margin","boxSizing","lineClamp","display","aspectRatio","size","height","maxHeight","minHeight","width","minWidth","maxWidth","flex","flexShrink","flexGrow","flexBasis","tableLayout","captionSide","borderCollapse","borderSpacing","transformOrigin","translate","rotate","skew","scale","transform","animation","cursor","touchAction","userSelect","resize","scrollSnapType","scrollSnapAlign","scrollSnapStop","scrollMargin","scrollPadding","listStylePosition","listStyleType","listStyleImage","appearance","columns","breakBefore","breakInside","breakAfter","gridAutoColumns","gridAutoFlow","gridAutoRows","gridTemplateColumns","gridTemplateRows","flexDirection","flexWrap","placeContent","placeItems","alignContent","alignItems","justifyContent","justifyItems","gap","space","divideWidth","divideStyle","divideColor","divideOpacity","placeSelf","alignSelf","justifySelf","overflow","overscrollBehavior","scrollBehavior","textOverflow","hyphens","whitespace","textWrap","wordBreak","borderRadius","borderWidth","borderStyle","borderColor","borderOpacity","backgroundColor","backgroundOpacity","backgroundImage","gradientColorStops","boxDecorationBreak","backgroundSize","backgroundAttachment","backgroundClip","backgroundPosition","backgroundRepeat","backgroundOrigin","fill","stroke","strokeWidth","objectFit","objectPosition","padding","textAlign","textIndent","verticalAlign","fontFamily","fontSize","fontWeight","textTransform","fontStyle","fontVariantNumeric","lineHeight","letterSpacing","textColor","textOpacity","textDecoration","textDecorationColor","textDecorationStyle","textDecorationThickness","textUnderlineOffset","fontSmoothing","placeholderColor","placeholderOpacity","caretColor","accentColor","opacity","backgroundBlendMode","mixBlendMode","boxShadow","boxShadowColor","outlineStyle","outlineWidth","outlineOffset","outlineColor","ringWidth","ringColor","ringOpacity","ringOffsetWidth","ringOffsetColor","blur","brightness","contrast","dropShadow","grayscale","hueRotate","invert","saturate","sepia","filter","backdropBlur","backdropBrightness","backdropContrast","backdropGrayscale","backdropHueRotate","backdropInvert","backdropOpacity","backdropSaturate","backdropSepia","backdropFilter","transitionProperty","transitionDelay","transitionDuration","transitionTimingFunction","willChange","contain","content","forcedColorAdjust"]}(corePluginList)),corePluginList}var configurePlugins={},hasRequiredConfigurePlugins;function requireConfigurePlugins(){return hasRequiredConfigurePlugins||(hasRequiredConfigurePlugins=1,function(i){Object.defineProperty(i,"__esModule",{value:!0}),Object.defineProperty(i,"default",{enumerable:!0,get:function(){return e}});function e(t,n){return t===void 0?n:Array.isArray(t)?t:[...new Set(n.filter(r=>t!==!1&&t[r]!==!1).concat(Object.keys(t).filter(r=>t[r]!==!1)))]}}(configurePlugins)),configurePlugins}var colors$3={},log={},picocolors_browser={exports:{}},hasRequiredPicocolors_browser;function requirePicocolors_browser(){if(hasRequiredPicocolors_browser)return picocolors_browser.exports;hasRequiredPicocolors_browser=1;var i=String,e=function(){return{isColorSupported:!1,reset:i,bold:i,dim:i,italic:i,underline:i,inverse:i,hidden:i,strikethrough:i,black:i,red:i,green:i,yellow:i,blue:i,magenta:i,cyan:i,white:i,gray:i,bgBlack:i,bgRed:i,bgGreen:i,bgYellow:i,bgBlue:i,bgMagenta:i,bgCyan:i,bgWhite:i,blackBright:i,redBright:i,greenBright:i,yellowBright:i,blueBright:i,magentaBright:i,cyanBright:i,whiteBright:i,bgBlackBright:i,bgRedBright:i,bgGreenBright:i,bgYellowBright:i,bgBlueBright:i,bgMagentaBright:i,bgCyanBright:i,bgWhiteBright:i}};return picocolors_browser.exports=e(),picocolors_browser.exports.createColors=e,picocolors_browser.exports}var hasRequiredLog;function requireLog(){return hasRequiredLog||(hasRequiredLog=1,function(i){Object.defineProperty(i,"__esModule",{value:!0});function e(l,d){for(var f in d)Object.defineProperty(l,f,{enumerable:!0,get:d[f]})}e(i,{dim:function(){return a},default:function(){return o}});const t=n(requirePicocolors_browser());function n(l){return l&&l.__esModule?l:{default:l}}let s=new Set;function r(l,d,f){typeof process<"u"&&process.env.JEST_WORKER_ID||f&&s.has(f)||(f&&s.add(f),console.warn(""),d.forEach(u=>console.warn(l,"-",u)))}function a(l){return t.default.dim(l)}const o={info(l,d){r(t.default.bold(t.default.cyan("info")),...Array.isArray(l)?[l]:[d,l])},warn(l,d){r(t.default.bold(t.default.yellow("warn")),...Array.isArray(l)?[l]:[d,l])},risk(l,d){r(t.default.bold(t.default.magenta("risk")),...Array.isArray(l)?[l]:[d,l])}}}(log)),log}var hasRequiredColors;function requireColors(){return hasRequiredColors||(hasRequiredColors=1,function(i){Object.defineProperty(i,"__esModule",{value:!0}),Object.defineProperty(i,"default",{enumerable:!0,get:function(){return s}});const e=t(requireLog());function t(r){return r&&r.__esModule?r:{default:r}}function n({version:r,from:a,to:o}){e.default.warn(`${a}-color-renamed`,[`As of Tailwind CSS ${r}, \`${a}\` has been renamed to \`${o}\`.`,"Update your configuration file to silence this warning."])}const s={inherit:"inherit",current:"currentColor",transparent:"transparent",black:"#000",white:"#fff",slate:{50:"#f8fafc",100:"#f1f5f9",200:"#e2e8f0",300:"#cbd5e1",400:"#94a3b8",500:"#64748b",600:"#475569",700:"#334155",800:"#1e293b",900:"#0f172a",950:"#020617"},gray:{50:"#f9fafb",100:"#f3f4f6",200:"#e5e7eb",300:"#d1d5db",400:"#9ca3af",500:"#6b7280",600:"#4b5563",700:"#374151",800:"#1f2937",900:"#111827",950:"#030712"},zinc:{50:"#fafafa",100:"#f4f4f5",200:"#e4e4e7",300:"#d4d4d8",400:"#a1a1aa",500:"#71717a",600:"#52525b",700:"#3f3f46",800:"#27272a",900:"#18181b",950:"#09090b"},neutral:{50:"#fafafa",100:"#f5f5f5",200:"#e5e5e5",300:"#d4d4d4",400:"#a3a3a3",500:"#737373",600:"#525252",700:"#404040",800:"#262626",900:"#171717",950:"#0a0a0a"},stone:{50:"#fafaf9",100:"#f5f5f4",200:"#e7e5e4",300:"#d6d3d1",400:"#a8a29e",500:"#78716c",600:"#57534e",700:"#44403c",800:"#292524",900:"#1c1917",950:"#0c0a09"},red:{50:"#fef2f2",100:"#fee2e2",200:"#fecaca",300:"#fca5a5",400:"#f87171",500:"#ef4444",600:"#dc2626",700:"#b91c1c",800:"#991b1b",900:"#7f1d1d",950:"#450a0a"},orange:{50:"#fff7ed",100:"#ffedd5",200:"#fed7aa",300:"#fdba74",400:"#fb923c",500:"#f97316",600:"#ea580c",700:"#c2410c",800:"#9a3412",900:"#7c2d12",950:"#431407"},amber:{50:"#fffbeb",100:"#fef3c7",200:"#fde68a",300:"#fcd34d",400:"#fbbf24",500:"#f59e0b",600:"#d97706",700:"#b45309",800:"#92400e",900:"#78350f",950:"#451a03"},yellow:{50:"#fefce8",100:"#fef9c3",200:"#fef08a",300:"#fde047",400:"#facc15",500:"#eab308",600:"#ca8a04",700:"#a16207",800:"#854d0e",900:"#713f12",950:"#422006"},lime:{50:"#f7fee7",100:"#ecfccb",200:"#d9f99d",300:"#bef264",400:"#a3e635",500:"#84cc16",600:"#65a30d",700:"#4d7c0f",800:"#3f6212",900:"#365314",950:"#1a2e05"},green:{50:"#f0fdf4",100:"#dcfce7",200:"#bbf7d0",300:"#86efac",400:"#4ade80",500:"#22c55e",600:"#16a34a",700:"#15803d",800:"#166534",900:"#14532d",950:"#052e16"},emerald:{50:"#ecfdf5",100:"#d1fae5",200:"#a7f3d0",300:"#6ee7b7",400:"#34d399",500:"#10b981",600:"#059669",700:"#047857",800:"#065f46",900:"#064e3b",950:"#022c22"},teal:{50:"#f0fdfa",100:"#ccfbf1",200:"#99f6e4",300:"#5eead4",400:"#2dd4bf",500:"#14b8a6",600:"#0d9488",700:"#0f766e",800:"#115e59",900:"#134e4a",950:"#042f2e"},cyan:{50:"#ecfeff",100:"#cffafe",200:"#a5f3fc",300:"#67e8f9",400:"#22d3ee",500:"#06b6d4",600:"#0891b2",700:"#0e7490",800:"#155e75",900:"#164e63",950:"#083344"},sky:{50:"#f0f9ff",100:"#e0f2fe",200:"#bae6fd",300:"#7dd3fc",400:"#38bdf8",500:"#0ea5e9",600:"#0284c7",700:"#0369a1",800:"#075985",900:"#0c4a6e",950:"#082f49"},blue:{50:"#eff6ff",100:"#dbeafe",200:"#bfdbfe",300:"#93c5fd",400:"#60a5fa",500:"#3b82f6",600:"#2563eb",700:"#1d4ed8",800:"#1e40af",900:"#1e3a8a",950:"#172554"},indigo:{50:"#eef2ff",100:"#e0e7ff",200:"#c7d2fe",300:"#a5b4fc",400:"#818cf8",500:"#6366f1",600:"#4f46e5",700:"#4338ca",800:"#3730a3",900:"#312e81",950:"#1e1b4b"},violet:{50:"#f5f3ff",100:"#ede9fe",200:"#ddd6fe",300:"#c4b5fd",400:"#a78bfa",500:"#8b5cf6",600:"#7c3aed",700:"#6d28d9",800:"#5b21b6",900:"#4c1d95",950:"#2e1065"},purple:{50:"#faf5ff",100:"#f3e8ff",200:"#e9d5ff",300:"#d8b4fe",400:"#c084fc",500:"#a855f7",600:"#9333ea",700:"#7e22ce",800:"#6b21a8",900:"#581c87",950:"#3b0764"},fuchsia:{50:"#fdf4ff",100:"#fae8ff",200:"#f5d0fe",300:"#f0abfc",400:"#e879f9",500:"#d946ef",600:"#c026d3",700:"#a21caf",800:"#86198f",900:"#701a75",950:"#4a044e"},pink:{50:"#fdf2f8",100:"#fce7f3",200:"#fbcfe8",300:"#f9a8d4",400:"#f472b6",500:"#ec4899",600:"#db2777",700:"#be185d",800:"#9d174d",900:"#831843",950:"#500724"},rose:{50:"#fff1f2",100:"#ffe4e6",200:"#fecdd3",300:"#fda4af",400:"#fb7185",500:"#f43f5e",600:"#e11d48",700:"#be123c",800:"#9f1239",900:"#881337",950:"#4c0519"},get lightBlue(){return n({version:"v2.2",from:"lightBlue",to:"sky"}),this.sky},get warmGray(){return n({version:"v3.0",from:"warmGray",to:"stone"}),this.stone},get trueGray(){return n({version:"v3.0",from:"trueGray",to:"neutral"}),this.neutral},get coolGray(){return n({version:"v3.0",from:"coolGray",to:"gray"}),this.gray},get blueGray(){return n({version:"v3.0",from:"blueGray",to:"slate"}),this.slate}}}(colors$3)),colors$3}var defaults$2={},hasRequiredDefaults;function requireDefaults(){return hasRequiredDefaults||(hasRequiredDefaults=1,function(i){Object.defineProperty(i,"__esModule",{value:!0}),Object.defineProperty(i,"defaults",{enumerable:!0,get:function(){return e}});function e(t,...n){for(let a of n){for(let o in a){var s;!(t==null||(s=t.hasOwnProperty)===null||s===void 0)&&s.call(t,o)||(t[o]=a[o])}for(let o of Object.getOwnPropertySymbols(a)){var r;!(t==null||(r=t.hasOwnProperty)===null||r===void 0)&&r.call(t,o)||(t[o]=a[o])}}return t}}(defaults$2)),defaults$2}var toPath={},hasRequiredToPath;function requireToPath(){return hasRequiredToPath||(hasRequiredToPath=1,function(i){Object.defineProperty(i,"__esModule",{value:!0}),Object.defineProperty(i,"toPath",{enumerable:!0,get:function(){return e}});function e(t){if(Array.isArray(t))return t;let n=t.split("[").length-1,s=t.split("]").length-1;if(n!==s)throw new Error(`Path is invalid. Has unbalanced brackets: ${t}`);return t.split(/\.(?![^\[]*\])|[\[\]]/g).filter(Boolean)}}(toPath)),toPath}var normalizeConfig={},featureFlags={},hasRequiredFeatureFlags;function requireFeatureFlags(){return hasRequiredFeatureFlags||(hasRequiredFeatureFlags=1,function(i){Object.defineProperty(i,"__esModule",{value:!0});function e(u,p){for(var m in p)Object.defineProperty(u,m,{enumerable:!0,get:p[m]})}e(i,{flagEnabled:function(){return o},issueFlagNotices:function(){return d},default:function(){return f}});const t=s(requirePicocolors_browser()),n=s(requireLog());function s(u){return u&&u.__esModule?u:{default:u}}let r={optimizeUniversalDefaults:!1,generalizedModifiers:!0,disableColorOpacityUtilitiesByDefault:!1,relativeContentPathsByDefault:!1},a={future:["hoverOnlyWhenSupported","respectDefaultRingColorOpacity","disableColorOpacityUtilitiesByDefault","relativeContentPathsByDefault"],experimental:["optimizeUniversalDefaults","generalizedModifiers"]};function o(u,p){if(a.future.includes(p)){var m,g,y;return u.future==="all"||((y=(g=u==null||(m=u.future)===null||m===void 0?void 0:m[p])!==null&&g!==void 0?g:r[p])!==null&&y!==void 0?y:!1)}if(a.experimental.includes(p)){var v,b,C;return u.experimental==="all"||((C=(b=u==null||(v=u.experimental)===null||v===void 0?void 0:v[p])!==null&&b!==void 0?b:r[p])!==null&&C!==void 0?C:!1)}return!1}function l(u){if(u.experimental==="all")return a.experimental;var p;return Object.keys((p=u==null?void 0:u.experimental)!==null&&p!==void 0?p:{}).filter(m=>a.experimental.includes(m)&&u.experimental[m])}function d(u){if(process.env.JEST_WORKER_ID===void 0&&l(u).length>0){let p=l(u).map(m=>t.default.yellow(m)).join(", ");n.default.warn("experimental-flags-enabled",[`You have enabled experimental features: ${p}`,"Experimental features in Tailwind CSS are not covered by semver, may introduce breaking changes, and can change at any time."])}}const f=a}(featureFlags)),featureFlags}var hasRequiredNormalizeConfig;function requireNormalizeConfig(){return hasRequiredNormalizeConfig||(hasRequiredNormalizeConfig=1,function(i){Object.defineProperty(i,"__esModule",{value:!0}),Object.defineProperty(i,"normalizeConfig",{enumerable:!0,get:function(){return r}});const e=requireFeatureFlags(),t=s(requireLog());function n(a){if(typeof WeakMap!="function")return null;var o=new WeakMap,l=new WeakMap;return(n=function(d){return d?l:o})(a)}function s(a,o){if(a&&a.__esModule)return a;if(a===null||typeof a!="object"&&typeof a!="function")return{default:a};var l=n(o);if(l&&l.has(a))return l.get(a);var d={},f=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var u in a)if(u!=="default"&&Object.prototype.hasOwnProperty.call(a,u)){var p=f?Object.getOwnPropertyDescriptor(a,u):null;p&&(p.get||p.set)?Object.defineProperty(d,u,p):d[u]=a[u]}return d.default=a,l&&l.set(a,d),d}function r(a){if((()=>{if(a.purge||!a.content||!Array.isArray(a.content)&&!(typeof a.content=="object"&&a.content!==null))return!1;if(Array.isArray(a.content))return a.content.every(d=>typeof d=="string"?!0:!(typeof(d==null?void 0:d.raw)!="string"||d!=null&&d.extension&&typeof(d==null?void 0:d.extension)!="string"));if(typeof a.content=="object"&&a.content!==null){if(Object.keys(a.content).some(d=>!["files","relative","extract","transform"].includes(d)))return!1;if(Array.isArray(a.content.files)){if(!a.content.files.every(d=>typeof d=="string"?!0:!(typeof(d==null?void 0:d.raw)!="string"||d!=null&&d.extension&&typeof(d==null?void 0:d.extension)!="string")))return!1;if(typeof a.content.extract=="object"){for(let d of Object.values(a.content.extract))if(typeof d!="function")return!1}else if(!(a.content.extract===void 0||typeof a.content.extract=="function"))return!1;if(typeof a.content.transform=="object"){for(let d of Object.values(a.content.transform))if(typeof d!="function")return!1}else if(!(a.content.transform===void 0||typeof a.content.transform=="function"))return!1;if(typeof a.content.relative!="boolean"&&typeof a.content.relative<"u")return!1}return!0}return!1})()||t.default.warn("purge-deprecation",["The `purge`/`content` options have changed in Tailwind CSS v3.0.","Update your configuration file to eliminate this warning.","https://tailwindcss.com/docs/upgrade-guide#configure-content-sources"]),a.safelist=(()=>{var d;let{content:f,purge:u,safelist:p}=a;return Array.isArray(p)?p:Array.isArray(f==null?void 0:f.safelist)?f.safelist:Array.isArray(u==null?void 0:u.safelist)?u.safelist:Array.isArray(u==null||(d=u.options)===null||d===void 0?void 0:d.safelist)?u.options.safelist:[]})(),a.blocklist=(()=>{let{blocklist:d}=a;if(Array.isArray(d)){if(d.every(f=>typeof f=="string"))return d;t.default.warn("blocklist-invalid",["The `blocklist` option must be an array of strings.","https://tailwindcss.com/docs/content-configuration#discarding-classes"])}return[]})(),typeof a.prefix=="function")t.default.warn("prefix-function",["As of Tailwind CSS v3.0, `prefix` cannot be a function.","Update `prefix` in your configuration to be a string to eliminate this warning.","https://tailwindcss.com/docs/upgrade-guide#prefix-cannot-be-a-function"]),a.prefix="";else{var l;a.prefix=(l=a.prefix)!==null&&l!==void 0?l:""}a.content={relative:(()=>{let{content:d}=a;return d!=null&&d.relative?d.relative:(0,e.flagEnabled)(a,"relativeContentPathsByDefault")})(),files:(()=>{let{content:d,purge:f}=a;return Array.isArray(f)?f:Array.isArray(f==null?void 0:f.content)?f.content:Array.isArray(d)?d:Array.isArray(d==null?void 0:d.content)?d.content:Array.isArray(d==null?void 0:d.files)?d.files:[]})(),extract:(()=>{let d=(()=>{var p,m,g,y,v,b,C,_,R,E;return!((p=a.purge)===null||p===void 0)&&p.extract?a.purge.extract:!((m=a.content)===null||m===void 0)&&m.extract?a.content.extract:!((g=a.purge)===null||g===void 0||(y=g.extract)===null||y===void 0)&&y.DEFAULT?a.purge.extract.DEFAULT:!((v=a.content)===null||v===void 0||(b=v.extract)===null||b===void 0)&&b.DEFAULT?a.content.extract.DEFAULT:!((C=a.purge)===null||C===void 0||(_=C.options)===null||_===void 0)&&_.extractors?a.purge.options.extractors:!((R=a.content)===null||R===void 0||(E=R.options)===null||E===void 0)&&E.extractors?a.content.options.extractors:{}})(),f={},u=(()=>{var p,m,g,y;if(!((p=a.purge)===null||p===void 0||(m=p.options)===null||m===void 0)&&m.defaultExtractor)return a.purge.options.defaultExtractor;if(!((g=a.content)===null||g===void 0||(y=g.options)===null||y===void 0)&&y.defaultExtractor)return a.content.options.defaultExtractor})();if(u!==void 0&&(f.DEFAULT=u),typeof d=="function")f.DEFAULT=d;else if(Array.isArray(d))for(let{extensions:p,extractor:m}of d??[])for(let g of p)f[g]=m;else typeof d=="object"&&d!==null&&Object.assign(f,d);return f})(),transform:(()=>{let d=(()=>{var u,p,m,g,y,v;return!((u=a.purge)===null||u===void 0)&&u.transform?a.purge.transform:!((p=a.content)===null||p===void 0)&&p.transform?a.content.transform:!((m=a.purge)===null||m===void 0||(g=m.transform)===null||g===void 0)&&g.DEFAULT?a.purge.transform.DEFAULT:!((y=a.content)===null||y===void 0||(v=y.transform)===null||v===void 0)&&v.DEFAULT?a.content.transform.DEFAULT:{}})(),f={};return typeof d=="function"?f.DEFAULT=d:typeof d=="object"&&d!==null&&Object.assign(f,d),f})()};for(let d of a.content.files)if(typeof d=="string"&&/{([^,]*?)}/g.test(d)){t.default.warn("invalid-glob-braces",[`The glob pattern ${(0,t.dim)(d)} in your Tailwind CSS configuration is invalid.`,`Update it to ${(0,t.dim)(d.replace(/{([^,]*?)}/g,"$1"))} to silence this warning.`]);break}return a}}(normalizeConfig)),normalizeConfig}var isPlainObject={},hasRequiredIsPlainObject;function requireIsPlainObject(){return hasRequiredIsPlainObject||(hasRequiredIsPlainObject=1,function(i){Object.defineProperty(i,"__esModule",{value:!0}),Object.defineProperty(i,"default",{enumerable:!0,get:function(){return e}});function e(t){if(Object.prototype.toString.call(t)!=="[object Object]")return!1;const n=Object.getPrototypeOf(t);return n===null||Object.getPrototypeOf(n)===null}}(isPlainObject)),isPlainObject}var cloneDeep={},hasRequiredCloneDeep;function requireCloneDeep(){return hasRequiredCloneDeep||(hasRequiredCloneDeep=1,function(i){Object.defineProperty(i,"__esModule",{value:!0}),Object.defineProperty(i,"cloneDeep",{enumerable:!0,get:function(){return e}});function e(t){return Array.isArray(t)?t.map(n=>e(n)):typeof t=="object"&&t!==null?Object.fromEntries(Object.entries(t).map(([n,s])=>[n,e(s)])):t}}(cloneDeep)),cloneDeep}var pluginUtils={},escapeCommas={},hasRequiredEscapeCommas;function requireEscapeCommas(){return hasRequiredEscapeCommas||(hasRequiredEscapeCommas=1,function(i){Object.defineProperty(i,"__esModule",{value:!0}),Object.defineProperty(i,"default",{enumerable:!0,get:function(){return e}});function e(t){return t.replace(/\\,/g,"\\2c ")}}(escapeCommas)),escapeCommas}var withAlphaVariable={},color$1={},colorNames={},hasRequiredColorNames;function requireColorNames(){return hasRequiredColorNames||(hasRequiredColorNames=1,function(i){Object.defineProperty(i,"__esModule",{value:!0}),Object.defineProperty(i,"default",{enumerable:!0,get:function(){return e}});const e={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]}}(colorNames)),colorNames}var hasRequiredColor;function requireColor(){return hasRequiredColor||(hasRequiredColor=1,function(i){Object.defineProperty(i,"__esModule",{value:!0});function e(g,y){for(var v in y)Object.defineProperty(g,v,{enumerable:!0,get:y[v]})}e(i,{parseColor:function(){return p},formatColor:function(){return m}});const t=n(requireColorNames());function n(g){return g&&g.__esModule?g:{default:g}}let s=/^#([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})?$/i,r=/^#([a-f\d])([a-f\d])([a-f\d])([a-f\d])?$/i,a=/(?:\d+|\d*\.\d+)%?/,o=/(?:\s*,\s*|\s+)/,l=/\s*[,/]\s*/,d=/var\(--(?:[^ )]*?)(?:,(?:[^ )]*?|var\(--[^ )]*?\)))?\)/,f=new RegExp(`^(rgba?)\\(\\s*(${a.source}|${d.source})(?:${o.source}(${a.source}|${d.source}))?(?:${o.source}(${a.source}|${d.source}))?(?:${l.source}(${a.source}|${d.source}))?\\s*\\)$`),u=new RegExp(`^(hsla?)\\(\\s*((?:${a.source})(?:deg|rad|grad|turn)?|${d.source})(?:${o.source}(${a.source}|${d.source}))?(?:${o.source}(${a.source}|${d.source}))?(?:${l.source}(${a.source}|${d.source}))?\\s*\\)$`);function p(g,{loose:y=!1}={}){var v,b;if(typeof g!="string")return null;if(g=g.trim(),g==="transparent")return{mode:"rgb",color:["0","0","0"],alpha:"0"};if(g in t.default)return{mode:"rgb",color:t.default[g].map(F=>F.toString())};let C=g.replace(r,(F,O,A,N,M)=>["#",O,O,A,A,N,N,M?M+M:""].join("")).match(s);if(C!==null)return{mode:"rgb",color:[parseInt(C[1],16),parseInt(C[2],16),parseInt(C[3],16)].map(F=>F.toString()),alpha:C[4]?(parseInt(C[4],16)/255).toString():void 0};var _;let R=(_=g.match(f))!==null&&_!==void 0?_:g.match(u);if(R===null)return null;let E=[R[2],R[3],R[4]].filter(Boolean).map(F=>F.toString());return E.length===2&&E[0].startsWith("var(")?{mode:R[1],color:[E[0]],alpha:E[1]}:!y&&E.length!==3||E.length<3&&!E.some(F=>/^var\(.*?\)$/.test(F))?null:{mode:R[1],color:E,alpha:(v=R[5])===null||v===void 0||(b=v.toString)===null||b===void 0?void 0:b.call(v)}}function m({mode:g,color:y,alpha:v}){let b=v!==void 0;return g==="rgba"||g==="hsla"?`${g}(${y.join(", ")}${b?`, ${v}`:""})`:`${g}(${y.join(" ")}${b?` / ${v}`:""})`}}(color$1)),color$1}var hasRequiredWithAlphaVariable;function requireWithAlphaVariable(){return hasRequiredWithAlphaVariable||(hasRequiredWithAlphaVariable=1,function(i){Object.defineProperty(i,"__esModule",{value:!0});function e(r,a){for(var o in a)Object.defineProperty(r,o,{enumerable:!0,get:a[o]})}e(i,{withAlphaValue:function(){return n},default:function(){return s}});const t=requireColor();function n(r,a,o){if(typeof r=="function")return r({opacityValue:a});let l=(0,t.parseColor)(r,{loose:!0});return l===null?o:(0,t.formatColor)({...l,alpha:a})}function s({color:r,property:a,variable:o}){let l=[].concat(a);if(typeof r=="function")return{[o]:"1",...Object.fromEntries(l.map(f=>[f,r({opacityVariable:o,opacityValue:`var(${o}, 1)`})]))};const d=(0,t.parseColor)(r);return d===null?Object.fromEntries(l.map(f=>[f,r])):d.alpha!==void 0?Object.fromEntries(l.map(f=>[f,r])):{[o]:"1",...Object.fromEntries(l.map(f=>[f,(0,t.formatColor)({...d,alpha:`var(${o}, 1)`})]))}}}(withAlphaVariable)),withAlphaVariable}var dataTypes={},parseBoxShadowValue={},splitAtTopLevelOnly={},hasRequiredSplitAtTopLevelOnly;function requireSplitAtTopLevelOnly(){return hasRequiredSplitAtTopLevelOnly||(hasRequiredSplitAtTopLevelOnly=1,function(i){Object.defineProperty(i,"__esModule",{value:!0}),Object.defineProperty(i,"splitAtTopLevelOnly",{enumerable:!0,get:function(){return e}});function e(t,n){let s=[],r=[],a=0,o=!1;for(let l=0;l<t.length;l++){let d=t[l];s.length===0&&d===n[0]&&!o&&(n.length===1||t.slice(l,l+n.length)===n)&&(r.push(t.slice(a,l)),a=l+n.length),o=o?!1:d==="\\",d==="("||d==="["||d==="{"?s.push(d):(d===")"&&s[s.length-1]==="("||d==="]"&&s[s.length-1]==="["||d==="}"&&s[s.length-1]==="{")&&s.pop()}return r.push(t.slice(a)),r}}(splitAtTopLevelOnly)),splitAtTopLevelOnly}var hasRequiredParseBoxShadowValue;function requireParseBoxShadowValue(){return hasRequiredParseBoxShadowValue||(hasRequiredParseBoxShadowValue=1,function(i){Object.defineProperty(i,"__esModule",{value:!0});function e(l,d){for(var f in d)Object.defineProperty(l,f,{enumerable:!0,get:d[f]})}e(i,{parseBoxShadowValue:function(){return a},formatBoxShadowValue:function(){return o}});const t=requireSplitAtTopLevelOnly();let n=new Set(["inset","inherit","initial","revert","unset"]),s=/\ +(?![^(]*\))/g,r=/^-?(\d+|\.\d+)(.*?)$/g;function a(l){return(0,t.splitAtTopLevelOnly)(l,",").map(f=>{let u=f.trim(),p={raw:u},m=u.split(s),g=new Set;for(let y of m)r.lastIndex=0,!g.has("KEYWORD")&&n.has(y)?(p.keyword=y,g.add("KEYWORD")):r.test(y)?g.has("X")?g.has("Y")?g.has("BLUR")?g.has("SPREAD")||(p.spread=y,g.add("SPREAD")):(p.blur=y,g.add("BLUR")):(p.y=y,g.add("Y")):(p.x=y,g.add("X")):p.color?(p.unknown||(p.unknown=[]),p.unknown.push(y)):p.color=y;return p.valid=p.x!==void 0&&p.y!==void 0,p})}function o(l){return l.map(d=>d.valid?[d.keyword,d.x,d.y,d.blur,d.spread,d.color].filter(Boolean).join(" "):d.raw).join(", ")}}(parseBoxShadowValue)),parseBoxShadowValue}var hasRequiredDataTypes;function requireDataTypes(){return hasRequiredDataTypes||(hasRequiredDataTypes=1,function(i){Object.defineProperty(i,"__esModule",{value:!0});function e(ce,pe){for(var he in pe)Object.defineProperty(ce,he,{enumerable:!0,get:pe[he]})}e(i,{normalize:function(){return l},normalizeAttributeSelectors:function(){return d},url:function(){return u},number:function(){return p},percentage:function(){return m},length:function(){return v},lineWidth:function(){return C},shadow:function(){return _},color:function(){return R},image:function(){return E},gradient:function(){return O},position:function(){return N},familyName:function(){return M},genericName:function(){return X},absoluteSize:function(){return le},relativeSize:function(){return ue}});const t=requireColor(),n=requireParseBoxShadowValue(),s=requireSplitAtTopLevelOnly();let r=["min","max","clamp","calc"];function a(ce){return r.some(pe=>new RegExp(`^${pe}\\(.*\\)`).test(ce))}const o=new Set(["scroll-timeline-name","timeline-scope","view-timeline-name","font-palette","anchor-name","anchor-scope","position-anchor","position-try-options","scroll-timeline","animation-timeline","view-timeline","position-try"]);function l(ce,pe=null,he=!0){let Y=pe&&o.has(pe.property);return ce.startsWith("--")&&!Y?`var(${ce})`:ce.includes("url(")?ce.split(/(url\(.*?\))/g).filter(Boolean).map(ge=>/^url\(.*?\)$/.test(ge)?ge:l(ge,pe,!1)).join(""):(ce=ce.replace(/([^\\])_+/g,(ge,xe)=>xe+" ".repeat(ge.length-1)).replace(/^_/g," ").replace(/\\_/g,"_"),he&&(ce=ce.trim()),ce=f(ce),ce)}function d(ce){return ce.includes("=")&&(ce=ce.replace(/(=.*)/g,(pe,he)=>{if(he[1]==="'"||he[1]==='"')return he;if(he.length>2){let Y=he[he.length-1];if(he[he.length-2]===" "&&(Y==="i"||Y==="I"||Y==="s"||Y==="S"))return`="${he.slice(1,-2)}" ${he[he.length-1]}`}return`="${he.slice(1)}"`})),ce}function f(ce){let pe=["theme"],he=["min-content","max-content","fit-content","safe-area-inset-top","safe-area-inset-right","safe-area-inset-bottom","safe-area-inset-left","titlebar-area-x","titlebar-area-y","titlebar-area-width","titlebar-area-height","keyboard-inset-top","keyboard-inset-right","keyboard-inset-bottom","keyboard-inset-left","keyboard-inset-width","keyboard-inset-height","radial-gradient","linear-gradient","conic-gradient","repeating-radial-gradient","repeating-linear-gradient","repeating-conic-gradient","anchor-size"];return ce.replace(/(calc|min|max|clamp)\(.+\)/g,Y=>{let ge="";function xe(){let be=ge.trimEnd();return be[be.length-1]}for(let be=0;be<Y.length;be++){let Ce=function(ye){return ye.split("").every((we,_e)=>Y[be+_e]===we)},ke=function(ye){let we=1/0;for(let Re of ye){let Ee=Y.indexOf(Re,be);Ee!==-1&&Ee<we&&(we=Ee)}let _e=Y.slice(be,we);return be+=_e.length-1,_e},me=Y[be];if(Ce("var"))ge+=ke([")",","]);else if(he.some(ye=>Ce(ye))){let ye=he.find(we=>Ce(we));ge+=ye,be+=ye.length-1}else pe.some(ye=>Ce(ye))?ge+=ke([")"]):Ce("[")?ge+=ke(["]"]):["+","-","*","/"].includes(me)&&!["(","+","-","*","/",","].includes(xe())?ge+=` ${me} `:ge+=me}return ge.replace(/\s+/g," ")})}function u(ce){return ce.startsWith("url(")}function p(ce){return!isNaN(Number(ce))||a(ce)}function m(ce){return ce.endsWith("%")&&p(ce.slice(0,-1))||a(ce)}let y=`(?:${["cm","mm","Q","in","pc","pt","px","em","ex","ch","rem","lh","rlh","vw","vh","vmin","vmax","vb","vi","svw","svh","lvw","lvh","dvw","dvh","cqw","cqh","cqi","cqb","cqmin","cqmax"].join("|")})`;function v(ce){return ce==="0"||new RegExp(`^[+-]?[0-9]*.?[0-9]+(?:[eE][+-]?[0-9]+)?${y}$`).test(ce)||a(ce)}let b=new Set(["thin","medium","thick"]);function C(ce){return b.has(ce)}function _(ce){let pe=(0,n.parseBoxShadowValue)(l(ce));for(let he of pe)if(!he.valid)return!1;return!0}function R(ce){let pe=0;return(0,s.splitAtTopLevelOnly)(ce,"_").every(Y=>(Y=l(Y),Y.startsWith("var(")?!0:(0,t.parseColor)(Y,{loose:!0})!==null?(pe++,!0):!1))?pe>0:!1}function E(ce){let pe=0;return(0,s.splitAtTopLevelOnly)(ce,",").every(Y=>(Y=l(Y),Y.startsWith("var(")?!0:u(Y)||O(Y)||["element(","image(","cross-fade(","image-set("].some(ge=>Y.startsWith(ge))?(pe++,!0):!1))?pe>0:!1}let F=new Set(["conic-gradient","linear-gradient","radial-gradient","repeating-conic-gradient","repeating-linear-gradient","repeating-radial-gradient"]);function O(ce){ce=l(ce);for(let pe of F)if(ce.startsWith(`${pe}(`))return!0;return!1}let A=new Set(["center","top","right","bottom","left"]);function N(ce){let pe=0;return(0,s.splitAtTopLevelOnly)(ce,"_").every(Y=>(Y=l(Y),Y.startsWith("var(")?!0:A.has(Y)||v(Y)||m(Y)?(pe++,!0):!1))?pe>0:!1}function M(ce){let pe=0;return(0,s.splitAtTopLevelOnly)(ce,",").every(Y=>(Y=l(Y),Y.startsWith("var(")?!0:Y.includes(" ")&&!/(['"])([^"']+)\1/g.test(Y)||/^\d/g.test(Y)?!1:(pe++,!0)))?pe>0:!1}let Z=new Set(["serif","sans-serif","monospace","cursive","fantasy","system-ui","ui-serif","ui-sans-serif","ui-monospace","ui-rounded","math","emoji","fangsong"]);function X(ce){return Z.has(ce)}let oe=new Set(["xx-small","x-small","small","medium","large","x-large","xx-large","xxx-large"]);function le(ce){return oe.has(ce)}let de=new Set(["larger","smaller"]);function ue(ce){return de.has(ce)}}(dataTypes)),dataTypes}var validateFormalSyntax={},hasRequiredValidateFormalSyntax;function requireValidateFormalSyntax(){return hasRequiredValidateFormalSyntax||(hasRequiredValidateFormalSyntax=1,function(i){Object.defineProperty(i,"__esModule",{value:!0}),Object.defineProperty(i,"backgroundSize",{enumerable:!0,get:function(){return n}});const e=requireDataTypes(),t=requireSplitAtTopLevelOnly();function n(s){let r=["cover","contain"];return(0,t.splitAtTopLevelOnly)(s,",").every(a=>{let o=(0,t.splitAtTopLevelOnly)(a,"_").filter(Boolean);return o.length===1&&r.includes(o[0])?!0:o.length!==1&&o.length!==2?!1:o.every(l=>(0,e.length)(l)||(0,e.percentage)(l)||l==="auto")})}}(validateFormalSyntax)),validateFormalSyntax}var hasRequiredPluginUtils;function requirePluginUtils(){return hasRequiredPluginUtils||(hasRequiredPluginUtils=1,function(i){Object.defineProperty(i,"__esModule",{value:!0});function e(N,M){for(var Z in M)Object.defineProperty(N,Z,{enumerable:!0,get:M[Z]})}e(i,{updateAllClasses:function(){return d},asValue:function(){return p},parseColorFormat:function(){return y},asColor:function(){return b},asLookupValue:function(){return C},typeMap:function(){return R},coerceValue:function(){return O},getMatchingTypes:function(){return A}});const t=l(requireEscapeCommas()),n=requireWithAlphaVariable(),s=requireDataTypes(),r=l(requireNegateValue()),a=requireValidateFormalSyntax(),o=requireFeatureFlags();function l(N){return N&&N.__esModule?N:{default:N}}function d(N,M){N.walkClasses(Z=>{Z.value=M(Z.value),Z.raws&&Z.raws.value&&(Z.raws.value=(0,t.default)(Z.raws.value))})}function f(N,M){if(!m(N))return;let Z=N.slice(1,-1);if(M(Z))return(0,s.normalize)(Z)}function u(N,M={},Z){let X=M[N];if(X!==void 0)return(0,r.default)(X);if(m(N)){let oe=f(N,Z);return oe===void 0?void 0:(0,r.default)(oe)}}function p(N,M={},{validate:Z=()=>!0}={}){var X;let oe=(X=M.values)===null||X===void 0?void 0:X[N];return oe!==void 0?oe:M.supportsNegativeValues&&N.startsWith("-")?u(N.slice(1),M.values,Z):f(N,Z)}function m(N){return N.startsWith("[")&&N.endsWith("]")}function g(N){let M=N.lastIndexOf("/"),Z=N.lastIndexOf("[",M),X=N.indexOf("]",M);return N[M-1]==="]"||N[M+1]==="["||Z!==-1&&X!==-1&&Z<M&&M<X&&(M=N.lastIndexOf("/",Z)),M===-1||M===N.length-1?[N,void 0]:m(N)&&!N.includes("]/[")?[N,void 0]:[N.slice(0,M),N.slice(M+1)]}function y(N){if(typeof N=="string"&&N.includes("<alpha-value>")){let M=N;return({opacityValue:Z=1})=>M.replace(/<alpha-value>/g,Z)}return N}function v(N){return(0,s.normalize)(N.slice(1,-1))}function b(N,M={},{tailwindConfig:Z={}}={}){var X;if(((X=M.values)===null||X===void 0?void 0:X[N])!==void 0){var oe;return y((oe=M.values)===null||oe===void 0?void 0:oe[N])}let[le,de]=g(N);if(de!==void 0){var ue,ce,pe,he;let Y=(he=(ue=M.values)===null||ue===void 0?void 0:ue[le])!==null&&he!==void 0?he:m(le)?le.slice(1,-1):void 0;return Y===void 0?void 0:(Y=y(Y),m(de)?(0,n.withAlphaValue)(Y,v(de)):((ce=Z.theme)===null||ce===void 0||(pe=ce.opacity)===null||pe===void 0?void 0:pe[de])===void 0?void 0:(0,n.withAlphaValue)(Y,Z.theme.opacity[de]))}return p(N,M,{validate:s.color})}function C(N,M={}){var Z;return(Z=M.values)===null||Z===void 0?void 0:Z[N]}function _(N){return(M,Z)=>p(M,Z,{validate:N})}let R={any:p,color:b,url:_(s.url),image:_(s.image),length:_(s.length),percentage:_(s.percentage),position:_(s.position),lookup:C,"generic-name":_(s.genericName),"family-name":_(s.familyName),number:_(s.number),"line-width":_(s.lineWidth),"absolute-size":_(s.absoluteSize),"relative-size":_(s.relativeSize),shadow:_(s.shadow),size:_(a.backgroundSize)},E=Object.keys(R);function F(N,M){let Z=N.indexOf(M);return Z===-1?[void 0,N]:[N.slice(0,Z),N.slice(Z+1)]}function O(N,M,Z,X){if(Z.values&&M in Z.values)for(let{type:le}of N??[]){let de=R[le](M,Z,{tailwindConfig:X});if(de!==void 0)return[de,le,null]}if(m(M)){let le=M.slice(1,-1),[de,ue]=F(le,":");if(!/^[\w-_]+$/g.test(de))ue=le;else if(de!==void 0&&!E.includes(de))return[];if(ue.length>0&&E.includes(de))return[p(`[${ue}]`,Z),de,null]}let oe=A(N,M,Z,X);for(let le of oe)return le;return[]}function*A(N,M,Z,X){let oe=(0,o.flagEnabled)(X,"generalizedModifiers"),[le,de]=g(M);if(oe&&Z.modifiers!=null&&(Z.modifiers==="any"||typeof Z.modifiers=="object"&&(de&&m(de)||de in Z.modifiers))||(le=M,de=void 0),de!==void 0&&le===""&&(le="DEFAULT"),de!==void 0&&typeof Z.modifiers=="object"){var ce,pe;let he=(pe=(ce=Z.modifiers)===null||ce===void 0?void 0:ce[de])!==null&&pe!==void 0?pe:null;he!==null?de=he:m(de)&&(de=v(de))}for(let{type:he}of N??[]){let Y=R[he](le,Z,{tailwindConfig:X});Y!==void 0&&(yield[Y,he,de??null])}}}(pluginUtils)),pluginUtils}var toColorValue={},hasRequiredToColorValue;function requireToColorValue(){return hasRequiredToColorValue||(hasRequiredToColorValue=1,function(i){Object.defineProperty(i,"__esModule",{value:!0}),Object.defineProperty(i,"default",{enumerable:!0,get:function(){return e}});function e(t){return typeof t=="function"?t({}):t}}(toColorValue)),toColorValue}var hasRequiredResolveConfig$2;function requireResolveConfig$2(){return hasRequiredResolveConfig$2||(hasRequiredResolveConfig$2=1,function(i){Object.defineProperty(i,"__esModule",{value:!0}),Object.defineProperty(i,"default",{enumerable:!0,get:function(){return Z}});const e=m(requireNegateValue()),t=m(requireCorePluginList()),n=m(requireConfigurePlugins()),s=m(requireColors()),r=requireDefaults(),a=requireToPath(),o=requireNormalizeConfig(),l=m(requireIsPlainObject()),d=requireCloneDeep(),f=requirePluginUtils(),u=requireWithAlphaVariable(),p=m(requireToColorValue());function m(X){return X&&X.__esModule?X:{default:X}}function g(X){return typeof X=="function"}function y(X,...oe){let le=oe.pop();for(let de of oe)for(let ue in de){let ce=le(X[ue],de[ue]);ce===void 0?(0,l.default)(X[ue])&&(0,l.default)(de[ue])?X[ue]=y({},X[ue],de[ue],le):X[ue]=de[ue]:X[ue]=ce}return X}const v={colors:s.default,negative(X){return Object.keys(X).filter(oe=>X[oe]!=="0").reduce((oe,le)=>{let de=(0,e.default)(X[le]);return de!==void 0&&(oe[`-${le}`]=de),oe},{})},breakpoints(X){return Object.keys(X).filter(oe=>typeof X[oe]=="string").reduce((oe,le)=>({...oe,[`screen-${le}`]:X[le]}),{})}};function b(X,...oe){return g(X)?X(...oe):X}function C(X){return X.reduce((oe,{extend:le})=>y(oe,le,(de,ue)=>de===void 0?[ue]:Array.isArray(de)?[ue,...de]:[ue,de]),{})}function _(X){return{...X.reduce((oe,le)=>(0,r.defaults)(oe,le),{}),extend:C(X)}}function R(X,oe){if(Array.isArray(X)&&(0,l.default)(X[0]))return X.concat(oe);if(Array.isArray(oe)&&(0,l.default)(oe[0])&&(0,l.default)(X))return[X,...oe];if(Array.isArray(oe))return oe}function E({extend:X,...oe}){return y(oe,X,(le,de)=>!g(le)&&!de.some(g)?y({},le,...de,R):(ue,ce)=>y({},...[le,...de].map(pe=>b(pe,ue,ce)),R))}function*F(X){let oe=(0,a.toPath)(X);if(oe.length===0||(yield oe,Array.isArray(X)))return;let le=/^(.*?)\s*\/\s*([^/]+)$/,de=X.match(le);if(de!==null){let[,ue,ce]=de,pe=(0,a.toPath)(ue);pe.alpha=ce,yield pe}}function O(X){const oe=(le,de)=>{for(const ue of F(le)){let ce=0,pe=X;for(;pe!=null&&ce<ue.length;)pe=pe[ue[ce++]],pe=g(pe)&&(ue.alpha===void 0||ce<=ue.length-1)?pe(oe,v):pe;if(pe!==void 0){if(ue.alpha!==void 0){let he=(0,f.parseColorFormat)(pe);return(0,u.withAlphaValue)(he,ue.alpha,(0,p.default)(he))}return(0,l.default)(pe)?(0,d.cloneDeep)(pe):pe}}return de};return Object.assign(oe,{theme:oe,...v}),Object.keys(X).reduce((le,de)=>(le[de]=g(X[de])?X[de](oe,v):X[de],le),{})}function A(X){let oe=[];return X.forEach(le=>{oe=[...oe,le];var de;const ue=(de=le==null?void 0:le.plugins)!==null&&de!==void 0?de:[];ue.length!==0&&ue.forEach(ce=>{ce.__isOptionsFunction&&(ce=ce());var pe;oe=[...oe,...A([(pe=ce==null?void 0:ce.config)!==null&&pe!==void 0?pe:{}])]})}),oe}function N(X){return[...X].reduceRight((le,de)=>g(de)?de({corePlugins:le}):(0,n.default)(de,le),t.default)}function M(X){return[...X].reduceRight((le,de)=>[...le,...de],[])}function Z(X){let oe=[...A(X),{prefix:"",important:!1,separator:":"}];var le,de;return(0,o.normalizeConfig)((0,r.defaults)({theme:O(E(_(oe.map(ue=>(le=ue==null?void 0:ue.theme)!==null&&le!==void 0?le:{})))),corePlugins:N(oe.map(ue=>ue.corePlugins)),plugins:M(X.map(ue=>(de=ue==null?void 0:ue.plugins)!==null&&de!==void 0?de:[]))},...oe))}}(resolveConfig$1)),resolveConfig$1}var getAllConfigs={},config_full,hasRequiredConfig_full;function requireConfig_full(){return hasRequiredConfig_full||(hasRequiredConfig_full=1,config_full={content:[],presets:[],darkMode:"media",theme:{accentColor:({theme:i})=>({...i("colors"),auto:"auto"}),animation:{none:"none",spin:"spin 1s linear infinite",ping:"ping 1s cubic-bezier(0, 0, 0.2, 1) infinite",pulse:"pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite",bounce:"bounce 1s infinite"},aria:{busy:'busy="true"',checked:'checked="true"',disabled:'disabled="true"',expanded:'expanded="true"',hidden:'hidden="true"',pressed:'pressed="true"',readonly:'readonly="true"',required:'required="true"',selected:'selected="true"'},aspectRatio:{auto:"auto",square:"1 / 1",video:"16 / 9"},backdropBlur:({theme:i})=>i("blur"),backdropBrightness:({theme:i})=>i("brightness"),backdropContrast:({theme:i})=>i("contrast"),backdropGrayscale:({theme:i})=>i("grayscale"),backdropHueRotate:({theme:i})=>i("hueRotate"),backdropInvert:({theme:i})=>i("invert"),backdropOpacity:({theme:i})=>i("opacity"),backdropSaturate:({theme:i})=>i("saturate"),backdropSepia:({theme:i})=>i("sepia"),backgroundColor:({theme:i})=>i("colors"),backgroundImage:{none:"none","gradient-to-t":"linear-gradient(to top, var(--tw-gradient-stops))","gradient-to-tr":"linear-gradient(to top right, var(--tw-gradient-stops))","gradient-to-r":"linear-gradient(to right, var(--tw-gradient-stops))","gradient-to-br":"linear-gradient(to bottom right, var(--tw-gradient-stops))","gradient-to-b":"linear-gradient(to bottom, var(--tw-gradient-stops))","gradient-to-bl":"linear-gradient(to bottom left, var(--tw-gradient-stops))","gradient-to-l":"linear-gradient(to left, var(--tw-gradient-stops))","gradient-to-tl":"linear-gradient(to top left, var(--tw-gradient-stops))"},backgroundOpacity:({theme:i})=>i("opacity"),backgroundPosition:{bottom:"bottom",center:"center",left:"left","left-bottom":"left bottom","left-top":"left top",right:"right","right-bottom":"right bottom","right-top":"right top",top:"top"},backgroundSize:{auto:"auto",cover:"cover",contain:"contain"},blur:{0:"0",none:"",sm:"4px",DEFAULT:"8px",md:"12px",lg:"16px",xl:"24px","2xl":"40px","3xl":"64px"},borderColor:({theme:i})=>({...i("colors"),DEFAULT:i("colors.gray.200","currentColor")}),borderOpacity:({theme:i})=>i("opacity"),borderRadius:{none:"0px",sm:"0.125rem",DEFAULT:"0.25rem",md:"0.375rem",lg:"0.5rem",xl:"0.75rem","2xl":"1rem","3xl":"1.5rem",full:"9999px"},borderSpacing:({theme:i})=>({...i("spacing")}),borderWidth:{DEFAULT:"1px",0:"0px",2:"2px",4:"4px",8:"8px"},boxShadow:{sm:"0 1px 2px 0 rgb(0 0 0 / 0.05)",DEFAULT:"0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1)",md:"0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1)",lg:"0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1)",xl:"0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1)","2xl":"0 25px 50px -12px rgb(0 0 0 / 0.25)",inner:"inset 0 2px 4px 0 rgb(0 0 0 / 0.05)",none:"none"},boxShadowColor:({theme:i})=>i("colors"),brightness:{0:"0",50:".5",75:".75",90:".9",95:".95",100:"1",105:"1.05",110:"1.1",125:"1.25",150:"1.5",200:"2"},caretColor:({theme:i})=>i("colors"),colors:({colors:i})=>({inherit:i.inherit,current:i.current,transparent:i.transparent,black:i.black,white:i.white,slate:i.slate,gray:i.gray,zinc:i.zinc,neutral:i.neutral,stone:i.stone,red:i.red,orange:i.orange,amber:i.amber,yellow:i.yellow,lime:i.lime,green:i.green,emerald:i.emerald,teal:i.teal,cyan:i.cyan,sky:i.sky,blue:i.blue,indigo:i.indigo,violet:i.violet,purple:i.purple,fuchsia:i.fuchsia,pink:i.pink,rose:i.rose}),columns:{auto:"auto",1:"1",2:"2",3:"3",4:"4",5:"5",6:"6",7:"7",8:"8",9:"9",10:"10",11:"11",12:"12","3xs":"16rem","2xs":"18rem",xs:"20rem",sm:"24rem",md:"28rem",lg:"32rem",xl:"36rem","2xl":"42rem","3xl":"48rem","4xl":"56rem","5xl":"64rem","6xl":"72rem","7xl":"80rem"},container:{},content:{none:"none"},contrast:{0:"0",50:".5",75:".75",100:"1",125:"1.25",150:"1.5",200:"2"},cursor:{auto:"auto",default:"default",pointer:"pointer",wait:"wait",text:"text",move:"move",help:"help","not-allowed":"not-allowed",none:"none","context-menu":"context-menu",progress:"progress",cell:"cell",crosshair:"crosshair","vertical-text":"vertical-text",alias:"alias",copy:"copy","no-drop":"no-drop",grab:"grab",grabbing:"grabbing","all-scroll":"all-scroll","col-resize":"col-resize","row-resize":"row-resize","n-resize":"n-resize","e-resize":"e-resize","s-resize":"s-resize","w-resize":"w-resize","ne-resize":"ne-resize","nw-resize":"nw-resize","se-resize":"se-resize","sw-resize":"sw-resize","ew-resize":"ew-resize","ns-resize":"ns-resize","nesw-resize":"nesw-resize","nwse-resize":"nwse-resize","zoom-in":"zoom-in","zoom-out":"zoom-out"},divideColor:({theme:i})=>i("borderColor"),divideOpacity:({theme:i})=>i("borderOpacity"),divideWidth:({theme:i})=>i("borderWidth"),dropShadow:{sm:"0 1px 1px rgb(0 0 0 / 0.05)",DEFAULT:["0 1px 2px rgb(0 0 0 / 0.1)","0 1px 1px rgb(0 0 0 / 0.06)"],md:["0 4px 3px rgb(0 0 0 / 0.07)","0 2px 2px rgb(0 0 0 / 0.06)"],lg:["0 10px 8px rgb(0 0 0 / 0.04)","0 4px 3px rgb(0 0 0 / 0.1)"],xl:["0 20px 13px rgb(0 0 0 / 0.03)","0 8px 5px rgb(0 0 0 / 0.08)"],"2xl":"0 25px 25px rgb(0 0 0 / 0.15)",none:"0 0 #0000"},fill:({theme:i})=>({none:"none",...i("colors")}),flex:{1:"1 1 0%",auto:"1 1 auto",initial:"0 1 auto",none:"none"},flexBasis:({theme:i})=>({auto:"auto",...i("spacing"),"1/2":"50%","1/3":"33.333333%","2/3":"66.666667%","1/4":"25%","2/4":"50%","3/4":"75%","1/5":"20%","2/5":"40%","3/5":"60%","4/5":"80%","1/6":"16.666667%","2/6":"33.333333%","3/6":"50%","4/6":"66.666667%","5/6":"83.333333%","1/12":"8.333333%","2/12":"16.666667%","3/12":"25%","4/12":"33.333333%","5/12":"41.666667%","6/12":"50%","7/12":"58.333333%","8/12":"66.666667%","9/12":"75%","10/12":"83.333333%","11/12":"91.666667%",full:"100%"}),flexGrow:{0:"0",DEFAULT:"1"},flexShrink:{0:"0",DEFAULT:"1"},fontFamily:{sans:["ui-sans-serif","system-ui","sans-serif",'"Apple Color Emoji"','"Segoe UI Emoji"','"Segoe UI Symbol"','"Noto Color Emoji"'],serif:["ui-serif","Georgia","Cambria",'"Times New Roman"',"Times","serif"],mono:["ui-monospace","SFMono-Regular","Menlo","Monaco","Consolas",'"Liberation Mono"','"Courier New"',"monospace"]},fontSize:{xs:["0.75rem",{lineHeight:"1rem"}],sm:["0.875rem",{lineHeight:"1.25rem"}],base:["1rem",{lineHeight:"1.5rem"}],lg:["1.125rem",{lineHeight:"1.75rem"}],xl:["1.25rem",{lineHeight:"1.75rem"}],"2xl":["1.5rem",{lineHeight:"2rem"}],"3xl":["1.875rem",{lineHeight:"2.25rem"}],"4xl":["2.25rem",{lineHeight:"2.5rem"}],"5xl":["3rem",{lineHeight:"1"}],"6xl":["3.75rem",{lineHeight:"1"}],"7xl":["4.5rem",{lineHeight:"1"}],"8xl":["6rem",{lineHeight:"1"}],"9xl":["8rem",{lineHeight:"1"}]},fontWeight:{thin:"100",extralight:"200",light:"300",normal:"400",medium:"500",semibold:"600",bold:"700",extrabold:"800",black:"900"},gap:({theme:i})=>i("spacing"),gradientColorStops:({theme:i})=>i("colors"),gradientColorStopPositions:{"0%":"0%","5%":"5%","10%":"10%","15%":"15%","20%":"20%","25%":"25%","30%":"30%","35%":"35%","40%":"40%","45%":"45%","50%":"50%","55%":"55%","60%":"60%","65%":"65%","70%":"70%","75%":"75%","80%":"80%","85%":"85%","90%":"90%","95%":"95%","100%":"100%"},grayscale:{0:"0",DEFAULT:"100%"},gridAutoColumns:{auto:"auto",min:"min-content",max:"max-content",fr:"minmax(0, 1fr)"},gridAutoRows:{auto:"auto",min:"min-content",max:"max-content",fr:"minmax(0, 1fr)"},gridColumn:{auto:"auto","span-1":"span 1 / span 1","span-2":"span 2 / span 2","span-3":"span 3 / span 3","span-4":"span 4 / span 4","span-5":"span 5 / span 5","span-6":"span 6 / span 6","span-7":"span 7 / span 7","span-8":"span 8 / span 8","span-9":"span 9 / span 9","span-10":"span 10 / span 10","span-11":"span 11 / span 11","span-12":"span 12 / span 12","span-full":"1 / -1"},gridColumnEnd:{auto:"auto",1:"1",2:"2",3:"3",4:"4",5:"5",6:"6",7:"7",8:"8",9:"9",10:"10",11:"11",12:"12",13:"13"},gridColumnStart:{auto:"auto",1:"1",2:"2",3:"3",4:"4",5:"5",6:"6",7:"7",8:"8",9:"9",10:"10",11:"11",12:"12",13:"13"},gridRow:{auto:"auto","span-1":"span 1 / span 1","span-2":"span 2 / span 2","span-3":"span 3 / span 3","span-4":"span 4 / span 4","span-5":"span 5 / span 5","span-6":"span 6 / span 6","span-7":"span 7 / span 7","span-8":"span 8 / span 8","span-9":"span 9 / span 9","span-10":"span 10 / span 10","span-11":"span 11 / span 11","span-12":"span 12 / span 12","span-full":"1 / -1"},gridRowEnd:{auto:"auto",1:"1",2:"2",3:"3",4:"4",5:"5",6:"6",7:"7",8:"8",9:"9",10:"10",11:"11",12:"12",13:"13"},gridRowStart:{auto:"auto",1:"1",2:"2",3:"3",4:"4",5:"5",6:"6",7:"7",8:"8",9:"9",10:"10",11:"11",12:"12",13:"13"},gridTemplateColumns:{none:"none",subgrid:"subgrid",1:"repeat(1, minmax(0, 1fr))",2:"repeat(2, minmax(0, 1fr))",3:"repeat(3, minmax(0, 1fr))",4:"repeat(4, minmax(0, 1fr))",5:"repeat(5, minmax(0, 1fr))",6:"repeat(6, minmax(0, 1fr))",7:"repeat(7, minmax(0, 1fr))",8:"repeat(8, minmax(0, 1fr))",9:"repeat(9, minmax(0, 1fr))",10:"repeat(10, minmax(0, 1fr))",11:"repeat(11, minmax(0, 1fr))",12:"repeat(12, minmax(0, 1fr))"},gridTemplateRows:{none:"none",subgrid:"subgrid",1:"repeat(1, minmax(0, 1fr))",2:"repeat(2, minmax(0, 1fr))",3:"repeat(3, minmax(0, 1fr))",4:"repeat(4, minmax(0, 1fr))",5:"repeat(5, minmax(0, 1fr))",6:"repeat(6, minmax(0, 1fr))",7:"repeat(7, minmax(0, 1fr))",8:"repeat(8, minmax(0, 1fr))",9:"repeat(9, minmax(0, 1fr))",10:"repeat(10, minmax(0, 1fr))",11:"repeat(11, minmax(0, 1fr))",12:"repeat(12, minmax(0, 1fr))"},height:({theme:i})=>({auto:"auto",...i("spacing"),"1/2":"50%","1/3":"33.333333%","2/3":"66.666667%","1/4":"25%","2/4":"50%","3/4":"75%","1/5":"20%","2/5":"40%","3/5":"60%","4/5":"80%","1/6":"16.666667%","2/6":"33.333333%","3/6":"50%","4/6":"66.666667%","5/6":"83.333333%",full:"100%",screen:"100vh",svh:"100svh",lvh:"100lvh",dvh:"100dvh",min:"min-content",max:"max-content",fit:"fit-content"}),hueRotate:{0:"0deg",15:"15deg",30:"30deg",60:"60deg",90:"90deg",180:"180deg"},inset:({theme:i})=>({auto:"auto",...i("spacing"),"1/2":"50%","1/3":"33.333333%","2/3":"66.666667%","1/4":"25%","2/4":"50%","3/4":"75%",full:"100%"}),invert:{0:"0",DEFAULT:"100%"},keyframes:{spin:{to:{transform:"rotate(360deg)"}},ping:{"75%, 100%":{transform:"scale(2)",opacity:"0"}},pulse:{"50%":{opacity:".5"}},bounce:{"0%, 100%":{transform:"translateY(-25%)",animationTimingFunction:"cubic-bezier(0.8,0,1,1)"},"50%":{transform:"none",animationTimingFunction:"cubic-bezier(0,0,0.2,1)"}}},letterSpacing:{tighter:"-0.05em",tight:"-0.025em",normal:"0em",wide:"0.025em",wider:"0.05em",widest:"0.1em"},lineHeight:{none:"1",tight:"1.25",snug:"1.375",normal:"1.5",relaxed:"1.625",loose:"2",3:".75rem",4:"1rem",5:"1.25rem",6:"1.5rem",7:"1.75rem",8:"2rem",9:"2.25rem",10:"2.5rem"},listStyleType:{none:"none",disc:"disc",decimal:"decimal"},listStyleImage:{none:"none"},margin:({theme:i})=>({auto:"auto",...i("spacing")}),lineClamp:{1:"1",2:"2",3:"3",4:"4",5:"5",6:"6"},maxHeight:({theme:i})=>({...i("spacing"),none:"none",full:"100%",screen:"100vh",svh:"100svh",lvh:"100lvh",dvh:"100dvh",min:"min-content",max:"max-content",fit:"fit-content"}),maxWidth:({theme:i,breakpoints:e})=>({...i("spacing"),none:"none",xs:"20rem",sm:"24rem",md:"28rem",lg:"32rem",xl:"36rem","2xl":"42rem","3xl":"48rem","4xl":"56rem","5xl":"64rem","6xl":"72rem","7xl":"80rem",full:"100%",min:"min-content",max:"max-content",fit:"fit-content",prose:"65ch",...e(i("screens"))}),minHeight:({theme:i})=>({...i("spacing"),full:"100%",screen:"100vh",svh:"100svh",lvh:"100lvh",dvh:"100dvh",min:"min-content",max:"max-content",fit:"fit-content"}),minWidth:({theme:i})=>({...i("spacing"),full:"100%",min:"min-content",max:"max-content",fit:"fit-content"}),objectPosition:{bottom:"bottom",center:"center",left:"left","left-bottom":"left bottom","left-top":"left top",right:"right","right-bottom":"right bottom","right-top":"right top",top:"top"},opacity:{0:"0",5:"0.05",10:"0.1",15:"0.15",20:"0.2",25:"0.25",30:"0.3",35:"0.35",40:"0.4",45:"0.45",50:"0.5",55:"0.55",60:"0.6",65:"0.65",70:"0.7",75:"0.75",80:"0.8",85:"0.85",90:"0.9",95:"0.95",100:"1"},order:{first:"-9999",last:"9999",none:"0",1:"1",2:"2",3:"3",4:"4",5:"5",6:"6",7:"7",8:"8",9:"9",10:"10",11:"11",12:"12"},outlineColor:({theme:i})=>i("colors"),outlineOffset:{0:"0px",1:"1px",2:"2px",4:"4px",8:"8px"},outlineWidth:{0:"0px",1:"1px",2:"2px",4:"4px",8:"8px"},padding:({theme:i})=>i("spacing"),placeholderColor:({theme:i})=>i("colors"),placeholderOpacity:({theme:i})=>i("opacity"),ringColor:({theme:i})=>({DEFAULT:i("colors.blue.500","#3b82f6"),...i("colors")}),ringOffsetColor:({theme:i})=>i("colors"),ringOffsetWidth:{0:"0px",1:"1px",2:"2px",4:"4px",8:"8px"},ringOpacity:({theme:i})=>({DEFAULT:"0.5",...i("opacity")}),ringWidth:{DEFAULT:"3px",0:"0px",1:"1px",2:"2px",4:"4px",8:"8px"},rotate:{0:"0deg",1:"1deg",2:"2deg",3:"3deg",6:"6deg",12:"12deg",45:"45deg",90:"90deg",180:"180deg"},saturate:{0:"0",50:".5",100:"1",150:"1.5",200:"2"},scale:{0:"0",50:".5",75:".75",90:".9",95:".95",100:"1",105:"1.05",110:"1.1",125:"1.25",150:"1.5"},screens:{sm:"640px",md:"768px",lg:"1024px",xl:"1280px","2xl":"1536px"},scrollMargin:({theme:i})=>({...i("spacing")}),scrollPadding:({theme:i})=>i("spacing"),sepia:{0:"0",DEFAULT:"100%"},skew:{0:"0deg",1:"1deg",2:"2deg",3:"3deg",6:"6deg",12:"12deg"},space:({theme:i})=>({...i("spacing")}),spacing:{px:"1px",0:"0px",.5:"0.125rem",1:"0.25rem",1.5:"0.375rem",2:"0.5rem",2.5:"0.625rem",3:"0.75rem",3.5:"0.875rem",4:"1rem",5:"1.25rem",6:"1.5rem",7:"1.75rem",8:"2rem",9:"2.25rem",10:"2.5rem",11:"2.75rem",12:"3rem",14:"3.5rem",16:"4rem",20:"5rem",24:"6rem",28:"7rem",32:"8rem",36:"9rem",40:"10rem",44:"11rem",48:"12rem",52:"13rem",56:"14rem",60:"15rem",64:"16rem",72:"18rem",80:"20rem",96:"24rem"},stroke:({theme:i})=>({none:"none",...i("colors")}),strokeWidth:{0:"0",1:"1",2:"2"},supports:{},data:{},textColor:({theme:i})=>i("colors"),textDecorationColor:({theme:i})=>i("colors"),textDecorationThickness:{auto:"auto","from-font":"from-font",0:"0px",1:"1px",2:"2px",4:"4px",8:"8px"},textIndent:({theme:i})=>({...i("spacing")}),textOpacity:({theme:i})=>i("opacity"),textUnderlineOffset:{auto:"auto",0:"0px",1:"1px",2:"2px",4:"4px",8:"8px"},transformOrigin:{center:"center",top:"top","top-right":"top right",right:"right","bottom-right":"bottom right",bottom:"bottom","bottom-left":"bottom left",left:"left","top-left":"top left"},transitionDelay:{0:"0s",75:"75ms",100:"100ms",150:"150ms",200:"200ms",300:"300ms",500:"500ms",700:"700ms",1e3:"1000ms"},transitionDuration:{DEFAULT:"150ms",0:"0s",75:"75ms",100:"100ms",150:"150ms",200:"200ms",300:"300ms",500:"500ms",700:"700ms",1e3:"1000ms"},transitionProperty:{none:"none",all:"all",DEFAULT:"color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter",colors:"color, background-color, border-color, text-decoration-color, fill, stroke",opacity:"opacity",shadow:"box-shadow",transform:"transform"},transitionTimingFunction:{DEFAULT:"cubic-bezier(0.4, 0, 0.2, 1)",linear:"linear",in:"cubic-bezier(0.4, 0, 1, 1)",out:"cubic-bezier(0, 0, 0.2, 1)","in-out":"cubic-bezier(0.4, 0, 0.2, 1)"},translate:({theme:i})=>({...i("spacing"),"1/2":"50%","1/3":"33.333333%","2/3":"66.666667%","1/4":"25%","2/4":"50%","3/4":"75%",full:"100%"}),size:({theme:i})=>({auto:"auto",...i("spacing"),"1/2":"50%","1/3":"33.333333%","2/3":"66.666667%","1/4":"25%","2/4":"50%","3/4":"75%","1/5":"20%","2/5":"40%","3/5":"60%","4/5":"80%","1/6":"16.666667%","2/6":"33.333333%","3/6":"50%","4/6":"66.666667%","5/6":"83.333333%","1/12":"8.333333%","2/12":"16.666667%","3/12":"25%","4/12":"33.333333%","5/12":"41.666667%","6/12":"50%","7/12":"58.333333%","8/12":"66.666667%","9/12":"75%","10/12":"83.333333%","11/12":"91.666667%",full:"100%",min:"min-content",max:"max-content",fit:"fit-content"}),width:({theme:i})=>({auto:"auto",...i("spacing"),"1/2":"50%","1/3":"33.333333%","2/3":"66.666667%","1/4":"25%","2/4":"50%","3/4":"75%","1/5":"20%","2/5":"40%","3/5":"60%","4/5":"80%","1/6":"16.666667%","2/6":"33.333333%","3/6":"50%","4/6":"66.666667%","5/6":"83.333333%","1/12":"8.333333%","2/12":"16.666667%","3/12":"25%","4/12":"33.333333%","5/12":"41.666667%","6/12":"50%","7/12":"58.333333%","8/12":"66.666667%","9/12":"75%","10/12":"83.333333%","11/12":"91.666667%",full:"100%",screen:"100vw",svw:"100svw",lvw:"100lvw",dvw:"100dvw",min:"min-content",max:"max-content",fit:"fit-content"}),willChange:{auto:"auto",scroll:"scroll-position",contents:"contents",transform:"transform"},zIndex:{auto:"auto",0:"0",10:"10",20:"20",30:"30",40:"40",50:"50"}},plugins:[]}),config_full}var hasRequiredGetAllConfigs;function requireGetAllConfigs(){return hasRequiredGetAllConfigs||(hasRequiredGetAllConfigs=1,function(i){Object.defineProperty(i,"__esModule",{value:!0}),Object.defineProperty(i,"default",{enumerable:!0,get:function(){return s}});const e=n(requireConfig_full()),t=requireFeatureFlags();function n(r){return r&&r.__esModule?r:{default:r}}function s(r){var a;const o=((a=r==null?void 0:r.presets)!==null&&a!==void 0?a:[e.default]).slice().reverse().flatMap(f=>s(f instanceof Function?f():f)),l={respectDefaultRingColorOpacity:{theme:{ringColor:({theme:f})=>({DEFAULT:"#3b82f67f",...f("colors")})}},disableColorOpacityUtilitiesByDefault:{corePlugins:{backgroundOpacity:!1,borderOpacity:!1,divideOpacity:!1,placeholderOpacity:!1,ringOpacity:!1,textOpacity:!1}}},d=Object.keys(l).filter(f=>(0,t.flagEnabled)(r,f)).map(f=>l[f]);return[r,...d,...o]}}(getAllConfigs)),getAllConfigs}var hasRequiredResolveConfig$1;function requireResolveConfig$1(){return hasRequiredResolveConfig$1||(hasRequiredResolveConfig$1=1,function(i){Object.defineProperty(i,"__esModule",{value:!0}),Object.defineProperty(i,"default",{enumerable:!0,get:function(){return s}});const e=n(requireResolveConfig$2()),t=n(requireGetAllConfigs());function n(r){return r&&r.__esModule?r:{default:r}}function s(...r){let[,...a]=(0,t.default)(r[0]);return(0,e.default)([...r,...a])}}(resolveConfig$2)),resolveConfig$2}var resolveConfig_1,hasRequiredResolveConfig;function requireResolveConfig(){if(hasRequiredResolveConfig)return resolveConfig_1;hasRequiredResolveConfig=1;let i=requireResolveConfig$1();return resolveConfig_1=(i.__esModule?i:{default:i}).default,resolveConfig_1}var resolveConfigExports=requireResolveConfig();const resolveConfig=getDefaultExportFromCjs$1(resolveConfigExports),config={content:["./index.html","./src/**/*.{js,ts,jsx,tsx}"],prefix:"pl-",darkMode:["class",'[class= "dark"]'],theme:{extend:{colors:{playerColor:"rgb(var(--color-playerColor) / <alpha-value>)",playerColor1:"rgb(var(--color-playerColor1) / <alpha-value>)",main:{DEFAULT:"#651FFF",highLight:"#BB86FC",lightPurple:"#D4C5FF",light:"#7C4DFF",700:"#6833DD",dark:"#442D8E"},primary:{500:"#50A5FF",600:"#7C8EFF",700:"#027DFF",800:"#006ADA"},secondary:{DEFAULT:"#BCBDC0",50:"#FBFBFB",100:"#F7F7FC",200:"#EFF0F6",300:"#D9DBE9",400:"#A0A3BD",500:"#6E7191",600:"#4E4B66",700:"#262338",800:"#14142A",900:"#040412"},gray:{warm:"#ECEADC",highLight:"#E6E6E6",100:"#F5F5F5",300:"#D4D4D4",400:"#A3A3A3",500:"#737373",600:"#313A43",700:"#404040",800:"#151515"},dark:{1:"#1C1B1E",2:"#2C2C2C",3:"#303034",4:"#919094",5:"#E3E2E6",6:"#F2F0F4",7:"#BB86FC",8:"#E8DEFF",9:"#CDBDFF",10:"#383838",13:"#1C1B1F"},red:{light:"#EE1D23",200:"#EA0000",300:"#FCA5A5",500:"#EF4444",600:"#DC2626",700:"#B91C1C",zProgress:"#F74B50",error:"#F2B8B5",onError:"#601410"},lime:{300:"#A6F787",500:"#84CC16",600:"#65A30D",800:"#28752B",success:"#067306"},orange:{100:"#F15F22",200:"#FCC44D",600:"#F3732B",700:"#F15F22"},purple:{light:"#DACDFF"},warning:{DEFAULT:"#F5A623",100:"#DE8200"},z:{secondary:{50:"#FAFAFA",100:"#DBDDDE",500:"#939598",600:"#57585A"},yellow:{light:"#FAD832",login:"#FFBC39"},gray:{300:"#CDCDCD",400:"#BDBDBD",500:"#393E46",700:"#222831"},red:{progress:"#F64B50"},green:{DEFAULT:"#00B59C"}}}}},plugins:[]},wait=i=>new Promise(e=>setTimeout(e,i*1e3)),getRemainingTime=i=>{const e=Math.floor(Date.now()/1e3-i),t=new Intl.RelativeTimeFormat(conditions(ConditionName.isArabicLang)?Lang.ar:Lang.fa,{numeric:"auto"});switch(!0){case e<60:return t.format(-e,"second");case e<3600:return t.format(-Math.floor(e/60),"minute");case e<86400:return t.format(-Math.floor(e/3600),"hour");case e<2592e3:return t.format(-Math.floor(e/86400),"day");case e<31536e3:return t.format(-Math.floor(e/2592e3),"month");default:return t.format(-Math.floor(e/31536e3),"year")}},compare=(i,e)=>i.time<e.time?-1:i.time>e.time?1:0,handlePageTitle=i=>{i&&conditions(ConditionName.showModuleTitle)&&(document.title=i)},getUUID=()=>{let i=localStorage.getItem("hamrahiUUID");return i||(i=uuidGenerator(),localStorage.setItem("hamrahiUUID",i)),i.toString()},uuidGenerator=()=>{let i="xxxxxxxx-xxxx-Mxxx-Nxxx-x".replace(/[xMN]/g,e=>{let t;return e==="M"?t=Math.floor(1+Math.random()*5):e==="N"?t=Math.floor(8+Math.random()*4):t=Math.floor(Math.random()*16),t.toString(16)});return i+=Date.now().toString(16),i},isTouchScreen=()=>"ontouchstart"in window||window.DocumentTouch&&document instanceof window.DocumentTouch,isTouchScreenLandscape=()=>{const{videoElementSizeInfo:i}=store.getState().videoData,{isFullScreen:e}=store.getState().controller;return conditions(ConditionName.isMiniPlayer)&&i.width!==0?isTouchScreen()&&i.width>i.height:isTouchScreen()&&e},isTouchScreenPortrait=()=>{const{isFullScreen:i}=store.getState().controller;return isTouchScreen()&&!i},handleIsComplexDesktop=i=>!isTouchScreen()&&!document.fullscreenElement&&i,isIOS=()=>["iPad Simulator","iPhone Simulator","iPod Simulator","iPad","iPhone","iPod"].includes(navigator.platform)||navigator.userAgent.includes("Mac")&&"ontouchend"in document,controllbarIconSize={miniPlayer:15,other:20},addZeroBefore=i=>(i<10?"0":"")+i,secondsToHMS=i=>{const e=Math.floor(i/3600),t=Math.floor(i%3600/60),n=Math.floor(i%3600%60);return e<1?`${addZeroBefore(t)}:${addZeroBefore(n)}`:`${addZeroBefore(e)}:${addZeroBefore(t)}:${addZeroBefore(n)}`},secondsToPersianHMS=i=>{const e=Math.floor(i/3600),t=Math.floor(i%3600/60),n=Math.floor(i%3600%60),s=n?`${n} ${translate().seconds}`:null,r=t?`${t} ${translate().minutes}`:null;return[e?`${e} ${translate().hour}`:null,r,s].filter(o=>o!==null)},efficientSecondsToPersianHMS=i=>{const e=i>=3600?Math.floor(i/3600):0,t=i>=60?Math.floor(i%3600/60):0,n=i<60*60?Math.floor(i%3600%60):0,s=n?`${n} ${translate().seconds}`:null,r=t?`${t} ${translate().minutes}`:null;return[e?`${e} ${translate().hour}`:null,r,s].filter(o=>o!==null).join(" و ")},staticFormats=i=>["mp4","mkv","mov","m4v"].includes(i)?"mp4":i==="webm"||i==="flv"?i:["mp3","ogg"].includes(i)?"mp3":!1,addUuidToSrc=i=>{const e=new URL(i);let t=i;return e.search.length?t+=`&uuid=${getUUID()}`:t+=`?uuid=${getUUID()}`},handleSumVotes=i=>{let e=0;return i&&Object.keys(i).length>0&&i.options.length>0&&i.options.forEach(t=>{livePoll()&&livePoll().polls.filter(n=>n.qid===i.id&&n.oid===t.id&&n.sumOptionVotes===t.vote+1).length>0&&(e+=1),e+=t.vote}),e},checkParentTarget=(i,e)=>{try{return[i.target.id,i.target.parentNode.id,i.target.parentNode.parentNode.id,i.target.parentNode.parentNode.parentNode.id,i.target.parentNode.parentNode.parentNode.parentNode.id].includes(e)}catch{return!1}},unitization=i=>i/1e3<1?{value:i,unit:""}:i/(1e3*1e3)<1?{value:Math.ceil(i/1e3*10)/10,unit:"K"}:i/(1e3*1e3*1e3)<1?{value:Math.ceil(i/(1e3*1e3)*10)/10,unit:"M"}:{value:0,unit:""},handleNotActiveText=(i="404")=>{if(i==="liveAndVod")return{title:translate().currentlyNoVideoContent,description:translate().viewOtherVideos};if(i==="404"||i===void 0)return{title:"404",description:translate().enteredAddressNotCorrect}},isVoted=i=>livePoll()&&livePoll().polls.some(e=>e.qid===i),isSelectedOption=(i,e)=>livePoll()&&livePoll().polls.some(t=>t.qid===i&&t.oid===e),appendQueryParamsToChunks=i=>{const e=store.dispatch,{token:t,params:n}=store.getState().videoData;let s="";s=i.split("m3u8")[1],s?s=`${s}&uuid=${getUUID()}`:s=`?uuid=${getUUID()}`,conditions(ConditionName.isAuth)&&(hasQuestionMark(s)?s=`${s}&token=${t}`:s=`?token=${t}`),conditions(ConditionName.hasDaaniTokenParams)&&(hasQuestionMark(s)?s=`${s}&ext_user=${n.daaniToken}`:s=`?ext_user=${n.daaniToken}`),e(setStreamLinkParams(s))},inViewPort=i=>{if(i){const e=i.offsetLeft-i.offsetWidth/2,t=window.innerWidth-(i.offsetLeft+i.offsetWidth);if(e>=0&&t>=0)return"inViewport";if(e<0)return"OutViewPortFromLeft";if(t<0)return"OutViewPortFromRight"}},handleIsComplexPortrait=i=>i.portrait==="true"&&isTouchScreenPortrait()&&i.isGeneral!=="true"&&i.raw!=="true",isFullMobilePortrait=()=>{const{params:i,videoElementSizeInfo:e}=store.getState().videoData;return i.portrait!=="true"&&(+e.width.toFixed(0)===window.screen.width||+e.width.toFixed(0)===window.screen.availWidth)&&(window.screen.height>window.screen.width||window.screen.availHeight>window.screen.availWidth)},handleRippleCircle=(i,e)=>{const t=document.getElementById(e),n=document.createElement("span");n.style.width=n.style.height="50px",n.style.left=`${i.touches[0].clientX-t.offsetLeft-25}px`,n.style.top=`${i.touches[0].clientY-t.offsetTop-25}px`,n.classList.add("pl-ripple");const s=t.getElementsByClassName("pl-ripple")[0];s&&s.remove(),t.appendChild(n)},handleRipple=(i,e,t=50)=>{const n=i.clientX!==void 0?i.clientX:i.touches[0].clientX,s=i.clientY!==void 0?i.clientY:i.touches[0].clientY,r=document.getElementById(e),a=document.createElement("span");a.style.width=a.style.height=`${t}px`,a.style.left=`${n-t/2}px`,a.style.top=`${s-r.getBoundingClientRect().top-t/2}px`,a.classList.add("pl-ripple");const o=r.getElementsByClassName("pl-ripple")[0];o&&o.remove(),r.appendChild(a)},changeVideoUrl=(i,e)=>{const{params:t}=store.getState().videoData,n=findFirstVideoInRecommendationList(),s=i||n.type,r=e||n.id;if(conditions(ConditionName.hasSportProvider)){const a=window.location.href.split("?")[1];return a?`${window.location.origin}/ngpplayer/${s}/${r}?${a}`:`${window.location.origin}/ngpplayer/${s}/${r}`}else return window.location.href.replace(`type=${t.type}`,`type=${s}`).replace(`id=${t.id}`,`id=${r}`)},hasQuestionMark=i=>!!i.match(/\?/g),responseValidator=i=>i>=200&&i<300,generateNewAccessToken=async()=>{var i,e,t;if((i=authToken.get())!=null&&i.refresh){const{data:n,status:s}=await apiCaller({url:API().auth.refresh,method:"POST",data:{refresh:(e=authToken.get())==null?void 0:e.refresh}});if(responseValidator(s)){const r={access:n.access,refresh:(t=authToken.get())==null?void 0:t.refresh,token_id:n.token_id};authToken.set(r)}else throw authToken.remove(),new Error("")}},isWhiteListUrl=i=>!!whiteListTargets.find(e=>new URL(i).origin.includes(e)),handlePopoverSizeInMiniPlayer=()=>{const{videoElementSizeInfo:i}=store.getState().videoData;return conditions(ConditionName.isMiniPlayer)&&!conditions(ConditionName.isFullMobilePortrait)?{top:i.top,height:i.height,left:i.left}:{}},numbersToLetters=[translate().first,translate().second,translate().third,translate().fourth,translate().fifth,translate().sixth,translate().seventh,translate().eighth,translate().ninth,translate().tenth,translate().eleventh,translate().twelfth,translate().thirteenth,translate().fourteenth,translate().fifteenth,translate().sixteenth,translate().seventeenth,translate().eighteenth,translate().nineteenth,translate().twentieth],handleVideoType=()=>{const{params:i}=store.getState().videoData;switch(i.type){case"vod":return VideoNumberTypeEnum.Vod;case"archive":case"live":return VideoNumberTypeEnum.Archive;case"clip":return VideoNumberTypeEnum.Clip;default:return VideoNumberTypeEnum.FutureLive}},handleHasXTokenParamOrSendXToken=()=>{if(conditions(ConditionName.hasXTokenParamOrSendXToken))return{"x-token":store.getState().videoData.params.xToken}},handleGetBookmarkCategory=i=>{switch(i){case"film":return BookmarkCategory.FILM;case"sport":return BookmarkCategory.SPORT;default:return BookmarkCategory.FILM}};function getWebEnvConfig(i){const t=store.getState().videoData.webListConfig.find(n=>n.key===i);return t?t.value:""}const clearRedux=()=>{const i=store.dispatch;i(setClearVideoDataSlice()),i(setClearControllerSlice()),i(setClearUserSlice()),i(setClearTagsSlice()),i(setClearPopoversSlice()),i(setClearCommentsSlice()),i(setClearChatSlice())},weighted_random=i=>{let e,t=[];for(e=0;e<i.length;e++)t[e]=i[e].weight+(t[e-1]||0);let n=Math.random()*t[t.length-1];for(e=0;e<t.length&&!(t[e]>n);e++);return i[e].domain},imageFormatChecking=i=>["jpg","png","jpeg"].includes(i.toLowerCase().split(".")[i.toLowerCase().split(".").length-1]),handlePageLoadTime=i=>{let e=0;performance&&performance.getEntriesByType("navigation")&&(e=performance.getEntriesByType("navigation")[0].duration),i.current=e},highestResolutionSupported=(i,e,t)=>{const n=e*window.devicePixelRatio,s=t*window.devicePixelRatio;let r=[];return conditions(ConditionName.isTouchScreenPortrait)?r=i.filter(a=>Number(a.split("x")[0].trim())<=n):r=i.filter(a=>Number(a.split("x")[0].trim())<=s||Number(a.split("x")[1].trim())<=n),r.indexOf(r[r.length-1])},getSubtitleLabel=i=>{let e;switch(i){case"fa":e=translate().persian;break;case"en":e=translate().english;break;case"ar":e=translate().arabic;break;case"tr":e=translate().turkish;break}return e},strToObj=str=>{var obj={};if(str&&typeof str=="string"){var objStr=str.match(/\{(.)+\}/g);eval("obj ="+objStr)}return obj},hasPermissionToRedirect=i=>{const e=store.dispatch;if(e(setIsFetchDetails(!0)),i)try{const t=new URL(i);isWhiteListGeneralUrl(t.hostname,whiteListGeneralUrl)?e(setIsValidAddress(!0)):(e(setErrorType("404")),e(setIsValidAddress(!1)))}catch{e(setErrorType("404")),e(setIsValidAddress(!1))}};function isWhiteListGeneralUrl(i,e){for(let t=0;t<e.length;t++)if(i.startsWith(e[t]))return!0;return!1}const flattenObject=(i,e)=>{let t={};for(const n in i){const s=e?`${e}_${n}`:n;typeof i[n]=="object"&&!Array.isArray(i[n])?t={...t,...flattenObject(i[n],s)}:t[s]=i[n]}return t},findIntersectionBetweenTwoArray=(i,e)=>i.filter(t=>!e.includes(t)),sortLanguages=i=>{const e={fa:1,en:2};return i.slice().sort((t,n)=>{const s=e[t.lang]||999,r=e[n.lang]||999;return s-r})},hexToRGB=(i,e=1,t=!1)=>{const n=parseInt(i.slice(1,3),16),s=parseInt(i.slice(3,5),16),r=parseInt(i.slice(5,7),16);return t?`${n} ${s} ${r}`:e?"rgba("+n+", "+s+", "+r+", "+e+")":"rgb("+n+", "+s+", "+r+")"},checkIsOnPremise=i=>{const{params:e}=store.getState().videoData;return conditions(ConditionName.isOnPermise)?window.location.origin:e.baseUrl??i},handle360=async()=>{let i=!1;(window.DeviceOrientationEvent||window.DeviceMotionEvent)&&(i=await GyroControl.isAvailable());const e=new View360("#videoTagContainer",{zoomRange:{min:.35,max:3},initialZoom:.41,gyro:i});return e.on("inputStart",()=>store.dispatch(setIsViewChangeIn360(!0))),e.on("inputEnd",()=>store.dispatch(setIsViewChangeIn360(!1))),e.load(new EquirectProjection({src:videoTag(),video:{autoplay:!0}})),e},fullConfig=resolveConfig(config),getTailwindColor=i=>i.split(".").reduce((e,t)=>e==null?void 0:e[t],fullConfig.theme),sendFluentLog=i=>{const{poll_emoji:e}=store.getState().user.settings,{params:t,details:n}=store.getState().videoData;let s={...i,timestamp:Date.now(),clientUUID:getUUID(),uuid:getUUID(),link:window.location.href,user_id:conditions(ConditionName.isLiveParam)?Number(t.id):n.user_id,live_id:conditions(ConditionName.isLiveParam)?n.id:null,format:i.category==="feedback"?conditions(ConditionName.isStaticFormat)?"static":"hls":void 0,content_type:n.content_type,content_id:n.content_id};conditions(ConditionName.isLiveParam)&&(s[featureToggle]=e),apiCaller({url:API().logs,method:"post",data:s})};function errorLogProvider(i){i&&sendFluentLog(ExceptionsLog(i.type,i.message))}class ErrorBoundary extends React2.Component{constructor(){super(...arguments);Te(this,"state",{hasError:!1,error:null,errorInfo:null})}static getDerivedStateFromError(){return{hasError:!0}}componentDidCatch(t,n){this.setState({error:t,errorInfo:n}),console.log(t,n),errorLogProvider({type:"OTHER_ERROR",message:t.message})}render(){return this.state.hasError?jsxRuntime.jsx(jsxRuntime.Fragment,{}):this.props.children}}const useAppDispatch=()=>useDispatch(),useAppSelector=useSelector,useKeyPress=(i,e)=>{const t=React2.useRef(e);React2.useEffect(()=>{t.current=e},[]),React2.useEffect(()=>{const n=s=>{s.code===i&&!["INPUT","TEXTAREA"].includes(s.target.nodeName)&&!s.target.isContentEditable&&!conditions(ConditionName.showTagsPopover)&&!conditions(ConditionName.showPersonalMarkerPopover)&&!conditions(ConditionName.showFeedbackPopover)&&t.current(s)};return document.addEventListener("keydown",n),()=>document.removeEventListener("keydown",n)},[i])},useHandleKeyPress=()=>{const i=useAppDispatch();useKeyPress("Space",e=>{conditions(ConditionName.isPressKeySpace)&&handlePlayPause(e)}),useKeyPress("KeyK",e=>{conditions(ConditionName.isPressKeyK)&&handlePlayPause(e)}),useKeyPress("ArrowRight",e=>{conditions(ConditionName.isPressKeyArrowRight)&&conditions(ConditionName.hasTimeMachine)&&handleBackwardForward("forward",15,e)}),useKeyPress("ArrowLeft",e=>{conditions(ConditionName.isPressKeyArrowLeft)&&conditions(ConditionName.hasTimeMachine)&&handleBackwardForward("backward",15,e)}),useKeyPress("KeyI",()=>{conditions(ConditionName.isPressKeyI)&&videoTag().requestPictureInPicture()}),useKeyPress("KeyF",()=>{conditions(ConditionName.isPressKeyF)&&handleFullScreen()}),useKeyPress("KeyL",()=>{conditions(ConditionName.isPressKeyL)&&handleLock(conditions(ConditionName.isLock)?"unlock":"lock")}),useKeyPress("KeyC",()=>{conditions(ConditionName.isPressKeyC)&&handleSubtitle()}),useKeyPress("KeyN",()=>{conditions(ConditionName.isPressKeyN)&&(handleClickRecommendationCard(),handleClickVideoCard())}),useKeyPress("KeyQ",()=>{if(conditions(ConditionName.isPressKeyQ)){const{multiLivesPopover:e}=store.getState().popovers;i(setMultiLivesPopovers(!e))}}),useKeyPress("KeyE",()=>{if(conditions(ConditionName.isPressKeyE)){const{markersListPopover:e}=store.getState().popovers;i(setClearPopoversSlice()),i(setMarkersListPopover(!e)),conditions(ConditionName.isActiveElements)?conditions(ConditionName.showMarkerListPopover)||i(setActiveElements(!1)):i(setActiveElements(!0))}}),useKeyPress("KeyS",()=>{const{speedPopover:e}=store.getState().popovers;i(setClearPopoversSlice()),conditions(ConditionName.isPressKeyS)&&(i(setSpeedPopover(!e)),conditions(ConditionName.isActiveElements)?conditions(ConditionName.showSpeedPopover)||i(setActiveElements(!1)):i(setActiveElements(!0)))}),useKeyPress("KeyM",()=>{if(conditions(ConditionName.isPressKeyM)){const{settings:e}=store.getState().user;handleChangeSoundVolume(e.volume?0:50)}})},useColorSwitcher=()=>{const i=window.matchMedia("(prefers-color-scheme: light)"),e=localStorage.getItem("theme");i.addEventListener("change",function(n){n.matches?t(Theme.DARK):t(Theme.LIGHT)});const t=n=>{const s=window.document.documentElement;s.classList.remove(n===Theme.DARK?Theme.LIGHT:Theme.DARK),s.classList.add(n),localStorage.setItem("theme",n)};return React2.useEffect(()=>{e&&t("light")},[e]),null},useHandleParams=i=>{const e=useAppDispatch(),{token:t,params:n}=useAppSelector(({videoData:{token:E,params:F}})=>({token:E,params:F}),shallowEqual),{isClickInnerCard:s}=useAppSelector(({controller:{isClickInnerCard:E}})=>({isClickInnerCard:E}),shallowEqual),[r,a]=React2.useState([]),[o,l]=React2.useState([]);let d={};const f=async()=>{i.isAuth==="true"?t&&e(setIsReady(!0)):e(setIsReady(!0))},u=()=>e(setPlayerParams(d)),p=()=>{if(i.theme){const E=i.theme===Theme.LIGHT?Theme.LIGHT:Theme.DARK;e(setTheme(E)),d.theme=E}else window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?(e(setTheme(Theme.DARK)),d.theme="dark"):(e(setTheme(Theme.LIGHT)),d.theme="light")},m=()=>{let E=d.featureSet;return typeof d.featureSet=="string"&&(E=strToObj(d.featureSet)),d.featureSet=E,d},g=()=>{i.uuid&&(localStorage.setItem("hamrahiUUID",i.uuid),d.uuid=i.uuid)},y=()=>{const E=api.get("xToken");E&&!d.xToken&&(d.xToken=E)},v=()=>{d={portrait:conditions(ConditionName.isTouchScreen)&&i.isGeneral!=="true"?"true":"false",provider:"unknown",chart:"true",authentication:"true",...i},e(setIsComplexDesktop(d.portrait==="true"&&!conditions(ConditionName.isTouchScreen))),e(setIsComplexPortrait(handleIsComplexPortrait({portrait:d.portrait,...i})))},b=()=>{const E=String(i["e-url"]),F=String(i["e-cover"]);d={src:E.endsWith("/")?window.atob(E.slice(0,-1)):window.atob(E),type:i.type,fullscreen:i.fullscreen,autoplay:i.autoplay,snapshot:i.snapshot,portrait:"false",fullrate:i.fullrate,width:i.width,height:i.height,cover:F&&F!=="undefined"?window.atob(F):void 0,onFinished:i.onFinished,onSnapshot:i.onSnapshot,uuid:getUUID()}},C=(E,F,O)=>{const A=Object.keys(E);let N=findIntersectionBetweenTwoArray(F,A),M=A.filter(Z=>findIntersectionBetweenTwoArray(findIntersectionBetweenTwoArray(allParams,F),O).includes(Z));return{requiredItems:N,notRequiredItems:M}},_=()=>{let E=[],F=[];return i.quiz==="true"?(E=quizConditions.required,F=quizConditions.optionals):i.raw==="true"?(E=rawConditions.required,F=rawConditions.optionals):i.isGeneral==="true"?(E=isGeneralConditions.required,F=isGeneralConditions.optionals):i.type==="mp4"?(E=staticConditions.required,F=staticConditions.optionals):["live","vod","archive","clip"].includes(String(i.type))&&(E=nonStaticConditions.required,F=nonStaticConditions.optionals),{requiredConditions:E,optionalsConditions:F}},R=async()=>{if(d={},Object.keys(i).includes("type")){const{requiredItems:E,notRequiredItems:F}=C(i,_().requiredConditions,_().optionalsConditions);l(F),E.length?a(E):(["live","vod","archive","clip"].includes(String(i.type))?(v(),y()):staticFormats(String(i.type))&&b(),g(),Object.keys(d)&&m(),p(),u(),f())}else a(["type"])};return React2.useLayoutEffect(()=>{n.id&&i.quiz!=="true"&&s&&(i={...n,homeButtonClickFlag:i.homeButtonClickFlag},R())},[n.id]),React2.useLayoutEffect(()=>{R()},[i,t,s]),{requiredItems:r,notRequiredItems:o}},StaticPlayer=React2.lazy(()=>Promise.resolve().then(()=>player$1)),LiveAndVodPlayer$1=React2.lazy(()=>Promise.resolve().then(()=>player)),ParamsErrorPopover$1=React2.lazy(()=>Promise.resolve().then(()=>paramsErrorPopover)),VideoPlayer$2=({params:i})=>{const e=useAppDispatch();useAppSelector(({controller:{isFullScreen:a}})=>({isFullScreen:a}),shallowEqual),useAppSelector(({videoData:{isReady:a,params:o,isComplexPortrait:l}})=>({isReady:a,params:o,isComplexPortrait:l}),shallowEqual);const{requiredItems:t,notRequiredItems:n}=useHandleParams(i);useHandleKeyPress(),useColorSwitcher(),React2.useEffect(()=>(e(setIsClickInnerCard(!1)),()=>clearRedux()),[]),React2.useEffect(()=>{const a=localStorage.getItem("isAutoPlay");a&&e(setIsAutoPlay(a==="true")),Document.prototype.playPause=o=>handlePlayPauseInDOM(o),conditions(ConditionName.isIOS)||window.screen.orientation.addEventListener("change",o=>{!conditions(ConditionName.isFullScreen)&&conditions(ConditionName.isParamsPortrait)&&e(setIsComplexPortrait(!0));const l=document.getElementById("video-player-module");l&&(o.target.type.includes("landscape")&&!conditions(ConditionName.isFullScreen)?(l.classList.add("pl-overflow-scroll"),l.classList.remove("pl-overflow-hidden")):(l.classList.add("pl-overflow-hidden"),l.classList.remove("pl-overflow-scroll")))})},[]);const s=()=>{let a="";return conditions(ConditionName.isParamsPortrait)?window.innerWidth>window.innerHeight&&conditions(ConditionName.isFullScreen)?a="pl-overflow-hidden":window.innerWidth>window.innerHeight&&!conditions(ConditionName.isFullScreen)?a="pl-overflow-auto":window.innerWidth<window.innerHeight&&(a="pl-overflow-hidden"):a="pl-overflow-hidden",a};let r=jsxRuntime.jsx(jsxRuntime.Fragment,{});return t.length||n.length||!conditions(ConditionName.hasAllParams)?r=jsxRuntime.jsx(React2.Suspense,{fallback:"",children:jsxRuntime.jsx(ParamsErrorPopover$1,{requiredItems:t,notRequiredItems:n})}):conditions(ConditionName.isReady)?r=jsxRuntime.jsx("div",{className:`video-player-container ${s()} ${conditions(ConditionName.isComplexPortrait)&&"!no-scrollbar pl-max-h-[100dvh]"} ${conditions(ConditionName.isFullScreen)&&"pl-fixed pl-right-0 pl-top-0 pl-h-screen pl-w-screen !pl-overflow-hidden"}`,style:{zIndex:zIndex.videoPlayerInFullScreen,touchAction:"pan-y"},id:"video-player-module",children:jsxRuntime.jsx(React2.Suspense,{fallback:"",children:conditions(ConditionName.isStaticFormat)?jsxRuntime.jsx(StaticPlayer,{}):jsxRuntime.jsx(LiveAndVodPlayer$1,{})})}):r=jsxRuntime.jsx("div",{className:"!pl-aspect-video pl-max-h-screen pl-w-full pl-overflow-hidden pl-bg-white dark:pl-bg-black"}),jsxRuntime.jsxs(ErrorBoundary,{children:[jsxRuntime.jsx(nt,{position:"bottom-right",autoClose:3e3,theme:conditions(ConditionName.isDarkMode)?"dark":"light"}),r]})};var dist={},hasRequiredDist;function requireDist(){if(hasRequiredDist)return dist;hasRequiredDist=1,Object.defineProperty(dist,"__esModule",{value:!0}),dist.parse=a,dist.serialize=d;const i=/^[\u0021-\u003A\u003C\u003E-\u007E]+$/,e=/^[\u0021-\u003A\u003C-\u007E]*$/,t=/^([.]?[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)([.][a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)*$/i,n=/^[\u0020-\u003A\u003D-\u007E]*$/,s=Object.prototype.toString,r=(()=>{const p=function(){};return p.prototype=Object.create(null),p})();function a(p,m){const g=new r,y=p.length;if(y<2)return g;const v=(m==null?void 0:m.decode)||f;let b=0;do{const C=p.indexOf("=",b);if(C===-1)break;const _=p.indexOf(";",b),R=_===-1?y:_;if(C>R){b=p.lastIndexOf(";",C-1)+1;continue}const E=o(p,b,C),F=l(p,C,E),O=p.slice(E,F);if(g[O]===void 0){let A=o(p,C+1,R),N=l(p,R,A);const M=v(p.slice(A,N));g[O]=M}b=R+1}while(b<y);return g}function o(p,m,g){do{const y=p.charCodeAt(m);if(y!==32&&y!==9)return m}while(++m<g);return g}function l(p,m,g){for(;m>g;){const y=p.charCodeAt(--m);if(y!==32&&y!==9)return m+1}return g}function d(p,m,g){const y=(g==null?void 0:g.encode)||encodeURIComponent;if(!i.test(p))throw new TypeError(`argument name is invalid: ${p}`);const v=y(m);if(!e.test(v))throw new TypeError(`argument val is invalid: ${m}`);let b=p+"="+v;if(!g)return b;if(g.maxAge!==void 0){if(!Number.isInteger(g.maxAge))throw new TypeError(`option maxAge is invalid: ${g.maxAge}`);b+="; Max-Age="+g.maxAge}if(g.domain){if(!t.test(g.domain))throw new TypeError(`option domain is invalid: ${g.domain}`);b+="; Domain="+g.domain}if(g.path){if(!n.test(g.path))throw new TypeError(`option path is invalid: ${g.path}`);b+="; Path="+g.path}if(g.expires){if(!u(g.expires)||!Number.isFinite(g.expires.valueOf()))throw new TypeError(`option expires is invalid: ${g.expires}`);b+="; Expires="+g.expires.toUTCString()}if(g.httpOnly&&(b+="; HttpOnly"),g.secure&&(b+="; Secure"),g.partitioned&&(b+="; Partitioned"),g.priority)switch(typeof g.priority=="string"?g.priority.toLowerCase():void 0){case"low":b+="; Priority=Low";break;case"medium":b+="; Priority=Medium";break;case"high":b+="; Priority=High";break;default:throw new TypeError(`option priority is invalid: ${g.priority}`)}if(g.sameSite)switch(typeof g.sameSite=="string"?g.sameSite.toLowerCase():g.sameSite){case!0:case"strict":b+="; SameSite=Strict";break;case"lax":b+="; SameSite=Lax";break;case"none":b+="; SameSite=None";break;default:throw new TypeError(`option sameSite is invalid: ${g.sameSite}`)}return b}function f(p){if(p.indexOf("%")===-1)return p;try{return decodeURIComponent(p)}catch{return p}}function u(p){return s.call(p)==="[object Date]"}return dist}requireDist();/**
|
|
79
|
+
attribute vec3 position;attribute vec2 uv;uniform mat4 uMVMatrix;uniform mat4 uPMatrix;uniform vec4 uTexScaleOffset[2];uniform float uEye;varying highp vec2 vUV;void main(){vec4 scaleOffset=uTexScaleOffset[int(uEye)];vUV=uv.xy*scaleOffset.xy+scaleOffset.zw;gl_Position=uPMatrix*uMVMatrix*vec4(position,1.0);}`;class StereoEquiProjection extends Projection{constructor(e){super(e),this._mode=e.mode}createMesh(e,t){let n,s;switch(this._mode){case StereoEquiProjection.MODE.LEFT_RIGHT:n=[.5,1,0,0],s=[.5,1,.5,0];break;default:n=[1,.5,0,0],s=[1,.5,0,.5]}const r={uTexture:new UniformTexture2D(e,t),uEye:new UniformFloat(0),uTexScaleOffset:new UniformVector4Array([n,s])},a=new SphereGeometry,o=new ShaderProgram(e,vs,fs$2,r),l=e.createVAO(a,o);return new TriangleMesh(l,o)}}StereoEquiProjection.MODE={LEFT_RIGHT:"left_right",TOP_BOTTOM:"top_bottom"};const ar={save:"يحفظ",addPersonalMarker:"أضف علامة شخصية",editPersonalMarker:"تحرير العلامة الشخصية",pleaseSelectMarker:"الرجاء تحديد علامة.",pleaseEnterMarkerName:"الرجاء إدخال اسم العلامة.",maxLengthMarkerName:"يجب ألا يتجاوز طول اسم المؤشر 256 حرفًا.",successAddMarker:"تمت إضافة العلامة بنجاح.",successEditMarker:"تم تحرير العلامة بنجاح.",errorRegisteringTwoMarker:"خطأ في تسجيل علامتين في نفس الوقت.",pleaseLoginFirst:"الرجاء تسجيل الدخول أولا",addMarker:"أضف علامة",markerName:"اسم العلامة",description:"وصف",pleaseEnterMarkerDescription:"أدخل وصفًا للعلامة.",cancel:"انسحب",nextIn:"التالي في",play:"يلعب",visit:"يزور",clickForMoreVideos:"انقر لمزيد من أشرطة الفيديو",hour:"ساعة",minutes:"دقائق",seconds:"ثانیه",currentlyNoItemsSaved:"لا يوجد حاليا أي عناصر محفوظة.",savedList:"القائمة المحفوظة",enterYourOpinion:"أدخل رأيك",notPossibleRegisterComment:"حاليا، ليس من الممكن تسجيل تعليق.",youMustSubmitYourComment:"يجب عليك تقديم تعليقك",notPossibleToRegisterComment:"حاليا، ليس من الممكن تسجيل تعليق.",comeIn:"ادخل",sharing:"مشاركة",recordFeedback:"سجل ردود الفعل",cinematicFilm:"فيلم سينمائي",serial:"مسلسل",subtitle:"الترجمة",translation:"مزدوج",persian:"الفارسية",english:"إنجليزي",arabic:"عربي",turkish:"تركي",playlist:"قائمة التشغيل",playlists:"قوائم التشغيل",showPlaylist:"عرض قائمة التشغيل",suggestedVideos:"الفيديوهات المقترحة",become:"يصبح.",production:"إنتاج",viewPoint:"وجهة نظر",show:"يعرض",saved:"أنقذ",home:"بيت",profile:"حساب تعريفي",previousViewingTime:"وقت المشاهدة السابق",continuousPlaybackText:'سيتم تشغيل الفيديو الخاص بك من وقت المشاهدة السابق. إذا كنت تريد تشغيل الفيديو من البداية، فاختر خيار "مشاهدة الفيديو من البداية".',watchContinuousVideo:"شاهد بقية الفيديو",watchCBeginningVideo:"شاهد الفيديو من البداية",takingPicture:"التقاط الصور",liveChat:"الدردشة الحية",hideLiveChat:"إخفاء الدردشة المباشرة",showLiveChat:"عرض الدردشة الحية",anonymousUser:"مستخدم مجهول",awaitingApprovalByAdmin:"في انتظار موافقة المشرف",approvedByAdmin:"تمت الموافقة عليه من قبل المشرف",closeMessage:"أغلق الرسالة",viewFullPinnedMessage:"عرض الرسالة المثبتة كاملة",pinnedMessage:"رسالة مثبتة",less:"أقل",more:"أكثر",copyLink:"انسخ الرابط",linkWasCopied:"تم نسخ الرابط",download:"تحميل",withQuality:"مع الجودة",selectDownloadQuality:"حدد جودة التنزيل",badSoundAndImageQuality:"جودة الصوت والصورة سيئة",streamLinkFailure:"فشل رابط الدفق",amountOfInternetUsageWasHigh:"كان مقدار استخدام الإنترنت مرتفعًا",programAppearance:"مظهر البرنامج",soundAndImageMismatch:"عدم تطابق الصوت والصورة",noSubtitle:"لا ترجمات",noSubtitle1:"لا ترجمات",accessForMeDifficult:"كان من الصعب بالنسبة لي الوصول إليه",videoContentWasNotGood:"محتوى الفيديو لم يكن جيداً",goodSoundAndImageQuality:"جودة صوت وصورة جيدة",noDisconnection:"لا يوجد انقطاع",amountOfInternetUsage:"حجم استخدام الانترنت",privacyProtection:"حماية الخصوصية",farsiSubtitles:"ترجمات فارسية",easyAccess:"سهولة الوصول",appropriateVideoContent:"محتوى الفيديو المناسب",veryBad:"سيئة للغاية",bad:"سيء",middle:"متوسط",good:"جيد",veryGood:"جيد جدًا",successfullyCommentSubmit:"لقد تم تسجيل تعليقك بنجاح.",ratingZarebin:"",fullRateInternetTraffic:"يتم احتساب حركة المرور الخاصة بك على الإنترنت بالسعر الكامل.",exitFrom:"خروج از",fullScreen:"صفحة كاملة",lock:"قفل",markersList:"قائمة المؤشرات",markers:"نشانگرها",languageSelection:"اختيار اللغة",default:"تقصير",retry:"حاول ثانية",pictureInPicture:"صورة في صورة",video:"فيديو",season:"موسم",section:"جزء",playNextVideo:"قم بتشغيل الفيديو التالي",replay:"اعادتها",pause:"قف",quality:"جودة",automatic:"تلقائي",basedOnYourInternetSpeed:"على أساس سرعة الإنترنت لديك",settings:"إعدادات",choiceQuality:"اختيار الجودة",subtitleSettings:"إعدادات الترجمة",jumpTo:"القفز الى",mute:"صامت",unmute:"مع الصوت",playBackSpeed:"سرعة التشغيل",normalSpeed:"السرعة العادية",subtitleBackgroundColor:"لون خلفية الترجمة",subtitleTextColor:"لون نص الترجمة",subtitleSelection:"اختيار الترجمة",selectSubtitleBackgroundColor:"حدد لون الخلفية للترجمة",selectSubtitleTextColor:"اختر لون نص الترجمة",tagFilter:"مرشح العلامة",tags:"العلامات",separateItemsWithEnter:"افصل العناصر باستخدام Enter",contentType:"نوع المحتوى",search:"يبحث",accordingThisTagVideoNotFound:"حسب العلامة المطلوبة لم يتم العثور على الفيديو!",autoPlay:"اللعب التلقائي",bright:"ساطع",off:"عن",is:"يكون",photo:"صورة",currentlyNoVideoContent:"لا يوجد حاليا أي محتوى فيديو على هذه القناة لهذا البث المباشر.",viewOtherVideos:"يمكنك مشاهدة عمليات البث المباشر الأخرى أو التحقق من جدول البث المباشر المستقبلي لقناتك المطلوبة",enteredAddressNotCorrect:"العنوان الذي تم إدخاله غير صحيح.",first:"أولاً",second:"ثانية",third:"ثالث",fourth:"الرابع",fifth:"الخامس",sixth:"السادس",seventh:"السابع",eighth:"الثامن",ninth:"التاسع",tenth:"العاشر",eleventh:"الحادي عشر",twelfth:"الثاني عشر",thirteenth:"الثالث عشر",fourteenth:"الرابع عشر",fifteenth:"الخامس عشر",sixteenth:"السادس عشر",seventeenth:"السابع عشر",eighteenth:"الثامن عشر",nineteenth:"التاسع عشر",twentieth:"العشرين"},en={save:"Save",addPersonalMarker:"Add Marker",editPersonalMarker:"Edit Marker",pleaseSelectMarker:"Please select a marker.",pleaseEnterMarkerName:"Enter a marker name.",maxLengthMarkerName:"Marker name can’t exceed 256 characters.",successAddMarker:"Marker added successfully.",successEditMarker:"Marker updated successfully.",errorRegisteringTwoMarker:"Could not register marker.",pleaseLoginFirst:"Please log in first.",addMarker:"Add Marker",markerName:"Marker Name",description:"Description",pleaseEnterMarkerDescription:"Enter marker description.",cancel:"Cancel",nextIn:"Next in",play:"Play",visit:"Visit",clickForMoreVideos:"Click for more videos",hour:"Hour",minutes:"Minutes",seconds:"Seconds",currentlyNoItemsSaved:"No saved items yet.",savedList:"Saved List",enterYourOpinion:"Write your comment",notPossibleRegisterComment:"Comments are disabled right now.",youMustSubmitYourComment:"Please log in to comment.",notPossibleToRegisterComment:"Comments are disabled right now.",comeIn:"Login",sharing:"Share",recordFeedback:"Send Feedback",cinematicFilm:"Movie",serial:"Series",subtitle:"Subtitles",translation:"Dubbed",persian:"Persian",english:"English",arabic:"Arabic",turkish:"Turkish",playlist:"Playlist",playlists:"Playlists",showPlaylist:"Show Playlist",suggestedVideos:"Suggested Videos",become:"Become",production:"Production",viewPoint:"Viewpoint",show:"Show",saved:"Saved",home:"Home",profile:"Profile",previousViewingTime:"Last watched time",continuousPlaybackText:"Your video will continue from where you left off. To start from the beginning, choose 'Watch from start'.",watchContinuousVideo:"Continue Watching",watchCBeginningVideo:"Watch from Start",takingPicture:"Take Screenshot",liveChat:"Live Chat",hideLiveChat:"Hide Chat",showLiveChat:"Show Chat",anonymousUser:"Guest User",awaitingApprovalByAdmin:"Pending admin approval",approvedByAdmin:"Approved",closeMessage:"Close",viewFullPinnedMessage:"View full pinned message",pinnedMessage:"Pinned Message",less:"Show less",more:"Show more",copyLink:"Copy Link",linkWasCopied:"Link copied!",download:"Download",withQuality:"Quality",selectDownloadQuality:"Choose download quality",badSoundAndImageQuality:"Poor audio/video quality",streamLinkFailure:"Stream link error",amountOfInternetUsageWasHigh:"High data usage",programAppearance:"App appearance",soundAndImageMismatch:"Audio out of sync",noSubtitle:"No subtitles",noSubtitle1:"Without subtitles",accessForMeDifficult:"Hard to access",videoContentWasNotGood:"Video content wasn’t good",goodSoundAndImageQuality:"Good audio/video quality",noDisconnection:"No interruptions",amountOfInternetUsage:"Data usage",privacyProtection:"Privacy protection",farsiSubtitles:"Persian subtitles",easyAccess:"Easy access",appropriateVideoContent:"Appropriate content",veryBad:"Very Bad",bad:"Bad",middle:"Average",good:"Good",veryGood:"Very Good",successfullyCommentSubmit:"Comment submitted successfully.",ratingZarebin:"Rate Zarebin",fullRateInternetTraffic:"Internet usage will be counted fully.",exitFrom:"Exit",fullScreen:"Fullscreen",lock:"Lock",markersList:"Markers List",markers:"Markers",languageSelection:"Language",default:"Default",retry:"Retry",pictureInPicture:"Picture-in-Picture",video:"Video",season:"Season",section:"Episode",playNextVideo:"Play Next Video",replay:"Replay",pause:"Pause",quality:"Quality",automatic:"Auto",basedOnYourInternetSpeed:"Based on your internet speed",settings:"Settings",choiceQuality:"Select Quality",subtitleSettings:"Subtitle Settings",jumpTo:"Skip to",mute:"Mute",unmute:"Unmute",playBackSpeed:"Playback Speed",normalSpeed:"Normal",subtitleBackgroundColor:"Subtitle Background",subtitleTextColor:"Subtitle Text Color",subtitleSelection:"Select Subtitle",selectSubtitleBackgroundColor:"Choose subtitle background",selectSubtitleTextColor:"Choose subtitle text color",tagFilter:"Tag Filter",tags:"Tags",separateItemsWithEnter:"Separate items with Enter",contentType:"Content Type",search:"Search",accordingThisTagVideoNotFound:"No video found for this tag!",autoPlay:"Autoplay",bright:"Light",off:"Off",is:"is",photo:"Photo",currentlyNoVideoContent:"No video content available for this live stream.",viewOtherVideos:"You can check other live streams or upcoming schedules.",enteredAddressNotCorrect:"The entered address is invalid.",first:"First",second:"Second",third:"Third",fourth:"Fourth",fifth:"Fifth",sixth:"Sixth",seventh:"Seventh",eighth:"Eighth",ninth:"Ninth",tenth:"Tenth",eleventh:"Eleventh",twelfth:"Twelfth",thirteenth:"Thirteenth",fourteenth:"Fourteenth",fifteenth:"Fifteenth",sixteenth:"Sixteenth",seventeenth:"Seventeenth",eighteenth:"Eighteenth",nineteenth:"Nineteenth",twentieth:"Twentieth"},fa={save:"ذخیره",addPersonalMarker:"افزودن نشانگر شخصی",editPersonalMarker:"ویرایش نشانگر شخصی",pleaseSelectMarker:"لطفا یک نشانگر انتخاب نمایید.",pleaseEnterMarkerName:"لطفا نام نشانگر را وارد کنید.",maxLengthMarkerName:"اندازه نام نشانگر نباید بیش از 256 حرف باشد.",successAddMarker:"نشانگر با موفقیت اضافه شد.",successEditMarker:"نشانگر با موفقیت ویرایش شد.",errorRegisteringTwoMarker:"نشانگر با موفقیت ویرایش شد.",pleaseLoginFirst:"لطفا ابتدا وارد شوید.",addMarker:"افزودن نشانگر",markerName:"نام نشانگر",description:"توضیحات",pleaseEnterMarkerDescription:"توضیحات مربوط به نشانگر را وارد کنید.",cancel:"انصراف",nextIn:"بعدی در",play:"پخش",visit:"بازدید",clickForMoreVideos:"ویدیوهای بیشتر کلیک کنید",hour:"ساعت",minutes:"دقیقه",seconds:"ثانیه",currentlyNoItemsSaved:"در حال حاضر هیچ آیتمی ذخیره نشده است.",savedList:"لیست ذخیرهشدهها",enterYourOpinion:"دیدگاه خود را وارد کنید",notPossibleRegisterComment:"در حال حاضر امکان ثبت دیدگاه وجود ندارد.",youMustSubmitYourComment:"شما برای ارسال دیدگاه خود باید",notPossibleToRegisterComment:"در حال حاضر امکان ثبت دیدگاه وجود ندارد.",comeIn:"وارد",sharing:"اشتراک گذاری",recordFeedback:"ثبت بازخورد",cinematicFilm:"فیلم سینمایی",serial:"سریال",subtitle:"زیرنویس",translation:"دوبله",persian:"فارسی",english:"انگلیسی",arabic:"عربی",turkish:"ترکی",playlist:"لیست پخش",playlists:"لیستهای پخش",showPlaylist:"نمایش لیستپخش",suggestedVideos:"ویدیوهای پیشنهادی",become:"شوید.",production:"تولید",viewPoint:"دیدگاه",show:"نمایش",saved:"ذخیرهشدهها",home:"خانه",profile:"پروفایل",previousViewingTime:"زمان مشاهده قبلی",continuousPlaybackText:"ویدیو شما از زمان مشاهده قبلی پخش خواهد شد. در صورت تمایل به پخش ویدیو از ابتدا گزینه “تماشای ویدیو از ابتدا” را انتخاب کنید",watchContinuousVideo:"تماشای ادامه ویدیو",watchCBeginningVideo:"تماشای ویدیو از ابتدا",takingPicture:"عکس گرفتن",liveChat:"گفتوگوی زنده",hideLiveChat:"مخفی کردن گفتگوی زنده",showLiveChat:"نمایش گفتگوی زنده",anonymousUser:"کاربر ناشناس",awaitingApprovalByAdmin:"در انتظار تایید توسط ادمین",approvedByAdmin:"تایید شده توسط ادمین",closeMessage:"بستن پیام",viewFullPinnedMessage:"مشاهده کامل پیام پین شده",pinnedMessage:"پیام پین شده",less:"کمتر",more:"بیشتر",copyLink:"کپی لینک",linkWasCopied:"لینک کپی شد",download:"دانلود",withQuality:"با کیفیت",selectDownloadQuality:"انتخاب کیفیت دانلود",badSoundAndImageQuality:"کیفیت بد صدا و تصویر",streamLinkFailure:"خرابی لینک استریم",amountOfInternetUsageWasHigh:"حجم مصرفی اینترنت زیاد بود",programAppearance:"ظاهر برنامه",soundAndImageMismatch:"عدم تطابق صدا و تصویر",noSubtitle:"نداشتن زیرنویس",noSubtitle1:"بدون زیرنویس",accessForMeDifficult:"دسترسی برام سخت بود",videoContentWasNotGood:"محتوای ویدیو خوب نبود",goodSoundAndImageQuality:"کیفیت خوب صدا و تصویر",noDisconnection:"بدون قطع و وصلی",amountOfInternetUsage:"میزان حجم مصرفی اینترنت",privacyProtection:"حفظ حریم شخصی",farsiSubtitles:"زیرنویس فارسی",easyAccess:"دسترسی آسان",appropriateVideoContent:"محتوای مناسب ویدیو",veryBad:"خیلی بد",bad:"بد",middle:"متوسط",good:"خوب",veryGood:"خیلی خوب",successfullyCommentSubmit:"نظر شما با موفقیت ثبت شد.",ratingZarebin:"امتیاز دادن به ذره بین",fullRateInternetTraffic:"ترافیک اینترنت شما تمام بها محاسبه میشود.",exitFrom:"خروج از",fullScreen:"تمام صفحه",lock:"قفل",markersList:"لیست نشانگرها",markers:"نشانگرها",languageSelection:"انتخاب زبان",default:"پیش فرض",retry:"تلاش مجدد",pictureInPicture:"تصویر در تصویر",video:"ویدیو",season:"فصل",section:"قسمت",playNextVideo:"پخش ویدیوی بعدی ",replay:"بازپخش",pause:"توقف",quality:"کیفیت",automatic:"خودکار",basedOnYourInternetSpeed:"بر اساس سرعت اینترنت شما",settings:"تنظیمات",choiceQuality:"انتخاب کیفیت",subtitleSettings:"تنظیمات زیرنویس",jumpTo:"پرش به",mute:"بی صدا",unmute:"با صدا",playBackSpeed:"سرعت پخش",normalSpeed:"سرعت معمولی",subtitleBackgroundColor:"رنگ پس زمینه زیرنویس",subtitleTextColor:"رنگ متن زیرنویس",subtitleSelection:"انتخاب زیرنویس",selectSubtitleBackgroundColor:"انتخاب رنگ پس زمینه زیرنویس",selectSubtitleTextColor:"انتخاب رنگ متن زیرنویس",tagFilter:"فیلتر تگ",tags:"تگ ها",separateItemsWithEnter:"آیتم ها را با Enter از هم جدا کنید",contentType:"نوع محتوا",search:"جستجو",accordingThisTagVideoNotFound:"با توجه به تگ مورد نظر ویدیویی یافت نشد!",autoPlay:"پخش خودکار",bright:"روشن",off:"خاموش",is:"است",photo:"عکس",currentlyNoVideoContent:"در حال حاضر محتوای ویدیویی در این کانال برای این پخشزنده وجود ندارد.",viewOtherVideos:"شما میتوانید سایر پخش زنده های ما را مشاهده کنید یا برنامه پخش زندههای آینده کانال مورد نظر خود را چک کنید",enteredAddressNotCorrect:"آدرس وارد شده صحیح نیست.",first:"اول",second:"دوم",third:"سوم",fourth:"چهارم",fifth:"پنجم",sixth:"ششم",seventh:"هفتم",eighth:"هشتم",ninth:"نهم",tenth:"دهم",eleventh:"یازدهم",twelfth:"دوازدهم",thirteenth:"سیزدهم",fourteenth:"چهاردهم",fifteenth:"پانزدهم",sixteenth:"شانزدهم",seventeenth:"هفدهم",eighteenth:"هجدهم",nineteenth:"نوزدهم",twentieth:"بیستم"},translate=()=>{const{params:i}=store.getState().videoData;return i.lang===Lang.en?en:i.lang===Lang.ar?ar:fa},PACKET_TYPES=Object.create(null);PACKET_TYPES.open="0",PACKET_TYPES.close="1",PACKET_TYPES.ping="2",PACKET_TYPES.pong="3",PACKET_TYPES.message="4",PACKET_TYPES.upgrade="5",PACKET_TYPES.noop="6";const PACKET_TYPES_REVERSE=Object.create(null);Object.keys(PACKET_TYPES).forEach(i=>{PACKET_TYPES_REVERSE[PACKET_TYPES[i]]=i});const ERROR_PACKET={type:"error",data:"parser error"},withNativeBlob$1=typeof Blob=="function"||typeof Blob<"u"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",withNativeArrayBuffer$2=typeof ArrayBuffer=="function",isView$1=i=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(i):i&&i.buffer instanceof ArrayBuffer,encodePacket=({type:i,data:e},t,n)=>withNativeBlob$1&&e instanceof Blob?t?n(e):encodeBlobAsBase64(e,n):withNativeArrayBuffer$2&&(e instanceof ArrayBuffer||isView$1(e))?t?n(e):encodeBlobAsBase64(new Blob([e]),n):n(PACKET_TYPES[i]+(e||"")),encodeBlobAsBase64=(i,e)=>{const t=new FileReader;return t.onload=function(){const n=t.result.split(",")[1];e("b"+(n||""))},t.readAsDataURL(i)};function toArray(i){return i instanceof Uint8Array?i:i instanceof ArrayBuffer?new Uint8Array(i):new Uint8Array(i.buffer,i.byteOffset,i.byteLength)}let TEXT_ENCODER;function encodePacketToBinary(i,e){if(withNativeBlob$1&&i.data instanceof Blob)return i.data.arrayBuffer().then(toArray).then(e);if(withNativeArrayBuffer$2&&(i.data instanceof ArrayBuffer||isView$1(i.data)))return e(toArray(i.data));encodePacket(i,!1,t=>{TEXT_ENCODER||(TEXT_ENCODER=new TextEncoder),e(TEXT_ENCODER.encode(t))})}const chars="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",lookup$1=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(let i=0;i<chars.length;i++)lookup$1[chars.charCodeAt(i)]=i;const decode$1=i=>{let e=i.length*.75,t=i.length,n,s=0,r,a,o,l;i[i.length-1]==="="&&(e--,i[i.length-2]==="="&&e--);const d=new ArrayBuffer(e),f=new Uint8Array(d);for(n=0;n<t;n+=4)r=lookup$1[i.charCodeAt(n)],a=lookup$1[i.charCodeAt(n+1)],o=lookup$1[i.charCodeAt(n+2)],l=lookup$1[i.charCodeAt(n+3)],f[s++]=r<<2|a>>4,f[s++]=(a&15)<<4|o>>2,f[s++]=(o&3)<<6|l&63;return d},withNativeArrayBuffer$1=typeof ArrayBuffer=="function",decodePacket=(i,e)=>{if(typeof i!="string")return{type:"message",data:mapBinary(i,e)};const t=i.charAt(0);return t==="b"?{type:"message",data:decodeBase64Packet(i.substring(1),e)}:PACKET_TYPES_REVERSE[t]?i.length>1?{type:PACKET_TYPES_REVERSE[t],data:i.substring(1)}:{type:PACKET_TYPES_REVERSE[t]}:ERROR_PACKET},decodeBase64Packet=(i,e)=>{if(withNativeArrayBuffer$1){const t=decode$1(i);return mapBinary(t,e)}else return{base64:!0,data:i}},mapBinary=(i,e)=>{switch(e){case"blob":return i instanceof Blob?i:new Blob([i]);case"arraybuffer":default:return i instanceof ArrayBuffer?i:i.buffer}},SEPARATOR="",encodePayload=(i,e)=>{const t=i.length,n=new Array(t);let s=0;i.forEach((r,a)=>{encodePacket(r,!1,o=>{n[a]=o,++s===t&&e(n.join(SEPARATOR))})})},decodePayload=(i,e)=>{const t=i.split(SEPARATOR),n=[];for(let s=0;s<t.length;s++){const r=decodePacket(t[s],e);if(n.push(r),r.type==="error")break}return n};function createPacketEncoderStream(){return new TransformStream({transform(i,e){encodePacketToBinary(i,t=>{const n=t.length;let s;if(n<126)s=new Uint8Array(1),new DataView(s.buffer).setUint8(0,n);else if(n<65536){s=new Uint8Array(3);const r=new DataView(s.buffer);r.setUint8(0,126),r.setUint16(1,n)}else{s=new Uint8Array(9);const r=new DataView(s.buffer);r.setUint8(0,127),r.setBigUint64(1,BigInt(n))}i.data&&typeof i.data!="string"&&(s[0]|=128),e.enqueue(s),e.enqueue(t)})}})}let TEXT_DECODER;function totalLength(i){return i.reduce((e,t)=>e+t.length,0)}function concatChunks(i,e){if(i[0].length===e)return i.shift();const t=new Uint8Array(e);let n=0;for(let s=0;s<e;s++)t[s]=i[0][n++],n===i[0].length&&(i.shift(),n=0);return i.length&&n<i[0].length&&(i[0]=i[0].slice(n)),t}function createPacketDecoderStream(i,e){TEXT_DECODER||(TEXT_DECODER=new TextDecoder);const t=[];let n=0,s=-1,r=!1;return new TransformStream({transform(a,o){for(t.push(a);;){if(n===0){if(totalLength(t)<1)break;const l=concatChunks(t,1);r=(l[0]&128)===128,s=l[0]&127,s<126?n=3:s===126?n=1:n=2}else if(n===1){if(totalLength(t)<2)break;const l=concatChunks(t,2);s=new DataView(l.buffer,l.byteOffset,l.length).getUint16(0),n=3}else if(n===2){if(totalLength(t)<8)break;const l=concatChunks(t,8),d=new DataView(l.buffer,l.byteOffset,l.length),f=d.getUint32(0);if(f>Math.pow(2,21)-1){o.enqueue(ERROR_PACKET);break}s=f*Math.pow(2,32)+d.getUint32(4),n=3}else{if(totalLength(t)<s)break;const l=concatChunks(t,s);o.enqueue(decodePacket(r?l:TEXT_DECODER.decode(l),e)),n=0}if(s===0||s>i){o.enqueue(ERROR_PACKET);break}}}})}const protocol$1=4;function Emitter(i){if(i)return mixin(i)}function mixin(i){for(var e in Emitter.prototype)i[e]=Emitter.prototype[e];return i}Emitter.prototype.on=Emitter.prototype.addEventListener=function(i,e){return this._callbacks=this._callbacks||{},(this._callbacks["$"+i]=this._callbacks["$"+i]||[]).push(e),this},Emitter.prototype.once=function(i,e){function t(){this.off(i,t),e.apply(this,arguments)}return t.fn=e,this.on(i,t),this},Emitter.prototype.off=Emitter.prototype.removeListener=Emitter.prototype.removeAllListeners=Emitter.prototype.removeEventListener=function(i,e){if(this._callbacks=this._callbacks||{},arguments.length==0)return this._callbacks={},this;var t=this._callbacks["$"+i];if(!t)return this;if(arguments.length==1)return delete this._callbacks["$"+i],this;for(var n,s=0;s<t.length;s++)if(n=t[s],n===e||n.fn===e){t.splice(s,1);break}return t.length===0&&delete this._callbacks["$"+i],this},Emitter.prototype.emit=function(i){this._callbacks=this._callbacks||{};for(var e=new Array(arguments.length-1),t=this._callbacks["$"+i],n=1;n<arguments.length;n++)e[n-1]=arguments[n];if(t){t=t.slice(0);for(var n=0,s=t.length;n<s;++n)t[n].apply(this,e)}return this},Emitter.prototype.emitReserved=Emitter.prototype.emit,Emitter.prototype.listeners=function(i){return this._callbacks=this._callbacks||{},this._callbacks["$"+i]||[]},Emitter.prototype.hasListeners=function(i){return!!this.listeners(i).length};const nextTick=typeof Promise=="function"&&typeof Promise.resolve=="function"?e=>Promise.resolve().then(e):(e,t)=>t(e,0),globalThisShim=typeof self<"u"?self:typeof window<"u"?window:Function("return this")(),defaultBinaryType="arraybuffer";function createCookieJar(){}function pick(i,...e){return e.reduce((t,n)=>(i.hasOwnProperty(n)&&(t[n]=i[n]),t),{})}const NATIVE_SET_TIMEOUT=globalThisShim.setTimeout,NATIVE_CLEAR_TIMEOUT=globalThisShim.clearTimeout;function installTimerFunctions(i,e){e.useNativeTimers?(i.setTimeoutFn=NATIVE_SET_TIMEOUT.bind(globalThisShim),i.clearTimeoutFn=NATIVE_CLEAR_TIMEOUT.bind(globalThisShim)):(i.setTimeoutFn=globalThisShim.setTimeout.bind(globalThisShim),i.clearTimeoutFn=globalThisShim.clearTimeout.bind(globalThisShim))}const BASE64_OVERHEAD=1.33;function byteLength(i){return typeof i=="string"?utf8Length(i):Math.ceil((i.byteLength||i.size)*BASE64_OVERHEAD)}function utf8Length(i){let e=0,t=0;for(let n=0,s=i.length;n<s;n++)e=i.charCodeAt(n),e<128?t+=1:e<2048?t+=2:e<55296||e>=57344?t+=3:(n++,t+=4);return t}function randomString(){return Date.now().toString(36).substring(3)+Math.random().toString(36).substring(2,5)}function encode(i){let e="";for(let t in i)i.hasOwnProperty(t)&&(e.length&&(e+="&"),e+=encodeURIComponent(t)+"="+encodeURIComponent(i[t]));return e}function decode(i){let e={},t=i.split("&");for(let n=0,s=t.length;n<s;n++){let r=t[n].split("=");e[decodeURIComponent(r[0])]=decodeURIComponent(r[1])}return e}class TransportError extends Error{constructor(e,t,n){super(e),this.description=t,this.context=n,this.type="TransportError"}}class Transport extends Emitter{constructor(e){super(),this.writable=!1,installTimerFunctions(this,e),this.opts=e,this.query=e.query,this.socket=e.socket,this.supportsBinary=!e.forceBase64}onError(e,t,n){return super.emitReserved("error",new TransportError(e,t,n)),this}open(){return this.readyState="opening",this.doOpen(),this}close(){return(this.readyState==="opening"||this.readyState==="open")&&(this.doClose(),this.onClose()),this}send(e){this.readyState==="open"&&this.write(e)}onOpen(){this.readyState="open",this.writable=!0,super.emitReserved("open")}onData(e){const t=decodePacket(e,this.socket.binaryType);this.onPacket(t)}onPacket(e){super.emitReserved("packet",e)}onClose(e){this.readyState="closed",super.emitReserved("close",e)}pause(e){}createUri(e,t={}){return e+"://"+this._hostname()+this._port()+this.opts.path+this._query(t)}_hostname(){const e=this.opts.hostname;return e.indexOf(":")===-1?e:"["+e+"]"}_port(){return this.opts.port&&(this.opts.secure&&+(this.opts.port!==443)||!this.opts.secure&&Number(this.opts.port)!==80)?":"+this.opts.port:""}_query(e){const t=encode(e);return t.length?"?"+t:""}}class Polling extends Transport{constructor(){super(...arguments),this._polling=!1}get name(){return"polling"}doOpen(){this._poll()}pause(e){this.readyState="pausing";const t=()=>{this.readyState="paused",e()};if(this._polling||!this.writable){let n=0;this._polling&&(n++,this.once("pollComplete",function(){--n||t()})),this.writable||(n++,this.once("drain",function(){--n||t()}))}else t()}_poll(){this._polling=!0,this.doPoll(),this.emitReserved("poll")}onData(e){const t=n=>{if(this.readyState==="opening"&&n.type==="open"&&this.onOpen(),n.type==="close")return this.onClose({description:"transport closed by the server"}),!1;this.onPacket(n)};decodePayload(e,this.socket.binaryType).forEach(t),this.readyState!=="closed"&&(this._polling=!1,this.emitReserved("pollComplete"),this.readyState==="open"&&this._poll())}doClose(){const e=()=>{this.write([{type:"close"}])};this.readyState==="open"?e():this.once("open",e)}write(e){this.writable=!1,encodePayload(e,t=>{this.doWrite(t,()=>{this.writable=!0,this.emitReserved("drain")})})}uri(){const e=this.opts.secure?"https":"http",t=this.query||{};return this.opts.timestampRequests!==!1&&(t[this.opts.timestampParam]=randomString()),!this.supportsBinary&&!t.sid&&(t.b64=1),this.createUri(e,t)}}let value=!1;try{value=typeof XMLHttpRequest<"u"&&"withCredentials"in new XMLHttpRequest}catch(i){}const hasCORS=value;function empty(){}class BaseXHR extends Polling{constructor(e){if(super(e),typeof location<"u"){const t=location.protocol==="https:";let n=location.port;n||(n=t?"443":"80"),this.xd=typeof location<"u"&&e.hostname!==location.hostname||n!==e.port}}doWrite(e,t){const n=this.request({method:"POST",data:e});n.on("success",t),n.on("error",(s,r)=>{this.onError("xhr post error",s,r)})}doPoll(){const e=this.request();e.on("data",this.onData.bind(this)),e.on("error",(t,n)=>{this.onError("xhr poll error",t,n)}),this.pollXhr=e}}let Request$1=class Ft extends Emitter{constructor(e,t,n){super(),this.createRequest=e,installTimerFunctions(this,n),this._opts=n,this._method=n.method||"GET",this._uri=t,this._data=n.data!==void 0?n.data:null,this._create()}_create(){var e;const t=pick(this._opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");t.xdomain=!!this._opts.xd;const n=this._xhr=this.createRequest(t);try{n.open(this._method,this._uri,!0);try{if(this._opts.extraHeaders){n.setDisableHeaderCheck&&n.setDisableHeaderCheck(!0);for(let s in this._opts.extraHeaders)this._opts.extraHeaders.hasOwnProperty(s)&&n.setRequestHeader(s,this._opts.extraHeaders[s])}}catch{}if(this._method==="POST")try{n.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch{}try{n.setRequestHeader("Accept","*/*")}catch{}(e=this._opts.cookieJar)===null||e===void 0||e.addCookies(n),"withCredentials"in n&&(n.withCredentials=this._opts.withCredentials),this._opts.requestTimeout&&(n.timeout=this._opts.requestTimeout),n.onreadystatechange=()=>{var s;n.readyState===3&&((s=this._opts.cookieJar)===null||s===void 0||s.parseCookies(n.getResponseHeader("set-cookie"))),n.readyState===4&&(n.status===200||n.status===1223?this._onLoad():this.setTimeoutFn(()=>{this._onError(typeof n.status=="number"?n.status:0)},0))},n.send(this._data)}catch(s){this.setTimeoutFn(()=>{this._onError(s)},0);return}typeof document<"u"&&(this._index=Ft.requestsCount++,Ft.requests[this._index]=this)}_onError(e){this.emitReserved("error",e,this._xhr),this._cleanup(!0)}_cleanup(e){if(!(typeof this._xhr>"u"||this._xhr===null)){if(this._xhr.onreadystatechange=empty,e)try{this._xhr.abort()}catch{}typeof document<"u"&&delete Ft.requests[this._index],this._xhr=null}}_onLoad(){const e=this._xhr.responseText;e!==null&&(this.emitReserved("data",e),this.emitReserved("success"),this._cleanup())}abort(){this._cleanup()}};if(Request$1.requestsCount=0,Request$1.requests={},typeof document<"u"){if(typeof attachEvent=="function")attachEvent("onunload",unloadHandler);else if(typeof addEventListener=="function"){const i="onpagehide"in globalThisShim?"pagehide":"unload";addEventListener(i,unloadHandler,!1)}}function unloadHandler(){for(let i in Request$1.requests)Request$1.requests.hasOwnProperty(i)&&Request$1.requests[i].abort()}const hasXHR2=function(){const i=newRequest({xdomain:!1});return i&&i.responseType!==null}();class XHR extends BaseXHR{constructor(e){super(e);const t=e&&e.forceBase64;this.supportsBinary=hasXHR2&&!t}request(e={}){return Object.assign(e,{xd:this.xd},this.opts),new Request$1(newRequest,this.uri(),e)}}function newRequest(i){const e=i.xdomain;try{if(typeof XMLHttpRequest<"u"&&(!e||hasCORS))return new XMLHttpRequest}catch{}if(!e)try{return new globalThisShim[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch{}}const isReactNative=typeof navigator<"u"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";class BaseWS extends Transport{get name(){return"websocket"}doOpen(){const e=this.uri(),t=this.opts.protocols,n=isReactNative?{}:pick(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(n.headers=this.opts.extraHeaders);try{this.ws=this.createSocket(e,t,n)}catch(s){return this.emitReserved("error",s)}this.ws.binaryType=this.socket.binaryType,this.addEventListeners()}addEventListeners(){this.ws.onopen=()=>{this.opts.autoUnref&&this.ws._socket.unref(),this.onOpen()},this.ws.onclose=e=>this.onClose({description:"websocket connection closed",context:e}),this.ws.onmessage=e=>this.onData(e.data),this.ws.onerror=e=>this.onError("websocket error",e)}write(e){this.writable=!1;for(let t=0;t<e.length;t++){const n=e[t],s=t===e.length-1;encodePacket(n,this.supportsBinary,r=>{try{this.doWrite(n,r)}catch{}s&&nextTick(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){typeof this.ws<"u"&&(this.ws.onerror=()=>{},this.ws.close(),this.ws=null)}uri(){const e=this.opts.secure?"wss":"ws",t=this.query||{};return this.opts.timestampRequests&&(t[this.opts.timestampParam]=randomString()),this.supportsBinary||(t.b64=1),this.createUri(e,t)}}const WebSocketCtor=globalThisShim.WebSocket||globalThisShim.MozWebSocket;class WS extends BaseWS{createSocket(e,t,n){return isReactNative?new WebSocketCtor(e,t,n):t?new WebSocketCtor(e,t):new WebSocketCtor(e)}doWrite(e,t){this.ws.send(t)}}class WT extends Transport{get name(){return"webtransport"}doOpen(){try{this._transport=new WebTransport(this.createUri("https"),this.opts.transportOptions[this.name])}catch(e){return this.emitReserved("error",e)}this._transport.closed.then(()=>{this.onClose()}).catch(e=>{this.onError("webtransport error",e)}),this._transport.ready.then(()=>{this._transport.createBidirectionalStream().then(e=>{const t=createPacketDecoderStream(Number.MAX_SAFE_INTEGER,this.socket.binaryType),n=e.readable.pipeThrough(t).getReader(),s=createPacketEncoderStream();s.readable.pipeTo(e.writable),this._writer=s.writable.getWriter();const r=()=>{n.read().then(({done:o,value:l})=>{o||(this.onPacket(l),r())}).catch(o=>{})};r();const a={type:"open"};this.query.sid&&(a.data=`{"sid":"${this.query.sid}"}`),this._writer.write(a).then(()=>this.onOpen())})})}write(e){this.writable=!1;for(let t=0;t<e.length;t++){const n=e[t],s=t===e.length-1;this._writer.write(n).then(()=>{s&&nextTick(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var e;(e=this._transport)===null||e===void 0||e.close()}}const transports={websocket:WS,webtransport:WT,polling:XHR},re=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,parts=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function parse$1(i){if(i.length>8e3)throw"URI too long";const e=i,t=i.indexOf("["),n=i.indexOf("]");t!=-1&&n!=-1&&(i=i.substring(0,t)+i.substring(t,n).replace(/:/g,";")+i.substring(n,i.length));let s=re.exec(i||""),r={},a=14;for(;a--;)r[parts[a]]=s[a]||"";return t!=-1&&n!=-1&&(r.source=e,r.host=r.host.substring(1,r.host.length-1).replace(/;/g,":"),r.authority=r.authority.replace("[","").replace("]","").replace(/;/g,":"),r.ipv6uri=!0),r.pathNames=pathNames(r,r.path),r.queryKey=queryKey(r,r.query),r}function pathNames(i,e){const t=/\/{2,9}/g,n=e.replace(t,"/").split("/");return(e.slice(0,1)=="/"||e.length===0)&&n.splice(0,1),e.slice(-1)=="/"&&n.splice(n.length-1,1),n}function queryKey(i,e){const t={};return e.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(n,s,r){s&&(t[s]=r)}),t}const withEventListeners=typeof addEventListener=="function"&&typeof removeEventListener=="function",OFFLINE_EVENT_LISTENERS=[];withEventListeners&&addEventListener("offline",()=>{OFFLINE_EVENT_LISTENERS.forEach(i=>i())},!1);class SocketWithoutUpgrade extends Emitter{constructor(e,t){if(super(),this.binaryType=defaultBinaryType,this.writeBuffer=[],this._prevBufferLen=0,this._pingInterval=-1,this._pingTimeout=-1,this._maxPayload=-1,this._pingTimeoutTime=1/0,e&&typeof e=="object"&&(t=e,e=null),e){const n=parse$1(e);t.hostname=n.host,t.secure=n.protocol==="https"||n.protocol==="wss",t.port=n.port,n.query&&(t.query=n.query)}else t.host&&(t.hostname=parse$1(t.host).host);installTimerFunctions(this,t),this.secure=t.secure!=null?t.secure:typeof location<"u"&&location.protocol==="https:",t.hostname&&!t.port&&(t.port=this.secure?"443":"80"),this.hostname=t.hostname||(typeof location<"u"?location.hostname:"localhost"),this.port=t.port||(typeof location<"u"&&location.port?location.port:this.secure?"443":"80"),this.transports=[],this._transportsByName={},t.transports.forEach(n=>{const s=n.prototype.name;this.transports.push(s),this._transportsByName[s]=n}),this.opts=Object.assign({path:"/engine.io",agent:!1,withCredentials:!1,upgrade:!0,timestampParam:"t",rememberUpgrade:!1,addTrailingSlash:!0,rejectUnauthorized:!0,perMessageDeflate:{threshold:1024},transportOptions:{},closeOnBeforeunload:!1},t),this.opts.path=this.opts.path.replace(/\/$/,"")+(this.opts.addTrailingSlash?"/":""),typeof this.opts.query=="string"&&(this.opts.query=decode(this.opts.query)),withEventListeners&&(this.opts.closeOnBeforeunload&&(this._beforeunloadEventListener=()=>{this.transport&&(this.transport.removeAllListeners(),this.transport.close())},addEventListener("beforeunload",this._beforeunloadEventListener,!1)),this.hostname!=="localhost"&&(this._offlineEventListener=()=>{this._onClose("transport close",{description:"network connection lost"})},OFFLINE_EVENT_LISTENERS.push(this._offlineEventListener))),this.opts.withCredentials&&(this._cookieJar=void 0),this._open()}createTransport(e){const t=Object.assign({},this.opts.query);t.EIO=protocol$1,t.transport=e,this.id&&(t.sid=this.id);const n=Object.assign({},this.opts,{query:t,socket:this,hostname:this.hostname,secure:this.secure,port:this.port},this.opts.transportOptions[e]);return new this._transportsByName[e](n)}_open(){if(this.transports.length===0){this.setTimeoutFn(()=>{this.emitReserved("error","No transports available")},0);return}const e=this.opts.rememberUpgrade&&SocketWithoutUpgrade.priorWebsocketSuccess&&this.transports.indexOf("websocket")!==-1?"websocket":this.transports[0];this.readyState="opening";const t=this.createTransport(e);t.open(),this.setTransport(t)}setTransport(e){this.transport&&this.transport.removeAllListeners(),this.transport=e,e.on("drain",this._onDrain.bind(this)).on("packet",this._onPacket.bind(this)).on("error",this._onError.bind(this)).on("close",t=>this._onClose("transport close",t))}onOpen(){this.readyState="open",SocketWithoutUpgrade.priorWebsocketSuccess=this.transport.name==="websocket",this.emitReserved("open"),this.flush()}_onPacket(e){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing")switch(this.emitReserved("packet",e),this.emitReserved("heartbeat"),e.type){case"open":this.onHandshake(JSON.parse(e.data));break;case"ping":this._sendPacket("pong"),this.emitReserved("ping"),this.emitReserved("pong"),this._resetPingTimeout();break;case"error":const t=new Error("server error");t.code=e.data,this._onError(t);break;case"message":this.emitReserved("data",e.data),this.emitReserved("message",e.data);break}}onHandshake(e){this.emitReserved("handshake",e),this.id=e.sid,this.transport.query.sid=e.sid,this._pingInterval=e.pingInterval,this._pingTimeout=e.pingTimeout,this._maxPayload=e.maxPayload,this.onOpen(),this.readyState!=="closed"&&this._resetPingTimeout()}_resetPingTimeout(){this.clearTimeoutFn(this._pingTimeoutTimer);const e=this._pingInterval+this._pingTimeout;this._pingTimeoutTime=Date.now()+e,this._pingTimeoutTimer=this.setTimeoutFn(()=>{this._onClose("ping timeout")},e),this.opts.autoUnref&&this._pingTimeoutTimer.unref()}_onDrain(){this.writeBuffer.splice(0,this._prevBufferLen),this._prevBufferLen=0,this.writeBuffer.length===0?this.emitReserved("drain"):this.flush()}flush(){if(this.readyState!=="closed"&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length){const e=this._getWritablePackets();this.transport.send(e),this._prevBufferLen=e.length,this.emitReserved("flush")}}_getWritablePackets(){if(!(this._maxPayload&&this.transport.name==="polling"&&this.writeBuffer.length>1))return this.writeBuffer;let t=1;for(let n=0;n<this.writeBuffer.length;n++){const s=this.writeBuffer[n].data;if(s&&(t+=byteLength(s)),n>0&&t>this._maxPayload)return this.writeBuffer.slice(0,n);t+=2}return this.writeBuffer}_hasPingExpired(){if(!this._pingTimeoutTime)return!0;const e=Date.now()>this._pingTimeoutTime;return e&&(this._pingTimeoutTime=0,nextTick(()=>{this._onClose("ping timeout")},this.setTimeoutFn)),e}write(e,t,n){return this._sendPacket("message",e,t,n),this}send(e,t,n){return this._sendPacket("message",e,t,n),this}_sendPacket(e,t,n,s){if(typeof t=="function"&&(s=t,t=void 0),typeof n=="function"&&(s=n,n=null),this.readyState==="closing"||this.readyState==="closed")return;n=n||{},n.compress=n.compress!==!1;const r={type:e,data:t,options:n};this.emitReserved("packetCreate",r),this.writeBuffer.push(r),s&&this.once("flush",s),this.flush()}close(){const e=()=>{this._onClose("forced close"),this.transport.close()},t=()=>{this.off("upgrade",t),this.off("upgradeError",t),e()},n=()=>{this.once("upgrade",t),this.once("upgradeError",t)};return(this.readyState==="opening"||this.readyState==="open")&&(this.readyState="closing",this.writeBuffer.length?this.once("drain",()=>{this.upgrading?n():e()}):this.upgrading?n():e()),this}_onError(e){if(SocketWithoutUpgrade.priorWebsocketSuccess=!1,this.opts.tryAllTransports&&this.transports.length>1&&this.readyState==="opening")return this.transports.shift(),this._open();this.emitReserved("error",e),this._onClose("transport error",e)}_onClose(e,t){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing"){if(this.clearTimeoutFn(this._pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),withEventListeners&&(this._beforeunloadEventListener&&removeEventListener("beforeunload",this._beforeunloadEventListener,!1),this._offlineEventListener)){const n=OFFLINE_EVENT_LISTENERS.indexOf(this._offlineEventListener);n!==-1&&OFFLINE_EVENT_LISTENERS.splice(n,1)}this.readyState="closed",this.id=null,this.emitReserved("close",e,t),this.writeBuffer=[],this._prevBufferLen=0}}}SocketWithoutUpgrade.protocol=protocol$1;class SocketWithUpgrade extends SocketWithoutUpgrade{constructor(){super(...arguments),this._upgrades=[]}onOpen(){if(super.onOpen(),this.readyState==="open"&&this.opts.upgrade)for(let e=0;e<this._upgrades.length;e++)this._probe(this._upgrades[e])}_probe(e){let t=this.createTransport(e),n=!1;SocketWithoutUpgrade.priorWebsocketSuccess=!1;const s=()=>{n||(t.send([{type:"ping",data:"probe"}]),t.once("packet",u=>{if(!n)if(u.type==="pong"&&u.data==="probe"){if(this.upgrading=!0,this.emitReserved("upgrading",t),!t)return;SocketWithoutUpgrade.priorWebsocketSuccess=t.name==="websocket",this.transport.pause(()=>{n||this.readyState!=="closed"&&(f(),this.setTransport(t),t.send([{type:"upgrade"}]),this.emitReserved("upgrade",t),t=null,this.upgrading=!1,this.flush())})}else{const p=new Error("probe error");p.transport=t.name,this.emitReserved("upgradeError",p)}}))};function r(){n||(n=!0,f(),t.close(),t=null)}const a=u=>{const p=new Error("probe error: "+u);p.transport=t.name,r(),this.emitReserved("upgradeError",p)};function o(){a("transport closed")}function l(){a("socket closed")}function d(u){t&&u.name!==t.name&&r()}const f=()=>{t.removeListener("open",s),t.removeListener("error",a),t.removeListener("close",o),this.off("close",l),this.off("upgrading",d)};t.once("open",s),t.once("error",a),t.once("close",o),this.once("close",l),this.once("upgrading",d),this._upgrades.indexOf("webtransport")!==-1&&e!=="webtransport"?this.setTimeoutFn(()=>{n||t.open()},200):t.open()}onHandshake(e){this._upgrades=this._filterUpgrades(e.upgrades),super.onHandshake(e)}_filterUpgrades(e){const t=[];for(let n=0;n<e.length;n++)~this.transports.indexOf(e[n])&&t.push(e[n]);return t}}let Socket$1=class extends SocketWithUpgrade{constructor(e,t={}){const n=typeof e=="object"?e:t;(!n.transports||n.transports&&typeof n.transports[0]=="string")&&(n.transports=(n.transports||["polling","websocket","webtransport"]).map(s=>transports[s]).filter(s=>!!s)),super(e,n)}};function url(i,e="",t){let n=i;t=t||typeof location<"u"&&location,i==null&&(i=t.protocol+"//"+t.host),typeof i=="string"&&(i.charAt(0)==="/"&&(i.charAt(1)==="/"?i=t.protocol+i:i=t.host+i),/^(https?|wss?):\/\//.test(i)||(typeof t<"u"?i=t.protocol+"//"+i:i="https://"+i),n=parse$1(i)),n.port||(/^(http|ws)$/.test(n.protocol)?n.port="80":/^(http|ws)s$/.test(n.protocol)&&(n.port="443")),n.path=n.path||"/";const r=n.host.indexOf(":")!==-1?"["+n.host+"]":n.host;return n.id=n.protocol+"://"+r+":"+n.port+e,n.href=n.protocol+"://"+r+(t&&t.port===n.port?"":":"+n.port),n}const withNativeArrayBuffer=typeof ArrayBuffer=="function",isView=i=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(i):i.buffer instanceof ArrayBuffer,toString$1=Object.prototype.toString,withNativeBlob=typeof Blob=="function"||typeof Blob<"u"&&toString$1.call(Blob)==="[object BlobConstructor]",withNativeFile=typeof File=="function"||typeof File<"u"&&toString$1.call(File)==="[object FileConstructor]";function isBinary(i){return withNativeArrayBuffer&&(i instanceof ArrayBuffer||isView(i))||withNativeBlob&&i instanceof Blob||withNativeFile&&i instanceof File}function hasBinary(i,e){if(!i||typeof i!="object")return!1;if(Array.isArray(i)){for(let t=0,n=i.length;t<n;t++)if(hasBinary(i[t]))return!0;return!1}if(isBinary(i))return!0;if(i.toJSON&&typeof i.toJSON=="function"&&arguments.length===1)return hasBinary(i.toJSON(),!0);for(const t in i)if(Object.prototype.hasOwnProperty.call(i,t)&&hasBinary(i[t]))return!0;return!1}function deconstructPacket(i){const e=[],t=i.data,n=i;return n.data=_deconstructPacket(t,e),n.attachments=e.length,{packet:n,buffers:e}}function _deconstructPacket(i,e){if(!i)return i;if(isBinary(i)){const t={_placeholder:!0,num:e.length};return e.push(i),t}else if(Array.isArray(i)){const t=new Array(i.length);for(let n=0;n<i.length;n++)t[n]=_deconstructPacket(i[n],e);return t}else if(typeof i=="object"&&!(i instanceof Date)){const t={};for(const n in i)Object.prototype.hasOwnProperty.call(i,n)&&(t[n]=_deconstructPacket(i[n],e));return t}return i}function reconstructPacket(i,e){return i.data=_reconstructPacket(i.data,e),delete i.attachments,i}function _reconstructPacket(i,e){if(!i)return i;if(i&&i._placeholder===!0){if(typeof i.num=="number"&&i.num>=0&&i.num<e.length)return e[i.num];throw new Error("illegal attachments")}else if(Array.isArray(i))for(let t=0;t<i.length;t++)i[t]=_reconstructPacket(i[t],e);else if(typeof i=="object")for(const t in i)Object.prototype.hasOwnProperty.call(i,t)&&(i[t]=_reconstructPacket(i[t],e));return i}const RESERVED_EVENTS$1=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"],protocol=5;var PacketType;(function(i){i[i.CONNECT=0]="CONNECT",i[i.DISCONNECT=1]="DISCONNECT",i[i.EVENT=2]="EVENT",i[i.ACK=3]="ACK",i[i.CONNECT_ERROR=4]="CONNECT_ERROR",i[i.BINARY_EVENT=5]="BINARY_EVENT",i[i.BINARY_ACK=6]="BINARY_ACK"})(PacketType||(PacketType={}));class Encoder{constructor(e){this.replacer=e}encode(e){return(e.type===PacketType.EVENT||e.type===PacketType.ACK)&&hasBinary(e)?this.encodeAsBinary({type:e.type===PacketType.EVENT?PacketType.BINARY_EVENT:PacketType.BINARY_ACK,nsp:e.nsp,data:e.data,id:e.id}):[this.encodeAsString(e)]}encodeAsString(e){let t=""+e.type;return(e.type===PacketType.BINARY_EVENT||e.type===PacketType.BINARY_ACK)&&(t+=e.attachments+"-"),e.nsp&&e.nsp!=="/"&&(t+=e.nsp+","),e.id!=null&&(t+=e.id),e.data!=null&&(t+=JSON.stringify(e.data,this.replacer)),t}encodeAsBinary(e){const t=deconstructPacket(e),n=this.encodeAsString(t.packet),s=t.buffers;return s.unshift(n),s}}function isObject$1(i){return Object.prototype.toString.call(i)==="[object Object]"}class Decoder extends Emitter{constructor(e){super(),this.reviver=e}add(e){let t;if(typeof e=="string"){if(this.reconstructor)throw new Error("got plaintext data when reconstructing a packet");t=this.decodeString(e);const n=t.type===PacketType.BINARY_EVENT;n||t.type===PacketType.BINARY_ACK?(t.type=n?PacketType.EVENT:PacketType.ACK,this.reconstructor=new BinaryReconstructor(t),t.attachments===0&&super.emitReserved("decoded",t)):super.emitReserved("decoded",t)}else if(isBinary(e)||e.base64)if(this.reconstructor)t=this.reconstructor.takeBinaryData(e),t&&(this.reconstructor=null,super.emitReserved("decoded",t));else throw new Error("got binary data when not reconstructing a packet");else throw new Error("Unknown type: "+e)}decodeString(e){let t=0;const n={type:Number(e.charAt(0))};if(PacketType[n.type]===void 0)throw new Error("unknown packet type "+n.type);if(n.type===PacketType.BINARY_EVENT||n.type===PacketType.BINARY_ACK){const r=t+1;for(;e.charAt(++t)!=="-"&&t!=e.length;);const a=e.substring(r,t);if(a!=Number(a)||e.charAt(t)!=="-")throw new Error("Illegal attachments");n.attachments=Number(a)}if(e.charAt(t+1)==="/"){const r=t+1;for(;++t&&!(e.charAt(t)===","||t===e.length););n.nsp=e.substring(r,t)}else n.nsp="/";const s=e.charAt(t+1);if(s!==""&&Number(s)==s){const r=t+1;for(;++t;){const a=e.charAt(t);if(a==null||Number(a)!=a){--t;break}if(t===e.length)break}n.id=Number(e.substring(r,t+1))}if(e.charAt(++t)){const r=this.tryParse(e.substr(t));if(Decoder.isPayloadValid(n.type,r))n.data=r;else throw new Error("invalid payload")}return n}tryParse(e){try{return JSON.parse(e,this.reviver)}catch{return!1}}static isPayloadValid(e,t){switch(e){case PacketType.CONNECT:return isObject$1(t);case PacketType.DISCONNECT:return t===void 0;case PacketType.CONNECT_ERROR:return typeof t=="string"||isObject$1(t);case PacketType.EVENT:case PacketType.BINARY_EVENT:return Array.isArray(t)&&(typeof t[0]=="number"||typeof t[0]=="string"&&RESERVED_EVENTS$1.indexOf(t[0])===-1);case PacketType.ACK:case PacketType.BINARY_ACK:return Array.isArray(t)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}}class BinaryReconstructor{constructor(e){this.packet=e,this.buffers=[],this.reconPack=e}takeBinaryData(e){if(this.buffers.push(e),this.buffers.length===this.reconPack.attachments){const t=reconstructPacket(this.reconPack,this.buffers);return this.finishedReconstruction(),t}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}const parser=Object.freeze(Object.defineProperty({__proto__:null,Decoder,Encoder,get PacketType(){return PacketType},protocol},Symbol.toStringTag,{value:"Module"}));function on(i,e,t){return i.on(e,t),function(){i.off(e,t)}}const RESERVED_EVENTS=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class Socket extends Emitter{constructor(e,t,n){super(),this.connected=!1,this.recovered=!1,this.receiveBuffer=[],this.sendBuffer=[],this._queue=[],this._queueSeq=0,this.ids=0,this.acks={},this.flags={},this.io=e,this.nsp=t,n&&n.auth&&(this.auth=n.auth),this._opts=Object.assign({},n),this.io._autoConnect&&this.open()}get disconnected(){return!this.connected}subEvents(){if(this.subs)return;const e=this.io;this.subs=[on(e,"open",this.onopen.bind(this)),on(e,"packet",this.onpacket.bind(this)),on(e,"error",this.onerror.bind(this)),on(e,"close",this.onclose.bind(this))]}get active(){return!!this.subs}connect(){return this.connected?this:(this.subEvents(),this.io._reconnecting||this.io.open(),this.io._readyState==="open"&&this.onopen(),this)}open(){return this.connect()}send(...e){return e.unshift("message"),this.emit.apply(this,e),this}emit(e,...t){var n,s,r;if(RESERVED_EVENTS.hasOwnProperty(e))throw new Error('"'+e.toString()+'" is a reserved event name');if(t.unshift(e),this._opts.retries&&!this.flags.fromQueue&&!this.flags.volatile)return this._addToQueue(t),this;const a={type:PacketType.EVENT,data:t};if(a.options={},a.options.compress=this.flags.compress!==!1,typeof t[t.length-1]=="function"){const f=this.ids++,u=t.pop();this._registerAckCallback(f,u),a.id=f}const o=(s=(n=this.io.engine)===null||n===void 0?void 0:n.transport)===null||s===void 0?void 0:s.writable,l=this.connected&&!(!((r=this.io.engine)===null||r===void 0)&&r._hasPingExpired());return this.flags.volatile&&!o||(l?(this.notifyOutgoingListeners(a),this.packet(a)):this.sendBuffer.push(a)),this.flags={},this}_registerAckCallback(e,t){var n;const s=(n=this.flags.timeout)!==null&&n!==void 0?n:this._opts.ackTimeout;if(s===void 0){this.acks[e]=t;return}const r=this.io.setTimeoutFn(()=>{delete this.acks[e];for(let o=0;o<this.sendBuffer.length;o++)this.sendBuffer[o].id===e&&this.sendBuffer.splice(o,1);t.call(this,new Error("operation has timed out"))},s),a=(...o)=>{this.io.clearTimeoutFn(r),t.apply(this,o)};a.withError=!0,this.acks[e]=a}emitWithAck(e,...t){return new Promise((n,s)=>{const r=(a,o)=>a?s(a):n(o);r.withError=!0,t.push(r),this.emit(e,...t)})}_addToQueue(e){let t;typeof e[e.length-1]=="function"&&(t=e.pop());const n={id:this._queueSeq++,tryCount:0,pending:!1,args:e,flags:Object.assign({fromQueue:!0},this.flags)};e.push((s,...r)=>n!==this._queue[0]?void 0:(s!==null?n.tryCount>this._opts.retries&&(this._queue.shift(),t&&t(s)):(this._queue.shift(),t&&t(null,...r)),n.pending=!1,this._drainQueue())),this._queue.push(n),this._drainQueue()}_drainQueue(e=!1){if(!this.connected||this._queue.length===0)return;const t=this._queue[0];t.pending&&!e||(t.pending=!0,t.tryCount++,this.flags=t.flags,this.emit.apply(this,t.args))}packet(e){e.nsp=this.nsp,this.io._packet(e)}onopen(){typeof this.auth=="function"?this.auth(e=>{this._sendConnectPacket(e)}):this._sendConnectPacket(this.auth)}_sendConnectPacket(e){this.packet({type:PacketType.CONNECT,data:this._pid?Object.assign({pid:this._pid,offset:this._lastOffset},e):e})}onerror(e){this.connected||this.emitReserved("connect_error",e)}onclose(e,t){this.connected=!1,delete this.id,this.emitReserved("disconnect",e,t),this._clearAcks()}_clearAcks(){Object.keys(this.acks).forEach(e=>{if(!this.sendBuffer.some(n=>String(n.id)===e)){const n=this.acks[e];delete this.acks[e],n.withError&&n.call(this,new Error("socket has been disconnected"))}})}onpacket(e){if(e.nsp===this.nsp)switch(e.type){case PacketType.CONNECT:e.data&&e.data.sid?this.onconnect(e.data.sid,e.data.pid):this.emitReserved("connect_error",new Error("It seems you are trying to reach a Socket.IO server in v2.x with a v3.x client, but they are not compatible (more information here: https://socket.io/docs/v3/migrating-from-2-x-to-3-0/)"));break;case PacketType.EVENT:case PacketType.BINARY_EVENT:this.onevent(e);break;case PacketType.ACK:case PacketType.BINARY_ACK:this.onack(e);break;case PacketType.DISCONNECT:this.ondisconnect();break;case PacketType.CONNECT_ERROR:this.destroy();const n=new Error(e.data.message);n.data=e.data.data,this.emitReserved("connect_error",n);break}}onevent(e){const t=e.data||[];e.id!=null&&t.push(this.ack(e.id)),this.connected?this.emitEvent(t):this.receiveBuffer.push(Object.freeze(t))}emitEvent(e){if(this._anyListeners&&this._anyListeners.length){const t=this._anyListeners.slice();for(const n of t)n.apply(this,e)}super.emit.apply(this,e),this._pid&&e.length&&typeof e[e.length-1]=="string"&&(this._lastOffset=e[e.length-1])}ack(e){const t=this;let n=!1;return function(...s){n||(n=!0,t.packet({type:PacketType.ACK,id:e,data:s}))}}onack(e){const t=this.acks[e.id];typeof t=="function"&&(delete this.acks[e.id],t.withError&&e.data.unshift(null),t.apply(this,e.data))}onconnect(e,t){this.id=e,this.recovered=t&&this._pid===t,this._pid=t,this.connected=!0,this.emitBuffered(),this.emitReserved("connect"),this._drainQueue(!0)}emitBuffered(){this.receiveBuffer.forEach(e=>this.emitEvent(e)),this.receiveBuffer=[],this.sendBuffer.forEach(e=>{this.notifyOutgoingListeners(e),this.packet(e)}),this.sendBuffer=[]}ondisconnect(){this.destroy(),this.onclose("io server disconnect")}destroy(){this.subs&&(this.subs.forEach(e=>e()),this.subs=void 0),this.io._destroy(this)}disconnect(){return this.connected&&this.packet({type:PacketType.DISCONNECT}),this.destroy(),this.connected&&this.onclose("io client disconnect"),this}close(){return this.disconnect()}compress(e){return this.flags.compress=e,this}get volatile(){return this.flags.volatile=!0,this}timeout(e){return this.flags.timeout=e,this}onAny(e){return this._anyListeners=this._anyListeners||[],this._anyListeners.push(e),this}prependAny(e){return this._anyListeners=this._anyListeners||[],this._anyListeners.unshift(e),this}offAny(e){if(!this._anyListeners)return this;if(e){const t=this._anyListeners;for(let n=0;n<t.length;n++)if(e===t[n])return t.splice(n,1),this}else this._anyListeners=[];return this}listenersAny(){return this._anyListeners||[]}onAnyOutgoing(e){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.push(e),this}prependAnyOutgoing(e){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.unshift(e),this}offAnyOutgoing(e){if(!this._anyOutgoingListeners)return this;if(e){const t=this._anyOutgoingListeners;for(let n=0;n<t.length;n++)if(e===t[n])return t.splice(n,1),this}else this._anyOutgoingListeners=[];return this}listenersAnyOutgoing(){return this._anyOutgoingListeners||[]}notifyOutgoingListeners(e){if(this._anyOutgoingListeners&&this._anyOutgoingListeners.length){const t=this._anyOutgoingListeners.slice();for(const n of t)n.apply(this,e.data)}}}function Backoff(i){i=i||{},this.ms=i.min||100,this.max=i.max||1e4,this.factor=i.factor||2,this.jitter=i.jitter>0&&i.jitter<=1?i.jitter:0,this.attempts=0}Backoff.prototype.duration=function(){var i=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var e=Math.random(),t=Math.floor(e*this.jitter*i);i=Math.floor(e*10)&1?i+t:i-t}return Math.min(i,this.max)|0},Backoff.prototype.reset=function(){this.attempts=0},Backoff.prototype.setMin=function(i){this.ms=i},Backoff.prototype.setMax=function(i){this.max=i},Backoff.prototype.setJitter=function(i){this.jitter=i};class Manager extends Emitter{constructor(e,t){var n;super(),this.nsps={},this.subs=[],e&&typeof e=="object"&&(t=e,e=void 0),t=t||{},t.path=t.path||"/socket.io",this.opts=t,installTimerFunctions(this,t),this.reconnection(t.reconnection!==!1),this.reconnectionAttempts(t.reconnectionAttempts||1/0),this.reconnectionDelay(t.reconnectionDelay||1e3),this.reconnectionDelayMax(t.reconnectionDelayMax||5e3),this.randomizationFactor((n=t.randomizationFactor)!==null&&n!==void 0?n:.5),this.backoff=new Backoff({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(t.timeout==null?2e4:t.timeout),this._readyState="closed",this.uri=e;const s=t.parser||parser;this.encoder=new s.Encoder,this.decoder=new s.Decoder,this._autoConnect=t.autoConnect!==!1,this._autoConnect&&this.open()}reconnection(e){return arguments.length?(this._reconnection=!!e,e||(this.skipReconnect=!0),this):this._reconnection}reconnectionAttempts(e){return e===void 0?this._reconnectionAttempts:(this._reconnectionAttempts=e,this)}reconnectionDelay(e){var t;return e===void 0?this._reconnectionDelay:(this._reconnectionDelay=e,(t=this.backoff)===null||t===void 0||t.setMin(e),this)}randomizationFactor(e){var t;return e===void 0?this._randomizationFactor:(this._randomizationFactor=e,(t=this.backoff)===null||t===void 0||t.setJitter(e),this)}reconnectionDelayMax(e){var t;return e===void 0?this._reconnectionDelayMax:(this._reconnectionDelayMax=e,(t=this.backoff)===null||t===void 0||t.setMax(e),this)}timeout(e){return arguments.length?(this._timeout=e,this):this._timeout}maybeReconnectOnOpen(){!this._reconnecting&&this._reconnection&&this.backoff.attempts===0&&this.reconnect()}open(e){if(~this._readyState.indexOf("open"))return this;this.engine=new Socket$1(this.uri,this.opts);const t=this.engine,n=this;this._readyState="opening",this.skipReconnect=!1;const s=on(t,"open",function(){n.onopen(),e&&e()}),r=o=>{this.cleanup(),this._readyState="closed",this.emitReserved("error",o),e?e(o):this.maybeReconnectOnOpen()},a=on(t,"error",r);if(this._timeout!==!1){const o=this._timeout,l=this.setTimeoutFn(()=>{s(),r(new Error("timeout")),t.close()},o);this.opts.autoUnref&&l.unref(),this.subs.push(()=>{this.clearTimeoutFn(l)})}return this.subs.push(s),this.subs.push(a),this}connect(e){return this.open(e)}onopen(){this.cleanup(),this._readyState="open",this.emitReserved("open");const e=this.engine;this.subs.push(on(e,"ping",this.onping.bind(this)),on(e,"data",this.ondata.bind(this)),on(e,"error",this.onerror.bind(this)),on(e,"close",this.onclose.bind(this)),on(this.decoder,"decoded",this.ondecoded.bind(this)))}onping(){this.emitReserved("ping")}ondata(e){try{this.decoder.add(e)}catch(t){this.onclose("parse error",t)}}ondecoded(e){nextTick(()=>{this.emitReserved("packet",e)},this.setTimeoutFn)}onerror(e){this.emitReserved("error",e)}socket(e,t){let n=this.nsps[e];return n?this._autoConnect&&!n.active&&n.connect():(n=new Socket(this,e,t),this.nsps[e]=n),n}_destroy(e){const t=Object.keys(this.nsps);for(const n of t)if(this.nsps[n].active)return;this._close()}_packet(e){const t=this.encoder.encode(e);for(let n=0;n<t.length;n++)this.engine.write(t[n],e.options)}cleanup(){this.subs.forEach(e=>e()),this.subs.length=0,this.decoder.destroy()}_close(){this.skipReconnect=!0,this._reconnecting=!1,this.onclose("forced close")}disconnect(){return this._close()}onclose(e,t){var n;this.cleanup(),(n=this.engine)===null||n===void 0||n.close(),this.backoff.reset(),this._readyState="closed",this.emitReserved("close",e,t),this._reconnection&&!this.skipReconnect&&this.reconnect()}reconnect(){if(this._reconnecting||this.skipReconnect)return this;const e=this;if(this.backoff.attempts>=this._reconnectionAttempts)this.backoff.reset(),this.emitReserved("reconnect_failed"),this._reconnecting=!1;else{const t=this.backoff.duration();this._reconnecting=!0;const n=this.setTimeoutFn(()=>{e.skipReconnect||(this.emitReserved("reconnect_attempt",e.backoff.attempts),!e.skipReconnect&&e.open(s=>{s?(e._reconnecting=!1,e.reconnect(),this.emitReserved("reconnect_error",s)):e.onreconnect()}))},t);this.opts.autoUnref&&n.unref(),this.subs.push(()=>{this.clearTimeoutFn(n)})}}onreconnect(){const e=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",e)}}const cache={};function lookup(i,e){typeof i=="object"&&(e=i,i=void 0),e=e||{};const t=url(i,e.path||"/socket.io"),n=t.source,s=t.id,r=t.path,a=cache[s]&&r in cache[s].nsps,o=e.forceNew||e["force new connection"]||e.multiplex===!1||a;let l;return o?l=new Manager(n,e):(cache[s]||(cache[s]=new Manager(n,e)),l=cache[s]),t.query&&!e.query&&(e.query=t.queryKey),l.socket(t.path,e)}Object.assign(lookup,{Manager,Socket,io:lookup,connect:lookup});const handleGetUsersInChat=async i=>{const e=await axios({url:API().user.profile,method:"post",headers:{"Content-Type":"application/json"},data:i});return responseValidator(e.status)?e.data:[]},submitCommentInChat=async(i,e,t)=>{const n=store.dispatch,{roomId:s,messages:r,messageCount:a,chatType:o}=store.getState().chats,{name:l,avatar_url:d}=store.getState().user,f={room:s,text:t?void 0:e,default_message_id:t??void 0},{data:u,status:p}=await submitChatComment(f);if(responseValidator(p)){if(!t&&o===ChatType.private){const m={name:l,avatar_url:d,created_at:u.created_at,text:e,author:u.author,room_id:s,id:u.id,isConfirmed:!1};n(setMessages(r?[m,...r]:[m])),n(setMessageCount(a+1))}}else ae({title:"ارتباط با سرور دچار مشکل شده است.",type:"error"});i&&i("")},fetchChatMessage=async(i,e)=>{const{roomId:t,messages:n,messageCount:s}=store.getState().chats,r=store.dispatch,{data:a,status:o}=await getAllChatMessages(t,i);if(responseValidator(o)){e(!1);let l=[];s!==0?n?l=[...n,...a.results]:l=[...a.results]:l=[...a.results],r(setMessageCount(a.count)),handleFirstTimeChatRoomMessage(l)}},handleConnectSocket=i=>{const e=store.dispatch,{roomId:t}=store.getState().chats;let n;n=lookup(API().live.liveChat.chat(t)),n.on("connect",async()=>{e(setSocket(n)),fetchChatMessage(0,i),n.on("message",async s=>handleChatRoomMessage(s))})},handleChatRoomMessage=async i=>{const e=store.dispatch,{messages:t,chatType:n}=store.getState().chats,{userId:s}=store.getState().user;if(!Array.isArray(i)){let r;if(n!==ChatType.public&&t&&(r=t.findIndex(o=>o.id===i.id)),r>-1&&t&&t.length){const o=JSON.parse(JSON.stringify(t));o[r].isConfirmed=!0,e(setMessages(o))}else n===ChatType.auto&&s===i.author&&(i.isConfirmed=!0),t&&t.length?e(setMessages([i,...t])):e(setMessages([i]));const{usersInfoInChat:a}=store.getState().chats;if(!a.find(o=>o.id===i.author)){const o=await handleGetUsersInChat([i.author]);o.length&&e(setUsersInfoInChat([...a,...o]))}}},handleFirstTimeChatRoomMessage=async i=>{const e=store.dispatch;if(i.length){e(setMessages(i));let t=[];i.map(s=>t.push(s.author)),t=[...new Set(t)];const n=await handleGetUsersInChat(t);n.length&&e(setUsersInfoInChat(n))}else e(setMessages([]))},handleChatActiveRoom=async i=>{const e=store.dispatch,{params:t}=store.getState().videoData,{roomId:n,chatEnabled:s,socket:r,showChat:a}=store.getState().chats;let o;if(!conditions(ConditionName.hasQuizParams)&&conditions(ConditionName.isParamsPortrait)&&i){let{data:l,status:d}=await apiCaller({url:API().live.liveChat.getRoomId(+String(t.id))});responseValidator(d)&&(n!==l.id&&r&&(e(setMessages([])),e(setChatEnabled(!1))),e(setDefaultMessages(l.default_messages)),e(setPinMessage(l.pin)),e(setRoomId(l.id)),e(setChatType(l.type)),o=l.id)}else s&&r&&(e(setMessages([])),e(setChatEnabled(!1)));s!==!!o&&setTimeout(()=>{a&&e(setChatPopover(!0)),e(setChatEnabled(!!o))},0)},submitChatComment=async i=>{const{data:e,status:t}=await apiCaller({url:API().live.liveChat.sendChatMessage,method:"post",data:i,headers:handleHasXTokenParamOrSendXToken(),retryPolicy:[{codeAbove:400,codeBelow:null,excludeCodes:[],includeCodes:[],delay:2,count:3}]});return{data:e,status:t}},getAllChatMessages=async(i,e)=>{const{data:t,status:n}=await apiCaller({url:API().live.liveChat.getMessageList(i),method:"GET",data:{offset:e,limit:10,ordering:"-created_at"},retryPolicy:[{codeAbove:400,codeBelow:null,excludeCodes:[],includeCodes:[],delay:2,count:3}]});return{data:t,status:n}},feedbackLog=(i,e,t)=>{const{params:n,details:s}=store.getState().videoData;return{category:"feedback",id:Number(n.id),stars:i,text:e,customText:t,type:n.type,src:conditions(ConditionName.hasStreamLink)?s.stream_link:n.src,provider:n.provider}},eventMarkerClickLog=(i,e,t,n,s)=>{const{params:r,details:a}=store.getState().videoData;return{category:"eventMarkerClick",video_id:conditions(ConditionName.isLiveParam)?a.id:Number(r.id),markerId:i,markerTime:e,markerTitle:t,markerDescription:n,markerSticker:s,type:r.type,src:conditions(ConditionName.hasStreamLink)?a.stream_link:r.src,provider:r.provider}},speedChangeLog=i=>{const{params:e,details:t}=store.getState().videoData,{settings:n}=store.getState().user;return{category:"speedChange",previousSelectedSpeed:n.speed,selectedSpeed:i,id:Number(e.id),type:e.type,src:conditions(ConditionName.hasStreamLink)?t.stream_link:e.src,provider:e.provider}},qualityChangeRequestLog=i=>{const{params:e,details:t}=store.getState().videoData,{qualityLevels:n,manualQuality:s,autoQuality:r}=store.getState().controller;return{category:"qualityChangeRequest",currentPlayingQuality:`${n[conditions(ConditionName.isAutoQuality)?r??s:s]}P`,previousSelectedQuality:conditions(ConditionName.isAutoQuality)?"auto":`${n[s]}P`,selectedQuality:i,id:Number(e.id),type:e.type,src:conditions(ConditionName.hasStreamLink)?t.stream_link:e.src,provider:e.provider}},catchUpLoadingLog=i=>{const{params:e,details:t}=store.getState().videoData,{hlsLiveSyncPosition:n,qualityLevels:s,autoQuality:r}=store.getState().controller,{settings:a}=store.getState().user;return{category:"catchUpLoading",previousVideoTime:Number(sessionStorage.getItem("previousVideoTime")),currentVideoTime:n,duration:i,quality:`${conditions(ConditionName.isAutoQuality)?s[r]:s[a.quality]}P`,isAutoQuality:conditions(ConditionName.isAutoQuality),id:Number(e.id),type:e.type,src:conditions(ConditionName.hasStreamLink)?t.stream_link:e.src,provider:e.provider}},shareDialogLog=(i,e,t,n)=>{const{params:s,details:r}=store.getState().videoData;return{category:"shareDialog",id:Number(s.id),type:s.type,src:conditions(ConditionName.hasStreamLink)?r.stream_link:s.src,videoTime:i,eventMarkerId:n,provider:s.provider,jump:e?"true":"false",jumpTime:e?t:void 0}},shareCopyLog=(i,e,t,n)=>{const{params:s,details:r}=store.getState().videoData;return{category:"shareCopy",id:Number(s.id),type:s.type,src:conditions(ConditionName.hasStreamLink)?r.stream_link:s.src,videoTime:i,eventMarkerId:n,jump:e?"true":"false",jumpTime:e?t:void 0,provider:s.provider}},alternativeLiveLog=i=>{const{params:e,details:t}=store.getState().videoData;return{category:"alternativeLiveClick",id:Number(e.id),type:e.type,src:conditions(ConditionName.hasStreamLink)?t.stream_link:e.src,alternativeLiveUserId:i,provider:e.provider}},deActiveSettingLog=()=>{const{params:i,details:e}=store.getState().videoData,{settings:t}=store.getState().user;let n={id:Number(i.id),type:i.type,src:conditions(ConditionName.hasStreamLink)?e.stream_link:i.src,provider:i.provider};return t.poll_emoji?{...n,category:"activeSetting"}:{...n,category:"deactiveSetting",hasOtherLive:conditions(ConditionName.hasAlternativeLives)?"true":"false",hasPoll:conditions(ConditionName.hasPoll)?"true":"false",hasEmoji:conditions(ConditionName.hasEmojiList1Or2)?"true":"false"}},backwardForwardLog=i=>{const{params:e,details:t}=store.getState().videoData;return{category:i==="backward"?"backward":"forward",id:Number(e.id),type:e.type,src:t.stream_link?t.stream_link:e.src,provider:e.provider}},pollModalCloseLog=(i,e,t)=>({category:"pollModalClose",pollId:t,id:Number(i.id),type:i.type,src:e.stream_link?e.stream_link:i.src,provider:i.provider}),tagClickLog=i=>{const{params:e,details:t}=store.getState().videoData;return{category:"tagClick",tagText:i,id:Number(e.id),type:e.type,src:conditions(ConditionName.hasStreamLink)?t.stream_link:e.src}},likeDislikeLog=i=>{const{params:e,details:t}=store.getState().videoData;return{category:i,id:Number(e.id),type:e.type,src:conditions(ConditionName.hasStreamLink)?t.stream_link:e.src}},fullscreenLog=i=>{const{params:e,details:t}=store.getState().videoData;return{category:i,id:Number(e.id),type:e.type,src:conditions(ConditionName.hasStreamLink)?t.stream_link:e.src}},brightnessLog=(i,e)=>{const{params:t,details:n}=store.getState().videoData;return{category:"brightnessChange",source:i,target:e,id:Number(t.id),type:t.type,src:conditions(ConditionName.hasStreamLink)?n.stream_link:t.src}},volumeLog=(i,e)=>{const{params:t,details:n}=store.getState().videoData;return{category:"volumeChange",source:i,target:e,id:Number(t.id),type:t.type,src:conditions(ConditionName.hasStreamLink)?n.stream_link:t.src}},subtitleLog=i=>{const{params:e,details:t}=store.getState().videoData;return{category:"subtitle",language:i,id:Number(e.id),type:e.type,src:conditions(ConditionName.hasStreamLink)?t.stream_link:e.src}},lockLog=i=>{const{params:e,details:t}=store.getState().videoData;return{category:i,id:Number(e.id),type:e.type,src:conditions(ConditionName.hasStreamLink)?t.stream_link:e.src}},recommendationListLog=(i,e,t,n)=>{const{params:s,details:r}=store.getState().videoData;return{category:"recommend",sourcevideoId:conditions(ConditionName.isLiveParam)?r.id:+s.id,targetVideoId:i,sourceUserId:r.user_id,targetUserId:e,sourceType:s.type,targetType:t,listIndex:n,id:Number(s.id),type:s.type,src:conditions(ConditionName.hasStreamLink)?r.stream_link:s.src}},ExceptionsLog=(i,e)=>({category:"error",type:i,message:e}),videoTimelineLog=(i,e)=>{const{params:t,details:n}=store.getState().videoData,{duration:s}=store.getState().controller;return{category:"video-timeline",video_id:conditions(ConditionName.isLiveParam)?n.id:+t.id,video_type:t.type==="archive"?"live":t.type,start:i,end:e,watchedDuration:e-i,video_duration:conditions(ConditionName.isLiveParam)?null:Math.floor(s),clientUUID:getUUID(),user_id:conditions(ConditionName.isLiveParam)?t.id:n.user_id,content_type:n.content_type,content_id:n.content_id}},bookmarkLog=i=>{const{params:e,details:t}=store.getState().videoData;return{category:i,id:conditions(ConditionName.isLiveParam)?t.id:+e.id,type:e.type,src:conditions(ConditionName.hasStreamLink)?t.stream_link:e.src}},autoQualityChangeLog=(i,e,t)=>{const{params:n,details:s}=store.getState().videoData;return{category:"autoQualityChange",sourceQuality:i,targetQuality:e,diffQuality:t,id:Number(n.id),type:n.type,src:conditions(ConditionName.hasStreamLink)?s.stream_link:n.src,provider:n.provider}},pingpongLog=(i,e)=>{const{params:t,details:n}=store.getState().videoData;return{category:"pingpong",id:Number(t.id),type:t.type,src:conditions(ConditionName.hasStreamLink)?n.stream_link:t.src,PingPongDuration:Number((new Date().getTime()-i).toFixed(2)),PingPongSourceQuality:`${e[0]}P`,PingPongTargetQuality:`${e[1]}P`,provider:t.provider}},pausePlayLog=i=>{const{params:e,details:t}=store.getState().videoData;return{category:i?"playVideo":"pauseVideo",id:Number(e.id),type:e.type,src:t.stream_link?t.stream_link:e.src,provider:e.provider}},initLog=(i,e,t,n,s)=>{const{params:r,details:a}=store.getState().videoData,o=Date.now()-s.current+i+e,l=window.performance.memory,d=JSON.parse(JSON.stringify(window.performance.timing));return{category:"initLog",id:Number(r.id),type:r.type,origin:new URL(conditions(ConditionName.hasStreamLink)?a.stream_link:r.src).origin,src:conditions(ConditionName.hasStreamLink)?a.stream_link:r.src,loading:i,bannerLoading:!conditions(ConditionName.hasBanner)||t<0?0:t,waiting:e,firstChunkPlaying:n<0?0:n,totalTime:o,provider:r.provider,performance:flattenObject({memory:l,timing:d},"performance"),userAgent:window.navigator.userAgent}},loadingLog=(i,e,t,n,s)=>{const{params:r,details:a,hlsLiveSyncPosition:o}=store.getState().videoData,{settings:l}=store.getState().user,d=conditions(ConditionName.isLiveParam)?o:videoTag().currentTime,f=Date.now()-t.current;return{category:"loading",id:Number(r.id),type:r.type,src:conditions(ConditionName.hasStreamLink)?a.stream_link:r.src,duration:i,quality:`${e}P`,isAutoQuality:conditions(ConditionName.isAutoQuality),previousLoaderDiff:f,counter:n.current,loadingPercentile:Number((i/f).toFixed(2)),videoTime:d,videoEntranceTime:s,speed:l.speed,provider:r.provider}},playListClickLog=i=>{const{params:e,details:t}=store.getState().videoData;return{category:"playListClick",playlistId:i,id:conditions(ConditionName.isLiveParam)?t.id:+e.id,type:e.type}},videoOfPlaylistClickLog=(i,e,t,n)=>({category:"videoOfPlaylistClick",tag:i,indexNumber:n,videoId:e,videoType:t}),searchLog=i=>{const{selectedTags:e,inputTagSearch:t}=store.getState().tags,{params:n}=store.getState().videoData;return{category:"search",tag:e.join(","),q:conditions(ConditionName.hasInputTagSearch)?t:void 0,user_ids:n.user_ids,video_type:i}},searchResultClickLog=(i,e,t)=>{const{selectedTags:n,inputTagSearch:s}=store.getState().tags,{params:r}=store.getState().videoData,a=handleContentType();return{category:"searchResultClick",tag:n.join(","),q:conditions(ConditionName.hasInputTagSearch)?s:void 0,user_ids:r.user_ids,video_type:a,clickedId:i,clickedIndex:t,clickedType:e}},handleContinuousPlayback=()=>{const{videoSettings:i}=store.getState().user,{params:e}=store.getState().videoData,t=e.type.toString(),n=conditions(ConditionName.isLogin),s=videoTag().currentTime;if(t!=="live"&&s!==0){const r=videoTag().duration,a={video_id:+e.id,video_type:handleVideoType(),time:s===r?0:Math.floor(videoTag().currentTime),is_like:i.is_like};let o=localStorage.getItem("viewedVideos");if(o){let l=JSON.parse(o);l=l.filter(d=>d.video_id!==a.video_id||d.video_type!==a.video_type),l.length<10||l.shift(),l.push(a),localStorage.setItem("viewedVideos",JSON.stringify(l))}else localStorage.setItem("viewedVideos",JSON.stringify([a]));n&&createVideoSettings(a)}},handleApplyContinuousPlayback=()=>{const i=store.dispatch,{params:e}=store.getState().videoData;let t=localStorage.getItem("viewedVideos");if(t){const s=JSON.parse(t).find(r=>r.video_id===Number(e.id)&&r.video_type===handleVideoType());s&&(i(setVideoSettings({is_like:s.is_like,time:s.time})),s.time!==0&&i(setShowContinuousPlayback(!0)))}},handleShowContinuousVideo=i=>{const e=store.dispatch,{videoSettings:t}=store.getState().user;handlePlayPause(i),handleVideoTimeline(t.time),e(setShowContinuousPlayback(!1))},handleGoToFirstVideo=i=>{const e=store.dispatch,{videoSettings:t}=store.getState().user;e(setVideoSettings({...t,time:0})),e(setShowContinuousPlayback(!1)),handlePlayPause(i)},handlePlayPause=i=>{const e=store.dispatch,{params:t}=store.getState().videoData;(i===null||i.target.nodeName!=="INPUT")&&(i!==null&&(i.stopPropagation(),i.preventDefault()),videoTag().paused?videoTag().play():videoTag().pause(),e(setPlay(!videoTag().paused)),t.onPlayPause&&t.onPlayPause(!videoTag().paused))},handlePlayerPauseMiniPlayer=i=>{if(i===null||i.target.nodeName!=="INPUT"){const e=store.dispatch;miniPlayerVideoTag().paused?miniPlayerVideoTag().play():miniPlayerVideoTag().pause(),e(setPlayMiniPlayer(!miniPlayerVideoTag().paused)),videoTag()&&videoTag().played&&(videoTag().pause(),e(setPlay(!1)))}},handlePlayPauseInDOM=i=>{const e=store.dispatch;return i?(videoTag().play(),e(setPlay(!0)),!0):(videoTag().pause(),e(setPlay(!1)),!1)},handleChangeSoundVolume=i=>{const e=store.dispatch,{settings:t}=store.getState().user;e(setUserSettings({...t,volume:i})),conditions(ConditionName.isIOS)?videoTag().muted=!videoTag().muted:videoTag().volume=i/100},handleIsLive=()=>{const i=store.dispatch,{hlsLiveSyncPosition:e}=store.getState().controller;handleVideoTimeline(videoTag().currentTime,e),videoTag().currentTime=e,i(setCurrentTime(e)),progressBar()&&(progressBar().style.width="100%"),i(setIsLive(!0));const t=Date.now();videoTag().play().then(()=>sendFluentLog(catchUpLoadingLog(Date.now()-t)))},handleBackwardForward=(i,e=15,t)=>{if(t&&t.target.nodeName==="INPUT")return;const n=store.dispatch;i==="touchBackward"?i="backward":i==="touchForward"&&(i="forward"),sendFluentLog(backwardForwardLog(i));let s=0;i==="backward"?e===0?s=0:s=videoTag().currentTime-e:i==="forward"&&(e===videoTag().duration?s=e:s=videoTag().currentTime+e),conditions(ConditionName.isLiveParam)&&n(setCurrentTime(s)),conditions(ConditionName.isStaticFormat)||handleVideoTimeline(videoTag().currentTime,videoTag().currentTime+e),videoTag().currentTime=s},handleFullScreen=()=>{const i=store.dispatch,e=document.fullscreenElement;conditions(ConditionName.isIOS)?videoTag().webkitEnterFullScreen?(i(setPlay(!1)),videoTag().webkitEnterFullScreen()):(i(setClearPopoversSlice()),sendFluentLog(fullscreenLog("fullScreen"))):e?(i(setIsFullScreen(!1)),document.exitFullscreen(),conditions(ConditionName.isTouchScreen)&&conditions(ConditionName.isParamsPortrait)&&i(setIsComplexPortrait(!0))):(i(setClearPopoversSlice()),document.documentElement.requestFullscreen(),i(setIsFullScreen(!0)),sendFluentLog(fullscreenLog("fullScreen")),conditions(ConditionName.isTouchScreen)&&conditions(ConditionName.isParamsPortrait)&&i(setIsComplexPortrait(!1)))},handleLockOrientation=()=>{conditions(ConditionName.isTouchScreen)&&!conditions(ConditionName.isIOS)&&(conditions(ConditionName.isLandscape)&&!conditions(ConditionName.isFullScreen)?window.screen.orientation.lock("portrait"):window.screen.orientation.lock("landscape"))},handleLock=i=>{const e=store.dispatch;e(setLock(i==="lock")),sendFluentLog(lockLog(i))},handleVideoTimeline=(i,e)=>{if(conditions(ConditionName.isSendTimelineLog)){const t=store.dispatch,{videoTimelines:n}=store.getState().videoData;let s=Math.floor(i),r=Math.floor(e);n.length===0?t(setVideoTimelines([s>=videoTag().duration&&!conditions(ConditionName.isLive)?r:s])):(n[0]<s&&apiCaller({url:API().videoTimelineLog,method:"post",data:videoTimelineLog(n[0],s)}),r&&r>=videoTag().duration?t(setVideoTimelines([])):t(setVideoTimelines([r])))}},handleVideoElementSizeInfo=()=>{var t;const i=store.dispatch,e=(t=document.getElementById("video-area"))==null?void 0:t.getBoundingClientRect();e.height=e.width*9/16,e&&i(setVideoElementSizeInfo(e))},handleClickVideoCard=(i,e,t)=>{const n=store.dispatch,{params:s,recommendationList:r}=store.getState().videoData;let a=i,o=e;if(r&&r.length&&(!i||!e)){const l=findFirstVideoInRecommendationList();a=i||l.id,o=e||l.type}videoTag()&&(handleVideoTimeline(videoTag().currentTime),conditions(ConditionName.isEnded)||handleContinuousPlayback()),a&&o&&(s.handleRedirectCards&&!t&&s.handleRedirectCards(a,o),clearRedux(),n(setPlayerParams({...s,id:a,type:o,xToken:s.xToken})),n(setIsClickInnerCard(!0)))},detailAPI=i=>{const{params:e}=store.getState().videoData;return getApiUrls().apiUrl+(i||e.id)},detailsConfig={url:"",maxRetryCount:0,headers:{},retryPolicy:[],errorCallback:void 0},liveDetailsConfig=i=>{detailsConfig.url=detailAPI(i);let e=window.location.origin;e=e.replace("https://",""),e=e.replace("http://",""),detailsConfig.url+="?from="+e},nonLiveDetailsConfig=i=>(detailsConfig.url=detailAPI(i),detailsConfig.maxRetryCount=3,detailsConfig.retryPolicy=[{codeAbove:500,codeBelow:null,excludeCodes:[],includeCodes:[409],delay:1,count:3},{codeAbove:null,codeBelow:404,excludeCodes:[403,402,401,400],includeCodes:[],delay:10,count:6}],detailsConfig.errorCallback=(e,t)=>{e!==404&&errorLogProvider({type:"DETAIL_ERROR",message:t?JSON.parse(t).message:""})},detailsConfig),hasIsAuthInParams=()=>{const{token:i}=store.getState().videoData;hasQuestionMark(detailsConfig.url)?detailsConfig.url+=`&token=${i}`:detailsConfig.url+=`?token=${i}`},hasHInParams=()=>{detailsConfig.headers={authorization:`Bearer ${getAccessToken()}`}},hasDaaniToken=()=>{const{daaniToken:i}=store.getState().videoData.params;hasQuestionMark(detailsConfig.url)?detailsConfig.url+=`&ext_user=${i}`:detailsConfig.url+=`?ext_user=${i}`},handleDetailsConfig=i=>(conditions(ConditionName.isLiveParam)?liveDetailsConfig(i):nonLiveDetailsConfig(),conditions(ConditionName.isAuth)&&hasIsAuthInParams(),conditions(ConditionName.hasHParam)&&hasHInParams(),conditions(ConditionName.hasDaaniTokenParams)&&hasDaaniToken(),detailsConfig),videoViewCount=i=>apiCaller({url:API().viewCount(i),data:{uuid:getUUID()}}),handleDetailsInLive=i=>{const e=store.dispatch;e(setLiveId(i.id)),e(setIsLive(!0)),e(setIsLiveError(!1)),conditions(ConditionName.isEnded)?setTimeout(()=>detailSetter(i),LiveDelay*1e3):detailSetter(i)},getLiveAndVodDetails=async i=>{const e=store.dispatch,{params:t}=store.getState().videoData;try{const n=await apiCaller({...handleDetailsConfig(i)});if(responseValidator(n.status)){if(appendQueryParamsToChunks(n.data.stream_link),await axios.head("https://"+weighted_random(n.data.hls_links)+n.data.path),i)return n.data;videoViewCount(n.data.content_id),conditions(ConditionName.isLiveParam)?handleDetailsInLive(n.data):detailSetter(n.data)}else throw new Error(JSON.stringify({status:n.status,message:n.data}))}catch(n){if(JSON.parse(n.message).status===404&&conditions(ConditionName.isLiveParam)&&conditions(ConditionName.hasRedirectOnEndedUrlParams)&&(window.location.href=t.redirectOnEndedUrl),i)return;conditions(ConditionName.isLiveParam)&&e(setIsLiveError(!0)),handlePageTitle(String(t.id)),e(setIsFetchDetails(!0)),e(setErrorType("liveAndVod")),e(setIsValidAddress(!1))}},detailSetter=i=>{const e=store.dispatch,{params:t}=store.getState().videoData;i.title?handlePageTitle(i.title):handlePageTitle(String(t.id)),e(setInfo({...i,stream_link:!!i.stream_link&&addUuidToSrc("https://"+weighted_random(i.hls_links)+i.path)})),e(setIsFetchDetails(!0)),e(setIsValidAddress(!0))},manualGeneralErrorResponseHandler=(i,e,t,n,s,r,a)=>{i!==RetryCountGeneralDataFetch&&i!==1?t(i-1):i===1&&n.length>0&&(n.forEach(o=>clearInterval(o)),s([])),console.error(`get aggregat error: ${r.detail}`)},firstGetDataIntervalAPI=async(i,e,t,n,s,r)=>{const{params:a}=store.getState().videoData,{data:o,status:l}=await apiCaller({url:API().live.generalData});if(responseValidator(l)&&o.config){if(o.backup&&(window.location.href=window.location.href.replace(`id=${a.id}`,`id=${o.backup}`).replace(`&t=${a.t}`,"")),e(RetryCountGeneralDataFetch),t(setConfig(o.config)),n(conditions(ConditionName.hasQuizParams)?o.config.quiz_get_interval:o.config.get_interval),s(o.config.viewers_interval),r(o.config.empoji_poll_interval),t(setEmojis(o.emojis)),t(setOnlineViewers(o.online_viewers)),t(setQuestion(o.question)),t(setAlternative_Lives(o.alternative_lives)),t(setMarkers(o.markers.sort(compare))),t(setGif(o.gif)),t(setQuiz(o.quiz)),handleChatActiveRoom(o.chat_enabled),o.timeline.windows.length){const d=[];o.timeline.windows.map(f=>d.push(f.viewers)),t(setChartPoints(d))}!o&&!o.question&&!o.question.active&&(livePoll()&&livePoll().liveId!==a.id||!livePoll())&&localStorage.setItem("live-poll",JSON.stringify({liveId:a.id,polls:[]}))}else n(RetryTimeDelayGeneralDataFetch),e(i-1),console.error(`get aggregat error: ${o.detail}`)},manualGetDataIntervalAPI=async(i,e,t,n,s,r,a,o,l)=>{const{params:d}=store.getState().videoData,{data:f,status:u}=await apiCaller({url:API().live.generalData});if(responseValidator(u)&&f.config){if(f.backup&&(window.location.href=window.location.href.replace(`id=${d.id}`,`id=${f.backup}`).replace(`&t=${d.t}`,"")),n(RetryCountGeneralDataFetch),s(setConfig(f.config)),(conditions(ConditionName.hasQuizParams)&&f.config.quiz_get_interval!==t||!conditions(ConditionName.hasQuizParams)&&f.config.get_interval!==t)&&a(conditions(ConditionName.hasQuizParams)?f.config.quiz_get_interval:f.config.get_interval),o(f.config.viewers_interval),l(f.config.empoji_poll_interval),s(setEmojis(f.emojis)),s(setOnlineViewers(f.online_viewers)),s(setQuestion(f.question)),s(setAlternative_Lives(f.alternative_lives)),s(setMarkers(f.markers.sort(compare))),s(setGif(f.gif)),handleChatActiveRoom(f.chat_enabled),s(setQuiz(f.quiz)),f.timeline.windows.length){const p=[];f.timeline.windows.map(m=>p.push(m.viewers)),s(setChartPoints(p))}!f.question&&f.question&&!f.question.active&&(livePoll()&&livePoll().liveId!==d.id||!livePoll())&&localStorage.setItem("live-poll",JSON.stringify({liveId:d.id,polls:[]}))}else manualGeneralErrorResponseHandler(i,s,n,e,r,f)},manualPostAPI=async()=>{const i=store.dispatch,{selectedOptionId:e,emojiList1:t,emojiList2:n,params:s,details:r}=store.getState().videoData;if(conditions(ConditionName.manaulPostAPI)){const a={poll:{option_id:e},emoji_list_1:t,emoji_list_2:n,type:s.type,id:r.id,user_id:s.id},{status:o}=await postEmojiPoll(a);responseValidator(o)&&(i(setEmojiList1([])),i(setEmojiList2([])),i(setSelectedOptionId(null)))}},manualGetOnlineViewerIntervalAPI=async()=>await apiCaller({url:API().live.online_viewer}),handleSubtitle=()=>{const i=store.dispatch,{subtitles:e,selectedSubtitle:t}=store.getState().videoData,n=e.find(s=>s.language==="fa");t?(Object.values(videoTag().textTracks).find(s=>s.mode==="showing").mode="disabled",i(setSubtitleText("")),i(setSelectedSubtitle(void 0)),sendFluentLog(subtitleLog("empty"))):n?(n.mode="showing",i(setSelectedSubtitle(n)),sendFluentLog(subtitleLog(n.language))):(videoTag().textTracks[0].mode="showing",i(setSelectedSubtitle(videoTag().textTracks[0])),sendFluentLog(subtitleLog(videoTag().textTracks[0].language)))},handleClickRecommendationCard=(i,e,t,n,s)=>{i&&handleRipple(i,`recommendationList-${e}`,150);const{recommendationList:r}=store.getState().videoData;handleVideoTimeline(videoTag().currentTime),sendFluentLog(recommendationListLog(e??r[0].id,t??r[0].user_id,n??r[0].type,s??1))},combinedMarkers=(i,e)=>{const t=[];i&&i.map(n=>{t.push({banner:"",id:n.id?n.id:n.time,live_id:conditions(ConditionName.isLiveParam)?n.video_id:0,sticker:n.sticker,time:n.time,title:n.name,video_type:n.video_type,video_id:n.video_id,description:n.description,isPersonal:n.id?n.id:n.time})}),store.dispatch(setMarkers([...e,...t].sort(compare)))},handlePlayListTabClick=()=>{const i=store.dispatch,{playList:e}=store.getState().videoData;i(setPlayListPopover(!0)),sendFluentLog(playListClickLog(e[0].id))},handleVideoOfPlaylistClick=(i,e,t,n,s)=>{handleRipple(i,`playList-${t}`,150),sendFluentLog(videoOfPlaylistClickLog(e,t,n,s))},handleContentType=()=>{const{isMovieFilter:i,isSeriesFilter:e}=store.getState().tags;let t;return i&&e?t=`${ContentTypesString.Vod},${ContentTypesString.PlayList}`:i?t=ContentTypesString.Vod:e&&(t=ContentTypesString.PlayList),t},findFirstVideoInRecommendationList=()=>{const{recommendationList:i}=store.getState().videoData,e=i.find(t=>t.type!=="playlist");return{id:e.id,type:e.type,banner:e.banner,title:e.title}},postEmojiPoll=async i=>{const{status:e}=await apiCaller({url:API().live.postData,method:"POST",data:i,retryPolicy:[{codeAbove:null,codeBelow:500,excludeCodes:[500,408,407,406,405,404,403,402,401,400],includeCodes:[409],delay:3,count:3}]});return{status:e}},getPlaylistVideos=async(i,e)=>{const{data:t,status:n}=await apiCaller({url:API().playListVideos(i),method:"GET",data:{offset:e,limit:10},retryPolicy:[{codeAbove:400,codeBelow:null,excludeCodes:[],includeCodes:[],delay:2,count:3}]});return{data:t,status:n}},getAllGeneralMarker=async i=>await getAll(i,[{codeAbove:400,codeBelow:null,excludeCodes:[],includeCodes:[],delay:2,count:3}]),getAllPersonalMarkers=async i=>{const{data:e,status:t}=await apiCaller({url:i,headers:handleHasXTokenParamOrSendXToken(),retryPolicy:[{codeAbove:400,codeBelow:null,excludeCodes:[],includeCodes:[],delay:2,count:3}]});return{data:e,status:t}},getCommentList=async(i,e)=>{const{data:t,status:n}=await apiCaller({url:i,data:{limit:10,offset:e},retryPolicy:[{codeAbove:400,codeBelow:null,excludeCodes:[],includeCodes:[],delay:2,count:3}]});return{data:t,status:n}},submitComment=async(i,e)=>{const{data:t,status:n}=await apiCaller({url:i,method:"POST",data:e,headers:{...handleHasXTokenParamOrSendXToken(),"ACCEPT-LANGUAGE":"fa"},retryPolicy:[{codeAbove:400,codeBelow:null,excludeCodes:[409],includeCodes:[],delay:2,count:3}]});return{data:t,status:n}},getPlayListCards=async i=>{const{data:e,status:t}=await apiCaller({url:i,retryPolicy:[{codeAbove:400,codeBelow:null,excludeCodes:[],includeCodes:[],delay:2,count:3}]});return{data:e,status:t}},getPlaylistHeader=async i=>{const{data:e,status:t}=await apiCaller({url:i,retryPolicy:[{codeAbove:400,codeBelow:null,excludeCodes:[],includeCodes:[],delay:2,count:3}]});return{data:e,status:t}};class InvalidTokenError extends Error{}InvalidTokenError.prototype.name="InvalidTokenError";function b64DecodeUnicode(i){return decodeURIComponent(atob(i).replace(/(.)/g,(e,t)=>{let n=t.charCodeAt(0).toString(16).toUpperCase();return n.length<2&&(n="0"+n),"%"+n}))}function base64UrlDecode(i){let e=i.replace(/-/g,"+").replace(/_/g,"/");switch(e.length%4){case 0:break;case 2:e+="==";break;case 3:e+="=";break;default:throw new Error("base64 string is not of the correct length")}try{return b64DecodeUnicode(e)}catch{return atob(e)}}function jwtDecode(i,e){if(typeof i!="string")throw new InvalidTokenError("Invalid token specified: must be a string");e||(e={});const t=e.header===!0?0:1,n=i.split(".")[t];if(typeof n!="string")throw new InvalidTokenError(`Invalid token specified: missing part #${t+1}`);let s;try{s=base64UrlDecode(n)}catch(r){throw new InvalidTokenError(`Invalid token specified: invalid base64 for part #${t+1} (${r.message})`)}try{return JSON.parse(s)}catch(r){throw new InvalidTokenError(`Invalid token specified: invalid json for part #${t+1} (${r.message})`)}}const checkCanComment=async()=>{const i=store.dispatch,{details:e}=store.getState().videoData,{data:t,status:n}=await apiCaller({url:API().comment.canAddComment(e.content_id)});responseValidator(n)&&(i(setCanAddComment(t.can_comment)),i(setCanShowSubmittedComment(t.comment_hidden_default===0)),i(setCommentsCount(t.comments_count-t.hidden_comments_count)),i(setCommentsCountPagination(t.first_level_comments_count-t.first_level_hidden_comments_count)))},handleGetComments=async(i,e)=>{const t=store.dispatch,{comments:n,usersCommentsProfiles:s}=store.getState().comments,{details:r}=store.getState().videoData,{data:a,status:o}=await getCommentList(API().comment.commentList(r.content_id),i);responseValidator(o)&&a.results&&a.results.length?(n!==void 0&&n.length?t(setComments([...n,...a.results])):t(setComments(a.results)),e(!1),t(setUsersCommentsProfiles(await handleGetUsersComments(a.results,s)))):(n===void 0||n.length===0)&&t(setComments([]))},handleGetReplies=async(i,e,t,n,s,r)=>{get(async(a,o)=>{responseValidator(o)&&(e.length?t([...e,...a.results]):t(a.results),s(await handleGetUsersComments(a.results,n)))},API().comment.replyList(i),{limit:10,offset:e.length-(r?1:0)})},handleSubmitDefaultMessageComment=async i=>{const e=store.dispatch,{details:t}=store.getState().videoData,{comments:n}=store.getState().comments;if(await checkCanComment(),conditions(ConditionName.canAddComment)){const s={text:void 0,default_message_id:i,content:t.content_id,reply_to:void 0},{data:r,status:a}=await submitComment(API().comment.create,s);responseValidator(a)?n?(e(setComments([r,...n])),conditions(ConditionName.isTouchScreen)&&n.length>0&&document.getElementById("touchscreenListComments").scrollIntoView({behavior:"smooth"})):e(setComments([r])):r&&ae({title:r.detail,type:"error"})}},handleSubmitComment=async(i,e,t,n,s,r)=>{const a=store.dispatch,{details:o}=store.getState().videoData,{replyToAuthor:l,comments:d}=store.getState().comments;if(await checkCanComment(),conditions(ConditionName.canAddComment)&&(i||t)){const f={text:i,content:s==="reply"?void 0:o.content_id,reply_to:s==="reply"?l.id:void 0},{data:u,status:p}=await submitComment(API().comment.create,f);responseValidator(p)?(e(""),n(""),conditions(ConditionName.canShowSubmittedComment)?s==="reply"?a(setRealTimeReply(u)):d?(a(setComments([u,...d])),conditions(ConditionName.isTouchScreen)&&d.length>0&&document.getElementById("touchscreenListComments").scrollIntoView({behavior:"smooth"})):a(setComments([u])):ae({title:`${s==="reply"?"پاسخ":"نظر"} شما با موفقیت ثبت شد و پس از تایید نمایش داده می شود.`,type:"success"}),s==="reply"&&(a(setReplyToAuthor({})),r&&r(!1))):ae({title:"خطا در ثبت دیدگاه",type:"error"})}else conditions(ConditionName.canAddComment)||ae({title:"در حال حاضر امکان ثبت دیدگاه وجود ندارد",type:"error"})},handleGetUsersComments=async(i,e)=>{const t=[];i.map(s=>s.author!=="AnonymousUser"&&t.push(s.author));const n=await axios({url:API().user.profile,method:"post",headers:{"Content-Type":"application/json"},data:t});return responseValidator(n.status)?[...e,...n.data]:[]},handleCommentsIdsInLocalStorage=()=>{const i=localStorage.getItem("commentsLikeUnlike");if(i){const{params:e}=store.getState().videoData,t=JSON.parse(i).find(n=>n.videoId===e.id&&n.videoType===e.type);if(t)return t.comments}},handleLikeUnlikeComment=async(i,e,t,n,s)=>{const{params:r}=store.getState().videoData,{status:a}=await apiCaller({url:e?API().comment.like(i):API().comment.unlike(i),data:{uuid:getUUID()}});if(responseValidator(a)){s(e?n+1:n-1),t(e);const o=localStorage.getItem("commentsLikeUnlike");if(o){const l=JSON.parse(o).filter(f=>f.videoId!==r.id||f.videoId===r.id&&f.videoType!==r.type),d=JSON.parse(o).find(f=>f.videoId===r.id&&f.videoType===r.type);if(l)if(d){const f=d.comments.filter(u=>u!==i);e?localStorage.setItem("commentsLikeUnlike",JSON.stringify([...l,{videoId:r.id,videoType:r.type,comments:[...f,i]}])):localStorage.setItem("commentsLikeUnlike",JSON.stringify([...l,{videoId:r.id,videoType:r.type,comments:f}]))}else localStorage.setItem("commentsLikeUnlike",JSON.stringify([...l,{videoId:r.id,videoType:r.type,comments:[i]}]))}else localStorage.setItem("commentsLikeUnlike",JSON.stringify([{videoId:r.id,videoType:r.type,comments:[i]}]))}},handleCloseCommentPopover=()=>{const i=store.dispatch;i(setCommentPopover(!1)),i(setComments(void 0))},isShowCommentSettings=i=>{const{params:e}=store.getState().videoData;return e.xToken?jwtDecode(e.xToken).sub===i:!1},getPointerTime=(i,e="")=>{const{videoElementSizeInfo:t}=store.getState().videoData,{duration:n,hlsLiveSyncPosition:s}=store.getState().controller,r=conditions(ConditionName.isLiveParam)?s:n,a=i.clientX!==void 0?i.clientX:i.touches[0].clientX;if(a<=t.right-footerPadding()&&a>footerPadding()){let l=(a-footerPadding()-t.left)/(t.width-2*footerPadding())*r;return e==="tooltipTime-live"&&(l=r-l),l}},getPointerPosition=i=>{const{videoElementSizeInfo:e}=store.getState().videoData,t=i.clientX!==void 0?i.clientX:i.touches[0].clientX;if(t<=e.right-footerPadding()&&t>footerPadding())return t-footerPadding()-e.left},getMarkerPosition=i=>{const{duration:e,hlsLiveSyncPosition:t}=store.getState().controller,n=conditions(ConditionName.isLiveParam)?t:e;return i*progressBarWidth()/n},hideProgressTooltip=i=>{i&&(i.style.opacity="0.0",i.style.pointerEvents="none",i.style.zIndex=zIndex.vttDisable)},generalStyleTooltipHandler=i=>{i.style.display="block",i.style.zIndex=zIndex.vtt,i.style.opacity=store.getState().videoData.details.vtt?"1.0":"0.6",i.style.pointerEvents="auto",i.style.transition="opacity 1s ease-out"},vttTooltipStyleHandler=(i,e)=>{const{videoElementSizeInfo:t}=store.getState().videoData,n=document.getElementsByClassName("pl-progressTooltip")[0],s=document.getElementById("parent-player");n&&s&&(getPointerPosition(i)>n.getBoundingClientRect().width/2&&getPointerPosition(i)<t.right-t.left-n.getBoundingClientRect().width/2?e.style.left=`${getPointerPosition(i)-n.offsetWidth/2}px`:getPointerPosition(i)<(s.offsetLeft===0?n.offsetWidth:s.offsetLeft)?e.style.left="0px":videoTag().offsetLeft+videoTag().offsetWidth<getPointerPosition(i)+n.offsetWidth&&(e.style.left=`${videoTag().offsetWidth-n.offsetWidth}px`))},showProgressTooltip=(i,e,t)=>{e&&generalStyleTooltipHandler(e),store.getState().videoData.details.vtt?vttTooltipStyleHandler(i,e):e.style.left=`${getPointerPosition(i)-30}px`,store.dispatch(setTooltipTime(Number(getPointerTime(i)))),t.textContent=conditions(ConditionName.isLiveParam)?`-${secondsToHMS(getPointerTime(i,"tooltipTime-live"))}`:`${secondsToHMS(getPointerTime(i))}`},handleTimeTooltip=(i,e=!1)=>{const{videoElementSizeInfo:t}=store.getState().videoData,n=document.querySelector(".pl-progressTooltip"),s=document.querySelector(".pl-progressTimeTooltip"),r=i.clientX!==void 0?i.clientX:i.touches[0].clientX;n&&s&&r<=t.right-footerPadding()&&r>t.left+footerPadding()?(showProgressTooltip(i,n,s),e&&setTimeout(()=>hideProgressTooltip(n),2e3)):hideProgressTooltip(n)},handleProgressTime=i=>{const e=i.clientX!==void 0?i.clientX:i.touches[0].clientX;progressBar()&&(e<=i.view.innerWidth-footerPadding()&&e>footerPadding()?progressBar().style.width=`${getPointerPosition(i)}px`:e<=i.view.innerWidth-footerPadding()?progressBar().style.width=0:e>footerPadding()&&(progressBar().style.width="100%"))},handlePointerDown=(i,e,t)=>{i.preventDefault(),i.stopPropagation(),t(!0);const n=store.dispatch,s=i.clientX!==void 0?i.clientX:i.touches[0].clientX;s<=i.view.innerWidth-footerPadding()&&s>footerPadding()&&(n(setActivePointerProgressBar(!0)),n(setDelayTurnOffControlbar(!0)),sessionStorage.setItem("previousVideoTime",String(videoTag().currentTime)),i.target.setPointerCapture(i.pointerId),e.length>0&&e.map(r=>clearTimeout(r)))},handlePointerMove=i=>{i.preventDefault(),i.stopPropagation();const e=store.dispatch,{activePointerProgressBar:t}=store.getState().controller,{left:n}=store.getState().videoData.videoElementSizeInfo,s=i.clientX!==void 0?i.clientX:i.touches[0].clientX,r=document.querySelector(".pl-progressTooltip");s>n+footerPadding()?(r&&(r.style.display="block !important",r.style.pointerEvents="auto"),t&&(e(setDelayTurnOffControlbar(!0)),handleTimeTooltip(i),handleProgressTime(i),videoTag().pause())):r&&(r.style.display="none !important",r.style.pointerEvents="none")},handlePointerUp=(i,e,t,n)=>{n(!1),i.preventDefault(),i.stopPropagation();const s=store.dispatch,{duration:r,hlsLiveSyncPosition:a}=store.getState().controller,{left:o,right:l}=store.getState().videoData.videoElementSizeInfo,d=conditions(ConditionName.isLiveParam)?a:r;i.target.removeEventListener("pointermove",handlePointerMove);const f=i.clientX!==void 0?i.clientX:i.touches[0].clientX;let u=0;f>o+footerPadding()&&f<l+footerPadding()?u=getPointerTime(i):f<o+footerPadding()?u=0:f>footerPadding()&&(u=d),conditions(ConditionName.isStaticFormat)||handleVideoTimeline(videoTag().currentTime,u),videoTag().currentTime=u,store.getState().controller.activePointerProgressBar&&(s(setActivePointerProgressBar(!1)),s(setDelayTurnOffControlbar(!1)),videoTag().play(),handleTimeTooltip(i,!0),sessionStorage.setItem("current-time",String(u)),handleProgressTime(i),handleTimeout(i,s,e,t))},handleTimeout=(i,e,t,n)=>{const s=n;let r=setTimeout(()=>{const{settingPopover:a,markersListPopover:o}=store.getState().popovers,{delayTurnOffControlbar:l}=store.getState().controller;i.pointerType==="touch"&&!a&&!o&&l&&e(setActiveElements(!1))},activeElementsTime);s.push(r),t(s)},handleCatchUpLoadingLog=()=>{const i=Date.now();videoTag().play().then(()=>sendFluentLog(catchUpLoadingLog(Date.now()-i)))},handleMouseMove=i=>handleTimeTooltip(i),handleMouseOut=()=>{const i=document.querySelector(".pl-progressTooltip");hideProgressTooltip(i)},deconstructTimestamp=i=>{const e=i.split("."),n=e[0].split(":");return{milliseconds:parseInt(e[1],10)||0,seconds:parseInt(n.pop(),10)||0,minutes:parseInt(n.pop(),10)||0,hours:parseInt(n.pop(),10)||0}},getSecondsFromTimestamp=i=>{const e=deconstructTimestamp(i);return parseInt(e.hours*(60*60)+e.minutes*60+e.seconds+e.milliseconds/1e3,10)},getPropsFromDef=i=>{const e=i.split(/#xywh=/i),t=e[0],s=e[1].match(/[0-9]+/gi);return{x:s[0],y:s[1],w:s[2],h:s[3],image:t}},getFullyQualifiedUrl=(i,e)=>i.indexOf("//")>=0?i:e.indexOf("//")===0?[e.replace(/\/$/gi,""),i.trim()].join("/"):e.indexOf("//")>0?[e.trim(),i.trim()].join("/"):i,getVttCss=(i,e)=>{const t={};let n=e.split(/\/\w+\.vtt\s?/)[0];if(i=getFullyQualifiedUrl(i,n),!i.match(/#xywh=/i))return t.background='url("'+i+e.split(/\/\w+\.vtt\s?/)[1]+'")',t;const s=getPropsFromDef(i);return t.background='url("'+s.image+e.split(/\/\w+\.vtt\s?/)[1]+'") no-repeat -'+s.x+"px -"+s.y+"px",t.width=s.w+"px",t.height=s.h+"px",t.url=s.image,t},fetchFile=(i,e)=>{fetch(i).then(t=>{if(!t.ok)throw store.dispatch(setInfo({...store.getState().videoData.details,vtt:void 0,vtt_mobile:void 0})),new Error("Network response was not ok");return t.text()}).then(t=>{const n=[];t.split(/[\r\n][\r\n]/i).forEach(r=>{if(r.match(/([0-9]{2}:)?([0-9]{2}:)?[0-9]{2}(.[0-9]{3})?( ?--> ?)([0-9]{2}:)?([0-9]{2}:)?[0-9]{2}(.[0-9]{3}).*/gi)){const a=r.split(/[\r\n]/i),l=a[0].split(/ ?--> ?/i),d=l[0],f=l[1],u=a[1],p=getVttCss(u,i);n.push({start:getSecondsFromTimestamp(d),end:getSecondsFromTimestamp(f),css:p})}}),e(n)}).catch(t=>{console.error("Error fetching file:",t)})},getStyleForTime=(i,e,t)=>{for(let n=0;n<e.length;++n){const s=e[n];if(i>=s.start&&i<s.end){if(s.css.url&&!t[s.css.url]){const r={background:s.css.background,width:s.css.width,height:s.css.height};return t[s.css.url]=r,r}else if(s.css.url)return t[s.css.url]}}},getFitMaxNumberCard=()=>Math.ceil(window.innerWidth*window.innerHeight/(265*149)),handleGetTags=(i,e,t,n)=>{const{details:s,params:r}=store.getState().videoData,{selectedTags:a,inputTagSearch:o}=store.getState().tags;i&&t.length&&get((l,d)=>{responseValidator(d)&&(l.results.length>0&&n(t.concat(l.results)),e(!1))},API().searchViewers,{tag:a.join(","),q:conditions(ConditionName.hasInputTagSearch)?o:void 0,user_ids:conditions(ConditionName.isUserIdsParamsEqualAll)?void 0:conditions(ConditionName.hasUserIds)?r.user_ids:s.user_id,limit:conditions(ConditionName.isComplexPortrait)?10:getFitMaxNumberCard(),offset:t.length})},handleClickTag=(i,e,t,n)=>{const s=store.dispatch,{details:r,params:a}=store.getState().videoData,{selectedTags:o,inputTagSearch:l}=store.getState().tags,d=handleContentType();sendFluentLog(searchLog(d)),n&&n(!0),get((f,u)=>{responseValidator(u)&&(i(f.count),f.results.length>0?(s(setTagsPopover(!0)),t(f.results)):t([])),n&&n(!1)},API().searchViewers,{tag:o.join(","),q:conditions(ConditionName.hasInputTagSearch)?l:void 0,user_ids:conditions(ConditionName.isUserIdsParamsEqualAll)?void 0:conditions(ConditionName.hasUserIds)?a.user_ids:r.user_id,limit:e.length+(conditions(ConditionName.isComplexPortrait)?10:getFitMaxNumberCard()),offset:0,video_type:d})},handleClickPlayerCardTag=(i,e)=>{const t=store.dispatch,{selectedTags:n}=store.getState().tags;i.preventDefault(),i.stopPropagation(),n.includes(e)||(t(setPlayListCardPopover(!1)),t(setTagsPopover(!0)),t(setSelectedTags([...n,e])),sendFluentLog(tagClickLog(e.trim())))},getAllViewersTagList=async()=>{const{details:i,params:e}=store.getState().videoData,{selectedTags:t}=store.getState().tags;return new Promise(async n=>{try{const s=await getAll(API().viewersTagList(e.type),[],{user_ids:conditions(ConditionName.isUserIdsParamsEqualAll)?void 0:conditions(ConditionName.hasUserIds)?e.user_ids:i.user_id,tag:t.join(",")});n(s)}catch{}})},handleViewersTagList=async()=>{const i=store.dispatch,{selectedTags:e}=store.getState().tags,t=await getAllViewersTagList();if(t){let n=[];t.map(s=>n.push(s.tag.trim())),n=[...new Set(n)],i(setViewersTagsList(n.filter(s=>s!==e[0])))}},handleCloseTagPopover=()=>{const i=store.dispatch;i(setTagsPopover(!1)),i(setSelectedTags([])),i(setInputTagSearch("")),i(setIsMovieFilter(!1)),i(setIsSeriesFilter(!1)),i(setInputFilterTagSearch(""))},handleTagInput=(i,e,t,n,s,r,a)=>{const o=store.dispatch;o(setInputTagSearch(i)),e(!0),clearTimeout(t.current),t.current=setTimeout(()=>{handleClickTag(n,s,r,a),e(!1)},500)},handleCloseSelectedTags=i=>{const e=store.dispatch,{selectedTags:t,viewersTagsList:n}=store.getState().tags;e(setSelectedTags(t.filter(s=>s!==i))),e(setViewersTagsList([i,...n]))},handleClickViewersTagList=i=>{const e=store.dispatch,{selectedTags:t,viewersTagsList:n}=store.getState().tags;e(setSelectedTags([...t,i])),e(setViewersTagsList(n.filter(s=>s!==i)))},handleClearTagInput=(i,e,t)=>{const n=store.dispatch;n(setInputTagSearch("")),handleClickTag(i,e,t)},handleNextTag=(i,e)=>{i.preventDefault(),i.stopPropagation(),e.current.scrollLeft-=e.current.clientWidth},handlePrevTag=(i,e)=>{i.preventDefault(),i.stopPropagation(),e.current.scrollLeft+=e.current.clientWidth},handleScrollLeft=(i,e)=>{i.preventDefault(),i.stopPropagation();const t=document.getElementById(e);t&&(t.scrollLeft-=50)},handleScrollRight=(i,e)=>{i.preventDefault(),i.stopPropagation();const t=document.getElementById(e);t&&(t.scrollLeft+=50)},handleSearchResultClick=(i,e,t,n,s,r)=>{const a=store.dispatch;handleRipple(i,`tagVideoList-${n}`,150),s===ContentTypesString.PlayList?(a(setPlayListCardPopover(!0)),t.current=e):sendFluentLog(searchResultClickLog(n,s,r))},createSettings=async i=>{i={...i,quality:conditions(ConditionName.isAutoQuality)?null:i.quality},conditions(ConditionName.isLogin)&&conditions(ConditionName.trackerEnabled)&&await apiCaller({url:API().user.createSettings,method:"POST",data:i,headers:handleHasXTokenParamOrSendXToken()})},createVideoSettings=async i=>{const{params:e,details:t}=store.getState().videoData;conditions(ConditionName.isLogin)&&conditions(ConditionName.trackerEnabled)&&await apiCaller({url:API().user.createVideoMetaData,method:"POST",data:{video_id:i.video_id??conditions(ConditionName.isLiveParam)?t.id:+e.id,video_type:i.video_type??handleVideoType(),...i},headers:handleHasXTokenParamOrSendXToken()})},handleBookmark=async(i,e,t)=>{if(i&&i.stopPropagation(),conditions(ConditionName.hasXToken)){const n=store.dispatch,{bookmarks:s,bookmarkId:r}=store.getState().user;if(conditions(ConditionName.isBookmark)||t==="delete"){if(conditions(ConditionName.trackerEnabled)){const{status:a,data:o}=await apiCaller({url:API().user.deleteBookmark(e),method:"DELETE",headers:handleHasXTokenParamOrSendXToken()});responseValidator(a)?(n(setBookmarks(s.filter(l=>e?l.id!==e:l.id!==r))),n(setBookmarkId(void 0)),sendFluentLog(bookmarkLog("unBookmark"))):ae({type:"error",title:o.detail})}}else{const{details:a,params:o}=store.getState().videoData,l={object_link:window.location.href,cover_url:a.banner,title:a.title,category:handleGetBookmarkCategory(o.provider)};if(conditions(ConditionName.trackerEnabled)){const{data:d,status:f}=await apiCaller({url:API().user.bookmarks,method:"POST",data:l,headers:handleHasXTokenParamOrSendXToken()});responseValidator(f)?(n(setBookmarks([d,...s])),n(setBookmarkId(d.id)),sendFluentLog(bookmarkLog("bookmark"))):ae({type:"error",title:d.detail})}}}else ae({title:"لطفا ابتدا وارد شوید.",type:"error"})},authToken={key:"HAMRAHI_CLOUD_AUTH_TOKEN",get:()=>{const i=api.get(authToken.key);return i?JSON.parse(i):null},set:i=>api.set(authToken.key,JSON.stringify(i),{expires:1095,sameSite:"none",secure:!0}),remove:()=>api.remove(authToken.key)},handleAutoFullScreen=()=>{const i=store.dispatch,{params:e}=store.getState().videoData,t=n=>{n.requestFullScreen?n.requestFullScreen():n.mozRequestFullScreen?n.mozRequestFullScreen():n.webkitRequestFullScreen&&n.webkitRequestFullScreen()};i(setClearPopoversSlice()),t(document.documentElement),i(setIsFullScreen(e.fullscreen==="true")),conditions(ConditionName.isComplexDesktop)&&i(setIsComplexDesktop(!1)),conditions(ConditionName.isTouchScreen)&&conditions(ConditionName.isParamsPortrait)&&i(setIsComplexPortrait(e.fullscreen!=="true"))},appendQueryParamsToChunksIOS=()=>{let i=".ts",e=XMLHttpRequest.prototype.open;XMLHttpRequest.prototype.open=function(){const{daaniToken:t}=store.getState().videoData.params;let n=`?uuid=${getUUID()}`;conditions(ConditionName.hasDaaniTokenParams)&&(n=`${n}&ext_user=${t}`),arguments[1].endsWith(i)&&(arguments[1]=arguments[1]+n),e.apply(this,arguments)}},handleBufferedTime=(i,e)=>{const t=store.dispatch;e.current=setInterval(()=>{const s=i.target.buffered.end(0)/videoTag().duration*100;t(setBufferedTimeWidth(s))},500)},handleHlsConfig=()=>{const{params:i,streamLinkParams:e}=store.getState().videoData;return{xhrSetup:(t,n)=>{n.split("m3u8")[1]||(n=`${n}${e}`),t.open("GET",n,!0)},startLevel:i.type==="live"?1:-1,debug:!1,enableWorker:!0,liveDurationInfinity:conditions(ConditionName.hasQuizParams)||!conditions(ConditionName.hasTimeMachine),maxLiveSyncPlaybackRate:conditions(ConditionName.hasQuizParams)||!conditions(ConditionName.hasTimeMachine)?2:1,abrBandWidthUpFactor:conditions(ConditionName.hasQuizParams)||!conditions(ConditionName.hasTimeMachine)?.6:.7,abrBandWidthFactor:conditions(ConditionName.hasQuizParams)||!conditions(ConditionName.hasTimeMachine)?.8:.95,backBufferLength:conditions(ConditionName.hasQuizParams)||!conditions(ConditionName.hasTimeMachine)?2:1/0,maxBufferLength:conditions(ConditionName.hasQuizParams)||!conditions(ConditionName.hasTimeMachine)?12:30,maxMaxBufferLength:conditions(ConditionName.hasQuizParams)||!conditions(ConditionName.hasTimeMachine)?600:60,liveSyncDuration:conditions(ConditionName.hasQuizParams)||!conditions(ConditionName.hasTimeMachine)?3:LiveDelay,liveMaxLatencyDuration:conditions(ConditionName.hasQuizParams)||!conditions(ConditionName.hasTimeMachine)?8:void 0,manifestLoadPolicy:{default:{maxTimeToFirstByteMs:1/0,maxLoadTimeMs:2e4,timeoutRetry:{maxNumRetry:10,retryDelayMs:5e3,maxRetryDelayMs:1e4},errorRetry:{maxNumRetry:10,retryDelayMs:5e3,maxRetryDelayMs:1e4}}},fragLoadPolicy:{default:{maxTimeToFirstByteMs:1e4,maxLoadTimeMs:12e4,timeoutRetry:{maxNumRetry:10,retryDelayMs:5e3,maxRetryDelayMs:1e4},errorRetry:{maxNumRetry:10,retryDelayMs:5e3,maxRetryDelayMs:1e4}}},playlistLoadPolicy:{default:{maxTimeToFirstByteMs:1e4,maxLoadTimeMs:2e4,timeoutRetry:{maxNumRetry:10,retryDelayMs:5e3,maxRetryDelayMs:1e4},errorRetry:{maxNumRetry:10,retryDelayMs:5e3,maxRetryDelayMs:1e4}}}}},handleMultiLiveHlsConfig=()=>{const{streamLinkParams:i}=store.getState().videoData;return{xhrSetup:(e,t)=>{t=`${t}${i}`,e.open("GET",t,!0)},startLevel:1,debug:!1,liveSyncDuration:LiveDelay,maxMaxBufferLength:60,playlistLoadPolicy:{default:{maxTimeToFirstByteMs:1e4,maxLoadTimeMs:2e4,timeoutRetry:{maxNumRetry:1e3,retryDelayMs:0,maxRetryDelayMs:0},errorRetry:{maxNumRetry:1e3,retryDelayMs:1e3,maxRetryDelayMs:1e3}}}}},handleManifestParsed=(i,e)=>{const t=store.dispatch;let n=[],s=[""],r=[];if(i.levels.map(a=>{n.push(a.attrs.RESOLUTION.split("x")[1].trim()),s.push(`${(a.bitrate/1e3).toFixed(0)}kbps`),r.push(a.attrs.RESOLUTION)}),i.autoLevelCapping=highestResolutionSupported(r,window.innerWidth,window.innerHeight),t(setQualityLevels(n)),t(setQualityBitrates(s)),["fullscreenchange","webkitfullscreenchange","mozfullscreenchange","msfullscreenchange"].forEach(a=>document.addEventListener(a,()=>{conditions(ConditionName.isAutoQuality)&&(i.autoLevelCapping=highestResolutionSupported(r,window.innerWidth,window.innerHeight),i.nextLevel=-1)},!1)),e.audioTracks.length>0){const a=e.audioTracks.sort(o=>o.default===!0?-1:1);t(setMultiAudio(a))}},handleManifestLoaded=i=>i.audioTrack=0,handleMediaAttached=(i,e)=>{const{params:t,details:n}=store.getState().videoData;let s=conditions(ConditionName.isGeneral)?t.src:n.stream_link;e.loadSource(s),e.on(i.Events.MANIFEST_PARSED,(r,a)=>handleManifestParsed(e,a)),e.on(i.Events.MANIFEST_LOADED,()=>handleManifestLoaded(e))},handleLevels=(i,e,t)=>{if(e.frag.type!=="audio"){const n=store.dispatch,{settings:s}=store.getState().user,{qualityLevels:r,manualQuality:a,autoQuality:o}=store.getState().controller;conditions(ConditionName.isAutoQuality)?conditions(ConditionName.isAutoQuality)&&o===void 0?(i.nextLevel=-1,t(r[e.frag.level]),n(setAutoQuality(e.frag.level))):conditions(ConditionName.isAutoQuality)&&(t(r[e.frag.level]),o!==e.frag.level&&n(setAutoQuality(e.frag.level))):(e.frag.level!==a&&(i.nextLevel=r[s.quality]?s.quality:-1),r[s.quality]?(n(setManualQuality(s.quality)),n(setAutoQuality(void 0))):(t(r[e.frag.level]),n(setAutoQuality(e.frag.level)),n(setUserSettings({...s,quality:-1})),createSettings({...s,quality:null})))}},handleFragBuffered=i=>{var s;const e=store.dispatch;store.getState().controller.loadedFragmentsCount.length<Number(getInitialLoadedFragmentCount())&&e(setLoadedFragmentsCount([...new Set([...store.getState().controller.loadedFragmentsCount,i.abrController.fragCurrent.sn])]));const n=((s=i.mainForwardBufferInfo)==null?void 0:s.end)/videoTag().duration*100;e(setBufferedTimeWidth(n))},handleFragLoading=i=>{const e=store.dispatch;conditions(ConditionName.isLiveParam)&&e(setHlsLivePosition(i.liveSyncPosition))},handleFragChanged=(i,e,t,n)=>{const{params:s,multiAudio:r,selectedAudioId:a}=store.getState().videoData;r&&a!==void 0&&a!==e.audioTrack&&(e.audioTrack=a,e.trigger(i.Events.AUDIO_TRACK_LOADING,r[a])),(s.type||!conditions(ConditionName.isLiveParam))&&handleLevels(e,t,n)},handleFragParsed=(i,e,t)=>{const{type:n}=store.getState().videoData.params;(n||n==="live")&&handleLevels(i,e,t)},handleHlsErrors=(i,e)=>{if(e.event!=="hlsAudioTrackLoading")return{type:"HLS_"+e.type,message:e.error.message}},handlePreview=i=>{const e=store.dispatch,{params:t,details:n}=store.getState().videoData,s=conditions(ConditionName.hasPreviewStart)?n.preview_start:0,r=conditions(ConditionName.hasPreviewEnd)?n.preview_end:videoTag()?videoTag().duration:0;t.preview==="true"&&i.target.currentTime>=r&&(videoTag().currentTime=s,e(setCurrentTime(s)))},handleVideoWaiting=(i,e)=>{const t=store.dispatch;i.preventDefault(),e.current=Date.now(),t(setIsLoading(!0))},handleVideoSeeking=(i,e)=>{const t=store.dispatch;i.preventDefault(),e.current=0,t(setIsLoading(!0))},handleVideoTime=()=>{const{params:i}=store.getState().videoData,{videoSettings:e}=store.getState().user,t=store.dispatch;videoTag().currentTime=i.t?+i.t:e.time,t(setCurrentTime(i.t?+i.t:e.time))},handleVideoPlay=(i,e)=>{const t=store.dispatch,{details:n}=store.getState().videoData;if(i.preventDefault(),e.current=Date.now(),t(setPlay(!0)),conditions(ConditionName.isFirstPlay)){if(conditions(ConditionName.has360)&&(handle360(),setTimeout(()=>handleVideoTime(),200)),!conditions(ConditionName.has360)&&!conditions(ConditionName.isLiveParam)&&handleVideoTime(),conditions(ConditionName.hasFullScreenParams)&&handleAutoFullScreen(),conditions(ConditionName.isFullScreen)&&handleLockOrientation(),conditions(ConditionName.hasPreviewParams)){const s=n.preview_start?n.preview_start:0;videoTag().currentTime=s,t(setCurrentTime(s))}t(setVideoTimelines([Math.floor(videoTag().currentTime)]))}sendFluentLog(pausePlayLog(!0)),t(setSubtitleText(""))},handleVideoPlaying=(i,e,t,n,s,r,a,o)=>{const l=store.dispatch,{autoQuality:d,canPlayVideo:f,firstPlay:u,qualityLevels:p}=store.getState().controller,{settings:m}=store.getState().user,g=m.quality===-1&&d?p[d]:p[m.quality];let y=0;a.current&&(y=Date.now()-a.current),u&&videoTag().played&&sendFluentLog(initLog(e.current,Date.now()-t.current,n.current-t.current,Date.now()-s.current,s)),l(setFirstPlay(!1)),f&&y>0&&g!==void 0&&(r.current=y,a.current=0,sendFluentLog(loadingLog(y,g,s,i,o.current)),i.current=i.current+1,s.current=Date.now())},handleVideoPause=i=>{const e=store.dispatch;i.preventDefault(),sendFluentLog(pausePlayLog(!1)),e(setPlay(!1))},handleVideoTimeUpdate=i=>{const e=store.dispatch,{selectedSubtitle:t}=store.getState().videoData;i.preventDefault(),handlePreview(i),e(setCurrentTime(i.target.currentTime)),conditions(ConditionName.hasActiveCue)&&e(setSubtitleText(t.activeCues[0].text))},handleVideoCanPlay=i=>{const e=store.dispatch,{settings:t}=store.getState().user;if(i.preventDefault(),e(setIsLoading(!1)),e(setCanPlayVideo(!0)),videoTag().volume=t.volume/100,conditions(ConditionName.isIOSLive)||e(setDuration(i.target.duration)),conditions(ConditionName.isIOS)){const n=Object.values(i.target.textTracks);n&&n.length&&e(setSubtitles(Object.values(n[0]).length?n:[]))}else e(setSubtitles(Object.values(i.target.textTracks)))},handleVideoEnded=i=>{const e=store.dispatch,{params:t}=store.getState().videoData;i.preventDefault(),e(setIsLiveError(!0)),e(setIsEnded(!0)),e(setActiveElements(!0)),handleVideoTimeline(videoTag().duration),conditions(ConditionName.hasOnFinishedParams)&&t.onFinished()},handleVideoError=i=>{i.preventDefault();let e=videoTag().error;if(e)switch(e.code){case e.MEDIA_ERR_ABORTED:errorLogProvider({type:"videoTagError",message:"You aborted the video playback."});break;case e.MEDIA_ERR_NETWORK:errorLogProvider({type:"videoTagError",message:"A network error caused the video download to fail part-way."});break;case e.MEDIA_ERR_DECODE:errorLogProvider({type:"videoTagError",message:"The video playback was aborted due to a corruption problem or because the video used features your browser did not support."});break;case e.MEDIA_ERR_SRC_NOT_SUPPORTED:errorLogProvider({type:"videoTagError",message:"The video could not be loaded, either because the server or network failed or because the format is not supported."});break;default:errorLogProvider({type:"videoTagError",message:"An unknown error occurred."});break}else errorLogProvider({type:"videoTagError",message:"An error occurred, but the error object is not available."})},handleIosVideoPlay=(i,e)=>{const t=store.dispatch;i.preventDefault(),e.current=Date.now(),t(setFirstPlay(!1)),conditions(ConditionName.isFirstPlay)&&conditions(ConditionName.has360)&&handle360()},handleIosVideoPlaying=()=>{const i=store.dispatch;i(setIsLoading(!1))},handleIosVideoTimeUpdate=i=>{const e=store.dispatch;i.preventDefault(),e(setCurrentTime(i.target.currentTime)),handlePreview(i)},handleIosVideoEnded=()=>{const{params:i}=store.getState().videoData;conditions(ConditionName.hasOnFinishedParams)&&i.onFinished()},handleStaticVideoPause=i=>{const e=store.dispatch;i.preventDefault(),e(setPlay(!1))},handleStaticVideoPlay=(i,e)=>{const t=store.dispatch;i.preventDefault(),t(setPlay(!0)),e.current=Date.now(),conditions(ConditionName.isFirstPlay)&&conditions(ConditionName.hasFullScreenParams)&&handleAutoFullScreen(),conditions(ConditionName.isFullScreen)&&handleLockOrientation()},handleStaticVideoPlaying=(i,e,t)=>{const n=store.dispatch,{firstPlay:s}=store.getState().controller;n(setIsLoading(!1)),s&&videoTag().played&&sendFluentLog(initLog(Math.round(i.current),Date.now()-e.current,0,Date.now()-t.current,t)),n(setFirstPlay(!1))},handleStaticVideoTimeUpdate=i=>{const e=store.dispatch;i.preventDefault(),e(setCurrentTime(i.target.currentTime)),e(setDuration(i.target.duration))},handleStaticVideoCanPlay=i=>{const e=store.dispatch;i.preventDefault(),e(setIsLoading(!1)),e(setCanPlayVideo(!0))},handleStaticVideoLoadedData=(i,e)=>{i.preventDefault(),handleBufferedTime(i,e)},handleStaticVideoEnded=i=>{const{params:e}=store.getState().videoData;conditions(ConditionName.hasOnFinishedParams)&&e.onFinished(),i.preventDefault()},handleMultiLiveManifestParsed=i=>i.nextLevel=i.levels.findIndex(e=>e.attrs.RESOLUTION.split("x")[1].trim()==="144"),handleMultiLiveMediaAttached=async(i,e)=>{const{multiLives:t}=store.getState().videoData,{stream_link:n}=await getLiveAndVodDetails(t[0].user_id);e.loadSource(n),e.on(i.Events.MANIFEST_PARSED,()=>handleMultiLiveManifestParsed(e))},handleMultiLiveFragLoading=async i=>{const e=store.dispatch;conditions(ConditionName.isLiveParam)&&e(setHlsLivePosition(i.liveSyncPosition))},handleVideoVisibilityChange=i=>{handleVideoTimeline(videoTag().currentTime),handleContinuousPlayback(),conditions(ConditionName.isVisibilityChange)&&(document.hidden?i.stopLoad():i.startLoad())};var resolveConfig$2={},resolveConfig$1={},negateValue={},hasRequiredNegateValue;function requireNegateValue(){return hasRequiredNegateValue||(hasRequiredNegateValue=1,function(i){Object.defineProperty(i,"__esModule",{value:!0}),Object.defineProperty(i,"default",{enumerable:!0,get:function(){return e}});function e(t){if(t=`${t}`,t==="0")return"0";if(/^[+-]?(\d+|\d*\.\d+)(e[+-]?\d+)?(%|\w+)?$/.test(t))return t.replace(/^[+-]?/,s=>s==="-"?"":"-");let n=["var","calc","min","max","clamp"];for(const s of n)if(t.includes(`${s}(`))return`calc(${t} * -1)`}}(negateValue)),negateValue}var corePluginList={},hasRequiredCorePluginList;function requireCorePluginList(){return hasRequiredCorePluginList||(hasRequiredCorePluginList=1,function(i){Object.defineProperty(i,"__esModule",{value:!0}),Object.defineProperty(i,"default",{enumerable:!0,get:function(){return e}});const e=["preflight","container","accessibility","pointerEvents","visibility","position","inset","isolation","zIndex","order","gridColumn","gridColumnStart","gridColumnEnd","gridRow","gridRowStart","gridRowEnd","float","clear","margin","boxSizing","lineClamp","display","aspectRatio","size","height","maxHeight","minHeight","width","minWidth","maxWidth","flex","flexShrink","flexGrow","flexBasis","tableLayout","captionSide","borderCollapse","borderSpacing","transformOrigin","translate","rotate","skew","scale","transform","animation","cursor","touchAction","userSelect","resize","scrollSnapType","scrollSnapAlign","scrollSnapStop","scrollMargin","scrollPadding","listStylePosition","listStyleType","listStyleImage","appearance","columns","breakBefore","breakInside","breakAfter","gridAutoColumns","gridAutoFlow","gridAutoRows","gridTemplateColumns","gridTemplateRows","flexDirection","flexWrap","placeContent","placeItems","alignContent","alignItems","justifyContent","justifyItems","gap","space","divideWidth","divideStyle","divideColor","divideOpacity","placeSelf","alignSelf","justifySelf","overflow","overscrollBehavior","scrollBehavior","textOverflow","hyphens","whitespace","textWrap","wordBreak","borderRadius","borderWidth","borderStyle","borderColor","borderOpacity","backgroundColor","backgroundOpacity","backgroundImage","gradientColorStops","boxDecorationBreak","backgroundSize","backgroundAttachment","backgroundClip","backgroundPosition","backgroundRepeat","backgroundOrigin","fill","stroke","strokeWidth","objectFit","objectPosition","padding","textAlign","textIndent","verticalAlign","fontFamily","fontSize","fontWeight","textTransform","fontStyle","fontVariantNumeric","lineHeight","letterSpacing","textColor","textOpacity","textDecoration","textDecorationColor","textDecorationStyle","textDecorationThickness","textUnderlineOffset","fontSmoothing","placeholderColor","placeholderOpacity","caretColor","accentColor","opacity","backgroundBlendMode","mixBlendMode","boxShadow","boxShadowColor","outlineStyle","outlineWidth","outlineOffset","outlineColor","ringWidth","ringColor","ringOpacity","ringOffsetWidth","ringOffsetColor","blur","brightness","contrast","dropShadow","grayscale","hueRotate","invert","saturate","sepia","filter","backdropBlur","backdropBrightness","backdropContrast","backdropGrayscale","backdropHueRotate","backdropInvert","backdropOpacity","backdropSaturate","backdropSepia","backdropFilter","transitionProperty","transitionDelay","transitionDuration","transitionTimingFunction","willChange","contain","content","forcedColorAdjust"]}(corePluginList)),corePluginList}var configurePlugins={},hasRequiredConfigurePlugins;function requireConfigurePlugins(){return hasRequiredConfigurePlugins||(hasRequiredConfigurePlugins=1,function(i){Object.defineProperty(i,"__esModule",{value:!0}),Object.defineProperty(i,"default",{enumerable:!0,get:function(){return e}});function e(t,n){return t===void 0?n:Array.isArray(t)?t:[...new Set(n.filter(r=>t!==!1&&t[r]!==!1).concat(Object.keys(t).filter(r=>t[r]!==!1)))]}}(configurePlugins)),configurePlugins}var colors$3={},log={},picocolors_browser={exports:{}},hasRequiredPicocolors_browser;function requirePicocolors_browser(){if(hasRequiredPicocolors_browser)return picocolors_browser.exports;hasRequiredPicocolors_browser=1;var i=String,e=function(){return{isColorSupported:!1,reset:i,bold:i,dim:i,italic:i,underline:i,inverse:i,hidden:i,strikethrough:i,black:i,red:i,green:i,yellow:i,blue:i,magenta:i,cyan:i,white:i,gray:i,bgBlack:i,bgRed:i,bgGreen:i,bgYellow:i,bgBlue:i,bgMagenta:i,bgCyan:i,bgWhite:i,blackBright:i,redBright:i,greenBright:i,yellowBright:i,blueBright:i,magentaBright:i,cyanBright:i,whiteBright:i,bgBlackBright:i,bgRedBright:i,bgGreenBright:i,bgYellowBright:i,bgBlueBright:i,bgMagentaBright:i,bgCyanBright:i,bgWhiteBright:i}};return picocolors_browser.exports=e(),picocolors_browser.exports.createColors=e,picocolors_browser.exports}var hasRequiredLog;function requireLog(){return hasRequiredLog||(hasRequiredLog=1,function(i){Object.defineProperty(i,"__esModule",{value:!0});function e(l,d){for(var f in d)Object.defineProperty(l,f,{enumerable:!0,get:d[f]})}e(i,{dim:function(){return a},default:function(){return o}});const t=n(requirePicocolors_browser());function n(l){return l&&l.__esModule?l:{default:l}}let s=new Set;function r(l,d,f){typeof process<"u"&&process.env.JEST_WORKER_ID||f&&s.has(f)||(f&&s.add(f),console.warn(""),d.forEach(u=>console.warn(l,"-",u)))}function a(l){return t.default.dim(l)}const o={info(l,d){r(t.default.bold(t.default.cyan("info")),...Array.isArray(l)?[l]:[d,l])},warn(l,d){r(t.default.bold(t.default.yellow("warn")),...Array.isArray(l)?[l]:[d,l])},risk(l,d){r(t.default.bold(t.default.magenta("risk")),...Array.isArray(l)?[l]:[d,l])}}}(log)),log}var hasRequiredColors;function requireColors(){return hasRequiredColors||(hasRequiredColors=1,function(i){Object.defineProperty(i,"__esModule",{value:!0}),Object.defineProperty(i,"default",{enumerable:!0,get:function(){return s}});const e=t(requireLog());function t(r){return r&&r.__esModule?r:{default:r}}function n({version:r,from:a,to:o}){e.default.warn(`${a}-color-renamed`,[`As of Tailwind CSS ${r}, \`${a}\` has been renamed to \`${o}\`.`,"Update your configuration file to silence this warning."])}const s={inherit:"inherit",current:"currentColor",transparent:"transparent",black:"#000",white:"#fff",slate:{50:"#f8fafc",100:"#f1f5f9",200:"#e2e8f0",300:"#cbd5e1",400:"#94a3b8",500:"#64748b",600:"#475569",700:"#334155",800:"#1e293b",900:"#0f172a",950:"#020617"},gray:{50:"#f9fafb",100:"#f3f4f6",200:"#e5e7eb",300:"#d1d5db",400:"#9ca3af",500:"#6b7280",600:"#4b5563",700:"#374151",800:"#1f2937",900:"#111827",950:"#030712"},zinc:{50:"#fafafa",100:"#f4f4f5",200:"#e4e4e7",300:"#d4d4d8",400:"#a1a1aa",500:"#71717a",600:"#52525b",700:"#3f3f46",800:"#27272a",900:"#18181b",950:"#09090b"},neutral:{50:"#fafafa",100:"#f5f5f5",200:"#e5e5e5",300:"#d4d4d4",400:"#a3a3a3",500:"#737373",600:"#525252",700:"#404040",800:"#262626",900:"#171717",950:"#0a0a0a"},stone:{50:"#fafaf9",100:"#f5f5f4",200:"#e7e5e4",300:"#d6d3d1",400:"#a8a29e",500:"#78716c",600:"#57534e",700:"#44403c",800:"#292524",900:"#1c1917",950:"#0c0a09"},red:{50:"#fef2f2",100:"#fee2e2",200:"#fecaca",300:"#fca5a5",400:"#f87171",500:"#ef4444",600:"#dc2626",700:"#b91c1c",800:"#991b1b",900:"#7f1d1d",950:"#450a0a"},orange:{50:"#fff7ed",100:"#ffedd5",200:"#fed7aa",300:"#fdba74",400:"#fb923c",500:"#f97316",600:"#ea580c",700:"#c2410c",800:"#9a3412",900:"#7c2d12",950:"#431407"},amber:{50:"#fffbeb",100:"#fef3c7",200:"#fde68a",300:"#fcd34d",400:"#fbbf24",500:"#f59e0b",600:"#d97706",700:"#b45309",800:"#92400e",900:"#78350f",950:"#451a03"},yellow:{50:"#fefce8",100:"#fef9c3",200:"#fef08a",300:"#fde047",400:"#facc15",500:"#eab308",600:"#ca8a04",700:"#a16207",800:"#854d0e",900:"#713f12",950:"#422006"},lime:{50:"#f7fee7",100:"#ecfccb",200:"#d9f99d",300:"#bef264",400:"#a3e635",500:"#84cc16",600:"#65a30d",700:"#4d7c0f",800:"#3f6212",900:"#365314",950:"#1a2e05"},green:{50:"#f0fdf4",100:"#dcfce7",200:"#bbf7d0",300:"#86efac",400:"#4ade80",500:"#22c55e",600:"#16a34a",700:"#15803d",800:"#166534",900:"#14532d",950:"#052e16"},emerald:{50:"#ecfdf5",100:"#d1fae5",200:"#a7f3d0",300:"#6ee7b7",400:"#34d399",500:"#10b981",600:"#059669",700:"#047857",800:"#065f46",900:"#064e3b",950:"#022c22"},teal:{50:"#f0fdfa",100:"#ccfbf1",200:"#99f6e4",300:"#5eead4",400:"#2dd4bf",500:"#14b8a6",600:"#0d9488",700:"#0f766e",800:"#115e59",900:"#134e4a",950:"#042f2e"},cyan:{50:"#ecfeff",100:"#cffafe",200:"#a5f3fc",300:"#67e8f9",400:"#22d3ee",500:"#06b6d4",600:"#0891b2",700:"#0e7490",800:"#155e75",900:"#164e63",950:"#083344"},sky:{50:"#f0f9ff",100:"#e0f2fe",200:"#bae6fd",300:"#7dd3fc",400:"#38bdf8",500:"#0ea5e9",600:"#0284c7",700:"#0369a1",800:"#075985",900:"#0c4a6e",950:"#082f49"},blue:{50:"#eff6ff",100:"#dbeafe",200:"#bfdbfe",300:"#93c5fd",400:"#60a5fa",500:"#3b82f6",600:"#2563eb",700:"#1d4ed8",800:"#1e40af",900:"#1e3a8a",950:"#172554"},indigo:{50:"#eef2ff",100:"#e0e7ff",200:"#c7d2fe",300:"#a5b4fc",400:"#818cf8",500:"#6366f1",600:"#4f46e5",700:"#4338ca",800:"#3730a3",900:"#312e81",950:"#1e1b4b"},violet:{50:"#f5f3ff",100:"#ede9fe",200:"#ddd6fe",300:"#c4b5fd",400:"#a78bfa",500:"#8b5cf6",600:"#7c3aed",700:"#6d28d9",800:"#5b21b6",900:"#4c1d95",950:"#2e1065"},purple:{50:"#faf5ff",100:"#f3e8ff",200:"#e9d5ff",300:"#d8b4fe",400:"#c084fc",500:"#a855f7",600:"#9333ea",700:"#7e22ce",800:"#6b21a8",900:"#581c87",950:"#3b0764"},fuchsia:{50:"#fdf4ff",100:"#fae8ff",200:"#f5d0fe",300:"#f0abfc",400:"#e879f9",500:"#d946ef",600:"#c026d3",700:"#a21caf",800:"#86198f",900:"#701a75",950:"#4a044e"},pink:{50:"#fdf2f8",100:"#fce7f3",200:"#fbcfe8",300:"#f9a8d4",400:"#f472b6",500:"#ec4899",600:"#db2777",700:"#be185d",800:"#9d174d",900:"#831843",950:"#500724"},rose:{50:"#fff1f2",100:"#ffe4e6",200:"#fecdd3",300:"#fda4af",400:"#fb7185",500:"#f43f5e",600:"#e11d48",700:"#be123c",800:"#9f1239",900:"#881337",950:"#4c0519"},get lightBlue(){return n({version:"v2.2",from:"lightBlue",to:"sky"}),this.sky},get warmGray(){return n({version:"v3.0",from:"warmGray",to:"stone"}),this.stone},get trueGray(){return n({version:"v3.0",from:"trueGray",to:"neutral"}),this.neutral},get coolGray(){return n({version:"v3.0",from:"coolGray",to:"gray"}),this.gray},get blueGray(){return n({version:"v3.0",from:"blueGray",to:"slate"}),this.slate}}}(colors$3)),colors$3}var defaults$2={},hasRequiredDefaults;function requireDefaults(){return hasRequiredDefaults||(hasRequiredDefaults=1,function(i){Object.defineProperty(i,"__esModule",{value:!0}),Object.defineProperty(i,"defaults",{enumerable:!0,get:function(){return e}});function e(t,...n){for(let a of n){for(let o in a){var s;!(t==null||(s=t.hasOwnProperty)===null||s===void 0)&&s.call(t,o)||(t[o]=a[o])}for(let o of Object.getOwnPropertySymbols(a)){var r;!(t==null||(r=t.hasOwnProperty)===null||r===void 0)&&r.call(t,o)||(t[o]=a[o])}}return t}}(defaults$2)),defaults$2}var toPath={},hasRequiredToPath;function requireToPath(){return hasRequiredToPath||(hasRequiredToPath=1,function(i){Object.defineProperty(i,"__esModule",{value:!0}),Object.defineProperty(i,"toPath",{enumerable:!0,get:function(){return e}});function e(t){if(Array.isArray(t))return t;let n=t.split("[").length-1,s=t.split("]").length-1;if(n!==s)throw new Error(`Path is invalid. Has unbalanced brackets: ${t}`);return t.split(/\.(?![^\[]*\])|[\[\]]/g).filter(Boolean)}}(toPath)),toPath}var normalizeConfig={},featureFlags={},hasRequiredFeatureFlags;function requireFeatureFlags(){return hasRequiredFeatureFlags||(hasRequiredFeatureFlags=1,function(i){Object.defineProperty(i,"__esModule",{value:!0});function e(u,p){for(var m in p)Object.defineProperty(u,m,{enumerable:!0,get:p[m]})}e(i,{flagEnabled:function(){return o},issueFlagNotices:function(){return d},default:function(){return f}});const t=s(requirePicocolors_browser()),n=s(requireLog());function s(u){return u&&u.__esModule?u:{default:u}}let r={optimizeUniversalDefaults:!1,generalizedModifiers:!0,disableColorOpacityUtilitiesByDefault:!1,relativeContentPathsByDefault:!1},a={future:["hoverOnlyWhenSupported","respectDefaultRingColorOpacity","disableColorOpacityUtilitiesByDefault","relativeContentPathsByDefault"],experimental:["optimizeUniversalDefaults","generalizedModifiers"]};function o(u,p){if(a.future.includes(p)){var m,g,y;return u.future==="all"||((y=(g=u==null||(m=u.future)===null||m===void 0?void 0:m[p])!==null&&g!==void 0?g:r[p])!==null&&y!==void 0?y:!1)}if(a.experimental.includes(p)){var v,b,C;return u.experimental==="all"||((C=(b=u==null||(v=u.experimental)===null||v===void 0?void 0:v[p])!==null&&b!==void 0?b:r[p])!==null&&C!==void 0?C:!1)}return!1}function l(u){if(u.experimental==="all")return a.experimental;var p;return Object.keys((p=u==null?void 0:u.experimental)!==null&&p!==void 0?p:{}).filter(m=>a.experimental.includes(m)&&u.experimental[m])}function d(u){if(process.env.JEST_WORKER_ID===void 0&&l(u).length>0){let p=l(u).map(m=>t.default.yellow(m)).join(", ");n.default.warn("experimental-flags-enabled",[`You have enabled experimental features: ${p}`,"Experimental features in Tailwind CSS are not covered by semver, may introduce breaking changes, and can change at any time."])}}const f=a}(featureFlags)),featureFlags}var hasRequiredNormalizeConfig;function requireNormalizeConfig(){return hasRequiredNormalizeConfig||(hasRequiredNormalizeConfig=1,function(i){Object.defineProperty(i,"__esModule",{value:!0}),Object.defineProperty(i,"normalizeConfig",{enumerable:!0,get:function(){return r}});const e=requireFeatureFlags(),t=s(requireLog());function n(a){if(typeof WeakMap!="function")return null;var o=new WeakMap,l=new WeakMap;return(n=function(d){return d?l:o})(a)}function s(a,o){if(a&&a.__esModule)return a;if(a===null||typeof a!="object"&&typeof a!="function")return{default:a};var l=n(o);if(l&&l.has(a))return l.get(a);var d={},f=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var u in a)if(u!=="default"&&Object.prototype.hasOwnProperty.call(a,u)){var p=f?Object.getOwnPropertyDescriptor(a,u):null;p&&(p.get||p.set)?Object.defineProperty(d,u,p):d[u]=a[u]}return d.default=a,l&&l.set(a,d),d}function r(a){if((()=>{if(a.purge||!a.content||!Array.isArray(a.content)&&!(typeof a.content=="object"&&a.content!==null))return!1;if(Array.isArray(a.content))return a.content.every(d=>typeof d=="string"?!0:!(typeof(d==null?void 0:d.raw)!="string"||d!=null&&d.extension&&typeof(d==null?void 0:d.extension)!="string"));if(typeof a.content=="object"&&a.content!==null){if(Object.keys(a.content).some(d=>!["files","relative","extract","transform"].includes(d)))return!1;if(Array.isArray(a.content.files)){if(!a.content.files.every(d=>typeof d=="string"?!0:!(typeof(d==null?void 0:d.raw)!="string"||d!=null&&d.extension&&typeof(d==null?void 0:d.extension)!="string")))return!1;if(typeof a.content.extract=="object"){for(let d of Object.values(a.content.extract))if(typeof d!="function")return!1}else if(!(a.content.extract===void 0||typeof a.content.extract=="function"))return!1;if(typeof a.content.transform=="object"){for(let d of Object.values(a.content.transform))if(typeof d!="function")return!1}else if(!(a.content.transform===void 0||typeof a.content.transform=="function"))return!1;if(typeof a.content.relative!="boolean"&&typeof a.content.relative<"u")return!1}return!0}return!1})()||t.default.warn("purge-deprecation",["The `purge`/`content` options have changed in Tailwind CSS v3.0.","Update your configuration file to eliminate this warning.","https://tailwindcss.com/docs/upgrade-guide#configure-content-sources"]),a.safelist=(()=>{var d;let{content:f,purge:u,safelist:p}=a;return Array.isArray(p)?p:Array.isArray(f==null?void 0:f.safelist)?f.safelist:Array.isArray(u==null?void 0:u.safelist)?u.safelist:Array.isArray(u==null||(d=u.options)===null||d===void 0?void 0:d.safelist)?u.options.safelist:[]})(),a.blocklist=(()=>{let{blocklist:d}=a;if(Array.isArray(d)){if(d.every(f=>typeof f=="string"))return d;t.default.warn("blocklist-invalid",["The `blocklist` option must be an array of strings.","https://tailwindcss.com/docs/content-configuration#discarding-classes"])}return[]})(),typeof a.prefix=="function")t.default.warn("prefix-function",["As of Tailwind CSS v3.0, `prefix` cannot be a function.","Update `prefix` in your configuration to be a string to eliminate this warning.","https://tailwindcss.com/docs/upgrade-guide#prefix-cannot-be-a-function"]),a.prefix="";else{var l;a.prefix=(l=a.prefix)!==null&&l!==void 0?l:""}a.content={relative:(()=>{let{content:d}=a;return d!=null&&d.relative?d.relative:(0,e.flagEnabled)(a,"relativeContentPathsByDefault")})(),files:(()=>{let{content:d,purge:f}=a;return Array.isArray(f)?f:Array.isArray(f==null?void 0:f.content)?f.content:Array.isArray(d)?d:Array.isArray(d==null?void 0:d.content)?d.content:Array.isArray(d==null?void 0:d.files)?d.files:[]})(),extract:(()=>{let d=(()=>{var p,m,g,y,v,b,C,_,R,E;return!((p=a.purge)===null||p===void 0)&&p.extract?a.purge.extract:!((m=a.content)===null||m===void 0)&&m.extract?a.content.extract:!((g=a.purge)===null||g===void 0||(y=g.extract)===null||y===void 0)&&y.DEFAULT?a.purge.extract.DEFAULT:!((v=a.content)===null||v===void 0||(b=v.extract)===null||b===void 0)&&b.DEFAULT?a.content.extract.DEFAULT:!((C=a.purge)===null||C===void 0||(_=C.options)===null||_===void 0)&&_.extractors?a.purge.options.extractors:!((R=a.content)===null||R===void 0||(E=R.options)===null||E===void 0)&&E.extractors?a.content.options.extractors:{}})(),f={},u=(()=>{var p,m,g,y;if(!((p=a.purge)===null||p===void 0||(m=p.options)===null||m===void 0)&&m.defaultExtractor)return a.purge.options.defaultExtractor;if(!((g=a.content)===null||g===void 0||(y=g.options)===null||y===void 0)&&y.defaultExtractor)return a.content.options.defaultExtractor})();if(u!==void 0&&(f.DEFAULT=u),typeof d=="function")f.DEFAULT=d;else if(Array.isArray(d))for(let{extensions:p,extractor:m}of d??[])for(let g of p)f[g]=m;else typeof d=="object"&&d!==null&&Object.assign(f,d);return f})(),transform:(()=>{let d=(()=>{var u,p,m,g,y,v;return!((u=a.purge)===null||u===void 0)&&u.transform?a.purge.transform:!((p=a.content)===null||p===void 0)&&p.transform?a.content.transform:!((m=a.purge)===null||m===void 0||(g=m.transform)===null||g===void 0)&&g.DEFAULT?a.purge.transform.DEFAULT:!((y=a.content)===null||y===void 0||(v=y.transform)===null||v===void 0)&&v.DEFAULT?a.content.transform.DEFAULT:{}})(),f={};return typeof d=="function"?f.DEFAULT=d:typeof d=="object"&&d!==null&&Object.assign(f,d),f})()};for(let d of a.content.files)if(typeof d=="string"&&/{([^,]*?)}/g.test(d)){t.default.warn("invalid-glob-braces",[`The glob pattern ${(0,t.dim)(d)} in your Tailwind CSS configuration is invalid.`,`Update it to ${(0,t.dim)(d.replace(/{([^,]*?)}/g,"$1"))} to silence this warning.`]);break}return a}}(normalizeConfig)),normalizeConfig}var isPlainObject={},hasRequiredIsPlainObject;function requireIsPlainObject(){return hasRequiredIsPlainObject||(hasRequiredIsPlainObject=1,function(i){Object.defineProperty(i,"__esModule",{value:!0}),Object.defineProperty(i,"default",{enumerable:!0,get:function(){return e}});function e(t){if(Object.prototype.toString.call(t)!=="[object Object]")return!1;const n=Object.getPrototypeOf(t);return n===null||Object.getPrototypeOf(n)===null}}(isPlainObject)),isPlainObject}var cloneDeep={},hasRequiredCloneDeep;function requireCloneDeep(){return hasRequiredCloneDeep||(hasRequiredCloneDeep=1,function(i){Object.defineProperty(i,"__esModule",{value:!0}),Object.defineProperty(i,"cloneDeep",{enumerable:!0,get:function(){return e}});function e(t){return Array.isArray(t)?t.map(n=>e(n)):typeof t=="object"&&t!==null?Object.fromEntries(Object.entries(t).map(([n,s])=>[n,e(s)])):t}}(cloneDeep)),cloneDeep}var pluginUtils={},escapeCommas={},hasRequiredEscapeCommas;function requireEscapeCommas(){return hasRequiredEscapeCommas||(hasRequiredEscapeCommas=1,function(i){Object.defineProperty(i,"__esModule",{value:!0}),Object.defineProperty(i,"default",{enumerable:!0,get:function(){return e}});function e(t){return t.replace(/\\,/g,"\\2c ")}}(escapeCommas)),escapeCommas}var withAlphaVariable={},color$1={},colorNames={},hasRequiredColorNames;function requireColorNames(){return hasRequiredColorNames||(hasRequiredColorNames=1,function(i){Object.defineProperty(i,"__esModule",{value:!0}),Object.defineProperty(i,"default",{enumerable:!0,get:function(){return e}});const e={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]}}(colorNames)),colorNames}var hasRequiredColor;function requireColor(){return hasRequiredColor||(hasRequiredColor=1,function(i){Object.defineProperty(i,"__esModule",{value:!0});function e(g,y){for(var v in y)Object.defineProperty(g,v,{enumerable:!0,get:y[v]})}e(i,{parseColor:function(){return p},formatColor:function(){return m}});const t=n(requireColorNames());function n(g){return g&&g.__esModule?g:{default:g}}let s=/^#([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})?$/i,r=/^#([a-f\d])([a-f\d])([a-f\d])([a-f\d])?$/i,a=/(?:\d+|\d*\.\d+)%?/,o=/(?:\s*,\s*|\s+)/,l=/\s*[,/]\s*/,d=/var\(--(?:[^ )]*?)(?:,(?:[^ )]*?|var\(--[^ )]*?\)))?\)/,f=new RegExp(`^(rgba?)\\(\\s*(${a.source}|${d.source})(?:${o.source}(${a.source}|${d.source}))?(?:${o.source}(${a.source}|${d.source}))?(?:${l.source}(${a.source}|${d.source}))?\\s*\\)$`),u=new RegExp(`^(hsla?)\\(\\s*((?:${a.source})(?:deg|rad|grad|turn)?|${d.source})(?:${o.source}(${a.source}|${d.source}))?(?:${o.source}(${a.source}|${d.source}))?(?:${l.source}(${a.source}|${d.source}))?\\s*\\)$`);function p(g,{loose:y=!1}={}){var v,b;if(typeof g!="string")return null;if(g=g.trim(),g==="transparent")return{mode:"rgb",color:["0","0","0"],alpha:"0"};if(g in t.default)return{mode:"rgb",color:t.default[g].map(F=>F.toString())};let C=g.replace(r,(F,O,A,N,M)=>["#",O,O,A,A,N,N,M?M+M:""].join("")).match(s);if(C!==null)return{mode:"rgb",color:[parseInt(C[1],16),parseInt(C[2],16),parseInt(C[3],16)].map(F=>F.toString()),alpha:C[4]?(parseInt(C[4],16)/255).toString():void 0};var _;let R=(_=g.match(f))!==null&&_!==void 0?_:g.match(u);if(R===null)return null;let E=[R[2],R[3],R[4]].filter(Boolean).map(F=>F.toString());return E.length===2&&E[0].startsWith("var(")?{mode:R[1],color:[E[0]],alpha:E[1]}:!y&&E.length!==3||E.length<3&&!E.some(F=>/^var\(.*?\)$/.test(F))?null:{mode:R[1],color:E,alpha:(v=R[5])===null||v===void 0||(b=v.toString)===null||b===void 0?void 0:b.call(v)}}function m({mode:g,color:y,alpha:v}){let b=v!==void 0;return g==="rgba"||g==="hsla"?`${g}(${y.join(", ")}${b?`, ${v}`:""})`:`${g}(${y.join(" ")}${b?` / ${v}`:""})`}}(color$1)),color$1}var hasRequiredWithAlphaVariable;function requireWithAlphaVariable(){return hasRequiredWithAlphaVariable||(hasRequiredWithAlphaVariable=1,function(i){Object.defineProperty(i,"__esModule",{value:!0});function e(r,a){for(var o in a)Object.defineProperty(r,o,{enumerable:!0,get:a[o]})}e(i,{withAlphaValue:function(){return n},default:function(){return s}});const t=requireColor();function n(r,a,o){if(typeof r=="function")return r({opacityValue:a});let l=(0,t.parseColor)(r,{loose:!0});return l===null?o:(0,t.formatColor)({...l,alpha:a})}function s({color:r,property:a,variable:o}){let l=[].concat(a);if(typeof r=="function")return{[o]:"1",...Object.fromEntries(l.map(f=>[f,r({opacityVariable:o,opacityValue:`var(${o}, 1)`})]))};const d=(0,t.parseColor)(r);return d===null?Object.fromEntries(l.map(f=>[f,r])):d.alpha!==void 0?Object.fromEntries(l.map(f=>[f,r])):{[o]:"1",...Object.fromEntries(l.map(f=>[f,(0,t.formatColor)({...d,alpha:`var(${o}, 1)`})]))}}}(withAlphaVariable)),withAlphaVariable}var dataTypes={},parseBoxShadowValue={},splitAtTopLevelOnly={},hasRequiredSplitAtTopLevelOnly;function requireSplitAtTopLevelOnly(){return hasRequiredSplitAtTopLevelOnly||(hasRequiredSplitAtTopLevelOnly=1,function(i){Object.defineProperty(i,"__esModule",{value:!0}),Object.defineProperty(i,"splitAtTopLevelOnly",{enumerable:!0,get:function(){return e}});function e(t,n){let s=[],r=[],a=0,o=!1;for(let l=0;l<t.length;l++){let d=t[l];s.length===0&&d===n[0]&&!o&&(n.length===1||t.slice(l,l+n.length)===n)&&(r.push(t.slice(a,l)),a=l+n.length),o=o?!1:d==="\\",d==="("||d==="["||d==="{"?s.push(d):(d===")"&&s[s.length-1]==="("||d==="]"&&s[s.length-1]==="["||d==="}"&&s[s.length-1]==="{")&&s.pop()}return r.push(t.slice(a)),r}}(splitAtTopLevelOnly)),splitAtTopLevelOnly}var hasRequiredParseBoxShadowValue;function requireParseBoxShadowValue(){return hasRequiredParseBoxShadowValue||(hasRequiredParseBoxShadowValue=1,function(i){Object.defineProperty(i,"__esModule",{value:!0});function e(l,d){for(var f in d)Object.defineProperty(l,f,{enumerable:!0,get:d[f]})}e(i,{parseBoxShadowValue:function(){return a},formatBoxShadowValue:function(){return o}});const t=requireSplitAtTopLevelOnly();let n=new Set(["inset","inherit","initial","revert","unset"]),s=/\ +(?![^(]*\))/g,r=/^-?(\d+|\.\d+)(.*?)$/g;function a(l){return(0,t.splitAtTopLevelOnly)(l,",").map(f=>{let u=f.trim(),p={raw:u},m=u.split(s),g=new Set;for(let y of m)r.lastIndex=0,!g.has("KEYWORD")&&n.has(y)?(p.keyword=y,g.add("KEYWORD")):r.test(y)?g.has("X")?g.has("Y")?g.has("BLUR")?g.has("SPREAD")||(p.spread=y,g.add("SPREAD")):(p.blur=y,g.add("BLUR")):(p.y=y,g.add("Y")):(p.x=y,g.add("X")):p.color?(p.unknown||(p.unknown=[]),p.unknown.push(y)):p.color=y;return p.valid=p.x!==void 0&&p.y!==void 0,p})}function o(l){return l.map(d=>d.valid?[d.keyword,d.x,d.y,d.blur,d.spread,d.color].filter(Boolean).join(" "):d.raw).join(", ")}}(parseBoxShadowValue)),parseBoxShadowValue}var hasRequiredDataTypes;function requireDataTypes(){return hasRequiredDataTypes||(hasRequiredDataTypes=1,function(i){Object.defineProperty(i,"__esModule",{value:!0});function e(ce,pe){for(var he in pe)Object.defineProperty(ce,he,{enumerable:!0,get:pe[he]})}e(i,{normalize:function(){return l},normalizeAttributeSelectors:function(){return d},url:function(){return u},number:function(){return p},percentage:function(){return m},length:function(){return v},lineWidth:function(){return C},shadow:function(){return _},color:function(){return R},image:function(){return E},gradient:function(){return O},position:function(){return N},familyName:function(){return M},genericName:function(){return X},absoluteSize:function(){return le},relativeSize:function(){return ue}});const t=requireColor(),n=requireParseBoxShadowValue(),s=requireSplitAtTopLevelOnly();let r=["min","max","clamp","calc"];function a(ce){return r.some(pe=>new RegExp(`^${pe}\\(.*\\)`).test(ce))}const o=new Set(["scroll-timeline-name","timeline-scope","view-timeline-name","font-palette","anchor-name","anchor-scope","position-anchor","position-try-options","scroll-timeline","animation-timeline","view-timeline","position-try"]);function l(ce,pe=null,he=!0){let Y=pe&&o.has(pe.property);return ce.startsWith("--")&&!Y?`var(${ce})`:ce.includes("url(")?ce.split(/(url\(.*?\))/g).filter(Boolean).map(ge=>/^url\(.*?\)$/.test(ge)?ge:l(ge,pe,!1)).join(""):(ce=ce.replace(/([^\\])_+/g,(ge,xe)=>xe+" ".repeat(ge.length-1)).replace(/^_/g," ").replace(/\\_/g,"_"),he&&(ce=ce.trim()),ce=f(ce),ce)}function d(ce){return ce.includes("=")&&(ce=ce.replace(/(=.*)/g,(pe,he)=>{if(he[1]==="'"||he[1]==='"')return he;if(he.length>2){let Y=he[he.length-1];if(he[he.length-2]===" "&&(Y==="i"||Y==="I"||Y==="s"||Y==="S"))return`="${he.slice(1,-2)}" ${he[he.length-1]}`}return`="${he.slice(1)}"`})),ce}function f(ce){let pe=["theme"],he=["min-content","max-content","fit-content","safe-area-inset-top","safe-area-inset-right","safe-area-inset-bottom","safe-area-inset-left","titlebar-area-x","titlebar-area-y","titlebar-area-width","titlebar-area-height","keyboard-inset-top","keyboard-inset-right","keyboard-inset-bottom","keyboard-inset-left","keyboard-inset-width","keyboard-inset-height","radial-gradient","linear-gradient","conic-gradient","repeating-radial-gradient","repeating-linear-gradient","repeating-conic-gradient","anchor-size"];return ce.replace(/(calc|min|max|clamp)\(.+\)/g,Y=>{let ge="";function xe(){let be=ge.trimEnd();return be[be.length-1]}for(let be=0;be<Y.length;be++){let Ce=function(ye){return ye.split("").every((we,_e)=>Y[be+_e]===we)},ke=function(ye){let we=1/0;for(let Re of ye){let Ee=Y.indexOf(Re,be);Ee!==-1&&Ee<we&&(we=Ee)}let _e=Y.slice(be,we);return be+=_e.length-1,_e},me=Y[be];if(Ce("var"))ge+=ke([")",","]);else if(he.some(ye=>Ce(ye))){let ye=he.find(we=>Ce(we));ge+=ye,be+=ye.length-1}else pe.some(ye=>Ce(ye))?ge+=ke([")"]):Ce("[")?ge+=ke(["]"]):["+","-","*","/"].includes(me)&&!["(","+","-","*","/",","].includes(xe())?ge+=` ${me} `:ge+=me}return ge.replace(/\s+/g," ")})}function u(ce){return ce.startsWith("url(")}function p(ce){return!isNaN(Number(ce))||a(ce)}function m(ce){return ce.endsWith("%")&&p(ce.slice(0,-1))||a(ce)}let y=`(?:${["cm","mm","Q","in","pc","pt","px","em","ex","ch","rem","lh","rlh","vw","vh","vmin","vmax","vb","vi","svw","svh","lvw","lvh","dvw","dvh","cqw","cqh","cqi","cqb","cqmin","cqmax"].join("|")})`;function v(ce){return ce==="0"||new RegExp(`^[+-]?[0-9]*.?[0-9]+(?:[eE][+-]?[0-9]+)?${y}$`).test(ce)||a(ce)}let b=new Set(["thin","medium","thick"]);function C(ce){return b.has(ce)}function _(ce){let pe=(0,n.parseBoxShadowValue)(l(ce));for(let he of pe)if(!he.valid)return!1;return!0}function R(ce){let pe=0;return(0,s.splitAtTopLevelOnly)(ce,"_").every(Y=>(Y=l(Y),Y.startsWith("var(")?!0:(0,t.parseColor)(Y,{loose:!0})!==null?(pe++,!0):!1))?pe>0:!1}function E(ce){let pe=0;return(0,s.splitAtTopLevelOnly)(ce,",").every(Y=>(Y=l(Y),Y.startsWith("var(")?!0:u(Y)||O(Y)||["element(","image(","cross-fade(","image-set("].some(ge=>Y.startsWith(ge))?(pe++,!0):!1))?pe>0:!1}let F=new Set(["conic-gradient","linear-gradient","radial-gradient","repeating-conic-gradient","repeating-linear-gradient","repeating-radial-gradient"]);function O(ce){ce=l(ce);for(let pe of F)if(ce.startsWith(`${pe}(`))return!0;return!1}let A=new Set(["center","top","right","bottom","left"]);function N(ce){let pe=0;return(0,s.splitAtTopLevelOnly)(ce,"_").every(Y=>(Y=l(Y),Y.startsWith("var(")?!0:A.has(Y)||v(Y)||m(Y)?(pe++,!0):!1))?pe>0:!1}function M(ce){let pe=0;return(0,s.splitAtTopLevelOnly)(ce,",").every(Y=>(Y=l(Y),Y.startsWith("var(")?!0:Y.includes(" ")&&!/(['"])([^"']+)\1/g.test(Y)||/^\d/g.test(Y)?!1:(pe++,!0)))?pe>0:!1}let Z=new Set(["serif","sans-serif","monospace","cursive","fantasy","system-ui","ui-serif","ui-sans-serif","ui-monospace","ui-rounded","math","emoji","fangsong"]);function X(ce){return Z.has(ce)}let oe=new Set(["xx-small","x-small","small","medium","large","x-large","xx-large","xxx-large"]);function le(ce){return oe.has(ce)}let de=new Set(["larger","smaller"]);function ue(ce){return de.has(ce)}}(dataTypes)),dataTypes}var validateFormalSyntax={},hasRequiredValidateFormalSyntax;function requireValidateFormalSyntax(){return hasRequiredValidateFormalSyntax||(hasRequiredValidateFormalSyntax=1,function(i){Object.defineProperty(i,"__esModule",{value:!0}),Object.defineProperty(i,"backgroundSize",{enumerable:!0,get:function(){return n}});const e=requireDataTypes(),t=requireSplitAtTopLevelOnly();function n(s){let r=["cover","contain"];return(0,t.splitAtTopLevelOnly)(s,",").every(a=>{let o=(0,t.splitAtTopLevelOnly)(a,"_").filter(Boolean);return o.length===1&&r.includes(o[0])?!0:o.length!==1&&o.length!==2?!1:o.every(l=>(0,e.length)(l)||(0,e.percentage)(l)||l==="auto")})}}(validateFormalSyntax)),validateFormalSyntax}var hasRequiredPluginUtils;function requirePluginUtils(){return hasRequiredPluginUtils||(hasRequiredPluginUtils=1,function(i){Object.defineProperty(i,"__esModule",{value:!0});function e(N,M){for(var Z in M)Object.defineProperty(N,Z,{enumerable:!0,get:M[Z]})}e(i,{updateAllClasses:function(){return d},asValue:function(){return p},parseColorFormat:function(){return y},asColor:function(){return b},asLookupValue:function(){return C},typeMap:function(){return R},coerceValue:function(){return O},getMatchingTypes:function(){return A}});const t=l(requireEscapeCommas()),n=requireWithAlphaVariable(),s=requireDataTypes(),r=l(requireNegateValue()),a=requireValidateFormalSyntax(),o=requireFeatureFlags();function l(N){return N&&N.__esModule?N:{default:N}}function d(N,M){N.walkClasses(Z=>{Z.value=M(Z.value),Z.raws&&Z.raws.value&&(Z.raws.value=(0,t.default)(Z.raws.value))})}function f(N,M){if(!m(N))return;let Z=N.slice(1,-1);if(M(Z))return(0,s.normalize)(Z)}function u(N,M={},Z){let X=M[N];if(X!==void 0)return(0,r.default)(X);if(m(N)){let oe=f(N,Z);return oe===void 0?void 0:(0,r.default)(oe)}}function p(N,M={},{validate:Z=()=>!0}={}){var X;let oe=(X=M.values)===null||X===void 0?void 0:X[N];return oe!==void 0?oe:M.supportsNegativeValues&&N.startsWith("-")?u(N.slice(1),M.values,Z):f(N,Z)}function m(N){return N.startsWith("[")&&N.endsWith("]")}function g(N){let M=N.lastIndexOf("/"),Z=N.lastIndexOf("[",M),X=N.indexOf("]",M);return N[M-1]==="]"||N[M+1]==="["||Z!==-1&&X!==-1&&Z<M&&M<X&&(M=N.lastIndexOf("/",Z)),M===-1||M===N.length-1?[N,void 0]:m(N)&&!N.includes("]/[")?[N,void 0]:[N.slice(0,M),N.slice(M+1)]}function y(N){if(typeof N=="string"&&N.includes("<alpha-value>")){let M=N;return({opacityValue:Z=1})=>M.replace(/<alpha-value>/g,Z)}return N}function v(N){return(0,s.normalize)(N.slice(1,-1))}function b(N,M={},{tailwindConfig:Z={}}={}){var X;if(((X=M.values)===null||X===void 0?void 0:X[N])!==void 0){var oe;return y((oe=M.values)===null||oe===void 0?void 0:oe[N])}let[le,de]=g(N);if(de!==void 0){var ue,ce,pe,he;let Y=(he=(ue=M.values)===null||ue===void 0?void 0:ue[le])!==null&&he!==void 0?he:m(le)?le.slice(1,-1):void 0;return Y===void 0?void 0:(Y=y(Y),m(de)?(0,n.withAlphaValue)(Y,v(de)):((ce=Z.theme)===null||ce===void 0||(pe=ce.opacity)===null||pe===void 0?void 0:pe[de])===void 0?void 0:(0,n.withAlphaValue)(Y,Z.theme.opacity[de]))}return p(N,M,{validate:s.color})}function C(N,M={}){var Z;return(Z=M.values)===null||Z===void 0?void 0:Z[N]}function _(N){return(M,Z)=>p(M,Z,{validate:N})}let R={any:p,color:b,url:_(s.url),image:_(s.image),length:_(s.length),percentage:_(s.percentage),position:_(s.position),lookup:C,"generic-name":_(s.genericName),"family-name":_(s.familyName),number:_(s.number),"line-width":_(s.lineWidth),"absolute-size":_(s.absoluteSize),"relative-size":_(s.relativeSize),shadow:_(s.shadow),size:_(a.backgroundSize)},E=Object.keys(R);function F(N,M){let Z=N.indexOf(M);return Z===-1?[void 0,N]:[N.slice(0,Z),N.slice(Z+1)]}function O(N,M,Z,X){if(Z.values&&M in Z.values)for(let{type:le}of N??[]){let de=R[le](M,Z,{tailwindConfig:X});if(de!==void 0)return[de,le,null]}if(m(M)){let le=M.slice(1,-1),[de,ue]=F(le,":");if(!/^[\w-_]+$/g.test(de))ue=le;else if(de!==void 0&&!E.includes(de))return[];if(ue.length>0&&E.includes(de))return[p(`[${ue}]`,Z),de,null]}let oe=A(N,M,Z,X);for(let le of oe)return le;return[]}function*A(N,M,Z,X){let oe=(0,o.flagEnabled)(X,"generalizedModifiers"),[le,de]=g(M);if(oe&&Z.modifiers!=null&&(Z.modifiers==="any"||typeof Z.modifiers=="object"&&(de&&m(de)||de in Z.modifiers))||(le=M,de=void 0),de!==void 0&&le===""&&(le="DEFAULT"),de!==void 0&&typeof Z.modifiers=="object"){var ce,pe;let he=(pe=(ce=Z.modifiers)===null||ce===void 0?void 0:ce[de])!==null&&pe!==void 0?pe:null;he!==null?de=he:m(de)&&(de=v(de))}for(let{type:he}of N??[]){let Y=R[he](le,Z,{tailwindConfig:X});Y!==void 0&&(yield[Y,he,de??null])}}}(pluginUtils)),pluginUtils}var toColorValue={},hasRequiredToColorValue;function requireToColorValue(){return hasRequiredToColorValue||(hasRequiredToColorValue=1,function(i){Object.defineProperty(i,"__esModule",{value:!0}),Object.defineProperty(i,"default",{enumerable:!0,get:function(){return e}});function e(t){return typeof t=="function"?t({}):t}}(toColorValue)),toColorValue}var hasRequiredResolveConfig$2;function requireResolveConfig$2(){return hasRequiredResolveConfig$2||(hasRequiredResolveConfig$2=1,function(i){Object.defineProperty(i,"__esModule",{value:!0}),Object.defineProperty(i,"default",{enumerable:!0,get:function(){return Z}});const e=m(requireNegateValue()),t=m(requireCorePluginList()),n=m(requireConfigurePlugins()),s=m(requireColors()),r=requireDefaults(),a=requireToPath(),o=requireNormalizeConfig(),l=m(requireIsPlainObject()),d=requireCloneDeep(),f=requirePluginUtils(),u=requireWithAlphaVariable(),p=m(requireToColorValue());function m(X){return X&&X.__esModule?X:{default:X}}function g(X){return typeof X=="function"}function y(X,...oe){let le=oe.pop();for(let de of oe)for(let ue in de){let ce=le(X[ue],de[ue]);ce===void 0?(0,l.default)(X[ue])&&(0,l.default)(de[ue])?X[ue]=y({},X[ue],de[ue],le):X[ue]=de[ue]:X[ue]=ce}return X}const v={colors:s.default,negative(X){return Object.keys(X).filter(oe=>X[oe]!=="0").reduce((oe,le)=>{let de=(0,e.default)(X[le]);return de!==void 0&&(oe[`-${le}`]=de),oe},{})},breakpoints(X){return Object.keys(X).filter(oe=>typeof X[oe]=="string").reduce((oe,le)=>({...oe,[`screen-${le}`]:X[le]}),{})}};function b(X,...oe){return g(X)?X(...oe):X}function C(X){return X.reduce((oe,{extend:le})=>y(oe,le,(de,ue)=>de===void 0?[ue]:Array.isArray(de)?[ue,...de]:[ue,de]),{})}function _(X){return{...X.reduce((oe,le)=>(0,r.defaults)(oe,le),{}),extend:C(X)}}function R(X,oe){if(Array.isArray(X)&&(0,l.default)(X[0]))return X.concat(oe);if(Array.isArray(oe)&&(0,l.default)(oe[0])&&(0,l.default)(X))return[X,...oe];if(Array.isArray(oe))return oe}function E({extend:X,...oe}){return y(oe,X,(le,de)=>!g(le)&&!de.some(g)?y({},le,...de,R):(ue,ce)=>y({},...[le,...de].map(pe=>b(pe,ue,ce)),R))}function*F(X){let oe=(0,a.toPath)(X);if(oe.length===0||(yield oe,Array.isArray(X)))return;let le=/^(.*?)\s*\/\s*([^/]+)$/,de=X.match(le);if(de!==null){let[,ue,ce]=de,pe=(0,a.toPath)(ue);pe.alpha=ce,yield pe}}function O(X){const oe=(le,de)=>{for(const ue of F(le)){let ce=0,pe=X;for(;pe!=null&&ce<ue.length;)pe=pe[ue[ce++]],pe=g(pe)&&(ue.alpha===void 0||ce<=ue.length-1)?pe(oe,v):pe;if(pe!==void 0){if(ue.alpha!==void 0){let he=(0,f.parseColorFormat)(pe);return(0,u.withAlphaValue)(he,ue.alpha,(0,p.default)(he))}return(0,l.default)(pe)?(0,d.cloneDeep)(pe):pe}}return de};return Object.assign(oe,{theme:oe,...v}),Object.keys(X).reduce((le,de)=>(le[de]=g(X[de])?X[de](oe,v):X[de],le),{})}function A(X){let oe=[];return X.forEach(le=>{oe=[...oe,le];var de;const ue=(de=le==null?void 0:le.plugins)!==null&&de!==void 0?de:[];ue.length!==0&&ue.forEach(ce=>{ce.__isOptionsFunction&&(ce=ce());var pe;oe=[...oe,...A([(pe=ce==null?void 0:ce.config)!==null&&pe!==void 0?pe:{}])]})}),oe}function N(X){return[...X].reduceRight((le,de)=>g(de)?de({corePlugins:le}):(0,n.default)(de,le),t.default)}function M(X){return[...X].reduceRight((le,de)=>[...le,...de],[])}function Z(X){let oe=[...A(X),{prefix:"",important:!1,separator:":"}];var le,de;return(0,o.normalizeConfig)((0,r.defaults)({theme:O(E(_(oe.map(ue=>(le=ue==null?void 0:ue.theme)!==null&&le!==void 0?le:{})))),corePlugins:N(oe.map(ue=>ue.corePlugins)),plugins:M(X.map(ue=>(de=ue==null?void 0:ue.plugins)!==null&&de!==void 0?de:[]))},...oe))}}(resolveConfig$1)),resolveConfig$1}var getAllConfigs={},config_full,hasRequiredConfig_full;function requireConfig_full(){return hasRequiredConfig_full||(hasRequiredConfig_full=1,config_full={content:[],presets:[],darkMode:"media",theme:{accentColor:({theme:i})=>({...i("colors"),auto:"auto"}),animation:{none:"none",spin:"spin 1s linear infinite",ping:"ping 1s cubic-bezier(0, 0, 0.2, 1) infinite",pulse:"pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite",bounce:"bounce 1s infinite"},aria:{busy:'busy="true"',checked:'checked="true"',disabled:'disabled="true"',expanded:'expanded="true"',hidden:'hidden="true"',pressed:'pressed="true"',readonly:'readonly="true"',required:'required="true"',selected:'selected="true"'},aspectRatio:{auto:"auto",square:"1 / 1",video:"16 / 9"},backdropBlur:({theme:i})=>i("blur"),backdropBrightness:({theme:i})=>i("brightness"),backdropContrast:({theme:i})=>i("contrast"),backdropGrayscale:({theme:i})=>i("grayscale"),backdropHueRotate:({theme:i})=>i("hueRotate"),backdropInvert:({theme:i})=>i("invert"),backdropOpacity:({theme:i})=>i("opacity"),backdropSaturate:({theme:i})=>i("saturate"),backdropSepia:({theme:i})=>i("sepia"),backgroundColor:({theme:i})=>i("colors"),backgroundImage:{none:"none","gradient-to-t":"linear-gradient(to top, var(--tw-gradient-stops))","gradient-to-tr":"linear-gradient(to top right, var(--tw-gradient-stops))","gradient-to-r":"linear-gradient(to right, var(--tw-gradient-stops))","gradient-to-br":"linear-gradient(to bottom right, var(--tw-gradient-stops))","gradient-to-b":"linear-gradient(to bottom, var(--tw-gradient-stops))","gradient-to-bl":"linear-gradient(to bottom left, var(--tw-gradient-stops))","gradient-to-l":"linear-gradient(to left, var(--tw-gradient-stops))","gradient-to-tl":"linear-gradient(to top left, var(--tw-gradient-stops))"},backgroundOpacity:({theme:i})=>i("opacity"),backgroundPosition:{bottom:"bottom",center:"center",left:"left","left-bottom":"left bottom","left-top":"left top",right:"right","right-bottom":"right bottom","right-top":"right top",top:"top"},backgroundSize:{auto:"auto",cover:"cover",contain:"contain"},blur:{0:"0",none:"",sm:"4px",DEFAULT:"8px",md:"12px",lg:"16px",xl:"24px","2xl":"40px","3xl":"64px"},borderColor:({theme:i})=>({...i("colors"),DEFAULT:i("colors.gray.200","currentColor")}),borderOpacity:({theme:i})=>i("opacity"),borderRadius:{none:"0px",sm:"0.125rem",DEFAULT:"0.25rem",md:"0.375rem",lg:"0.5rem",xl:"0.75rem","2xl":"1rem","3xl":"1.5rem",full:"9999px"},borderSpacing:({theme:i})=>({...i("spacing")}),borderWidth:{DEFAULT:"1px",0:"0px",2:"2px",4:"4px",8:"8px"},boxShadow:{sm:"0 1px 2px 0 rgb(0 0 0 / 0.05)",DEFAULT:"0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1)",md:"0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1)",lg:"0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1)",xl:"0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1)","2xl":"0 25px 50px -12px rgb(0 0 0 / 0.25)",inner:"inset 0 2px 4px 0 rgb(0 0 0 / 0.05)",none:"none"},boxShadowColor:({theme:i})=>i("colors"),brightness:{0:"0",50:".5",75:".75",90:".9",95:".95",100:"1",105:"1.05",110:"1.1",125:"1.25",150:"1.5",200:"2"},caretColor:({theme:i})=>i("colors"),colors:({colors:i})=>({inherit:i.inherit,current:i.current,transparent:i.transparent,black:i.black,white:i.white,slate:i.slate,gray:i.gray,zinc:i.zinc,neutral:i.neutral,stone:i.stone,red:i.red,orange:i.orange,amber:i.amber,yellow:i.yellow,lime:i.lime,green:i.green,emerald:i.emerald,teal:i.teal,cyan:i.cyan,sky:i.sky,blue:i.blue,indigo:i.indigo,violet:i.violet,purple:i.purple,fuchsia:i.fuchsia,pink:i.pink,rose:i.rose}),columns:{auto:"auto",1:"1",2:"2",3:"3",4:"4",5:"5",6:"6",7:"7",8:"8",9:"9",10:"10",11:"11",12:"12","3xs":"16rem","2xs":"18rem",xs:"20rem",sm:"24rem",md:"28rem",lg:"32rem",xl:"36rem","2xl":"42rem","3xl":"48rem","4xl":"56rem","5xl":"64rem","6xl":"72rem","7xl":"80rem"},container:{},content:{none:"none"},contrast:{0:"0",50:".5",75:".75",100:"1",125:"1.25",150:"1.5",200:"2"},cursor:{auto:"auto",default:"default",pointer:"pointer",wait:"wait",text:"text",move:"move",help:"help","not-allowed":"not-allowed",none:"none","context-menu":"context-menu",progress:"progress",cell:"cell",crosshair:"crosshair","vertical-text":"vertical-text",alias:"alias",copy:"copy","no-drop":"no-drop",grab:"grab",grabbing:"grabbing","all-scroll":"all-scroll","col-resize":"col-resize","row-resize":"row-resize","n-resize":"n-resize","e-resize":"e-resize","s-resize":"s-resize","w-resize":"w-resize","ne-resize":"ne-resize","nw-resize":"nw-resize","se-resize":"se-resize","sw-resize":"sw-resize","ew-resize":"ew-resize","ns-resize":"ns-resize","nesw-resize":"nesw-resize","nwse-resize":"nwse-resize","zoom-in":"zoom-in","zoom-out":"zoom-out"},divideColor:({theme:i})=>i("borderColor"),divideOpacity:({theme:i})=>i("borderOpacity"),divideWidth:({theme:i})=>i("borderWidth"),dropShadow:{sm:"0 1px 1px rgb(0 0 0 / 0.05)",DEFAULT:["0 1px 2px rgb(0 0 0 / 0.1)","0 1px 1px rgb(0 0 0 / 0.06)"],md:["0 4px 3px rgb(0 0 0 / 0.07)","0 2px 2px rgb(0 0 0 / 0.06)"],lg:["0 10px 8px rgb(0 0 0 / 0.04)","0 4px 3px rgb(0 0 0 / 0.1)"],xl:["0 20px 13px rgb(0 0 0 / 0.03)","0 8px 5px rgb(0 0 0 / 0.08)"],"2xl":"0 25px 25px rgb(0 0 0 / 0.15)",none:"0 0 #0000"},fill:({theme:i})=>({none:"none",...i("colors")}),flex:{1:"1 1 0%",auto:"1 1 auto",initial:"0 1 auto",none:"none"},flexBasis:({theme:i})=>({auto:"auto",...i("spacing"),"1/2":"50%","1/3":"33.333333%","2/3":"66.666667%","1/4":"25%","2/4":"50%","3/4":"75%","1/5":"20%","2/5":"40%","3/5":"60%","4/5":"80%","1/6":"16.666667%","2/6":"33.333333%","3/6":"50%","4/6":"66.666667%","5/6":"83.333333%","1/12":"8.333333%","2/12":"16.666667%","3/12":"25%","4/12":"33.333333%","5/12":"41.666667%","6/12":"50%","7/12":"58.333333%","8/12":"66.666667%","9/12":"75%","10/12":"83.333333%","11/12":"91.666667%",full:"100%"}),flexGrow:{0:"0",DEFAULT:"1"},flexShrink:{0:"0",DEFAULT:"1"},fontFamily:{sans:["ui-sans-serif","system-ui","sans-serif",'"Apple Color Emoji"','"Segoe UI Emoji"','"Segoe UI Symbol"','"Noto Color Emoji"'],serif:["ui-serif","Georgia","Cambria",'"Times New Roman"',"Times","serif"],mono:["ui-monospace","SFMono-Regular","Menlo","Monaco","Consolas",'"Liberation Mono"','"Courier New"',"monospace"]},fontSize:{xs:["0.75rem",{lineHeight:"1rem"}],sm:["0.875rem",{lineHeight:"1.25rem"}],base:["1rem",{lineHeight:"1.5rem"}],lg:["1.125rem",{lineHeight:"1.75rem"}],xl:["1.25rem",{lineHeight:"1.75rem"}],"2xl":["1.5rem",{lineHeight:"2rem"}],"3xl":["1.875rem",{lineHeight:"2.25rem"}],"4xl":["2.25rem",{lineHeight:"2.5rem"}],"5xl":["3rem",{lineHeight:"1"}],"6xl":["3.75rem",{lineHeight:"1"}],"7xl":["4.5rem",{lineHeight:"1"}],"8xl":["6rem",{lineHeight:"1"}],"9xl":["8rem",{lineHeight:"1"}]},fontWeight:{thin:"100",extralight:"200",light:"300",normal:"400",medium:"500",semibold:"600",bold:"700",extrabold:"800",black:"900"},gap:({theme:i})=>i("spacing"),gradientColorStops:({theme:i})=>i("colors"),gradientColorStopPositions:{"0%":"0%","5%":"5%","10%":"10%","15%":"15%","20%":"20%","25%":"25%","30%":"30%","35%":"35%","40%":"40%","45%":"45%","50%":"50%","55%":"55%","60%":"60%","65%":"65%","70%":"70%","75%":"75%","80%":"80%","85%":"85%","90%":"90%","95%":"95%","100%":"100%"},grayscale:{0:"0",DEFAULT:"100%"},gridAutoColumns:{auto:"auto",min:"min-content",max:"max-content",fr:"minmax(0, 1fr)"},gridAutoRows:{auto:"auto",min:"min-content",max:"max-content",fr:"minmax(0, 1fr)"},gridColumn:{auto:"auto","span-1":"span 1 / span 1","span-2":"span 2 / span 2","span-3":"span 3 / span 3","span-4":"span 4 / span 4","span-5":"span 5 / span 5","span-6":"span 6 / span 6","span-7":"span 7 / span 7","span-8":"span 8 / span 8","span-9":"span 9 / span 9","span-10":"span 10 / span 10","span-11":"span 11 / span 11","span-12":"span 12 / span 12","span-full":"1 / -1"},gridColumnEnd:{auto:"auto",1:"1",2:"2",3:"3",4:"4",5:"5",6:"6",7:"7",8:"8",9:"9",10:"10",11:"11",12:"12",13:"13"},gridColumnStart:{auto:"auto",1:"1",2:"2",3:"3",4:"4",5:"5",6:"6",7:"7",8:"8",9:"9",10:"10",11:"11",12:"12",13:"13"},gridRow:{auto:"auto","span-1":"span 1 / span 1","span-2":"span 2 / span 2","span-3":"span 3 / span 3","span-4":"span 4 / span 4","span-5":"span 5 / span 5","span-6":"span 6 / span 6","span-7":"span 7 / span 7","span-8":"span 8 / span 8","span-9":"span 9 / span 9","span-10":"span 10 / span 10","span-11":"span 11 / span 11","span-12":"span 12 / span 12","span-full":"1 / -1"},gridRowEnd:{auto:"auto",1:"1",2:"2",3:"3",4:"4",5:"5",6:"6",7:"7",8:"8",9:"9",10:"10",11:"11",12:"12",13:"13"},gridRowStart:{auto:"auto",1:"1",2:"2",3:"3",4:"4",5:"5",6:"6",7:"7",8:"8",9:"9",10:"10",11:"11",12:"12",13:"13"},gridTemplateColumns:{none:"none",subgrid:"subgrid",1:"repeat(1, minmax(0, 1fr))",2:"repeat(2, minmax(0, 1fr))",3:"repeat(3, minmax(0, 1fr))",4:"repeat(4, minmax(0, 1fr))",5:"repeat(5, minmax(0, 1fr))",6:"repeat(6, minmax(0, 1fr))",7:"repeat(7, minmax(0, 1fr))",8:"repeat(8, minmax(0, 1fr))",9:"repeat(9, minmax(0, 1fr))",10:"repeat(10, minmax(0, 1fr))",11:"repeat(11, minmax(0, 1fr))",12:"repeat(12, minmax(0, 1fr))"},gridTemplateRows:{none:"none",subgrid:"subgrid",1:"repeat(1, minmax(0, 1fr))",2:"repeat(2, minmax(0, 1fr))",3:"repeat(3, minmax(0, 1fr))",4:"repeat(4, minmax(0, 1fr))",5:"repeat(5, minmax(0, 1fr))",6:"repeat(6, minmax(0, 1fr))",7:"repeat(7, minmax(0, 1fr))",8:"repeat(8, minmax(0, 1fr))",9:"repeat(9, minmax(0, 1fr))",10:"repeat(10, minmax(0, 1fr))",11:"repeat(11, minmax(0, 1fr))",12:"repeat(12, minmax(0, 1fr))"},height:({theme:i})=>({auto:"auto",...i("spacing"),"1/2":"50%","1/3":"33.333333%","2/3":"66.666667%","1/4":"25%","2/4":"50%","3/4":"75%","1/5":"20%","2/5":"40%","3/5":"60%","4/5":"80%","1/6":"16.666667%","2/6":"33.333333%","3/6":"50%","4/6":"66.666667%","5/6":"83.333333%",full:"100%",screen:"100vh",svh:"100svh",lvh:"100lvh",dvh:"100dvh",min:"min-content",max:"max-content",fit:"fit-content"}),hueRotate:{0:"0deg",15:"15deg",30:"30deg",60:"60deg",90:"90deg",180:"180deg"},inset:({theme:i})=>({auto:"auto",...i("spacing"),"1/2":"50%","1/3":"33.333333%","2/3":"66.666667%","1/4":"25%","2/4":"50%","3/4":"75%",full:"100%"}),invert:{0:"0",DEFAULT:"100%"},keyframes:{spin:{to:{transform:"rotate(360deg)"}},ping:{"75%, 100%":{transform:"scale(2)",opacity:"0"}},pulse:{"50%":{opacity:".5"}},bounce:{"0%, 100%":{transform:"translateY(-25%)",animationTimingFunction:"cubic-bezier(0.8,0,1,1)"},"50%":{transform:"none",animationTimingFunction:"cubic-bezier(0,0,0.2,1)"}}},letterSpacing:{tighter:"-0.05em",tight:"-0.025em",normal:"0em",wide:"0.025em",wider:"0.05em",widest:"0.1em"},lineHeight:{none:"1",tight:"1.25",snug:"1.375",normal:"1.5",relaxed:"1.625",loose:"2",3:".75rem",4:"1rem",5:"1.25rem",6:"1.5rem",7:"1.75rem",8:"2rem",9:"2.25rem",10:"2.5rem"},listStyleType:{none:"none",disc:"disc",decimal:"decimal"},listStyleImage:{none:"none"},margin:({theme:i})=>({auto:"auto",...i("spacing")}),lineClamp:{1:"1",2:"2",3:"3",4:"4",5:"5",6:"6"},maxHeight:({theme:i})=>({...i("spacing"),none:"none",full:"100%",screen:"100vh",svh:"100svh",lvh:"100lvh",dvh:"100dvh",min:"min-content",max:"max-content",fit:"fit-content"}),maxWidth:({theme:i,breakpoints:e})=>({...i("spacing"),none:"none",xs:"20rem",sm:"24rem",md:"28rem",lg:"32rem",xl:"36rem","2xl":"42rem","3xl":"48rem","4xl":"56rem","5xl":"64rem","6xl":"72rem","7xl":"80rem",full:"100%",min:"min-content",max:"max-content",fit:"fit-content",prose:"65ch",...e(i("screens"))}),minHeight:({theme:i})=>({...i("spacing"),full:"100%",screen:"100vh",svh:"100svh",lvh:"100lvh",dvh:"100dvh",min:"min-content",max:"max-content",fit:"fit-content"}),minWidth:({theme:i})=>({...i("spacing"),full:"100%",min:"min-content",max:"max-content",fit:"fit-content"}),objectPosition:{bottom:"bottom",center:"center",left:"left","left-bottom":"left bottom","left-top":"left top",right:"right","right-bottom":"right bottom","right-top":"right top",top:"top"},opacity:{0:"0",5:"0.05",10:"0.1",15:"0.15",20:"0.2",25:"0.25",30:"0.3",35:"0.35",40:"0.4",45:"0.45",50:"0.5",55:"0.55",60:"0.6",65:"0.65",70:"0.7",75:"0.75",80:"0.8",85:"0.85",90:"0.9",95:"0.95",100:"1"},order:{first:"-9999",last:"9999",none:"0",1:"1",2:"2",3:"3",4:"4",5:"5",6:"6",7:"7",8:"8",9:"9",10:"10",11:"11",12:"12"},outlineColor:({theme:i})=>i("colors"),outlineOffset:{0:"0px",1:"1px",2:"2px",4:"4px",8:"8px"},outlineWidth:{0:"0px",1:"1px",2:"2px",4:"4px",8:"8px"},padding:({theme:i})=>i("spacing"),placeholderColor:({theme:i})=>i("colors"),placeholderOpacity:({theme:i})=>i("opacity"),ringColor:({theme:i})=>({DEFAULT:i("colors.blue.500","#3b82f6"),...i("colors")}),ringOffsetColor:({theme:i})=>i("colors"),ringOffsetWidth:{0:"0px",1:"1px",2:"2px",4:"4px",8:"8px"},ringOpacity:({theme:i})=>({DEFAULT:"0.5",...i("opacity")}),ringWidth:{DEFAULT:"3px",0:"0px",1:"1px",2:"2px",4:"4px",8:"8px"},rotate:{0:"0deg",1:"1deg",2:"2deg",3:"3deg",6:"6deg",12:"12deg",45:"45deg",90:"90deg",180:"180deg"},saturate:{0:"0",50:".5",100:"1",150:"1.5",200:"2"},scale:{0:"0",50:".5",75:".75",90:".9",95:".95",100:"1",105:"1.05",110:"1.1",125:"1.25",150:"1.5"},screens:{sm:"640px",md:"768px",lg:"1024px",xl:"1280px","2xl":"1536px"},scrollMargin:({theme:i})=>({...i("spacing")}),scrollPadding:({theme:i})=>i("spacing"),sepia:{0:"0",DEFAULT:"100%"},skew:{0:"0deg",1:"1deg",2:"2deg",3:"3deg",6:"6deg",12:"12deg"},space:({theme:i})=>({...i("spacing")}),spacing:{px:"1px",0:"0px",.5:"0.125rem",1:"0.25rem",1.5:"0.375rem",2:"0.5rem",2.5:"0.625rem",3:"0.75rem",3.5:"0.875rem",4:"1rem",5:"1.25rem",6:"1.5rem",7:"1.75rem",8:"2rem",9:"2.25rem",10:"2.5rem",11:"2.75rem",12:"3rem",14:"3.5rem",16:"4rem",20:"5rem",24:"6rem",28:"7rem",32:"8rem",36:"9rem",40:"10rem",44:"11rem",48:"12rem",52:"13rem",56:"14rem",60:"15rem",64:"16rem",72:"18rem",80:"20rem",96:"24rem"},stroke:({theme:i})=>({none:"none",...i("colors")}),strokeWidth:{0:"0",1:"1",2:"2"},supports:{},data:{},textColor:({theme:i})=>i("colors"),textDecorationColor:({theme:i})=>i("colors"),textDecorationThickness:{auto:"auto","from-font":"from-font",0:"0px",1:"1px",2:"2px",4:"4px",8:"8px"},textIndent:({theme:i})=>({...i("spacing")}),textOpacity:({theme:i})=>i("opacity"),textUnderlineOffset:{auto:"auto",0:"0px",1:"1px",2:"2px",4:"4px",8:"8px"},transformOrigin:{center:"center",top:"top","top-right":"top right",right:"right","bottom-right":"bottom right",bottom:"bottom","bottom-left":"bottom left",left:"left","top-left":"top left"},transitionDelay:{0:"0s",75:"75ms",100:"100ms",150:"150ms",200:"200ms",300:"300ms",500:"500ms",700:"700ms",1e3:"1000ms"},transitionDuration:{DEFAULT:"150ms",0:"0s",75:"75ms",100:"100ms",150:"150ms",200:"200ms",300:"300ms",500:"500ms",700:"700ms",1e3:"1000ms"},transitionProperty:{none:"none",all:"all",DEFAULT:"color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter",colors:"color, background-color, border-color, text-decoration-color, fill, stroke",opacity:"opacity",shadow:"box-shadow",transform:"transform"},transitionTimingFunction:{DEFAULT:"cubic-bezier(0.4, 0, 0.2, 1)",linear:"linear",in:"cubic-bezier(0.4, 0, 1, 1)",out:"cubic-bezier(0, 0, 0.2, 1)","in-out":"cubic-bezier(0.4, 0, 0.2, 1)"},translate:({theme:i})=>({...i("spacing"),"1/2":"50%","1/3":"33.333333%","2/3":"66.666667%","1/4":"25%","2/4":"50%","3/4":"75%",full:"100%"}),size:({theme:i})=>({auto:"auto",...i("spacing"),"1/2":"50%","1/3":"33.333333%","2/3":"66.666667%","1/4":"25%","2/4":"50%","3/4":"75%","1/5":"20%","2/5":"40%","3/5":"60%","4/5":"80%","1/6":"16.666667%","2/6":"33.333333%","3/6":"50%","4/6":"66.666667%","5/6":"83.333333%","1/12":"8.333333%","2/12":"16.666667%","3/12":"25%","4/12":"33.333333%","5/12":"41.666667%","6/12":"50%","7/12":"58.333333%","8/12":"66.666667%","9/12":"75%","10/12":"83.333333%","11/12":"91.666667%",full:"100%",min:"min-content",max:"max-content",fit:"fit-content"}),width:({theme:i})=>({auto:"auto",...i("spacing"),"1/2":"50%","1/3":"33.333333%","2/3":"66.666667%","1/4":"25%","2/4":"50%","3/4":"75%","1/5":"20%","2/5":"40%","3/5":"60%","4/5":"80%","1/6":"16.666667%","2/6":"33.333333%","3/6":"50%","4/6":"66.666667%","5/6":"83.333333%","1/12":"8.333333%","2/12":"16.666667%","3/12":"25%","4/12":"33.333333%","5/12":"41.666667%","6/12":"50%","7/12":"58.333333%","8/12":"66.666667%","9/12":"75%","10/12":"83.333333%","11/12":"91.666667%",full:"100%",screen:"100vw",svw:"100svw",lvw:"100lvw",dvw:"100dvw",min:"min-content",max:"max-content",fit:"fit-content"}),willChange:{auto:"auto",scroll:"scroll-position",contents:"contents",transform:"transform"},zIndex:{auto:"auto",0:"0",10:"10",20:"20",30:"30",40:"40",50:"50"}},plugins:[]}),config_full}var hasRequiredGetAllConfigs;function requireGetAllConfigs(){return hasRequiredGetAllConfigs||(hasRequiredGetAllConfigs=1,function(i){Object.defineProperty(i,"__esModule",{value:!0}),Object.defineProperty(i,"default",{enumerable:!0,get:function(){return s}});const e=n(requireConfig_full()),t=requireFeatureFlags();function n(r){return r&&r.__esModule?r:{default:r}}function s(r){var a;const o=((a=r==null?void 0:r.presets)!==null&&a!==void 0?a:[e.default]).slice().reverse().flatMap(f=>s(f instanceof Function?f():f)),l={respectDefaultRingColorOpacity:{theme:{ringColor:({theme:f})=>({DEFAULT:"#3b82f67f",...f("colors")})}},disableColorOpacityUtilitiesByDefault:{corePlugins:{backgroundOpacity:!1,borderOpacity:!1,divideOpacity:!1,placeholderOpacity:!1,ringOpacity:!1,textOpacity:!1}}},d=Object.keys(l).filter(f=>(0,t.flagEnabled)(r,f)).map(f=>l[f]);return[r,...d,...o]}}(getAllConfigs)),getAllConfigs}var hasRequiredResolveConfig$1;function requireResolveConfig$1(){return hasRequiredResolveConfig$1||(hasRequiredResolveConfig$1=1,function(i){Object.defineProperty(i,"__esModule",{value:!0}),Object.defineProperty(i,"default",{enumerable:!0,get:function(){return s}});const e=n(requireResolveConfig$2()),t=n(requireGetAllConfigs());function n(r){return r&&r.__esModule?r:{default:r}}function s(...r){let[,...a]=(0,t.default)(r[0]);return(0,e.default)([...r,...a])}}(resolveConfig$2)),resolveConfig$2}var resolveConfig_1,hasRequiredResolveConfig;function requireResolveConfig(){if(hasRequiredResolveConfig)return resolveConfig_1;hasRequiredResolveConfig=1;let i=requireResolveConfig$1();return resolveConfig_1=(i.__esModule?i:{default:i}).default,resolveConfig_1}var resolveConfigExports=requireResolveConfig();const resolveConfig=getDefaultExportFromCjs$1(resolveConfigExports),config={content:["./index.html","./src/**/*.{js,ts,jsx,tsx}"],prefix:"pl-",darkMode:["class",'[class= "dark"]'],theme:{extend:{colors:{playerColor:"rgb(var(--color-playerColor) / <alpha-value>)",playerColor1:"rgb(var(--color-playerColor1) / <alpha-value>)",main:{DEFAULT:"#651FFF",highLight:"#BB86FC",lightPurple:"#D4C5FF",light:"#7C4DFF",700:"#6833DD",dark:"#442D8E"},primary:{500:"#50A5FF",600:"#7C8EFF",700:"#027DFF",800:"#006ADA"},secondary:{DEFAULT:"#BCBDC0",50:"#FBFBFB",100:"#F7F7FC",200:"#EFF0F6",300:"#D9DBE9",400:"#A0A3BD",500:"#6E7191",600:"#4E4B66",700:"#262338",800:"#14142A",900:"#040412"},gray:{warm:"#ECEADC",highLight:"#E6E6E6",100:"#F5F5F5",300:"#D4D4D4",400:"#A3A3A3",500:"#737373",600:"#313A43",700:"#404040",800:"#151515"},dark:{1:"#1C1B1E",2:"#2C2C2C",3:"#303034",4:"#919094",5:"#E3E2E6",6:"#F2F0F4",7:"#BB86FC",8:"#E8DEFF",9:"#CDBDFF",10:"#383838",13:"#1C1B1F"},red:{light:"#EE1D23",200:"#EA0000",300:"#FCA5A5",500:"#EF4444",600:"#DC2626",700:"#B91C1C",zProgress:"#F74B50",error:"#F2B8B5",onError:"#601410"},lime:{300:"#A6F787",500:"#84CC16",600:"#65A30D",800:"#28752B",success:"#067306"},orange:{100:"#F15F22",200:"#FCC44D",600:"#F3732B",700:"#F15F22"},purple:{light:"#DACDFF"},warning:{DEFAULT:"#F5A623",100:"#DE8200"},z:{secondary:{50:"#FAFAFA",100:"#DBDDDE",500:"#939598",600:"#57585A"},yellow:{light:"#FAD832",login:"#FFBC39"},gray:{300:"#CDCDCD",400:"#BDBDBD",500:"#393E46",700:"#222831"},red:{progress:"#F64B50"},green:{DEFAULT:"#00B59C"}}}}},plugins:[]},wait=i=>new Promise(e=>setTimeout(e,i*1e3)),getRemainingTime=i=>{const e=Math.floor(Date.now()/1e3-i),t=new Intl.RelativeTimeFormat(conditions(ConditionName.isArabicLang)?Lang.ar:Lang.fa,{numeric:"auto"});switch(!0){case e<60:return t.format(-e,"second");case e<3600:return t.format(-Math.floor(e/60),"minute");case e<86400:return t.format(-Math.floor(e/3600),"hour");case e<2592e3:return t.format(-Math.floor(e/86400),"day");case e<31536e3:return t.format(-Math.floor(e/2592e3),"month");default:return t.format(-Math.floor(e/31536e3),"year")}},compare=(i,e)=>i.time<e.time?-1:i.time>e.time?1:0,handlePageTitle=i=>{i&&conditions(ConditionName.showModuleTitle)&&(document.title=i)},getUUID=()=>{let i=localStorage.getItem("hamrahiUUID");return i||(i=uuidGenerator(),localStorage.setItem("hamrahiUUID",i)),i.toString()},uuidGenerator=()=>{let i="xxxxxxxx-xxxx-Mxxx-Nxxx-x".replace(/[xMN]/g,e=>{let t;return e==="M"?t=Math.floor(1+Math.random()*5):e==="N"?t=Math.floor(8+Math.random()*4):t=Math.floor(Math.random()*16),t.toString(16)});return i+=Date.now().toString(16),i},isTouchScreen=()=>"ontouchstart"in window||window.DocumentTouch&&document instanceof window.DocumentTouch,isTouchScreenLandscape=()=>{const{videoElementSizeInfo:i}=store.getState().videoData,{isFullScreen:e}=store.getState().controller;return conditions(ConditionName.isMiniPlayer)&&i.width!==0?isTouchScreen()&&i.width>i.height:isTouchScreen()&&e},isTouchScreenPortrait=()=>{const{isFullScreen:i}=store.getState().controller;return isTouchScreen()&&!i},handleIsComplexDesktop=i=>!isTouchScreen()&&!document.fullscreenElement&&i,isIOS=()=>["iPad Simulator","iPhone Simulator","iPod Simulator","iPad","iPhone","iPod"].includes(navigator.platform)||navigator.userAgent.includes("Mac")&&"ontouchend"in document,controllbarIconSize={miniPlayer:15,other:20},addZeroBefore=i=>(i<10?"0":"")+i,secondsToHMS=i=>{const e=Math.floor(i/3600),t=Math.floor(i%3600/60),n=Math.floor(i%3600%60);return e<1?`${addZeroBefore(t)}:${addZeroBefore(n)}`:`${addZeroBefore(e)}:${addZeroBefore(t)}:${addZeroBefore(n)}`},secondsToPersianHMS=i=>{const e=Math.floor(i/3600),t=Math.floor(i%3600/60),n=Math.floor(i%3600%60),s=n?`${n} ${translate().seconds}`:null,r=t?`${t} ${translate().minutes}`:null;return[e?`${e} ${translate().hour}`:null,r,s].filter(o=>o!==null)},efficientSecondsToPersianHMS=i=>{const e=i>=3600?Math.floor(i/3600):0,t=i>=60?Math.floor(i%3600/60):0,n=i<60*60?Math.floor(i%3600%60):0,s=n?`${n} ${translate().seconds}`:null,r=t?`${t} ${translate().minutes}`:null;return[e?`${e} ${translate().hour}`:null,r,s].filter(o=>o!==null).join(" و ")},staticFormats=i=>["mp4","mkv","mov","m4v"].includes(i)?"mp4":i==="webm"||i==="flv"?i:["mp3","ogg"].includes(i)?"mp3":!1,addUuidToSrc=i=>{const e=new URL(i);let t=i;return e.search.length?t+=`&uuid=${getUUID()}`:t+=`?uuid=${getUUID()}`},handleSumVotes=i=>{let e=0;return i&&Object.keys(i).length>0&&i.options.length>0&&i.options.forEach(t=>{livePoll()&&livePoll().polls.filter(n=>n.qid===i.id&&n.oid===t.id&&n.sumOptionVotes===t.vote+1).length>0&&(e+=1),e+=t.vote}),e},checkParentTarget=(i,e)=>{try{return[i.target.id,i.target.parentNode.id,i.target.parentNode.parentNode.id,i.target.parentNode.parentNode.parentNode.id,i.target.parentNode.parentNode.parentNode.parentNode.id].includes(e)}catch{return!1}},unitization=i=>i/1e3<1?{value:i,unit:""}:i/(1e3*1e3)<1?{value:Math.ceil(i/1e3*10)/10,unit:"K"}:i/(1e3*1e3*1e3)<1?{value:Math.ceil(i/(1e3*1e3)*10)/10,unit:"M"}:{value:0,unit:""},handleNotActiveText=(i="404")=>{if(i==="liveAndVod")return{title:translate().currentlyNoVideoContent,description:translate().viewOtherVideos};if(i==="404"||i===void 0)return{title:"404",description:translate().enteredAddressNotCorrect}},isVoted=i=>livePoll()&&livePoll().polls.some(e=>e.qid===i),isSelectedOption=(i,e)=>livePoll()&&livePoll().polls.some(t=>t.qid===i&&t.oid===e),appendQueryParamsToChunks=i=>{const e=store.dispatch,{token:t,params:n}=store.getState().videoData;let s="";s=i.split("m3u8")[1],s?s=`${s}&uuid=${getUUID()}`:s=`?uuid=${getUUID()}`,conditions(ConditionName.isAuth)&&(hasQuestionMark(s)?s=`${s}&token=${t}`:s=`?token=${t}`),conditions(ConditionName.hasDaaniTokenParams)&&(hasQuestionMark(s)?s=`${s}&ext_user=${n.daaniToken}`:s=`?ext_user=${n.daaniToken}`),e(setStreamLinkParams(s))},inViewPort=i=>{if(i){const e=i.offsetLeft-i.offsetWidth/2,t=window.innerWidth-(i.offsetLeft+i.offsetWidth);if(e>=0&&t>=0)return"inViewport";if(e<0)return"OutViewPortFromLeft";if(t<0)return"OutViewPortFromRight"}},handleIsComplexPortrait=i=>i.portrait==="true"&&isTouchScreenPortrait()&&i.isGeneral!=="true"&&i.raw!=="true",isFullMobilePortrait=()=>{const{params:i,videoElementSizeInfo:e}=store.getState().videoData;return i.portrait!=="true"&&(+e.width.toFixed(0)===window.screen.width||+e.width.toFixed(0)===window.screen.availWidth)&&(window.screen.height>window.screen.width||window.screen.availHeight>window.screen.availWidth)},handleRippleCircle=(i,e)=>{const t=document.getElementById(e),n=document.createElement("span");n.style.width=n.style.height="50px",n.style.left=`${i.touches[0].clientX-t.offsetLeft-25}px`,n.style.top=`${i.touches[0].clientY-t.offsetTop-25}px`,n.classList.add("pl-ripple");const s=t.getElementsByClassName("pl-ripple")[0];s&&s.remove(),t.appendChild(n)},handleRipple=(i,e,t=50)=>{const n=i.clientX!==void 0?i.clientX:i.touches[0].clientX,s=i.clientY!==void 0?i.clientY:i.touches[0].clientY,r=document.getElementById(e),a=document.createElement("span");a.style.width=a.style.height=`${t}px`,a.style.left=`${n-t/2}px`,a.style.top=`${s-r.getBoundingClientRect().top-t/2}px`,a.classList.add("pl-ripple");const o=r.getElementsByClassName("pl-ripple")[0];o&&o.remove(),r.appendChild(a)},changeVideoUrl=(i,e)=>{const{params:t}=store.getState().videoData,n=findFirstVideoInRecommendationList(),s=i||n.type,r=e||n.id;if(conditions(ConditionName.hasSportProvider)){const a=window.location.href.split("?")[1];return a?`${window.location.origin}/ngpplayer/${s}/${r}?${a}`:`${window.location.origin}/ngpplayer/${s}/${r}`}else return window.location.href.replace(`type=${t.type}`,`type=${s}`).replace(`id=${t.id}`,`id=${r}`)},hasQuestionMark=i=>!!i.match(/\?/g),responseValidator=i=>i>=200&&i<300,generateNewAccessToken=async()=>{var i,e,t;if((i=authToken.get())!=null&&i.refresh){const{data:n,status:s}=await apiCaller({url:API().auth.refresh,method:"POST",data:{refresh:(e=authToken.get())==null?void 0:e.refresh}});if(responseValidator(s)){const r={access:n.access,refresh:(t=authToken.get())==null?void 0:t.refresh,token_id:n.token_id};authToken.set(r)}else throw authToken.remove(),new Error("")}},isWhiteListUrl=i=>!!whiteListTargets.find(e=>new URL(i).origin.includes(e)),handlePopoverSizeInMiniPlayer=()=>{const{videoElementSizeInfo:i}=store.getState().videoData;return conditions(ConditionName.isMiniPlayer)&&!conditions(ConditionName.isFullMobilePortrait)?{top:i.top,height:i.height,left:i.left}:{}},numbersToLetters=[translate().first,translate().second,translate().third,translate().fourth,translate().fifth,translate().sixth,translate().seventh,translate().eighth,translate().ninth,translate().tenth,translate().eleventh,translate().twelfth,translate().thirteenth,translate().fourteenth,translate().fifteenth,translate().sixteenth,translate().seventeenth,translate().eighteenth,translate().nineteenth,translate().twentieth],handleVideoType=()=>{const{params:i}=store.getState().videoData;switch(i.type){case"vod":return VideoNumberTypeEnum.Vod;case"archive":case"live":return VideoNumberTypeEnum.Archive;case"clip":return VideoNumberTypeEnum.Clip;default:return VideoNumberTypeEnum.FutureLive}},handleHasXTokenParamOrSendXToken=()=>{if(conditions(ConditionName.hasXTokenParamOrSendXToken))return{"x-token":store.getState().videoData.params.xToken}},handleGetBookmarkCategory=i=>{switch(i){case"film":return BookmarkCategory.FILM;case"sport":return BookmarkCategory.SPORT;default:return BookmarkCategory.FILM}};function getWebEnvConfig(i){const t=store.getState().videoData.webListConfig.find(n=>n.key===i);return t?t.value:""}const clearRedux=()=>{const i=store.dispatch;i(setClearVideoDataSlice()),i(setClearControllerSlice()),i(setClearUserSlice()),i(setClearTagsSlice()),i(setClearPopoversSlice()),i(setClearCommentsSlice()),i(setClearChatSlice())},weighted_random=i=>{let e,t=[];for(e=0;e<i.length;e++)t[e]=i[e].weight+(t[e-1]||0);let n=Math.random()*t[t.length-1];for(e=0;e<t.length&&!(t[e]>n);e++);return i[e].domain},imageFormatChecking=i=>["jpg","png","jpeg"].includes(i.toLowerCase().split(".")[i.toLowerCase().split(".").length-1]),handlePageLoadTime=i=>{let e=0;performance&&performance.getEntriesByType("navigation")&&(e=performance.getEntriesByType("navigation")[0].duration),i.current=e},highestResolutionSupported=(i,e,t)=>{const n=e*window.devicePixelRatio,s=t*window.devicePixelRatio;let r=[];return conditions(ConditionName.isTouchScreenPortrait)?r=i.filter(a=>Number(a.split("x")[0].trim())<=n):r=i.filter(a=>Number(a.split("x")[0].trim())<=s||Number(a.split("x")[1].trim())<=n),r.indexOf(r[r.length-1])},getSubtitleLabel=i=>{let e;switch(i){case"fa":e=translate().persian;break;case"en":e=translate().english;break;case"ar":e=translate().arabic;break;case"tr":e=translate().turkish;break}return e},strToObj=str=>{var obj={};if(str&&typeof str=="string"){var objStr=str.match(/\{(.)+\}/g);eval("obj ="+objStr)}return obj},hasPermissionToRedirect=i=>{const e=store.dispatch;if(e(setIsFetchDetails(!0)),i)try{const t=new URL(i);isWhiteListGeneralUrl(t.hostname,whiteListGeneralUrl)?e(setIsValidAddress(!0)):(e(setErrorType("404")),e(setIsValidAddress(!1)))}catch{e(setErrorType("404")),e(setIsValidAddress(!1))}};function isWhiteListGeneralUrl(i,e){for(let t=0;t<e.length;t++)if(i.startsWith(e[t]))return!0;return!1}const flattenObject=(i,e)=>{let t={};for(const n in i){const s=e?`${e}_${n}`:n;typeof i[n]=="object"&&!Array.isArray(i[n])?t={...t,...flattenObject(i[n],s)}:t[s]=i[n]}return t},findIntersectionBetweenTwoArray=(i,e)=>i.filter(t=>!e.includes(t)),sortLanguages=i=>{const e={fa:1,en:2};return i.slice().sort((t,n)=>{const s=e[t.lang]||999,r=e[n.lang]||999;return s-r})},hexToRGB=(i,e=1,t=!1)=>{const n=parseInt(i.slice(1,3),16),s=parseInt(i.slice(3,5),16),r=parseInt(i.slice(5,7),16);return t?`${n} ${s} ${r}`:e?"rgba("+n+", "+s+", "+r+", "+e+")":"rgb("+n+", "+s+", "+r+")"},checkIsOnPremise=i=>{const{params:e}=store.getState().videoData;return conditions(ConditionName.isOnPermise)?window.location.origin:e.baseUrl??i},handle360=async()=>{let i=!1;(window.DeviceOrientationEvent||window.DeviceMotionEvent)&&(i=await GyroControl.isAvailable());const e=new View360("#videoTagContainer",{zoomRange:{min:.35,max:3},initialZoom:.41,gyro:i});return e.on("inputStart",()=>store.dispatch(setIsViewChangeIn360(!0))),e.on("inputEnd",()=>store.dispatch(setIsViewChangeIn360(!1))),e.load(new EquirectProjection({src:videoTag(),video:{autoplay:!0}})),e},fullConfig=resolveConfig(config),getTailwindColor=i=>i.split(".").reduce((e,t)=>e==null?void 0:e[t],fullConfig.theme),sendFluentLog=i=>{const{poll_emoji:e}=store.getState().user.settings,{params:t,details:n}=store.getState().videoData;let s={...i,timestamp:Date.now(),clientUUID:getUUID(),uuid:getUUID(),link:window.location.href,user_id:conditions(ConditionName.isLiveParam)?Number(t.id):n.user_id,live_id:conditions(ConditionName.isLiveParam)?n.id:null,format:i.category==="feedback"?conditions(ConditionName.isStaticFormat)?"static":"hls":void 0,content_type:n.content_type,content_id:n.content_id};conditions(ConditionName.isLiveParam)&&(s[featureToggle]=e),apiCaller({url:API().logs,method:"post",data:s})};function errorLogProvider(i){i&&sendFluentLog(ExceptionsLog(i.type,i.message))}class ErrorBoundary extends React2.Component{constructor(){super(...arguments);Te(this,"state",{hasError:!1,error:null,errorInfo:null})}static getDerivedStateFromError(){return{hasError:!0}}componentDidCatch(t,n){this.setState({error:t,errorInfo:n}),console.log(t,n),errorLogProvider({type:"OTHER_ERROR",message:t.message})}render(){return this.state.hasError?jsxRuntime.jsx(jsxRuntime.Fragment,{}):this.props.children}}const useAppDispatch=()=>useDispatch(),useAppSelector=useSelector,useKeyPress=(i,e)=>{const t=React2.useRef(e);React2.useEffect(()=>{t.current=e},[]),React2.useEffect(()=>{const n=s=>{s.code===i&&!["INPUT","TEXTAREA"].includes(s.target.nodeName)&&!s.target.isContentEditable&&!conditions(ConditionName.showTagsPopover)&&!conditions(ConditionName.showPersonalMarkerPopover)&&!conditions(ConditionName.showFeedbackPopover)&&t.current(s)};return document.addEventListener("keydown",n),()=>document.removeEventListener("keydown",n)},[i])},useHandleKeyPress=()=>{const i=useAppDispatch();useKeyPress("Space",e=>{conditions(ConditionName.isPressKeySpace)&&handlePlayPause(e)}),useKeyPress("KeyK",e=>{conditions(ConditionName.isPressKeyK)&&handlePlayPause(e)}),useKeyPress("ArrowRight",e=>{conditions(ConditionName.isPressKeyArrowRight)&&conditions(ConditionName.hasTimeMachine)&&handleBackwardForward("forward",15,e)}),useKeyPress("ArrowLeft",e=>{conditions(ConditionName.isPressKeyArrowLeft)&&conditions(ConditionName.hasTimeMachine)&&handleBackwardForward("backward",15,e)}),useKeyPress("KeyI",()=>{conditions(ConditionName.isPressKeyI)&&videoTag().requestPictureInPicture()}),useKeyPress("KeyF",()=>{conditions(ConditionName.isPressKeyF)&&handleFullScreen()}),useKeyPress("KeyL",()=>{conditions(ConditionName.isPressKeyL)&&handleLock(conditions(ConditionName.isLock)?"unlock":"lock")}),useKeyPress("KeyC",()=>{conditions(ConditionName.isPressKeyC)&&handleSubtitle()}),useKeyPress("KeyN",()=>{conditions(ConditionName.isPressKeyN)&&(handleClickRecommendationCard(),handleClickVideoCard())}),useKeyPress("KeyQ",()=>{if(conditions(ConditionName.isPressKeyQ)){const{multiLivesPopover:e}=store.getState().popovers;i(setMultiLivesPopovers(!e))}}),useKeyPress("KeyE",()=>{if(conditions(ConditionName.isPressKeyE)){const{markersListPopover:e}=store.getState().popovers;i(setClearPopoversSlice()),i(setMarkersListPopover(!e)),conditions(ConditionName.isActiveElements)?conditions(ConditionName.showMarkerListPopover)||i(setActiveElements(!1)):i(setActiveElements(!0))}}),useKeyPress("KeyS",()=>{const{speedPopover:e}=store.getState().popovers;i(setClearPopoversSlice()),conditions(ConditionName.isPressKeyS)&&(i(setSpeedPopover(!e)),conditions(ConditionName.isActiveElements)?conditions(ConditionName.showSpeedPopover)||i(setActiveElements(!1)):i(setActiveElements(!0)))}),useKeyPress("KeyM",()=>{if(conditions(ConditionName.isPressKeyM)){const{settings:e}=store.getState().user;handleChangeSoundVolume(e.volume?0:50)}})},useColorSwitcher=()=>{const i=window.matchMedia("(prefers-color-scheme: light)"),e=localStorage.getItem("theme");i.addEventListener("change",function(n){n.matches?t(Theme.DARK):t(Theme.LIGHT)});const t=n=>{const s=window.document.documentElement;s.classList.remove(n===Theme.DARK?Theme.LIGHT:Theme.DARK),s.classList.add(n),localStorage.setItem("theme",n)};return React2.useEffect(()=>{e&&t("light")},[e]),null},useHandleParams=i=>{const e=useAppDispatch(),{token:t,params:n}=useAppSelector(({videoData:{token:E,params:F}})=>({token:E,params:F}),shallowEqual),{isClickInnerCard:s}=useAppSelector(({controller:{isClickInnerCard:E}})=>({isClickInnerCard:E}),shallowEqual),[r,a]=React2.useState([]),[o,l]=React2.useState([]);let d={};const f=async()=>{i.isAuth==="true"?t&&e(setIsReady(!0)):e(setIsReady(!0))},u=()=>e(setPlayerParams(d)),p=()=>{if(i.theme){const E=i.theme===Theme.LIGHT?Theme.LIGHT:Theme.DARK;e(setTheme(E)),d.theme=E}else window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?(e(setTheme(Theme.DARK)),d.theme="dark"):(e(setTheme(Theme.LIGHT)),d.theme="light")},m=()=>{let E=d.featureSet;return typeof d.featureSet=="string"&&(E=strToObj(d.featureSet)),d.featureSet=E,d},g=()=>{i.uuid&&(localStorage.setItem("hamrahiUUID",i.uuid),d.uuid=i.uuid)},y=()=>{const E=api.get("xToken");E&&!d.xToken&&(d.xToken=E)},v=()=>{d={portrait:conditions(ConditionName.isTouchScreen)&&i.isGeneral!=="true"?"true":"false",provider:"unknown",chart:"true",authentication:"true",...i},e(setIsComplexDesktop(d.portrait==="true"&&!conditions(ConditionName.isTouchScreen))),e(setIsComplexPortrait(handleIsComplexPortrait({portrait:d.portrait,...i})))},b=()=>{const E=String(i["e-url"]),F=String(i["e-cover"]);d={src:E.endsWith("/")?window.atob(E.slice(0,-1)):window.atob(E),type:i.type,fullscreen:i.fullscreen,autoplay:i.autoplay,snapshot:i.snapshot,portrait:"false",fullrate:i.fullrate,width:i.width,height:i.height,cover:F&&F!=="undefined"?window.atob(F):void 0,onFinished:i.onFinished,onSnapshot:i.onSnapshot,uuid:getUUID(),disableMiniPlayer:i.disableMiniPlayer}},C=(E,F,O)=>{const A=Object.keys(E);let N=findIntersectionBetweenTwoArray(F,A),M=A.filter(Z=>findIntersectionBetweenTwoArray(findIntersectionBetweenTwoArray(allParams,F),O).includes(Z));return{requiredItems:N,notRequiredItems:M}},_=()=>{let E=[],F=[];return i.quiz==="true"?(E=quizConditions.required,F=quizConditions.optionals):i.raw==="true"?(E=rawConditions.required,F=rawConditions.optionals):i.isGeneral==="true"?(E=isGeneralConditions.required,F=isGeneralConditions.optionals):i.type==="mp4"?(E=staticConditions.required,F=staticConditions.optionals):["live","vod","archive","clip"].includes(String(i.type))&&(E=nonStaticConditions.required,F=nonStaticConditions.optionals),{requiredConditions:E,optionalsConditions:F}},R=async()=>{if(d={},Object.keys(i).includes("type")){const{requiredItems:E,notRequiredItems:F}=C(i,_().requiredConditions,_().optionalsConditions);l(F),E.length?a(E):(["live","vod","archive","clip"].includes(String(i.type))?(v(),y()):staticFormats(String(i.type))&&b(),g(),Object.keys(d)&&m(),p(),u(),f())}else a(["type"])};return React2.useLayoutEffect(()=>{n.id&&i.quiz!=="true"&&s&&(i={...n,homeButtonClickFlag:i.homeButtonClickFlag},R())},[n.id]),React2.useLayoutEffect(()=>{R()},[i,t,s]),{requiredItems:r,notRequiredItems:o}},StaticPlayer=React2.lazy(()=>Promise.resolve().then(()=>player$1)),LiveAndVodPlayer$1=React2.lazy(()=>Promise.resolve().then(()=>player)),ParamsErrorPopover$1=React2.lazy(()=>Promise.resolve().then(()=>paramsErrorPopover)),VideoPlayer$2=({params:i})=>{const e=useAppDispatch();useAppSelector(({controller:{isFullScreen:a}})=>({isFullScreen:a}),shallowEqual),useAppSelector(({videoData:{isReady:a,params:o,isComplexPortrait:l}})=>({isReady:a,params:o,isComplexPortrait:l}),shallowEqual);const{requiredItems:t,notRequiredItems:n}=useHandleParams(i);useHandleKeyPress(),useColorSwitcher(),React2.useEffect(()=>(e(setIsClickInnerCard(!1)),()=>clearRedux()),[]),React2.useEffect(()=>{const a=localStorage.getItem("isAutoPlay");a&&e(setIsAutoPlay(a==="true")),Document.prototype.playPause=o=>handlePlayPauseInDOM(o),conditions(ConditionName.isIOS)||window.screen.orientation.addEventListener("change",o=>{!conditions(ConditionName.isFullScreen)&&conditions(ConditionName.isParamsPortrait)&&e(setIsComplexPortrait(!0));const l=document.getElementById("video-player-module");l&&(o.target.type.includes("landscape")&&!conditions(ConditionName.isFullScreen)?(l.classList.add("pl-overflow-scroll"),l.classList.remove("pl-overflow-hidden")):(l.classList.add("pl-overflow-hidden"),l.classList.remove("pl-overflow-scroll")))})},[]);const s=()=>{let a="";return conditions(ConditionName.isParamsPortrait)?window.innerWidth>window.innerHeight&&conditions(ConditionName.isFullScreen)?a="pl-overflow-hidden":window.innerWidth>window.innerHeight&&!conditions(ConditionName.isFullScreen)?a="pl-overflow-auto":window.innerWidth<window.innerHeight&&(a="pl-overflow-hidden"):a="pl-overflow-hidden",a};let r=jsxRuntime.jsx(jsxRuntime.Fragment,{});return t.length||n.length||!conditions(ConditionName.hasAllParams)?r=jsxRuntime.jsx(React2.Suspense,{fallback:"",children:jsxRuntime.jsx(ParamsErrorPopover$1,{requiredItems:t,notRequiredItems:n})}):conditions(ConditionName.isReady)?r=jsxRuntime.jsx("div",{className:`video-player-container ${s()} ${conditions(ConditionName.isComplexPortrait)&&"!no-scrollbar pl-max-h-[100dvh]"} ${conditions(ConditionName.isFullScreen)&&"pl-fixed pl-right-0 pl-top-0 pl-h-screen pl-w-screen !pl-overflow-hidden"}`,style:{zIndex:zIndex.videoPlayerInFullScreen,touchAction:"pan-y"},id:"video-player-module",children:jsxRuntime.jsx(React2.Suspense,{fallback:"",children:conditions(ConditionName.isStaticFormat)?jsxRuntime.jsx(StaticPlayer,{}):jsxRuntime.jsx(LiveAndVodPlayer$1,{})})}):r=jsxRuntime.jsx("div",{className:"!pl-aspect-video pl-max-h-screen pl-w-full pl-overflow-hidden pl-bg-white dark:pl-bg-black"}),jsxRuntime.jsxs(ErrorBoundary,{children:[jsxRuntime.jsx(nt,{position:"bottom-right",autoClose:3e3,theme:conditions(ConditionName.isDarkMode)?"dark":"light"}),r]})};var dist={},hasRequiredDist;function requireDist(){if(hasRequiredDist)return dist;hasRequiredDist=1,Object.defineProperty(dist,"__esModule",{value:!0}),dist.parse=a,dist.serialize=d;const i=/^[\u0021-\u003A\u003C\u003E-\u007E]+$/,e=/^[\u0021-\u003A\u003C-\u007E]*$/,t=/^([.]?[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)([.][a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)*$/i,n=/^[\u0020-\u003A\u003D-\u007E]*$/,s=Object.prototype.toString,r=(()=>{const p=function(){};return p.prototype=Object.create(null),p})();function a(p,m){const g=new r,y=p.length;if(y<2)return g;const v=(m==null?void 0:m.decode)||f;let b=0;do{const C=p.indexOf("=",b);if(C===-1)break;const _=p.indexOf(";",b),R=_===-1?y:_;if(C>R){b=p.lastIndexOf(";",C-1)+1;continue}const E=o(p,b,C),F=l(p,C,E),O=p.slice(E,F);if(g[O]===void 0){let A=o(p,C+1,R),N=l(p,R,A);const M=v(p.slice(A,N));g[O]=M}b=R+1}while(b<y);return g}function o(p,m,g){do{const y=p.charCodeAt(m);if(y!==32&&y!==9)return m}while(++m<g);return g}function l(p,m,g){for(;m>g;){const y=p.charCodeAt(--m);if(y!==32&&y!==9)return m+1}return g}function d(p,m,g){const y=(g==null?void 0:g.encode)||encodeURIComponent;if(!i.test(p))throw new TypeError(`argument name is invalid: ${p}`);const v=y(m);if(!e.test(v))throw new TypeError(`argument val is invalid: ${m}`);let b=p+"="+v;if(!g)return b;if(g.maxAge!==void 0){if(!Number.isInteger(g.maxAge))throw new TypeError(`option maxAge is invalid: ${g.maxAge}`);b+="; Max-Age="+g.maxAge}if(g.domain){if(!t.test(g.domain))throw new TypeError(`option domain is invalid: ${g.domain}`);b+="; Domain="+g.domain}if(g.path){if(!n.test(g.path))throw new TypeError(`option path is invalid: ${g.path}`);b+="; Path="+g.path}if(g.expires){if(!u(g.expires)||!Number.isFinite(g.expires.valueOf()))throw new TypeError(`option expires is invalid: ${g.expires}`);b+="; Expires="+g.expires.toUTCString()}if(g.httpOnly&&(b+="; HttpOnly"),g.secure&&(b+="; Secure"),g.partitioned&&(b+="; Partitioned"),g.priority)switch(typeof g.priority=="string"?g.priority.toLowerCase():void 0){case"low":b+="; Priority=Low";break;case"medium":b+="; Priority=Medium";break;case"high":b+="; Priority=High";break;default:throw new TypeError(`option priority is invalid: ${g.priority}`)}if(g.sameSite)switch(typeof g.sameSite=="string"?g.sameSite.toLowerCase():g.sameSite){case!0:case"strict":b+="; SameSite=Strict";break;case"lax":b+="; SameSite=Lax";break;case"none":b+="; SameSite=None";break;default:throw new TypeError(`option sameSite is invalid: ${g.sameSite}`)}return b}function f(p){if(p.indexOf("%")===-1)return p;try{return decodeURIComponent(p)}catch{return p}}function u(p){return s.call(p)==="[object Date]"}return dist}requireDist();/**
|
|
80
80
|
* react-router v7.3.0
|
|
81
81
|
*
|
|
82
82
|
* Copyright (c) Remix Software Inc.
|
|
@@ -88,7 +88,7 @@ attribute vec3 position;attribute vec2 uv;uniform mat4 uMVMatrix;uniform mat4 uP
|
|
|
88
88
|
*/var PopStateEventType="popstate";function createBrowserHistory(i={}){function e(n,s){let{pathname:r,search:a,hash:o}=n.location;return createLocation("",{pathname:r,search:a,hash:o},s.state&&s.state.usr||null,s.state&&s.state.key||"default")}function t(n,s){return typeof s=="string"?s:createPath(s)}return getUrlBasedHistory(e,t,null,i)}function invariant(i,e){if(i===!1||i===null||typeof i>"u")throw new Error(e)}function warning(i,e){if(!i){typeof console<"u"&&console.warn(e);try{throw new Error(e)}catch{}}}function createKey(){return Math.random().toString(36).substring(2,10)}function getHistoryState(i,e){return{usr:i.state,key:i.key,idx:e}}function createLocation(i,e,t=null,n){return{pathname:typeof i=="string"?i:i.pathname,search:"",hash:"",...typeof e=="string"?parsePath(e):e,state:t,key:e&&e.key||n||createKey()}}function createPath({pathname:i="/",search:e="",hash:t=""}){return e&&e!=="?"&&(i+=e.charAt(0)==="?"?e:"?"+e),t&&t!=="#"&&(i+=t.charAt(0)==="#"?t:"#"+t),i}function parsePath(i){let e={};if(i){let t=i.indexOf("#");t>=0&&(e.hash=i.substring(t),i=i.substring(0,t));let n=i.indexOf("?");n>=0&&(e.search=i.substring(n),i=i.substring(0,n)),i&&(e.pathname=i)}return e}function getUrlBasedHistory(i,e,t,n={}){let{window:s=document.defaultView,v5Compat:r=!1}=n,a=s.history,o="POP",l=null,d=f();d==null&&(d=0,a.replaceState({...a.state,idx:d},""));function f(){return(a.state||{idx:null}).idx}function u(){o="POP";let v=f(),b=v==null?null:v-d;d=v,l&&l({action:o,location:y.location,delta:b})}function p(v,b){o="PUSH";let C=createLocation(y.location,v,b);d=f()+1;let _=getHistoryState(C,d),R=y.createHref(C);try{a.pushState(_,"",R)}catch(E){if(E instanceof DOMException&&E.name==="DataCloneError")throw E;s.location.assign(R)}r&&l&&l({action:o,location:y.location,delta:1})}function m(v,b){o="REPLACE";let C=createLocation(y.location,v,b);d=f();let _=getHistoryState(C,d),R=y.createHref(C);a.replaceState(_,"",R),r&&l&&l({action:o,location:y.location,delta:0})}function g(v){let b=s.location.origin!=="null"?s.location.origin:s.location.href,C=typeof v=="string"?v:createPath(v);return C=C.replace(/ $/,"%20"),invariant(b,`No window.location.(origin|href) available to create URL for href: ${C}`),new URL(C,b)}let y={get action(){return o},get location(){return i(s,a)},listen(v){if(l)throw new Error("A history only accepts one active listener");return s.addEventListener(PopStateEventType,u),l=v,()=>{s.removeEventListener(PopStateEventType,u),l=null}},createHref(v){return e(s,v)},createURL:g,encodeLocation(v){let b=g(v);return{pathname:b.pathname,search:b.search,hash:b.hash}},push:p,replace:m,go(v){return a.go(v)}};return y}function matchRoutes(i,e,t="/"){return matchRoutesImpl(i,e,t,!1)}function matchRoutesImpl(i,e,t,n){let s=typeof e=="string"?parsePath(e):e,r=stripBasename(s.pathname||"/",t);if(r==null)return null;let a=flattenRoutes(i);rankRouteBranches(a);let o=null;for(let l=0;o==null&&l<a.length;++l){let d=decodePath(r);o=matchRouteBranch(a[l],d,n)}return o}function flattenRoutes(i,e=[],t=[],n=""){let s=(r,a,o)=>{let l={relativePath:o===void 0?r.path||"":o,caseSensitive:r.caseSensitive===!0,childrenIndex:a,route:r};l.relativePath.startsWith("/")&&(invariant(l.relativePath.startsWith(n),`Absolute route path "${l.relativePath}" nested under path "${n}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),l.relativePath=l.relativePath.slice(n.length));let d=joinPaths([n,l.relativePath]),f=t.concat(l);r.children&&r.children.length>0&&(invariant(r.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${d}".`),flattenRoutes(r.children,e,f,d)),!(r.path==null&&!r.index)&&e.push({path:d,score:computeScore(d,r.index),routesMeta:f})};return i.forEach((r,a)=>{var o;if(r.path===""||!((o=r.path)!=null&&o.includes("?")))s(r,a);else for(let l of explodeOptionalSegments(r.path))s(r,a,l)}),e}function explodeOptionalSegments(i){let e=i.split("/");if(e.length===0)return[];let[t,...n]=e,s=t.endsWith("?"),r=t.replace(/\?$/,"");if(n.length===0)return s?[r,""]:[r];let a=explodeOptionalSegments(n.join("/")),o=[];return o.push(...a.map(l=>l===""?r:[r,l].join("/"))),s&&o.push(...a),o.map(l=>i.startsWith("/")&&l===""?"/":l)}function rankRouteBranches(i){i.sort((e,t)=>e.score!==t.score?t.score-e.score:compareIndexes(e.routesMeta.map(n=>n.childrenIndex),t.routesMeta.map(n=>n.childrenIndex)))}var paramRe=/^:[\w-]+$/,dynamicSegmentValue=3,indexRouteValue=2,emptySegmentValue=1,staticSegmentValue=10,splatPenalty=-2,isSplat=i=>i==="*";function computeScore(i,e){let t=i.split("/"),n=t.length;return t.some(isSplat)&&(n+=splatPenalty),e&&(n+=indexRouteValue),t.filter(s=>!isSplat(s)).reduce((s,r)=>s+(paramRe.test(r)?dynamicSegmentValue:r===""?emptySegmentValue:staticSegmentValue),n)}function compareIndexes(i,e){return i.length===e.length&&i.slice(0,-1).every((n,s)=>n===e[s])?i[i.length-1]-e[e.length-1]:0}function matchRouteBranch(i,e,t=!1){let{routesMeta:n}=i,s={},r="/",a=[];for(let o=0;o<n.length;++o){let l=n[o],d=o===n.length-1,f=r==="/"?e:e.slice(r.length)||"/",u=matchPath({path:l.relativePath,caseSensitive:l.caseSensitive,end:d},f),p=l.route;if(!u&&d&&t&&!n[n.length-1].route.index&&(u=matchPath({path:l.relativePath,caseSensitive:l.caseSensitive,end:!1},f)),!u)return null;Object.assign(s,u.params),a.push({params:s,pathname:joinPaths([r,u.pathname]),pathnameBase:normalizePathname(joinPaths([r,u.pathnameBase])),route:p}),u.pathnameBase!=="/"&&(r=joinPaths([r,u.pathnameBase]))}return a}function matchPath(i,e){typeof i=="string"&&(i={path:i,caseSensitive:!1,end:!0});let[t,n]=compilePath(i.path,i.caseSensitive,i.end),s=e.match(t);if(!s)return null;let r=s[0],a=r.replace(/(.)\/+$/,"$1"),o=s.slice(1);return{params:n.reduce((d,{paramName:f,isOptional:u},p)=>{if(f==="*"){let g=o[p]||"";a=r.slice(0,r.length-g.length).replace(/(.)\/+$/,"$1")}const m=o[p];return u&&!m?d[f]=void 0:d[f]=(m||"").replace(/%2F/g,"/"),d},{}),pathname:r,pathnameBase:a,pattern:i}}function compilePath(i,e=!1,t=!0){warning(i==="*"||!i.endsWith("*")||i.endsWith("/*"),`Route path "${i}" will be treated as if it were "${i.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${i.replace(/\*$/,"/*")}".`);let n=[],s="^"+i.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(a,o,l)=>(n.push({paramName:o,isOptional:l!=null}),l?"/?([^\\/]+)?":"/([^\\/]+)"));return i.endsWith("*")?(n.push({paramName:"*"}),s+=i==="*"||i==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):t?s+="\\/*$":i!==""&&i!=="/"&&(s+="(?:(?=\\/|$))"),[new RegExp(s,e?void 0:"i"),n]}function decodePath(i){try{return i.split("/").map(e=>decodeURIComponent(e).replace(/\//g,"%2F")).join("/")}catch(e){return warning(!1,`The URL path "${i}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${e}).`),i}}function stripBasename(i,e){if(e==="/")return i;if(!i.toLowerCase().startsWith(e.toLowerCase()))return null;let t=e.endsWith("/")?e.length-1:e.length,n=i.charAt(t);return n&&n!=="/"?null:i.slice(t)||"/"}function resolvePath(i,e="/"){let{pathname:t,search:n="",hash:s=""}=typeof i=="string"?parsePath(i):i;return{pathname:t?t.startsWith("/")?t:resolvePathname(t,e):e,search:normalizeSearch(n),hash:normalizeHash(s)}}function resolvePathname(i,e){let t=e.replace(/\/+$/,"").split("/");return i.split("/").forEach(s=>{s===".."?t.length>1&&t.pop():s!=="."&&t.push(s)}),t.length>1?t.join("/"):"/"}function getInvalidPathError(i,e,t,n){return`Cannot include a '${i}' character in a manually specified \`to.${e}\` field [${JSON.stringify(n)}]. Please separate it out to the \`to.${t}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function getPathContributingMatches(i){return i.filter((e,t)=>t===0||e.route.path&&e.route.path.length>0)}function getResolveToMatches(i){let e=getPathContributingMatches(i);return e.map((t,n)=>n===e.length-1?t.pathname:t.pathnameBase)}function resolveTo(i,e,t,n=!1){let s;typeof i=="string"?s=parsePath(i):(s={...i},invariant(!s.pathname||!s.pathname.includes("?"),getInvalidPathError("?","pathname","search",s)),invariant(!s.pathname||!s.pathname.includes("#"),getInvalidPathError("#","pathname","hash",s)),invariant(!s.search||!s.search.includes("#"),getInvalidPathError("#","search","hash",s)));let r=i===""||s.pathname==="",a=r?"/":s.pathname,o;if(a==null)o=t;else{let u=e.length-1;if(!n&&a.startsWith("..")){let p=a.split("/");for(;p[0]==="..";)p.shift(),u-=1;s.pathname=p.join("/")}o=u>=0?e[u]:"/"}let l=resolvePath(s,o),d=a&&a!=="/"&&a.endsWith("/"),f=(r||a===".")&&t.endsWith("/");return!l.pathname.endsWith("/")&&(d||f)&&(l.pathname+="/"),l}var joinPaths=i=>i.join("/").replace(/\/\/+/g,"/"),normalizePathname=i=>i.replace(/\/+$/,"").replace(/^\/*/,"/"),normalizeSearch=i=>!i||i==="?"?"":i.startsWith("?")?i:"?"+i,normalizeHash=i=>!i||i==="#"?"":i.startsWith("#")?i:"#"+i;function isRouteErrorResponse(i){return i!=null&&typeof i.status=="number"&&typeof i.statusText=="string"&&typeof i.internal=="boolean"&&"data"in i}var validMutationMethodsArr=["POST","PUT","PATCH","DELETE"];new Set(validMutationMethodsArr);var validRequestMethodsArr=["GET",...validMutationMethodsArr];new Set(validRequestMethodsArr);var DataRouterContext=React2__namespace.createContext(null);DataRouterContext.displayName="DataRouter";var DataRouterStateContext=React2__namespace.createContext(null);DataRouterStateContext.displayName="DataRouterState";var ViewTransitionContext=React2__namespace.createContext({isTransitioning:!1});ViewTransitionContext.displayName="ViewTransition";var FetchersContext=React2__namespace.createContext(new Map);FetchersContext.displayName="Fetchers";var AwaitContext=React2__namespace.createContext(null);AwaitContext.displayName="Await";var NavigationContext=React2__namespace.createContext(null);NavigationContext.displayName="Navigation";var LocationContext=React2__namespace.createContext(null);LocationContext.displayName="Location";var RouteContext=React2__namespace.createContext({outlet:null,matches:[],isDataRoute:!1});RouteContext.displayName="Route";var RouteErrorContext=React2__namespace.createContext(null);RouteErrorContext.displayName="RouteError";function useHref(i,{relative:e}={}){invariant(useInRouterContext(),"useHref() may be used only in the context of a <Router> component.");let{basename:t,navigator:n}=React2__namespace.useContext(NavigationContext),{hash:s,pathname:r,search:a}=useResolvedPath(i,{relative:e}),o=r;return t!=="/"&&(o=r==="/"?t:joinPaths([t,r])),n.createHref({pathname:o,search:a,hash:s})}function useInRouterContext(){return React2__namespace.useContext(LocationContext)!=null}function useLocation(){return invariant(useInRouterContext(),"useLocation() may be used only in the context of a <Router> component."),React2__namespace.useContext(LocationContext).location}var navigateEffectWarning="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function useIsomorphicLayoutEffect(i){React2__namespace.useContext(NavigationContext).static||React2__namespace.useLayoutEffect(i)}function useNavigate(){let{isDataRoute:i}=React2__namespace.useContext(RouteContext);return i?useNavigateStable():useNavigateUnstable()}function useNavigateUnstable(){invariant(useInRouterContext(),"useNavigate() may be used only in the context of a <Router> component.");let i=React2__namespace.useContext(DataRouterContext),{basename:e,navigator:t}=React2__namespace.useContext(NavigationContext),{matches:n}=React2__namespace.useContext(RouteContext),{pathname:s}=useLocation(),r=JSON.stringify(getResolveToMatches(n)),a=React2__namespace.useRef(!1);return useIsomorphicLayoutEffect(()=>{a.current=!0}),React2__namespace.useCallback((l,d={})=>{if(warning(a.current,navigateEffectWarning),!a.current)return;if(typeof l=="number"){t.go(l);return}let f=resolveTo(l,JSON.parse(r),s,d.relative==="path");i==null&&e!=="/"&&(f.pathname=f.pathname==="/"?e:joinPaths([e,f.pathname])),(d.replace?t.replace:t.push)(f,d.state,d)},[e,t,r,s,i])}React2__namespace.createContext(null);function useResolvedPath(i,{relative:e}={}){let{matches:t}=React2__namespace.useContext(RouteContext),{pathname:n}=useLocation(),s=JSON.stringify(getResolveToMatches(t));return React2__namespace.useMemo(()=>resolveTo(i,JSON.parse(s),n,e==="path"),[i,s,n,e])}function useRoutesImpl(i,e,t,n){invariant(useInRouterContext(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:s,static:r}=React2__namespace.useContext(NavigationContext),{matches:a}=React2__namespace.useContext(RouteContext),o=a[a.length-1],l=o?o.params:{},d=o?o.pathname:"/",f=o?o.pathnameBase:"/",u=o&&o.route;{let C=u&&u.path||"";warningOnce(d,!u||C.endsWith("*")||C.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${d}" (under <Route path="${C}">) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render.
|
|
89
89
|
|
|
90
90
|
Please change the parent <Route path="${C}"> to <Route path="${C==="/"?"*":`${C}/*`}">.`)}let p=useLocation(),m;m=p;let g=m.pathname||"/",y=g;if(f!=="/"){let C=f.replace(/^\//,"").split("/");y="/"+g.replace(/^\//,"").split("/").slice(C.length).join("/")}let v=!r&&t&&t.matches&&t.matches.length>0?t.matches:matchRoutes(i,{pathname:y});return warning(u||v!=null,`No routes matched location "${m.pathname}${m.search}${m.hash}" `),warning(v==null||v[v.length-1].route.element!==void 0||v[v.length-1].route.Component!==void 0||v[v.length-1].route.lazy!==void 0,`Matched leaf route at location "${m.pathname}${m.search}${m.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`),_renderMatches(v&&v.map(C=>Object.assign({},C,{params:Object.assign({},l,C.params),pathname:joinPaths([f,s.encodeLocation?s.encodeLocation(C.pathname).pathname:C.pathname]),pathnameBase:C.pathnameBase==="/"?f:joinPaths([f,s.encodeLocation?s.encodeLocation(C.pathnameBase).pathname:C.pathnameBase])})),a,t,n)}function DefaultErrorComponent(){let i=useRouteError(),e=isRouteErrorResponse(i)?`${i.status} ${i.statusText}`:i instanceof Error?i.message:JSON.stringify(i),t=i instanceof Error?i.stack:null,n="rgba(200,200,200, 0.5)",s={padding:"0.5rem",backgroundColor:n},r={padding:"2px 4px",backgroundColor:n},a=null;return console.error("Error handled by React Router default ErrorBoundary:",i),a=React2__namespace.createElement(React2__namespace.Fragment,null,React2__namespace.createElement("p",null,"💿 Hey developer 👋"),React2__namespace.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",React2__namespace.createElement("code",{style:r},"ErrorBoundary")," or"," ",React2__namespace.createElement("code",{style:r},"errorElement")," prop on your route.")),React2__namespace.createElement(React2__namespace.Fragment,null,React2__namespace.createElement("h2",null,"Unexpected Application Error!"),React2__namespace.createElement("h3",{style:{fontStyle:"italic"}},e),t?React2__namespace.createElement("pre",{style:s},t):null,a)}var defaultErrorElement=React2__namespace.createElement(DefaultErrorComponent,null),RenderErrorBoundary=class extends React2__namespace.Component{constructor(i){super(i),this.state={location:i.location,revalidation:i.revalidation,error:i.error}}static getDerivedStateFromError(i){return{error:i}}static getDerivedStateFromProps(i,e){return e.location!==i.location||e.revalidation!=="idle"&&i.revalidation==="idle"?{error:i.error,location:i.location,revalidation:i.revalidation}:{error:i.error!==void 0?i.error:e.error,location:e.location,revalidation:i.revalidation||e.revalidation}}componentDidCatch(i,e){console.error("React Router caught the following error during render",i,e)}render(){return this.state.error!==void 0?React2__namespace.createElement(RouteContext.Provider,{value:this.props.routeContext},React2__namespace.createElement(RouteErrorContext.Provider,{value:this.state.error,children:this.props.component})):this.props.children}};function RenderedRoute({routeContext:i,match:e,children:t}){let n=React2__namespace.useContext(DataRouterContext);return n&&n.static&&n.staticContext&&(e.route.errorElement||e.route.ErrorBoundary)&&(n.staticContext._deepestRenderedBoundaryId=e.route.id),React2__namespace.createElement(RouteContext.Provider,{value:i},t)}function _renderMatches(i,e=[],t=null,n=null){if(i==null){if(!t)return null;if(t.errors)i=t.matches;else if(e.length===0&&!t.initialized&&t.matches.length>0)i=t.matches;else return null}let s=i,r=t==null?void 0:t.errors;if(r!=null){let l=s.findIndex(d=>d.route.id&&(r==null?void 0:r[d.route.id])!==void 0);invariant(l>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(r).join(",")}`),s=s.slice(0,Math.min(s.length,l+1))}let a=!1,o=-1;if(t)for(let l=0;l<s.length;l++){let d=s[l];if((d.route.HydrateFallback||d.route.hydrateFallbackElement)&&(o=l),d.route.id){let{loaderData:f,errors:u}=t,p=d.route.loader&&!f.hasOwnProperty(d.route.id)&&(!u||u[d.route.id]===void 0);if(d.route.lazy||p){a=!0,o>=0?s=s.slice(0,o+1):s=[s[0]];break}}}return s.reduceRight((l,d,f)=>{let u,p=!1,m=null,g=null;t&&(u=r&&d.route.id?r[d.route.id]:void 0,m=d.route.errorElement||defaultErrorElement,a&&(o<0&&f===0?(warningOnce("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),p=!0,g=null):o===f&&(p=!0,g=d.route.hydrateFallbackElement||null)));let y=e.concat(s.slice(0,f+1)),v=()=>{let b;return u?b=m:p?b=g:d.route.Component?b=React2__namespace.createElement(d.route.Component,null):d.route.element?b=d.route.element:b=l,React2__namespace.createElement(RenderedRoute,{match:d,routeContext:{outlet:l,matches:y,isDataRoute:t!=null},children:b})};return t&&(d.route.ErrorBoundary||d.route.errorElement||f===0)?React2__namespace.createElement(RenderErrorBoundary,{location:t.location,revalidation:t.revalidation,component:m,error:u,children:v(),routeContext:{outlet:null,matches:y,isDataRoute:!0}}):v()},null)}function getDataRouterConsoleError(i){return`${i} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function useDataRouterContext(i){let e=React2__namespace.useContext(DataRouterContext);return invariant(e,getDataRouterConsoleError(i)),e}function useDataRouterState(i){let e=React2__namespace.useContext(DataRouterStateContext);return invariant(e,getDataRouterConsoleError(i)),e}function useRouteContext(i){let e=React2__namespace.useContext(RouteContext);return invariant(e,getDataRouterConsoleError(i)),e}function useCurrentRouteId(i){let e=useRouteContext(i),t=e.matches[e.matches.length-1];return invariant(t.route.id,`${i} can only be used on routes that contain a unique "id"`),t.route.id}function useRouteId(){return useCurrentRouteId("useRouteId")}function useRouteError(){var n;let i=React2__namespace.useContext(RouteErrorContext),e=useDataRouterState("useRouteError"),t=useCurrentRouteId("useRouteError");return i!==void 0?i:(n=e.errors)==null?void 0:n[t]}function useNavigateStable(){let{router:i}=useDataRouterContext("useNavigate"),e=useCurrentRouteId("useNavigate"),t=React2__namespace.useRef(!1);return useIsomorphicLayoutEffect(()=>{t.current=!0}),React2__namespace.useCallback(async(s,r={})=>{warning(t.current,navigateEffectWarning),t.current&&(typeof s=="number"?i.navigate(s):await i.navigate(s,{fromRouteId:e,...r}))},[i,e])}var alreadyWarned={};function warningOnce(i,e,t){!e&&!alreadyWarned[i]&&(alreadyWarned[i]=!0,warning(!1,t))}React2__namespace.memo(DataRoutes);function DataRoutes({routes:i,future:e,state:t}){return useRoutesImpl(i,void 0,t,e)}function Router({basename:i="/",children:e=null,location:t,navigationType:n="POP",navigator:s,static:r=!1}){invariant(!useInRouterContext(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let a=i.replace(/^\/*/,"/"),o=React2__namespace.useMemo(()=>({basename:a,navigator:s,static:r,future:{}}),[a,s,r]);typeof t=="string"&&(t=parsePath(t));let{pathname:l="/",search:d="",hash:f="",state:u=null,key:p="default"}=t,m=React2__namespace.useMemo(()=>{let g=stripBasename(l,a);return g==null?null:{location:{pathname:g,search:d,hash:f,state:u,key:p},navigationType:n}},[a,l,d,f,u,p,n]);return warning(m!=null,`<Router basename="${a}"> is not able to match the URL "${l}${d}${f}" because it does not start with the basename, so the <Router> won't render anything.`),m==null?null:React2__namespace.createElement(NavigationContext.Provider,{value:o},React2__namespace.createElement(LocationContext.Provider,{children:e,value:m}))}var defaultMethod="get",defaultEncType="application/x-www-form-urlencoded";function isHtmlElement(i){return i!=null&&typeof i.tagName=="string"}function isButtonElement(i){return isHtmlElement(i)&&i.tagName.toLowerCase()==="button"}function isFormElement(i){return isHtmlElement(i)&&i.tagName.toLowerCase()==="form"}function isInputElement(i){return isHtmlElement(i)&&i.tagName.toLowerCase()==="input"}function isModifiedEvent(i){return!!(i.metaKey||i.altKey||i.ctrlKey||i.shiftKey)}function shouldProcessLinkClick(i,e){return i.button===0&&(!e||e==="_self")&&!isModifiedEvent(i)}var _formDataSupportsSubmitter=null;function isFormDataSubmitterSupported(){if(_formDataSupportsSubmitter===null)try{new FormData(document.createElement("form"),0),_formDataSupportsSubmitter=!1}catch{_formDataSupportsSubmitter=!0}return _formDataSupportsSubmitter}var supportedFormEncTypes=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function getFormEncType(i){return i!=null&&!supportedFormEncTypes.has(i)?(warning(!1,`"${i}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${defaultEncType}"`),null):i}function getFormSubmissionInfo(i,e){let t,n,s,r,a;if(isFormElement(i)){let o=i.getAttribute("action");n=o?stripBasename(o,e):null,t=i.getAttribute("method")||defaultMethod,s=getFormEncType(i.getAttribute("enctype"))||defaultEncType,r=new FormData(i)}else if(isButtonElement(i)||isInputElement(i)&&(i.type==="submit"||i.type==="image")){let o=i.form;if(o==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let l=i.getAttribute("formaction")||o.getAttribute("action");if(n=l?stripBasename(l,e):null,t=i.getAttribute("formmethod")||o.getAttribute("method")||defaultMethod,s=getFormEncType(i.getAttribute("formenctype"))||getFormEncType(o.getAttribute("enctype"))||defaultEncType,r=new FormData(o,i),!isFormDataSubmitterSupported()){let{name:d,type:f,value:u}=i;if(f==="image"){let p=d?`${d}.`:"";r.append(`${p}x`,"0"),r.append(`${p}y`,"0")}else d&&r.append(d,u)}}else{if(isHtmlElement(i))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');t=defaultMethod,n=null,s=defaultEncType,a=i}return r&&s==="text/plain"&&(a=r,r=void 0),{action:n,method:t.toLowerCase(),encType:s,formData:r,body:a}}function invariant2(i,e){if(i===!1||i===null||typeof i>"u")throw new Error(e)}async function loadRouteModule(i,e){if(i.id in e)return e[i.id];try{let t=await import(i.module);return e[i.id]=t,t}catch(t){return console.error(`Error loading route module \`${i.module}\`, reloading page...`),console.error(t),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function isHtmlLinkDescriptor(i){return i==null?!1:i.href==null?i.rel==="preload"&&typeof i.imageSrcSet=="string"&&typeof i.imageSizes=="string":typeof i.rel=="string"&&typeof i.href=="string"}async function getKeyedPrefetchLinks(i,e,t){let n=await Promise.all(i.map(async s=>{let r=e.routes[s.route.id];if(r){let a=await loadRouteModule(r,t);return a.links?a.links():[]}return[]}));return dedupeLinkDescriptors(n.flat(1).filter(isHtmlLinkDescriptor).filter(s=>s.rel==="stylesheet"||s.rel==="preload").map(s=>s.rel==="stylesheet"?{...s,rel:"prefetch",as:"style"}:{...s,rel:"prefetch"}))}function getNewMatchesForLinks(i,e,t,n,s,r){let a=(l,d)=>t[d]?l.route.id!==t[d].route.id:!0,o=(l,d)=>{var f;return t[d].pathname!==l.pathname||((f=t[d].route.path)==null?void 0:f.endsWith("*"))&&t[d].params["*"]!==l.params["*"]};return r==="assets"?e.filter((l,d)=>a(l,d)||o(l,d)):r==="data"?e.filter((l,d)=>{var u;let f=n.routes[l.route.id];if(!f||!f.hasLoader)return!1;if(a(l,d)||o(l,d))return!0;if(l.route.shouldRevalidate){let p=l.route.shouldRevalidate({currentUrl:new URL(s.pathname+s.search+s.hash,window.origin),currentParams:((u=t[0])==null?void 0:u.params)||{},nextUrl:new URL(i,window.origin),nextParams:l.params,defaultShouldRevalidate:!0});if(typeof p=="boolean")return p}return!0}):[]}function getModuleLinkHrefs(i,e,{includeHydrateFallback:t}={}){return dedupeHrefs(i.map(n=>{let s=e.routes[n.route.id];if(!s)return[];let r=[s.module];return s.clientActionModule&&(r=r.concat(s.clientActionModule)),s.clientLoaderModule&&(r=r.concat(s.clientLoaderModule)),t&&s.hydrateFallbackModule&&(r=r.concat(s.hydrateFallbackModule)),s.imports&&(r=r.concat(s.imports)),r}).flat(1))}function dedupeHrefs(i){return[...new Set(i)]}function sortKeys(i){let e={},t=Object.keys(i).sort();for(let n of t)e[n]=i[n];return e}function dedupeLinkDescriptors(i,e){let t=new Set;return new Set(e),i.reduce((n,s)=>{let r=JSON.stringify(sortKeys(s));return t.has(r)||(t.add(r),n.push({key:r,link:s})),n},[])}function singleFetchUrl(i,e){let t=typeof i=="string"?new URL(i,typeof window>"u"?"server://singlefetch/":window.location.origin):i;return t.pathname==="/"?t.pathname="_root.data":e&&stripBasename(t.pathname,e)==="/"?t.pathname=`${e.replace(/\/$/,"")}/_root.data`:t.pathname=`${t.pathname.replace(/\/$/,"")}.data`,t}function useDataRouterContext2(){let i=React2__namespace.useContext(DataRouterContext);return invariant2(i,"You must render this element inside a <DataRouterContext.Provider> element"),i}function useDataRouterStateContext(){let i=React2__namespace.useContext(DataRouterStateContext);return invariant2(i,"You must render this element inside a <DataRouterStateContext.Provider> element"),i}var FrameworkContext=React2__namespace.createContext(void 0);FrameworkContext.displayName="FrameworkContext";function useFrameworkContext(){let i=React2__namespace.useContext(FrameworkContext);return invariant2(i,"You must render this element inside a <HydratedRouter> element"),i}function usePrefetchBehavior(i,e){let t=React2__namespace.useContext(FrameworkContext),[n,s]=React2__namespace.useState(!1),[r,a]=React2__namespace.useState(!1),{onFocus:o,onBlur:l,onMouseEnter:d,onMouseLeave:f,onTouchStart:u}=e,p=React2__namespace.useRef(null);React2__namespace.useEffect(()=>{if(i==="render"&&a(!0),i==="viewport"){let y=b=>{b.forEach(C=>{a(C.isIntersecting)})},v=new IntersectionObserver(y,{threshold:.5});return p.current&&v.observe(p.current),()=>{v.disconnect()}}},[i]),React2__namespace.useEffect(()=>{if(n){let y=setTimeout(()=>{a(!0)},100);return()=>{clearTimeout(y)}}},[n]);let m=()=>{s(!0)},g=()=>{s(!1),a(!1)};return t?i!=="intent"?[r,p,{}]:[r,p,{onFocus:composeEventHandlers(o,m),onBlur:composeEventHandlers(l,g),onMouseEnter:composeEventHandlers(d,m),onMouseLeave:composeEventHandlers(f,g),onTouchStart:composeEventHandlers(u,m)}]:[!1,p,{}]}function composeEventHandlers(i,e){return t=>{i&&i(t),t.defaultPrevented||e(t)}}function PrefetchPageLinks({page:i,...e}){let{router:t}=useDataRouterContext2(),n=React2__namespace.useMemo(()=>matchRoutes(t.routes,i,t.basename),[t.routes,i,t.basename]);return n?React2__namespace.createElement(PrefetchPageLinksImpl,{page:i,matches:n,...e}):null}function useKeyedPrefetchLinks(i){let{manifest:e,routeModules:t}=useFrameworkContext(),[n,s]=React2__namespace.useState([]);return React2__namespace.useEffect(()=>{let r=!1;return getKeyedPrefetchLinks(i,e,t).then(a=>{r||s(a)}),()=>{r=!0}},[i,e,t]),n}function PrefetchPageLinksImpl({page:i,matches:e,...t}){let n=useLocation(),{manifest:s,routeModules:r}=useFrameworkContext(),{basename:a}=useDataRouterContext2(),{loaderData:o,matches:l}=useDataRouterStateContext(),d=React2__namespace.useMemo(()=>getNewMatchesForLinks(i,e,l,s,n,"data"),[i,e,l,s,n]),f=React2__namespace.useMemo(()=>getNewMatchesForLinks(i,e,l,s,n,"assets"),[i,e,l,s,n]),u=React2__namespace.useMemo(()=>{if(i===n.pathname+n.search+n.hash)return[];let g=new Set,y=!1;if(e.forEach(b=>{var _;let C=s.routes[b.route.id];!C||!C.hasLoader||(!d.some(R=>R.route.id===b.route.id)&&b.route.id in o&&((_=r[b.route.id])!=null&&_.shouldRevalidate)||C.hasClientLoader?y=!0:g.add(b.route.id))}),g.size===0)return[];let v=singleFetchUrl(i,a);return y&&g.size>0&&v.searchParams.set("_routes",e.filter(b=>g.has(b.route.id)).map(b=>b.route.id).join(",")),[v.pathname+v.search]},[a,o,n,s,d,e,i,r]),p=React2__namespace.useMemo(()=>getModuleLinkHrefs(f,s),[f,s]),m=useKeyedPrefetchLinks(f);return React2__namespace.createElement(React2__namespace.Fragment,null,u.map(g=>React2__namespace.createElement("link",{key:g,rel:"prefetch",as:"fetch",href:g,...t})),p.map(g=>React2__namespace.createElement("link",{key:g,rel:"modulepreload",href:g,...t})),m.map(({key:g,link:y})=>React2__namespace.createElement("link",{key:g,...y})))}function mergeRefs(...i){return e=>{i.forEach(t=>{typeof t=="function"?t(e):t!=null&&(t.current=e)})}}var isBrowser$1=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{isBrowser$1&&(window.__reactRouterVersion="7.3.0")}catch(i){}function BrowserRouter({basename:i,children:e,window:t}){let n=React2__namespace.useRef();n.current==null&&(n.current=createBrowserHistory({window:t,v5Compat:!0}));let s=n.current,[r,a]=React2__namespace.useState({action:s.action,location:s.location}),o=React2__namespace.useCallback(l=>{React2__namespace.startTransition(()=>a(l))},[a]);return React2__namespace.useLayoutEffect(()=>s.listen(o),[s,o]),React2__namespace.createElement(Router,{basename:i,children:e,location:r.location,navigationType:r.action,navigator:s})}var ABSOLUTE_URL_REGEX2=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Link=React2__namespace.forwardRef(function i({onClick:e,discover:t="render",prefetch:n="none",relative:s,reloadDocument:r,replace:a,state:o,target:l,to:d,preventScrollReset:f,viewTransition:u,...p},m){let{basename:g}=React2__namespace.useContext(NavigationContext),y=typeof d=="string"&&ABSOLUTE_URL_REGEX2.test(d),v,b=!1;if(typeof d=="string"&&y&&(v=d,isBrowser$1))try{let N=new URL(window.location.href),M=d.startsWith("//")?new URL(N.protocol+d):new URL(d),Z=stripBasename(M.pathname,g);M.origin===N.origin&&Z!=null?d=Z+M.search+M.hash:b=!0}catch{warning(!1,`<Link to="${d}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}let C=useHref(d,{relative:s}),[_,R,E]=usePrefetchBehavior(n,p),F=useLinkClickHandler(d,{replace:a,state:o,target:l,preventScrollReset:f,relative:s,viewTransition:u});function O(N){e&&e(N),N.defaultPrevented||F(N)}let A=React2__namespace.createElement("a",{...p,...E,href:v||C,onClick:b||r?e:O,ref:mergeRefs(m,R),target:l,"data-discover":!y&&t==="render"?"true":void 0});return _&&!y?React2__namespace.createElement(React2__namespace.Fragment,null,A,React2__namespace.createElement(PrefetchPageLinks,{page:C})):A});Link.displayName="Link";var NavLink=React2__namespace.forwardRef(function i({"aria-current":e="page",caseSensitive:t=!1,className:n="",end:s=!1,style:r,to:a,viewTransition:o,children:l,...d},f){let u=useResolvedPath(a,{relative:d.relative}),p=useLocation(),m=React2__namespace.useContext(DataRouterStateContext),{navigator:g,basename:y}=React2__namespace.useContext(NavigationContext),v=m!=null&&useViewTransitionState(u)&&o===!0,b=g.encodeLocation?g.encodeLocation(u).pathname:u.pathname,C=p.pathname,_=m&&m.navigation&&m.navigation.location?m.navigation.location.pathname:null;t||(C=C.toLowerCase(),_=_?_.toLowerCase():null,b=b.toLowerCase()),_&&y&&(_=stripBasename(_,y)||_);const R=b!=="/"&&b.endsWith("/")?b.length-1:b.length;let E=C===b||!s&&C.startsWith(b)&&C.charAt(R)==="/",F=_!=null&&(_===b||!s&&_.startsWith(b)&&_.charAt(b.length)==="/"),O={isActive:E,isPending:F,isTransitioning:v},A=E?e:void 0,N;typeof n=="function"?N=n(O):N=[n,E?"active":null,F?"pending":null,v?"transitioning":null].filter(Boolean).join(" ");let M=typeof r=="function"?r(O):r;return React2__namespace.createElement(Link,{...d,"aria-current":A,className:N,ref:f,style:M,to:a,viewTransition:o},typeof l=="function"?l(O):l)});NavLink.displayName="NavLink";var Form=React2__namespace.forwardRef(({discover:i="render",fetcherKey:e,navigate:t,reloadDocument:n,replace:s,state:r,method:a=defaultMethod,action:o,onSubmit:l,relative:d,preventScrollReset:f,viewTransition:u,...p},m)=>{let g=useSubmit(),y=useFormAction(o,{relative:d}),v=a.toLowerCase()==="get"?"get":"post",b=typeof o=="string"&&ABSOLUTE_URL_REGEX2.test(o),C=_=>{if(l&&l(_),_.defaultPrevented)return;_.preventDefault();let R=_.nativeEvent.submitter,E=(R==null?void 0:R.getAttribute("formmethod"))||a;g(R||_.currentTarget,{fetcherKey:e,method:E,navigate:t,replace:s,state:r,relative:d,preventScrollReset:f,viewTransition:u})};return React2__namespace.createElement("form",{ref:m,method:v,action:y,onSubmit:n?l:C,...p,"data-discover":!b&&i==="render"?"true":void 0})});Form.displayName="Form";function getDataRouterConsoleError2(i){return`${i} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function useDataRouterContext3(i){let e=React2__namespace.useContext(DataRouterContext);return invariant(e,getDataRouterConsoleError2(i)),e}function useLinkClickHandler(i,{target:e,replace:t,state:n,preventScrollReset:s,relative:r,viewTransition:a}={}){let o=useNavigate(),l=useLocation(),d=useResolvedPath(i,{relative:r});return React2__namespace.useCallback(f=>{if(shouldProcessLinkClick(f,e)){f.preventDefault();let u=t!==void 0?t:createPath(l)===createPath(d);o(i,{replace:u,state:n,preventScrollReset:s,relative:r,viewTransition:a})}},[l,o,d,t,n,e,i,s,r,a])}var fetcherId=0,getUniqueFetcherId=()=>`__${String(++fetcherId)}__`;function useSubmit(){let{router:i}=useDataRouterContext3("useSubmit"),{basename:e}=React2__namespace.useContext(NavigationContext),t=useRouteId();return React2__namespace.useCallback(async(n,s={})=>{let{action:r,method:a,encType:o,formData:l,body:d}=getFormSubmissionInfo(n,e);if(s.navigate===!1){let f=s.fetcherKey||getUniqueFetcherId();await i.fetch(f,t,s.action||r,{preventScrollReset:s.preventScrollReset,formData:l,body:d,formMethod:s.method||a,formEncType:s.encType||o,flushSync:s.flushSync})}else await i.navigate(s.action||r,{preventScrollReset:s.preventScrollReset,formData:l,body:d,formMethod:s.method||a,formEncType:s.encType||o,replace:s.replace,state:s.state,fromRouteId:t,flushSync:s.flushSync,viewTransition:s.viewTransition})},[i,e,t])}function useFormAction(i,{relative:e}={}){let{basename:t}=React2__namespace.useContext(NavigationContext),n=React2__namespace.useContext(RouteContext);invariant(n,"useFormAction must be used inside a RouteContext");let[s]=n.matches.slice(-1),r={...useResolvedPath(i||".",{relative:e})},a=useLocation();if(i==null){r.search=a.search;let o=new URLSearchParams(r.search),l=o.getAll("index");if(l.some(f=>f==="")){o.delete("index"),l.filter(u=>u).forEach(u=>o.append("index",u));let f=o.toString();r.search=f?`?${f}`:""}}return(!i||i===".")&&s.route.index&&(r.search=r.search?r.search.replace(/^\?/,"?index&"):"?index"),t!=="/"&&(r.pathname=r.pathname==="/"?t:joinPaths([t,r.pathname])),createPath(r)}function useViewTransitionState(i,e={}){let t=React2__namespace.useContext(ViewTransitionContext);invariant(t!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:n}=useDataRouterContext3("useViewTransitionState"),s=useResolvedPath(i,{relative:e.relative});if(!t.isTransitioning)return!1;let r=stripBasename(t.currentLocation.pathname,n)||t.currentLocation.pathname,a=stripBasename(t.nextLocation.pathname,n)||t.nextLocation.pathname;return matchPath(s.pathname,a)!=null||matchPath(s.pathname,r)!=null}new TextEncoder;const VideoPlayerLibrary=({params:i})=>(React2.useEffect(()=>{const e=hexToRGB(i.playerColor??getTailwindColor("colors.red.zProgress"),0,!0),t=hexToRGB(i.playerColor??getTailwindColor("colors.main.light"),0,!0);document.documentElement.style.setProperty("--color-playerColor",e),document.documentElement.style.setProperty("--color-playerColor1",t)},[]),jsxRuntime.jsx(Provider_default,{store,children:jsxRuntime.jsx(BrowserRouter,{children:jsxRuntime.jsx(ErrorBoundary,{children:jsxRuntime.jsx(VideoPlayer$2,{params:i})})})})),StaticVideoTag$1=React2.lazy(()=>Promise.resolve().then(()=>staticVideoTag)),NonStaticVideoTag$1=React2.lazy(()=>Promise.resolve().then(()=>nonStaticVideoTag)),MultiLiveVideoTag$1=React2.lazy(()=>Promise.resolve().then(()=>multiLiveVideoTag)),VideoTag=({isMultiLive:i})=>(useAppSelector(({videoData:{multiLives:e}})=>({multiLives:e}),shallowEqual),jsxRuntime.jsx(React2.Suspense,{fallback:"",children:conditions(ConditionName.isStaticFormat)?jsxRuntime.jsx(StaticVideoTag$1,{}):i?jsxRuntime.jsx(MultiLiveVideoTag$1,{}):jsxRuntime.jsx(NonStaticVideoTag$1,{})})),fullScreen="data:image/svg+xml,%3csvg%20width='24'%20height='24'%20viewBox='0%200%2024%2024'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M2%209.75C1.59%209.75%201.25%209.41%201.25%209V6.5C1.25%203.61%203.61%201.25%206.5%201.25H9C9.41%201.25%209.75%201.59%209.75%202C9.75%202.41%209.41%202.75%209%202.75H6.5C4.43%202.75%202.75%204.43%202.75%206.5V9C2.75%209.41%202.41%209.75%202%209.75Z'%20fill='white'/%3e%3cpath%20d='M22%209.75C21.59%209.75%2021.25%209.41%2021.25%209V6.5C21.25%204.43%2019.57%202.75%2017.5%202.75H15C14.59%202.75%2014.25%202.41%2014.25%202C14.25%201.59%2014.59%201.25%2015%201.25H17.5C20.39%201.25%2022.75%203.61%2022.75%206.5V9C22.75%209.41%2022.41%209.75%2022%209.75Z'%20fill='white'/%3e%3cpath%20d='M17.5%2022.75H16C15.59%2022.75%2015.25%2022.41%2015.25%2022C15.25%2021.59%2015.59%2021.25%2016%2021.25H17.5C19.57%2021.25%2021.25%2019.57%2021.25%2017.5V16C21.25%2015.59%2021.59%2015.25%2022%2015.25C22.41%2015.25%2022.75%2015.59%2022.75%2016V17.5C22.75%2020.39%2020.39%2022.75%2017.5%2022.75Z'%20fill='white'/%3e%3cpath%20d='M9%2022.75H6.5C3.61%2022.75%201.25%2020.39%201.25%2017.5V15C1.25%2014.59%201.59%2014.25%202%2014.25C2.41%2014.25%202.75%2014.59%202.75%2015V17.5C2.75%2019.57%204.43%2021.25%206.5%2021.25H9C9.41%2021.25%209.75%2021.59%209.75%2022C9.75%2022.41%209.41%2022.75%209%2022.75Z'%20fill='white'/%3e%3c/svg%3e",nonFullScreen="data:image/svg+xml,%3csvg%20width='24'%20height='24'%20viewBox='0%200%2024%2024'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M9.4502%201.69922C9.8602%201.69922%2010.2002%202.03922%2010.2002%202.44922L10.2002%204.94922C10.2002%207.83922%207.8402%2010.1992%204.9502%2010.1992L2.4502%2010.1992C2.0402%2010.1992%201.7002%209.85922%201.7002%209.44922C1.7002%209.03922%202.0402%208.69922%202.4502%208.69922L4.9502%208.69922C7.0202%208.69922%208.7002%207.01922%208.7002%204.94922L8.7002%202.44922C8.7002%202.03922%209.0402%201.69922%209.4502%201.69922Z'%20fill='white'/%3e%3cpath%20d='M14.4502%201.69922C14.8602%201.69922%2015.2002%202.03922%2015.2002%202.44922L15.2002%204.94922C15.2002%207.01922%2016.8802%208.69922%2018.9502%208.69922L21.4502%208.69922C21.8602%208.69922%2022.2002%209.03922%2022.2002%209.44922C22.2002%209.85922%2021.8602%2010.1992%2021.4502%2010.1992L18.9502%2010.1992C16.0602%2010.1992%2013.7002%207.83922%2013.7002%204.94922L13.7002%202.44922C13.7002%202.03922%2014.0402%201.69922%2014.4502%201.69922Z'%20fill='white'/%3e%3cpath%20d='M19.6514%2013.7032L21.3506%2013.7032C21.815%2013.7032%2022.2002%2014.0884%2022.2002%2014.5528C22.2002%2015.0173%2021.815%2015.4024%2021.3506%2015.4024L19.6514%2015.4024C17.3065%2015.4024%2015.4034%2017.3055%2015.4034%2019.6504L15.4034%2021.3496C15.4034%2021.8141%2015.0182%2022.1992%2014.5538%2022.1992C14.0893%2022.1992%2013.7042%2021.8141%2013.7042%2021.3496L13.7042%2019.6504C13.7042%2016.3766%2016.3776%2013.7032%2019.6514%2013.7032Z'%20fill='white'/%3e%3cpath%20d='M2.4502%2013.6992L4.9502%2013.6992C7.8402%2013.6992%2010.2002%2016.0592%2010.2002%2018.9492L10.2002%2021.4492C10.2002%2021.8592%209.8602%2022.1992%209.4502%2022.1992C9.0402%2022.1992%208.7002%2021.8592%208.7002%2021.4492L8.7002%2018.9492C8.7002%2016.8792%207.0202%2015.1992%204.9502%2015.1992L2.4502%2015.1992C2.0402%2015.1992%201.7002%2014.8592%201.7002%2014.4492C1.7002%2014.0392%202.0402%2013.6992%202.4502%2013.6992Z'%20fill='white'/%3e%3c/svg%3e",settings="data:image/svg+xml,%3csvg%20width='20'%20height='20'%20viewBox='0%200%2020%2020'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M10%2013.125C8.275%2013.125%206.875%2011.725%206.875%2010C6.875%208.275%208.275%206.875%2010%206.875C11.725%206.875%2013.125%208.275%2013.125%2010C13.125%2011.725%2011.725%2013.125%2010%2013.125ZM10%208.125C8.96667%208.125%208.125%208.96667%208.125%2010C8.125%2011.0333%208.96667%2011.875%2010%2011.875C11.0333%2011.875%2011.875%2011.0333%2011.875%2010C11.875%208.96667%2011.0333%208.125%2010%208.125Z'%20fill='white'/%3e%3cpath%20d='M12.6753%2018.4913C12.5003%2018.4913%2012.3253%2018.4663%2012.1503%2018.4246C11.6337%2018.2829%2011.2003%2017.9579%2010.9253%2017.4996L10.8253%2017.3329C10.3337%2016.4829%209.65866%2016.4829%209.16699%2017.3329L9.07533%2017.4913C8.80033%2017.9579%208.36699%2018.2913%207.85033%2018.4246C7.32533%2018.5663%206.78366%2018.4913%206.32533%2018.2163L4.89199%2017.3913C4.38366%2017.0996%204.01699%2016.6246%203.85866%2016.0496C3.70866%2015.4746%203.78366%2014.8829%204.07533%2014.3746C4.31699%2013.9496%204.38366%2013.5663%204.24199%2013.3246C4.10033%2013.0829%203.74199%2012.9413%203.25033%2012.9413C2.03366%2012.9413%201.04199%2011.9496%201.04199%2010.7329V9.26625C1.04199%208.04959%202.03366%207.05792%203.25033%207.05792C3.74199%207.05792%204.10033%206.91625%204.24199%206.67459C4.38366%206.43292%204.32533%206.04959%204.07533%205.62459C3.78366%205.11625%203.70866%204.51625%203.85866%203.94959C4.00866%203.37459%204.37533%202.89959%204.89199%202.60792L6.33366%201.78292C7.27533%201.22459%208.51699%201.54959%209.08366%202.50792L9.18366%202.67459C9.67533%203.52459%2010.3503%203.52459%2010.842%202.67459L10.9337%202.51625C11.5003%201.54959%2012.742%201.22459%2013.692%201.79125L15.1253%202.61625C15.6337%202.90792%2016.0003%203.38292%2016.1587%203.95792C16.3087%204.53292%2016.2337%205.12459%2015.942%205.63292C15.7003%206.05792%2015.6337%206.44126%2015.7753%206.68292C15.917%206.92459%2016.2753%207.06625%2016.767%207.06625C17.9837%207.06625%2018.9753%208.05792%2018.9753%209.27459V10.7413C18.9753%2011.9579%2017.9837%2012.9496%2016.767%2012.9496C16.2753%2012.9496%2015.917%2013.0913%2015.7753%2013.3329C15.6337%2013.5746%2015.692%2013.9579%2015.942%2014.3829C16.2337%2014.8913%2016.317%2015.4913%2016.1587%2016.0579C16.0087%2016.6329%2015.642%2017.1079%2015.1253%2017.3996L13.6837%2018.2246C13.367%2018.3996%2013.0253%2018.4913%2012.6753%2018.4913ZM10.0003%2015.4079C10.742%2015.4079%2011.4337%2015.8746%2011.9087%2016.6996L12.0003%2016.8579C12.1003%2017.0329%2012.267%2017.1579%2012.467%2017.2079C12.667%2017.2579%2012.867%2017.2329%2013.0337%2017.1329L14.4753%2016.2996C14.692%2016.1746%2014.8587%2015.9663%2014.9253%2015.7163C14.992%2015.4663%2014.9587%2015.2079%2014.8337%2014.9913C14.3587%2014.1746%2014.3003%2013.3329%2014.667%2012.6913C15.0337%2012.0496%2015.792%2011.6829%2016.742%2011.6829C17.2753%2011.6829%2017.7003%2011.2579%2017.7003%2010.7246V9.25792C17.7003%208.73292%2017.2753%208.29959%2016.742%208.29959C15.792%208.29959%2015.0337%207.93292%2014.667%207.29125C14.3003%206.64959%2014.3587%205.80792%2014.8337%204.99125C14.9587%204.77459%2014.992%204.51625%2014.9253%204.26625C14.8587%204.01625%2014.7003%203.81625%2014.4837%203.68292L13.042%202.85792C12.6837%202.64125%2012.2087%202.76625%2011.992%203.13292L11.9003%203.29125C11.4253%204.11625%2010.7337%204.58292%209.99199%204.58292C9.25033%204.58292%208.55866%204.11625%208.08366%203.29125L7.99199%203.12459C7.78366%202.77459%207.31699%202.64959%206.95866%202.85792L5.51699%203.69125C5.30033%203.81625%205.13366%204.02459%205.06699%204.27459C5.00033%204.52459%205.03366%204.78292%205.15866%204.99959C5.63366%205.81625%205.69199%206.65792%205.32533%207.29959C4.95866%207.94126%204.20033%208.30792%203.25033%208.30792C2.71699%208.30792%202.29199%208.73292%202.29199%209.26625V10.7329C2.29199%2011.2579%202.71699%2011.6913%203.25033%2011.6913C4.20033%2011.6913%204.95866%2012.0579%205.32533%2012.6996C5.69199%2013.3413%205.63366%2014.1829%205.15866%2014.9996C5.03366%2015.2163%205.00033%2015.4746%205.06699%2015.7246C5.13366%2015.9746%205.29199%2016.1746%205.50866%2016.3079L6.95033%2017.1329C7.12533%2017.2413%207.33366%2017.2663%207.52533%2017.2163C7.72533%2017.1663%207.89199%2017.0329%208.00033%2016.8579L8.09199%2016.6996C8.56699%2015.8829%209.25866%2015.4079%2010.0003%2015.4079Z'%20fill='white'/%3e%3c/svg%3e",play="data:image/svg+xml,%3csvg%20width='8'%20height='8'%20viewBox='0%200%208%208'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20opacity='0.8'%20d='M6.7834%201.99122L3.69034%200.315987C2.92241%20-0.105329%201.99449%20-0.105329%201.22656%200.315987C0.458626%200.737304%200%201.47962%200%202.32226V5.68276C0%206.51536%200.458626%207.26771%201.22656%207.68903C1.61052%207.89969%202.03715%208%202.45311%208C2.87974%208%203.29571%207.89969%203.67967%207.68903L6.77273%206.01379C7.54066%205.59248%207.99929%204.85016%207.99929%204.00752C8.02062%203.16489%207.56199%202.41254%206.7834%201.99122Z'%20fill='%234E4B66'/%3e%3c/svg%3e",playWhite="data:image/svg+xml,%3csvg%20width='13'%20height='14'%20viewBox='0%200%2013%2014'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M0.446289%202.61794V11.3904C0.446289%2013.1871%202.39879%2014.3146%203.95712%2013.4163L7.76129%2011.2254L11.5655%209.02544C13.1238%208.1271%2013.1238%205.88127%2011.5655%204.98294L7.76129%202.78294L3.95712%200.592106C2.39879%20-0.306227%200.446289%200.812106%200.446289%202.61794Z'%20fill='white'/%3e%3c/svg%3e",playNext="data:image/svg+xml,%3csvg%20width='22'%20height='22'%20viewBox='0%200%2022%2022'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M3.44629%206.61794V15.3904C3.44629%2017.1871%205.39879%2018.3146%206.95712%2017.4163L10.7613%2015.2254L14.5655%2013.0254C16.1238%2012.1271%2016.1238%209.88127%2014.5655%208.98294L10.7613%206.78294L6.95712%204.59211C5.39879%203.69377%203.44629%204.81211%203.44629%206.61794Z'%20fill='white'/%3e%3cpath%20d='M18.5537%2017.3534C18.1779%2017.3534%2017.8662%2017.0418%2017.8662%2016.6659V5.33594C17.8662%204.9601%2018.1779%204.64844%2018.5537%204.64844C18.9295%204.64844%2019.2412%204.9601%2019.2412%205.33594V16.6659C19.2412%2017.0418%2018.9387%2017.3534%2018.5537%2017.3534Z'%20fill='white'/%3e%3c/svg%3e",bigPlay="data:image/svg+xml,%3csvg%20width='24'%20height='24'%20viewBox='0%200%2024%2024'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3crect%20width='24'%20height='24'%20rx='12'%20fill='black'%20fill-opacity='0.5'/%3e%3cpath%20d='M7.5332%2011.9873V9.99028C7.5332%207.50301%209.4098%206.48658%2011.7077%207.73021L13.5587%208.73469L15.4098%209.73916C17.7077%2010.9828%2017.7077%2013.0156%2015.4098%2014.2593L13.5587%2015.2638L11.7077%2016.2682C9.4098%2017.5119%207.5332%2016.4954%207.5332%2014.0082V11.9873Z'%20fill='white'/%3e%3c/svg%3e",bigPlayNext="data:image/svg+xml,%3csvg%20width='32'%20height='32'%20viewBox='0%200%2032%2032'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3crect%20width='32'%20height='32'%20rx='16'%20fill='black'%20fill-opacity='0.5'/%3e%3cpath%20d='M11.5068%2012.813V19.193C11.5068%2020.4997%2012.9268%2021.3197%2014.0602%2020.6664L16.8268%2019.073L19.5935%2017.473C20.7268%2016.8197%2020.7268%2015.1864%2019.5935%2014.533L16.8268%2012.933L14.0602%2011.3397C12.9268%2010.6864%2011.5068%2011.4997%2011.5068%2012.813Z'%20fill='white'/%3e%3cpath%20d='M22.4932%2020.6209C22.2198%2020.6209%2021.9932%2020.3942%2021.9932%2020.1209V11.8809C21.9932%2011.6075%2022.2198%2011.3809%2022.4932%2011.3809C22.7665%2011.3809%2022.9932%2011.6075%2022.9932%2011.8809V20.1209C22.9932%2020.3942%2022.7732%2020.6209%2022.4932%2020.6209Z'%20fill='white'/%3e%3c/svg%3e",bigPlayPrevious="data:image/svg+xml,%3csvg%20width='32'%20height='32'%20viewBox='0%200%2032%2032'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3crect%20x='32'%20y='32'%20width='32'%20height='32'%20rx='16'%20transform='rotate(-180%2032%2032)'%20fill='black'%20fill-opacity='0.5'/%3e%3cpath%20d='M20.4932%2019.187V12.807C20.4932%2011.5003%2019.0732%2010.6803%2017.9398%2011.3336L15.1732%2012.927L12.4065%2014.527C11.2732%2015.1803%2011.2732%2016.8136%2012.4065%2017.467L15.1732%2019.067L17.9398%2020.6603C19.0732%2021.3136%2020.4932%2020.5003%2020.4932%2019.187Z'%20fill='white'/%3e%3cpath%20d='M9.50684%2011.3791C9.78017%2011.3791%2010.0068%2011.6058%2010.0068%2011.8791L10.0068%2020.1191C10.0068%2020.3925%209.78017%2020.6191%209.50684%2020.6191C9.2335%2020.6191%209.00684%2020.3925%209.00684%2020.1191L9.00684%2011.8791C9.00684%2011.6058%209.22684%2011.3791%209.50684%2011.3791Z'%20fill='white'/%3e%3c/svg%3e",pause="data:image/svg+xml,%3csvg%20width='22'%20height='22'%20viewBox='0%200%2022%2022'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M9.7625%2017.5175V4.4825C9.7625%203.245%209.24%202.75%207.92%202.75H4.5925C3.2725%202.75%202.75%203.245%202.75%204.4825V17.5175C2.75%2018.755%203.2725%2019.25%204.5925%2019.25H7.92C9.24%2019.25%209.7625%2018.755%209.7625%2017.5175Z'%20fill='white'/%3e%3cpath%20d='M19.2498%2017.5175V4.4825C19.2498%203.245%2018.7273%202.75%2017.4073%202.75H14.0798C12.769%202.75%2012.2373%203.245%2012.2373%204.4825V17.5175C12.2373%2018.755%2012.7598%2019.25%2014.0798%2019.25H17.4073C18.7273%2019.25%2019.2498%2018.755%2019.2498%2017.5175Z'%20fill='white'/%3e%3c/svg%3e",bigPause="data:image/svg+xml,%3csvg%20width='48'%20height='48'%20viewBox='0%200%2048%2048'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3crect%20width='48'%20height='48'%20rx='24'%20fill='black'%20fill-opacity='0.5'/%3e%3cpath%20d='M23.2267%2031.5844V16.4164C23.2267%2014.9764%2022.6187%2014.4004%2021.0827%2014.4004H17.2107C15.6747%2014.4004%2015.0667%2014.9764%2015.0667%2016.4164V31.5844C15.0667%2033.0244%2015.6747%2033.6004%2017.2107%2033.6004H21.0827C22.6187%2033.6004%2023.2267%2033.0244%2023.2267%2031.5844Z'%20fill='%23F5F5F5'/%3e%3cpath%20d='M34.5868%2031.5844V16.4164C34.5868%2014.9764%2033.9788%2014.4004%2032.4428%2014.4004H28.5708C27.0454%2014.4004%2026.4268%2014.9764%2026.4268%2016.4164V31.5844C26.4268%2033.0244%2027.0348%2033.6004%2028.5708%2033.6004H32.4428C33.9788%2033.6004%2034.5868%2033.0244%2034.5868%2031.5844Z'%20fill='%23F5F5F5'/%3e%3c/svg%3e",replay="data:image/svg+xml,%3csvg%20width='22'%20height='22'%20viewBox='0%200%2022%2022'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cmask%20id='path-1-inside-1_2221_115223'%20fill='white'%3e%3cpath%20d='M6.54606%204.84637C6.33227%204.55097%206.39713%204.1357%206.70863%203.94597C7.97732%203.17318%209.43458%202.75455%2010.9276%202.7404C12.6413%202.72415%2014.3172%203.24159%2015.723%204.22096C17.1287%205.20033%2018.1948%206.59313%2018.7733%208.20627C19.3518%209.8194%2019.4141%2011.573%2018.9516%2013.2238C18.489%2014.8747%2017.5246%2016.3411%2016.1919%2017.4198C14.8593%2018.4985%2013.2244%2019.136%2011.514%2019.2439C9.80361%2019.3518%208.10239%2018.9248%206.64618%2018.0221C5.37753%2017.2356%204.34961%2016.122%203.66683%2014.8036C3.49912%2014.4798%203.65939%2014.0911%203.99559%2013.9496V13.9496C4.33212%2013.8079%204.71702%2013.9678%204.88987%2014.2893C5.46304%2015.3556%206.30749%2016.2568%207.34279%2016.8986C8.56601%2017.6568%209.99504%2018.0155%2011.4318%2017.9249C12.8685%2017.8342%2014.2418%2017.2987%2015.3612%2016.3927C16.4807%2015.4866%2017.2908%2014.2548%2017.6793%2012.868C18.0678%2011.4813%2018.0155%2010.0083%2017.5296%208.65328C17.0436%207.29825%2016.1481%206.1283%2014.9673%205.30563C13.7864%204.48295%2012.3787%204.04831%2010.9392%204.06195C9.72072%204.0735%208.53061%204.40577%207.48657%205.01996C7.17194%205.20506%206.76004%205.14201%206.54606%204.84637V4.84637Z'/%3e%3c/mask%3e%3cpath%20d='M6.54606%204.84637C6.33227%204.55097%206.39713%204.1357%206.70863%203.94597C7.97732%203.17318%209.43458%202.75455%2010.9276%202.7404C12.6413%202.72415%2014.3172%203.24159%2015.723%204.22096C17.1287%205.20033%2018.1948%206.59313%2018.7733%208.20627C19.3518%209.8194%2019.4141%2011.573%2018.9516%2013.2238C18.489%2014.8747%2017.5246%2016.3411%2016.1919%2017.4198C14.8593%2018.4985%2013.2244%2019.136%2011.514%2019.2439C9.80361%2019.3518%208.10239%2018.9248%206.64618%2018.0221C5.37753%2017.2356%204.34961%2016.122%203.66683%2014.8036C3.49912%2014.4798%203.65939%2014.0911%203.99559%2013.9496V13.9496C4.33212%2013.8079%204.71702%2013.9678%204.88987%2014.2893C5.46304%2015.3556%206.30749%2016.2568%207.34279%2016.8986C8.56601%2017.6568%209.99504%2018.0155%2011.4318%2017.9249C12.8685%2017.8342%2014.2418%2017.2987%2015.3612%2016.3927C16.4807%2015.4866%2017.2908%2014.2548%2017.6793%2012.868C18.0678%2011.4813%2018.0155%2010.0083%2017.5296%208.65328C17.0436%207.29825%2016.1481%206.1283%2014.9673%205.30563C13.7864%204.48295%2012.3787%204.04831%2010.9392%204.06195C9.72072%204.0735%208.53061%204.40577%207.48657%205.01996C7.17194%205.20506%206.76004%205.14201%206.54606%204.84637V4.84637Z'%20stroke='white'%20stroke-width='20'%20stroke-linejoin='round'%20mask='url(%23path-1-inside-1_2221_115223)'/%3e%3cpath%20d='M3.85366%206.39732C3.80748%206.50766%203.89129%206.62874%204.01105%206.62471L8.1809%206.48428C8.31084%206.47991%208.38443%206.33383%208.3105%206.22702L5.74839%202.52559C5.67445%202.41878%205.5115%202.43574%205.46139%202.55547L3.85366%206.39732Z'%20fill='white'/%3e%3c/svg%3e",bigReplay="data:image/svg+xml,%3csvg%20width='56'%20height='56'%20viewBox='0%200%2056%2056'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3crect%20width='56'%20height='56'%20rx='28'%20fill='black'%20fill-opacity='0.5'/%3e%3cmask%20id='path-2-inside-1_2353_17395'%20fill='white'%3e%3cpath%20d='M21.5308%2019.8409C21.2161%2019.4197%2021.3167%2018.8183%2021.7801%2018.5462C23.6202%2017.4657%2025.7316%2016.8805%2027.8945%2016.8606C30.3871%2016.8378%2032.8248%2017.5668%2034.8696%2018.9468C36.9144%2020.3268%2038.4651%2022.2894%2039.3065%2024.5624C40.148%2026.8354%2040.2386%2029.3062%2039.5659%2031.6324C38.8931%2033.9586%2037.4902%2036.0248%2035.5518%2037.5448C33.6134%2039.0647%2031.2354%2039.9629%2028.7474%2040.115C26.2595%2040.267%2023.785%2039.6653%2021.6669%2038.3934C19.8261%2037.288%2018.3338%2035.724%2017.3407%2033.8724C17.0936%2033.4118%2017.3332%2032.85%2017.8291%2032.6478C18.3116%2032.4509%2018.8559%2032.6694%2019.1017%2033.1148C19.9356%2034.6255%2021.1679%2035.9022%2022.6801%2036.8103C24.4594%2037.8787%2026.538%2038.3841%2028.6278%2038.2564C30.7177%2038.1287%2032.7152%2037.3742%2034.3435%2036.0974C35.9718%2034.8207%2037.1501%2033.0851%2037.7153%2031.1311C38.2804%2029.1771%2038.2043%2027.1016%2037.4974%2025.1922C36.7906%2023.2829%2035.4881%2021.6344%2033.7704%2020.4752C32.0528%2019.316%2030.0051%2018.7036%2027.9113%2018.7228C26.1367%2018.7391%2024.4034%2019.2085%2022.8834%2020.076C22.4273%2020.3363%2021.8383%2020.2524%2021.5308%2019.8409Z'/%3e%3c/mask%3e%3cpath%20d='M21.5308%2019.8409C21.2161%2019.4197%2021.3167%2018.8183%2021.7801%2018.5462C23.6202%2017.4657%2025.7316%2016.8805%2027.8945%2016.8606C30.3871%2016.8378%2032.8248%2017.5668%2034.8696%2018.9468C36.9144%2020.3268%2038.4651%2022.2894%2039.3065%2024.5624C40.148%2026.8354%2040.2386%2029.3062%2039.5659%2031.6324C38.8931%2033.9586%2037.4902%2036.0248%2035.5518%2037.5448C33.6134%2039.0647%2031.2354%2039.9629%2028.7474%2040.115C26.2595%2040.267%2023.785%2039.6653%2021.6669%2038.3934C19.8261%2037.288%2018.3338%2035.724%2017.3407%2033.8724C17.0936%2033.4118%2017.3332%2032.85%2017.8291%2032.6478C18.3116%2032.4509%2018.8559%2032.6694%2019.1017%2033.1148C19.9356%2034.6255%2021.1679%2035.9022%2022.6801%2036.8103C24.4594%2037.8787%2026.538%2038.3841%2028.6278%2038.2564C30.7177%2038.1287%2032.7152%2037.3742%2034.3435%2036.0974C35.9718%2034.8207%2037.1501%2033.0851%2037.7153%2031.1311C38.2804%2029.1771%2038.2043%2027.1016%2037.4974%2025.1922C36.7906%2023.2829%2035.4881%2021.6344%2033.7704%2020.4752C32.0528%2019.316%2030.0051%2018.7036%2027.9113%2018.7228C26.1367%2018.7391%2024.4034%2019.2085%2022.8834%2020.076C22.4273%2020.3363%2021.8383%2020.2524%2021.5308%2019.8409Z'%20stroke='white'%20stroke-width='20'%20stroke-linejoin='round'%20mask='url(%23path-2-inside-1_2353_17395)'/%3e%3cpath%20d='M17.5626%2022.1126C17.5156%2022.2216%2017.6019%2022.3423%2017.7239%2022.3383L24.0338%2022.1325C24.1651%2022.1282%2024.2383%2021.9849%2024.163%2021.8795L20.286%2016.4537C20.2107%2016.3483%2020.0461%2016.3637%2019.9955%2016.4809L17.5626%2022.1126Z'%20fill='white'/%3e%3c/svg%3e",mute="data:image/svg+xml,%3csvg%20width='24'%20height='24'%20viewBox='0%200%2024%2024'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M7%2017.7504H5C2.58%2017.7504%201.25%2016.4204%201.25%2014.0004V10.0004C1.25%207.58036%202.58%206.25036%205%206.25036H6.43C6.66%206.25036%206.89%206.18036%207.09%206.06036L10.01%204.23036C11.47%203.32036%2012.89%203.15036%2014.01%203.77036C15.13%204.39036%2015.74%205.68036%2015.74%207.41036V8.37036C15.74%208.78036%2015.4%209.12036%2014.99%209.12036C14.58%209.12036%2014.24%208.78036%2014.24%208.37036V7.41036C14.24%206.27036%2013.89%205.42036%2013.28%205.09036C12.67%204.75036%2011.77%204.90036%2010.8%205.51036L7.88%207.33036C7.45%207.61036%206.94%207.75036%206.43%207.75036H5C3.42%207.75036%202.75%208.42036%202.75%2010.0004V14.0004C2.75%2015.5804%203.42%2016.2504%205%2016.2504H7C7.41%2016.2504%207.75%2016.5904%207.75%2017.0004C7.75%2017.4104%207.41%2017.7504%207%2017.7504Z'%20fill='white'/%3e%3cpath%20d='M12.5496%2020.5892C11.7596%2020.5892%2010.8896%2020.3092%2010.0196%2019.7592C9.6696%2019.5392%209.5596%2019.0792%209.7796%2018.7292C9.9996%2018.3792%2010.4596%2018.2692%2010.8096%2018.4892C11.7796%2019.0892%2012.6796%2019.2492%2013.2896%2018.9092C13.8996%2018.5692%2014.2496%2017.7192%2014.2496%2016.5892V12.9492C14.2496%2012.5392%2014.5896%2012.1992%2014.9996%2012.1992C15.4096%2012.1992%2015.7496%2012.5392%2015.7496%2012.9492V16.5892C15.7496%2018.3092%2015.1296%2019.6092%2014.0196%2020.2292C13.5696%2020.4692%2013.0696%2020.5892%2012.5496%2020.5892Z'%20fill='white'/%3e%3cpath%20d='M18.0003%2016.7503C17.8403%2016.7503%2017.6903%2016.7003%2017.5503%2016.6003C17.2203%2016.3503%2017.1503%2015.8803%2017.4003%2015.5503C18.6603%2013.8703%2018.9303%2011.6403%2018.1203%209.71032C17.9603%209.33032%2018.1403%208.89032%2018.5203%208.73032C18.9003%208.57032%2019.3403%208.75032%2019.5003%209.13032C20.5203%2011.5503%2020.1703%2014.3603%2018.6003%2016.4603C18.4503%2016.6503%2018.2303%2016.7503%2018.0003%2016.7503Z'%20fill='white'/%3e%3cpath%20d='M19.8304%2019.2492C19.6704%2019.2492%2019.5204%2019.1992%2019.3804%2019.0992C19.0504%2018.8492%2018.9804%2018.3792%2019.2304%2018.0492C21.3704%2015.1992%2021.8404%2011.3792%2020.4604%208.08922C20.3004%207.70922%2020.4804%207.26922%2020.8604%207.10922C21.2504%206.94922%2021.6804%207.12922%2021.8404%207.50922C23.4304%2011.2892%2022.8904%2015.6692%2020.4304%2018.9492C20.2904%2019.1492%2020.0604%2019.2492%2019.8304%2019.2492Z'%20fill='white'/%3e%3cpath%20d='M2.00043%2022.7495C1.81043%2022.7495%201.62043%2022.6795%201.47043%2022.5295C1.18043%2022.2395%201.18043%2021.7595%201.47043%2021.4695L21.4704%201.46945C21.7604%201.17945%2022.2404%201.17945%2022.5304%201.46945C22.8204%201.75945%2022.8204%202.23945%2022.5304%202.52945L2.53043%2022.5295C2.38043%2022.6795%202.19043%2022.7495%202.00043%2022.7495Z'%20fill='white'/%3e%3c/svg%3e",unMute="data:image/svg+xml,%3csvg%20width='24'%20height='24'%20viewBox='0%200%2024%2024'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M12.55%2020.5906C11.76%2020.5906%2010.89%2020.3106%2010.02%2019.7606L7.1%2017.9306C6.9%2017.8106%206.67%2017.7406%206.44%2017.7406H5C2.58%2017.7406%201.25%2016.4106%201.25%2013.9906V9.99059C1.25%207.57059%202.58%206.24059%205%206.24059H6.43C6.66%206.24059%206.89%206.17059%207.09%206.05059L10.01%204.22059C11.47%203.31059%2012.89%203.14059%2014.01%203.76059C15.13%204.38059%2015.74%205.67059%2015.74%207.40059V16.5706C15.74%2018.2906%2015.12%2019.5906%2014.01%2020.2106C13.57%2020.4706%2013.07%2020.5906%2012.55%2020.5906ZM5%207.75059C3.42%207.75059%202.75%208.42059%202.75%2010.0006V14.0006C2.75%2015.5806%203.42%2016.2506%205%2016.2506H6.43C6.95%2016.2506%207.45%2016.3906%207.89%2016.6706L10.81%2018.5006C11.77%2019.1006%2012.68%2019.2606%2013.29%2018.9206C13.9%2018.5806%2014.25%2017.7306%2014.25%2016.6006V7.41059C14.25%206.27059%2013.9%205.42059%2013.29%205.09059C12.68%204.75059%2011.77%204.90059%2010.81%205.51059L7.88%207.33059C7.45%207.61059%206.94%207.75059%206.43%207.75059H5Z'%20fill='white'/%3e%3cpath%20d='M18.0003%2016.7503C17.8403%2016.7503%2017.6903%2016.7003%2017.5503%2016.6003C17.2203%2016.3503%2017.1503%2015.8803%2017.4003%2015.5503C18.9703%2013.4603%2018.9703%2010.5403%2017.4003%208.45027C17.1503%208.12027%2017.2203%207.65027%2017.5503%207.40027C17.8803%207.15027%2018.3503%207.22027%2018.6003%207.55027C20.5603%2010.1703%2020.5603%2013.8303%2018.6003%2016.4503C18.4503%2016.6503%2018.2303%2016.7503%2018.0003%2016.7503Z'%20fill='white'/%3e%3cpath%20d='M19.8304%2019.2503C19.6704%2019.2503%2019.5204%2019.2003%2019.3804%2019.1003C19.0504%2018.8503%2018.9804%2018.3803%2019.2304%2018.0503C21.9004%2014.4903%2021.9004%209.51027%2019.2304%205.95027C18.9804%205.62027%2019.0504%205.15027%2019.3804%204.90027C19.7104%204.65027%2020.1804%204.72027%2020.4304%205.05027C23.5004%209.14027%2023.5004%2014.8603%2020.4304%2018.9503C20.2904%2019.1503%2020.0604%2019.2503%2019.8304%2019.2503Z'%20fill='white'/%3e%3c/svg%3e",backward15="data:image/svg+xml,%3csvg%20width='32'%20height='32'%20viewBox='0%200%2032%2032'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3crect%20width='32'%20height='32'%20rx='16'%20transform='matrix(-1%200%200%201%2032%200)'%20fill='black'%20fill-opacity='0.4'/%3e%3cpath%20d='M8.78433%2012.4583H11.8335C11.9993%2012.4583%2012.1582%2012.3924%2012.2754%2012.2752C12.3926%2012.158%2012.4585%2011.999%2012.4585%2011.8333C12.4585%2011.6675%2012.3926%2011.5085%2012.2754%2011.3913C12.1582%2011.2741%2011.9993%2011.2083%2011.8335%2011.2083H9.37016L9.1935%208.45828C9.18897%208.37587%209.16802%208.2952%209.13187%208.221C9.09572%208.14681%209.0451%208.08059%208.98298%208.02624C8.92087%207.9719%208.84852%207.93051%208.77018%207.90453C8.69185%207.87855%208.60911%207.86849%208.52683%207.87494C8.44473%207.88034%208.3645%207.90188%208.29073%207.93832C8.21696%207.97476%208.1511%208.02539%208.09692%208.08731C8.04274%208.14923%208.0013%208.22123%207.97497%208.29919C7.94865%208.37714%207.93795%208.45952%207.9435%208.54161L8.1585%2011.8749C8.16909%2012.0335%208.2397%2012.1821%208.35596%2012.2905C8.47222%2012.3988%208.6254%2012.4588%208.78433%2012.4583Z'%20fill='white'/%3e%3cpath%20d='M16.0001%2024.9577C17.5725%2024.9574%2019.1172%2024.5431%2020.4788%2023.7567C21.8404%2022.9702%2022.971%2021.8392%2023.757%2020.4773C24.5431%2019.1154%2024.9567%2017.5706%2024.9565%2015.9982C24.9563%2014.4258%2024.5422%2012.8811%2023.7559%2011.5194C22.9695%2010.1577%2021.8386%209.02697%2020.4768%208.24086C19.1149%207.45474%2017.5702%207.04093%2015.9977%207.04102C14.4253%207.0411%2012.8806%207.45507%2011.5188%208.24132C10.1571%209.02757%209.02629%2010.1584%208.24007%2011.5202C8.15719%2011.6638%208.13477%2011.8345%208.17775%2011.9947C8.22072%2012.1549%208.32557%2012.2915%208.46923%2012.3743C8.61289%2012.4572%208.78359%2012.4796%208.94378%2012.4367C9.10396%2012.3937%209.24052%2012.2888%209.3234%2012.1452C10.2582%2010.5247%2011.7503%209.29933%2013.5216%208.6974C15.2929%208.09547%2017.2226%208.15802%2018.9512%208.8734C20.6798%209.58879%2022.0893%2010.9082%2022.9172%2012.5858C23.7451%2014.2635%2023.9349%2016.1848%2023.4512%2017.992C22.9674%2019.7992%2021.8432%2021.3688%2020.2879%2022.4085C18.7327%2023.4482%2016.8525%2023.8871%2014.9976%2023.6433C13.1428%2023.3995%2011.4399%2022.4896%2010.2062%2021.0833C8.97241%2019.677%208.29201%2017.8701%208.29173%2015.9993C8.29173%2015.8336%208.22589%2015.6746%208.10868%2015.5574C7.99146%2015.4402%207.83249%2015.3743%207.66673%2015.3743C7.50097%2015.3743%207.342%2015.4402%207.22479%2015.5574C7.10758%2015.6746%207.04173%2015.8336%207.04173%2015.9993C7.04438%2018.3744%207.98905%2020.6515%209.66849%2022.3309C11.3479%2024.0104%2013.625%2024.955%2016.0001%2024.9577Z'%20fill='white'/%3e%3cpath%20d='M14.104%2018.5457C14.104%2018.4695%2014.104%2018.3824%2014.104%2018.2845C14.104%2018.1844%2014.1062%2018.0907%2014.1106%2018.0037L14.1106%2018.0069C14.1128%2017.9024%2014.1138%2017.7947%2014.1138%2017.6837C14.116%2017.5705%2014.1171%2017.4518%2014.1171%2017.3278C14.1171%2017.0883%2014.1128%2016.8358%2014.104%2016.5702C14.0975%2016.3046%2014.079%2016.0293%2014.0485%2015.7441C14.0202%2015.4589%2013.9778%2015.165%2013.9212%2014.8624C13.8668%2014.5599%2013.7906%2014.2529%2013.6926%2013.9416L14.3653%2013.7229C14.4719%2014.0646%2014.5557%2014.3988%2014.6167%2014.7253C14.6798%2015.0497%2014.7266%2015.3642%2014.7571%2015.669C14.7898%2015.9716%2014.8104%2016.2633%2014.8191%2016.5441C14.8279%2016.8227%2014.8322%2017.0872%2014.8322%2017.3376C14.8322%2017.4616%2014.8311%2017.5803%2014.8289%2017.6935C14.8289%2017.8067%2014.8279%2017.9155%2014.8257%2018.02C14.8213%2018.1071%2014.8191%2018.1985%2014.8191%2018.2943C14.8191%2018.3901%2014.8191%2018.4739%2014.8191%2018.5457L14.104%2018.5457ZM17.2428%2013.5269C17.2559%2013.5378%2017.2994%2013.5737%2017.3734%2013.6347C17.4474%2013.6935%2017.541%2013.7751%2017.6542%2013.8796C17.7674%2013.9819%2017.8937%2014.1038%2018.033%2014.2453C18.1745%2014.3868%2018.3171%2014.5435%2018.4608%2014.7155C18.6066%2014.8853%2018.7481%2015.0682%2018.8853%2015.2641C19.0224%2015.46%2019.1443%2015.6646%2019.251%2015.878C19.3576%2016.0891%2019.4436%2016.3079%2019.5089%2016.5343C19.5742%2016.7585%2019.6069%2016.9849%2019.6069%2017.2135C19.6069%2017.3593%2019.5927%2017.4899%2019.5644%2017.6053C19.5383%2017.7185%2019.5035%2017.8186%2019.46%2017.9057C19.4164%2017.9928%2019.3685%2018.0679%2019.3163%2018.131C19.264%2018.192%2019.2118%2018.2431%2019.1596%2018.2845L19.1628%2018.2845C19.0583%2018.3694%2018.9408%2018.4347%2018.8102%2018.4804C18.6817%2018.5239%2018.55%2018.5457%2018.4151%2018.5457L18.3955%2018.5457C18.2649%2018.5457%2018.1353%2018.525%2018.0069%2018.4837C17.8785%2018.4401%2017.7598%2018.3727%2017.651%2018.2812C17.5225%2018.3988%2017.3756%2018.4782%2017.2102%2018.5196C17.1122%2018.5435%2017.0132%2018.5555%2016.913%2018.5555C16.8455%2018.5555%2016.753%2018.5457%2016.6355%2018.5261C16.5179%2018.5065%2016.384%2018.4499%2016.2338%2018.3563C16.0858%2018.2627%2015.965%2018.1386%2015.8714%2017.9841C15.8213%2017.8992%2015.7821%2017.8154%2015.7538%2017.7327C15.7255%2017.6499%2015.7038%2017.5737%2015.6885%2017.5041C15.6733%2017.4344%2015.6635%2017.3735%2015.6591%2017.3212C15.657%2017.2668%2015.6559%2017.2265%2015.6559%2017.2004C15.6559%2016.9958%2015.6798%2016.7944%2015.7277%2016.5963C15.7756%2016.3982%2015.8387%2016.2067%2015.9171%2016.0216C15.9976%2015.8344%2016.088%2015.657%2016.1881%2015.4894C16.2904%2015.3196%2016.3938%2015.1629%2016.4983%2015.0192C16.605%2014.8733%2016.7084%2014.7416%2016.8085%2014.6241C16.9087%2014.5044%2016.999%2014.4031%2017.0796%2014.3204L16.8053%2014.1016L17.2428%2013.5269ZM18.7057%2017.7327C18.7688%2017.6804%2018.8221%2017.6118%2018.8657%2017.5269C18.9114%2017.4399%2018.9342%2017.3354%2018.9342%2017.2135C18.9342%2017.0698%2018.9147%2016.9239%2018.8755%2016.7759C18.8363%2016.6257%2018.7819%2016.4766%2018.7122%2016.3286C18.6447%2016.1805%2018.5664%2016.0347%2018.4771%2015.891C18.3878%2015.7473%2018.2921%2015.6091%2018.1898%2015.4763C18.0896%2015.3414%2017.9873%2015.2129%2017.8828%2015.091C17.7783%2014.9691%2017.6771%2014.857%2017.5791%2014.7547C17.5095%2014.8287%2017.43%2014.918%2017.3408%2015.0224C17.2537%2015.1269%2017.1634%2015.2434%2017.0698%2015.3718C16.9783%2015.5003%2016.888%2015.6374%2016.7987%2015.7833C16.7095%2015.9291%2016.63%2016.0804%2016.5604%2016.2371C16.4907%2016.3939%2016.4341%2016.5539%2016.3906%2016.7171C16.3492%2016.8804%2016.3285%2017.0415%2016.3285%2017.2004C16.3285%2017.3071%2016.3514%2017.4105%2016.3971%2017.5106C16.445%2017.6086%2016.5081%2017.688%2016.5865%2017.749C16.6649%2017.8078%2016.7563%2017.8404%2016.8608%2017.8469L16.8836%2017.8469C16.9794%2017.8469%2017.0796%2017.811%2017.184%2017.7392C17.2167%2017.7174%2017.2406%2017.6869%2017.2559%2017.6478C17.2733%2017.6064%2017.2864%2017.5629%2017.2951%2017.5171C17.3038%2017.4693%2017.3081%2017.4203%2017.3081%2017.3702C17.3103%2017.3201%2017.3114%2017.2722%2017.3114%2017.2265C17.3114%2017.1634%2017.3081%2017.1101%2017.3016%2017.0665C17.2951%2017.0208%2017.2874%2016.9762%2017.2787%2016.9327L17.9938%2016.7988C18.0047%2016.8771%2018.0123%2016.9457%2018.0167%2017.0045C18.0232%2017.0633%2018.0265%2017.134%2018.0265%2017.2167C18.0265%2017.2668%2018.0243%2017.3212%2018.02%2017.38C18.0178%2017.4366%2018.0113%2017.4932%2018.0004%2017.5498C18.0004%2017.5607%2018.0069%2017.5803%2018.02%2017.6086C18.033%2017.6347%2018.045%2017.6565%2018.0559%2017.6739C18.0907%2017.7218%2018.1353%2017.7599%2018.1898%2017.7882C18.2442%2017.8143%2018.3019%2017.8295%2018.3628%2017.8339L18.3987%2017.8339C18.4488%2017.8339%2018.5%2017.8273%2018.5522%2017.8143C18.6066%2017.799%2018.6578%2017.7718%2018.7057%2017.7327Z'%20fill='white'/%3e%3c/svg%3e",forward15="data:image/svg+xml,%3csvg%20width='32'%20height='32'%20viewBox='0%200%2032%2032'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3crect%20width='32'%20height='32'%20rx='16'%20fill='black'%20fill-opacity='0.4'/%3e%3cpath%20d='M23.2157%2012.4583H20.1665C20.0007%2012.4583%2019.8418%2012.3924%2019.7246%2012.2752C19.6074%2012.158%2019.5415%2011.999%2019.5415%2011.8333C19.5415%2011.6675%2019.6074%2011.5085%2019.7246%2011.3913C19.8418%2011.2741%2020.0007%2011.2083%2020.1665%2011.2083H22.6298L22.8065%208.45828C22.811%208.37587%2022.832%208.2952%2022.8681%208.221C22.9043%208.14681%2022.9549%208.08059%2023.017%208.02624C23.0791%207.9719%2023.1515%207.93051%2023.2298%207.90453C23.3082%207.87855%2023.3909%207.86849%2023.4732%207.87494C23.5553%207.88034%2023.6355%207.90188%2023.7093%207.93832C23.783%207.97476%2023.8489%208.02539%2023.9031%208.08731C23.9573%208.14923%2023.9987%208.22123%2024.025%208.29919C24.0514%208.37714%2024.062%208.45952%2024.0565%208.54161L23.8415%2011.8749C23.8309%2012.0335%2023.7603%2012.1821%2023.644%2012.2905C23.5278%2012.3988%2023.3746%2012.4588%2023.2157%2012.4583Z'%20fill='white'/%3e%3cpath%20d='M15.9999%2024.9577C14.4275%2024.9574%2012.8828%2024.5431%2011.5212%2023.7567C10.1596%2022.9702%209.02896%2021.8392%208.24295%2020.4773C7.45694%2019.1154%207.04325%2017.5706%207.04346%2015.9982C7.04366%2014.4258%207.45775%2012.8811%208.24411%2011.5194C9.03047%2010.1577%2010.1614%209.02697%2011.5232%208.24086C12.8851%207.45474%2014.4298%207.04093%2016.0023%207.04102C17.5747%207.0411%2019.1194%207.45507%2020.4812%208.24132C21.8429%209.02757%2022.9737%2010.1584%2023.7599%2011.5202C23.8428%2011.6638%2023.8652%2011.8345%2023.8223%2011.9947C23.7793%2012.1549%2023.6744%2012.2915%2023.5308%2012.3743C23.3871%2012.4572%2023.2164%2012.4796%2023.0562%2012.4367C22.896%2012.3937%2022.7595%2012.2888%2022.6766%2012.1452C21.7418%2010.5247%2020.2497%209.29933%2018.4784%208.6974C16.7071%208.09547%2014.7774%208.15802%2013.0488%208.8734C11.3202%209.58879%209.91066%2010.9082%209.08276%2012.5858C8.25486%2014.2635%208.0651%2016.1848%208.54883%2017.992C9.03256%2019.7992%2010.1568%2021.3688%2011.7121%2022.4085C13.2673%2023.4482%2015.1475%2023.8871%2017.0024%2023.6433C18.8572%2023.3995%2020.5601%2022.4896%2021.7938%2021.0833C23.0276%2019.677%2023.708%2017.8701%2023.7083%2015.9993C23.7083%2015.8336%2023.7741%2015.6746%2023.8913%2015.5574C24.0085%2015.4402%2024.1675%2015.3743%2024.3333%2015.3743C24.499%2015.3743%2024.658%2015.4402%2024.7752%2015.5574C24.8924%2015.6746%2024.9583%2015.8336%2024.9583%2015.9993C24.9556%2018.3744%2024.0109%2020.6515%2022.3315%2022.3309C20.6521%2024.0104%2018.375%2024.955%2015.9999%2024.9577Z'%20fill='white'/%3e%3cpath%20d='M12.854%2018.5457C12.854%2018.4695%2012.854%2018.3824%2012.854%2018.2845C12.854%2018.1844%2012.8562%2018.0907%2012.8606%2018.0037V18.0069C12.8628%2017.9024%2012.8638%2017.7947%2012.8638%2017.6837C12.866%2017.5705%2012.8671%2017.4518%2012.8671%2017.3278C12.8671%2017.0883%2012.8628%2016.8358%2012.854%2016.5702C12.8475%2016.3046%2012.829%2016.0293%2012.7985%2015.7441C12.7702%2015.4589%2012.7278%2015.165%2012.6712%2014.8624C12.6168%2014.5599%2012.5406%2014.2529%2012.4426%2013.9416L13.1153%2013.7229C13.2219%2014.0646%2013.3057%2014.3988%2013.3667%2014.7253C13.4298%2015.0497%2013.4766%2015.3642%2013.5071%2015.669C13.5398%2015.9716%2013.5604%2016.2633%2013.5691%2016.5441C13.5779%2016.8227%2013.5822%2017.0872%2013.5822%2017.3376C13.5822%2017.4616%2013.5811%2017.5803%2013.5789%2017.6935C13.5789%2017.8067%2013.5779%2017.9155%2013.5757%2018.02C13.5713%2018.1071%2013.5691%2018.1985%2013.5691%2018.2943C13.5691%2018.3901%2013.5691%2018.4739%2013.5691%2018.5457H12.854ZM15.9928%2013.5269C16.0059%2013.5378%2016.0494%2013.5737%2016.1234%2013.6347C16.1974%2013.6935%2016.291%2013.7751%2016.4042%2013.8796C16.5174%2013.9819%2016.6437%2014.1038%2016.783%2014.2453C16.9245%2014.3868%2017.0671%2014.5435%2017.2108%2014.7155C17.3566%2014.8853%2017.4981%2015.0682%2017.6353%2015.2641C17.7724%2015.46%2017.8943%2015.6646%2018.001%2015.878C18.1076%2016.0891%2018.1936%2016.3079%2018.2589%2016.5343C18.3242%2016.7585%2018.3569%2016.9849%2018.3569%2017.2135C18.3569%2017.3593%2018.3427%2017.4899%2018.3144%2017.6053C18.2883%2017.7185%2018.2535%2017.8186%2018.21%2017.9057C18.1664%2017.9928%2018.1185%2018.0679%2018.0663%2018.131C18.014%2018.192%2017.9618%2018.2431%2017.9096%2018.2845H17.9128C17.8083%2018.3694%2017.6908%2018.4347%2017.5602%2018.4804C17.4317%2018.5239%2017.3%2018.5457%2017.1651%2018.5457H17.1455C17.0149%2018.5457%2016.8853%2018.525%2016.7569%2018.4837C16.6285%2018.4401%2016.5098%2018.3727%2016.401%2018.2812C16.2725%2018.3988%2016.1256%2018.4782%2015.9602%2018.5196C15.8622%2018.5435%2015.7632%2018.5555%2015.663%2018.5555C15.5955%2018.5555%2015.503%2018.5457%2015.3855%2018.5261C15.2679%2018.5065%2015.134%2018.4499%2014.9838%2018.3563C14.8358%2018.2627%2014.715%2018.1386%2014.6214%2017.9841C14.5713%2017.8992%2014.5321%2017.8154%2014.5038%2017.7327C14.4755%2017.6499%2014.4538%2017.5737%2014.4385%2017.5041C14.4233%2017.4344%2014.4135%2017.3735%2014.4091%2017.3212C14.407%2017.2668%2014.4059%2017.2265%2014.4059%2017.2004C14.4059%2016.9958%2014.4298%2016.7944%2014.4777%2016.5963C14.5256%2016.3982%2014.5887%2016.2067%2014.6671%2016.0216C14.7476%2015.8344%2014.838%2015.657%2014.9381%2015.4894C15.0404%2015.3196%2015.1438%2015.1629%2015.2483%2015.0192C15.355%2014.8733%2015.4584%2014.7416%2015.5585%2014.6241C15.6587%2014.5044%2015.749%2014.4031%2015.8296%2014.3204L15.5553%2014.1016L15.9928%2013.5269ZM17.4557%2017.7327C17.5188%2017.6804%2017.5721%2017.6118%2017.6157%2017.5269C17.6614%2017.4399%2017.6842%2017.3354%2017.6842%2017.2135C17.6842%2017.0698%2017.6647%2016.9239%2017.6255%2016.7759C17.5863%2016.6257%2017.5319%2016.4766%2017.4622%2016.3286C17.3947%2016.1805%2017.3164%2016.0347%2017.2271%2015.891C17.1378%2015.7473%2017.0421%2015.6091%2016.9398%2015.4763C16.8396%2015.3414%2016.7373%2015.2129%2016.6328%2015.091C16.5283%2014.9691%2016.4271%2014.857%2016.3291%2014.7547C16.2595%2014.8287%2016.18%2014.918%2016.0908%2015.0224C16.0037%2015.1269%2015.9134%2015.2434%2015.8198%2015.3718C15.7283%2015.5003%2015.638%2015.6374%2015.5487%2015.7833C15.4595%2015.9291%2015.38%2016.0804%2015.3104%2016.2371C15.2407%2016.3939%2015.1841%2016.5539%2015.1406%2016.7171C15.0992%2016.8804%2015.0785%2017.0415%2015.0785%2017.2004C15.0785%2017.3071%2015.1014%2017.4105%2015.1471%2017.5106C15.195%2017.6086%2015.2581%2017.688%2015.3365%2017.749C15.4149%2017.8078%2015.5063%2017.8404%2015.6108%2017.8469H15.6336C15.7294%2017.8469%2015.8296%2017.811%2015.934%2017.7392C15.9667%2017.7174%2015.9906%2017.6869%2016.0059%2017.6478C16.0233%2017.6064%2016.0364%2017.5629%2016.0451%2017.5171C16.0538%2017.4693%2016.0581%2017.4203%2016.0581%2017.3702C16.0603%2017.3201%2016.0614%2017.2722%2016.0614%2017.2265C16.0614%2017.1634%2016.0581%2017.1101%2016.0516%2017.0665C16.0451%2017.0208%2016.0374%2016.9762%2016.0287%2016.9327L16.7438%2016.7988C16.7547%2016.8771%2016.7623%2016.9457%2016.7667%2017.0045C16.7732%2017.0633%2016.7765%2017.134%2016.7765%2017.2167C16.7765%2017.2668%2016.7743%2017.3212%2016.77%2017.38C16.7678%2017.4366%2016.7613%2017.4932%2016.7504%2017.5498C16.7504%2017.5607%2016.7569%2017.5803%2016.77%2017.6086C16.783%2017.6347%2016.795%2017.6565%2016.8059%2017.6739C16.8407%2017.7218%2016.8853%2017.7599%2016.9398%2017.7882C16.9942%2017.8143%2017.0519%2017.8295%2017.1128%2017.8339H17.1487C17.1988%2017.8339%2017.25%2017.8273%2017.3022%2017.8143C17.3566%2017.799%2017.4078%2017.7718%2017.4557%2017.7327Z'%20fill='white'/%3e%3c/svg%3e",defaultMarkersListItemIcon="data:image/svg+xml,%3csvg%20width='48'%20height='48'%20viewBox='0%200%2048%2048'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3crect%20width='48'%20height='48'%20rx='6'%20fill='%23F7F7FC'/%3e%3cpath%20opacity='0.4'%20d='M33.9295%2024.86C33.9095%2025.05%2033.8795%2025.23%2033.8295%2025.41C32.7895%2024.53%2031.4395%2024%2029.9695%2024C26.6595%2024%2023.9695%2026.69%2023.9695%2030C23.9695%2031.47%2024.4995%2032.82%2025.3795%2033.86C25.1995%2033.91%2025.0195%2033.94%2024.8295%2033.96C23.9795%2034.04%2023.1095%2034%2022.2095%2033.85C18.0995%2033.15%2014.7895%2029.82%2014.1095%2025.7C12.9795%2018.85%2018.8195%2013.01%2025.6695%2014.14C29.7895%2014.82%2033.1195%2018.13%2033.8195%2022.24C33.9695%2023.14%2034.0095%2024.01%2033.9295%2024.86Z'%20fill='%23BB86FC'/%3e%3cpath%20d='M33.8287%2025.41C33.6887%2025.9%2033.4287%2026.34%2033.0587%2026.71L26.6788%2033.09C26.3088%2033.46%2025.8687%2033.72%2025.3787%2033.86C24.4987%2032.82%2023.9688%2031.47%2023.9688%2030C23.9688%2026.69%2026.6587%2024%2029.9687%2024C31.4387%2024%2032.7887%2024.53%2033.8287%2025.41Z'%20fill='%23BB86FC'/%3e%3c/svg%3e",sampleBanner="data:image/svg+xml,%3csvg%20width='276'%20height='152'%20viewBox='0%200%20276%20152'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20clip-path='url(%23clip0_182_14703)'%3e%3crect%20width='276'%20height='152'%20rx='8'%20fill='%23262338'/%3e%3cg%20style='mix-blend-mode:overlay'%3e%3crect%20width='276'%20height='152'%20transform='matrix(1%200%200%20-1%200%20152)'%20fill='url(%23paint0_linear_182_14703)'/%3e%3c/g%3e%3cpath%20opacity='0.4'%20d='M139.667%2061.4166H129.667C123.967%2061.4166%20121.75%2063.6333%20121.75%2069.3333V82.6666C121.75%2086.5%20123.833%2090.5833%20129.667%2090.5833H139.667C145.367%2090.5833%20147.583%2088.3666%20147.583%2082.6666V69.3333C147.583%2063.6333%20145.367%2061.4166%20139.667%2061.4166Z'%20fill='white'/%3e%3cpath%20d='M137.167%2074.9666C138.897%2074.9666%20140.3%2073.5638%20140.3%2071.8333C140.3%2070.1028%20138.897%2068.7%20137.167%2068.7C135.436%2068.7%20134.033%2070.1028%20134.033%2071.8333C134.033%2073.5638%20135.436%2074.9666%20137.167%2074.9666Z'%20fill='white'/%3e%3cpath%20d='M154.084%2066.2834C153.401%2065.9334%20151.967%2065.5334%20150.017%2066.9L147.551%2068.6334C147.567%2068.8667%20147.584%2069.0834%20147.584%2069.3334V82.6667C147.584%2082.9167%20147.551%2083.1334%20147.551%2083.3667L150.017%2085.1C151.051%2085.8334%20151.951%2086.0667%20152.667%2086.0667C153.284%2086.0667%20153.767%2085.9%20154.084%2085.7334C154.767%2085.3834%20155.917%2084.4334%20155.917%2082.05V69.9667C155.917%2067.5834%20154.767%2066.6334%20154.084%2066.2834Z'%20fill='white'/%3e%3c/g%3e%3cdefs%3e%3clinearGradient%20id='paint0_linear_182_14703'%20x1='238.464'%20y1='4.30541'%20x2='155.223'%20y2='212.333'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20stop-color='%23FF32C7'/%3e%3cstop%20offset='1'%20stop-color='%235642DD'/%3e%3c/linearGradient%3e%3cclipPath%20id='clip0_182_14703'%3e%3crect%20width='276'%20height='152'%20rx='8'%20fill='white'/%3e%3c/clipPath%3e%3c/defs%3e%3c/svg%3e",chevronCircleRight="data:image/svg+xml,%3csvg%20width='18'%20height='18'%20viewBox='0%200%2018%2018'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M0.25%209C0.25%204.16751%204.16751%200.25%209%200.25C13.8325%200.25%2017.75%204.16751%2017.75%209C17.75%2013.8325%2013.8325%2017.75%209%2017.75C4.16751%2017.75%200.25%2013.8325%200.25%209Z'%20fill='white'%20stroke='%23E6E6E6'%20stroke-width='0.5'/%3e%3cpath%20d='M7.75%206.0835L10.6513%208.98482L7.75%2011.8861'%20stroke='%23393E46'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/svg%3e",purpleTick="data:image/svg+xml,%3csvg%20width='8'%20height='6'%20viewBox='0%200%208%206'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M7.71798%200.411206C7.93625%200.626057%207.93614%200.974298%207.71775%201.18902L3.24259%205.58902C3.13769%205.69216%202.99544%205.75006%202.84714%205.75C2.69884%205.74994%202.55664%205.69191%202.45183%205.58868L0.218202%203.38868C1.19582e-06%203.17377%200.000209577%202.82552%200.218667%202.61086C0.437124%202.3962%200.791105%202.39641%201.00931%202.61132L2.84774%204.42207L6.92734%200.410977C7.14574%200.196252%207.49972%200.196354%207.71798%200.411206Z'%20fill='%237C4DFF'/%3e%3c/svg%3e",pictureInPicture="data:image/svg+xml,%3csvg%20width='24'%20height='24'%20viewBox='0%200%2024%2024'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M21.819%2011.4553V5.27344C21.819%204.16887%2020.9236%203.27344%2019.819%203.27344H4.18262C3.07805%203.27344%202.18262%204.16887%202.18262%205.27344V17.6371C2.18262%2018.7416%203.07805%2019.6371%204.18262%2019.6371H10.9099'%20stroke='%23F5F5F5'%20stroke-width='1.5'%20stroke-linecap='round'/%3e%3crect%20x='13.6898'%20y='13.6898'%20width='8.61818'%20height='6.43636'%20rx='0.9'%20stroke='%23F5F5F5'%20stroke-width='1.2'/%3e%3c/svg%3e",subtitle="data:image/svg+xml,%3csvg%20width='24'%20height='24'%20viewBox='0%200%2024%2024'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M12%202C6.48%202%202%206.48%202%2012C2%2017.52%206.48%2022%2012%2022C17.52%2022%2022%2017.52%2022%2012C22%206.48%2017.52%202%2012%202ZM8.99%2014.12C9.5%2014.12%2010%2013.93%2010.39%2013.59C10.7%2013.32%2011.18%2013.35%2011.45%2013.66C11.72%2013.97%2011.69%2014.45%2011.38%2014.72C10.72%2015.3%209.87%2015.62%208.99%2015.62C6.99%2015.62%205.37%2014%205.37%2012C5.37%2010%206.99%208.38%208.99%208.38C9.87%208.38%2010.71%208.7%2011.38%209.28C11.69%209.55%2011.72%2010.03%2011.45%2010.34C11.18%2010.65%2010.7%2010.68%2010.39%2010.41C10%2010.07%209.5%209.88%208.99%209.88C7.82%209.88%206.87%2010.83%206.87%2012C6.87%2013.17%207.82%2014.12%208.99%2014.12ZM15.99%2014.12C16.5%2014.12%2017%2013.93%2017.39%2013.59C17.7%2013.32%2018.18%2013.35%2018.45%2013.66C18.72%2013.97%2018.69%2014.45%2018.38%2014.72C17.72%2015.3%2016.87%2015.62%2015.99%2015.62C13.99%2015.62%2012.37%2014%2012.37%2012C12.37%2010%2013.99%208.38%2015.99%208.38C16.87%208.38%2017.71%208.7%2018.38%209.28C18.69%209.55%2018.72%2010.03%2018.45%2010.34C18.18%2010.65%2017.7%2010.68%2017.39%2010.41C17%2010.07%2016.51%209.88%2015.99%209.88C14.82%209.88%2013.87%2010.83%2013.87%2012C13.87%2013.17%2014.82%2014.12%2015.99%2014.12Z'%20fill='white'/%3e%3c/svg%3e",subtitleOutline="data:image/svg+xml,%3csvg%20width='24'%20height='24'%20viewBox='0%200%2024%2024'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M12%2022.75C6.07%2022.75%201.25%2017.93%201.25%2012C1.25%206.07%206.07%201.25%2012%201.25C17.93%201.25%2022.75%206.07%2022.75%2012C22.75%2017.93%2017.93%2022.75%2012%2022.75ZM12%202.75C6.9%202.75%202.75%206.9%202.75%2012C2.75%2017.1%206.9%2021.25%2012%2021.25C17.1%2021.25%2021.25%2017.1%2021.25%2012C21.25%206.9%2017.1%202.75%2012%202.75Z'%20fill='white'/%3e%3cpath%20d='M8.99011%2015.6208C6.99011%2015.6208%205.37012%2014.0009%205.37012%2012.0009C5.37012%2010.0009%206.99011%208.38086%208.99011%208.38086C9.87011%208.38086%2010.7101%208.70088%2011.3801%209.28088C11.6901%209.55088%2011.7201%2010.0309%2011.4501%2010.3409C11.1801%2010.6509%2010.7001%2010.6808%2010.3901%2010.4108C10.0001%2010.0708%209.51011%209.88086%208.99011%209.88086C7.82011%209.88086%206.87012%2010.8309%206.87012%2012.0009C6.87012%2013.1709%207.82011%2014.1208%208.99011%2014.1208C9.50011%2014.1208%2010.0001%2013.9309%2010.3901%2013.5909C10.7001%2013.3209%2011.1701%2013.3508%2011.4501%2013.6608C11.7201%2013.9708%2011.6901%2014.4508%2011.3801%2014.7208C10.7101%2015.3008%209.86011%2015.6208%208.99011%2015.6208Z'%20fill='white'/%3e%3cpath%20d='M15.9901%2015.6208C13.9901%2015.6208%2012.3701%2014.0009%2012.3701%2012.0009C12.3701%2010.0009%2013.9901%208.38086%2015.9901%208.38086C16.8701%208.38086%2017.7101%208.70088%2018.3801%209.28088C18.6901%209.55088%2018.7201%2010.0309%2018.4501%2010.3409C18.1801%2010.6509%2017.7001%2010.6808%2017.3901%2010.4108C17.0001%2010.0708%2016.5101%209.88086%2015.9901%209.88086C14.8201%209.88086%2013.8701%2010.8309%2013.8701%2012.0009C13.8701%2013.1709%2014.8201%2014.1208%2015.9901%2014.1208C16.5001%2014.1208%2017.0001%2013.9309%2017.3901%2013.5909C17.7001%2013.3209%2018.1701%2013.3508%2018.4501%2013.6608C18.7201%2013.9708%2018.6901%2014.4508%2018.3801%2014.7208C17.7101%2015.3008%2016.8601%2015.6208%2015.9901%2015.6208Z'%20fill='white'/%3e%3c/svg%3e",subtitle1White="data:image/svg+xml,%3csvg%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M9.9987%2015.1673H5.9987C2.3787%2015.1673%200.832031%2013.6207%200.832031%2010.0007V6.00065C0.832031%202.38065%202.3787%200.833984%205.9987%200.833984H9.9987C13.6187%200.833984%2015.1654%202.38065%2015.1654%206.00065V10.0007C15.1654%2013.6207%2013.6187%2015.1673%209.9987%2015.1673ZM5.9987%201.83398C2.92536%201.83398%201.83203%202.92732%201.83203%206.00065V10.0007C1.83203%2013.074%202.92536%2014.1673%205.9987%2014.1673H9.9987C13.072%2014.1673%2014.1654%2013.074%2014.1654%2010.0007V6.00065C14.1654%202.92732%2013.072%201.83398%209.9987%201.83398H5.9987Z'%20fill='%23E3E2E6'/%3e%3cpath%20d='M11.6669%2011.8867H10.4336C10.1603%2011.8867%209.93359%2011.6601%209.93359%2011.3867C9.93359%2011.1134%2010.1603%2010.8867%2010.4336%2010.8867H11.6669C11.9403%2010.8867%2012.1669%2011.1134%2012.1669%2011.3867C12.1669%2011.6601%2011.9403%2011.8867%2011.6669%2011.8867Z'%20fill='%23E3E2E6'/%3e%3cpath%20d='M8.64536%2011.8867H4.33203C4.0587%2011.8867%203.83203%2011.6601%203.83203%2011.3867C3.83203%2011.1134%204.0587%2010.8867%204.33203%2010.8867H8.64536C8.9187%2010.8867%209.14536%2011.1134%209.14536%2011.3867C9.14536%2011.6601%208.92536%2011.8867%208.64536%2011.8867Z'%20fill='%23E3E2E6'/%3e%3cpath%20d='M11.6671%209.38086H7.98047C7.70714%209.38086%207.48047%209.15419%207.48047%208.88086C7.48047%208.60753%207.70714%208.38086%207.98047%208.38086H11.6671C11.9405%208.38086%2012.1671%208.60753%2012.1671%208.88086C12.1671%209.15419%2011.9405%209.38086%2011.6671%209.38086Z'%20fill='%23E3E2E6'/%3e%3cpath%20d='M6.1787%209.38086H4.33203C4.0587%209.38086%203.83203%209.15419%203.83203%208.88086C3.83203%208.60753%204.0587%208.38086%204.33203%208.38086H6.1787C6.45203%208.38086%206.6787%208.60753%206.6787%208.88086C6.6787%209.15419%206.45203%209.38086%206.1787%209.38086Z'%20fill='%23E3E2E6'/%3e%3c/svg%3e",subtitle1Black="data:image/svg+xml,%3csvg%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M9.9987%2015.1673H5.9987C2.3787%2015.1673%200.832031%2013.6207%200.832031%2010.0007V6.00065C0.832031%202.38065%202.3787%200.833984%205.9987%200.833984H9.9987C13.6187%200.833984%2015.1654%202.38065%2015.1654%206.00065V10.0007C15.1654%2013.6207%2013.6187%2015.1673%209.9987%2015.1673ZM5.9987%201.83398C2.92536%201.83398%201.83203%202.92732%201.83203%206.00065V10.0007C1.83203%2013.074%202.92536%2014.1673%205.9987%2014.1673H9.9987C13.072%2014.1673%2014.1654%2013.074%2014.1654%2010.0007V6.00065C14.1654%202.92732%2013.072%201.83398%209.9987%201.83398H5.9987Z'%20fill='%23393E46'/%3e%3cpath%20d='M11.6669%2011.8867H10.4336C10.1603%2011.8867%209.93359%2011.6601%209.93359%2011.3867C9.93359%2011.1134%2010.1603%2010.8867%2010.4336%2010.8867H11.6669C11.9403%2010.8867%2012.1669%2011.1134%2012.1669%2011.3867C12.1669%2011.6601%2011.9403%2011.8867%2011.6669%2011.8867Z'%20fill='%23393E46'/%3e%3cpath%20d='M8.64536%2011.8867H4.33203C4.0587%2011.8867%203.83203%2011.6601%203.83203%2011.3867C3.83203%2011.1134%204.0587%2010.8867%204.33203%2010.8867H8.64536C8.9187%2010.8867%209.14536%2011.1134%209.14536%2011.3867C9.14536%2011.6601%208.92536%2011.8867%208.64536%2011.8867Z'%20fill='%23393E46'/%3e%3cpath%20d='M11.6671%209.38086H7.98047C7.70714%209.38086%207.48047%209.15419%207.48047%208.88086C7.48047%208.60753%207.70714%208.38086%207.98047%208.38086H11.6671C11.9405%208.38086%2012.1671%208.60753%2012.1671%208.88086C12.1671%209.15419%2011.9405%209.38086%2011.6671%209.38086Z'%20fill='%23393E46'/%3e%3cpath%20d='M6.1787%209.38086H4.33203C4.0587%209.38086%203.83203%209.15419%203.83203%208.88086C3.83203%208.60753%204.0587%208.38086%204.33203%208.38086H6.1787C6.45203%208.38086%206.6787%208.60753%206.6787%208.88086C6.6787%209.15419%206.45203%209.38086%206.1787%209.38086Z'%20fill='%23393E46'/%3e%3c/svg%3e",lock="data:image/svg+xml,%3csvg%20width='20'%20height='20'%20viewBox='0%200%2020%2020'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M15%208.95768C14.6583%208.95768%2014.375%208.67435%2014.375%208.33268V6.66602C14.375%204.04102%2013.6333%202.29102%2010%202.29102C6.36667%202.29102%205.625%204.04102%205.625%206.66602V8.33268C5.625%208.67435%205.34167%208.95768%205%208.95768C4.65833%208.95768%204.375%208.67435%204.375%208.33268V6.66602C4.375%204.24935%204.95833%201.04102%2010%201.04102C15.0417%201.04102%2015.625%204.24935%2015.625%206.66602V8.33268C15.625%208.67435%2015.3417%208.95768%2015%208.95768Z'%20fill='white'/%3e%3cpath%20d='M10.0003%2016.0417C8.50866%2016.0417%207.29199%2014.825%207.29199%2013.3333C7.29199%2011.8417%208.50866%2010.625%2010.0003%2010.625C11.492%2010.625%2012.7087%2011.8417%2012.7087%2013.3333C12.7087%2014.825%2011.492%2016.0417%2010.0003%2016.0417ZM10.0003%2011.875C9.20033%2011.875%208.54199%2012.5333%208.54199%2013.3333C8.54199%2014.1333%209.20033%2014.7917%2010.0003%2014.7917C10.8003%2014.7917%2011.4587%2014.1333%2011.4587%2013.3333C11.4587%2012.5333%2010.8003%2011.875%2010.0003%2011.875Z'%20fill='white'/%3e%3cpath%20d='M14.167%2018.959H5.83366C2.15866%2018.959%201.04199%2017.8423%201.04199%2014.1673V12.5007C1.04199%208.82565%202.15866%207.70898%205.83366%207.70898H14.167C17.842%207.70898%2018.9587%208.82565%2018.9587%2012.5007V14.1673C18.9587%2017.8423%2017.842%2018.959%2014.167%2018.959ZM5.83366%208.95898C2.85033%208.95898%202.29199%209.52565%202.29199%2012.5007V14.1673C2.29199%2017.1423%202.85033%2017.709%205.83366%2017.709H14.167C17.1503%2017.709%2017.7087%2017.1423%2017.7087%2014.1673V12.5007C17.7087%209.52565%2017.1503%208.95898%2014.167%208.95898H5.83366Z'%20fill='white'/%3e%3c/svg%3e",unlock="data:image/svg+xml,%3csvg%20width='20'%20height='20'%20viewBox='0%200%2020%2020'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M9.99996%2016.0422C9.14996%2016.0422%208.36663%2015.6589%207.84996%2014.9839C7.64163%2014.7089%207.69163%2014.3172%207.96663%2014.1089C8.24163%2013.9005%208.6333%2013.9505%208.84163%2014.2255C9.11663%2014.5922%209.54163%2014.7922%209.99996%2014.7922C10.8%2014.7922%2011.4583%2014.1339%2011.4583%2013.3339C11.4583%2013.0089%2011.3583%2012.7005%2011.1583%2012.4505C10.95%2012.1755%2011%2011.7839%2011.275%2011.5755C11.55%2011.3672%2011.9416%2011.4172%2012.15%2011.6922C12.5166%2012.1672%2012.7083%2012.7339%2012.7083%2013.3339C12.7083%2014.8255%2011.4916%2016.0422%209.99996%2016.0422Z'%20fill='white'/%3e%3cpath%20d='M14.167%2018.959H5.83366C5.52533%2018.959%205.23366%2018.9507%204.95866%2018.934C4.61699%2018.9173%204.35033%2018.6173%204.36699%2018.2757C4.38366%2017.934%204.67533%2017.684%205.02533%2017.684C5.27533%2017.7007%205.54199%2017.7007%205.82533%2017.7007H14.1587C17.1337%2017.7007%2017.7003%2017.134%2017.7003%2014.159V12.4923C17.7003%209.56732%2017.0837%209.09232%2014.9587%208.96732C14.7087%208.95065%2014.442%208.95065%2014.1587%208.95065H5.83366C2.85866%208.95065%202.29199%209.51732%202.29199%2012.4923V14.159C2.29199%2015.609%202.45866%2016.4673%202.84199%2016.934C3.05866%2017.2007%203.01699%2017.6007%202.74199%2017.809C2.47533%2018.0257%202.08366%2017.984%201.86699%2017.709C1.28366%2017.0007%201.04199%2015.9673%201.04199%2014.1673V12.5007C1.04199%208.82565%202.15866%207.70898%205.83366%207.70898H14.167C14.4753%207.70898%2014.767%207.71732%2015.0337%207.73398C18.3337%207.91732%2018.9587%209.55065%2018.9587%2012.5007V14.1673C18.9587%2017.8423%2017.842%2018.959%2014.167%2018.959Z'%20fill='white'/%3e%3cpath%20d='M5%208.95768C4.65833%208.95768%204.375%208.67435%204.375%208.33268V6.66602C4.375%204.24935%204.95833%201.04102%2010%201.04102C13.3917%201.04102%2015.15%202.14935%2015.5333%204.53268C15.5917%204.87435%2015.3583%205.19102%2015.0167%205.24935C14.675%205.30768%2014.3583%205.07435%2014.3%204.73268C14.0917%203.46602%2013.4333%202.29102%2010%202.29102C6.36667%202.29102%205.625%204.04102%205.625%206.66602V8.33268C5.625%208.67435%205.34167%208.95768%205%208.95768Z'%20fill='white'/%3e%3cpath%20d='M1.66686%2018.9576C1.50853%2018.9576%201.3502%2018.8992%201.2252%2018.7742C0.983529%2018.5326%200.983529%2018.1325%201.2252%2017.8909L17.8919%201.22422C18.1335%200.982552%2018.5335%200.982552%2018.7752%201.22422C19.0169%201.46589%2019.0169%201.86589%2018.7752%202.10755L2.10853%2018.7742C1.98353%2018.8992%201.8252%2018.9576%201.66686%2018.9576Z'%20fill='white'/%3e%3c/svg%3e",arrowLeft="data:image/svg+xml,%3csvg%20width='23'%20height='24'%20viewBox='0%200%2023%2024'%20fill='white'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M20.0182%2023.9979C21.4008%2023.9432%2022.6699%2022.815%2022.6699%2021.295L22.6699%202.70464C22.6699%200.677986%2020.4125%20-0.651722%2018.6399%200.330475L1.86725%209.62567C0.0436726%2010.6363%200.0436726%2013.3634%201.86725%2014.374L18.6399%2023.6692C19.0831%2023.9147%2019.5573%2024.0162%2020.0182%2023.9979Z'%20fill='white'/%3e%3c/svg%3e",sun="data:image/svg+xml,%3csvg%20width='20'%20height='20'%20viewBox='0%200%2020%2020'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M9.99935%2015.8327C13.221%2015.8327%2015.8327%2013.221%2015.8327%209.99935C15.8327%206.77769%2013.221%204.16602%209.99935%204.16602C6.77769%204.16602%204.16602%206.77769%204.16602%209.99935C4.16602%2013.221%206.77769%2015.8327%209.99935%2015.8327Z'%20fill='%23FAD832'/%3e%3cpath%20d='M10.0007%2019.134C9.54232%2019.134%209.16732%2018.7923%209.16732%2018.334V18.2673C9.16732%2017.809%209.54232%2017.434%2010.0007%2017.434C10.459%2017.434%2010.834%2017.809%2010.834%2018.2673C10.834%2018.7257%2010.459%2019.134%2010.0007%2019.134ZM15.9507%2016.784C15.734%2016.784%2015.5257%2016.7007%2015.359%2016.5423L15.2507%2016.434C14.9256%2016.109%2014.9256%2015.584%2015.2507%2015.259C15.5757%2014.934%2016.1006%2014.934%2016.4256%2015.259L16.534%2015.3673C16.859%2015.6923%2016.859%2016.2173%2016.534%2016.5423C16.3757%2016.7007%2016.1673%2016.784%2015.9507%2016.784ZM4.05065%2016.784C3.83398%2016.784%203.62565%2016.7007%203.45898%2016.5423C3.13398%2016.2173%203.13398%2015.6923%203.45898%2015.3673L3.56732%2015.259C3.89232%2014.934%204.41732%2014.934%204.74232%2015.259C5.06732%2015.584%205.06732%2016.109%204.74232%2016.434L4.63398%2016.5423C4.47565%2016.7007%204.25898%2016.784%204.05065%2016.784ZM18.334%2010.834H18.2673C17.809%2010.834%2017.434%2010.459%2017.434%2010.0007C17.434%209.54232%2017.809%209.16732%2018.2673%209.16732C18.7257%209.16732%2019.134%209.54232%2019.134%2010.0007C19.134%2010.459%2018.7923%2010.834%2018.334%2010.834ZM1.73398%2010.834H1.66732C1.20898%2010.834%200.833984%2010.459%200.833984%2010.0007C0.833984%209.54232%201.20898%209.16732%201.66732%209.16732C2.12565%209.16732%202.53398%209.54232%202.53398%2010.0007C2.53398%2010.459%202.19232%2010.834%201.73398%2010.834ZM15.8423%204.99232C15.6257%204.99232%2015.4173%204.90898%2015.2507%204.75065C14.9256%204.42565%2014.9256%203.90065%2015.2507%203.57565L15.359%203.46732C15.684%203.14232%2016.209%203.14232%2016.534%203.46732C16.859%203.79232%2016.859%204.31732%2016.534%204.64232L16.4256%204.75065C16.2673%204.90898%2016.059%204.99232%2015.8423%204.99232ZM4.15898%204.99232C3.94232%204.99232%203.73398%204.90898%203.56732%204.75065L3.45898%204.63398C3.13398%204.30898%203.13398%203.78398%203.45898%203.45898C3.78398%203.13398%204.30898%203.13398%204.63398%203.45898L4.74232%203.56732C5.06732%203.89232%205.06732%204.41732%204.74232%204.74232C4.58398%204.90898%204.36732%204.99232%204.15898%204.99232ZM10.0007%202.53398C9.54232%202.53398%209.16732%202.19232%209.16732%201.73398V1.66732C9.16732%201.20898%209.54232%200.833984%2010.0007%200.833984C10.459%200.833984%2010.834%201.20898%2010.834%201.66732C10.834%202.12565%2010.459%202.53398%2010.0007%202.53398Z'%20fill='%23FAD832'/%3e%3c/svg%3e",scissor="data:image/svg+xml,%3csvg%20width='12'%20height='12'%20viewBox='0%200%2012%2012'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M5.375%209.25C5.375%2010.42%204.42%2011.375%203.25%2011.375C2.08%2011.375%201.125%2010.42%201.125%209.25C1.125%208.08%202.08%207.125%203.25%207.125C4.42%207.125%205.375%208.08%205.375%209.25ZM1.875%209.25C1.875%2010.01%202.49%2010.625%203.25%2010.625C4.01%2010.625%204.625%2010.01%204.625%209.25C4.625%208.49%204.01%207.875%203.25%207.875C2.49%207.875%201.875%208.49%201.875%209.25Z'%20fill='white'/%3e%3cpath%20d='M10.875%209.25C10.875%2010.42%209.92%2011.375%208.75%2011.375C7.58%2011.375%206.625%2010.42%206.625%209.25C6.625%208.08%207.58%207.125%208.75%207.125C9.92%207.125%2010.875%208.08%2010.875%209.25ZM7.375%209.25C7.375%2010.01%207.99%2010.625%208.75%2010.625C9.51%2010.625%2010.125%2010.01%2010.125%209.25C10.125%208.49%209.51%207.875%208.75%207.875C7.99%207.875%207.375%208.49%207.375%209.25Z'%20fill='white'/%3e%3cpath%20d='M8.36514%207.67565C8.36514%207.79065%208.31514%207.90065%208.21514%207.97565C8.05014%208.10065%207.81513%208.06564%207.69013%207.90064L2.70014%201.22565C2.57514%201.06065%202.61014%200.82564%202.77514%200.70064C2.94014%200.57564%203.17513%200.610637%203.30013%200.775637L8.29014%207.45064C8.34014%207.51564%208.36514%207.59565%208.36514%207.67565Z'%20fill='white'/%3e%3cpath%20d='M9.36123%201.00064C9.36123%201.08064%209.33623%201.15565%209.28623%201.22565L4.29623%207.90064C4.17123%208.06564%203.93623%208.10065%203.77123%207.97565C3.60623%207.85065%203.57123%207.61564%203.69623%207.45064L8.68623%200.775637C8.81123%200.610637%209.04623%200.57564%209.21123%200.70064C9.30623%200.77564%209.36123%200.885643%209.36123%201.00064Z'%20fill='white'/%3e%3c/svg%3e",leftArrow="data:image/svg+xml,%3csvg%20width='10'%20height='10'%20viewBox='0%200%2010%2010'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M5%2010C7.755%2010%2010%207.755%2010%205C10%202.245%207.755%200%205%200C2.245%200%200%202.245%200%205C0%207.755%202.245%2010%205%2010ZM4.105%203.5C3.96%203.355%203.96%203.115%204.105%202.97C4.18%202.895%204.275%202.86%204.37%202.86C4.465%202.86%204.56%202.895%204.635%202.97L6.4%204.735C6.545%204.88%206.545%205.12%206.4%205.265L4.635%207.03C4.49%207.175%204.25%207.175%204.105%207.03C3.96%206.885%203.96%206.645%204.105%206.5L5.605%205L4.105%203.5Z'%20fill='%23EFF0F6'/%3e%3c/svg%3e",rightArrow="data:image/svg+xml,%3csvg%20width='10'%20height='10'%20viewBox='0%200%2010%2010'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M5%200C2.245%200%200%202.245%200%205C0%207.755%202.245%2010%205%2010C7.755%2010%2010%207.755%2010%205C10%202.245%207.755%200%205%200ZM5.895%206.5C6.04%206.645%206.04%206.885%205.895%207.03C5.82%207.105%205.725%207.14%205.63%207.14C5.535%207.14%205.44%207.105%205.365%207.03L3.6%205.265C3.455%205.12%203.455%204.88%203.6%204.735L5.365%202.97C5.51%202.825%205.75%202.825%205.895%202.97C6.04%203.115%206.04%203.355%205.895%203.5L4.395%205L5.895%206.5Z'%20fill='%23EFF0F6'/%3e%3c/svg%3e",lightLeftArrow="data:image/svg+xml,%3csvg%20width='10'%20height='10'%20viewBox='0%200%2010%2010'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M5%2010C7.755%2010%2010%207.755%2010%205C10%202.245%207.755%200%205%200C2.245%200%200%202.245%200%205C0%207.755%202.245%2010%205%2010ZM4.105%203.5C3.96%203.355%203.96%203.115%204.105%202.97C4.18%202.895%204.275%202.86%204.37%202.86C4.465%202.86%204.56%202.895%204.635%202.97L6.4%204.735C6.545%204.88%206.545%205.12%206.4%205.265L4.635%207.03C4.49%207.175%204.25%207.175%204.105%207.03C3.96%206.885%203.96%206.645%204.105%206.5L5.605%205L4.105%203.5Z'%20fill='%23BDBDBD'/%3e%3c/svg%3e",lightRightArrow="data:image/svg+xml,%3csvg%20width='10'%20height='10'%20viewBox='0%200%2010%2010'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M5%200C2.245%200%200%202.245%200%205C0%207.755%202.245%2010%205%2010C7.755%2010%2010%207.755%2010%205C10%202.245%207.755%200%205%200ZM5.895%206.5C6.04%206.645%206.04%206.885%205.895%207.03C5.82%207.105%205.725%207.14%205.63%207.14C5.535%207.14%205.44%207.105%205.365%207.03L3.6%205.265C3.455%205.12%203.455%204.88%203.6%204.735L5.365%202.97C5.51%202.825%205.75%202.825%205.895%202.97C6.04%203.115%206.04%203.355%205.895%203.5L4.395%205L5.895%206.5Z'%20fill='%23BDBDBD'/%3e%3c/svg%3e",speed="data:image/svg+xml,%3csvg%20width='24'%20height='24'%20viewBox='0%200%2024%2024'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M19.14%2020.25C18.95%2020.25%2018.76%2020.18%2018.61%2020.04C18.31%2019.75%2018.31%2019.28%2018.6%2018.98C20.31%2017.24%2021.25%2014.94%2021.25%2012.5C21.25%207.4%2017.1%203.25%2012%203.25C6.9%203.25%202.75%207.4%202.75%2012.5C2.75%2014.93%203.68%2017.22%205.38%2018.96C5.67%2019.26%205.66%2019.73%205.37%2020.02C5.07%2020.31%204.6%2020.3%204.31%2020.01C2.34%2017.99%201.25%2015.32%201.25%2012.5C1.25%206.57%206.07%201.75%2012%201.75C17.93%201.75%2022.75%206.57%2022.75%2012.5C22.75%2015.33%2021.66%2018.01%2019.67%2020.03C19.53%2020.18%2019.33%2020.25%2019.14%2020.25Z'%20fill='%23F5F5F5'/%3e%3cpath%20d='M12%2022.0002C14.1429%2022.0002%2015.88%2020.2631%2015.88%2018.1202C15.88%2015.9774%2014.1429%2014.2402%2012%2014.2402C9.85713%2014.2402%208.12%2015.9774%208.12%2018.1202C8.12%2020.2631%209.85713%2022.0002%2012%2022.0002Z'%20fill='%23F5F5F5'/%3e%3cpath%20d='M16%208.5C14.9%208.5%2014%209.4%2014%2010.5V11.25C14%2011.94%2014.56%2012.5%2015.25%2012.5H16C17.1%2012.5%2018%2011.6%2018%2010.5C18%209.4%2017.1%208.5%2016%208.5Z'%20fill='%23F5F5F5'/%3e%3c/svg%3e",emojiHappyWhite="data:image/svg+xml,%3csvg%20width='24'%20height='24'%20viewBox='0%200%2024%2024'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M15%2022.75H9C3.57%2022.75%201.25%2020.43%201.25%2015V9C1.25%203.57%203.57%201.25%209%201.25H15C20.43%201.25%2022.75%203.57%2022.75%209V15C22.75%2020.43%2020.43%2022.75%2015%2022.75ZM9%202.75C4.39%202.75%202.75%204.39%202.75%209V15C2.75%2019.61%204.39%2021.25%209%2021.25H15C19.61%2021.25%2021.25%2019.61%2021.25%2015V9C21.25%204.39%2019.61%202.75%2015%202.75H9Z'%20fill='%23BDBDBD'/%3e%3cpath%20d='M15.5%2010.5C14.26%2010.5%2013.25%209.49%2013.25%208.25C13.25%207.01%2014.26%206%2015.5%206C16.74%206%2017.75%207.01%2017.75%208.25C17.75%209.49%2016.74%2010.5%2015.5%2010.5ZM15.5%207.5C15.09%207.5%2014.75%207.84%2014.75%208.25C14.75%208.66%2015.09%209%2015.5%209C15.91%209%2016.25%208.66%2016.25%208.25C16.25%207.84%2015.91%207.5%2015.5%207.5Z'%20fill='%23BDBDBD'/%3e%3cpath%20d='M8.5%2010.5C7.26%2010.5%206.25%209.49%206.25%208.25C6.25%207.01%207.26%206%208.5%206C9.74%206%2010.75%207.01%2010.75%208.25C10.75%209.49%209.74%2010.5%208.5%2010.5ZM8.5%207.5C8.09%207.5%207.75%207.84%207.75%208.25C7.75%208.66%208.09%209%208.5%209C8.91%209%209.25%208.66%209.25%208.25C9.25%207.84%208.91%207.5%208.5%207.5Z'%20fill='%23BDBDBD'/%3e%3cpath%20d='M12%2019.4508C9.1%2019.4508%206.75%2017.0908%206.75%2014.2008C6.75%2013.2908%207.49%2012.5508%208.4%2012.5508H15.6C16.51%2012.5508%2017.25%2013.2908%2017.25%2014.2008C17.25%2017.0908%2014.9%2019.4508%2012%2019.4508ZM8.4%2014.0508C8.32%2014.0508%208.25%2014.1208%208.25%2014.2008C8.25%2016.2708%209.93%2017.9508%2012%2017.9508C14.07%2017.9508%2015.75%2016.2708%2015.75%2014.2008C15.75%2014.1208%2015.68%2014.0508%2015.6%2014.0508H8.4Z'%20fill='%23BDBDBD'/%3e%3c/svg%3e",emojiHappyBlack="data:image/svg+xml,%3csvg%20width='24'%20height='24'%20viewBox='0%200%2024%2024'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M15%2022.75H9C3.57%2022.75%201.25%2020.43%201.25%2015V9C1.25%203.57%203.57%201.25%209%201.25H15C20.43%201.25%2022.75%203.57%2022.75%209V15C22.75%2020.43%2020.43%2022.75%2015%2022.75ZM9%202.75C4.39%202.75%202.75%204.39%202.75%209V15C2.75%2019.61%204.39%2021.25%209%2021.25H15C19.61%2021.25%2021.25%2019.61%2021.25%2015V9C21.25%204.39%2019.61%202.75%2015%202.75H9Z'%20fill='%23151515'/%3e%3cpath%20d='M15.5%2010.5C14.26%2010.5%2013.25%209.49%2013.25%208.25C13.25%207.01%2014.26%206%2015.5%206C16.74%206%2017.75%207.01%2017.75%208.25C17.75%209.49%2016.74%2010.5%2015.5%2010.5ZM15.5%207.5C15.09%207.5%2014.75%207.84%2014.75%208.25C14.75%208.66%2015.09%209%2015.5%209C15.91%209%2016.25%208.66%2016.25%208.25C16.25%207.84%2015.91%207.5%2015.5%207.5Z'%20fill='%23151515'/%3e%3cpath%20d='M8.5%2010.5C7.26%2010.5%206.25%209.49%206.25%208.25C6.25%207.01%207.26%206%208.5%206C9.74%206%2010.75%207.01%2010.75%208.25C10.75%209.49%209.74%2010.5%208.5%2010.5ZM8.5%207.5C8.09%207.5%207.75%207.84%207.75%208.25C7.75%208.66%208.09%209%208.5%209C8.91%209%209.25%208.66%209.25%208.25C9.25%207.84%208.91%207.5%208.5%207.5Z'%20fill='%23151515'/%3e%3cpath%20d='M12%2019.4508C9.1%2019.4508%206.75%2017.0908%206.75%2014.2008C6.75%2013.2908%207.49%2012.5508%208.4%2012.5508H15.6C16.51%2012.5508%2017.25%2013.2908%2017.25%2014.2008C17.25%2017.0908%2014.9%2019.4508%2012%2019.4508ZM8.4%2014.0508C8.32%2014.0508%208.25%2014.1208%208.25%2014.2008C8.25%2016.2708%209.93%2017.9508%2012%2017.9508C14.07%2017.9508%2015.75%2016.2708%2015.75%2014.2008C15.75%2014.1208%2015.68%2014.0508%2015.6%2014.0508H8.4Z'%20fill='%23151515'/%3e%3c/svg%3e",keyboardWhite="data:image/svg+xml,%3csvg%20width='24'%20height='24'%20viewBox='0%200%2024%2024'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M16.5%2020.75H7.5C6.75%2020.75%206.2%2020.72%205.73%2020.65C2.41%2020.29%201.75%2018.3%201.75%2015V9C1.75%205.7%202.41%203.71%205.76%203.34C6.2%203.28%206.75%203.25%207.5%203.25H16.5C17.25%203.25%2017.8%203.28%2018.27%203.35C21.59%203.71%2022.25%205.7%2022.25%209V15C22.25%2018.3%2021.59%2020.29%2018.24%2020.66C17.8%2020.72%2017.25%2020.75%2016.5%2020.75ZM7.5%204.75C6.82%204.75%206.34%204.78%205.95%204.83C3.92%205.06%203.25%205.69%203.25%209V15C3.25%2018.31%203.92%2018.94%205.92%2019.17C6.34%2019.23%206.82%2019.25%207.5%2019.25H16.5C17.18%2019.25%2017.66%2019.22%2018.05%2019.17C20.08%2018.95%2020.75%2018.31%2020.75%2015V9C20.75%205.69%2020.08%205.06%2018.08%204.83C17.66%204.77%2017.18%204.75%2016.5%204.75H7.5Z'%20fill='%23BDBDBD'/%3e%3cpath%20d='M17%2010.75H13.5C13.09%2010.75%2012.75%2010.41%2012.75%2010C12.75%209.59%2013.09%209.25%2013.5%209.25H17C17.41%209.25%2017.75%209.59%2017.75%2010C17.75%2010.41%2017.41%2010.75%2017%2010.75Z'%20fill='%23BDBDBD'/%3e%3cpath%20d='M10.0996%2011C9.54961%2011%209.09961%2010.55%209.09961%2010C9.09961%209.45%209.53961%209%2010.0996%209H10.1096C10.6596%209%2011.1096%209.45%2011.1096%2010C11.1096%2010.55%2010.6596%2011%2010.0996%2011Z'%20fill='%23BDBDBD'/%3e%3cpath%20d='M7.09961%2011C6.54961%2011%206.09961%2010.55%206.09961%2010C6.09961%209.45%206.53961%209%207.09961%209C7.64961%209%208.09961%209.45%208.09961%2010C8.09961%2010.55%207.65961%2011%207.09961%2011Z'%20fill='%23BDBDBD'/%3e%3cpath%20d='M16.9998%2016.25H7.01977C6.60977%2016.25%206.25977%2015.91%206.25977%2015.5C6.25977%2015.09%206.58977%2014.75%206.99977%2014.75H16.9998C17.4098%2014.75%2017.7498%2015.09%2017.7498%2015.5C17.7498%2015.91%2017.4098%2016.25%2016.9998%2016.25Z'%20fill='%23BDBDBD'/%3e%3c/svg%3e",keyboardBlack="data:image/svg+xml,%3csvg%20width='24'%20height='24'%20viewBox='0%200%2024%2024'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M16.5%2020.75H7.5C6.75%2020.75%206.2%2020.72%205.73%2020.65C2.41%2020.29%201.75%2018.3%201.75%2015V9C1.75%205.7%202.41%203.71%205.76%203.34C6.2%203.28%206.75%203.25%207.5%203.25H16.5C17.25%203.25%2017.8%203.28%2018.27%203.35C21.59%203.71%2022.25%205.7%2022.25%209V15C22.25%2018.3%2021.59%2020.29%2018.24%2020.66C17.8%2020.72%2017.25%2020.75%2016.5%2020.75ZM7.5%204.75C6.82%204.75%206.34%204.78%205.95%204.83C3.92%205.06%203.25%205.69%203.25%209V15C3.25%2018.31%203.92%2018.94%205.92%2019.17C6.34%2019.23%206.82%2019.25%207.5%2019.25H16.5C17.18%2019.25%2017.66%2019.22%2018.05%2019.17C20.08%2018.95%2020.75%2018.31%2020.75%2015V9C20.75%205.69%2020.08%205.06%2018.08%204.83C17.66%204.77%2017.18%204.75%2016.5%204.75H7.5Z'%20fill='%23151515'/%3e%3cpath%20d='M17%2010.75H13.5C13.09%2010.75%2012.75%2010.41%2012.75%2010C12.75%209.59%2013.09%209.25%2013.5%209.25H17C17.41%209.25%2017.75%209.59%2017.75%2010C17.75%2010.41%2017.41%2010.75%2017%2010.75Z'%20fill='%23151515'/%3e%3cpath%20d='M10.0996%2011C9.54961%2011%209.09961%2010.55%209.09961%2010C9.09961%209.45%209.53961%209%2010.0996%209H10.1096C10.6596%209%2011.1096%209.45%2011.1096%2010C11.1096%2010.55%2010.6596%2011%2010.0996%2011Z'%20fill='%23151515'/%3e%3cpath%20d='M7.09961%2011C6.54961%2011%206.09961%2010.55%206.09961%2010C6.09961%209.45%206.53961%209%207.09961%209C7.64961%209%208.09961%209.45%208.09961%2010C8.09961%2010.55%207.65961%2011%207.09961%2011Z'%20fill='%23151515'/%3e%3cpath%20d='M16.9998%2016.25H7.01977C6.60977%2016.25%206.25977%2015.91%206.25977%2015.5C6.25977%2015.09%206.58977%2014.75%206.99977%2014.75H16.9998C17.4098%2014.75%2017.7498%2015.09%2017.7498%2015.5C17.7498%2015.91%2017.4098%2016.25%2016.9998%2016.25Z'%20fill='%23151515'/%3e%3c/svg%3e",sendCommentTouchScreen="data:image/svg+xml,%3csvg%20width='40'%20height='40'%20viewBox='0%200%2040%2040'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3ccircle%20cx='20'%20cy='20'%20r='20'%20fill='%23651FFF'/%3e%3cpath%20d='M13.9307%2023.4894L22.4907%2027.7694C28.2407%2030.6494%2030.6007%2028.2894%2027.7207%2022.5394L26.8507%2020.7994C26.6007%2020.2894%2026.6007%2019.6994%2026.8507%2019.1894L27.7207%2017.4594C30.6007%2011.7094%2028.2507%209.34938%2022.4907%2012.2294L13.9307%2016.5094C10.0907%2018.4294%2010.0907%2021.5694%2013.9307%2023.4894ZM17.1607%2019.2494H22.5607C22.9707%2019.2494%2023.3107%2019.5894%2023.3107%2019.9994C23.3107%2020.4094%2022.9707%2020.7494%2022.5607%2020.7494H17.1607C16.7507%2020.7494%2016.4107%2020.4094%2016.4107%2019.9994C16.4107%2019.5894%2016.7507%2019.2494%2017.1607%2019.2494Z'%20fill='%23FBFBFB'/%3e%3c/svg%3e",sendCommentDesktopBlack="data:image/svg+xml,%3csvg%20width='24'%20height='24'%20viewBox='0%200%2024%2024'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M5.93071%2015.4894L14.4907%2019.7694C20.2407%2022.6494%2022.6007%2020.2894%2019.7207%2014.5394L18.8507%2012.7994C18.6007%2012.2894%2018.6007%2011.6994%2018.8507%2011.1894L19.7207%209.45938C22.6007%203.70938%2020.2507%201.34938%2014.4907%204.22938L5.93071%208.50938C2.09071%2010.4294%202.09071%2013.5694%205.93071%2015.4894ZM9.16071%2011.2494H14.5607C14.9707%2011.2494%2015.3107%2011.5894%2015.3107%2011.9994C15.3107%2012.4094%2014.9707%2012.7494%2014.5607%2012.7494H9.16071C8.75071%2012.7494%208.41071%2012.4094%208.41071%2011.9994C8.41071%2011.5894%208.75071%2011.2494%209.16071%2011.2494Z'%20fill='%23313A43'/%3e%3c/svg%3e",sendCommentDesktopWhite="data:image/svg+xml,%3csvg%20width='24'%20height='24'%20viewBox='0%200%2024%2024'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M5.93071%2015.4894L14.4907%2019.7694C20.2407%2022.6494%2022.6007%2020.2894%2019.7207%2014.5394L18.8507%2012.7994C18.6007%2012.2894%2018.6007%2011.6994%2018.8507%2011.1894L19.7207%209.45938C22.6007%203.70938%2020.2507%201.34938%2014.4907%204.22938L5.93071%208.50938C2.09071%2010.4294%202.09071%2013.5694%205.93071%2015.4894ZM9.16071%2011.2494H14.5607C14.9707%2011.2494%2015.3107%2011.5894%2015.3107%2011.9994C15.3107%2012.4094%2014.9707%2012.7494%2014.5607%2012.7494H9.16071C8.75071%2012.7494%208.41071%2012.4094%208.41071%2011.9994C8.41071%2011.5894%208.75071%2011.2494%209.16071%2011.2494Z'%20fill='%23FBFBFB'/%3e%3c/svg%3e",commentEmptyStateBlack="data:image/svg+xml,%3csvg%20width='216'%20height='102'%20viewBox='0%200%20216%20102'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M46%2087H137C137.515%2087%20138.017%2086.9444%20138.5%2086.8389C138.983%2086.9444%20139.485%2087%20140%2087H192C195.866%2087%20199%2083.866%20199%2080C199%2076.134%20195.866%2073%20192%2073H186C182.134%2073%20179%2069.866%20179%2066C179%2062.134%20182.134%2059%20186%2059H205C208.866%2059%20212%2055.866%20212%2052C212%2048.134%20208.866%2045%20205%2045H183C186.866%2045%20190%2041.866%20190%2038C190%2034.134%20186.866%2031%20183%2031H119C122.866%2031%20126%2027.866%20126%2024C126%2020.134%20122.866%2017%20119%2017H62C58.134%2017%2055%2020.134%2055%2024C55%2027.866%2058.134%2031%2062%2031H22C18.134%2031%2015%2034.134%2015%2038C15%2041.866%2018.134%2045%2022%2045H47C50.866%2045%2054%2048.134%2054%2052C54%2055.866%2050.866%2059%2047%2059H7C3.13401%2059%200%2062.134%200%2066C0%2069.866%203.13401%2073%207%2073H46C42.134%2073%2039%2076.134%2039%2080C39%2083.866%2042.134%2087%2046%2087ZM209%2087C212.866%2087%20216%2083.866%20216%2080C216%2076.134%20212.866%2073%20209%2073C205.134%2073%20202%2076.134%20202%2080C202%2083.866%20205.134%2087%20209%2087Z'%20fill='%2357585A'/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M93%2041C96.3137%2041%2099%2043.6863%2099%2047C99%2050.3137%2096.3137%2053%2093%2053C89.6863%2053%2087%2050.3137%2087%2047C87%2043.6863%2089.6863%2041%2093%2041ZM112%2041C115.314%2041%20118%2043.6863%20118%2047C118%2050.3137%20115.314%2053%20112%2053C108.686%2053%20106%2050.3137%20106%2047C106%2043.6863%20108.686%2041%20112%2041ZM131%2041C134.314%2041%20137%2043.6863%20137%2047C137%2050.3137%20134.314%2053%20131%2053C127.686%2053%20125%2050.3137%20125%2047C125%2043.6863%20127.686%2041%20131%2041Z'%20fill='white'%20stroke='%23ECEADC'%20stroke-width='2.5'/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M151.577%2079.0748C149%2081%20146.488%2082.8097%20143.644%2084.3737L143.809%2098.457C143.822%2099.5615%20142.937%20100.467%20141.832%20100.48C141.383%20100.486%20140.945%20100.339%20140.589%20100.066L127.926%2090.3231C123.18%2091.4156%20118.173%2092%20113%2092C82.6243%2092%2058%2071.8528%2058%2047C58%2022.1472%2082.6243%202%20113%202C143.376%202%20168%2022.1472%20168%2047C168%2053.8787%20166.114%2060.397%20162.741%2066.2274C162.119%2067.3027%20161.446%2068.3546%20160.726%2069.381C160.726%2069.381%20159.317%2071.5%20156.5%2074.5C153.683%2077.5%20151.577%2079.0748%20151.577%2079.0748Z'%20fill='white'/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M151.577%2079.0748C149%2081%20146.488%2082.8097%20143.644%2084.3737L143.809%2098.457C143.822%2099.5615%20142.937%20100.467%20141.832%20100.48C141.383%20100.486%20140.945%20100.339%20140.589%20100.066L127.926%2090.3231C123.18%2091.4156%20118.173%2092%20113%2092C82.6243%2092%2058%2071.8528%2058%2047C58%2022.1472%2082.6243%202%20113%202C143.376%202%20168%2022.1472%20168%2047C168%2053.8787%20166.114%2060.397%20162.741%2066.2274C162.119%2067.3027%20161.446%2068.3546%20160.726%2069.381C160.726%2069.381%20159.317%2071.5%20156.5%2074.5C153.683%2077.5%20151.577%2079.0748%20151.577%2079.0748Z'%20stroke='%23ECEADC'%20stroke-width='2.5'%20stroke-linecap='round'/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M145.853%2034.5895C151.157%2034.5895%20156.266%2033.957%20161.051%2032.7868C162.961%2037.1364%20164%2041.8232%20164%2046.7074C164%2053.0432%20162.251%2059.0469%20159.123%2064.4171C158.547%2065.4075%20157.923%2066.3764%20157.255%2067.3218C156.2%2068.8146%20155.448%2069.8687%20154.785%2070.7139C153.219%2072.7135%20152.155%2073.5444%20148.771%2076.2505C146.515%2078.0553%20144.052%2079.6906%20141.415%2081.1311L141.568%2094.1029C141.58%2095.1202%20141.889%2096.9878%20140.865%2097C140.449%2097.0046%20138.913%2095.8367%20138.583%2095.5844L128.373%2086.4666C123.972%2087.4729%20117.797%2088.1555%20113%2088.1555C84.8335%2088.1555%2062%2069.5985%2062%2046.7074C62%2027.961%2077.3133%2012.1215%2098.3283%207C103.832%2022.8745%20123.023%2034.5895%20145.853%2034.5895ZM93.291%2041.1483C89.986%2041.1483%2087.3067%2043.8448%2087.3067%2047.1711C87.3067%2050.4974%2089.986%2053.1939%2093.291%2053.1939C96.596%2053.1939%2099.2752%2050.4974%2099.2752%2047.1711C99.2752%2043.8448%2096.596%2041.1483%2093.291%2041.1483ZM112.241%2041.1483C108.936%2041.1483%20106.257%2043.8448%20106.257%2047.1711C106.257%2050.4974%20108.936%2053.1939%20112.241%2053.1939C115.546%2053.1939%20118.225%2050.4974%20118.225%2047.1711C118.225%2043.8448%20115.546%2041.1483%20112.241%2041.1483ZM131.191%2041.1483C127.886%2041.1483%20125.207%2043.8448%20125.207%2047.1711C125.207%2050.4974%20127.886%2053.1939%20131.191%2053.1939C134.496%2053.1939%20137.176%2050.4974%20137.176%2047.1711C137.176%2043.8448%20134.496%2041.1483%20131.191%2041.1483Z'%20fill='%23DBDDDE'/%3e%3cpath%20d='M72.6628%2032.3105C71.7548%2033.8425%2070.968%2035.4323%2070.3125%2037.0715'%20stroke='%236E7191'%20stroke-width='2.5'%20stroke-linecap='round'/%3e%3cpath%20d='M91.0222%2016.0742C84.4695%2019.2015%2078.9373%2023.6254%2074.9395%2028.9213'%20stroke='%236E7191'%20stroke-width='2.5'%20stroke-linecap='round'/%3e%3c/svg%3e",commentEmptyStateWhite="data:image/svg+xml,%3csvg%20width='216'%20height='102'%20viewBox='0%200%20216%20102'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M46%2087H137C137.515%2087%20138.017%2086.9444%20138.5%2086.8389C138.983%2086.9444%20139.485%2087%20140%2087H192C195.866%2087%20199%2083.866%20199%2080C199%2076.134%20195.866%2073%20192%2073H186C182.134%2073%20179%2069.866%20179%2066C179%2062.134%20182.134%2059%20186%2059H205C208.866%2059%20212%2055.866%20212%2052C212%2048.134%20208.866%2045%20205%2045H183C186.866%2045%20190%2041.866%20190%2038C190%2034.134%20186.866%2031%20183%2031H119C122.866%2031%20126%2027.866%20126%2024C126%2020.134%20122.866%2017%20119%2017H62C58.134%2017%2055%2020.134%2055%2024C55%2027.866%2058.134%2031%2062%2031H22C18.134%2031%2015%2034.134%2015%2038C15%2041.866%2018.134%2045%2022%2045H47C50.866%2045%2054%2048.134%2054%2052C54%2055.866%2050.866%2059%2047%2059H7C3.13401%2059%200%2062.134%200%2066C0%2069.866%203.13401%2073%207%2073H46C42.134%2073%2039%2076.134%2039%2080C39%2083.866%2042.134%2087%2046%2087ZM209%2087C212.866%2087%20216%2083.866%20216%2080C216%2076.134%20212.866%2073%20209%2073C205.134%2073%20202%2076.134%20202%2080C202%2083.866%20205.134%2087%20209%2087Z'%20fill='%23F3F7FF'/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M93%2041C96.3137%2041%2099%2043.6863%2099%2047C99%2050.3137%2096.3137%2053%2093%2053C89.6863%2053%2087%2050.3137%2087%2047C87%2043.6863%2089.6863%2041%2093%2041ZM112%2041C115.314%2041%20118%2043.6863%20118%2047C118%2050.3137%20115.314%2053%20112%2053C108.686%2053%20106%2050.3137%20106%2047C106%2043.6863%20108.686%2041%20112%2041ZM131%2041C134.314%2041%20137%2043.6863%20137%2047C137%2050.3137%20134.314%2053%20131%2053C127.686%2053%20125%2050.3137%20125%2047C125%2043.6863%20127.686%2041%20131%2041Z'%20fill='white'%20stroke='%231F64E7'%20stroke-width='2.5'/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M151.577%2079.0748C149%2081%20146.488%2082.8097%20143.644%2084.3737L143.809%2098.457C143.822%2099.5615%20142.937%20100.467%20141.832%20100.48C141.383%20100.486%20140.945%20100.339%20140.589%20100.066L127.926%2090.3231C123.18%2091.4156%20118.173%2092%20113%2092C82.6243%2092%2058%2071.8528%2058%2047C58%2022.1472%2082.6243%202%20113%202C143.376%202%20168%2022.1472%20168%2047C168%2053.8787%20166.114%2060.397%20162.741%2066.2274C162.119%2067.3027%20161.446%2068.3546%20160.726%2069.381C160.726%2069.381%20159.317%2071.5%20156.5%2074.5C153.683%2077.5%20151.577%2079.0748%20151.577%2079.0748Z'%20fill='white'/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M151.577%2079.0748C149%2081%20146.488%2082.8097%20143.644%2084.3737L143.809%2098.457C143.822%2099.5615%20142.937%20100.467%20141.832%20100.48C141.383%20100.486%20140.945%20100.339%20140.589%20100.066L127.926%2090.3231C123.18%2091.4156%20118.173%2092%20113%2092C82.6243%2092%2058%2071.8528%2058%2047C58%2022.1472%2082.6243%202%20113%202C143.376%202%20168%2022.1472%20168%2047C168%2053.8787%20166.114%2060.397%20162.741%2066.2274C162.119%2067.3027%20161.446%2068.3546%20160.726%2069.381C160.726%2069.381%20159.317%2071.5%20156.5%2074.5C153.683%2077.5%20151.577%2079.0748%20151.577%2079.0748Z'%20stroke='%231F64E7'%20stroke-width='2.5'%20stroke-linecap='round'/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M145.853%2034.5895C151.157%2034.5895%20156.266%2033.957%20161.051%2032.7868C162.961%2037.1364%20164%2041.8232%20164%2046.7074C164%2053.0432%20162.251%2059.0469%20159.123%2064.4171C158.547%2065.4075%20157.923%2066.3764%20157.255%2067.3218C156.2%2068.8146%20155.448%2069.8687%20154.785%2070.7139C153.219%2072.7135%20152.155%2073.5444%20148.771%2076.2505C146.515%2078.0553%20144.052%2079.6906%20141.415%2081.1311L141.568%2094.1029C141.58%2095.1202%20141.889%2096.9878%20140.865%2097C140.449%2097.0046%20138.913%2095.8367%20138.583%2095.5844L128.373%2086.4666C123.972%2087.4729%20117.797%2088.1555%20113%2088.1555C84.8335%2088.1555%2062%2069.5985%2062%2046.7074C62%2027.961%2077.3133%2012.1215%2098.3283%207C103.832%2022.8745%20123.023%2034.5895%20145.853%2034.5895ZM93.291%2041.1483C89.986%2041.1483%2087.3067%2043.8448%2087.3067%2047.1711C87.3067%2050.4974%2089.986%2053.1939%2093.291%2053.1939C96.596%2053.1939%2099.2753%2050.4974%2099.2753%2047.1711C99.2753%2043.8448%2096.596%2041.1483%2093.291%2041.1483ZM112.241%2041.1483C108.936%2041.1483%20106.257%2043.8448%20106.257%2047.1711C106.257%2050.4974%20108.936%2053.1939%20112.241%2053.1939C115.546%2053.1939%20118.225%2050.4974%20118.225%2047.1711C118.225%2043.8448%20115.546%2041.1483%20112.241%2041.1483ZM131.191%2041.1483C127.886%2041.1483%20125.207%2043.8448%20125.207%2047.1711C125.207%2050.4974%20127.886%2053.1939%20131.191%2053.1939C134.496%2053.1939%20137.176%2050.4974%20137.176%2047.1711C137.176%2043.8448%20134.496%2041.1483%20131.191%2041.1483Z'%20fill='%23E8F0FE'/%3e%3cpath%20d='M72.6628%2032.3105C71.7548%2033.8425%2070.968%2035.4323%2070.3125%2037.0715'%20stroke='%2375A4FE'%20stroke-width='2.5'%20stroke-linecap='round'/%3e%3cpath%20d='M91.0222%2016.0742C84.4695%2019.2015%2078.9373%2023.6254%2074.9395%2028.9213'%20stroke='%2375A4FE'%20stroke-width='2.5'%20stroke-linecap='round'/%3e%3c/svg%3e",playList="data:image/svg+xml,%3csvg%20width='24'%20height='24'%20viewBox='0%200%2024%2024'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M22%203.75H2C1.59%203.75%201.25%203.41%201.25%203C1.25%202.59%201.59%202.25%202%202.25H22C22.41%202.25%2022.75%202.59%2022.75%203C22.75%203.41%2022.41%203.75%2022%203.75Z'%20fill='%23F5F5F5'/%3e%3cpath%20d='M11%209.75H2C1.59%209.75%201.25%209.41%201.25%209C1.25%208.59%201.59%208.25%202%208.25H11C11.41%208.25%2011.75%208.59%2011.75%209C11.75%209.41%2011.41%209.75%2011%209.75Z'%20fill='%23F5F5F5'/%3e%3cpath%20d='M8%2015.75H2C1.59%2015.75%201.25%2015.41%201.25%2015C1.25%2014.59%201.59%2014.25%202%2014.25H8C8.41%2014.25%208.75%2014.59%208.75%2015C8.75%2015.41%208.41%2015.75%208%2015.75Z'%20fill='%23F5F5F5'/%3e%3cpath%20d='M6%2021.75H2C1.59%2021.75%201.25%2021.41%201.25%2021C1.25%2020.59%201.59%2020.25%202%2020.25H6C6.41%2020.25%206.75%2020.59%206.75%2021C6.75%2021.41%206.41%2021.75%206%2021.75Z'%20fill='%23F5F5F5'/%3e%3cpath%20d='M13%2011.9149V19.0861C13%2020.5548%2014.589%2021.4764%2015.8571%2020.7421L18.953%2018.9512L22.0489%2017.1528C23.317%2016.4184%2023.317%2014.5826%2022.0489%2013.8482L18.953%2012.0498L15.8571%2010.2589C14.589%209.52455%2013%2010.4387%2013%2011.9149Z'%20fill='%23F5F5F5'/%3e%3c/svg%3e",starSlash="data:image/svg+xml,%3csvg%20width='12'%20height='12'%20viewBox='0%200%2012%2012'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M9.3501%207.22928C9.1751%207.40428%209.0751%207.75428%209.1301%207.99428L9.4751%209.50428C9.6201%2010.1293%209.5301%2010.5993%209.2201%2010.8243C9.0951%2010.9143%208.9451%2010.9593%208.7701%2010.9593C8.5151%2010.9593%208.2151%2010.8643%207.8851%2010.6693L6.4201%209.79928C6.1901%209.66428%205.8101%209.66428%205.5801%209.79928L4.1151%2010.6693C3.5601%2010.9943%203.0851%2011.0493%202.7801%2010.8243C2.7601%2010.8093%202.7401%2010.7943%202.7251%2010.7743L9.0351%204.46428C9.2651%204.23428%209.5901%204.12928%209.9101%204.18428L9.9851%204.19928C10.5151%204.28928%2010.8701%204.52928%2010.9851%204.87928C11.0951%205.22928%2010.9451%205.63428%2010.5651%206.01428L9.3501%207.22928Z'%20fill='%23FFBA02'/%3e%3cpath%20d='M2.87017%208C2.92517%207.76%202.82517%207.405%202.65017%207.23L1.43517%206.015C1.05517%205.635%200.905174%205.23%201.01517%204.88C1.13017%204.53%201.48517%204.29%202.01517%204.2L3.57517%203.94C3.80017%203.9%204.07517%203.7%204.18017%203.495L5.04017%201.77C5.29017%201.275%205.63017%201%206.00017%201C6.37017%201%206.71017%201.275%206.96017%201.77L7.82017%203.495C7.88517%203.625%208.02017%203.75%208.16517%203.835L2.53517%209.465L2.87017%208Z'%20fill='%23FFBA02'/%3e%3c/svg%3e",videoWhite="data:image/svg+xml,%3csvg%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M9.9987%2015.1673H5.9987C2.3787%2015.1673%200.832031%2013.6207%200.832031%2010.0007V6.00065C0.832031%202.38065%202.3787%200.833984%205.9987%200.833984H9.9987C13.6187%200.833984%2015.1654%202.38065%2015.1654%206.00065V10.0007C15.1654%2013.6207%2013.6187%2015.1673%209.9987%2015.1673ZM5.9987%201.83398C2.92536%201.83398%201.83203%202.92732%201.83203%206.00065V10.0007C1.83203%2013.074%202.92536%2014.1673%205.9987%2014.1673H9.9987C13.072%2014.1673%2014.1654%2013.074%2014.1654%2010.0007V6.00065C14.1654%202.92732%2013.072%201.83398%209.9987%201.83398H5.9987Z'%20fill='%23E3E2E6'/%3e%3cpath%20d='M14.3197%2011.9062H1.67969C1.40635%2011.9062%201.17969%2011.6796%201.17969%2011.4062C1.17969%2011.1329%201.40635%2010.9062%201.67969%2010.9062H14.3197C14.593%2010.9062%2014.8197%2011.1329%2014.8197%2011.4062C14.8197%2011.6796%2014.5997%2011.9062%2014.3197%2011.9062Z'%20fill='%23E3E2E6'/%3e%3cpath%20d='M14.3197%205.24023H1.67969C1.40635%205.24023%201.17969%205.01357%201.17969%204.74023C1.17969%204.4669%201.39969%204.24023%201.67969%204.24023H14.3197C14.593%204.24023%2014.8197%204.4669%2014.8197%204.74023C14.8197%205.01357%2014.5997%205.24023%2014.3197%205.24023Z'%20fill='%23E3E2E6'/%3e%3cpath%20d='M4.64844%2014.8062C4.3751%2014.8062%204.14844%2014.5796%204.14844%2014.3062V11.4062C4.14844%2011.1329%204.3751%2010.9062%204.64844%2010.9062C4.92177%2010.9062%205.14844%2011.1329%205.14844%2011.4062V14.3062C5.14844%2014.5862%204.92177%2014.8062%204.64844%2014.8062Z'%20fill='%23E3E2E6'/%3e%3cpath%20d='M8%2015.1462C7.72667%2015.1462%207.5%2014.9196%207.5%2014.6462V11.4062C7.5%2011.1329%207.72667%2010.9062%208%2010.9062C8.27333%2010.9062%208.5%2011.1329%208.5%2011.4062V14.6462C8.5%2014.9196%208.27333%2015.1462%208%2015.1462Z'%20fill='%23E3E2E6'/%3e%3cpath%20d='M11.3125%2014.8462C11.0392%2014.8462%2010.8125%2014.6196%2010.8125%2014.3462V11.4062C10.8125%2011.1329%2011.0392%2010.9062%2011.3125%2010.9062C11.5858%2010.9062%2011.8125%2011.1329%2011.8125%2011.4062V14.3462C11.8125%2014.6262%2011.5858%2014.8462%2011.3125%2014.8462Z'%20fill='%23E3E2E6'/%3e%3cpath%20d='M4.64844%204.80625C4.3751%204.80625%204.14844%204.57958%204.14844%204.30625V1.40625C4.14844%201.13292%204.3751%200.90625%204.64844%200.90625C4.92177%200.90625%205.14844%201.13292%205.14844%201.40625V4.30625C5.14844%204.58625%204.92177%204.80625%204.64844%204.80625Z'%20fill='%23E3E2E6'/%3e%3cpath%20d='M8%205.14625C7.72667%205.14625%207.5%204.91958%207.5%204.64625V1.40625C7.5%201.13292%207.72667%200.90625%208%200.90625C8.27333%200.90625%208.5%201.13292%208.5%201.40625V4.64625C8.5%204.91958%208.27333%205.14625%208%205.14625Z'%20fill='%23E3E2E6'/%3e%3cpath%20d='M8%2012.5208C7.72667%2012.5208%207.5%2012.2942%207.5%2012.0208V4.6875C7.5%204.41417%207.72667%204.1875%208%204.1875C8.27333%204.1875%208.5%204.41417%208.5%204.6875V12.0208C8.5%2012.2942%208.27333%2012.5208%208%2012.5208Z'%20fill='%23E3E2E6'/%3e%3cpath%20d='M11.3125%204.84625C11.0392%204.84625%2010.8125%204.61958%2010.8125%204.34625V1.40625C10.8125%201.13292%2011.0392%200.90625%2011.3125%200.90625C11.5858%200.90625%2011.8125%201.13292%2011.8125%201.40625V4.34625C11.8125%204.62625%2011.5858%204.84625%2011.3125%204.84625Z'%20fill='%23E3E2E6'/%3e%3c/svg%3e",videoBlack="data:image/svg+xml,%3csvg%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M9.9987%2015.1673H5.9987C2.3787%2015.1673%200.832031%2013.6207%200.832031%2010.0007V6.00065C0.832031%202.38065%202.3787%200.833984%205.9987%200.833984H9.9987C13.6187%200.833984%2015.1654%202.38065%2015.1654%206.00065V10.0007C15.1654%2013.6207%2013.6187%2015.1673%209.9987%2015.1673ZM5.9987%201.83398C2.92536%201.83398%201.83203%202.92732%201.83203%206.00065V10.0007C1.83203%2013.074%202.92536%2014.1673%205.9987%2014.1673H9.9987C13.072%2014.1673%2014.1654%2013.074%2014.1654%2010.0007V6.00065C14.1654%202.92732%2013.072%201.83398%209.9987%201.83398H5.9987Z'%20fill='%23393E46'/%3e%3cpath%20d='M14.3197%2011.9062H1.67969C1.40635%2011.9062%201.17969%2011.6796%201.17969%2011.4062C1.17969%2011.1329%201.40635%2010.9062%201.67969%2010.9062H14.3197C14.593%2010.9062%2014.8197%2011.1329%2014.8197%2011.4062C14.8197%2011.6796%2014.5997%2011.9062%2014.3197%2011.9062Z'%20fill='%23393E46'/%3e%3cpath%20d='M14.3197%205.24023H1.67969C1.40635%205.24023%201.17969%205.01357%201.17969%204.74023C1.17969%204.4669%201.39969%204.24023%201.67969%204.24023H14.3197C14.593%204.24023%2014.8197%204.4669%2014.8197%204.74023C14.8197%205.01357%2014.5997%205.24023%2014.3197%205.24023Z'%20fill='%23393E46'/%3e%3cpath%20d='M4.64844%2014.8062C4.3751%2014.8062%204.14844%2014.5796%204.14844%2014.3062V11.4062C4.14844%2011.1329%204.3751%2010.9062%204.64844%2010.9062C4.92177%2010.9062%205.14844%2011.1329%205.14844%2011.4062V14.3062C5.14844%2014.5862%204.92177%2014.8062%204.64844%2014.8062Z'%20fill='%23393E46'/%3e%3cpath%20d='M8%2015.1462C7.72667%2015.1462%207.5%2014.9196%207.5%2014.6462V11.4062C7.5%2011.1329%207.72667%2010.9062%208%2010.9062C8.27333%2010.9062%208.5%2011.1329%208.5%2011.4062V14.6462C8.5%2014.9196%208.27333%2015.1462%208%2015.1462Z'%20fill='%23393E46'/%3e%3cpath%20d='M11.3125%2014.8462C11.0392%2014.8462%2010.8125%2014.6196%2010.8125%2014.3462V11.4062C10.8125%2011.1329%2011.0392%2010.9062%2011.3125%2010.9062C11.5858%2010.9062%2011.8125%2011.1329%2011.8125%2011.4062V14.3462C11.8125%2014.6262%2011.5858%2014.8462%2011.3125%2014.8462Z'%20fill='%23393E46'/%3e%3cpath%20d='M4.64844%204.80625C4.3751%204.80625%204.14844%204.57958%204.14844%204.30625V1.40625C4.14844%201.13292%204.3751%200.90625%204.64844%200.90625C4.92177%200.90625%205.14844%201.13292%205.14844%201.40625V4.30625C5.14844%204.58625%204.92177%204.80625%204.64844%204.80625Z'%20fill='%23393E46'/%3e%3cpath%20d='M8%205.14625C7.72667%205.14625%207.5%204.91958%207.5%204.64625V1.40625C7.5%201.13292%207.72667%200.90625%208%200.90625C8.27333%200.90625%208.5%201.13292%208.5%201.40625V4.64625C8.5%204.91958%208.27333%205.14625%208%205.14625Z'%20fill='%23393E46'/%3e%3cpath%20d='M8%2012.5208C7.72667%2012.5208%207.5%2012.2942%207.5%2012.0208V4.6875C7.5%204.41417%207.72667%204.1875%208%204.1875C8.27333%204.1875%208.5%204.41417%208.5%204.6875V12.0208C8.5%2012.2942%208.27333%2012.5208%208%2012.5208Z'%20fill='%23393E46'/%3e%3cpath%20d='M11.3125%204.84625C11.0392%204.84625%2010.8125%204.61958%2010.8125%204.34625V1.40625C10.8125%201.13292%2011.0392%200.90625%2011.3125%200.90625C11.5858%200.90625%2011.8125%201.13292%2011.8125%201.40625V4.34625C11.8125%204.62625%2011.5858%204.84625%2011.3125%204.84625Z'%20fill='%23393E46'/%3e%3c/svg%3e",microphoneWhite="data:image/svg+xml,%3csvg%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M7.9987%2010.834C6.25203%2010.834%204.83203%209.41398%204.83203%207.66732V4.00065C4.83203%202.25398%206.25203%200.833984%207.9987%200.833984C9.74536%200.833984%2011.1654%202.25398%2011.1654%204.00065V7.66732C11.1654%209.41398%209.74536%2010.834%207.9987%2010.834ZM7.9987%201.83398C6.80536%201.83398%205.83203%202.80732%205.83203%204.00065V7.66732C5.83203%208.86065%206.80536%209.83398%207.9987%209.83398C9.19203%209.83398%2010.1654%208.86065%2010.1654%207.66732V4.00065C10.1654%202.80732%209.19203%201.83398%207.9987%201.83398Z'%20fill='%23E3E2E6'/%3e%3cpath%20d='M7.99844%2013.1669C4.91177%2013.1669%202.39844%2010.6536%202.39844%207.56693V6.43359C2.39844%206.16026%202.6251%205.93359%202.89844%205.93359C3.17177%205.93359%203.39844%206.16026%203.39844%206.43359V7.56693C3.39844%2010.1003%205.4651%2012.1669%207.99844%2012.1669C10.5318%2012.1669%2012.5984%2010.1003%2012.5984%207.56693V6.43359C12.5984%206.16026%2012.8251%205.93359%2013.0984%205.93359C13.3718%205.93359%2013.5984%206.16026%2013.5984%206.43359V7.56693C13.5984%2010.6536%2011.0851%2013.1669%207.99844%2013.1669Z'%20fill='%23E3E2E6'/%3e%3cpath%20d='M8.92789%204.78753C8.87455%204.78753%208.81455%204.78086%208.75455%204.76086C8.26789%204.58086%207.73455%204.58086%207.24789%204.76086C6.98789%204.85419%206.70122%204.72086%206.60789%204.46086C6.51455%204.20086%206.64789%203.91419%206.90789%203.82086C7.61455%203.56753%208.39455%203.56753%209.10122%203.82086C9.36122%203.91419%209.49455%204.20086%209.40122%204.46086C9.32122%204.66086%209.12789%204.78753%208.92789%204.78753Z'%20fill='%23E3E2E6'/%3e%3cpath%20d='M8.53208%206.20086C8.48542%206.20086%208.44542%206.19419%208.39875%206.18086C8.13208%206.10753%207.85875%206.10753%207.59208%206.18086C7.32542%206.25419%207.05208%206.09419%206.97875%205.82753C6.90542%205.56753%207.06542%205.29419%207.33208%205.22086C7.76542%205.10086%208.23208%205.10086%208.66542%205.22086C8.93208%205.29419%209.09208%205.56753%209.01875%205.83419C8.95875%206.05419%208.75208%206.20086%208.53208%206.20086Z'%20fill='%23E3E2E6'/%3e%3cpath%20d='M8%2015.166C7.72667%2015.166%207.5%2014.9393%207.5%2014.666V12.666C7.5%2012.3927%207.72667%2012.166%208%2012.166C8.27333%2012.166%208.5%2012.3927%208.5%2012.666V14.666C8.5%2014.9393%208.27333%2015.166%208%2015.166Z'%20fill='%23E3E2E6'/%3e%3c/svg%3e",microphoneBlack="data:image/svg+xml,%3csvg%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M7.9987%2010.834C6.25203%2010.834%204.83203%209.41398%204.83203%207.66732V4.00065C4.83203%202.25398%206.25203%200.833984%207.9987%200.833984C9.74536%200.833984%2011.1654%202.25398%2011.1654%204.00065V7.66732C11.1654%209.41398%209.74536%2010.834%207.9987%2010.834ZM7.9987%201.83398C6.80536%201.83398%205.83203%202.80732%205.83203%204.00065V7.66732C5.83203%208.86065%206.80536%209.83398%207.9987%209.83398C9.19203%209.83398%2010.1654%208.86065%2010.1654%207.66732V4.00065C10.1654%202.80732%209.19203%201.83398%207.9987%201.83398Z'%20fill='%23393E46'/%3e%3cpath%20d='M7.99844%2013.1669C4.91177%2013.1669%202.39844%2010.6536%202.39844%207.56693V6.43359C2.39844%206.16026%202.6251%205.93359%202.89844%205.93359C3.17177%205.93359%203.39844%206.16026%203.39844%206.43359V7.56693C3.39844%2010.1003%205.4651%2012.1669%207.99844%2012.1669C10.5318%2012.1669%2012.5984%2010.1003%2012.5984%207.56693V6.43359C12.5984%206.16026%2012.8251%205.93359%2013.0984%205.93359C13.3718%205.93359%2013.5984%206.16026%2013.5984%206.43359V7.56693C13.5984%2010.6536%2011.0851%2013.1669%207.99844%2013.1669Z'%20fill='%23393E46'/%3e%3cpath%20d='M8.92789%204.78753C8.87455%204.78753%208.81455%204.78086%208.75455%204.76086C8.26789%204.58086%207.73455%204.58086%207.24789%204.76086C6.98789%204.85419%206.70122%204.72086%206.60789%204.46086C6.51455%204.20086%206.64789%203.91419%206.90789%203.82086C7.61455%203.56753%208.39455%203.56753%209.10122%203.82086C9.36122%203.91419%209.49455%204.20086%209.40122%204.46086C9.32122%204.66086%209.12789%204.78753%208.92789%204.78753Z'%20fill='%23393E46'/%3e%3cpath%20d='M8.53208%206.20086C8.48542%206.20086%208.44542%206.19419%208.39875%206.18086C8.13208%206.10753%207.85875%206.10753%207.59208%206.18086C7.32542%206.25419%207.05208%206.09419%206.97875%205.82753C6.90542%205.56753%207.06542%205.29419%207.33208%205.22086C7.76542%205.10086%208.23208%205.10086%208.66542%205.22086C8.93208%205.29419%209.09208%205.56753%209.01875%205.83419C8.95875%206.05419%208.75208%206.20086%208.53208%206.20086Z'%20fill='%23393E46'/%3e%3cpath%20d='M8%2015.166C7.72667%2015.166%207.5%2014.9393%207.5%2014.666V12.666C7.5%2012.3927%207.72667%2012.166%208%2012.166C8.27333%2012.166%208.5%2012.3927%208.5%2012.666V14.666C8.5%2014.9393%208.27333%2015.166%208%2015.166Z'%20fill='%23393E46'/%3e%3c/svg%3e",filtersWhite="data:image/svg+xml,%3csvg%20width='32'%20height='32'%20viewBox='0%200%2032%2032'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M30.3327%206.66602C30.3327%207.21268%2029.8794%207.66602%2029.3327%207.66602L14.666%207.66602C14.1193%207.66602%2013.666%207.21268%2013.666%206.66602C13.666%206.11935%2014.1193%205.66602%2014.666%205.66602L29.3327%205.66602C29.8794%205.66602%2030.3327%206.11935%2030.3327%206.66602Z'%20fill='%23DBDDDE'/%3e%3cpath%20d='M10.3327%206.66602C10.3327%207.21268%209.87935%207.66602%209.33268%207.66602L2.66602%207.66602C2.11935%207.66602%201.66602%207.21268%201.66602%206.66602C1.66602%206.11935%202.11935%205.66602%202.66602%205.66602H9.33268C9.87935%205.66602%2010.3327%206.11935%2010.3327%206.66602Z'%20fill='%23DBDDDE'/%3e%3cpath%20d='M30.3327%2016C30.3327%2016.5467%2029.8793%2017%2029.3327%2017H22.666C22.1193%2017%2021.666%2016.5467%2021.666%2016C21.666%2015.4533%2022.1193%2015%2022.666%2015H29.3327C29.8793%2015%2030.3327%2015.4533%2030.3327%2016Z'%20fill='%23DBDDDE'/%3e%3cpath%20d='M18.3327%2016C18.3327%2016.5467%2017.8794%2017%2017.3327%2017H2.66602C2.11935%2017%201.66602%2016.5467%201.66602%2016C1.66602%2015.4533%202.11935%2015%202.66602%2015H17.3327C17.8794%2015%2018.3327%2015.4533%2018.3327%2016Z'%20fill='%23DBDDDE'/%3e%3cpath%20d='M30.3327%2025.334C30.3327%2025.8807%2029.8794%2026.334%2029.3327%2026.334H14.666C14.1193%2026.334%2013.666%2025.8807%2013.666%2025.334C13.666%2024.7873%2014.1193%2024.334%2014.666%2024.334H29.3327C29.8794%2024.334%2030.3327%2024.7873%2030.3327%2025.334Z'%20fill='%23DBDDDE'/%3e%3cpath%20d='M10.3327%2025.334C10.3327%2025.8807%209.87935%2026.334%209.33268%2026.334H2.66602C2.11935%2026.334%201.66602%2025.8807%201.66602%2025.334C1.66602%2024.7873%202.11935%2024.334%202.66602%2024.334H9.33268C9.87935%2024.334%2010.3327%2024.7873%2010.3327%2025.334Z'%20fill='%23DBDDDE'/%3e%3cpath%20d='M15.666%2022.6667V28C15.666%2028.5467%2015.2127%2029%2014.666%2029C14.1193%2029%2013.666%2028.5467%2013.666%2028V22.6667C13.666%2022.12%2014.1193%2021.6667%2014.666%2021.6667C15.2127%2021.6667%2015.666%2022.12%2015.666%2022.6667Z'%20fill='%23DBDDDE'/%3e%3cpath%20d='M15.666%204.00065V9.33398C15.666%209.88065%2015.2127%2010.334%2014.666%2010.334C14.1193%2010.334%2013.666%209.88065%2013.666%209.33398V4.00065C13.666%203.45398%2014.1193%203.00065%2014.666%203.00065C15.2127%203.00065%2015.666%203.45398%2015.666%204.00065Z'%20fill='%23DBDDDE'/%3e%3cpath%20d='M18.334%2013.3327V18.666C18.334%2019.2127%2017.8807%2019.666%2017.334%2019.666C16.7873%2019.666%2016.334%2019.2127%2016.334%2018.666V13.3327C16.334%2012.786%2016.7873%2012.3327%2017.334%2012.3327C17.8807%2012.3327%2018.334%2012.786%2018.334%2013.3327Z'%20fill='%23DBDDDE'/%3e%3c/svg%3e",filtersBlack="data:image/svg+xml,%3csvg%20width='32'%20height='32'%20viewBox='0%200%2032%2032'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M29.8346%206.66602C29.8346%206.93654%2029.6052%207.16602%2029.3346%207.16602L14.668%207.16602C14.3974%207.16602%2014.168%206.93654%2014.168%206.66602C14.168%206.39549%2014.3974%206.16602%2014.668%206.16602L29.3346%206.16602C29.6052%206.16602%2029.8346%206.39549%2029.8346%206.66602Z'%20fill='%23BDBDBD'%20stroke='%23393E46'/%3e%3cpath%20d='M9.83463%206.66602C9.83463%206.93654%209.60516%207.16602%209.33463%207.16602L2.66797%207.16602C2.39744%207.16602%202.16797%206.93654%202.16797%206.66602C2.16797%206.39549%202.39744%206.16602%202.66797%206.16602H9.33463C9.60516%206.16602%209.83463%206.39549%209.83463%206.66602Z'%20fill='%23BDBDBD'%20stroke='%23393E46'/%3e%3cpath%20d='M29.8346%2016C29.8346%2016.2705%2029.6052%2016.5%2029.3346%2016.5H22.668C22.3974%2016.5%2022.168%2016.2705%2022.168%2016C22.168%2015.7295%2022.3974%2015.5%2022.668%2015.5H29.3346C29.6052%2015.5%2029.8346%2015.7295%2029.8346%2016Z'%20fill='%23BDBDBD'%20stroke='%23393E46'/%3e%3cpath%20d='M17.8346%2016C17.8346%2016.2705%2017.6052%2016.5%2017.3346%2016.5H2.66797C2.39744%2016.5%202.16797%2016.2705%202.16797%2016C2.16797%2015.7295%202.39744%2015.5%202.66797%2015.5L17.3346%2015.5C17.6052%2015.5%2017.8346%2015.7295%2017.8346%2016Z'%20fill='%23BDBDBD'%20stroke='%23393E46'/%3e%3cpath%20d='M29.8346%2025.334C29.8346%2025.6045%2029.6052%2025.834%2029.3346%2025.834H14.668C14.3974%2025.834%2014.168%2025.6045%2014.168%2025.334C14.168%2025.0635%2014.3974%2024.834%2014.668%2024.834H29.3346C29.6052%2024.834%2029.8346%2025.0635%2029.8346%2025.334Z'%20fill='%23BDBDBD'%20stroke='%23393E46'/%3e%3cpath%20d='M9.83463%2025.334C9.83463%2025.6045%209.60516%2025.834%209.33463%2025.834H2.66797C2.39744%2025.834%202.16797%2025.6045%202.16797%2025.334C2.16797%2025.0635%202.39744%2024.834%202.66797%2024.834H9.33463C9.60516%2024.834%209.83463%2025.0635%209.83463%2025.334Z'%20fill='%23BDBDBD'%20stroke='%23393E46'/%3e%3cpath%20d='M15.168%2022.6667V28C15.168%2028.2705%2014.9385%2028.5%2014.668%2028.5C14.3974%2028.5%2014.168%2028.2705%2014.168%2028V22.6667C14.168%2022.3961%2014.3974%2022.1667%2014.668%2022.1667C14.9385%2022.1667%2015.168%2022.3961%2015.168%2022.6667Z'%20fill='%23BDBDBD'%20stroke='%23393E46'/%3e%3cpath%20d='M15.168%204.00065V9.33398C15.168%209.60451%2014.9385%209.83398%2014.668%209.83398C14.3974%209.83398%2014.168%209.60451%2014.168%209.33398V4.00065C14.168%203.73013%2014.3974%203.50065%2014.668%203.50065C14.9385%203.50065%2015.168%203.73013%2015.168%204.00065Z'%20fill='%23BDBDBD'%20stroke='%23393E46'/%3e%3cpath%20d='M17.832%2013.3327V18.666C17.832%2018.9365%2017.6026%2019.166%2017.332%2019.166C17.0615%2019.166%2016.832%2018.9365%2016.832%2018.666V13.3327C16.832%2013.0622%2017.0615%2012.8327%2017.332%2012.8327C17.6026%2012.8327%2017.832%2013.0622%2017.832%2013.3327Z'%20fill='%23BDBDBD'%20stroke='%23393E46'/%3e%3c/svg%3e",editMarker="data:image/svg+xml,%3csvg%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M14%2014.666H2C1.72667%2014.666%201.5%2014.4393%201.5%2014.166C1.5%2013.8927%201.72667%2013.666%202%2013.666H14C14.2733%2013.666%2014.5%2013.8927%2014.5%2014.166C14.5%2014.4393%2014.2733%2014.666%2014%2014.666Z'%20fill='white'/%3e%3cpath%20d='M12.6804%202.32043C11.387%201.0271%2010.1204%200.993764%208.79371%202.32043L7.98704%203.1271C7.92037%203.19376%207.89371%203.30043%207.92038%203.39376C8.42704%205.16043%209.84038%206.57376%2011.607%207.08043C11.6337%207.0871%2011.6604%207.09376%2011.687%207.09376C11.7604%207.09376%2011.827%207.0671%2011.8804%207.01376L12.6804%206.2071C13.3404%205.55376%2013.6604%204.92043%2013.6604%204.28043C13.667%203.62043%2013.347%202.98043%2012.6804%202.32043Z'%20fill='white'/%3e%3cpath%20d='M10.4075%207.68654C10.2142%207.5932%2010.0275%207.49987%209.84753%207.3932C9.70086%207.30654%209.56086%207.2132%209.42086%207.1132C9.30753%207.03987%209.1742%206.9332%209.04753%206.82654C9.0342%206.81987%208.98753%206.77987%208.9342%206.72654C8.7142%206.53987%208.46753%206.29987%208.24753%206.0332C8.22753%206.01987%208.1942%205.9732%208.14753%205.9132C8.08086%205.8332%207.96753%205.69987%207.86753%205.54654C7.78753%205.44654%207.6942%205.29987%207.60753%205.1532C7.50086%204.9732%207.40753%204.7932%207.3142%204.60654C7.19182%204.34431%206.84765%204.26641%206.64304%204.47103L2.8942%208.21987C2.80753%208.30654%202.72753%208.4732%202.70753%208.58654L2.34753%2011.1399C2.28086%2011.5932%202.40753%2012.0199%202.68753%2012.3065C2.92753%2012.5399%203.26086%2012.6665%203.62086%2012.6665C3.70086%2012.6665%203.78086%2012.6599%203.86086%2012.6465L6.42086%2012.2865C6.54086%2012.2665%206.70753%2012.1865%206.78753%2012.0999L10.5426%208.34484C10.7431%208.14432%2010.6677%207.79929%2010.4075%207.68654Z'%20fill='white'/%3e%3c/svg%3e",trashMarker="data:image/svg+xml,%3csvg%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M14.0471%203.48732C12.9738%203.38065%2011.9004%203.30065%2010.8204%203.24065V3.23398L10.6738%202.36732C10.5738%201.75398%2010.4271%200.833984%208.8671%200.833984H7.12043C5.5671%200.833984%205.42043%201.71398%205.31376%202.36065L5.17376%203.21398C4.55376%203.25398%203.93376%203.29398%203.31376%203.35398L1.95376%203.48732C1.67376%203.51398%201.47376%203.76065%201.50043%204.03398C1.5271%204.30732%201.7671%204.50732%202.0471%204.48065L3.4071%204.34732C6.90043%204.00065%2010.4204%204.13398%2013.9538%204.48732C13.9738%204.48732%2013.9871%204.48732%2014.0071%204.48732C14.2604%204.48732%2014.4804%204.29398%2014.5071%204.03398C14.5271%203.76065%2014.3271%203.51398%2014.0471%203.48732Z'%20fill='white'/%3e%3cpath%20d='M12.8192%205.42602C12.6592%205.25935%2012.4392%205.16602%2012.2125%205.16602H3.78585C3.55918%205.16602%203.33252%205.25935%203.17918%205.42602C3.02585%205.59268%202.93918%205.81935%202.95252%206.05268L3.36585%2012.8927C3.43918%2013.906%203.53252%2015.1727%205.85918%2015.1727H10.1392C12.4658%2015.1727%2012.5592%2013.9127%2012.6325%2012.8927L13.0458%206.05935C13.0592%205.81935%2012.9725%205.59268%2012.8192%205.42602ZM9.10585%2011.8327H6.88585C6.61252%2011.8327%206.38585%2011.606%206.38585%2011.3327C6.38585%2011.0593%206.61252%2010.8327%206.88585%2010.8327H9.10585C9.37918%2010.8327%209.60585%2011.0593%209.60585%2011.3327C9.60585%2011.606%209.37918%2011.8327%209.10585%2011.8327ZM9.66585%209.16602H6.33252C6.05918%209.16602%205.83252%208.93935%205.83252%208.66602C5.83252%208.39268%206.05918%208.16602%206.33252%208.16602H9.66585C9.93918%208.16602%2010.1658%208.39268%2010.1658%208.66602C10.1658%208.93935%209.93918%209.16602%209.66585%209.16602Z'%20fill='white'/%3e%3c/svg%3e",trashRed="data:image/svg+xml,%3csvg%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M14.0004%204.48633C13.9871%204.48633%2013.9671%204.48633%2013.9471%204.48633C10.4204%204.13299%206.90043%203.99966%203.41377%204.35299L2.05377%204.48633C1.77377%204.51299%201.5271%204.31299%201.50043%204.03299C1.47377%203.75299%201.67377%203.51299%201.9471%203.48633L3.3071%203.35299C6.85377%202.99299%2010.4471%203.13299%2014.0471%203.48633C14.3204%203.51299%2014.5204%203.75966%2014.4938%204.03299C14.4738%204.29299%2014.2538%204.48633%2014.0004%204.48633Z'%20fill='%23EF4444'/%3e%3cpath%20d='M5.66651%203.81301C5.63984%203.81301%205.61318%203.81301%205.57984%203.80634C5.31318%203.75967%205.12651%203.49967%205.17318%203.23301L5.31984%202.35967C5.42651%201.71967%205.57318%200.833008%207.12651%200.833008H8.87318C10.4332%200.833008%2010.5798%201.75301%2010.6798%202.36634L10.8265%203.23301C10.8732%203.50634%2010.6865%203.76634%2010.4198%203.80634C10.1465%203.85301%209.88651%203.66634%209.84651%203.39967L9.69984%202.53301C9.60651%201.95301%209.58651%201.83967%208.87984%201.83967H7.13318C6.42651%201.83967%206.41318%201.93301%206.31318%202.52634L6.15984%203.39301C6.11984%203.63967%205.90651%203.81301%205.66651%203.81301Z'%20fill='%23EF4444'/%3e%3cpath%20d='M10.1396%2015.1667H5.85961C3.53294%2015.1667%203.43961%2013.8801%203.36627%2012.8401L2.93294%206.12672C2.91294%205.85338%203.12627%205.61338%203.39961%205.59338C3.67961%205.58005%203.91294%205.78672%203.93294%206.06005L4.36627%2012.7734C4.43961%2013.7867%204.46627%2014.1667%205.85961%2014.1667H10.1396C11.5396%2014.1667%2011.5663%2013.7867%2011.6329%2012.7734L12.0663%206.06005C12.0863%205.78672%2012.3263%205.58005%2012.5996%205.59338C12.8729%205.61338%2013.0863%205.84672%2013.0663%206.12672L12.6329%2012.8401C12.5596%2013.8801%2012.4663%2015.1667%2010.1396%2015.1667Z'%20fill='%23EF4444'/%3e%3cpath%20d='M9.10672%2011.5H6.88672C6.61339%2011.5%206.38672%2011.2733%206.38672%2011C6.38672%2010.7267%206.61339%2010.5%206.88672%2010.5H9.10672C9.38005%2010.5%209.60672%2010.7267%209.60672%2011C9.60672%2011.2733%209.38005%2011.5%209.10672%2011.5Z'%20fill='%23EF4444'/%3e%3cpath%20d='M9.66634%208.83301H6.33301C6.05967%208.83301%205.83301%208.60634%205.83301%208.33301C5.83301%208.05967%206.05967%207.83301%206.33301%207.83301H9.66634C9.93967%207.83301%2010.1663%208.05967%2010.1663%208.33301C10.1663%208.60634%209.93967%208.83301%209.66634%208.83301Z'%20fill='%23EF4444'/%3e%3c/svg%3e",personalMarkerSign="data:image/svg+xml,%3csvg%20width='12'%20height='17'%20viewBox='0%200%2012%2017'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M6.71875%2015.625C6.34375%2016.0938%205.625%2016.0938%205.25%2015.625C3.65625%2013.5938%200%208.75%200%206C0%202.6875%202.6875%200%206%200C9.3125%200%2012%202.6875%2012%206C12%208.75%208.34375%2013.5938%206.71875%2015.625ZM4%204C3.4375%204%203%204.46875%203%205C3%205.5625%203.4375%206%204%206C4.53125%206%205%205.5625%205%205C5%204.46875%204.53125%204%204%204ZM7%205C7%205.5625%207.4375%206%208%206C8.53125%206%209%205.5625%209%205C9%204.46875%208.53125%204%208%204C7.4375%204%207%204.46875%207%205ZM4%207.65625C3.8125%207.375%203.4375%207.3125%203.125%207.5C2.84375%207.6875%202.78125%208.0625%202.96875%208.375C3.3125%208.90625%204.375%209.875%206%209.875C7.59375%209.875%208.65625%208.90625%209%208.375C9.1875%208.0625%209.125%207.6875%208.84375%207.5C8.53125%207.3125%208.15625%207.375%207.96875%207.65625C7.78125%207.96875%207.0625%208.625%206%208.625C4.90625%208.625%204.1875%207.96875%204%207.65625Z'%20fill='%237C4DFF'/%3e%3c/svg%3e",trashDeleteModal="data:image/svg+xml,%3csvg%20width='26'%20height='26'%20viewBox='0%200%2026%2026'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20clip-path='url(%23clip0_6341_252779)'%3e%3cpath%20d='M22.4477%205.94857C20.7707%205.7819%2019.0936%205.6569%2017.4061%205.56315V5.55273L17.1769%204.19857C17.0207%203.24023%2016.7915%201.80273%2014.354%201.80273H11.6248C9.19774%201.80273%208.96857%203.17773%208.8019%204.18815L8.58315%205.52148C7.6144%205.58398%206.64565%205.64648%205.6769%205.74023L3.5519%205.94857C3.1144%205.99023%202.8019%206.37565%202.84357%206.80273C2.88523%207.22982%203.26023%207.54232%203.69773%207.50065L5.82274%207.29232C11.2811%206.75065%2016.7811%206.95898%2022.3019%207.51107C22.3332%207.51107%2022.354%207.51107%2022.3852%207.51107C22.7811%207.51107%2023.1248%207.20898%2023.1665%206.80273C23.1977%206.37565%2022.8852%205.99023%2022.4477%205.94857Z'%20fill='%23FDFEFF'/%3e%3cpath%20d='M20.532%208.97852C20.282%208.7181%2019.9383%208.57227%2019.5841%208.57227H6.41746C6.0633%208.57227%205.70913%208.7181%205.46955%208.97852C5.22996%209.23893%205.09455%209.5931%205.11538%209.95768L5.76121%2020.6452C5.8758%2022.2285%206.02163%2024.2077%209.65705%2024.2077H16.3445C19.98%2024.2077%2020.1258%2022.2389%2020.2404%2020.6452L20.8862%209.9681C20.907%209.5931%2020.7716%209.23893%2020.532%208.97852ZM14.73%2018.9889H11.2612C10.8341%2018.9889%2010.48%2018.6348%2010.48%2018.2077C10.48%2017.7806%2010.8341%2017.4264%2011.2612%2017.4264H14.73C15.157%2017.4264%2015.5112%2017.7806%2015.5112%2018.2077C15.5112%2018.6348%2015.157%2018.9889%2014.73%2018.9889ZM15.605%2014.8223H10.3966C9.96955%2014.8223%209.61538%2014.4681%209.61538%2014.041C9.61538%2013.6139%209.96955%2013.2598%2010.3966%2013.2598H15.605C16.032%2013.2598%2016.3862%2013.6139%2016.3862%2014.041C16.3862%2014.4681%2016.032%2014.8223%2015.605%2014.8223Z'%20fill='%23FDFEFF'/%3e%3c/g%3e%3cdefs%3e%3cclipPath%20id='clip0_6341_252779'%3e%3crect%20width='25'%20height='25'%20fill='white'%20transform='translate(0.5%200.5)'/%3e%3c/clipPath%3e%3c/defs%3e%3c/svg%3e",user1White="data:image/svg+xml,%3csvg%20width='56'%20height='56'%20viewBox='0%200%2056%2056'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20clip-path='url(%23clip0_6639_158419)'%3e%3cpath%20d='M56%2028C56%2012.536%2043.464%200%2028%200C12.536%200%200%2012.536%200%2028C0%2043.464%2012.536%2056%2028%2056C43.464%2056%2056%2043.464%2056%2028Z'%20fill='%23D5DAE8'%20fill-opacity='0.4'/%3e%3cpath%20d='M28.2298%2031.5132C23.6649%2031.5132%2019.7656%2032.2329%2019.7656%2035.1118C19.7656%2037.9917%2023.6405%2038.7368%2028.2298%2038.7368C32.7948%2038.7368%2036.6941%2038.0184%2036.6941%2035.1381C36.6941%2032.2583%2032.8202%2031.5132%2028.2298%2031.5132Z'%20fill='%23C2C6D1'/%3e%3cpath%20opacity='0.4'%20d='M28.2281%2028.7711C31.3378%2028.7711%2033.8293%2026.2786%2033.8293%2023.17C33.8293%2020.0614%2031.3378%2017.5688%2028.2281%2017.5688C25.1195%2017.5688%2022.627%2020.0614%2022.627%2023.17C22.627%2026.2786%2025.1195%2028.7711%2028.2281%2028.7711Z'%20fill='%23C2C6D1'/%3e%3c/g%3e%3cdefs%3e%3cclipPath%20id='clip0_6639_158419'%3e%3crect%20width='56'%20height='56'%20fill='white'/%3e%3c/clipPath%3e%3c/defs%3e%3c/svg%3e",user1Black="data:image/svg+xml,%3csvg%20width='56'%20height='56'%20viewBox='0%200%2056%2056'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20clip-path='url(%23clip0_6639_182415)'%3e%3cpath%20d='M56%2028C56%2012.536%2043.464%200%2028%200C12.536%200%200%2012.536%200%2028C0%2043.464%2012.536%2056%2028%2056C43.464%2056%2056%2043.464%2056%2028Z'%20fill='%23A0A3BD'/%3e%3cpath%20d='M28.2298%2031.5132C23.6649%2031.5132%2019.7656%2032.2329%2019.7656%2035.1118C19.7656%2037.9917%2023.6405%2038.7368%2028.2298%2038.7368C32.7948%2038.7368%2036.6941%2038.0184%2036.6941%2035.1381C36.6941%2032.2583%2032.8202%2031.5132%2028.2298%2031.5132Z'%20fill='%23EFF0F6'/%3e%3cpath%20opacity='0.4'%20d='M28.2281%2028.7711C31.3378%2028.7711%2033.8293%2026.2786%2033.8293%2023.17C33.8293%2020.0614%2031.3378%2017.5688%2028.2281%2017.5688C25.1195%2017.5688%2022.627%2020.0614%2022.627%2023.17C22.627%2026.2786%2025.1195%2028.7711%2028.2281%2028.7711Z'%20fill='%23EFF0F6'/%3e%3c/g%3e%3cdefs%3e%3cclipPath%20id='clip0_6639_182415'%3e%3crect%20width='56'%20height='56'%20fill='white'/%3e%3c/clipPath%3e%3c/defs%3e%3c/svg%3e",cafebazaar="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAiCAYAAAA+stv/AAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAX+SURBVHgBnVc9iFxVFD7n3jsSiMXEQmwkoyiiIbjRUsEJWqRzCxHEaCaFhYSQpAhotbutzSZYWCaLIIhFNl1QJLOFNil2EkmdERFSmQ2iLjvvnuP5ue/NzP64s154vDf355zvfuc7595B+B/ty1+gGxMuAMIcArSZQz9DXjr/MvThgA3hgO2r+2GBgRcZGbCsZi6DDIvnjsESHKAdCMDyvTgfI98I6hzM60YZapMDgIrg5KXjszMR4ACNIy8TI9iT4eq5V+CIPsSwJA9kjrKleG15Hdqz2pwZwBf3Wj3KsZNJHeHw/HG4WI+dPwaLzLGfJRaUQ6cKrd6sdmcGwBQWMgfIEGFzhGe3j48Yl3SsEpNEeGZWuzMBWLzzZLdi7FRsxoefn6j62+dcPl5JJkg2SHgExNzi+qHuLLZnAkCIvREhjIT+zYx7qjxvhpsjATmiCDnHhRlM758Fl386PJdaYT0I1KgdzEsh8FDc7QRAsS3+l1lYGIkgt7aqE1fe+GsAswDo3W6Lcg/PY6jmYgxvtRDaIeROkpRrYZacJ0jyDmUVNis1AZ1IrQeiFahkjOStWaFh2yLcEP0MpGDdzZwHgr1//eTDoZk6ffuZLmJaCAjy1vwmkG+I8h2Dfyfpw6AAPP8VzBg7N9+sCCgJAClVKtjmQXtINSRvm8bchxxW8MO1Z6WoYXHs1U3NRXHiu0Z765juE62f7Zls6lCxKP2iGfC64ACYlCcsztHm6hZYNycTfpUpRxUCGxAuhAbfl/YpDWIlGQBFSBMhKAyoI4uBONUQ2G8HYd3sfTQROFk6SEw0EIEfrQWBIjWWIClajG4UJZ7qmJUl9ReiW1AWmgj4ahZjGX2XLDSwfGfycQdAsqRh73GS/B7qXpvdykfG6DRnsOked5Qw+DwsusP6FOI6BGzzx1T7k40hDw/bBn2d6GCQkNKQwkQ2ssvZhGZqZhOgUquhCXX8q505rLHPtRbA33m8BbMx1owARRimTRQGeJd6JCmEFiuhIUdjwJkumWKk4pRBjb2u49qB7Sc1qnJgNf2WDYNUjVoDTNwYsViXt9ORIDGOpWMMhCJRNE0QumFlyw0F10HtjsepCuUgR4sib1jvO9+/9EjmtC0vvN6NHdZNU5HZFwqAbVlYQsASGTYWdjaEbUHb+PHU/SOaWZCr1kCwdjk01BTUk6EJhZVibhcAFvM656Y2wiV0UKqoZgvc1Z8OIIc1CtwlKmsZi/OdXhineyfJ9Y4wMcINUCMedYyMTYHXbwBIbvZHlBbIlIolclpO42QQitka3HSvA3G1O6DczK7nRMvfZLNGGPsOrLTXb772SNTapiZfvRFq/WavcsZALBXT8rjQUWZL4QrNjsm2hoXyUNjQlSin6eDdO881DBjeHFckjS5wqWZsDryugxUT9pLqpso4Nb41E1oT9Lucox1mjJ62kf2sEQv92m8DoMpxNQe4QGW56sFSifwwqTB4WpGrWV8V1zrRAu4l14Wmh1c0qFrDQgzGiAJWNtKIrtZ+p/Tzwndv3hYP3QrrEgqmA7ZrljNiOW5s+LFJJTXryJvTknHJTlBFkC0nonO39uD9n7s7GDA0iS6NtsK6XSw17hQ9r+3tAlONkIUJypHqMYjKBkI5tsnOCbbYW9StRmhRblHoTfqcqhh/fPvbw8PvPf9Y6D9llwi5XBDLBaMcq8Re67OeeAZSbzzR3nb8ukobrUC5A1hqsgVh6fcP1lanNg27tKe/OXldr9bKhLKQ0SnP5giKKNF2NNmS3R08ce32pPnuotNCtLJx+ofedl97Xkqf+vrtK+LwgkZPU9DBeA1QsRHihAmeoJTs2NYApVAOrgArf350q7ebn7gXgH9uPLjVmn9RI6z/CfyCUe524KVUfIRSGmsZekbYYWY1l3XKpb8/vvXZXn72vZYfunaqI0QuivMzdq2y2EMpuduX+93BRojXUhV7m5+uDv/L/r4AxkDmOzlXFyt4ostMr+62VDZ8lzGvJvmHVH2y2p/F7swAptq1+TaMoCOr/V8wy9/0Fgzh7OrGQU39C20tZawWkM4jAAAAAElFTkSuQmCC",danger1="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAWAAAADHCAYAAAAnD4muAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAADO6SURBVHgB7Z0JmBT1ue6/nn1lNpYZtjQgBAFlJKgIUdsFY8xNJF5z42M8YUzMyY3nnAjnPkmuuScBkufcnNwsYraT3KjBuJtFOIkxCSqjRuGI4sgmiwPNMswwDLPvW596q+c/1FRXVVd1V3dVdX+/5+mne6oXmu6ut756v+XvI4ZxAH91oPT2j11bM+cDs5eWlZZUDw8P+0snTSo91dS45Xs/eWx9sK62nRgmxckihkkyC6tX+P/n39+xY80tN/vV9126ZFFNxijRl/6+9m5yAd/+7g82lJeVrls4/6LSoaGhYP3JE7U7anc++tvHH6olhomTTGKYJPPl+9av+fRtn6jp6u5uP3jo0J+bm1ue6e7qfHBgaOhwcVFRoKqysrpjcLRj3563dpFDIEL/8Q//7YWPf/SmmpLi4rycnGzyz55VumDu3Oqbrr+mZuU1gZqlly2vPtnS2dHadDpIDMMwXuDZ3289HgwGQz996OFfqe978623N+O+/3xzd+j2u+4JkAMgQt/8s5/L71Fcnnz2NyHl3+Jy4MDBEP4/d33h3vuIYSzCETCTVG6/qyZwy+ob1nX39NLXvrHp7tamM03K+7e/+eauWVWz7rhk8ULJEi6k3z777DZKIl+4d131PXff9cIN13zYr9w+NDRMZaWlEY9HZDyjqrJ00cIFN1/6oSsCL/zxD48Sw5gkgxgmiay8/PI106ZOoZbW1rqjdbvr1PcH6+raCwsLanG7u6unjJLIt7/zvcDn196544pl1X7l9qbmc/SXl1998I9/efHR+uPBiOfh/mPBIH3i5tWB1R+/rYYYxiSchGOSSsXkCvm6t7evFD6rutoBp/9zZs+swe03du/ZSkni8/+wfu1NNwS24OCgBOL68JYn7v7lzzZvwd/Se153/crqNYEPr1j7wYvmBULStr0HDtJN110bfp21n7l2+x9+v4UYhmHcRo10ig9/F/7pj37+yx3q+7/1nR/U4L7tL+1ooyQB0d+3f3+b2t/d/tLLbbAkjJ73/c0/fU75HPjBxDAm4QiYSSpbfra5bmpZyfq1n/n0Azhl3/tP6x5oOHP2lcULF/hRE/yhpZesweOOHD+WtOj3zk9/KtDb11e67+B7VFhQSEuXLKI399QFv/qtf7suWLcrqPe8Q9J9Tec+8op0c43YVlFW5teK7BlGCxZgJun8v3/dtDlw9Sq/lLi671/+17p10qZ1yvs7u7uD3/vJLzdRkujs7iydNmUK4QL27j9I/+db//rJYN3uYLTnBk+cmOBjw8LIph6/dLOOGCYKnIRjHOGWm29a19xy/kHUAuNyuuFM3fm2ti3v7juwqbiw8DKjyNNuDhw9ElT+PXeOn8zy1v66OmVirqiwgG79+C0BYhgTcATMOMYVyz8UEf06wXtH3qs9KyXbRAIOIvp3d36q+psaVRpqULXR1t4elG76xbY5s2YvJYYxAUfATNoDET3V0BBUbvvAjNnVZp8/MjL8ivJvzLYghjEBCzDDSHR0dE2IdmdNr/KTSbp7+0pef3M3IYoG5eUaHRsMowELMMNIFBYXTYhi8wryr432HFQ7PPzrx5674Zqr16y64nJ5W09vL7W2tnMFBGMKFmCGkdj11ptB5d+ZGb7SHa++WgOR1Xo8aoDv/3LNDoiv2AYPubCggF6s/duDxDAm8BHDMFI0W136/JNPtkFA0f0GOwH1wLjOycne+ocX/rrtkWf+tBX1vRDfb33zf0e0LINX3tj14No773A8sch4AxZghhnjsaee3nH1VSsCf93xynhrsRKI8f6Dh7bOnjUjMH/e3AmRMYYL/e4/nt+04f6vbCSGMQmXoTHMGPXBxrvn+Zt2SOLr17p/rExtjXo76ph/9LOH1ot5EQxjFh5HyTBj1L70l/bX396/bcasGe/29vb5C/LzKzFuUklRYSG9e+AgzZ4xQ2wKvrF790e/ef9X/0wMYxG2IBhGB3i93/32N2pyc/PWLlwwzy+2i6aNhsam4PbaHddtvP/+IDFMDLAAM4wJfvXEE9UZlFlz7aoVS9s7O2mgb+CVT3/xK5t56A7DMAzDMAzDMAzDMAzDMAzDMAzDMAzDMAzDMAzDMAzDMAzDMAzDMAzDMAzDMAzDMAzDMAzDMAzDMAzDMAzDMAzDMAzDMAzDMAzDMAzDMAzDMAzDMAzDMGlFWq2KHFhTU5qVl1VNmaPVFMooJYZhLuAbbaeRjLoXn36olpikkBYCDOHNKci6b9RH63whYuFlGEN8QR+Ftvz1yYc2EZNQUl6AA3fU+LMzsncQhfzEMIwV6oZGhz9Z+/SWIDEJIYNSHBZfhomZ6mxf1q+ISRiZlMLcdOc9G6SrNcQwTGz4yD9/ybKO+v17dhFjOykdAYfIV0MMw8SFlDvZQExCSFkP+MY77gn4MmiHentvdyeNjowQwzCRFJWUaW4foVz/y0/+9AQxtpJFKYovY9SvFeB3tZ6n/t4eYhgmEj0Bzgr1XyZdsQDbTMon4RiGiZ9hX4jLNxMACzDDMIxDpKwFYYWiwkIqLiokhkknGs82E+MsaS/AldOm0pZ//xEVF7IAM+kFBLjmS1+m7h7OiThF2lsQ/+OTn2DxZdKSKin4uGblCmKcI+0FmMWXYRin4CScin/8ytdp1Uc+Ts889x8Ttt182x3j23Dqhr9v/+zn2UdjGCZmWIAVHD12jN7Zu0++/cjjT8rX+BuXLskn+81z28L3Pfak/DfE909/fZEYhmFigQVYQdXUaXJSDtyy+gb5ev7cuePbrh7zy4RvhuoJ9tAYhokVLkNTUFRUSL/79cNyZFs1Jrpa2yDEf/790/Jt9pAZhokVFmANhNAabWPhZRgmXtiCYBiGcYi0j4Dz8wuouLiYGCYdycjgGMxJ0l6AfT7+ETIM4wysPAzDMA7BAswwDOMQLMAMwzAOwQLMMAzjECzADMMwDsGNGEzCCIVCNDg4qLl9dHRU9znK+7KzsykvL48YJhVhAWYSRn9/P7W1tVE85OTksAAzKYunLYj51ZdXE+NatKJfqwwPD8tRMcOkIp6NgBdWr/D/831femf2jBnB+pMnav/4wovbXvjdU1uJcQ0Qz3iBHQEhz83NJYZJNTwrwHfd8akNSxcvomlTp/gXLrio5mM33lCz57N3tp9raX3wi59fu5EYxxkaGiI7YAFmUhVPWhCfu3ddzSVLLq6RxHfC9mVLLykdHBq8lhjHgfjqJdqsMjAwQAyTingyAl614vINRTrjIN87fLiDGMexK/oFdlgZbkD8P0ZGRjiiZ2Q8J8C33/W5DTdcs8pffzwYcV/98RM01z8nSIzj2CnAiKQRBXtRtFpbW2ULRX02UFFRwSLMeMuCQOLtS/d8diOEtlJjaDro6+1tJ8Zx7I5a7Xy9ZFZVaIkvQIkew3hKgP/p3i9smOf3E/lCVFhQEPkAafvxUw1BYmLCTmGy27ft6+ujeMH/r6Ojg86ePWtrhK4HhFfPB9cTYLwvRM2wKZjUx1MWRFlZiVz329PdG3EfouJ5c/z06hu7gsRYpquri3p7e+Xh9AVaBzcL4HXsBhEw3iMaM2I5dccBob29fVzYzp8/T6WlpbY0eUDYfRgsrcIoysX7OHfuHGVlZcmfN/5PPT098gECQIgnT55MmZmZxKQunhJgaSeU7QWtOK1b+vF299i/46cDEDZcAEQKwlFSUmJp54fA4XmIVO2qflCC1xTvEe8LQiyEywiIY2dnpyxu6tdDpAkRjueAI0QzPz+fJk2aJL83fA7YFi2Khcjigs8MiwIoPzc8t6WlhcrLy+V2bCY18ZQADw0MtUNkz0qRw7v7D8oRb1FheOfB9ZH369uHKa+OUgTskIistKIru1CKrwACgguiYaPlmiBuiHbx2GSWikGcIFq4QPD0onZ11KsF7gexiDDEU0Ss4v1ALGOxN7QOWnjfiNQh7PGelTDuxFMC3Dcw0AGhvem6cKnvXkmEEQ0fC56glVcsp0cee2ZTsK7Ws0k4CFp3d7d8W+yQiPASNQsB0ZtafJXo2RLifeL5iYh2rQCRgojiveI94r3qRb16xCLC+HcRQaux21vG58t+cOriKQEe7B+YIK6XLlkkXy+Vrv/wwvbaJx75983kYbCjqQVNa+fT8xytAGEV0Vu09wSBQjSJSAzXELt4RaG+I5v2tuRRc1/4Jzg1f5jmlQ7SpRWxRdJ4P+KAIf62Av6P+FwLderL1f8W7IFkCKOI8JnUxFMC3KVTYgY74ge/ePhu8hBaIqoVTSL5JE5tkbDB3xAZeIaI2GJZUBTPF1GfWcQpdrzsbcmlJw6X0vGuPFo4RS5codOdRGfGAvFpBcP0mQ+20+rZ5qJXNfGIIg5I+A7MCF6yStlYfFMbTwnw2fPnZNsBLcjKNuTHnv2tZD14q/oBp8cQYJFEQmSpV+uKWlJc8Hix40No8BqI2KyIMPxaq+JrF08cKqVtwRK6fAasFaLdpyMfc7Y3i374zmQ61plDX1wS3yjLWBCWjJHwISotKiqSbY5Ew5PgUhtPCfCHr7ziVtgOKDl7/83dVDllKu07+F7wt79+ZCN5CIigiNSsNBiod0ZEaxBhs1ES/EknxfflxhK6YS7R1veiP35r/ST52q0iDAEWZyNmwEFSePliwpsZ/1x424lMxDLO4RkBRhfcvA98QK4DnjfnA/IFfHH91zxlPSDStbNiALaEGSC+yKg7kTTb2ZhPjx82L74CiPDcSYMx2xHxYEaEzUSniJZR0qeVSEUiExej7wT34TFsRaQmnhHglStXBNTTz/bs3df+ft2uWvIQdmfJzTQlOCm+4Bf7y2Xb4aVjE7eHWo9K/koXybFdUVX4ogJ+8cqqPirMTv57NxJhfJbRPHGIr1EzBaJo1A+jIcPouxHVHMgDKG0rxvt4phX5sksXrVVva2xu9twAdrtPJ6MlnUS5lFPiu/1koezrqgmdfJV8OUXkq1xGhAu2Ne2JeBye+9wx56I/iLDWGYuZsxgznWwiQjZCNKHge8SBNBGdhowzeEKA/dXVpbNnzgyot7+9Z98r5DHgBRrZBrgfURGiLpR9Iclm1AkVrd01WeVSWkA8EcFOl+zc3Q0Xtofef558s6+ZGPFKtyHGoZORXymsCC0RTwYQSHXECfGNVmMMy8FsJyG+b3T2MemHJyyINTf9t8DSsZpfAaohXn6jznMRMHxDPRsCQoudURkhQ6xx0es2E6fC2Nm1xN3JLDp83wjh7G7UtBrGKZoe8ZieoQzJxiijb15xjpKNMjpFFGq2+cRq8wy+e6019LCoaWNjo/xvi4QtRlnifaFNGbdxoGa8iScEeP5Fc25VbztxuqHWi11vetGoyJLr2RO4D8/VqpoQOy5eQ+lXJrNcSg2E98WTRbRwMtGhlgvbQ5K4+sYsBy185fPlKNinEumdjQW093weXVqRvDGOsIuUQmq2cgFYHaKjd5YjBFgJzmpw0G1qapL/hgDPmTOHZs6cSYy38IQFMc/vD6i3ST/MR8lDYOdF9KTn3yFyjVbPG63iQSvahQA7cXr7i31lsvVQrDx7h/gaRb9j+Co/FE7QqXjiUAklC/XBzCpWzzz0Hj937lxatWqVYUSNA+y7775LL7/8suwRM97B9QJ8UfWKwKyZVX7ltqbmc/TIM7+vJQ8BATZaYt1MYi5aVKX32mVlZTF1zMUKEm87mwroTKfK+41mPwik5ByqI9SgdXlrfXIScvDe1Z+3lajWqu+uZT8IIL4QYUS5QO97RlS8a9cuOnr0KDHewPUCfO/df7dGPXy9pbW1zmudb9EE1kzEZOYxWqfIwopIFki8qUGFg5noV+ArX6AZBT8uvTY84USiN3/BigBbaduGWBsJMIBFsWzZMrrttttoypQpho89cuSIHBEz7sf1AvzBD86PWOX4nXf2biOPEU2AzXiLesk7vDZsBqO25GRZEboVC2ajX4FOFAzxTXRZml5ZmJWzCGE5mQGNFtEiZjGSEt/x1VdfLSffjDh9+jSLsAdwtQCj+21yeVm1chvmAf/6mWc9V/0QDdgTRrWlEOho1RPRPOJEWxEQ3q0a4ihHvwaJNz3ksjRVbXCW9PbrWidRx2Bi8sfqxJsSbMcAd4igmSoHDPeJJsKissIIfGfKUjjxfUcDIhwMBolxL64W4K9/5b6I7reDh48Ej9bt9tzQdeww2HGNGjH0Ss0gzkY7qdkVE3AKbWbcYqxolp0JrES/Cnw5xeOR8GTJiVo+g2hKYQb96VQFJQIjmwH34fsTJWBmziggwqhkUH6vsJLwNxJmRvOYBVpib7ajEnYEN264F1eXoZWWlUR0v51rPV9LHgSiKyJUnG7qRbsQYZy+YmfHc/BYo9NT5euaAQJiZqe3iig7UxNr9DtO+XzKbdlDF1+yjEoVOnSyJ49OdufR7CJ7y9JwoINdYyYpCp/YTNVBvKM8tQ4KZoc4Qaj37t1LK1asIMZ9uDYCRvdbYX5BQL19R+1OT5WfaYHTSaMdXNgNEOJo3qCIpsySqGjoh3s0ItLuRooXf5kU9S6opNKsSAF76UwZ2Q0+e7MT4xK5WokSHBTimSGCgwSXp7kT1wrw9SsDa7Dmm5Kj9cfbf/v4Q7Xkcexe50053tIIPCYRAoyyMzRJqIkn+kW0u2KWJMClksVSMp1CXWciHtPcn0NvtdifkEO0araONxkCLBYQVb4nq4J89uxZYtyHawV40YL5Ed1vR44fS4nkGyJWO4fjwIs0UyIFYUnEXAitsjPLVQ9jIMl2kRRMV0tPzVM4K75iyfztmzgbuHuQ6Od7E1OWJtbmM0Isg5QslL8ZqwKMhBzjPlwrwEsvuTig3ubF4TtaxDufQRk9Q3jNZMSB2bIoK2DQuua0sygtx1rMLAlHvTO1Rhtk5VFoJGxDDEs69L50Rv1WA1FDV4ac/LMbfFbRviecTZg9oEEwT506JfuxVv1gVEGoJ6tZFWA8npNx7sOVArzxO98LzJ83d0JYhVUwvDh8RwuctqonbJlJpOExqGJATagoOzO7kq8VsTCL7qhIky3HAkS6iHgvKg9HwHr48sqoseEk7ToVXkdOkIhpaYg2owmWFRsJvjIqEjD7d8+ePZZEGKVvSvGFiFtZSUWQzGidMYcrBXhKRXlE9UNPT68nh+/oAREWw3dEiZootteyE0SjhRDqaI0XauxYUFMNIk+t03+zLccQWyTZEPWWRrFSYTfUncunQydb5AhYzQ/fsb8sLdpnhmoJK8tBCeDZQ0SV28TsienTp08QXGwTPjMe/9prr8mRdCxwBOw+XFmGpjV853xHu+erH9QgClZGwhBj1PRqlZ7Fk7RDNGfnMkjAsOwsivheMXPM65Ui3lyNX2Df0IUIF2IbbLvwt2hRxtQ0JZgTYfe0NFShaK1erQQCiYOiWFEZ4MAIcRZzgyGcaqGGx4xI+Morr5TvU5a+4SCMC54vfh8Qz7fffjuuyXZ2r8bCxI/rBHh+9cpqreE7m773YC2lCWI2rKiWiDbEPRpGQ9tj5Vtv6swjQPRr4P3CbthyGxmy4xjRbw5I33t32OudEPFiFQ2d56EUbsvqBrITCF+05hVhB8FmwFmMEE0hpHq13BDhgwcP0o033qj5ukrxxZCdRJzFMM7iOgG+9567AqkwfCcecPpp55Btu6NflJ0d64jsAotWdoYkG8rKeiX7ssDgl9cs5QrrJB1v1ztuYGawxr+VnZ0ll6Utn2yf1wmRFJEoRBbWj1ZEjIOm3pAckSiFtaCuMW5ubpYjW7w2XkMcaJXePrxjO8TXbL6ASR6uE+DLll4aUX526PD7KVH9kGxEk0a0SVtW0Sw7E2jYD/B34fUKn7dv0FiA320yEN8xZJsDLco5xfLronStSDom/O1sKV1S1kO5mfaU+YnoVXkWIYQSYoyLmVZwCDBmcagFGGc3YrB6ojFbLcMkD1cJMIbv5OfmBtTbDx8+uoWYqEBwESmJLrpEeH66ZWcaEalIsqnLyvqivK0uMwG7JMBoUZ6/eJk8IwK0S0Hi+60ZlB8qoS8uaaNEgc8VF2VUiujWKMKE+C1ZskSOeEWbubCXkkW0xT+Z5OMqAb7z05+KGL5z6Mj7wV/+bLPnhu8kA6XgItKNpTTJChBezZpbjZZjiOLCKdplZa19YTtCj84oAozXxPNnlFdSdk6f5BHnT0jUoSztxlk9NK/E3sjfiGglfhBaiPS8efMcaYrA+Mp48ghMYnBVGdrVV10eYT/UnzxRS4wmaE/FKS0y7YkWX6DX8KCMfkVN75Jp+jW9vVEi4DMGiX7YDZiIJlqUT504HlEXDP7/fvvnRNjBggULHBFCXi/OnbhKgPPz8wLqba3nWlOu/MyL6JWdKVuO5cE5M6LX9J6N0pDXqRG4CmEXLcqwG5Coqx+eRcP92ssXac2ncBpYEWJpoWTCw3jciWsEeN1X/2VN5bSpE7I7GL7zjfu/UkuMJlZX3o2Hr70+TXM7mi7K/MvGB+cYdbL1D4dF82AzGaL0gIWPLIRdtCHXiUSdlIQLdWsnsVCWlujliwRWugwhwMlOiMH24LXi3IdrBFhz6fmTp7j6wQWg7Ewr8ZbVf44unlMVMThHjWimgFUA0TRKsjUorASl3QAhPt1BmnYDKiJCGj60bqu0w6BqYvny5ZRsUM7GIuwuXCPAl12yOKDedqapKeGzH4qLk7dYpRdBBKlVdoYk2JVTO6my0rjrraU3PDQnqKi+MkqydQ1G2g1yG3IjKhxIsw1ZXj9OZ/YwEnLJioKtgDrvRYsWUbKBCPNkNPfgil/m7XfVBKZXVfqV28JLz/8p8QJcxAJshHrQDWpt5cE5vnrKLizXfZ6wG/afDd9W0mCQZMMAMjEbQjn1LGpdsM4qyhDfRExLswNYEfPnz6dkg8U6eT6wO3CFAH/8ozevUW8bHBhIqeE7XkRZdqb2YkP9kqeQF1lpoLYbtOg2qA7rGHuOiJxPmx19YNCijIOIGxNyAFURTolwPHMlGHtwRWHg5IryiKXn60+e4uoHhxHiC8FFTa/weUNt9eQrmxfxeIgmItb+KBVxRhZEa1+UNmQjMKBHZxLbE4dK6NJV9s/EsAOIMJo47Go5NgNqx3m+hPM4LsDofvPPnhmx9Hw6Dd+JFTuXNVKDMq6/nSmS7QbNsjJF9AvBPXTOvGgiCYdLcW7kfcfbYhTfKOD/s7OpgK6qdOdIRtTpolkimR4tRLip8QyFRkfJl+E+nzwdcPxTx9Lz6uE7be3taTV8J1YS2cb6bH2FZk2vMvo1YzdogQTeoE7VVkO8Z8WIflu1M/2/2FeWsIScHcPuUZq2dOlSuv7662VBNlOqFm85G8S3r6cr7lVamNhwPAKePXtWxPD1Y8GTXH7mIPvaCqk4X2tQ74X5CmbtBiXKoTx68yAabLAlISW+sUE9SkRZ2l0f7CA3I4QYwCLArGHRcg5gV6CbDssU4Rp+bjxRM0S4XxLhvEL3leylOo4KMJae1xq+c/LkqZRYesiLdAxm0etntaedhdrraWDKcjpk0aMVw9crx/ZvRM4NXcbzIOIBw9rDQ9sjBQUJudWzemhaQeJbt+0AYhwtykU5GxJq8STVRqUIfrCfV8xINo4K8Fe/9I8Rw3caGpuC3P3mHAfai2QRVjPcfY5OD06l0w06tbg6iBnAokMOLcSHWoj+doISiq+ocnxcpZJwXXMJ/fNlqdOai8aOFStWyMsVxZNUGx4cpO6ONioqceccjVTEUQ+4vKIiovutoaGhlhhHgPC+1hQZlkI0dx86RcHR2abFV3SxiYU2YVWgJhgtxP3JCD4hvDnap9TbTxa5tiwtViDCV111VdyecF93F/V0uduiSSUcjYAXLVwQUG87fPQYl585xOvNE62H8eqGFslzyDW3yjFK1TAcfbIirypGRSrFGxUQn60mWjg5fPuMFKxufY/oTTsLAAa7SXaENYTYzWVpsQLxhQjv3Lkzrki4tzMswIXFPD840TgmwFh6flJRoV+57czZZh6+4xBHOwtpX2t47TMIJeYuCNHEnAWjpYaAmNGL4etqu0Ed8U6XHvPofyeaodLFNRcT/fQ/wxdbyCnS9YJRloYZF6tn91CsIOoUq2KIlYudBiKMORMQ4XhGlEKEMewpr4A7RROJYwI8Z/asiO63/t6+tKl+EAPUzS5powUy4ChFE6vxxsNLZ8LRb4RoQnyjrHKsbtQQLcRYVFOL/3tjpPgK/uHKcBS826a1NeX3rteccbiUVlb1UWG2uc9PuS4cBDeRddjxgDkTEGE0WsRDV1urJMJZlJ2bWnaNm3BMgJddujii++3EmTMpWf2AGkssEYR1xSC6KCcSoomdGeVE0Z6vtbOLDDlqUPH6uKhf3wz7pcQbSrS0mimMol8ILoRXWSuMyBmDd/S8YtgNV0SZDX7DPPsEWB7UM6i9SKeZsjQc4LCWm95inG4FTR0oZUOJWjx0tLZQ6eSp5Mvm1TQSgSOf6sbvPOAvLi6e0P2WykvPw49TL8YogGiKVXe1wGoXWJlX+rx01xwTq+4qEzBi3TJcIPx6jQLn+7Po8fdK6EBLpGjKK11oRI56dgOmlXVHWQVoUi5FxcxjLGEQwUcrS4Pw6n03egj/VRw4nVoME80cWNI+nhGUqBHuPN9CBZNKibEfR6og1t6xJqDeFh6+k57db11d2hEadh4U4UM8IeBtbW2mO65ga0CwsRAjxFuPLZL4vtucpV/doBIvJNeUM3qVA9K7TSzBhkaLaItu2pqIiwLK0n5hsHyRVW9XeTYiFkdVn43YYRmZxY5hPyMjw3Tm/UN4EV5W2WYcEeATpxsiut/ONJ/bRmkKdlKslotlY7DOG4QXka86akZkhTGCeoKtB0REq21Zd5khilzlWLnWm/B69QakR+MnBkk2CPTuRAmwzszgnY0FumVp0aJfdQuv1gFSdLHhsTjbwfeH62QBEfb7/RQPkgjj9GsluWwhX6+T9A8T3W9TKsoD6u2HjhxK6+43eLciaw3LwAjswBDpadOmkRkgvkgeQeiVmJmTq7W0POwG+LyxDs15bGyN689eNjEZB9/3638Nd8klhBz9jL5WWRrE12jZJ0SyOFDisxWfr1blgfhuYUcIwRbfsVV7I1YWL14sv4c4B/0gAr5KuuyULt5oJXQ5SRfgh77//YjhOx1dXXUb778/SCmIiHjsxuqOCxtCvTAjIj8tQu8/T76LPkaVReGaXuHziuE7p22Y1wARxuXyGeG/EfmeSZTwClAPrNEdB1CWBjtCWRFh5N0K8cW1sByioY6WIcKwijKSNInMjpZlCRy1F0uX+LJ7jEzCv3n/A6EJ7r3kR0V0v9XtPeDp8jOcdsKrFcNSAHY2bIPo2TEpS41VbxKCrdzRj3Xk6E4GK50SXucNFQ5CfFFSFovdEA1EvbgkXHwFOfp+eJNi5Q9EvnpJTwDxjNfLRYIvI4ljIEXLsg1JwVnSJfnrKaUgCY2AL/5R6AEK0TrpujY0Quhwqw2FTgTUj/P68B1EFPD5EBHJxeuSOIokTCLAThtL4X9hYeF4NN6tIb6y3ZDfRjOr5kgKH96GxBqSbO2p1TSmybGObJpXEo5ko51hQDzj/X6dKGsTLcvxdstJzKWwDXGEmJhJ6OFXOuGqHrsR8GXQr6TL8a+9Ps2vXGW3s7vb08N3YDEof8iIdiHEiRJfoPQSrQABFhFXkar5AGVlWIttZnlYea2sx+Y5dOqCpxVeOFMxqhwBwvfVAp8xokx83oii9RptcJB2Yg6vaFnWe/8WWDB2YWIksR7wCJ1QSzy8NlzApZP7aVJvV3DhAyH/ofW+IHkQvfreRAKRR9SNEjMrQBhEFCzqXpUzesMPyqdzJw5Sfc6HkjM0J9noeMCgMCt8UIJoGiXfBFrWEp6Hz1gZ3UKAYVmoKx8gvkim4jlGgp4IhAj/+qlnKE4gwIhAThFjGUdLSsJCvATR8XGlTeEVMYaQJcLfNYPIvmNntwIej+ci2XTLvAHqHb1wqj0+fKd3OoWOPR8uQysyN4THC8hzITCmUgMckIT9UGRipWy96BXirWUtwDLCb0VdJSEqJHBfMgUYoGW5ajraEndTnGB6PIYJp86MzySR6G88aPqRYZsiQD6qlf66jlwOdphEVDdYAf++3g6vhzIKvm5mDz1/Mjdi+A5EF1UQ8jLvTXvIzUSbU0HyWMpwOzIGteuxZu6F7xIHKL2zC4glLCetBJyYzaEHImG9ATlOLQmUJb2n3PxCGuiLfSjRGMspXJ7GSy1bIKECnJFJS0fPh9sgjX78Snwj5JmKCJw6xhoBI8mDRI5yoI6YF2H2NfGcxsaJzQUQjmhRsRCBS8q6qfZ0Mb10KlvTbjD7nXkCg+oHRL+rZ1+YHAQBRsSqlYjDZx5r9YORODu5JluW9DvE/2loIK6kHIzuy6XLGxS2JBgTJCwJt/DHoQ3Sb2oNdmJ5R5aiKXRXhYwiqlF69OB630byABBfDNEx4xUqwU4IkcSwFCR64MVhR8c1tqO5IloCyIhomW2Iu3JWwafmNlNJTvrW1MOK+e6qsxET0eDta4mi0dlGtAOn3v34TcQ6Ec8ucqQDTnZu3OVpeIGVxC3LpkmIACOp5huljRM2QoglTxEXWYhPvhIW4wsZ6br31vtqyENYFWHsaFOmTIkaoUKAS0tjG34SbQZsS0vLhL8R/UGAvLJGmp0Y/d9FolONkQCLVmMtxBmOGpwB4ft2wzxhiHBegbWcggZChLll2QS2f0iy+GbQDqPHKGcMhBMjknBkFd9NHkRksM3YBkh6mBVreLsoZcPpsBWwo0OEtRI6yLhrvU8I0JbVDfRc/STadqx4vEQwVUG0C8/3k/M6DWcBa1kRosoBnzPsIq3uNqB8Dh6Lz17LuoAN5SaKyyrkCWgD/XG5CKJl+TViDLF9T5N8X1gPfrOPFz5jVia1kUcxU/OLHdKos0oLREZ6CR8jEIWpBdhM0hCChEt9Rw41SyLcPezokoEJYe6kwfFqBzPAipg6dep45Itr8dnie9GKeCHCiHZxxgOBNjo4u3HGMER4pOUsDcdXy44sJqojuGXZAFsF+OIfh+4LjVINpRFmkzKxtH+Kgn6rUbDWAQGn02aTexAoKyKVyhjVXOOgqleOZvZ3AbFW1w07jU/63ZVOnkatzU00OhKXNYWWZfwYDxKjiW0hDqwHKYm2mdIMsx1vsZ5qxpKcUe/4ysQbYx29zkZ8rvFWL+C7crICQg9ZhKdMlc5o447R0LLM3XI62CLAGLgTzfeNRmiI5pDHwI4TbXSkINYIx8rzEJGhuqK8vHzCdnXijbEGfF+tEjI7ZvriDCeZA3msgPXgIMI+X9zvDwLsuf07GdhiQeRLvi9Z8H29DoQXywSJcYSJ/rfMgKoJLY8ZIuFUt14qYFTpIuwh8RuINqNDDFES1RI4u3G6/CwaQoQ7zjdTnGCEJfwMbllWEPehTbIeajDxjNIIrF6BhJYV8Y01WjL7PL3pXdgeT11xOgPBxNmEXuUK7kfbMkRUlJOJ2m71mYu4Xyxl75bSMzNkZedQWdV0O9qMkZSbRMw4cQuwr/vkfajlDbm8ZdVOYlnFAGVIsWBm0DcwKm+Lp644XYG4ws6JFqFCaHHmIRJpeB4EVv08t9oMZimZPBVLaRyg+EF5GjdqjBGXBSEn3jLCIyfl2t7WIxQa7JbbPlOqjVVFLKeN0VY/1sLssB8z70fYE05Mb/MaZsXXCJF0FaJstWPSpRyncMtxPEk1PB+NGtyyTPF7wIEJf5UvIHHiNd7lBjFWNF6kArFWNED8zHbOIetudtiPWaFgETYHzhbi9WbxHTu1HH2CEQPY4xFh0S2X9iIclwBnZNK1ypzDSE/YJsosrLgguip7Qo6Mc7ztSYp1vKwm4BDNoiIBNaVG/h8SO1YmraESA4LNkfAFYvl+AMTXK96sg0CEIaKzKHbwfDFBLW2HkcQlwJL4BsTtofPHaaApbBFlV8yh3MrF4TtUEXA4Mu4OjxHEmECPzpvVWmXYDBBhLD0vBvBANEX2XExDs5qwg9Bg7Tmzp81ilQY8x6pIiejdrZUVeH8QUXw/olLFLHqVJIwm6HDDh1VBsYPuFkxQ20lpSswCPP+BELxfv/h7qP1CdclwZ9O4AA+ek3zhESk6K59LGTn5E+0IWBSYkobbpd7yjBElKTPd8jg/C62bEFk76kiV/z4EFcN+zFgcEGAIthURRqIJ8yzw/0ZS0cmB9Grwf0ayUSmgONNAlQLOOqK9TzyWxdcyb1E4qRZPZQMEPG1blmMW4CyF/xsa7KPR/guTozLzw22bQ+2nabA5bBkNS7cL5t9AvswsSZCH5WvZiigvln3jvlGqIw+BHVu5cgJE7Ny5c44KEoTRSrLHrAiLqFKZQIRY4QIhRpednQcTK+A94XvQS27ivWPEp9EBA8JtdWURRgYRB5bTgAjHc/SClQEvOO0W+IxZgEOZdKtvzP8d7p1YIphVHF72ZVgRFSMKBhBkRMW+7HzKm1Et+8VSCFwbXO/ztCkJzxEiBTFziljqfaOJsDLq1UIIMYQN9gmELpELkgLYC7BvcDG7jA/eI0QaIqwsCRS1u0zMQDhhIcQrwiKpl1YiHFNxYjVajxX+r1Jo5RctLJcFVyTlgJyYk6JeYVWEhvpoqPV4+HbIO6tgGOFk04MQwliACKutC9yGMOPU3Ew7tBjTiNdBxImDUSJqX9EYgelk+JytrqEmInm8P2FZsPjaghDheI+8adeyHNMe0i+Wmx9DKbQZeZMoI7tgwjaAqBjbILwXHjy+A9VSiiC6nZIJhC5eIVG23EJIIXKxNJyI18LBIBHVBLG+JyXClmDxtRW7RBjJo3iqKzxFTBZERiatFeVnSLgpkS0FbO+K3D7UNjFSziqWKyDaD6331VKKgFPxRJ6CQzQgIDjdF4OAxLZ4wWsoZ9/Gi90HIlExwrgWJIJQClVN8bFIunSMvR40CqKi/DFhB+ujFFgANCYBlsR3/ANWC63wf5URsC8nX46MR1ResSzWo6lhPwgSlYwSUa5IFiHCROkaEmB2Zu/tFDhEwB0dHWQXbh9cw8igZRlf1GKKHTwfnjKE1ujHjfshKojszpIHsSzAcvux4gg3QWgzs2VRVVsNmQUVkZUSY55waJS2UgqRiLm7EDJ4seooV8whcCtijKNdE+NYgD2DXS3L2SYeUzl2wY53mMIHAM8QiwccEDcgqBOEdsx+iPR/qyIqJbJLx22eWkohEtHzDwH26iwBO31gq0k3xlGOUHIrGtBZh8BwKXlo2I/lX7Qvk26lMf93pGfioO9x+0HDahg4886EbaiU8IVXQg5SCiHqZbWWABKJLiyaKS6ifCtVsTNqtSMBxyQVO1qWrYJ/azJ5ZM6E5Qh4QvlZ10TbRS4/k6wGrfKz4c4LjxWVEqMhbzVfmAX1qeosu7LKAEICLxe2AsqqUnn2gF2r/rL4ehZ0uCU7WSaG/bg+ErYkwJL/G5CCX3mwrFadL0RVqylDbUkIq0IS822UwkCAIcQQWKMpaNG6sLw8S1YMLooXth88DcrTYhuIHTtChF39w7G6ZwTEjQhRLRjzf7saJ25H+Vm7uvwsbFX0pZj/qwVE12hVBYDoTkSKECsRIZeVlVFVVZXnI2Q7bAiOgD0NqhWcEuF4S+ISisVWIrpW+L8R5WeTDMrPNColUqH92E4gtvCEIcSpVuuKVmat2mgxrFwLbFd+Diky0Dydsatl2SoQJkSHzs0IMMC0AKP9eCCkHQErhRaDdgSIiiMqJYqnhW+kuP1gFQhMqoqMFxafZJIChEBMUEvmDwLlcK4ceWnaghgwKj8bsx/UXXEoNYuolCicLF9LgXRKJuAYhjEECblkVydUUHxzixOGaQGWy8/GiCw/Cw9V1yo/06qUoBRrP2YYxjSTyJmVkSvJhZgW4JBB+RmEVqvTTa9SItXajxmGMc1kcgbvCvBY+zEu+nW+Gp1uaqEW1Q+S/ZBS7ccMw5imnJwBFRGuK0kz+4YC4obe8HV1+RmsBrEahkDU/1IalJ8xjBc4euwYJRm7km+obT1PE2dGiNtaE9QAqi9cNUHNlAAbtR9rzX8YnwmsKFUTlRJOtx/n5E6sqX39rT10vsP8CsQMk0qc7+ymvIKkLsdkR3cahv0ciPKYBRQ5DMh1pTjmBFjyf8Xq81qiGlF+JiaiqUrSgNPtx2XTJq7CvP2Nt+ULw6QjhWVT5IuHMDvkByKN1TVcXf8Y1QNWth/riapWp5u6JE1USqR6+zHDMAnDyoQ1dP64fjSlmSRcQNzQE1XNmcBqr3hSuAEjHdqPGYbRJVYPFkN9rI63VBvciV0tNgaiCzDaj8fQqvNFVYR6JrC6JE20KXP7McOkPbE0YcBOOEXWwb8lRAvi67oljAw9YGX7sd6KFkMaSxLpVUpw+zHDpD0QDKsrH8cTuSJqhlea9HIPMxhGwAMG5WdiRQutJem1tgFuP2aYtAdRnFVBjWeKGoQLIjxMLsQwAkb5mVj9WKvOV93pprUkvdhGDrYfD9u4SvHo6AiNqla6SBfwOZ5v9NSSW5SVnU0VVTMp1cmQ19+zZ5gTJtFlJG4wlEiOWY2CUxJDAQ4ZTT/D8HWNJen1lqm3u/34xjvuCfgyRv36j/CNe9dZtk7iSu+pXoP9fdTV5srJfpqUTJ6W7DrXlCRT2p9W3/k5w8eERjOCLz79UC1FB3aAFQF2XfLMLnQFeP4DIQwy9uO2uvxMeLpaS9LrDV+3u/3Y5wvVSMfqtcQkldLJU6mno10+E3A7OPAWlZQSYwe+mvDF6CFyhVMtRQfJMVGnawZX2gd2oOsBZyomyUeWn2kPXxcNGOptY9QS43lwalpc7srJfhEg+mVcC3zZZK+Q4Tr0k3CZNB5dhkYvHIBEna/WTGC9OcFoPz6UYqsfpzOIgrNcPmCdo1/XI5YpSll7wQy6FoQvFLYfQO7U+ZK4dkji2ks5U8Lt1VqD1vWGr6fq6sfpTNWc+a5ORmbwEkZeQLlMkdERHWfjnlhm3irmZkFICbeCeddM3Jg5cblxVEUMNLw78SFjVgW3H6cecqbcw6s1M/aTEaIOsg7K0l4l47XixArHKSfC+nuQzzhqzS6dSbkzqilLus73XyVXRSBKFohGDZCI9uMQ+TiqZhgXEfKFghQbIhI2Kq+BCC8nly8zbxV9AR6hExQFiHCeJMIi0ZZdPvfCfRVjCc5EtR+zrcEwriIU8sVT6SREGPu1XnKuhMKRcsqgK8CxlI3lTF1AhRd/RL4kuv1Yrjf0cWUFw7gBXyhktgY4GmjSeJnCQqw1uwEivIhSBF0BlrvWfNZF2JeRLV8EiVx+KDRCm4hhGMcJhUJ274sQYnjDL1F4KXsxihJR8kFKEQyzKLkjdLd0FaQY8Y3SpkSWn+GIKwk8izDDOEko9OD2px/ZQokB1gQaEYQAe6cN0wS+aA/Agpy+DNpBdKEszRSj9OB7633rKAnceOc9G6X/yAZiGCa5hEKPbn/q4RpiYiKqAAskIa6RhBgi54/ygu0hKfKVxHczJZHVd3yuxufzbQj5fH5iGCbBhNqlpNumF596KKn7eaphWoAFWKJIelJ1aKDtVhrq9vuKw2MpR7tOtFNf1yujB5/aMnyitk3v+Zmh0YROQZo8fcba7OysgGRE+7Oyc4hhGHvA/I/h4aFgaGi4tq3t/Lahvv6UWlzBRyPtw77sNqvPC4VyOoJ1tTF9Fv8FE1dxCaoTH2sAAAAASUVORK5CYII=",clock="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA8AAAARCAYAAAACCvahAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAJSSURBVHgBfVPdThNREJ6Z7YbtloT1CegbuF55YZTyBOwboF6b0HrhpcCVMSH8PAEUY/Cu9M6YmBZJuDKxPEHhCdgmUrZ7zplxthXEgk6yZ8/5cuZ8M9/MINwyaUURB/kKGqmJoVj/c5LDAB32OIOmyVy33MjOru/j9cYcBzXMqQVGQYt7MoRTZNkFI3WyVIVcEjEImEsdXw/bfxhPggV3HLL7Wtkq2MfYQVB1n0KR3cm5MLcTrvFmRcy72drE8UcU2ZNy3xxXtmHKzEFQm8bcxuw2vw/7shZF5IxJgBBK5Lb+yl+ZCakjH4P52zh5pTXNdQ780TIJ8rJiXXySncMdw7tII02BaR+EEgLEmAWP4D5DuN8QO7rGJV0iQl4yR8G8v5Ct518qMV5JYg1qTiLTfrJZXoGcY93NqbOkIBCj5i2dKDJXpoYkC4UOYqENeTAAyCaOW4XyqpFABIIDNN/LHXDU8x9fNu6LsCgV8+g5GHxIFtPMuJ1g5K2ChSoJwyEyLxesdx2DqpRMHxFXf0PxjHh9QUlUjyb5/kxTwQH7ZnXamWe8lj7RpZfDBwTSw1eXi4iipcIIjH9I+ChNxcoLZq4XHXbDWnQaSWzJrE8AjCelGupZLoBMUqgN/tOsK9/ChIG33ecwAYuHZjQ6LymND96FigQscnorqAGUJKWb0j0btvNcFkV4Xb/YQ3wrgiq5Vx9f0LjHAWzo44A6KNz7VxuMzX4IE73Qohz3XA5HnpV5yGFFq7OPb37W/+s8ZmqGS+KwriNZ1fE8E0ttr3E5HqJfZNEsU/IMlt8AAAAASUVORK5CYII=",greenTick="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAKESURBVHgBXVOxctNAEN3dsymoTEkV8QUxBQU0cUqqOAV1rJKCic0PyK4pnD9wUqVghrG/APMF2DMUVKBUFBRRCku2pdvlnYhDiDSn2dvbfW/36ZbpwdP/fdkpSj7KS+2uKtsrtsqF50VR6uJm7UffX8bp/XjeGcPrSWtDjxME9ouKrvOKZqtS0zUA8sr2sW/nW41yb2c/XsWDXV7jzmg+/lyWFAnL0MhaRtomsi44zIiWQjbyAn9FydP5pFMYHWaHcVYDfMg/jjdqUemr2BuPkRgR0hgvgEKZHcVqGKfGFuN8QhUnSB3wuLiMTBo/C2/91cb66D3KSyOUTWiFarvU2l5tdYEWstVGv6w9JdtSDxuPms1kU2laVv6GSCLwGvNOG9t9WISHLEzibelEDshrZixHwmxtRC8du5MQi6IZGXanrhk7loFX6+Cgx54y+NqImaLLLjC5DZSvYD2AfYaUGAFXEDK8197o2JOeStCFdOQdfwJLG/5UmfYagVUN5aNw73XJzGNQgsn3oP+FC3sEV8RTsE64BmZrMPW2pgxgTlncHpxz5/jA1M7M6zlpaIYnAJnhD8yxG9+2VN8f7CNmWUATm6pZ6H+Oo544itjZ0IRaojQygahkQ661tJ0uATz4Fw24ZgA8JanFS9X4xEyghy1RRILgVv1T7J+ugZ9C+bYdybvmmzkqmLEChHSAFq4Q/AyrCz1adbE75kDOXJeCG3u+fv02leB0RTMGfybkJk7oQgMQ0eK2Zns4PFhXJFTPQw0weHKcedwqVYVgnAjJKdihib1H/k2d8pc5WLNC6XmYg/+m8W6cf112cF17WPtFmEBc47zidF3qdFX52bcX8fx+/B9jyJW2CoIyzgAAAABJRU5ErkJggg==",IMAGES={fullScreen,nonFullScreen,settings,play,playWhite,playNext,bigPlay,bigPlayNext,bigPlayPrevious,pause,bigPause,replay,bigReplay,mute,unMute,backward15,forward15,defaultMarkersListItemIcon,sampleBanner,chevronCircleRight,purpleTick,pictureInPicture,subtitle,subtitleOutline,subtitle1White,subtitle1Black,lock,unlock,arrowLeft,sun,scissor,leftArrow,rightArrow,lightLeftArrow,lightRightArrow,speed,emojiHappyWhite,emojiHappyBlack,keyboardWhite,keyboardBlack,sendCommentTouchScreen,sendCommentDesktopBlack,sendCommentDesktopWhite,commentEmptyStateBlack,commentEmptyStateWhite,playList,starSlash,videoWhite,videoBlack,microphoneWhite,microphoneBlack,filtersWhite,filtersBlack,editMarker,trashMarker,trashRed,personalMarkerSign,trashDeleteModal,user1White,user1Black,cafebazaar,danger:danger1,danger1,clock,greenTick},MiniPlayerPlayPause=()=>(useAppSelector(({miniPlayer:{play:i}})=>({play:i}),shallowEqual),jsxRuntime.jsx("div",{className:`${!conditions(ConditionName.isTouchScreen)&&"hover:pl-scale-125"} pl-cursor-pointer pl-transition-transform pl-ease-in-out`,onContextMenu:i=>i.preventDefault(),children:jsxRuntime.jsx("img",{src:conditions(ConditionName.isPlayMiniPlayer)?IMAGES.bigPause:IMAGES.bigPlay,alt:conditions(ConditionName.isPlayMiniPlayer)?"pause":"play",onClick:i=>handlePlayerPauseMiniPlayer(i),onDoubleClick:i=>i.stopPropagation(),className:`pl-size-5 ${conditions(ConditionName.isPlayMiniPlayer)?"pl-big-play-icon":"pl-big-pause-icon"}`})})),MiniPlayer=({params:i})=>{const e=useAppDispatch(),t=useAppSelector(a=>a.miniPlayer.details),n=useAppSelector(a=>a.miniPlayer.params);useAppSelector(a=>a.miniPlayer.play);const s=useAppSelector(a=>a.videoData.params);React2.useEffect(()=>{e(setMiniPlayerInfo(i))},[]);const r=async()=>{const a=await getLiveAndVodDetails(+i.id);e(setDetailsMiniPlayer(a))};return React2.useEffect(()=>{i.id&&i.type==="vod"&&r()},[i.id]),jsxRuntime.jsx(jsxRuntime.Fragment,{children:t.stream_link||n.type==="static"&&n.id?jsxRuntime.jsxs("div",{id:"miniPlayer-video-area",style:{zIndex:zIndex.miniPlayer},className:"pl-relative pl-h-full pl-w-full",children:[jsxRuntime.jsx("div",{className:`pl-absolute pl-right-3 pl-top-3 pl-z-[1000000] pl-cursor-pointer ${conditions(ConditionName.isActiveElements)?"animate__fadeIn pl-pointer-events-auto":"animate__fadeOut pl-pointer-events-none"}`,onClick:()=>{s.id===n.id&&(videoTag().currentTime=miniPlayerVideoTag().currentTime,e(setCurrentTime(miniPlayerVideoTag().currentTime))),localStorage.setItem("close-miniPlayer","true"),i.onClose()},children:jsxRuntime.jsx("img",{className:"pl-size-4 pl-cursor-pointer",src:IMAGES.closeSquare,alt:"close-square"})}),jsxRuntime.jsx("div",{className:`animate__animated animate__faster pl-absolute pl-bottom-0 pl-z-[1000000] pl-w-full ${conditions(ConditionName.isActiveElements)&&!conditions(ConditionName.isLoading)?"animate__fadeIn pl-pointer-events-auto":"animate__fadeOut pl-pointer-events-none"}`,children:jsxRuntime.jsx("div",{className:"pl-flex pl-w-full pl-justify-center",children:jsxRuntime.jsx(MiniPlayerPlayPause,{})})}),jsxRuntime.jsx(VideoTag,{})]}):jsxRuntime.jsx("div",{className:"pl-h-full pl-w-full pl-bg-white"})})},MiniPlayerLibrary=({params:i})=>jsxRuntime.jsx(Provider_default,{store,children:jsxRuntime.jsx(ErrorBoundary,{children:jsxRuntime.jsx(MiniPlayer,{params:i})})}),useActiveInActive=(i,e)=>{const t=useAppDispatch(),{activeElements:n}=useAppSelector(({controller:{activeElements:o}})=>({activeElements:o}),shallowEqual),s=React2.useRef(null),r=React2.useRef(i),a=React2.useRef(e);React2.useEffect(()=>{r.current=i},[i]),React2.useEffect(()=>{a.current=e},[e]),React2.useEffect(()=>{let o=!1;const l=u=>{const{activeElements:p,isEnded:m,isViewChangeIn360:g}=store.getState().controller;m?t(setActiveElements(!0)):u.pointerType==="mouse"&&!g&&(clearTimeout(s.current),p?["player-tag","main-content","player-controllbar","player-gif","video-opacity","playerElements","view360-canvas"].includes(u.target.id)&&(o=!0):t(setActiveElements(!0)),s.current=setTimeout(()=>{const{settingPopover:y,markersListPopover:v,speedPopover:b}=store.getState().popovers,{play:C}=store.getState().controller;!y&&!v&&!b&&C&&o&&t(setActiveElements(!1))},activeElementsTime))},d=u=>{setTimeout(()=>{const{activeElements:p,isEnded:m,firstPlay:g,isViewChangeIn360:y}=store.getState().controller;if(clearTimeout(s.current),m)return t(setActiveElements(!0));isTouchScreen()&&!g&&!r.current&&!a.current&&!y&&(["player-tag","main-content","video-opacity","touchBackward","touchForward","view360-canvas"].includes(u.target.id)||checkParentTarget(u,"player-gif")||checkParentTarget(u,"playerElements")?(t(setActiveElements(!p)),s.current=setTimeout(()=>{const{settingPopover:v,markersListPopover:b,speedPopover:C}=store.getState().popovers;!v&&!b&&!C&&t(setActiveElements(!1))},activeElementsTime)):s.current=setTimeout(()=>{const{settingPopover:v,markersListPopover:b,speedPopover:C}=store.getState().popovers;!v&&!b&&!C&&t(setActiveElements(!1))},activeElementsTime))},200)},f=()=>{clearTimeout(s.current),s.current=setTimeout(()=>{const{activeElements:u,isEnded:p}=store.getState().controller,{settingPopover:m,markersListPopover:g,speedPopover:y}=store.getState().popovers;p?t(setActiveElements(!0)):!m&&!g&&!y&&u&&!p&&t(setActiveElements(!u))},activeElementsTime)};return document.getElementById("video-area").addEventListener("pointermove",l),document.getElementById("video-area").addEventListener("touchstart",d),document.getElementById("video-area").addEventListener("touchmove",f),()=>{const u=document.getElementById("video-area");u&&(u.removeEventListener("pointermove",l),u.removeEventListener("touchstart",d),u.removeEventListener("touchmove",f))}},[n,i,e])},useFullScreen=()=>{const i=useAppDispatch();useAppSelector(({videoData:{params:e}})=>({params:e}),shallowEqual),React2.useEffect(()=>{const e=()=>{document.fullscreenElement?i(setIsFullScreen(!0)):(i(setIsFullScreen(!1)),handleVideoElementSizeInfo(),sendFluentLog(fullscreenLog("exitFullScreen")),conditions(ConditionName.isTouchScreen)&&conditions(ConditionName.isParamsPortrait)&&i(setIsComplexPortrait(!0))),handleIsComplexDesktop(conditions(ConditionName.isParamsPortrait))&&!conditions(ConditionName.isStaticFormat)&&i(setIsComplexDesktop(!0))};document.addEventListener&&(document.addEventListener("webkitfullscreenchange",e,!1),document.addEventListener("mozfullscreenchange",e,!1),document.addEventListener("fullscreenchange",e,!1),document.addEventListener("MSFullscreenChange",e,!1))},[])},PlayerCore$1=({isMultiLive:i})=>jsxRuntime.jsx(jsxRuntime.Fragment,{children:jsxRuntime.jsx(VideoTag,{isMultiLive:i})}),PlayerCore$2=React2.memo(PlayerCore$1),playerCore=Object.freeze(Object.defineProperty({__proto__:null,default:PlayerCore$2},Symbol.toStringTag,{value:"Module"})),LiveIcon=({isLive:i})=>jsxRuntime.jsx("div",{className:`pl-w-4 pl-h-4 pl-rounded-full pl-flex pl-items-center pl-justify-center pl-border-2 pl-border-transparent border-l-2 pl-border-l-white pl-border-r-2 pl-border-r-white ${i&&"pl-animate-ping"}`,style:{animation:i?"pl-ping 1.5s cubic-bezier(0, 0, 0.2, 1) infinite":""},children:jsxRuntime.jsx("div",{className:"pl-w-2 pl-h-2 pl-rounded-full pl-flex pl-items-center pl-justify-center pl-border-2 pl-border-transparent pl-border-l-2 pl-border-l-white pl-border-r-2 pl-border-r-white",children:jsxRuntime.jsx("div",{className:"pl-w-0.5 pl-h-0.5 pl-rounded-full pl-border pl-border-white"})})}),OnlineViewersIcon=({className:i,onClick:e})=>jsxRuntime.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",onClick:e,className:i,children:[jsxRuntime.jsx("path",{d:"M7.99995 10.8866C6.40661 10.8866 5.11328 9.59328 5.11328 7.99995C5.11328 6.40661 6.40661 5.11328 7.99995 5.11328C9.59328 5.11328 10.8866 6.40661 10.8866 7.99995C10.8866 9.59328 9.59328 10.8866 7.99995 10.8866ZM7.99995 6.11328C6.95995 6.11328 6.11328 6.95995 6.11328 7.99995C6.11328 9.03995 6.95995 9.88661 7.99995 9.88661C9.03995 9.88661 9.88661 9.03995 9.88661 7.99995C9.88661 6.95995 9.03995 6.11328 7.99995 6.11328Z",fill:"#E3E2E6"}),jsxRuntime.jsx("path",{d:"M7.99973 14.013C5.49306 14.013 3.12639 12.5463 1.49973 9.99966C0.79306 8.89966 0.79306 7.10633 1.49973 5.99966C3.13306 3.45299 5.49973 1.98633 7.99973 1.98633C10.4997 1.98633 12.8664 3.45299 14.4931 5.99966C15.1997 7.09966 15.1997 8.893 14.4931 9.99966C12.8664 12.5463 10.4997 14.013 7.99973 14.013ZM7.99973 2.98633C5.84639 2.98633 3.78639 4.27966 2.34639 6.53966C1.84639 7.31966 1.84639 8.67966 2.34639 9.45966C3.78639 11.7197 5.84639 13.013 7.99973 13.013C10.1531 13.013 12.2131 11.7197 13.6531 9.45966C14.1531 8.67966 14.1531 7.31966 13.6531 6.53966C12.2131 4.27966 10.1531 2.98633 7.99973 2.98633Z",fill:"#E3E2E6"})]}),OnlineViewer=()=>{const{onlineViewers:i}=useAppSelector(({videoData:{onlineViewers:e}})=>({onlineViewers:e}),shallowEqual);return jsxRuntime.jsxs("div",{className:"pl-flex pl-items-center pl-justify-center pl-gap-0.5",children:[jsxRuntime.jsx(OnlineViewersIcon,{className:"pl-w-3 pl-h-3 pl-stroke-dark-5"}),jsxRuntime.jsxs("div",{className:"pl-flex pl-items-center pl-gap-0.5 pl-text-white pl-text-[12px] pl-font-normal pl-relative pl-top-[1px]",children:[jsxRuntime.jsx("div",{children:unitization(i).unit}),jsxRuntime.jsx("div",{children:unitization(i).value})]})]})},LiveStatus=({className:i})=>(useAppSelector(({videoData:{isComplexPortrait:e,isComplexDesktop:t,onlineViewers:n,details:s}})=>({isComplexPortrait:e,isComplexDesktop:t,onlineViewers:n,details:s}),shallowEqual),useAppSelector(({controller:{isLive:e}})=>({isLive:e}),shallowEqual),jsxRuntime.jsxs("div",{style:{zIndex:conditions(ConditionName.isComplexPortrait)?0:zIndex.liveStatus},className:`pl-flex pl-max-w-max pl-items-center pl-gap-1 pl-rounded pl-p-1.5 ${!conditions(ConditionName.isComplexPortrait)&&"pl-relative"} ${conditions(ConditionName.isLive)?"pl-cursor-default pl-bg-red-zProgress":"pl-cursor-pointer pl-bg-z-gray-500"} ${i}`,onClick:()=>!conditions(ConditionName.isLive)&&handleIsLive(),children:[jsxRuntime.jsxs("div",{className:"pl-flex pl-items-center pl-gap-2",children:[jsxRuntime.jsx(LiveIcon,{isLive:conditions(ConditionName.isLive)}),jsxRuntime.jsx("p",{className:"pl-text-xs pl-font-medium pl-text-white",children:"زنده"})]}),conditions(ConditionName.showOnlineViewers)&&conditions(ConditionName.thresholdOnlineViewers)&&jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx("div",{className:"pl-h-[14px] pl-w-[1px] pl-bg-white"}),jsxRuntime.jsx(OnlineViewer,{})]})]})),Title$1=()=>{const{details:i,params:e}=useAppSelector(({videoData:{details:t,params:n}})=>({details:t,params:n}),shallowEqual);return jsxRuntime.jsx("div",{className:`pl-mr-3 pl-text-[14px] pl-font-medium pl-text-white pl-break-words pl-self-start animate__animated animate__faster ${conditions(ConditionName.isActiveElements)?"animate__fadeIn pl-opacity-100":"pl-opacity-0 animate__fadeOut"}`,children:conditions(ConditionName.hasTitle)?i.title:e.id})},CloseIcon=({className:i,onClick:e})=>jsxRuntime.jsxs("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:i,onClick:e,children:[jsxRuntime.jsx("path",{d:"M6 6L18.7742 18.7742",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),jsxRuntime.jsx("path",{d:"M6 18.7744L18.7742 6.00022",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})]}),FullRate=()=>{useAppSelector(({popovers:{fullRatePopover:o}})=>({fullRatePopover:o}),shallowEqual),useAppSelector(({videoData:{isComplexPortrait:o}})=>({isComplexPortrait:o}),shallowEqual);const[i,e]=React2.useState(0),t=useAppDispatch(),n=React2.useRef(null);React2.useEffect(()=>(n.current=setInterval(()=>e(o=>o+.2),10),()=>clearInterval(n.current)),[]);const s=()=>{t(setFullRatePopover(!1)),clearInterval(n.current),setTimeout(()=>t(setFullRatePopover(void 0)),500)};React2.useEffect(()=>{i>=100&&s()},[i]);const r=()=>{let o="";return conditions(ConditionName.isComplexPortrait)?o=`!pl-absolute pl-right-0 pl-mt-3 ${conditions(ConditionName.showFullRatePopover)?"animate__backInRight":"animate__backOutRight"}`:conditions(ConditionName.isFullMobilePortrait)?o=`!pl-absolute pl-top-12 pl-left-3 pl-self-center pl-justify-center ${conditions(ConditionName.showFullRatePopover)?"animate__backInLeft":"animate__backOutLeft"}`:o=`!pl-absolute pl-top-4 pl-left-[80px] ${conditions(ConditionName.showFullRatePopover)?"animate__backInDown":"animate__backOutUp"}`,o},a=jsxRuntime.jsx(CloseIcon,{className:"pl-w-3 pl-h-3 pl-stroke-secondary-50"});return jsxRuntime.jsxs("div",{className:`pl-h-[38px] pl-flex pl-items-center animate__animated ${r()} pl-border pl-border-secondary-300`,style:{zIndex:zIndex.fullrate},children:[jsxRuntime.jsxs("div",{className:"pl-flex pl-flex-col pl-gap-[4px] pl-items-center pl-w-[210px] pl-h-full pl-rounded-r-[4px] pl-py-[10px] pl-px-2 pl-bg-secondary-100 dark:pl-bg-gray-800",children:[jsxRuntime.jsx("p",{className:"pl-w-max pl-text-[11px] pl-font-medium pl-text-black dark:pl-text-white",children:translate().fullRateInternetTraffic}),jsxRuntime.jsx("div",{className:"pl-w-full pl-h-[2px] pl-bg-dark-8",children:jsxRuntime.jsx("div",{className:"pl-h-[2px] pl-bg-main-700",style:{width:`${i}%`}})})]}),jsxRuntime.jsx("div",{className:"pl-flex pl-justify-center pl-items-center pl-w-8 pl-h-full pl-rounded-l-[4px] pl-py-[10px] pl-cursor-pointer pl-bg-secondary-700 dark:pl-bg-gray-600",onClick:s,children:a})]})};var D=Object.getOwnPropertySymbols,z=Object.prototype.hasOwnProperty,G=Object.prototype.propertyIsEnumerable,T=(i,e)=>{var t={};for(var n in i)z.call(i,n)&&e.indexOf(n)<0&&(t[n]=i[n]);if(i!=null&&D)for(var n of D(i))e.indexOf(n)<0&&G.call(i,n)&&(t[n]=i[n]);return t},J=Object.defineProperty,H=Object.defineProperties,K=Object.getOwnPropertyDescriptors,j=Object.getOwnPropertySymbols,Q=Object.prototype.hasOwnProperty,W=Object.prototype.propertyIsEnumerable,I=(i,e,t)=>e in i?J(i,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):i[e]=t,x=(i,e)=>{for(var t in e||(e={}))Q.call(e,t)&&I(i,t,e[t]);if(j)for(var t of j(e))W.call(e,t)&&I(i,t,e[t]);return i},U=(i,e)=>H(i,K(e)),S=typeof window>"u"?React2.useEffect:React2.useLayoutEffect,h=({isPlaying:i,duration:e,startAt:t=0,updateInterval:n=0,onComplete:s,onUpdate:r})=>{let[a,o]=React2.useState(t),l=React2.useRef(t*-1e3),d=React2.useRef(null),f=React2.useRef(null),u=React2.useRef(null),p=React2.useRef({elapsedTimeRef:0,startAtRef:t,durationRef:e,updateIntervalRef:n});p.current=U(x({},p.current),{durationRef:e,updateIntervalRef:n});let m=v=>{let b=v/1e3;if(f.current===null){f.current=b,d.current=requestAnimationFrame(m);return}let{durationRef:C,elapsedTimeRef:_,updateIntervalRef:R,startAtRef:E}=p.current,F=b-f.current,O=_+F;f.current=b,p.current=U(x({},p.current),{elapsedTimeRef:O});let A=E+(R===0?O:(O/R|0)*R),N=E+O,M=typeof C=="number"&&N>=C;o(M?C:A),M||(d.current=requestAnimationFrame(m))},g=()=>{d.current&&cancelAnimationFrame(d.current),u.current&&clearTimeout(u.current),f.current=null},y=React2.useCallback(v=>{let b=typeof v=="number"?v:t;g(),p.current=U(x({},p.current),{elapsedTimeRef:0,startAtRef:b}),o(b),i&&(d.current=requestAnimationFrame(m))},[i,t]);return S(()=>{if(r==null||r(a),e&&a>=e){l.current+=e*1e3;let{shouldRepeat:v=!1,delay:b=0,newStartAt:C}=(s==null?void 0:s(l.current/1e3))||{};v&&(u.current=setTimeout(()=>y(C),b*1e3))}},[a,e]),S(()=>(i&&(d.current=requestAnimationFrame(m)),g),[i]),{elapsedTime:a,reset:y}},q={easeInCubic:(i,e,t,n)=>(i/=n,t*i*i*i+e),easeOutCubic:(i,e,t,n)=>(i/=n,i--,t*(i*i*i+1)+e),linear:(i,e,t,n)=>t*i/n+e},V=q.easeOutCubic,L=i=>typeof i=="function"?i:q[i],ee=(i,e)=>{if(typeof i=="number")return typeof e=="number"?e:2},$=(i,e)=>i.replace(/\B(?=(\d{3})+(?!\d))/g,e),k=i=>(i.toString().split(".")[1]||"").length,te=(i,e)=>{let t=k(i),n=k(e||1);return t>=n?t:n},w=({isCounting:i=!1,start:e=0,end:t,duration:n,decimalPlaces:s=te(e,t),decimalSeparator:r=".",thousandsSeparator:a="",onComplete:o,easing:l=V,formatter:d,updateInterval:f,onUpdate:u})=>{let p=ee(t,n),m=v=>{let b;if(p===0&&typeof t=="number")b=t;else if(typeof t=="number"&&typeof p=="number"){let R=L(l),E=v<p?v:p;b=R(E,e,t-e,p)}else b=e+v;if(typeof d=="function")return d(b);if(s===0){let R=Math.round(b).toString();return $(R,a)}let[C,_]=b.toFixed(s).split(".");return`${$(C,a)}${r}${_}`},{elapsedTime:g,reset:y}=h({isPlaying:i,duration:p,onComplete:o,updateInterval:f,onUpdate:typeof u=="function"?v=>u(m(v)):void 0});return{value:m(g),reset:y}},B=i=>{var e=i,{children:t}=e,n=T(e,["children"]);let s=w(n);return typeof t=="function"?t(s):s.value};B.displayName="CountUp";const PollOption=({option:i,lastOptionId:e,sumVotes:t,onClick:n})=>{const[s,r]=React2.useState(0),[a,o]=React2.useState(0),{question:l,selectedOptionId:d}=useAppSelector(({videoData:{question:u,selectedOptionId:p}})=>({question:u,selectedOptionId:p}),shallowEqual),f=(u,p)=>{let m=[],g=0,y=handleSumVotes(l);if(livePoll()&&(m=livePoll().polls.filter(v=>v.qid===l.id&&v.oid===p&&v.sumOptionVotes===u+1)),i.id===e){if(u===0&&m.length===0)return 0;let v=[];return l.options.forEach(b=>{b.id!==e&&(livePoll()&&(v=livePoll().polls.filter(C=>C.qid===l.id&&C.oid===b.id&&C.sumOptionVotes===b.vote+1)),g=g+Math.floor(y?(v.length>0?b.vote+1:b.vote)*100/y:0),v=[])}),100-g}else return y?(m.length>0?u+1:u)*100/y:0};return React2.useEffect(()=>o(f(i.vote,i.id)),[i.vote,d,t]),jsxRuntime.jsxs("p",{className:`pl-bg-dark-6 dark:pl-bg-dark-2/[0.9] pl-w-full pl-flex pl-flex-col pl-justify-center pl-items-center pl-text-[13px] pl-px-3 pl-h-[45px] pl-rounded-[12px] ${isVoted(l.id)||!l.can_vote?"pl-cursor-default":"pl-cursor-pointer"} ${isSelectedOption(l.id,i.id)&&"!pl-bg-purple-light dark:!pl-bg-main-light/[0.7]"}`,onClick:n,children:[jsxRuntime.jsx("span",{className:"pl-text-[13px] pl-font-medium pl-text-gray-800 dark:pl-text-white",children:i.text}),(isVoted(l.id)||!l.can_vote)&&jsxRuntime.jsxs("span",{children:[jsxRuntime.jsx(B,{isCounting:!0,duration:4,start:+Math.floor(s).toFixed(0),end:+Math.floor(a).toFixed(0),onComplete:()=>r(a)},a),"%"]})]},i.id)},PollOption$1=React2.memo(PollOption),MessageIcon=({className:i,onClick:e})=>jsxRuntime.jsx("svg",{width:"12",height:"10",viewBox:"0 0 12 10",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:i,onClick:e,children:jsxRuntime.jsx("path",{d:"M1.125 5.38C1.125 6.18 1.6865 6.877 2.4785 6.9935C3.022 7.0735 3.571 7.135 4.125 7.178V9.5L6.163 7.462C6.30121 7.32467 6.48673 7.24543 6.6815 7.2405C7.63221 7.21418 8.58052 7.13171 9.5215 6.9935C10.3135 6.877 10.875 6.1805 10.875 5.3795V2.3705C10.875 1.5695 10.3135 0.873001 9.5215 0.756501C8.35548 0.585358 7.17851 0.49963 6 0.500001C4.804 0.500001 3.628 0.587501 2.4785 0.756501C1.6865 0.873001 1.125 1.57 1.125 2.3705V5.3795V5.38Z",stroke:"",strokeLinecap:"round",strokeLinejoin:"round"})}),Poll$1=()=>{const{question:i,params:e,details:t}=useAppSelector(({videoData:{question:b,params:C,details:_,isComplexPortrait:R}})=>({question:b,params:C,details:_,isComplexPortrait:R}),shallowEqual),[n,s]=React2.useState(handleSumVotes(i)),[r,a]=React2.useState(!1),[o,l]=React2.useState(0),[d,f]=React2.useState(!1),u=React2.useRef(),p=useAppDispatch();React2.useEffect(()=>{conditions(ConditionName.hasPoll)?(s(handleSumVotes(i)),(!seenPoll()||seenPoll()&&+seenPoll()!==i.id)&&(conditions(ConditionName.isComplexPortrait)&&p(setClearPopoversSlice()),f(!0))):(conditions(ConditionName.isComplexPortrait)&&p(setClearPopoversSlice()),f(!0))},[i]);const m=(b,C)=>{p(setSelectedOptionId(b)),(i||i.active)&&(livePoll()&&livePoll().liveId!==e.id||!livePoll()?localStorage.setItem("live-poll",JSON.stringify({liveId:e.id,polls:[{qid:i.id,oid:b,sumOptionVotes:C+1}]})):livePoll().polls.filter(_=>_.qid===i.id).length===0&&i.can_vote&&localStorage.setItem("live-poll",JSON.stringify({liveId:e.id,polls:[...livePoll().polls,{qid:i.id,oid:b,sumOptionVotes:C+1}]})))},g=b=>{b.preventDefault(),b.stopPropagation(),u.current.scrollLeft-=u.current.clientWidth},y=b=>{b.preventDefault(),b.stopPropagation(),u.current.scrollLeft+=u.current.clientWidth};React2.useEffect(()=>{if(u.current){const b=u.current.clientWidth,C=u.current.scrollWidth;a(C>b),l(u.current.scrollLeft),u.current.addEventListener("scroll",_=>l(_.target.scrollLeft))}return()=>u.current&&u.current.removeEventListener("scroll",()=>!0)},[u.current,i]);const v=()=>{f(!1),localStorage.setItem("seen-poll",i.id),sendFluentLog(pollModalCloseLog(e,t,i.id))};return jsxRuntime.jsx(jsxRuntime.Fragment,{children:i&&Object.keys(i).length>0&&i.active&&d&&jsxRuntime.jsx("div",{className:`pl-absolute pl-mx-auto pl-flex pl-w-full pl-flex-col ${conditions(ConditionName.isTouchScreenPortrait)?"pl-top-14":"pl-top-3"} animate__animated ${d&&"animate__fadeInDown"} pl-opacity-100`,style:{zIndex:zIndex.poll},children:jsxRuntime.jsxs("div",{className:`pl-mx-auto ${conditions(ConditionName.isTouchScreenLandscape)&&"pl-w-[65vw]"} ${conditions(ConditionName.isTouchScreenPortrait)&&"!pl-mx-0 pl-w-[92vw]"} pl-relative pl-rounded-[12px] pl-bg-white pl-px-[17px] pl-py-[14px] dark:pl-bg-gray-800/[0.7] lg:pl-w-[40%]`,children:[jsxRuntime.jsxs("div",{className:"pl-mb-2 pl-flex pl-items-center pl-gap-2",children:[jsxRuntime.jsx(MessageIcon,{className:"pl-stroke-gray-800 dark:pl-stroke-dark-5"}),jsxRuntime.jsx("p",{className:"pl-flex-1 pl-break-all pl-text-[12px] pl-font-normal pl-text-gray-800 dark:pl-text-white",children:i.text}),jsxRuntime.jsx(CloseIcon,{className:"pl-h-4 pl-w-4 pl-cursor-pointer pl-stroke-gray-800 dark:pl-stroke-dark-5",onClick:v})]}),i.options&&i.options.length>0&&jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsxs("div",{className:"no-scrollbar pl-max-h-[200px] pl-overflow-auto",ref:u,children:[r&&!conditions(ConditionName.isTouchScreen)&&jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[o<0&&jsxRuntime.jsx("div",{className:`pl-absolute pl-flex pl-cursor-pointer pl-items-center pl-justify-center pl-rounded-full pl-drop-shadow-lg pl-transition hover:pl-scale-[1.2] ${isVoted(i.id)?"pl-mt-[15px]":"pl-mt-[13px]"}`,onClick:y,children:jsxRuntime.jsx("img",{src:IMAGES.chevronCircleRight,width:18,height:18,alt:"chevronCircleRight-icon"})}),Math.abs(o-u.current.clientWidth)!==u.current.scrollWidth-1&&jsxRuntime.jsx("div",{className:`pl-absolute pl-left-2 pl-flex -pl-rotate-180 pl-cursor-pointer pl-items-center pl-justify-center pl-rounded-full pl-drop-shadow-lg pl-transition hover:pl-scale-[1.2] ${isVoted(i.id)?"pl-mt-[15px]":"pl-mt-[13px]"}`,onClick:g,children:jsxRuntime.jsx("img",{src:IMAGES.chevronCircleRight,width:18,height:18,alt:"chevronCircleRight-icon"})})]}),jsxRuntime.jsx("div",{className:"pl-flex pl-gap-2",children:i.options.map(b=>jsxRuntime.jsx(PollOption$1,{option:b,lastOptionId:i.options.find(C=>C.vote===Math.max(...i.options.map(_=>_.vote))).id,sumVotes:n,onClick:()=>i.can_vote&&!isVoted(i.id)&&m(b.id,b.vote)},b.id))})]}),isVoted(i.id)&&jsxRuntime.jsxs("p",{className:"pl-mt-1 pl-flex pl-gap-1 pl-text-[11px]",children:[jsxRuntime.jsx("span",{children:"تعداد کل آرا:"}),jsxRuntime.jsxs("span",{children:[handleSumVotes(i)," نفر"]})]})]})]})})})},AgeClassification=()=>{const{details:i}=useAppSelector(({videoData:{details:t}})=>({details:t}),shallowEqual),e=()=>{let t=`pl-bg-white pl-rounded-full pl-text-[12px] pl-font-extrabold
|
|
91
|
-
${conditions(ConditionName.isTouchScreen)?"pl-w-6 pl-h-6":"pl-w-8 pl-h-8"} pl-flex pl-justify-center pl-items-center animate__animated animate__faster ${conditions(ConditionName.isActiveElements)?"animate__fadeInDown":"animate__fadeOutUp"}`;return conditions(ConditionName.isChildClassification)&&(t=`${t} !pl-bg-lime-success`),conditions(ConditionName.isTeenagerClassification)&&(t=`${t} !pl-bg-warning-100`),conditions(ConditionName.isYoungClassification)&&(t=`${t} !pl-bg-red-error pl-text-red-onError`),t};return jsxRuntime.jsx("div",{className:`${e()}`,children:jsxRuntime.jsxs("span",{className:"pl-mt-0.5",children:[i.pg_state,"+"]})})},Snapshot=()=>{function i(){let e=document.getElementById("snapshot-canvas"),t=document.querySelector("#player-tag");if(e){e.width=t.videoWidth,e.height=t.videoHeight,e.getContext("2d").drawImage(t,0,0,t.videoWidth,t.videoHeight);const n=e.toDataURL("image/JPEG");conditions(ConditionName.hasOnSnapshotParams)&&store.getState().videoData.params.onSnapshot(n)}}return jsxRuntime.jsx("div",{className:"pl-cursor-pointer pl-rounded-[4px] pl-bg-secondary-600",style:{zIndex:zIndex.snapshot},onClick:()=>i(),onDoubleClick:e=>e.stopPropagation(),children:jsxRuntime.jsxs("div",{className:"pl-flex pl-items-center pl-justify-center pl-gap-1 pl-px-[6px] pl-py-1",children:[jsxRuntime.jsx("img",{src:IMAGES.scissor,width:12,height:12}),jsxRuntime.jsx("p",{className:"dark:pl-text-dark pl-text-[12px] pl-font-medium pl-text-white",children:translate().takingPicture})]})})},LockIcon=({onClick:i,className:e,style:t})=>(useAppSelector(({controller:{showMiniPlayer:n}})=>({showMiniPlayer:n}),shallowEqual),useAppSelector(({videoData:{videoElementSizeInfo:n,params:s}})=>({videoElementSizeInfo:n,params:s}),shallowEqual),jsxRuntime.jsx(jsxRuntime.Fragment,{children:jsxRuntime.jsx("img",{src:IMAGES.lock,alt:"lock-icon",className:`pl-cursor-pointer ${e}`,style:t,width:conditions(ConditionName.isFullMobilePortrait)||!conditions(ConditionName.isMiniPlayer)?controllbarIconSize.other:controllbarIconSize.miniPlayer,height:conditions(ConditionName.isFullMobilePortrait)||!conditions(ConditionName.isMiniPlayer)?controllbarIconSize.other:controllbarIconSize.miniPlayer,onClick:i})})),Lock=({className:i})=>jsxRuntime.jsx(LockIcon,{onClick:()=>handleLock("unlock"),style:{zIndex:zIndex.lockIcon},className:i}),UnlockIcon=i=>(useAppSelector(({controller:{showMiniPlayer:e}})=>({showMiniPlayer:e}),shallowEqual),useAppSelector(({videoData:{videoElementSizeInfo:e,params:t}})=>({videoElementSizeInfo:e,params:t}),shallowEqual),jsxRuntime.jsx(jsxRuntime.Fragment,{children:jsxRuntime.jsx("img",{src:IMAGES.unlock,alt:"unlock-icon",className:"pl-cursor-pointer",width:conditions(ConditionName.isFullMobilePortrait)||!conditions(ConditionName.isMiniPlayer)?controllbarIconSize.other:controllbarIconSize.miniPlayer,height:conditions(ConditionName.isFullMobilePortrait)||!conditions(ConditionName.isMiniPlayer)?controllbarIconSize.other:controllbarIconSize.miniPlayer,...i})})),ControllbarTooltip=({title:i,className:e})=>jsxRuntime.jsx("span",{className:`pl-absolute pl-w-max pl-bg-secondary-900/[0.8] pl-text-white pl-bottom-[230%] pl-right-[-18px] pl-rounded-[8px] pl-px-2 pl-py-[5px] pl-text-[14px] pl-font-bold ${e}`,children:i}),Unlock=({inControllbar:i=!1})=>{const[e,t]=React2.useState(!1);return jsxRuntime.jsxs("div",{className:"pl-relative pl-flex pl-items-center",children:[jsxRuntime.jsx(UnlockIcon,{onClick:()=>handleLock("lock"),onMouseOver:()=>!conditions(ConditionName.isTouchScreen)&&i&&t(!0),onMouseLeave:()=>!conditions(ConditionName.isTouchScreen)&&i&&t(!1),style:{zIndex:zIndex.lockIcon}}),e&&jsxRuntime.jsx(ControllbarTooltip,{title:`${translate().lock} (l)`,className:"pl-right-[-15px]"})]})},Header=()=>(useAppSelector(({controller:{lock:i,activeElements:e}})=>({lock:i,activeElements:e}),shallowEqual),jsxRuntime.jsxs("div",{style:{zIndex:zIndex.header},className:`pl-flex pl-items-start ${conditions(ConditionName.isLock)?"pl-justify-end":"pl-justify-between"} pl-mx-4 pl-mt-5`,children:[jsxRuntime.jsxs("div",{className:"pl-flex-1",children:[conditions(ConditionName.showLiveStatus)&&jsxRuntime.jsx(LiveStatus,{}),conditions(ConditionName.showTitle)&&jsxRuntime.jsx(Title$1,{})]}),conditions(ConditionName.showPoll)&&jsxRuntime.jsx(Poll$1,{}),conditions(ConditionName.showFullRate)&&jsxRuntime.jsx(FullRate,{}),jsxRuntime.jsxs("div",{className:"pl-flex pl-items-center pl-gap-4",children:[conditions(ConditionName.showAgeClassification)&&jsxRuntime.jsx(AgeClassification,{}),conditions(ConditionName.showSnapShot)&&jsxRuntime.jsx(Snapshot,{}),conditions(ConditionName.isTouchScreenPortrait)?jsxRuntime.jsx(jsxRuntime.Fragment,{children:conditions(ConditionName.isLock)?jsxRuntime.jsx(Lock,{className:`animate__animated animate__faster ${conditions(ConditionName.isActiveElements)?"animate__fadeInDown":"animate__fadeOutUp"}`}):jsxRuntime.jsx(Unlock,{})}):jsxRuntime.jsx(jsxRuntime.Fragment,{children:conditions(ConditionName.isLock)&&jsxRuntime.jsx(Lock,{className:`animate__animated animate__faster ${conditions(ConditionName.isActiveElements)?"animate__fadeInDown":"animate__fadeOutUp"}`})})]})]})),Tooltip$1=()=>{const{details:i}=useAppSelector(({videoData:{details:o}})=>({details:o}),shallowEqual),{tooltipTime:e}=useAppSelector(({controller:{tooltipTime:o,activeElements:l}})=>({tooltipTime:o,activeElements:l}),shallowEqual),t={},[n,s]=React2.useState(void 0),[r,a]=React2.useState(conditions(ConditionName.isTouchScreen)?i.vtt_mobile:i.vtt);return React2.useEffect(()=>{a(conditions(ConditionName.isVttFitHeight)?i.vtt_mobile:i.vtt)},[i.vtt,i.vtt_mobile,conditions(ConditionName.isVttFitHeight)]),React2.useEffect(()=>{r&&fetchFile(conditions(ConditionName.isVttFitHeight)?i.vtt_mobile:i.vtt,s)},[r]),conditions(ConditionName.isActiveElements)?jsxRuntime.jsxs("div",{className:`pl-flex pl-flex-col pl-progressTooltip pl-absolute pl-bottom-[200%] pl-px-[10px] pl-py-[5px] pl-mr-[-25px] pl-mb-[25px] pl-text-white pl-text-[14px] ${r&&n?"":"pl-bg-z-gray-700"} pl-rounded-[6px] pl-opacity-0`,children:[r&&!!n&&jsxRuntime.jsx("div",{className:"pl-flex-1 pl-border pl-border-white pl-rounded-[8px]",children:jsxRuntime.jsx("div",{className:"pl-rounded-[8px]",style:getStyleForTime(e,n,t)})}),jsxRuntime.jsx("div",{className:"pl-flex pl-items-center pl-justify-center pl-progressTimeTooltip pl-text-white !pl-opacity-100"})]}):jsxRuntime.jsx(jsxRuntime.Fragment,{})},Tooltip$2=React2.memo(Tooltip$1),Emoji=({name:i,className:e,dataMarker:t})=>jsxRuntime.jsx("img",{"data-marker":t,src:`${getEmojiUrl()}/${i}.png`,alt:i,className:e}),useOnClickOutside=(i,e)=>{React2.useEffect(()=>{const t=n=>{!i.current||i.current.contains(n.target)||e(n)};return document.addEventListener("mousedown",t),document.addEventListener("touchstart",t),()=>{document.removeEventListener("mousedown",t),document.removeEventListener("touchstart",t)}},[i,e])},CopyIcon=({className:i,onClick:e})=>jsxRuntime.jsxs("svg",{width:"19",height:"18",viewBox:"0 0 19 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:i,onClick:e,children:[jsxRuntime.jsx("path",{d:"M10.7783 8.20508C12.4658 9.89258 12.4658 12.6226 10.7783 14.3026C9.09078 15.9826 6.36078 15.9901 4.68078 14.3026C3.00078 12.6151 2.99328 9.88508 4.68078 8.20508",strokeLinecap:"round",strokeLinejoin:"round"}),jsxRuntime.jsx("path",{d:"M8.92562 10.0577C7.17063 8.30266 7.17063 5.45266 8.92562 3.69016C10.6806 1.92766 13.5306 1.93516 15.2931 3.69016C17.0556 5.44516 17.0481 8.29516 15.2931 10.0577",strokeLinecap:"round",strokeLinejoin:"round"})]}),CopyText=({link:i,markerId:e,videoTime:t,isJump:n})=>{const[s,r]=React2.useState(void 0),[a,o]=React2.useState("");useAppSelector(({controller:{showMiniPlayer:d}})=>({showMiniPlayer:d}),shallowEqual),useAppSelector(({videoData:{params:d,details:f,videoElementSizeInfo:u}})=>({params:d,details:f,videoElementSizeInfo:u}),shallowEqual);const l=d=>{d.preventDefault(),o("animate"),setTimeout(()=>o(""),2e3),conditions(ConditionName.hasClipboard)&&(sendFluentLog(shareCopyLog(Number(videoTag().currentTime.toFixed(0)),n,t,e)),navigator.clipboard.writeText(i),r(!0),setTimeout(()=>r(!1),2e3))};return jsxRuntime.jsxs("button",{className:`pl-confetti-button ${a} ${!s&&"active:pl-scale-75"} pl-flex pl-flex-1 pl-items-center pl-justify-center pl-gap-2 pl-py-[11px] pl-bg-secondary-200 dark:pl-bg-dark-1 pl-rounded-[8px] ${s?"pl-cursor-default":"pl-cursor-pointer"}`,onClick:s?()=>{}:l,children:[jsxRuntime.jsx(CopyIcon,{className:"stroke-z-secondary-600 dark:stroke-secondary-50"}),jsxRuntime.jsxs("div",{className:"pl-flex pl-items-center pl-justify-center pl-mr-10 pl-text-secondary-500 dark:pl-text-secondary-50",children:[jsxRuntime.jsx("span",{className:`pl-absolute animate__animated pl-text-secondary-500 dark:pl-text-secondary-50 ${s===!0&&"animate__fadeOutDown"} ${s===!1&&"animate__fadeInUp"}`,style:{left:conditions(ConditionName.isMiniPlayer)&&!conditions(ConditionName.isFullMobilePortrait)?60:"unset"},children:translate().copyLink}),jsxRuntime.jsx("span",{className:`pl-absolute animate__animated pl-opacity-0 pl-transition-opacity pl-duration-300 pl-text-secondary-500 dark:pl-text-secondary-50 ${s===!0&&"animate__fadeInUp pl-opacity-100"}`,style:{left:conditions(ConditionName.isMiniPlayer)&&!conditions(ConditionName.isFullMobilePortrait)?60:"unset"},children:translate().linkWasCopied})]})]})},CheckBox=({label:i,onChange:e,defaultValue:t=!1,labelClassName:n})=>{const[s,r]=React2.useState(t);React2.useEffect(()=>r(t),[t]);const a=o=>{r(o.target.checked),e(o.target.checked)};return jsxRuntime.jsxs("label",{className:"pl-container-checkbox",children:[jsxRuntime.jsx("span",{className:`pl-text-[14px] pl-font-medium pl-mr-8 pl-cursor-pointer ${n}`,children:i}),jsxRuntime.jsx("input",{type:"checkbox",className:"pl-cursor-pointer",checked:s,onChange:a}),jsxRuntime.jsx("span",{className:`pl-checkmark pl-cursor-pointer ${s&&"pl-bg-main-light pl-border-none"}`})]})},Popover=React2.forwardRef(({children:i,status:e,onClose:t,type:n,classNames:s,parentClassNames:r,styles:a,isBlurBackground:o,isFullHeight:l=!1,isFullScreen:d,isHeader:f,headerTitle:u="",customHeader:p,headerClassName:m,isHasCatchUpLineOnTop:g=!1,animation:y,scrollbar:v=!1,isFocusOnInput:b=!1,showCloseIcon:C=!0,pinContent:_},R)=>{const[E,F]=React2.useState(e),[O,A]=React2.useState(0),[N,M]=React2.useState(0),[Z,X]=React2.useState(0),{videoElementSizeInfo:oe}=useAppSelector(({videoData:{videoElementSizeInfo:pe,isComplexPortrait:he}})=>({videoElementSizeInfo:pe,isComplexPortrait:he}),shallowEqual),le=useNavigate();React2.useEffect(()=>{let pe;return e?(window.location.href.includes("#openPopover")||le(`${window.location.search}#openPopover`),F(!0)):pe=setTimeout(()=>{const Y=window.location.href.split("#")[0];window.history.replaceState({},document.title,Y),t(!1),M(0),F(!1)},500),()=>clearTimeout(pe)},[e]),React2.useEffect(()=>{conditions(ConditionName.isComplexPortrait)&&e&&A(window.innerHeight-oe.bottom)},[e]);const de=pe=>{pe.touches[0].clientY>=oe.top?M(window.innerHeight-pe.touches[0].clientY):M(window.innerHeight-oe.top),X(zIndex.maxPopover)},ue=()=>{N!==0&&(N>O?N-O>(window.innerHeight-oe.top-O)/2?(M(window.innerHeight-oe.top),X(zIndex.maxPopover)):(M(0),setTimeout(()=>X(0),500)):(N>O/2?M(O):(M(0),A(0),t()),X(0)))},ce=jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[o&&jsxRuntime.jsx("div",{className:`animate__animated animate__faster pl-fixed pl-right-0 pl-top-0 pl-h-screen pl-w-screen ${e?"animate__fadeIn":"animate__fadeOut"}`,style:{zIndex:zIndex.popoverBlurBackground,backdropFilter:"blur(4px)"}}),jsxRuntime.jsx("div",{className:`${n==="modal"&&"pl-fixed pl-left-0 pl-top-0 pl-flex pl-h-full pl-w-full pl-items-end pl-justify-center sm:pl-items-center"} ${r}`,style:{zIndex:l&&!b?Z:zIndex.popoverContent},children:jsxRuntime.jsx("div",{className:`animate__animated animate__faster pl-flex pl-flex-col pl-rounded-[8px] pl-bg-white/[0.9] dark:pl-bg-black/[0.7] ${l&&"pl-h-full"} ${y||(window.innerWidth>768&&n==="modal"?e?"animate__fadeIn":"animate__fadeOut":e?"animate__fadeInUp":"animate__fadeOutDown")} ${conditions(ConditionName.isComplexPortrait)?"!pl-fixed !pl-bottom-0 !pl-left-0 !pl-right-0 !pl-mb-0 !pl-w-full pl-rounded-[12px] !pl-rounded-b-none !pl-bg-white dark:!pl-bg-dark-3":"before:pl-hidden"} ${conditions(ConditionName.isFullMobilePortrait)&&`!pl-fixed !pl-mx-auto !pl-mb-[0px] ${n==="modal"?"!pl-w-screen":`!pl-w-[95vw] ${conditions(ConditionName.hasMarkers)?"!pl-bottom-[85px]":"!pl-bottom-[60px]"}`}`} ${n!=="modal"&&"no-scrollbar pl-absolute pl-bottom-full pl-overflow-auto"} ${s} `,style:{maxHeight:d?"unset":N||O||(conditions(ConditionName.isComplexPortrait)?0:""),zIndex:zIndex.popoverContent,...a},ref:R,children:jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[f&&jsxRuntime.jsxs("div",{onTouchMove:g?de:()=>{},onTouchEndCapture:g?ue:()=>{},children:[g&&jsxRuntime.jsx("div",{className:"pl-absolute pl-right-[50%] pl-top-[5px] pl-mr-[-25px] pl-h-[3px] pl-w-[60px] pl-rounded-[20px] pl-bg-secondary pl-text-center"}),f&&jsxRuntime.jsx("div",{className:`pl-mx-4 pl-mb-4 pl-border-b pl-border-secondary-300 dark:pl-border-secondary-400 ${m}`,children:p||jsxRuntime.jsxs("div",{className:"pl-flex pl-items-center pl-justify-between pl-py-[19px]",children:[jsxRuntime.jsx("p",{className:"pl-text-[18px] pl-font-bold pl-text-black dark:pl-text-white",children:u}),C&&jsxRuntime.jsx(CloseIcon,{className:"pl-cursor-pointer pl-stroke-secondary-400 dark:pl-stroke-dark-5",onClick:t})]})})]}),jsxRuntime.jsx(jsxRuntime.Fragment,{children:_}),jsxRuntime.jsx("div",{id:"popover-content",className:`pl-h-full pl-w-full pl-overflow-y-auto ${!v&&"no-scrollbar"}`,onTouchMove:pe=>pe.stopPropagation(),children:i})]})})})]});return jsxRuntime.jsx(jsxRuntime.Fragment,{children:E&&jsxRuntime.jsx(jsxRuntime.Fragment,{children:n==="modal"?ReactDOM.createPortal(jsxRuntime.jsx(jsxRuntime.Fragment,{children:ce}),document.getElementById("dialog-react-root-videoPlayer")):jsxRuntime.jsx("div",{children:ce})})})});Popover.displayName="popover";const ShareDialog=({currentTime:i,markerId:e})=>{const[t,n]=React2.useState(!!e),s=useAppDispatch(),{sharePopover:r}=useAppSelector(({popovers:{sharePopover:p}})=>({sharePopover:p}),shallowEqual);useAppSelector(({controller:{showMiniPlayer:p}})=>({showMiniPlayer:p}),shallowEqual),useAppSelector(({videoData:{params:p,videoElementSizeInfo:m}})=>({params:p,videoElementSizeInfo:m}),shallowEqual);let a=window.location.href;a.includes("?")?(a=a.split("&t=",1)[0],t&&(a=`${a}&t=${(i||0).toFixed(0)}`)):t&&(a=`${a}?t=${(i||0).toFixed(0)}`),React2.useEffect(()=>{n(!!e)},[e,status]);const o=()=>{s(setSharePopover(!1)),setTimeout(()=>n(!1),500)},l=async()=>{sendFluentLog(shareDialogLog(videoTag().currentTime?Number(videoTag().currentTime.toFixed(0)):0,t,Number((i||0).toFixed(0)),e)),navigator.share({url:a}),o()},d=React2.useRef(null);useOnClickOutside(d,()=>s(setSharePopover(!1)));const f=jsxRuntime.jsxs("div",{className:"pl-flex pl-items-center pl-gap-2 pl-pb-3",children:[jsxRuntime.jsx("div",{className:"pl-cursor-pointer pl-rounded-[4px] pl-bg-gray-100 pl-p-1",onClick:o,children:jsxRuntime.jsx(CloseIcon,{className:"pl-h-3 pl-w-3 pl-stroke-gray-800"})}),jsxRuntime.jsx("p",{className:"pl-text-[14px] pl-font-bold pl-text-black dark:pl-text-gray-100",children:translate().sharing})]}),u=jsxRuntime.jsxs("div",{className:"pl-flex pl-flex-col pl-gap-4 pl-px-4",ref:d,children:[jsxRuntime.jsxs("div",{className:"pl-flex pl-gap-3",children:[jsxRuntime.jsx(CopyText,{isJump:t,videoTime:Number((i||0).toFixed(0)),markerId:e,link:a}),jsxRuntime.jsxs("button",{className:"pl-flex pl-items-center pl-gap-[2.28px] pl-rounded-[8px] pl-bg-secondary-200 pl-p-[13.33px] dark:pl-bg-dark-1",onClick:l,children:[jsxRuntime.jsx("span",{className:"pl-h-[2.5px] pl-w-[2.5px] pl-rounded-full pl-bg-secondary-500 dark:pl-bg-secondary-50"}),jsxRuntime.jsx("span",{className:"pl-h-[2.5px] pl-w-[2.5px] pl-rounded-full pl-bg-secondary-500 dark:pl-bg-secondary-50"}),jsxRuntime.jsx("span",{className:"pl-h-[2.5px] pl-w-[2.5px] pl-rounded-full pl-bg-secondary-500 dark:pl-bg-secondary-50"})]})]}),jsxRuntime.jsx(CheckBox,{label:`${translate().jumpTo} ${secondsToHMS(Number((i||0).toFixed(0)))}`,onChange:p=>n(!!p),labelClassName:"pl-text-[14px] pl-font-medium",defaultValue:!!e})]});return jsxRuntime.jsx(jsxRuntime.Fragment,{children:jsxRuntime.jsx(Popover,{status:r,onClose:o,isBlurBackground:!0,classNames:`pl-py-4 ${conditions(ConditionName.isMiniPlayer)&&!conditions(ConditionName.isFullMobilePortrait)&&"!pl-fixed pl-rounded-r-none opacity-100"} ${conditions(ConditionName.isFullMobilePortrait)&&"pl-border-t pl-border-t-gray-300"}`,styles:{width:conditions(ConditionName.isMiniPlayer)&&!conditions(ConditionName.isFullMobilePortrait)?280:320,...handlePopoverSizeInMiniPlayer()},animation:conditions(ConditionName.isMiniPlayer)&&!conditions(ConditionName.isFullMobilePortrait)?status?"animate__fadeInLeft":"animate__fadeOutLeft":void 0,ref:d,type:conditions(ConditionName.isMiniPlayer)&&!conditions(ConditionName.isFullMobilePortrait)?"popover":"modal",isHeader:!0,customHeader:f,children:u})})},ShareDialog$1=React2.memo(ShareDialog),Markers=()=>{const i=useAppDispatch(),{hlsLiveSyncPosition:e,duration:t,activeElements:n}=useAppSelector(({controller:{hlsLiveSyncPosition:R,duration:E,activeElements:F,isFullScreen:O}})=>({hlsLiveSyncPosition:R,duration:E,activeElements:F,isFullScreen:O}),shallowEqual),{markers:s}=useAppSelector(({videoData:{markers:R,isComplexPortrait:E,videoElementSizeInfo:F}})=>({markers:R,isComplexPortrait:E,videoElementSizeInfo:F}),shallowEqual),{sharePopover:r}=useAppSelector(({popovers:{sharePopover:R}})=>({sharePopover:R}),shallowEqual),[a,o]=React2.useState(void 0),[l,d]=React2.useState([]),[f,u]=React2.useState({}),[p,m]=React2.useState(!1),g=conditions(ConditionName.isLiveParam)?e:t,y=R=>g?progressBarWidth()*R/g:0,v=(R,E,F,O,A,N,M,Z)=>{R.stopPropagation();const oe=24*E/(progressBarWidth()+5);let le=[],de=0;Z.map(ue=>{ue.time>E-oe&&ue.time<E+oe&&(le.push(ue),de+=ue.time)}),le.length>1?d(le):(le=[],d([]),b(R,E,F,O,A,N,M))},b=(R,E,F,O,A,N,M)=>{R.stopPropagation(),handleTimeTooltip(R,M),handleVideoTimeline(videoTag().currentTime,E),videoTag().currentTime=E,progressBar()&&(progressBar().style.width=y(E)),sendFluentLog(eventMarkerClickLog(F,E,O,A,N))};React2.useEffect(()=>{r||o(void 0)},[r]),React2.useEffect(()=>{a&&i(setSharePopover(!0))},[a]),React2.useEffect(()=>{conditions(ConditionName.isActiveElements)||d([])},[n]);const C=React2.useRef(null);useOnClickOutside(C,()=>d([])),React2.useEffect(()=>{if(l.length>0){const R=inViewPort(document.getElementsByClassName("pl-overlapMarkers")[0]);if(R==="inViewport")return m(!0),u({left:y(l[0].time)});if(R==="OutViewPortFromLeft")return m(!1),u({left:0});if(R==="OutViewPortFromRight")return m(!1),u({right:0})}},[l,document.getElementsByClassName("pl-overlapMarkers")[0]]);const _=R=>{R.preventDefault(),conditions(ConditionName.isTouchScreen)&&o(Number(R.target.getAttribute("data-marker")))};return jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[s.map(R=>jsxRuntime.jsx("div",{onContextMenu:_,"data-marker":R.time,onClick:E=>v(E,R.time,R.id,R.title,R.description,R.sticker,!0,s),onDoubleClick:E=>E.stopPropagation(),children:jsxRuntime.jsxs("div",{className:`pl-emoji-image pl-absolute pl-bottom-[200%] pl-rounded-[6px] pl-bg-z-gray-700/[0.4] pl-p-1 ${conditions(ConditionName.isTouchScreenPortrait),"pl-mb-5"} pl-ml-[-12px] pl-cursor-pointer`,style:{left:y(R.time),zIndex:zIndex.markers},"data-marker":R.time,children:[R.isPersonal!==null&&R.isPersonal!==void 0&&jsxRuntime.jsx("div",{className:"pl-absolute pl-right-[-1px] pl-top-[-2px] pl-h-2 pl-w-2 pl-rounded-full pl-bg-main"}),jsxRuntime.jsx(Emoji,{dataMarker:R.time,name:R.sticker,className:"pl-h-[16px] pl-w-[16px] !pl-max-w-max"})]})},R.id)),l.length>0&&jsxRuntime.jsx("div",{className:`pl-overlapMarkers ${p?"pl-overlayMarkersInViewport":"pl-overlayMarkersOutViewport"} animate__animated animate__fadeInUp pl-absolute pl-bottom-[45px] pl-ml-[-10px] pl-flex pl-flex-row-reverse pl-justify-end pl-gap-3 pl-rounded-[6px] pl-bg-z-gray-700/[0.4] pl-px-1 pl-py-2 pl-opacity-100`,ref:C,style:f,children:l.map(R=>jsxRuntime.jsx("div",{className:"pl-emoji-image pl-cursor-pointer pl-rounded-[6px]","data-marker":R.time,onClick:E=>b(E,R.time,R.id,R.title,R.description,R.sticker,!0),onDoubleClick:E=>E.stopPropagation(),children:jsxRuntime.jsx(Emoji,{dataMarker:R.time,name:R.sticker,className:"pl-h-[24px] pl-w-[24px] !pl-max-w-max"})},R.id))}),!!r&&a&&jsxRuntime.jsx(ShareDialog$1,{currentTime:a||void 0,markerId:s.filter(R=>R.time===a)[0].id})]})},Markers$1=React2.memo(Markers),ViewersChart$1=React2.lazy(()=>Promise.resolve().then(()=>viewersChart$1)),ProgressBar=()=>{const[i,e]=React2.useState(!1);React2.useEffect(()=>{hideProgressTooltip(document.querySelector(".progressTooltip"))},[]);const{duration:t,currentTime:n,bufferedTimeWidth:s,hlsLiveSyncPosition:r}=useAppSelector(({controller:{duration:u,currentTime:p,bufferedTimeWidth:m,hlsLiveSyncPosition:g,showMiniPlayer:y}})=>({duration:u,currentTime:p,bufferedTimeWidth:m,hlsLiveSyncPosition:g,showMiniPlayer:y}),shallowEqual),{markers:a}=useAppSelector(({videoData:{params:u,videoElementSizeInfo:p,markers:m,isComplexPortrait:g}})=>({params:u,videoElementSizeInfo:p,markers:m,isComplexPortrait:g}),shallowEqual),[o,l]=React2.useState([]),d=conditions(ConditionName.isLiveParam)?r:t,f=u=>d?progressBarWidth()*u/d:0;return jsxRuntime.jsxs("div",{className:`pl-relative pl-mb-2 ${conditions(ConditionName.isComplexPortrait)&&"pl-mx-2"}`,children:[jsxRuntime.jsxs("div",{className:"pl-relative",children:[jsxRuntime.jsx(Tooltip$2,{}),jsxRuntime.jsx(Markers$1,{})]}),jsxRuntime.jsx("div",{className:"pl-absolute pl-bottom-0.5 pl-flex pl-w-full pl-items-end pl-pb-2",onPointerDown:u=>handlePointerDown(u,o,e),onPointerMove:handlePointerMove,onPointerUp:u=>handlePointerUp(u,l,o,e),onMouseMove:handleMouseMove,onMouseOut:handleMouseOut,onClick:handleCatchUpLoadingLog,onDoubleClick:u=>u.stopPropagation(),children:jsxRuntime.jsxs("div",{id:"progress-area",className:"pl-absolute pl-w-full",children:[conditions(ConditionName.hasChart)&&!conditions(ConditionName.isMiniPlayer)&&jsxRuntime.jsx(React2.Suspense,{fallback:"",children:jsxRuntime.jsx(ViewersChart$1,{})}),jsxRuntime.jsxs("div",{id:"time-progress-area",className:"pl-m-auto !pl-h-[5px] !pl-w-full pl-cursor-pointer pl-rounded !pl-bg-z-secondary-100/[0.4] pl-transition-transform pl-duration-300",style:{transform:i?"scaleY(1.8)":"unset"},children:[a.map(u=>jsxRuntime.jsx("div",{"data-marker":u.time,children:jsxRuntime.jsx("div",{className:"pl-emoji-dot pl-absolute pl-flex pl-h-[5px] pl-w-[3px] pl-cursor-pointer pl-flex-col pl-bg-white","data-marker":u.time,style:{left:f(u.time),zIndex:zIndex.emoji}})},u.id)),jsxRuntime.jsx("div",{id:"time-progress-buffer",className:"pl-absolute pl-h-[5px] pl-rounded pl-bg-z-gray-400/[0.7]",style:{width:`${s}%`}}),jsxRuntime.jsx("div",{id:"time-progress-bar",className:`pl-bg-playerColor before:pl-bg-playerColor pl-relative pl-h-[5px] pl-cursor-pointer pl-rounded before:pl-inline-block before:pl-h-4 before:pl-w-4 ${i&&"before:pl-h-3 before:pl-w-7"}`,style:{width:conditions(ConditionName.isLive)?"100%":`${n/t*progressBarWidth()}px`}})]})]})})]})},MarkersListIcon=i=>{useAppSelector(({controller:{showMiniPlayer:t}})=>({showMiniPlayer:t}),shallowEqual),useAppSelector(({videoData:{videoElementSizeInfo:t,params:n}})=>({videoElementSizeInfo:t,params:n}),shallowEqual);let e=jsxRuntime.jsx(jsxRuntime.Fragment,{});return e=jsxRuntime.jsxs("svg",{width:conditions(ConditionName.isFullMobilePortrait)||!conditions(ConditionName.isMiniPlayer)?controllbarIconSize.other:controllbarIconSize.miniPlayer,height:conditions(ConditionName.isFullMobilePortrait)||!conditions(ConditionName.isMiniPlayer)?controllbarIconSize.other:controllbarIconSize.miniPlayer,viewBox:"0 0 22 22",fill:"none",xmlns:"http://www.w3.org/2000/svg",...i,children:[jsxRuntime.jsx("rect",{x:"3",y:"3",width:"4",height:"4",rx:"1.5"}),jsxRuntime.jsx("rect",{x:"3",y:"9",width:"4",height:"4",rx:"1.5"}),jsxRuntime.jsx("rect",{x:"3",y:"15",width:"4",height:"4",rx:"1.5"}),jsxRuntime.jsx("rect",{x:"8",y:"16",width:"11",height:"2",rx:"1"}),jsxRuntime.jsx("rect",{x:"8",y:"10",width:"11",height:"2",rx:"1"}),jsxRuntime.jsx("rect",{x:"8",y:"4",width:"11",height:"2",rx:"1"})]}),conditions(ConditionName.isComplexPortrait)&&(e=jsxRuntime.jsxs("div",{className:"pl-flex pl-items-center pl-gap-[14px] pl-rounded-[20px] pl-text-secondary-700 dark:pl-text-secondary-50 pl-bg-gray-100 dark:pl-bg-dark-3 pl-px-4 pl-py-[7px] pl-cursor-pointer",onClick:i.onClick,children:[e,jsxRuntime.jsx("span",{children:translate().markers})]})),jsxRuntime.jsx(jsxRuntime.Fragment,{children:e})},ConfirmationModal=({modalType:i,onClose:e,cancelButtonText:t,submitButtonText:n,onSubmit:s,text:r,status:a,children:o})=>{const l=React2.useRef(null);return useOnClickOutside(l,e),jsxRuntime.jsx(jsxRuntime.Fragment,{children:jsxRuntime.jsx(Popover,{classNames:conditions(ConditionName.isTouchScreenLandscape)?"pl-w-[360px] pl-max-h-[90vh] pl-relative":"pl-w-[360px] pl-relative",type:"modal",onClose:()=>{},ref:l,status:a,isBlurBackground:!0,children:i==="DELETE"?jsxRuntime.jsxs("div",{className:"pl-border-r-none pl-border-l-none pl-flex pl-h-full pl-w-full pl-flex-col pl-justify-between pl-rounded-[8px] pl-border-t-[8px] pl-border-t-red-200 pl-p-4",children:[jsxRuntime.jsx("div",{className:`pl-absolute pl-left-0 pl-top-[-20px] pl-h-[40px] pl-w-[40px] pl-rounded-full pl-bg-red-200 ${isTouchScreen()&&!conditions(ConditionName.isTouchScreenLandscape)?"pl-right-[calc(50vw-20px)]":"pl-left-[160px]"} pl-flex pl-items-center pl-justify-center`,children:jsxRuntime.jsx("img",{className:"pl-h-full pl-w-full",src:IMAGES.trashDeleteModal,width:25,height:25,alt:"trash"})}),jsxRuntime.jsx("div",{className:"pl-w-full pl-pt-4",children:r}),o,jsxRuntime.jsxs("div",{className:"pl-flex pl-w-full pl-items-end pl-justify-between pl-pt-6",children:[jsxRuntime.jsx("button",{className:"pl-h-[40px] pl-w-1/2 pl-rounded-[8px] pl-bg-red-600 pl-text-white",onClick:s,children:n}),jsxRuntime.jsx("button",{className:"pl-h-[40px] pl-w-1/2 pl-rounded-[8px] pl-text-gray-500 dark:pl-text-z-secondary-50",onClick:e,children:t})]})]}):jsxRuntime.jsx(jsxRuntime.Fragment,{})})})},ShareIcon=({className:i,onClick:e,onDoubleClick:t})=>jsxRuntime.jsx("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:i,onClick:e,onDoubleClick:t,children:jsxRuntime.jsx("path",{d:"M9.78947 0C8.57424 0 7.57895 0.995297 7.57895 2.21053C7.57895 2.3955 7.64164 2.56088 7.68503 2.73294L3.89864 4.62706C3.49235 4.12861 2.89942 3.78947 2.21053 3.78947C0.995296 3.78947 0 4.78477 0 6C0 7.21523 0.995296 8.21053 2.21053 8.21053C2.89942 8.21053 3.49235 7.87139 3.89864 7.37294L7.68503 9.26706C7.64164 9.43912 7.57895 9.6045 7.57895 9.78947C7.57895 11.0047 8.57424 12 9.78947 12C11.0047 12 12 11.0047 12 9.78947C12 8.57424 11.0047 7.57895 9.78947 7.57895C9.10058 7.57895 8.50765 7.91809 8.10136 8.41653L4.31497 6.52241C4.35836 6.35036 4.42105 6.18498 4.42105 6C4.42105 5.81502 4.35836 5.64964 4.31497 5.47759L8.10136 3.58347C8.50765 4.08191 9.10058 4.42105 9.78947 4.42105C11.0047 4.42105 12 3.42576 12 2.21053C12 0.995297 11.0047 0 9.78947 0ZM9.78947 0.947368C10.4927 0.947368 11.0526 1.50729 11.0526 2.21053C11.0526 2.91376 10.4927 3.47368 9.78947 3.47368C9.08624 3.47368 8.52632 2.91376 8.52632 2.21053C8.52632 1.50729 9.08624 0.947368 9.78947 0.947368ZM2.21053 4.73684C2.91376 4.73684 3.47368 5.29677 3.47368 6C3.47368 6.70323 2.91376 7.26316 2.21053 7.26316C1.50729 7.26316 0.947368 6.70323 0.947368 6C0.947368 5.29677 1.50729 4.73684 2.21053 4.73684ZM9.78947 8.52632C10.4927 8.52632 11.0526 9.08624 11.0526 9.78947C11.0526 10.4927 10.4927 11.0526 9.78947 11.0526C9.08624 11.0526 8.52632 10.4927 8.52632 9.78947C8.52632 9.08624 9.08624 8.52632 9.78947 8.52632Z"})}),ArrowUpIcon=({className:i,onClick:e})=>jsxRuntime.jsx("svg",{width:"16",height:"17",viewBox:"0 0 16 17",xmlns:"http://www.w3.org/2000/svg",className:i,onClick:e,children:jsxRuntime.jsx("path",{d:"M7.99706 4.80544C8.46372 4.80544 8.93039 4.98544 9.28372 5.33878L13.6304 9.68544C13.8237 9.87878 13.8237 10.1988 13.6304 10.3921C13.4371 10.5854 13.1171 10.5854 12.9237 10.3921L8.57706 6.04544C8.25706 5.72544 7.73706 5.72544 7.41706 6.04544L3.07039 10.3921C2.87706 10.5854 2.55706 10.5854 2.36372 10.3921C2.17039 10.1988 2.17039 9.87878 2.36372 9.68544L6.71039 5.33878C7.06372 4.98544 7.53039 4.80544 7.99706 4.80544Z"})}),ArrowDownIcon=({className:i,onClick:e})=>jsxRuntime.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",xmlns:"http://www.w3.org/2000/svg",className:i,onClick:e,children:jsxRuntime.jsx("path",{d:"M8.00294 11.2004C7.53628 11.2004 7.06961 11.0204 6.71628 10.6671L2.36961 6.32042C2.17628 6.12708 2.17628 5.80708 2.36961 5.61375C2.56294 5.42042 2.88294 5.42042 3.07628 5.61375L7.42294 9.96042C7.74294 10.2804 8.26294 10.2804 8.58294 9.96042L12.9296 5.61375C13.1229 5.42042 13.4429 5.42042 13.6363 5.61375C13.8296 5.80708 13.8296 6.12708 13.6363 6.32042L9.28961 10.6671C8.93628 11.0204 8.46961 11.2004 8.00294 11.2004Z"})}),MarkersList=()=>{const[i,e]=React2.useState(0),[t,n]=React2.useState(void 0),[s,r]=React2.useState(!1),[a,o]=React2.useState(void 0),[l,d]=React2.useState(void 0),{markers:f,params:u}=useAppSelector(({videoData:{markers:_,params:R,isComplexPortrait:E,videoElementSizeInfo:F}})=>({markers:_,params:R,isComplexPortrait:E,videoElementSizeInfo:F}),shallowEqual),{markersListPopover:p}=useAppSelector(({popovers:{markersListPopover:_,sharePopover:R}})=>({markersListPopover:_,sharePopover:R}),shallowEqual);useAppSelector(({controller:{showMiniPlayer:_}})=>({showMiniPlayer:_}),shallowEqual);const m=React2.useRef(null),g=useAppDispatch(),y=(_,R)=>{var F;_.preventDefault(),_.stopPropagation(),g(setSharePopover(!0)),e(R);const E=(F=f.find(O=>O.time===R))==null?void 0:F.id;n(E)};useOnClickOutside(m,()=>{conditions(ConditionName.isComplexPortrait)||g(setMarkersListPopover(!1))});const v=(_,R,E,F,O)=>{progressBar()&&(progressBar().style.width=`${getMarkerPosition(_)}px`),handleVideoTimeline(videoTag().currentTime,_),videoTag().currentTime=_,conditions(ConditionName.isComplexPortrait)||g(setMarkersListPopover(!1)),sendFluentLog(eventMarkerClickLog(R,_,E,F,O))},b=()=>{conditions(ConditionName.isComplexPortrait)&&g(setClearPopoversSlice()),g(setMarkersListPopover(!p))},C=async _=>{if(conditions(ConditionName.trackerEnabled)){const{status:R}=await apiCaller({url:API().user.deletePersonalMarker(_.isPersonal),method:"DELETE",headers:handleHasXTokenParamOrSendXToken()});responseValidator(R)&&(ae({title:"نشانگر با موفقیت حذف شد.",type:"success"}),g(setMarkers(f.filter(E=>E.time!==_.time)))),d(void 0)}};return jsxRuntime.jsxs("div",{className:`pl-relative pl-flex pl-items-center pl-p-1 ${conditions(ConditionName.showMarkerListPopover)&&"pl-rounded-[4px] pl-bg-secondary-50/[0.4]"}`,ref:conditions(ConditionName.isComplexPortrait)?void 0:m,children:[jsxRuntime.jsx(MarkersListIcon,{className:`pl-cursor-pointer ${conditions(ConditionName.isComplexPortrait)&&u.theme==="light"?"pl-fill-gray-800":"pl-fill-dark-5"}`,onClick:b,onMouseOver:()=>!conditions(ConditionName.isTouchScreen)&&r(!0),onMouseLeave:()=>!conditions(ConditionName.isTouchScreen)&&r(!1)}),s&&jsxRuntime.jsx(ControllbarTooltip,{title:`${translate().markersList} (e)`,className:"!pl-bottom-[180%] !pl-right-[-48px]"}),jsxRuntime.jsx(Popover,{classNames:`!pl-p-0 pl-left-0 !pl-bg-white dark:!pl-bg-dark-13 !pl-rounded-[4px] pl-mb-[33px]
|
|
91
|
+
${conditions(ConditionName.isTouchScreen)?"pl-w-6 pl-h-6":"pl-w-8 pl-h-8"} pl-flex pl-justify-center pl-items-center animate__animated animate__faster ${conditions(ConditionName.isActiveElements)?"animate__fadeInDown":"animate__fadeOutUp"}`;return conditions(ConditionName.isChildClassification)&&(t=`${t} !pl-bg-lime-success`),conditions(ConditionName.isTeenagerClassification)&&(t=`${t} !pl-bg-warning-100`),conditions(ConditionName.isYoungClassification)&&(t=`${t} !pl-bg-red-error pl-text-red-onError`),t};return jsxRuntime.jsx("div",{className:`${e()}`,children:jsxRuntime.jsxs("span",{className:"pl-mt-0.5",children:[i.pg_state,"+"]})})},Snapshot=()=>{function i(){let e=document.getElementById("snapshot-canvas"),t=document.querySelector("#player-tag");if(e){e.width=t.videoWidth,e.height=t.videoHeight,e.getContext("2d").drawImage(t,0,0,t.videoWidth,t.videoHeight);const n=e.toDataURL("image/JPEG");conditions(ConditionName.hasOnSnapshotParams)&&store.getState().videoData.params.onSnapshot(n)}}return jsxRuntime.jsx("div",{className:"pl-cursor-pointer pl-rounded-[4px] pl-bg-secondary-600",style:{zIndex:zIndex.snapshot},onClick:()=>i(),onDoubleClick:e=>e.stopPropagation(),children:jsxRuntime.jsxs("div",{className:"pl-flex pl-items-center pl-justify-center pl-gap-1 pl-px-[6px] pl-py-1",children:[jsxRuntime.jsx("img",{src:IMAGES.scissor,width:12,height:12}),jsxRuntime.jsx("p",{className:"dark:pl-text-dark pl-text-[12px] pl-font-medium pl-text-white",children:translate().takingPicture})]})})},LockIcon=({onClick:i,className:e,style:t})=>(useAppSelector(({controller:{showMiniPlayer:n}})=>({showMiniPlayer:n}),shallowEqual),useAppSelector(({videoData:{videoElementSizeInfo:n,params:s}})=>({videoElementSizeInfo:n,params:s}),shallowEqual),jsxRuntime.jsx(jsxRuntime.Fragment,{children:jsxRuntime.jsx("img",{src:IMAGES.lock,alt:"lock-icon",className:`pl-cursor-pointer ${e}`,style:t,width:conditions(ConditionName.isFullMobilePortrait)||!conditions(ConditionName.isMiniPlayer)?controllbarIconSize.other:controllbarIconSize.miniPlayer,height:conditions(ConditionName.isFullMobilePortrait)||!conditions(ConditionName.isMiniPlayer)?controllbarIconSize.other:controllbarIconSize.miniPlayer,onClick:i})})),Lock=({className:i})=>jsxRuntime.jsx(LockIcon,{onClick:()=>handleLock("unlock"),style:{zIndex:zIndex.lockIcon},className:i}),UnlockIcon=i=>(useAppSelector(({controller:{showMiniPlayer:e}})=>({showMiniPlayer:e}),shallowEqual),useAppSelector(({videoData:{videoElementSizeInfo:e,params:t}})=>({videoElementSizeInfo:e,params:t}),shallowEqual),jsxRuntime.jsx(jsxRuntime.Fragment,{children:jsxRuntime.jsx("img",{src:IMAGES.unlock,alt:"unlock-icon",className:"pl-cursor-pointer",width:conditions(ConditionName.isFullMobilePortrait)||!conditions(ConditionName.isMiniPlayer)?controllbarIconSize.other:controllbarIconSize.miniPlayer,height:conditions(ConditionName.isFullMobilePortrait)||!conditions(ConditionName.isMiniPlayer)?controllbarIconSize.other:controllbarIconSize.miniPlayer,...i})})),ControllbarTooltip=({title:i,className:e})=>jsxRuntime.jsx("span",{className:`pl-absolute pl-w-max pl-bg-secondary-900/[0.8] pl-text-white pl-bottom-[230%] pl-right-[-18px] pl-rounded-[8px] pl-px-2 pl-py-[5px] pl-text-[14px] pl-font-bold ${e}`,children:i}),Unlock=({inControllbar:i=!1})=>{const[e,t]=React2.useState(!1);return jsxRuntime.jsxs("div",{className:"pl-relative pl-flex pl-items-center",children:[jsxRuntime.jsx(UnlockIcon,{onClick:()=>handleLock("lock"),onMouseOver:()=>!conditions(ConditionName.isTouchScreen)&&i&&t(!0),onMouseLeave:()=>!conditions(ConditionName.isTouchScreen)&&i&&t(!1),style:{zIndex:zIndex.lockIcon}}),e&&jsxRuntime.jsx(ControllbarTooltip,{title:`${translate().lock} (l)`,className:"pl-right-[-15px]"})]})},Header=()=>(useAppSelector(({controller:{lock:i,activeElements:e}})=>({lock:i,activeElements:e}),shallowEqual),jsxRuntime.jsxs("div",{style:{zIndex:zIndex.header},className:`pl-flex pl-items-start ${conditions(ConditionName.isLock)?"pl-justify-end":"pl-justify-between"} pl-mx-4 pl-mt-5`,children:[jsxRuntime.jsxs("div",{className:"pl-flex-1",children:[conditions(ConditionName.showLiveStatus)&&jsxRuntime.jsx(LiveStatus,{}),conditions(ConditionName.showTitle)&&jsxRuntime.jsx(Title$1,{})]}),conditions(ConditionName.showPoll)&&jsxRuntime.jsx(Poll$1,{}),conditions(ConditionName.showFullRate)&&jsxRuntime.jsx(FullRate,{}),jsxRuntime.jsxs("div",{className:"pl-flex pl-items-center pl-gap-4",children:[conditions(ConditionName.showAgeClassification)&&jsxRuntime.jsx(AgeClassification,{}),conditions(ConditionName.showSnapShot)&&jsxRuntime.jsx(Snapshot,{}),conditions(ConditionName.isTouchScreenPortrait)?jsxRuntime.jsx(jsxRuntime.Fragment,{children:conditions(ConditionName.isLock)?jsxRuntime.jsx(Lock,{className:`animate__animated animate__faster ${conditions(ConditionName.isActiveElements)?"animate__fadeInDown":"animate__fadeOutUp"}`}):jsxRuntime.jsx(Unlock,{})}):jsxRuntime.jsx(jsxRuntime.Fragment,{children:conditions(ConditionName.isLock)&&jsxRuntime.jsx(Lock,{className:`animate__animated animate__faster ${conditions(ConditionName.isActiveElements)?"animate__fadeInDown":"animate__fadeOutUp"}`})})]})]})),Tooltip$1=()=>{const{details:i}=useAppSelector(({videoData:{details:o}})=>({details:o}),shallowEqual),{tooltipTime:e}=useAppSelector(({controller:{tooltipTime:o,activeElements:l}})=>({tooltipTime:o,activeElements:l}),shallowEqual),t={},[n,s]=React2.useState(void 0),[r,a]=React2.useState(conditions(ConditionName.isTouchScreen)?i.vtt_mobile:i.vtt);return React2.useEffect(()=>{a(conditions(ConditionName.isVttFitHeight)?i.vtt_mobile:i.vtt)},[i.vtt,i.vtt_mobile,conditions(ConditionName.isVttFitHeight)]),React2.useEffect(()=>{r&&fetchFile(conditions(ConditionName.isVttFitHeight)?i.vtt_mobile:i.vtt,s)},[r]),conditions(ConditionName.isActiveElements)?jsxRuntime.jsxs("div",{className:`pl-flex pl-flex-col pl-progressTooltip pl-absolute pl-bottom-[200%] pl-px-[10px] pl-py-[5px] pl-mr-[-25px] pl-mb-[25px] pl-text-white pl-text-[14px] ${r&&n?"":"pl-bg-z-gray-700"} pl-rounded-[6px] pl-opacity-0`,children:[r&&!!n&&jsxRuntime.jsx("div",{className:"pl-flex-1 pl-border pl-border-white pl-rounded-[8px]",children:jsxRuntime.jsx("div",{className:"pl-rounded-[8px]",style:getStyleForTime(e,n,t)})}),jsxRuntime.jsx("div",{className:"pl-flex pl-items-center pl-justify-center pl-progressTimeTooltip pl-text-white !pl-opacity-100"})]}):jsxRuntime.jsx(jsxRuntime.Fragment,{})},Tooltip$2=React2.memo(Tooltip$1),Emoji=({name:i,className:e,dataMarker:t})=>jsxRuntime.jsx("img",{"data-marker":t,src:`${getEmojiUrl()}/${i}.png`,alt:i,className:e}),useOnClickOutside=(i,e)=>{React2.useEffect(()=>{const t=n=>{!i.current||i.current.contains(n.target)||e(n)};return document.addEventListener("mousedown",t),document.addEventListener("touchstart",t),()=>{document.removeEventListener("mousedown",t),document.removeEventListener("touchstart",t)}},[i,e])},CopyIcon=({className:i,onClick:e})=>jsxRuntime.jsxs("svg",{width:"19",height:"18",viewBox:"0 0 19 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:i,onClick:e,children:[jsxRuntime.jsx("path",{d:"M10.7783 8.20508C12.4658 9.89258 12.4658 12.6226 10.7783 14.3026C9.09078 15.9826 6.36078 15.9901 4.68078 14.3026C3.00078 12.6151 2.99328 9.88508 4.68078 8.20508",strokeLinecap:"round",strokeLinejoin:"round"}),jsxRuntime.jsx("path",{d:"M8.92562 10.0577C7.17063 8.30266 7.17063 5.45266 8.92562 3.69016C10.6806 1.92766 13.5306 1.93516 15.2931 3.69016C17.0556 5.44516 17.0481 8.29516 15.2931 10.0577",strokeLinecap:"round",strokeLinejoin:"round"})]}),CopyText=({link:i,markerId:e,videoTime:t,isJump:n})=>{const[s,r]=React2.useState(void 0),[a,o]=React2.useState("");useAppSelector(({controller:{showMiniPlayer:d}})=>({showMiniPlayer:d}),shallowEqual),useAppSelector(({videoData:{params:d,details:f,videoElementSizeInfo:u}})=>({params:d,details:f,videoElementSizeInfo:u}),shallowEqual);const l=d=>{d.preventDefault(),o("animate"),setTimeout(()=>o(""),2e3),conditions(ConditionName.hasClipboard)&&(sendFluentLog(shareCopyLog(Number(videoTag().currentTime.toFixed(0)),n,t,e)),navigator.clipboard.writeText(i),r(!0),setTimeout(()=>r(!1),2e3))};return jsxRuntime.jsxs("button",{className:`pl-confetti-button ${a} ${!s&&"active:pl-scale-75"} pl-flex pl-flex-1 pl-items-center pl-justify-center pl-gap-2 pl-py-[11px] pl-bg-secondary-200 dark:pl-bg-dark-1 pl-rounded-[8px] ${s?"pl-cursor-default":"pl-cursor-pointer"}`,onClick:s?()=>{}:l,children:[jsxRuntime.jsx(CopyIcon,{className:"stroke-z-secondary-600 dark:stroke-secondary-50"}),jsxRuntime.jsxs("div",{className:"pl-flex pl-items-center pl-justify-center pl-mr-10 pl-text-secondary-500 dark:pl-text-secondary-50",children:[jsxRuntime.jsx("span",{className:`pl-absolute animate__animated pl-text-secondary-500 dark:pl-text-secondary-50 ${s===!0&&"animate__fadeOutDown"} ${s===!1&&"animate__fadeInUp"}`,style:{left:conditions(ConditionName.isMiniPlayer)&&!conditions(ConditionName.isFullMobilePortrait)?60:"unset"},children:translate().copyLink}),jsxRuntime.jsx("span",{className:`pl-absolute animate__animated pl-opacity-0 pl-transition-opacity pl-duration-300 pl-text-secondary-500 dark:pl-text-secondary-50 ${s===!0&&"animate__fadeInUp pl-opacity-100"}`,style:{left:conditions(ConditionName.isMiniPlayer)&&!conditions(ConditionName.isFullMobilePortrait)?60:"unset"},children:translate().linkWasCopied})]})]})},CheckBox=({label:i,onChange:e,defaultValue:t=!1,labelClassName:n})=>{const[s,r]=React2.useState(t);React2.useEffect(()=>r(t),[t]);const a=o=>{r(o.target.checked),e(o.target.checked)};return jsxRuntime.jsxs("label",{className:"pl-container-checkbox",children:[jsxRuntime.jsx("span",{className:`pl-text-[14px] pl-font-medium pl-mr-8 pl-cursor-pointer ${n}`,children:i}),jsxRuntime.jsx("input",{type:"checkbox",className:"pl-cursor-pointer",checked:s,onChange:a}),jsxRuntime.jsx("span",{className:`pl-checkmark pl-cursor-pointer ${s&&"pl-bg-main-light pl-border-none"}`})]})},Popover=React2.forwardRef(({children:i,status:e,onClose:t,type:n,classNames:s,parentClassNames:r,styles:a,isBlurBackground:o,isFullHeight:l=!1,isFullScreen:d,isHeader:f,headerTitle:u="",customHeader:p,headerClassName:m,isHasCatchUpLineOnTop:g=!1,animation:y,scrollbar:v=!1,isFocusOnInput:b=!1,showCloseIcon:C=!0,pinContent:_},R)=>{const[E,F]=React2.useState(e),[O,A]=React2.useState(0),[N,M]=React2.useState(0),[Z,X]=React2.useState(0),{videoElementSizeInfo:oe}=useAppSelector(({videoData:{videoElementSizeInfo:pe,isComplexPortrait:he}})=>({videoElementSizeInfo:pe,isComplexPortrait:he}),shallowEqual),le=useNavigate();React2.useEffect(()=>{let pe;return e?(window.location.href.includes("#openPopover")||le(`${window.location.search}#openPopover`),F(!0)):pe=setTimeout(()=>{const Y=window.location.href.split("#")[0];window.history.replaceState({},document.title,Y),t(!1),M(0),F(!1)},500),()=>clearTimeout(pe)},[e]),React2.useEffect(()=>{conditions(ConditionName.isComplexPortrait)&&e&&A(window.innerHeight-oe.bottom)},[e]);const de=pe=>{pe.touches[0].clientY>=oe.top?M(window.innerHeight-pe.touches[0].clientY):M(window.innerHeight-oe.top),X(zIndex.maxPopover)},ue=()=>{N!==0&&(N>O?N-O>(window.innerHeight-oe.top-O)/2?(M(window.innerHeight-oe.top),X(zIndex.maxPopover)):(M(0),setTimeout(()=>X(0),500)):(N>O/2?M(O):(M(0),A(0),t()),X(0)))},ce=jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[o&&jsxRuntime.jsx("div",{className:`animate__animated animate__faster pl-fixed pl-right-0 pl-top-0 pl-h-screen pl-w-screen ${e?"animate__fadeIn":"animate__fadeOut"}`,style:{zIndex:zIndex.popoverBlurBackground,backdropFilter:"blur(4px)"}}),jsxRuntime.jsx("div",{className:`${n==="modal"&&"pl-fixed pl-left-0 pl-top-0 pl-flex pl-h-full pl-w-full pl-items-end pl-justify-center sm:pl-items-center"} ${r}`,style:{zIndex:l&&!b?Z:zIndex.popoverContent},children:jsxRuntime.jsx("div",{className:`animate__animated animate__faster pl-flex pl-flex-col pl-rounded-[8px] pl-bg-white/[0.9] dark:pl-bg-black/[0.7] ${l&&"pl-h-full"} ${y||(window.innerWidth>768&&n==="modal"?e?"animate__fadeIn":"animate__fadeOut":e?"animate__fadeInUp":"animate__fadeOutDown")} ${conditions(ConditionName.isComplexPortrait)?"!pl-fixed !pl-bottom-0 !pl-left-0 !pl-right-0 !pl-mb-0 !pl-w-full pl-rounded-[12px] !pl-rounded-b-none !pl-bg-white dark:!pl-bg-dark-3":"before:pl-hidden"} ${conditions(ConditionName.isFullMobilePortrait)&&`!pl-fixed !pl-mx-auto !pl-mb-[0px] ${n==="modal"?"!pl-w-screen":`!pl-w-full !pl-max-w-[95vw] ${conditions(ConditionName.hasMarkers)?"!pl-bottom-[85px]":"!pl-bottom-[60px]"}`}`} ${n!=="modal"&&"no-scrollbar pl-absolute pl-bottom-full pl-overflow-auto"} ${s} `,style:{maxHeight:d?"unset":N||O||(conditions(ConditionName.isComplexPortrait)?0:""),zIndex:zIndex.popoverContent,...a},ref:R,children:jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[f&&jsxRuntime.jsxs("div",{onTouchMove:g?de:()=>{},onTouchEndCapture:g?ue:()=>{},children:[g&&jsxRuntime.jsx("div",{className:"pl-absolute pl-right-[50%] pl-top-[5px] pl-mr-[-25px] pl-h-[3px] pl-w-[60px] pl-rounded-[20px] pl-bg-secondary pl-text-center"}),f&&jsxRuntime.jsx("div",{className:`pl-mx-4 pl-mb-4 pl-border-b pl-border-secondary-300 dark:pl-border-secondary-400 ${m}`,children:p||jsxRuntime.jsxs("div",{className:"pl-flex pl-items-center pl-justify-between pl-py-[19px]",children:[jsxRuntime.jsx("p",{className:"pl-text-[18px] pl-font-bold pl-text-black dark:pl-text-white",children:u}),C&&jsxRuntime.jsx(CloseIcon,{className:"pl-cursor-pointer pl-stroke-secondary-400 dark:pl-stroke-dark-5",onClick:t})]})})]}),jsxRuntime.jsx(jsxRuntime.Fragment,{children:_}),jsxRuntime.jsx("div",{id:"popover-content",className:`pl-h-full pl-w-full pl-overflow-y-auto ${!v&&"no-scrollbar"}`,onTouchMove:pe=>pe.stopPropagation(),children:i})]})})})]});return jsxRuntime.jsx(jsxRuntime.Fragment,{children:E&&jsxRuntime.jsx(jsxRuntime.Fragment,{children:n==="modal"?ReactDOM.createPortal(jsxRuntime.jsx(jsxRuntime.Fragment,{children:ce}),document.getElementById("dialog-react-root-videoPlayer")):jsxRuntime.jsx("div",{children:ce})})})});Popover.displayName="popover";const ShareDialog=({currentTime:i,markerId:e})=>{const[t,n]=React2.useState(!!e),s=useAppDispatch(),{sharePopover:r}=useAppSelector(({popovers:{sharePopover:p}})=>({sharePopover:p}),shallowEqual);useAppSelector(({controller:{showMiniPlayer:p}})=>({showMiniPlayer:p}),shallowEqual),useAppSelector(({videoData:{params:p,videoElementSizeInfo:m}})=>({params:p,videoElementSizeInfo:m}),shallowEqual);let a=window.location.href;a.includes("?")?(a=a.split("&t=",1)[0],t&&(a=`${a}&t=${(i||0).toFixed(0)}`)):t&&(a=`${a}?t=${(i||0).toFixed(0)}`),React2.useEffect(()=>{n(!!e)},[e,status]);const o=()=>{s(setSharePopover(!1)),setTimeout(()=>n(!1),500)},l=async()=>{sendFluentLog(shareDialogLog(videoTag().currentTime?Number(videoTag().currentTime.toFixed(0)):0,t,Number((i||0).toFixed(0)),e)),navigator.share({url:a}),o()},d=React2.useRef(null);useOnClickOutside(d,()=>s(setSharePopover(!1)));const f=jsxRuntime.jsxs("div",{className:"pl-flex pl-items-center pl-gap-2 pl-pb-3",children:[jsxRuntime.jsx("div",{className:"pl-cursor-pointer pl-rounded-[4px] pl-bg-gray-100 pl-p-1",onClick:o,children:jsxRuntime.jsx(CloseIcon,{className:"pl-h-3 pl-w-3 pl-stroke-gray-800"})}),jsxRuntime.jsx("p",{className:"pl-text-[14px] pl-font-bold pl-text-black dark:pl-text-gray-100",children:translate().sharing})]}),u=jsxRuntime.jsxs("div",{className:"pl-flex pl-flex-col pl-gap-4 pl-px-4",ref:d,children:[jsxRuntime.jsxs("div",{className:"pl-flex pl-gap-3",children:[jsxRuntime.jsx(CopyText,{isJump:t,videoTime:Number((i||0).toFixed(0)),markerId:e,link:a}),jsxRuntime.jsxs("button",{className:"pl-flex pl-items-center pl-gap-[2.28px] pl-rounded-[8px] pl-bg-secondary-200 pl-p-[13.33px] dark:pl-bg-dark-1",onClick:l,children:[jsxRuntime.jsx("span",{className:"pl-h-[2.5px] pl-w-[2.5px] pl-rounded-full pl-bg-secondary-500 dark:pl-bg-secondary-50"}),jsxRuntime.jsx("span",{className:"pl-h-[2.5px] pl-w-[2.5px] pl-rounded-full pl-bg-secondary-500 dark:pl-bg-secondary-50"}),jsxRuntime.jsx("span",{className:"pl-h-[2.5px] pl-w-[2.5px] pl-rounded-full pl-bg-secondary-500 dark:pl-bg-secondary-50"})]})]}),jsxRuntime.jsx(CheckBox,{label:`${translate().jumpTo} ${secondsToHMS(Number((i||0).toFixed(0)))}`,onChange:p=>n(!!p),labelClassName:"pl-text-[14px] pl-font-medium",defaultValue:!!e})]});return jsxRuntime.jsx(jsxRuntime.Fragment,{children:jsxRuntime.jsx(Popover,{status:r,onClose:o,isBlurBackground:!0,classNames:`pl-py-4 ${conditions(ConditionName.isMiniPlayer)&&!conditions(ConditionName.isFullMobilePortrait)&&"!pl-fixed pl-rounded-r-none opacity-100"} ${conditions(ConditionName.isFullMobilePortrait)&&"pl-border-t pl-border-t-gray-300"}`,styles:{width:conditions(ConditionName.isMiniPlayer)&&!conditions(ConditionName.isFullMobilePortrait)?280:320,...handlePopoverSizeInMiniPlayer()},animation:conditions(ConditionName.isMiniPlayer)&&!conditions(ConditionName.isFullMobilePortrait)?status?"animate__fadeInLeft":"animate__fadeOutLeft":void 0,ref:d,type:conditions(ConditionName.isMiniPlayer)&&!conditions(ConditionName.isFullMobilePortrait)?"popover":"modal",isHeader:!0,customHeader:f,children:u})})},ShareDialog$1=React2.memo(ShareDialog),Markers=()=>{const i=useAppDispatch(),{hlsLiveSyncPosition:e,duration:t,activeElements:n}=useAppSelector(({controller:{hlsLiveSyncPosition:R,duration:E,activeElements:F,isFullScreen:O}})=>({hlsLiveSyncPosition:R,duration:E,activeElements:F,isFullScreen:O}),shallowEqual),{markers:s}=useAppSelector(({videoData:{markers:R,isComplexPortrait:E,videoElementSizeInfo:F}})=>({markers:R,isComplexPortrait:E,videoElementSizeInfo:F}),shallowEqual),{sharePopover:r}=useAppSelector(({popovers:{sharePopover:R}})=>({sharePopover:R}),shallowEqual),[a,o]=React2.useState(void 0),[l,d]=React2.useState([]),[f,u]=React2.useState({}),[p,m]=React2.useState(!1),g=conditions(ConditionName.isLiveParam)?e:t,y=R=>g?progressBarWidth()*R/g:0,v=(R,E,F,O,A,N,M,Z)=>{R.stopPropagation();const oe=24*E/(progressBarWidth()+5);let le=[],de=0;Z.map(ue=>{ue.time>E-oe&&ue.time<E+oe&&(le.push(ue),de+=ue.time)}),le.length>1?d(le):(le=[],d([]),b(R,E,F,O,A,N,M))},b=(R,E,F,O,A,N,M)=>{R.stopPropagation(),handleTimeTooltip(R,M),handleVideoTimeline(videoTag().currentTime,E),videoTag().currentTime=E,progressBar()&&(progressBar().style.width=y(E)),sendFluentLog(eventMarkerClickLog(F,E,O,A,N))};React2.useEffect(()=>{r||o(void 0)},[r]),React2.useEffect(()=>{a&&i(setSharePopover(!0))},[a]),React2.useEffect(()=>{conditions(ConditionName.isActiveElements)||d([])},[n]);const C=React2.useRef(null);useOnClickOutside(C,()=>d([])),React2.useEffect(()=>{if(l.length>0){const R=inViewPort(document.getElementsByClassName("pl-overlapMarkers")[0]);if(R==="inViewport")return m(!0),u({left:y(l[0].time)});if(R==="OutViewPortFromLeft")return m(!1),u({left:0});if(R==="OutViewPortFromRight")return m(!1),u({right:0})}},[l,document.getElementsByClassName("pl-overlapMarkers")[0]]);const _=R=>{R.preventDefault(),conditions(ConditionName.isTouchScreen)&&o(Number(R.target.getAttribute("data-marker")))};return jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[s.map(R=>jsxRuntime.jsx("div",{onContextMenu:_,"data-marker":R.time,onClick:E=>v(E,R.time,R.id,R.title,R.description,R.sticker,!0,s),onDoubleClick:E=>E.stopPropagation(),children:jsxRuntime.jsxs("div",{className:`pl-emoji-image pl-absolute pl-bottom-[200%] pl-rounded-[6px] pl-bg-z-gray-700/[0.4] pl-p-1 ${conditions(ConditionName.isTouchScreenPortrait),"pl-mb-5"} pl-ml-[-12px] pl-cursor-pointer`,style:{left:y(R.time),zIndex:zIndex.markers},"data-marker":R.time,children:[R.isPersonal!==null&&R.isPersonal!==void 0&&jsxRuntime.jsx("div",{className:"pl-absolute pl-right-[-1px] pl-top-[-2px] pl-h-2 pl-w-2 pl-rounded-full pl-bg-main"}),jsxRuntime.jsx(Emoji,{dataMarker:R.time,name:R.sticker,className:"pl-h-[16px] pl-w-[16px] !pl-max-w-max"})]})},R.id)),l.length>0&&jsxRuntime.jsx("div",{className:`pl-overlapMarkers ${p?"pl-overlayMarkersInViewport":"pl-overlayMarkersOutViewport"} animate__animated animate__fadeInUp pl-absolute pl-bottom-[45px] pl-ml-[-10px] pl-flex pl-flex-row-reverse pl-justify-end pl-gap-3 pl-rounded-[6px] pl-bg-z-gray-700/[0.4] pl-px-1 pl-py-2 pl-opacity-100`,ref:C,style:f,children:l.map(R=>jsxRuntime.jsx("div",{className:"pl-emoji-image pl-cursor-pointer pl-rounded-[6px]","data-marker":R.time,onClick:E=>b(E,R.time,R.id,R.title,R.description,R.sticker,!0),onDoubleClick:E=>E.stopPropagation(),children:jsxRuntime.jsx(Emoji,{dataMarker:R.time,name:R.sticker,className:"pl-h-[24px] pl-w-[24px] !pl-max-w-max"})},R.id))}),!!r&&a&&jsxRuntime.jsx(ShareDialog$1,{currentTime:a||void 0,markerId:s.filter(R=>R.time===a)[0].id})]})},Markers$1=React2.memo(Markers),ViewersChart$1=React2.lazy(()=>Promise.resolve().then(()=>viewersChart$1)),ProgressBar=()=>{const[i,e]=React2.useState(!1);React2.useEffect(()=>{hideProgressTooltip(document.querySelector(".progressTooltip"))},[]);const{duration:t,currentTime:n,bufferedTimeWidth:s,hlsLiveSyncPosition:r}=useAppSelector(({controller:{duration:u,currentTime:p,bufferedTimeWidth:m,hlsLiveSyncPosition:g,showMiniPlayer:y}})=>({duration:u,currentTime:p,bufferedTimeWidth:m,hlsLiveSyncPosition:g,showMiniPlayer:y}),shallowEqual),{markers:a}=useAppSelector(({videoData:{params:u,videoElementSizeInfo:p,markers:m,isComplexPortrait:g}})=>({params:u,videoElementSizeInfo:p,markers:m,isComplexPortrait:g}),shallowEqual),[o,l]=React2.useState([]),d=conditions(ConditionName.isLiveParam)?r:t,f=u=>d?progressBarWidth()*u/d:0;return jsxRuntime.jsxs("div",{className:`pl-relative pl-mb-2 ${conditions(ConditionName.isComplexPortrait)&&"pl-mx-2"}`,children:[jsxRuntime.jsxs("div",{className:"pl-relative",children:[jsxRuntime.jsx(Tooltip$2,{}),jsxRuntime.jsx(Markers$1,{})]}),jsxRuntime.jsx("div",{className:"pl-absolute pl-bottom-0.5 pl-flex pl-w-full pl-items-end pl-pb-2",onPointerDown:u=>handlePointerDown(u,o,e),onPointerMove:handlePointerMove,onPointerUp:u=>handlePointerUp(u,l,o,e),onMouseMove:handleMouseMove,onMouseOut:handleMouseOut,onClick:handleCatchUpLoadingLog,onDoubleClick:u=>u.stopPropagation(),children:jsxRuntime.jsxs("div",{id:"progress-area",className:"pl-absolute pl-w-full",children:[conditions(ConditionName.hasChart)&&!conditions(ConditionName.isMiniPlayer)&&jsxRuntime.jsx(React2.Suspense,{fallback:"",children:jsxRuntime.jsx(ViewersChart$1,{})}),jsxRuntime.jsxs("div",{id:"time-progress-area",className:"pl-m-auto !pl-h-[5px] !pl-w-full pl-cursor-pointer pl-rounded !pl-bg-z-secondary-100/[0.4] pl-transition-transform pl-duration-300",style:{transform:i?"scaleY(1.8)":"unset"},children:[a.map(u=>jsxRuntime.jsx("div",{"data-marker":u.time,children:jsxRuntime.jsx("div",{className:"pl-emoji-dot pl-absolute pl-flex pl-h-[5px] pl-w-[3px] pl-cursor-pointer pl-flex-col pl-bg-white","data-marker":u.time,style:{left:f(u.time),zIndex:zIndex.emoji}})},u.id)),jsxRuntime.jsx("div",{id:"time-progress-buffer",className:"pl-absolute pl-h-[5px] pl-rounded pl-bg-z-gray-400/[0.7]",style:{width:`${s}%`}}),jsxRuntime.jsx("div",{id:"time-progress-bar",className:`pl-bg-playerColor before:pl-bg-playerColor pl-relative pl-h-[5px] pl-cursor-pointer pl-rounded before:pl-inline-block before:pl-h-4 before:pl-w-4 ${i&&"before:pl-h-3 before:pl-w-7"}`,style:{width:conditions(ConditionName.isLive)?"100%":`${n/t*progressBarWidth()}px`}})]})]})})]})},MarkersListIcon=i=>{useAppSelector(({controller:{showMiniPlayer:t}})=>({showMiniPlayer:t}),shallowEqual),useAppSelector(({videoData:{videoElementSizeInfo:t,params:n}})=>({videoElementSizeInfo:t,params:n}),shallowEqual);let e=jsxRuntime.jsx(jsxRuntime.Fragment,{});return e=jsxRuntime.jsxs("svg",{width:conditions(ConditionName.isFullMobilePortrait)||!conditions(ConditionName.isMiniPlayer)?controllbarIconSize.other:controllbarIconSize.miniPlayer,height:conditions(ConditionName.isFullMobilePortrait)||!conditions(ConditionName.isMiniPlayer)?controllbarIconSize.other:controllbarIconSize.miniPlayer,viewBox:"0 0 22 22",fill:"none",xmlns:"http://www.w3.org/2000/svg",...i,children:[jsxRuntime.jsx("rect",{x:"3",y:"3",width:"4",height:"4",rx:"1.5"}),jsxRuntime.jsx("rect",{x:"3",y:"9",width:"4",height:"4",rx:"1.5"}),jsxRuntime.jsx("rect",{x:"3",y:"15",width:"4",height:"4",rx:"1.5"}),jsxRuntime.jsx("rect",{x:"8",y:"16",width:"11",height:"2",rx:"1"}),jsxRuntime.jsx("rect",{x:"8",y:"10",width:"11",height:"2",rx:"1"}),jsxRuntime.jsx("rect",{x:"8",y:"4",width:"11",height:"2",rx:"1"})]}),conditions(ConditionName.isComplexPortrait)&&(e=jsxRuntime.jsxs("div",{className:"pl-flex pl-items-center pl-gap-[14px] pl-rounded-[20px] pl-text-secondary-700 dark:pl-text-secondary-50 pl-bg-gray-100 dark:pl-bg-dark-3 pl-px-4 pl-py-[7px] pl-cursor-pointer",onClick:i.onClick,children:[e,jsxRuntime.jsx("span",{children:translate().markers})]})),jsxRuntime.jsx(jsxRuntime.Fragment,{children:e})},ConfirmationModal=({modalType:i,onClose:e,cancelButtonText:t,submitButtonText:n,onSubmit:s,text:r,status:a,children:o})=>{const l=React2.useRef(null);return useOnClickOutside(l,e),jsxRuntime.jsx(jsxRuntime.Fragment,{children:jsxRuntime.jsx(Popover,{classNames:conditions(ConditionName.isTouchScreenLandscape)?"pl-w-[360px] pl-max-h-[90vh] pl-relative":"pl-w-[360px] pl-relative",type:"modal",onClose:()=>{},ref:l,status:a,isBlurBackground:!0,children:i==="DELETE"?jsxRuntime.jsxs("div",{className:"pl-border-r-none pl-border-l-none pl-flex pl-h-full pl-w-full pl-flex-col pl-justify-between pl-rounded-[8px] pl-border-t-[8px] pl-border-t-red-200 pl-p-4",children:[jsxRuntime.jsx("div",{className:`pl-absolute pl-left-0 pl-top-[-20px] pl-h-[40px] pl-w-[40px] pl-rounded-full pl-bg-red-200 ${isTouchScreen()&&!conditions(ConditionName.isTouchScreenLandscape)?"pl-right-[calc(50vw-20px)]":"pl-left-[160px]"} pl-flex pl-items-center pl-justify-center`,children:jsxRuntime.jsx("img",{className:"pl-h-full pl-w-full",src:IMAGES.trashDeleteModal,width:25,height:25,alt:"trash"})}),jsxRuntime.jsx("div",{className:"pl-w-full pl-pt-4",children:r}),o,jsxRuntime.jsxs("div",{className:"pl-flex pl-w-full pl-items-end pl-justify-between pl-pt-6",children:[jsxRuntime.jsx("button",{className:"pl-h-[40px] pl-w-1/2 pl-rounded-[8px] pl-bg-red-600 pl-text-white",onClick:s,children:n}),jsxRuntime.jsx("button",{className:"pl-h-[40px] pl-w-1/2 pl-rounded-[8px] pl-text-gray-500 dark:pl-text-z-secondary-50",onClick:e,children:t})]})]}):jsxRuntime.jsx(jsxRuntime.Fragment,{})})})},ShareIcon=({className:i,onClick:e,onDoubleClick:t})=>jsxRuntime.jsx("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:i,onClick:e,onDoubleClick:t,children:jsxRuntime.jsx("path",{d:"M9.78947 0C8.57424 0 7.57895 0.995297 7.57895 2.21053C7.57895 2.3955 7.64164 2.56088 7.68503 2.73294L3.89864 4.62706C3.49235 4.12861 2.89942 3.78947 2.21053 3.78947C0.995296 3.78947 0 4.78477 0 6C0 7.21523 0.995296 8.21053 2.21053 8.21053C2.89942 8.21053 3.49235 7.87139 3.89864 7.37294L7.68503 9.26706C7.64164 9.43912 7.57895 9.6045 7.57895 9.78947C7.57895 11.0047 8.57424 12 9.78947 12C11.0047 12 12 11.0047 12 9.78947C12 8.57424 11.0047 7.57895 9.78947 7.57895C9.10058 7.57895 8.50765 7.91809 8.10136 8.41653L4.31497 6.52241C4.35836 6.35036 4.42105 6.18498 4.42105 6C4.42105 5.81502 4.35836 5.64964 4.31497 5.47759L8.10136 3.58347C8.50765 4.08191 9.10058 4.42105 9.78947 4.42105C11.0047 4.42105 12 3.42576 12 2.21053C12 0.995297 11.0047 0 9.78947 0ZM9.78947 0.947368C10.4927 0.947368 11.0526 1.50729 11.0526 2.21053C11.0526 2.91376 10.4927 3.47368 9.78947 3.47368C9.08624 3.47368 8.52632 2.91376 8.52632 2.21053C8.52632 1.50729 9.08624 0.947368 9.78947 0.947368ZM2.21053 4.73684C2.91376 4.73684 3.47368 5.29677 3.47368 6C3.47368 6.70323 2.91376 7.26316 2.21053 7.26316C1.50729 7.26316 0.947368 6.70323 0.947368 6C0.947368 5.29677 1.50729 4.73684 2.21053 4.73684ZM9.78947 8.52632C10.4927 8.52632 11.0526 9.08624 11.0526 9.78947C11.0526 10.4927 10.4927 11.0526 9.78947 11.0526C9.08624 11.0526 8.52632 10.4927 8.52632 9.78947C8.52632 9.08624 9.08624 8.52632 9.78947 8.52632Z"})}),ArrowUpIcon=({className:i,onClick:e})=>jsxRuntime.jsx("svg",{width:"16",height:"17",viewBox:"0 0 16 17",xmlns:"http://www.w3.org/2000/svg",className:i,onClick:e,children:jsxRuntime.jsx("path",{d:"M7.99706 4.80544C8.46372 4.80544 8.93039 4.98544 9.28372 5.33878L13.6304 9.68544C13.8237 9.87878 13.8237 10.1988 13.6304 10.3921C13.4371 10.5854 13.1171 10.5854 12.9237 10.3921L8.57706 6.04544C8.25706 5.72544 7.73706 5.72544 7.41706 6.04544L3.07039 10.3921C2.87706 10.5854 2.55706 10.5854 2.36372 10.3921C2.17039 10.1988 2.17039 9.87878 2.36372 9.68544L6.71039 5.33878C7.06372 4.98544 7.53039 4.80544 7.99706 4.80544Z"})}),ArrowDownIcon=({className:i,onClick:e})=>jsxRuntime.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",xmlns:"http://www.w3.org/2000/svg",className:i,onClick:e,children:jsxRuntime.jsx("path",{d:"M8.00294 11.2004C7.53628 11.2004 7.06961 11.0204 6.71628 10.6671L2.36961 6.32042C2.17628 6.12708 2.17628 5.80708 2.36961 5.61375C2.56294 5.42042 2.88294 5.42042 3.07628 5.61375L7.42294 9.96042C7.74294 10.2804 8.26294 10.2804 8.58294 9.96042L12.9296 5.61375C13.1229 5.42042 13.4429 5.42042 13.6363 5.61375C13.8296 5.80708 13.8296 6.12708 13.6363 6.32042L9.28961 10.6671C8.93628 11.0204 8.46961 11.2004 8.00294 11.2004Z"})}),MarkersList=()=>{const[i,e]=React2.useState(0),[t,n]=React2.useState(void 0),[s,r]=React2.useState(!1),[a,o]=React2.useState(void 0),[l,d]=React2.useState(void 0),{markers:f,params:u}=useAppSelector(({videoData:{markers:_,params:R,isComplexPortrait:E,videoElementSizeInfo:F}})=>({markers:_,params:R,isComplexPortrait:E,videoElementSizeInfo:F}),shallowEqual),{markersListPopover:p}=useAppSelector(({popovers:{markersListPopover:_,sharePopover:R}})=>({markersListPopover:_,sharePopover:R}),shallowEqual);useAppSelector(({controller:{showMiniPlayer:_}})=>({showMiniPlayer:_}),shallowEqual);const m=React2.useRef(null),g=useAppDispatch(),y=(_,R)=>{var F;_.preventDefault(),_.stopPropagation(),g(setSharePopover(!0)),e(R);const E=(F=f.find(O=>O.time===R))==null?void 0:F.id;n(E)};useOnClickOutside(m,()=>{conditions(ConditionName.isComplexPortrait)||g(setMarkersListPopover(!1))});const v=(_,R,E,F,O)=>{progressBar()&&(progressBar().style.width=`${getMarkerPosition(_)}px`),handleVideoTimeline(videoTag().currentTime,_),videoTag().currentTime=_,conditions(ConditionName.isComplexPortrait)||g(setMarkersListPopover(!1)),sendFluentLog(eventMarkerClickLog(R,_,E,F,O))},b=()=>{conditions(ConditionName.isComplexPortrait)&&g(setClearPopoversSlice()),g(setMarkersListPopover(!p))},C=async _=>{if(conditions(ConditionName.trackerEnabled)){const{status:R}=await apiCaller({url:API().user.deletePersonalMarker(_.isPersonal),method:"DELETE",headers:handleHasXTokenParamOrSendXToken()});responseValidator(R)&&(ae({title:"نشانگر با موفقیت حذف شد.",type:"success"}),g(setMarkers(f.filter(E=>E.time!==_.time)))),d(void 0)}};return jsxRuntime.jsxs("div",{className:`pl-relative pl-flex pl-items-center pl-p-1 ${conditions(ConditionName.showMarkerListPopover)&&"pl-rounded-[4px] pl-bg-secondary-50/[0.4]"}`,ref:conditions(ConditionName.isComplexPortrait)?void 0:m,children:[jsxRuntime.jsx(MarkersListIcon,{className:`pl-cursor-pointer ${conditions(ConditionName.isComplexPortrait)&&u.theme==="light"?"pl-fill-gray-800":"pl-fill-dark-5"}`,onClick:b,onMouseOver:()=>!conditions(ConditionName.isTouchScreen)&&r(!0),onMouseLeave:()=>!conditions(ConditionName.isTouchScreen)&&r(!1)}),s&&jsxRuntime.jsx(ControllbarTooltip,{title:`${translate().markersList} (e)`,className:"!pl-bottom-[180%] !pl-right-[-48px]"}),jsxRuntime.jsx(Popover,{classNames:`!pl-p-0 pl-left-0 !pl-bg-white dark:!pl-bg-dark-13 !pl-rounded-[4px] pl-mb-[33px]
|
|
92
92
|
${conditions(ConditionName.isFullMobilePortrait)&&"!pl-w-screen"} ${conditions(ConditionName.isMiniPlayer)&&!conditions(ConditionName.isFullMobilePortrait)?"!pl-fixed pl-rounded-r-none pl-w-[250px] !pl-mb-0":"pl-w-[285px]"}`,animation:conditions(ConditionName.isMiniPlayer)&&!conditions(ConditionName.isFullMobilePortrait)?p?"animate__fadeInLeft":"animate__fadeOutLeft":void 0,styles:handlePopoverSizeInMiniPlayer(),status:conditions(ConditionName.showMarkerListPopover),onClose:()=>{g(setMarkersListPopover(!1)),o(void 0)},ref:conditions(ConditionName.isComplexPortrait)?m:void 0,isFullHeight:conditions(ConditionName.isComplexPortrait),headerTitle:translate().markers,isHeader:!0,type:conditions(ConditionName.isComplexPortrait)?"modal":"popover",isHasCatchUpLineOnTop:conditions(ConditionName.isComplexPortrait),children:jsxRuntime.jsx("div",{className:"pl-mx-2 pl-mt-2 pl-flex pl-flex-col pl-gap-6",children:jsxRuntime.jsx("div",{className:"pl-flex pl-flex-col pl-gap-2 pl-pb-2",children:f.map(_=>jsxRuntime.jsxs("div",{onClick:()=>v(_.time,_.id,_.title,_.description,_.sticker),className:"hover:dark:bg-white/[0.25] pl-rounded-[8px] odd:pl-bg-main/[0.1] hover:pl-bg-main/[0.1] odd:dark:pl-bg-dark-1",children:[jsxRuntime.jsxs("div",{className:"pl-item-center pl-relative pl-mx-2 pl-flex pl-cursor-pointer pl-gap-2 pl-rounded-[4px] pl-p-2",children:[_.banner||!_.sticker?jsxRuntime.jsx("img",{src:_.banner?_.banner:IMAGES.defaultMarkersListItemIcon,width:40,height:40,alt:_.title}):jsxRuntime.jsx("div",{className:"pl-flex pl-h-[40px] pl-w-[40px] pl-items-center pl-rounded-[6px] pl-bg-secondary dark:pl-bg-secondary-50",children:jsxRuntime.jsx(Emoji,{name:_.sticker,className:"pl-mx-auto pl-h-[20px] pl-w-[20px]"})}),jsxRuntime.jsxs("div",{className:"pl-text-gray-800 dark:pl-text-white",children:[jsxRuntime.jsxs("p",{className:"pl-mb-1 pl-flex pl-w-[130px] pl-items-center pl-overflow-hidden pl-text-ellipsis pl-whitespace-nowrap pl-text-[14px] pl-font-bold",children:[jsxRuntime.jsx("div",{children:_.title}),_.isPersonal!==null&&_.isPersonal!==void 0&&jsxRuntime.jsx("div",{className:"pl-flex pl-items-center",children:jsxRuntime.jsx("img",{className:"pl-h-full pl-w-full",src:IMAGES.personalMarkerSign,width:16,height:16,alt:_.title})})]}),jsxRuntime.jsx("p",{className:"pl-w-[200px] pl-overflow-hidden pl-text-ellipsis pl-whitespace-nowrap pl-text-[13px] pl-font-normal",children:_.description})]}),_.isPersonal!==null&&_.isPersonal!==void 0&&jsxRuntime.jsx("div",{className:"pl-absolute pl-bottom-2.5 pl-left-0.5",onClick:R=>{R.preventDefault(),R.stopPropagation(),a===_.time?o(void 0):o(_.time)},children:a!==void 0&&a===_.time?jsxRuntime.jsx(ArrowUpIcon,{className:"pl-fill-secondary-500 dark:pl-fill-z-secondary-50"}):jsxRuntime.jsx(ArrowDownIcon,{className:"pl-fill-secondary-500 dark:pl-fill-z-secondary-50"})}),jsxRuntime.jsx("span",{className:"pl-absolute pl-left-9 pl-top-2 pl-rounded-[4px] pl-bg-secondary/[0.3] pl-p-[3px] pl-text-[12px] pl-font-bold pl-text-gray-800 dark:pl-bg-secondary/[0.6] dark:pl-text-white",children:secondsToHMS(_.time)}),jsxRuntime.jsx(ShareIcon,{className:"pl-w-15 pl-h-15 pl-absolute pl-left-1 pl-top-3 pl-flex pl-items-center pl-fill-gray-800 dark:pl-fill-white",onClick:R=>y(R,_.time)})]}),a!==void 0&&a===_.time&&jsxRuntime.jsxs("div",{className:"pl-item-center pl-relative pl-mx-2 pl-flex pl-w-full pl-cursor-pointer pl-flex-col pl-rounded-[4px] pl-p-2",children:[jsxRuntime.jsx("hr",{className:"pl-ml-2 pl-bg-secondary-300"}),jsxRuntime.jsxs("div",{className:"pl-flex pl-w-full pl-items-center pl-pt-2",children:[jsxRuntime.jsxs("div",{className:"pl-flex pl-items-center pl-gap-4",onClick:R=>{R.stopPropagation(),R.preventDefault(),g(setSelectedPersonalMarker(_)),g(setPersonalMarkersPopover(!0)),g(setMarkersListPopover(!1))},children:[jsxRuntime.jsx("div",{className:"pl-flex pl-items-center pl-rounded-[8px] pl-bg-main-light pl-p-3",children:jsxRuntime.jsx("img",{className:"pl-h-full pl-w-full",src:IMAGES.editMarker,width:16,height:16,alt:_.title})}),jsxRuntime.jsx("span",{className:"pl-font-500 pl-text-[13px] pl-text-gray-800 dark:pl-text-secondary-300",children:"ویرایش"})]}),jsxRuntime.jsxs("div",{className:"pl-flex pl-flex-1 pl-items-center pl-justify-center pl-gap-4",onClick:R=>{R.stopPropagation(),R.preventDefault(),d(_),g(setMarkersListPopover(!1))},children:[jsxRuntime.jsx("div",{className:"pl-flex pl-items-center pl-rounded-[8px] pl-bg-main-light pl-p-3",children:jsxRuntime.jsx("img",{className:"pl-h-full pl-w-full",src:IMAGES.trashMarker,width:16,height:16,alt:_.title})}),jsxRuntime.jsx("span",{className:"pl-font-500 pl-text-[13px] pl-text-gray-800 dark:pl-text-secondary-300",children:"حذف"})]})]})]})]},_.id))})})}),jsxRuntime.jsx(ShareDialog$1,{currentTime:i,markerId:t}),jsxRuntime.jsx(ConfirmationModal,{onClose:()=>d(void 0),modalType:"DELETE",status:!!l,text:"آیا از حذف نشانگر مطمئن هستید؟",cancelButtonText:"انصراف",submitButtonText:"حذف",onSubmit:()=>C(l),children:jsxRuntime.jsxs("div",{className:"pl-my-4 pl-flex pl-flex-col pl-items-center pl-justify-between pl-gap-1 pl-text-[16px] pl-font-medium pl-text-secondary-800 dark:pl-text-white",children:[jsxRuntime.jsx("div",{className:"pl-relative pl-flex pl-h-[110px] pl-w-[126px] pl-shrink-0 pl-flex-col pl-items-center pl-justify-center pl-self-center pl-rounded-[12px] pl-border-[1.5px] pl-bg-main/[0.1]",children:jsxRuntime.jsx("span",{className:"pl-emoji-mart-emoji pl-flex pl-h-full pl-flex-col pl-items-center pl-justify-center pl-gap-[11px]",children:jsxRuntime.jsx(Emoji,{name:l==null?void 0:l.sticker,className:"pl-mx-auto pl-h-[56px] pl-w-[56px]"})})}),jsxRuntime.jsx("div",{children:l==null?void 0:l.title})]})})]})},SettingsIcon=()=>(useAppSelector(({controller:{showMiniPlayer:i}})=>({showMiniPlayer:i}),shallowEqual),useAppSelector(({videoData:{videoElementSizeInfo:i,params:e}})=>({videoElementSizeInfo:i,params:e}),shallowEqual),jsxRuntime.jsx(jsxRuntime.Fragment,{children:jsxRuntime.jsx("img",{alt:"settings-icon",src:IMAGES.settings,width:conditions(ConditionName.isFullMobilePortrait)||!conditions(ConditionName.isMiniPlayer)?controllbarIconSize.other:controllbarIconSize.miniPlayer,height:conditions(ConditionName.isFullMobilePortrait)||!conditions(ConditionName.isMiniPlayer)?controllbarIconSize.other:controllbarIconSize.miniPlayer,className:`${conditions(ConditionName.isSpinSettingsIcon)&&"pl-animate-spin"}`})})),Toggle=({enabled:i,setEnabled:e})=>jsxRuntime.jsx("div",{className:`pl-relative pl-h-[22px] pl-w-[37px] pl-cursor-pointer pl-rounded-[15px] pl-transition-colors pl-duration-150 pl-ease-linear ${i?"pl-bg-main-light hover:pl-bg-main-700":"pl-bg-secondary-300 hover:!pl-bg-secondary-400"}`,onClick:e,children:jsxRuntime.jsx("div",{className:`pl-absolute pl-left-1 pl-top-[3px] pl-h-[16px] pl-w-[16px] pl-rounded-full pl-bg-white pl-transition-transform pl-duration-150 pl-ease-linear ${i?"pl-translate-x-[13px]":"pl-translate-x-0"}`,children:jsxRuntime.jsx("div",{className:`${i?"!pl-mr-[3px] !pl-mt-[-1px]":"!pl-mr-[4px] !pl-mt-[-2px]"}`,children:i?jsxRuntime.jsx("img",{src:IMAGES.purpleTick,width:10,height:10}):jsxRuntime.jsx(CloseIcon,{className:"pl-mx-auto pl-mr-[-1px] pl-mt-1 pl-h-3 pl-w-3 pl-stroke-secondary-400"})})})}),ChevronRightIcon=({className:i,onClick:e})=>jsxRuntime.jsx("svg",{viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:i,onClick:e,children:jsxRuntime.jsx("path",{d:"M6.74906 2.49736C6.89156 2.49736 7.03406 2.54986 7.14656 2.66236L12.0366 7.55236C12.8316 8.34736 12.8316 9.65236 12.0366 10.4474L7.14656 15.3374C6.92906 15.5549 6.56906 15.5549 6.35156 15.3374C6.13406 15.1199 6.13406 14.7599 6.35156 14.5424L11.2416 9.65236C11.6016 9.29236 11.6016 8.70736 11.2416 8.34736L6.35156 3.45736C6.13406 3.23986 6.13406 2.87986 6.35156 2.66236C6.46406 2.55736 6.60656 2.49736 6.74906 2.49736Z"})}),QualityLevels=({setSection:i})=>{const e=useAppDispatch();let{qualityLevels:t,qualityBitrates:n}=useAppSelector(({controller:{qualityLevels:a,qualityBitrates:o,manualQuality:l,autoQuality:d,showMiniPlayer:f}})=>({qualityLevels:a,qualityBitrates:o,manualQuality:l,autoQuality:d,showMiniPlayer:f}),shallowEqual);const{settings:s}=useAppSelector(({user:{settings:a}})=>({settings:a}),shallowEqual);useAppSelector(({videoData:{params:a,videoElementSizeInfo:o}})=>({params:a,videoElementSizeInfo:o}),shallowEqual),t=[-1,...t];const r=(a,o)=>conditions(ConditionName.isAutoQuality)&&o===-1?!0:!conditions(ConditionName.isAutoQuality)&&s.quality===a;return jsxRuntime.jsxs("div",{id:SettingSections.qualityLevels,className:"animate__animated animate__fadeIn pl-p-[14px]",children:[jsxRuntime.jsxs("div",{className:"pl-mb-3 pl-flex pl-cursor-pointer pl-items-center pl-gap-2 pl-border-b pl-border-b-gray-300 pl-pb-3 dark:pl-border-b-dark-4",onClick:()=>i(SettingSections.main),children:[!conditions(ConditionName.showMiniPlayer)&&jsxRuntime.jsx("div",{className:"pl-rounded-[4px] pl-bg-gray-300 pl-p-1 dark:pl-bg-dark-4",children:jsxRuntime.jsx(ChevronRightIcon,{className:"pl-h-3 pl-w-3 pl-stroke-gray-800"})}),jsxRuntime.jsx("p",{className:`pl-text-[15px] pl-font-medium ${conditions(ConditionName.isMiniPlayer)&&"pl-relative pl-right-3"}`,children:translate().quality})]}),jsxRuntime.jsx("ul",{className:"pl-flex pl-flex-col",children:t.map((a,o)=>jsxRuntime.jsx("li",{className:`hover:pl-bg-playerColor1/[0.1] pl-relative pl-flex pl-cursor-pointer pl-items-center pl-rounded-[4px] pl-p-1 pl-pr-2 pl-text-[14px] pl-font-medium pl-leading-6 hover:dark:pl-bg-white/[0.25] ${r(o-1,a)&&"pl-bg-playerColor1 hover:!pl-bg-playerColor1 pl-text-dark-5"}`,onClick:()=>{sendFluentLog(qualityChangeRequestLog(a===-1?"auto":`${a}P`)),e(setActiveElements(!1)),e(setSettingPopover(!1)),e(setUserSettings({...s,quality:a===-1?-1:o-1})),createSettings({...s,quality:a===-1?null:o-1}),i(SettingSections.main)},children:jsxRuntime.jsx("span",{className:"pl-w-full",children:a===-1?`${translate().automatic} (${translate().basedOnYourInternetSpeed})`:`${a}P - ${n[o]}`})},o))})]})},QualityLevels$1=React2.memo(QualityLevels),MultiAudio=({setSection:i})=>{const e=useAppDispatch(),{multiAudio:t,selectedAudioId:n}=useAppSelector(({videoData:{multiAudio:s,selectedAudioId:r}})=>({multiAudio:s,selectedAudioId:r}),shallowEqual);return jsxRuntime.jsxs("div",{id:SettingSections.multiAudio,className:"animate__animated animate__fadeIn pl-p-[14px]",children:[jsxRuntime.jsxs("div",{className:"pl-mb-3 pl-flex pl-cursor-pointer pl-items-center pl-gap-2 pl-border-b pl-border-b-gray-300 pl-pb-3 dark:pl-border-b-dark-4",onClick:()=>i(SettingSections.main),children:[jsxRuntime.jsx("div",{className:"pl-rounded-[4px] pl-bg-gray-300 pl-p-1 dark:pl-bg-dark-4",children:jsxRuntime.jsx(ChevronRightIcon,{className:"pl-h-3 pl-w-3 pl-stroke-gray-800"})}),jsxRuntime.jsx("p",{className:"pl-text-[15px] pl-font-medium",children:translate().languageSelection})]}),jsxRuntime.jsx("ul",{className:"pl-m-0 pl-flex pl-flex-col pl-p-0",children:conditions(ConditionName.hasMultiAudio)&&t.map((s,r)=>jsxRuntime.jsxs("li",{className:`hover:pl-bg-playerColor1/[0.1] pl-relative pl-flex pl-cursor-pointer pl-items-center pl-rounded-[4px] pl-p-1 pl-pr-2 pl-text-[14px] pl-leading-6 hover:dark:pl-bg-white/[0.25] ${n===r&&"pl-bg-playerColor1 hover:!pl-bg-playerColor1 pl-text-dark-5"}`,onClick:()=>{e(setSelectedAudioId(r)),i(SettingSections.main),e(setActiveElements(!1)),e(setSettingPopover(!1))},children:[jsxRuntime.jsx("span",{children:s.name}),r===0&&jsxRuntime.jsxs("span",{children:["(",translate().default,")"]})]},s.id))})]})},MultiAudio$1=React2.memo(MultiAudio),SubtitlesMenu=({setSection:i})=>{const e=useAppDispatch(),{subtitles:t,selectedSubtitle:n}=useAppSelector(({videoData:{subtitles:s,selectedSubtitle:r}})=>({subtitles:s,selectedSubtitle:r}),shallowEqual);return jsxRuntime.jsxs("div",{id:SettingSections.subtitles,className:"animate__animated animate__fadeIn pl-p-[14px]",children:[jsxRuntime.jsxs("div",{className:"pl-mb-3 pl-flex pl-cursor-pointer pl-items-center pl-gap-2 pl-border-b pl-border-b-gray-300 pl-pb-3 dark:pl-border-b-dark-4",onClick:()=>i(SettingSections.subtitlesSettingMenu),children:[jsxRuntime.jsx("div",{className:"pl-rounded-[4px] pl-bg-gray-300 pl-p-1 dark:pl-bg-dark-4",children:jsxRuntime.jsx(ChevronRightIcon,{className:"pl-h-3 pl-w-3 pl-stroke-gray-800"})}),jsxRuntime.jsx("p",{className:"pl-text-[15px] pl-font-medium",children:translate().subtitleSelection})]}),jsxRuntime.jsxs("ul",{className:"pl-m-0 pl-flex pl-flex-col pl-p-0",children:[jsxRuntime.jsx("li",{className:`hover:pl-bg-playerColor1/[0.1] pl-relative pl-flex pl-cursor-pointer pl-items-center pl-rounded-[4px] pl-p-1 pl-pr-2 pl-text-[14px] pl-leading-6 hover:dark:pl-bg-white/[0.25] ${!n&&"pl-bg-playerColor1 hover:!pl-bg-playerColor1 pl-text-dark-5"}`,onClick:()=>{e(setActiveElements(!1)),e(setSettingPopover(!1)),e(setSelectedSubtitle(void 0)),i(SettingSections.main);const s=Object.values(videoTag().textTracks).find(r=>r.mode==="showing");s&&(s.mode="disabled"),e(setSubtitleText("")),sendFluentLog(subtitleLog("empty"))},children:translate().noSubtitle1}),t.map((s,r)=>jsxRuntime.jsx("li",{className:`hover:pl-bg-playerColor1/[0.1] pl-relative pl-flex pl-cursor-pointer pl-items-center pl-rounded-[4px] pl-p-1 pl-pr-2 pl-text-[14px] pl-leading-6 hover:dark:pl-bg-white/[0.25] ${n&&n.language===s.language&&"pl-bg-playerColor1 hover:!pl-bg-playerColor1 pl-text-dark-5"}`,onClick:()=>{e(setActiveElements(!1)),e(setSettingPopover(!1)),e(setSelectedSubtitle(s)),videoTag().textTracks[r].mode="showing",i(SettingSections.main),sendFluentLog(subtitleLog(s.language))},children:jsxRuntime.jsx("span",{children:s.label})},r))]})]})},SubtitlesMenu$1=React2.memo(SubtitlesMenu),colors$2=[{bgName:SubtitleColors.black,bgColor:SubtitleColorsCode.black},{bgName:SubtitleColors.white,bgColor:SubtitleColorsCode.white},{bgName:SubtitleColors.yellow,bgColor:SubtitleColorsCode.yellow},{bgName:SubtitleColors.blue,bgColor:SubtitleColorsCode.blue},{bgName:SubtitleColors.green,bgColor:SubtitleColorsCode.green}],SubtitlesBackgroundColorsMenu=({setSection:i})=>{const e=useAppDispatch(),{settings:t}=useAppSelector(({user:{settings:n}})=>({settings:n}),shallowEqual);return jsxRuntime.jsxs("div",{id:SettingSections.subtitlesBackgroundColors,className:"animate__animated animate__fadeIn pl-p-[14px]",children:[jsxRuntime.jsxs("div",{className:"pl-mb-3 pl-flex pl-cursor-pointer pl-items-center pl-gap-2 pl-border-b pl-border-b-gray-300 pl-pb-3 dark:pl-border-b-dark-4",onClick:()=>i(SettingSections.subtitlesSettingMenu),children:[jsxRuntime.jsx("div",{className:"pl-rounded-[4px] pl-bg-gray-300 pl-p-1 dark:pl-bg-dark-4",children:jsxRuntime.jsx(ChevronRightIcon,{className:"pl-h-3 pl-w-3 pl-stroke-gray-800"})}),jsxRuntime.jsx("p",{className:"pl-text-[15px] pl-font-medium",children:translate().subtitleBackgroundColor})]}),jsxRuntime.jsx("ul",{className:"pl-m-0 pl-flex pl-flex-col pl-p-0",children:colors$2.map((n,s)=>jsxRuntime.jsx("li",{className:`hover:pl-bg-playerColor1/[0.1] pl-relative pl-flex pl-cursor-pointer pl-items-center pl-rounded-[4px] pl-p-1 pl-pr-2 pl-text-[14px] pl-leading-6 hover:dark:pl-bg-white/[0.25] ${t.subtitle_background_color===n.bgColor&&"pl-bg-playerColor1 hover:!pl-bg-playerColor1 pl-text-dark-5"}`,onClick:()=>{e(setUserSettings({...t,subtitle_background_color:n.bgColor})),createSettings({...t,subtitle_background_color:n.bgColor}),i(SettingSections.main),e(setActiveElements(!1)),e(setSettingPopover(!1))},children:jsxRuntime.jsx("span",{children:n.bgName})},s))})]})},SubtitlesBackgroundColorsMenu$1=React2.memo(SubtitlesBackgroundColorsMenu),colors$1=[{textName:SubtitleColors.black,textColor:SubtitleColorsCode.black},{textName:SubtitleColors.white,textColor:SubtitleColorsCode.white},{textName:SubtitleColors.yellow,textColor:SubtitleColorsCode.yellow},{textName:SubtitleColors.blue,textColor:SubtitleColorsCode.blue},{textName:SubtitleColors.green,textColor:SubtitleColorsCode.green}],SubtitlesTextColorsMenu=({setSection:i})=>{const e=useAppDispatch(),{settings:t}=useAppSelector(({user:{settings:n}})=>({settings:n}),shallowEqual);return jsxRuntime.jsxs("div",{id:SettingSections.subtitlesTextColors,className:"animate__animated animate__fadeIn pl-p-[14px]",children:[jsxRuntime.jsxs("div",{className:"pl-mb-3 pl-flex pl-cursor-pointer pl-items-center pl-gap-2 pl-border-b pl-border-b-gray-300 pl-pb-3 dark:pl-border-b-dark-4",onClick:()=>i(SettingSections.subtitlesSettingMenu),children:[jsxRuntime.jsx("div",{className:"pl-rounded-[4px] pl-bg-gray-300 pl-p-1 dark:pl-bg-dark-4",children:jsxRuntime.jsx(ChevronRightIcon,{className:"pl-h-3 pl-w-3 pl-stroke-gray-800"})}),jsxRuntime.jsx("p",{className:"pl-text-[15px] pl-font-medium",children:translate().subtitleTextColor})]}),jsxRuntime.jsx("ul",{className:"pl-m-0 pl-flex pl-flex-col pl-p-0",children:colors$1.map((n,s)=>jsxRuntime.jsx("li",{className:`hover:pl-bg-playerColor1/[0.1] pl-relative pl-flex pl-cursor-pointer pl-items-center pl-rounded-[4px] pl-p-1 pl-pr-2 pl-text-[14px] pl-leading-6 hover:dark:pl-bg-white/[0.25] ${t.subtitle_text_color===n.textColor&&"pl-bg-playerColor1 hover:!pl-bg-playerColor1 pl-text-dark-5"}`,onClick:()=>{e(setUserSettings({...t,subtitle_text_color:n.textColor})),createSettings({...t,subtitle_text_color:n.textColor}),i(SettingSections.main),e(setActiveElements(!1)),e(setSettingPopover(!1))},children:jsxRuntime.jsx("span",{children:n.textName})},s))})]})},SubtitlesTextColorsMenu$1=React2.memo(SubtitlesTextColorsMenu),SubtitleSettingMenu=({setSection:i})=>jsxRuntime.jsxs("div",{id:SettingSections.subtitlesSettingMenu,className:"animate__animated animate__fadeIn pl-p-[14px]",children:[jsxRuntime.jsxs("div",{className:"pl-mb-3 pl-flex pl-cursor-pointer pl-items-center pl-gap-2 pl-border-b pl-border-b-gray-300 pl-pb-3 dark:pl-border-b-dark-4",onClick:()=>i(SettingSections.main),children:[jsxRuntime.jsx("div",{className:"pl-rounded-[4px] pl-bg-gray-300 pl-p-1 dark:pl-bg-dark-4",children:jsxRuntime.jsx(ChevronRightIcon,{className:"pl-h-3 pl-w-3 pl-stroke-gray-800"})}),jsxRuntime.jsx("p",{className:"pl-text-[15px] pl-font-medium",children:translate().subtitleSettings})]}),jsxRuntime.jsxs("div",{className:"pl-m-0 pl-flex pl-flex-col pl-p-0 pl-text-gray-100",children:[jsxRuntime.jsx("p",{className:"hover:pl-bg-playerColor1/[0.1] pl-cursor-pointer pl-rounded-[4px] pl-py-[10px] pl-pr-2 pl-text-[12px] pl-text-black dark:pl-text-gray-100 hover:dark:pl-bg-white/[0.25]",onClick:()=>i(SettingSections.subtitles),children:translate().subtitleSelection}),jsxRuntime.jsx("p",{className:"hover:pl-bg-playerColor1/[0.1] pl-cursor-pointer pl-rounded-[4px] pl-py-[10px] pl-pr-2 pl-text-[12px] pl-text-black dark:pl-text-gray-100 hover:dark:pl-bg-white/[0.25]",onClick:()=>i(SettingSections.subtitlesBackgroundColors),children:translate().selectSubtitleBackgroundColor}),jsxRuntime.jsx("p",{className:"hover:pl-bg-playerColor1/[0.1] pl-cursor-pointer pl-rounded-[4px] pl-py-[10px] pl-pr-2 pl-text-[12px] pl-text-black dark:pl-text-gray-100 hover:dark:pl-bg-white/[0.25]",onClick:()=>i(SettingSections.subtitlesTextColors),children:translate().selectSubtitleTextColor})]})]}),SubtitleSettingMenu$1=React2.memo(SubtitleSettingMenu),Settings$1=()=>{const i=useAppDispatch(),{videoElementSizeInfo:e}=useAppSelector(({videoData:{params:C,videoElementSizeInfo:_}})=>({params:C,videoElementSizeInfo:_}),shallowEqual),{settingPopover:t}=useAppSelector(({popovers:{settingPopover:C}})=>({settingPopover:C}),shallowEqual),{settings:n}=useAppSelector(({user:{settings:C}})=>({settings:C}),shallowEqual),{qualityLevels:s,manualQuality:r,autoQuality:a,showMiniPlayer:o}=useAppSelector(({controller:{qualityLevels:C,manualQuality:_,autoQuality:R,showMiniPlayer:E}})=>({qualityLevels:C,manualQuality:_,autoQuality:R,showMiniPlayer:E}),shallowEqual),[l,d]=React2.useState(SettingSections.main),[f,u]=React2.useState(0),[p,m]=React2.useState(!1),g=React2.useRef(null);useOnClickOutside(g,()=>{i(setSettingPopover(!1)),setTimeout(()=>d(SettingSections.main),500)}),React2.useEffect(()=>{var C;conditions(ConditionName.showMiniPlayer)&&d(SettingSections.qualityLevels),u((C=document.getElementById(l))==null?void 0:C.offsetHeight)},[l,o]),React2.useEffect(()=>{conditions(ConditionName.showSettingPopover)||d(SettingSections.main)},[t]);const y=()=>{const C=conditions(ConditionName.isAutoQuality)?Number(s[a]):Number(s[r!==void 0?r:n.quality]);return C>=720&&C<1080?"HD":C>=1080&&C<2160?"FHD":C>=2160&&C<4320?"4K":C>=4320?"8K":`${C}p`},v=()=>{i(setUserSettings({...n,poll_emoji:!n.poll_emoji})),createSettings({...n,poll_emoji:!n.poll_emoji}),sendFluentLog(deActiveSettingLog())},b=()=>{conditions(ConditionName.isComplexPortrait)&&i(setClearPopoversSlice()),i(setSettingPopover(!t))};return jsxRuntime.jsxs("div",{className:`pl-inline-flex ${conditions(ConditionName.isLandscape)&&"pl-relative"}`,ref:g,children:[jsxRuntime.jsxs("div",{className:"pl-relative pl-flex pl-cursor-pointer pl-items-center",onClick:b,onMouseOver:()=>!conditions(ConditionName.isTouchScreen)&&m(!0),onMouseLeave:()=>!conditions(ConditionName.isTouchScreen)&&m(!1),children:[jsxRuntime.jsx(SettingsIcon,{}),(!conditions(ConditionName.isMiniPlayer)||conditions(ConditionName.isFullMobilePortrait))&&jsxRuntime.jsx("span",{className:`${Number(s[conditions(ConditionName.isAutoQuality)?a:r!==void 0?r:n.quality])>=720?"pl-right-[-6px] pl-bg-red-light":"pl-right-[-10px] pl-bg-secondary-500"} pl-absolute pl-top-0 ${conditions(ConditionName.isComplexPortrait)&&"pl-right-[-16px] pl-top-[-4px]"} pl-px-1 pl-pt-[1px] pl-text-[8px] pl-text-white`,children:y()}),p&&jsxRuntime.jsx(ControllbarTooltip,{title:translate().settings})]}),jsxRuntime.jsx(Popover,{classNames:`!pl-p-0 pl-overflow-hidden !pl-bg-white dark:!pl-bg-dark-13 !pl-rounded-[4px] ${!conditions(ConditionName.isComplexPortrait)&&"pl-mb-[33px] pl-right-0"} ${conditions(ConditionName.isFullMobilePortrait)&&"!pl-w-screen"} ${conditions(ConditionName.isMiniPlayer)&&!conditions(ConditionName.isFullMobilePortrait)?"!pl-fixed pl-rounded-r-none pl-w-[250px] !pl-mb-0":"pl-w-[285px]"}`,animation:conditions(ConditionName.isMiniPlayer)&&!conditions(ConditionName.isFullMobilePortrait)?t?"animate__fadeInRight":"animate__fadeOutRight":void 0,styles:{maxHeight:conditions(ConditionName.isMiniPlayer)&&!conditions(ConditionName.isFullMobilePortrait)?`${e.height}px`:`${f}px`,...handlePopoverSizeInMiniPlayer()},status:t,onClose:()=>i(setSettingPopover(!1)),type:conditions(ConditionName.isComplexPortrait)?"modal":"popover",isBlurBackground:conditions(ConditionName.isComplexPortrait),ref:g,children:jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[l===SettingSections.main&&jsxRuntime.jsxs("div",{id:"main",className:"animate__animated animate__fadeIn pl-flex pl-flex-col pl-rounded-[10px] pl-px-4 pl-py-3",children:[jsxRuntime.jsx("p",{className:"pl-border-b pl-border-b-gray-300 pl-pb-3 pl-pr-2 pl-text-[14px] pl-font-bold pl-text-black dark:pl-border-b-dark-4 dark:pl-text-gray-100",children:translate().settings}),!conditions(ConditionName.isStaticFormat)&&jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx("p",{className:"hover:pl-bg-playerColor1/[0.1] pl-cursor-pointer pl-rounded-[4px] pl-py-[10px] pl-pr-2 pl-text-[12px] pl-font-medium pl-text-black dark:pl-text-gray-100 hover:dark:pl-bg-white/[0.25]",onClick:()=>d(SettingSections.qualityLevels),children:translate().choiceQuality}),conditions(ConditionName.hasSubtitles)&&jsxRuntime.jsxs("div",{onClick:()=>d(SettingSections.subtitlesSettingMenu),className:"hover:pl-bg-playerColor1/[0.1] pl-flex pl-cursor-pointer pl-items-center pl-justify-between pl-rounded-[4px] pl-px-2 pl-py-[10px] pl-text-[12px] pl-text-black dark:pl-text-gray-100 hover:dark:pl-bg-white/[0.25]",children:[jsxRuntime.jsx("p",{className:"pl-text-[12px]",children:translate().subtitleSettings}),jsxRuntime.jsx("div",{className:"pl-rotate-180 pl-rounded-[4px] pl-bg-gray-300 pl-p-1 dark:pl-bg-dark-4",children:jsxRuntime.jsx(ChevronRightIcon,{className:"pl-h-3 pl-w-3 pl-stroke-gray-800"})})]}),conditions(ConditionName.hasMultiAudio)&&jsxRuntime.jsx("p",{className:"hover:pl-bg-playerColor1/[0.1] pl-cursor-pointer pl-rounded-[4px] pl-py-[10px] pl-pr-2 pl-text-[12px] pl-font-medium pl-text-black dark:pl-text-gray-100 hover:dark:pl-bg-white/[0.25]",onClick:()=>d(SettingSections.multiAudio),children:translate().languageSelection}),conditions(ConditionName.showShareInSetting)&&jsxRuntime.jsx("p",{className:"hover:pl-bg-playerColor1/[0.1] pl-cursor-pointer pl-rounded-[4px] pl-py-[10px] pl-pr-2 pl-text-[12px] pl-font-medium pl-text-black dark:pl-text-gray-100 hover:dark:pl-bg-white/[0.25]",onClick:()=>i(setSharePopover(!0)),children:translate().sharing})]}),conditions(ConditionName.isLiveParam)&&jsxRuntime.jsxs("div",{className:"pl-flex pl-items-center pl-justify-between pl-pr-2",children:[jsxRuntime.jsx("span",{className:"pl-ml-10 pl-text-[12px] pl-font-medium",children:"نمايش نظرسنجى و ايموجى ها"}),jsxRuntime.jsx(Toggle,{enabled:n.poll_emoji,setEnabled:v})]})]}),l===SettingSections.qualityLevels&&!conditions(ConditionName.isStaticFormat)&&jsxRuntime.jsx(QualityLevels$1,{setSection:d}),l===SettingSections.multiAudio&&jsxRuntime.jsx(MultiAudio$1,{setSection:d}),l===SettingSections.subtitlesSettingMenu&&jsxRuntime.jsx(SubtitleSettingMenu$1,{setSection:d}),l===SettingSections.subtitles&&jsxRuntime.jsx(SubtitlesMenu$1,{setSection:d}),l===SettingSections.subtitlesBackgroundColors&&jsxRuntime.jsx(SubtitlesBackgroundColorsMenu$1,{setSection:d}),l===SettingSections.subtitlesTextColors&&jsxRuntime.jsx(SubtitlesTextColorsMenu$1,{setSection:d})]})})]})},Settings$2=React2.memo(Settings$1),SpeedIcon=i=>(useAppSelector(({controller:{showMiniPlayer:e}})=>({showMiniPlayer:e}),shallowEqual),useAppSelector(({videoData:{videoElementSizeInfo:e,params:t}})=>({videoElementSizeInfo:e,params:t}),shallowEqual),jsxRuntime.jsx(jsxRuntime.Fragment,{children:jsxRuntime.jsx("img",{alt:"speed-icon",src:IMAGES.speed,className:"pl-flex pl-cursor-pointer pl-items-center",width:conditions(ConditionName.isFullMobilePortrait)||!conditions(ConditionName.isMiniPlayer)?controllbarIconSize.other:controllbarIconSize.miniPlayer,height:conditions(ConditionName.isFullMobilePortrait)||!conditions(ConditionName.isMiniPlayer)?controllbarIconSize.other:controllbarIconSize.miniPlayer,...i})})),speeds=[.5,.8,1,1.25,1.5,1.75,2],Speed=()=>{const[i,e]=React2.useState(!1),t=useAppDispatch();useAppSelector(({controller:{showMiniPlayer:a}})=>({showMiniPlayer:a}),shallowEqual),useAppSelector(({videoData:{videoElementSizeInfo:a,params:o}})=>({videoElementSizeInfo:a,params:o}),shallowEqual);const{speedPopover:n}=useAppSelector(({popovers:{speedPopover:a}})=>({speedPopover:a}),shallowEqual),{settings:s}=useAppSelector(({user:{settings:a}})=>({settings:a}),shallowEqual),r=React2.useRef(null);return useOnClickOutside(r,()=>{n&&t(setSpeedPopover(!1))}),React2.useEffect(()=>{videoTag()&&(videoTag().playbackRate=s.speed)},[]),jsxRuntime.jsxs("div",{className:"pl-relative pl-inline-flex",ref:r,children:[jsxRuntime.jsx(SpeedIcon,{onClick:()=>t(setSpeedPopover(!n)),onMouseOver:()=>!conditions(ConditionName.isTouchScreen)&&e(!0),onMouseLeave:()=>!conditions(ConditionName.isTouchScreen)&&e(!1)}),i&&jsxRuntime.jsx(ControllbarTooltip,{title:`${translate().playBackSpeed} (s)`,className:"!pl-right-[-38px]"}),jsxRuntime.jsx(Popover,{classNames:`pl-p-[14px] pl-overflow-hidden pl-p-3 !pl-bg-white dark:!pl-bg-dark-13 ${!conditions(ConditionName.isComplexPortrait)&&"pl-mb-[33px] pl-right-0"} ${conditions(ConditionName.isFullMobilePortrait)&&"!pl-w-screen"} ${conditions(ConditionName.isMiniPlayer)&&!conditions(ConditionName.isFullMobilePortrait)?"!pl-fixed pl-rounded-r-none pl-w-[200px] !pl-mb-0":"pl-w-[285px]"}`,animation:conditions(ConditionName.isMiniPlayer)&&!conditions(ConditionName.isFullMobilePortrait)?n?"animate__fadeInRight":"animate__fadeOutRight":void 0,styles:handlePopoverSizeInMiniPlayer(),status:n,onClose:()=>t(setSpeedPopover(!1)),type:conditions(ConditionName.isComplexPortrait)?"modal":"popover",isBlurBackground:conditions(ConditionName.isComplexPortrait),ref:r,children:jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx("div",{className:"pl-mb-3 pl-flex pl-items-center pl-gap-2 pl-border-b pl-border-b-gray-300 pl-pb-3 dark:pl-border-b-dark-4",children:jsxRuntime.jsx("p",{className:"pl-text-[15px] pl-font-medium",children:translate().playBackSpeed})}),jsxRuntime.jsx("ul",{className:"pl-m-0 pl-flex pl-flex-col pl-p-0",children:speeds.map((a,o)=>jsxRuntime.jsx("li",{className:`hover:pl-bg-playerColor1/[0.1] pl-relative pl-flex pl-cursor-pointer pl-items-center pl-rounded-[4px] pl-p-1 pl-pr-2 pl-text-[14px] pl-leading-6 pl-text-gray-800 dark:pl-text-dark-5 hover:dark:pl-bg-white/[0.25] ${s.speed===a&&"pl-bg-playerColor1 hover:!pl-bg-playerColor1 !pl-text-dark-5"}`,onClick:()=>{conditions(ConditionName.isStaticFormat)||sendFluentLog(speedChangeLog(a)),t(setSpeedPopover(!1)),t(setUserSettings({...s,speed:a})),createSettings({...s,speed:a}),videoTag().playbackRate=a},children:jsxRuntime.jsxs("div",{className:"pl-flex pl-w-full pl-items-center pl-gap-2",children:[jsxRuntime.jsx("span",{children:"x"}),jsxRuntime.jsx("span",{children:a===1?"1.0":a}),a===1&&jsxRuntime.jsxs("p",{className:"pl-w-full",children:["(",translate().normalSpeed,")"]})]})},o))})]})})]})},SubtitleIcon=i=>(useAppSelector(({controller:{showMiniPlayer:e}})=>({showMiniPlayer:e}),shallowEqual),useAppSelector(({videoData:{selectedSubtitle:e,videoElementSizeInfo:t,params:n}})=>({selectedSubtitle:e,videoElementSizeInfo:t,params:n}),shallowEqual),jsxRuntime.jsx(jsxRuntime.Fragment,{children:jsxRuntime.jsx("img",{alt:"subtitle-icon",src:conditions(ConditionName.isSelectedSubtitle)?IMAGES.subtitle:IMAGES.subtitleOutline,className:"pl-cursor-pointer",width:conditions(ConditionName.isFullMobilePortrait)||!conditions(ConditionName.isMiniPlayer)?controllbarIconSize.other:controllbarIconSize.miniPlayer,height:conditions(ConditionName.isFullMobilePortrait)||!conditions(ConditionName.isMiniPlayer)?controllbarIconSize.other:controllbarIconSize.miniPlayer,...i})})),Subtitles=()=>{const[i,e]=React2.useState(!1);return jsxRuntime.jsxs("div",{className:"pl-relative pl-flex pl-items-center",children:[jsxRuntime.jsx(SubtitleIcon,{onClick:handleSubtitle,onDoubleClick:t=>t.stopPropagation(),onMouseOver:()=>!conditions(ConditionName.isTouchScreen)&&e(!0),onMouseLeave:()=>!conditions(ConditionName.isTouchScreen)&&e(!1)}),i&&jsxRuntime.jsx(ControllbarTooltip,{title:`${translate().subtitle} (c)`})]})},FullScreenIcon=i=>(useAppSelector(({videoData:{isComplexPortrait:e,videoElementSizeInfo:t,params:n}})=>({isComplexPortrait:e,videoElementSizeInfo:t,params:n}),shallowEqual),useAppSelector(({controller:{isFullScreen:e,showMiniPlayer:t}})=>({isFullScreen:e,showMiniPlayer:t}),shallowEqual),jsxRuntime.jsx("div",{className:"pl-flex pl-items-center",onClick:i.onClick,children:jsxRuntime.jsx("img",{src:conditions(ConditionName.isFullScreen)?IMAGES.nonFullScreen:IMAGES.fullScreen,alt:"fullScreen-icon",className:"pl-cursor-pointer",width:conditions(ConditionName.isFullMobilePortrait)||!conditions(ConditionName.isMiniPlayer)?controllbarIconSize.other:controllbarIconSize.miniPlayer,height:conditions(ConditionName.isFullMobilePortrait)||!conditions(ConditionName.isMiniPlayer)?controllbarIconSize.other:controllbarIconSize.miniPlayer,onMouseOver:i.onMouseOver,onMouseLeave:i.onMouseLeave})})),FullScreen=()=>{const{isFullScreen:i}=useAppSelector(({controller:{firstPlay:s,isFullScreen:r}})=>({firstPlay:s,isFullScreen:r}),shallowEqual),[e,t]=React2.useState(!1),n=useAppDispatch();return React2.useEffect(()=>{conditions(ConditionName.isFirstPlay)||n(setActiveElements(!1))},[i]),jsxRuntime.jsxs("div",{className:"pl-relative pl-flex pl-items-center",children:[jsxRuntime.jsx(FullScreenIcon,{onMouseOver:()=>!conditions(ConditionName.isTouchScreen)&&t(!0),onMouseLeave:()=>!conditions(ConditionName.isTouchScreen)&&t(!1),onClick:()=>{handleFullScreen(),handleLockOrientation()}}),e&&jsxRuntime.jsx(ControllbarTooltip,{title:`${conditions(ConditionName.isFullScreen)?translate().exitFrom:""} ${translate().fullScreen} (f)`,className:"!pl-right-[-10px]"})]})},Tags=({tags:i,usePlace:e,tagId:t})=>{const[n,s]=React2.useState(!1),[r,a]=React2.useState(!0);React2.useEffect(()=>{document.getElementById(t)&&conditions(ConditionName.isComplexDesktop)&&o()},[document.getElementById(t)]);const o=()=>a(!!document.getElementById(t)&&Math.abs(Math.abs(document.getElementById(t).scrollWidth)-(document.getElementById(t).getBoundingClientRect().width+Math.abs(document.getElementById(t).scrollLeft)))<=1);return jsxRuntime.jsxs("div",{className:`pl-relative pl-flex pl-items-center ${e==="DesktopDescription"?"pl-my-2 pl-gap-4":"no-scrollbar pl-gap-1 pl-overflow-auto"}`,onMouseOut:()=>s(!1),onMouseOver:()=>s(!0),children:[conditions(ConditionName.isComplexDesktop)&&n&&!r&&jsxRuntime.jsx("div",{className:"pl-absolute pl-left-0 pl-flex",onClick:l=>handleScrollLeft(l,t),style:{width:10,height:10},children:jsxRuntime.jsx("img",{src:conditions(ConditionName.isDarkMode)?IMAGES.rightArrow:IMAGES.lightRightArrow,className:"pl-h-full pl-w-full pl-cursor-pointer",alt:"right-arrow"})}),jsxRuntime.jsx("div",{className:`pl-flex pl-w-full pl-items-center ${e==="DesktopDescription"?"pl-gap-4":"pl-gap-1"} no-scrollbar pl-overflow-auto`,id:t,children:i.split(",").map((l,d)=>jsxRuntime.jsxs("p",{onClick:f=>handleClickPlayerCardTag(f,l),style:{direction:"ltr"},className:`pl-cursor-pointer ${e==="DesktopDescription"?"pl-text-[14px] pl-font-medium pl-text-primary-800 dark:pl-text-primary-500":"pl-min-w-max pl-rounded-[4px] pl-bg-gray-100 pl-px-2 pl-py-[3px] pl-text-[10px] pl-font-normal pl-text-gray-800 dark:pl-bg-secondary-600 dark:pl-text-dark-5"}`,children:[l,e==="DesktopDescription"&&"#"]},d))}),conditions(ConditionName.isComplexDesktop)&&n&&!r&&jsxRuntime.jsx("div",{className:"pl-absolute pl-right-0 pl-flex",onClick:l=>handleScrollRight(l,t),style:{width:10,height:10},children:jsxRuntime.jsx("img",{src:conditions(ConditionName.isDarkMode)?IMAGES.leftArrow:IMAGES.lightLeftArrow,className:"pl-h-full pl-w-full pl-cursor-pointer",alt:"left-arrow"})})]})},PlayerCore=React2.lazy(()=>Promise.resolve().then(()=>playerCore)),PlayerCard=({src:i,type:e,width:t,height:n,title:s,titleClassName:r,tags:a,date:o,dateClassName:l,viewers:d,viewersClassName:f,isVideo:u=!1,isComplexDesktop:p=!1,isMultiLive:m=!1,isTagCard:g=!1,duration:y,onClick:v,id:b,userId:C,commentsCount:_,star:R,imdb_rate:E,status_text:F,content_type:O,isRecommendationList:A=!1})=>{const{params:N}=useAppSelector(({videoData:{params:Z,details:X,isComplexDesktop:oe,isComplexPortrait:le}})=>({params:Z,details:X,isComplexDesktop:oe,isComplexPortrait:le}),shallowEqual);useAppSelector(({controller:{isFullScreen:Z}})=>({isFullScreen:Z}),shallowEqual);const M=Z=>{if(b===+N.id){Z.stopPropagation(),Z.preventDefault();return}};return jsxRuntime.jsxs("div",{className:`pl-flex pl-w-full pl-overflow-hidden ${b===+N.id?"pl-cursor-default":"pl-cursor-pointer"} ${(p||conditions(ConditionName.isComplexPortrait)||conditions(ConditionName.isTouchScreenLandscape)||conditions(ConditionName.isFullScreen)||!conditions(ConditionName.isFullScreen)&&!conditions(ConditionName.isParamsPortrait))&&!g&&!m?"pl-h-full pl-flex-row pl-items-start pl-gap-2":"pl-h-full pl-w-full pl-flex-col"}`,onDoubleClick:M,onClick:Z=>{v(Z),b!==+N.id&&e!=="playlist"&&(conditions(ConditionName.isFullScreen)?window.location.href=window.location.href.replace(`id=${N.id}`,`id=${b}`).replace(`type=${N.type}`,`type=${e}`):handleClickVideoCard(String(b),e))},children:[jsxRuntime.jsxs("div",{className:`pl-relative pl-flex-none ${(p||conditions(ConditionName.isComplexPortrait)||conditions(ConditionName.isTouchScreenLandscape)||conditions(ConditionName.isFullScreen)||!conditions(ConditionName.isFullScreen)&&!conditions(ConditionName.isParamsPortrait))&&!g&&!m?"":"pl-w-full"}`,children:[u?jsxRuntime.jsx("div",{style:{width:t,height:n},children:jsxRuntime.jsx(React2.Suspense,{fallback:"",children:jsxRuntime.jsx(PlayerCore,{isMultiLive:!!C})})}):jsxRuntime.jsx("div",{className:`${(p||conditions(ConditionName.isComplexPortrait))&&!g?"":"!pl-aspect-video pl-w-full"}`,style:{width:t,height:(p||conditions(ConditionName.isComplexPortrait))&&!g?n:"initial"},children:i?jsxRuntime.jsx("img",{src:i,className:"pl-size-full pl-rounded-[4px]",alt:s??"player-card"}):jsxRuntime.jsx("div",{className:"pl-aspect-video pl-w-full pl-rounded-[4px]",style:{background:"linear-gradient(39deg, rgba(16, 9, 49, 1) 0%, rgba(75, 14, 87, 1) 100%)"}})}),!u&&e!=="playlist"&&b!==+N.id&&!A&&jsxRuntime.jsx("div",{className:"pl-absolute pl-left-1/2 pl-top-1/2 pl-h-6 pl-w-6 -pl-translate-x-1/2 -pl-translate-y-1/2",children:jsxRuntime.jsx("img",{src:IMAGES.bigPlay,width:isTouchScreen()?56:72,height:isTouchScreen()?56:72,className:"pl-big-play-icon",alt:"big-play-icon"})}),e==="playlist"?jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx("div",{className:"pl-absolute pl-left-1/2 pl-top-1/2 pl-flex -pl-translate-x-1/2 -pl-translate-y-1/2 pl-items-center pl-rounded-full pl-bg-black/[0.4] pl-p-1",children:jsxRuntime.jsx("img",{src:IMAGES.playList,alt:"playList-icon",width:22,height:22})}),!!F&&jsxRuntime.jsx("p",{className:"pl-absolute pl-bottom-0 pl-w-full pl-rounded-b-[4px] pl-bg-main-700/[0.7] pl-text-center pl-text-[14px] pl-font-normal pl-text-white",children:F})]}):jsxRuntime.jsx(jsxRuntime.Fragment,{children:e==="live"?jsxRuntime.jsxs("div",{className:`pl-absolute pl-bottom-1 pl-left-1 pl-flex pl-items-center pl-gap-2 pl-rounded-[4px] pl-px-2 pl-py-1 pl-text-white ${e==="live"?"pl-bg-red-zProgress":"pl-bg-black/[0.7]"}`,children:[jsxRuntime.jsx(LiveIcon,{isLive:!0}),jsxRuntime.jsx("span",{className:"pl-text-[8px] pl-font-medium",children:"زنده"})]}):jsxRuntime.jsx(jsxRuntime.Fragment,{children:!!y&&jsxRuntime.jsx("div",{className:"pl-absolute pl-bottom-1 pl-left-1 pl-flex pl-items-center pl-gap-2 pl-rounded-[4px] pl-bg-black/[0.7] pl-px-2 pl-py-1 pl-text-[10px] pl-text-white",children:efficientSecondsToPersianHMS(Number(y))})})})]}),jsxRuntime.jsxs("div",{className:`pl-flex pl-h-full pl-w-full pl-flex-col pl-justify-between pl-gap-0.5 pl-overflow-hidden pl-py-1 ${m&&"pl-justify-center"}`,children:[s&&jsxRuntime.jsx("p",{className:`${p?"pl-text-[10px] pl-font-bold":conditions(ConditionName.isComplexPortrait)?"pl-text-justify pl-text-[12px] pl-font-medium":"pl-text-[14px] pl-font-medium"} ${m&&!conditions(ConditionName.isTouchScreenPortrait)?"pl-text-secondary-200":"pl-text-secondary-700 dark:pl-text-secondary-200"} pl-two-line pl-leading-[14px] ${r}`,children:s}),!conditions(ConditionName.isTouchScreenLandscape)&&!m&&a&&jsxRuntime.jsx("div",{className:"pl-flex pl-w-full pl-flex-1 pl-overflow-auto",children:jsxRuntime.jsx(Tags,{tagId:`${b}`,tags:a})}),jsxRuntime.jsx("div",{className:"pl-flex pl-items-end pl-gap-[3px] pl-text-[8px] pl-font-medium pl-text-secondary-500 dark:pl-text-secondary-300",children:e==="playlist"&&O===1||e==="vod"&&(O===1||O===0)?jsxRuntime.jsxs("div",{className:`pl-flex pl-items-center pl-gap-10 ${o?"pl-justify-between":"pl-justify-end"} pl-w-full pl-pl-2`,children:[!!o&&jsxRuntime.jsxs("p",{className:"pl-text-[9px] pl-font-medium pl-text-dark-4",children:[translate().production," ",o]}),!!E&&jsxRuntime.jsxs("div",{className:"pl-flex pl-items-center pl-rounded-[8px] pl-bg-warning pl-text-secondary-800",children:[jsxRuntime.jsx("p",{className:"pl-rounded-r-[24px] pl-bg-orange-100/[0.4] pl-px-1 pl-pt-0.5 pl-text-center pl-text-[8px] pl-font-extrabold",children:"IMDB"}),jsxRuntime.jsx("p",{className:"pl-pl-[7px] pl-pr-1 pl-pt-0.5 pl-text-center pl-text-[8px] pl-font-bold",children:E})]})]}):jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[o&&jsxRuntime.jsx("p",{className:l,children:getRemainingTime(o)}),!!d&&jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx("span",{children:"."}),jsxRuntime.jsxs("div",{className:`pl-flex pl-items-center pl-gap-1 ${f}`,children:[jsxRuntime.jsxs("div",{className:"pl-relative pl-top-[1px] pl-flex pl-items-center pl-gap-0.5 pl-text-secondary-500 dark:pl-text-secondary-300",children:[jsxRuntime.jsx("div",{children:unitization(d).unit}),jsxRuntime.jsx("div",{children:unitization(d).value})]}),e==="live"?jsxRuntime.jsx("p",{children:"نفر در حال تماشا"}):jsxRuntime.jsx("p",{children:translate().visit})]})]}),!!_&&jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx("span",{children:"."}),jsxRuntime.jsxs("div",{className:"pl-flex pl-items-center pl-gap-1",children:[jsxRuntime.jsxs("div",{className:"pl-relative pl-top-[1px] pl-flex pl-items-center pl-gap-0.5 pl-text-secondary-500 dark:pl-text-secondary-300",children:[jsxRuntime.jsx("div",{children:unitization(_).unit}),jsxRuntime.jsx("div",{children:unitization(_).value})]}),jsxRuntime.jsx("p",{children:translate().viewPoint})]})]}),!!R&&jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx("span",{children:"."}),jsxRuntime.jsxs("div",{className:"pl-flex pl-items-center pl-gap-1",children:[jsxRuntime.jsx("img",{src:IMAGES.starSlash,className:"!pl-mb-[1px]",width:12,height:12}),jsxRuntime.jsx("p",{children:R})]})]})]})})]})]})},SinglePlayList=({playList:i})=>{const[e,t]=React2.useState([]),{params:n}=useAppSelector(({videoData:{params:s,isComplexDesktop:r,isComplexPortrait:a}})=>({params:s,isComplexDesktop:r,isComplexPortrait:a}),shallowEqual);return useAppSelector(({controller:{isFullScreen:s}})=>({isFullScreen:s}),shallowEqual),React2.useEffect(()=>{t(i.videos)},[i.videos.length]),jsxRuntime.jsx(jsxRuntime.Fragment,{children:e.length?e.map((s,r)=>jsxRuntime.jsx("div",{id:`playList-${s.video.id}`,className:`pl-relative pl-overflow-hidden ${s.video.id===+n.id&&"pl-bg-secondary-200 dark:pl-bg-dark-2"} ${(conditions(ConditionName.isTouchScreen)||conditions(ConditionName.isFullScreen))&&"pl-px-3"}`,style:{height:conditions(ConditionName.isComplexDesktop)?98:80},children:jsxRuntime.jsx(PlayerCard,{id:s.video.id,tags:s.video.tag,src:s.video.banner,type:s.video.type,isVideo:!1,width:conditions(ConditionName.isComplexDesktop)?174:conditions(ConditionName.isComplexPortrait)||conditions(ConditionName.isTouchScreenLandscape)||conditions(ConditionName.isFullScreen)||!conditions(ConditionName.isFullScreen)&&!conditions(ConditionName.isParamsPortrait)?142:window.innerWidth,height:conditions(ConditionName.isComplexDesktop)?98:conditions(ConditionName.isComplexPortrait)||conditions(ConditionName.isTouchScreenLandscape)||conditions(ConditionName.isFullScreen)||!conditions(ConditionName.isFullScreen)&&!conditions(ConditionName.isParamsPortrait)?80:window.innerWidth*9/16,duration:s.video.duration,title:s.video.title,isComplexDesktop:conditions(ConditionName.isComplexDesktop),viewers:s.video.viewers,date:s.video.start_time,onClick:a=>s.video.id!==+n.id&&handleVideoOfPlaylistClick(a,i.id,s.video.id,s.video.type,r)})},s.video.id)):jsxRuntime.jsx(jsxRuntime.Fragment,{})})},PlayListVideoCards=i=>{const[e,t]=React2.useState(!1),[n,s]=React2.useState(!0);React2.useEffect(()=>{document.getElementById("playlistTab")&&conditions(ConditionName.isComplexDesktop)&&r()},[document.getElementById("playlistTab")]);const r=()=>s(!!document.getElementById("playlistTab")&&Math.abs(Math.abs(document.getElementById("playlistTab").scrollWidth)-(document.getElementById("playlistTab").getBoundingClientRect().width+Math.abs(document.getElementById("playlistTab").scrollLeft)))<=1);return jsxRuntime.jsx(jsxRuntime.Fragment,{children:jsxRuntime.jsxs("div",{className:"pl-flex pl-flex-col pl-gap-2",children:[jsxRuntime.jsxs("div",{className:"pl-relative pl-mx-4 pl-flex pl-flex-col",onMouseOut:()=>t(!1),onMouseOver:()=>t(!0),children:[conditions(ConditionName.isComplexDesktop)&&e&&!n&&jsxRuntime.jsx("div",{className:"bg-red-500 pl-absolute pl-left-0 pl-flex",onClick:a=>handleScrollLeft(a,"playlistTab"),style:{width:10,height:10},children:jsxRuntime.jsx("img",{src:conditions(ConditionName.isDarkMode)?IMAGES.rightArrow:IMAGES.lightRightArrow,className:"pl-size-full pl-cursor-pointer",alt:"right-arrow"})}),jsxRuntime.jsx("div",{className:"no-scrollbar pl-flex pl-w-full pl-items-center pl-gap-10 pl-overflow-auto",id:"playlistTab",children:i.playList.length>1?i.playList.map(a=>jsxRuntime.jsxs("div",{onClick:()=>i.onClick(a.id),className:`${a.id===i.selectedPlaylist?"!pl-text-z-gray-800 dark:!pl-text-white":"!pl-text-[#939598]"} pl-w-fit pl-cursor-pointer !pl-whitespace-nowrap pl-text-[14px] pl-font-[700] pl-text-secondary-900 dark:pl-text-secondary-50`,children:[a.title,a.id===i.selectedPlaylist&&jsxRuntime.jsx("div",{className:"pl-h-[3px] pl-w-full pl-rounded-t-[4px] pl-bg-gray-800 dark:pl-bg-white"})]},a.id)):jsxRuntime.jsx(jsxRuntime.Fragment,{})}),conditions(ConditionName.isComplexDesktop)&&e&&!n&&jsxRuntime.jsx("div",{className:"pl-absolute pl-right-0 pl-flex",onClick:a=>handleScrollRight(a,"playlistTab"),style:{width:10,height:10},children:jsxRuntime.jsx("img",{src:conditions(ConditionName.isDarkMode)?IMAGES.leftArrow:IMAGES.lightLeftArrow,className:"pl-size-full pl-cursor-pointer",alt:"left-arrow"})}),i.playList.length>1&&jsxRuntime.jsx("hr",{})]}),jsxRuntime.jsx("div",{className:"pl-flex pl-flex-col pl-gap-2",children:i.videoPlaylist!==void 0&&jsxRuntime.jsx(SinglePlayList,{playList:{title:i.playList.map(a=>a.id===i.selectedPlaylist).title,videos:i.videoPlaylist}})})]})})},useIntersect=i=>{const e=React2.useRef(null),t=React2.useRef(new IntersectionObserver(n=>i(n),{root:null,rootMargin:"0px",threshold:.5}));return React2.useEffect(()=>(e.current&&t.current.observe(e.current),()=>{e.current&&t.current.unobserve(e.current)}),[]),e},TouchScreenPlaylistObserver=({setScrollEnd:i})=>{const{playListPopover:e}=useAppSelector(({popovers:{playListPopover:s}})=>({playListPopover:s}),shallowEqual),n=useIntersect(([s])=>{s.isIntersecting&&e&&i(!0)});return jsxRuntime.jsx("div",{id:"observer",className:"pl-bg-transparent pl-pt-5",ref:n})},PlayList=()=>{const i=useAppDispatch(),{playList:e}=useAppSelector(({videoData:{params:b,playList:C,isComplexDesktop:_,isComplexPortrait:R,videoElementSizeInfo:E}})=>({params:b,playList:C,isComplexDesktop:_,isComplexPortrait:R,videoElementSizeInfo:E}),shallowEqual),{playListPopover:t}=useAppSelector(({popovers:{playListPopover:b}})=>({playListPopover:b}),shallowEqual);useAppSelector(({controller:{isFullScreen:b}})=>({isFullScreen:b}),shallowEqual);const[n,s]=React2.useState(!1),[r,a]=React2.useState(void 0),[o,l]=React2.useState(e[0].id),d=React2.useRef(null);React2.useEffect(()=>{n&&(r===void 0||e.find(b=>b.id===o).count!==r.length)?f():s(!1)},[n]),React2.useEffect(()=>{f()},[]),React2.useEffect(()=>{r&&conditions(ConditionName.isComplexDesktop)&&!conditions(ConditionName.isFullScreen)&&(d.current=r)},[r]);const f=async()=>{const b=r!==void 0?r:[],{data:C,status:_}=await getPlaylistVideos(o,b.length);responseValidator(_)&&a([...b,...C.results]),s(!1)},p=useIntersect(([b])=>{b.isIntersecting&&conditions(ConditionName.isComplexDesktop)&&d.current&&s(!0)}),m=()=>{i(setPlayListPopover(!1)),a(void 0)},g=jsxRuntime.jsxs("div",{className:"pl-flex pl-items-center pl-justify-between pl-gap-2 pl-py-3",children:[jsxRuntime.jsx("p",{className:"pl-text-[16px] pl-font-medium pl-text-black dark:pl-text-gray-100",children:e.length===1?`${translate().playlist} "${e[0].title}"`:translate().playlist}),jsxRuntime.jsx("div",{className:"pl-cursor-pointer pl-rounded-[4px] pl-bg-gray-100 pl-p-1",onClick:m,children:jsxRuntime.jsx(CloseIcon,{className:"pl-h-3 pl-w-3 pl-stroke-gray-800"})})]}),y=jsxRuntime.jsx(PlayListVideoCards,{onClick:b=>{l(b),a(void 0),sendFluentLog(playListClickLog(b))},playList:e,scrollEnd:n,selectedPlaylist:o,videoPlaylist:r});let v=null;return conditions(ConditionName.isFullScreen)?v=jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx("div",{className:"pl-flex pl-cursor-pointer pl-items-center",onClick:handlePlayListTabClick,children:jsxRuntime.jsx("img",{src:IMAGES.playList,alt:"playList-icon",width:conditions(ConditionName.isFullMobilePortrait)||!conditions(ConditionName.isMiniPlayer)?controllbarIconSize.other:controllbarIconSize.miniPlayer,height:conditions(ConditionName.isFullMobilePortrait)||!conditions(ConditionName.isMiniPlayer)?controllbarIconSize.other:controllbarIconSize.miniPlayer})}),jsxRuntime.jsx(Popover,{status:t,onClose:m,isHeader:!0,customHeader:g,isBlurBackground:!0,type:"modal",classNames:`!pl-max-w-[340px] dvh pl-rounded-r-none ${conditions(ConditionName.isDarkMode)?"!pl-bg-dark-3":"!pl-bg-white"}`,animation:t?"animate__fadeInRight":"animate__fadeOutRight",parentClassNames:"!pl-justify-start",children:jsxRuntime.jsxs("div",{className:"pl-mb-4 pl-flex pl-flex-col pl-gap-4",children:[y,t&&jsxRuntime.jsx(TouchScreenPlaylistObserver,{setScrollEnd:s})]})})]}):conditions(ConditionName.isTouchScreenPortrait)?v=jsxRuntime.jsx(Popover,{classNames:"!pl-p-0 pl-left-0",status:t,onClose:()=>{i(setPlayListPopover(!1)),a(void 0)},ref:void 0,isFullHeight:!0,headerTitle:e.length===1?`${translate().playlist} "${e[0].title}"`:translate().playlist,isHeader:!0,customHeader:g,type:"modal",isHasCatchUpLineOnTop:!0,children:jsxRuntime.jsxs("div",{className:"pl-mb-4 pl-flex pl-flex-col pl-gap-4",children:[y,t&&jsxRuntime.jsx(React2.Suspense,{fallback:"",children:jsxRuntime.jsx(TouchScreenPlaylistObserver,{setScrollEnd:s})})]})}):conditions(ConditionName.isComplexDesktop)&&(v=jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsxs("div",{className:"pl-mb-4 pl-flex pl-flex-col pl-gap-4 pl-overflow-auto",children:[jsxRuntime.jsx("p",{className:"pl-ml-6 pl-border-b pl-border-secondary-400 pl-pb-3 pl-text-[16px] pl-font-bold pl-text-secondary-900 dark:pl-text-secondary-50",children:e.length===1?`${translate().playlist} "${e[0].title}"`:translate().playlists}),y,jsxRuntime.jsx("div",{id:"observer",className:"pl-bg-transparent pl-pt-5",ref:p})]}),jsxRuntime.jsx("div",{className:"pl-ml-6 pl-h-[1px] pl-w-auto pl-bg-secondary-400 dark:pl-bg-secondary-100"})]})),jsxRuntime.jsx(jsxRuntime.Fragment,{children:v})},PlayList$1=React2.memo(PlayList),PictureInPicture=()=>{const[i,e]=React2.useState(!1);return useAppSelector(({controller:{showMiniPlayer:t}})=>({showMiniPlayer:t}),shallowEqual),useAppSelector(({videoData:{videoElementSizeInfo:t,params:n}})=>({videoElementSizeInfo:t,params:n}),shallowEqual),jsxRuntime.jsxs("div",{className:"pl-relative pl-flex pl-items-center",children:[jsxRuntime.jsx("img",{onMouseOver:()=>!conditions(ConditionName.isTouchScreen)&&e(!0),onMouseLeave:()=>!conditions(ConditionName.isTouchScreen)&&e(!1),src:IMAGES.pictureInPicture,width:conditions(ConditionName.isFullMobilePortrait)||!conditions(ConditionName.isMiniPlayer)?controllbarIconSize.other:controllbarIconSize.miniPlayer,height:conditions(ConditionName.isFullMobilePortrait)||!conditions(ConditionName.isMiniPlayer)?controllbarIconSize.other:controllbarIconSize.miniPlayer,className:"pl-flex pl-cursor-pointer",onClick:()=>videoTag().requestPictureInPicture()}),i&&jsxRuntime.jsx(ControllbarTooltip,{title:`${translate().pictureInPicture} (i)`,className:"!pl-right-[-48px]"})]})},MultiLiveDialog=({status:i,onClose:e})=>{const{params:t,multiLives:n}=useAppSelector(({videoData:{params:o,multiLives:l,isComplexPortrait:d}})=>({params:o,multiLives:l,isComplexPortrait:d}),shallowEqual),s=React2.useRef(),r=o=>{let l="";return o.alternative_banner?l=o.alternative_banner:o.banner&&(l=o.banner),l};useOnClickOutside(s,()=>e(!1));const a=conditions(ConditionName.isComplexPortrait)?jsxRuntime.jsx("div",{className:"pl-mx-3 pl-flex pl-flex-col pl-gap-3",children:n.length>0&&n.map((o,l)=>jsxRuntime.jsx("div",{className:"pl-flex pl-w-full",style:{height:80},children:jsxRuntime.jsx(PlayerCard,{tags:o.tag,id:o.id,userId:o.user_id,width:142,height:80,src:l===0?"":r(o),isVideo:l===0,type:"live",title:o.title,viewers:o.viewers,onClick:()=>sendFluentLog(alternativeLiveLog(o.user_id))})},o.id))}):jsxRuntime.jsxs("div",{className:"pl-flex pl-h-screen pl-w-screen pl-flex-col pl-items-start pl-justify-between pl-px-3 pl-pt-[15px]",children:[jsxRuntime.jsxs("div",{className:"pl-flex pl-gap-3 pl-text-white",children:[jsxRuntime.jsx(CloseIcon,{className:"pl-h-6 pl-w-6 pl-cursor-pointer pl-stroke-dark-5",onClick:()=>e(!1)}),jsxRuntime.jsx("p",{className:"pl-text-[16px] pl-font-bold",children:"پخش زنده های دیگر"})]}),jsxRuntime.jsx("div",{className:"no-scrollbar pl-mb-3 pl-flex pl-w-auto pl-gap-4 pl-overflow-auto",ref:s,children:n.length>0&&n.map((o,l)=>jsxRuntime.jsx("div",{className:"pl-flex pl-w-full pl-cursor-pointer",style:{height:"100%"},children:jsxRuntime.jsx(PlayerCard,{tags:o.tag,id:o.id,userId:o.user_id,isMultiLive:!0,width:240,height:135,src:l===0?"":r(o),isVideo:l===0,type:"live",title:o.title,onClick:()=>sendFluentLog(alternativeLiveLog(o.user_id))},o.id)},o.id))})]});return jsxRuntime.jsx(Popover,{status:i,onClose:e,styles:{width:"100%"},isFullHeight:conditions(ConditionName.isComplexPortrait),isHeader:conditions(ConditionName.isComplexPortrait),headerTitle:conditions(ConditionName.isComplexPortrait)?"پخش زنده های دیگر":"",type:"modal",isHasCatchUpLineOnTop:conditions(ConditionName.isComplexPortrait),classNames:`${conditions(ConditionName.isComplexPortrait)&&t.theme==="light"?"!pl-bg-white":"!pl-bg-black/[0.7]"}`,children:a})},MultiLivesIcon=({className:i,width:e,height:t,strokeColor:n,onClick:s})=>jsxRuntime.jsx(jsxRuntime.Fragment,{children:conditions(ConditionName.isComplexPortrait)?jsxRuntime.jsxs("svg",{viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:i,width:e,height:t,children:[jsxRuntime.jsx("path",{d:"M11.332 15.167H4.66536C2.23203 15.167 0.832031 13.767 0.832031 11.3337V8.00033C0.832031 5.56699 2.23203 4.16699 4.66536 4.16699H11.332C13.7654 4.16699 15.1654 5.56699 15.1654 8.00033V11.3337C15.1654 13.767 13.7654 15.167 11.332 15.167ZM4.66536 5.16699C2.7587 5.16699 1.83203 6.09366 1.83203 8.00033V11.3337C1.83203 13.2403 2.7587 14.167 4.66536 14.167H11.332C13.2387 14.167 14.1654 13.2403 14.1654 11.3337V8.00033C14.1654 6.09366 13.2387 5.16699 11.332 5.16699H4.66536Z"}),jsxRuntime.jsx("path",{d:"M12 3.5H4C3.72667 3.5 3.5 3.27333 3.5 3C3.5 2.72667 3.72667 2.5 4 2.5H12C12.2733 2.5 12.5 2.72667 12.5 3C12.5 3.27333 12.2733 3.5 12 3.5Z"}),jsxRuntime.jsx("path",{d:"M10 1.83301H6C5.72667 1.83301 5.5 1.60634 5.5 1.33301C5.5 1.05967 5.72667 0.833008 6 0.833008H10C10.2733 0.833008 10.5 1.05967 10.5 1.33301C10.5 1.60634 10.2733 1.83301 10 1.83301Z"}),jsxRuntime.jsx("path",{d:"M6.43109 8.56822C6.43109 8.06804 6.97255 7.75543 7.40571 8.00552L9.50646 9.21839C9.93963 9.46848 9.93963 10.0937 9.50646 10.3438L7.40571 11.5567C6.97255 11.8067 6.43109 11.4941 6.43109 10.994L6.43109 8.56822Z","stroke-width":"0.8"})]}):jsxRuntime.jsxs("svg",{viewBox:"0 0 22 22",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:i,width:e,height:t,onClick:s,children:[jsxRuntime.jsx("path",{d:"M15.582 20.854H6.41536C3.06953 20.854 1.14453 18.929 1.14453 15.5832V10.9998C1.14453 7.654 3.06953 5.729 6.41536 5.729H15.582C18.9279 5.729 20.8529 7.654 20.8529 10.9998V15.5832C20.8529 18.929 18.9279 20.854 15.582 20.854ZM9.6237 10.9998C8.2487 11.4582 9.16537 13.8782 9.16537 16.4998L6.8737 16.9582C6.8737 19.5798 4.25203 16.4998 6.8737 16.4998L10.5404 15.5832L13.2904 13.7498L15.582 11.9165C18.2037 11.9165 18.332 14.2082 19.707 14.2082L14.207 17.8748C14.207 15.2532 17.7454 14.2082 15.1237 14.2082L9.6237 10.9998Z",fill:"white"}),jsxRuntime.jsx("path",{d:"M16.5 4.8125H5.5C5.12417 4.8125 4.8125 4.50083 4.8125 4.125C4.8125 3.74917 5.12417 3.4375 5.5 3.4375H16.5C16.8758 3.4375 17.1875 3.74917 17.1875 4.125C17.1875 4.50083 16.8758 4.8125 16.5 4.8125Z",fill:"white"}),jsxRuntime.jsx("path",{d:"M13.75 2.521H8.25C7.87417 2.521 7.5625 2.20933 7.5625 1.8335C7.5625 1.45766 7.87417 1.146 8.25 1.146H13.75C14.1258 1.146 14.4375 1.45766 14.4375 1.8335C14.4375 2.20933 14.1258 2.521 13.75 2.521Z",fill:"white"}),jsxRuntime.jsx("path",{d:"M8.99497 11.5003C8.99497 11.0552 9.47684 10.7769 9.86233 10.9995L13.2347 12.9465C13.6202 13.1691 13.6202 13.7255 13.2347 13.9481L9.86233 15.8951C9.47684 16.1177 8.99497 15.8395 8.99497 15.3943L8.99497 11.5003Z",stroke:n,"stroke-width":"0.4"})]})}),MultiLiveIcon=i=>{useAppSelector(({videoData:{isComplexPortrait:t}})=>({isComplexPortrait:t}),shallowEqual);let e=jsxRuntime.jsx(jsxRuntime.Fragment,{});return e=jsxRuntime.jsx("div",{className:"pl-cursor-pointer",...i,children:jsxRuntime.jsx(MultiLivesIcon,{className:`${conditions(ConditionName.isComplexPortrait)?"pl-fill-gray-800 dark:pl-fill-dark-5":"pl-fill-dark-5"}`,width:conditions(ConditionName.isFullMobilePortrait)||!conditions(ConditionName.isMiniPlayer)?controllbarIconSize.other:controllbarIconSize.miniPlayer,height:conditions(ConditionName.isFullMobilePortrait)||!conditions(ConditionName.isMiniPlayer)?controllbarIconSize.other:controllbarIconSize.miniPlayer,strokeColor:conditions(ConditionName.isComplexPortrait)?"":"black"})}),conditions(ConditionName.isComplexPortrait)&&(e=jsxRuntime.jsxs("div",{className:"pl-flex pl-cursor-pointer pl-items-center pl-gap-[14px] pl-rounded-[20px] pl-bg-gray-100 pl-px-4 pl-py-[7px] pl-text-secondary-700 dark:pl-bg-dark-3 dark:pl-text-secondary-50",onClick:i.onClick,children:[e,jsxRuntime.jsx("span",{className:"pl-whitespace-nowrap",children:"چند دوربینی"})]})),jsxRuntime.jsx(jsxRuntime.Fragment,{children:e})},MultiLive=()=>{const[i,e]=React2.useState(!1),t=useAppDispatch(),{alternative_Lives:n,multiLives:s}=useAppSelector(({videoData:{alternative_Lives:o,multiLives:l}})=>({alternative_Lives:o,multiLives:l}),shallowEqual),{multiLivesPopover:r}=useAppSelector(({popovers:{multiLivesPopover:o}})=>({multiLivesPopover:o}),shallowEqual),a=async()=>{t(setClearPopoversSlice()),t(setMultiLivesPopovers(!0));const{data:o,status:l}=await apiCaller({url:API().live.multiLives,method:"POST",data:{user_ids:[...n]}});responseValidator(l)&&t(setMultiLives(o))};return React2.useEffect(()=>{if(!conditions(ConditionName.showMultiLivePopover)&&s.length>0&&multiLiveVideo()){const o=multiLiveVideo();o.pause(),o.removeAttribute("src"),o.load()}},[r]),jsxRuntime.jsxs("div",{className:"pl-relative pl-flex pl-items-center",children:[jsxRuntime.jsx(MultiLiveIcon,{onClick:a,onMouseOver:()=>!conditions(ConditionName.isTouchScreen)&&e(!0),onMouseLeave:()=>!conditions(ConditionName.isTouchScreen)&&e(!1)}),i&&jsxRuntime.jsx(ControllbarTooltip,{title:"پخش زنده های دیگر (q)",className:"pl-right-[-35px]"}),jsxRuntime.jsx(MultiLiveDialog,{status:conditions(ConditionName.showMultiLivePopover),onClose:()=>t(setMultiLivesPopovers(!1))})]})},AutoPlayToggle=()=>{const{isAutoPlay:i}=useAppSelector(({controller:{isAutoPlay:r}})=>({isAutoPlay:r}),shallowEqual),[e,t]=React2.useState(!1),n=useAppDispatch(),s=()=>{n(setIsAutoPlay(!i)),localStorage.setItem("isAutoPlay",`${conditions(ConditionName.isAutoPlay)}`),conditions(ConditionName.isTouchScreenLandscape)&&!conditions(ConditionName.isAutoPlay)&&n(setRecommendListPopover(!0))};return jsxRuntime.jsxs("div",{className:"pl-relative",children:[jsxRuntime.jsx("div",{className:"pl-relative pl-flex pl-h-[14px] pl-w-[24px] pl-cursor-pointer pl-items-center pl-rounded-[15px] pl-border pl-border-white pl-transition-colors pl-duration-150 pl-ease-linear",onClick:s,onDoubleClick:r=>r.stopPropagation(),onMouseOver:()=>!conditions(ConditionName.isTouchScreen)&&t(!0),onMouseLeave:()=>!conditions(ConditionName.isTouchScreen)&&t(!1),children:jsxRuntime.jsx("div",{className:`pl-absolute pl-bottom-[-3px] pl-h-[18px] pl-w-[18px] pl-rounded-full pl-bg-white pl-transition-transform pl-duration-150 pl-ease-linear ${conditions(ConditionName.isAutoPlay)?"pl-translate-x-[10px]":"pl-translate-x-[-15px]"}`,children:jsxRuntime.jsx("div",{className:"pl-flex pl-h-full pl-w-full pl-items-center pl-justify-center pl-gap-0.5",children:conditions(ConditionName.isAutoPlay)?jsxRuntime.jsx("img",{src:IMAGES.play,width:8,height:8}):jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx("span",{className:"pl-inline-block pl-h-[7px] pl-w-[3px] pl-bg-secondary-600"}),jsxRuntime.jsx("span",{className:"pl-inline-block pl-h-[7px] pl-w-[3px] pl-bg-secondary-600"})]})})})}),e&&jsxRuntime.jsx(ControllbarTooltip,{title:`${translate().autoPlay} ${conditions(ConditionName.isAutoPlay)?translate().bright:translate().off} ${translate().is}`,className:"!pl-bottom-[346%] !pl-right-[-48px]"})]})},ElapsedTime=()=>{const{duration:i,currentTime:e}=useAppSelector(({controller:{duration:t,currentTime:n,showMiniPlayer:s}})=>({duration:t,currentTime:n,showMiniPlayer:s}),shallowEqual);return useAppSelector(({videoData:{isComplexPortrait:t,videoElementSizeInfo:n,params:s}})=>({isComplexPortrait:t,videoElementSizeInfo:n,params:s}),shallowEqual),jsxRuntime.jsx(jsxRuntime.Fragment,{children:jsxRuntime.jsxs("div",{className:`pl-relative pl-left-2 ${conditions(ConditionName.isComplexPortrait)?"pl-text-gray-800":"!pl-text-dark-5"} dark:pl-text-dark-5 pl-w-full pl-max-w-max ${conditions(ConditionName.isMiniPlayer)&&"pl-text-[12px] pl-font-normal"}`,children:[jsxRuntime.jsx("span",{children:secondsToHMS(i)}),jsxRuntime.jsx("span",{children:" / "}),jsxRuntime.jsx("span",{children:secondsToHMS(e)})]})})},DislikeIcon=i=>(useAppSelector(({user:{videoSettings:e}})=>({videoSettings:e}),shallowEqual),useAppSelector(({videoData:{isComplexPortrait:e,videoElementSizeInfo:t,params:n}})=>({isComplexPortrait:e,videoElementSizeInfo:t,params:n}),shallowEqual),useAppSelector(({controller:{showMiniPlayer:e}})=>({showMiniPlayer:e}),shallowEqual),jsxRuntime.jsx(jsxRuntime.Fragment,{children:jsxRuntime.jsxs("svg",{width:conditions(ConditionName.isMiniPlayer)?13:conditions(ConditionName.isComplexPortrait)?16:22,height:conditions(ConditionName.isMiniPlayer)?13:conditions(ConditionName.isComplexPortrait)?16:22,viewBox:"0 0 22 22",fill:"none",xmlns:"http://www.w3.org/2000/svg",onClick:i.onClick,onDoubleClick:i.onDoubleClick,className:i.className,children:[jsxRuntime.jsx("path",{d:"M7.6909 5.04091V14.3542C7.6909 14.7209 7.8009 15.0784 8.00257 15.3809L10.5051 19.1026C10.8992 19.6984 11.8801 20.1201 12.7142 19.8084C13.6126 19.5059 14.2084 18.4976 14.0159 17.5992L13.5392 14.6017C13.5026 14.3267 13.5759 14.0792 13.7317 13.8867C13.8876 13.7126 14.1167 13.6026 14.3642 13.6026H18.1317C18.8559 13.6026 19.4792 13.3092 19.8459 12.7959C20.1942 12.3009 20.2584 11.6592 20.0292 11.0084L17.7742 4.14258C17.4901 3.00591 16.2526 2.08008 15.0242 2.08008H11.4492C10.8351 2.08008 9.9734 2.29091 9.57923 2.68508L8.4059 3.59258C7.95673 3.94091 7.6909 4.47258 7.6909 5.04091Z"}),jsxRuntime.jsx("path",{d:"M4.77608 16.143H3.83192C2.41108 16.143 1.83358 15.593 1.83358 14.2364V5.02385C1.83358 3.66719 2.41108 3.11719 3.83192 3.11719H4.77608C6.19691 3.11719 6.77441 3.66719 6.77441 5.02385V14.2455C6.77441 15.593 6.19691 16.143 4.77608 16.143Z"})]})})),LikeIcon=i=>(useAppSelector(({videoData:{isComplexPortrait:e,videoElementSizeInfo:t,params:n}})=>({isComplexPortrait:e,videoElementSizeInfo:t,params:n}),shallowEqual),useAppSelector(({controller:{showMiniPlayer:e}})=>({showMiniPlayer:e}),shallowEqual),jsxRuntime.jsx(jsxRuntime.Fragment,{children:jsxRuntime.jsxs("svg",{width:conditions(ConditionName.isMiniPlayer)?13:conditions(ConditionName.isComplexPortrait)?16:22,height:conditions(ConditionName.isMiniPlayer)?13:conditions(ConditionName.isComplexPortrait)?16:22,viewBox:"0 0 22 22",fill:"none",xmlns:"http://www.w3.org/2000/svg",onClick:i.onClick,onDoubleClick:i.onDoubleClick,className:i.className,children:[jsxRuntime.jsx("path",{d:"M14.3096 16.9492V7.63583C14.3096 7.26916 14.1996 6.91166 13.9979 6.60916L11.4954 2.8875C11.1012 2.29166 10.1204 1.87 9.28624 2.18166C8.3879 2.48416 7.79207 3.4925 7.98457 4.39083L8.46124 7.38833C8.4979 7.66333 8.42457 7.91083 8.26874 8.10333C8.1129 8.2775 7.88374 8.3875 7.63624 8.3875H3.86874C3.14457 8.3875 2.52124 8.68083 2.15457 9.19416C1.80624 9.68916 1.74207 10.3308 1.97124 10.9817L4.22624 17.8475C4.5104 18.9842 5.7479 19.91 6.97624 19.91H10.5512C11.1654 19.91 12.0271 19.6992 12.4212 19.305L13.5946 18.3975C14.0437 18.0583 14.3096 17.5175 14.3096 16.9492Z"}),jsxRuntime.jsx("path",{d:"M17.2245 5.84766H18.1687C19.5895 5.84766 20.167 6.39766 20.167 7.75432V16.976C20.167 18.3327 19.5895 18.8827 18.1687 18.8827H17.2245C15.8037 18.8827 15.2262 18.3327 15.2262 16.976V7.75432C15.2262 6.39766 15.8037 5.84766 17.2245 5.84766Z"})]})})),LikeDisLike=()=>{const i=useAppDispatch(),{details:e}=useAppSelector(({videoData:{details:u,isComplexPortrait:p,isComplexDesktop:m,videoElementSizeInfo:g,params:y}})=>({details:u,isComplexPortrait:p,isComplexDesktop:m,videoElementSizeInfo:g,params:y}),shallowEqual),{videoSettings:t}=useAppSelector(({user:{videoSettings:u,settings:p}})=>({videoSettings:u,settings:p}),shallowEqual);useAppSelector(({controller:{showMiniPlayer:u}})=>({showMiniPlayer:u}),shallowEqual);const[n,s]=React2.useState(e.like?e.like:0),[r,a]=React2.useState(!1),o=async u=>{a(!0),t.is_like===null?u==="like"?(await apiCaller({url:API().like,data:{uuid:getUUID(),user_id:e.user_id?e.user_id:void 0}}),i(setVideoSettings({...t,is_like:!0})),createVideoSettings({...t,is_like:!0}),sendFluentLog(likeDislikeLog("like")),s(p=>p+1),a(!1)):(await apiCaller({url:API().dislike,data:{uuid:getUUID(),user_id:e.user_id?e.user_id:void 0}}),i(setVideoSettings({...t,is_like:!1})),createVideoSettings({...t,is_like:!1}),sendFluentLog(likeDislikeLog("dislike")),a(!1)):t.is_like===!0?u==="like"?(await apiCaller({url:API().unlike,data:{uuid:getUUID(),user_id:e.user_id?e.user_id:void 0}}),i(setVideoSettings({...t,is_like:null})),createVideoSettings({...t,is_like:null}),sendFluentLog(likeDislikeLog("unlike")),s(p=>p-1),a(!1)):(await apiCaller({url:API().dislike,data:{uuid:getUUID(),user_id:e.user_id?e.user_id:void 0}}),i(setVideoSettings({...t,is_like:!1})),createVideoSettings({...t,is_like:!1}),sendFluentLog(likeDislikeLog("dislike")),s(p=>p-1),a(!1)):t.is_like===!1&&(u==="like"?(await apiCaller({url:API().like,data:{uuid:getUUID(),user_id:e.user_id?e.user_id:void 0}}),i(setVideoSettings({...t,is_like:!0})),createVideoSettings({...t,is_like:!0}),sendFluentLog(likeDislikeLog("like")),s(p=>p+1),a(!1)):(await apiCaller({url:API().undislike,data:{uuid:getUUID(),user_id:e.user_id?e.user_id:void 0}}),i(setVideoSettings({...t,is_like:null})),createVideoSettings({...t,is_like:null}),sendFluentLog(likeDislikeLog("unDislike")),a(!1)))},l=()=>{let u="";return t.is_like===!0?conditions(ConditionName.isComplexDesktop)||conditions(ConditionName.isComplexPortrait)?u=`${u} pl-fill-secondary-700 dark:pl-fill-dark-5`:u=`${u} pl-fill-dark-5`:conditions(ConditionName.isComplexDesktop)?u=`${u} pl-stroke-secondary-700 dark:pl-stroke-secondary-50`:conditions(ConditionName.isComplexPortrait)?u=`${u} pl-stroke-gray-800 dark:pl-stroke-dark-5`:u=`${u} pl-stroke-dark-5`,u},d=()=>{let u="";return t.is_like===!1?conditions(ConditionName.isComplexDesktop)||conditions(ConditionName.isComplexPortrait)?u=`${u} pl-fill-secondary-700 dark:pl-fill-dark-5`:u=`${u} pl-fill-dark-5`:conditions(ConditionName.isComplexDesktop)?u=`${u} pl-stroke-secondary-700 dark:pl-stroke-secondary-50`:conditions(ConditionName.isComplexPortrait)?u=`${u} pl-stroke-gray-800 dark:pl-stroke-dark-5`:u=`${u} pl-stroke-dark-5`,u},f=()=>{let u="";return conditions(ConditionName.isComplexPortrait)?u="pl-text-z-gray-500 dark:pl-text-secondary-50":conditions(ConditionName.isComplexDesktop)?u="pl-text-secondary-700 dark:pl-text-dark-5":u="pl-text-dark-5",u};return jsxRuntime.jsxs("div",{className:`pl-relative pl-flex pl-items-center ${conditions(ConditionName.isComplexDesktop)||conditions(ConditionName.isComplexPortrait)?"pl-bg-gray-100 dark:pl-bg-dark-3":"pl-border pl-border-dark-5"} pl-rounded-[80px]`,onDoubleClick:u=>u.stopPropagation(),children:[jsxRuntime.jsx("div",{className:`pl-cursor-pointer pl-px-2 pl-rounded-r-[80px] pl-py-[6px] ${conditions(ConditionName.isComplexDesktop)&&"pl-transition-colors pl-duration-500 hover:pl-bg-gray-300 dark:hover:pl-bg-dark-10/[0.9]"}`,children:jsxRuntime.jsx(DislikeIcon,{className:`${d()}`,onClick:()=>!r&&o("dislike"),onDoubleClick:u=>u.stopPropagation(),isDislike:t.is_like===!1})}),jsxRuntime.jsx("div",{className:`pl-absolute pl-w-[1px] pl-h-4 ${conditions(ConditionName.isComplexDesktop)||conditions(ConditionName.isComplexPortrait)?"pl-bg-z-gray-700 dark:pl-bg-dark-4":"pl-bg-dark-5"} pl-relative ${conditions(ConditionName.isMiniPlayer),"pl-bottom-[1px]"}`}),jsxRuntime.jsxs("div",{className:`pl-flex pl-items-center pl-gap-2 pl-cursor-pointer pl-px-2 ${conditions(ConditionName.isMiniPlayer)?"pl-py-[3px]":"pl-py-[6px]"} pl-rounded-l-[80px] ${conditions(ConditionName.isComplexDesktop)&&"pl-transition-colors pl-duration-500 hover:pl-bg-gray-300 dark:hover:pl-bg-dark-10/[0.9]"}`,onClick:()=>!r&&o("like"),children:[jsxRuntime.jsx(LikeIcon,{className:`${l()}`,isLike:t.is_like===!0}),jsxRuntime.jsxs("div",{className:`pl-flex pl-items-center pl-gap-0.5 ${f()} pl-text-[14px] pl-font-bold pl-relative pl-top-[1px]`,children:[jsxRuntime.jsx("div",{children:unitization(n).unit}),jsxRuntime.jsx("div",{children:unitization(n).value})]})]})]})},SoundVolumeIcon=i=>jsxRuntime.jsx(jsxRuntime.Fragment,{children:jsxRuntime.jsx("img",{src:conditions(ConditionName.hasSound)?IMAGES.unMute:IMAGES.mute,alt:conditions(ConditionName.hasSound)?"unmute-icon":"mute-icon",className:"pl-flex pl-cursor-pointer pl-items-center",width:conditions(ConditionName.isFullMobilePortrait)||!conditions(ConditionName.isMiniPlayer)?controllbarIconSize.other:controllbarIconSize.miniPlayer,height:conditions(ConditionName.isFullMobilePortrait)||!conditions(ConditionName.isMiniPlayer)?controllbarIconSize.other:controllbarIconSize.miniPlayer,...i})}),SoundVolume=()=>{const[i,e]=React2.useState(!1),t=useAppDispatch(),{settings:n}=useAppSelector(({user:{settings:o}})=>({settings:o}),shallowEqual),s=React2.useRef(n.volume),r=()=>{if(s.current!==n.volume){const{settings:o}=store.getState().user;sendFluentLog(volumeLog(s.current,o.volume)),s.current=o.volume,createSettings({...o,volume:o.volume}),t(setUserSettings({...o,volume:o.volume}))}},a=o=>{const{settings:l}=store.getState().user;o==="mute"?(handleChangeSoundVolume(0),sendFluentLog(volumeLog(l.volume,0)),createSettings({...l,volume:0})):(sendFluentLog(volumeLog(l.volume,100)),handleChangeSoundVolume(100),createSettings({...l,volume:100}))};return jsxRuntime.jsxs("div",{className:"pl-sound-icon pl-relative pl-inline-flex pl-items-center pl-gap-2",children:[!conditions(ConditionName.isTouchScreen)&&jsxRuntime.jsx("input",{onMouseUp:r,type:"range",min:"0",max:"100",value:n.volume,onChange:o=>handleChangeSoundVolume(+o.target.value),className:"pl-soundVolume pl-cursor-pointer",style:{background:`linear-gradient(to right, white ${n.volume}%, rgba(255,255,255,0.3) 0)`}}),jsxRuntime.jsxs("div",{className:"pl-relative pl-flex pl-items-center",children:[jsxRuntime.jsx(SoundVolumeIcon,{onClick:()=>conditions(ConditionName.hasSound)?a("mute"):a("unmute"),onDoubleClick:o=>o.stopPropagation(),onMouseOver:()=>!conditions(ConditionName.isTouchScreen)&&e(!0),onMouseLeave:()=>!conditions(ConditionName.isTouchScreen)&&e(!1)}),i&&jsxRuntime.jsx(React2.Suspense,{fallback:"",children:jsxRuntime.jsx(ControllbarTooltip,{className:`${conditions(ConditionName.isStaticFormat)&&"pl-absolute !pl-left-10"}`,title:`${conditions(ConditionName.hasSound)?translate().unmute:translate().mute} (m)`})})]})]})},PlayNextVideoIcon=i=>jsxRuntime.jsx("img",{src:IMAGES.playNext,width:controllbarIconSize.other,height:controllbarIconSize.other,alt:"playNext-icon",className:"pl-cursor-pointer",...i}),PlayNextVideo=()=>{const[i,e]=React2.useState(!1);return jsxRuntime.jsxs("div",{className:"pl-relative pl-flex pl-items-center",children:[jsxRuntime.jsx(PlayNextVideoIcon,{onClick:()=>window.location.href=changeVideoUrl(),onMouseOver:()=>!conditions(ConditionName.isTouchScreen)&&e(!0),onMouseLeave:()=>!conditions(ConditionName.isTouchScreen)&&e(!1)}),i&&jsxRuntime.jsx(ControllbarTooltip,{title:`${translate().playNextVideo} (n)`,className:"pl-right-[-70px]"})]})},PlayPauseIcon=i=>(useAppSelector(({controller:{play:e}})=>({play:e}),shallowEqual),jsxRuntime.jsx("img",{src:conditions(ConditionName.isPlay)?IMAGES.pause:IMAGES.playWhite,alt:"play-pause-icon",className:"pl-cursor-pointer",width:18,height:18,...i})),PlayPauseControllbar=()=>{const[i,e]=React2.useState(!1);return useAppSelector(({controller:{isEnded:t,play:n}})=>({isEnded:t,play:n}),shallowEqual),useAppSelector(({videoData:{params:t}})=>({params:t}),shallowEqual),jsxRuntime.jsxs("div",{className:"pl-relative",children:[jsxRuntime.jsx("div",{className:"pl-flex pl-items-center",onMouseOver:()=>!conditions(ConditionName.isTouchScreen)&&e(!0),onMouseLeave:()=>!conditions(ConditionName.isTouchScreen)&&e(!1),children:conditions(ConditionName.isEnded)?jsxRuntime.jsx("img",{src:IMAGES.replay,alt:"replay-icon",width:controllbarIconSize.other,height:controllbarIconSize.other,className:`${conditions(ConditionName.isLiveParam)?"pl-opacity-50":"pl-cursor-pointer"}`,onClick:t=>conditions(ConditionName.isLiveParam)?{}:handlePlayPause(t),onDoubleClick:t=>t.stopPropagation()}):jsxRuntime.jsx(PlayPauseIcon,{onClick:handlePlayPause,onDoubleClick:t=>t.stopPropagation()})}),i&&jsxRuntime.jsx(ControllbarTooltip,{title:conditions(ConditionName.isEnded)?`${translate().replay}`:conditions(ConditionName.isPlay)?`${translate().pause} (k)`:`${translate().play} (k)`,className:"pl-bottom-[260%] pl-right-[-35px]"})]})},Controlbar=()=>(useAppSelector(({controller:{isFullScreen:i,showMiniPlayer:e}})=>({isFullScreen:i,showMiniPlayer:e}),shallowEqual),useAppSelector(({videoData:{videoElementSizeInfo:i,params:e,isComplexPortrait:t}})=>({videoElementSizeInfo:i,params:e,isComplexPortrait:t}),shallowEqual),jsxRuntime.jsxs("div",{id:"player-controllbar",className:"pl-mx-3 pl-mb-3 pl-flex pl-items-center pl-justify-between",children:[jsxRuntime.jsxs("div",{className:`pl-flex pl-items-center ${conditions(ConditionName.isFullMobilePortrait)||!conditions(ConditionName.isMiniPlayer)?"pl-gap-5":"pl-gap-2"}`,children:[!conditions(ConditionName.showMiniPlayer)&&jsxRuntime.jsx(FullScreen,{}),conditions(ConditionName.showSettingIcon)&&jsxRuntime.jsx(Settings$2,{}),conditions(ConditionName.showSpeedIcon)&&!conditions(ConditionName.isComplexPortrait)&&jsxRuntime.jsx(Speed,{}),conditions(ConditionName.showPlayListIcon)&&conditions(ConditionName.showPlaylist)&&jsxRuntime.jsx(PlayList$1,{}),conditions(ConditionName.showPictureInPicture)&&jsxRuntime.jsx(PictureInPicture,{}),!conditions(ConditionName.isGeneral)&&!conditions(ConditionName.isTouchScreenPortrait)&&jsxRuntime.jsx(Unlock,{inControllbar:!0}),conditions(ConditionName.showMultiLive)&&jsxRuntime.jsx(MultiLive,{}),conditions(ConditionName.hasSubtitles)&&jsxRuntime.jsx(Subtitles,{}),conditions(ConditionName.showAutoPlayToggleIcon)&&jsxRuntime.jsx(AutoPlayToggle,{})]}),jsxRuntime.jsxs("div",{className:`pl-flex pl-items-center ${conditions(ConditionName.isMiniPlayer)?"pl-gap-2":"pl-gap-5"}`,children:[conditions(ConditionName.showElapsedTime)&&(!conditions(ConditionName.isMiniPlayer)||conditions(ConditionName.isFullMobilePortrait))&&!conditions(ConditionName.isComplexPortrait)&&jsxRuntime.jsx(ElapsedTime,{}),conditions(ConditionName.showLikeDislike)&&jsxRuntime.jsx(LikeDisLike,{}),conditions(ConditionName.showSpeedIcon)&&conditions(ConditionName.isComplexPortrait)&&jsxRuntime.jsx(Speed,{}),!conditions(ConditionName.isIOS)&&jsxRuntime.jsx(SoundVolume,{}),conditions(ConditionName.hasMarkers)&&!conditions(ConditionName.isComplexPortrait)&&jsxRuntime.jsx(MarkersList,{}),conditions(ConditionName.showPlayNextIcon)&&jsxRuntime.jsx(PlayNextVideo,{}),conditions(ConditionName.showReplayIcon)&&jsxRuntime.jsx(PlayPauseControllbar,{})]})]})),Controllbar=React2.memo(Controlbar),spliteStringPerLine=i=>i.split(/\r?\n|\r|\n/g),DisplaySubtitle=()=>{const{settings:i}=useAppSelector(({user:{settings:n}})=>({settings:n}),shallowEqual),{subtitleText:e}=useAppSelector(({videoData:{subtitleText:n,selectedSubtitle:s}})=>({subtitleText:n,selectedSubtitle:s}),shallowEqual),t=()=>{let n="";return conditions(ConditionName.isComplexPortrait)?n="!pl-bottom-0":conditions(ConditionName.isLock)?n="pl-bottom-3":conditions(ConditionName.isActiveElements)?n="pl-bottom-[100px]":conditions(ConditionName.isActiveElements)||(n="pl-bottom-3"),n};return jsxRuntime.jsx("div",{id:"subtitle-id",style:{fontSize:"30px",direction:"ltr",opacity:conditions(ConditionName.isComplexPortrait)&&conditions(ConditionName.isActiveElements)?.5:i.brightness/100},className:`pl-absolute pl-w-full pl-mx-auto pl-text-center pl-text-[36px] ${conditions(ConditionName.isComplexPortrait)&&"!pl-text-[13px]"} ${conditions(ConditionName.isTouchScreenLandscape)&&"!pl-text-[24px]"} pl-font-normal ${t()}`,children:spliteStringPerLine(e).map((n,s)=>jsxRuntime.jsx("p",{style:{backgroundColor:hexToRGB(`#${i.subtitle_background_color}`,.6),color:`#${i.subtitle_text_color}`},className:"pl-w-max pl-px-2 pl-mx-auto",children:n},s))})},AutoPlayListIcon=()=>{const i=useAppDispatch(),e=findFirstVideoInRecommendationList(),t=()=>{i(setAutoPlayPopover(!0)),i(setRecommendListPopover(!0))};return jsxRuntime.jsxs("div",{className:"pl-absolute pl-bottom-[150%] pl-right-6 pl-flex pl-items-center pl-gap-1",onClick:t,children:[jsxRuntime.jsxs("div",{className:"pl-relative pl-h-[51px] pl-w-[105px] pl-rounded-[8px]",children:[jsxRuntime.jsx("div",{className:"pl-flex pl-w-full pl-justify-center",children:jsxRuntime.jsx("div",{className:"pl-absolute pl-bottom-[20%] pl-flex pl-h-full pl-w-[80%] pl-justify-center pl-opacity-70",children:jsxRuntime.jsx("img",{src:e.banner,width:105,height:51,className:"pl-rounded-[8px]"})})}),jsxRuntime.jsx("img",{src:e.banner,width:105,height:51,className:"pl-rounded-[8px]"})]}),jsxRuntime.jsx("p",{className:"pl-w-[125px] pl-text-white",children:translate().clickForMoreVideos})]})},AnimatedEmoji$2=({emojiCode:i,direction:e})=>jsxRuntime.jsx("div",{className:`pl-absolute ${e==="RIGHT"?"pl-right-3":"pl-left-3"} pl-w-max pl-h-max pl-cursor-auto pl-bottom-14 pl-px-2 pl-py-1 ${e==="RIGHT"?"pl-uni-first-line-emoji-right":"pl-uni-first-line-emoji-left"}`,children:jsxRuntime.jsx(Emoji,{name:i,className:"pl-w-[16px] pl-h-[16px] pl-cursor-auto"})}),UniEmoji=({EmojiList:i,direction:e,normalizeCoefficient:t})=>{const[n,s]=React2.useState([]),[r,a]=React2.useState([]),[o,l]=React2.useState([]),{config:d}=useAppSelector(({videoData:{config:p}})=>({config:p}),shallowEqual),f=()=>{const p=[];i.forEach(g=>{Array.from(Array(g.count*t).keys()).map(()=>p.push(g))});let m=p.map(g=>({sort:Math.random(),value:g})).sort((g,y)=>g.sort-y.sort).map(g=>g.value).map((g,y)=>({code:g.code,id:y}));a(m)},u=async(p,m)=>{if(p<m){const g=await setTimeout(()=>{s(y=>[...y,r[p]])},d.get_interval/r.length*1e3*p);await l(y=>[...y,g]),u(p+1,m)}};return React2.useEffect(()=>{a([]),s([]),f()},[i]),React2.useEffect(()=>(r.length>0&&u(0,r.length),()=>{o.length>0&&(o.forEach(p=>clearTimeout(p)),l([]))}),[r]),jsxRuntime.jsx(jsxRuntime.Fragment,{children:n.length>0?n.map((p,m)=>jsxRuntime.jsx("div",{children:jsxRuntime.jsx(AnimatedEmoji$2,{direction:e,emojiCode:p.code})},m)):jsxRuntime.jsx(jsxRuntime.Fragment,{})})},AnimatedEmoji$1=({emojiCode:i,direction:e})=>jsxRuntime.jsx("div",{className:`pl-absolute ${e==="RIGHT"?"pl-right-3":"pl-left-3"} pl-w-[32px] pl-h-[32px] pl-cursor-auto pl-bottom-14 ${e==="RIGHT"?"pl-uni-first-line-emoji-right":"pl-uni-first-line-emoji-left"}`,children:jsxRuntime.jsx(Emoji,{name:i,className:"pl-cursor-auto"})}),ExplodeEmoji=({codes:i,direction:e})=>{const[t,n]=React2.useState([]),[s,r]=React2.useState([]),[a,o]=React2.useState([]),{config:l}=useAppSelector(({videoData:{config:f}})=>({config:f}),shallowEqual),d=()=>{let f=i.map(u=>({sort:Math.random(),value:u})).sort((u,p)=>u.sort-p.sort).map(u=>u.value).map((u,p)=>({code:u,id:p}));r(f)};return React2.useEffect(()=>{r([]),n([]),d()},[i]),React2.useEffect(()=>{let f;if(s.length>0)for(let u=0;u<s.length;u++)f=setTimeout(()=>{n(p=>[...p,s[u]])},l.get_interval/s.length*500*u),o(p=>[...p,f]);return()=>{a.length>0&&(a.forEach(u=>clearTimeout(u)),o([]))}},[s]),jsxRuntime.jsx("div",{children:t.length>0?t.map((f,u)=>jsxRuntime.jsx("div",{children:jsxRuntime.jsx(AnimatedEmoji$1,{direction:e,emojiCode:f.code})},u)):jsxRuntime.jsx(jsxRuntime.Fragment,{})})},AnimatedEmoji=({emojiCode:i,direction:e})=>jsxRuntime.jsxs("div",{children:[jsxRuntime.jsx("div",{className:`pl-absolute ${e==="RIGHT"?"pl-right-3":"pl-left-3"} pl-w-max pl-h-max pl-cursor-auto pl-bottom-14 pl-px-2 pl-py-1 ${e==="RIGHT"?"pl-spray-fifth-line-emoji-right":"pl-spray-fifth-line-emoji-left"}`,children:jsxRuntime.jsx(Emoji,{name:i,className:"pl-w-[12px] pl-h-[12px] pl-cursor-auto"})}),jsxRuntime.jsx("div",{className:`pl-absolute ${e==="RIGHT"?"pl-right-3":"pl-left-3"} pl-w-max pl-h-max pl-cursor-auto pl-bottom-14 pl-px-2 pl-py-1 ${e==="RIGHT"?"pl-spray-forth-line-emoji-right":"pl-spray-forth-line-emoji-left"}`,children:jsxRuntime.jsx(Emoji,{name:i,className:"pl-w-[12px] pl-h-[12px] pl-cursor-auto"})}),jsxRuntime.jsx("div",{className:`pl-absolute ${e==="RIGHT"?"pl-right-3":"pl-left-3"} pl-w-max pl-h-max pl-cursor-auto pl-bottom-14 pl-px-2 pl-py-1 ${e==="RIGHT"?"pl-spray-third-line-emoji-right":"pl-spray-third-line-emoji-left"}`,children:jsxRuntime.jsx(Emoji,{name:i,className:"pl-w-[12px] pl-h-[12px] pl-cursor-auto"})}),jsxRuntime.jsx("div",{className:`pl-absolute ${e==="RIGHT"?"pl-right-3":"pl-left-3"} pl-w-max pl-h-max pl-cursor-auto pl-bottom-14 pl-px-2 pl-py-1 ${e==="RIGHT"?"pl-spray-second-line-emoji-right":"pl-spray-second-line-emoji-left"}`,children:jsxRuntime.jsx(Emoji,{name:i,className:"pl-w-[12px] pl-h-[12px] pl-cursor-auto"})}),jsxRuntime.jsx("div",{className:`pl-absolute ${e==="RIGHT"?"pl-right-3":"pl-left-3"} pl-w-max pl-h-max pl-cursor-auto pl-bottom-14 pl-px-2 pl-py-1 ${e==="RIGHT"?"pl-spray-first-line-emoji-right":"pl-spray-first-line-emoji-left"}`,children:jsxRuntime.jsx(Emoji,{name:i,className:"pl-w-[12px] pl-h-[12px] pl-cursor-auto"})}),jsxRuntime.jsx("div",{className:`pl-absolute ${e==="RIGHT"?"pl-right-3":"pl-left-3"} pl-w-max pl-h-max pl-cursor-auto pl-bottom-14 pl-px-2 pl-py-1 ${e==="RIGHT"?"pl-spray-zero-line-emoji-right":"pl-spray-zero-line-emoji-left"}`,children:jsxRuntime.jsx(Emoji,{name:i,className:"pl-w-[12px] pl-h-[12px] pl-cursor-auto"})})]}),SprayEmoji=({codes:i,direction:e})=>{const[t,n]=React2.useState([]),[s,r]=React2.useState([]),[a,o]=React2.useState([]),{config:l}=useAppSelector(({videoData:{config:f}})=>({config:f}),shallowEqual),d=()=>{let f=i.map(u=>({sort:Math.random(),value:u})).sort((u,p)=>u.sort-p.sort).map(u=>u.value);r(f)};return React2.useEffect(()=>{r([]),n([]),d()},[i]),React2.useEffect(()=>{let f,u,p,m;if(s.length>0)for(let g=0;g<s.length;g++)f=setTimeout(()=>{n(y=>[...y,s[g]]),u=setTimeout(()=>{n(y=>[...y,s[g]]),p=setTimeout(()=>{n(y=>[...y,s[g]]),m=setTimeout(()=>{n(y=>[...y,s[g]])},170)},170)},170)},l.get_interval/s.length*1e3*g),o(y=>[...y,f,u,p,m]);return()=>{a.length>0&&(a.forEach(g=>clearTimeout(g)),o([]))}},[s]),jsxRuntime.jsx("div",{children:t.length>0?t.map((f,u)=>jsxRuntime.jsx("div",{children:jsxRuntime.jsx(AnimatedEmoji,{direction:e,emojiCode:f})},u)):jsxRuntime.jsx(jsxRuntime.Fragment,{})})},InstagramEmoji=()=>{const i=useAppDispatch(),{emojis:e,emojiList1:t,emojiList2:n,config:s}=useAppSelector(({videoData:{emojis:me,emojiList1:ye,emojiList2:we,config:_e}})=>({emojis:me,emojiList1:ye,emojiList2:we,config:_e}),shallowEqual);useAppSelector(({controller:{activeElements:me}})=>({activeElements:me}),shallowEqual);const[r,a]=React2.useState([]),[o,l]=React2.useState([]),[d,f]=React2.useState(0),[u,p]=React2.useState([]),[m,g]=React2.useState([]),[y,v]=React2.useState([]),[b,C]=React2.useState([]),[_,R]=React2.useState([]),[E,F]=React2.useState([]),[O,A]=React2.useState(!1),[N,M]=React2.useState(!1),[Z,X]=React2.useState(null),[oe,le]=React2.useState(null),[de,ue]=React2.useState(!1),[ce,pe]=React2.useState(null),he=React2.useRef(null),Y=React2.useRef(null),ge=async(me,ye)=>{let _e=await(Ee=>{let ve=document.createElement("img");return ve.src=`${getEmojiUrl()}/${Ee}.png`,ve.id=`${Ee}-${r.length}`,ve.classList.add("pl-user-uni-emoji-right"),ve.classList.add("pl-customEmoji"),ve.classList.add(`${Ee}-${r.length}`),ve})(me);const Re=document.getElementById(ye);Re&&(Re.appendChild(_e),setTimeout(()=>{Re&&(Re==null||Re.removeChild(_e))},6*1e3))},xe=async(me,ye)=>{let _e=await(Ee=>{let ve=document.createElement("img");return ve.src=`${getEmojiUrl()}/${Ee}.png`,ve.id=`${Ee}-${o.length}`,ve.classList.add("pl-user-uni-emoji-left"),ve.classList.add("pl-customEmoji-left"),ve.classList.add(`${Ee}-${o.length}`),ve})(me);const Re=document.getElementById(ye);Re&&(Re.appendChild(_e),setTimeout(()=>{Re&&(Re==null||Re.removeChild(_e))},6*1e3))},be=me=>{const ye=n;(ye.length===0||!ye.includes(me))&&i(setEmojiList2([...n,me]))},Ce=me=>{const ye=t;(ye.length===0||!ye.includes(me))&&i(setEmojiList1([...t,me]))},ke=(me,ye)=>{let we;we=setTimeout(()=>{me(!1)},activeElementsTime),ye(we)};return React2.useEffect(()=>{N?ke(M,le):clearTimeout(oe)},[N]),React2.useEffect(()=>{O?ke(A,X):clearTimeout(Z)},[O]),React2.useEffect(()=>{if(conditions(ConditionName.hasEmojis)){let me=0,ye=0,we=[],_e=[],Re=[],Ee=[],ve=[],qe=[];e.emoji_list_2_result.forEach(Ge=>{Ge.explode&&_e.push(Ge.code),Ge.spray&&Re.push(Ge.code),Ge.count>0&&(ye=Ge.count,we.push({code:Ge.code,count:Ge.count}))}),e.emoji_list_1_result.forEach(Ge=>{Ge.explode&&ve.push(Ge.code),Ge.spray&&qe.push(Ge.code),Ge.count>0&&(me=Ge.count,Ee.push({code:Ge.code,count:Ge.count}))}),g(_e),v(Re),p(we),R(ve),F(qe),C(Ee),f(Math.max(ye,me)>2*s.interval?2*s.get_interval/Math.max(ye,me):1)}},[e]),useOnClickOutside(he,me=>{checkParentTarget(me,"emojiButtonRight")||A(!1)}),useOnClickOutside(Y,me=>{checkParentTarget(me,"emojiButtonLeft")||M(!1)}),React2.useEffect(()=>{let me=document.getElementById("emojiButtonRight"),ye=document.getElementById("emojiButtonLeft");ye&&(ye.style.opacity="1"),me&&(me.style.opacity="1"),ce&&clearTimeout(ce);let we;we=setTimeout(()=>{ye&&(ye.style.opacity="0.85"),me&&(me.style.opacity="0.85")},activeElementsTime),pe(we)},[de]),jsxRuntime.jsxs("div",{className:`pl-absolute pl-flex pl-w-full pl-cursor-pointer pl-justify-between ${conditions(ConditionName.isComplexPortrait)?"-pl-bottom-[30px]":`animate__animated pl-bottom-0 pl-transition-all pl-duration-500 ${conditions(ConditionName.instagramEmojiAnimation)?"animate__fadeInUp pl-pointer-events-auto pl-opacity-100":"animate__fadeOutDown pl-pointer-events-none pl-opacity-0"}`}`,children:[jsxRuntime.jsx("div",{className:"pl-relative pl-w-[50px]",id:"rightWoodSeller"}),jsxRuntime.jsx("div",{className:"pl-relative pl-w-full",id:"leftWoodSeller",dir:"ltr"}),e.emoji_list_1!==""&&(!conditions(ConditionName.isComplexPortrait)||!N)&&jsxRuntime.jsx("div",{id:"emojiButtonLeft",className:`pl-absolute pl-z-[1000] ${conditions(ConditionName.isComplexPortrait)?"-pl-left-2 pl-bottom-4 pl-h-[50px] pl-w-[50px] pl-rounded-tr-full pl-border-[1.5px] pl-border-l-0 pl-border-z-secondary-500 pl-bg-z-secondary-100 dark:pl-border-white dark:pl-bg-black":`pl-bottom-5 pl-left-3 pl-rounded-full ${isTouchScreen()&&conditions(ConditionName.isFullScreen)?"pl-h-[50px] pl-w-[50px]":"pl-h-[38px] pl-w-[38px]"} pl-border-[1.5px] pl-border-white pl-bg-black pl-bg-opacity-30`}`,onClick:me=>{me.preventDefault(),ue(!de),A(!1),e.emoji_list_1.split("|").length>1?M(!N):(xe(e.emoji_list_1.split("|")[0],"leftWoodSeller"),Ce(e.emoji_list_1.split("|")[0]),l(ye=>[...ye,e.emoji_list_1.split("|")[0]]))},children:jsxRuntime.jsx("div",{className:"pl-flex pl-h-full pl-w-full pl-items-center pl-justify-center",children:jsxRuntime.jsxs("div",{className:`pl-mx-auto pl-flex pl-w-full pl-items-center pl-justify-center ${conditions(ConditionName.isComplexPortrait)&&"pl-mr-2 pl-mt-2"}`,children:[jsxRuntime.jsx(Emoji,{name:e.emoji_list_1.split("|")[0],className:`${conditions(ConditionName.isComplexPortrait)?"pl-h-[22px] pl-w-[22px]":isTouchScreen()&&conditions(ConditionName.isFullScreen)?"pl-h-[30px] pl-w-[30px]":"pl-h-[24px] pl-w-[24px]"}`}),jsxRuntime.jsx("div",{})]})})}),e.emoji_list_1!==""&&jsxRuntime.jsx("div",{ref:Y,id:"menuIconLeft",className:`${!N&&"pl-hidden"} no-scrollbar pl-absolute ${conditions(ConditionName.isComplexPortrait)?"pl-bottom-[19px] pl-left-0 pl-z-50 pl-max-h-[152px] pl-w-[32px] pl-overflow-y-auto pl-border-z-secondary-500 pl-bg-z-secondary-100 pl-py-3 dark:pl-border-white dark:pl-bg-black":"pl-bottom-[75px] pl-left-3 pl-h-[32px] pl-max-w-[152px] pl-overflow-x-auto pl-border-white pl-bg-black pl-bg-opacity-30 pl-px-3 pl-py-1"} pl-rounded-full pl-border-[1.5px]`,children:N&&jsxRuntime.jsx("div",{className:`${e.emoji_list_1.split("|").length>1&&`pl-gap-3 ${conditions(ConditionName.isComplexPortrait)?"pl-h-max":"pl-w-max"}`} pl-flex pl-items-center pl-justify-center ${conditions(ConditionName.isComplexPortrait)?"pl-max-h-[220px] pl-w-full pl-flex-col md:pl-max-h-[260px]":"pl-h-full pl-max-w-[220px] pl-flex-row pl-py-1 md:pl-max-w-[260px]"}`,children:e.emoji_list_1.split("|").map((me,ye)=>jsxRuntime.jsx("div",{className:"pl-flex pl-w-full pl-justify-center",onClick:we=>{we.preventDefault(),oe&&(clearTimeout(oe),ke(M,le)),ue(!de),A(!1),xe(me,"leftWoodSeller"),Ce(me),l(_e=>[..._e,me])},children:jsxRuntime.jsx(Emoji,{name:me,className:"pl-h-[24px] pl-w-[24px]"})},ye))})}),e.emoji_list_2!==""&&(!conditions(ConditionName.isComplexPortrait)||!O)&&jsxRuntime.jsx("div",{id:"emojiButtonRight",className:`no-scrollbar pl-absolute pl-z-[1000] pl-overflow-x-auto ${conditions(ConditionName.isComplexPortrait)?"-pl-right-2 pl-bottom-4 pl-h-[50px] pl-w-[50px] pl-rounded-tl-full pl-border-r-0 pl-border-z-secondary-500 pl-bg-z-secondary-100 dark:pl-border-white dark:pl-bg-black":`pl-bottom-5 pl-rounded-full pl-bg-opacity-30 ${isTouchScreen()&&conditions(ConditionName.isFullScreen)?"pl-h-[50px] pl-w-[50px]":"pl-h-[38px] pl-w-[38px]"} pl-right-3 pl-border-white pl-bg-black`} pl-border-[1.5px]`,onClick:me=>{me.preventDefault(),M(!1),ue(!de),e.emoji_list_2.split("|").length>1?A(!O):(be(e.emoji_list_2.split("|")[0]),a(ye=>[...ye,e.emoji_list_2.split("|")[0]]),ge(e.emoji_list_2.split("|")[0],"rightWoodSeller"))},children:jsxRuntime.jsx("div",{className:"pl-flex pl-h-full pl-w-full pl-items-center pl-justify-center",children:jsxRuntime.jsx("div",{className:`pl-mx-auto pl-flex pl-w-full pl-justify-center ${conditions(ConditionName.isComplexPortrait)&&"pl-ml-2 pl-mt-2"}`,children:jsxRuntime.jsx(Emoji,{name:e.emoji_list_2.split("|")[0],className:`${conditions(ConditionName.isComplexPortrait)?"pl-h-[22px] pl-w-[22px]":isTouchScreen()&&conditions(ConditionName.isFullScreen)?"pl-h-[30px] pl-w-[30px]":"pl-h-[24px] pl-w-[24px]"}`})})})}),e.emoji_list_2!==""&&jsxRuntime.jsx("div",{dir:"ltr",id:"menuIconRight",ref:he,className:`${!O&&"pl-hidden"} ${conditions(ConditionName.isComplexPortrait)?"pl-bottom-[19px] pl-right-0 pl-z-50 pl-max-h-[152px] pl-w-[32px] pl-overflow-y-auto pl-border-z-secondary-500 pl-bg-z-secondary-100 pl-py-3 dark:pl-border-white dark:pl-bg-black":"pl-bottom-[75px] pl-right-3 pl-h-[32px] pl-max-w-[152px] pl-overflow-x-auto pl-border-white pl-bg-black pl-bg-opacity-30 pl-px-3 pl-py-1"} no-scrollbar pl-absolute pl-rounded-full pl-border-[1.5px]`,children:O&&jsxRuntime.jsx("div",{className:`${e.emoji_list_2.split("|").length>1&&`pl-gap-3 ${conditions(ConditionName.isComplexPortrait)?"pl-h-max":"pl-w-max"}`} pl-flex ${conditions(ConditionName.isComplexPortrait)?"pl-max-h-[220px] pl-w-full pl-flex-col md:pl-max-h-[260px]":"pl-h-full pl-max-w-[220px] md:pl-max-w-[260px]"} pl-m-0 pl-items-center pl-justify-center pl-py-1`,children:e.emoji_list_2.split("|").map((me,ye)=>jsxRuntime.jsx("div",{className:"pl-flex pl-w-full pl-justify-center",onClick:we=>{we.preventDefault(),Z&&(clearTimeout(Z),ke(A,X)),ue(!de),M(!1),be(me),a(_e=>[..._e,me]),ge(me,"rightWoodSeller")},children:jsxRuntime.jsx(Emoji,{name:me,className:"pl-h-[24px] pl-w-[24px]"})},ye))})}),jsxRuntime.jsx("div",{children:u.length>0&&d&&jsxRuntime.jsx(UniEmoji,{normalizeCoefficient:d,direction:"RIGHT",EmojiList:u})}),jsxRuntime.jsx("div",{children:b.length>0&&d&&jsxRuntime.jsx(UniEmoji,{normalizeCoefficient:d,direction:"LEFT",EmojiList:b})}),m.length>0&&jsxRuntime.jsx(ExplodeEmoji,{direction:"RIGHT",codes:m}),_.length>0&&jsxRuntime.jsx(ExplodeEmoji,{direction:"LEFT",codes:_}),y.length>0&&jsxRuntime.jsx(SprayEmoji,{direction:"RIGHT",codes:y}),E.length>0&&jsxRuntime.jsx(SprayEmoji,{direction:"LEFT",codes:E})]})},Footer=()=>(useAppSelector(({controller:{lock:i,isFullScreen:e}})=>({lock:i,isFullScreen:e}),shallowEqual),jsxRuntime.jsxs("div",{id:"footer",className:"pl-relative",style:{zIndex:zIndex.footer},children:[conditions(ConditionName.showAutoPlayListTouchIcon)&&jsxRuntime.jsx(AutoPlayListIcon,{}),conditions(ConditionName.showSubtitle)&&jsxRuntime.jsx(DisplaySubtitle,{}),!conditions(ConditionName.isLock)&&jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsxs("div",{className:`animate__animated animate__faster pl-mx-auto pl-w-full ${conditions(ConditionName.isActiveElements)?"animate__fadeIn pl-pointer-events-auto":"animate__fadeOut pl-pointer-events-none"}`,style:{paddingLeft:footerPadding(),paddingRight:footerPadding()},children:[conditions(ConditionName.showProgressbar)&&conditions(ConditionName.hasTimeMachine)&&jsxRuntime.jsx(ProgressBar,{}),jsxRuntime.jsx(Controllbar,{})]}),conditions(ConditionName.showInstagramEmoji)&&jsxRuntime.jsx(InstagramEmoji,{})]})]})),Loader=()=>jsxRuntime.jsxs("div",{className:"loader-spinner pl-absolute pl-top-[50%] pl-left-[50%] pl-mt-[-50px] pl-ml-[-42px] pl-w-screen pl-h-full pl-overflow-hidden",children:[jsxRuntime.jsx("div",{className:"pl-bg-secondary-500"}),jsxRuntime.jsx("div",{className:"pl-bg-secondary-500"}),jsxRuntime.jsx("div",{className:"pl-bg-secondary-500"}),jsxRuntime.jsx("div",{className:"pl-bg-secondary-500"}),jsxRuntime.jsx("div",{className:"pl-bg-secondary-500"}),jsxRuntime.jsx("div",{className:"pl-bg-secondary-500"}),jsxRuntime.jsx("div",{className:"pl-bg-secondary-500"}),jsxRuntime.jsx("div",{className:"pl-bg-secondary-500"}),jsxRuntime.jsx("div",{className:"pl-bg-secondary-500"}),jsxRuntime.jsx("div",{className:"pl-bg-secondary-500"}),jsxRuntime.jsx("div",{className:"pl-bg-secondary-500"}),jsxRuntime.jsx("div",{className:"pl-bg-secondary-500"})]});function c(i,e=300,t={}){const n=React2.useRef(null),s=React2.useCallback(r=>{n.current?(clearTimeout(n.current),n.current=null,i&&i(r)):n.current=setTimeout(()=>{t.onSingleTap&&t.onSingleTap(r),n.current=null},e)},[i,e,t.onSingleTap]);return i?{onClick:s}:{}}const hideTime=1e3,BackwardForward$1=({type:i,isRightDoubleTouched:e,isLeftDoubleTouched:t,setIsRightDoubleTouched:n,setIsLeftDoubleTouched:s})=>{const[r,a]=React2.useState(15),[o,l]=React2.useState(!1),d=React2.useRef(r),f=useAppDispatch(),{duration:u}=useAppSelector(({controller:{duration:b,showMiniPlayer:C}})=>({duration:b,showMiniPlayer:C}),shallowEqual),{videoElementSizeInfo:p}=useAppSelector(({videoData:{videoElementSizeInfo:b,params:C}})=>({videoElementSizeInfo:b,params:C}),shallowEqual),m=React2.useRef(null);React2.useEffect(()=>{d.current=r},[r]);let g;g=c(b=>{["touchBackward","touchForward"].includes(i)&&(b.stopPropagation(),i==="touchBackward"&&s?s(!0):i==="touchForward"&&n&&n(!0),clearTimeout(m.current),m.current=setTimeout(()=>l(!0),hideTime))},200),React2.useEffect(()=>{o&&(l(!1),f(setActiveElements(!1)),e&&n?(n(!1),videoTag().duration-videoTag().currentTime<=d.current?handleBackwardForward(i,videoTag().duration):handleBackwardForward(i,d.current),a(15)):t&&s&&(s(!1),videoTag().currentTime<=d.current?handleBackwardForward(i,0):handleBackwardForward(i,d.current),a(15)))},[o]);const y=b=>{a(C=>C+15),conditions(ConditionName.isTouchScreenLandscape)&&handleRippleCircle(b,i),clearTimeout(m.current),m.current=setTimeout(()=>l(!0),hideTime)};let v;return["backward","forward"].includes(i)?v=jsxRuntime.jsx("div",{className:`${!conditions(ConditionName.isTouchScreen)&&"hover:pl-scale-125"} pl-cursor-pointer pl-transition-transform pl-ease-in-out ${i==="backward"&&(videoTag().currentTime>=15?"pl-opacity-100":"pl-cursor-default pl-opacity-30 hover:pl-scale-100")} ${i==="forward"&&(u-videoTag().currentTime>=15?"pl-opacity-100":"pl-cursor-default pl-opacity-30 hover:pl-scale-100")}}`,onContextMenu:b=>b.preventDefault(),children:jsxRuntime.jsx("img",{alt:i==="backward"?"backward-icon":"forward-icon",src:i==="backward"?IMAGES.backward15:IMAGES.forward15,width:conditions(ConditionName.isMiniPlayer)?30:conditions(ConditionName.isTouchScreen)?32:48,height:conditions(ConditionName.isMiniPlayer)?30:conditions(ConditionName.isTouchScreen)?32:48,onClick:()=>handleBackwardForward(i,r),onDoubleClick:b=>b.stopPropagation()})}):["touchBackward","touchForward"].includes(i)&&(v=jsxRuntime.jsx("div",{id:i,className:`pl-relative pl-flex pl-flex-col pl-items-center pl-justify-center pl-gap-2 pl-overflow-hidden ${i==="touchBackward"?"pl-rounded-r-full":"pl-rounded-l-full"}`,style:{width:p.width,height:p.width},...g,children:(e||t)&&jsxRuntime.jsxs("div",{className:"pl-flex pl-h-full pl-w-full pl-flex-col pl-items-center pl-justify-center pl-gap-2 pl-bg-secondary-100/[0.3] pl-p-5",onTouchStart:y,children:[jsxRuntime.jsxs("div",{className:`${i==="touchBackward"?"pl-arrow-left":"pl-arrow-right pl-gap-2"} pl-flex pl-items-center pl-justify-center`,children:[jsxRuntime.jsx("img",{alt:"arrow-left-icon",src:IMAGES.arrowLeft,className:`${i==="touchForward"&&"pl-rotate-180"}`,width:24,height:24}),jsxRuntime.jsx("img",{alt:"arrow-left-icon",src:IMAGES.arrowLeft,className:`${i==="touchForward"&&"pl-rotate-180"}`,width:24,height:24}),jsxRuntime.jsx("img",{alt:"arrow-left-icon",src:IMAGES.arrowLeft,className:`${i==="touchForward"&&"pl-rotate-180"}`,width:24,height:24})]}),jsxRuntime.jsxs("p",{className:"pl-text-center pl-text-[14px] pl-font-normal pl-text-white",children:[r," ",translate().seconds]})]})})),jsxRuntime.jsx(jsxRuntime.Fragment,{children:v})},backwardForward=Object.freeze(Object.defineProperty({__proto__:null,default:BackwardForward$1},Symbol.toStringTag,{value:"Module"})),PlayPause=()=>(useAppSelector(({controller:{play:i,showMiniPlayer:e}})=>({play:i,showMiniPlayer:e}),shallowEqual),useAppSelector(({videoData:{videoElementSizeInfo:i,params:e}})=>({videoElementSizeInfo:i,params:e}),shallowEqual),jsxRuntime.jsx("div",{className:`${!conditions(ConditionName.isTouchScreen)&&"hover:pl-scale-125"} pl-cursor-pointer pl-transition-transform pl-ease-in-out`,onContextMenu:i=>i.preventDefault(),children:jsxRuntime.jsx("img",{src:conditions(ConditionName.isPlay)?IMAGES.bigPause:IMAGES.bigPlay,width:conditions(ConditionName.isMiniPlayer)?48:conditions(ConditionName.isTouchScreen)?56:72,height:conditions(ConditionName.isMiniPlayer)?48:conditions(ConditionName.isTouchScreen)?56:72,onClick:i=>handlePlayPause(i),onDoubleClick:i=>i.stopPropagation(),className:`${conditions(ConditionName.isPlay)?"pl-big-play-icon":"pl-big-pause-icon"}`})})),Main=()=>{const[i,e]=React2.useState(!1),[t,n]=React2.useState(!1);useAppSelector(({controller:{lock:a,firstPlay:o}})=>({lock:a,firstPlay:o}),shallowEqual);const{isLoading:s,activeElements:r}=useAppSelector(({controller:{isLoading:a,activeElements:o}})=>({isLoading:a,activeElements:o}),shallowEqual);return React2.useEffect(()=>{let a=null;return conditions(ConditionName.isFirstPlay)||conditions(ConditionName.isActiveElements)?a=setTimeout(()=>n(!0),100):n(!1),()=>clearTimeout(a)},[r]),React2.useEffect(()=>{let a;return conditions(ConditionName.isLoading)?a=setTimeout(()=>e(!0),showLoaderTime):e(!1),()=>{clearTimeout(a),e(!1)}},[s]),jsxRuntime.jsx("main",{className:"pl-flex-1",children:i?jsxRuntime.jsx(Loader,{}):jsxRuntime.jsx(jsxRuntime.Fragment,{children:t&&!conditions(ConditionName.isLock)&&jsxRuntime.jsx("div",{id:"main-content",className:`pl-relative pl-flex pl-h-full pl-items-center pl-justify-center pl-text-center ${conditions(ConditionName.isActiveElements)?"pl-pointer-events-auto":"pl-pointer-events-none"}`,children:jsxRuntime.jsx("div",{className:"pl-flex pl-w-max pl-items-center pl-justify-center pl-gap-6",style:{zIndex:conditions(ConditionName.isComplexPortrait)?zIndex.mainIconInComplexPortrait:zIndex.mainIcons},children:conditions(ConditionName.isEnded)&&conditions(ConditionName.isParamsPortrait)?jsxRuntime.jsx(jsxRuntime.Fragment,{children:conditions(ConditionName.showBigReplayIcon)&&jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx("img",{src:IMAGES.bigPlayNext,width:32,height:32,onClick:()=>window.location.href=changeVideoUrl()}),jsxRuntime.jsx("img",{src:IMAGES.bigReplay,onClick:a=>!conditions(ConditionName.isLiveParam)&&handlePlayPause(a),width:56,height:56,className:conditions(ConditionName.isLiveParam)?"pl-opacity-50":""}),jsxRuntime.jsx("img",{src:IMAGES.bigPlayPrevious,width:32,height:32,className:"pl-opacity-50"})]})}):jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[!conditions(ConditionName.isFirstPlay)&&conditions(ConditionName.hasTimeMachine)&&jsxRuntime.jsx(BackwardForward$1,{type:"forward"}),jsxRuntime.jsx(PlayPause,{}),!conditions(ConditionName.isFirstPlay)&&conditions(ConditionName.hasTimeMachine)&&jsxRuntime.jsx(BackwardForward$1,{type:"backward"})]})})})})})},TouchVolumeBrightness$1=React2.lazy(()=>Promise.resolve().then(()=>touchVolumeBrightness)),BackwardForward=React2.lazy(()=>Promise.resolve().then(()=>backwardForward)),Player=()=>{const[i,e]=React2.useState(!1),[t,n]=React2.useState(!1),{params:s}=useAppSelector(({videoData:{params:d,recommendationList:f}})=>({params:d,recommendationList:f}),shallowEqual),{firstPlay:r,showMiniPlayer:a,isFullScreen:o}=useAppSelector(({controller:{firstPlay:d,showMiniPlayer:f,isFullScreen:u,activeElements:p,canPlayVideo:m,isEnded:g}})=>({firstPlay:d,showMiniPlayer:f,isFullScreen:u,activeElements:p,canPlayVideo:m,isEnded:g}),shallowEqual);useAppSelector(({popovers:{autoPlayPopover:d}})=>({autoPlayPopover:d}),shallowEqual);const l=useAppDispatch();return React2.useEffect(()=>{if(videoTag()){let d;const f=()=>{conditions(ConditionName.showMiniPlayer)||(d=setTimeout(()=>{handleVideoElementSizeInfo(),l(setShowScreen(!0))},conditions(ConditionName.isTouchScreen)?0:300))};return f(),window.addEventListener("resize",f),()=>{window.removeEventListener("resize",f),clearTimeout(d)}}},[r,a,o,videoTag()]),useActiveInActive(i,t),useFullScreen(),jsxRuntime.jsx("div",{className:"pl-flex pl-h-full pl-items-center pl-justify-center pl-overflow-hidden",children:jsxRuntime.jsxs("div",{className:`pl-relative pl-flex pl-aspect-video pl-h-full pl-max-h-screen pl-w-full pl-items-center pl-bg-black ${!conditions(ConditionName.isActiveElements)&&"pl-cursor-none"}`,onClick:d=>conditions(ConditionName.showBannerStaticFiles)?handlePlayPause(d):()=>{},id:"video-area",children:[conditions(ConditionName.showBannerStaticFiles)&&jsxRuntime.jsx("div",{className:"pl-absolute pl-flex pl-h-full pl-w-full pl-justify-center",children:jsxRuntime.jsx("img",{src:s.cover,alt:s.cover?s.cover:"Cover image",className:"pl-size-full pl-object-contain"})}),conditions(ConditionName.showTouchVolumeBrightness)&&jsxRuntime.jsx(React2.Suspense,{fallback:"",children:jsxRuntime.jsx(TouchVolumeBrightness$1,{})}),conditions(ConditionName.showBackwardForward)&&jsxRuntime.jsx("div",{className:"pl-absolute pl-right-0 pl-top-0 pl-flex pl-h-full pl-w-full pl-items-center pl-overflow-hidden",style:{zIndex:t||i?zIndex.backwardForwardActive:zIndex.backwardForwardInActive},children:jsxRuntime.jsxs(React2.Suspense,{fallback:"",children:[jsxRuntime.jsx(BackwardForward,{type:"touchForward",isRightDoubleTouched:i,setIsRightDoubleTouched:e}),jsxRuntime.jsx(BackwardForward,{type:"touchBackward",isLeftDoubleTouched:t,setIsLeftDoubleTouched:n})]})}),jsxRuntime.jsx(PlayerCore$2,{}),(conditions(ConditionName.canPlayVideo)||conditions(ConditionName.isIOS))&&jsxRuntime.jsx("div",{id:"playerElements",className:`pl-absolute pl-right-0 pl-top-0 pl-h-full pl-w-full ${conditions(ConditionName.showAutoPlayPopover)&&"pl-bg-black"}`,children:jsxRuntime.jsx("div",{className:"pl-flex pl-h-full pl-w-full pl-flex-col pl-justify-between",children:jsxRuntime.jsxs(React2.Suspense,{fallback:"",children:[conditions(ConditionName.showHeader)&&jsxRuntime.jsx(Header,{}),jsxRuntime.jsx(Main,{}),!conditions(ConditionName.isFirstPlay)&&jsxRuntime.jsx(Footer,{})]})})})]})})},player$1=Object.freeze(Object.defineProperty({__proto__:null,default:Player},Symbol.toStringTag,{value:"Module"})),useGetAggregat=()=>{const i=useAppDispatch(),{isLiveError:e}=useAppSelector(({videoData:{params:N,isLiveError:M}})=>({params:N,isLiveError:M}),shallowEqual),{loadedFragmentsCount:t}=useAppSelector(({controller:{loadedFragmentsCount:N}})=>({loadedFragmentsCount:N}),shallowEqual),n=(N,M,Z,X)=>{const oe=N,le=setInterval(()=>{Z(de=>!de)},M*1e3);oe.push(le),X(oe)},[s,r]=React2.useState(void 0),[a,o]=React2.useState([]),[l,d]=React2.useState(0),[f,u]=React2.useState(void 0),[p,m]=React2.useState([]),[g,y]=React2.useState(RetryCountGeneralDataFetch),[v,b]=React2.useState(0),[C,_]=React2.useState(void 0),[R,E]=React2.useState([]),[F,O]=React2.useState(0);React2.useEffect(()=>{C!==void 0&&manualPostAPI()},[C]),React2.useEffect(()=>{s!==void 0&&manualGetOnlineViewerIntervalAPI()},[s]),React2.useEffect(()=>{f!==void 0&&manualGetDataIntervalAPI(g,p,v,y,i,m,b,d,O)},[f]),React2.useEffect(()=>{A(R,E),F!==0&&n(R,F,_,E)},[F]),React2.useEffect(()=>{A(a,o),l!==0&&n(a,l,r,o)},[l]),React2.useEffect(()=>{A(p,m),v!==0&&!(g===1&&v===RetryTimeDelayGeneralDataFetch)&&n(p,v,u,m)},[v]);const A=(N,M)=>{N.forEach(Z=>clearInterval(Z)),M([])};React2.useEffect(()=>{conditions(ConditionName.firstGetDataIntervalAPI)&&conditions(ConditionName.hasPermittedLoadedFragment)&&(conditions(ConditionName.isLiveError)?A(p,m):firstGetDataIntervalAPI(g,y,i,b,d,O))},[e,t.length])},useGetDetails=()=>{const{params:i,token:e,isLiveError:t}=useAppSelector(({videoData:{params:n,token:s,isLiveError:r}})=>({params:n,token:s,isLiveError:r}),shallowEqual);useAppSelector(({controller:{isEnded:n}})=>({isEnded:n}),shallowEqual),React2.useEffect(()=>{conditions(ConditionName.getDetails)&&getLiveAndVodDetails()},[i.id,i.type]),React2.useEffect(()=>{let n;return conditions(ConditionName.getLiveDetailsInIntervals)&&!conditions(ConditionName.isEnded)?n=setInterval(()=>getLiveAndVodDetails(),livePlayRetryDuration):clearInterval(n),()=>clearInterval(n)},[t,e])},useGetMarkers=()=>{const i=useAppDispatch(),{params:e,isFetchDetails:t}=useAppSelector(({videoData:{params:r,isFetchDetails:a}})=>({params:r,isFetchDetails:a}),shallowEqual),{isLogin:n}=useAppSelector(({user:{isLogin:r}})=>({isLogin:r}),shallowEqual),{loadedFragmentsCount:s}=useAppSelector(({controller:{loadedFragmentsCount:r}})=>({loadedFragmentsCount:r}),shallowEqual);React2.useEffect(()=>{conditions(ConditionName.getMarkers)&&conditions(ConditionName.hasPermittedLoadedFragment)&&(conditions(ConditionName.isLogin)?(async()=>{try{const r=await getAllGeneralMarker(getApiUrls().apiMarkerUrl+Number(e.id)+"/");if(conditions(ConditionName.trackerEnabled)){const{data:a,status:o}=await getAllPersonalMarkers(API().user.getPersonalMarker);responseValidator(o)?combinedMarkers(a,r.map(l=>({...l,isPersonal:null}))):i(setMarkers(r.map(l=>({...l,isPersonal:null}))))}else i(setMarkers(r.map(a=>({...a,isPersonal:null}))))}catch{if(conditions(ConditionName.trackerEnabled)){const{data:a,status:o}=await getAllPersonalMarkers(API().user.getPersonalMarker);responseValidator(o)&&combinedMarkers(a,[])}}})():(async()=>{const r=await getAllGeneralMarker(getApiUrls().apiMarkerUrl+Number(e.id)+"/");i(setMarkers(r.sort(compare)))})())},[!!e.isMarkersChange,t,n,s.length])},useGetPlayList=()=>{const i=useAppDispatch(),{isFetchDetails:e}=useAppSelector(({videoData:{isFetchDetails:n}})=>({isFetchDetails:n}),shallowEqual),{loadedFragmentsCount:t}=useAppSelector(({controller:{loadedFragmentsCount:n}})=>({loadedFragmentsCount:n}),shallowEqual);React2.useEffect(()=>{conditions(ConditionName.getPlayList)&&conditions(ConditionName.hasPermittedLoadedFragment)&&(async()=>{const{data:s,status:r}=await getPlaylistHeader(API().playList);if(responseValidator(r)){const a=[];for await(const o of s.results){const l={title:o.title,id:o.id,count:o.count};a.push(l)}i(setPlayList(a))}else i(setPlayList([]))})()},[e,t.length])},useGetProfile=()=>{const i=useAppDispatch(),{isFetchDetails:e,params:t}=useAppSelector(({videoData:{isFetchDetails:n,params:s}})=>({isFetchDetails:n,params:s}),shallowEqual);React2.useEffect(()=>{(async()=>{if(conditions(ConditionName.getUserProfile)){const n=await apiCaller({url:API().user.profileWithXTokenNasle3,method:"GET",headers:{authorization:`Bearer ${t.xToken}`}});if(n&&n.status<400){const s={name:n.data.displayName,avatar_url:n.data.image,phone_number:n.data.phoneNumber,id:n.data.id};i(setUserInfo(s)),conditions(ConditionName.hasQuizParams)&&i(setUserStatus(UserQuizStatus.participant))}else{const{data:s,status:r}=await apiCaller({url:API().user.profileWithXToken,method:"POST",data:{token:t.xToken}});responseValidator(r)&&i(setUserInfo(s.data)),conditions(ConditionName.hasQuizParams)&&i(setUserStatus(UserQuizStatus.participant))}}})()},[e,t.xToken])},useGetRecommendationList=()=>{const i=useAppDispatch(),{isFetchDetails:e}=useAppSelector(({videoData:{isFetchDetails:n,params:s}})=>({isFetchDetails:n,params:s}),shallowEqual),{loadedFragmentsCount:t}=useAppSelector(({controller:{loadedFragmentsCount:n}})=>({loadedFragmentsCount:n}),shallowEqual);React2.useEffect(()=>{conditions(ConditionName.getRecommendationList)&&conditions(ConditionName.hasPermittedLoadedFragment)&&(async()=>{const{data:n,status:s}=await apiCaller({url:API().recommendationList()});responseValidator(s)&&i(setRecommendationList(n))})()},[e,t.length])},useUserSettings=()=>{const i=useAppDispatch(),{isLogin:e}=useAppSelector(({user:{isLogin:n}})=>({isLogin:n}),shallowEqual),{isFetchDetails:t}=useAppSelector(({videoData:{isFetchDetails:n}})=>({isFetchDetails:n}),shallowEqual);React2.useEffect(()=>{(async()=>{if(conditions(ConditionName.getUserSetting)&&conditions(ConditionName.trackerEnabled)){const{data:n,status:s}=await apiCaller({url:API().user.settings,headers:handleHasXTokenParamOrSendXToken()});responseValidator(s)&&i(setUserSettings({...n,quality:n.quality===null?-1:n.quality}))}})()},[e,t])},useVideoSettings=()=>{const i=useAppDispatch(),{params:e,isFetchDetails:t}=useAppSelector(({videoData:{params:s,isFetchDetails:r}})=>({params:s,isFetchDetails:r}),shallowEqual),{isLogin:n}=useAppSelector(({user:{isLogin:s}})=>({isLogin:s}),shallowEqual);React2.useEffect(()=>{conditions(ConditionName.getVideoMetaData)?(async()=>{if(conditions(ConditionName.trackerEnabled)){const{data:s,status:r}=await apiCaller({url:API().user.getVideoMetaData,headers:handleHasXTokenParamOrSendXToken()});responseValidator(r)?(i(setVideoSettings({is_like:s.is_like,time:s.time})),s.time!==0&&i(setShowContinuousPlayback(!0))):handleApplyContinuousPlayback();const{data:a,status:o}=await apiCaller({url:API().user.bookmarks,headers:handleHasXTokenParamOrSendXToken()});responseValidator(o)&&a.length&&(i(setBookmarks(a)),a.find(l=>{const d=new URL(l.object_link).searchParams;d.get("type")===e.type&&d.get("id")===e.id&&i(setBookmarkId(l.id))}))}})():handleApplyContinuousPlayback()},[n,t])},useWebListConfig=()=>{const i=useAppDispatch(),{params:e,token:t,isLiveError:n}=useAppSelector(({videoData:{params:s,token:r,isLiveError:a}})=>({params:s,token:r,isLiveError:a}),shallowEqual);React2.useEffect(()=>{(async()=>{const s=await apiCaller({url:API().web_list_config(),data:{limit:1e3,offset:0}});s&&responseValidator(s.status)&&i(setWebListConfig(s.data.results))})()},[n,t,e.id])},useGetData=()=>{useGetDetails(),useGetProfile(),useGetAggregat(),useGetMarkers(),useGetPlayList(),useGetRecommendationList(),useUserSettings(),useVideoSettings(),useWebListConfig()},useHandleScroll=()=>{useAppSelector(({videoData:{params:i}})=>({params:i}),shallowEqual),useAppSelector(({controller:{showMiniPlayer:i}})=>({showMiniPlayer:i}),shallowEqual),React2.useEffect(()=>{const{params:i}=store.getState().videoData,e=()=>{const n=document.getElementById(conditions(ConditionName.showMiniPlayer)?"black-video-area":"video-area");if(conditions(ConditionName.hasScrollElementId)&&n){const s=store.dispatch;n.getBoundingClientRect().top<0?s(setShowMiniPlayer(!0)):s(setShowMiniPlayer(!1))}};let t;return conditions(ConditionName.hasScrollElementId)&&(t=document.getElementById(i.scrollElementId),t&&t.addEventListener("scroll",e)),()=>conditions(ConditionName.hasScrollElementId)&&t&&t.removeEventListener("scroll",e)},[])},NotActiveVideoIcon=()=>jsxRuntime.jsxs("svg",{width:"270",height:"233",viewBox:"0 0 810 672",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[jsxRuntime.jsxs("g",{id:"All Done",children:[jsxRuntime.jsx("mask",{id:"mask0_3964_52069",style:{maskType:"alpha"},maskUnits:"userSpaceOnUse",x:"0",y:"0",width:"810",height:"670",children:jsxRuntime.jsx("path",{id:"Clip 90","fill-rule":"evenodd","clip-rule":"evenodd",d:"M0 669.263H810V0H0V669.263Z",fill:"white"})}),jsxRuntime.jsxs("g",{mask:"url(#mask0_3964_52069)",children:[jsxRuntime.jsx("path",{id:"Fill 1","fill-rule":"evenodd","clip-rule":"evenodd",d:"M536.81 189.268C665.57 189.268 769.964 293.665 769.964 422.422C769.964 551.178 665.57 655.576 536.81 655.576C408.028 655.576 303.656 551.178 303.656 422.422C303.656 293.665 408.028 189.268 536.81 189.268ZM671.882 429.382C697.297 421.138 711.185 393.841 702.942 368.426C694.701 343.04 667.401 329.121 641.986 337.392C616.603 345.636 602.683 372.933 610.952 398.319C619.196 423.734 646.493 437.654 671.882 429.382ZM650.166 496.185C634.478 474.564 604.246 469.772 582.625 485.488C561.001 501.176 556.212 531.44 571.928 553.033C587.616 574.654 617.877 579.446 639.47 563.729C661.091 548.041 665.883 517.777 650.166 496.185ZM488.438 296.118C488.438 322.816 510.087 344.466 536.814 344.466C563.512 344.466 585.162 322.816 585.162 296.118C585.162 269.391 563.512 247.741 536.814 247.741C510.087 247.741 488.438 269.391 488.438 296.118ZM501.685 553.033C517.373 531.44 512.584 501.176 490.963 485.488C469.368 469.772 439.104 474.564 423.416 496.185C407.699 517.777 412.491 548.041 434.112 563.729C455.733 579.446 485.971 574.654 501.685 553.033ZM370.661 368.426C362.418 393.841 376.309 421.138 401.724 429.382C427.138 437.654 454.407 423.734 462.682 398.319C470.923 372.933 457.031 345.636 431.62 337.392C406.202 329.121 378.933 343.04 370.661 368.426Z",fill:"#FEFEFE"}),jsxRuntime.jsx("path",{id:"Fill 3","fill-rule":"evenodd","clip-rule":"evenodd",d:"M680.578 422.42C680.578 501.825 616.208 566.194 536.801 566.194C457.396 566.194 393.023 501.825 393.023 422.42C393.023 343.015 457.396 278.643 536.801 278.643C616.208 278.643 680.578 343.015 680.578 422.42Z",fill:"#E8E9EB"}),jsxRuntime.jsx("path",{id:"Fill 5","fill-rule":"evenodd","clip-rule":"evenodd",d:"M670.596 422.419C670.596 496.31 610.696 556.213 536.802 556.213C462.908 556.213 403.008 496.31 403.008 422.419C403.008 348.526 462.908 288.625 536.802 288.625C610.696 288.625 670.596 348.526 670.596 422.419Z",fill:"#2C2C36"}),jsxRuntime.jsx("path",{id:"Fill 7","fill-rule":"evenodd","clip-rule":"evenodd",d:"M671.869 429.381C646.483 437.653 619.182 423.736 610.942 398.318C602.67 372.932 616.59 345.635 641.976 337.391C667.39 329.119 694.688 343.039 702.931 368.425C711.172 393.84 697.283 421.137 671.869 429.381ZM639.46 563.731C617.865 579.445 587.604 574.655 571.916 553.034C556.199 531.439 560.991 501.175 582.612 485.487C604.233 469.77 634.469 474.562 650.157 496.184C665.87 517.776 661.081 548.043 639.46 563.731ZM488.426 296.117C488.426 269.39 510.075 247.741 536.802 247.741C563.503 247.741 585.153 269.39 585.153 296.117C585.153 322.815 563.503 344.465 536.802 344.465C510.075 344.465 488.426 322.815 488.426 296.117ZM501.685 553.034C485.969 574.655 455.73 579.445 434.112 563.731C412.491 548.043 407.699 517.776 423.416 496.184C439.104 474.562 469.368 469.77 490.96 485.487C512.581 501.175 517.373 531.439 501.685 553.034ZM370.638 368.425C378.91 343.039 406.179 329.119 431.593 337.391C457.008 345.635 470.899 372.932 462.656 398.318C454.384 423.736 427.115 437.653 401.7 429.381C376.286 421.137 362.394 393.84 370.638 368.425ZM536.801 201.817C414.95 201.817 316.172 300.567 316.172 422.424C316.172 544.249 414.95 643.024 536.801 643.024C658.626 643.024 757.407 544.249 757.407 422.424C757.407 300.567 658.626 201.817 536.801 201.817Z",fill:"#E8E9EB"}),jsxRuntime.jsx("path",{id:"Fill 13","fill-rule":"evenodd","clip-rule":"evenodd",d:"M575.841 422.42C575.841 443.978 558.365 461.452 536.807 461.452C515.251 461.452 497.777 443.978 497.777 422.42C497.777 400.861 515.251 383.388 536.807 383.388C558.365 383.388 575.841 400.861 575.841 422.42Z",fill:"#AFB0B5"}),jsxRuntime.jsx("path",{id:"Fill 15","fill-rule":"evenodd","clip-rule":"evenodd",d:"M564.405 422.42C564.405 437.663 552.049 450.019 536.803 450.019C521.56 450.019 509.203 437.663 509.203 422.42C509.203 407.177 521.56 394.82 536.803 394.82C552.049 394.82 564.405 407.177 564.405 422.42Z",fill:"#1A1A24"}),jsxRuntime.jsx("path",{id:"Fill 17","fill-rule":"evenodd","clip-rule":"evenodd",d:"M227.404 417.234C223.661 430.72 209.696 438.615 196.213 434.873C182.73 431.13 174.831 417.165 178.574 403.682C182.316 390.196 196.281 382.3 209.765 386.043C223.251 389.785 231.146 403.75 227.404 417.234Z",fill:"#FBCF0A"}),jsxRuntime.jsx("path",{id:"Fill 19","fill-rule":"evenodd","clip-rule":"evenodd",d:"M192.001 407.407C188.259 420.891 174.294 428.789 160.811 425.046C147.327 421.304 139.429 407.339 143.171 393.856C146.914 380.37 160.879 372.474 174.362 376.217C187.848 379.959 195.744 393.924 192.001 407.407Z",fill:"#FBE381"}),jsxRuntime.jsx("path",{id:"Fill 21","fill-rule":"evenodd","clip-rule":"evenodd",d:"M282.154 410.85C278.411 424.333 264.446 432.231 250.963 428.489C237.48 424.747 229.581 410.781 233.324 397.298C237.066 383.812 251.031 375.917 264.515 379.659C277.998 383.401 285.896 397.367 282.154 410.85Z",fill:"#FBCF0A"}),jsxRuntime.jsx("path",{id:"Fill 23","fill-rule":"evenodd","clip-rule":"evenodd",d:"M246.763 401.024C243.021 414.51 229.055 422.405 215.572 418.663C202.089 414.92 194.191 400.955 197.933 387.472C201.675 373.986 215.641 366.09 229.124 369.833C242.607 373.575 250.505 387.54 246.763 401.024Z",fill:"#FBE381"}),jsxRuntime.jsx("path",{id:"Fill 25","fill-rule":"evenodd","clip-rule":"evenodd",d:"M235.468 357.247C239.71 343.912 253.958 336.541 267.292 340.783C280.63 345.024 288.001 359.272 283.759 372.607C279.518 385.944 265.267 393.315 251.932 389.073C238.597 384.832 231.227 370.581 235.468 357.247Z",fill:"#FBCF0A"}),jsxRuntime.jsx("path",{id:"Fill 27","fill-rule":"evenodd","clip-rule":"evenodd",d:"M171.144 357.247C175.386 343.912 189.633 336.541 202.971 340.783C216.306 345.024 223.677 359.272 219.435 372.607C215.194 385.944 200.946 393.315 187.608 389.073C174.273 384.832 166.903 370.581 171.144 357.247Z",fill:"#FBCF0A"}),jsxRuntime.jsx("path",{id:"Fill 29","fill-rule":"evenodd","clip-rule":"evenodd",d:"M320.546 317.695C324.788 304.36 339.035 296.986 352.373 301.228C365.708 305.469 373.079 319.72 368.837 333.055C364.596 346.39 350.348 353.763 337.01 349.519C323.678 345.277 316.305 331.03 320.546 317.695Z",fill:"#FBCF0A"}),jsxRuntime.jsx("path",{id:"Fill 31","fill-rule":"evenodd","clip-rule":"evenodd",d:"M270.472 368.383C274.714 355.049 288.964 347.675 302.299 351.919C315.634 356.158 323.004 370.409 318.763 383.743C314.521 397.078 300.274 404.452 286.939 400.21C273.604 395.966 266.231 381.718 270.472 368.383Z",fill:"#FBE381"}),jsxRuntime.jsx("path",{id:"Fill 33","fill-rule":"evenodd","clip-rule":"evenodd",d:"M278.254 403.448C282.495 390.114 296.743 382.743 310.08 386.985C323.415 391.223 330.786 405.474 326.544 418.809C322.303 432.143 308.055 439.517 294.718 435.275C281.383 431.031 274.012 416.783 278.254 403.448Z",fill:"#FBCF0A"}),jsxRuntime.jsx("path",{id:"Fill 35","fill-rule":"evenodd","clip-rule":"evenodd",d:"M313.269 414.584C317.511 401.249 331.758 393.879 345.093 398.12C358.431 402.362 365.802 416.609 361.56 429.947C357.319 443.282 343.071 450.655 329.733 446.411C316.398 442.17 309.028 427.922 313.269 414.584Z",fill:"#FBE381"}),jsxRuntime.jsx("path",{id:"Fill 37","fill-rule":"evenodd","clip-rule":"evenodd",d:"M280.116 363.931C266.67 360.057 258.908 346.015 262.782 332.569C266.658 319.123 280.698 311.361 294.144 315.235C307.59 319.111 315.351 333.151 311.478 346.597C307.604 360.046 293.562 367.804 280.116 363.931Z",fill:"#FBCF0A"}),jsxRuntime.jsx("path",{id:"Fill 39","fill-rule":"evenodd","clip-rule":"evenodd",d:"M327.692 416.545C314.246 412.671 306.485 398.629 310.361 385.183C314.235 371.737 328.277 363.975 341.723 367.852C355.169 371.725 362.931 385.765 359.054 399.214C355.181 412.66 341.138 420.418 327.692 416.545Z",fill:"#FBCF0A"}),jsxRuntime.jsx("path",{id:"Fill 41","fill-rule":"evenodd","clip-rule":"evenodd",d:"M355.748 378.036C342.302 374.163 334.541 360.121 338.415 346.674C342.291 333.228 356.33 325.467 369.776 329.341C383.225 333.217 390.984 347.256 387.11 360.703C383.237 374.152 369.195 381.91 355.748 378.036Z",fill:"#FBCF0A"}),jsxRuntime.jsx("path",{id:"Fill 43","fill-rule":"evenodd","clip-rule":"evenodd",d:"M364.595 418.595C351.148 414.721 343.387 400.679 347.263 387.233C351.137 373.787 365.179 366.025 378.625 369.902C392.072 373.775 399.833 387.815 395.956 401.264C392.083 414.71 378.041 422.468 364.595 418.595Z",fill:"#FBE381"}),jsxRuntime.jsx("path",{id:"Fill 45","fill-rule":"evenodd","clip-rule":"evenodd",d:"M408.49 371.79C422.481 371.981 433.671 383.482 433.477 397.473C433.286 411.467 421.788 422.654 407.794 422.463C393.803 422.269 382.616 410.771 382.807 396.78C382.998 382.786 394.496 371.599 408.49 371.79Z",fill:"#FBCF0A"}),jsxRuntime.jsx("path",{id:"Fill 47","fill-rule":"evenodd","clip-rule":"evenodd",d:"M389.271 334.999C403.262 335.19 414.452 346.691 414.258 360.682C414.067 374.676 402.569 385.863 388.575 385.672C374.584 385.478 363.397 373.98 363.588 359.989C363.779 345.995 375.28 334.808 389.271 334.999Z",fill:"#FBE381"}),jsxRuntime.jsx("path",{id:"Fill 49","fill-rule":"evenodd","clip-rule":"evenodd",d:"M312.33 375.066C298.884 371.192 291.123 357.15 294.997 343.704C298.873 330.258 312.915 322.496 326.359 326.373C339.808 330.246 347.569 344.286 343.692 357.735C339.819 371.181 325.777 378.939 312.33 375.066Z",fill:"#FBE381"}),jsxRuntime.jsx("path",{id:"Fill 51","fill-rule":"evenodd","clip-rule":"evenodd",d:"M219.237 375.066C205.791 371.192 198.029 357.15 201.903 343.704C205.779 330.258 219.821 322.496 233.265 326.373C246.714 330.246 254.472 344.286 250.599 357.735C246.725 371.181 232.683 378.939 219.237 375.066Z",fill:"#FBE381"}),jsxRuntime.jsx("path",{id:"Fill 53","fill-rule":"evenodd","clip-rule":"evenodd",d:"M241.489 349.722C228.043 345.848 220.282 331.806 224.158 318.36C228.032 304.914 242.074 297.152 255.517 301.029C268.966 304.902 276.727 318.942 272.851 332.391C268.977 345.837 254.935 353.595 241.489 349.722Z",fill:"#FBE381"}),jsxRuntime.jsx("path",{id:"Fill 55","fill-rule":"evenodd","clip-rule":"evenodd",d:"M410.37 441.512V441.537L406.89 457.245L365.901 642.508L364.484 648.9C363.171 654.787 357.926 659.014 351.879 659.014H202.656C196.823 659.014 191.715 655.11 190.214 649.462L188.343 642.533V642.508L138.923 459.892L133.945 441.512V441.483C134.402 424.201 148.127 410.312 165.011 410.312C176.383 410.312 186.281 416.625 191.74 425.992C191.766 426.046 191.795 426.1 191.82 426.152C197.225 416.707 207.18 410.312 218.604 410.312C230.002 410.312 239.957 416.707 245.388 426.152C245.388 426.152 245.388 426.123 245.414 426.123C250.819 416.707 260.745 410.312 272.172 410.312C283.41 410.312 293.254 416.519 298.713 425.752C298.793 425.883 298.876 426.017 298.953 426.152C304.358 416.707 314.313 410.312 325.74 410.312C337.163 410.312 347.115 416.707 352.521 426.152C352.575 426.072 352.629 425.992 352.68 425.912C358.086 416.602 367.986 410.312 379.305 410.312C396.188 410.312 409.913 424.223 410.37 441.512Z",fill:"#F1F2F6"}),jsxRuntime.jsx("path",{id:"Fill 57","fill-rule":"evenodd","clip-rule":"evenodd",d:"M253.539 659.014H218.942L217.017 642.508L191.73 425.992C191.756 426.046 191.785 426.1 191.81 426.152C197.216 416.707 207.17 410.312 218.594 410.312C229.992 410.312 239.947 416.707 245.378 426.152C245.378 426.152 245.378 426.126 245.404 426.126L252.948 642.508L253.539 659.014Z",fill:"url(#paint0_linear_3964_52069)"}),jsxRuntime.jsx("path",{id:"Fill 59","fill-rule":"evenodd","clip-rule":"evenodd",d:"M352.672 425.913L326.798 642.508L324.819 659.015H287.145L287.975 642.508L298.705 425.75C298.785 425.884 298.865 426.018 298.945 426.152C304.35 416.705 314.305 410.313 325.729 410.313C337.155 410.313 347.107 416.705 352.513 426.152C352.567 426.072 352.618 425.99 352.672 425.913Z",fill:"url(#paint1_linear_3964_52069)"}),jsxRuntime.jsx("path",{id:"Fill 61","fill-rule":"evenodd","clip-rule":"evenodd",d:"M365.89 642.508L364.472 648.9C363.16 654.79 357.918 659.014 351.868 659.014H202.648C196.815 659.014 191.704 655.109 190.206 649.462L188.332 642.533V642.508H365.89Z",fill:"#DCDCDC"}),jsxRuntime.jsx("path",{id:"Fill 63","fill-rule":"evenodd","clip-rule":"evenodd",d:"M226.248 642.507C226.248 657.286 214.268 669.263 199.49 669.263C184.712 669.263 172.734 657.286 172.734 642.507C172.734 627.729 184.712 615.749 199.49 615.749C214.268 615.749 226.248 627.729 226.248 642.507Z",fill:"#FBCF0A"}),jsxRuntime.jsx("path",{id:"Fill 65","fill-rule":"evenodd","clip-rule":"evenodd",d:"M187.459 642.507C187.459 657.286 175.479 669.263 160.704 669.263C145.925 669.263 133.945 657.286 133.945 642.507C133.945 627.729 145.925 615.749 160.704 615.749C175.479 615.749 187.459 627.729 187.459 642.507Z",fill:"#FBE381"}),jsxRuntime.jsx("path",{id:"Fill 67","fill-rule":"evenodd","clip-rule":"evenodd",d:"M506.3 229.324L446.625 348.071C444.751 351.802 440.188 353.311 436.459 351.437C432.731 349.563 431.194 344.988 433.071 341.26L492.817 222.367C494.725 218.747 499.252 217.307 502.934 219.158C504.8 220.093 506.115 221.714 506.719 223.545C506.91 224.118 507.042 224.754 507.065 225.365C507.181 226.68 506.939 228.057 506.3 229.324Z",fill:"url(#paint2_linear_3964_52069)"}),jsxRuntime.jsx("path",{id:"Fill 69","fill-rule":"evenodd","clip-rule":"evenodd",d:"M506.305 229.324L503.376 235.157L488.016 231.931L492.822 222.367L507.07 225.365C507.186 226.68 506.944 228.057 506.305 229.324Z",fill:"#FEFEFE"}),jsxRuntime.jsx("path",{id:"Fill 71","fill-rule":"evenodd","clip-rule":"evenodd",d:"M499.378 243.118L494.569 252.682L479.215 249.456L484.018 239.892L499.378 243.118Z",fill:"#FEFEFE"}),jsxRuntime.jsx("path",{id:"Fill 73","fill-rule":"evenodd","clip-rule":"evenodd",d:"M490.554 260.641L485.748 270.206L470.379 267.002L475.182 257.438L490.554 260.641Z",fill:"#FEFEFE"}),jsxRuntime.jsx("path",{id:"Fill 75","fill-rule":"evenodd","clip-rule":"evenodd",d:"M481.75 278.19L476.944 287.754L461.59 284.528L466.393 274.964L481.75 278.19Z",fill:"#FEFEFE"}),jsxRuntime.jsx("path",{id:"Fill 77","fill-rule":"evenodd","clip-rule":"evenodd",d:"M472.953 295.714L468.143 305.278L452.789 302.052L457.592 292.488L472.953 295.714Z",fill:"#FEFEFE"}),jsxRuntime.jsx("path",{id:"Fill 79","fill-rule":"evenodd","clip-rule":"evenodd",d:"M464.14 313.24L459.333 322.804L443.965 319.6L448.771 310.036L464.14 313.24Z",fill:"#FEFEFE"}),jsxRuntime.jsx("path",{id:"Fill 81","fill-rule":"evenodd","clip-rule":"evenodd",d:"M455.316 330.787L450.51 340.351L435.152 337.125L439.959 327.561L455.316 330.787Z",fill:"#FEFEFE"}),jsxRuntime.jsx("path",{id:"Fill 83","fill-rule":"evenodd","clip-rule":"evenodd",d:"M511.861 662.17H390.447C383.199 662.17 377.215 656.5 376.827 649.263L360.129 338.413H544.749L525.473 649.375C525.028 656.565 519.067 662.17 511.861 662.17Z",fill:"url(#paint3_linear_3964_52069)"}),jsxRuntime.jsx("path",{id:"Fill 85","fill-rule":"evenodd","clip-rule":"evenodd",d:"M554.795 338.414H350.105C347.276 338.414 344.977 336.117 344.977 333.285C344.977 330.453 347.276 328.156 350.105 328.156H554.795C557.627 328.156 559.924 330.453 559.924 333.285C559.924 336.117 557.627 338.414 554.795 338.414Z",fill:"#E8E9EB"}),jsxRuntime.jsx("path",{id:"Fill 87","fill-rule":"evenodd","clip-rule":"evenodd",d:"M540.068 328.158H364.812C361.98 328.158 359.684 325.861 359.684 323.029C359.684 320.197 361.98 317.9 364.812 317.9H540.068C542.898 317.9 545.197 320.197 545.197 323.029C545.197 325.861 542.898 328.158 540.068 328.158Z",fill:"#FEFEFE"}),jsxRuntime.jsx("path",{id:"Fill 89","fill-rule":"evenodd","clip-rule":"evenodd",d:"M404.59 662.17H433.131V338.413H404.59V662.17Z",fill:"white","fill-opacity":"0.5"}),jsxRuntime.jsx("path",{id:"Fill 91","fill-rule":"evenodd","clip-rule":"evenodd",d:"M469.688 662.17H498.228V338.413H469.688V662.17Z",fill:"white","fill-opacity":"0.5"}),jsxRuntime.jsx("path",{id:"Fill 92","fill-rule":"evenodd","clip-rule":"evenodd",d:"M511.266 469.932C523.657 493.935 507.367 526.983 474.884 543.752C442.398 560.518 406.024 554.654 393.634 530.651C381.246 506.648 397.533 473.598 430.019 456.831C462.502 440.065 498.878 445.929 511.266 469.932Z",fill:"url(#paint4_linear_3964_52069)"}),jsxRuntime.jsx("path",{id:"Fill 93","fill-rule":"evenodd","clip-rule":"evenodd",d:"M504.207 473.578C515.106 494.697 500.775 523.777 472.192 538.53C443.611 553.282 411.607 548.122 400.705 527.003C389.806 505.884 404.137 476.807 432.717 462.052C461.298 447.299 493.305 452.462 504.207 473.578Z",fill:"#FCFDFB"}),jsxRuntime.jsx("path",{id:"Fill 94","fill-rule":"evenodd","clip-rule":"evenodd",d:"M420.874 90.1992C408.024 83.9696 397.607 73.6468 391.263 60.8538L386.1 50.4426L382.016 59.2736C375.646 73.0392 364.625 84.1207 350.888 90.5557L341.66 94.8856L351.184 99.6719C362.637 105.428 372.112 114.47 378.399 125.643L386.1 139.326L392.016 128.136C397.909 116.994 406.943 107.824 417.996 101.763L430.54 94.8856L420.874 90.1992Z",fill:"#E8E9EB"}),jsxRuntime.jsx("path",{id:"Fill 95","fill-rule":"evenodd","clip-rule":"evenodd",d:"M455.22 12.3822C451.218 10.4426 447.972 7.22509 445.998 3.24031L444.389 0L443.117 2.7497C441.135 7.03683 437.701 10.4882 433.422 12.4934L430.547 13.8426L433.513 15.3316C437.082 17.1257 440.034 19.941 441.991 23.4209L444.389 27.6824L446.232 24.1996C448.066 20.7283 450.882 17.8702 454.324 15.9848L458.232 13.8426L455.22 12.3822Z",fill:"#E8E9EB"}),jsxRuntime.jsx("path",{id:"Fill 96","fill-rule":"evenodd","clip-rule":"evenodd",d:"M352.493 46.0399C348.492 44.1003 345.246 40.8857 343.272 36.9009L341.663 33.6577L340.391 36.4074C338.408 40.6945 334.974 44.1459 330.696 46.1512L327.82 47.5003L330.79 48.9921C334.355 50.7834 337.307 53.5987 339.264 57.0786L341.663 61.3401L343.506 57.8573C345.343 54.386 348.155 51.5279 351.598 49.6425L355.506 47.5003L352.493 46.0399Z",fill:"#E8E9EB"}),jsxRuntime.jsx("path",{id:"Stroke 97",d:"M356.335 132.833C327.817 168.437 349.992 194.322 370.03 201.818",stroke:"#E8E9EB","stroke-width":"0.950795"}),jsxRuntime.jsx("path",{id:"Fill 98","fill-rule":"evenodd","clip-rule":"evenodd",d:"M53.8159 338.777C47.3467 330.511 43.8069 320.328 43.7556 309.828L43.7128 301.285L38.162 305.795C29.5051 312.823 18.646 316.574 7.49606 316.383L0 316.255L4.74066 322.496C10.4426 330 13.7742 339.034 14.3133 348.444L14.9722 359.967L22.4968 354.494C29.99 349.043 38.9179 345.908 48.1768 345.483L58.6821 344.998L53.8159 338.777Z",fill:"url(#paint5_linear_3964_52069)"}),jsxRuntime.jsx("path",{id:"Fill 99","fill-rule":"evenodd","clip-rule":"evenodd",d:"M101.651 298.507C99.6346 295.931 98.5336 292.759 98.5165 289.49L98.5051 286.829L96.7765 288.232C94.0782 290.423 90.6981 291.589 87.2239 291.532L84.8906 291.493L86.3682 293.435C88.1423 295.774 89.1806 298.586 89.3489 301.516L89.5514 305.104L91.8961 303.401C94.2293 301.704 97.0133 300.726 99.8942 300.594L103.166 300.443L101.651 298.507Z",fill:"url(#paint6_linear_3964_52069)"}),jsxRuntime.jsx("path",{id:"Fill 100","fill-rule":"evenodd","clip-rule":"evenodd",d:"M22.9598 287.511C20.9432 284.935 19.8422 281.763 19.8251 278.494L19.8108 275.833L18.0851 277.236C15.3867 279.427 12.0067 280.596 8.53247 280.537L6.19922 280.497L7.67675 282.439C9.45094 284.778 10.4892 287.591 10.6575 290.52L10.86 294.111L13.2047 292.405C15.5379 290.708 18.3218 289.733 21.2028 289.599L24.4744 289.447L22.9598 287.511Z",fill:"url(#paint7_linear_3964_52069)"}),jsxRuntime.jsx("path",{id:"Fill 101","fill-rule":"evenodd","clip-rule":"evenodd",d:"M158.893 356.036L156.163 356.866C153.248 347.268 144.999 337.758 135.152 332.641C129.242 329.566 119.955 326.645 109.124 330.185L108.234 327.476C117.55 324.435 127.297 325.339 136.467 330.108C146.961 335.565 155.764 345.742 158.893 356.036Z",fill:"url(#paint8_linear_3964_52069)"}),jsxRuntime.jsx("path",{id:"Fill 102","fill-rule":"evenodd","clip-rule":"evenodd",d:"M158.03 271.611L159.639 273.967C151.358 279.627 144.758 290.346 142.824 301.273C141.663 307.834 141.66 317.569 148.283 326.839L145.964 328.499C140.271 320.524 138.215 310.954 140.017 300.777C142.077 289.131 149.148 277.681 158.03 271.611Z",fill:"url(#paint9_linear_3964_52069)"})]})]}),jsxRuntime.jsxs("defs",{children:[jsxRuntime.jsxs("linearGradient",{id:"paint0_linear_3964_52069",x1:"222.635",y1:"285.961",x2:"106.209",y2:"314.896",gradientUnits:"userSpaceOnUse",children:[jsxRuntime.jsx("stop",{"stop-color":"#FF8960"}),jsxRuntime.jsx("stop",{offset:"1","stop-color":"#FF62A5"})]}),jsxRuntime.jsxs("linearGradient",{id:"paint1_linear_3964_52069",x1:"319.908",y1:"285.962",x2:"197.36",y2:"318.251",gradientUnits:"userSpaceOnUse",children:[jsxRuntime.jsx("stop",{"stop-color":"#FF8960"}),jsxRuntime.jsx("stop",{offset:"1","stop-color":"#FF62A5"})]}),jsxRuntime.jsxs("linearGradient",{id:"paint2_linear_3964_52069",x1:"469.681",y1:"151.404",x2:"355.647",y2:"215.131",gradientUnits:"userSpaceOnUse",children:[jsxRuntime.jsx("stop",{"stop-color":"#B739F3"}),jsxRuntime.jsx("stop",{offset:"1","stop-color":"#6950FB"})]}),jsxRuntime.jsxs("linearGradient",{id:"paint3_linear_3964_52069",x1:"485.265",y1:"108.012",x2:"132.888",y2:"270.28",gradientUnits:"userSpaceOnUse",children:[jsxRuntime.jsx("stop",{"stop-color":"#1162D7"}),jsxRuntime.jsx("stop",{offset:"0.66199","stop-color":"#78F3E3"}),jsxRuntime.jsx("stop",{offset:"1","stop-color":"#52E5BB"})]}),jsxRuntime.jsxs("linearGradient",{id:"paint4_linear_3964_52069",x1:"474.842",y1:"371.812",x2:"323.09",y2:"517.351",gradientUnits:"userSpaceOnUse",children:[jsxRuntime.jsx("stop",{"stop-color":"#1162D7"}),jsxRuntime.jsx("stop",{offset:"0.66199","stop-color":"#78F3E3"}),jsxRuntime.jsx("stop",{offset:"1","stop-color":"#52E5BB"})]}),jsxRuntime.jsxs("linearGradient",{id:"paint5_linear_3964_52069",x1:"39.7749",y1:"259.524",x2:"-42.3953",y2:"325.88",gradientUnits:"userSpaceOnUse",children:[jsxRuntime.jsx("stop",{"stop-color":"#1162D7"}),jsxRuntime.jsx("stop",{offset:"0.66199","stop-color":"#78F3E3"}),jsxRuntime.jsx("stop",{offset:"1","stop-color":"#52E5BB"})]}),jsxRuntime.jsxs("linearGradient",{id:"paint6_linear_3964_52069",x1:"97.2776",y1:"273.823",x2:"71.6876",y2:"294.488",gradientUnits:"userSpaceOnUse",children:[jsxRuntime.jsx("stop",{"stop-color":"#1162D7"}),jsxRuntime.jsx("stop",{offset:"0.66199","stop-color":"#78F3E3"}),jsxRuntime.jsx("stop",{offset:"1","stop-color":"#52E5BB"})]}),jsxRuntime.jsxs("linearGradient",{id:"paint7_linear_3964_52069",x1:"18.5862",y1:"262.825",x2:"-7.007",y2:"283.49",gradientUnits:"userSpaceOnUse",children:[jsxRuntime.jsx("stop",{"stop-color":"#1162D7"}),jsxRuntime.jsx("stop",{offset:"0.66199","stop-color":"#78F3E3"}),jsxRuntime.jsx("stop",{offset:"1","stop-color":"#52E5BB"})]}),jsxRuntime.jsxs("linearGradient",{id:"paint8_linear_3964_52069",x1:"142.571",y1:"303.543",x2:"99.5537",y2:"360.03",gradientUnits:"userSpaceOnUse",children:[jsxRuntime.jsx("stop",{"stop-color":"#1162D7"}),jsxRuntime.jsx("stop",{offset:"0.66199","stop-color":"#78F3E3"}),jsxRuntime.jsx("stop",{offset:"1","stop-color":"#52E5BB"})]}),jsxRuntime.jsxs("linearGradient",{id:"paint9_linear_3964_52069",x1:"153.112",y1:"231.127",x2:"109.831",y2:"243.572",gradientUnits:"userSpaceOnUse",children:[jsxRuntime.jsx("stop",{"stop-color":"#1162D7"}),jsxRuntime.jsx("stop",{offset:"0.66199","stop-color":"#78F3E3"}),jsxRuntime.jsx("stop",{offset:"1","stop-color":"#52E5BB"})]})]})]}),NotActive=({title:i,description:e,type:t})=>jsxRuntime.jsxs("div",{className:"pl-w-full pl-h-full pl-rounded-2xl pl-flex pl-flex-col pl-gap-4 pl-justify-center pl-items-center",children:[jsxRuntime.jsx("div",{className:"pl-flex pl-justify-center",children:jsxRuntime.jsx(NotActiveVideoIcon,{})}),i?jsxRuntime.jsx("h1",{id:"notActive",className:"pl-text-center pl-text-secondary-800 pl-text-[16px] pl-font-bold",children:i}):null,jsxRuntime.jsx("p",{className:"pl-text-[14px] pl-text-secondary-600 pl-font-normal pl-text-center pl-leading-6",children:e}),t==="404"&&jsxRuntime.jsx("a",{href:"",className:"pl-bg-main hover:pl-bg-main-700 pl-transition-colors pl-duration-300 pl-text-white pl-w-[280px] pl-py-4 pl-rounded-[8px] pl-font-medium pl-text-[15px] pl-text-center",children:translate().retry})]}),VideoPlayer$1=React2.lazy(()=>Promise.resolve().then(()=>videoPlayer)),LiveAndVodPlayer=()=>{const[i,e]=React2.useState(void 0),{params:t,errorType:n,isValidAddress:s}=useAppSelector(({videoData:{params:r,errorType:a,details:o,isValidAddress:l,isFetchDetails:d,isComplexDesktop:f,isComplexPortrait:u}})=>({params:r,errorType:a,details:o,isValidAddress:l,isFetchDetails:d,isComplexDesktop:f,isComplexPortrait:u}),shallowEqual);return useGetData(),useHandleScroll(),React2.useEffect(()=>{conditions(ConditionName.isValidAddress)||e(handleNotActiveText(n))},[s,n]),React2.useEffect(()=>{conditions(ConditionName.isGeneral)&&hasPermissionToRedirect(t.src)},[conditions(ConditionName.isGeneral)]),jsxRuntime.jsx(jsxRuntime.Fragment,{children:conditions(ConditionName.isFetchDetails)?conditions(ConditionName.isValidAddress)?jsxRuntime.jsx("div",{className:`${t.height?t.height:"pl-max-h-[100dvh]"} ${conditions(ConditionName.backgroundColorInLightMode)?"pl-bg-white":"pl-bg-dark-1"} dark:pl-bg-dark-1`,children:jsxRuntime.jsx(React2.Suspense,{fallback:"",children:jsxRuntime.jsx(VideoPlayer$1,{})})}):jsxRuntime.jsx("div",{className:`pl-bg-white ${t.height?t.height:"pl-h-full"} pl-p-4`,children:jsxRuntime.jsx(NotActive,{title:i.title,description:i.description,type:t.type})}):jsxRuntime.jsx("div",{className:`${t.height?t.height:"pl-h-full"} ${t.width?t.width:"pl-h-full"} pl-bg-black`})})},player=Object.freeze(Object.defineProperty({__proto__:null,default:LiveAndVodPlayer},Symbol.toStringTag,{value:"Module"})),ParamsErrorPopover=({requiredItems:i,notRequiredItems:e})=>{const t=jsxRuntime.jsxs("div",{className:"pl-flex pl-items-center pl-gap-2 pl-py-[18px]",children:[jsxRuntime.jsx("img",{src:IMAGES.danger,className:"pl-size-6"}),jsxRuntime.jsx("p",{className:"pl-text-[18px] pl-font-bold pl-text-z-gray-700",children:"خطایی رخ داده است!"})]});return jsxRuntime.jsx(Popover,{type:"modal",status:!0,onClose:()=>{},isHeader:!0,customHeader:t,classNames:"pl-w-full pl-h-full",children:jsxRuntime.jsxs("div",{className:"pl-mt-[51px] pl-text-center",children:[jsxRuntime.jsxs("div",{className:"pl-mb-[50px]",children:[!conditions(ConditionName.hasAllParams)&&jsxRuntime.jsx("p",{className:"pl-mb-4",children:"پارامتر جدیدی در redux تعریف شده است. لازم است که تداخل این پارامتر را با پارامترهای موجود بررسی کنید."}),!!i.length&&jsxRuntime.jsxs("p",{className:"pl-mb-4",children:[jsxRuntime.jsx("span",{children:i.length===1?"پارامتر":"پارامترهای"})," ",jsxRuntime.jsx("span",{children:i.join(" و ")})," ",jsxRuntime.jsx("span",{children:i.length===1?"الزامی است.":"الزامی هستند."})]}),!!e.length&&jsxRuntime.jsxs("p",{children:[jsxRuntime.jsx("span",{children:e.length===1?"پارامتر":"پارامترهای"})," ",jsxRuntime.jsx("span",{children:e.join(" و ")})," ",jsxRuntime.jsx("span",{children:e.length===1?"به اشتباه وارد شده است.":"به اشتباه وارد شده اند."})]})]}),jsxRuntime.jsx("img",{src:IMAGES.danger1,width:352,height:198})]})})},paramsErrorPopover=Object.freeze(Object.defineProperty({__proto__:null,default:ParamsErrorPopover},Symbol.toStringTag,{value:"Module"})),StaticVideoTag=()=>{const i=useAppDispatch(),{params:e}=useAppSelector(({videoData:{params:a}})=>({params:a}),shallowEqual);useAppSelector(({controller:{firstPlay:a}})=>({firstPlay:a}),shallowEqual);const t=React2.useRef(0),n=React2.useRef(0),s=React2.useRef(null),r=React2.useRef(null);return React2.useEffect(()=>{handlePageLoadTime(t),n.current=Date.now()},[]),React2.useEffect(()=>{const a=()=>{var l;const o=(l=videoTag())==null?void 0:l.getBoundingClientRect();o&&i(setVideoElementSizeInfo(o))};return conditions(ConditionName.isFirstPlay)&&a(),window.addEventListener("resize",a),()=>{window.removeEventListener("resize",a),clearInterval(r.current)}},[]),jsxRuntime.jsx("video",{autoPlay:conditions(ConditionName.hasAutoPlay),id:"player-tag",crossOrigin:"anonymous",className:`pl-h-full pl-w-full pl-flex-1 pl-items-center ${conditions(ConditionName.isFirstPlay)&&"pl-opacity-0"}`,onPause:handleStaticVideoPause,onPlay:a=>handleStaticVideoPlay(a,s),onPlaying:()=>handleStaticVideoPlaying(t,n,s),onTimeUpdate:handleStaticVideoTimeUpdate,onCanPlay:handleStaticVideoCanPlay,onLoadedData:a=>handleStaticVideoLoadedData(a,r),onEnded:handleStaticVideoEnded,playsInline:!0,children:jsxRuntime.jsx("source",{src:e.src})})},staticVideoTag=Object.freeze(Object.defineProperty({__proto__:null,default:StaticVideoTag},Symbol.toStringTag,{value:"Module"}));function getDefaultExportFromCjs(i){return i&&i.__esModule&&Object.prototype.hasOwnProperty.call(i,"default")?i.default:i}var urlToolkit={exports:{}};(function(i,e){(function(t){var n=/^(?=((?:[a-zA-Z0-9+\-.]+:)?))\1(?=((?:\/\/[^\/?#]*)?))\2(?=((?:(?:[^?#\/]*\/)*[^;?#\/]*)?))\3((?:;[^?#]*)?)(\?[^#]*)?(#[^]*)?$/,s=/^(?=([^\/?#]*))\1([^]*)$/,r=/(?:\/|^)\.(?=\/)/g,a=/(?:\/|^)\.\.\/(?!\.\.\/)[^\/]*(?=\/)/g,o={buildAbsoluteURL:function(l,d,f){if(f=f||{},l=l.trim(),d=d.trim(),!d){if(!f.alwaysNormalize)return l;var u=o.parseURL(l);if(!u)throw new Error("Error trying to parse base URL.");return u.path=o.normalizePath(u.path),o.buildURLFromParts(u)}var p=o.parseURL(d);if(!p)throw new Error("Error trying to parse relative URL.");if(p.scheme)return f.alwaysNormalize?(p.path=o.normalizePath(p.path),o.buildURLFromParts(p)):d;var m=o.parseURL(l);if(!m)throw new Error("Error trying to parse base URL.");if(!m.netLoc&&m.path&&m.path[0]!=="/"){var g=s.exec(m.path);m.netLoc=g[1],m.path=g[2]}m.netLoc&&!m.path&&(m.path="/");var y={scheme:m.scheme,netLoc:p.netLoc,path:null,params:p.params,query:p.query,fragment:p.fragment};if(!p.netLoc&&(y.netLoc=m.netLoc,p.path[0]!=="/"))if(!p.path)y.path=m.path,p.params||(y.params=m.params,p.query||(y.query=m.query));else{var v=m.path,b=v.substring(0,v.lastIndexOf("/")+1)+p.path;y.path=o.normalizePath(b)}return y.path===null&&(y.path=f.alwaysNormalize?o.normalizePath(p.path):p.path),o.buildURLFromParts(y)},parseURL:function(l){var d=n.exec(l);return d?{scheme:d[1]||"",netLoc:d[2]||"",path:d[3]||"",params:d[4]||"",query:d[5]||"",fragment:d[6]||""}:null},normalizePath:function(l){for(l=l.split("").reverse().join("").replace(r,"");l.length!==(l=l.replace(a,"")).length;);return l.split("").reverse().join("")},buildURLFromParts:function(l){return l.scheme+l.netLoc+l.path+l.params+l.query+l.fragment}};i.exports=o})()})(urlToolkit);var urlToolkitExports=urlToolkit.exports;function ownKeys(i,e){var t=Object.keys(i);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(i);e&&(n=n.filter(function(s){return Object.getOwnPropertyDescriptor(i,s).enumerable})),t.push.apply(t,n)}return t}function _objectSpread2(i){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?ownKeys(Object(t),!0).forEach(function(n){_defineProperty(i,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(i,Object.getOwnPropertyDescriptors(t)):ownKeys(Object(t)).forEach(function(n){Object.defineProperty(i,n,Object.getOwnPropertyDescriptor(t,n))})}return i}function _toPrimitive(i,e){if(typeof i!="object"||!i)return i;var t=i[Symbol.toPrimitive];if(t!==void 0){var n=t.call(i,e);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(i)}function _toPropertyKey(i){var e=_toPrimitive(i,"string");return typeof e=="symbol"?e:String(e)}function _defineProperty(i,e,t){return e=_toPropertyKey(e),e in i?Object.defineProperty(i,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):i[e]=t,i}function _extends$1(){return _extends$1=Object.assign?Object.assign.bind():function(i){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(i[n]=t[n])}return i},_extends$1.apply(this,arguments)}const isFiniteNumber=Number.isFinite||function(i){return typeof i=="number"&&isFinite(i)},isSafeInteger=Number.isSafeInteger||function(i){return typeof i=="number"&&Math.abs(i)<=MAX_SAFE_INTEGER},MAX_SAFE_INTEGER=Number.MAX_SAFE_INTEGER||9007199254740991;let Events=function(i){return i.MEDIA_ATTACHING="hlsMediaAttaching",i.MEDIA_ATTACHED="hlsMediaAttached",i.MEDIA_DETACHING="hlsMediaDetaching",i.MEDIA_DETACHED="hlsMediaDetached",i.BUFFER_RESET="hlsBufferReset",i.BUFFER_CODECS="hlsBufferCodecs",i.BUFFER_CREATED="hlsBufferCreated",i.BUFFER_APPENDING="hlsBufferAppending",i.BUFFER_APPENDED="hlsBufferAppended",i.BUFFER_EOS="hlsBufferEos",i.BUFFER_FLUSHING="hlsBufferFlushing",i.BUFFER_FLUSHED="hlsBufferFlushed",i.MANIFEST_LOADING="hlsManifestLoading",i.MANIFEST_LOADED="hlsManifestLoaded",i.MANIFEST_PARSED="hlsManifestParsed",i.LEVEL_SWITCHING="hlsLevelSwitching",i.LEVEL_SWITCHED="hlsLevelSwitched",i.LEVEL_LOADING="hlsLevelLoading",i.LEVEL_LOADED="hlsLevelLoaded",i.LEVEL_UPDATED="hlsLevelUpdated",i.LEVEL_PTS_UPDATED="hlsLevelPtsUpdated",i.LEVELS_UPDATED="hlsLevelsUpdated",i.AUDIO_TRACKS_UPDATED="hlsAudioTracksUpdated",i.AUDIO_TRACK_SWITCHING="hlsAudioTrackSwitching",i.AUDIO_TRACK_SWITCHED="hlsAudioTrackSwitched",i.AUDIO_TRACK_LOADING="hlsAudioTrackLoading",i.AUDIO_TRACK_LOADED="hlsAudioTrackLoaded",i.SUBTITLE_TRACKS_UPDATED="hlsSubtitleTracksUpdated",i.SUBTITLE_TRACKS_CLEARED="hlsSubtitleTracksCleared",i.SUBTITLE_TRACK_SWITCH="hlsSubtitleTrackSwitch",i.SUBTITLE_TRACK_LOADING="hlsSubtitleTrackLoading",i.SUBTITLE_TRACK_LOADED="hlsSubtitleTrackLoaded",i.SUBTITLE_FRAG_PROCESSED="hlsSubtitleFragProcessed",i.CUES_PARSED="hlsCuesParsed",i.NON_NATIVE_TEXT_TRACKS_FOUND="hlsNonNativeTextTracksFound",i.INIT_PTS_FOUND="hlsInitPtsFound",i.FRAG_LOADING="hlsFragLoading",i.FRAG_LOAD_EMERGENCY_ABORTED="hlsFragLoadEmergencyAborted",i.FRAG_LOADED="hlsFragLoaded",i.FRAG_DECRYPTED="hlsFragDecrypted",i.FRAG_PARSING_INIT_SEGMENT="hlsFragParsingInitSegment",i.FRAG_PARSING_USERDATA="hlsFragParsingUserdata",i.FRAG_PARSING_METADATA="hlsFragParsingMetadata",i.FRAG_PARSED="hlsFragParsed",i.FRAG_BUFFERED="hlsFragBuffered",i.FRAG_CHANGED="hlsFragChanged",i.FPS_DROP="hlsFpsDrop",i.FPS_DROP_LEVEL_CAPPING="hlsFpsDropLevelCapping",i.MAX_AUTO_LEVEL_UPDATED="hlsMaxAutoLevelUpdated",i.ERROR="hlsError",i.DESTROYING="hlsDestroying",i.KEY_LOADING="hlsKeyLoading",i.KEY_LOADED="hlsKeyLoaded",i.LIVE_BACK_BUFFER_REACHED="hlsLiveBackBufferReached",i.BACK_BUFFER_REACHED="hlsBackBufferReached",i.STEERING_MANIFEST_LOADED="hlsSteeringManifestLoaded",i}({}),ErrorTypes=function(i){return i.NETWORK_ERROR="networkError",i.MEDIA_ERROR="mediaError",i.KEY_SYSTEM_ERROR="keySystemError",i.MUX_ERROR="muxError",i.OTHER_ERROR="otherError",i}({}),ErrorDetails=function(i){return i.KEY_SYSTEM_NO_KEYS="keySystemNoKeys",i.KEY_SYSTEM_NO_ACCESS="keySystemNoAccess",i.KEY_SYSTEM_NO_SESSION="keySystemNoSession",i.KEY_SYSTEM_NO_CONFIGURED_LICENSE="keySystemNoConfiguredLicense",i.KEY_SYSTEM_LICENSE_REQUEST_FAILED="keySystemLicenseRequestFailed",i.KEY_SYSTEM_SERVER_CERTIFICATE_REQUEST_FAILED="keySystemServerCertificateRequestFailed",i.KEY_SYSTEM_SERVER_CERTIFICATE_UPDATE_FAILED="keySystemServerCertificateUpdateFailed",i.KEY_SYSTEM_SESSION_UPDATE_FAILED="keySystemSessionUpdateFailed",i.KEY_SYSTEM_STATUS_OUTPUT_RESTRICTED="keySystemStatusOutputRestricted",i.KEY_SYSTEM_STATUS_INTERNAL_ERROR="keySystemStatusInternalError",i.MANIFEST_LOAD_ERROR="manifestLoadError",i.MANIFEST_LOAD_TIMEOUT="manifestLoadTimeOut",i.MANIFEST_PARSING_ERROR="manifestParsingError",i.MANIFEST_INCOMPATIBLE_CODECS_ERROR="manifestIncompatibleCodecsError",i.LEVEL_EMPTY_ERROR="levelEmptyError",i.LEVEL_LOAD_ERROR="levelLoadError",i.LEVEL_LOAD_TIMEOUT="levelLoadTimeOut",i.LEVEL_PARSING_ERROR="levelParsingError",i.LEVEL_SWITCH_ERROR="levelSwitchError",i.AUDIO_TRACK_LOAD_ERROR="audioTrackLoadError",i.AUDIO_TRACK_LOAD_TIMEOUT="audioTrackLoadTimeOut",i.SUBTITLE_LOAD_ERROR="subtitleTrackLoadError",i.SUBTITLE_TRACK_LOAD_TIMEOUT="subtitleTrackLoadTimeOut",i.FRAG_LOAD_ERROR="fragLoadError",i.FRAG_LOAD_TIMEOUT="fragLoadTimeOut",i.FRAG_DECRYPT_ERROR="fragDecryptError",i.FRAG_PARSING_ERROR="fragParsingError",i.FRAG_GAP="fragGap",i.REMUX_ALLOC_ERROR="remuxAllocError",i.KEY_LOAD_ERROR="keyLoadError",i.KEY_LOAD_TIMEOUT="keyLoadTimeOut",i.BUFFER_ADD_CODEC_ERROR="bufferAddCodecError",i.BUFFER_INCOMPATIBLE_CODECS_ERROR="bufferIncompatibleCodecsError",i.BUFFER_APPEND_ERROR="bufferAppendError",i.BUFFER_APPENDING_ERROR="bufferAppendingError",i.BUFFER_STALLED_ERROR="bufferStalledError",i.BUFFER_FULL_ERROR="bufferFullError",i.BUFFER_SEEK_OVER_HOLE="bufferSeekOverHole",i.BUFFER_NUDGE_ON_STALL="bufferNudgeOnStall",i.INTERNAL_EXCEPTION="internalException",i.INTERNAL_ABORTED="aborted",i.UNKNOWN="unknown",i}({});const noop$1=function i(){},fakeLogger={trace:noop$1,debug:noop$1,log:noop$1,warn:noop$1,info:noop$1,error:noop$1};let exportedLogger=fakeLogger;function consolePrintFn(i){const e=self.console[i];return e?e.bind(self.console,`[${i}] >`):noop$1}function exportLoggerFunctions(i,...e){e.forEach(function(t){exportedLogger[t]=i[t]?i[t].bind(i):consolePrintFn(t)})}function enableLogs(i,e){if(typeof console=="object"&&i===!0||typeof i=="object"){exportLoggerFunctions(i,"debug","log","info","warn","error");try{exportedLogger.log(`Debug logs enabled for "${e}" in hls.js version 1.5.20`)}catch{exportedLogger=fakeLogger}}else exportedLogger=fakeLogger}const logger=exportedLogger,DECIMAL_RESOLUTION_REGEX=/^(\d+)x(\d+)$/,ATTR_LIST_REGEX=/(.+?)=(".*?"|.*?)(?:,|$)/g;class AttrList{constructor(e){typeof e=="string"&&(e=AttrList.parseAttrList(e)),_extends$1(this,e)}get clientAttrs(){return Object.keys(this).filter(e=>e.substring(0,2)==="X-")}decimalInteger(e){const t=parseInt(this[e],10);return t>Number.MAX_SAFE_INTEGER?1/0:t}hexadecimalInteger(e){if(this[e]){let t=(this[e]||"0x").slice(2);t=(t.length&1?"0":"")+t;const n=new Uint8Array(t.length/2);for(let s=0;s<t.length/2;s++)n[s]=parseInt(t.slice(s*2,s*2+2),16);return n}else return null}hexadecimalIntegerAsNumber(e){const t=parseInt(this[e],16);return t>Number.MAX_SAFE_INTEGER?1/0:t}decimalFloatingPoint(e){return parseFloat(this[e])}optionalFloat(e,t){const n=this[e];return n?parseFloat(n):t}enumeratedString(e){return this[e]}bool(e){return this[e]==="YES"}decimalResolution(e){const t=DECIMAL_RESOLUTION_REGEX.exec(this[e]);if(t!==null)return{width:parseInt(t[1],10),height:parseInt(t[2],10)}}static parseAttrList(e){let t;const n={},s='"';for(ATTR_LIST_REGEX.lastIndex=0;(t=ATTR_LIST_REGEX.exec(e))!==null;){let r=t[2];r.indexOf(s)===0&&r.lastIndexOf(s)===r.length-1&&(r=r.slice(1,-1));const a=t[1].trim();n[a]=r}return n}}function isDateRangeCueAttribute(i){return i!=="ID"&&i!=="CLASS"&&i!=="START-DATE"&&i!=="DURATION"&&i!=="END-DATE"&&i!=="END-ON-NEXT"}function isSCTE35Attribute(i){return i==="SCTE35-OUT"||i==="SCTE35-IN"}class DateRange{constructor(e,t){if(this.attr=void 0,this._startDate=void 0,this._endDate=void 0,this._badValueForSameId=void 0,t){const n=t.attr;for(const s in n)if(Object.prototype.hasOwnProperty.call(e,s)&&e[s]!==n[s]){logger.warn(`DATERANGE tag attribute: "${s}" does not match for tags with ID: "${e.ID}"`),this._badValueForSameId=s;break}e=_extends$1(new AttrList({}),n,e)}if(this.attr=e,this._startDate=new Date(e["START-DATE"]),"END-DATE"in this.attr){const n=new Date(this.attr["END-DATE"]);isFiniteNumber(n.getTime())&&(this._endDate=n)}}get id(){return this.attr.ID}get class(){return this.attr.CLASS}get startDate(){return this._startDate}get endDate(){if(this._endDate)return this._endDate;const e=this.duration;return e!==null?new Date(this._startDate.getTime()+e*1e3):null}get duration(){if("DURATION"in this.attr){const e=this.attr.decimalFloatingPoint("DURATION");if(isFiniteNumber(e))return e}else if(this._endDate)return(this._endDate.getTime()-this._startDate.getTime())/1e3;return null}get plannedDuration(){return"PLANNED-DURATION"in this.attr?this.attr.decimalFloatingPoint("PLANNED-DURATION"):null}get endOnNext(){return this.attr.bool("END-ON-NEXT")}get isValid(){return!!this.id&&!this._badValueForSameId&&isFiniteNumber(this.startDate.getTime())&&(this.duration===null||this.duration>=0)&&(!this.endOnNext||!!this.class)}}class LoadStats{constructor(){this.aborted=!1,this.loaded=0,this.retry=0,this.total=0,this.chunkCount=0,this.bwEstimate=0,this.loading={start:0,first:0,end:0},this.parsing={start:0,end:0},this.buffering={start:0,first:0,end:0}}}var ElementaryStreamTypes={AUDIO:"audio",VIDEO:"video",AUDIOVIDEO:"audiovideo"};class BaseSegment{constructor(e){this._byteRange=null,this._url=null,this.baseurl=void 0,this.relurl=void 0,this.elementaryStreams={[ElementaryStreamTypes.AUDIO]:null,[ElementaryStreamTypes.VIDEO]:null,[ElementaryStreamTypes.AUDIOVIDEO]:null},this.baseurl=e}setByteRange(e,t){const n=e.split("@",2);let s;n.length===1?s=(t==null?void 0:t.byteRangeEndOffset)||0:s=parseInt(n[1]),this._byteRange=[s,parseInt(n[0])+s]}get byteRange(){return this._byteRange?this._byteRange:[]}get byteRangeStartOffset(){return this.byteRange[0]}get byteRangeEndOffset(){return this.byteRange[1]}get url(){return!this._url&&this.baseurl&&this.relurl&&(this._url=urlToolkitExports.buildAbsoluteURL(this.baseurl,this.relurl,{alwaysNormalize:!0})),this._url||""}set url(e){this._url=e}}class Fragment extends BaseSegment{constructor(e,t){super(t),this._decryptdata=null,this.rawProgramDateTime=null,this.programDateTime=null,this.tagList=[],this.duration=0,this.sn=0,this.levelkeys=void 0,this.type=void 0,this.loader=null,this.keyLoader=null,this.level=-1,this.cc=0,this.startPTS=void 0,this.endPTS=void 0,this.startDTS=void 0,this.endDTS=void 0,this.start=0,this.deltaPTS=void 0,this.maxStartPTS=void 0,this.minEndPTS=void 0,this.stats=new LoadStats,this.data=void 0,this.bitrateTest=!1,this.title=null,this.initSegment=null,this.endList=void 0,this.gap=void 0,this.urlId=0,this.type=e}get decryptdata(){const{levelkeys:e}=this;if(!e&&!this._decryptdata)return null;if(!this._decryptdata&&this.levelkeys&&!this.levelkeys.NONE){const t=this.levelkeys.identity;if(t)this._decryptdata=t.getDecryptData(this.sn);else{const n=Object.keys(this.levelkeys);if(n.length===1)return this._decryptdata=this.levelkeys[n[0]].getDecryptData(this.sn)}}return this._decryptdata}get end(){return this.start+this.duration}get endProgramDateTime(){if(this.programDateTime===null||!isFiniteNumber(this.programDateTime))return null;const e=isFiniteNumber(this.duration)?this.duration:0;return this.programDateTime+e*1e3}get encrypted(){var e;if((e=this._decryptdata)!=null&&e.encrypted)return!0;if(this.levelkeys){const t=Object.keys(this.levelkeys),n=t.length;if(n>1||n===1&&this.levelkeys[t[0]].encrypted)return!0}return!1}setKeyFormat(e){if(this.levelkeys){const t=this.levelkeys[e];t&&!this._decryptdata&&(this._decryptdata=t.getDecryptData(this.sn))}}abortRequests(){var e,t;(e=this.loader)==null||e.abort(),(t=this.keyLoader)==null||t.abort()}setElementaryStreamInfo(e,t,n,s,r,a=!1){const{elementaryStreams:o}=this,l=o[e];if(!l){o[e]={startPTS:t,endPTS:n,startDTS:s,endDTS:r,partial:a};return}l.startPTS=Math.min(l.startPTS,t),l.endPTS=Math.max(l.endPTS,n),l.startDTS=Math.min(l.startDTS,s),l.endDTS=Math.max(l.endDTS,r)}clearElementaryStreamInfo(){const{elementaryStreams:e}=this;e[ElementaryStreamTypes.AUDIO]=null,e[ElementaryStreamTypes.VIDEO]=null,e[ElementaryStreamTypes.AUDIOVIDEO]=null}}class Part extends BaseSegment{constructor(e,t,n,s,r){super(n),this.fragOffset=0,this.duration=0,this.gap=!1,this.independent=!1,this.relurl=void 0,this.fragment=void 0,this.index=void 0,this.stats=new LoadStats,this.duration=e.decimalFloatingPoint("DURATION"),this.gap=e.bool("GAP"),this.independent=e.bool("INDEPENDENT"),this.relurl=e.enumeratedString("URI"),this.fragment=t,this.index=s;const a=e.enumeratedString("BYTERANGE");a&&this.setByteRange(a,r),r&&(this.fragOffset=r.fragOffset+r.duration)}get start(){return this.fragment.start+this.fragOffset}get end(){return this.start+this.duration}get loaded(){const{elementaryStreams:e}=this;return!!(e.audio||e.video||e.audiovideo)}}const DEFAULT_TARGET_DURATION=10;class LevelDetails{constructor(e){this.PTSKnown=!1,this.alignedSliding=!1,this.averagetargetduration=void 0,this.endCC=0,this.endSN=0,this.fragments=void 0,this.fragmentHint=void 0,this.partList=null,this.dateRanges=void 0,this.live=!0,this.ageHeader=0,this.advancedDateTime=void 0,this.updated=!0,this.advanced=!0,this.availabilityDelay=void 0,this.misses=0,this.startCC=0,this.startSN=0,this.startTimeOffset=null,this.targetduration=0,this.totalduration=0,this.type=null,this.url=void 0,this.m3u8="",this.version=null,this.canBlockReload=!1,this.canSkipUntil=0,this.canSkipDateRanges=!1,this.skippedSegments=0,this.recentlyRemovedDateranges=void 0,this.partHoldBack=0,this.holdBack=0,this.partTarget=0,this.preloadHint=void 0,this.renditionReports=void 0,this.tuneInGoal=0,this.deltaUpdateFailed=void 0,this.driftStartTime=0,this.driftEndTime=0,this.driftStart=0,this.driftEnd=0,this.encryptedFragments=void 0,this.playlistParsingError=null,this.variableList=null,this.hasVariableRefs=!1,this.fragments=[],this.encryptedFragments=[],this.dateRanges={},this.url=e}reloaded(e){if(!e){this.advanced=!0,this.updated=!0;return}const t=this.lastPartSn-e.lastPartSn,n=this.lastPartIndex-e.lastPartIndex;this.updated=this.endSN!==e.endSN||!!n||!!t||!this.live,this.advanced=this.endSN>e.endSN||t>0||t===0&&n>0,this.updated||this.advanced?this.misses=Math.floor(e.misses*.6):this.misses=e.misses+1,this.availabilityDelay=e.availabilityDelay}get hasProgramDateTime(){return this.fragments.length?isFiniteNumber(this.fragments[this.fragments.length-1].programDateTime):!1}get levelTargetDuration(){return this.averagetargetduration||this.targetduration||DEFAULT_TARGET_DURATION}get drift(){const e=this.driftEndTime-this.driftStartTime;return e>0?(this.driftEnd-this.driftStart)*1e3/e:1}get edge(){return this.partEnd||this.fragmentEnd}get partEnd(){var e;return(e=this.partList)!=null&&e.length?this.partList[this.partList.length-1].end:this.fragmentEnd}get fragmentEnd(){var e;return(e=this.fragments)!=null&&e.length?this.fragments[this.fragments.length-1].end:0}get age(){return this.advancedDateTime?Math.max(Date.now()-this.advancedDateTime,0)/1e3:0}get lastPartIndex(){var e;return(e=this.partList)!=null&&e.length?this.partList[this.partList.length-1].index:-1}get lastPartSn(){var e;return(e=this.partList)!=null&&e.length?this.partList[this.partList.length-1].fragment.sn:this.endSN}}function base64Decode(i){return Uint8Array.from(atob(i),e=>e.charCodeAt(0))}function getKeyIdBytes(i){const e=strToUtf8array(i).subarray(0,16),t=new Uint8Array(16);return t.set(e,16-e.length),t}function changeEndianness(i){const e=function(n,s,r){const a=n[s];n[s]=n[r],n[r]=a};e(i,0,3),e(i,1,2),e(i,4,5),e(i,6,7)}function convertDataUriToArrayBytes(i){const e=i.split(":");let t=null;if(e[0]==="data"&&e.length===2){const n=e[1].split(";"),s=n[n.length-1].split(",");if(s.length===2){const r=s[0]==="base64",a=s[1];r?(n.splice(-1,1),t=base64Decode(a)):t=getKeyIdBytes(a)}}return t}function strToUtf8array(i){return Uint8Array.from(unescape(encodeURIComponent(i)),e=>e.charCodeAt(0))}const optionalSelf=typeof self<"u"?self:void 0;var KeySystems={CLEARKEY:"org.w3.clearkey",FAIRPLAY:"com.apple.fps",PLAYREADY:"com.microsoft.playready",WIDEVINE:"com.widevine.alpha"},KeySystemFormats={CLEARKEY:"org.w3.clearkey",FAIRPLAY:"com.apple.streamingkeydelivery",PLAYREADY:"com.microsoft.playready",WIDEVINE:"urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed"};function keySystemFormatToKeySystemDomain(i){switch(i){case KeySystemFormats.FAIRPLAY:return KeySystems.FAIRPLAY;case KeySystemFormats.PLAYREADY:return KeySystems.PLAYREADY;case KeySystemFormats.WIDEVINE:return KeySystems.WIDEVINE;case KeySystemFormats.CLEARKEY:return KeySystems.CLEARKEY}}var KeySystemIds={CENC:"1077efecc0b24d02ace33c1e52e2fb4b",CLEARKEY:"e2719d58a985b3c9781ab030af78d30e",PLAYREADY:"9a04f07998404286ab92e65be0885f95",WIDEVINE:"edef8ba979d64acea3c827dcd51d21ed"};function keySystemIdToKeySystemDomain(i){if(i===KeySystemIds.WIDEVINE)return KeySystems.WIDEVINE;if(i===KeySystemIds.PLAYREADY)return KeySystems.PLAYREADY;if(i===KeySystemIds.CENC||i===KeySystemIds.CLEARKEY)return KeySystems.CLEARKEY}function keySystemDomainToKeySystemFormat(i){switch(i){case KeySystems.FAIRPLAY:return KeySystemFormats.FAIRPLAY;case KeySystems.PLAYREADY:return KeySystemFormats.PLAYREADY;case KeySystems.WIDEVINE:return KeySystemFormats.WIDEVINE;case KeySystems.CLEARKEY:return KeySystemFormats.CLEARKEY}}function getKeySystemsForConfig(i){const{drmSystems:e,widevineLicenseUrl:t}=i,n=e?[KeySystems.FAIRPLAY,KeySystems.WIDEVINE,KeySystems.PLAYREADY,KeySystems.CLEARKEY].filter(s=>!!e[s]):[];return!n[KeySystems.WIDEVINE]&&t&&n.push(KeySystems.WIDEVINE),n}const requestMediaKeySystemAccess=function(i){return optionalSelf!=null&&(i=optionalSelf.navigator)!=null&&i.requestMediaKeySystemAccess?self.navigator.requestMediaKeySystemAccess.bind(self.navigator):null}();function getSupportedMediaKeySystemConfigurations(i,e,t,n){let s;switch(i){case KeySystems.FAIRPLAY:s=["cenc","sinf"];break;case KeySystems.WIDEVINE:case KeySystems.PLAYREADY:s=["cenc"];break;case KeySystems.CLEARKEY:s=["cenc","keyids"];break;default:throw new Error(`Unknown key-system: ${i}`)}return createMediaKeySystemConfigurations(s,e,t,n)}function createMediaKeySystemConfigurations(i,e,t,n){return[{initDataTypes:i,persistentState:n.persistentState||"optional",distinctiveIdentifier:n.distinctiveIdentifier||"optional",sessionTypes:n.sessionTypes||[n.sessionType||"temporary"],audioCapabilities:e.map(r=>({contentType:`audio/mp4; codecs="${r}"`,robustness:n.audioRobustness||"",encryptionScheme:n.audioEncryptionScheme||null})),videoCapabilities:t.map(r=>({contentType:`video/mp4; codecs="${r}"`,robustness:n.videoRobustness||"",encryptionScheme:n.videoEncryptionScheme||null}))}]}function parsePlayReadyWRM(i){const e=new Uint16Array(i.buffer,i.byteOffset,i.byteLength/2),t=String.fromCharCode.apply(null,Array.from(e)),n=t.substring(t.indexOf("<"),t.length),a=new DOMParser().parseFromString(n,"text/xml").getElementsByTagName("KID")[0];if(a){const o=a.childNodes[0]?a.childNodes[0].nodeValue:a.getAttribute("VALUE");if(o){const l=base64Decode(o).subarray(0,16);return changeEndianness(l),l}}return null}function sliceUint8(i,e,t){return Uint8Array.prototype.slice?i.slice(e,t):new Uint8Array(Array.prototype.slice.call(i,e,t))}const isHeader$2=(i,e)=>e+10<=i.length&&i[e]===73&&i[e+1]===68&&i[e+2]===51&&i[e+3]<255&&i[e+4]<255&&i[e+6]<128&&i[e+7]<128&&i[e+8]<128&&i[e+9]<128,isFooter=(i,e)=>e+10<=i.length&&i[e]===51&&i[e+1]===68&&i[e+2]===73&&i[e+3]<255&&i[e+4]<255&&i[e+6]<128&&i[e+7]<128&&i[e+8]<128&&i[e+9]<128,getID3Data=(i,e)=>{const t=e;let n=0;for(;isHeader$2(i,e);){n+=10;const s=readSize(i,e+6);n+=s,isFooter(i,e+10)&&(n+=10),e+=n}if(n>0)return i.subarray(t,t+n)},readSize=(i,e)=>{let t=0;return t=(i[e]&127)<<21,t|=(i[e+1]&127)<<14,t|=(i[e+2]&127)<<7,t|=i[e+3]&127,t},canParse$2=(i,e)=>isHeader$2(i,e)&&readSize(i,e+6)+10<=i.length-e,getTimeStamp=i=>{const e=getID3Frames(i);for(let t=0;t<e.length;t++){const n=e[t];if(isTimeStampFrame(n))return readTimeStamp(n)}},isTimeStampFrame=i=>i&&i.key==="PRIV"&&i.info==="com.apple.streaming.transportStreamTimestamp",getFrameData=i=>{const e=String.fromCharCode(i[0],i[1],i[2],i[3]),t=readSize(i,4),n=10;return{type:e,size:t,data:i.subarray(n,n+t)}},getID3Frames=i=>{let e=0;const t=[];for(;isHeader$2(i,e);){const n=readSize(i,e+6);e+=10;const s=e+n;for(;e+8<s;){const r=getFrameData(i.subarray(e)),a=decodeFrame(r);a&&t.push(a),e+=r.size+10}isFooter(i,e)&&(e+=10)}return t},decodeFrame=i=>i.type==="PRIV"?decodePrivFrame(i):i.type[0]==="W"?decodeURLFrame(i):decodeTextFrame(i),decodePrivFrame=i=>{if(i.size<2)return;const e=utf8ArrayToStr(i.data,!0),t=new Uint8Array(i.data.subarray(e.length+1));return{key:i.type,info:e,data:t.buffer}},decodeTextFrame=i=>{if(i.size<2)return;if(i.type==="TXXX"){let t=1;const n=utf8ArrayToStr(i.data.subarray(t),!0);t+=n.length+1;const s=utf8ArrayToStr(i.data.subarray(t));return{key:i.type,info:n,data:s}}const e=utf8ArrayToStr(i.data.subarray(1));return{key:i.type,data:e}},decodeURLFrame=i=>{if(i.type==="WXXX"){if(i.size<2)return;let t=1;const n=utf8ArrayToStr(i.data.subarray(t),!0);t+=n.length+1;const s=utf8ArrayToStr(i.data.subarray(t));return{key:i.type,info:n,data:s}}const e=utf8ArrayToStr(i.data);return{key:i.type,data:e}},readTimeStamp=i=>{if(i.data.byteLength===8){const e=new Uint8Array(i.data),t=e[3]&1;let n=(e[4]<<23)+(e[5]<<15)+(e[6]<<7)+e[7];return n/=45,t&&(n+=4772185884e-2),Math.round(n)}},utf8ArrayToStr=(i,e=!1)=>{const t=getTextDecoder();if(t){const d=t.decode(i);if(e){const f=d.indexOf("\0");return f!==-1?d.substring(0,f):d}return d.replace(/\0/g,"")}const n=i.length;let s,r,a,o="",l=0;for(;l<n;){if(s=i[l++],s===0&&e)return o;if(s===0||s===3)continue;switch(s>>4){case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:o+=String.fromCharCode(s);break;case 12:case 13:r=i[l++],o+=String.fromCharCode((s&31)<<6|r&63);break;case 14:r=i[l++],a=i[l++],o+=String.fromCharCode((s&15)<<12|(r&63)<<6|(a&63)<<0);break}}return o};let decoder;function getTextDecoder(){if(!navigator.userAgent.includes("PlayStation 4"))return!decoder&&typeof self.TextDecoder<"u"&&(decoder=new self.TextDecoder("utf-8")),decoder}const Hex={hexDump:function(i){let e="";for(let t=0;t<i.length;t++){let n=i[t].toString(16);n.length<2&&(n="0"+n),e+=n}return e}},UINT32_MAX$1=Math.pow(2,32)-1,push=[].push,RemuxerTrackIdConfig={video:1,audio:2,id3:3,text:4};function bin2str(i){return String.fromCharCode.apply(null,i)}function readUint16(i,e){const t=i[e]<<8|i[e+1];return t<0?65536+t:t}function readUint32(i,e){const t=readSint32(i,e);return t<0?4294967296+t:t}function readUint64(i,e){let t=readUint32(i,e);return t*=Math.pow(2,32),t+=readUint32(i,e+4),t}function readSint32(i,e){return i[e]<<24|i[e+1]<<16|i[e+2]<<8|i[e+3]}function writeUint32(i,e,t){i[e]=t>>24,i[e+1]=t>>16&255,i[e+2]=t>>8&255,i[e+3]=t&255}function hasMoofData(i){const e=i.byteLength;for(let t=0;t<e;){const n=readUint32(i,t);if(n>8&&i[t+4]===109&&i[t+5]===111&&i[t+6]===111&&i[t+7]===102)return!0;t=n>1?t+n:e}return!1}function findBox(i,e){const t=[];if(!e.length)return t;const n=i.byteLength;for(let s=0;s<n;){const r=readUint32(i,s),a=bin2str(i.subarray(s+4,s+8)),o=r>1?s+r:n;if(a===e[0])if(e.length===1)t.push(i.subarray(s+8,o));else{const l=findBox(i.subarray(s+8,o),e.slice(1));l.length&&push.apply(t,l)}s=o}return t}function parseSegmentIndex(i){const e=[],t=i[0];let n=8;const s=readUint32(i,n);n+=4;let r=0,a=0;t===0?(r=readUint32(i,n),a=readUint32(i,n+4),n+=8):(r=readUint64(i,n),a=readUint64(i,n+8),n+=16),n+=2;let o=i.length+a;const l=readUint16(i,n);n+=2;for(let d=0;d<l;d++){let f=n;const u=readUint32(i,f);f+=4;const p=u&2147483647;if((u&2147483648)>>>31===1)return logger.warn("SIDX has hierarchical references (not supported)"),null;const g=readUint32(i,f);f+=4,e.push({referenceSize:p,subsegmentDuration:g,info:{duration:g/s,start:o,end:o+p-1}}),o+=p,f+=4,n=f}return{earliestPresentationTime:r,timescale:s,version:t,referencesCount:l,references:e}}function parseInitSegment(i){const e=[],t=findBox(i,["moov","trak"]);for(let s=0;s<t.length;s++){const r=t[s],a=findBox(r,["tkhd"])[0];if(a){let o=a[0];const l=readUint32(a,o===0?12:20),d=findBox(r,["mdia","mdhd"])[0];if(d){o=d[0];const f=readUint32(d,o===0?12:20),u=findBox(r,["mdia","hdlr"])[0];if(u){const p=bin2str(u.subarray(8,12)),m={soun:ElementaryStreamTypes.AUDIO,vide:ElementaryStreamTypes.VIDEO}[p];if(m){const g=findBox(r,["mdia","minf","stbl","stsd"])[0],y=parseStsd(g);e[l]={timescale:f,type:m},e[m]=_objectSpread2({timescale:f,id:l},y)}}}}}return findBox(i,["moov","mvex","trex"]).forEach(s=>{const r=readUint32(s,4),a=e[r];a&&(a.default={duration:readUint32(s,12),flags:readUint32(s,20)})}),e}function parseStsd(i){const e=i.subarray(8),t=e.subarray(86),n=bin2str(e.subarray(4,8));let s=n;const r=n==="enca"||n==="encv";if(r){const o=findBox(e,[n])[0].subarray(n==="enca"?28:78);findBox(o,["sinf"]).forEach(d=>{const f=findBox(d,["schm"])[0];if(f){const u=bin2str(f.subarray(4,8));if(u==="cbcs"||u==="cenc"){const p=findBox(d,["frma"])[0];p&&(s=bin2str(p))}}})}switch(s){case"avc1":case"avc2":case"avc3":case"avc4":{const a=findBox(t,["avcC"])[0];s+="."+toHex(a[1])+toHex(a[2])+toHex(a[3]);break}case"mp4a":{const a=findBox(e,[n])[0],o=findBox(a.subarray(28),["esds"])[0];if(o&&o.length>12){let l=4;if(o[l++]!==3)break;l=skipBERInteger(o,l),l+=2;const d=o[l++];if(d&128&&(l+=2),d&64&&(l+=o[l++]),o[l++]!==4)break;l=skipBERInteger(o,l);const f=o[l++];if(f===64)s+="."+toHex(f);else break;if(l+=12,o[l++]!==5)break;l=skipBERInteger(o,l);const u=o[l++];let p=(u&248)>>3;p===31&&(p+=1+((u&7)<<3)+((o[l]&224)>>5)),s+="."+p}break}case"hvc1":case"hev1":{const a=findBox(t,["hvcC"])[0],o=a[1],l=["","A","B","C"][o>>6],d=o&31,f=readUint32(a,2),u=(o&32)>>5?"H":"L",p=a[12],m=a.subarray(6,12);s+="."+l+d,s+="."+f.toString(16).toUpperCase(),s+="."+u+p;let g="";for(let y=m.length;y--;){const v=m[y];(v||g)&&(g="."+v.toString(16).toUpperCase()+g)}s+=g;break}case"dvh1":case"dvhe":{const a=findBox(t,["dvcC"])[0],o=a[2]>>1&127,l=a[2]<<5&32|a[3]>>3&31;s+="."+addLeadingZero(o)+"."+addLeadingZero(l);break}case"vp09":{const a=findBox(t,["vpcC"])[0],o=a[4],l=a[5],d=a[6]>>4&15;s+="."+addLeadingZero(o)+"."+addLeadingZero(l)+"."+addLeadingZero(d);break}case"av01":{const a=findBox(t,["av1C"])[0],o=a[1]>>>5,l=a[1]&31,d=a[2]>>>7?"H":"M",f=(a[2]&64)>>6,u=(a[2]&32)>>5,p=o===2&&f?u?12:10:f?10:8,m=(a[2]&16)>>4,g=(a[2]&8)>>3,y=(a[2]&4)>>2,v=a[2]&3;s+="."+o+"."+addLeadingZero(l)+d+"."+addLeadingZero(p)+"."+m+"."+g+y+v+"."+addLeadingZero(1)+"."+addLeadingZero(1)+"."+addLeadingZero(1)+"."+0;break}}return{codec:s,encrypted:r}}function skipBERInteger(i,e){const t=e+5;for(;i[e++]&128&&e<t;);return e}function toHex(i){return("0"+i.toString(16).toUpperCase()).slice(-2)}function addLeadingZero(i){return(i<10?"0":"")+i}function patchEncyptionData(i,e){if(!i||!e)return i;const t=e.keyId;return t&&e.isCommonEncryption&&findBox(i,["moov","trak"]).forEach(s=>{const a=findBox(s,["mdia","minf","stbl","stsd"])[0].subarray(8);let o=findBox(a,["enca"]);const l=o.length>0;l||(o=findBox(a,["encv"])),o.forEach(d=>{const f=l?d.subarray(28):d.subarray(78);findBox(f,["sinf"]).forEach(p=>{const m=parseSinf(p);if(m){const g=m.subarray(8,24);g.some(y=>y!==0)||(logger.log(`[eme] Patching keyId in 'enc${l?"a":"v"}>sinf>>tenc' box: ${Hex.hexDump(g)} -> ${Hex.hexDump(t)}`),m.set(t,8))}})})}),i}function parseSinf(i){const e=findBox(i,["schm"])[0];if(e){const t=bin2str(e.subarray(4,8));if(t==="cbcs"||t==="cenc")return findBox(i,["schi","tenc"])[0]}return null}function getStartDTS(i,e){return findBox(e,["moof","traf"]).reduce((t,n)=>{const s=findBox(n,["tfdt"])[0],r=s[0],a=findBox(n,["tfhd"]).reduce((o,l)=>{const d=readUint32(l,4),f=i[d];if(f){let u=readUint32(s,4);if(r===1){if(u===UINT32_MAX$1)return logger.warn("[mp4-demuxer]: Ignoring assumed invalid signed 64-bit track fragment decode time"),o;u*=UINT32_MAX$1+1,u+=readUint32(s,8)}const p=f.timescale||9e4,m=u/p;if(isFiniteNumber(m)&&(o===null||m<o))return m}return o},null);return a!==null&&isFiniteNumber(a)&&(t===null||a<t)?a:t},null)}function getDuration(i,e){let t=0,n=0,s=0;const r=findBox(i,["moof","traf"]);for(let a=0;a<r.length;a++){const o=r[a],l=findBox(o,["tfhd"])[0],d=readUint32(l,4),f=e[d];if(!f)continue;const u=f.default,p=readUint32(l,0)|(u==null?void 0:u.flags);let m=u==null?void 0:u.duration;p&8&&(p&2?m=readUint32(l,12):m=readUint32(l,8));const g=f.timescale||9e4,y=findBox(o,["trun"]);for(let v=0;v<y.length;v++){if(t=computeRawDurationFromSamples(y[v]),!t&&m){const b=readUint32(y[v],4);t=m*b}f.type===ElementaryStreamTypes.VIDEO?n+=t/g:f.type===ElementaryStreamTypes.AUDIO&&(s+=t/g)}}if(n===0&&s===0){let a=1/0,o=0,l=0;const d=findBox(i,["sidx"]);for(let f=0;f<d.length;f++){const u=parseSegmentIndex(d[f]);if(u!=null&&u.references){a=Math.min(a,u.earliestPresentationTime/u.timescale);const p=u.references.reduce((m,g)=>m+g.info.duration||0,0);o=Math.max(o,p+u.earliestPresentationTime/u.timescale),l=o-a}}if(l&&isFiniteNumber(l))return l}return n||s}function computeRawDurationFromSamples(i){const e=readUint32(i,0);let t=8;e&1&&(t+=4),e&4&&(t+=4);let n=0;const s=readUint32(i,4);for(let r=0;r<s;r++){if(e&256){const a=readUint32(i,t);n+=a,t+=4}e&512&&(t+=4),e&1024&&(t+=4),e&2048&&(t+=4)}return n}function offsetStartDTS(i,e,t){findBox(e,["moof","traf"]).forEach(n=>{findBox(n,["tfhd"]).forEach(s=>{const r=readUint32(s,4),a=i[r];if(!a)return;const o=a.timescale||9e4;findBox(n,["tfdt"]).forEach(l=>{const d=l[0],f=t*o;if(f){let u=readUint32(l,4);if(d===0)u-=f,u=Math.max(u,0),writeUint32(l,4,u);else{u*=Math.pow(2,32),u+=readUint32(l,8),u-=f,u=Math.max(u,0);const p=Math.floor(u/(UINT32_MAX$1+1)),m=Math.floor(u%(UINT32_MAX$1+1));writeUint32(l,4,p),writeUint32(l,8,m)}}})})})}function segmentValidRange(i){const e={valid:null,remainder:null},t=findBox(i,["moof"]);if(t.length<2)return e.remainder=i,e;const n=t[t.length-1];return e.valid=sliceUint8(i,0,n.byteOffset-8),e.remainder=sliceUint8(i,n.byteOffset-8),e}function appendUint8Array(i,e){const t=new Uint8Array(i.length+e.length);return t.set(i),t.set(e,i.length),t}function parseSamples(i,e){const t=[],n=e.samples,s=e.timescale,r=e.id;let a=!1;return findBox(n,["moof"]).map(l=>{const d=l.byteOffset-8;findBox(l,["traf"]).map(u=>{const p=findBox(u,["tfdt"]).map(m=>{const g=m[0];let y=readUint32(m,4);return g===1&&(y*=Math.pow(2,32),y+=readUint32(m,8)),y/s})[0];return p!==void 0&&(i=p),findBox(u,["tfhd"]).map(m=>{const g=readUint32(m,4),y=readUint32(m,0)&16777215,v=(y&1)!==0,b=(y&2)!==0,C=(y&8)!==0;let _=0;const R=(y&16)!==0;let E=0;const F=(y&32)!==0;let O=8;g===r&&(v&&(O+=8),b&&(O+=4),C&&(_=readUint32(m,O),O+=4),R&&(E=readUint32(m,O),O+=4),F&&(O+=4),e.type==="video"&&(a=isHEVC(e.codec)),findBox(u,["trun"]).map(A=>{const N=A[0],M=readUint32(A,0)&16777215,Z=(M&1)!==0;let X=0;const oe=(M&4)!==0,le=(M&256)!==0;let de=0;const ue=(M&512)!==0;let ce=0;const pe=(M&1024)!==0,he=(M&2048)!==0;let Y=0;const ge=readUint32(A,4);let xe=8;Z&&(X=readUint32(A,xe),xe+=4),oe&&(xe+=4);let be=X+d;for(let Ce=0;Ce<ge;Ce++){if(le?(de=readUint32(A,xe),xe+=4):de=_,ue?(ce=readUint32(A,xe),xe+=4):ce=E,pe&&(xe+=4),he&&(N===0?Y=readUint32(A,xe):Y=readSint32(A,xe),xe+=4),e.type===ElementaryStreamTypes.VIDEO){let ke=0;for(;ke<ce;){const me=readUint32(n,be);if(be+=4,isSEIMessage(a,n[be])){const ye=n.subarray(be,be+me);parseSEIMessageFromNALu(ye,a?2:1,i+Y/s,t)}be+=me,ke+=me+4}}i+=de/s}}))})})}),t}function isHEVC(i){if(!i)return!1;const e=i.indexOf("."),t=e<0?i:i.substring(0,e);return t==="hvc1"||t==="hev1"||t==="dvh1"||t==="dvhe"}function isSEIMessage(i,e){if(i){const t=e>>1&63;return t===39||t===40}else return(e&31)===6}function parseSEIMessageFromNALu(i,e,t,n){const s=discardEPB(i);let r=0;r+=e;let a=0,o=0,l=0;for(;r<s.length;){a=0;do{if(r>=s.length)break;l=s[r++],a+=l}while(l===255);o=0;do{if(r>=s.length)break;l=s[r++],o+=l}while(l===255);const d=s.length-r;let f=r;if(o<d)r+=o;else if(o>d){logger.error(`Malformed SEI payload. ${o} is too small, only ${d} bytes left to parse.`);break}if(a===4){if(s[f++]===181){const p=readUint16(s,f);if(f+=2,p===49){const m=readUint32(s,f);if(f+=4,m===1195456820){const g=s[f++];if(g===3){const y=s[f++],v=31&y,b=64&y,C=b?2+v*3:0,_=new Uint8Array(C);if(b){_[0]=y;for(let R=1;R<C;R++)_[R]=s[f++]}n.push({type:g,payloadType:a,pts:t,bytes:_})}}}}}else if(a===5&&o>16){const u=[];for(let g=0;g<16;g++){const y=s[f++].toString(16);u.push(y.length==1?"0"+y:y),(g===3||g===5||g===7||g===9)&&u.push("-")}const p=o-16,m=new Uint8Array(p);for(let g=0;g<p;g++)m[g]=s[f++];n.push({payloadType:a,pts:t,uuid:u.join(""),userData:utf8ArrayToStr(m),userDataBytes:m})}}}function discardEPB(i){const e=i.byteLength,t=[];let n=1;for(;n<e-2;)i[n]===0&&i[n+1]===0&&i[n+2]===3?(t.push(n+2),n+=2):n++;if(t.length===0)return i;const s=e-t.length,r=new Uint8Array(s);let a=0;for(n=0;n<s;a++,n++)a===t[0]&&(a++,t.shift()),r[n]=i[a];return r}function parseEmsg(i){const e=i[0];let t="",n="",s=0,r=0,a=0,o=0,l=0,d=0;if(e===0){for(;bin2str(i.subarray(d,d+1))!=="\0";)t+=bin2str(i.subarray(d,d+1)),d+=1;for(t+=bin2str(i.subarray(d,d+1)),d+=1;bin2str(i.subarray(d,d+1))!=="\0";)n+=bin2str(i.subarray(d,d+1)),d+=1;n+=bin2str(i.subarray(d,d+1)),d+=1,s=readUint32(i,12),r=readUint32(i,16),o=readUint32(i,20),l=readUint32(i,24),d=28}else if(e===1){d+=4,s=readUint32(i,d),d+=4;const u=readUint32(i,d);d+=4;const p=readUint32(i,d);for(d+=4,a=2**32*u+p,isSafeInteger(a)||(a=Number.MAX_SAFE_INTEGER,logger.warn("Presentation time exceeds safe integer limit and wrapped to max safe integer in parsing emsg box")),o=readUint32(i,d),d+=4,l=readUint32(i,d),d+=4;bin2str(i.subarray(d,d+1))!=="\0";)t+=bin2str(i.subarray(d,d+1)),d+=1;for(t+=bin2str(i.subarray(d,d+1)),d+=1;bin2str(i.subarray(d,d+1))!=="\0";)n+=bin2str(i.subarray(d,d+1)),d+=1;n+=bin2str(i.subarray(d,d+1)),d+=1}const f=i.subarray(d,i.byteLength);return{schemeIdUri:t,value:n,timeScale:s,presentationTime:a,presentationTimeDelta:r,eventDuration:o,id:l,payload:f}}function mp4Box(i,...e){const t=e.length;let n=8,s=t;for(;s--;)n+=e[s].byteLength;const r=new Uint8Array(n);for(r[0]=n>>24&255,r[1]=n>>16&255,r[2]=n>>8&255,r[3]=n&255,r.set(i,4),s=0,n=8;s<t;s++)r.set(e[s],n),n+=e[s].byteLength;return r}function mp4pssh(i,e,t){if(i.byteLength!==16)throw new RangeError("Invalid system id");let n,s;n=0,s=new Uint8Array;let r;n>0?(r=new Uint8Array(4),e.length>0&&new DataView(r.buffer).setUint32(0,e.length,!1)):r=new Uint8Array;const a=new Uint8Array(4);return t&&t.byteLength>0&&new DataView(a.buffer).setUint32(0,t.byteLength,!1),mp4Box([112,115,115,104],new Uint8Array([n,0,0,0]),i,r,s,a,t||new Uint8Array)}function parseMultiPssh(i){const e=[];if(i instanceof ArrayBuffer){const t=i.byteLength;let n=0;for(;n+32<t;){const s=new DataView(i,n),r=parsePssh(s);e.push(r),n+=r.size}}return e}function parsePssh(i){const e=i.getUint32(0),t=i.byteOffset,n=i.byteLength;if(n<e)return{offset:t,size:n};if(i.getUint32(4)!==1886614376)return{offset:t,size:e};const r=i.getUint32(8)>>>24;if(r!==0&&r!==1)return{offset:t,size:e};const a=i.buffer,o=Hex.hexDump(new Uint8Array(a,t+12,16)),l=i.getUint32(28);let d=null,f=null;if(r===0){if(e-32<l||l<22)return{offset:t,size:e};f=new Uint8Array(a,t+32,l)}else if(r===1){if(!l||n<t+32+l*16+16)return{offset:t,size:e};d=[];for(let u=0;u<l;u++)d.push(new Uint8Array(a,t+32+u*16,16))}return{version:r,systemId:o,kids:d,data:f,offset:t,size:e}}let keyUriToKeyIdMap={};class LevelKey{static clearKeyUriToKeyIdMap(){keyUriToKeyIdMap={}}constructor(e,t,n,s=[1],r=null){this.uri=void 0,this.method=void 0,this.keyFormat=void 0,this.keyFormatVersions=void 0,this.encrypted=void 0,this.isCommonEncryption=void 0,this.iv=null,this.key=null,this.keyId=null,this.pssh=null,this.method=e,this.uri=t,this.keyFormat=n,this.keyFormatVersions=s,this.iv=r,this.encrypted=e?e!=="NONE":!1,this.isCommonEncryption=this.encrypted&&e!=="AES-128"}isSupported(){if(this.method){if(this.method==="AES-128"||this.method==="NONE")return!0;if(this.keyFormat==="identity")return this.method==="SAMPLE-AES";switch(this.keyFormat){case KeySystemFormats.FAIRPLAY:case KeySystemFormats.WIDEVINE:case KeySystemFormats.PLAYREADY:case KeySystemFormats.CLEARKEY:return["ISO-23001-7","SAMPLE-AES","SAMPLE-AES-CENC","SAMPLE-AES-CTR"].indexOf(this.method)!==-1}}return!1}getDecryptData(e){if(!this.encrypted||!this.uri)return null;if(this.method==="AES-128"&&this.uri&&!this.iv){typeof e!="number"&&(this.method==="AES-128"&&!this.iv&&logger.warn(`missing IV for initialization segment with method="${this.method}" - compliance issue`),e=0);const n=createInitializationVector(e);return new LevelKey(this.method,this.uri,"identity",this.keyFormatVersions,n)}const t=convertDataUriToArrayBytes(this.uri);if(t)switch(this.keyFormat){case KeySystemFormats.WIDEVINE:this.pssh=t,t.length>=22&&(this.keyId=t.subarray(t.length-22,t.length-6));break;case KeySystemFormats.PLAYREADY:{const n=new Uint8Array([154,4,240,121,152,64,66,134,171,146,230,91,224,136,95,149]);this.pssh=mp4pssh(n,null,t),this.keyId=parsePlayReadyWRM(t);break}default:{let n=t.subarray(0,16);if(n.length!==16){const s=new Uint8Array(16);s.set(n,16-n.length),n=s}this.keyId=n;break}}if(!this.keyId||this.keyId.byteLength!==16){let n=keyUriToKeyIdMap[this.uri];if(!n){const s=Object.keys(keyUriToKeyIdMap).length%Number.MAX_SAFE_INTEGER;n=new Uint8Array(16),new DataView(n.buffer,12,4).setUint32(0,s),keyUriToKeyIdMap[this.uri]=n}this.keyId=n}return this}}function createInitializationVector(i){const e=new Uint8Array(16);for(let t=12;t<16;t++)e[t]=i>>8*(15-t)&255;return e}const VARIABLE_REPLACEMENT_REGEX=/\{\$([a-zA-Z0-9-_]+)\}/g;function hasVariableReferences(i){return VARIABLE_REPLACEMENT_REGEX.test(i)}function substituteVariablesInAttributes(i,e,t){if(i.variableList!==null||i.hasVariableRefs)for(let n=t.length;n--;){const s=t[n],r=e[s];r&&(e[s]=substituteVariables(i,r))}}function substituteVariables(i,e){if(i.variableList!==null||i.hasVariableRefs){const t=i.variableList;return e.replace(VARIABLE_REPLACEMENT_REGEX,n=>{const s=n.substring(2,n.length-1),r=t==null?void 0:t[s];return r===void 0?(i.playlistParsingError||(i.playlistParsingError=new Error(`Missing preceding EXT-X-DEFINE tag for Variable Reference: "${s}"`)),n):r})}return e}function addVariableDefinition(i,e,t){let n=i.variableList;n||(i.variableList=n={});let s,r;if("QUERYPARAM"in e){s=e.QUERYPARAM;try{const a=new self.URL(t).searchParams;if(a.has(s))r=a.get(s);else throw new Error(`"${s}" does not match any query parameter in URI: "${t}"`)}catch(a){i.playlistParsingError||(i.playlistParsingError=new Error(`EXT-X-DEFINE QUERYPARAM: ${a.message}`))}}else s=e.NAME,r=e.VALUE;s in n?i.playlistParsingError||(i.playlistParsingError=new Error(`EXT-X-DEFINE duplicate Variable Name declarations: "${s}"`)):n[s]=r||""}function importVariableDefinition(i,e,t){const n=e.IMPORT;if(t&&n in t){let s=i.variableList;s||(i.variableList=s={}),s[n]=t[n]}else i.playlistParsingError||(i.playlistParsingError=new Error(`EXT-X-DEFINE IMPORT attribute not found in Multivariant Playlist: "${n}"`))}function getMediaSource(i=!0){return typeof self>"u"?void 0:(i||!self.MediaSource)&&self.ManagedMediaSource||self.MediaSource||self.WebKitMediaSource}function isManagedMediaSource(i){return typeof self<"u"&&i===self.ManagedMediaSource}const sampleEntryCodesISO={audio:{a3ds:1,"ac-3":.95,"ac-4":1,alac:.9,alaw:1,dra1:1,"dts+":1,"dts-":1,dtsc:1,dtse:1,dtsh:1,"ec-3":.9,enca:1,fLaC:.9,flac:.9,FLAC:.9,g719:1,g726:1,m4ae:1,mha1:1,mha2:1,mhm1:1,mhm2:1,mlpa:1,mp4a:1,"raw ":1,Opus:1,opus:1,samr:1,sawb:1,sawp:1,sevc:1,sqcp:1,ssmv:1,twos:1,ulaw:1},video:{avc1:1,avc2:1,avc3:1,avc4:1,avcp:1,av01:.8,drac:1,dva1:1,dvav:1,dvh1:.7,dvhe:.7,encv:1,hev1:.75,hvc1:.75,mjp2:1,mp4v:1,mvc1:1,mvc2:1,mvc3:1,mvc4:1,resv:1,rv60:1,s263:1,svc1:1,svc2:1,"vc-1":1,vp08:1,vp09:.9},text:{stpp:1,wvtt:1}};function isCodecType(i,e){const t=sampleEntryCodesISO[e];return!!t&&!!t[i.slice(0,4)]}function areCodecsMediaSourceSupported(i,e,t=!0){return!i.split(",").some(n=>!isCodecMediaSourceSupported(n,e,t))}function isCodecMediaSourceSupported(i,e,t=!0){var n;const s=getMediaSource(t);return(n=s==null?void 0:s.isTypeSupported(mimeTypeForCodec(i,e)))!=null?n:!1}function mimeTypeForCodec(i,e){return`${e}/mp4;codecs="${i}"`}function videoCodecPreferenceValue(i){if(i){const e=i.substring(0,4);return sampleEntryCodesISO.video[e]}return 2}function codecsSetSelectionPreferenceValue(i){return i.split(",").reduce((e,t)=>{const n=sampleEntryCodesISO.video[t];return n?(n*2+e)/(e?3:2):(sampleEntryCodesISO.audio[t]+e)/(e?2:1)},0)}const CODEC_COMPATIBLE_NAMES={};function getCodecCompatibleNameLower(i,e=!0){if(CODEC_COMPATIBLE_NAMES[i])return CODEC_COMPATIBLE_NAMES[i];const t={flac:["flac","fLaC","FLAC"],opus:["opus","Opus"]}[i];for(let n=0;n<t.length;n++)if(isCodecMediaSourceSupported(t[n],"audio",e))return CODEC_COMPATIBLE_NAMES[i]=t[n],t[n];return i}const AUDIO_CODEC_REGEXP=/flac|opus/i;function getCodecCompatibleName(i,e=!0){return i.replace(AUDIO_CODEC_REGEXP,t=>getCodecCompatibleNameLower(t.toLowerCase(),e))}function pickMostCompleteCodecName(i,e){return i&&i!=="mp4a"?i:e&&e.split(",")[0]}function convertAVC1ToAVCOTI(i){const e=i.split(",");for(let t=0;t<e.length;t++){const n=e[t].split(".");if(n.length>2){let s=n.shift()+".";s+=parseInt(n.shift()).toString(16),s+=("000"+parseInt(n.shift()).toString(16)).slice(-4),e[t]=s}}return e.join(",")}const MASTER_PLAYLIST_REGEX=/#EXT-X-STREAM-INF:([^\r\n]*)(?:[\r\n](?:#[^\r\n]*)?)*([^\r\n]+)|#EXT-X-(SESSION-DATA|SESSION-KEY|DEFINE|CONTENT-STEERING|START):([^\r\n]*)[\r\n]+/g,MASTER_PLAYLIST_MEDIA_REGEX=/#EXT-X-MEDIA:(.*)/g,IS_MEDIA_PLAYLIST=/^#EXT(?:INF|-X-TARGETDURATION):/m,LEVEL_PLAYLIST_REGEX_FAST=new RegExp([/#EXTINF:\s*(\d*(?:\.\d+)?)(?:,(.*)\s+)?/.source,/(?!#) *(\S[^\r\n]*)/.source,/#EXT-X-BYTERANGE:*(.+)/.source,/#EXT-X-PROGRAM-DATE-TIME:(.+)/.source,/#.*/.source].join("|"),"g"),LEVEL_PLAYLIST_REGEX_SLOW=new RegExp([/#(EXTM3U)/.source,/#EXT-X-(DATERANGE|DEFINE|KEY|MAP|PART|PART-INF|PLAYLIST-TYPE|PRELOAD-HINT|RENDITION-REPORT|SERVER-CONTROL|SKIP|START):(.+)/.source,/#EXT-X-(BITRATE|DISCONTINUITY-SEQUENCE|MEDIA-SEQUENCE|TARGETDURATION|VERSION): *(\d+)/.source,/#EXT-X-(DISCONTINUITY|ENDLIST|GAP|INDEPENDENT-SEGMENTS)/.source,/(#)([^:]*):(.*)/.source,/(#)(.*)(?:.*)\r?\n?/.source].join("|"));class M3U8Parser{static findGroup(e,t){for(let n=0;n<e.length;n++){const s=e[n];if(s.id===t)return s}}static resolve(e,t){return urlToolkitExports.buildAbsoluteURL(t,e,{alwaysNormalize:!0})}static isMediaPlaylist(e){return IS_MEDIA_PLAYLIST.test(e)}static parseMasterPlaylist(e,t){const n=hasVariableReferences(e),s={contentSteering:null,levels:[],playlistParsingError:null,sessionData:null,sessionKeys:null,startTimeOffset:null,variableList:null,hasVariableRefs:n},r=[];MASTER_PLAYLIST_REGEX.lastIndex=0;let a;for(;(a=MASTER_PLAYLIST_REGEX.exec(e))!=null;)if(a[1]){var o;const d=new AttrList(a[1]);substituteVariablesInAttributes(s,d,["CODECS","SUPPLEMENTAL-CODECS","ALLOWED-CPC","PATHWAY-ID","STABLE-VARIANT-ID","AUDIO","VIDEO","SUBTITLES","CLOSED-CAPTIONS","NAME"]);const f=substituteVariables(s,a[2]),u={attrs:d,bitrate:d.decimalInteger("BANDWIDTH")||d.decimalInteger("AVERAGE-BANDWIDTH"),name:d.NAME,url:M3U8Parser.resolve(f,t)},p=d.decimalResolution("RESOLUTION");p&&(u.width=p.width,u.height=p.height),setCodecs(d.CODECS,u),(o=u.unknownCodecs)!=null&&o.length||r.push(u),s.levels.push(u)}else if(a[3]){const d=a[3],f=a[4];switch(d){case"SESSION-DATA":{const u=new AttrList(f);substituteVariablesInAttributes(s,u,["DATA-ID","LANGUAGE","VALUE","URI"]);const p=u["DATA-ID"];p&&(s.sessionData===null&&(s.sessionData={}),s.sessionData[p]=u);break}case"SESSION-KEY":{const u=parseKey(f,t,s);u.encrypted&&u.isSupported()?(s.sessionKeys===null&&(s.sessionKeys=[]),s.sessionKeys.push(u)):logger.warn(`[Keys] Ignoring invalid EXT-X-SESSION-KEY tag: "${f}"`);break}case"DEFINE":{{const u=new AttrList(f);substituteVariablesInAttributes(s,u,["NAME","VALUE","QUERYPARAM"]),addVariableDefinition(s,u,t)}break}case"CONTENT-STEERING":{const u=new AttrList(f);substituteVariablesInAttributes(s,u,["SERVER-URI","PATHWAY-ID"]),s.contentSteering={uri:M3U8Parser.resolve(u["SERVER-URI"],t),pathwayId:u["PATHWAY-ID"]||"."};break}case"START":{s.startTimeOffset=parseStartTimeOffset(f);break}}}const l=r.length>0&&r.length<s.levels.length;return s.levels=l?r:s.levels,s.levels.length===0&&(s.playlistParsingError=new Error("no levels found in manifest")),s}static parseMasterPlaylistMedia(e,t,n){let s;const r={},a=n.levels,o={AUDIO:a.map(d=>({id:d.attrs.AUDIO,audioCodec:d.audioCodec})),SUBTITLES:a.map(d=>({id:d.attrs.SUBTITLES,textCodec:d.textCodec})),"CLOSED-CAPTIONS":[]};let l=0;for(MASTER_PLAYLIST_MEDIA_REGEX.lastIndex=0;(s=MASTER_PLAYLIST_MEDIA_REGEX.exec(e))!==null;){const d=new AttrList(s[1]),f=d.TYPE;if(f){const u=o[f],p=r[f]||[];r[f]=p,substituteVariablesInAttributes(n,d,["URI","GROUP-ID","LANGUAGE","ASSOC-LANGUAGE","STABLE-RENDITION-ID","NAME","INSTREAM-ID","CHARACTERISTICS","CHANNELS"]);const m=d.LANGUAGE,g=d["ASSOC-LANGUAGE"],y=d.CHANNELS,v=d.CHARACTERISTICS,b=d["INSTREAM-ID"],C={attrs:d,bitrate:0,id:l++,groupId:d["GROUP-ID"]||"",name:d.NAME||m||"",type:f,default:d.bool("DEFAULT"),autoselect:d.bool("AUTOSELECT"),forced:d.bool("FORCED"),lang:m,url:d.URI?M3U8Parser.resolve(d.URI,t):""};if(g&&(C.assocLang=g),y&&(C.channels=y),v&&(C.characteristics=v),b&&(C.instreamId=b),u!=null&&u.length){const _=M3U8Parser.findGroup(u,C.groupId)||u[0];assignCodec(C,_,"audioCodec"),assignCodec(C,_,"textCodec")}p.push(C)}}return r}static parseLevelPlaylist(e,t,n,s,r,a){const o=new LevelDetails(t),l=o.fragments;let d=null,f=0,u=0,p=0,m=0,g=null,y=new Fragment(s,t),v,b,C,_=-1,R=!1,E=null;for(LEVEL_PLAYLIST_REGEX_FAST.lastIndex=0,o.m3u8=e,o.hasVariableRefs=hasVariableReferences(e);(v=LEVEL_PLAYLIST_REGEX_FAST.exec(e))!==null;){R&&(R=!1,y=new Fragment(s,t),y.start=p,y.sn=f,y.cc=m,y.level=n,d&&(y.initSegment=d,y.rawProgramDateTime=d.rawProgramDateTime,d.rawProgramDateTime=null,E&&(y.setByteRange(E),E=null)));const N=v[1];if(N){y.duration=parseFloat(N);const M=(" "+v[2]).slice(1);y.title=M||null,y.tagList.push(M?["INF",N,M]:["INF",N])}else if(v[3]){if(isFiniteNumber(y.duration)){y.start=p,C&&setFragLevelKeys(y,C,o),y.sn=f,y.level=n,y.cc=m,l.push(y);const M=(" "+v[3]).slice(1);y.relurl=substituteVariables(o,M),assignProgramDateTime(y,g),g=y,p+=y.duration,f++,u=0,R=!0}}else if(v[4]){const M=(" "+v[4]).slice(1);g?y.setByteRange(M,g):y.setByteRange(M)}else if(v[5])y.rawProgramDateTime=(" "+v[5]).slice(1),y.tagList.push(["PROGRAM-DATE-TIME",y.rawProgramDateTime]),_===-1&&(_=l.length);else{if(v=v[0].match(LEVEL_PLAYLIST_REGEX_SLOW),!v){logger.warn("No matches on slow regex match for level playlist!");continue}for(b=1;b<v.length&&!(typeof v[b]<"u");b++);const M=(" "+v[b]).slice(1),Z=(" "+v[b+1]).slice(1),X=v[b+2]?(" "+v[b+2]).slice(1):"";switch(M){case"PLAYLIST-TYPE":o.type=Z.toUpperCase();break;case"MEDIA-SEQUENCE":f=o.startSN=parseInt(Z);break;case"SKIP":{const oe=new AttrList(Z);substituteVariablesInAttributes(o,oe,["RECENTLY-REMOVED-DATERANGES"]);const le=oe.decimalInteger("SKIPPED-SEGMENTS");if(isFiniteNumber(le)){o.skippedSegments=le;for(let ue=le;ue--;)l.unshift(null);f+=le}const de=oe.enumeratedString("RECENTLY-REMOVED-DATERANGES");de&&(o.recentlyRemovedDateranges=de.split(" "));break}case"TARGETDURATION":o.targetduration=Math.max(parseInt(Z),1);break;case"VERSION":o.version=parseInt(Z);break;case"INDEPENDENT-SEGMENTS":case"EXTM3U":break;case"ENDLIST":o.live=!1;break;case"#":(Z||X)&&y.tagList.push(X?[Z,X]:[Z]);break;case"DISCONTINUITY":m++,y.tagList.push(["DIS"]);break;case"GAP":y.gap=!0,y.tagList.push([M]);break;case"BITRATE":y.tagList.push([M,Z]);break;case"DATERANGE":{const oe=new AttrList(Z);substituteVariablesInAttributes(o,oe,["ID","CLASS","START-DATE","END-DATE","SCTE35-CMD","SCTE35-OUT","SCTE35-IN"]),substituteVariablesInAttributes(o,oe,oe.clientAttrs);const le=new DateRange(oe,o.dateRanges[oe.ID]);le.isValid||o.skippedSegments?o.dateRanges[le.id]=le:logger.warn(`Ignoring invalid DATERANGE tag: "${Z}"`),y.tagList.push(["EXT-X-DATERANGE",Z]);break}case"DEFINE":{{const oe=new AttrList(Z);substituteVariablesInAttributes(o,oe,["NAME","VALUE","IMPORT","QUERYPARAM"]),"IMPORT"in oe?importVariableDefinition(o,oe,a):addVariableDefinition(o,oe,t)}break}case"DISCONTINUITY-SEQUENCE":m=parseInt(Z);break;case"KEY":{const oe=parseKey(Z,t,o);if(oe.isSupported()){if(oe.method==="NONE"){C=void 0;break}C||(C={}),C[oe.keyFormat]&&(C=_extends$1({},C)),C[oe.keyFormat]=oe}else logger.warn(`[Keys] Ignoring invalid EXT-X-KEY tag: "${Z}"`);break}case"START":o.startTimeOffset=parseStartTimeOffset(Z);break;case"MAP":{const oe=new AttrList(Z);if(substituteVariablesInAttributes(o,oe,["BYTERANGE","URI"]),y.duration){const le=new Fragment(s,t);setInitSegment(le,oe,n,C),d=le,y.initSegment=d,d.rawProgramDateTime&&!y.rawProgramDateTime&&(y.rawProgramDateTime=d.rawProgramDateTime)}else{const le=y.byteRangeEndOffset;if(le){const de=y.byteRangeStartOffset;E=`${le-de}@${de}`}else E=null;setInitSegment(y,oe,n,C),d=y,R=!0}break}case"SERVER-CONTROL":{const oe=new AttrList(Z);o.canBlockReload=oe.bool("CAN-BLOCK-RELOAD"),o.canSkipUntil=oe.optionalFloat("CAN-SKIP-UNTIL",0),o.canSkipDateRanges=o.canSkipUntil>0&&oe.bool("CAN-SKIP-DATERANGES"),o.partHoldBack=oe.optionalFloat("PART-HOLD-BACK",0),o.holdBack=oe.optionalFloat("HOLD-BACK",0);break}case"PART-INF":{const oe=new AttrList(Z);o.partTarget=oe.decimalFloatingPoint("PART-TARGET");break}case"PART":{let oe=o.partList;oe||(oe=o.partList=[]);const le=u>0?oe[oe.length-1]:void 0,de=u++,ue=new AttrList(Z);substituteVariablesInAttributes(o,ue,["BYTERANGE","URI"]);const ce=new Part(ue,y,t,de,le);oe.push(ce),y.duration+=ce.duration;break}case"PRELOAD-HINT":{const oe=new AttrList(Z);substituteVariablesInAttributes(o,oe,["URI"]),o.preloadHint=oe;break}case"RENDITION-REPORT":{const oe=new AttrList(Z);substituteVariablesInAttributes(o,oe,["URI"]),o.renditionReports=o.renditionReports||[],o.renditionReports.push(oe);break}default:logger.warn(`line parsed but not handled: ${v}`);break}}}g&&!g.relurl?(l.pop(),p-=g.duration,o.partList&&(o.fragmentHint=g)):o.partList&&(assignProgramDateTime(y,g),y.cc=m,o.fragmentHint=y,C&&setFragLevelKeys(y,C,o));const F=l.length,O=l[0],A=l[F-1];if(p+=o.skippedSegments*o.targetduration,p>0&&F&&A){o.averagetargetduration=p/F;const N=A.sn;o.endSN=N!=="initSegment"?N:0,o.live||(A.endList=!0),O&&(o.startCC=O.cc)}else o.endSN=0,o.startCC=0;return o.fragmentHint&&(p+=o.fragmentHint.duration),o.totalduration=p,o.endCC=m,_>0&&backfillProgramDateTimes(l,_),o}}function parseKey(i,e,t){var n,s;const r=new AttrList(i);substituteVariablesInAttributes(t,r,["KEYFORMAT","KEYFORMATVERSIONS","URI","IV","URI"]);const a=(n=r.METHOD)!=null?n:"",o=r.URI,l=r.hexadecimalInteger("IV"),d=r.KEYFORMATVERSIONS,f=(s=r.KEYFORMAT)!=null?s:"identity";o&&r.IV&&!l&&logger.error(`Invalid IV: ${r.IV}`);const u=o?M3U8Parser.resolve(o,e):"",p=(d||"1").split("/").map(Number).filter(Number.isFinite);return new LevelKey(a,u,f,p,l)}function parseStartTimeOffset(i){const t=new AttrList(i).decimalFloatingPoint("TIME-OFFSET");return isFiniteNumber(t)?t:null}function setCodecs(i,e){let t=(i||"").split(/[ ,]+/).filter(n=>n);["video","audio","text"].forEach(n=>{const s=t.filter(r=>isCodecType(r,n));s.length&&(e[`${n}Codec`]=s.join(","),t=t.filter(r=>s.indexOf(r)===-1))}),e.unknownCodecs=t}function assignCodec(i,e,t){const n=e[t];n&&(i[t]=n)}function backfillProgramDateTimes(i,e){let t=i[e];for(let n=e;n--;){const s=i[n];if(!s)return;s.programDateTime=t.programDateTime-s.duration*1e3,t=s}}function assignProgramDateTime(i,e){i.rawProgramDateTime?i.programDateTime=Date.parse(i.rawProgramDateTime):e!=null&&e.programDateTime&&(i.programDateTime=e.endProgramDateTime),isFiniteNumber(i.programDateTime)||(i.programDateTime=null,i.rawProgramDateTime=null)}function setInitSegment(i,e,t,n){i.relurl=e.URI,e.BYTERANGE&&i.setByteRange(e.BYTERANGE),i.level=t,i.sn="initSegment",n&&(i.levelkeys=n),i.initSegment=null}function setFragLevelKeys(i,e,t){i.levelkeys=e;const{encryptedFragments:n}=t;(!n.length||n[n.length-1].levelkeys!==e)&&Object.keys(e).some(s=>e[s].isCommonEncryption)&&n.push(i)}var PlaylistContextType={MANIFEST:"manifest",LEVEL:"level",AUDIO_TRACK:"audioTrack",SUBTITLE_TRACK:"subtitleTrack"},PlaylistLevelType={MAIN:"main",AUDIO:"audio",SUBTITLE:"subtitle"};function mapContextToLevelType(i){const{type:e}=i;switch(e){case PlaylistContextType.AUDIO_TRACK:return PlaylistLevelType.AUDIO;case PlaylistContextType.SUBTITLE_TRACK:return PlaylistLevelType.SUBTITLE;default:return PlaylistLevelType.MAIN}}function getResponseUrl(i,e){let t=i.url;return(t===void 0||t.indexOf("data:")===0)&&(t=e.url),t}class PlaylistLoader{constructor(e){this.hls=void 0,this.loaders=Object.create(null),this.variableList=null,this.hls=e,this.registerListeners()}startLoad(e){}stopLoad(){this.destroyInternalLoaders()}registerListeners(){const{hls:e}=this;e.on(Events.MANIFEST_LOADING,this.onManifestLoading,this),e.on(Events.LEVEL_LOADING,this.onLevelLoading,this),e.on(Events.AUDIO_TRACK_LOADING,this.onAudioTrackLoading,this),e.on(Events.SUBTITLE_TRACK_LOADING,this.onSubtitleTrackLoading,this)}unregisterListeners(){const{hls:e}=this;e.off(Events.MANIFEST_LOADING,this.onManifestLoading,this),e.off(Events.LEVEL_LOADING,this.onLevelLoading,this),e.off(Events.AUDIO_TRACK_LOADING,this.onAudioTrackLoading,this),e.off(Events.SUBTITLE_TRACK_LOADING,this.onSubtitleTrackLoading,this)}createInternalLoader(e){const t=this.hls.config,n=t.pLoader,s=t.loader,r=n||s,a=new r(t);return this.loaders[e.type]=a,a}getInternalLoader(e){return this.loaders[e.type]}resetInternalLoader(e){this.loaders[e]&&delete this.loaders[e]}destroyInternalLoaders(){for(const e in this.loaders){const t=this.loaders[e];t&&t.destroy(),this.resetInternalLoader(e)}}destroy(){this.variableList=null,this.unregisterListeners(),this.destroyInternalLoaders()}onManifestLoading(e,t){const{url:n}=t;this.variableList=null,this.load({id:null,level:0,responseType:"text",type:PlaylistContextType.MANIFEST,url:n,deliveryDirectives:null})}onLevelLoading(e,t){const{id:n,level:s,pathwayId:r,url:a,deliveryDirectives:o}=t;this.load({id:n,level:s,pathwayId:r,responseType:"text",type:PlaylistContextType.LEVEL,url:a,deliveryDirectives:o})}onAudioTrackLoading(e,t){const{id:n,groupId:s,url:r,deliveryDirectives:a}=t;this.load({id:n,groupId:s,level:null,responseType:"text",type:PlaylistContextType.AUDIO_TRACK,url:r,deliveryDirectives:a})}onSubtitleTrackLoading(e,t){const{id:n,groupId:s,url:r,deliveryDirectives:a}=t;this.load({id:n,groupId:s,level:null,responseType:"text",type:PlaylistContextType.SUBTITLE_TRACK,url:r,deliveryDirectives:a})}load(e){var t;const n=this.hls.config;let s=this.getInternalLoader(e);if(s){const d=s.context;if(d&&d.url===e.url&&d.level===e.level){logger.trace("[playlist-loader]: playlist request ongoing");return}logger.log(`[playlist-loader]: aborting previous loader for type: ${e.type}`),s.abort()}let r;if(e.type===PlaylistContextType.MANIFEST?r=n.manifestLoadPolicy.default:r=_extends$1({},n.playlistLoadPolicy.default,{timeoutRetry:null,errorRetry:null}),s=this.createInternalLoader(e),isFiniteNumber((t=e.deliveryDirectives)==null?void 0:t.part)){let d;if(e.type===PlaylistContextType.LEVEL&&e.level!==null?d=this.hls.levels[e.level].details:e.type===PlaylistContextType.AUDIO_TRACK&&e.id!==null?d=this.hls.audioTracks[e.id].details:e.type===PlaylistContextType.SUBTITLE_TRACK&&e.id!==null&&(d=this.hls.subtitleTracks[e.id].details),d){const f=d.partTarget,u=d.targetduration;if(f&&u){const p=Math.max(f*3,u*.8)*1e3;r=_extends$1({},r,{maxTimeToFirstByteMs:Math.min(p,r.maxTimeToFirstByteMs),maxLoadTimeMs:Math.min(p,r.maxTimeToFirstByteMs)})}}}const a=r.errorRetry||r.timeoutRetry||{},o={loadPolicy:r,timeout:r.maxLoadTimeMs,maxRetry:a.maxNumRetry||0,retryDelay:a.retryDelayMs||0,maxRetryDelay:a.maxRetryDelayMs||0},l={onSuccess:(d,f,u,p)=>{const m=this.getInternalLoader(u);this.resetInternalLoader(u.type);const g=d.data;if(g.indexOf("#EXTM3U")!==0){this.handleManifestParsingError(d,u,new Error("no EXTM3U delimiter"),p||null,f);return}f.parsing.start=performance.now(),M3U8Parser.isMediaPlaylist(g)?this.handleTrackOrLevelPlaylist(d,f,u,p||null,m):this.handleMasterPlaylist(d,f,u,p)},onError:(d,f,u,p)=>{this.handleNetworkError(f,u,!1,d,p)},onTimeout:(d,f,u)=>{this.handleNetworkError(f,u,!0,void 0,d)}};s.load(e,o,l)}handleMasterPlaylist(e,t,n,s){const r=this.hls,a=e.data,o=getResponseUrl(e,n),l=M3U8Parser.parseMasterPlaylist(a,o);if(l.playlistParsingError){this.handleManifestParsingError(e,n,l.playlistParsingError,s,t);return}const{contentSteering:d,levels:f,sessionData:u,sessionKeys:p,startTimeOffset:m,variableList:g}=l;this.variableList=g;const{AUDIO:y=[],SUBTITLES:v,"CLOSED-CAPTIONS":b}=M3U8Parser.parseMasterPlaylistMedia(a,o,l);y.length&&!y.some(_=>!_.url)&&f[0].audioCodec&&!f[0].attrs.AUDIO&&(logger.log("[playlist-loader]: audio codec signaled in quality level, but no embedded audio track signaled, create one"),y.unshift({type:"main",name:"main",groupId:"main",default:!1,autoselect:!1,forced:!1,id:-1,attrs:new AttrList({}),bitrate:0,url:""})),r.trigger(Events.MANIFEST_LOADED,{levels:f,audioTracks:y,subtitles:v,captions:b,contentSteering:d,url:o,stats:t,networkDetails:s,sessionData:u,sessionKeys:p,startTimeOffset:m,variableList:g})}handleTrackOrLevelPlaylist(e,t,n,s,r){const a=this.hls,{id:o,level:l,type:d}=n,f=getResponseUrl(e,n),u=0,p=isFiniteNumber(l)?l:isFiniteNumber(o)?o:0,m=mapContextToLevelType(n),g=M3U8Parser.parseLevelPlaylist(e.data,f,p,m,u,this.variableList);if(d===PlaylistContextType.MANIFEST){const y={attrs:new AttrList({}),bitrate:0,details:g,name:"",url:f};a.trigger(Events.MANIFEST_LOADED,{levels:[y],audioTracks:[],url:f,stats:t,networkDetails:s,sessionData:null,sessionKeys:null,contentSteering:null,startTimeOffset:null,variableList:null})}t.parsing.end=performance.now(),n.levelDetails=g,this.handlePlaylistLoaded(g,e,t,n,s,r)}handleManifestParsingError(e,t,n,s,r){this.hls.trigger(Events.ERROR,{type:ErrorTypes.NETWORK_ERROR,details:ErrorDetails.MANIFEST_PARSING_ERROR,fatal:t.type===PlaylistContextType.MANIFEST,url:e.url,err:n,error:n,reason:n.message,response:e,context:t,networkDetails:s,stats:r})}handleNetworkError(e,t,n=!1,s,r){let a=`A network ${n?"timeout":"error"+(s?" (status "+s.code+")":"")} occurred while loading ${e.type}`;e.type===PlaylistContextType.LEVEL?a+=`: ${e.level} id: ${e.id}`:(e.type===PlaylistContextType.AUDIO_TRACK||e.type===PlaylistContextType.SUBTITLE_TRACK)&&(a+=` id: ${e.id} group-id: "${e.groupId}"`);const o=new Error(a);logger.warn(`[playlist-loader]: ${a}`);let l=ErrorDetails.UNKNOWN,d=!1;const f=this.getInternalLoader(e);switch(e.type){case PlaylistContextType.MANIFEST:l=n?ErrorDetails.MANIFEST_LOAD_TIMEOUT:ErrorDetails.MANIFEST_LOAD_ERROR,d=!0;break;case PlaylistContextType.LEVEL:l=n?ErrorDetails.LEVEL_LOAD_TIMEOUT:ErrorDetails.LEVEL_LOAD_ERROR,d=!1;break;case PlaylistContextType.AUDIO_TRACK:l=n?ErrorDetails.AUDIO_TRACK_LOAD_TIMEOUT:ErrorDetails.AUDIO_TRACK_LOAD_ERROR,d=!1;break;case PlaylistContextType.SUBTITLE_TRACK:l=n?ErrorDetails.SUBTITLE_TRACK_LOAD_TIMEOUT:ErrorDetails.SUBTITLE_LOAD_ERROR,d=!1;break}f&&this.resetInternalLoader(e.type);const u={type:ErrorTypes.NETWORK_ERROR,details:l,fatal:d,url:e.url,loader:f,context:e,error:o,networkDetails:t,stats:r};if(s){const p=(t==null?void 0:t.url)||e.url;u.response=_objectSpread2({url:p,data:void 0},s)}this.hls.trigger(Events.ERROR,u)}handlePlaylistLoaded(e,t,n,s,r,a){const o=this.hls,{type:l,level:d,id:f,groupId:u,deliveryDirectives:p}=s,m=getResponseUrl(t,s),g=mapContextToLevelType(s),y=typeof s.level=="number"&&g===PlaylistLevelType.MAIN?d:void 0;if(!e.fragments.length){const b=new Error("No Segments found in Playlist");o.trigger(Events.ERROR,{type:ErrorTypes.NETWORK_ERROR,details:ErrorDetails.LEVEL_EMPTY_ERROR,fatal:!1,url:m,error:b,reason:b.message,response:t,context:s,level:y,parent:g,networkDetails:r,stats:n});return}e.targetduration||(e.playlistParsingError=new Error("Missing Target Duration"));const v=e.playlistParsingError;if(v){o.trigger(Events.ERROR,{type:ErrorTypes.NETWORK_ERROR,details:ErrorDetails.LEVEL_PARSING_ERROR,fatal:!1,url:m,error:v,reason:v.message,response:t,context:s,level:y,parent:g,networkDetails:r,stats:n});return}switch(e.live&&a&&(a.getCacheAge&&(e.ageHeader=a.getCacheAge()||0),(!a.getCacheAge||isNaN(e.ageHeader))&&(e.ageHeader=0)),l){case PlaylistContextType.MANIFEST:case PlaylistContextType.LEVEL:o.trigger(Events.LEVEL_LOADED,{details:e,level:y||0,id:f||0,stats:n,networkDetails:r,deliveryDirectives:p});break;case PlaylistContextType.AUDIO_TRACK:o.trigger(Events.AUDIO_TRACK_LOADED,{details:e,id:f||0,groupId:u||"",stats:n,networkDetails:r,deliveryDirectives:p});break;case PlaylistContextType.SUBTITLE_TRACK:o.trigger(Events.SUBTITLE_TRACK_LOADED,{details:e,id:f||0,groupId:u||"",stats:n,networkDetails:r,deliveryDirectives:p});break}}}function sendAddTrackEvent(i,e){let t;try{t=new Event("addtrack")}catch{t=document.createEvent("Event"),t.initEvent("addtrack",!1,!1)}t.track=i,e.dispatchEvent(t)}function addCueToTrack(i,e){const t=i.mode;if(t==="disabled"&&(i.mode="hidden"),i.cues&&!i.cues.getCueById(e.id))try{if(i.addCue(e),!i.cues.getCueById(e.id))throw new Error(`addCue is failed for: ${e}`)}catch(n){logger.debug(`[texttrack-utils]: ${n}`);try{const s=new self.TextTrackCue(e.startTime,e.endTime,e.text);s.id=e.id,i.addCue(s)}catch(s){logger.debug(`[texttrack-utils]: Legacy TextTrackCue fallback failed: ${s}`)}}t==="disabled"&&(i.mode=t)}function clearCurrentCues(i){const e=i.mode;if(e==="disabled"&&(i.mode="hidden"),i.cues)for(let t=i.cues.length;t--;)i.removeCue(i.cues[t]);e==="disabled"&&(i.mode=e)}function removeCuesInRange(i,e,t,n){const s=i.mode;if(s==="disabled"&&(i.mode="hidden"),i.cues&&i.cues.length>0){const r=getCuesInRange(i.cues,e,t);for(let a=0;a<r.length;a++)(!n||n(r[a]))&&i.removeCue(r[a])}s==="disabled"&&(i.mode=s)}function getFirstCueIndexAfterTime(i,e){if(e<i[0].startTime)return 0;const t=i.length-1;if(e>i[t].endTime)return-1;let n=0,s=t;for(;n<=s;){const r=Math.floor((s+n)/2);if(e<i[r].startTime)s=r-1;else if(e>i[r].startTime&&n<t)n=r+1;else return r}return i[n].startTime-e<e-i[s].startTime?n:s}function getCuesInRange(i,e,t){const n=[],s=getFirstCueIndexAfterTime(i,e);if(s>-1)for(let r=s,a=i.length;r<a;r++){const o=i[r];if(o.startTime>=e&&o.endTime<=t)n.push(o);else if(o.startTime>t)return n}return n}function filterSubtitleTracks(i){const e=[];for(let t=0;t<i.length;t++){const n=i[t];(n.kind==="subtitles"||n.kind==="captions")&&n.label&&e.push(i[t])}return e}var MetadataSchema={audioId3:"org.id3",dateRange:"com.apple.quicktime.HLS",emsg:"https://aomedia.org/emsg/ID3"};const MIN_CUE_DURATION=.25;function getCueClass(){if(!(typeof self>"u"))return self.VTTCue||self.TextTrackCue}function createCueWithDataFields(i,e,t,n,s){let r=new i(e,t,"");try{r.value=n,s&&(r.type=s)}catch{r=new i(e,t,JSON.stringify(s?_objectSpread2({type:s},n):n))}return r}const MAX_CUE_ENDTIME=(()=>{const i=getCueClass();try{i&&new i(0,Number.POSITIVE_INFINITY,"")}catch{return Number.MAX_VALUE}return Number.POSITIVE_INFINITY})();function dateRangeDateToTimelineSeconds(i,e){return i.getTime()/1e3-e}function hexToArrayBuffer(i){return Uint8Array.from(i.replace(/^0x/,"").replace(/([\da-fA-F]{2}) ?/g,"0x$1 ").replace(/ +$/,"").split(" ")).buffer}class ID3TrackController{constructor(e){this.hls=void 0,this.id3Track=null,this.media=null,this.dateRangeCuesAppended={},this.hls=e,this._registerListeners()}destroy(){this._unregisterListeners(),this.id3Track=null,this.media=null,this.dateRangeCuesAppended={},this.hls=null}_registerListeners(){const{hls:e}=this;e.on(Events.MEDIA_ATTACHED,this.onMediaAttached,this),e.on(Events.MEDIA_DETACHING,this.onMediaDetaching,this),e.on(Events.MANIFEST_LOADING,this.onManifestLoading,this),e.on(Events.FRAG_PARSING_METADATA,this.onFragParsingMetadata,this),e.on(Events.BUFFER_FLUSHING,this.onBufferFlushing,this),e.on(Events.LEVEL_UPDATED,this.onLevelUpdated,this)}_unregisterListeners(){const{hls:e}=this;e.off(Events.MEDIA_ATTACHED,this.onMediaAttached,this),e.off(Events.MEDIA_DETACHING,this.onMediaDetaching,this),e.off(Events.MANIFEST_LOADING,this.onManifestLoading,this),e.off(Events.FRAG_PARSING_METADATA,this.onFragParsingMetadata,this),e.off(Events.BUFFER_FLUSHING,this.onBufferFlushing,this),e.off(Events.LEVEL_UPDATED,this.onLevelUpdated,this)}onMediaAttached(e,t){this.media=t.media}onMediaDetaching(){this.id3Track&&(clearCurrentCues(this.id3Track),this.id3Track=null,this.media=null,this.dateRangeCuesAppended={})}onManifestLoading(){this.dateRangeCuesAppended={}}createTrack(e){const t=this.getID3Track(e.textTracks);return t.mode="hidden",t}getID3Track(e){if(this.media){for(let t=0;t<e.length;t++){const n=e[t];if(n.kind==="metadata"&&n.label==="id3")return sendAddTrackEvent(n,this.media),n}return this.media.addTextTrack("metadata","id3")}}onFragParsingMetadata(e,t){if(!this.media)return;const{hls:{config:{enableEmsgMetadataCues:n,enableID3MetadataCues:s}}}=this;if(!n&&!s)return;const{samples:r}=t;this.id3Track||(this.id3Track=this.createTrack(this.media));const a=getCueClass();if(a)for(let o=0;o<r.length;o++){const l=r[o].type;if(l===MetadataSchema.emsg&&!n||!s)continue;const d=getID3Frames(r[o].data);if(d){const f=r[o].pts;let u=f+r[o].duration;u>MAX_CUE_ENDTIME&&(u=MAX_CUE_ENDTIME),u-f<=0&&(u=f+MIN_CUE_DURATION);for(let m=0;m<d.length;m++){const g=d[m];if(!isTimeStampFrame(g)){this.updateId3CueEnds(f,l);const y=createCueWithDataFields(a,f,u,g,l);y&&this.id3Track.addCue(y)}}}}}updateId3CueEnds(e,t){var n;const s=(n=this.id3Track)==null?void 0:n.cues;if(s)for(let r=s.length;r--;){const a=s[r];a.type===t&&a.startTime<e&&a.endTime===MAX_CUE_ENDTIME&&(a.endTime=e)}}onBufferFlushing(e,{startOffset:t,endOffset:n,type:s}){const{id3Track:r,hls:a}=this;if(!a)return;const{config:{enableEmsgMetadataCues:o,enableID3MetadataCues:l}}=a;if(r&&(o||l)){let d;s==="audio"?d=f=>f.type===MetadataSchema.audioId3&&l:s==="video"?d=f=>f.type===MetadataSchema.emsg&&o:d=f=>f.type===MetadataSchema.audioId3&&l||f.type===MetadataSchema.emsg&&o,removeCuesInRange(r,t,n,d)}}onLevelUpdated(e,{details:t}){if(!this.media||!t.hasProgramDateTime||!this.hls.config.enableDateRangeMetadataCues)return;const{dateRangeCuesAppended:n,id3Track:s}=this,{dateRanges:r}=t,a=Object.keys(r);if(s){const f=Object.keys(n).filter(u=>!a.includes(u));for(let u=f.length;u--;){const p=f[u];Object.keys(n[p].cues).forEach(m=>{s.removeCue(n[p].cues[m])}),delete n[p]}}const o=t.fragments[t.fragments.length-1];if(a.length===0||!isFiniteNumber(o==null?void 0:o.programDateTime))return;this.id3Track||(this.id3Track=this.createTrack(this.media));const l=o.programDateTime/1e3-o.start,d=getCueClass();for(let f=0;f<a.length;f++){const u=a[f],p=r[u],m=dateRangeDateToTimelineSeconds(p.startDate,l),g=n[u],y=(g==null?void 0:g.cues)||{};let v=(g==null?void 0:g.durationKnown)||!1,b=MAX_CUE_ENDTIME;const C=p.endDate;if(C)b=dateRangeDateToTimelineSeconds(C,l),v=!0;else if(p.endOnNext&&!v){const R=a.reduce((E,F)=>{if(F!==p.id){const O=r[F];if(O.class===p.class&&O.startDate>p.startDate&&(!E||p.startDate<E.startDate))return O}return E},null);R&&(b=dateRangeDateToTimelineSeconds(R.startDate,l),v=!0)}const _=Object.keys(p.attr);for(let R=0;R<_.length;R++){const E=_[R];if(!isDateRangeCueAttribute(E))continue;const F=y[E];if(F)v&&!g.durationKnown&&(F.endTime=b);else if(d){let O=p.attr[E];isSCTE35Attribute(E)&&(O=hexToArrayBuffer(O));const A=createCueWithDataFields(d,m,b,{key:E,data:O},MetadataSchema.dateRange);A&&(A.id=u,this.id3Track.addCue(A),y[E]=A)}}n[u]={cues:y,dateRange:p,durationKnown:v}}}}class LatencyController{constructor(e){this.hls=void 0,this.config=void 0,this.media=null,this.levelDetails=null,this.currentTime=0,this.stallCount=0,this._latency=null,this.timeupdateHandler=()=>this.timeupdate(),this.hls=e,this.config=e.config,this.registerListeners()}get latency(){return this._latency||0}get maxLatency(){const{config:e,levelDetails:t}=this;return e.liveMaxLatencyDuration!==void 0?e.liveMaxLatencyDuration:t?e.liveMaxLatencyDurationCount*t.targetduration:0}get targetLatency(){const{levelDetails:e}=this;if(e===null)return null;const{holdBack:t,partHoldBack:n,targetduration:s}=e,{liveSyncDuration:r,liveSyncDurationCount:a,lowLatencyMode:o}=this.config,l=this.hls.userConfig;let d=o&&n||t;(l.liveSyncDuration||l.liveSyncDurationCount||d===0)&&(d=r!==void 0?r:a*s);const f=s;return d+Math.min(this.stallCount*1,f)}get liveSyncPosition(){const e=this.estimateLiveEdge(),t=this.targetLatency,n=this.levelDetails;if(e===null||t===null||n===null)return null;const s=n.edge,r=e-t-this.edgeStalled,a=s-n.totalduration,o=s-(this.config.lowLatencyMode&&n.partTarget||n.targetduration);return Math.min(Math.max(a,r),o)}get drift(){const{levelDetails:e}=this;return e===null?1:e.drift}get edgeStalled(){const{levelDetails:e}=this;if(e===null)return 0;const t=(this.config.lowLatencyMode&&e.partTarget||e.targetduration)*3;return Math.max(e.age-t,0)}get forwardBufferLength(){const{media:e,levelDetails:t}=this;if(!e||!t)return 0;const n=e.buffered.length;return(n?e.buffered.end(n-1):t.edge)-this.currentTime}destroy(){this.unregisterListeners(),this.onMediaDetaching(),this.levelDetails=null,this.hls=this.timeupdateHandler=null}registerListeners(){this.hls.on(Events.MEDIA_ATTACHED,this.onMediaAttached,this),this.hls.on(Events.MEDIA_DETACHING,this.onMediaDetaching,this),this.hls.on(Events.MANIFEST_LOADING,this.onManifestLoading,this),this.hls.on(Events.LEVEL_UPDATED,this.onLevelUpdated,this),this.hls.on(Events.ERROR,this.onError,this)}unregisterListeners(){this.hls.off(Events.MEDIA_ATTACHED,this.onMediaAttached,this),this.hls.off(Events.MEDIA_DETACHING,this.onMediaDetaching,this),this.hls.off(Events.MANIFEST_LOADING,this.onManifestLoading,this),this.hls.off(Events.LEVEL_UPDATED,this.onLevelUpdated,this),this.hls.off(Events.ERROR,this.onError,this)}onMediaAttached(e,t){this.media=t.media,this.media.addEventListener("timeupdate",this.timeupdateHandler)}onMediaDetaching(){this.media&&(this.media.removeEventListener("timeupdate",this.timeupdateHandler),this.media=null)}onManifestLoading(){this.levelDetails=null,this._latency=null,this.stallCount=0}onLevelUpdated(e,{details:t}){this.levelDetails=t,t.advanced&&this.timeupdate(),!t.live&&this.media&&this.media.removeEventListener("timeupdate",this.timeupdateHandler)}onError(e,t){var n;t.details===ErrorDetails.BUFFER_STALLED_ERROR&&(this.stallCount++,(n=this.levelDetails)!=null&&n.live&&logger.warn("[playback-rate-controller]: Stall detected, adjusting target latency"))}timeupdate(){const{media:e,levelDetails:t}=this;if(!e||!t)return;this.currentTime=e.currentTime;const n=this.computeLatency();if(n===null)return;this._latency=n;const{lowLatencyMode:s,maxLiveSyncPlaybackRate:r}=this.config;if(!s||r===1||!t.live)return;const a=this.targetLatency;if(a===null)return;const o=n-a,l=Math.min(this.maxLatency,a+t.targetduration);if(o<l&&o>.05&&this.forwardBufferLength>1){const f=Math.min(2,Math.max(1,r)),u=Math.round(2/(1+Math.exp(-.75*o-this.edgeStalled))*20)/20;e.playbackRate=Math.min(f,Math.max(1,u))}else e.playbackRate!==1&&e.playbackRate!==0&&(e.playbackRate=1)}estimateLiveEdge(){const{levelDetails:e}=this;return e===null?null:e.edge+e.age}computeLatency(){const e=this.estimateLiveEdge();return e===null?null:e-this.currentTime}}const HdcpLevels=["NONE","TYPE-0","TYPE-1",null];function isHdcpLevel(i){return HdcpLevels.indexOf(i)>-1}const VideoRangeValues=["SDR","PQ","HLG"];function isVideoRange(i){return!!i&&VideoRangeValues.indexOf(i)>-1}var HlsSkip={No:"",Yes:"YES",v2:"v2"};function getSkipValue(i){const{canSkipUntil:e,canSkipDateRanges:t,age:n}=i,s=n<e/2;return e&&s?t?HlsSkip.v2:HlsSkip.Yes:HlsSkip.No}class HlsUrlParameters{constructor(e,t,n){this.msn=void 0,this.part=void 0,this.skip=void 0,this.msn=e,this.part=t,this.skip=n}addDirectives(e){const t=new self.URL(e);return this.msn!==void 0&&t.searchParams.set("_HLS_msn",this.msn.toString()),this.part!==void 0&&t.searchParams.set("_HLS_part",this.part.toString()),this.skip&&t.searchParams.set("_HLS_skip",this.skip),t.href}}class Level{constructor(e){this._attrs=void 0,this.audioCodec=void 0,this.bitrate=void 0,this.codecSet=void 0,this.url=void 0,this.frameRate=void 0,this.height=void 0,this.id=void 0,this.name=void 0,this.videoCodec=void 0,this.width=void 0,this.details=void 0,this.fragmentError=0,this.loadError=0,this.loaded=void 0,this.realBitrate=0,this.supportedPromise=void 0,this.supportedResult=void 0,this._avgBitrate=0,this._audioGroups=void 0,this._subtitleGroups=void 0,this._urlId=0,this.url=[e.url],this._attrs=[e.attrs],this.bitrate=e.bitrate,e.details&&(this.details=e.details),this.id=e.id||0,this.name=e.name,this.width=e.width||0,this.height=e.height||0,this.frameRate=e.attrs.optionalFloat("FRAME-RATE",0),this._avgBitrate=e.attrs.decimalInteger("AVERAGE-BANDWIDTH"),this.audioCodec=e.audioCodec,this.videoCodec=e.videoCodec,this.codecSet=[e.videoCodec,e.audioCodec].filter(t=>!!t).map(t=>t.substring(0,4)).join(","),this.addGroupId("audio",e.attrs.AUDIO),this.addGroupId("text",e.attrs.SUBTITLES)}get maxBitrate(){return Math.max(this.realBitrate,this.bitrate)}get averageBitrate(){return this._avgBitrate||this.realBitrate||this.bitrate}get attrs(){return this._attrs[0]}get codecs(){return this.attrs.CODECS||""}get pathwayId(){return this.attrs["PATHWAY-ID"]||"."}get videoRange(){return this.attrs["VIDEO-RANGE"]||"SDR"}get score(){return this.attrs.optionalFloat("SCORE",0)}get uri(){return this.url[0]||""}hasAudioGroup(e){return hasGroup(this._audioGroups,e)}hasSubtitleGroup(e){return hasGroup(this._subtitleGroups,e)}get audioGroups(){return this._audioGroups}get subtitleGroups(){return this._subtitleGroups}addGroupId(e,t){if(t){if(e==="audio"){let n=this._audioGroups;n||(n=this._audioGroups=[]),n.indexOf(t)===-1&&n.push(t)}else if(e==="text"){let n=this._subtitleGroups;n||(n=this._subtitleGroups=[]),n.indexOf(t)===-1&&n.push(t)}}}get urlId(){return 0}set urlId(e){}get audioGroupIds(){return this.audioGroups?[this.audioGroupId]:void 0}get textGroupIds(){return this.subtitleGroups?[this.textGroupId]:void 0}get audioGroupId(){var e;return(e=this.audioGroups)==null?void 0:e[0]}get textGroupId(){var e;return(e=this.subtitleGroups)==null?void 0:e[0]}addFallback(){}}function hasGroup(i,e){return!e||!i?!1:i.indexOf(e)!==-1}function updateFromToPTS(i,e){const t=e.startPTS;if(isFiniteNumber(t)){let n=0,s;e.sn>i.sn?(n=t-i.start,s=i):(n=i.start-t,s=e),s.duration!==n&&(s.duration=n)}else e.sn>i.sn?i.cc===e.cc&&i.minEndPTS?e.start=i.start+(i.minEndPTS-i.start):e.start=i.start+i.duration:e.start=Math.max(i.start-e.duration,0)}function updateFragPTSDTS(i,e,t,n,s,r){n-t<=0&&(logger.warn("Fragment should have a positive duration",e),n=t+e.duration,r=s+e.duration);let o=t,l=n;const d=e.startPTS,f=e.endPTS;if(isFiniteNumber(d)){const v=Math.abs(d-t);isFiniteNumber(e.deltaPTS)?e.deltaPTS=Math.max(v,e.deltaPTS):e.deltaPTS=v,o=Math.max(t,d),t=Math.min(t,d),s=Math.min(s,e.startDTS),l=Math.min(n,f),n=Math.max(n,f),r=Math.max(r,e.endDTS)}const u=t-e.start;e.start!==0&&(e.start=t),e.duration=n-e.start,e.startPTS=t,e.maxStartPTS=o,e.startDTS=s,e.endPTS=n,e.minEndPTS=l,e.endDTS=r;const p=e.sn;if(!i||p<i.startSN||p>i.endSN)return 0;let m;const g=p-i.startSN,y=i.fragments;for(y[g]=e,m=g;m>0;m--)updateFromToPTS(y[m],y[m-1]);for(m=g;m<y.length-1;m++)updateFromToPTS(y[m],y[m+1]);return i.fragmentHint&&updateFromToPTS(y[y.length-1],i.fragmentHint),i.PTSKnown=i.alignedSliding=!0,u}function mergeDetails(i,e){let t=null;const n=i.fragments;for(let o=n.length-1;o>=0;o--){const l=n[o].initSegment;if(l){t=l;break}}i.fragmentHint&&delete i.fragmentHint.endPTS;let s;mapFragmentIntersection(i,e,(o,l,d,f)=>{if(e.skippedSegments&&l.cc!==o.cc){const u=o.cc-l.cc;for(let p=d;p<f.length;p++)f[p].cc+=u}isFiniteNumber(o.startPTS)&&isFiniteNumber(o.endPTS)&&(l.start=l.startPTS=o.startPTS,l.startDTS=o.startDTS,l.maxStartPTS=o.maxStartPTS,l.endPTS=o.endPTS,l.endDTS=o.endDTS,l.minEndPTS=o.minEndPTS,l.duration=o.endPTS-o.startPTS,l.duration&&(s=l),e.PTSKnown=e.alignedSliding=!0),l.elementaryStreams=o.elementaryStreams,l.loader=o.loader,l.stats=o.stats,o.initSegment&&(l.initSegment=o.initSegment,t=o.initSegment)});const r=e.fragments;if(t&&(e.fragmentHint?r.concat(e.fragmentHint):r).forEach(l=>{var d;l&&(!l.initSegment||l.initSegment.relurl===((d=t)==null?void 0:d.relurl))&&(l.initSegment=t)}),e.skippedSegments){if(e.deltaUpdateFailed=r.some(o=>!o),e.deltaUpdateFailed){logger.warn("[level-helper] Previous playlist missing segments skipped in delta playlist");for(let o=e.skippedSegments;o--;)r.shift();e.startSN=r[0].sn}else e.canSkipDateRanges&&(e.dateRanges=mergeDateRanges(i.dateRanges,e.dateRanges,e.recentlyRemovedDateranges));e.startCC=e.fragments[0].cc,e.endCC=r[r.length-1].cc}mapPartIntersection(i.partList,e.partList,(o,l)=>{l.elementaryStreams=o.elementaryStreams,l.stats=o.stats}),s?updateFragPTSDTS(e,s,s.startPTS,s.endPTS,s.startDTS,s.endDTS):adjustSliding(i,e),r.length&&(e.totalduration=e.edge-r[0].start),e.driftStartTime=i.driftStartTime,e.driftStart=i.driftStart;const a=e.advancedDateTime;if(e.advanced&&a){const o=e.edge;e.driftStart||(e.driftStartTime=a,e.driftStart=o),e.driftEndTime=a,e.driftEnd=o}else e.driftEndTime=i.driftEndTime,e.driftEnd=i.driftEnd,e.advancedDateTime=i.advancedDateTime}function mergeDateRanges(i,e,t){const n=_extends$1({},i);return t&&t.forEach(s=>{delete n[s]}),Object.keys(e).forEach(s=>{const r=new DateRange(e[s].attr,n[s]);r.isValid?n[s]=r:logger.warn(`Ignoring invalid Playlist Delta Update DATERANGE tag: "${JSON.stringify(e[s].attr)}"`)}),n}function mapPartIntersection(i,e,t){if(i&&e){let n=0;for(let s=0,r=i.length;s<=r;s++){const a=i[s],o=e[s+n];a&&o&&a.index===o.index&&a.fragment.sn===o.fragment.sn?t(a,o):n--}}}function mapFragmentIntersection(i,e,t){const n=e.skippedSegments,s=Math.max(i.startSN,e.startSN)-e.startSN,r=(i.fragmentHint?1:0)+(n?e.endSN:Math.min(i.endSN,e.endSN))-e.startSN,a=e.startSN-i.startSN,o=e.fragmentHint?e.fragments.concat(e.fragmentHint):e.fragments,l=i.fragmentHint?i.fragments.concat(i.fragmentHint):i.fragments;for(let d=s;d<=r;d++){const f=l[a+d];let u=o[d];n&&!u&&d<n&&(u=e.fragments[d]=f),f&&u&&t(f,u,d,o)}}function adjustSliding(i,e){const t=e.startSN+e.skippedSegments-i.startSN,n=i.fragments;t<0||t>=n.length||addSliding(e,n[t].start)}function addSliding(i,e){if(e){const t=i.fragments;for(let n=i.skippedSegments;n<t.length;n++)t[n].start+=e;i.fragmentHint&&(i.fragmentHint.start+=e)}}function computeReloadInterval(i,e=1/0){let t=1e3*i.targetduration;if(i.updated){const n=i.fragments;if(n.length&&t*4>e){const r=n[n.length-1].duration*1e3;r<t&&(t=r)}}else t/=2;return Math.round(t)}function getFragmentWithSN(i,e,t){if(!(i!=null&&i.details))return null;const n=i.details;let s=n.fragments[e-n.startSN];return s||(s=n.fragmentHint,s&&s.sn===e)?s:e<n.startSN&&t&&t.sn===e?t:null}function getPartWith(i,e,t){var n;return i!=null&&i.details?findPart((n=i.details)==null?void 0:n.partList,e,t):null}function findPart(i,e,t){if(i)for(let n=i.length;n--;){const s=i[n];if(s.index===t&&s.fragment.sn===e)return s}return null}function reassignFragmentLevelIndexes(i){i.forEach((e,t)=>{const{details:n}=e;n!=null&&n.fragments&&n.fragments.forEach(s=>{s.level=t})})}function isTimeoutError(i){switch(i.details){case ErrorDetails.FRAG_LOAD_TIMEOUT:case ErrorDetails.KEY_LOAD_TIMEOUT:case ErrorDetails.LEVEL_LOAD_TIMEOUT:case ErrorDetails.MANIFEST_LOAD_TIMEOUT:return!0}return!1}function getRetryConfig(i,e){const t=isTimeoutError(e);return i.default[`${t?"timeout":"error"}Retry`]}function getRetryDelay(i,e){const t=i.backoff==="linear"?1:Math.pow(2,e);return Math.min(t*i.retryDelayMs,i.maxRetryDelayMs)}function getLoaderConfigWithoutReties(i){return _objectSpread2(_objectSpread2({},i),{errorRetry:null,timeoutRetry:null})}function shouldRetry(i,e,t,n){if(!i)return!1;const s=n==null?void 0:n.code,r=e<i.maxNumRetry&&(retryForHttpStatus(s)||!!t);return i.shouldRetry?i.shouldRetry(i,e,t,n,r):r}function retryForHttpStatus(i){return i===0&&navigator.onLine===!1||!!i&&(i<400||i>499)}const BinarySearch={search:function(i,e){let t=0,n=i.length-1,s=null,r=null;for(;t<=n;){s=(t+n)/2|0,r=i[s];const a=e(r);if(a>0)t=s+1;else if(a<0)n=s-1;else return r}return null}};function findFragmentByPDT(i,e,t){if(e===null||!Array.isArray(i)||!i.length||!isFiniteNumber(e))return null;const n=i[0].programDateTime;if(e<(n||0))return null;const s=i[i.length-1].endProgramDateTime;if(e>=(s||0))return null;t=t||0;for(let r=0;r<i.length;++r){const a=i[r];if(pdtWithinToleranceTest(e,t,a))return a}return null}function findFragmentByPTS(i,e,t=0,n=0,s=.005){let r=null;if(i){r=e[i.sn-e[0].sn+1]||null;const o=i.endDTS-t;o>0&&o<15e-7&&(t+=15e-7)}else t===0&&e[0].start===0&&(r=e[0]);if(r&&((!i||i.level===r.level)&&fragmentWithinToleranceTest(t,n,r)===0||fragmentWithinFastStartSwitch(r,i,Math.min(s,n))))return r;const a=BinarySearch.search(e,fragmentWithinToleranceTest.bind(null,t,n));return a&&(a!==i||!r)?a:r}function fragmentWithinFastStartSwitch(i,e,t){if(e&&e.start===0&&e.level<i.level&&(e.endPTS||0)>0){const n=e.tagList.reduce((s,r)=>(r[0]==="INF"&&(s+=parseFloat(r[1])),s),t);return i.start<=n}return!1}function fragmentWithinToleranceTest(i=0,e=0,t){if(t.start<=i&&t.start+t.duration>i)return 0;const n=Math.min(e,t.duration+(t.deltaPTS?t.deltaPTS:0));return t.start+t.duration-n<=i?1:t.start-n>i&&t.start?-1:0}function pdtWithinToleranceTest(i,e,t){const n=Math.min(e,t.duration+(t.deltaPTS?t.deltaPTS:0))*1e3;return(t.endProgramDateTime||0)-n>i}function findFragWithCC(i,e){return BinarySearch.search(i,t=>t.cc<e?1:t.cc>e?-1:0)}var NetworkErrorAction={DoNothing:0,SendAlternateToPenaltyBox:2,RemoveAlternatePermanently:3,RetryRequest:5},ErrorActionFlags={None:0,MoveAllAlternatesMatchingHost:1,MoveAllAlternatesMatchingHDCP:2};class ErrorController{constructor(e){this.hls=void 0,this.playlistError=0,this.penalizedRenditions={},this.log=void 0,this.warn=void 0,this.error=void 0,this.hls=e,this.log=logger.log.bind(logger,"[info]:"),this.warn=logger.warn.bind(logger,"[warning]:"),this.error=logger.error.bind(logger,"[error]:"),this.registerListeners()}registerListeners(){const e=this.hls;e.on(Events.ERROR,this.onError,this),e.on(Events.MANIFEST_LOADING,this.onManifestLoading,this),e.on(Events.LEVEL_UPDATED,this.onLevelUpdated,this)}unregisterListeners(){const e=this.hls;e&&(e.off(Events.ERROR,this.onError,this),e.off(Events.ERROR,this.onErrorOut,this),e.off(Events.MANIFEST_LOADING,this.onManifestLoading,this),e.off(Events.LEVEL_UPDATED,this.onLevelUpdated,this))}destroy(){this.unregisterListeners(),this.hls=null,this.penalizedRenditions={}}startLoad(e){}stopLoad(){this.playlistError=0}getVariantLevelIndex(e){return(e==null?void 0:e.type)===PlaylistLevelType.MAIN?e.level:this.hls.loadLevel}onManifestLoading(){this.playlistError=0,this.penalizedRenditions={}}onLevelUpdated(){this.playlistError=0}onError(e,t){var n,s;if(t.fatal)return;const r=this.hls,a=t.context;switch(t.details){case ErrorDetails.FRAG_LOAD_ERROR:case ErrorDetails.FRAG_LOAD_TIMEOUT:case ErrorDetails.KEY_LOAD_ERROR:case ErrorDetails.KEY_LOAD_TIMEOUT:t.errorAction=this.getFragRetryOrSwitchAction(t);return;case ErrorDetails.FRAG_PARSING_ERROR:if((n=t.frag)!=null&&n.gap){t.errorAction={action:NetworkErrorAction.DoNothing,flags:ErrorActionFlags.None};return}case ErrorDetails.FRAG_GAP:case ErrorDetails.FRAG_DECRYPT_ERROR:{t.errorAction=this.getFragRetryOrSwitchAction(t),t.errorAction.action=NetworkErrorAction.SendAlternateToPenaltyBox;return}case ErrorDetails.LEVEL_EMPTY_ERROR:case ErrorDetails.LEVEL_PARSING_ERROR:{var o,l;const d=t.parent===PlaylistLevelType.MAIN?t.level:r.loadLevel;t.details===ErrorDetails.LEVEL_EMPTY_ERROR&&((o=t.context)!=null&&(l=o.levelDetails)!=null&&l.live)?t.errorAction=this.getPlaylistRetryOrSwitchAction(t,d):(t.levelRetry=!1,t.errorAction=this.getLevelSwitchAction(t,d))}return;case ErrorDetails.LEVEL_LOAD_ERROR:case ErrorDetails.LEVEL_LOAD_TIMEOUT:typeof(a==null?void 0:a.level)=="number"&&(t.errorAction=this.getPlaylistRetryOrSwitchAction(t,a.level));return;case ErrorDetails.AUDIO_TRACK_LOAD_ERROR:case ErrorDetails.AUDIO_TRACK_LOAD_TIMEOUT:case ErrorDetails.SUBTITLE_LOAD_ERROR:case ErrorDetails.SUBTITLE_TRACK_LOAD_TIMEOUT:if(a){const d=r.levels[r.loadLevel];if(d&&(a.type===PlaylistContextType.AUDIO_TRACK&&d.hasAudioGroup(a.groupId)||a.type===PlaylistContextType.SUBTITLE_TRACK&&d.hasSubtitleGroup(a.groupId))){t.errorAction=this.getPlaylistRetryOrSwitchAction(t,r.loadLevel),t.errorAction.action=NetworkErrorAction.SendAlternateToPenaltyBox,t.errorAction.flags=ErrorActionFlags.MoveAllAlternatesMatchingHost;return}}return;case ErrorDetails.KEY_SYSTEM_STATUS_OUTPUT_RESTRICTED:{const d=r.levels[r.loadLevel],f=d==null?void 0:d.attrs["HDCP-LEVEL"];f?t.errorAction={action:NetworkErrorAction.SendAlternateToPenaltyBox,flags:ErrorActionFlags.MoveAllAlternatesMatchingHDCP,hdcpLevel:f}:this.keySystemError(t)}return;case ErrorDetails.BUFFER_ADD_CODEC_ERROR:case ErrorDetails.REMUX_ALLOC_ERROR:case ErrorDetails.BUFFER_APPEND_ERROR:t.errorAction=this.getLevelSwitchAction(t,(s=t.level)!=null?s:r.loadLevel);return;case ErrorDetails.INTERNAL_EXCEPTION:case ErrorDetails.BUFFER_APPENDING_ERROR:case ErrorDetails.BUFFER_FULL_ERROR:case ErrorDetails.LEVEL_SWITCH_ERROR:case ErrorDetails.BUFFER_STALLED_ERROR:case ErrorDetails.BUFFER_SEEK_OVER_HOLE:case ErrorDetails.BUFFER_NUDGE_ON_STALL:t.errorAction={action:NetworkErrorAction.DoNothing,flags:ErrorActionFlags.None};return}t.type===ErrorTypes.KEY_SYSTEM_ERROR&&this.keySystemError(t)}keySystemError(e){const t=this.getVariantLevelIndex(e.frag);e.levelRetry=!1,e.errorAction=this.getLevelSwitchAction(e,t)}getPlaylistRetryOrSwitchAction(e,t){const n=this.hls,s=getRetryConfig(n.config.playlistLoadPolicy,e),r=this.playlistError++;if(shouldRetry(s,r,isTimeoutError(e),e.response))return{action:NetworkErrorAction.RetryRequest,flags:ErrorActionFlags.None,retryConfig:s,retryCount:r};const o=this.getLevelSwitchAction(e,t);return s&&(o.retryConfig=s,o.retryCount=r),o}getFragRetryOrSwitchAction(e){const t=this.hls,n=this.getVariantLevelIndex(e.frag),s=t.levels[n],{fragLoadPolicy:r,keyLoadPolicy:a}=t.config,o=getRetryConfig(e.details.startsWith("key")?a:r,e),l=t.levels.reduce((f,u)=>f+u.fragmentError,0);if(s&&(e.details!==ErrorDetails.FRAG_GAP&&s.fragmentError++,shouldRetry(o,l,isTimeoutError(e),e.response)))return{action:NetworkErrorAction.RetryRequest,flags:ErrorActionFlags.None,retryConfig:o,retryCount:l};const d=this.getLevelSwitchAction(e,n);return o&&(d.retryConfig=o,d.retryCount=l),d}getLevelSwitchAction(e,t){const n=this.hls;t==null&&(t=n.loadLevel);const s=this.hls.levels[t];if(s){var r,a;const d=e.details;s.loadError++,d===ErrorDetails.BUFFER_APPEND_ERROR&&s.fragmentError++;let f=-1;const{levels:u,loadLevel:p,minAutoLevel:m,maxAutoLevel:g}=n;n.autoLevelEnabled||(n.loadLevel=-1);const y=(r=e.frag)==null?void 0:r.type,b=(y===PlaylistLevelType.AUDIO&&d===ErrorDetails.FRAG_PARSING_ERROR||e.sourceBufferName==="audio"&&(d===ErrorDetails.BUFFER_ADD_CODEC_ERROR||d===ErrorDetails.BUFFER_APPEND_ERROR))&&u.some(({audioCodec:F})=>s.audioCodec!==F),_=e.sourceBufferName==="video"&&(d===ErrorDetails.BUFFER_ADD_CODEC_ERROR||d===ErrorDetails.BUFFER_APPEND_ERROR)&&u.some(({codecSet:F,audioCodec:O})=>s.codecSet!==F&&s.audioCodec===O),{type:R,groupId:E}=(a=e.context)!=null?a:{};for(let F=u.length;F--;){const O=(F+p)%u.length;if(O!==p&&O>=m&&O<=g&&u[O].loadError===0){var o,l;const A=u[O];if(d===ErrorDetails.FRAG_GAP&&y===PlaylistLevelType.MAIN&&e.frag){const N=u[O].details;if(N){const M=findFragmentByPTS(e.frag,N.fragments,e.frag.start);if(M!=null&&M.gap)continue}}else{if(R===PlaylistContextType.AUDIO_TRACK&&A.hasAudioGroup(E)||R===PlaylistContextType.SUBTITLE_TRACK&&A.hasSubtitleGroup(E))continue;if(y===PlaylistLevelType.AUDIO&&(o=s.audioGroups)!=null&&o.some(N=>A.hasAudioGroup(N))||y===PlaylistLevelType.SUBTITLE&&(l=s.subtitleGroups)!=null&&l.some(N=>A.hasSubtitleGroup(N))||b&&s.audioCodec===A.audioCodec||!b&&s.audioCodec!==A.audioCodec||_&&s.codecSet===A.codecSet)continue}f=O;break}}if(f>-1&&n.loadLevel!==f)return e.levelRetry=!0,this.playlistError=0,{action:NetworkErrorAction.SendAlternateToPenaltyBox,flags:ErrorActionFlags.None,nextAutoLevel:f}}return{action:NetworkErrorAction.SendAlternateToPenaltyBox,flags:ErrorActionFlags.MoveAllAlternatesMatchingHost}}onErrorOut(e,t){var n;switch((n=t.errorAction)==null?void 0:n.action){case NetworkErrorAction.DoNothing:break;case NetworkErrorAction.SendAlternateToPenaltyBox:this.sendAlternateToPenaltyBox(t),!t.errorAction.resolved&&t.details!==ErrorDetails.FRAG_GAP?t.fatal=!0:/MediaSource readyState: ended/.test(t.error.message)&&(this.warn(`MediaSource ended after "${t.sourceBufferName}" sourceBuffer append error. Attempting to recover from media error.`),this.hls.recoverMediaError());break}if(t.fatal){this.hls.stopLoad();return}}sendAlternateToPenaltyBox(e){const t=this.hls,n=e.errorAction;if(!n)return;const{flags:s,hdcpLevel:r,nextAutoLevel:a}=n;switch(s){case ErrorActionFlags.None:this.switchLevel(e,a);break;case ErrorActionFlags.MoveAllAlternatesMatchingHDCP:r&&(t.maxHdcpLevel=HdcpLevels[HdcpLevels.indexOf(r)-1],n.resolved=!0),this.warn(`Restricting playback to HDCP-LEVEL of "${t.maxHdcpLevel}" or lower`);break}n.resolved||this.switchLevel(e,a)}switchLevel(e,t){t!==void 0&&e.errorAction&&(this.warn(`switching to level ${t} after ${e.details}`),this.hls.nextAutoLevel=t,e.errorAction.resolved=!0,this.hls.nextLoadLevel=this.hls.nextAutoLevel)}}class BasePlaylistController{constructor(e,t){this.hls=void 0,this.timer=-1,this.requestScheduled=-1,this.canLoad=!1,this.log=void 0,this.warn=void 0,this.log=logger.log.bind(logger,`${t}:`),this.warn=logger.warn.bind(logger,`${t}:`),this.hls=e}destroy(){this.clearTimer(),this.hls=this.log=this.warn=null}clearTimer(){this.timer!==-1&&(self.clearTimeout(this.timer),this.timer=-1)}startLoad(){this.canLoad=!0,this.requestScheduled=-1,this.loadPlaylist()}stopLoad(){this.canLoad=!1,this.clearTimer()}switchParams(e,t,n){const s=t==null?void 0:t.renditionReports;if(s){let r=-1;for(let a=0;a<s.length;a++){const o=s[a];let l;try{l=new self.URL(o.URI,t.url).href}catch(d){logger.warn(`Could not construct new URL for Rendition Report: ${d}`),l=o.URI||""}if(l===e){r=a;break}else l===e.substring(0,l.length)&&(r=a)}if(r!==-1){const a=s[r],o=parseInt(a["LAST-MSN"])||(t==null?void 0:t.lastPartSn);let l=parseInt(a["LAST-PART"])||(t==null?void 0:t.lastPartIndex);if(this.hls.config.lowLatencyMode){const f=Math.min(t.age-t.partTarget,t.targetduration);l>=0&&f>t.partTarget&&(l+=1)}const d=n&&getSkipValue(n);return new HlsUrlParameters(o,l>=0?l:void 0,d)}}}loadPlaylist(e){this.requestScheduled===-1&&(this.requestScheduled=self.performance.now())}shouldLoadPlaylist(e){return this.canLoad&&!!e&&!!e.url&&(!e.details||e.details.live)}shouldReloadPlaylist(e){return this.timer===-1&&this.requestScheduled===-1&&this.shouldLoadPlaylist(e)}playlistLoaded(e,t,n){const{details:s,stats:r}=t,a=self.performance.now(),o=r.loading.first?Math.max(0,a-r.loading.first):0;if(s.advancedDateTime=Date.now()-o,s.live||n!=null&&n.live){if(s.reloaded(n),n&&this.log(`live playlist ${e} ${s.advanced?"REFRESHED "+s.lastPartSn+"-"+s.lastPartIndex:s.updated?"UPDATED":"MISSED"}`),n&&s.fragments.length>0&&mergeDetails(n,s),!this.canLoad||!s.live)return;let l,d,f;if(s.canBlockReload&&s.endSN&&s.advanced){const v=this.hls.config.lowLatencyMode,b=s.lastPartSn,C=s.endSN,_=s.lastPartIndex,R=_!==-1,E=b===C,F=v?0:_;R?(d=E?C+1:b,f=E?F:_+1):d=C+1;const O=s.age,A=O+s.ageHeader;let N=Math.min(A-s.partTarget,s.targetduration*1.5);if(N>0){if(n&&N>n.tuneInGoal)this.warn(`CDN Tune-in goal increased from: ${n.tuneInGoal} to: ${N} with playlist age: ${s.age}`),N=0;else{const M=Math.floor(N/s.targetduration);if(d+=M,f!==void 0){const Z=Math.round(N%s.targetduration/s.partTarget);f+=Z}this.log(`CDN Tune-in age: ${s.ageHeader}s last advanced ${O.toFixed(2)}s goal: ${N} skip sn ${M} to part ${f}`)}s.tuneInGoal=N}if(l=this.getDeliveryDirectives(s,t.deliveryDirectives,d,f),v||!E){this.loadPlaylist(l);return}}else(s.canBlockReload||s.canSkipUntil)&&(l=this.getDeliveryDirectives(s,t.deliveryDirectives,d,f));const u=this.hls.mainForwardBufferInfo,p=u?u.end-u.len:0,m=(s.edge-p)*1e3,g=computeReloadInterval(s,m);s.updated&&a>this.requestScheduled+g&&(this.requestScheduled=r.loading.start),d!==void 0&&s.canBlockReload?this.requestScheduled=r.loading.first+g-(s.partTarget*1e3||1e3):this.requestScheduled===-1||this.requestScheduled+g<a?this.requestScheduled=a:this.requestScheduled-a<=0&&(this.requestScheduled+=g);let y=this.requestScheduled-a;y=Math.max(0,y),this.log(`reload live playlist ${e} in ${Math.round(y)} ms`),this.timer=self.setTimeout(()=>this.loadPlaylist(l),y)}else this.clearTimer()}getDeliveryDirectives(e,t,n,s){let r=getSkipValue(e);return t!=null&&t.skip&&e.deltaUpdateFailed&&(n=t.msn,s=t.part,r=HlsSkip.No),new HlsUrlParameters(n,s,r)}checkRetry(e){const t=e.details,n=isTimeoutError(e),s=e.errorAction,{action:r,retryCount:a=0,retryConfig:o}=s||{},l=!!s&&!!o&&(r===NetworkErrorAction.RetryRequest||!s.resolved&&r===NetworkErrorAction.SendAlternateToPenaltyBox);if(l){var d;if(this.requestScheduled=-1,a>=o.maxNumRetry)return!1;if(n&&(d=e.context)!=null&&d.deliveryDirectives)this.warn(`Retrying playlist loading ${a+1}/${o.maxNumRetry} after "${t}" without delivery-directives`),this.loadPlaylist();else{const f=getRetryDelay(o,a);this.timer=self.setTimeout(()=>this.loadPlaylist(),f),this.warn(`Retrying playlist loading ${a+1}/${o.maxNumRetry} after "${t}" in ${f}ms`)}e.levelRetry=!0,s.resolved=!0}return l}}class EWMA{constructor(e,t=0,n=0){this.halfLife=void 0,this.alpha_=void 0,this.estimate_=void 0,this.totalWeight_=void 0,this.halfLife=e,this.alpha_=e?Math.exp(Math.log(.5)/e):0,this.estimate_=t,this.totalWeight_=n}sample(e,t){const n=Math.pow(this.alpha_,e);this.estimate_=t*(1-n)+n*this.estimate_,this.totalWeight_+=e}getTotalWeight(){return this.totalWeight_}getEstimate(){if(this.alpha_){const e=1-Math.pow(this.alpha_,this.totalWeight_);if(e)return this.estimate_/e}return this.estimate_}}class EwmaBandWidthEstimator{constructor(e,t,n,s=100){this.defaultEstimate_=void 0,this.minWeight_=void 0,this.minDelayMs_=void 0,this.slow_=void 0,this.fast_=void 0,this.defaultTTFB_=void 0,this.ttfb_=void 0,this.defaultEstimate_=n,this.minWeight_=.001,this.minDelayMs_=50,this.slow_=new EWMA(e),this.fast_=new EWMA(t),this.defaultTTFB_=s,this.ttfb_=new EWMA(e)}update(e,t){const{slow_:n,fast_:s,ttfb_:r}=this;n.halfLife!==e&&(this.slow_=new EWMA(e,n.getEstimate(),n.getTotalWeight())),s.halfLife!==t&&(this.fast_=new EWMA(t,s.getEstimate(),s.getTotalWeight())),r.halfLife!==e&&(this.ttfb_=new EWMA(e,r.getEstimate(),r.getTotalWeight()))}sample(e,t){e=Math.max(e,this.minDelayMs_);const n=8*t,s=e/1e3,r=n/s;this.fast_.sample(s,r),this.slow_.sample(s,r)}sampleTTFB(e){const t=e/1e3,n=Math.sqrt(2)*Math.exp(-Math.pow(t,2)/2);this.ttfb_.sample(n,Math.max(e,5))}canEstimate(){return this.fast_.getTotalWeight()>=this.minWeight_}getEstimate(){return this.canEstimate()?Math.min(this.fast_.getEstimate(),this.slow_.getEstimate()):this.defaultEstimate_}getEstimateTTFB(){return this.ttfb_.getTotalWeight()>=this.minWeight_?this.ttfb_.getEstimate():this.defaultTTFB_}destroy(){}}const SUPPORTED_INFO_DEFAULT={supported:!0,configurations:[],decodingInfoResults:[{supported:!0,powerEfficient:!0,smooth:!0}]},SUPPORTED_INFO_CACHE={};function requiresMediaCapabilitiesDecodingInfo(i,e,t,n,s,r){const a=i.audioCodec?i.audioGroups:null,o=r==null?void 0:r.audioCodec,l=r==null?void 0:r.channels,d=l?parseInt(l):o?1/0:2;let f=null;if(a!=null&&a.length)try{a.length===1&&a[0]?f=e.groups[a[0]].channels:f=a.reduce((u,p)=>{if(p){const m=e.groups[p];if(!m)throw new Error(`Audio track group ${p} not found`);Object.keys(m.channels).forEach(g=>{u[g]=(u[g]||0)+m.channels[g]})}return u},{2:0})}catch{return!0}return i.videoCodec!==void 0&&(i.width>1920&&i.height>1088||i.height>1920&&i.width>1088||i.frameRate>Math.max(n,30)||i.videoRange!=="SDR"&&i.videoRange!==t||i.bitrate>Math.max(s,8e6))||!!f&&isFiniteNumber(d)&&Object.keys(f).some(u=>parseInt(u)>d)}function getMediaDecodingInfoPromise(i,e,t){const n=i.videoCodec,s=i.audioCodec;if(!n||!s||!t)return Promise.resolve(SUPPORTED_INFO_DEFAULT);const r={width:i.width,height:i.height,bitrate:Math.ceil(Math.max(i.bitrate*.9,i.averageBitrate)),framerate:i.frameRate||30},a=i.videoRange;a!=="SDR"&&(r.transferFunction=a.toLowerCase());const o=n.split(",").map(l=>({type:"media-source",video:_objectSpread2(_objectSpread2({},r),{},{contentType:mimeTypeForCodec(l,"video")})}));return s&&i.audioGroups&&i.audioGroups.forEach(l=>{var d;l&&((d=e.groups[l])==null||d.tracks.forEach(f=>{if(f.groupId===l){const u=f.channels||"",p=parseFloat(u);isFiniteNumber(p)&&p>2&&o.push.apply(o,s.split(",").map(m=>({type:"media-source",audio:{contentType:mimeTypeForCodec(m,"audio"),channels:""+p}})))}}))}),Promise.all(o.map(l=>{const d=getMediaDecodingInfoKey(l);return SUPPORTED_INFO_CACHE[d]||(SUPPORTED_INFO_CACHE[d]=t.decodingInfo(l))})).then(l=>({supported:!l.some(d=>!d.supported),configurations:o,decodingInfoResults:l})).catch(l=>({supported:!1,configurations:o,decodingInfoResults:[],error:l}))}function getMediaDecodingInfoKey(i){const{audio:e,video:t}=i,n=t||e;if(n){const s=n.contentType.split('"')[1];if(t)return`r${t.height}x${t.width}f${Math.ceil(t.framerate)}${t.transferFunction||"sd"}_${s}_${Math.ceil(t.bitrate/1e5)}`;if(e)return`c${e.channels}${e.spatialRendering?"s":"n"}_${s}`}return""}function isHdrSupported(){if(typeof matchMedia=="function"){const i=matchMedia("(dynamic-range: high)"),e=matchMedia("bad query");if(i.media!==e.media)return i.matches===!0}return!1}function getVideoSelectionOptions(i,e){let t=!1,n=[];return i&&(t=i!=="SDR",n=[i]),e&&(n=e.allowedVideoRanges||VideoRangeValues.slice(0),t=e.preferHDR!==void 0?e.preferHDR:isHdrSupported(),t?n=n.filter(s=>s!=="SDR"):n=["SDR"]),{preferHDR:t,allowedVideoRanges:n}}function getStartCodecTier(i,e,t,n,s){const r=Object.keys(i),a=n==null?void 0:n.channels,o=n==null?void 0:n.audioCodec,l=a&&parseInt(a)===2;let d=!0,f=!1,u=1/0,p=1/0,m=1/0,g=0,y=[];const{preferHDR:v,allowedVideoRanges:b}=getVideoSelectionOptions(e,s);for(let E=r.length;E--;){const F=i[r[E]];d=F.channels[2]>0,u=Math.min(u,F.minHeight),p=Math.min(p,F.minFramerate),m=Math.min(m,F.minBitrate);const O=b.filter(A=>F.videoRanges[A]>0);O.length>0&&(f=!0,y=O)}u=isFiniteNumber(u)?u:0,p=isFiniteNumber(p)?p:0;const C=Math.max(1080,u),_=Math.max(30,p);return m=isFiniteNumber(m)?m:t,t=Math.max(m,t),f||(e=void 0,y=[]),{codecSet:r.reduce((E,F)=>{const O=i[F];if(F===E)return E;if(O.minBitrate>t)return logStartCodecCandidateIgnored(F,`min bitrate of ${O.minBitrate} > current estimate of ${t}`),E;if(!O.hasDefaultAudio)return logStartCodecCandidateIgnored(F,"no renditions with default or auto-select sound found"),E;if(o&&F.indexOf(o.substring(0,4))%5!==0)return logStartCodecCandidateIgnored(F,`audio codec preference "${o}" not found`),E;if(a&&!l){if(!O.channels[a])return logStartCodecCandidateIgnored(F,`no renditions with ${a} channel sound found (channels options: ${Object.keys(O.channels)})`),E}else if((!o||l)&&d&&O.channels[2]===0)return logStartCodecCandidateIgnored(F,"no renditions with stereo sound found"),E;return O.minHeight>C?(logStartCodecCandidateIgnored(F,`min resolution of ${O.minHeight} > maximum of ${C}`),E):O.minFramerate>_?(logStartCodecCandidateIgnored(F,`min framerate of ${O.minFramerate} > maximum of ${_}`),E):y.some(A=>O.videoRanges[A]>0)?O.maxScore<g?(logStartCodecCandidateIgnored(F,`max score of ${O.maxScore} < selected max of ${g}`),E):E&&(codecsSetSelectionPreferenceValue(F)>=codecsSetSelectionPreferenceValue(E)||O.fragmentError>i[E].fragmentError)?E:(g=O.maxScore,F):(logStartCodecCandidateIgnored(F,`no variants with VIDEO-RANGE of ${JSON.stringify(y)} found`),E)},void 0),videoRanges:y,preferHDR:v,minFramerate:p,minBitrate:m}}function logStartCodecCandidateIgnored(i,e){logger.log(`[abr] start candidates with "${i}" ignored because ${e}`)}function getAudioTracksByGroup(i){return i.reduce((e,t)=>{let n=e.groups[t.groupId];n||(n=e.groups[t.groupId]={tracks:[],channels:{2:0},hasDefault:!1,hasAutoSelect:!1}),n.tracks.push(t);const s=t.channels||"2";return n.channels[s]=(n.channels[s]||0)+1,n.hasDefault=n.hasDefault||t.default,n.hasAutoSelect=n.hasAutoSelect||t.autoselect,n.hasDefault&&(e.hasDefaultAudio=!0),n.hasAutoSelect&&(e.hasAutoSelectAudio=!0),e},{hasDefaultAudio:!1,hasAutoSelectAudio:!1,groups:{}})}function getCodecTiers(i,e,t,n){return i.slice(t,n+1).reduce((s,r)=>{if(!r.codecSet)return s;const a=r.audioGroups;let o=s[r.codecSet];o||(s[r.codecSet]=o={minBitrate:1/0,minHeight:1/0,minFramerate:1/0,maxScore:0,videoRanges:{SDR:0},channels:{2:0},hasDefaultAudio:!a,fragmentError:0}),o.minBitrate=Math.min(o.minBitrate,r.bitrate);const l=Math.min(r.height,r.width);return o.minHeight=Math.min(o.minHeight,l),o.minFramerate=Math.min(o.minFramerate,r.frameRate),o.maxScore=Math.max(o.maxScore,r.score),o.fragmentError+=r.fragmentError,o.videoRanges[r.videoRange]=(o.videoRanges[r.videoRange]||0)+1,a&&a.forEach(d=>{if(!d)return;const f=e.groups[d];f&&(o.hasDefaultAudio=o.hasDefaultAudio||e.hasDefaultAudio?f.hasDefault:f.hasAutoSelect||!e.hasDefaultAudio&&!e.hasAutoSelectAudio,Object.keys(f.channels).forEach(u=>{o.channels[u]=(o.channels[u]||0)+f.channels[u]}))}),s},{})}function findMatchingOption(i,e,t){if("attrs"in i){const n=e.indexOf(i);if(n!==-1)return n}for(let n=0;n<e.length;n++){const s=e[n];if(matchesOption(i,s,t))return n}return-1}function matchesOption(i,e,t){const{groupId:n,name:s,lang:r,assocLang:a,default:o}=i,l=i.forced;return(n===void 0||e.groupId===n)&&(s===void 0||e.name===s)&&(r===void 0||e.lang===r)&&(r===void 0||e.assocLang===a)&&(o===void 0||e.default===o)&&(l===void 0||e.forced===l)&&(!("characteristics"in i)||characteristicsMatch(i.characteristics||"",e.characteristics))&&(t===void 0||t(i,e))}function characteristicsMatch(i,e=""){const t=i.split(","),n=e.split(",");return t.length===n.length&&!t.some(s=>n.indexOf(s)===-1)}function audioMatchPredicate(i,e){const{audioCodec:t,channels:n}=i;return(t===void 0||(e.audioCodec||"").substring(0,4)===t.substring(0,4))&&(n===void 0||n===(e.channels||"2"))}function findClosestLevelWithAudioGroup(i,e,t,n,s){const r=e[n],o=e.reduce((p,m,g)=>{const y=m.uri;return(p[y]||(p[y]=[])).push(g),p},{})[r.uri];o.length>1&&(n=Math.max.apply(Math,o));const l=r.videoRange,d=r.frameRate,f=r.codecSet.substring(0,4),u=searchDownAndUpList(e,n,p=>{if(p.videoRange!==l||p.frameRate!==d||p.codecSet.substring(0,4)!==f)return!1;const m=p.audioGroups,g=t.filter(y=>!m||m.indexOf(y.groupId)!==-1);return findMatchingOption(i,g,s)>-1});return u>-1?u:searchDownAndUpList(e,n,p=>{const m=p.audioGroups,g=t.filter(y=>!m||m.indexOf(y.groupId)!==-1);return findMatchingOption(i,g,s)>-1})}function searchDownAndUpList(i,e,t){for(let n=e;n>-1;n--)if(t(i[n]))return n;for(let n=e+1;n<i.length;n++)if(t(i[n]))return n;return-1}class AbrController{constructor(e){this.hls=void 0,this.lastLevelLoadSec=0,this.lastLoadedFragLevel=-1,this.firstSelection=-1,this._nextAutoLevel=-1,this.nextAutoLevelKey="",this.audioTracksByGroup=null,this.codecTiers=null,this.timer=-1,this.fragCurrent=null,this.partCurrent=null,this.bitrateTestDelay=0,this.bwEstimator=void 0,this._abandonRulesCheck=()=>{const{fragCurrent:t,partCurrent:n,hls:s}=this,{autoLevelEnabled:r,media:a}=s;if(!t||!a)return;const o=performance.now(),l=n?n.stats:t.stats,d=n?n.duration:t.duration,f=o-l.loading.start,u=s.minAutoLevel;if(l.aborted||l.loaded&&l.loaded===l.total||t.level<=u){this.clearTimer(),this._nextAutoLevel=-1;return}if(!r||a.paused||!a.playbackRate||!a.readyState)return;const p=s.mainForwardBufferInfo;if(p===null)return;const m=this.bwEstimator.getEstimateTTFB(),g=Math.abs(a.playbackRate);if(f<=Math.max(m,1e3*(d/(g*2))))return;const y=p.len/g,v=l.loading.first?l.loading.first-l.loading.start:-1,b=l.loaded&&v>-1,C=this.getBwEstimate(),_=s.levels,R=_[t.level],E=l.total||Math.max(l.loaded,Math.round(d*R.averageBitrate/8));let F=b?f-v:f;F<1&&b&&(F=Math.min(f,l.loaded*8/C));const O=b?l.loaded*1e3/F:0,A=O?(E-l.loaded)/O:E*8/C+m/1e3;if(A<=y)return;const N=O?O*8:C;let M=Number.POSITIVE_INFINITY,Z;for(Z=t.level-1;Z>u;Z--){const oe=_[Z].maxBitrate;if(M=this.getTimeToLoadFrag(m/1e3,N,d*oe,!_[Z].details),M<y)break}if(M>=A||M>d*10)return;s.nextLoadLevel=s.nextAutoLevel=Z,b?this.bwEstimator.sample(f-Math.min(m,v),l.loaded):this.bwEstimator.sampleTTFB(f);const X=_[Z].maxBitrate;this.getBwEstimate()*this.hls.config.abrBandWidthUpFactor>X&&this.resetEstimator(X),this.clearTimer(),logger.warn(`[abr] Fragment ${t.sn}${n?" part "+n.index:""} of level ${t.level} is loading too slowly;
|
|
93
93
|
Time to underbuffer: ${y.toFixed(3)} s
|
|
94
94
|
Estimated load time for current fragment: ${A.toFixed(3)} s
|