1/*! For license information please see 9.5c8f630c.chunk.js.LICENSE.txt */ 2(this["webpackJsonpchef2.0"]=this["webpackJsonpchef2.0"]||[]).push([[9],{188:function(e,t,n){"use strict";n.d(t,"g",(function(){return a})),n.d(t,"m",(function(){return o})),n.d(t,"k",(function(){return c})),n.d(t,"l",(function(){return l})),n.d(t,"n",(function(){return d})),n.d(t,"i",(function(){return u})),n.d(t,"h",(function(){return h})),n.d(t,"a",(function(){return p})),n.d(t,"o",(function(){return m})),n.d(t,"j",(function(){return g})),n.d(t,"b",(function(){return f})),n.d(t,"c",(function(){return b})),n.d(t,"f",(function(){return y})),n.d(t,"d",(function(){return j})),n.d(t,"e",(function(){return _}));var i=n(14),r=n.n(i),s=n(63);function a(e,t,n){if(!t)return;const i=document.createElement("script");i.setAttribute("async",""),i.setAttribute("id",n),i.src=e,t.appendChild(i)}function o(e,t){return e.replace("${variant}",t||500).replace("${channel}","web")}function c(e,t){return parseInt(e/100*t)}function l(e,t,n){const i=r.a.duration(e,"seconds"),a=i.hours(),o=i.minutes(),c=i.days();return t?n?[{value:c.toString().padStart(2,"0"),label:s.a.t("Giorni")},{value:a.toString().padStart(2,"0"),label:s.a.t("Ore")},{value:i.minutes().toString().padStart(2,"0"),label:s.a.t("Minuti")},{value:i.seconds().toString().padStart(2,"0"),label:s.a.t("Secondi")}]:c.toString().padStart(2,"0")+s.a.t("g")+" : "+a.toString().padStart(2,"0")+s.a.t("h")+" : "+i.minutes().toString().padStart(2,"0")+s.a.t("m")+" : "+i.seconds().toString().padStart(2,"0")+s.a.t("s"):c||a?(24*c+a).toString().padStart(2,"0")+":"+i.minutes().toString().padStart(2,"0")+" "+s.a.t("ore"):o.toString().padStart(2,"0")+" min"}function d(e,t){const n=[];for(let i=0;i<e.length;i+=t){const r=e.slice(i,i+t);n.push(r)}return n}function u(e){for(var t=0,n=parseInt(e,10)||0;n>=1024&&++t;)n/=1024;return n.toFixed(n<10&&t>0?1:0)+["bytes","kb","mb","gb"][t]}function h(e){for(var t="",n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",i=0;i<e;i++)t+=n.charAt(Math.floor(62*Math.random()));return t}function p(e){return{id:"simple-tab-".concat(e),"aria-controls":"simple-tabpanel-".concat(e)}}function m(e){let t=[...e.trainers_list];return(e.trainers_list.length>1?e.trainers_list.reduce(((e,n,i)=>{const r=t.findIndex((e=>e.last_name===n.last_name&&e.first_name!==n.first_name));if(r>-1){const i=n.first_name+" "+s.a.t("e")+" "+t[r].first_name+" "+n.last_name;t=t.filter((e=>e.last_name!==n.last_name)),e.push(i)}else t.find((e=>e.last_name===n.last_name))&&e.push(n.last_name);return e}),[]):[e.trainers_list.length?e.trainers_list[0].first_name+" "+e.trainers_list[0].last_name:""]).join(", ")}function g(e,t){return e.reduce(((e,t)=>(t.items.forEach((t=>{"d"===t.type?"p"!==t.amount_type?(e.total-=t.amount,e.annuaryTotal-=c(e.annuaryTotal,y(e.subtotal,t.amount)+100)):(e.total-=c(e.total,t.amount),e.annuaryTotal-=c(e.annuaryTotal,t.amount)):(e.total+=t.amount,e.subtotal+=t.amount)})),e)),{total:t.amount,subtotal:t.amount,annuaryTotal:t.amount_yearbook})}function f(e,t){for(var n=[],i=0;i<e.length;i+=t)n.push(e.slice(i,i+t));return n}function b(){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";const t=String(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"").split(".").map((e=>Number(e)||0)),n=String(e).split(".").map((e=>Number(e)||0)),i=Math.max(t.length,n.length);for(let r=0;r<i;r++){const e=t[r]||0,i=n[r]||0;if(e>i)return 1;if(e<i)return-1}return 0}function y(e,t){return 0===e?t>0?1/0:t<0?-1/0:0:(t-e)/e*100}function j(e){if(null===e||void 0===e||Number.isNaN(Number(e)))return null;const t=Number(e);return"\u20ac ".concat((t/100).toFixed(2).replace(".",","))}function _(e){return e&&null!==e.value&&void 0!==e.value?e.unit?"".concat(e.value," ").concat(e.unit):"".concat(e.value):"-"}},191:function(e,t,n){"use strict";n.d(t,"a",(function(){return h})),n.d(t,"b",(function(){return m})),n.d(t,"c",(function(){return g}));var i=n(0),r=n.n(i),s=n(5),a=n(79),o=n(645),c=n(717),l=n(722),d=n(1);const u=Object(o.a)(l.a)((e=>{let{theme:t}=e;return{textTransform:"none",fontWeight:"bold ",borderRadius:"14px",padding:"10px 24px","&.Mu
2iButton-textPrimary":{color:"#fff",backgroundColor:"#E90133","&.MuiLoadingButton-loading":{color:"transparent"},"& .MuiLoadingButton-loadingIndicator":{color:"#fff"},"&.Mui-disabled":{backgroundColor:"#bcbcbc",opacity:1,color:"#dedede"}},"&.MuiButton-textSecondary":{backgroundColor:"#F5F5F5",color:"#26292D","&.MuiLoadingButton-loading":{color:"transparent"},"& .MuiLoadingButton-loadingIndicator":{color:"#26292D"}},"&:hover":{textDecoration:"none"},"&.Mui-disabled":{opacity:.7},"&.MuiButton-sizeSmall":{padding:"4px 10px",borderRadius:"10px"}}})),h=r.a.forwardRef((function(e,t){return Object(d.jsx)(u,{...e,ref:t})})),p=Object(o.a)(c.a)((e=>{let{theme:t}=e;return{backgroundColor:"#41474e",fontSize:"2rem",padding:"21px","&:hover":{backgroundColor:"#41474e"},"&.Mui-disabled":{backgroundColor:"#41474e",color:"inherit",opacity:.7},"&.MuiIconButton-sizeSmall":{padding:"7px",fontSize:"1.5rem"}}})),m=r.a.forwardRef((function(e,t){return Object(d.jsx)(p,{...e,ref:t})}));function g(e){const{children:t,socialCallBack:n,provider:i,setLoading:o,...c}=e,{i18n:l}=Object(a.a)(),u=Object(s.i)(),p=(r.a.useRef(null),()=>{if(o(!0),"fb"===i&&window.FB.login((e=>{e.authResponse?n(e.authResponse.accessToken):o(!1)}),{scope:"email,public_profile",return_scopes:!0}),"google"===i){localStorage.setItem("return_url",u.pathname+u.search);const e="https://accounts.google.com/o/oauth2/v2/auth?response_type=id_token&client_id=".concat("883622940720-obgi8vlav7j5slpdn2nabt5ah2g5l0gf.apps.googleusercontent.com","&redirect_uri=").concat("https://www.academia.tv/callback/google").concat(u.state?"&state="+encodeURIComponent(JSON.stringify({to:u.state.from.pathname||u.state.from})):"","&scope=openid%20email%20profile&nonce=").concat(function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:16;const t=new Uint8Array(e);return window.crypto.getRandomValues(t),Array.from(t,(e=>e.toString(16).padStart(2,"0"))).join("")}());window.location.href=e}"apple"===i&&window.AppleID.auth.signIn()});return r.a.useEffect((()=>{if("apple"===i)return window.AppleID.auth.init({clientId:"com.chefincamicia.academia.web",scope:"name email",state:"IT",redirectURI:"https://www.academia.tv/login/apple",usePopup:!0}),document.addEventListener("AppleIDSignInOnSuccess",(e=>{n(e.detail.authorization.id_token)})),document.addEventListener("AppleIDSignInOnFailure",(e=>{o(!1)})),()=>{document.removeEventListener("AppleIDSignInOnSuccess",(e=>{n(e.detail.authorization.id_token)})),document.removeEventListener("AppleIDSignInOnFailure",(e=>{o(!1)}))}}),[]),r.a.useEffect((()=>{if("google"===i&&u.hash){const e=new URLSearchParams(u.hash.substring(1));if(e.has("id_token")){o(!0);const t=e.get("id_token");n(t)}}}),[u.hash]),Object(d.jsx)(h,{onClick:()=>p(),...c,children:t})}},192:function(e,t,n){"use strict";var i=n(0),r=n.n(i),s=n(56),a=n(645),o=n(188),c=n(1);const l=Object(a.a)("img")((e=>{let{theme:t}=e;return{}}));t.a=e=>{const{src:t,useSet:n,...i}=e,a=Object(s.a)(),d=r.a.useRef(),[u,h]=r.a.useState();return r.a.useLayoutEffect((()=>{let e;n&&(e={srcSet:["".concat(Object(o.m)(t,2e3)," 2000w"),"".concat(Object(o.m)(t,1200)," 1200w"),"".concat(Object(o.m)(t,800)," 800w"),"".concat(Object(o.m)(t,600)," 600w"),"".concat(Object(o.m)(t,300)," 300w"),"".concat(Object(o.m)(t,100)," 100w")].join(", "),...!!n.sizes&&{sizes:n.sizes.reduce(((e,t)=>(1===t.length?e.push(t[0]):Array.isArray(t[1])?e.push("".concat(a.breakpoints[t[0]](t[1][0],t[1][1]).replace("@media ","")," ").concat(t[2])):e.push("".concat(a.breakpoints[t[0]](t[1]).replace("@media ","")," ").concat(t[2])),e)),[]).join(", ")}}),h({loading:"lazy",src:Object(o.m)(t,d.current.parentNode.clientWidth),...e})}),[t]),Object(c.jsx)(l,{ref:d,...i,...u})}},193:function(e,t,n){"use strict";(function(e){n.d(t,"a",(function(){return Hr}));var i=n(194),r=n.n(i),s=n(237),a=n.n(s),o=n(292),c=n.n(o),l=n(297),d=n.n(l),u=n(83),h=n.n(u),p=n(301),m=n(324),g=n(306),f=n(307),b=n(197),y=n(323),j=n(314),_=n.n(j),v=n(253),x=n(322),O=n(316),T="8.23.4";const S={},w=function(e,t){return S[e]=S[e]||[],t&&(S[e]=S[e].concat(t)),S[e]},A=function(e,t){const n=w(e).indexOf(t);return!(n<=-1)&&(S[e]=S[e].slice(),S[e].splice(n,1),!0)},k={prefixed:!0},C=[["requestFullscreen","exitFullscreen","fullscreenElement","fullscreenEnabled","fullscreenchange","fullscreenerror","fullscreen"],["webkitRequestFullscreen","webkitExitFullscreen","webkitFullscreenElement","webkitFullscreenEnabled","webkitfullscreenchange","webkitfullscreenerror","-webkit-full-screen"]],E=C[0];let I;for(let t=0;t<C.length;t++)if(C[t][1]in a.a){I=C[t];break}if(I){for(let e=0;e<I.length;e++)k[E[e]]=I[e];k.prefixed=I[0]!==E[0]}let D=[];const P=function e(t){let n,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:":",s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",a="info";function o(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];n("log",a,t)}return n=((e,t,n)=>(i,s,a)=>{const o=t.levels[s],c=new RegExp("^(".concat(o,")$"));let l=e;if("log"!==i&&a.unshift(i.toUpperCase()+":"),n&&(l="%c".concat(e),a.unshift(n)),a.unshift(l+":"),D){D.push([].concat(a));const e=D.length-1e3;D.splice(0,e>0?e:0)}if(!r.a.console)return;let d=r.a.console[i];
2d||"debug"!==i||(d=r.a.console.info||r.a.console.log),d&&o&&c.test(i)&&d[Array.isArray(a)?"apply":"call"](r.a.console,a)})(t,o,s),o.createLogger=(n,r,a)=>{const o=void 0!==r?r:i,c=void 0!==a?a:s;return e("".concat(t," ").concat(o," ").concat(n),o,c)},o.createNewLogger=(t,n,i)=>e(t,n,i),o.levels={all:"debug|log|warn|error",off:"",debug:"debug|log|warn|error",info:"log|warn|error",warn:"warn|error",error:"error",DEFAULT:a},o.level=e=>{if("string"===typeof e){if(!o.levels.hasOwnProperty(e))throw new Error('"'.concat(e,'" in not a valid log level'));a=e}return a},o.history=()=>D?[].concat(D):[],o.history.filter=e=>(D||[]).filter((t=>new RegExp(".*".concat(e,".*")).test(t[0]))),o.history.clear=()=>{D&&(D.length=0)},o.history.disable=()=>{null!==D&&(D.length=0,D=null)},o.history.enable=()=>{null===D&&(D=[])},o.error=function(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];return n("error",a,t)},o.warn=function(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];return n("warn",a,t)},o.debug=function(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];return n("debug",a,t)},o}("VIDEOJS"),R=P.createLogger,L=Object.prototype.toString,M=function(e){return U(e)?Object.keys(e):[]};function N(e,t){M(e).forEach((n=>t(e[n],n)))}function B(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;return M(e).reduce(((n,i)=>t(n,e[i],i)),n)}function U(e){return!!e&&"object"===typeof e}function F(e){return U(e)&&"[object Object]"===L.call(e)&&e.constructor===Object}function z(){const e={};for(var t=arguments.length,n=new Array(t),i=0;i<t;i++)n[i]=arguments[i];return n.forEach((t=>{t&&N(t,((t,n)=>{F(t)?(F(e[n])||(e[n]={}),e[n]=z(e[n],t)):e[n]=t}))})),e}function q(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=[];for(const n in e)if(e.hasOwnProperty(n)){const i=e[n];t.push(i)}return t}function H(e,t,n){let i=!(arguments.length>3&&void 0!==arguments[3])||arguments[3];const r=n=>Object.defineProperty(e,t,{value:n,enumerable:!0,writable:!0}),s={configurable:!0,enumerable:!0,get(){const e=n();return r(e),e}};return i&&(s.set=r),Object.defineProperty(e,t,s)}var V=Object.freeze({__proto__:null,each:N,reduce:B,isObject:U,isPlain:F,merge:z,values:q,defineLazyProperty:H});let W,G=!1,X=null,Y=!1,K=!1,Q=!1,Z=!1,J=!1,$=null,ee=null;const te=Boolean(r.a.cast&&r.a.cast.framework&&r.a.cast.framework.CastReceiverContext);let ne=null,ie=!1,re=!1,se=!1,ae=!1,oe=!1,ce=!1,le=!1;const de=Boolean(fe()&&("ontouchstart"in r.a||r.a.navigator.maxTouchPoints||r.a.DocumentTouch&&r.a.document instanceof r.a.DocumentTouch)),ue=r.a.navigator&&r.a.navigator.userAgentData;if(ue&&ue.platform&&ue.brands&&(Y="Android"===ue.platform,Q=Boolean(ue.brands.find((e=>"Microsoft Edge"===e.brand))),Z=Boolean(ue.brands.find((e=>"Chromium"===e.brand))),J=!Q&&Z,$=ee=(ue.brands.find((e=>"Chromium"===e.brand))||{}).version||null,re="Windows"===ue.platform),!Z){const e=r.a.navigator&&r.a.navigator.userAgent||"";G=/iPod/i.test(e),X=function(){const t=e.match(/OS (\d+)_/i);return t&&t[1]?t[1]:null}(),Y=/Android/i.test(e),W=function(){const t=e.match(/Android (\d+)(?:\.(\d+))?(?:\.(\d+))*/i);if(!t)return null;const n=t[1]&&parseFloat(t[1]),i=t[2]&&parseFloat(t[2]);return n&&i?parseFloat(t[1]+"."+t[2]):n||null}(),K=/Firefox/i.test(e),Q=/Edg/i.test(e),Z=/Chrome/i.test(e)||/CriOS/i.test(e),J=!Q&&Z,$=ee=function(){const t=e.match(/(Chrome|CriOS)\/(\d+)/);return t&&t[2]?parseFloat(t[2]):null}(),ne=function(){const t=/MSIE\s(\d+)\.\d/.exec(e);let n=t&&parseFloat(t[1]);return!n&&/Trident\/7.0/i.test(e)&&/rv:11.0/.test(e)&&(n=11),n}(),oe=/Tizen/i.test(e),ce=/Web0S/i.test(e),le=oe||ce,ie=/Safari/i.test(e)&&!J&&!Y&&!Q&&!le,re=/Windows/i.test(e),se=/iPad/i.test(e)||ie&&de&&!/iPhone/i.test(e),ae=/iPhone/i.test(e)&&!se}const he=ae||se||G,pe=(ie||he)&&!J;var me=Object.freeze({__proto__:null,get IS_IPOD(){return G},get IOS_VERSION(){return X},get IS_ANDROID(){return Y},get ANDROID_VERSION(){return W},get IS_FIREFOX(){return K},get IS_EDGE(){return Q},get IS_CHROMIUM(){return Z},get IS_CHROME(){return J},get CHROMIUM_VERSION(){return $},get CHROME_VERSION(){return ee},IS_CHROMECAST_RECEIVER:te,get IE_VERSION(){return ne},get IS_SAFARI(){return ie},get IS_WINDOWS(){return re},get IS_IPAD(){return se},get IS_IPHONE(){return ae},get IS_TIZEN(){return oe},get IS_WEBOS(){return ce},get IS_SMART_TV(){return le},TOUCH_ENABLED:de,IS_IOS:he,IS_ANY_SAFARI:pe});function ge(e){return"string"===typeof e&&Boolean(e.trim())}function fe(){return a.a===r.a.document}function be(e){return U(e)&&1===e.nodeType}function ye(){try{return r.a.parent!==r.a.self}catch(e){return!0}}function je(e){return function(t,n){if(!ge(t))return a.a[e](null);ge(n)&&(n=a.a.querySelector(n));const i=be(n)?n:a.a;return i[e]&&i[e](t)}}function _e(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"div",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=arguments.length>3?arguments[3]:void 0;const r=a.a.createElement(e);return Object.getOwnPropertyNames(t).forEach((function(e){const n=t[e];"textContent"===e?ve(r,n):r[e]===n&&"tabIndex"!==e||(r[e]=n)}
2)),Object.getOwnPropertyNames(n).forEach((function(e){r.setAttribute(e,n[e])})),i&&Fe(r,i),r}function ve(e,t){return"undefined"===typeof e.textContent?e.innerText=t:e.textContent=t,e}function xe(e,t){t.firstChild?t.insertBefore(e,t.firstChild):t.appendChild(e)}function Oe(e,t){return function(e){if(e.indexOf(" ")>=0)throw new Error("class has illegal whitespace characters")}(t),e.classList.contains(t)}function Te(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),i=1;i<t;i++)n[i-1]=arguments[i];return e.classList.add(...n.reduce(((e,t)=>e.concat(t.split(/\s+/))),[])),e}function Se(e){if(!e)return P.warn("removeClass was called with an element that doesn't exist"),null;for(var t=arguments.length,n=new Array(t>1?t-1:0),i=1;i<t;i++)n[i-1]=arguments[i];return e.classList.remove(...n.reduce(((e,t)=>e.concat(t.split(/\s+/))),[])),e}function we(e,t,n){return"function"===typeof n&&(n=n(e,t)),"boolean"!==typeof n&&(n=void 0),t.split(/\s+/).forEach((t=>e.classList.toggle(t,n))),e}function Ae(e,t){Object.getOwnPropertyNames(t).forEach((function(n){const i=t[n];null===i||"undefined"===typeof i||!1===i?e.removeAttribute(n):e.setAttribute(n,!0===i?"":i)}))}function ke(e){const t={},n=["autoplay","controls","playsinline","loop","muted","default","defaultMuted"];if(e&&e.attributes&&e.attributes.length>0){const i=e.attributes;for(let e=i.length-1;e>=0;e--){const r=i[e].name;let s=i[e].value;n.includes(r)&&(s=null!==s),t[r]=s}}return t}function Ce(e,t){return e.getAttribute(t)}function Ee(e,t,n){e.setAttribute(t,n)}function Ie(e,t){e.removeAttribute(t)}function De(){a.a.body.focus(),a.a.onselectstart=function(){return!1}}function Pe(){a.a.onselectstart=function(){return!0}}function Re(e){if(e&&e.getBoundingClientRect&&e.parentNode){const t=e.getBoundingClientRect(),n={};return["bottom","height","left","right","top","width"].forEach((e=>{void 0!==t[e]&&(n[e]=t[e])})),n.height||(n.height=parseFloat(We(e,"height"))),n.width||(n.width=parseFloat(We(e,"width"))),n}}function Le(e){if(!e||e&&!e.offsetParent)return{left:0,top:0,width:0,height:0};const t=e.offsetWidth,n=e.offsetHeight;let i=0,r=0;for(;e.offsetParent&&e!==a.a[k.fullscreenElement];)i+=e.offsetLeft,r+=e.offsetTop,e=e.offsetParent;return{left:i,top:r,width:t,height:n}}function Me(e,t){const n={x:0,y:0};if(he){let t=e;for(;t&&"html"!==t.nodeName.toLowerCase();){const e=We(t,"transform");
2if(/^matrix/.test(e)){const t=e.slice(7,-1).split(/,\s/).map(Number);n.x+=t[4],n.y+=t[5]}else if(/^matrix3d/.test(e)){const t=e.slice(9,-1).split(/,\s/).map(Number);n.x+=t[12],n.y+=t[13]}if(t.assignedSlot&&t.assignedSlot.parentElement&&r.a.WebKitCSSMatrix){const e=r.a.getComputedStyle(t.assignedSlot.parentElement).transform,i=new r.a.WebKitCSSMatrix(e);n.x+=i.m41,n.y+=i.m42}t=t.parentNode||t.host}}const i={},s=Le(t.target),a=Le(e),o=a.width,c=a.height;let l=t.offsetY-(a.top-s.top),d=t.offsetX-(a.left-s.left);return t.changedTouches&&(d=t.changedTouches[0].pageX-a.left,l=t.changedTouches[0].pageY+a.top,he&&(d-=n.x,l-=n.y)),i.y=1-Math.max(0,Math.min(1,l/c)),i.x=Math.max(0,Math.min(1,d/o)),i}function Ne(e){return U(e)&&3===e.nodeType}function Be(e){for(;e.firstChild;)e.removeChild(e.firstChild);return e}function Ue(e){return"function"===typeof e&&(e=e()),(Array.isArray(e)?e:[e]).map((e=>("function"===typeof e&&(e=e()),be(e)||Ne(e)?e:"string"===typeof e&&/\S/.test(e)?a.a.createTextNode(e):void 0))).filter((e=>e))}function Fe(e,t){return Ue(t).forEach((t=>e.appendChild(t))),e}function ze(e,t){return Fe(Be(e),t)}function qe(e){return void 0===e.button&&void 0===e.buttons||(0===e.button&&void 0===e.buttons||("mouseup"===e.type&&0===e.button&&0===e.buttons||("mousedown"===e.type&&0===e.button&&0===e.buttons||0===e.button&&1===e.buttons)))}const He=je("querySelector"),Ve=je("querySelectorAll");function We(e,t){if(!e||!t)return"";if("function"===typeof r.a.getComputedStyle){let i;try{i=r.a.getComputedStyle(e)}catch(n){return""}return i?i.getPropertyValue(t)||i[t]:""}return""}function Ge(e){[...a.a.styleSheets].forEach((t=>{try{const n=[...t.cssRules].map((e=>e.cssText)).join(""),i=a.a.createElement("style");i.textContent=n,e.document.head.appendChild(i)}catch(n){const i=a.a.createElement("link");i.rel="stylesheet",i.type=t.type,i.media=t.media.mediaText,i.href=t.href,e.document.head.appendChild(i)}}))}var Xe=Object.freeze({__proto__:null,isReal:fe,isEl:be,isInFrame:ye,createEl:_e,textContent:ve,prependTo:xe,hasClass:Oe,addClass:Te,removeClass:Se,toggleClass:we,setAttributes:Ae,getAttributes:ke,getAttribute:Ce,setAttribute:Ee,removeAttribute:Ie,blockTextSelection:De,unblockTextSelection:Pe,getBoundingClientRect:Re,findPosition:Le,getPointerPosition:Me,isTextNode:Ne,emptyEl:Be,normalizeContent:Ue,appendContent:Fe,insertContent:ze,isSingleLeftClick:qe,$:He,$$:Ve,computedStyle:We,copyStyleSheetsToWindow:Ge});let Ye,Ke=!1;const Qe=function(){if(!1===Ye.options.autoSetup)return;const e=Array.prototype.slice.call(a.a.getElementsByTagName("video")),t=Array.prototype.slice.call(a.a.getElementsByTagName("audio")),n=Array.prototype.slice.call(a.a.getElementsByTagName("video-js")),i=e.concat(t,n);if(i&&i.length>0)for(let r=0,s=i.length;r<s;r++){const e=i[r];if(!e||!e.getAttribute){Ze(1);break}if(void 0===e.player){null!==e.getAttribute("data-setup")&&Ye(e)}}else Ke||Ze(1)};function Ze(e,t){fe()&&(t&&(Ye=t),r.a.setTimeout(Qe,e))}function Je(){Ke=!0,r.a.removeEventListener("load",Je)}fe()&&("complete"===a.a.readyState?Je():r.a.addEventListener("load",Je));const $e=function(e){const t=a.a.createElement("style");return t.className=e,t},et=function(e,t){e.styleSheet?e.styleSheet.cssText=t:e.textContent=t};var tt=new WeakMap;let nt,it=3;function rt(){return it++}function st(e,t){if(!tt.has(e))return;const n=tt.get(e);0===n.handlers[t].length&&(delete n.handlers[t],e.removeEventListener?e.removeEventListener(t,n.dispatcher,!1):e.detachEvent&&e.detachEvent("on"+t,n.dispatcher)),Object.getOwnPropertyNames(n.handlers).length<=0&&(delete n.handlers,delete n.dispatcher,delete n.disabled),0===Object.getOwnPropertyNames(n).length&&tt.delete(e)}function at(e,t,n,i){n.forEach((function(n){e(t,n,i)}))}function ot(e){if(e.fixed_)return e;function t(){return!0}function n(){return!1}if(!e||!e.isPropagationStopped||!e.isImmediatePropagationStopped){const i=e||r.a.event;e={};const s=["layerX","layerY","keyLocation","path","webkitMovementX","webkitMovementY","mozPressure","mozInputSource"];for(const t in i)s.includes(t)||"returnValue"===t&&i.preventDefault||(e[t]=i[t]);if(e.target||(e.target=e.srcElement||a.a),e.relatedTarget||(e.relatedTarget=e.fromElement===e.target?e.toElement:e.fromElement),e.preventDefault=function(){i.preventDefault&&i.preventDefault(),e.returnValue=!1,i.returnValue=!1,e.defaultPrevented=!0},e.defaultPrevented=!1,e.stopPropagation=function(){i.stopPropagation&&i.stopPropagation(),e.cancelBubble=!0,i.cancelBubble=!0,e.isPropagationStopped=t},e.isPropagationStopped=n,e.stopImmediatePropagation=function(){i.stopImmediatePropagation&&i.stopImmediatePropagation(),e.isImmediatePropagationStopped=t,e.stopPropagation()},e.isImmediatePropagationStopped=n,null!==e.clientX&&void 0!==e.clientX){const t=a.a.documentElement,n=a.a.body;e.pageX=e.clientX+(t&&t.scrollLeft||n&&n.scrollLeft||0)-(t&&t.clientLeft||n&&n.clientLeft||0),e.pageY=e.clientY+(t&&t.scrollTop||n&&n.scrollTop||0)-(t&&t.clientTop||n&&n.clientTop||0)}e.which=e.charCode||e.keyCode,null!==e.button&&void 0!==e.button&&(e.button=1&e.button?0:4&e.button?1:2&e.button?2:0)}return e.fixed_=!0,e}const ct=function(){if("boolean"!==typeof nt){nt=!1;try{const e=Object.defineProperty({},"passive",{get(){nt=!0}});r.a.addEventListener("test",null,e),r.a.removeEventListener("test",null,e)}catch(e){}}return nt},lt=["touchstart","touchmove"];function dt(e,t,n){if(Array.isArray(t))return at(dt,e,t,n);tt.has(e)||tt.set(e,{});const i=tt.get(e);if(i.handlers||(i.handlers={}),i.handlers[t]||(i.handlers[t]=[]),n.guid||(n.guid=rt()),i.handlers[t].push(n),i.dispatcher||(i.disabled=!1,i.dispatcher=function(t,n){if(i.disabled)return;t=ot(t);const r=i.handlers[t.type];if(r){const i=r.slice(0);for(let r=0,a=i.length;r<a&&!t.isImmediatePropagationStopped();r++)try{i[r].call(e,t,n)}catch(s){P.error(s)}}}),1===i.handlers[t].length)if(e.addEventListener){let n=!1;ct()&<.indexOf(t)>-1&&(n={passive:!0}),e.addEventListener(t,i.dispatcher,n)}else e.attachEvent&&e.attachEvent("on"+t,i.dispatcher)}function ut(e,t,n){if(!tt.has(e))return;const i=tt.get(e);if(!i.handlers)return;if(Array.isArray(t))return at(ut,e,t,n);const r=function(e,t){i.handlers[t]=[],st(e,t)};if(void 0===t){for(const t in i.handlers)Object.prototype.hasOwnProperty.call(i.handlers||{},t)&&r(e,t);return}const s=i.handlers[t];if(s)if(n){if(n.guid)for(let e=0;e<s.length;e++)s[e].guid===n.guid&&s.splice(e--,1);st(e,t)}else r(e,t)}function ht(e,t,n){const i=tt.has(e)?tt.get(e):{},r=e.parentNode||e.ownerDocument;if("string"===typeof t?t={type:t,target:e}:t.target||(t.target=e),t=ot(t),i.dispatcher&&i.dispatcher.call(e,t,n),r&&!t.isPropagationStopped()&&!0===t.bubbles)ht.call(null,r,t,n);else if(!r&&!t.defaultPrevented&&t.target&&t.target[t.type]){tt.has(t.target)||tt.set(t.target,{});const e=tt.get(t.target);t.target[t.type]&&(e.disabled=!0,"function"===typeof t.target[t.type]&&t.target[t.type](),e.disabled=!1)}return!t.defaultPrevented}function pt(e,t,n){if(Array.isArray(t))return at(pt,e,t,n);const i=function(){ut(e,t,i),n.apply(this,arguments)};i.guid=n.guid=n.guid||rt(),dt(e,t,i)}function mt(e,t,n){const i=function(){ut(e,t,i),n.apply(this,arguments)};i.guid=n.guid=n.guid||rt(),dt(e,t,i)}var gt=Object.freeze({__proto__:null,fixEvent:ot,on:dt,off:ut,trigger:ht,one:pt,any:mt});
2const ft=30,bt=function(e,t,n){t.guid||(t.guid=rt());const i=t.bind(e);return i.guid=n?n+"_"+t.guid:t.guid,i},yt=function(e,t){let n=r.a.performance.now();return function(){const i=r.a.performance.now();i-n>=t&&(e(...arguments),n=i)}},jt=function(e,t,n){let i,s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:r.a;const a=function(){const r=this,a=arguments;let o=function(){i=null,o=null,n||e.apply(r,a)};!i&&n&&e.apply(r,a),s.clearTimeout(i),i=s.setTimeout(o,t)};return a.cancel=()=>{s.clearTimeout(i),i=null},a};var _t=Object.freeze({__proto__:null,UPDATE_REFRESH_INTERVAL:ft,bind_:bt,throttle:yt,debounce:jt});let vt;class xt{on(e,t){const n=this.addEventListener;this.addEventListener=()=>{},dt(this,e,t),this.addEventListener=n}off(e,t){ut(this,e,t)}one(e,t){const n=this.addEventListener;this.addEventListener=()=>{},pt(this,e,t),this.addEventListener=n}any(e,t){const n=this.addEventListener;this.addEventListener=()=>{},mt(this,e,t),this.addEventListener=n}trigger(e){const t=e.type||e;"string"===typeof e&&(e={type:t}),e=ot(e),this.allowedEvents_[t]&&this["on"+t]&&this["on"+t](e),ht(this,e)}queueTrigger(e){vt||(vt=new Map);const t=e.type||e;let n=vt.get(this);n||(n=new Map,vt.set(this,n));const i=n.get(t);n.delete(t),r.a.clearTimeout(i);const s=r.a.setTimeout((()=>{n.delete(t),0===n.size&&(n=null,vt.delete(this)),this.trigger(e)}),0);n.set(t,s)}}xt.prototype.allowedEvents_={},xt.prototype.addEventListener=xt.prototype.on,xt.prototype.removeEventListener=xt.prototype.off,xt.prototype.dispatchEvent=xt.prototype.trigger;const Ot=e=>"function"===typeof e.name?e.name():"string"===typeof e.name?e.name:e.name_?e.name_:e.constructor&&e.constructor.name?e.constructor.name:typeof e,Tt=e=>e instanceof xt||!!e.eventBusEl_&&["on","one","off","trigger"].every((t=>"function"===typeof e[t])),St=e=>"string"===typeof e&&/\S/.test(e)||Array.isArray(e)&&!!e.length,wt=(e,t,n
2)=>{if(!e||!e.nodeName&&!Tt(e))throw new Error("Invalid target for ".concat(Ot(t),"#").concat(n,"; must be a DOM node or evented object."))},At=(e,t,n)=>{if(!St(e))throw new Error("Invalid event type for ".concat(Ot(t),"#").concat(n,"; must be a non-empty string or array."))},kt=(e,t,n)=>{if("function"!==typeof e)throw new Error("Invalid listener for ".concat(Ot(t),"#").concat(n,"; must be a function."))},Ct=(e,t,n)=>{const i=t.length<3||t[0]===e||t[0]===e.eventBusEl_;let r,s,a;return i?(r=e.eventBusEl_,t.length>=3&&t.shift(),[s,a]=t):(r=t[0],s=t[1],a=t[2]),wt(r,e,n),At(s,e,n),kt(a,e,n),a=bt(e,a),{isTargetingSelf:i,target:r,type:s,listener:a}},Et=(e,t,n,i)=>{wt(e,e,t),e.nodeName?gt[t](e,n,i):e[t](n,i)},It={on(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];const{isTargetingSelf:i,target:r,type:s,listener:a}=Ct(this,t,"on");if(Et(r,"on",s,a),!i){const e=()=>this.off(r,s,a);e.guid=a.guid;const t=()=>this.off("dispose",e);t.guid=a.guid,Et(this,"on","dispose",e),Et(r,"on","dispose",t)}},one(){for(var e=this,t=arguments.length,n=new Array(t),i=0;i<t;i++)n[i]=arguments[i];const{isTargetingSelf:r,target:s,type:a,listener:o}=Ct(this,n,"one");if(r)Et(s,"one",a,o);else{const t=function(){e.off(s,a,t);for(var n=arguments.length,i=new Array(n),r=0;r<n;r++)i[r]=arguments[r];o.apply(null,i)};t.guid=o.guid,Et(s,"one",a,t)}},any(){for(var e=this,t=arguments.length,n=new Array(t),i=0;i<t;i++)n[i]=arguments[i];const{isTargetingSelf:r,target:s,type:a,listener:o}=Ct(this,n,"any");if(r)Et(s,"any",a,o);else{const t=function(){e.off(s,a,t);for(var n=arguments.length,i=new Array(n),r=0;r<n;r++)i[r]=arguments[r];o.apply(null,i)};t.guid=o.guid,Et(s,"any",a,t)}},off(e,t,n){if(!e||St(e))ut(this.eventBusEl_,e,t);else{const i=e,r=t;wt(i,this,"off"),At(r,this,"off"),kt(n,this,"off"),n=bt(this,n),this.off("dispose",n),i.nodeName?(ut(i,r,n),ut(i,"dispose",n)):Tt(i)&&(i.off(r,n),i.off("dispose",n))}},trigger(e,t){wt(this.eventBusEl_,this,"trigger");const n=e&&"string"!==typeof e?e.type:e;if(!St(n))throw new Error("Invalid event type for ".concat(Ot(this),"#trigger; ")+"must be a non-empty string or object with a type key that has a non-empty value.");return ht(this.eventBusEl_,e,t)}};function Dt(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const{eventBusKey:n}=t;if(n){if(!e[n].nodeName)throw new Error('The eventBusKey "'.concat(n,'" does not refer to an element.'));e.eventBusEl_=e[n]}else e.eventBusEl_=_e("span",{className:"vjs-event-bus"});return Object.assign(e,It),e.eventedCallbacks&&e.eventedCallbacks.forEach((e=>{e()})),e.on("dispose",(()=>{e.off(),[e,e.el_,e.eventBusEl_].forEach((function(e){e&&tt.has(e)&&tt.delete(e)})),r.a.setTimeout((()=>{e.eventBusEl_=null}),0)})),e}const Pt={state:{},setState(e){let t;return"function"===typeof e&&(e=e()),N(e,((e,n)=>{this.state[n]!==e&&(t=t||{},t[n]={from:this.state[n],to:e}),this.state[n]=e})),t&&Tt(this)&&this.trigger({changes:t,type:"statechanged"}),t}};function Rt(e,t){return Object.assign(e,Pt),e.state=Object.assign({},e.state,t),"function"===typeof e.handleStateChanged&&Tt(e)&&e.on("statechanged",e.handleStateChanged),e}const Lt=function(e){return"string"!==typeof e?e:e.replace(/./,(e=>e.toLowerCase()))},Mt=function(e){return"string"!==typeof e?e:e.replace(/./,(e=>e.toUpperCase()))},Nt=function(e,t){return Mt(e)===Mt(t)};var Bt=Object.freeze({__proto__:null,toLowerCase:Lt,toTitleCase:Mt,titleCaseEquals:Nt});class Ut{constructor(e,t,n){if(!e&&this.play?this.player_=e=this:this.player_=e,this.isDisposed_=!1,this.parentComponent_=null,this.options_=z({},this.options_),t=this.options_=z(this.options_,t),this.id_=t.id||t.el&&t.el.id,!this.id_){const t=e&&e.id&&e.id()||"no_player";this.id_="".concat(t,"_component_").concat(rt())}this.name_=t.name||null,t.el?this.el_=t.el:!1!==t.createEl&&(this.el_=this.createEl()),t.className&&this.el_&&t.className.split(" ").forEach((e=>this.addClass(e))),["on","off","one","any","trigger"].forEach((e=>{this[e]=void 0})),!1!==t.evented&&(Dt(this,{eventBusKey:this.el_?"el_":null}),this.handleLanguagechange=this.handleLanguagechange.bind(this),this.on(this.player_,"languagechange",this.handleLanguagechange)),Rt(this,this.constructor.defaultState),this.children_=[],this.childIndex_={},this.childNameIndex_={},this.setTimeoutIds_=new Set,this.setIntervalIds_=new Set,this.rafIds_=new Set,this.namedRafs_=new Map,this.clearingTimersOnDispose_=!1,!1!==t.initChildren&&this.initChildren(),this.ready(n),!1!==t.reportTouchActivity&&this.enableTouchActivity()}dispose(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!this.isDisposed_){if(this.readyQueue_&&(this.readyQueue_.length=0),this.trigger({type:"dispose",bubbles:!1}),this.isDisposed_=!0,this.children_)for(let e=this.children_.length-1;e>=0;e--)this.children_[e].dispose&&this.children_[e].dispose();this.children_=null,this.childIndex_=null,this.childNameIndex_=null,this.parentComponent_=null,this.el_&&(this.el_.parentNode&&(e.restoreEl?this.el_.parentNode.replaceChild(e.restoreEl,this.el_):this.el_.parentNode.removeChild(this.el_)),this.el_=null),this.player_=null}}isDisposed(){return Boolean(this.isDisposed_)}player(){return this.player_}options(e){return e?(this.options_=z(this.options_,e),this.options_):this.options_}el(){return this.el_}createEl(e,t,n){return _e(e,t,n)}localize(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:e;const i=this.player_.language&&this.player_.language(),r=this.player_.languages&&this.player_.languages(),s=r&&r[
2i],a=i&&i.split("-")[0],o=r&&r[a];let c=n;return s&&s[e]?c=s[e]:o&&o[e]&&(c=o[e]),t&&(c=c.replace(/\{(\d+)\}/g,(function(e,n){const i=t[n-1];let r=i;return"undefined"===typeof i&&(r=e),r}))),c}handleLanguagechange(){}contentEl(){return this.contentEl_||this.el_}id(){return this.id_}name(){return this.name_}children(){return this.children_}getChildById(e){return this.childIndex_[e]}getChild(e){if(e)return this.childNameIndex_[e]}getDescendant(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];t=t.reduce(((e,t)=>e.concat(t)),[]);let i=this;for(let r=0;r<t.length;r++)if(i=i.getChild(t[r]),!i||!i.getChild)return;return i}setIcon(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.el();if(!this.player_.options_.experimentalSvgIcons)return;const n="http://www.w3.org/2000/svg",i=_e("span",{className:"vjs-icon-placeholder vjs-svg-icon"},{"aria-hidden":"true"}),r=a.a.createElementNS(n,"svg");r.setAttributeNS(null,"viewBox","0 0 512 512");const s=a.a.createElementNS(n,"use");return r.appendChild(s),s.setAttributeNS(null,"href","#vjs-icon-".concat(e)),i.appendChild(r),this.iconIsSet_?t.replaceChild(i,t.querySelector(".vjs-icon-placeholder")):t.appendChild(i),this.iconIsSet_=!0,i}addChild(e){let t,n,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.children_.length;if("string"===typeof e){n=Mt(e);const r=i.componentClass||n;i.name=n;const s=Ut.getComponent(r);if(!s)throw new Error("Component ".concat(r," does not exist"));if("function"!==typeof s)return null;t=new s(this.player_||this,i)}else t=e;if(t.parentComponent_&&t.parentComponent_.removeChild(t),this.children_.splice(r,0,t),t.parentComponent_=this,"function"===typeof t.id&&(this.childIndex_[t.id()]=t),n=n||t.name&&Mt(t.name()),n&&(this.childNameIndex_[n]=t,this.childNameIndex_[Lt(n)]=t),"function"===typeof t.el&&t.el()){let e=null;this.children_[r+1]&&(this.children_[r+1].el_?e=this.children_[r+1].el_:be(this.children_[r+1])&&(e=this.children_[r+1])),this.contentEl().insertBefore(t.el(),e)}return t}removeChild(e){if("string"===typeof e&&(e=this.getChild(e)),!e||!this.children_)return;let t=!1;for(let i=this.children_.length-1;i>=0;i--)if(this.children_[i]===e){t=!0,this.children_.splice(i,1);break}if(!t)return;e.parentComponent_=null,this.childIndex_[e.id()]=null,this.childNameIndex_[Mt(e.name())]=null,this.childNameIndex_[Lt(e.name())]=null;const n=e.el();n&&n.parentNode===this.contentEl()&&this.contentEl().removeChild(e.el())}initChildren(){const e=this.options_.children;if(e){const t=this.options_,n=e=>{const n=e.name;let i=e.opts;if(void 0!==t[n]&&(i=t[n]),!1===i)return;!0===i&&(i={}),i.playerOptions=this.options_.playerOptions;const r=this.addChild(n,i);r&&(this[n]=r)};let i;const r=Ut.getComponent("Tech");i=Array.isArray(e)?e:Object.keys(e),i.concat(Object.keys(this.options_).filter((function(e){return!i.some((function(t){return"string"===typeof t?e===t:e===t.name}))}))).map((t=>{let n,i;return"string"===typeof t?(n=t,i=e[n]||this.options_[n]||{}):(n=t.name,i=t),{name:n,opts:i}})).filter((e=>{const t=Ut.getComponent(e.opts.componentClass||Mt(e.name));return t&&!r.isTech(t)})).forEach(n)}}buildCSSClass(){return""}ready(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(e)return this.isReady_?void(t?e.call(this):this.setTimeout(e,1)):(this.readyQueue_=this.readyQueue_||[],void this.readyQueue_.push(e))}triggerReady(){this.isReady_=!0,this.setTimeout((function(){const e=this.readyQueue_;this.readyQueue_=[],e&&e.length>0&&e.forEach((function(e){e.call(this)}),this),this.trigger("ready")}),1)}$(e,t){return He(e,t||this.contentEl())}$$(e,t){return Ve(e,t||this.contentEl())}hasClass(e){return Oe(this.el_,e)}addClass(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];Te(this.el_,...t)}removeClass(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];Se(this.el_,...t)}toggleClass(e,t){we(this.el_,e,t)}show(){this.removeClass("vjs-hidden")}hide(){this.addClass("vjs-hidden")}lockShowing(){this.addClass("vjs-lock-showing")}unlockShowing(){this.removeClass("vjs-lock-showing")}getAttribute(e){return Ce(this.el_,e)}setAttribute(e,t){Ee(this.el_,e,t)}removeAttribute(e){Ie(this.el_,e)}width(e,t){return this.dimension("width",e,t)}height(e,t){return this.dimension("height",e,t)}dimensions(e,t){this.width(e,!0),this.height(t)}dimension(e,t,n){if(void 0!==t)return null!==t&&t===t||(t=0),-1!==(""+t).indexOf("%")||-1!==(""+t).indexOf("px")?this.el_.style[e]=t:this.el_.style[e]="auto"===t?"":t+"px",void(n||this.trigger("componentresize"));if(!this.el_)return 0;const i=this.el_.style[e],r=i.indexOf("px");return-1!==r?parseInt(i.slice(0,r),10):parseInt(this.el_["offset"+Mt(e)],10)}currentDimension(e){let t=0;if("width"!==e&&"height"!==e)throw new Error("currentDimension only accepts width or height value");if(t=We(this.el_,e),t=parseFloat(t),0===t||isNaN(t)){const n="offset".concat(Mt(e));t=this.el_[n]}return t}currentDimensions(){return{width:this.currentDimension("width"),height:this.currentDimension("height")}}currentWidth(){return this.currentDimension("width")}currentHeight(){return this.currentDimension("height")}getPositions(){const e=this.el_.getBoundingClientRect();return{boundingClientRect:{x:e.x,y:e.y,width:e.width,height:e.height,top:e.top,right:e.right,bottom:e.bottom,left:e.left},center:{x:e.left+e.width/2,y:e.top+e.height/2,width:0,height:0,top:e.top+e.height/2,right:e.left+e.width/2,bottom:e.top+e.height/2,left:e.left+e.width/2}}}focus(){this.el_.focus()}blur(){this.el_.blur()}handleKeyDown(e){this.player_&&("Tab"===e.key||this.player_.options_.playerOptions.spatialNavigation&&this.player_.options_.playerOptions.spatialNavigation.enabled||e.stopPropagation(),this.player_.handleKeyDown(e))}handleKeyPress(e){this.handleKeyDown(e)}emitTapEvents(){let e=0,t=null;let n;this.on("touchstart",(function(i){1===i.touches.length&&(t={pageX:i.touches[0].pageX,pageY:i.touches[0].pageY},e=r.a.performance.now(),n=!0)})),this.on("touchmove",(function(e){if(e.touches.length>1)n=!1;else if(t){const i=e.touches[0].pageX-t.pageX,r=e.touches[0].pageY-t.pageY;Math.sqrt(i*i+r*r)>10&&(n=!1)}}));const i=function(){n=!1};this.on("touchleave",i),this.on("touchcancel",i),this.on("touchend",(function(i){if(t=null,!0===n){r.a.performance.now()-e<200&&(i.preventDefault(),this.trigger("tap"))}}))}enableTouchActivity(){if(!this.player()||!this.player().reportUserActivity)return;const e=bt(this.player(),this.player().reportUserActivity);let t;this.on("touchstart",(function(){e(),this.clearInterval(t),t=this.setInterval(e,250)}));const n=function(n){e(),this.clearInterval(t)};this.on("touchmove",e),this.on("touchend",n),this.on("touchcancel",n)}setTimeout(e,t){var n;return e=bt(this,e),this.clearTimersOnDispose_(),n=r.a.setTimeout((()=>{this.setTimeoutIds_.has(n)&&this.setTimeoutIds_.delete(n),e()}),t),this.setTimeoutIds_.add(n),n}clearTimeout(e){return this.setTimeoutIds_.has(e)&&(this.setTimeoutIds_.delete(e),r.a.clearTimeout(e)),e}setInterval(e,t){e=bt(this,e),this.clearTimersOnDispose_();const n=r.a.setInterval(e,t);return this.setIntervalIds_.add(n),n}clearInterval(e){return this.setIntervalIds_.has(e)&&(this.setIntervalIds_.delete(e),r.a.clearInterval(e)),e}requestAnimationFrame(e){var t;return this.clearTimersOnDispose_(),e=bt(this,e),t=r.a.requestAnimationFrame((()=>{this.rafIds_.has(t)&&this.rafIds_.delete(t),e()})),this.rafIds_.add(t),t}requestNamedAnimationFrame(e,t){this.namedRafs_.has(e)&&this.cancelNamedAnimationFrame(e),this.clearTimersOnDispose_(),t=bt(this,t);const n=this.requestAnimationFrame((()=>{t(),this.namedRafs_.has(e)&&this.namedRafs_.delete(e)}));return this.namedRafs_.set(e,n),e}cancelNamedAnimationFrame(e){this.namedRafs_.has(e)&&(this.cancelAnimationFrame(this.namedRafs_.get(e)),this.namedRafs_.delete(e))}cancelAnimationFrame(e){return this.rafIds_.has(e)&&(this.rafIds_.delete(e),r.a.cancelAnimationFrame(e)),e}clearTimersOnDispose_(){this.clearingTimersOnDispose_||(this.clearingTimersOnDispose_=!0,this.one("dispose",(()=>{[["namedRafs_","cancelNamedAnimationFrame"],["rafIds_","cancelAnimationFrame"],["setTimeoutIds_","clearTimeout"],["setIntervalIds_","clearInterval"]].forEac
2h((e=>{let[t,n]=e;this[t].forEach(((e,t)=>this[n](t)))})),this.clearingTimersOnDispose_=!1})))}getIsDisabled(){return Boolean(this.el_.disabled)}getIsExpresslyInert(){return this.el_.inert&&!this.el_.ownerDocument.documentElement.inert}getIsFocusable(e){return(e||this.el_).tabIndex>=0&&!(this.getIsDisabled()||this.getIsExpresslyInert())}getIsAvailableToBeFocused(e){function t(e){const t=r.a.getComputedStyle(e,null),n=t.getPropertyValue("visibility");return"none"!==t.getPropertyValue("display")&&!["hidden","collapse"].includes(n)}return e||(e=this.el()),!!(function(e){if(e.offsetWidth+e.offsetHeight+e.getBoundingClientRect().height+e.getBoundingClientRect().width===0)return!1;const t={x:e.getBoundingClientRect().left+e.offsetWidth/2,y:e.getBoundingClientRect().top+e.offsetHeight/2};if(t.x<0)return!1;if(t.x>(a.a.documentElement.clientWidth||r.a.innerWidth))return!1;if(t.y<0)return!1;if(t.y>(a.a.documentElement.clientHeight||r.a.innerHeight))return!1;let n=a.a.elementFromPoint(t.x,t.y);for(;n;){if(n===e)return!0;if(!n.parentNode)return!1;n=n.parentNode}}(e)&&(n=e,t(n.parentElement)&&t(n)&&"0"!==n.style.opacity&&"0px"!==r.a.getComputedStyle(n).height&&"0px"!==r.a.getComputedStyle(n).width)&&(!e.parentElement||e.tabIndex>=0));var n}static registerComponent(e,t){if("string"!==typeof e||!e)throw new Error('Illegal component name, "'.concat(e,'"; must be a non-empty string.'));const n=Ut.getComponent("Tech"),i=n&&n.isTech(t),r=Ut===t||Ut.prototype.isPrototypeOf(t.prototype);if(i||!r){let t;throw t=i?"techs must be registered using Tech.registerTech()":"must be a Component subclass",new Error('Illegal component, "'.concat(e,'"; ').concat(t,"."))}e=Mt(e),Ut.components_||(Ut.components_={});const s=Ut.getComponent("Player");if("Player"===e&&s&&s.players){const e=s.players,t=Object.keys(e);if(e&&t.length>0)for(let n=0;n<t.length;n++)if(null!==e[t[n]])throw new Error("Can not register Player component after player has been created.")}return Ut.components_[e]=t,Ut.components_[Lt(e)]=t,t}static getComponent(e){if(e&&Ut.components_)return Ut.components_[e]}}function Ft(e,t,n,i){return function(e,t,n){if("number"!==typeof t||t<0||t>n)throw new Error("Failed to execute '".concat(e,"' on 'TimeRanges': The index provided (").concat(t,") is non-numeric or out of bounds (0-").concat(n,")."))}(e,i,n.length-1),n[i][t]}function zt(e){let t;return t=void 0===e||0===e.length?{length:0,start(){throw new Error("This TimeRanges object is empty")},end(){throw new Error("This TimeRanges object is empty")}}:{length:e.length,start:Ft.bind(null,"start",0,e),end:Ft.bind(null,"end",1,e)},r.a.Symbol&&r.a.Symbol.iterator&&(t[r.a.Symbol.iterator]=()=>(e||[]).values()),t}function qt(e,t){return Array.isArray(e)?zt(e):void 0===e||void 0===t?zt():zt([[e,t]])}Ut.registerComponent("Component",Ut);const Ht=function(e,t){e=e<0?0:e;let n=Math.floor(e%60),i=Math.floor(e/60%60),r=Math.floor(e/3600);const s=Math.floor(t/60%60),a=Math.floor(t/3600);return(isNaN(e)||e===1/0)&&(r=i=n="-"),r=r>0||a>0?r+":":"",i=((r||s>=10)&&i<10?"0"+i:i)+":",n=n<10?"0"+n:n,r+i+n};let Vt=Ht;function Wt(e){Vt=e}function Gt(){Vt=Ht}function Xt(e){return Vt(e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:e)}var Yt=Object.freeze({__proto__:null,createTimeRanges:qt,createTimeRange:qt,setFormatTime:Wt,resetFormatTime:Gt,formatTime:Xt});function Kt(e,t){let n,i,r=0;if(!t)return 0;e&&e.length||(e=qt(0,0));for(let s=0;s<e.length;s++)n=e.start(s),i=e.end(s),i>t&&(i=t),r+=i-n;return r/t}function Qt(e){if(e instanceof Qt)return e;"number"===typeof e?this.code=e:"string"===typeof e?this.message=e:U(e)&&("number"===typeof e.code&&(this.code=e.code),Object.assign(this,e)),this.message||(this.message=Qt.defaultMessages[this.code]||"")}function Zt(e){return void 0!==e&&null!==e&&"function"===typeof e.then}function Jt(e){Zt(e)&&e.then(null,(e=>{}))}Qt.prototype.code=0,Qt.prototype.message="",Qt.prototype.status=null,Qt.prototype.metadata=null,Qt.errorTypes=["MEDIA_ERR_CUSTOM","MEDIA_ERR_ABORTED","MEDIA_ERR_NETWORK","MEDIA_ERR_DECODE","MEDIA_ERR_SRC_NOT_SUPPORTED","MEDIA_ERR_ENCRYPTED"],Qt.defaultMessages={1:"You aborted the media playback",2:"A network error caused the media download to fail part-way.",3:"The media playback was aborted due to a corruption problem or because the media used features your browser did not support.",4:"The media could not be loaded, either because the server or network failed or because the format is not supported.",5:"The media is encrypted and we do not have the keys to decrypt it."},Qt.MEDIA_ERR_CUSTOM=0,Qt.prototype.MEDIA_ERR_CUSTOM=0,Qt.MEDIA_ERR_ABORTED=1,Qt.prototype.MEDIA_ERR_ABORTED=1,Qt.MEDIA_ERR_NETWORK=2,Qt.prototype.MEDIA_ERR_NETWORK=2,Qt.MEDIA_ERR_DECODE=3,Qt.prototype.MEDIA_ERR_DECODE=3,Qt.MEDIA_ERR_SRC_NOT_SUPPORTED=4,Qt.prototype.MEDIA_ERR_SRC_NOT_SUPPORTED=4,Qt.MEDIA_ERR_ENCRYPTED=5,Qt.prototype.MEDIA_ERR_ENCRYPTED=5;const $t=function(e){return["kind","label","language","id","inBandMetadataTrackDispatchType","mode","src"].reduce(((t,n,i)=>(e[n]&&(t[n]=e[n]),t)),{cues:e.cues&&Array.prototype.map.call(e.cues,(function(e){return{startTime:e.startTime,endTime:e.endTime,text:e.text,id:e.id}}))})};var en=function(e){const t=e.$$("track"),n=Array.prototype.map.call(t,(e=>e.track));return Array.prototype.map.call(t,(function(e){const t=$t(e.track);return e.src&&(t.src=e.src),t})).concat(Array.prototype.filter.call(e.textTracks(),(function(e){return-1===n.indexOf(e)})).map($t))},tn=function(e,t){return e.forEach((function(e){const n=t.addRemoteTextTrack(e).track;
2!e.src&&e.cues&&e.cues.forEach((e=>n.addCue(e)))})),t.textTracks()},nn=$t;const rn="vjs-modal-dialog";class sn extends Ut{constructor(e,t){super(e,t),this.handleKeyDown_=e=>this.handleKeyDown(e),this.close_=e=>this.close(e),this.opened_=this.hasBeenOpened_=this.hasBeenFilled_=!1,this.closeable(!this.options_.uncloseable),this.content(this.options_.content),this.contentEl_=_e("div",{className:"".concat(rn,"-content")},{role:"document"}),this.descEl_=_e("p",{className:"".concat(rn,"-description vjs-control-text"),id:this.el().getAttribute("aria-describedby")}),ve(this.descEl_,this.description()),this.el_.appendChild(this.descEl_),this.el_.appendChild(this.contentEl_)}createEl(){return super.createEl("div",{className:this.buildCSSClass(),tabIndex:-1},{"aria-describedby":"".concat(this.id(),"_description"),"aria-hidden":"true","aria-label":this.label(),role:"dialog","aria-live":"polite"})}dispose(){this.contentEl_=null,this.descEl_=null,this.previouslyActiveEl_=null,super.dispose()}buildCSSClass(){return"".concat(rn," vjs-hidden ").concat(super.buildCSSClass())}label(){return this.localize(this.options_.label||"Modal Window")}description(){let e=this.options_.description||this.localize("This is a modal window.");return this.closeable()&&(e+=" "+this.localize("This modal can be closed by pressing the Escape key or activating the close button.")),e}open(){if(this.opened_)return void(this.options_.fillAlways&&this.fill());const e=this.player();this.trigger("beforemodalopen"),this.opened_=!0,(this.options_.fillAlways||!this.hasBeenOpened_&&!this.hasBeenFilled_)&&this.fill(),this.wasPlaying_=!e.paused(),this.options_.pauseOnOpen&&this.wasPlaying_&&e.pause(),this.on("keydown",this.handleKeyDown_),this.hadControls_=e.controls(),e.controls(!1),this.show(),this.conditionalFocus_(),this.el().setAttribute("aria-hidden","false"),this.trigger("modalopen"),this.hasBeenOpened_=!0}opened(e){return"boolean"===typeof e&&this[e?"open":"close"](),this.opened_}close(){if(!this.opened_)return;const e=this.player();this.trigger("beforemodalclose"),this.opened_=!1,this.wasPlaying_&&this.options_.pauseOnOpen&&e.play(),this.off("keydown",this.handleKeyDown_),this.hadControls_&&e.controls(!0),this.hide(),this.el().setAttribute("aria-hidden","true"),this.trigger({type:"modalclose",bubbles:!0}),this.conditionalBlur_(),this.options_.temporary&&this.dispose()}closeable(e){if("boolean"===typeof e){const t=this.closeable_=!!e;let n=this.getChild("closeButton");if(t&&!n){const e=this.contentEl_;this.contentEl_=this.el_,n=this.addChild("closeButton",{controlText:"Close Modal Dialog"}),this.contentEl_=e,this.on(n,"close",this.close_)}!t&&n&&(this.off(n,"close",this.close_),this.removeChild(n),n.dispose())}return this.closeable_}fill(){this.fillWith(this.content())}fillWith(e){const t=this.contentEl(),n=t.parentNode,i=t.nextSibling;this.trigger("beforemodalfill"),this.hasBeenFilled_=!0,n.removeChild(t),this.empty(),ze(t,e),this.trigger("modalfill"),i?n.insertBefore(t,i):n.appendChild(t);const r=this.getChild("closeButton");r&&n.appendChild(r.el_),this.trigger("aftermodalfill")}empty(){this.trigger("beforemodalempty"),Be(this.contentEl()),this.trigger("modalempty")}content(e){return"undefined"!==typeof e&&(this.content_=e),this.content_}conditionalFocus_(){const e=a.a.activeElement,t=this.player_.el_;this.previouslyActiveEl_=null,(t.contains(e)||t===e)&&(this.previouslyActiveEl_=e,this.focus())}conditionalBlur_(){this.previouslyActiveEl_&&(this.previouslyActiveEl_.focus(),this.previouslyActiveEl_=null)}handleKeyDown(e){if(this.trigger({type:"modalKeydown",originalEvent:e,target:this,bubbles:!0}),e.stopPropagation(),"Escape"===e.key&&this.closeable())return e.preventDefault(),void this.close();if("Tab"!==e.key)return;const t=this.focusableEls_(),n=this.el_.querySelector(":focus");let i;for(let r=0;r<t.length;r++)if(n===t[r]){i=r;break}a.a.activeElement===this.el_&&(i=0),e.shiftKey&&0===i?(t[t.length-1].focus(),e.preventDefault()):e.shiftKey||i!==t.length-1||(t[0].focus(),e.preventDefault())}focusableEls_(){const e=this.el_.querySelectorAll("*");return Array.prototype.filter.call(e,(e=>(e instanceof r.a.HTMLAnchorElement||e instanceof r.a.HTMLAreaElement)&&e.hasAttribute("href")||(e instanceof r.a.HTMLInputElement||e instanceof r.a.HTMLSelectElement||e instanceof r.a.HTMLTextAreaElement||e instanceof r.a.HTMLButtonElement)&&!e.hasAttribute("disabled")||e instanceof r.a.HTMLIFrameElement||e instanceof r.a.HTMLObjectElement||e instanceof r.a.HTMLEmbedElement||e.hasAttribute("tabindex")&&-1!==e.getAttribute("tabindex")||e.hasAttribute("contenteditable")))}}
vendor: 5,531 bytes, line 2
2sn.prototype.options_={pauseOnOpen:!0,temporary:!0},Ut.registerComponent("ModalDialog",sn);class an extends xt{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];super(),this.tracks_=[],Object.defineProperty(this,"length",{get(){return this.tracks_.length}});for(let t=0;t<e.length;t++)this.addTrack(e[t])}addTrack(e){const t=this.tracks_.length;""+t in this||Object.defineProperty(this,t,{get(){return this.tracks_[t]}}),-1===this.tracks_.indexOf(e)&&(this.tracks_.push(e),this.trigger({track:e,type:"addtrack",target:this})),e.labelchange_=()=>{this.trigger({track:e,type:"labelchange",target:this})},Tt(e)&&e.addEventListener("labelchange",e.labelchange_)}removeTrack(e){let t;for(let n=0,i=this.length;n<i;n++)if(this[n]===e){t=this[n],t.off&&t.off(),this.tracks_.splice(n,1);break}t&&this.trigger({track:t,type:"removetrack",target:this})}getTrackById(e){let t=null;for(let n=0,i=this.length;n<i;n++){const i=this[n];if(i.id===e){t=i;break}}return t}}an.prototype.allowedEvents_={change:"change",addtrack:"addtrack",removetrack:"removetrack",labelchange:"labelchange"};for(const t in an.prototype.allowedEvents_)an.prototype["on"+t]=null;const on=function(e,t){for(let n=0;n<e.length;n++)Object.keys(e[n]).length&&t.id!==e[n].id&&(e[n].enabled=!1)};class cn extends an{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];for(let t=e.length-1;t>=0;t--)if(e[t].enabled){on(e,e[t]);break}super(e),this.changing_=!1}addTrack(e){e.enabled&&on(this,e),super.addTrack(e),e.addEventListener&&(e.enabledChange_=()=>{this.changing_||(this.changing_=!0,on(this,e),this.changing_=!1,this.trigger("change"))},e.addEventListener("enabledchange",e.enabledChange_))}removeTrack(e){super.removeTrack(e),e.removeEventListener&&e.enabledChange_&&(e.removeEventListener("enabledchange",e.enabledChange_),e.enabledChange_=null)}}const ln=function(e,t){for(let n=0;n<e.length;n++)Object.keys(e[n]).length&&t.id!==e[n].id&&(e[n].selected=!1)};class dn extends an{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];for(let t=e.length-1;t>=0;t--)if(e[t].selected){ln(e,e[t]);break}super(e),this.changing_=!1,Object.defineProperty(this,"selectedIndex",{get(){for(let e=0;e<this.length;e++)if(this[e].selected)return e;return-1},set(){}})}addTrack(e){e.selected&&ln(this,e),super.addTrack(e),e.addEventListener&&(e.selectedChange_=()=>{this.changing_||(this.changing_=!0,ln(this,e),this.changing_=!1,this.trigger("change"))},e.addEventListener("selectedchange",e.selectedChange_))}removeTrack(e){super.removeTrack(e),e.removeEventListener&&e.selectedChange_&&(e.removeEventListener("selectedchange",e.selectedChange_),e.selectedChange_=null)}}class un extends an{addTrack(e){super.addTrack(e),this.queueChange_||(this.queueChange_=()=>this.queueTrigger("change")),this.triggerSelectedlanguagechange||(this.triggerSelectedlanguagechange_=()=>this.trigger("selectedlanguagechange")),e.addEventListener("modechange",this.queueChange_);-1===["metadata","chapters"].indexOf(e.kind)&&e.addEventListener("modechange",this.triggerSelectedlanguagechange_)}removeTrack(e){super.removeTrack(e),e.removeEventListener&&(this.queueChange_&&e.removeEventListener("modechange",this.queueChange_),this.selectedlanguagechange_&&e.removeEventListener("modechange",this.triggerSelectedlanguagechange_))}toJSON(){return this.tracks_.map((e=>e.toJSON()))}}class hn{constructor(e){hn.prototype.setCues_.call(this,e),Object.defineProperty(this,"length",{get(){return this.length_}})}setCues_(e){const t=this.length||0;let n=0;const i=e.length;this.cues_=e,this.length_=e.length;const r=function(e){""+e in this||Object.defineProperty(this,""+e,{get(){return this.cues_[e]}})};if(t<i)for(n=t;n<i;n++)r.call(this,n)}getCueById(e){let t=null;for(let n=0,i=this.length;n<i;n++){const i=this[n];if(i.id===e){t=i;break}}return t}}const pn={alternative:"alternative",captions:"captions",main:"main",sign:"sign",subtitles:"subtitles",commentary:"commentary"},mn={alternative:"alternative",descriptions:"descriptions",main:"main","main-desc":"main-desc",translation:"translation",commentary:"commentary"},gn={subtitles:"subtitles",captions:"captions",descriptions:"descriptions",chapters:"chapters",metadata:"metadata"},fn={disabled:"disabled",hidden:"hidden",showing:"showing"};class bn extends xt{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};super();const t={id:e.id||"vjs_track_"+rt(),kind:e.kind||"",language:e.language||""};let n=e.label||"";for(const i in t)Object.defineProperty(this,i,{get:()=>t[i],set(){}});Object.defineProperty(this,"label",{get:()=>n,set(e){e!==n&&(n=e,this.trigger("labelchange"))}})}}const yn=function(e){return new URL(e,a.a.baseURI)},jn=function(e){return new URL(e,a.a.baseURI).href},_n=function(e){if("string"===typeof e){const t=e.split("?")[0].replace(/\/+$/,"").match(/\.([^.\/]+)$/);return t?t[1].toLowerCase():""}return""},vn=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:r.a.location;return yn(e).origin!==t.origin};var xn=Object.freeze({__proto__:null,parseUrl:yn,getAbsoluteURL:jn,getFileExtension:_n,isCrossOrigin:vn});const On=function(e,t){const n=new r.a.WebVTT.Parser(r.a,r.a.vttjs,r.a.WebVTT.StringDecoder()),i=[];n.oncue=function(e){t.addCue(e)},n.onparsingerror=function(e){i.push(e)},n.onflush=function(){t.trigger({type:"loadeddata",target:t})},n.parse(e),i.length>0&&(r.a.console&&r.a.console.groupCollapsed&&r.a.console.groupCollapsed("Text Track parsing errors for ".concat(t.src)),i.forEac
2h((e=>P.error(e))),r.a.console&&r.a.console.groupEnd&&r.a.console.groupEnd()),n.flush()},Tn=function(e,t){const n={uri:e},i=vn(e);i&&(n.cors=i);const s="use-credentials"===t.tech_.crossOrigin();s&&(n.withCredentials=s),c()(n,bt(this,(function(e,n,i){if(e)return P.error(e,n);t.loaded_=!0,"function"!==typeof r.a.WebVTT?t.tech_&&t.tech_.any(["vttjsloaded","vttjserror"],(e=>{if("vttjserror"!==e.type)return On(i,t);P.error("vttjs failed to load, stopping trying to process ".concat(t.src))})):On(i,t)})))};class Sn extends bn{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!e.tech)throw new Error("A tech was not provided.");const t=z(e,{kind:gn[e.kind]||"subtitles",language:e.language||e.srclang||""});let n=fn[t.mode]||"disabled";const i=t.default;"metadata"!==t.kind&&"chapters"!==t.kind||(n="hidden"),super(t),this.tech_=t.tech,this.cues_=[],this.activeCues_=[],this.preload_=!1!==this.tech_.preloadTextTracks;const r=new hn(this.cues_),s=new hn(this.activeCues_);let a=!1;this.timeupdateHandler=bt(this,(function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.tech_.isDisposed()||(this.tech_.isReady_?(this.activeCues=this.activeCues,a&&(this.trigger("cuechange"),a=!1),"timeupdate"!==e.type&&(this.rvf_=this.tech_.requestVideoFrameCallback(this.timeupdateHandler))):"timeupdate"!==e.type&&(this.rvf_=this.tech_.requestVideoFrameCallback(this.timeupdateHandler)))}));this.tech_.one("dispose",(()=>{this.stopTracking()})),"disabled"!==n&&this.startTracking(),Object.defineProperties(this,{default:{get:()=>i,set(){}},mode:{get:()=>n,set(e){fn[e]&&n!==e&&(n=e,this.preload_||"disabled"===n||0!==this.cues.length||Tn(this.src,this),this.stopTracking(),"disabled"!==n&&this.startTracking(),this.trigger("modechange"))}},cues:{get(){return this.loaded_?r:null},set(){}},activeCues:{get(){if(!this.loaded_)return null;if(0===this.cues.length)return s;const e=this.tech_.currentTime(),t=[];for(let n=0,i=this.cues.length;n<i;n++){const i=this.cues[n];i.startTime<=e&&i.endTime>=e&&t.push(i)}
2if(a=!1,t.length!==this.activeCues_.length)a=!0;else for(let n=0;n<t.length;n++)-1===this.activeCues_.indexOf(t[n])&&(a=!0);return this.activeCues_=t,s.setCues_(this.activeCues_),s},set(){}}}),t.src?(this.src=t.src,this.preload_||(this.loaded_=!0),(this.preload_||"subtitles"!==t.kind&&"captions"!==t.kind)&&Tn(this.src,this)):this.loaded_=!0}startTracking(){this.rvf_=this.tech_.requestVideoFrameCallback(this.timeupdateHandler),this.tech_.on("timeupdate",this.timeupdateHandler)}stopTracking(){this.rvf_&&(this.tech_.cancelVideoFrameCallback(this.rvf_),this.rvf_=void 0),this.tech_.off("timeupdate",this.timeupdateHandler)}addCue(e){let t=e;if(!("getCueAsHTML"in t)){t=new r.a.vttjs.VTTCue(e.startTime,e.endTime,e.text);for(const n in e)n in t||(t[n]=e[n]);t.id=e.id,t.originalCue_=e}const n=this.tech_.textTracks();for(let i=0;i<n.length;i++)n[i]!==this&&n[i].removeCue(t);this.cues_.push(t),this.cues.setCues_(this.cues_)}toJSON(){return nn(this)}removeCue(e){let t=this.cues_.length;for(;t--;){const n=this.cues_[t];if(n===e||n.originalCue_&&n.originalCue_===e){this.cues_.splice(t,1),this.cues.setCues_(this.cues_);break}}}}Sn.prototype.allowedEvents_={cuechange:"cuechange"};class wn extends bn{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=z(e,{kind:mn[e.kind]||""});super(t);let n=!1;Object.defineProperty(this,"enabled",{get:()=>n,set(e){"boolean"===typeof e&&e!==n&&(n=e,this.trigger("enabledchange"))}}),t.enabled&&(this.enabled=t.enabled),this.loaded_=!0}}class An extends bn{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=z(e,{kind:pn[e.kind]||""});super(t);let n=!1;Object.defineProperty(this,"selected",{get:()=>n,set(e){"boolean"===typeof e&&e!==n&&(n=e,this.trigger("selectedchange"))}}),t.selected&&(this.selected=t.selected)}}class kn extends xt{constructor(){let e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};super();const n=new Sn(t);this.kind=n.kind,this.src=n.src,this.srclang=n.language,this.label=n.label,this.default=n.default,Object.defineProperties(this,{readyState:{get:()=>e},track:{get:()=>n}}),e=kn.NONE,n.addEventListener("loadeddata",(()=>{e=kn.LOADED,this.trigger({type:"load",target:this})}))}}kn.prototype.allowedEvents_={load:"load"},kn.NONE=0,kn.LOADING=1,kn.LOADED=2,kn.ERROR=3;const Cn={audio:{ListClass:cn,TrackClass:wn,capitalName:"Audio"},video:{ListClass:dn,TrackClass:An,capitalName:"Video"},text:{ListClass:un,TrackClass:Sn,capitalName:"Text"}};
2Object.keys(Cn).forEach((function(e){Cn[e].getterName="".concat(e,"Tracks"),Cn[e].privateName="".concat(e,"Tracks_")}));const En={remoteText:{ListClass:un,TrackClass:Sn,capitalName:"RemoteText",getterName:"remoteTextTracks",privateName:"remoteTextTracks_"},remoteTextEl:{ListClass:class{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];this.trackElements_=[],Object.defineProperty(this,"length",{get(){return this.trackElements_.length}});for(let t=0,n=e.length;t<n;t++)this.addTrackElement_(e[t])}addTrackElement_(e){const t=this.trackElements_.length;""+t in this||Object.defineProperty(this,t,{get(){return this.trackElements_[t]}}),-1===this.trackElements_.indexOf(e)&&this.trackElements_.push(e)}getTrackElementByTrack_(e){let t;for(let n=0,i=this.trackElements_.length;n<i;n++)if(e===this.trackElements_[n].track){t=this.trackElements_[n];break}return t}removeTrackElement_(e){for(let t=0,n=this.trackElements_.length;t<n;t++)if(e===this.trackElements_[t]){this.trackElements_[t].track&&"function"===typeof this.trackElements_[t].track.off&&this.trackElements_[t].track.off(),"function"===typeof this.trackElements_[t].off&&this.trackElements_[t].off(),this.trackElements_.splice(t,1);break}}},TrackClass:kn,capitalName:"RemoteTextTrackEls",getterName:"remoteTextTrackEls",privateName:"remoteTextTrackEls_"}},In=Object.assign({},Cn,En);En.names=Object.keys(En),Cn.names=Object.keys(Cn),In.names=[].concat(En.names).concat(Cn.names);class Dn extends Ut{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(){};e.reportTouchActivity=!1,super(null,e,t),this.onDurationChange_=e=>this.onDurationChange(e),this.trackProgress_=e=>this.trackProgress(e),this.trackCurrentTime_=e=>this.trackCurrentTime(e),this.stopTrackingCurrentTime_=e=>this.stopTrackingCurrentTime(e),this.disposeSourceHandler_=e=>this.disposeSourceHandler(e),this.queuedHanders_=new Set,this.hasStarted_=!1,this.on("playing",(function(){this.hasStarted_=!0})),this.on("loadstart",(function(){this.hasStarted_=!1})),In.names.forEach((t=>{const n=In[t];e&&e[n.getterName]&&(this[n.privateName]=e[n.getterName])})),this.featuresProgressEvents||this.manualProgressOn(),this.featuresTimeupdateEvents||this.manualTimeUpdatesOn(),["Text","Audio","Video"].forEach((t=>{!1===e["native".concat(t,"Tracks")]&&(this["featuresNative".concat(t,"Tracks")]=!1)})),!1===e.nativeCaptions||!1===e.nativeTextTracks?this.featuresNativeTextTracks=!1:!0!==e.nativeCaptions&&!0!==e.nativeTextTracks||(this.featuresNativeTextTracks=!0),this.featuresNativeTextTracks||this.emulateTextTracks(),this.preloadTextTracks=!1!==e.preloadTextTracks,this.autoRemoteTextTracks_=new In.text.ListClass,this.initTrackListeners(),e.nativeControlsForTouch||this.emitTapEvents(),this.constructor&&(this.name_=this.constructor.name||"Unknown Tech")}triggerSourceset(e){this.isReady_||this.one("ready",(()=>this.setTimeout((()=>this.triggerSourceset(e)),1))),this.trigger({src:e,type:"sourceset"})}manualProgressOn(){this.on("durationchange",this.onDurationChange_),this.manualProgress=!0,this.one("ready",this.trackProgress_)}manualProgressOff(){this.manualProgress=!1,this.stopTrackingProgress(),this.off("durationchange",this.onDurationChange_)}trackProgress(e){this.stopTrackingProgress(),this.progressInterval=this.setInterval(bt(this,(function(){const e=this.bufferedPercent();this.bufferedPercent_!==e&&this.trigger("progress"),this.bufferedPercent_=e,1===e&&this.stopTrackingProgress()})),500)}onDurationChange(e){this.duration_=this.duration()}buffered(){return qt(0,0)}bufferedPercent(){return Kt(this.buffered(),this.duration_)}stopTrackingProgress(){this.clearInterval(this.progressInterval)}manualTimeUpdatesOn(){this.manualTimeUpdates=!0,this.on("play",this.trackCurrentTime_),this.on("pause",this.stopTrackingCurrentTime_)}manualTimeUpdatesOff(){this.manualTimeUpdates=!1,this.stopTrackingCurrentTime(),this.off("play",this.trackCurrentTime_),this.off("pause",this.stopTrackingCurrentTime_)}trackCurrentTime(){this.currentTimeInterval&&this.stopTrackingCurrentTime(),this.currentTimeInterval=this.setInterval((function(){this.trigger({type:"timeupdate",target:this,manuallyTriggered:!0})}),250)}stopTrackingCurrentTime(){this.clearInterval(this.currentTimeInterval),this.trigger({type:"timeupdate",target:this,manuallyTriggered:!0})}dispose(){this.clearTracks(Cn.names),this.manualProgress&&this.manualProgressOff(),this.manualTimeUpdates&&this.manualTimeUpdatesOff(),super.dispose()}
2clearTracks(e){(e=[].concat(e)).forEach((e=>{const t=this["".concat(e,"Tracks")]()||[];let n=t.length;for(;n--;){const i=t[n];"text"===e&&this.removeRemoteTextTrack(i),t.removeTrack(i)}}))}cleanupAutoTextTracks(){const e=this.autoRemoteTextTracks_||[];let t=e.length;for(;t--;){const n=e[t];this.removeRemoteTextTrack(n)}}reset(){}crossOrigin(){}setCrossOrigin(){}error(e){return void 0!==e&&(this.error_=new Qt(e),this.trigger("error")),this.error_}played(){return this.hasStarted_?qt(0,0):qt()}play(){}setScrubbing(e){}scrubbing(){}setCurrentTime(e){this.manualTimeUpdates&&this.trigger({type:"timeupdate",target:this,manuallyTriggered:!0})}initTrackListeners(){Cn.names.forEach((e=>{const t=Cn[e],n=()=>{this.trigger("".concat(e,"trackchange"))},i=this[t.getterName]();i.addEventListener("removetrack",n),i.addEventListener("addtrack",n),this.on("dispose",(()=>{i.removeEventListener("removetrack",n),i.removeEventListener("addtrack",n)}))}))}addWebVttScript_(){if(!r.a.WebVTT)if(a.a.body.contains(this.el())){if(!this.options_["vtt.js"]&&F(d.a)&&Object.keys(d.a).length>0)return void this.trigger("vttjsloaded");const e=a.a.createElement("script");e.src=this.options_["vtt.js"]||"https://vjs.zencdn.net/vttjs/0.14.1/vtt.min.js",e.onload=()=>{this.trigger("vttjsloaded")},e.onerror=()=>{this.trigger("vttjserror")},this.on("dispose",(()=>{e.onload=null,e.onerror=null})),r.a.WebVTT=!0,this.el().parentNode.appendChild(e)}else this.ready(this.addWebVttScript_)}emulateTextTracks(){const e=this.textTracks(),t=this.remoteTextTracks(),n=t=>e.addTrack(t.track),i=t=>e.removeTrack(t.track);t.on("addtrack",n),t.on("removetrack",i),this.addWebVttScript_();const r=()=>this.trigger("texttrackchange"),s=()=>{r();for(let t=0;t<e.length;t++){const n=e[t];n.removeEventListener("cuechange",r),"showing"===n.mode&&n.addEventListener("cuechange",r)}};s(),e.addEventListener("change",s),e.addEventListener("addtrack",s),e.addEventListener("removetrack",s),this.on("dispose",(function(){t.off("addtrack",n),t.off("removetrack",i),e.removeEventListener("change",s),e.removeEventListener("addtrack",s),e.removeEventListener("removetrack",s);for(let t=0;t<e.length;t++){e[t].removeEventListener("cuechange",r)}}))}addTextTrack(e,t,n){if(!e)throw new Error("TextTrack kind is required but was not provided");return function(e,t,n,i){let r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{};const s=e.textTracks();r.kind=t,n&&(r.label=n),i&&(r.language=i),r.tech=e;const a=new In.text.TrackClass(r);return s.addTrack(a),a}(this,e,t,n)}createRemoteTextTrack(e){const t=z(e,{tech:this});return new En.remoteTextEl.TrackClass(t)}addRemoteTextTrack(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;const n=this.createRemoteTextTrack(e);return"boolean"!==typeof t&&(t=!1),this.remoteTextTrackEls().addTrackElement_(n),this.remoteTextTracks().addTrack(n.track),!1===t&&this.ready((()=>this.autoRemoteTextTracks_.addTrack(n.track))),n}removeRemoteTextTrack(e){const t=this.remoteTextTrackEls().getTrackElementByTrack_(e);this.remoteTextTrackEls().removeTrackElement_(t),this.remoteTextTracks().removeTrack(e),this.autoRemoteTextTracks_.removeTrack(e)}getVideoPlaybackQuality(){return{}}requestPictureInPicture(){return Promise.reject()}disablePictureInPicture(){return!0}setDisablePictureInPicture(){}requestVideoFrameCallback(e){const t=rt();return!this.isReady_||this.paused()?(this.queuedHanders_.add(t),this.one("playing",(()=>{this.queuedHanders_.has(t)&&(this.queuedHanders_.delete(t),e())}))):this.requestNamedAnimationFrame(t,e),t}cancelVideoFrameCallback(e){this.queuedHanders_.has(e)?this.queuedHanders_.delete(e):this.cancelNamedAnimationFrame(e)}setPoster(){}playsinline(){}setPlaysinline(){}overrideNativeAudioTracks(e){}overrideNativeVideoTracks(e){}canPlayType(e){return""}static canPlayType(e){return""}static canPlaySource(e,t){return Dn.canPlayType(e.type)}static isTech(e){return e.prototype instanceof Dn||e instanceof Dn||e===Dn}static registerTech(e,t){if(Dn.techs_||(Dn.techs_={}),!Dn.isTech(t))throw new Error("Tech ".concat(e," must be a Tech"));if(!Dn.canPlayType)throw new Error("Techs must have a static canPlayType method on them");if(!Dn.canPlaySource)throw new Error("Techs must have a static canPlaySource method on them");return e=Mt(e),Dn.techs_[e]=t,Dn.techs_[Lt(e)]=t,"Tech"!==e&&Dn.defaultTechOrder_.push(e),t}static getTech(e){if(e)return Dn.techs_&&Dn.techs_[e]?Dn.techs_[e]:(e=Mt(e),r.a&&r.a.videojs&&r.a.videojs[e]?(P.warn("The ".concat(e," tech was added to the videojs object when it should be registered using videojs.registerTech(name, tech)")),r.a.videojs[e]):void 0)}}
2In.names.forEach((function(e){const t=In[e];Dn.prototype[t.getterName]=function(){return this[t.privateName]=this[t.privateName]||new t.ListClass,this[t.privateName]}})),Dn.prototype.featuresVolumeControl=!0,Dn.prototype.featuresMuteControl=!0,Dn.prototype.featuresFullscreenResize=!1,Dn.prototype.featuresPlaybackRate=!1,Dn.prototype.featuresProgressEvents=!1,Dn.prototype.featuresSourceset=!1,Dn.prototype.featuresTimeupdateEvents=!1,Dn.prototype.featuresNativeTextTracks=!1,Dn.prototype.featuresVideoFrameCallback=!1,Dn.withSourceHandlers=function(e){e.registerSourceHandler=function(t,n){let i=e.sourceHandlers;i||(i=e.sourceHandlers=[]),void 0===n&&(n=i.length),i.splice(n,0,t)},e.canPlayType=function(t){const n=e.sourceHandlers||[];let i;for(let e=0;e<n.length;e++)if(i=n[e].canPlayType(t),i)return i;return""},e.selectSourceHandler=function(t,n){const i=e.sourceHandlers||[];let r;for(let e=0;e<i.length;e++)if(r=i[e].canHandleSource(t,n),r)return i[e];return null},e.canPlaySource=function(t,n){const i=e.selectSourceHandler(t,n);return i?i.canHandleSource(t,n):""};["seekable","seeking","duration"].forEach((function(e){const t=this[e];"function"===typeof t&&(this[e]=function(){return this.sourceHandler_&&this.sourceHandler_[e]?this.sourceHandler_[e].apply(this.sourceHandler_,arguments):t.apply(this,arguments)})}),e.prototype),e.prototype.setSource=function(t){let n=e.selectSourceHandler(t,this.options_);n||(e.nativeSourceHandler?n=e.nativeSourceHandler:P.error("No source handler found for the current source.")),this.disposeSourceHandler(),this.off("dispose",this.disposeSourceHandler_),n!==e.nativeSourceHandler&&(this.currentSource_=t),this.sourceHandler_=n.handleSource(t,this,this.options_),this.one("dispose",this.disposeSourceHandler_)},e.prototype.disposeSourceHandler=function(){this.currentSource_&&(this.clearTracks(["audio","video"]),this.currentSource_=null),this.cleanupAutoTextTracks(),this.sourceHandler_&&(this.sourceHandler_.dispose&&this.sourceHandler_.dispose(),this.sourceHandler_=null)}},Ut.registerComponent("Tech",Dn),Dn.registerTech("Tech",Dn),Dn.defaultTechOrder_=[];const Pn={},Rn={},Ln={};function Mn(e,t,n){e.setTimeout((()=>qn(t,Pn[t.type],n,e)),1)}function Nn(e,t,n){let i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;const r="call"+Mt(n),s=e.reduce(zn(r),i),a=s===Ln,o=a?null:t[n](s);return function(e,t,n,i){for(let r=e.length-1;r>=0;r--){const s=e[r];s[t]&&s[t](i,n)}}(e,n,o,a),o}const Bn={buffered:1,currentTime:1,duration:1,muted:1,played:1,paused:1,seekable:1,volume:1,ended:1},Un={setCurrentTime:1,setMuted:1,setVolume:1},Fn={play:1,pause:1};function zn(e){return(t,n)=>t===Ln?Ln:n[e]?n[e](t):t}function qn(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=arguments.length>2?arguments[2]:void 0,i=arguments.length>3?arguments[3]:void 0,r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:[],s=arguments.length>5&&void 0!==arguments[5]&&arguments[5];const[a,...o]=t;if("string"===typeof a)qn(e,Pn[a],n,i,r,s);else if(a){const t=function(e,t){const n=Rn[e.id()];let i=null;if(void 0===n||null===n)return i=t(e),Rn[e.id()]=[[t,i]],i;for(let r=0;r<n.length;r++){const[e,s]=n[r];e===t&&(i=s)}return null===i&&(i=t(e),n.push([t,i])),i}(i,a);if(!t.setSource)return r.push(t),qn(e,o,n,i,r,s);t.setSource(Object.assign({},e),(function(a,c){if(a)return qn(e,o,n,i,r,s);r.push(t),qn(c,e.type===c.type?o:Pn[c.type],n,i,r,s)}))}else o.length?qn(e,o,n,i,r,s):s?n(e,r):qn(e,Pn["*"],n,i,r,!0)}const Hn={opus:"video/ogg",ogv:"video/ogg",mp4:"video/mp4",mov:"video/mp4",m4v:"video/mp4",mkv:"video/x-matroska",m4a:"audio/mp4",mp3:"audio/mpeg",aac:"audio/aac",caf:"audio/x-caf",flac:"audio/flac",oga:"audio/ogg",wav:"audio/wav",m3u8:"application/x-mpegURL",mpd:"application/dash+xml",jpg:"image/jpeg",jpeg:"image/jpeg",gif:"image/gif",png:"image/png",svg:"image/svg+xml",webp:"image/webp"},Vn=function(){const e=_n(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"");return Hn[e.toLowerCase()]||""},Wn=function(e){if(Array.isArray(e)){let t=[];e.forEach((function(e){e=Wn(e),Array.isArray(e)?t=t.concat(e):U(e)&&t.push(e)})),e=t}else e="string"===typeof e&&e.trim()?[Gn({src:e})]:U(e)&&"string"===typeof e.src&&e.src&&e.src.trim()?[Gn(e)]:[];return e};function Gn(e){if(!e.type){const t=Vn(e.src);t&&(e.type=t)}return e}const Xn=oe?10009:ce?461:8,Yn={codes:{play:415,pause:19,ff:417,rw:412,back:Xn},names:{415:"play",19:"pause",417:"ff",412:"rw",[Xn]:"back"},isEventKey(e,t){return t=t.toLowerCase(),!(!this.names[e.keyCode]||this.names[e.keyCode]!==t)},getEventName(e){if(this.names[e.keyCode])return this.names[e.keyCode];if(this.codes[e.code]){const t=this.codes[e.code];return this.names[t]}return null}};class Kn extends xt{constructor(e){super(),this.player_=e,this.focusableComponents=[],this.isListening_=!1,this.isPaused_=!1,this.onKeyDown_=this.onKeyDown_.bind(this),this.lastFocusedComponent_=null}
vendor: 4,951 bytes, line 2
2start(){this.isListening_||(this.player_.on("keydown",this.onKeyDown_),this.player_.on("modalKeydown",this.onKeyDown_),this.player_.on("loadedmetadata",(()=>{this.focus(this.updateFocusableComponents()[0])})),this.player_.on("modalclose",(()=>{this.refocusComponent()})),this.player_.on("focusin",this.handlePlayerFocus_.bind(this)),this.player_.on("focusout",this.handlePlayerBlur_.bind(this)),this.isListening_=!0,this.player_.errorDisplay&&this.player_.errorDisplay.on("aftermodalfill",(()=>{this.updateFocusableComponents(),this.focusableComponents.length&&(this.focusableComponents.length>1?this.focusableComponents[1].focus():this.focusableComponents[0].focus())})))}stop(){this.player_.off("keydown",this.onKeyDown_),this.isListening_=!1}onKeyDown_(e){const t=e.originalEvent?e.originalEvent:e;if(["ArrowLeft","ArrowRight","ArrowUp","ArrowDown"].includes(t.key)){if(this.isPaused_)return;t.preventDefault();const e=t.key.substring(5).toLowerCase();this.move(e)}else if(Yn.isEventKey(t,"play")||Yn.isEventKey(t,"pause")||Yn.isEventKey(t,"ff")||Yn.isEventKey(t,"rw")){t.preventDefault();const e=Yn.getEventName(t);this.performMediaAction_(e)}else Yn.isEventKey(t,"Back")&&e.target&&"function"===typeof e.target.closeable&&e.target.closeable()&&(t.preventDefault(),e.target.close())}performMediaAction_(e){if(this.player_)switch(e){case"play":this.player_.paused()&&this.player_.play();break;case"pause":this.player_.paused()||this.player_.pause();break;case"ff":this.userSeek_(this.player_.currentTime()+5);break;case"rw":this.userSeek_(this.player_.currentTime()-5)}}userSeek_(e){this.player_.liveTracker&&this.player_.liveTracker.isLive()&&this.player_.liveTracker.nextSeekedFromUser(),this.player_.currentTime(e)}pause(){this.isPaused_=!0}resume(){this.isPaused_=!1}handlePlayerBlur_(e){const t=e.relatedTarget;let n=null;const i=this.getCurrentComponent(e.target);t&&(n=Boolean(t.closest(".video-js")),t.classList.contains("vjs-text-track-settings")&&!this.isPaused_&&this.searchForTrackSelect_()),(e.currentTarget.contains(e.relatedTarget)||n)&&t||(i&&"CloseButton"===i.name()?this.refocusComponent():(this.pause(),i&&i.el()&&(this.lastFocusedComponent_=i)))}handlePlayerFocus_(){this.getCurrentComponent()&&this.getCurrentComponent().getIsFocusable()&&this.resume()}updateFocusableComponents(){const e=this.player_,t=[];function n(e){for(const i of e)i.hasOwnProperty("el_")&&i.getIsFocusable()&&i.getIsAvailableToBeFocused(i.el())&&t.push(i),i.hasOwnProperty("children_")&&i.children_.length>0&&n(i.children_)}return e.children_.forEach((e=>{if(e.hasOwnProperty("el_")){if(e.getIsFocusable&&e.getIsAvailableToBeFocused&&e.getIsFocusable()&&e.getIsAvailableToBeFocused(e.el()))return void t.push(e);e.hasOwnProperty("children_")&&e.children_.length>0?n(e.children_):e.hasOwnProperty("items")&&e.items.length>0?n(e.items):this.findSuitableDOMChild(e)&&t.push(e)}if("ErrorDisplay"===e.name_&&e.opened_){const n=e.el_.querySelector(".vjs-errors-ok-button-container");if(n){n.querySelectorAll("button").forEach(((e,n)=>{t.push({name:()=>"ModalButton"+(n+1),el:()=>e,getPositions:()=>{const t=e.getBoundingClientRect();return{boundingClientRect:{x:t.x,y:t.y,width:t.width,height:t.height,top:t.top,right:t.right,bottom:t.bottom,left:t.left},center:{x:t.left+t.width/2,y:t.top+t.height/2,width:0,height:0,top:t.top+t.height/2,right:t.left+t.width/2,bottom:t.top+t.height/2,left:t.left+t.width/2}}},getIsAvailableToBeFocused:()=>!0,getIsFocusable:e=>!0,focus:()=>e.focus()})}))}}})),this.focusableComponents=t,this.focusableComponents}findSuitableDOMChild(e){return e.el()?function t(n){if(e.getIsFocusable(n)&&e.getIsAvailableToBeFocused(n))return n;for(let e=0;e<n.children.length;e++){const i=t(n.children[e]);if(i)return i}return null}(e.el()):null}getCurrentComponent(e){this.updateFocusableComponents();const t=e||document.activeElement;if(this.focusableComponents.length)for(const n of this.focusableComponents)if(n.el()===t)return n}add(e){const t=[...this.focusableComponents];e.hasOwnProperty("el_")&&e.getIsFocusable()&&e.getIsAvailableToBeFocused(e.el())&&t.push(e),this.focusableComponents=t,this.trigger({type:"focusableComponentsChanged",focusableComponents:this.focusableComponents})}remove(e){for(let t=0;t<this.focusableComponents.length;t++)if(this.focusableComponents[t].name()===e.name())return this.focusableComponents.splice(t,1),void this.trigger({type:"focusableComponentsChanged",focusableComponents:this.focusableComponents})}clear(){this.focusableComponents.length>0&&(this.focusableComponents=[],this.trigger({type:"focusableComponentsChanged",focusableComponents:this.focusableComponents}))}move(e){const t=this.getCurrentComponent();if(!t)return;const n=t.getPositions(),i=this.focusableComponents.filter((i=>i!==t&&this.isInDirection_(n.boundingClientRect,i.getPositions().boundingClientRect,e))),r=this.findBestCandidate_(n.center,i,e);r?this.focus(r):this.trigger({type:"endOfFocusableComponents",direction:e,focu
vendor: 5,694 bytes, line 2
2sedComponent:t})}findBestCandidate_(e,t,n){let i=1/0,r=null;for(const s of t){const t=s.getPositions().center,a=this.calculateDistance_(e,t,n);a<i&&(i=a,r=s)}return r}isInDirection_(e,t,n){switch(n){case"right":return t.left>=e.right;case"left":return t.right<=e.left;case"down":return t.top>=e.bottom;case"up":return t.bottom<=e.top;default:return!1}}refocusComponent(){if(this.lastFocusedComponent_){this.player_.userActive()||this.player_.userActive(!0),this.updateFocusableComponents();for(let e=0;e<this.focusableComponents.length;e++)if(this.focusableComponents[e].name()===this.lastFocusedComponent_.name())return void this.focus(this.focusableComponents[e])}else this.focus(this.updateFocusableComponents()[0])}focus(e){"object"===typeof e&&(e.getIsAvailableToBeFocused(e.el())?e.focus():this.findSuitableDOMChild(e)&&this.findSuitableDOMChild(e).focus())}calculateDistance_(e,t,n){const i=Math.abs(e.x-t.x),r=Math.abs(e.y-t.y);let s;switch(n){case"right":case"left":s=i+100*r;break;case"up":s=2*r+.5*i;break;case"down":s=5*r+i;break;default:s=i+r}return s}searchForTrackSelect_(){const e=this;for(const t of e.updateFocusableComponents())if("TextTrackSelect"===t.constructor.name){e.focus(t);break}}}Ut.registerComponent("MediaLoader",class extends Ut{constructor(e,t,n){if(super(e,z({createEl:!1},t),n),t.playerOptions.sources&&0!==t.playerOptions.sources.length)e.src(t.playerOptions.sources);else for(let i=0,r=t.playerOptions.techOrder;i<r.length;i++){const t=Mt(r[i]);let n=Dn.getTech(t);if(t||(n=Ut.getComponent(t)),n&&n.isSupported()){e.loadTech_(t);break}}}});class Qn extends Ut{constructor(e,t){super(e,t),this.options_.controlText&&this.controlText(this.options_.controlText),this.handleMouseOver_=e=>this.handleMouseOver(e),this.handleMouseOut_=e=>this.handleMouseOut(e),this.handleClick_=e=>this.handleClick(e),this.handleKeyDown_=e=>this.handleKeyDown(e),this.emitTapEvents(),this.enable()}createEl(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"div",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};t=Object.assign({className:this.buildCSSClass(),tabIndex:0},t),"button"===e&&P.error("Creating a ClickableComponent with an HTML element of ".concat(e," is not supported; use a Button instead.")),n=Object.assign({role:"button"},n),this.tabIndex_=t.tabIndex;const i=_e(e,t,n);return this.player_.options_.experimentalSvgIcons||i.appendChild(_e("span",{className:"vjs-icon-placeholder"},{"aria-hidden":!0})),this.createControlTextEl(i),i}dispose(){this.controlTextEl_=null,super.dispose()}createControlTextEl(e){return this.controlTextEl_=_e("span",{className:"vjs-control-text"},{"aria-live":"polite"}),e&&e.appendChild(this.controlTextEl_),this.controlText(this.controlText_,e),this.controlTextEl_}controlText(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.el();if(void 0===e)return this.controlText_||"Need Text";const n=this.localize(e);this.controlText_=e,ve(this.controlTextEl_,n),this.nonIconControl||this.player_.options_.noUITitleAttributes||t.setAttribute("title",n)}buildCSSClass(){return"vjs-control vjs-button ".concat(super.buildCSSClass())}enable(){this.enabled_||(this.enabled_=!0,this.removeClass("vjs-disabled"),this.el_.setAttribute("aria-disabled","false"),"undefined"!==typeof this.tabIndex_&&this.el_.setAttribute("tabIndex",this.tabIndex_),this.on(["tap","click"],this.handleClick_),this.on("keydown",this.handleKeyDown_))}disable(){this.enabled_=!1,this.addClass("vjs-disabled"),this.el_.setAttribute("aria-disabled","true"),"undefined"!==typeof this.tabIndex_&&this.el_.removeAttribute("tabIndex"),this.off("mouseover",this.handleMouseOver_),this.off("mouseout",this.handleMouseOut_),this.off(["tap","click"],this.handleClick_),this.off("keydown",this.handleKeyDown_)}handleLanguagechange(){this.controlText(this.controlText_)}handleClick(e){this.options_.clickHandler&&this.options_.clickHandler.call(this,arguments)}handleKeyDown(e){" "===e.key||"Enter"===e.key?(e.preventDefault(),e.stopPropagation(),this.trigger("click")):super.handleKeyDown(e)}}Ut.registerComponent("ClickableComponent",Qn);class Zn extends Qn{constructor(e,t){super(e,t),this.update(),this.update_=e=>this.update(e),e.on("posterchange",this.update_)}dispose(){this.player().off("posterchange",this.update_),super.dispose()}createEl(){return _e("div",{className:"vjs-poster"})}crossOrigin(e){if("undefined"===typeof e)return this.$("img")?this.$("img").crossOrigin:this.player_.tech_&&this.player_.tech_.isReady_?this.player_.crossOrigin():this.player_.options_.crossOrigin||this.player_.options_.crossorigin||null;null===e||"anonymous"===e||"use-credentials"===e?this.$("img")&&(this.$("img").crossOrigin=e):this.player_.log.warn('crossOrigin must be null, "anonymous" or "use-credentials", given "'.concat(e,'"'))}update(e){const t=this.player().poster();this.setSrc(t),t?this.show():this.hide()}setSrc(e){e?(this.$("img")||this.el_.appendChild(_e("picture",{className:"vjs-poster",tabIndex:-1},{},_e("img",{loading:"lazy",crossOrigin:this.crossOrigin()},{alt:""}))),this.$("img").src=e):this.el_.textContent=""}handleClick(e){this.player_.controls()&&(this.player_.tech(!0)&&this.player_.tech(!0).focus(),this.player_.paused()?Jt(this.player_.play()):this.player_.pause())}}Zn.prototype.crossorigin=Zn.prototype.crossOrigin,Ut.registerComponent("PosterImage",Zn);const Jn="#222",$n="#ccc",ei={monospace:"monospace",sansSerif:"sans-serif",serif:"serif",monospaceSansSerif:'"Andale Mono", "Lucida Console", monospace',monospaceSerif:'"Courier New", monospace',proportionalSansSerif:"sans-serif",proportionalSerif:"serif",casual:'"Comic Sans MS", Impact, fantasy',
2script:'"Monotype Corsiva", cursive',smallcaps:'"Andale Mono", "Lucida Console", monospace, sans-serif'};function ti(e,t){let n;if(4===e.length)n=e[1]+e[1]+e[2]+e[2]+e[3]+e[3];else{if(7!==e.length)throw new Error("Invalid color code provided, "+e+"; must be formatted as e.g. #f0e or #f604e2.");n=e.slice(1)}return"rgba("+parseInt(n.slice(0,2),16)+","+parseInt(n.slice(2,4),16)+","+parseInt(n.slice(4,6),16)+","+t+")"}function ni(e,t,n){try{e.style[t]=n}catch(i){return}}function ii(e){return e?"".concat(e,"px"):""}Ut.registerComponent("TextTrackDisplay",class extends Ut{constructor(e,t,n){super(e,t,n);const i=e=>this.updateDisplay(e),s=e=>{this.updateDisplayOverlay(),this.updateDisplay(e)};e.on("loadstart",(e=>this.toggleDisplay(e))),e.on("useractive",i),e.on("userinactive",i),e.on("texttrackchange",i),e.on("loadedmetadata",(e=>{this.updateDisplayOverlay(),this.preselectTrack(e)})),e.ready(bt(this,(function(){if(e.tech_&&e.tech_.featuresNativeTextTracks)return void this.hide();e.on("fullscreenchange",s),e.on("playerresize",s);const t=r.a.screen.orientation||r.a,n=r.a.screen.orientation?"change":"orientationchange";t.addEventListener(n,s),e.on("dispose",(()=>t.removeEventListener(n,s)));const i=this.options_.playerOptions.tracks||[];for(let e=0;e<i.length;e++)this.player_.addRemoteTextTrack(i[e],!0);this.preselectTrack()})))}preselectTrack(){const e={captions:1,subtitles:1},t=this.player_.textTracks(),n=this.player_.cache_.selectedLanguage;let i,r,s;for(let a=0;a<t.length;a++){const o=t[a];n&&n.enabled&&n.language&&n.language===o.language&&o.kind in e?o.kind===n.kind?s=o:s||(s=o):n&&!n.enabled?(s=null,i=null,r=null):o.default&&("descriptions"!==o.kind||i?o.kind in e&&!r&&(r=o):i=o)}s?s.mode="showing":r?r.mode="showing":i&&(i.mode="showing")}toggleDisplay(){this.player_.tech_&&this.player_.tech_.featuresNativeTextTracks?this.hide():this.show()}createEl(){return super.createEl("div",{className:"vjs-text-track-display"},{translate:"yes","aria-live":"off","aria-atomic":"true"})}clearDisplay(){"function"===typeof r.a.WebVTT&&r.a.WebVTT.processCues(r.a,[],this.el_)}updateDisplay(){const e=this.player_.textTracks(),t=this.options_.allowMultipleShowingTracks;if(this.clearDisplay(),t){const t=[];for(let n=0;n<e.length;++n){const i=e[n];"showing"===i.mode&&t.push(i)}return void this.updateForTrack(t)}let n=null,i=null,s=e.length;for(;s--;){const t=e[s];"showing"===t.mode&&("descriptions"===t.kind?n=t:i=t)}if(i?("off"!==this.getAttribute("aria-live")&&this.setAttribute("aria-live","off"),this.updateForTrack(i)):n&&("assertive"!==this.getAttribute("aria-live")&&this.setAttribute("aria-live","assertive"),this.updateForTrack(n)),!r.a.CSS.supports("inset","10px")){const e=this.el_,t=e.querySelectorAll(".vjs-text-track-cue"),n=this.player_.controlBar.el_.getBoundingClientRect().height,i=this.player_.el_.getBoundingClientRect().height;e.style="",ni(e,"position","relative"),ni(e,"height",i-n+"px"),ni(e,"top","unset"),ni(e,"bottom",le?i+"px":"0px"),t.length>0&&t.forEach((e=>{if(e.style.inset){const t=e.style.inset.split(" ");3===t.length&&Object.assign(e.style,{top:t[0],right:t[1],bottom:t[2],left:"unset"})}}))}}updateDisplayOverlay(){if(!this.player_.videoHeight()||!r.a.CSS.supports("inset-inline: 10px"))return;const e=this.player_.currentWidth(),t=this.player_.currentHeight(),n=e/t,i=this.player_.videoWidth()/this.player_.videoHeight();let s=0,a=0;Math.abs(n-i)>.1&&(n>i?s=Math.round((e-t*i)/2):a=Math.round((t-e/i)/2)),ni(this.el_,"insetInline",ii(s)),ni(this.el_,"insetBlock",ii(a))}updateDisplayState(e){const t=this.player_.textTrackSettings.getValues(),n=e.activeCues;let i=n.length;for(;i--;){const e=n[i];if(!e)continue;const s=e.displayState;if(t.color&&(s.firstChild.style.color=t.color),t.textOpacity&&ni(s.firstChild,"color",ti(t.color||"#fff",t.textOpacity)),t.backgroundColor&&(s.firstChild.style.backgroundColor=t.backgroundColor),t.backgroundOpacity&&ni(s.firstChild,"backgroundColor",ti(t.backgroundColor||"#000",t.backgroundOpacity)),t.windowColor&&(t.windowOpacity?ni(s,"backgroundColor",ti(t.windowColor,t.windowOpacity)):s.style.backgroundColor=t.windowColor),t.edgeStyle&&("dropshadow"===t.edgeStyle?s.firstChild.style.textShadow="2px 2px 3px ".concat(Jn,", 2px 2px 4px ").concat(Jn,", 2px 2px 5px ").concat(Jn):"raised"===t.edgeStyle?s.firstChild.style.textShadow="1px 1px ".concat(Jn,", 2px 2px ").concat(Jn,", 3px 3px ").concat(Jn):"depressed"===t.edgeStyle?s.firstChild.style.textShadow="1px 1px ".concat($n,", 0 1px ").concat($n,", -1px -1px ").concat(Jn,", 0 -1px ").concat(Jn):"uniform"===t.edgeStyle&&(s.firstChild.style.textShadow="0 0 4px ".concat(Jn,", 0 0 4px ").concat(Jn,", 0 0 4px ").concat(Jn,", 0 0 4px ").concat(Jn))),t.fontPercent&&1!==t.fontPercent){const e=r.a.parseFloat(s.style.fontSize);s.style.fontSize=e*t.fontPercent+"px",s.style.height="auto",s.style.top="auto"}
2t.fontFamily&&"default"!==t.fontFamily&&("small-caps"===t.fontFamily?s.firstChild.style.fontVariant="small-caps":s.firstChild.style.fontFamily=ei[t.fontFamily])}}updateForTrack(e){if(Array.isArray(e)||(e=[e]),"function"!==typeof r.a.WebVTT||e.every((e=>!e.activeCues)))return;const t=[];for(let n=0;n<e.length;++n){const i=e[n];for(let e=0;e<i.activeCues.length;++e)t.push(i.activeCues[e])}r.a.WebVTT.processCues(r.a,t,this.el_);for(let n=0;n<e.length;++n){const t=e[n];for(let e=0;e<t.activeCues.length;++e){const i=t.activeCues[e].displayState;Te(i,"vjs-text-track-cue","vjs-text-track-cue-"+(t.language?t.language:n)),t.language&&Ee(i,"lang",t.language)}this.player_.textTrackSettings&&this.updateDisplayState(t)}}});Ut.registerComponent("LoadingSpinner",class extends Ut{createEl(){const e=this.player_.isAudio(),t=this.localize(e?"Audio Player":"Video Player"),n=_e("span",{className:"vjs-control-text",textContent:this.localize("{1} is loading.",[t])}),i=super.createEl("div",{className:"vjs-loading-spinner",dir:"ltr"});return i.appendChild(n),i}handleLanguagechange(){this.$(".vjs-control-text").textContent=this.localize("{1} is loading.",[this.player_.isAudio()?"Audio Player":"Video Player"])}});class ri extends Qn{createEl(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};e="button",t=Object.assign({className:this.buildCSSClass()},t),n=Object.assign({type:"button"},n);const i=_e(e,t,n);return this.player_.options_.experimentalSvgIcons||i.appendChild(_e("span",{className:"vjs-icon-placeholder"},{"aria-hidden":!0})),this.createControlTextEl(i),i}addChild(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const n=this.constructor.name;return P.warn("Adding an actionable (user controllable) child to a Button (".concat(n,") is not supported; use a ClickableComponent instead.")),Ut.prototype.addChild.call(this,e,t)}enable(){super.enable(),this.el_.removeAttribute("disabled")}disable(){super.disable(),this.el_.setAttribute("disabled","disabled")}handleKeyDown(e){" "!==e.key&&"Enter"!==e.key?super.handleKeyDown(e):e.stopPropagation()}}Ut.registerComponent("Button",ri);class si extends ri{constructor(e,t){super(e,t),this.mouseused_=!1,this.setIcon("play"),this.on("mousedown",(e=>this.handleMouseDown(e)))}buildCSSClass(){return"vjs-big-play-button"}handleClick(e){const t=this.player_.play();if("tap"===e.type||this.mouseused_&&"clientX"in e&&"clientY"in e)return Jt(t),void(this.player_.tech(!0)&&this.player_.tech(!0).focus());const n=this.player_.getChild("controlBar"),i=n&&n.getChild("playToggle");if(!i)return void this.player_.tech(!0).focus();const r=()=>i.focus();Zt(t)?t.then(r,(()=>{})):this.setTimeout(r,1)}handleKeyDown(e){this.mouseused_=!1,super.handleKeyDown(e)}handleMouseDown(e){this.mouseused_=!0}}si.prototype.controlText_="Play Video",Ut.registerComponent("BigPlayButton",si);Ut.registerComponent("CloseButton",class extends ri{constructor(e,t){super(e,t),this.setIcon("cancel"),this.controlText(t&&t.controlText||this.localize("Close"))}buildCSSClass(){return"vjs-close-button ".concat(super.buildCSSClass())}handleClick(e){this.trigger({type:"close",bubbles:!1})}handleKeyDown(e){"Escape"===e.key?(e.preventDefault(),e.stopPropagation(),this.trigger("click")):super.handleKeyDown(e)}});class ai extends ri{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};super(e,t),t.replay=void 0===t.replay||t.replay,this.setIcon("play"),this.on(e,"play",(e=>this.handlePlay(e))),this.on(e,"pause",(e=>this.handlePause(e))),t.replay&&this.on(e,"ended",(e=>this.handleEnded(e)))}buildCSSClass(){return"vjs-play-control ".concat(super.buildCSSClass())}handleClick(e){this.player_.paused()?Jt(this.player_.play()):this.player_.pause()}handleSeeked(e){this.removeClass("vjs-ended"),this.player_.paused()?this.handlePause(e):this.handlePlay(e)}handlePlay(e){this.removeClass("vjs-ended","vjs-paused"),this.addClass("vjs-playing"),this.setIcon("pause"),this.controlText("Pause")}handlePause(e){this.removeClass("vjs-playing"),this.addClass("vjs-paused"),this.setIcon("play"),this.controlText("Play")}handleEnded(e){this.removeClass("vjs-playing"),this.addClass("vjs-ended"),this.setIcon("replay"),this.controlText("Replay"),this.one(this.player_,"seeked",(e=>this.handleSeeked(e)))}}ai.prototype.controlText_="Play",Ut.registerComponent("PlayToggle",ai);class oi extends Ut{constructor(e,t){super(e,t),this.on(e,["timeupdate","ended","seeking"],(e=>this.update(e))),this.updateTextNode_()}createEl(){const e=this.buildCSSClass(),t=super.createEl("div",{className:"".concat(e," vjs-time-control vjs-control")}),n=_e("span",{className:"vjs-control-text",textContent:"".concat(this.localize(this.labelText_),"\xa0")},{role:"presentation"});return t.appendChild(n),this.contentEl_=_e("span",{className:"".concat(e,"-display")},{role:"presentation"}),t.appendChild(this.contentEl_),t}dispose(){this.contentEl_=null,this.textNode_=null,super.dispose()}update(e){(this.player_.options_.enableSmoothSeeking||"seeking"!==e.type)&&this.updateContent(e)}updateTextNode_(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;e=Xt(e),this.formattedTime_!==e&&(this.formattedTime_=e,this.requestNamedAnimationFrame("TimeDisplay#updateTextNode_",(()=>{if(!this.contentEl_)return;let e=this.textNode_;e&&this.contentEl_.firstChild!==e&&(e=null,P.warn("TimeDisplay#updateTextnode_: Prevented replacement of text node element since it was no longer a child of this node. Appending a new node instead.")),this.textNode_=a.a.createTextNode(this.formattedTime_),this.textNode_&&(e?this.contentEl_.replaceChild(this.textNode_,e):this.contentEl_.appendChild(this.textNode_))})))}updateContent(e){}}oi.prototype.labelText_="Time",oi.prototype.controlText_="Time",Ut.registerComponent("TimeDisplay",oi);class ci extends oi{buildCSSClass(){return"vjs-current-time"}updateContent(e){let t;t=this.player_.ended()?this.player_.duration():e&&e.target&&"function"===typeof e.target.pendingSeekTime?e.target.pendingSeekTime():this.player_.scrubbing()?this.player_.getCache().currentTime:this.player_.currentTime(),this.updateTextNode_(t)}}ci.prototype.labelText_="Current Time",ci.prototype.controlText_="Current Time",Ut.registerComponent("CurrentTimeDisplay",ci);class li extends oi{constructor(e,t){super(e,t);const n=e=>this.updateContent(e);this.on(e,"durationchange",n),this.on(e,"loadstart",n),this.on(e,"loadedmetadata",n)}buildCSSClass(){return"vjs-duration"}updateContent(e){const t=this.player_.duration();this.updateTextNode_(t)}}li.prototype.labelText_="Duration",li.prototype.controlText_="Duration",Ut.registerComponent("DurationDisplay",li);Ut.registerComponent("TimeDivider",class extends Ut{createEl(){const e=super.createEl("div",{className:"vjs-time-control vjs-time-divider"},{"aria-hidden":!0}),t=super.createEl("div"),n=super.createEl("span",{textContent:"/"});return t.appendChild(n),e.appendChild(t),e}});class di extends oi{constructor(e,t){super(e,t),this.on(e,"durationchange",(e=>this.updateContent(e)))}buildCSSClass(){return"vjs-remaining-time"}createEl(){const e=super.createEl();return!1!==this.options_.displayNegative&&e.insertBefore(_e("span",{},{"aria-hidden":!0},"-"),this.contentEl_),e}updateContent(e){if("number"!==typeof this.player_.duration())return;let t;t=this.player_.ended()?0:this.player_.remainingTimeDisplay?this.player_.remainingTimeDisplay():this.player_.remainingTime(),this.updateTextNode_(t)}}di.prototype.labelText_="Remaining Time",di.prototype.controlText_="Remaining Time",Ut.registerComponent("RemainingTimeDisplay",di);Ut.registerComponent("LiveDisplay",class extends Ut{constructor(e,t){super(e,t),this.updateShowing(),this.on(this.player(),"durationchange",(e=>this.updateShowing(e)))}createEl(){const e=super.createEl("div",{className:"vjs-live-control vjs-control"});return this.contentEl_=_e("div",{className:"vjs-live-display"},{"aria-live":"off"}),this.contentEl_.appendChild(_e("span",{className:"vjs-control-text",textContent:"".concat(this.localize("Stream Type"),"\xa0")})),this.contentEl_.appendChild(a.a.createTextNode(this.localize("LIVE"))),e.appendChild(this.contentEl_),e}dispose(){this.contentEl_=null,super.dispose()}updateShowing(e){this.player().duration()===1/0?this.show():this.hide()}});class ui extends ri{constructor(e,t){super(e,t),this.updateLiveEdgeStatus(),this.player_.liveTracker&&(this.updateLiveEdgeStatusHandler_=e=>this.updateLiveEdgeStatus(e),this.on(this.player_.liveTracker,"liveedgechange",this.updateLiveEdgeStatusHandler_))}createEl(){const e=super.createEl("button",{className:"vjs-seek-to-live-control vjs-control"});return this.setIcon("circle",e),this.textEl_=_e("span",{className:"vjs-seek-to-live-text",textContent:this.localize("LIVE")},{"aria-hidden":"true"}),e.appendChild(this.textEl_),e}updateLiveEdgeStatus(){!this.player_.liveTracker||this.player_.liveTracker.atLiveEdge()?(this.setAttribute("aria-disabled",!0),this.addClass("vjs-at-live-edge"),this.controlText("Seek to live, currently playing live")):(this.setAttribute("aria-disabled",!1),this.removeClass("vjs-at-live-edge"),this.controlText("Seek to live, currently behind live"))}handleClick(){this.player_.liveTracker.seekToLiveEdge()}dispose(){this.player_.liveTracker&&this.off(this.player_.liveTracker,"liveedgechange",this.updateLiveEdgeStatusHandler_),this.textEl_=null,super.dispose()}}function hi(e,t,n){return e=Number(e),Math.min(n,Math.max(t,isNaN(e)?t:e))}ui.prototype.controlText_="Seek to live, currently playing live",Ut.registerComponent("SeekToLive",ui);var pi=Object.freeze({__proto__:null,clamp:hi});class mi extends Ut{constructor(e,t){super(e,t),this.handleMouseDown_=e=>this.handleMouseDown(e),this.handleMouseUp_=e=>this.handleMouseUp(e),this.handleKeyDown_=e=>this.handleKeyDown(e),this.handleClick_=e=>this.handleClick(e),this.handleMouseMove_=e=>this.handleMouseMove(e),this.update_=e=>this.update(e),this.bar=this.getChild(this.options_.barName),this.vertical(!!this.options_.vertical),this.enable()}enabled(){return this.enabled_}enable(){this.enabled()||(this.on("mousedown",this.handleMouseDown_),this.on("touchstart",this.handleMouseDown_),this.on("keydown",this.handleKeyDown_),this.on("click",this.handleClick_),this.on(this.player_,"controlsvisible",this.update),this.playerEvent&&this.on(this.player_,this.playerEvent,this.update),this.removeClass("disabled"),this.setAttribute("tabindex",0),this.enabled_=!0)}disable(){if(!this.enabled())return;const e=this.bar.el_.ownerDocument;this.off("mousedown",this.handleMouseDown_),this.off("touchstart",this.handleMouseDown_),this.off("keydown",this.handleKeyDown_),this.off("click",this.handleClick_),this.off(this.player_,"controlsvisible",this.update_),this.off(e,"mousemove",this.handleMouseMove_),this.off(e,"mouseup",this.handleMouseUp_),this.off(e,"touchmove",this.handleMouseMove_),this.off(e,"touchend",this.handleMouseUp_),this.removeAttribute("tabindex"),this.addClass("disabled"),this.playerEvent&&this.off(this.player_,this.playerEvent,this.update),this.enabled_=!1}createEl(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return t.className=t.className+" vjs-slider",t=Object.assign({tabIndex:0},t),n=Object.assign({role:"slider","aria-valuenow":0,"aria-valuemin":0,"aria-valuemax":100},n),super.createEl(e,t,n)}handleMouseDown(e){const t=this.bar.el_.ownerDocument;"mousedown"===e.type&&e.preventDefault(),"touchstart"!==e.type||J||e.preventDefault(),De(),this.addClass("vjs-sliding"),this.trigger("slideractive"),this.on(t,"mousemove",this.handleMouseMove_),this.on(t,"mouseup",this.handleMouseUp_),this.on(t,"touchmove",this.handleMouseMove_),this.on(t,"touchend",this.handleMouseUp_),this.handleMouseMove(e,!0)}handleMouseMove(e){}handleMouseUp(e){const t=this.bar.el_.ownerDocument;Pe(),this.removeClass("vjs-sliding"),this.trigger("sliderinactive"),this.off(t,"mousemove",this.handleMouseMove_),this.off(t,"mouseup",this.handleMouseUp_),this.off(t,"touchmove",this.handleMouseMove_),this.off(t,"touchend",this.handleMouseUp_),this.update()}update(){if(!this.el_||!this.bar)return;const e=this.getProgress();return e===this.progress_||(this.progress_=e,this.requestNamedAnimationFrame("Slider#update",(()=>{const t=this.vertical()?"height":"width";this.bar.el().style[t]=(100*e).toFixed(2)+"%"}))),e}getProgress(){return Number(hi(this.getPercent(),0,1).toFixed(4))}calculateDistance(e){const t=Me(this.el_,e);return this.vertical()?t.y:t.x}handleKeyDown(e){const t=this.options_.playerOptions.spatialNavigation,n=t&&t.enabled,i=t&&t.horizontalSeek;n?i&&"ArrowLeft"===e.key||!i&&"ArrowDown"===e.key?(e.preventDefault(),e.stopPropagation(),this.stepBack()):i&&"ArrowRight"===e.key||!i&&"ArrowUp"===e.key?(e.preventDefault(),e.stopPropagation(),this.stepForward()):(this.pendingSeekTime()&&(this.pendingSeekTime(null),this.userSeek_(this.player_.currentTime())),super.handleKeyDown(e)):"ArrowLeft"===e.key||"ArrowDown"===e.key?(e.preventDefault(),e.stopPropagation(),this.stepBack()):"ArrowUp"===e.key||"ArrowRight"===e.key?(e.preventDefault(),e.stopPropagation(),this.stepForward()):super.handleKeyDown(e)}handleClick(e){e.stopPropagation(),e.preventDefault()}vertical(e){if(void 0===e)return this.vertical_||!1;this.vertical_=!!e,this.vertical_?this.addClass("vjs-slider-vertical"):this.addClass("vjs-slider-horizontal")}}Ut.registerComponent("Slider",mi);const gi=(e,t)=>
vendor: 4,879 bytes, line 2
2hi(e/t*100,0,100).toFixed(2)+"%";Ut.registerComponent("LoadProgressBar",class extends Ut{constructor(e,t){super(e,t),this.partEls_=[],this.on(e,"progress",(e=>this.update(e)))}createEl(){const e=super.createEl("div",{className:"vjs-load-progress"}),t=_e("span",{className:"vjs-control-text"}),n=_e("span",{textContent:this.localize("Loaded")}),i=a.a.createTextNode(": ");return this.percentageEl_=_e("span",{className:"vjs-control-text-loaded-percentage",textContent:"0%"}),e.appendChild(t),t.appendChild(n),t.appendChild(i),t.appendChild(this.percentageEl_),e}dispose(){this.partEls_=null,this.percentageEl_=null,super.dispose()}update(e){this.requestNamedAnimationFrame("LoadProgressBar#update",(()=>{const e=this.player_.liveTracker,t=this.player_.buffered(),n=e&&e.isLive()?e.seekableEnd():this.player_.duration(),i=this.player_.bufferedEnd(),r=this.partEls_,s=gi(i,n);this.percent_!==s&&(this.el_.style.width=s,ve(this.percentageEl_,s),this.percent_=s);for(let a=0;a<t.length;a++){const e=t.start(a),n=t.end(a);let s=r[a];s||(s=this.el_.appendChild(_e()),r[a]=s),s.dataset.start===e&&s.dataset.end===n||(s.dataset.start=e,s.dataset.end=n,s.style.left=gi(e,i),s.style.width=gi(n-e,i))}for(let a=r.length;a>t.length;a--)this.el_.removeChild(r[a-1]);r.length=t.length}))}});Ut.registerComponent("TimeTooltip",class extends Ut{constructor(e,t){super(e,t),this.update=yt(bt(this,this.update),ft)}createEl(){return super.createEl("div",{className:"vjs-time-tooltip"},{"aria-hidden":"true"})}update(e,t,n){const i=Le(this.el_),r=Re(this.player_.el()),s=e.width*t;if(!r||!i)return;let a=e.left-r.left+s,o=e.width-s+(r.right-e.right);o||(o=e.width-s,a=s);let c=i.width/2;a<c?c+=c-a:o<c&&(c=o),c<0?c=0:c>i.width&&(c=i.width),c=Math.round(c),this.el_.style.right="-".concat(c,"px"),this.write(n)}write(e){ve(this.el_,e)}updateTime(e,t,n,i){this.requestNamedAnimationFrame("TimeTooltip#updateTime",(()=>{let r;const s=this.player_.duration();if(this.player_.liveTracker&&this.player_.liveTracker.isLive()){const e=this.player_.liveTracker.liveWindow(),n=e-t*e;r=(n<1?"":"-")+Xt(n,e)}else r=Xt(n,s);this.update(e,t,r),i&&i()}))}});class fi extends Ut{constructor(e,t){super(e,t),this.setIcon("circle"),this.update=yt(bt(this,this.update),ft)}createEl(){return super.createEl("div",{className:"vjs-play-progress vjs-slider-bar"},{"aria-hidden":"true"})}update(e,t,n){const i=this.getChild("timeTooltip");if(!i)return;const r=n&&n.target&&"function"===typeof n.target.pendingSeekTime?n.target.pendingSeekTime():this.player_.scrubbing()?this.player_.getCache().currentTime:this.player_.currentTime();i.updateTime(e,t,r)}}fi.prototype.options_={children:[]},he||Y||fi.prototype.options_.children.push("timeTooltip"),Ut.registerComponent("PlayProgressBar",fi);class bi extends Ut{constructor(e,t){super(e,t),this.update=yt(bt(this,this.update),ft)}createEl(){return super.createEl("div",{className:"vjs-mouse-display"})}update(e,t){const n=t*this.player_.duration();this.getChild("timeTooltip").updateTime(e,t,n,(()=>{this.el_.style.left="".concat(e.width*t,"px")}))}}bi.prototype.options_={children:["timeTooltip"]},Ut.registerComponent("MouseTimeDisplay",bi);class yi extends mi{constructor(e,t){(t=z(yi.prototype.options_,t)).children=[...t.children];const n=e.options_.disableSeekWhileScrubbingOnMobile&&(he||Y)||e.options_.disableSeekWhileScrubbingOnSTV;(!he&&!Y||n)&&t.children.splice(1,0,"mouseTimeDisplay"),super(e,t),this.shouldDisableSeekWhileScrubbing_=n,this.pendingSeekTime_=null,this.setEventHandlers_()}setEventHandlers_(){this.update_=bt(this,this.update),this.update=yt(this.update_,ft),this.on(this.player_,["durationchange","timeupdate"],this.update),this.on(this.player_,["ended"],this.update_),this.player_.liveTracker&&this.on(this.player_.liveTracker,"liveedgechange",this.update),this.updateInterval=null,this.enableIntervalHandler_=e=>this.enableInterval_(e),this.disableIntervalHandler_=e=>this.disableInterval_(e),this.on(this.player_,["playing"],this.enableIntervalHandler_),this.on(this.player_,["ended","pause","waiting"],this.disableIntervalHandler_),"hidden"in a.a&&"visibilityState"in a.a&&this.on(a.a,"visibilitychange",this.toggleVisibility_)}toggleVisibility_(e){"hidden"===a.a.visibilityState?(this.cancelNamedAnimationFrame("SeekBar#update"),this.cancelNamedAnimationFrame("Slider#update"),this.disableInterval_(e)):(this.player_.ended()||this.player_.paused()||this.enableInterval_(),this.update())}enableInterval_(){this.updateInterval||(this.updateInterval=this.setInterval(this.update,ft))}disableInterval_(e){this.player_.liveTracker&&this.player_.liveTracker.isLive()&&e&&"ended"!==e.type||this.updateInterval&&(this.clearInterval(this.updateInterval),this.updateInterval=null)}createEl(){return super.createEl("div",{className:"vjs-progress-holder"},{"aria-label":this.localize("Progress Bar")})}update(e){if("hidden"===a.a.visibilityState)return;
vendor: 5,044 bytes, line 2
2const t=super.update();return this.requestNamedAnimationFrame("SeekBar#update",(()=>{const n=this.player_.ended()?this.player_.duration():this.getCurrentTime_(),i=this.player_.liveTracker;let r=this.player_.duration();i&&i.isLive()&&(r=this.player_.liveTracker.liveCurrentTime()),this.percent_!==t&&(this.el_.setAttribute("aria-valuenow",(100*t).toFixed(2)),this.percent_=t),this.currentTime_===n&&this.duration_===r||(this.el_.setAttribute("aria-valuetext",this.localize("progress bar timing: currentTime={1} duration={2}",[Xt(n,r),Xt(r,r)],"{1} of {2}")),this.currentTime_=n,this.duration_=r),this.bar&&this.bar.update(Re(this.el()),this.getProgress(),e)})),t}userSeek_(e){this.player_.liveTracker&&this.player_.liveTracker.isLive()&&this.player_.liveTracker.nextSeekedFromUser(),this.player_.currentTime(e)}getCurrentTime_(){return this.player_.scrubbing()?this.player_.getCache().currentTime:this.player_.currentTime()}pendingSeekTime(e){if(void 0!==e)if(null!==e){const t=this.player_.duration();this.pendingSeekTime_=Math.max(0,Math.min(e,t))}else this.pendingSeekTime_=null;return this.pendingSeekTime_}getPercent(){if(null!==this.pendingSeekTime())return this.pendingSeekTime()/this.player_.duration();const e=this.getCurrentTime_();let t;const n=this.player_.liveTracker;return n&&n.isLive()?(t=(e-n.seekableStart())/n.liveWindow(),n.atLiveEdge()&&(t=1)):t=e/this.player_.duration(),t}handleMouseDown(e){qe(e)&&(e.stopPropagation(),this.videoWasPlaying=!this.player_.paused(),this.shouldDisableSeekWhileScrubbing_||this.player_.pause(),super.handleMouseDown(e))}handleMouseMove(e){let t,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(!qe(e)||isNaN(this.player_.duration()))return;n||this.player_.scrubbing()||this.player_.scrubbing(!0);const i=this.calculateDistance(e),r=this.player_.liveTracker;if(r&&r.isLive()){if(i>=.99)return void r.seekToLiveEdge();const e=r.seekableStart(),n=r.liveCurrentTime();if(t=e+i*r.liveWindow(),t>=n&&(t=n),t<=e&&(t=e+.1),t===1/0)return}else t=i*this.player_.duration(),t===this.player_.duration()&&(t-=.1);this.shouldDisableSeekWhileScrubbing_?this.pendingSeekTime(t):this.userSeek_(t),this.player_.options_.enableSmoothSeeking&&this.update()}enable(){super.enable();const e=this.getChild("mouseTimeDisplay");e&&e.show()}disable(){super.disable();const e=this.getChild("mouseTimeDisplay");e&&e.hide()}handleMouseUp(e){super.handleMouseUp(e),e&&e.stopPropagation(),this.player_.scrubbing(!1),null!==this.pendingSeekTime()&&(this.userSeek_(this.pendingSeekTime()),this.pendingSeekTime(null)),this.player_.trigger({type:"timeupdate",target:this,manuallyTriggered:!0}),this.videoWasPlaying?Jt(this.player_.play()):this.update_()}handlePendingSeek_(e){this.player_.paused()||this.player_.pause();const t=null!==this.pendingSeekTime()?this.pendingSeekTime():this.player_.currentTime();this.pendingSeekTime(t+e),this.player_.trigger({type:"timeupdate",target:this,manuallyTriggered:!0})}stepForward(){this.shouldDisableSeekWhileScrubbing_?this.handlePendingSeek_(this.options().stepSeconds):this.userSeek_(this.player_.currentTime()+this.options().stepSeconds)}stepBack(){this.shouldDisableSeekWhileScrubbing_?this.handlePendingSeek_(-this.options().stepSeconds):this.userSeek_(this.player_.currentTime()-this.options().stepSeconds)}handleAction(e){null!==this.pendingSeekTime()&&(this.userSeek_(this.pendingSeekTime()),this.pendingSeekTime(null)),this.player_.paused()?this.player_.play():this.player_.pause()}handleKeyDown(e){const t=this.player_.liveTracker;if(" "===e.key||"Enter"===e.key)e.preventDefault(),e.stopPropagation(),this.handleAction(e);else if("Home"===e.key)e.preventDefault(),e.stopPropagation(),this.userSeek_(0);else if("End"===e.key)e.preventDefault(),e.stopPropagation(),t&&t.isLive()?this.userSeek_(t.liveCurrentTime()):this.userSeek_(this.player_.duration());else if(/^[0-9]$/.test(e.key)){e.preventDefault(),e.stopPropagation();const n=.1*parseInt(e.key,10);t&&t.isLive()?this.userSeek_(t.seekableStart()+t.liveWindow()*n):this.userSeek_(this.player_.duration()*n)}else"PageDown"===e.key?(e.preventDefault(),e.stopPropagation(),this.userSeek_(this.player_.currentTime()-this.options().stepSeconds*this.options().pageMultiplier)):"PageUp"===e.key?(e.preventDefault(),e.stopPropagation(),this.userSeek_(this.player_.currentTime()+this.options().stepSeconds*this.options().pageMultiplier)):super.handleKeyDown(e)}dispose(){this.disableInterval_(),this.off(this.player_,["durationchange","timeupdate"],this.update),this.off(this.player_,["ended"],this.update_),this.player_.liveTracker&&this.off(this.player_.liveTracker,"liveedgechange",this.update),this.off(this.player_,["playing"],this.enableIntervalHandler_),this.off(this.player_,["ended","pause","waiting"],this.disableIntervalHandler_),"hidden"in a.a&&"visibilityState"in a.a&&this.off(a.a,"visibilitychange",this.toggleVisibility_),super.dispose()}}yi.prototype.options_={children:["loadProgressBar","playProgressBar"],barName:"playProgressBar",stepSeconds:5,pageMultiplier:12},Ut.registerComponent("SeekBar",yi);
vendor: 7,370 bytes, line 2
2class ji extends Ut{constructor(e,t){super(e,t),this.handleMouseMove=yt(bt(this,this.handleMouseMove),ft),this.throttledHandleMouseSeek=yt(bt(this,this.handleMouseSeek),ft),this.handleMouseUpHandler_=e=>this.handleMouseUp(e),this.handleMouseDownHandler_=e=>this.handleMouseDown(e),this.enable()}createEl(){return super.createEl("div",{className:"vjs-progress-control vjs-control"})}handleMouseMove(e){const t=this.getChild("seekBar");if(!t)return;const n=t.getChild("playProgressBar"),i=t.getChild("mouseTimeDisplay");if(!n&&!i)return;const r=t.el(),s=Le(r);let a=Me(r,e).x;a=hi(a,0,1),i&&i.update(s,a),n&&n.update(s,t.getProgress())}handleMouseSeek(e){const t=this.getChild("seekBar");t&&t.handleMouseMove(e)}enabled(){return this.enabled_}disable(){if(this.children().forEach((e=>e.disable&&e.disable())),this.enabled()&&(this.off(["mousedown","touchstart"],this.handleMouseDownHandler_),this.off(this.el_,["mousemove","touchmove"],this.handleMouseMove),this.removeListenersAddedOnMousedownAndTouchstart(),this.addClass("disabled"),this.enabled_=!1,this.player_.scrubbing())){const e=this.getChild("seekBar");this.player_.scrubbing(!1),e.videoWasPlaying&&Jt(this.player_.play())}}enable(){this.children().forEach((e=>e.enable&&e.enable())),this.enabled()||(this.on(["mousedown","touchstart"],this.handleMouseDownHandler_),this.on(this.el_,["mousemove","touchmove"],this.handleMouseMove),this.removeClass("disabled"),this.enabled_=!0)}removeListenersAddedOnMousedownAndTouchstart(){const e=this.el_.ownerDocument;this.off(e,"mousemove",this.throttledHandleMouseSeek),this.off(e,"touchmove",this.throttledHandleMouseSeek),this.off(e,"mouseup",this.handleMouseUpHandler_),this.off(e,"touchend",this.handleMouseUpHandler_)}handleMouseDown(e){const t=this.el_.ownerDocument,n=this.getChild("seekBar");n&&n.handleMouseDown(e),this.on(t,"mousemove",this.throttledHandleMouseSeek),this.on(t,"touchmove",this.throttledHandleMouseSeek),this.on(t,"mouseup",this.handleMouseUpHandler_),this.on(t,"touchend",this.handleMouseUpHandler_)}handleMouseUp(e){const t=this.getChild("seekBar");t&&t.handleMouseUp(e),this.removeListenersAddedOnMousedownAndTouchstart()}}ji.prototype.options_={children:["seekBar"]},Ut.registerComponent("ProgressControl",ji);class _i extends ri{constructor(e,t){super(e,t),this.setIcon("picture-in-picture-enter"),this.on(e,["enterpictureinpicture","leavepictureinpicture"],(e=>this.handlePictureInPictureChange(e))),this.on(e,["disablepictureinpicturechanged","loadedmetadata"],(e=>this.handlePictureInPictureEnabledChange(e))),this.on(e,["loadedmetadata","audioonlymodechange","audiopostermodechange"],(()=>this.handlePictureInPictureAudioModeChange())),this.disable()}buildCSSClass(){return"vjs-picture-in-picture-control vjs-hidden ".concat(super.buildCSSClass())}handlePictureInPictureAudioModeChange(){"audio"===this.player_.currentType().substring(0,5)||this.player_.audioPosterMode()||this.player_.audioOnlyMode()?(this.player_.isInPictureInPicture()&&this.player_.exitPictureInPicture(),this.hide()):this.show()}handlePictureInPictureEnabledChange(){a.a.pictureInPictureEnabled&&!1===this.player_.disablePictureInPicture()||this.player_.options_.enableDocumentPictureInPicture&&"documentPictureInPicture"in r.a?this.enable():this.disable()}handlePictureInPictureChange(e){this.player_.isInPictureInPicture()?(this.setIcon("picture-in-picture-exit"),this.controlText("Exit Picture-in-Picture")):(this.setIcon("picture-in-picture-enter"),this.controlText("Picture-in-Picture")),this.handlePictureInPictureEnabledChange()}handleClick(e){this.player_.isInPictureInPicture()?this.player_.exitPictureInPicture():this.player_.requestPictureInPicture()}show(){"function"===typeof a.a.exitPictureInPicture&&super.show()}}_i.prototype.controlText_="Picture-in-Picture",Ut.registerComponent("PictureInPictureToggle",_i);class vi extends ri{constructor(e,t){super(e,t),this.setIcon("fullscreen-enter"),this.on(e,"fullscreenchange",(e=>this.handleFullscreenChange(e))),!1===a.a[e.fsApi_.fullscreenEnabled]&&this.disable()}buildCSSClass(){return"vjs-fullscreen-control ".concat(super.buildCSSClass())}handleFullscreenChange(e){this.player_.isFullscreen()?(this.controlText("Exit Fullscreen"),this.setIcon("fullscreen-exit")):(this.controlText("Fullscreen"),this.setIcon("fullscreen-enter"))}handleClick(e){this.player_.isFullscreen()?this.player_.exitFullscreen():this.player_.requestFullscreen()}}vi.prototype.controlText_="Fullscreen",Ut.registerComponent("FullscreenToggle",vi);Ut.registerComponent("VolumeLevel",class extends Ut{createEl(){const e=super.createEl("div",{className:"vjs-volume-level"});return this.setIcon("circle",e),e.appendChild(super.createEl("span",{className:"vjs-control-text"})),e}});Ut.registerComponent("VolumeLevelTooltip",class extends Ut{constructor(e,t){super(e,t),this.update=yt(bt(this,this.update),ft)}createEl(){return super.createEl("div",{className:"vjs-volume-tooltip"},{"aria-hidden":"true"})}update(e,t,n,i){if(!n){const n=Re(this.el_),i=Re(this.player_.el()),r=e.width*t;if(!i||!n)return;const s=e.left-i.left+r,a=e.width-r+(i.right-e.right);let o=n.width/2;s<o?o+=o-s:a<o&&(o=a),o<0?o=0:o>n.width&&(o=n.width),this.el_.style.right="-".concat(o,"px")}this.write("".concat(i,"%"))}write(e){ve(this.el_,e)}updateVolume(e,t,n,i,r){this.requestNamedAnimationFrame("VolumeLevelTooltip#updateVolume",(()=>{this.update(e,t,n,i.toFixed(0)),r&&r()}))}});class xi extends Ut{constructor(e,t){super(e,t),this.update=yt(bt(this,this.update),ft)}createEl(){return super.createEl("div",{className:"vjs-mouse-display"})}update(e,t,n){const i=100*t;this.getChild("volumeLevelTooltip").updateVolume(e,t,n,i,(()=>{n?this.el_.style.bottom="".concat(e.height*t,"px"):this.el_.style.left="".concat(e.width*t,"px")}))}}xi.prototype.options_={children:["volumeLevelTooltip"]},Ut.registerComponent("MouseVolumeLevelDisplay",xi);class Oi extends mi{constructor(e,t){super(e,t),this.on("slideractive",(e=>this.updateLastVolume_(e))),this.on(e,"volumechange",(e=>this.updateARIAAttributes(e))),e.ready((()=>this.updateARIAAttributes()))}createEl(){return super.createEl("div",{className:"vjs-volume-bar vjs-slider-bar"},{"aria-label":this.localize("Volume Level"),"aria-live":"polite"})}handleMouseDown(e){qe(e)&&super.handleMouseDown(e)}handleMouseMove(e){const t=this.getChild("mouseVolumeLevelDisplay");if(t){const n=this.el(),i=Re(n),r=this.vertical();let s=Me(n,e);s=r?s.y:s.x,s=hi(s,0,1),t.update(i,s,r)}qe(e)&&(this.checkMuted(),this.player_.volume(this.calculateDistance(e)))}checkMuted(){this.player_.muted()&&this.player_.muted(!1)}getPercent(){return this.player_.muted()?0:this.player_.volume()}stepForward(){this.checkMuted(),this.player_.volume(this.player_.volume()+.1)}stepBack(){this.checkMuted(),this.player_.volume(this.player_.volume()-.1)}updateARIAAttributes(e){const t=this.player_.muted()?0:this.volumeAsPercentage_();this.el_.setAttribute("aria-valuenow",t),this.el_.setAttribute("aria-valuetext",t+"%")}volumeAsPercentage_(){return Math.round(100*this.player_.volume())}updateLastVolume_(){const e=this.player_.volume();this.one("sliderinactive",(()=>{0===this.player_.volume()&&this.player_.lastVolume_(e)}))}}Oi.prototype.options_={children:["volumeLevel"],barName:"volumeLevel"},he||Y||Oi.prototype.options_.children.splice(0,0,"mouseVolumeLevelDisplay"),Oi.prototype.playerEvent="volumechange",Ut.registerComponent("
2VolumeBar",Oi);class Ti extends Ut{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};t.vertical=t.vertical||!1,("undefined"===typeof t.volumeBar||F(t.volumeBar))&&(t.volumeBar=t.volumeBar||{},t.volumeBar.vertical=t.vertical),super(e,t),function(e,t){t.tech_&&!t.tech_.featuresVolumeControl&&e.addClass("vjs-hidden"),e.on(t,"loadstart",(function(){t.tech_.featuresVolumeControl?e.removeClass("vjs-hidden"):e.addClass("vjs-hidden")}))}(this,e),this.throttledHandleMouseMove=yt(bt(this,this.handleMouseMove),ft),this.handleMouseUpHandler_=e=>this.handleMouseUp(e),this.on("mousedown",(e=>this.handleMouseDown(e))),this.on("touchstart",(e=>this.handleMouseDown(e))),this.on("mousemove",(e=>this.handleMouseMove(e))),this.on(this.volumeBar,["focus","slideractive"],(()=>{this.volumeBar.addClass("vjs-slider-active"),this.addClass("vjs-slider-active"),this.trigger("slideractive")})),this.on(this.volumeBar,["blur","sliderinactive"],(()=>{this.volumeBar.removeClass("vjs-slider-active"),this.removeClass("vjs-slider-active"),this.trigger("sliderinactive")}))}createEl(){let e="vjs-volume-horizontal";return this.options_.vertical&&(e="vjs-volume-vertical"),super.createEl("div",{className:"vjs-volume-control vjs-control ".concat(e)})}handleMouseDown(e){const t=this.el_.ownerDocument;this.on(t,"mousemove",this.throttledHandleMouseMove),this.on(t,"touchmove",this.throttledHandleMouseMove),this.on(t,"mouseup",this.handleMouseUpHandler_),this.on(t,"touchend",this.handleMouseUpHandler_)}handleMouseUp(e){const t=this.el_.ownerDocument;this.off(t,"mousemove",this.throttledHandleMouseMove),this.off(t,"touchmove",this.throttledHandleMouseMove),this.off(t,"mouseup",this.handleMouseUpHandler_),this.off(t,"touchend",this.handleMouseUpHandler_)}handleMouseMove(e){this.volumeBar.handleMouseMove(e)}}Ti.prototype.options_={children:["volumeBar"]},Ut.registerComponent("VolumeControl",Ti);class Si extends ri{constructor(e,t){super(e,t),function(e,t){t.tech_&&!t.tech_.featuresMuteControl&&e.addClass("vjs-hidden"),e.on(t,"loadstart",(function(){t.tech_.featuresMuteControl?e.removeClass("vjs-hidden"):e.addClass("vjs-hidden")}))}(this,e),this.on(e,["loadstart","volumechange"],(e=>this.update(e)))}buildCSSClass(){return"vjs-mute-control ".concat(super.buildCSSClass())}handleClick(e){const t=this.player_.volume(),n=this.player_.lastVolume_();if(0===t){const e=n<.1?.1:n;this.player_.volume(e),this.player_.muted(!1)}else this.player_.muted(!this.player_.muted())}update(e){this.updateIcon_(),this.updateControlText_()}updateIcon_(){const e=this.player_.volume();let t=3;this.setIcon("volume-high"),he&&this.player_.tech_&&this.player_.tech_.el_&&this.player_.muted(this.player_.tech_.el_.muted),0===e||this.player_.muted()?(this.setIcon("volume-mute"),t=0):e<.33?(this.setIcon("volume-low"),t=1):e<.67&&(this.setIcon("volume-medium"),t=2),Se(this.el_,[0,1,2,3].reduce(((e,t)=>e+"".concat(t?" ":"","vjs-vol-").concat(t)),"")),Te(this.el_,"vjs-vol-".concat(t))}updateControlText_(){const e=this.player_.muted()||0===this.player_.volume()?"Unmute":"Mute";this.controlText()!==e&&this.controlText(e)}}Si.prototype.controlText_="Mute",Ut.registerComponent("MuteToggle",Si);class wi extends Ut{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};"undefined"!==typeof t.inline?t.inline=t.inline:t.inline=!0,("undefined"===typeof t.volumeControl||F(t.volumeControl))&&(t.volumeControl=t.volumeControl||{},t.volumeControl.vertical=!t.inline),super(e,t),this.handleKeyPressHandler_=e=>this.handleKeyPress(e),this.on(e,["loadstart"],(e=>this.volumePanelState_(e))),this.on(this.muteToggle,"keyup",(e=>this.handleKeyPress(e))),this.on(this.volumeControl,"keyup",(e=>this.handleVolumeControlKeyUp(e))),this.on("keydown",(e=>this.handleKeyPress(e))),this.on("mouseover",(e=>this.handleMouseOver(e))),this.on("mouseout",(e=>this.handleMouseOut(e))),this.on(this.volumeControl,["slideractive"],this.sliderActive_),this.on(this.volumeControl,["sliderinactive"],this.sliderInactive_)}sliderActive_(){this.addClass("vjs-slider-active")}sliderInactive_(){this.removeClass("vjs-slider-active")}volumePanelState_(){this.volumeControl.hasClass("vjs-hidden")&&this.muteToggle.hasClass("vjs-hidden")&&this.addClass("vjs-hidden"),this.volumeControl.hasClass("vjs-hidden")&&!this.muteToggle.hasClass("vjs-hidden")&&this.addClass("vjs-mute-toggle-only")}createEl(){let e="vjs-volume-panel-horizontal";return this.options_.inline||(e="vjs-volume-panel-vertical"),super.createEl("div",{className:"vjs-volume-panel vjs-control ".concat(e)})}dispose(){this.handleMouseOut(),super.dispose()}handleVolumeControlKeyUp(e){"Escape"===e.key&&this.muteToggle.focus()}handleMouseOver(e){this.addClass("vjs-hover"),dt(a.a,"keyup",this.handleKeyPressHandler_)}handleMouseOut(e){this.removeClass("vjs-hover"),ut(a.a,"keyup",this.handleKeyPressHandler_)}handleKeyPress(e){"Escape"===e.key&&this.handleMouseOut()}}wi.prototype.options_={children:["muteToggle","volumeControl"]}
2,Ut.registerComponent("VolumePanel",wi);class Ai extends ri{constructor(e,t){super(e,t),this.validOptions=[5,10,30],this.skipTime=this.getSkipForwardTime(),this.skipTime&&this.validOptions.includes(this.skipTime)?(this.setIcon("forward-".concat(this.skipTime)),this.controlText(this.localize("Skip forward {1} seconds",[this.skipTime.toLocaleString(e.language())])),this.show()):this.hide()}getSkipForwardTime(){const e=this.options_.playerOptions;return e.controlBar&&e.controlBar.skipButtons&&e.controlBar.skipButtons.forward}buildCSSClass(){return"vjs-skip-forward-".concat(this.getSkipForwardTime()," ").concat(super.buildCSSClass())}handleClick(e){if(isNaN(this.player_.duration()))return;const t=this.player_.currentTime(),n=this.player_.liveTracker,i=n&&n.isLive()?n.seekableEnd():this.player_.duration();let r;r=t+this.skipTime<=i?t+this.skipTime:i,this.player_.currentTime(r)}handleLanguagechange(){this.controlText(this.localize("Skip forward {1} seconds",[this.skipTime]))}}Ai.prototype.controlText_="Skip Forward",Ut.registerComponent("SkipForward",Ai);class ki extends ri{constructor(e,t){super(e,t),this.validOptions=[5,10,30],this.skipTime=this.getSkipBackwardTime(),this.skipTime&&this.validOptions.includes(this.skipTime)?(this.setIcon("replay-".concat(this.skipTime)),this.controlText(this.localize("Skip backward {1} seconds",[this.skipTime.toLocaleString(e.language())])),this.show()):this.hide()}getSkipBackwardTime(){const e=this.options_.playerOptions;return e.controlBar&&e.controlBar.skipButtons&&e.controlBar.skipButtons.backward}buildCSSClass(){return"vjs-skip-backward-".concat(this.getSkipBackwardTime()," ").concat(super.buildCSSClass())}handleClick(e){const t=this.player_.currentTime(),n=this.player_.liveTracker,i=n&&n.isLive()&&n.seekableStart();let r;r=i&&t-this.skipTime<=i?i:t>=this.skipTime?t-this.skipTime:0,this.player_.currentTime(r)}handleLanguagechange(){this.controlText(this.localize("Skip backward {1} seconds",[this.skipTime]))}}ki.prototype.controlText_="Skip Backward",Ut.registerComponent("SkipBackward",ki);class Ci extends Ut{constructor(e,t){super(e,t),t&&(this.menuButton_=t.menuButton),this.focusedChild_=-1,this.on("keydown",(e=>this.handleKeyDown(e))),this.boundHandleBlur_=e=>this.handleBlur(e),this.boundHandleTapClick_=e=>this.handleTapClick(e)}addEventListenerForItem(e){e instanceof Ut&&(this.on(e,"blur",this.boundHandleBlur_),this.on(e,["tap","click"],this.boundHandleTapClick_))}removeEventListenerForItem(e){e instanceof Ut&&(this.off(e,"blur",this.boundHandleBlur_),this.off(e,["tap","click"],this.boundHandleTapClick_))}removeChild(e){"string"===typeof e&&(e=this.getChild(e)),this.removeEventListenerForItem(e),super.removeChild(e)}addItem(e){const t=this.addChild(e);t&&this.addEventListenerForItem(t)}createEl(){const e=this.options_.contentElType||"ul";this.contentEl_=_e(e,{className:"vjs-menu-content"}),this.contentEl_.setAttribute("role","menu");const t=super.createEl("div",{append:this.contentEl_,className:"vjs-menu"});return t.appendChild(this.contentEl_),dt(t,"click",(function(e){e.preventDefault(),e.stopImmediatePropagation()})),t}dispose(){this.contentEl_=null,this.boundHandleBlur_=null,this.boundHandleTapClick_=null,super.dispose()}handleBlur(e){const t=e.relatedTarget||a.a.activeElement;if(!this.children().some((e=>e.el()===t))){const e=this.menuButton_;e&&e.buttonPressed_&&t!==e.el().firstChild&&e.unpressButton()}}handleTapClick(e){if(this.menuButton_){this.menuButton_.unpressButton();const t=this.children();if(!Array.isArray(t))return;const n=t.filter((t=>t.el()===e.target))[0];if(!n)return;"CaptionSettingsMenuItem"!==n.name()&&this.menuButton_.focus()}}handleKeyDown(e){"ArrowLeft"===e.key||"ArrowDown"===e.key?(e.preventDefault(),e.stopPropagation(),this.stepForward()):"ArrowRight"!==e.key&&"ArrowUp"!==e.key||(e.preventDefault(),e.stopPropagation(),this.stepBack())}stepForward(){let e=0;void 0!==this.focusedChild_&&(e=this.focusedChild_+1),this.focus(e)}stepBack(){let e=0;void 0!==this.focusedChild_&&(e=this.focusedChild_-1),this.focus(e)}focus(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;const t=this.children().slice();t.length&&t[0].hasClass("vjs-menu-title")&&t.shift(),t.length>0&&(e<0?e=0:e>=t.length&&(e=t.length-1),this.focusedChild_=e,t[e].el_.focus())}}Ut.registerComponent("Menu",Ci);class Ei extends Ut{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};super(e,t),this.menuButton_=new ri(e,t),this.menuButton_.controlText(this.controlText_),this.menuButton_.el_.setAttribute("aria-haspopup","true");const n=ri.prototype.buildCSSClass();this.menuButton_.el_.className=this.buildCSSClass()+" "+n,this.menuButton_.removeClass("vjs-control"),this.addChild(this.menuButton_),this.update(),this.enabled_=!0;const i=e=>this.handleClick(e);this.handleMenuKeyUp_=e=>this.handleMenuKeyUp(e),this.on(this.menuButton_,"tap",i),this.on(this.menuButton_,"click",i),this.on(this.menuButton_,"keydown",(e=>this.handleKeyDown(e))),this.on(this.menuButton_,"mouseenter",(()=>{this.addClass("vjs-hover"),this.menu.show(),dt(a.a,"keyup",this.handleMenuKeyUp_)}
2)),this.on("mouseleave",(e=>this.handleMouseLeave(e))),this.on("keydown",(e=>this.handleSubmenuKeyDown(e)))}update(){const e=this.createMenu();this.menu&&(this.menu.dispose(),this.removeChild(this.menu)),this.menu=e,this.addChild(e),this.buttonPressed_=!1,this.menuButton_.el_.setAttribute("aria-expanded","false"),this.items&&this.items.length<=this.hideThreshold_?(this.hide(),this.menu.contentEl_.removeAttribute("role")):(this.show(),this.menu.contentEl_.setAttribute("role","menu"))}createMenu(){const e=new Ci(this.player_,{menuButton:this});if(this.hideThreshold_=0,this.options_.title){const t=_e("li",{className:"vjs-menu-title",textContent:Mt(this.options_.title),tabIndex:-1}),n=new Ut(this.player_,{el:t});e.addItem(n)}if(this.items=this.createItems(),this.items)for(let t=0;t<this.items.length;t++)e.addItem(this.items[t]);return e}createItems(){}createEl(){return super.createEl("div",{className:this.buildWrapperCSSClass()},{})}setIcon(e){super.setIcon(e,this.menuButton_.el_)}buildWrapperCSSClass(){let e="vjs-menu-button";!0===this.options_.inline?e+="-inline":e+="-popup";const t=ri.prototype.buildCSSClass();return"vjs-menu-button ".concat(e," ").concat(t," ").concat(super.buildCSSClass())}buildCSSClass(){let e="vjs-menu-button";return!0===this.options_.inline?e+="-inline":e+="-popup","vjs-menu-button ".concat(e," ").concat(super.buildCSSClass())}controlText(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.menuButton_.el();return this.menuButton_.controlText(e,t)}dispose(){this.handleMouseLeave(),super.dispose()}handleClick(e){this.buttonPressed_?this.unpressButton():this.pressButton()}handleMouseLeave(e){this.removeClass("vjs-hover"),ut(a.a,"keyup",this.handleMenuKeyUp_)}focus(){this.menuButton_.focus()}blur(){this.menuButton_.blur()}handleKeyDown(e){"Escape"===e.key||"Tab"===e.key?(this.buttonPressed_&&this.unpressButton(),"Tab"===!e.key&&(e.preventDefault(),this.menuButton_.focus())):"Up"!==e.key&&("Down"!==e.key||this.player_.options_.playerOptions.spatialNavigation&&this.player_.options_.playerOptions.spatialNavigation.enabled)||this.buttonPressed_||(e.preventDefault(),this.pressButton())}handleMenuKeyUp(e){"Escape"!==e.key&&"Tab"!==e.key||this.removeClass("vjs-hover")}handleSubmenuKeyPress(e){this.handleSubmenuKeyDown(e)}handleSubmenuKeyDown(e){"Escape"!==e.key&&"Tab"!==e.key||(this.buttonPressed_&&this.unpressButton(),"Tab"===!e.key&&(e.preventDefault(),this.menuButton_.focus()))}pressButton(){if(this.enabled_){if(this.buttonPressed_=!0,this.menu.show(),this.menu.lockShowing(),this.menuButton_.el_.setAttribute("aria-expanded","true"),he&&ye())return;this.menu.focus()}}unpressButton(){this.enabled_&&(this.buttonPressed_=!1,this.menu.unlockShowing(),this.menu.hide(),this.menuButton_.el_.setAttribute("aria-expanded","false"))}disable(){this.unpressButton(),this.enabled_=!1,this.addClass("vjs-disabled"),this.menuButton_.disable()}enable(){this.enabled_=!0,this.removeClass("vjs-disabled"),this.menuButton_.enable()}}Ut.registerComponent("MenuButton",Ei);class Ii extends Ei{constructor(e,t){const n=t.tracks;if(super(e,t),this.items.length<=1&&this.hide(),!n)return;const i=bt(this,this.update);n.addEventListener("removetrack",i),n.addEventListener("addtrack",i),n.addEventListener("labelchange",i),this.player_.on("ready",i),this.player_.on("dispose",(function(){n.removeEventListener("removetrack",i),n.removeEventListener("addtrack",i),n.removeEventListener("labelchange",i)}))}}Ut.registerComponent("TrackButton",Ii);class Di extends Qn{constructor(e,t){super(e,t),this.selectable=t.selectable,this.isSelected_=t.selected||!1,this.multiSelectable=t.multiSelectable,this.selected(this.isSelected_),this.selectable?this.multiSelectable?this.el_.setAttribute("role","menuitemcheckbox"):this.el_.setAttribute("role","menuitemradio"):this.el_.setAttribute("role","menuitem")}createEl(e,t,n){this.nonIconControl=!0;const i=super.createEl("li",Object.assign({className:"vjs-menu-item",tabIndex:-1},t),n),r=_e("span",{className:"vjs-menu-item-text",textContent:this.localize(this.options_.label)});return this.player_.options_.experimentalSvgIcons?i.appendChild(r):i.replaceChild(r,i.querySelector(".vjs-icon-placeholder")),i}handleKeyDown(e){["Tab","Escape","ArrowUp","ArrowLeft","ArrowRight","ArrowDown"].includes(e.ke
2y)||super.handleKeyDown(e)}handleClick(e){this.selected(!0)}selected(e){this.selectable&&(e?(this.addClass("vjs-selected"),this.el_.setAttribute("aria-checked","true"),this.controlText(", selected"),this.isSelected_=!0):(this.removeClass("vjs-selected"),this.el_.setAttribute("aria-checked","false"),this.controlText(""),this.isSelected_=!1))}}Ut.registerComponent("MenuItem",Di);class Pi extends Di{constructor(e,t){var n;const i=t.track,s=e.textTracks();t.label=i.label||i.language||"Unknown",t.selected="showing"===i.mode,super(e,t),n=this,this.track=i,this.kinds=(t.kinds||[t.kind||this.track.kind]).filter(Boolean);const o=function(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];n.handleTracksChange.apply(n,t)},c=function(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];n.handleSelectedLanguageChange.apply(n,t)};if(e.on(["loadstart","texttrackchange"],o),s.addEventListener("change",o),s.addEventListener("selectedlanguagechange",c),this.on("dispose",(function(){e.off(["loadstart","texttrackchange"],o),s.removeEventListener("change",o),s.removeEventListener("selectedlanguagechange",c)})),void 0===s.onchange){let e;this.on(["tap","click"],(function(){if("object"!==typeof r.a.Event)try{e=new r.a.Event("change")}catch(t){}e||(e=a.a.createEvent("Event"),e.initEvent("change",!0,!0)),s.dispatchEvent(e)}))}this.handleTracksChange()}handleClick(e){const t=this.track,n=this.player_.textTracks();if(super.handleClick(e),n)for(let i=0;i<n.length;i++){const e=n[i];-1!==this.kinds.indexOf(e.kind)&&(e===t?"showing"!==e.mode&&(e.mode="showing"):"disabled"!==e.mode&&(e.mode="disabled"))}}handleTracksChange(e){const t="showing"===this.track.mode;t!==this.isSelected_&&this.selected(t)}handleSelectedLanguageChange(e){if("showing"===this.track.mode){const e=this.player_.cache_.selectedLanguage;if(e&&e.enabled&&e.language===this.track.language&&e.kind!==this.track.kind)return;this.player_.cache_.selectedLanguage={enabled:!0,language:this.track.language,kind:this.track.kind}}}dispose(){this.track=null,super.dispose()}}Ut.registerComponent("TextTrackMenuItem",Pi);class Ri extends Pi{constructor(e,t){t.track={player:e,kind:t.kind,kinds:t.kinds,default:!1,mode:"disabled"},t.kinds||(t.kinds=[t.kind]),t.label?t.track.label=t.label:t.track.label=t.kinds.join(" and ")+" off",t.selectable=!0,t.multiSelectable=!1,super(e,t)}handleTracksChange(e){const t=this.player().textTracks();let n=!0;for(let i=0,r=t.length;i<r;i++){const e=t[i];if(this.options_.kinds.indexOf(e.kind)>-1&&"showing"===e.mode){n=!1;break}}n!==this.isSelected_&&this.selected(n)}handleSelectedLanguageChange(e){const t=this.player().textTracks();let n=!0;for(let i=0,r=t.length;i<r;i++){const e=t[i];if(["captions","descriptions","subtitles"].indexOf(e.kind)>-1&&"showing"===e.mode){n=!1;break}}n&&(this.player_.cache_.selectedLanguage={enabled:!1})}handleLanguagechange(){this.$(".vjs-menu-item-text").textContent=this.player_.localize(this.options_.label),super.handleLanguagechange()}}Ut.registerComponent("OffTextTrackMenuItem",Ri);class Li extends Ii{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};t.tracks=e.textTracks(),super(e,t)}createItems(){let e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Pi;this.label_&&(e="".concat(this.label_," off")),t.push(new Ri(this.player_,{kinds:this.kinds_,kind:this.kind_,label:e})),this.hideThreshold_+=1;const i=this.player_.textTracks();Array.isArray(this.kinds_)||(this.kinds_=[this.kind_]);for(let r=0;r<i.length;r++){const e=i[r];if(this.kinds_.indexOf(e.kind)>-1){const i=new n(this.player_,{track:e,kinds:this.kinds_,kind:this.kind_,selectable:!0,multiSelectable:!1});i.addClass("vjs-".concat(e.kind,"-menu-item")),t.push(i)}}return t}}Ut.registerComponent("TextTrackButton",Li);class Mi extends Di{constructor(e,t){const n=t.track,i=t.cue,r=e.currentTime();t.selectable=!0,t.multiSelectable=!1,t.label=i.text,t.selected=i.startTime<=r&&r<i.endTime,super(e,t),this.track=n,this.cue=i}handleClick(e){super.handleClick(),this.player_.currentTime(this.cue.startTime)}}Ut.registerComponent("ChaptersTrackMenuItem",Mi);class Ni extends Li{constructor(e,t,n){super(e,t,n),this.setIcon("chapters"),this.selectCurrentItem_=()=>
2{this.items.forEach((e=>{e.selected(this.track_.activeCues[0]===e.cue)}))}}buildCSSClass(){return"vjs-chapters-button ".concat(super.buildCSSClass())}buildWrapperCSSClass(){return"vjs-chapters-button ".concat(super.buildWrapperCSSClass())}update(e){if(e&&e.track&&"chapters"!==e.track.kind)return;const t=this.findChaptersTrack();t!==this.track_?(this.setTrack(t),super.update()):(!this.items||t&&t.cues&&t.cues.length!==this.items.length)&&super.update()}setTrack(e){if(this.track_!==e){if(this.updateHandler_||(this.updateHandler_=this.update.bind(this)),this.track_){const e=this.player_.remoteTextTrackEls().getTrackElementByTrack_(this.track_);e&&e.removeEventListener("load",this.updateHandler_),this.track_.removeEventListener("cuechange",this.selectCurrentItem_),this.track_=null}if(this.track_=e,this.track_){this.track_.mode="hidden";const e=this.player_.remoteTextTrackEls().getTrackElementByTrack_(this.track_);e&&e.addEventListener("load",this.updateHandler_),this.track_.addEventListener("cuechange",this.selectCurrentItem_)}}}findChaptersTrack(){const e=this.player_.textTracks()||[];for(let t=e.length-1;t>=0;t--){const n=e[t];if(n.kind===this.kind_)return n}}getMenuCaption(){return this.track_&&this.track_.label?this.track_.label:this.localize(Mt(this.kind_))}createMenu(){return this.options_.title=this.getMenuCaption(),super.createMenu()}createItems(){const e=[];if(!this.track_)return e;const t=this.track_.cues;if(!t)return e;for(let n=0,i=t.length;n<i;n++){const i=t[n],r=new Mi(this.player_,{track:this.track_,cue:i});e.push(r)}return e}}Ni.prototype.kind_="chapters",Ni.prototype.controlText_="Chapters",Ut.registerComponent("ChaptersButton",Ni);class Bi extends Li{constructor(e,t,n){super(e,t,n),this.setIcon("audio-description");const i=e.textTracks(),r=bt(this,this.handleTracksChange);i.addEventListener("change",r),this.on("dispose",(function(){i.removeEventListener("change",r)}))}handleTracksChange(e){const t=this.player().textTracks();let n=!1;for(let i=0,r=t.length;i<r;i++){const e=t[i];if(e.kind!==this.kind_&&"showing"===e.mode){n=!0;break}}n?this.disable():this.enable()}buildCSSClass(){return"vjs-descriptions-button ".concat(super.buildCSSClass())}buildWrapperCSSClass(){return"vjs-descriptions-button ".concat(super.buildWrapperCSSClass())}}Bi.prototype.kind_="descriptions",Bi.prototype.controlText_="Descriptions",Ut.registerComponent("DescriptionsButton",Bi);class Ui extends Li{constructor(e,t,n){super(e,t,n),this.setIcon("subtitles")}buildCSSClass(){return"vjs-subtitles-button ".concat(super.buildCSSClass())}buildWrapperCSSClass(){return"vjs-subtitles-button ".concat(super.buildWrapperCSSClass())}}Ui.prototype.kind_="subtitles",Ui.prototype.controlText_="Subtitles",Ut.registerComponent("SubtitlesButton",Ui);class Fi extends Pi{constructor(e,t){t.track={player:e,kind:t.kind,label:t.kind+" settings",selectable:!1,default:!1,mode:"disabled"},t.selectable=!1,t.name="CaptionSettingsMenuItem",super(e,t),this.addClass("vjs-texttrack-settings"),this.controlText(", opens "+t.kind+" settings dialog")}handleClick(e){this.player().getChild("textTrackSettings").open()}handleLanguagechange(){this.$(".vjs-menu-item-text").textContent=this.player_.localize(this.options_.kind+" settings"),super.handleLanguagechange()}}Ut.registerComponent("CaptionSettingsMenuItem",Fi);class zi extends Li{constructor(e,t,n){super(e,t,n),this.setIcon("captions")}buildCSSClass(){return"vjs-captions-button ".concat(super.buildCSSClass())}buildWrapperCSSClass(){return"vjs-captions-button ".concat(super.buildWrapperCSSClass())}createItems(){const e=[];return this.player().tech_&&this.player().tech_.featuresNativeTextTracks||!this.player().getChild("textTrackSettings")||(e.push(new Fi(this.player_,{kind:this.kind_})),this.hideThreshold_+=1),super.createItems(e)}}zi.prototype.kind_="captions",zi.prototype.controlText_="Captions",Ut.registerComponent("CaptionsButton",zi);class qi extends Pi{createEl(e,t,n){const i=super.createEl(e,t,n),r=i.querySelector(".vjs-menu-item-text");return"captions"===this.options_.track.kind&&(this.player_.options_.experimentalSvgIcons?this.setIcon("captions",i):r.appendChild(_e("span",{className:"vjs-icon-placeholder"},{"aria-hidden":!0})),r.appendChild(_e("span",{className:"vjs-control-text",textContent:" ".concat(this.localize("Captions"))}))),i}}Ut.registerComponent("SubsCapsMenuItem",qi);class Hi extends Li{constructor(e){super(e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}),this.label_="subtitles",this.setIcon("subtitles"),["en","en-us","en-ca","fr-ca"].indexOf(this.player_.language_)>-1&&(this.label_="captions",this.setIcon("captions")),this.menuButton_.controlText(Mt(this.label_))}buildCSSClass(){return"vjs-subs-caps-button ".concat(super.buildCSSClass())}buildWrapperCSSClass(){return"vjs-subs-caps-button ".concat(super.buildWrapperCSSClass())}createItems(){let e=[];return this.player().tech_&&this.player().tech_.featuresNativeTextTracks||!this.player().getChild("textTrackSettings")||(e.push(new Fi(this.player_,{kind:this.label_})),this.hideThreshold_+=1),e=super.createItems(e,qi),e}}Hi.prototype.kinds_=["captions","subtitles"],Hi.prototype.controlText_="Subtitles",Ut.registerComponent("SubsCapsButton",Hi);class Vi extends Di{constructor(e,t){var n;const i=t.track,r=e.audioTracks();t.label=i.label||i.language||"Unknown",t.selected=i.enabled,super(e,t),n=this,this.track=i,this.addClass("vjs-".concat(i.kind,"-menu-item"));const s=function(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];n.handleTracksChange.apply(n,t)};r.addEventListener("change",s),this.on("dispose",(()=>{r.removeEventListener("change",s)}))}createEl(e,t,n){const i=super.createEl(e,t,n),r=i.querySelector(".vjs-menu-item-text");return["main-desc","descriptions"].indexOf(this.options_.track.kind)>=0&&(r.appendChild(_e("span",{className:"vjs-icon-placeholder"},{"aria-hidden":!0})),r.appendChild(_e("span",{className:"vjs-control-text",textContent:" "+this.localize("Descriptions")}))),i}handleClick(e){if(super.handleClick(e),this.track.enabled=!0,this.player_.tech_.featuresNativeAudioTracks){const e=this.player_.audioTracks();for(let t=0;t<e.length;t++){const n=e[t];n!==this.track&&(n.enabled=n===this.track)}}}handleTracksChange(e){this.selected(this.track.enabled)}}Ut.registerComponent("AudioTrackMenuItem",Vi);class Wi extends Ii{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};t.tracks=e.audioTracks(),super(e,t),this.setIcon("audio")}buildCSSClass(){return"vjs-audio-button ".concat(super.buildCSSClass())}buildWrapperCSSClass(){return"vjs-audio-button ".concat(super.buildWrapperCSSClass())}createItems(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];this.hideThreshold_=1;const t=this.player_.audioTracks();for(let n=0;n<t.length;n++){const i=t[n];e.push(new Vi(this.player_,{track:i,selectable:!0,multiSelectable:!1}))}return e}}Wi.prototype.controlText_="Audio Track",Ut.registerComponent("AudioTrackButton",Wi);class Gi extends Di{constructor(e,t){const n=t.rate,i=parseFloat(n,10);t.label=n,t.selected=i===e.playbackRate(),t.selectable=!0,t.multiSelectable=!1,super(e,t),this.label=n,this.rate=i,this.on(e,"ratechange",(e=>this.update(e)))}handleClick(e){super.handleClick(),this.player().playbackRate(this.rate)}update(e){this.selected(this.player().playbackRate()===this.rate)}}Gi.prototype.contentElType="button",Ut.registerComponent("PlaybackRateMenuItem",Gi);
2class Xi extends Ei{constructor(e,t){super(e,t),this.menuButton_.el_.setAttribute("aria-describedby",this.labelElId_),this.updateVisibility(),this.updateLabel(),this.on(e,"loadstart",(e=>this.updateVisibility(e))),this.on(e,"ratechange",(e=>this.updateLabel(e))),this.on(e,"playbackrateschange",(e=>this.handlePlaybackRateschange(e)))}createEl(){const e=super.createEl();return this.labelElId_="vjs-playback-rate-value-label-"+this.id_,this.labelEl_=_e("div",{className:"vjs-playback-rate-value",id:this.labelElId_,textContent:"1x"}),e.appendChild(this.labelEl_),e}dispose(){this.labelEl_=null,super.dispose()}buildCSSClass(){return"vjs-playback-rate ".concat(super.buildCSSClass())}buildWrapperCSSClass(){return"vjs-playback-rate ".concat(super.buildWrapperCSSClass())}createItems(){const e=this.playbackRates(),t=[];for(let n=e.length-1;n>=0;n--)t.push(new Gi(this.player(),{rate:e[n]+"x"}));return t}handlePlaybackRateschange(e){this.update()}playbackRates(){const e=this.player();return e.playbackRates&&e.playbackRates()||[]}playbackRateSupported(){return this.player().tech_&&this.player().tech_.featuresPlaybackRate&&this.playbackRates()&&this.playbackRates().length>0}updateVisibility(e){this.playbackRateSupported()?this.removeClass("vjs-hidden"):this.addClass("vjs-hidden")}updateLabel(e){this.playbackRateSupported()&&(this.labelEl_.textContent=this.player().playbackRate()+"x")}}Xi.prototype.controlText_="Playback Rate",Ut.registerComponent("PlaybackRateMenuButton",Xi);class Yi extends Ut{buildCSSClass(){return"vjs-spacer ".concat(super.buildCSSClass())}createEl(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"div",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return t.className||(t.className=this.buildCSSClass()),super.createEl(e,t,n)}}Ut.registerComponent("Spacer",Yi);Ut.registerComponent("CustomControlSpacer",class extends Yi{buildCSSClass(){return"vjs-custom-control-spacer ".concat(super.buildCSSClass())}createEl(){return super.createEl("div",{className:this.buildCSSClass(),textContent:"\xa0"})}});class Ki extends Ut{createEl(){return super.createEl("div",{className:"vjs-control-bar",dir:"ltr"})}}Ki.prototype.options_={children:["playToggle","skipBackward","skipForward","volumePanel","currentTimeDisplay","timeDivider","durationDisplay","progressControl","liveDisplay","seekToLive","remainingTimeDisplay","customControlSpacer","playbackRateMenuButton","chaptersButton","descriptionsButton","subsCapsButton","audioTrackButton","pictureInPictureToggle","fullscreenToggle"]},Ut.registerComponent("ControlBar",Ki);class Qi extends sn{constructor(e,t){super(e,t),this.on(e,"error",(e=>{this.open(e)}))}buildCSSClass(){return"vjs-error-display ".concat(super.buildCSSClass())}content(){const e=this.player().error();return e?this.localize(e.message):""}}Qi.prototype.options_=Object.assign({},sn.prototype.options_,{pauseOnOpen:!1,fillAlways:!0,temporary:!1,uncloseable:!0}),Ut.registerComponent("ErrorDisplay",Qi);class Zi extends Ut{constructor(e){super(e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}),this.el_.setAttribute("aria-labelledby",this.selectLabelledbyIds)}createEl(){this.selectLabelledbyIds=[this.options_.legendId,this.options_.labelId].join(" ").trim();return _e("select",{id:this.options_.id},{},this.options_.SelectOptions.map((e=>{const t=(this.options_.labelId?this.options_.labelId:"vjs-track-option-".concat(rt()))+"-"+e[1].replace(/\W+/g,""),n=_e("option",{id:t,value:this.localize(e[0]),textContent:this.localize(e[1])});return n.setAttribute("aria-labelledby","".concat(this.selectLabelledbyIds," ").concat(t)),n})))}}Ut.registerComponent("TextTrackSelect",Zi);class Ji extends Ut{constructor(e){super(e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:{});const t=_e("legend",{textContent:this.localize(this.options_.legendText),id:this.options_.legendId});this.el().appendChild(t);const n=this.options_.selects;for(const i of n){const t=this.options_.selectConfigs[i],n=t.className,r=t.id.replace("%s",this.options_.id_);let s=null;const a="vjs_select_".concat(rt());if("colors"===this.options_.type){s=_e("span",{className:n});const e=_e("label",{id:r,className:"vjs-label",textContent:this.localize(t.label)});e.setAttribute("for",a),s.appendChild(e)}const o=new Zi(e,{SelectOptions:t.options,legendId:this.options_.legendId,id:a,labelId:r});this.addChild(o),"colors"===this.options_.type&&(s.appendChild(o.el()),this.el().appendChild(s))}}createEl(){return _e("fieldset",{className:this.options_.className})}}Ut.registerComponent("TextTrackFieldset",Ji);class $i extends Ut{constructor(e){super(e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:{});const t=this.options_.textTrackComponentid,n=new Ji(e,{id_:t,legendId:"captions-text-legend-".concat(t),legendText:this.localize("Text"),className:"vjs-fg vjs-track-setting",selects:this.options_.fieldSets[
20],selectConfigs:this.options_.selectConfigs,type:"colors"});this.addChild(n);const i=new Ji(e,{id_:t,legendId:"captions-background-".concat(t),legendText:this.localize("Text Background"),className:"vjs-bg vjs-track-setting",selects:this.options_.fieldSets[1],selectConfigs:this.options_.selectConfigs,type:"colors"});this.addChild(i);const r=new Ji(e,{id_:t,legendId:"captions-window-".concat(t),legendText:this.localize("Caption Area Background"),className:"vjs-window vjs-track-setting",selects:this.options_.fieldSets[2],selectConfigs:this.options_.selectConfigs,type:"colors"});this.addChild(r)}createEl(){return _e("div",{className:"vjs-track-settings-colors"})}}Ut.registerComponent("TextTrackSettingsColors",$i);class er extends Ut{constructor(e){super(e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:{});const t=this.options_.textTrackComponentid,n=new Ji(e,{id_:t,legendId:"captions-font-size-".concat(t),legendText:"Font Size",className:"vjs-font-percent vjs-track-setting",selects:this.options_.fieldSets[0],selectConfigs:this.options_.selectConfigs,type:"font"});this.addChild(n);const i=new Ji(e,{id_:t,legendId:"captions-edge-style-".concat(t),legendText:this.localize("Text Edge Style"),className:"vjs-edge-style vjs-track-setting",selects:this.options_.fieldSets[1],selectConfigs:this.options_.selectConfigs,type:"font"});this.addChild(i);const r=new Ji(e,{id_:t,legendId:"captions-font-family-".concat(t),legendText:this.localize("Font Family"),className:"vjs-font-family vjs-track-setting",selects:this.options_.fieldSets[2],selectConfigs:this.options_.selectConfigs,type:"font"});this.addChild(r)}createEl(){return _e("div",{className:"vjs-track-settings-font"})}}Ut.registerComponent("TextTrackSettingsFont",er);class tr extends Ut{constructor(e){super(e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:{});const t=new ri(e,{controlText:this.localize("restore all settings to the default values"),className:"vjs-default-button"});t.el().classList.remove("vjs-control","vjs-button"),t.el().textContent=this.localize("Reset"),this.addChild(t);const n=this.localize("Done"),i=new ri(e,{controlText:n,className:"vjs-done-button"});i.el().classList.remove("vjs-control","vjs-button"),i.el().textContent=n,this.addChild(i)}createEl(){return _e("div",{className:"vjs-track-settings-controls"})}}Ut.registerComponent("TrackSettingsControls",tr);const nr="vjs-text-track-settings",ir=["#000","Black"],rr=["#00F","Blue"],sr=["#0FF","Cyan"],ar=["#0F0","Green"],or=["#F0F","Magenta"],cr=["#F00","Red"],lr=["#FFF","White"],dr=["#FF0","Yellow"],ur=["1","Opaque"],hr=["0.5","Semi-Transparent"],pr=["0","Transparent"],mr={backgroundColor:{selector:".vjs-bg-color > select",id:"captions-background-color-%s",label:"Color",options:[ir,lr,cr,ar,rr,dr,or,sr],className:"vjs-bg-color"},backgroundOpacity:{selector:".vjs-bg-opacity > select",id:"captions-background-opacity-%s",label:"Opacity",options:[ur,hr,pr],className:"vjs-bg-opacity vjs-opacity"},color:{selector:".vjs-text-color > select",id:"captions-foreground-color-%s",label:"Color",options:[lr,ir,cr,ar,rr,dr,or,sr],className:"vjs-text-color"},edgeStyle:{selector:".vjs-edge-style > select",id:"",label:"Text Edge Style",options:[["none","None"],["raised","Raised"],["depressed","Depressed"],["uniform","Uniform"],["dropshadow","Drop shadow"]]},fontFamily:{selector:".vjs-font-family > select",id:"",label:"Font Family",options:[["proportionalSansSerif","Proportional Sans-Serif"],["monospaceSansSerif","Monospace Sans-Serif"],["proportionalSerif","Proportional Serif"],["monospaceSerif","Monospace Serif"],["casual","Casual"],["script","Script"],["small-caps","Small Caps"]]},fontPercent:{selector:".vjs-font-percent > select",id:"",label:"Font Size",options:[["0.50","50%"],["0.75","75%"],["1.00","100%"],["1.25","125%"],["1.50","150%"],["1.75","175%"],["2.00","200%"],["3.00","300%"],["4.00","400%"]],default:2,parser:e=>"1.00"===e?null:Number(e)},textOpacity:{selector:".vjs-text-opacity > select",id:"captions-foreground-opacity-%s",label:"Opacity",options:[ur,hr],className:"vjs-text-opacity vjs-opacity"},windowColor:{selector:".vjs-window-color > select",id:"captions-window-color-%s",label:"Color",className:"vjs-window-color"},windowOpacity:{selector:".vjs-window-opacity > select",id:"captions-window-opacity-%s",label:"Opacity",options:[pr,hr,ur],className:"vjs-window-opacity vjs-opacity"}};function gr(e,t){if(t&&(e=t(e)),e&&"none"!==e)return e}mr.windowColor.options=mr.backgroundColor.options;Ut.registerComponent("TextTrackSettings",class extends sn{constructor(e,t){t.temporary=!1,super(e,t),this.updateDisplay=this.updateDisplay.bind(this),this.fill(),this.hasBeenOpened_=this.hasBeenFilled_=!0,this.renderModalComponents(e),this.endDialog=_e("p",{className:"vjs-control-text",textContent:this.localize("End of dialog window.")}),this.el().appendChild(this.endDialog),this.setDefaults(),void 0===t.persistTextTrackSettings&&(this.options_.persistTextTrackSettings=this.options_.playerOptions.persistTextTrackSettings),this.bindFunctionsToSelectsAndButtons(),this.options_.persistTextTrackSettings&&this.restoreSettings()}renderModalComponents(e){const t=new $i(e,{textTrackComponentid:this.id_,selectConfigs:mr,fieldSets:[["color","textOpacity"],["backgroundColor","backgroundOpacity"],["windowColor","windowOpacity"]]});this.addChild(t);const n=new er(e,{textTrackComponentid:this.id_,selectConfigs:mr,fieldSets:[["fontPercent"],["edgeStyle"],["fontFamily"]]});this.addChild(n);const i=new tr(e);this.addChild(i)}bindFunctionsToSelectsAndButtons(){this.on(this.$(".vjs-done-button"),["click","tap"],(()=>{this.saveSettings(),this.close()})),this.on(this.$(".vjs-default-button"),["click","tap"],(()=>{this.setDefaults(),this.updateDisplay()})),N(mr,(e=>{this.on(this.$(e.selector),"change",this.updateDisplay)}))}dispose(){this.endDialog=null,super.dispose()}label(){return this.localize("Caption Settings Dialog")}description(){return this.localize("Beginning of dialog window. Escape will cancel and close the window.")}buildCSSClass(){return super.buildCSSClass()+" vjs-text-track-settings"}
vendor: 5,515 bytes, line 2
2getValues(){return B(mr,((e,t,n)=>{const i=(r=this.$(t.selector),s=t.parser,gr(r.options[r.options.selectedIndex].value,s));var r,s;return void 0!==i&&(e[n]=i),e}),{})}setValues(e){N(mr,((t,n)=>{!function(e,t,n){if(t)for(let i=0;i<e.options.length;i++)if(gr(e.options[i].value,n)===t){e.selectedIndex=i;break}}(this.$(t.selector),e[n],t.parser)}))}setDefaults(){N(mr,(e=>{const t=e.hasOwnProperty("default")?e.default:0;this.$(e.selector).selectedIndex=t}))}restoreSettings(){let e;try{e=JSON.parse(r.a.localStorage.getItem(nr))}catch(t){P.warn(t)}e&&this.setValues(e)}saveSettings(){if(!this.options_.persistTextTrackSettings)return;const e=this.getValues();try{Object.keys(e).length?r.a.localStorage.setItem(nr,JSON.stringify(e)):r.a.localStorage.removeItem(nr)}catch(t){P.warn(t)}}updateDisplay(){const e=this.player_.getChild("textTrackDisplay");e&&e.updateDisplay()}handleLanguagechange(){this.fill(),this.renderModalComponents(this.player_),this.bindFunctionsToSelectsAndButtons()}});Ut.registerComponent("ResizeManager",class extends Ut{constructor(e,t){let n=t.ResizeObserver||r.a.ResizeObserver;null===t.ResizeObserver&&(n=!1);super(e,z({createEl:!n,reportTouchActivity:!1},t)),this.ResizeObserver=t.ResizeObserver||r.a.ResizeObserver,this.loadListener_=null,this.resizeObserver_=null,this.debouncedHandler_=jt((()=>{this.resizeHandler()}),100,!1,this),n?(this.resizeObserver_=new this.ResizeObserver(this.debouncedHandler_),this.resizeObserver_.observe(e.el())):(this.loadListener_=()=>{if(!this.el_||!this.el_.contentWindow)return;const e=this.debouncedHandler_;let t=this.unloadListener_=function(){ut(this,"resize",e),ut(this,"unload",t),t=null};dt(this.el_.contentWindow,"unload",t),dt(this.el_.contentWindow,"resize",e)},this.one("load",this.loadListener_))}createEl(){return super.createEl("iframe",{className:"vjs-resize-manager",tabIndex:-1,title:this.localize("No content")},{"aria-hidden":"true"})}resizeHandler(){this.player_&&this.player_.trigger&&this.player_.trigger("playerresize")}dispose(){this.debouncedHandler_&&this.debouncedHandler_.cancel(),this.resizeObserver_&&(this.player_.el()&&this.resizeObserver_.unobserve(this.player_.el()),this.resizeObserver_.disconnect()),this.loadListener_&&this.off("load",this.loadListener_),this.el_&&this.el_.contentWindow&&this.unloadListener_&&this.unloadListener_.call(this.el_.contentWindow),this.ResizeObserver=null,this.resizeObserver=null,this.debouncedHandler_=null,this.loadListener_=null,super.dispose()}});const fr={trackingThreshold:20,liveTolerance:15};Ut.registerComponent("LiveTracker",class extends Ut{constructor(e,t){super(e,z(fr,t,{createEl:!1})),this.trackLiveHandler_=()=>this.trackLive_(),this.handlePlay_=e=>this.handlePlay(e),this.handleFirstTimeupdate_=e=>this.handleFirstTimeupdate(e),this.handleSeeked_=e=>this.handleSeeked(e),this.seekToLiveEdge_=e=>this.seekToLiveEdge(e),this.reset_(),this.on(this.player_,"durationchange",(e=>this.handleDurationchange(e))),this.on(this.player_,"canplay",(()=>this.toggleTracking()))}trackLive_(){const e=this.player_.seekable();if(!e||!e.length)return;const t=Number(r.a.performance.now().toFixed(4)),n=-1===this.lastTime_?0:(t-this.lastTime_)/1e3;this.lastTime_=t,this.pastSeekEnd_=this.pastSeekEnd()+n;const i=this.liveCurrentTime(),s=this.player_.currentTime();let a=this.player_.paused()||this.seekedBehindLive_||Math.abs(i-s)>this.options_.liveTolerance;this.timeupdateSeen_&&i!==1/0||(a=!1),a!==this.behindLiveEdge_&&(this.behindLiveEdge_=a,this.trigger("liveedgechange"))}handleDurationchange(){this.toggleTracking()}toggleTracking(){this.player_.duration()===1/0&&this.liveWindow()>=this.options_.trackingThreshold?(this.player_.options_.liveui&&this.player_.addClass("vjs-liveui"),this.startTracking()):(this.player_.removeClass("vjs-liveui"),this.stopTracking())}startTracking(){this.isTracking()||(this.timeupdateSeen_||(this.timeupdateSeen_=this.player_.hasStarted()),this.trackingInterval_=this.setInterval(this.trackLiveHandler_,ft),this.trackLive_(),this.on(this.player_,["play","pause"],this.trackLiveHandler_),this.timeupdateSeen_?this.on(this.player_,"seeked",this.handleSeeked_):(this.one(this.player_,"play",this.handlePlay_),this.one(this.player_,"timeupdate",this.handleFirstTimeupdate_)))}handleFirstTimeupdate(){this.timeupdateSeen_=!0,this.on(this.player_,"seeked",this.handleSeeked_)}handleSeeked(){const e=Math.abs(this.liveCurrentTime()-this.player_.currentTime());this.seekedBehindLive_=this.nextSeekedFromUser_&&e>2,this.nextSeekedFromUser_=!1,this.trackLive_()}handlePlay(){this.one(this.player_,"timeupdate",this.seekToLiveEdge_)}reset_(){this.lastTime_=-1,this.pastSeekEnd_=0,this.lastSeekEnd_=-1,this.behindLiveEdge_=!0,this.timeupdateSeen_=!1,this.seekedBehindLive_=!1,this.nextSeekedFromUser_=!1,this.clearInterval(this.trackingInterval_),this.trackingInterval_=null,this.off(this.player_,["play","pause"],this.trackLiveHandler_),this.off(this.player_,"seeked",this.handleSeeked_),this.off(this.player_,"play",this.handlePlay_),this.off(this.player_,"timeupdate",this.handleFirstTimeupdate_),this.off(this.player_,"timeupdate",this.seekToLiveEdge_)}nextSeekedFromUser(){this.nextSeekedFromUser_=!0}stopTracking(){this.isTracking()&&(this.reset_(),this.trigger("liveedgechange"))}seekableEnd(){const e=this.player_.seekable(),t=[];let n=e?e.length:0;for(;n--;)t.push(e.end(n));return t.length?t.sort()[t.length-1]:1/0}seekableStart(){const e=this.player_.seekable(),t=[];let n=e?e.length:0;for(;n--;)t.push(e.start(n));return t.length?t.sort()[0]:0}
2liveWindow(){const e=this.liveCurrentTime();return e===1/0?0:e-this.seekableStart()}isLive(){return this.isTracking()}atLiveEdge(){return!this.behindLiveEdge()}liveCurrentTime(){return this.pastSeekEnd()+this.seekableEnd()}pastSeekEnd(){const e=this.seekableEnd();return-1!==this.lastSeekEnd_&&e!==this.lastSeekEnd_&&(this.pastSeekEnd_=0),this.lastSeekEnd_=e,this.pastSeekEnd_}behindLiveEdge(){return this.behindLiveEdge_}isTracking(){return"number"===typeof this.trackingInterval_}seekToLiveEdge(){this.seekedBehindLive_=!1,this.atLiveEdge()||(this.nextSeekedFromUser_=!1,this.player_.currentTime(this.liveCurrentTime()))}dispose(){this.stopTracking(),super.dispose()}});Ut.registerComponent("TitleBar",class extends Ut{constructor(e,t){super(e,t),this.on("statechanged",(e=>this.updateDom_())),this.updateDom_()}createEl(){return this.els={title:_e("div",{className:"vjs-title-bar-title",id:"vjs-title-bar-title-".concat(rt())}),description:_e("div",{className:"vjs-title-bar-description",id:"vjs-title-bar-description-".concat(rt())})},_e("div",{className:"vjs-title-bar"},{},q(this.els))}updateDom_(){const e=this.player_.tech_,t=e&&e.el_,n={title:"aria-labelledby",description:"aria-describedby"};["title","description"].forEach((e=>{const i=this.state[e],r=this.els[e],s=n[e];Be(r),i&&ve(r,i),t&&(t.removeAttribute(s),i&&t.setAttribute(s,r.id))})),this.state.title||this.state.description?this.show():this.hide()}update(e){this.setState(e)}dispose(){const e=this.player_.tech_,t=e&&e.el_;t&&(t.removeAttribute("aria-labelledby"),t.removeAttribute("aria-describedby")),super.dispose(),this.els=null}});const br={initialDisplay:4e3,position:[],takeFocus:!1};Ut.registerComponent("TransientButton",class extends ri{constructor(e,t){super(e,t=z(br,t)),this.controlText(t.controlText),this.hide(),this.on(this.player_,["useractive","userinactive"],(e=>{this.removeClass("force-display")}))}buildCSSClass(){return"vjs-transient-button focus-visible ".concat(this.options_.position.map((e=>"vjs-".concat(e))).join(" "))}createEl(){const e=_e("button",{},{type:"button",class:this.buildCSSClass()},_e("span"));return this.controlTextEl_=e.querySelector("span"),e}show(){super.show(),this.addClass("force-display"),this.options_.takeFocus&&this.el().focus({preventScroll:!0}),this.forceDisplayTimeout=this.player_.setTimeout((()=>{this.removeClass("force-display")}),this.options_.initialDisplay)}hide(){this.removeClass("force-display"),super.hide()}dispose(){this.player_.clearTimeout(this.forceDisplayTimeout),super.dispose()}});const yr=e=>{const t=e.el();if(t.hasAttribute("src"))return e.triggerSourceset(t.src),!0;const n=e.$$("source"),i=[];let r="";if(!n.length)return!1;for(let s=0;s<n.length;s++){const e=n[s].src;e&&-1===i.indexOf(e)&&i.push(e)}return!!i.length&&(1===i.length&&(r=i[0]),e.triggerSourceset(r),!0)},jr=Object.defineProperty({},"innerHTML",{get(){return this.cloneNode(!0).innerHTML},set(e){const t=a.a.createElement(this.nodeName.toLowerCase());t.innerHTML=e;const n=a.a.createDocumentFragment();for(;t.childNodes.length;)n.appendChild(t.childNodes[0]);return this.innerText="",r.a.Element.prototype.appendChild.call(this,n),this.innerHTML}}),_r=(e,t)=>{let n={};for(let i=0;i<e.length&&(n=Object.getOwnPropertyDescriptor(e[i],t),!(n&&n.set&&n.get));i++);return n.enumerable=!0,n.configurable=!0,n},vr=function(e){const t=e.el();if(t.resetSourceWatch_)return;const n={},i=(e=>_r([e.el(),r.a.HTMLMediaElement.prototype,r.a.Element.prototype,jr],"innerHTML"))(e),s=n=>function(){for(var i=arguments.length,r=new Array(i),s=0;s<i;s++)r[s]=arguments[s];const a=n.apply(t,r);return yr(e),a};["append","appendChild","insertAdjacentHTML"].forEach((e=>{t[e]&&(n[e]=t[e],t[e]=s(n[e]))})),Object.defineProperty(t,"innerHTML",z(i,{set:s(i.set)})),t.resetSourceWatch_=()=>{t.resetSourceWatch_=null,Object.keys(n).forEach((e=>{t[e]=n[e]})),Object.defineProperty(t,"innerHTML",i)},e.one("sourceset",t.resetSourceWatch_)},xr=Object.defineProperty({},"src",{get(){return this.hasAttribute("src")?jn(r.a.Element.prototype.getAttribute.call(this,"src")):""},set(e){return r.a.Element.prototype.setAttribute.call(this,"src",e),e}}),Or=function(e){if(!e.featuresSourceset)return;
2const t=e.el();if(t.resetSourceset_)return;const n=(e=>_r([e.el(),r.a.HTMLMediaElement.prototype,xr],"src"))(e),i=t.setAttribute,s=t.load;Object.defineProperty(t,"src",z(n,{set:i=>{const r=n.set.call(t,i);return e.triggerSourceset(t.src),r}})),t.setAttribute=(n,r)=>{const s=i.call(t,n,r);return/src/i.test(n)&&e.triggerSourceset(t.src),s},t.load=()=>{const n=s.call(t);return yr(e)||(e.triggerSourceset(""),vr(e)),n},t.currentSrc?e.triggerSourceset(t.currentSrc):yr(e)||vr(e),t.resetSourceset_=()=>{t.resetSourceset_=null,t.load=s,t.setAttribute=i,Object.defineProperty(t,"src",n),t.resetSourceWatch_&&t.resetSourceWatch_()}};class Tr extends Dn{constructor(e,t){super(e,t);const n=e.source;let i=!1;if(this.featuresVideoFrameCallback=this.featuresVideoFrameCallback&&"VIDEO"===this.el_.tagName,n&&(this.el_.currentSrc!==n.src||e.tag&&3===e.tag.initNetworkState_)?this.setSource(n):this.handleLateInit_(this.el_),e.enableSourceset&&this.setupSourcesetHandling_(),this.isScrubbing_=!1,this.el_.hasChildNodes()){const e=this.el_.childNodes;let t=e.length;const n=[];for(;t--;){const r=e[t];"track"===r.nodeName.toLowerCase()&&(this.featuresNativeTextTracks?(this.remoteTextTrackEls().addTrackElement_(r),this.remoteTextTracks().addTrack(r.track),this.textTracks().addTrack(r.track),i||this.el_.hasAttribute("crossorigin")||!vn(r.src)||(i=!0)):n.push(r))}for(let i=0;i<n.length;i++)this.el_.removeChild(n[i])}this.proxyNativeTracks_(),this.featuresNativeTextTracks&&i&&P.warn("Text Tracks are being loaded from another origin but the crossorigin attribute isn't used.\nThis may prevent text tracks from loading."),this.restoreMetadataTracksInIOSNativePlayer_(),(de||ae)&&!0===e.nativeControlsForTouch&&this.setControls(!0),this.proxyWebkitFullscreen_(),this.triggerReady()}dispose(){this.el_&&this.el_.resetSourceset_&&this.el_.resetSourceset_(),Tr.disposeMediaElement(this.el_),this.options_=null,super.dispose()}setupSourcesetHandling_(){Or(this)}restoreMetadataTracksInIOSNativePlayer_(){const e=this.textTracks();let t;const n=()=>{t=[];for(let n=0;n<e.length;n++){const i=e[n];"metadata"===i.kind&&t.push({track:i,storedMode:i.mode})}};n(),e.addEventListener("change",n),this.on("dispose",(()=>e.removeEventListener("change",n)));const i=()=>{for(let e=0;e<t.length;e++){const n=t[e];"disabled"===n.track.mode&&n.track.mode!==n.storedMode&&(n.track.mode=n.storedMode)}e.removeEventListener("change",i)};this.on("webkitbeginfullscreen",(()=>{e.removeEventListener("change",n),e.removeEventListener("change",i),e.addEventListener("change",i)})),this.on("webkitendfullscreen",(()=>{e.removeEventListener("change",n),e.addEventListener("change",n),e.removeEventListener("change",i)}))}overrideNative_(e,t){if(t!==this["featuresNative".concat(e,"Tracks")])return;const n=e.toLowerCase();this["".concat(n,"TracksListeners_")]&&Object.keys(this["".concat(n,"TracksListeners_")]).forEach((e=>{this.el()["".concat(n,"Tracks")].removeEventListener(e,this["".concat(n,"TracksListeners_")][e])})),this["featuresNative".concat(e,"Tracks")]=!t,this["".concat(n,"TracksListeners_")]=null,this.proxyNativeTracksForType_(n)}overrideNativeAudioTracks(e){this.overrideNative_("Audio",e)}overrideNativeVideoTracks(e){this.overrideNative_("Video",e)}proxyNativeTracksForType_(e){const t=Cn[e],n=this.el()[t.getterName],i=this[t.getterName]();if(!this["featuresNative".concat(t.capitalName,"Tracks")]||!n||!n.addEventListener)return;const r={change:t=>{const n={type:"change",target:i,currentTarget:i,srcElement:i};i.trigger(n),"text"===e&&this[En.remoteText.getterName]().trigger(n)},addtrack(e){i.addTrack(e.track)},removetrack(e){i.removeTrack(e.track)}},s=function(){const e=[];for(let t=0;t<i.length;t++){let r=!1;for(let e=0;e<n.length;e++)if(n[e]===i[t]){r=!0;break}r||e.push(i[t])}for(;e.length;)i.removeTrack(e.shift())};this[t.getterName+"Listeners_"]=r,Object.keys(r).forEach((e=>{const t=r[e];n.addEventListener(e,t),this.on("dispose",(i=>n.removeEventListener(e,t)))})),this.on("loadstart",s),this.on("dispose",(e=>this.off("loadstart",s)))}proxyNativeTracks_(){Cn.names.forEach((e=>{this.proxyNativeTracksForType_(e)}))}createEl(){let e=this.options_.tag;if(!e||!this.options_.playerElIngest&&!this.movingMediaElementInDOM){if(e){const t=e.cloneNode(!0);e.parentNode&&e.parentNode.insertBefore(t,e),Tr.disposeMediaElement(e),e=t}else{e=a.a.createElement("video");const t=z({},this.options_.tag&&ke(this.options_.tag));de&&!0===this.options_.nativeControlsForTouch||delete t.controls,Ae(e,Object.assign(t,{id:this.options_.techId,class:"vjs-tech"}))}e.playerId=this.options_.playerId}"undefined"!==typeof this.options_.preload&&Ee(e,"preload",this.options_.preload),void 0!==this.options_.disablePictureInPicture&&(e.disablePictureInPicture=this.options_.disablePictureInPicture);const t=["loop","muted","playsinline","autoplay"];for(let n=0;n<t.length;n++){const i=t[n],r=this.options_[i];"undefined"!==typeof r&&(r?Ee(e,i,i):Ie(e,i),e[i]=r)}return e}handleLateInit_(e){if(0===e.networkState||3===e.networkState)return;if(0===e.readyState){let e=!1;const t=function(){e=!0};this.on("loadstart",t);const n=function(){e||this.trigger("loadstart")};return this.on("loadedmetadata",n),void this.ready((function(){this.off("loadstart",t),this.off("loadedmetadata",n),e||this.trigger("loadstart")}))}const t=["loadstart"];t.push("loadedmetadata"),e.readyState>=2&&t.push("loadeddata"),e.readyState>=3&&t.push("canplay"),e.readyState>=4&&t.push("canplaythrough"),this.ready((function(){t.forEach((function(e){this.trigger(e)}),this)}))}setScrubbing(e){this.isScrubbing_=e}scrubbing(){return this.isScrubbing_}setCurrentTime(e){try{this.isScrubbing_&&this.el_.fastSeek&&pe?this.el_.fastSeek(e):this.el_.currentTime=e}catch(t){P(t,"Video is not ready. (Video.js)")}}duration(){if(this.el_.duration===1/0&&Y&&J&&0===this.el_.currentTime){const e=()=>{this.el_.currentTime>0&&(this.el_.duration===1/0&&this.trigger("durationchange"),this.off("timeupdate",e))};return this.on("timeupdate",e),NaN}return this.el_.duration||NaN}width(){return this.el_.offsetWidth}height(){return this.el_.offsetHeight}
vendor: 5,626 bytes, line 2
2proxyWebkitFullscreen_(){if(!("webkitDisplayingFullscreen"in this.el_))return;const e=function(){this.trigger("fullscreenchange",{isFullscreen:!1}),this.el_.controls&&!this.options_.nativeControlsForTouch&&this.controls()&&(this.el_.controls=!1)},t=function(){"webkitPresentationMode"in this.el_&&"picture-in-picture"!==this.el_.webkitPresentationMode&&(this.one("webkitendfullscreen",e),this.trigger("fullscreenchange",{isFullscreen:!0,nativeIOSFullscreen:!0}))};this.on("webkitbeginfullscreen",t),this.on("dispose",(()=>{this.off("webkitbeginfullscreen",t),this.off("webkitendfullscreen",e)}))}supportsFullScreen(){return"function"===typeof this.el_.webkitEnterFullScreen}enterFullScreen(){const e=this.el_;if(e.paused&&e.networkState<=e.HAVE_METADATA)Jt(this.el_.play()),this.setTimeout((function(){e.pause();try{e.webkitEnterFullScreen()}catch(t){this.trigger("fullscreenerror",t)}}),0);else try{e.webkitEnterFullScreen()}catch(t){this.trigger("fullscreenerror",t)}}exitFullScreen(){this.el_.webkitDisplayingFullscreen?this.el_.webkitExitFullScreen():this.trigger("fullscreenerror",new Error("The video is not fullscreen"))}requestPictureInPicture(){return this.el_.requestPictureInPicture()}requestVideoFrameCallback(e){return this.featuresVideoFrameCallback&&!this.el_.webkitKeys?this.el_.requestVideoFrameCallback(e):super.requestVideoFrameCallback(e)}cancelVideoFrameCallback(e){this.featuresVideoFrameCallback&&!this.el_.webkitKeys?this.el_.cancelVideoFrameCallback(e):super.cancelVideoFrameCallback(e)}src(e){if(void 0===e)return this.el_.src;this.setSrc(e)}addSourceElement(e,t){if(!e)return P.error("Invalid source URL."),!1;const n={src:e};t&&(n.type=t);const i=_e("source",{},n);return this.el_.appendChild(i),!0}removeSourceElement(e){if(!e)return P.error("Source URL is required to remove the source element."),!1;const t=this.el_.querySelectorAll("source");for(const n of t)if(n.src===e)return this.el_.removeChild(n),!0;return P.warn("No matching source element found with src: ".concat(e)),!1}reset(){Tr.resetMediaElement(this.el_)}currentSrc(){return this.currentSource_?this.currentSource_.src:this.el_.currentSrc}setControls(e){this.el_.controls=!!e}addTextTrack(e,t,n){return this.featuresNativeTextTracks?this.el_.addTextTrack(e,t,n):super.addTextTrack(e,t,n)}createRemoteTextTrack(e){if(!this.featuresNativeTextTracks)return super.createRemoteTextTrack(e);const t=a.a.createElement("track");return e.kind&&(t.kind=e.kind),e.label&&(t.label=e.label),(e.language||e.srclang)&&(t.srclang=e.language||e.srclang),e.default&&(t.default=e.default),e.id&&(t.id=e.id),e.src&&(t.src=e.src),t}addRemoteTextTrack(e,t){const n=super.addRemoteTextTrack(e,t);return this.featuresNativeTextTracks&&this.el().appendChild(n),n}removeRemoteTextTrack(e){if(super.removeRemoteTextTrack(e),this.featuresNativeTextTracks){const t=this.$$("track");let n=t.length;for(;n--;)e!==t[n]&&e!==t[n].track||this.el().removeChild(t[n])}}getVideoPlaybackQuality(){if("function"===typeof this.el().getVideoPlaybackQuality)return this.el().getVideoPlaybackQuality();const e={};return"undefined"!==typeof this.el().webkitDroppedFrameCount&&"undefined"!==typeof this.el().webkitDecodedFrameCount&&(e.droppedVideoFrames=this.el().webkitDroppedFrameCount,e.totalVideoFrames=this.el().webkitDecodedFrameCount),r.a.performance&&(e.creationTime=r.a.performance.now()),e}}H(Tr,"TEST_VID",(function(){if(!fe())return;const e=a.a.createElement("video"),t=a.a.createElement("track");return t.kind="captions",t.srclang="en",t.label="English",e.appendChild(t),e})),Tr.isSupported=function(){try{Tr.TEST_VID.volume=.5}catch(e){return!1}return!(!Tr.TEST_VID||!Tr.TEST_VID.canPlayType)},Tr.canPlayType=function(e){return Tr.TEST_VID.canPlayType(e)},Tr.canPlaySource=function(e,t){return Tr.canPlayType(e.type)},Tr.canControlVolume=function(){try{const e=Tr.TEST_VID.volume;Tr.TEST_VID.volume=e/2+.1;const t=e!==Tr.TEST_VID.volume;return t&&he?(r.a.setTimeout((()=>{Tr&&Tr.prototype&&(Tr.prototype.featuresVolumeControl=e!==Tr.TEST_VID.volume)})),!1):t}catch(e){return!1}},Tr.canMuteVolume=function(){try{const e=Tr.TEST_VID.muted;return Tr.TEST_VID.muted=!e,Tr.TEST_VID.muted?Ee(Tr.TEST_VID,"muted","muted"):Ie(Tr.TEST_VID,"muted"),e!==Tr.TEST_VID.muted}catch(e){return!1}},Tr.canControlPlaybackRate=function(){if(Y&&J&&ee<58)return!1;try{const e=Tr.TEST_VID.playbackRate;return Tr.TEST_VID.playbackRate=e/2+.1,e!==Tr.TEST_VID.playbackRate}catch(e){return!1}},Tr.canOverrideAttributes=function(){try{const e=()=>{};Object.defineProperty(a.a.createElement("video"),"src",{get:e,set:e}),Object.defineProperty(a.a.createElement("audio"),"src",{get:e,set:e}),Object.defineProperty(a.a.createElement("video"),"innerHTML",{get:e,set:e}),Object.defineProperty(a.a.createElement("audio"),"innerHTML",{get:e,set:e})}catch(e){return!1}return!0},Tr.supportsNativeTextTracks=function(){return pe||he&&J},Tr.supportsNativeVideoTracks=function(){return!(!Tr.TEST_VID||!Tr.TEST_VID.videoTracks)},Tr.supportsNativeAudioTracks=function(){return!(!Tr.TEST_VID||!Tr.TEST_VID.audioTracks)},Tr.Events=["loadstart","suspend","abort","error","emptied","stalled","loadedmetadata","loadeddata","canplay","canplaythrough","playing","waiting","seeking","seeked","ended","durationchange","timeupdate","progress","play","pause","ratechange","resize","volumechange"],[["featuresMuteControl","canMuteVolume"],["featuresPlaybackRate","canControlPlaybackRate"],["featuresSourceset","canOverrideAttributes"],["featuresNativeTextTracks","supportsNativeTextTracks"],["featuresNativeVideoTracks","supportsNativeVideoTracks"],["featuresNativeAudioTracks","supportsNativeAudioTracks"]].forEac
2h((function(e){let[t,n]=e;H(Tr.prototype,t,(()=>Tr[n]()),!0)})),Tr.prototype.featuresVolumeControl=Tr.canControlVolume(),Tr.prototype.movingMediaElementInDOM=!he,Tr.prototype.featuresFullscreenResize=!0,Tr.prototype.featuresProgressEvents=!0,Tr.prototype.featuresTimeupdateEvents=!0,Tr.prototype.featuresVideoFrameCallback=!(!Tr.TEST_VID||!Tr.TEST_VID.requestVideoFrameCallback),Tr.disposeMediaElement=function(e){if(e){for(e.parentNode&&e.parentNode.removeChild(e);e.hasChildNodes();)e.removeChild(e.firstChild);e.removeAttribute("src"),"function"===typeof e.load&&function(){try{e.load()}catch(t){}}()}},Tr.resetMediaElement=function(e){if(!e)return;const t=e.querySelectorAll("source");let n=t.length;for(;n--;)e.removeChild(t[n]);e.removeAttribute("src"),"function"===typeof e.load&&function(){try{e.load()}catch(t){}}()},["muted","defaultMuted","autoplay","controls","loop","playsinline"].forEach((function(e){Tr.prototype[e]=function(){return this.el_[e]||this.el_.hasAttribute(e)}})),["muted","defaultMuted","autoplay","loop","playsinline"].forEach((function(e){Tr.prototype["set"+Mt(e)]=function(t){this.el_[e]=t,t?this.el_.setAttribute(e,e):this.el_.removeAttribute(e)}})),["paused","currentTime","buffered","volume","poster","preload","error","seeking","seekable","ended","playbackRate","defaultPlaybackRate","disablePictureInPicture","played","networkState","readyState","videoWidth","videoHeight","crossOrigin"].forEach((function(e){Tr.prototype[e]=function(){return this.el_[e]}})),["volume","src","poster","preload","playbackRate","defaultPlaybackRate","disablePictureInPicture","crossOrigin"].forEach((function(e){Tr.prototype["set"+Mt(e)]=function(t){this.el_[e]=t}})),["pause","load","play"].forEach((function(e){Tr.prototype[e]=function(){return this.el_[e]()}})),Dn.withSourceHandlers(Tr),Tr.nativeSourceHandler={},Tr.nativeSourceHandler.canPlayType=function(e){try{return Tr.TEST_VID.canPlayType(e)}catch(t){return""}},Tr.nativeSourceHandler.canHandleSource=function(e,t){if(e.type)return Tr.nativeSourceHandler.canPlayType(e.type);if(e.src){const t=_n(e.src);return Tr.nativeSourceHandler.canPlayType("video/".concat(t))}return""},Tr.nativeSourceHandler.handleSource=function(e,t,n){t.setSrc(e.src)},Tr.nativeSourceHandler.dispose=function(){},Tr.registerSourceHandler(Tr.nativeSourceHandler),Dn.registerTech("Html5",Tr);const Sr=["progress","abort","suspend","emptied","stalled","loadedmetadata","loadeddata","timeupdate","resize","volumechange","texttrackchange"],wr={canplay:"CanPlay",canplaythrough:"CanPlayThrough",playing:"Playing",seeked:"Seeked"},Ar=["tiny","xsmall","small","medium","large","xlarge","huge"],kr={};Ar.forEach((e=>{const t="x"===e.charAt(0)?"x-".concat(e.substring(1)):e;kr[e]="vjs-layout-".concat(t)}));const Cr={tiny:210,xsmall:320,small:425,medium:768,large:1440,xlarge:2560,huge:1/0};class Er extends Ut{constructor(e,t,n){if(e.id=e.id||t.id||"vjs_video_".concat(rt()),(t=Object.assign(Er.getTagSettings(e),t)).initChildren=!1,t.createEl=!1,t.evented=!1,t.reportTouchActivity=!1,!t.language){const n=e.closest("[lang]");n&&(t.language=n.getAttribute("lang"))}if(super(null,t,n),this.boundDocumentFullscreenChange_=e=>this.documentFullscreenChange_(e),this.boundFullWindowOnEscKey_=e=>this.fullWindowOnEscKey(e),this.boundUpdateStyleEl_=e=>this.updateStyleEl_(e),this.boundApplyInitTime_=e=>this.applyInitTime_(e),this.boundUpdateCurrentBreakpoint_=e=>this.updateCurrentBreakpoint_(e),this.boundHandleTechClick_=e=>this.handleTechClick_(e),this.boundHandleTechDoubleClick_=e=>this.handleTechDoubleClick_(e),this.boundHandleTechTouchStart_=e=>this.handleTechTouchStart_(e),this.boundHandleTechTouchMove_=e=>this.handleTechTouchMove_(e),this.boundHandleTechTouchEnd_=e=>this.handleTechTouchEnd_(e),this.boundHandleTechTap_=e=>this.handleTechTap_(e),this.boundUpdatePlayerHeightOnAudioOnlyMode_=e=>this.updatePlayerHeightOnAudioOnlyMode_(e),this.isFullscreen_=!1,this.log=R(this.id_),this.fsApi_=k,this.isPosterFromTech_=!1,this.queuedCallbacks_=[],this.isReady_=!1,this.hasStarted_=!1,this.userActive_=!1,this.debugEnabled_=!1,this.audioOnlyMode_=!1,this.audioPosterMode_=!1,this.audioOnlyCache_={controlBarHeight:null,playerHe
2ight:null,hiddenChildren:[]},!this.options_||!this.options_.techOrder||!this.options_.techOrder.length)throw new Error("No techOrder specified. Did you overwrite videojs.options instead of just changing the properties you want to override?");if(this.tag=e,this.tagAttributes=e&&ke(e),this.language(this.options_.language),t.languages){const e={};Object.getOwnPropertyNames(t.languages).forEach((function(n){e[n.toLowerCase()]=t.languages[n]})),this.languages_=e}else this.languages_=Er.prototype.options_.languages;this.resetCache_(),this.poster_=t.poster||"",this.controls_=!!t.controls,e.controls=!1,e.removeAttribute("controls"),this.changingSrc_=!1,this.playCallbacks_=[],this.playTerminatedQueue_=[],e.hasAttribute("autoplay")?this.autoplay(!0):this.autoplay(this.options_.autoplay),t.plugins&&Object.keys(t.plugins).forEach((e=>{if("function"!==typeof this[e])throw new Error('plugin "'.concat(e,'" does not exist'))})),this.scrubbing_=!1,this.el_=this.createEl(),Dt(this,{eventBusKey:"el_"}),this.fsApi_.requestFullscreen&&(dt(a.a,this.fsApi_.fullscreenchange,this.boundDocumentFullscreenChange_),this.on(this.fsApi_.fullscreenchange,this.boundDocumentFullscreenChange_)),this.fluid_&&this.on(["playerreset","resize"],this.boundUpdateStyleEl_);const i=z(this.options_);if(t.plugins&&Object.keys(t.plugins).forEach((e=>{this[e](t.plugins[e])})),t.debug&&this.debug(!0),this.options_.playerOptions=i,this.middleware_=[],this.playbackRates(t.playbackRates),t.experimentalSvgIcons){const e=(new r.a
vendor: 17,827 bytes, line 2
2.DOMParser).parseFromString('<svg xmlns="http://www.w3.org/2000/svg">\n <defs>\n <symbol viewBox="0 0 48 48" id="vjs-icon-play">\n <path d="M16 10v28l22-14z"></path>\n </symbol>\n <symbol viewBox="0 0 48 48" id="vjs-icon-pause">\n <path d="M12 38h8V10h-8v28zm16-28v28h8V10h-8z"></path>\n </symbol>\n <symbol viewBox="0 0 48 48" id="vjs-icon-audio">\n <path d="M24 2C14.06 2 6 10.06 6 20v14c0 3.31 2.69 6 6 6h6V24h-8v-4c0-7.73 6.27-14 14-14s14 6.27 14 14v4h-8v16h6c3.31 0 6-2.69 6-6V20c0-9.94-8.06-18-18-18z"></path>\n </symbol>\n <symbol viewBox="0 0 48 48" id="vjs-icon-captions">\n <path d="M38 8H10c-2.21 0-4 1.79-4 4v24c0 2.21 1.79 4 4 4h28c2.21 0 4-1.79 4-4V12c0-2.21-1.79-4-4-4zM22 22h-3v-1h-4v6h4v-1h3v2a2 2 0 0 1-2 2h-6a2 2 0 0 1-2-2v-8a2 2 0 0 1 2-2h6a2 2 0 0 1 2 2v2zm14 0h-3v-1h-4v6h4v-1h3v2a2 2 0 0 1-2 2h-6a2 2 0 0 1-2-2v-8a2 2 0 0 1 2-2h6a2 2 0 0 1 2 2v2z"></path>\n </symbol>\n <symbol viewBox="0 0 48 48" id="vjs-icon-subtitles">\n <path d="M40 8H8c-2.21 0-4 1.79-4 4v24c0 2.21 1.79 4 4 4h32c2.21 0 4-1.79 4-4V12c0-2.21-1.79-4-4-4zM8 24h8v4H8v-4zm20 12H8v-4h20v4zm12 0h-8v-4h8v4zm0-8H20v-4h20v4z"></path>\n </symbol>\n <symbol viewBox="0 0 48 48" id="vjs-icon-fullscreen-enter">\n <path d="M14 28h-4v10h10v-4h-6v-6zm-4-8h4v-6h6v-4H10v10zm24 14h-6v4h10V28h-4v6zm-6-24v4h6v6h4V10H28z"></path>\n </symbol>\n <symbol viewBox="0 0 48 48" id="vjs-icon-fullscreen-exit">\n <path d="M10 32h6v6h4V28H10v4zm6-16h-6v4h10V10h-4v6zm12 22h4v-6h6v-4H28v10zm4-22v-6h-4v10h10v-4h-6z"></path>\n </symbol>\n <symbol viewBox="0 0 48 48" id="vjs-icon-play-circle">\n <path d="M20 33l12-9-12-9v18zm4-29C12.95 4 4 12.95 4 24s8.95 20 20 20 20-8.95 20-20S35.05 4 24 4zm0 36c-8.82 0-16-7.18-16-16S15.18 8 24 8s16 7.18 16 16-7.18 16-16 16z"></path>\n </symbol>\n <symbol viewBox="0 0 48 48" id="vjs-icon-volume-mute">\n <path d="M33 24c0-3.53-2.04-6.58-5-8.05v4.42l4.91 4.91c.06-.42.09-.85.09-1.28zm5 0c0 1.88-.41 3.65-1.08 5.28l3.03 3.03C41.25 29.82 42 27 42 24c0-8.56-5.99-15.72-14-17.54v4.13c5.78 1.72 10 7.07 10 13.41zM8.55 6L6 8.55 15.45 18H6v12h8l10 10V26.55l8.51 8.51c-1.34 1.03-2.85 1.86-4.51 2.36v4.13a17.94 17.94 0 0 0 7.37-3.62L39.45 42 42 39.45l-18-18L8.55 6zM24 8l-4.18 4.18L24 16.36V8z"></path>\n </symbol>\n <symbol viewBox="0 0 48 48" id="vjs-icon-volume-low">\n <path d="M14 18v12h8l10 10V8L22 18h-8z"></path>\n </symbol>\n <symbol viewBox="0 0 48 48" id="vjs-icon-volume-medium">\n <path d="M37 24c0-3.53-2.04-6.58-5-8.05v16.11c2.96-1.48 5-4.53 5-8.06zm-27-6v12h8l10 10V8L18 18h-8z"></path>\n </symbol>\n <symbol viewBox="0 0 48 48" id="vjs-icon-volume-high">\n <path d="M6 18v12h8l10 10V8L14 18H6zm27 6c0-3.53-2.04-6.58-5-8.05v16.11c2.96-1.48 5-4.53 5-8.06zM28 6.46v4.13c5.78 1.72 10 7.07 10 13.41s-4.22 11.69-10 13.41v4.13c8.01-1.82 14-8.97 14-17.54S36.01 8.28 28 6.46z"></path>\n </symbol>\n <symbol viewBox="0 0 48 48" id="vjs-icon-spinner">\n <path d="M18.8 21l9.53-16.51C26.94 4.18 25.49 4 24 4c-4.8 0-9.19 1.69-12.64 4.51l7.33 12.69.11-.2zm24.28-3c-1.84-5.85-6.3-10.52-11.99-12.68L23.77 18h19.31zm.52 2H28.62l.58 1 9.53 16.5C41.99 33.94 44 29.21 44 24c0-1.37-.14-2.71-.4-4zm-26.53 4l-7.8-13.5C6.01 14.06 4 18.79 4 24c0 1.37.14 2.71.4 4h14.98l-2.31-4zM4.92 30c1.84 5.85 6.3 10.52 11.99 12.68L24.23 30H4.92zm22.54 0l-7.8 13.51c1.4.31 2.85.49 4.34.49 4.8 0 9.19-1.69 12.64-4.51L29.31 26.8 27.46 30z"></path>\n </symbol>\n <symbol viewBox="0 0 24 24" id="vjs-icon-hd">\n <path d="M19 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-8 12H9.5v-2h-2v2H6V9h1.5v2.5h2V9H11v6zm2-6h4c.55 0 1 .45 1 1v4c0 .55-.45 1-1 1h-4V9zm1.5 4.5h2v-3h-2v3z"></path>\n </symbol>\n <symbol viewBox="0 0 48 48" id="vjs-icon-chapters">\n <path d="M6 26h4v-4H6v4zm0 8h4v-4H6v4zm0-16h4v-4H6v4zm8 8h28v-4H14v4zm0 8h28v-4H14v4zm0-20v4h28v-4H14z"></path>\n </symbol>\n <symbol viewBox="0 0 40 40" id="vjs-icon-downloading">\n <path d="M18.208 36.875q-3.208-.292-5.979-1.729-2.771-1.438-4.812-3.729-2.042-2.292-3.188-5.229-1.146-2.938-1.146-6.23 0-6.583 4.334-11.416 4.333-4.834 10.833-5.5v3.166q-5.167.75-8.583 4.646Q6.25 14.75 6.25 19.958q0 5.209 3.396 9.104 3.396 3.896 8.562 4.646zM20 28.417L11.542 20l2.083-2.083 4.917 4.916v-11.25h2.916v11.25l4.875-4.916L28.417 20zm1.792 8.458v-3.167q1.833-.25 3.541-.958 1.709-.708 3.167-1.875l2.333 2.292q-1.958 1.583-4.25 2.541-2.291.959-4.791 1.167zm6.791-27.792q-1.541-1.125-3.25-1.854-1.708-.729-3.541-1.021V3.042q2.5.25 4.77 1.208 2.271.958 4.271 2.5zm4.584 21.584l-2.25-2.25q1.166-1.5 1.854-3.209.687-1.708.937-3.541h3.209q-.292 2.5-1.229 4.791-.938 2.292-2.521 4.209zm.541-12.417q-.291-1.833-.958-3.562-.667-1.73-1.833-3.188l2.375-2.208q1.541 1.916 2.458 4.208.917 2.292 1.167 4.75z"></path>\n </symbol>\n <symbol viewBox="0 0 48 48" id="vjs-icon-file-download">\n <path d="M10.8 40.55q-1.35 0-2.375-1T7.4 37.15v-7.7h3.4v7.7h26.35v-7.7h3.4v7.7q0 1.4-1 2.4t-2.4 1zM24 32.1L13.9 22.05l2.45-2.45 5.95 5.95V7.15h3.4v18.4l5.95-5.95 2.45 2.45z"></path>\n </symbol>\n <symbol viewBox="0 0 48 48" id="vjs-icon-file-download-done">\n <path d="M9.8 40.5v-3.45h28.4v3.45zm9.2-9.05L7.4 19.85l2.45-2.35L19 26.65l19.2-19.2 2.4 2.4z"></path>\n </symbol>\n <symbol viewBox="0 0 48 48" id="vjs-icon-file-download-off">\n <path d="M4.9 4.75L43.25 43.1 41 45.3l-4.75-4.75q-.05.05-.075.025-.025-.025-.075-.025H10.8q-1.35 0-2.375-1T7.4 37.15v-7.7h3.4v7.7h22.05l-7-7-1.85 1.8L13.9 21.9l1.85-1.85L2.7 7zm26.75 14.7l2.45 2.45-3.75 3.8-2.45-2.5zM25.7 7.15V21.1l-3.4-3.45V7.15z"></path>\n </symbol>\n <symbol viewBox="0 0 48 48" id="vjs-icon-share">\n <path d="M36 32.17c-1.52 0-2.89.59-3.93 1.54L17.82 25.4c.11-.45.18-.92.18-1.4s-.07-.95-.18-1.4l14.1-8.23c1.07 1 2.5 1.62 4.08 1.62 3.31 0 6-2.69 6-6s-2.69-6-6-6-6 2.69-6 6c0 .48.07.95.18 1.4l-14.1 8.23c-1.07-1-2.5-1.62-4.08-1.62-3.31 0-6 2.69-6 6s2.69 6 6 6c1.58 0 3.01-.62 4.08-1.62l14.25 8.31c-.1.42-.16.86-.16 1.31A5.83 5.83 0 1 0 36 32.17z"></path>\n </symbol>\n <symbol viewBox="0 0 48 48" id="vjs-icon-cog">\n <path d="M38.86 25.95c.08-.64.14-1.29.14-1.95s-.06-1.31-.14-1.95l4.23-3.31c.38-.3.49-.84.24-1.28l-4-6.93c-.25-.43-.77-.61-1.22-.43l-4.98 2.01c-1.03-.79-2.16-1.46-3.38-1.97L29 4.84c-.09-.47-.5-.84-1-.84h-8c-.5 0-.91.37-.99.84l-.75 5.3a14.8 14.8 0 0 0-3.38 1.97L9.9 10.1a1 1 0 0 0-1.22.43l-4 6.93c-.25.43-.14.97.24 1.28l4.22 3.31C9.06 22.69 9 23.34 9 24s.06 1.31.14 1.95l-4.22 3.31c-.38.3-.49.84-.24 1.28l4 6.93c.25.43.77.61 1.22.43l4.98-2.01c1.03.79 2.16 1.46 3.38 1.97l.75 5.3c.08.47.49.84.99.84h8c.5 0 .91-.37.99-.84l.75-5.3a14.8 14.8 0 0 0 3.38-1.97l4.98 2.01a1 1 0 0 0 1.22-.43l4-6.93c.25-.43.14-.97-.24-1.28l-4.22-3.31zM24 31c-3.87 0-7-3.13-7-7s3.13-7 7-7 7 3.13 7 7-3.13 7-7 7z"></path>\n </symbol>\n <symbol viewBox="0 0 48 48" id="vjs-icon-square">\n <path d="M36 8H12c-2.21 0-4 1.79-4 4v24c0 2.21 1.79 4 4 4h24c2.21 0 4-1.79 4-4V12c0-2.21-1.79-4-4-4zm0 28H12V12h24v24z"></path>\n </symbol>\n <symbol viewBox="0 0 48 48" id="vjs-icon-circle">\n <circle cx="24" cy="24" r="20"></circle>\n </symbol>\n <symbol viewBox="0 0 48 48" id="vjs-icon-circle-outline">\n <path d="M24 4C12.95 4 4 12.95 4 24s8.95 20 20 20 20-8.95 20-20S35.05 4 24 4zm0 36c-8.82 0-16-7.18-16-16S15.18 8 24 8s16 7.18 16 16-7.18 16-16 16z"></path>\n </symbol>\n <symbol viewBox="0 0 48 48" id="vjs-icon-circle-inner-circle">\n <path d="M24 4C12.97 4 4 12.97 4 24s8.97 20 20 20 20-8.97 20-20S35.03 4 24 4zm0 36c-8.82 0-16-7.18-16-16S15.18 8 24 8s16 7.18 16 16-7.18 16-16 16zm6-16c0 3.31-2.69 6-6 6s-6-2.69-6-6 2.69-6 6-6 6 2.69 6 6z"></path>\n </symbol>\n <symbol viewBox="0 0 48 48" id="vjs-icon-cancel">\n <path d="M24 4C12.95 4 4 12.95 4 24s8.95 20 20 20 20-8.95 20-20S35.05 4 24 4zm10 27.17L31.17 34 24 26.83 16.83 34 14 31.17 21.17 24 14 16.83 16.83 14 24 21.17 31.17 14 34 16.83 26.83 24 34 31.17z"></path>\n </symbol>\n <symbol viewBox="0 0 48 48" id="vjs-icon-replay">\n <path d="M24 10V2L14 12l10 10v-8c6.63 0 12 5.37 12 12s-5.37 12-12 12-12-5.37-12-12H8c0 8.84 7.16 16 16 16s16-7.16 16-16-7.16-16-16-16z"></path>\n </symbol>\n <symbol viewBox="0 0 48 48" id="vjs-icon-repeat">\n <path d="M14 14h20v6l8-8-8-8v6H10v12h4v-8zm20 20H14v-6l-8 8 8 8v-6h24V26h-4v8z"></path>\n </symbol>\n <symbol viewBox="0 96 48 48" id="vjs-icon-replay-5">\n <path d="M17.689 98l-8.697 8.696 8.697 8.697 2.486-2.485-4.32-4.319h1.302c4.93 0 9.071 1.722 12.424 5.165 3.352 3.443 5.029 7.638 5.029 12.584h3.55c0-2.958-.553-5.73-1.658-8.313-1.104-2.583-2.622-4.841-4.555-6.774-1.932-1.932-4.19-3.45-6.773-4.555-2.584-1.104-5.355-1.657-8.313-1.657H15.5l4.615-4.615zm-8.08 21.659v13.861h11.357v5.008H9.609V143h12.7c.834 0 1.55-.298 2.146-.894.596-.597.895-1.31.895-2.145v-7.781c0-.835-.299-1.55-.895-2.147a2.929 2.929 0 0 0-2.147-.894h-8.227v-5.096H25.35v-4.384z"></path>\n </symbol>\n <symbol viewBox="0 96 48 48" id="vjs-icon-replay-10">\n <path d="M42.315 125.63c0-4.997-1.694-9.235-5.08-12.713-3.388-3.479-7.571-5.218-12.552-5.218h-1.315l4.363 4.363-2.51 2.51-8.787-8.786L25.221 97l2.45 2.45-4.662 4.663h1.375c2.988 0 5.788.557 8.397 1.673 2.61 1.116 4.892 2.65 6.844 4.602 1.953 1.953 3.487 4.234 4.602 6.844 1.116 2.61 1.674 5.41 1.674 8.398zM8.183 142v-19.657H3.176V117.8h9.643V142zm13.63 0c-1.156 0-2.127-.393-2.912-1.178-.778-.778-1.168-1.746-1.168-2.902v-16.04c0-1.156.393-2.127 1.178-2.912.779-.779 1.746-1.168 2.902-1.168h7.696c1.156 0 2.126.392 2.911 1.177.779.78 1.168 1.747 1.168 2.903v16.04c0 1.156-.392 2.127-1.177 2.912-.779.779-1.746 1.168-2.902 1.168zm.556-4.636h6.583v-15.02H22.37z"></path>\n </symbol>\n <symbol viewBox="0 96 48 48" id="vjs-icon-replay-30">\n <path d="M26.047 97l-8.733 8.732 8.733 8.733 2.496-2.494-4.336-4.338h1.307c4.95 0 9.108 1.73 12.474 5.187 3.367 3.458 5.051 7.668 5.051 12.635h3.565c0-2.97-.556-5.751-1.665-8.346-1.109-2.594-2.633-4.862-4.574-6.802-1.94-1.941-4.208-3.466-6.803-4.575-2.594-1.109-5.375-1.664-8.345-1.664H23.85l4.634-4.634zM2.555 117.531v4.688h10.297v5.25H5.873v4.687h6.979v5.156H2.555V142H13.36c1.061 0 1.95-.395 2.668-1.186.718-.79 1.076-1.772 1.076-2.94v-16.218c0-1.168-.358-2.149-1.076-2.94-.717-.79-1.607-1.185-2.668-1.185zm22.482.14c-1.149 0-2.11.39-2.885 1.165-.78.78-1.172 1.744-1.172 2.893v15.943c0 1.149.388 2.11 1.163 2.885.78.78 1.745 1.172 2.894 1.172h7.649c1.148 0 2.11-.388 2.884-1.163.78-.78 1.17-1.745 1.17-2.894v-15.943c0-1.15-.386-2.111-1.16-2.885-.78-.78-1.746-1.172-2.894-1.172zm.553 4.518h6.545v14.93H25.59z"></path>\n </symbol>\n <symbol viewBox="0 96 48 48" id="vjs-icon-forward-5">\n <path d="M29.508 97l-2.431 2.43 4.625 4.625h-1.364c-2.965 0-5.742.554-8.332 1.66-2.589 1.107-4.851 2.629-6.788 4.566-1.937 1.937-3.458 4.2-4.565 6.788-1.107 2.59-1.66 5.367-1.66 8.331h3.557c0-4.957 1.68-9.16 5.04-12.611 3.36-3.45 7.51-5.177 12.451-5.177h1.304l-4.326 4.33 2.49 2.49 8.715-8.716zm-9.783 21.61v13.89h11.382v5.018H19.725V142h12.727a2.93 2.93 0 0 0 2.15-.896 2.93 2.93 0 0 0 .896-2.15v-7.798c0-.837-.299-1.554-.896-2.152a2.93 2.93 0 0 0-2.15-.896h-8.245V123h11.29v-4.392z"></path>\n </symbol>\n <symbol viewBox="0 96 48 48" id="vjs-icon-forward-10">\n <path d="M23.119 97l-2.386 2.383 4.538 4.538h-1.339c-2.908 0-5.633.543-8.173 1.63-2.54 1.085-4.76 2.577-6.66 4.478-1.9 1.9-3.392 4.12-4.478 6.66-1.085 2.54-1.629 5.264-1.629 8.172h3.49c0-4.863 1.648-8.986 4.944-12.372 3.297-3.385 7.368-5.078 12.216-5.078h1.279l-4.245 4.247 2.443 2.442 8.55-8.55zm-9.52 21.45v4.42h4.871V142h4.513v-23.55zm18.136 0c-1.125 0-2.066.377-2.824 1.135-.764.764-1.148 1.709-1.148 2.834v15.612c0 1.124.38 2.066 1.139 2.824.764.764 1.708 1.145 2.833 1.145h7.489c1.125 0 2.066-.378 2.824-1.136.764-.764 1.145-1.709 1.145-2.833v-15.612c0-1.125-.378-2.067-1.136-2.825-.764-.764-1.708-1.145-2.833-1.145zm.54 4.42h6.408v14.617h-6.407z"></path>\n </symbol>\n <symbol viewBox="0 96 48 48" id="vjs-icon-forward-30">\n <path d="M25.549 97l-2.437 2.434 4.634 4.635H26.38c-2.97 0-5.753.555-8.347 1.664-2.594 1.109-4.861 2.633-6.802 4.574-1.94 1.94-3.465 4.207-4.574 6.802-1.109 2.594-1.664 5.377-1.664 8.347h3.565c0-4.967 1.683-9.178 5.05-12.636 3.366-3.458 7.525-5.187 12.475-5.187h1.307l-4.335 4.338 2.495 2.494 8.732-8.732zm-11.553 20.53v4.689h10.297v5.249h-6.978v4.688h6.978v5.156H13.996V142h10.808c1.06 0 1.948-.395 2.666-1.186.718-.79 1.077-1.771 1.077-2.94v-16.217c0-1.169-.36-2.15-1.077-2.94-.718-.79-1.605-1.186-2.666-1.186zm21.174.168c-1.149 0-2.11.389-2.884 1.163-.78.78-1.172 1.745-1.172 2.894v15.942c0 1.15.388 2.11 1.162 2.885.78.78 1.745 1.17 2.894 1.17h7.649c1.149 0 2.11-.386 2.885-1.16.78-.78 1.17-1.746 1.17-2.895v-15.942c0-1.15-.387-2.11-1.161-2.885-.78-.78-1.745-1.172-2.894-1.172zm.552 4.516h6.542v14.931h-6.542z"></path>\n </symbol>\n <symbol viewBox="0 0 512 512" id="vjs-icon-audio-description">\n <g fill-rule="evenodd"><path d="M227.29 381.351V162.993c50.38-1.017 89.108-3.028 117.631 17.126 27.374 19.342 48.734 56.965 44.89 105.325-4.067 51.155-41.335 94.139-89.776 98.475-24.085 2.155-71.972 0-71.972 0s-.84-1.352-.773-2.568m48.755-54.804c31.43 1.26 53.208-16.633 56.495-45.386 4.403-38.51-21.188-63.552-58.041-60.796v103.612c-.036 1.466.575 2.22 1.546 2.57"></path><path d="M383.78 381.328c13.336 3.71 17.387-11.06 23.215-21.408 12.722-22.571 22.294-51.594 22.445-84.774.221-47.594-18.343-82.517-35.6-106.182h-8.51c-.587 3.874 2.226 7.315 3.865 10.276 13.166 23.762 25.367 56.553 25.54 94.194.2 43.176-14.162 79.278-30.955 107.894"></path><path d="M425.154 381.328c13.336 3.71 17.384-11.061 23.215-21.408 12.721-22.571 22.291-51.594 22.445-84.774.221-47.594-18.343-82.517-35.6-106.182h-8.511c-.586 3.874 2.226 7.315 3.866 10.276 13.166 23.762 25.367 56.553 25.54 94.194.2 43.176-14.162 79.278-30.955 107.894"></path><path d="M466.26 381.328c13.337 3.71 17.385-11.061 23.216-21.408 12.722-22.571 22.292-51.594 22.445-84.774.221-47.594-18.343-82.517-35.6-106.182h-8.51c-.587 3.874 2.225 7.315 3.865 10.276 13.166 23.762 25.367 56.553 25.54 94.194.2 43.176-14.162 79.278-30.955 107.894M4.477 383.005H72.58l18.573-28.484 64.169-.135s.065 19.413.065 28.62h48.756V160.307h-58.816c-5.653 9.537-140.85 222.697-140.85 222.697zm152.667-145.282v71.158l-40.453-.27 40.453-70.888z"></path></g>\n </symbol>\n <symbol viewBox="0 0 48 48" id="vjs-icon-next-item">\n <path d="M12 36l17-12-17-12v24zm20-24v24h4V12h-4z"></path>\n </symbol>\n <symbol viewBox="0 0 48 48" id="vjs-icon-previous-item">\n <path d="M12 12h4v24h-4zm7 12l17 12V12z"></path>\n </symbol>\n <symbol viewBox="0 0 48 48" id="vjs-icon-shuffle">\n <path d="M21.17 18.34L10.83 8 8 10.83l10.34 10.34 2.83-2.83zM29 8l4.09 4.09L8 37.17 10.83 40l25.09-25.09L40 19V8H29zm.66 18.83l-2.83 2.83 6.26 6.26L29 40h11V29l-4.09 4.09-6.25-6.26z"></path>\n </symbol>\n <symbol viewBox="0 0 48 48" id="vjs-icon-cast">\n <path d="M42 6H6c-2.21 0-4 1.79-4 4v6h4v-6h36v28H28v4h14c2.21 0 4-1.79 4-4V10c0-2.21-1.79-4-4-4zM2 36v6h6c0-3.31-2.69-6-6-6zm0-8v4c5.52 0 10 4.48 10 10h4c0-7.73-6.27-14-14-14zm0-8v4c9.94 0 18 8.06 18 18h4c0-12.15-9.85-22-22-22z"></path>\n </symbol>\n <symbol viewBox="0 0 48 48" id="vjs-icon-picture-in-picture-enter">\n <path d="M38 22H22v11.99h16V22zm8 16V9.96C46 7.76 44.2 6 42 6H6C3.8 6 2 7.76 2 9.96V38c0 2.2 1.8 4 4 4h36c2.2 0 4-1.8 4-4zm-4 .04H6V9.94h36v28.1z"></path>\n </symbol>\n <symbol viewBox="0 0 22 18" id="vjs-icon-picture-in-picture-exit">\n <path d="M18 4H4v10h14V4zm4 12V1.98C22 .88 21.1 0 20 0H2C.9 0 0 .88 0 1.98V16c0 1.1.9 2 2 2h18c1.1 0 2-.9 2-2zm-2 .02H2V1.97h18v14.05z"></path>\n <path fill="none" d="M-1-3h24v24H-1z"></path>\n </symbol>\n <symbol viewBox="0 0 1792 1792" id="vjs-icon-facebook">\n <path d="M1343 12v264h-157q-86 0-116 36t-30 108v189h293l-39 296h-254v759H734V905H479V609h255V391q0-186 104-288.5T1115 0q147 0 228 12z"></path>\n </symbol>\n <symbol viewBox="0 0 1792 1792" id="vjs-icon-linkedin">\n <path d="M477 625v991H147V625h330zm21-306q1 73-50.5 122T312 490h-2q-82 0-132-49t-50-122q0-74 51.5-122.5T314 148t133 48.5T498 319zm1166 729v568h-329v-530q0-105-40.5-164.5T1168 862q-63 0-105.5 34.5T999 982q-11 30-11 81v553H659q2-399 2-647t-1-296l-1-48h329v144h-2q20-32 41-56t56.5-52 87-43.5T1285 602q171 0 275 113.5t104 332.5z"></path>\n </symbol>\n <symbol viewBox="0 0 1200 1227" id="vjs-icon-twitter">\n <path d="M714.163 519.284L1160.89 0H1055.03L667.137 450.887L357.328 0H0L468.492 681.821L0 1226.37H105.866L515.491 750.218L842.672 1226.37H1200L714.137 519.284H714.163ZM569.165 687.828L521.697 619.934L144.011 79.6944H306.615L611.412 515.685L658.88 583.579L1055.08 1150.3H892.476L569.165 687.854V687.828Z"/>\n </symbol>\n <symbol viewBox="0 0 1792 1792" id="vjs-icon-tumblr">\n <path d="M1328 1329l80 237q-23 35-111 66t-177 32q-104 2-190.5-26T787 1564t-95-106-55.5-120-16.5-118V676H452V461q72-26 129-69.5t91-90 58-102 34-99T779 12q1-5 4.5-8.5T791 0h244v424h333v252h-334v518q0 30 6.5 56t22.5 52.5 49.5 41.5 81.5 14q78-2 134-29z"></path>\n </symbol>\n <symbol viewBox="0 0 1792 1792" id="vjs-icon-pinterest">\n <path d="M1664 896q0 209-103 385.5T1281.5 1561 896 1664q-111 0-218-32 59-93 78-164 9-34 54-211 20 39 73 67.5t114 28.5q121 0 216-68.5t147-188.5 52-270q0-114-59.5-214T1180 449t-255-63q-105 0-196 29t-154.5 77-109 110.5-67 129.5T377 866q0 104 40 183t117 111q30 12 38-20 2-7 8-31t8-30q6-23-11-43-51-61-51-151 0-151 104.5-259.5T904 517q151 0 235.5 82t84.5 213q0 170-68.5 289T980 1220q-61 0-98-43.5T859 1072q8-35 26.5-93.5t30-103T927 800q0-50-27-83t-77-33q-62 0-105 57t-43 142q0 73 25 122l-99 418q-17 70-13 177-206-91-333-281T128 896q0-209 103-385.5T510.5 231 896 128t385.5 103T1561 510.5 1664 896z"></path>\n </symbol>\n </defs>\n</svg>',"image/svg+xml");if(e.querySelector("parsererror"))
2P.warn("Failed to load SVG Icons. Falling back to Font Icons."),this.options_.experimentalSvgIcons=null;else{const t=e.documentElement;t.style.display="none",this.el_.appendChild(t),this.addClass("vjs-svg-icons-enabled")}}this.initChildren(),this.isAudio("audio"===e.nodeName.toLowerCase()),this.controls()?this.addClass("vjs-controls-enabled"):this.addClass("vjs-controls-disabled"),this.el_.setAttribute("role","region"),this.isAudio()?this.el_.setAttribute("aria-label",this.localize("Audio Player")):this.el_.setAttribute("aria-label",this.localize("Video Player")),this.isAudio()&&this.addClass("vjs-audio"),t.spatialNavigation&&t.spatialNavigation.enabled&&(this.spatialNavigation=new Kn(this),this.addClass("vjs-spatial-navigation-enabled")),de&&this.addClass("vjs-touch-enabled"),he||this.addClass("vjs-workinghover"),Er.players[this.id_]=this;const s=T.split(".")[0];this.addClass("vjs-v".concat(s)),this.userActive(!0),this.reportUserActivity(),this.one("play",(e=>this.listenForUserActivity_(e))),this.on("keydown",(e=>this.handleKeyDown(e))),this.on("languagechange",(e=>this.handleLanguagechange(e))),this.breakpoints(this.options_.breakpoints),this.responsive(this.options_.responsive),this.on("ready",(()=>{this.audioPosterMode(this.options_.audioPosterMode),this.audioOnlyMode(this.options_.audioOnlyMode)}))}dispose(){var e;this.trigger("dispose"),this.off("dispose"),ut(a.a,this.fsApi_.fullscreenchange,this.boundDocumentFullscreenChange_),ut(a.a,"keydown",this.boundFullWindowOnEscKey_),this.styleEl_&&this.styleEl_.parentNode&&(this.styleEl_.parentNode.removeChild(this.styleEl_),this.styleEl_=null),Er.players[this.id_]=null,this.tag&&this.tag.player&&(this.tag.player=null),this.el_&&this.el_.player&&(this.el_.player=null),this.tech_&&(this.tech_.dispose(),this.isPosterFromTech_=!1,this.poster_=""),this.playerElIngest_&&(this.playerElIngest_=null),this.tag&&(this.tag=null),e=this,Rn.hasOwnProperty(e.id())&&delete Rn[e.id()],In.names.forEac
2h((e=>{const t=this[In[e].getterName]();t&&t.off&&t.off()})),super.dispose({restoreEl:this.options_.restoreEl})}createEl(){let e,t=this.tag,n=this.playerElIngest_=t.parentNode&&t.parentNode.hasAttribute&&t.parentNode.hasAttribute("data-vjs-player");const i="video-js"===this.tag.tagName.toLowerCase();n?e=this.el_=t.parentNode:i||(e=this.el_=super.createEl("div"));const s=ke(t);if(i){for(e=this.el_=t,t=this.tag=a.a.createElement("video");e.children.length;)t.appendChild(e.firstChild);Oe(e,"video-js")||Te(e,"video-js"),e.appendChild(t),n=this.playerElIngest_=e,Object.keys(e).forEach((n=>{try{t[n]=e[n]}catch(i){}}))}t.setAttribute("tabindex","-1"),s.tabindex="-1",J&&re&&(t.setAttribute("role","application"),s.role="application"),t.removeAttribute("width"),t.removeAttribute("height"),"width"in s&&delete s.width,"height"in s&&delete s.height,Object.getOwnPropertyNames(s).forEach((function(n){i&&"class"===n||e.setAttribute(n,s[n]),i&&t.setAttribute(n,s[n])})),t.playerId=t.id,t.id+="_html5_api",t.className="vjs-tech",t.player=e.player=this,this.addClass("vjs-paused");const o=["IS_SMART_TV","IS_TIZEN","IS_WEBOS","IS_ANDROID","IS_IPAD","IS_IPHONE","IS_CHROMECAST_RECEIVER"].filter((e=>me[e])).map((e=>"vjs-device-"+e.substring(3).toLowerCase().replace(/\_/g,"-")));if(this.addClass(...o),!0!==r.a.VIDEOJS_NO_DYNAMIC_STYLE){this.styleEl_=$e("vjs-styles-dimensions");const e=He(".vjs-styles-defaults"),t=He("head");t.insertBefore(this.styleEl_,e?e.nextSibling:t.firstChild)}this.fill_=!1,this.fluid_=!1,this.width(this.options_.width),this.height(this.options_.height),this.fill(this.options_.fill),this.fluid(this.options_.fluid),this.aspectRatio(this.options_.aspectRatio),this.crossOrigin(this.options_.crossOrigin||this.options_.crossorigin);const c=t.getElementsByTagName("a");for(let r=0;r<c.length;r++){const e=c.item(r);Te(e,"vjs-hidden"),e.setAttribute("hidden","hidden")}return t.initNetworkState_=t.networkState,t.parentNode&&!n&&t.parentNode.insertBefore(e,t),xe(t,e),this.children_.unshift(t),this.el_.setAttribute("lang",this.language_),this.el_.setAttribute("translate","no"),this.el_=e,e}crossOrigin(e){if("undefined"===typeof e)return this.techGet_("crossOrigin");null===e||"anonymous"===e||"use-credentials"===e?(this.techCall_("setCrossOrigin",e),this.posterImage&&this.posterImage.crossOrigin(e)):P.warn('crossOrigin must be null, "anonymous" or "use-credentials", given "'.concat(e,'"'))}width(e){return this.dimension("width",e)}height(e){return this.dimension("height",e)}dimension(e,t){const n=e+"_";if(void 0===t)return this[n]||0;if(""===t||"auto"===t)return this[n]=void 0,void this.updateStyleEl_();const i=parseFloat(t);isNaN(i)?P.error('Improper value "'.concat(t,'" supplied for for ').concat(e)):(this[n]=i,this.updateStyleEl_())}fluid(e){if(void 0===e)return!!this.fluid_;var t,n;this.fluid_=!!e,Tt(this)&&this.off(["playerreset","resize"],this.boundUpdateStyleEl_),e?(this.addClass("vjs-fluid"),this.fill(!1),n=()=>{this.on(["playerreset","resize"],this.boundUpdateStyleEl_)},Tt(t=this)?n():(t.eventedCallbacks||(t.eventedCallbacks=[]),t.eventedCallbacks.push(n))):this.removeClass("vjs-fluid"),this.updateStyleEl_()}fill(e){if(void 0===e)return!!this.fill_;this.fill_=!!e,e?(this.addClass("vjs-fill"),this.fluid(!1)):this.removeClass("vjs-fill")}aspectRatio(e){if(void 0===e)return this.aspectRatio_;if(!/^\d+\:\d+$/.test(e))throw new Error("Improper value supplied for aspect ratio. The format should be width:height, for example 16:9.");this.aspectRatio_=e,this.fluid(!0),this.updateStyleEl_()}updateStyleEl_(){if(!0===r.a.VIDEOJS_NO_DYNAMIC_STYLE){const e="number"===typeof this.width_?this.width_:this.options_.width,t="number"===typeof this.height_?this.height_:this.options_.height,n=this.tech_&&this.tech_.el();return void(n&&(e>=0&&(n.width=e),t>=0&&(n.height=t)))}let e,t,n,i;n=void 0!==this.aspectRatio_&&"auto"!==this.aspectRatio_?this.aspectRatio_:this.videoWidth()>0?this.videoWidth()+":"+this.videoHeight():"16:9";const s=n.split(":"),a=s[1]/s[0];e=void 0!==this.width_?this.width_:void 0!==this.height_?this.height_/a:this.videoWidth()||300,t=void 0!==this.height_?this.height_:e*a,i=/^[^a-zA-Z]/.test(this.id())?"dimensions-"+this.id():this.id()+"-dimensions",this.addClass(i),et(this.styleEl_,"\n .".concat(i," {\n width: ").concat(e,"px;\n height: ").concat(t,"px;\n }\n\n .").concat(i,".vjs-fluid:not(.vjs-audio-only-mode) {\n padding-top: ").concat(100*a,"%;\n }\n "))}loadTech_(e,t){this.tech_&&this.unloadTech_();const n=Mt(e),i=e.charAt(0).toLowerCase()+e.slice(1);"Html5"!==n&&this.tag&&(Dn.getTech("Html5").disposeMediaElement(this.tag),this.tag.player=null,this.tag=null),this.techName_=n,this.isReady_=!1;let r=this.autoplay();("string"===typeof this.autoplay()||!0===this.autoplay()&&this.options_.normalizeAutoplay)&&(r=!1);const s={source:t,autoplay:r,nativeControlsForTouch:this.options_.nativeControlsForTouch,playerId:this.id(),techId:"".concat(this.id(),"_").concat(i,"_api"),playsinline:this.options_.playsinline,preload:this.options_.preload,loop:this.options_.loop,disablePictureInPicture:this.options_.disablePictureInPicture,muted:this.options_.muted,poster:this.poster(),language:this.language(),playerElIngest:this.playerElIngest_||!1,"vtt.js":this.options_["vtt.js"],canOverridePoster:!!this.options_.techCanOverridePoster,enableSourceset:this.options_.enableSourceset};
2In.names.forEach((e=>{const t=In[e];s[t.getterName]=this[t.privateName]})),Object.assign(s,this.options_[n]),Object.assign(s,this.options_[i]),Object.assign(s,this.options_[e.toLowerCase()]),this.tag&&(s.tag=this.tag),t&&t.src===this.cache_.src&&this.cache_.currentTime>0&&(s.startTime=this.cache_.currentTime);const a=Dn.getTech(e);if(!a)throw new Error("No Tech named '".concat(n,"' exists! '").concat(n,"' should be registered using videojs.registerTech()'"));this.tech_=new a(s),this.tech_.ready(bt(this,this.handleTechReady_),!0),tn(this.textTracksJson_||[],this.tech_),Sr.forEach((e=>{this.on(this.tech_,e,(t=>this["handleTech".concat(Mt(e),"_")](t)))})),Object.keys(wr).forEach((e=>{this.on(this.tech_,e,(t=>{0===this.tech_.playbackRate()&&this.tech_.seeking()?this.queuedCallbacks_.push({callback:this["handleTech".concat(wr[e],"_")].bind(this),event:t}):this["handleTech".concat(wr[e],"_")](t)}))})),this.on(this.tech_,"loadstart",(e=>this.handleTechLoadStart_(e))),this.on(this.tech_,"sourceset",(e=>this.handleTechSourceset_(e))),this.on(this.tech_,"waiting",(e=>this.handleTechWaiting_(e))),this.on(this.tech_,"ended",(e=>this.handleTechEnded_(e))),this.on(this.tech_,"seeking",(e=>this.handleTechSeeking_(e))),this.on(this.tech_,"play",(e=>this.handleTechPlay_(e))),this.on(this.tech_,"pause",(e=>this.handleTechPause_(e))),this.on(this.tech_,"durationchange",(e=>this.handleTechDurationChange_(e))),this.on(this.tech_,"fullscreenchange",((e,t)=>this.handleTechFullscreenChange_(e,t))),this.on(this.tech_,"fullscreenerror",((e,t)=>this.handleTechFullscreenError_(e,t))),this.on(this.tech_,"enterpictureinpicture",(e=>this.handleTechEnterPictureInPicture_(e))),this.on(this.tech_,"leavepictureinpicture",(e=>this.handleTechLeavePictureInPicture_(e))),this.on(this.tech_,"error",(e=>this.handleTechError_(e))),this.on(this.tech_,"posterchange",(e=>this.handleTechPosterChange_(e))),this.on(this.tech_,"textdata",(e=>this.handleTechTextData_(e))),this.on(this.tech_,"ratechange",(e=>this.handleTechRateChange_(e))),this.on(this.tech_,"loadedmetadata",this.boundUpdateStyleEl_),this.usingNativeControls(this.techGet_("controls")),this.controls()&&!this.usingNativeControls()&&this.addTechControlsListeners_(),this.tech_.el().parentNode===this.el()||"Html5"===n&&this.tag||xe(this.tech_.el(),this.el()),this.tag&&(this.tag.player=null,this.tag=null)}unloadTech_(){In.names.forEach((e=>{const t=In[e];this[t.privateName]=this[t.getterName]()})),this.textTracksJson_=en(this.tech_),this.isReady_=!1,this.tech_.dispose(),this.tech_=!1,this.isPosterFromTech_&&(this.poster_="",this.trigger("posterchange")),this.isPosterFromTech_=!1}tech(e){return void 0===e&&P.warn("Using the tech directly can be dangerous. I hope you know
2what you're doing.\nSee https://github.com/videojs/video.js/issues/2617 for more info.\n"),this.tech_}version(){return{"video.js":T}}addTechControlsListeners_(){this.removeTechControlsListeners_(),this.on(this.tech_,"click",this.boundHandleTechClick_),this.on(this.tech_,"dblclick",this.boundHandleTechDoubleClick_),this.on(this.tech_,"touchstart",this.boundHandleTechTouchStart_),this.on(this.tech_,"touchmove",this.boundHandleTechTouchMove_),this.on(this.tech_,"touchend",this.boundHandleTechTouchEnd_),this.on(this.tech_,"tap",this.boundHandleTechTap_)}removeTechControlsListeners_(){this.off(this.tech_,"tap",this.boundHandleTechTap_),this.off(this.tech_,"touchstart",this.boundHandleTechTouchStart_),this.off(this.tech_,"touchmove",this.boundHandleTechTouchMove_),this.off(this.tech_,"touchend",this.boundHandleTechTouchEnd_),this.off(this.tech_,"click",this.boundHandleTechClick_),this.off(this.tech_,"dblclick",this.boundHandleTechDoubleClick_)}handleTechReady_(){this.triggerReady(),this.cache_.volume&&this.techCall_("setVolume",this.cache_.volume),this.handleTechPosterChange_(),this.handleTechDurationChange_()}handleTechLoadStart_(){this.removeClass("vjs-ended","vjs-seeking"),this.error(null),this.handleTechDurationChange_(),this.paused()?(this.hasStarted(!1),this.trigger("loadstart")):this.trigger("loadstart"),this.manualAutoplay_(!0===this.autoplay()&&this.options_.normalizeAutoplay?"play":this.autoplay())}manualAutoplay_(e){if(!this.tech_||"string"!==typeof e)return;const t=()=>{const e=this.muted();this.muted(!0);const t=()=>{this.muted(e)};this.playTerminatedQueue_.push(t);const n=this.play();if(Zt(n))return n.catch((e=>{throw t(),new Error("Rejection at manualAutoplay. Restoring muted value. ".concat(e||""))}))};let n;return"any"!==e||this.muted()?n="muted"!==e||this.muted()?this.play():t():(n=this.play(),Zt(n)&&(n=n.catch(t))),Zt(n)?n.then((()=>{this.trigger({type:"autoplay-success",autoplay:e})})).catch((()=>{this.trigger({type:"autoplay-failure",autoplay:e})})):void 0}updateSourceCaches_(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=e,n="";"string"!==typeof t&&(t=e.src,n=e.type),this.cache_.source=this.cache_.source||{},this.cache_.sources=this.cache_.sources||[],t&&!n&&(n=((e,t)=>{if(!t)return"";if(e.cache_.source.src===t&&e.cache_.source.type)return e.cache_.source.type;const n=e.cache_.sources.filter((e=>e.src===t));if(n.length)return n[0].type;const i=e.$$("source");for(let r=0;r<i.length;r++){const e=i[r];if(e.type&&e.src&&e.src===t)return e.type}return Vn(t)})(this,t)),this.cache_.source=z({},e,{src:t,type:n});const i=this.cache_.sources.filter((e=>e.src&&e.src===t)),r=[],s=this.$$("source"),a=[];for(let o=0;o<s.length;o++){const e=ke(s[o]);r.push(e),e.src&&e.src===t&&a.push(e.src)}a.length&&!i.length?this.cache_.sources=r:i.length||(this.cache_.sources=[this.cache_.source]),this.cache_.src=t}handleTechSourceset_(e){if(!this.changingSrc_){let t=e=>this.updateSourceCaches_(e);const n=this.currentSource().src,i=e.src;n&&!/^blob:/.test(n)&&/^blob:/.test(i)&&(!this.lastSource_||this.lastSource_.tech!==i&&this.lastSource_.player!==n)&&(t=()=>{}),t(i),e.src||this.tech_.any(["sourceset","loadstart"],(e=>{if("sourceset"===e.type)return;const t=this.techGet_("currentSrc");this.lastSource_.tech=t,this.updateSourceCaches_(t)}))}this.lastSource_={player:this.currentSource().src,tech:e.src},this.trigger({src:e.src,type:"sourceset"})}hasStarted(e){if(void 0===e)return this.hasStarted_;e!==this.hasStarted_&&(this.hasStarted_=e,this.hasStarted_?this.addClass("vjs-has-started"):this.removeClass("vjs-has-started"))}handleTechPlay_(){this.removeClass("vjs-ended","vjs-paused"),this.addClass("vjs-playing"),this.hasStarted(!0),this.trigger("play")}handleTechRateChange_(){this.tech_.playbackRate()>0&&0===this.cache_.lastPlaybackRate&&(this.queuedCallbacks_.forEach((e=>e.callback(e.event))),this.queuedCallbacks_=[]),this.cache_.lastPlaybackRate=this.tech_.playbackRate(),this.trigger("ratechange")}handleTechWaiting_(){this.addClass("vjs-waiting"),this.trigger("waiting");const e=this.currentTime(),t=()=>{e!==this.currentTime()&&(this.removeClass("vjs-waiting"),this.off("timeupdate",t))};this.on("timeupdate",t)}handleTechCanPlay_(){this.removeClass("vjs-waiting"),this.trigger("canplay")}handleTechCanPlayThrough_(){this.removeClass("vjs-waiting"),this.trigger("canplaythrough")}handleTechPlaying_(){this.removeClass("vjs-waiting"),this.trigger("playing")}handleTechSeeking_(){this.addClass("vjs-seeking"),this.trigger("seeking")}
vendor: 11,078 bytes, line 2
2handleTechSeeked_(){this.removeClass("vjs-seeking","vjs-ended"),this.trigger("seeked")}handleTechPause_(){this.removeClass("vjs-playing"),this.addClass("vjs-paused"),this.trigger("pause")}handleTechEnded_(){this.addClass("vjs-ended"),this.removeClass("vjs-waiting"),this.options_.loop?(this.currentTime(0),this.play()):this.paused()||this.pause(),this.trigger("ended")}handleTechDurationChange_(){this.duration(this.techGet_("duration"))}handleTechClick_(e){this.controls_&&(void 0!==this.options_&&void 0!==this.options_.userActions&&void 0!==this.options_.userActions.click&&!1===this.options_.userActions.click||(void 0!==this.options_&&void 0!==this.options_.userActions&&"function"===typeof this.options_.userActions.click?this.options_.userActions.click.call(this,e):this.paused()?Jt(this.play()):this.pause()))}handleTechDoubleClick_(e){if(!this.controls_)return;Array.prototype.some.call(this.$$(".vjs-control-bar, .vjs-modal-dialog"),(t=>t.contains(e.target)))||void 0!==this.options_&&void 0!==this.options_.userActions&&void 0!==this.options_.userActions.doubleClick&&!1===this.options_.userActions.doubleClick||(void 0!==this.options_&&void 0!==this.options_.userActions&&"function"===typeof this.options_.userActions.doubleClick?this.options_.userActions.doubleClick.call(this,e):this.isInPictureInPicture()&&!a.a.pictureInPictureElement?this.exitPictureInPicture():this.isFullscreen()?this.exitFullscreen():this.requestFullscreen())}handleTechTap_(){this.userActive(!this.userActive())}handleTechTouchStart_(){this.userWasActive=this.userActive()}handleTechTouchMove_(){this.userWasActive&&this.reportUserActivity()}handleTechTouchEnd_(e){e.cancelable&&e.preventDefault()}toggleFullscreenClass_(){this.isFullscreen()?this.addClass("vjs-fullscreen"):this.removeClass("vjs-fullscreen")}documentFullscreenChange_(e){const t=e.target.player;if(t&&t!==this)return;const n=this.el();let i=a.a[this.fsApi_.fullscreenElement]===n;!i&&n.matches&&(i=n.matches(":"+this.fsApi_.fullscreen)),this.isFullscreen(i)}handleTechFullscreenChange_(e,t){t&&(t.nativeIOSFullscreen&&(this.addClass("vjs-ios-native-fs"),this.tech_.one("webkitendfullscreen",(()=>{this.removeClass("vjs-ios-native-fs")}))),this.isFullscreen(t.isFullscreen))}handleTechFullscreenError_(e,t){this.trigger("fullscreenerror",t)}togglePictureInPictureClass_(){this.isInPictureInPicture()?this.addClass("vjs-picture-in-picture"):this.removeClass("vjs-picture-in-picture")}handleTechEnterPictureInPicture_(e){this.isInPictureInPicture(!0)}handleTechLeavePictureInPicture_(e){this.isInPictureInPicture(!1)}handleTechError_(){const e=this.tech_.error();e&&this.error(e)}handleTechTextData_(){let e=null;arguments.length>1&&(e=arguments[1]),this.trigger("textdata",e)}getCache(){return this.cache_}resetCache_(){this.cache_={currentTime:0,initTime:0,inactivityTimeout:this.options_.inactivityTimeout,duration:NaN,lastVolume:1,lastPlaybackRate:this.defaultPlaybackRate(),media:null,src:"",source:{},sources:[],playbackRates:[],volume:1}}techCall_(e,t){this.ready((function(){if(e in Un)return function(e,t,n,i){return t[n](e.reduce(zn(n),i))}(this.middleware_,this.tech_,e,t);if(e in Fn)return Nn(this.middleware_,this.tech_,e,t);try{this.tech_&&this.tech_[e](t)}catch(n){throw P(n),n}}),!0)}techGet_(e){if(this.tech_&&this.tech_.isReady_){if(e in Bn)return function(e,t,n){return e.reduceRight(zn(n),t[n]())}(this.middleware_,this.tech_,e);if(e in Fn)return Nn(this.middleware_,this.tech_,e);try{return this.tech_[e]()}catch(t){if(void 0===this.tech_[e])throw P("Video.js: ".concat(e," method not defined for ").concat(this.techName_," playback technology."),t),t;if("TypeError"===t.name)throw P("Video.js: ".concat(e," unavailable on ").concat(this.techName_," playback technology element."),t),this.tech_.isReady_=!1,t;throw P(t),t}}}play(){return new Promise((e=>{this.play_(e)}))}play_(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Jt;this.playCallbacks_.push(e);const t=Boolean(!this.changingSrc_&&(this.src()||this.currentSrc())),n=Boolean(pe||he);if(this.waitToPlay_&&(this.off(["ready","loadstart"],this.waitToPlay_),this.waitToPlay_=null),!this.isReady_||!t)return this.waitToPlay_=e=>{this.play_()},this.one(["ready","loadstart"],this.waitToPlay_),void(!t&&n&&this.load());const i=this.techGet_("play");n&&this.hasClass("vjs-ended")&&this.resetProgressBar_(),null===i?this.runPlayTerminatedQueue_():this.runPlayCallbacks_(i)}runPlayTerminatedQueue_(){const e=this.playTerminatedQueue_.slice(0);this.playTerminatedQueue_=[],e.forEach((function(e){e()}))}runPlayCallbacks_(e){const t=this.playCallbacks_.slice(0);this.playCallbacks_=[],this.playTerminatedQueue_=[],t.forEach((function(t){t(e)}))}pause(){this.techCall_("pause")}paused(){return!1!==this.techGet_("paused")}played(){return this.techGet_("played")||qt(0,0)}scrubbing(e){if("undefined"===typeof e)return this.scrubbing_;this.scrubbing_=!!e,this.techCall_("setScrubbing",this.scrubbing_),e?this.addClass("vjs-scrubbing"):this.removeClass("vjs-scrubbing")}currentTime(e){return void 0===e?(this.cache_.currentTime=this.techGet_("currentTime")||0,this.cache_.currentTime):(e<0&&(e=0),this.isReady_&&!this.changingSrc_&&this.tech_&&this.tech_.isReady_?(this.techCall_("setCurrentTime",e),this.cache_.initTime=0,void(isFinite(e)&&(this.cache_.currentTime=Number(e)))):(this.cache_.initTime=e,this.off("canplay",this.boundApplyInitTime_),void this.one("canplay",this.boundApplyInitTime_)))}applyInitTime_(){this.currentTime(this.cache_.initTime)}duration(e){if(void 0===e)return void 0!==this.cache_.duration?this.cache_.duration:NaN;(e=parseFloat(e))<0&&(e=1/0),e!==this.cache_.duration&&(this.cache_.duration=e,e===1/0?this.addClass("vjs-live"):this.removeClass("vjs-live"),isNaN(e)||this.trigger("durationchange"))}remainingTime(){return this.duration()-this.currentTime()}remainingTimeDisplay(){return Math.floor(this.duration())-Math.floor(this.currentTime())}buffered(){let e=this.techGet_("buffered");return e&&e.length||(e=qt(0,0)),e}seekable(){let e=this.techGet_("seekable");return e&&e.length||(e=qt(0,0)),e}seeking(){return this.techGet_("seeking")}ended(){return this.techGet_("ended")}networkState(){return this.techGet_("networkState")}readyState(){return this.techGet_("readyState")}bufferedPercent(){return Kt(this.buffered(),this.duration())}bufferedEnd(){const e=this.buffered(),t=this.duration();let n=e.end(e.length-1);return n>t&&(n=t),n}volume(e){let t;return void 0!==e?(t=Math.max(0,Math.min(1,e)),this.cache_.volume=t,this.techCall_("setVolume",t),void(t>0&&this.lastVolume_(t))):(t=parseFloat(this.techGet_("volume")),isNaN(t)?1:t)}muted(e){if(void 0===e)return this.techGet_("muted")||!1;this.techCall_("setMuted",e)}defaultMuted(e){return void 0!==e&&this.techCall_("setDefaultMuted",e),this.techGet_("defaultMuted")||!1}lastVolume_(e){if(void 0===e||0===e)return this.cache_.lastVolume;this.cache_.lastVolume=e}supportsFullScreen(){return this.techGet_("supportsFullScreen")||!1}isFullscreen(e){if(void 0!==e){const t=this.isFullscreen_;return this.isFullscreen_=Boolean(e),this.isFullscreen_!==t&&this.fsApi_.prefixed&&this.trigger("fullscreenchange"),void this.toggleFullscreenClass_()}return this.isFullscreen_}requestFullscreen(e){this.isInPictureInPicture()&&this.exitPictureInPicture();const t=this;return new Promise(((n,i)=>{function r(){t.off("fullscreenerror",a),t.off("fullscreenchange",s)}function s(){r(),n()}function a(e,t){r(),i(t)}t.one("fullscreenchange",s),t.one("fullscreenerror",a);const o=t.requestFullscreenHelper_(e);o&&(o.then(r,r),o.then(n,i))}))}requestFullscreenHelper_(e){let t;if(this.fsApi_.prefixed||(t=this.options_.fullscreen&&this.options_.fullscreen.options||{},void 0!==e&&(t=e)),this.fsApi_.requestFullscreen){const e=this.el_[this.fsApi_.requestFullscreen](t);return e&&e.then((()=>this.isFullscreen(!0)),(()=>this.isFullscreen(!1))),e}this.tech_.supportsFullScreen()&&!0===!this.options_.preferFullWindow?this.techCall_("enterFullScreen"):this.enterFullWindow()}exitFullscreen(){const e=this;return new Promise(((t,n)=>{function i(){e.off("fullscreenerror",s),e.off("fullscreenchange",r)}function r(){i(),t()}function s(e,t){i(),n(t)}e.one("fullscreenchange",r),e.one("fullscreenerror",s);const a=e.exitFullscreenHelper_();a&&(a.then(i,i),a.then(t,n))}))}exitFullscreenHelper_(){if(this.fsApi_.requestFullscreen){const e=a.a[this.fsApi_.exitFullscreen]();return e&&Jt(e.then((()=>this.isFullscreen(!1)))),e}this.tech_.supportsFullScreen()&&!0===!this.options_.preferFullWindow?this.techCall_("exitFullScreen"):this.exitFullWindow()}enterFullWindow(){this.isFullscreen(!0),this.isFullWindow=!0,this.docOrigOverflow=a.a.documentElement.style.overflow,dt(a.a,"keydown",this.boundFullWindowOnEscKey_),a.a.documentElement.style.overflow="hidden",Te(a.a.body,"vjs-full-window"),this.trigger("enterFullWindow")}fullWindowOnEscKey(e){"Escape"===e.key&&!0===this.isFullscreen()&&(this.isFullWindow?this.exitFullWindow():this.exitFullscreen())}exitFullWindow(){this.isFullscreen(!1),this.isFullWindow=!1,ut(a.a,"keydown",this.boundFullWindowOnEscKey_),a.a.documentElement.style.overflow=this.docOrigOverflow,Se(a.a.body,"vjs-full-window"),this.trigger("exitFullWindow")}disablePictureInPicture(e){if(void 0===e)return this.techGet_("disablePictureInPicture");this.techCall_("setDisablePictureInPicture",e),this.options_.disablePictureInPicture=e,this.trigger("disablepictureinpicturechanged")}isInPictureInPicture(e){return void 0!==e?(this.isInPictureInPicture_=!!e,void this.togglePictureInPictureClass_()):!!this.isInPictureInPicture_}requestPictureInPicture(){if(this.options_.enableDocumentPictureInPicture&&r.a.documentPictureInPicture){const e=a.a.createElement(this.el().tagName);return e.classList=this.el().classList,e.classList.add("vjs-pip-container"),this.posterImage&&e.appendChild(this.posterImage.el().cloneNode(!0)),this.titleBar&&e.appendChild(this.titleBar.el().cloneNode(!0)),e.appendChild(_e("p",{className:"vjs-pip-text"},{},this.localize("Playing in picture-in-picture"))),r.a.documentPictureInPicture.requestWindow({width:this.videoWidth(),height:this.videoHeight()}).then((t=>(Ge(t),this.el_.parentNode.insertBefore(e,this.el_),t.document.body.appendChild(this.el_),t.document.body.classList.add("vjs-pip-window"),this.player_.isInPictureInPicture(!0),this.player_.trigger({type:"enterpictureinpicture",pipWindow:t}),t.addEventListener("pagehide",(t=>{const n=t.target.querySelector(".video-js");e.parentNode.replaceChild(n,e),this.player_.isInPictureInPicture(!1),this.player_.trigger("leavepictureinpicture")})),t)))}return"pictureInPictureEnabled"in a.a&&!1===this.disablePictureInPicture()?this.techGet_("requestPictureInPicture"):Promise.reject("No PiP mode is available")}exitPictureInPicture(){return r.a.documentPictureInPicture&&r.a.documentPictureInPicture.window?(r.a.documentPictureInPicture.window.close(),Promise.resolve()):"pictureInPictureEnabled"in a.a?a.a.exitPictureInPicture():void 0}handleKeyDown(e){const{userActions:t}=this.options_;if(!t||!t.hotkeys)return;(e=>{const t=e.tagName.toLowerCase();if(e.isContentEditable)return!0;
2if("input"===t)return-1===["button","checkbox","hidden","radio","reset","submit"].indexOf(e.type);return-1!==["textarea"].indexOf(t)})(this.el_.ownerDocument.activeElement)||("function"===typeof t.hotkeys?t.hotkeys.call(this,e):this.handleHotkeys(e))}handleHotkeys(e){const t=this.options_.userActions?this.options_.userActions.hotkeys:{},{fullscreenKey:n=(t=>"f"===e.key.toLowerCase()),muteKey:i=(t=>"m"===e.key.toLowerCase()),playPauseKey:r=(t=>"k"===e.key.toLowerCase()||" "===e.key.toLowerCase())}=t;if(n.call(this,e)){e.preventDefault(),e.stopPropagation();const t=Ut.getComponent("FullscreenToggle");!1!==a.a[this.fsApi_.fullscreenEnabled]&&t.prototype.handleClick.call(this,e)}else if(i.call(this,e)){e.preventDefault(),e.stopPropagation();Ut.getComponent("MuteToggle").prototype.handleClick.call(this,e)}else if(r.call(this,e)){e.preventDefault(),e.stopPropagation();Ut.getComponent("PlayToggle").prototype.handleClick.call(this,e)}}canPlayType(e){let t;for(let n=0,i=this.options_.techOrder;n<i.length;n++){const r=i[n];let s=Dn.getTech(r);if(s||(s=Ut.getComponent(r)),s){if(s.isSupported()&&(t=s.canPlayType(e),t))return t}else P.error('The "'.concat(r,'" tech is undefined. Skipped browser support check for that tech.'))}return""}selectSource(e){const t=this.options_.techOrder.map((e=>[e,Dn.getTech(e)])).filter((e=>{let[t,n]=e;return n?n.isSupported():(P.error('The "'.concat(t,'" tech is undefined. Skipped browser support check for that tech.')),!1)})),n=function(e,t,n){let i;return e.some((e=>t.some((t=>{if(i=n(e,t),i)return!0})))),i};let i;const r=(e,t)=>{let[n,i]=e;if(i.canPlaySource(t,this.options_[n.toLowerCase()]))return{source:t,tech:n}};var s;return i=this.options_.sourceOrder?n(e,t,(s=r,(e,t)=>s(t,e))):n(t,e,r),i||!1}handleSrc_(e,t){if("undefined"===typeof e)return this.cache_.src||"";this.resetRetryOnError_&&this.resetRetryOnError_();const n=Wn(e);if(n.length){if(this.changingSrc_=!0,t||(this.cache_.sources=n),this.updateSourceCaches_(n[0]),Mn(this,n[0],((e,i)=>{this.middleware_=i,t||(this.cache_.sources=n),this.updateSourceCaches_(e);if(this.src_(e))return n.length>1?this.handleSrc_(n.slice(1)):(this.changingSrc_=!1,this.setTimeout((function(){this.error({code:4,message:this.options_.notSupportedMessage})}),0),void this.triggerReady());var r,s;r=i,s=this.tech_,r.forEach((e=>e.setTech&&e.setTech(s)))})),n.length>1){const e=()=>{this.error(null),this.handleSrc_(n.slice(1),!0)},t=()=>{this.off("error",e)};this.one("error",e),this.one("playing",t),this.resetRetryOnError_=()=>{this.off("error",e),this.off("playing",t)}}}else this.setTimeout((function(){this.error({code:4,message:this.options_.notSupportedMessage})}),0)}src(e){return this.handleSrc_(e,!1)}src_(e){const t=this.selectSource([e]);return!t||(Nt(t.tech,this.techName_)?(this.ready((function(){this.tech_.constructor.prototype.hasOwnProperty("setSource")?this.techCall_("setSource",e):this.techCall_("src",e.src),this.changingSrc_=!1}),!0),!1):(this.changingSrc_=!0,this.loadTech_(t.tech,t.source),this.tech_.ready((()=>{this.changingSrc_=!1})),!1))}addSourceElement(e,t){return!!this.tech_&&this.tech_.addSourceElement(e,t)}removeSourceElement(e){return!!this.tech_&&this.tech_.removeSourceElement(e)}load(){this.tech_&&this.tech_.vhs?this.src(this.currentSource()):this.techCall_("load")}reset(){if(this.paused())this.doReset_();else{Jt(this.play().then((()=>this.doReset_())))}}doReset_(){this.tech_&&this.tech_.clearTracks("text"),this.removeClass("vjs-playing"),this.addClass("vjs-paused"),this.resetCache_(),this.poster(""),this.loadTech_(this.options_.techOrder[0],null),this.techCall_("reset"),this.resetControlBarUI_(),this.error(null),this.titleBar&&this.titleBar.update({title:void 0,description:void 0}),Tt(this)&&this.trigger("playerreset")}resetControlBarUI_(){this.resetProgressBar_(),this.resetPlaybackRate_(),this.resetVolumeBar_()}resetProgressBar_(){this.currentTime(0);const{currentTimeDisplay:e,durationDisplay:t,progressControl:n,remainingTimeDisplay:i}=this.controlBar||{},{seekBar:r}=n||{};e&&e.updateContent(),t&&t.updateContent(),i&&i.updateContent(),r&&(r.update(
2),r.loadProgressBar&&r.loadProgressBar.update())}resetPlaybackRate_(){this.playbackRate(this.defaultPlaybackRate()),this.handleTechRateChange_()}resetVolumeBar_(){this.volume(1),this.trigger("volumechange")}currentSources(){const e=this.currentSource(),t=[];return 0!==Object.keys(e).length&&t.push(e),this.cache_.sources||t}currentSource(){return this.cache_.source||{}}currentSrc(){return this.currentSource()&&this.currentSource().src||""}currentType(){return this.currentSource()&&this.currentSource().type||""}preload(e){return void 0!==e?(this.techCall_("setPreload",e),void(this.options_.preload=e)):this.techGet_("preload")}autoplay(e){if(void 0===e)return this.options_.autoplay||!1;let t;"string"===typeof e&&/(any|play|muted)/.test(e)||!0===e&&this.options_.normalizeAutoplay?(this.options_.autoplay=e,this.manualAutoplay_("string"===typeof e?e:"play"),t=!1):this.options_.autoplay=!!e,t="undefined"===typeof t?this.options_.autoplay:t,this.tech_&&this.techCall_("setAutoplay",t)}playsinline(e){return void 0!==e&&(this.techCall_("setPlaysinline",e),this.options_.playsinline=e),this.techGet_("playsinline")}loop(e){return void 0!==e?(this.techCall_("setLoop",e),void(this.options_.loop=e)):this.techGet_("loop")}poster(e){if(void 0===e)return this.poster_;e||(e=""),e!==this.poster_&&(this.poster_=e,this.techCall_("setPoster",e),this.isPosterFromTech_=!1,this.trigger("posterchange"))}handleTechPosterChange_(){if((!this.poster_||this.options_.techCanOverridePoster)&&this.tech_&&this.tech_.poster){const e=this.tech_.poster()||"";e!==this.poster_&&(this.poster_=e,this.isPosterFromTech_=!0,this.trigger("posterchange"))}}controls(e){if(void 0===e)return!!this.controls_;e=!!e,this.controls_!==e&&(this.controls_=e,this.usingNativeControls()&&this.techCall_("setControls",e),this.controls_?(this.removeClass("vjs-controls-disabled"),this.addClass("vjs-controls-enabled"),this.trigger("controlsenabled"),this.usingNativeControls()||this.addTechControlsListeners_()):(this.removeClass("vjs-controls-enabled"),this.addClass("vjs-controls-disabled"),this.trigger("controlsdisabled"),this.usingNativeControls()||this.removeTechControlsListeners_()))}usingNativeControls(e){if(void 0===e)return!!this.usingNativeControls_;e=!!e,this.usingNativeControls_!==e&&(this.usingNativeControls_=e,this.usingNativeControls_?(this.addClass("vjs-using-native-controls"),this.trigger("usingnativecontrols")):(this.removeClass("vjs-using-native-controls"),this.trigger("usingcustomcontrols")))}error(e){if(void 0===e)return this.error_||null;if(w("beforeerror").forEach((t=>{const n=t(this,e);U(n)&&!Array.isArray(n)||"string"===typeof n||"number"===typeof n||null===n?e=n:this.log.error("please return a value that MediaError expects in beforeerror hooks")})),this.options_.suppressNotSupportedError&&e&&4===e.code){const t=function(){this.error(e)};return this.options_.suppressNotSupportedError=!1,this.any(["click","touchstart"],t),void this.one("loadstart",(function(){this.off(["click","touchstart"],t)}))}if(null===e)return this.error_=null,this.removeClass("vjs-error"),void(this.errorDisplay&&this.errorDisplay.close());this.error_=new Qt(e),this.addClass("vjs-error"),P.error("(CODE:".concat(this.error_.code," ").concat(Qt.errorTypes[this.error_.code],")"),this.error_.message,this.error_),this.trigger("error"),w("error").forEach((e=>e(this,this.error_)))}reportUserActivity(e){this.userActivity_=!0}userActive(e){if(void 0===e)return this.userActive_;if((e=!!e)!==this.userActive_){if(this.userActive_=e,this.userActive_)return this.userActivity_=!0,this.removeClass("vjs-user-inactive"),this.addClass("vjs-user-active"),void this.trigger("useractive");this.tech_&&this.tech_.one("mousemove",(function(e){e.stopPropagation(),e.preventDefault()})),this.userActivity_=!1,this.removeClass("vjs-user-active"),this.addClass("vjs-user-inactive"),this.trigger("userinactive")}}listenForUserActivity_(){let e,t,n;const i=bt(this,this.reportUserActivity),r=function(t){i(),this.clearInterval(e)};this.on("mousedown",(function(){i(),this.clearInterval(e),e=this.setInterval(i,250)})),this.on("mousemove",(function(e){e.screenX===t&&e.screenY===n||(t=e.screenX,n=e.screenY,i())})),this.on("mouseup",r),this.on("mouseleave",r);const s=this.getChild("controlBar");let a;!s||he||Y||(s.on("mouseenter",(function(e){0!==this.player().options_.inactivityTimeout&&(this.player().cache_.inactivityTimeout=this.player().options_.inactivityTimeout),this.player().options_.inactivityTimeout=0})),s.on("mouseleave",(function(e){this.player().options_.inactivityTimeout=this.player().cache_.inactivityTimeout}))),this.on("keydown",i),this.on("keyup",i);this.setInterval((function(){if(!this.userActivity_)return;this.userActivity_=!1,this.userActive(!0),this.clearTimeout(a);const e=this.options_.inactivityTimeout;e<=0||(a=this.setTimeout((function(){this.userActivity_||this.userActive(!1)}),e))}),250)}playbackRate(e){if(void 0===e)return this.tech_&&this.tech_.featuresPlaybackRate?this.cache_.lastPlaybackRate||this.techGet_("playbackRate"):1;this.techCall_("setPlaybackRate",e)}defaultPlaybackRate(e){return void 0!==e?this.techCall_("setDefaultPlaybackRate",e):this.tech_&&this.tech_.featuresPlaybackRate?this.techGet_("defaultPlaybackRate"):1}isAudio(e){if(void 0===e)return!!this.isAudio_;this.isAudio_=!!e}updatePlayerHeightOnAudioOnlyMode_(){const e=this.getChild("ControlBar");e&&this.audioOnlyCache_.controlBarHeight!==e.currentHeight()&&(this.audioOnlyCache_.controlBarHeight=e.currentHeight(),this.height(this.audioOnlyCache_.controlBarHeight))}enableAudioOnlyUI_(){this.addClass("vjs-audio-only-mode");const e=this.children(),t=this.getChild("ControlBar"),n=t&&t.currentHeight();e.forEach((e=>{e!==t&&e.el_&&!e.hasClass("vjs-hidden")&&(e.hide(),this.audioOnlyCache_.hiddenChildren.push(e))}
vendor: 5,436 bytes, line 2
2)),this.audioOnlyCache_.playerHeight=this.currentHeight(),this.audioOnlyCache_.controlBarHeight=n,this.on("playerresize",this.boundUpdatePlayerHeightOnAudioOnlyMode_),this.height(n),this.trigger("audioonlymodechange")}disableAudioOnlyUI_(){this.removeClass("vjs-audio-only-mode"),this.off("playerresize",this.boundUpdatePlayerHeightOnAudioOnlyMode_),this.audioOnlyCache_.hiddenChildren.forEach((e=>e.show())),this.height(this.audioOnlyCache_.playerHeight),this.trigger("audioonlymodechange")}audioOnlyMode(e){if("boolean"!==typeof e||e===this.audioOnlyMode_)return this.audioOnlyMode_;if(this.audioOnlyMode_=e,e){const e=[];return this.isInPictureInPicture()&&e.push(this.exitPictureInPicture()),this.isFullscreen()&&e.push(this.exitFullscreen()),this.audioPosterMode()&&e.push(this.audioPosterMode(!1)),Promise.all(e).then((()=>this.enableAudioOnlyUI_()))}return Promise.resolve().then((()=>this.disableAudioOnlyUI_()))}enablePosterModeUI_(){(this.tech_&&this.tech_).hide(),this.addClass("vjs-audio-poster-mode"),this.trigger("audiopostermodechange")}disablePosterModeUI_(){(this.tech_&&this.tech_).show(),this.removeClass("vjs-audio-poster-mode"),this.trigger("audiopostermodechange")}audioPosterMode(e){if("boolean"!==typeof e||e===this.audioPosterMode_)return this.audioPosterMode_;if(this.audioPosterMode_=e,e){if(this.audioOnlyMode()){return this.audioOnlyMode(!1).then((()=>{this.enablePosterModeUI_()}))}return Promise.resolve().then((()=>{this.enablePosterModeUI_()}))}return Promise.resolve().then((()=>{this.disablePosterModeUI_()}))}addTextTrack(e,t,n){if(this.tech_)return this.tech_.addTextTrack(e,t,n)}addRemoteTextTrack(e,t){if(this.tech_)return this.tech_.addRemoteTextTrack(e,t)}removeRemoteTextTrack(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{track:t}=e;if(t||(t=e),this.tech_)return this.tech_.removeRemoteTextTrack(t)}getVideoPlaybackQuality(){return this.techGet_("getVideoPlaybackQuality")}videoWidth(){return this.tech_&&this.tech_.videoWidth&&this.tech_.videoWidth()||0}videoHeight(){return this.tech_&&this.tech_.videoHeight&&this.tech_.videoHeight()||0}language(e){if(void 0===e)return this.language_;this.language_!==String(e).toLowerCase()&&(this.language_=String(e).toLowerCase(),Tt(this)&&this.trigger("languagechange"))}languages(){return z(Er.prototype.options_.languages,this.languages_)}toJSON(){const e=z(this.options_),t=e.tracks;e.tracks=[];for(let n=0;n<t.length;n++){let i=t[n];i=z(i),i.player=void 0,e.tracks[n]=i}return e}createModal(e,t){(t=t||{}).content=e||"";const n=new sn(this,t);return this.addChild(n),n.on("dispose",(()=>{this.removeChild(n)})),n.open(),n}updateCurrentBreakpoint_(){if(!this.responsive())return;const e=this.currentBreakpoint(),t=this.currentWidth();for(let n=0;n<Ar.length;n++){const i=Ar[n];if(t<=this.breakpoints_[i]){if(e===i)return;e&&this.removeClass(kr[e]),this.addClass(kr[i]),this.breakpoint_=i;break}}}removeCurrentBreakpoint_(){const e=this.currentBreakpointClass();this.breakpoint_="",e&&this.removeClass(e)}breakpoints(e){return void 0===e||(this.breakpoint_="",this.breakpoints_=Object.assign({},Cr,e),this.updateCurrentBreakpoint_()),Object.assign(this.breakpoints_)}responsive(e){if(void 0===e)return this.responsive_;return(e=Boolean(e))!==this.responsive_?(this.responsive_=e,e?(this.on("playerresize",this.boundUpdateCurrentBreakpoint_),this.updateCurrentBreakpoint_()):(this.off("playerresize",this.boundUpdateCurrentBreakpoint_),this.removeCurrentBreakpoint_()),e):void 0}currentBreakpoint(){return this.breakpoint_}currentBreakpointClass(){return kr[this.breakpoint_]||""}loadMedia(e,t){if(!e||"object"!==typeof e)return;const n=this.crossOrigin();this.reset(),this.cache_.media=z(e);const{artist:i,artwork:r,description:s,poster:a,src:o,textTracks:c,title:l}=this.cache_.media;!r&&a&&(this.cache_.media.artwork=[{src:a,type:Vn(a)}]),n&&this.crossOrigin(n),o&&this.src(o),a&&this.poster(a),Array.isArray(c)&&c.forEach((e=>this.addRemoteTextTrack(e,!1))),this.titleBar&&this.titleBar.update({title:l,description:s||i||""}),this.ready(t)}getMedia(){if(!this.cache_.media){const e=this.poster(),t={src:this.currentSources(),textTracks:Array.prototype.map.call(this.remoteTextTracks(),(e=>({kind:e.kind,label:e.label,language:e.language,src:e.src})))};return e&&(t.poster=e,t.artwork=[{src:t.poster,type:Vn(t.poster)}]),t}return z(this.cache_.media)}static getTagSettings(e){const t={sources:[],tracks:[]},n=ke(e),i=n["data-setup"];if(Oe(e,"vjs-fill")&&(n.fill=!0),Oe(e,"vjs-fluid")&&(n.fluid=!0),null!==i)try{Object.assign(n,JSON.parse(i||"{}"))}catch(r){P.error("data-setup",r)}if(Object.assign(t,n),e.hasChildNodes()){const n=e.childNodes;for(let e=0,i=n.length;e<i;e++){const i=n[e],r=i.nodeName.toLowerCase();"source"===r?t.sources.push(ke(i)):"track"===r&&t.tracks.push(ke(i))}}return t}debug(e){if(void 0===e)return this.debugEnabled_;e?(this.trigger("debugon"),this.previousLogLevel_=this.log.level,this.log.level("debug"),this.debugEnabled_=!0):(this.trigger("debugoff"),this.log.level(this.previousLogLevel_),this.previousLogLevel_=void 0,this.debugEnabled_=!1)}playbackRates(e){if(void 0===e)return this.cache_.playbackRates;Array.isArray(e)&&e.every((e=>"number"===typeof e))&&(this.cache_.playbackRates=e,this.trigger("playbackrateschange"))}}Er.prototype.videoTracks=()=>{},Er.prototype.audioTracks=()=>{},Er.prototype.textTracks=()=>{},Er.prototype.remoteTextTracks=()=>{},Er.prototype.remoteTextTrackEls=()=>{}
2,In.names.forEach((function(e){const t=In[e];Er.prototype[t.getterName]=function(){return this.tech_?this.tech_[t.getterName]():(this[t.privateName]=this[t.privateName]||new t.ListClass,this[t.privateName])}})),Er.prototype.crossorigin=Er.prototype.crossOrigin,Er.players={};const Ir=r.a.navigator;Er.prototype.options_={techOrder:Dn.defaultTechOrder_,html5:{},enableSourceset:!0,inactivityTimeout:2e3,playbackRates:[],liveui:!1,children:["mediaLoader","posterImage","titleBar","textTrackDisplay","loadingSpinner","bigPlayButton","liveTracker","controlBar","errorDisplay","textTrackSettings","resizeManager"],language:Ir&&(Ir.languages&&Ir.languages[0]||Ir.userLanguage||Ir.language)||"en",languages:{},notSupportedMessage:"No compatible source was found for this media.",normalizeAutoplay:!1,fullscreen:{options:{navigationUI:"hide"}},breakpoints:{},responsive:!1,audioOnlyMode:!1,audioPosterMode:!1,spatialNavigation:{enabled:!1,horizontalSeek:!1},enableSmoothSeeking:!1,disableSeekWhileScrubbingOnMobile:!1,disableSeekWhileScrubbingOnSTV:!1},Sr.forEach((function(e){Er.prototype["handleTech".concat(Mt(e),"_")]=function(){return this.trigger(e)}})),Ut.registerComponent("Player",Er);const Dr="plugin",Pr="activePlugins_",Rr={},Lr=e=>Rr.hasOwnProperty(e),Mr=e=>Lr(e)?Rr[e]:void 0,Nr=(e,t)=>{e[Pr]=e[Pr]||{},e[Pr][t]=!0},Br=(e,t,n)=>{const i=(n?"before":"")+"pluginsetup";e.trigger(i,t),e.trigger(i+":"+t.name,t)},Ur=(e,t)=>(t.prototype.name=e,function(){Br(this,{name:e,plugin:t,instance:null},!0);for(var n=arguments.length,i=new Array(n),r=0;r<n;r++)i[r]=arguments[r];const s=new t(...[this,...i]);return this[e]=()=>s,Br(this,s.getEventHash()),s});class Fr{constructor(e){if(this.constructor===Fr)throw new Error("Plugin must be sub-classed; not directly instantiated.");this.player=e,this.log||(this.log=this.player.log.createLogger(this.name)),Dt(this),delete this.trigger,Rt(this,this.constructor.defaultState),Nr(e,this.name),this.dispose=this.dispose.bind(this),e.on("dispose",this.dispose)}version(){return this.constructor.VERSION}getEventHash(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return e.name=this.name,e.plugin=this.constructor,e.instance=this,e}trigger(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return ht(this.eventBusEl_,e,this.getEventHash(t))}handleStateChanged(e){}dispose(){const{name:e,player:t}=this;this.trigger("dispose"),this.off(),t.off("dispose",this.dispose),t[Pr][e]=!1,this.player=this.state=null,t[e]=Ur(e,Rr[e])}static isBasic(e){const t="string"===typeof e?Mr(e):e;return"function"===typeof t&&!Fr.prototype.isPrototypeOf(t.prototype)}static registerPlugin(e,t){if("string"!==typeof e)throw new Error('Illegal plugin name, "'.concat(e,'", must be a string, was ').concat(typeof e,"."));if(Lr(e))P.warn('A plugin named "'.concat(e,'" already exists. You may want to avoid re-registering plugins!'));else if(Er.prototype.hasOwnProperty(e))throw new Error('Illegal plugin name, "'.concat(e,'", cannot share a name with an existing player method!'));if("function"!==typeof t)throw new Error('Illegal plugin for "'.concat(e,'", must be a function, was ').concat(typeof t,"."));return Rr[e]=t,e!==Dr&&(Fr.isBasic(t)?Er.prototype[e]=function(e,t){const n=function(){Br(this,{name:e,plugin:t,instance:null},!0);const n=t.apply(this,arguments);return Nr(this,e),Br(this,{name:e,plugin:t,instance:n}),n};return Object.keys(t).forEach((function(e){n[e]=t[e]})),n}(e,t):Er.prototype[e]=Ur(e,t)),t}static deregisterPlugin(e){if(e===Dr)throw new Error("Cannot de-register base plugin.");Lr(e)&&(delete Rr[e],delete Er.prototype[e])}static getPlugins(){let e;return(arguments.length>0&&void 0!==arguments[0]?arguments[0]:Object.keys(Rr)).forEach((t=>{const n=Mr(t);n&&(e=e||{},e[t]=n)})),e}static getPluginVersion(e){const t=Mr(e);return t&&t.VERSION||""}}function zr(e,t,n,i){return function(e,t){let n=!1;return function(){n||P.warn(e),n=!0;for(var i=arguments.length,r=new Array(i),s=0;s<i;s++)r[s]=arguments[s];return t.apply(this,r)}}("".concat(t," is deprecated and will be removed in ").concat(e,".0; please use ").concat(n," instead."),i)}Fr.getPlugin=Mr,Fr.BASE_PLUGIN_NAME=Dr,Fr.registerPlugin(Dr,Fr),Er.prototype.usingPlugin=function(e){return!!this[Pr]&&!0===this[Pr][e]},Er.prototype.hasPlugin=function(e){return!!Lr(e)};const qr=e=>0===e.indexOf("#")?e.slice(1):e;function Hr(e,t,n){let i=Hr.getPlayer(e);if(i)return t&&P.warn('Player "'.concat(e,'" is already initialised. Options will not be applied.')),n&&i.ready(n),i;const s="string"===typeof e?He("#"+qr(e)):e;if(!be(s))throw new TypeError("The element or ID supplied is not val
2id. (videojs)");const a="getRootNode"in s&&s.getRootNode()instanceof r.a.ShadowRoot?s.getRootNode():s.ownerDocument.body;s.ownerDocument.defaultView&&a.contains(s)||P.warn("The element supplied is not included in the DOM"),!0===(t=t||{}).restoreEl&&(t.restoreEl=(s.parentNode&&s.parentNode.hasAttribute&&s.parentNode.hasAttribute("data-vjs-player")?s.parentNode:s).cloneNode(!0)),w("beforesetup").forEach((e=>{const n=e(s,z(t));U(n)&&!Array.isArray(n)?t=z(t,n):P.error("please return an object in beforesetup hooks")}));const o=Ut.getComponent("Player");return i=new o(s,t,n),w("setup").forEach((e=>e(i))),i}if(Hr.hooks_=S,Hr.hooks=w,Hr.hook=function(e,t){w(e,t)},Hr.hookOnce=function(e,t){w(e,[].concat(t).map((t=>{const n=function(){return A(e,n),t(...arguments)};return n})))},Hr.removeHook=A,!0!==r.a.VIDEOJS_NO_DYNAMIC_STYLE&&fe()){let e=He(".vjs-styles-defaults");if(!e){e=$e("vjs-styles-defaults");const t=He("head");t&&t.insertBefore(e,t.firstChild),et(e,"\n .video-js {\n width: 300px;\n height: 150px;\n }\n\n .vjs-fluid:not(.vjs-audio-only-mode) {\n padding-top: 56.25%\n }\n ")}}Ze(1,Hr),Hr.VERSION=T,Hr.options=Er.prototype.options_,Hr.getPlayers=()=>Er.players,Hr.getPlayer=e=>{const t=Er.players;let n;if("string"===typeof e){const i=qr(e),r=t[i];if(r)return r;n=He("#"+i)}else n=e;if(be(n)){const{player:e,playerId:i}=n;if(e||t[i])return e||t[i]}},Hr.getAllPlayers=()=>Object.keys(Er.players).map((e=>Er.players[e])).filter(Boolean),Hr.players=Er.players,Hr.getComponent=Ut.getComponent,Hr.registerComponent=(e,t)=>(Dn.isTech(t)&&P.warn("The ".concat(e," tech was registered as a component. It should instead be registered using videojs.registerTech(name, tech)")),Ut.registerComponent.call(Ut,e,t)),Hr.getTech=Dn.getTech,Hr.registerTech=Dn.registerTech,Hr.use=function(e,t){Pn[e]=Pn[e]||[],Pn[e].push(t)},Object.defineProperty(Hr,"middleware",{value:{},writeable:!1,enumerable:!0}),Object.defineProperty(Hr.middleware,"TERMINATOR",{value:Ln,writeable:!1,enumerable:!0}),Hr.browser=me,Hr.obj=V,Hr.mergeOptions=zr(9,"videojs.mergeOptions","videojs.obj.merge",z),Hr.defineLazyProperty=zr(9,"videojs.defineLazyProperty","videojs.obj.defineLazyProperty",H),Hr.bind=zr(9,"videojs.bind","native Function.prototype.bind",bt),Hr.registerPlugin=Fr.registerPlugin,Hr.deregisterPlugin=Fr.deregisterPlugin,Hr.plugin=(e,t)=>(P.warn("videojs.plugin() is deprecated; use videojs.registerPlugin() instead"),Fr.registerPlugin(e,t)),Hr.getPlugins=Fr.getPlugins,Hr.getPlugin=Fr.getPlugin,Hr.getPluginVersion=Fr.getPluginVersion,Hr.addLanguage=function(e,t){return e=(""+e).toLowerCase(),Hr.options.languages=z(Hr.options.languages,{[e]:t}),Hr.options.languages[e]},Hr.log=P,Hr.createLogger=R,Hr.time=Yt,Hr.createTimeRange=zr(9,"videojs.createTimeRange","videojs.time.createTimeRanges",qt),Hr.createTimeRanges=zr(9,"videojs.createTimeRanges","videojs.time.createTimeRanges",qt),Hr.formatTime=zr(9,"videojs.formatTime","videojs.time.formatTime",Xt),Hr.setFormatTime=zr(9,"videojs.setFormatTime","videojs.time.setFormatTime",Wt),Hr.resetFormatTime=zr(9,"videojs.resetFormatTime","videojs.time.resetFormatTime",Gt),Hr.parseUrl=zr(9,"videojs.parseUrl","videojs.url.parseUrl",yn),Hr.isCrossOrigin=zr(9,"videojs.isCrossOrigin","videojs.url.isCrossOrigin",vn),Hr.EventTarget=xt,Hr.any=mt,Hr.on=dt,Hr.one=pt,Hr.off=ut,Hr.trigger=ht,Hr.xhr=c.a,Hr.TrackList=an,Hr.TextTrack=Sn,Hr.TextTrackList=un,Hr.AudioTrack=wn,Hr.AudioTrackList=cn,Hr.VideoTrack=An,Hr.VideoTrackList=dn,["isEl","isTextNode","createEl","hasClass","addClass","removeClass","toggleClass","setAttributes","getAttributes","emptyEl","appendContent","insertContent"].forEach((e=>{Hr[e]=function(){return P.warn("videojs.".concat(e,"() is deprecated; use videojs.dom.").concat(e,"() instead")),Xe[e].apply(null,arguments)}})),Hr.computedStyle=zr(9,"videojs.computedStyle","videojs.dom.computedStyle",We),Hr.dom=Xe,Hr.fn=_t,Hr.num=pi,Hr.str=Bt,Hr.url=xn,Hr.Error={NetworkBadStatus:"networkbadstatus",NetworkRequestFailed:"networkrequestfailed",NetworkRequestAborted:"networkrequestaborted",NetworkRequestTimeout:"networkrequesttimeout",NetworkBodyParserFailed:"networkbodyparserfailed",StreamingHlsPlaylistParserError:"streaminghlsplaylistparsererror",StreamingDashManifestParserError:"streamingdashmanifestparsererror",StreamingContentSteeringParserError:"streamingcontentsteeringparsererror",StreamingVttParserError:"streamingvttparsererror",StreamingFailedToSelectNextSegment:"streamingfailedtoselectnextsegment",StreamingFailedToDecryptSegment:"streamingfailedtodecryptsegment",StreamingFailedToTransmuxSegment:"streamingfailedtotransmuxsegment",StreamingFailedToAppendSegment:"streamingfailedtoappendsegment",StreamingCodecsChangeError:"streamingcodecschangeerror"};class Vr{constructor(e){let t=this;return t.id=e.id,t.label=t.id,t.width=e.width,t.height=e.height,t.bitrate=e.bandwidth,t.frameRate=e.frameRate,t.enabled_=e.enabled,Object.defineProperty(t,"enabled",{get:()=>t.enabled_(),set(e){t.enabled_(e)}}),t}}class Wr extends Hr.EventTarget{constructor(){super();let e=this;return e.levels_=[],e.selectedIndex_=-1,Object.defineProperty(e,"selectedIndex",{get:()=>e.selectedIndex_}),Object.defineProperty(e,"length",{get:()=>e.levels_.length}),e[Symbol.iterator]=()=>e.levels_.values(),e}addQualityLevel(e){let t=this.getQualityLevelById(e.id);if(t)return t;const n=this.levels_.length;return t=new Vr(e),""+n in this||Object.defineProperty(this,n,{get(){return this.levels_[n]}}),this.levels_.push(t),this.trigger({qualityLevel:t,type:"addqualitylevel"}),t}removeQualityLevel(e){let t=null;for(let n=0,i=this.length;n<i;n++)if(this[n]===e){t=this.levels_.splice(n,1)[0],this.selectedIndex_===n?this.selectedIndex_=-1:this.selectedIndex_>n&&this.selectedIndex_--;break}return t&&this.trigger({qualityLevel:e,type:"removequalitylevel"}),t}getQualityLevelById(e){for(let t=0,n=this.length;t<n;t++){const n=this[t];if(n.id===e)return n}return null}dispose(){this.selectedIndex_=-1,this.levels_.length=0}}Wr.prototype.allowedEvents_={change:"change",addqualitylevel:"addqualitylevel",removequalitylevel:"removequalitylevel"};for(const t in Wr.prototype.allowedEvents_)Wr.prototype["on"+t]=null;var Gr="4.1.0";const Xr=function(e){return function(e,t){const n=e.qualityLevels,i=new Wr,r=function(){i.dispose(),e.qualityLevels=n,e.off("dispose",r)};return e.on("dispose",r),e.qualityLevels=()=>i,e.qualityLevels.VERSION=Gr,i}(this,Hr.obj.merge({},e))};Hr.registerPlugin("qualityLevels",Xr),Xr.VERSION=Gr;const Yr=p.a,Kr=(e,t)=>
2t&&t.responseURL&&e!==t.responseURL?t.responseURL:e,Qr=e=>Hr.log.debug?Hr.log.debug.bind(Hr,"VHS:","".concat(e," >")):function(){};function Zr(){const e=Hr.obj||Hr,t=e.merge||e.mergeOptions;for(var n=arguments.length,i=new Array(n),r=0;r<n;r++)i[r]=arguments[r];return t.apply(e,i)}function Jr(){const e=Hr.time||Hr,t=e.createTimeRanges||e.createTimeRanges;for(var n=arguments.length,i=new Array(n),r=0;r<n;r++)i[r]=arguments[r];return t.apply(e,i)}const $r=1/30,es=.1,ts=function(e,t){const n=[];let i;if(e&&e.length)for(i=0;i<e.length;i++)t(e.start(i),e.end(i))&&n.push([e.start(i),e.end(i)]);return Jr(n)},ns=function(e,t){return ts(e,(function(e,n){return e-es<=t&&n+es>=t}))},is=function(e,t){return ts(e,(function(e){return e-$r>=t}))},rs=e=>{const t=[];if(!e||!e.length)return"";for(let n=0;n<e.length;n++)t.push(e.start(n)+" => "+e.end(n));return t.join(", ")},ss=e=>{const t=[];for(let n=0;n<e.length;n++)t.push({start:e.start(n),end:e.end(n)});return t},as=function(e){if(e&&e.length&&e.end)return e.end(e.length-1)},os=function(e,t){let n=0;if(!e||!e.length)return n;for(let i=0;i<e.length;i++){const r=e.start(i),s=e.end(i);t>s||(n+=t>r&&t<=s?s-t:s-r)}return n},cs=(e,t)=>{if(!t.preload)return t.duration;let n=0;return(t.parts||[]).forEach((function(e){n+=e.duration})),(t.preloadHints||[]).forEach((function(t){"PART"===t.type&&(n+=e.partTargetDuration)})),n},ls=e=>(e.segments||[]).reduce(((e,t,n)=>(t.parts?t.parts.forEach((function(i,r){e.push({duration:i.duration,segmentIndex:n,partIndex:r,part:i,segment:t})})):e.push({duration:t.duration,segmentIndex:n,partIndex:null,segment:t,part:null}),e)),[]),ds=e=>{const t=e.segments&&e.segments.length&&e.segments[e.segments.length-1];return t&&t.parts||[]},us=e=>{let{preloadSegment:t}=e;if(!t)return;const{parts:n,preloadHints:i}=t;let r=(i||[]).reduce(((e,t)=>e+("PART"===t.type?1:0)),0);return r+=n&&n.length?n.length:0,r},hs=(e,t)=>{if(t.endList)return 0;if(e&&e.suggestedPresentationDelay)return e.suggestedPresentationDelay;const n=ds(t).length>0;return n&&t.serverControl&&t.serverControl.partHoldBack?t.serverControl.partHoldBack:n&&t.partTargetDuration?3*t.partTargetDuration:t.serverControl&&t.serverControl.holdBack?t.serverControl.holdBack:t.targetDuration?3*t.targetDuration:0},ps=function(e,t,n){if("undefined"===typeof t&&(t=e.mediaSequence+e.segments.length),t<e.mediaSequence)return 0;const i=function(e,t){let n=0,i=t-e.mediaSequence,r=e.segments[i];if(r){if("undefined"!==typeof r.start)return{result:r.start,precise:!0};if("undefined"!==typeof r.end)return{result:r.end-r.duration,precise:!0}}for(;i--;){if(r=e.segments[i],"undefined"!==typeof r.end)return{result:n+r.end,precise:!0};if(n+=cs(e,r),"undefined"!==typeof r.start)return{result:n+r.start,precise:!0}}return{result:n,precise:!1}}(e,t);if(i.precise)return i.result;const r=function(e,t){let n,i=0,r=t-e.mediaSequence;for(;r<e.segments.length;r++){if(n=e.segments[r],"undefined"!==typeof n.start)return{result:n.start-i,precise:!0};if(i+=cs(e,n),"undefined"!==typeof n.end)return{result:n.end-i,precise:!0}}return{result:-1,precise:!1}}(e,t);return r.precise?r.result:i.result+n},ms=function(e,t,n){if(!e)return 0;if("number"!==typeof n&&(n=0),"undefined"===typeof t){if(e.totalDuration)return e.totalDuration;if(!e.endList)return r.a.Infinity}return ps(e,t,n)},gs=function(e){let{defaultDuration:t,durationList:n,startIndex:i,endIndex:r}=e,s=0;if(i>r&&([i,r]=[r,i]),i<0){for(let e=i;e<Math.min(0,r);e++)s+=t;i=0}for(let a=i;a<r;a++)s+=n[a].duration;return s},fs=function(e,t,n,i){if(!e||!e.segments)return null;if(e.endList)return ms(e);if(null===t)return null;t=t||0;let r=ps(e,e.mediaSequence+e.segments.length,t);return n&&(r-=i="number"===typeof i?i:hs(null,e)),Math.max(0,r)},bs=function(e){return e.excludeUntil&&e.excludeUntil>Date.now()},ys=function(e){return e.excludeUntil&&e.excludeUntil===1/0},js=function(e){const t=bs(e);return!e.disabled&&!t},_s=function(e,t){return t.attributes&&t.attributes[e]},vs=(e,t)=>{if(1===e.playlists.length)return!0;const n=t.attributes.BANDWIDTH||Number.MAX_VALUE;return 0===e.playlists.filter((e=>!!js(e)&&(e.attributes.BANDWIDTH||0)<n)).length},xs=(e,t)=>!(!e&&!t||!e&&t||e&&!t)&&(e===t||(!(!e.id||!t.id||e.id!==t.id)||(!(!e.resolvedUri||!t.resolvedUri||e.resolvedUri!==t.resolvedUri)||!(!e.uri||!t.uri||e.uri!==t.uri)))),Os=function(e,t){const n=e&&e.mediaGroups&&e.mediaGroups.AUDIO||{};let i=!1;for(const r in n){for(const e in n[r])if(i=t(n[r][e]),i)break;if(i)break}return!!i},Ts=e=>{if(!e||!e.playlists||!e.playlists.length){return Os(e,(e=>e.playlists&&e.playlists.length||e.uri))}for(let t=0;t<e.playlists.length;t++){const n=e.playlists[t],i=n.attributes&&n.attributes.CODECS;if(i&&i.split(",").every((e=>Object(g.f)(e))))continue;if(!Os(e,(e=>xs(n,e))))return!1}return!0};var Ss={liveEdgeDelay:hs,duration:ms,seekable:function(e,t,n){const i=t||0;let r=fs(e,t,!0,n);return null===r?Jr():(r<i&&(r=i),Jr(i,r))},getMediaInfoForTime:function(e){let{playlist:t,currentTime:n,startingSegmentIndex:i,startingPartIndex:r,startTime:s,exactManifestTimings:a}=e,o=n-s;const c=ls(t);let l=0;for(let d=0;d<c.length;d++){const e=c[d];if(i===e.segmentIndex&&("number"!==typeof r||"number"!==typeof e.partIndex||r===e.partIndex)){l=d;break}}if(o<0){if(l>0)for(let e=l-1;e>=0;e--){const n=c[e];if(o+=n.duration,a){if(o<0)continue}else if(o+$r<=0)continue;return{partIndex:n.partIndex,segmentIndex:n.segmentIndex,startTime:s-gs({defaultDuration:t.targetDuration,durationList:c,startIndex:l,endIndex:e})}}return{partIndex:c[0]&&c[0].partIndex||null,segmentIndex:c[0]&&c[0].segmentIndex||0,startTime:n}}if(l<0){for(let e=l;e<0;e++)if(o-=t.targetDuration,o<0)return{partIndex:c[0]&&c[0].partIndex||null,segmentIndex:c[0]&&c[0].segmentIndex||0,startTime:n};l=0}for(let d=l;d<c.length;d++){const e=c[d];o-=e.duration;const n=e.duration>$r;if(!(0===o)&&!(n&&o+$r>=0)||d===c.length-1){if(a){if(o>0)continue}else if(o-$r>=0)continue;return{partIndex:e.partIndex,segmentIndex:e.segmentIndex,startTime:s+gs({defaultDuration:t.targetDuration,durationList:c,startIndex:l,endIndex:d})}}}return{segmentIndex:c[c.length-1].segmentIndex,partIndex:c[c.length-1].partIndex,startTime:n}},isEnabled:js,isDisabled:function(e){return e.disabled},isExcluded:bs,isIncompatible:ys,playlistEnd:fs,isAes:function(e){for(let t=0;t<e.segments.length;t++)if(e.segments[t].key)return!0;return!1},hasAttribute:_s,estimateSegmentRequestTime:function(e,t,n){let i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0;
2if(!_s("BANDWIDTH",n))return NaN;return(e*n.attributes.BANDWIDTH-8*i)/t},isLowestEnabledRendition:vs,isAudioOnly:Ts,playlistMatch:xs,segmentDurationWithParts:cs};const{log:ws}=Hr,As=(e,t)=>"".concat(e,"-").concat(t),ks=(e,t,n)=>"placeholder-uri-".concat(e,"-").concat(t,"-").concat(n),Cs=(e,t)=>{e.mediaGroups&&["AUDIO","SUBTITLES"].forEach((n=>{if(e.mediaGroups[n])for(const i in e.mediaGroups[n])for(const r in e.mediaGroups[n][i]){const s=e.mediaGroups[n][i][r];t(s,n,i,r)}}))},Es=e=>{let{playlist:t,uri:n,id:i}=e;t.id=i,t.playlistErrors_=0,n&&(t.uri=n),t.attributes=t.attributes||{}},Is=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:ks;e.uri=t;for(let r=0;r<e.playlists.length;r++)if(!e.playlists[r].uri){const t="placeholder-uri-".concat(r);e.playlists[r].uri=t}const i=Ts(e);Cs(e,((t,r,s,a)=>{if(!t.playlists||!t.playlists.length){if(i&&"AUDIO"===r&&!t.uri)for(let t=0;t<e.playlists.length;t++){const n=e.playlists[t];if(n.attributes&&n.attributes.AUDIO&&n.attributes.AUDIO===s)return}t.playlists=[h()({},t)]}
2t.playlists.forEach((function(t,i){const o=n(r,s,a,t),c=As(i,o);t.uri?t.resolvedUri=t.resolvedUri||Yr(e.uri,t.uri):(t.uri=0===i?o:c,t.resolvedUri=t.uri),t.id=t.id||c,t.attributes=t.attributes||{},e.playlists[t.id]=t,e.playlists[t.uri]=t}))})),(e=>{let t=e.playlists.length;for(;t--;){const n=e.playlists[t];Es({playlist:n,id:As(t,n.uri)}),n.resolvedUri=Yr(e.uri,n.uri),e.playlists[n.id]=n,e.playlists[n.uri]=n,n.attributes.BANDWIDTH||ws.warn("Invalid playlist STREAM-INF detected. Missing BANDWIDTH attribute.")}})(e),(e=>{Cs(e,(t=>{t.uri&&(t.resolvedUri=Yr(e.uri,t.uri))}))})(e)};class Ds{constructor(){this.offset_=null,this.pendingDateRanges_=new Map,this.processedDateRanges_=new Map}setOffset(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];if(null!==this.offset_)return;if(!e.length)return;const[t]=e;void 0!==t.programDateTime&&(this.offset_=t.programDateTime/1e3)}setPendingDateRanges(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];if(!e.length)return;const[t]=e,n=t.startDate.getTime();this.trimProcessedDateRanges_(n),this.pendingDateRanges_=e.reduce(((e,t)=>(e.set(t.id,t),e)),new Map)}processDateRange(e){this.pendingDateRanges_.delete(e.id),this.processedDateRanges_.set(e.id,e)}getDateRangesToProcess(){if(null===this.offset_)return[];const e={},t=[];this.pendingDateRanges_.forEach(((n,i)=>{if(!this.processedDateRanges_.has(i)&&(n.startTime=n.startDate.getTime()/1e3-this.offset_,n.processDateRange=()=>this.processDateRange(n),t.push(n),n.class))if(e[n.class]){const t=e[n.class].push(n);n.classListIndex=t-1}else e[n.class]=[n],n.classListIndex=0}));for(const n of t){const t=e[n.class]||[];n.endDate?n.endTime=n.endDate.getTime()/1e3-this.offset_:n.endOnNext&&t[n.classListIndex+1]?n.endTime=t[n.classListIndex+1].startTime:n.duration?n.endTime=n.startTime+n.duration:n.plannedDuration?n.endTime=n.startTime+n.plannedDuration:n.endTime=n.startTime}return t}trimProcessedDateRanges_(e){new Map(this.processedDateRanges_).forEach(((t,n)=>{t.startDate.getTime()<e&&this.processedDateRanges_.delete(n)}))}}const Ps=e=>{let{requestType:t,request:n,error:i,parseFailure:r}=e;const s=n.status<200||n.status>299,a=n.status>=400&&n.status<=499,o={uri:n.uri,requestType:t},c=s&&!a||r;if(i&&a)o.error=h()({},i),o.errorType=Hr.Error.NetworkRequestFailed;else if(n.aborted)o.errorType=Hr.Error.NetworkRequestAborted;else if(n.timedout)o.errorType=Hr.Error.NetworkRequestTimeout;else if(c){const e=r?Hr.Error.NetworkBodyParserFailed:Hr.Error.NetworkBadStatus;o.errorType=e,o.status=n.status,o.headers=n.headers}return o},Rs=Qr("CodecUtils"),Ls=function(e){const t=e.attributes||{};if(t.CODECS)return Object(g.h)(t.CODECS)},Ms=(e,t)=>{const n=t.attributes||{};return e&&e.mediaGroups&&e.mediaGroups.AUDIO&&n.AUDIO&&e.mediaGroups.AUDIO[n.AUDIO]},Ns=function(e){const t={};return e.forEach((e=>{let{mediaType:n,type:i,details:r}=e;t[n]=t[n]||[],t[n].push(Object(g.i)("".concat(i).concat(r)))})),Object.keys(t).forEach((function(e){if(t[e].length>1)return Rs("multiple ".concat(e," codecs found as attributes: ").concat(t[e].join(", "),". Setting playlist codecs to null so that we wait for mux.js to probe segments for real codecs.")),void(t[e]=null);t[e]=t[e][0]})),t},Bs=function(e){let t=0;return e.audio&&t++,e.video&&t++,t},Us=function(e,t){const n=t.attributes||{},i=Ns(Ls(t)||[]);if(Ms(e,t)&&!i.audio&&!((e,t)=>{if(!Ms(e,t))return!0;const n=t.attributes||{},i=e.mediaGroups.AUDIO[n.AUDIO];for(const r in i)if(!i[r].uri&&!i[r].playlists)return!0;return!1})(e,t)){const t=Ns(Object(g.d)(e,n.AUDIO)||[]);t.audio&&(i.audio=t.audio)}return i},{EventTarget:Fs}=Hr,zs=(e,t)=>{if(!e)return t;const n=Zr(e,t);if(e.preloadHints&&!t.preloadHints&&delete n.preloadHints,e.parts&&!t.parts)delete n.parts;else if(e.parts&&t.parts)for(let i=0;i<t.parts.length;i++)e.parts&&e.parts[i]&&(n.parts[i]=Zr(e.parts[i],t.parts[i]));return!e.skipped&&t.skipped&&(n.skipped=!1),e.preload&&!t.preload&&(n.preload=!1),n},qs=(e,t)=>{!e.resolvedUri&&e.uri&&(e.resolvedUri=Yr(t,e.uri)),e.key&&!e.key.resolvedUri&&(e.key.resolvedUri=Yr(t,e.key.uri)),e.map&&!e.map.resolvedUri&&(e.map.resolvedUri=Yr(t,e.map.uri)),e.map&&e.map.key&&!e.map.key.resolvedUri&&(e.map.key.resolvedUri=Yr(t,e.map.key.uri)),e.parts&&e.parts.length&&e.parts.forEac
vendor: 4,587 bytes, line 2
2h((e=>{e.resolvedUri||(e.resolvedUri=Yr(t,e.uri))})),e.preloadHints&&e.preloadHints.length&&e.preloadHints.forEach((e=>{e.resolvedUri||(e.resolvedUri=Yr(t,e.uri))}))},Hs=function(e){const t=e.segments||[],n=e.preloadSegment;if(n&&n.parts&&n.parts.length){if(n.preloadHints)for(let e=0;e<n.preloadHints.length;e++)if("MAP"===n.preloadHints[e].type)return t;n.duration=e.targetDuration,n.preload=!0,t.push(n)}return t},Vs=(e,t)=>e===t||e.segments&&t.segments&&e.segments.length===t.segments.length&&e.endList===t.endList&&e.mediaSequence===t.mediaSequence&&e.preloadSegment===t.preloadSegment,Ws=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Vs;const i=Zr(e,{}),r=i.playlists[t.id];if(!r)return null;if(n(r,t))return null;t.segments=Hs(t);const s=Zr(r,t);if(s.preloadSegment&&!t.preloadSegment&&delete s.preloadSegment,r.segments){if(t.skip){t.segments=t.segments||[];for(let e=0;e<t.skip.skippedSegments;e++)t.segments.unshift({skipped:!0})}s.segments=((e,t,n)=>{const i=e.slice(),r=t.slice();n=n||0;const s=[];let a;for(let o=0;o<r.length;o++){const e=i[o+n],t=r[o];e?(a=e.map||a,s.push(zs(e,t))):(a&&!t.map&&(t.map=a),s.push(t))}return s})(r.segments,t.segments,t.mediaSequence-r.mediaSequence)}s.segments.forEach((e=>{qs(e,s.resolvedUri)}));for(let a=0;a<i.playlists.length;a++)i.playlists[a].id===t.id&&(i.playlists[a]=s);return i.playlists[t.id]=s,i.playlists[t.uri]=s,Cs(e,((e,n,i,r)=>{if(e.playlists)for(let a=0;a<e.playlists.length;a++)t.id===e.playlists[a].id&&(e.playlists[a]=s)})),i},Gs=(e,t)=>{const n=e.segments||[],i=n[n.length-1],r=i&&i.parts&&i.parts[i.parts.length-1],s=r&&r.duration||i&&i.duration;return t&&s?1e3*s:500*(e.partTargetDuration||e.targetDuration||10)},Xs=(e,t,n)=>{if(!e)return;const i=[];return e.forEach((e=>{if(!e.attributes)return;const{BANDWIDTH:t,RESOLUTION:n,CODECS:r}=e.attributes;i.push({id:e.id,bandwidth:t,resolution:n,codecs:r})})),{type:t,isLive:n,renditions:i}};class Ys extends Fs{constructor(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(super(),!e)throw new Error("A non-empty playlist URL or object is required");this.logger_=Qr("PlaylistLoader");const{withCredentials:i=!1}=n;this.src=e,this.vhs_=t,this.withCredentials=i,this.addDateRangesToTextTrack_=n.addDateRangesToTextTrack;const r=t.options_;this.customTagParsers=r&&r.customTagParsers||[],this.customTagMappers=r&&r.customTagMappers||[],this.llhls=r&&r.llhls,this.dateRangesStorage_=new Ds,this.state="HAVE_NOTHING",this.handleMediaupdatetimeout_=this.handleMediaupdatetimeout_.bind(this),this.on("mediaupdatetimeout",this.handleMediaupdatetimeout_),this.on("loadedplaylist",this.handleLoadedPlaylist_.bind(this))}handleLoadedPlaylist_(){const e=this.media();if(!e)return;this.dateRangesStorage_.setOffset(e.segments),this.dateRangesStorage_.setPendingDateRanges(e.dateRanges);const t=this.dateRangesStorage_.getDateRangesToProcess();t.length&&this.addDateRangesToTextTrack_&&this.addDateRangesToTextTrack_(t)}handleMediaupdatetimeout_(){if("HAVE_METADATA"!==this.state)return;const e=this.media();let t=Yr(this.main.uri,e.uri);this.llhls&&(t=((e,t)=>{if(t.endList||!t.serverControl)return e;const n={};if(t.serverControl.canBlockReload){const{preloadSegment:e}=t;let i=t.mediaSequence+t.segments.length;if(e){const r=e.parts||[],s=us(t)-1;s>-1&&s!==r.length-1&&(n._HLS_part=s),(s>-1||r.length)&&i--}n._HLS_msn=i}if(t.serverControl&&t.serverControl.canSkipUntil&&(n._HLS_skip=t.serverControl.canSkipDateranges?"v2":"YES"),Object.keys(n).length){const t=new r.a.URL(e);["_HLS_skip","_HLS_msn","_HLS_part"].forEach((function(e){n.hasOwnProperty(e)&&t.searchParams.set(e,n[e])})),e=t.toString()}return e})(t,e)),this.state="HAVE_CURRENT_METADATA",this.request=this.vhs_.xhr({uri:t,withCredentials:this.withCredentials,requestType:"hls-playlist"},((e,t)=>{if(this.request)return e?this.playlistRequestError(this.request,this.media(),"HAVE_METADATA"):void this.haveMetadata({playlistString:this.request.responseText,url:this.media().uri,id:this.media().id})}))}playlistRequestError(e,t,n){const{uri:i,id:r}=t;this.request=null,n&&(this.state=n),this.error={playlist:this.main.playlists[r],status:e.status,message:"HLS playlist request error at URL: ".concat(i,"."),responseText:e.responseText,code:e.status>=500?4:2,metadata:Ps({requestType:e.requestType,request:e,error:e.error})},this.trigger("error")}parseManifest_(e){let{url:t,manifestString:n}=e;try{const e=(e=>{let{onwarn:t,oninfo:n,manifestString:i,customTagParsers:r=[],customTagMappers:s=[],llhls:a}=e;const o=new m.a;t&&o.on("warn",t),n&&o.on("info",n),r.forEach((e=>
vendor: 5,510 bytes, line 2
2o.addParser(e))),s.forEach((e=>o.addTagMapper(e))),o.push(i),o.end();const c=o.manifest;if(a||(["preloadSegment","skip","serverControl","renditionReports","partInf","partTargetDuration"].forEach((function(e){c.hasOwnProperty(e)&&delete c[e]})),c.segments&&c.segments.forEach((function(e){["parts","preloadHints"].forEach((function(t){e.hasOwnProperty(t)&&delete e[t]}))}))),!c.targetDuration){let e=10;c.segments&&c.segments.length&&(e=c.segments.reduce(((e,t)=>Math.max(e,t.duration)),0)),t&&t({message:"manifest has no targetDuration defaulting to ".concat(e)}),c.targetDuration=e}const l=ds(c);if(l.length&&!c.partTargetDuration){const e=l.reduce(((e,t)=>Math.max(e,t.duration)),0);t&&(t({message:"manifest has no partTargetDuration defaulting to ".concat(e)}),ws.error("LL-HLS manifest has parts but lacks required #EXT-X-PART-INF:PART-TARGET value. See https://datatracker.ietf.org/doc/html/draft-pantos-hls-rfc8216bis-09#section-4.4.3.7. Playback is not guaranteed.")),c.partTargetDuration=e}return c})({onwarn:e=>{let{message:n}=e;return this.logger_("m3u8-parser warn for ".concat(t,": ").concat(n))},oninfo:e=>{let{message:n}=e;return this.logger_("m3u8-parser info for ".concat(t,": ").concat(n))},manifestString:n,customTagParsers:this.customTagParsers,customTagMappers:this.customTagMappers,llhls:this.llhls});return e.playlists&&e.playlists.length?(this.excludeAudioOnlyVariants(e.playlists),e):e}catch(i){this.error=i,this.error.metadata={errorType:Hr.Error.StreamingHlsPlaylistParserError,error:i}}}excludeAudioOnlyVariants(e){const t=e=>{const t=e.attributes||{},{width:n,height:i}=t.RESOLUTION||{};if(n&&i)return!0;const r=Ls(e)||[],s=Ns(r);return Boolean(s.video)};e.some(t)&&e.forEach((e=>{t(e)||(e.excludeUntil=1/0)}))}haveMetadata(e){let{playlistString:t,playlistObject:n,url:i,id:r}=e;this.request=null,this.state="HAVE_METADATA";const s={playlistInfo:{type:"media",uri:i}};this.trigger({type:"playlistparsestart",metadata:s});const a=n||this.parseManifest_({url:i,manifestString:t});a.lastRequest=Date.now(),Es({playlist:a,uri:i,id:r});const o=Ws(this.main,a);this.targetDuration=a.partTargetDuration||a.targetDuration,this.pendingMedia_=null,o?(this.main=o,this.media_=this.main.playlists[r]):this.trigger("playlistunchanged"),this.updateMediaUpdateTimeout_(Gs(this.media(),!!o)),s.parsedPlaylist=Xs(this.main.playlists,s.playlistInfo.type,!this.media_.endList),this.trigger({type:"playlistparsecomplete",metadata:s}),this.trigger("loadedplaylist")}dispose(){this.trigger("dispose"),this.stopRequest(),r.a.clearTimeout(this.mediaUpdateTimeout),r.a.clearTimeout(this.finalRenditionTimeout),this.dateRangesStorage_=new Ds,this.off()}stopRequest(){if(this.request){const e=this.request;this.request=null,e.onreadystatechange=null,e.abort()}}media(e,t){if(!e)return this.media_;if("HAVE_NOTHING"===this.state)throw new Error("Cannot switch media playlist from "+this.state);if("string"===typeof e){if(!this.main.playlists[e])throw new Error("Unknown playlist URI: "+e);e=this.main.playlists[e]}if(r.a.clearTimeout(this.finalRenditionTimeout),t){const t=(e.partTargetDuration||e.targetDuration)/2*1e3||5e3;return void(this.finalRenditionTimeout=r.a.setTimeout(this.media.bind(this,e,!1),t))}const n=this.state,i=!this.media_||e.id!==this.media_.id,s=this.main.playlists[e.id];if(s&&s.endList||e.endList&&e.segments.length)return this.request&&(this.request.onreadystatechange=null,this.request.abort(),this.request=null),this.state="HAVE_METADATA",this.media_=e,void(i&&(this.trigger("mediachanging"),"HAVE_MAIN_MANIFEST"===n?this.trigger("loadedmetadata"):this.trigger("mediachange")));if(this.updateMediaUpdateTimeout_(Gs(e,!0)),!i)return;if(this.state="SWITCHING_MEDIA",this.request){if(e.resolvedUri===this.request.url)return;this.request.onreadystatechange=null,this.request.abort(),this.request=null}this.media_&&this.trigger("mediachanging"),this.pendingMedia_=e;const a={playlistInfo:{type:"media",uri:e.uri}};this.trigger({type:"playlistrequeststart",metadata:a}),this.request=this.vhs_.xhr({uri:e.resolvedUri,withCredentials:this.withCredentials,requestType:"hls-playlist"},((t,i)=>{if(this.request){if(e.lastRequest=Date.now(),e.resolvedUri=Kr(e.resolvedUri,i),t)return this.playlistRequestError(this.request,e,n);this.trigger({type:"playlistrequestcomplete",metadata:a}),this.haveMetadata({playlistString:i.responseText,url:e.uri,id:e.id}),"HAVE_MAIN_MANIFEST"===n?this.trigger("loadedmetadata"):this.trigger("mediachange")}}))}pause(){this.mediaUpdateTimeout&&(r.a.clearTimeout(this.mediaUpdateTimeout),this.mediaUpdateTimeout=null),this.stopRequest(),"HAVE_NOTHING"===this.state&&(this.started=!1),"SWITCHING_MEDIA"===this.state?this.media_?this.state="HAVE_METADATA":this.state="HAVE_MAIN_MANIFEST":"HAVE_CURRENT_METADATA"===this.state&&(this.state="HAVE_METADATA")}load(e){this.mediaUpdateTimeout&&(r.a.clearTimeout(this.mediaUpdateTimeout),this.mediaUpdateTimeout=null);const t=this.media();if(e){const e=t?(t.partTargetDuration||t.targetDuration)/2*1e3:5e3;this.mediaUpdateTimeout=r.a.setTimeout((()=>{this.mediaUpdateTimeout=null,this.load()}),e)}else this.started?t&&!t.endList?this.trigger("mediaupdatetimeout"):this.trigger("loadedplaylist"):this.start()}updateMediaUpdateTimeout_(e){this.mediaUpdateTimeout&&(r.a.clearTimeout(this.mediaUpdateTimeout),this.mediaUpdateTimeout=null),this.media()&&!this.media().endList&&(this.mediaUpdateTimeout=r.a.setTimeout((()=>{this.mediaUpdateTimeout=null,this.trigger("mediaupdatetimeout"),this.updateMediaUpdateTimeout_(e)}),e))}
2start(){if(this.started=!0,"object"===typeof this.src)return this.src.uri||(this.src.uri=r.a.location.href),this.src.resolvedUri=this.src.uri,void setTimeout((()=>{this.setupInitialPlaylist(this.src)}),0);const e={playlistInfo:{type:"multivariant",uri:this.src}};this.trigger({type:"playlistrequeststart",metadata:e}),this.request=this.vhs_.xhr({uri:this.src,withCredentials:this.withCredentials,requestType:"hls-playlist"},((t,n)=>{if(!this.request)return;if(this.request=null,t)return this.error={status:n.status,message:"HLS playlist request error at URL: ".concat(this.src,"."),responseText:n.responseText,code:2,metadata:Ps({requestType:n.requestType,request:n,error:t})},"HAVE_NOTHING"===this.state&&(this.started=!1),this.trigger("error");this.trigger({type:"playlistrequestcomplete",metadata:e}),this.src=Kr(this.src,n),this.trigger({type:"playlistparsestart",metadata:e});const i=this.parseManifest_({manifestString:n.responseText,url:this.src});e.parsedPlaylist=Xs(i.playlists,e.playlistInfo.type,!1),this.trigger({type:"playlistparsecomplete",metadata:e}),this.setupInitialPlaylist(i)}))}srcUri(){return"string"===typeof this.src?this.src:this.src.uri}setupInitialPlaylist(e){if(this.state="HAVE_MAIN_MANIFEST",e.playlists)return this.main=e,Is(this.main,this.srcUri()),e.playlists.forEac
vendor: 1,335 bytes, line 2
2h((e=>{e.segments=Hs(e),e.segments.forEach((t=>{qs(t,e.resolvedUri)}))})),this.trigger("loadedplaylist"),void(this.request||this.media(this.main.playlists[0]));const t=this.srcUri()||r.a.location.href;this.main=((e,t)=>{const n=As(0,t),i={mediaGroups:{AUDIO:{},VIDEO:{},"CLOSED-CAPTIONS":{},SUBTITLES:{}},uri:r.a.location.href,resolvedUri:r.a.location.href,playlists:[{uri:t,id:n,resolvedUri:t,attributes:{}}]};return i.playlists[n]=i.playlists[0],i.playlists[t]=i.playlists[0],i})(0,t),this.haveMetadata({playlistObject:e,url:t,id:this.main.playlists[0].id}),this.trigger("loadedmetadata")}updateOrDeleteClone(e,t){const n=this.main,i=e.ID;let r=n.playlists.length;for(;r--;){const s=n.playlists[r];if(s.attributes["PATHWAY-ID"]===i){const a=s.resolvedUri,o=s.id;if(t){const t=this.createCloneURI_(s.resolvedUri,e),a=As(i,t),o=this.createCloneAttributes_(i,s.attributes),c=this.createClonePlaylist_(s,a,e,o);n.playlists[r]=c,n.playlists[a]=c,n.playlists[t]=c}else n.playlists.splice(r,1);delete n.playlists[o],delete n.playlists[a]}}this.updateOrDeleteCloneMedia(e,t)}updateOrDeleteCloneMedia(e,t){const n=this.main,i=e.ID;["AUDIO","SUBTITLES","CLOSED-CAPTIONS"].forEach((e=>{if(n.mediaGroups[e]&&n.mediaGroups[e][i])for(const t in n.mediaGroups[e])if(t===i){for(const i in n.mediaGroups[e][t]){n.mediaGroups[e][t][i].playlists.forEac
2h(((e,t)=>{const i=n.playlists[e.id],r=i.id,s=i.resolvedUri;delete n.playlists[r],delete n.playlists[s]}))}delete n.mediaGroups[e][t]}})),t&&this.createClonedMediaGroups_(e)}addClonePathway(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const n=this.main,i=n.playlists.length,r=this.createCloneURI_(t.resolvedUri,e),s=As(e.ID,r),a=this.createCloneAttributes_(e.ID,t.attributes),o=this.createClonePlaylist_(t,s,e,a);n.playlists[i]=o,n.playlists[s]=o,n.playlists[r]=o,this.createClonedMediaGroups_(e)}createClonedMediaGroups_(e){const t=e.ID,n=e["BASE-ID"],i=this.main;["AUDIO","SUBTITLES","CLOSED-CAPTIONS"].forEach((r=>{if(i.mediaGroups[r]&&!i.mediaGroups[r][t])for(const s in i.mediaGroups[r])if(s===n){i.mediaGroups[r][t]={};for(const n in i.mediaGroups[r][s]){const a=i.mediaGroups[r][s][n];i.mediaGroups[r][t][n]=h()({},a);const o=i.mediaGroups[r][t][n],c=this.createCloneURI_(a.resolvedUri,e);o.resolvedUri=c,o.uri=c,o.playlists=[],a.playlists.forEach(((s,a)=>{const c=i.playlists[s.id],l=ks(r,t,n),d=As(t,l);if(c&&!i.playlists[d]){const t=this.createClonePlaylist_(c,d,e),n=t.resolvedUri;i.playlists[d]=t,i.playlists[n]=t}o.playlists[a]=this.createClonePlaylist_(s,d,e)}))}}}))}createClonePlaylist_(e,t,n,i){const r=this.createCloneURI_(e.resolvedUri,n),s={resolvedUri:r,uri:r,id:t};return e.segments&&(s.segments=[]),i&&(s.attributes=i),Zr(e,s)}createCloneURI_(e,t){const n=new URL(e);n.hostname=t["URI-REPLACEMENT"].HOST;const i=t["URI-REPLACEMENT"].PARAMS;for(const r of Object.keys(i))n.searchParams.set(r,i[r]);return n.href}createCloneAttributes_(e,t){const n={"PATHWAY-ID":e};return["AUDIO","SUBTITLES","CLOSED-CAPTIONS"].forEach((i=>{t[i]&&(n[i]=e)})),n}getKeyIdSet(e){const t=new Set;if(!e||!e.contentProtection)return t;for(const n in e.contentProtection)if(e.contentProtection[n]&&e.contentProtection[n].attributes&&e.contentProtection[n].attributes.keyId){const i=e.contentProtection[n].attributes.keyId;t.add(i.toLowerCase())}return t}}const Ks=function(e,t,n,i){const r="arraybuffer"===e.responseType?e.response:e.responseText;!t&&r&&(e.responseTime=Date.now(),e.roundTripTime=e.responseTime-e.requestTime,e.bytesReceived=r.byteLength||r.length,e.bandwidth||(e.bandwidth=Math.floor(e.bytesReceived/e.roundTripTime*8*1e3))),n.headers&&(e.responseHeaders=n.headers),t&&"ETIMEDOUT"===t.code&&(e.timedout=!0),t||e.aborted||200===n.statusCode||206===n.statusCode||0===n.statusCode||(t=new Error("XHR Failed with a response of: "+(e&&(r||e.responseText)))),i(t,e)},Qs=function(){const e=function e(t,n){t=Zr({timeout:45e3},t);const i=e.beforeRequest||Hr.Vhs.xhr.beforeRequest,r=e._requestCallbackSet||Hr.Vhs.xhr._requestCallbackSet||new Set,s=e._responseCallbackSet||Hr.Vhs.xhr._responseCallbackSet;i&&"function"===typeof i&&(Hr.log.warn("beforeRequest is deprecated, use onRequest instead."),r.add(i));const a=!0===Hr.Vhs.xhr.original?Hr.xhr:Hr.Vhs.xhr,o=((e,t)=>{if(!e||!e.size)return;let n=t;return e.forEach((e=>{n=e(n)})),n})(r,t);r.delete(i);const c=a(o||t,(function(e,t){return((e,t,n,i)=>{e&&e.size&&e.forEach((e=>{e(t,n,i)}))})(s,c,e,t),Ks(c,e,t,n)})),l=c.abort;return c.abort=function(){return c.aborted=!0,l.apply(c,arguments)},c.uri=t.uri,c.requestType=t.requestType,c.requestTime=Date.now(),c};return e.original=!0,e},Zs=function(e){const t={};return e.byterange&&(t.Range=function(e){let t;const n=e.offset;return t="bigint"===typeof e.offset||"bigint"===typeof e.length?r.a.BigInt(e.offset)+r.a.BigInt(e.length)-r.a.BigInt(1):e.offset+e.length-1,"bytes="+n+"-"+t}(e.byterange)),t},Js=function(e,t){return e.start(t)+"-"+e.end(t)},$s=function(e,t){const n=e.toString(16);return"00".substring(0,2-n.length)+n+(t%2?" ":"")},ea=function(e){return e>=32&&e<126?String.fromCharCode(e):"."},ta=function(e){const t={};return Object.keys(e).forEach((n=>{const i=e[n];Object(b.e)(i)?t[n]={bytes:i.buffer,byteOffset:i.byteOffset,byteLength:i.byteLength}:t[n]=i})),t},na=function(e){const t=e.byterange||{length:1/0,offset:0};return[t.length,t.offset,e.resolvedUri].join(",")},ia=function(e){return e.resolvedUri},ra=e=>{const t=Array.prototype.slice.call(e),n=16;let i,r,s="";for(let a=0;a<t.length/n;a++)i=t.slice(a*n,a*n+n).map($s).join(""),r=t.slice(a*n,a*n+n).map(ea).join(""),s+=i+" "+r+"\n";return s};var sa=Object.freeze({__proto__:null,createTransferableMessage:ta,initSegmentId:na,segmentKeyId:ia,hexDump:ra,tagDump:e=>{let{bytes:t}=e;return ra(t)},textRanges:e=>{let t,n="";for(t=0;t<e.length;t++)n+=Js(e,t)+" ";return n}});const aa=e=>{let{playlist:t,time:n,callback:i}=e;if(!i)throw new Error("getProgramTime: callback must be provided");
vendor: 4,666 bytes, line 2
2if(!t||void 0===n)return i({message:"getProgramTime: playlist and time must be provided"});const r=((e,t)=>{if(!t||!t.segments||0===t.segments.length)return null;let n,i=0;for(let s=0;s<t.segments.length&&(n=t.segments[s],i=n.videoTimingInfo?n.videoTimingInfo.transmuxedPresentationEnd:i+n.duration,!(e<=i));s++);const r=t.segments[t.segments.length-1];if(r.videoTimingInfo&&r.videoTimingInfo.transmuxedPresentationEnd<e)return null;if(e>i){if(e>i+.25*r.duration)return null;n=r}return{segment:n,estimatedStart:n.videoTimingInfo?n.videoTimingInfo.transmuxedPresentationStart:i-n.duration,type:n.videoTimingInfo?"accurate":"estimate"}})(n,t);if(!r)return i({message:"valid programTime was not found"});if("estimate"===r.type)return i({message:"Accurate programTime could not be determined. Please seek to e.seekTime and try again",seekTime:r.estimatedStart});const s={mediaSeconds:n},a=((e,t)=>{if(!t.dateTimeObject)return null;const n=t.videoTimingInfo.transmuxerPrependedSeconds,i=e-(t.videoTimingInfo.transmuxedPresentationStart+n);return new Date(t.dateTimeObject.getTime()+1e3*i)})(n,r.segment);return a&&(s.programDateTime=a.toISOString()),i(null,s)},oa=e=>{let{programTime:t,playlist:n,retryCount:i=2,seekTo:r,pauseAfterSeek:s=!0,tech:a,callback:o}=e;if(!o)throw new Error("seekToProgramTime: callback must be provided");if("undefined"===typeof t||!n||!r)return o({message:"seekToProgramTime: programTime, seekTo and playlist must be provided"});if(!n.endList&&!a.hasStarted_)return o({message:"player must be playing a live stream to start buffering"});if(!(e=>{if(!e.segments||0===e.segments.length)return!1;for(let t=0;t<e.segments.length;t++)if(!e.segments[t].dateTimeObject)return!1;return!0})(n))return o({message:"programDateTime tags must be provided in the manifest "+n.resolvedUri});const c=((e,t)=>{let n;try{n=new Date(e)}catch(c){return null}if(!t||!t.segments||0===t.segments.length)return null;let i=t.segments[0];if(n<new Date(i.dateTimeObject))return null;for(let l=0;l<t.segments.length-1&&(i=t.segments[l],!(n<new Date(t.segments[l+1].dateTimeObject)));l++);const r=t.segments[t.segments.length-1],s=r.dateTimeObject,a=r.videoTimingInfo?(o=r.videoTimingInfo).transmuxedPresentationEnd-o.transmuxedPresentationStart-o.transmuxerPrependedSeconds:r.duration+.25*r.duration;var o;return n>new Date(s.getTime()+1e3*a)?null:(n>new Date(s)&&(i=r),{segment:i,estimatedStart:i.videoTimingInfo?i.videoTimingInfo.transmuxedPresentationStart:Ss.duration(t,t.mediaSequence+t.segments.indexOf(i)),type:i.videoTimingInfo?"accurate":"estimate"})})(t,n);if(!c)return o({message:"".concat(t," was not found in the stream")});const l=c.segment,d=((e,t)=>{let n,i;try{n=new Date(e),i=new Date(t)}catch(s){}const r=n.getTime();return(i.getTime()-r)/1e3})(l.dateTimeObject,t);if("estimate"===c.type)return 0===i?o({message:"".concat(t," is not buffered yet. Try again")}):(r(c.estimatedStart+d),void a.one("seeked",(()=>{oa({programTime:t,playlist:n,retryCount:i-1,seekTo:r,pauseAfterSeek:s,tech:a,callback:o})})));const u=l.start+d;a.one("seeked",(()=>o(null,a.currentTime()))),s&&a.pause(),r(u)},ca=(e,t)=>{if(4===e.readyState)return t()},{EventTarget:la}=Hr,da=function(e,t){if(!Vs(e,t))return!1;if(e.sidx&&t.sidx&&(e.sidx.offset!==t.sidx.offset||e.sidx.length!==t.sidx.length))return!1;if(!e.sidx&&t.sidx||e.sidx&&!t.sidx)return!1;if(e.segments&&!t.segments||!e.segments&&t.segments)return!1;if(!e.segments&&!t.segments)return!0;for(let n=0;n<e.segments.length;n++){const i=e.segments[n],r=t.segments[n];if(i.uri!==r.uri)return!1;if(!i.byterange&&!r.byterange)continue;const s=i.byterange,a=r.byterange;if(s&&!a||!s&&a)return!1;if(s.offset!==a.offset||s.length!==a.length)return!1}return!0},ua=(e,t,n,i)=>{const r=i.attributes.NAME||n;return"placeholder-uri-".concat(e,"-").concat(t,"-").concat(r)},ha=(e,t,n)=>{let i=!0,r=Zr(e,{duration:t.duration,minimumUpdatePeriod:t.minimumUpdatePeriod,timelineStarts:t.timelineStarts});for(let s=0;s<t.playlists.length;s++){const e=t.playlists[s];if(e.sidx){const t=Object(y.b)(e.sidx);n&&n[t]&&n[t].sidx&&Object(y.a)(e,n[t].sidx,e.sidx.resolvedUri)}const a=Ws(r,e,da);a&&(r=a,i=!1)}return Cs(t,((e,t,n,s)=>{if(e.playlists&&e.playlists.length){const a=e.playlists[0].id,o=Ws(r,e.playlists[0],da);o&&(r=o,s in r.mediaGroups[t][n]||(r.mediaGroups[t][n][s]=e),r.mediaGroups[t][n][s].playlists[0]=r.playlists[a],i=!1)}})),((e,t)=>{Cs(e,((n,i,r,s)=>{t.mediaGroups[i][r]&&s in t.mediaGroups[i][r]||delete e.mediaGroups[i][r][s]}))})(r,t),t.minimumUpdatePeriod!==e.minimumUpdatePeriod&&(i=!1),i?null:r},pa=(e,t)=>{const n={};for(const s in e){const a=e[s].sidx;if(a){const e=Object(y.b)(a);if(!t[e])break;const s=t[e].sidxInfo;
2i=s,r=a,(Boolean(!i.map&&!r.map)||Boolean(i.map&&r.map&&i.map.byterange.offset===r.map.byterange.offset&&i.map.byterange.length===r.map.byterange.length))&&i.uri===r.uri&&i.byterange.offset===r.byterange.offset&&i.byterange.length===r.byterange.length&&(n[e]=t[e])}}var i,r;return n};class ma extends la{constructor(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=arguments.length>3?arguments[3]:void 0;super(),this.isPaused_=!0,this.mainPlaylistLoader_=i||this,i||(this.isMain_=!0);const{withCredentials:r=!1}=n;if(this.vhs_=t,this.withCredentials=r,this.addMetadataToTextTrack=n.addMetadataToTextTrack,!e)throw new Error("A non-empty playlist URL or object is required");this.on("minimumUpdatePeriod",(()=>{this.refreshXml_()})),this.on("mediaupdatetimeout",(()=>{this.refreshMedia_(this.media().id)})),this.state="HAVE_NOTHING",this.loadedPlaylists_={},this.logger_=Qr("DashPlaylistLoader"),this.isMain_?(this.mainPlaylistLoader_.srcUrl=e,this.mainPlaylistLoader_.sidxMapping_={}):this.childPlaylist_=e}get isPaused(){return this.isPaused_}requestErrored_(e,t,n){return!this.request||(this.request=null,e?(this.error="object"!==typeof e||e instanceof Error?{status:t.status,message:"DASH request error at URL: "+t.uri,response:t.response,code:2,metadata:e.metadata}:e,n&&(this.state=n),this.trigger("error"),!0):void 0)}addSidxSegments_(e,t,n){const i=e.sidx&&Object(y.b)(e.sidx);if(!e.sidx||!i||this.mainPlaylistLoader_.sidxMapping_[i])return r.a.clearTimeout(this.mediaRequest_),void(this.mediaRequest_=r.a.setTimeout((()=>n(!1)),0));const s=Kr(e.sidx.resolvedUri),a=(r,s)=>{if(this.requestErrored_(r,s,t))return;const a=this.mainPlaylistLoader_.sidxMapping_,{requestType:o}=s;let c;try{c=_()(Object(b.k)(s.response).subarray(8))}catch(l){return l.metadata=Ps({requestType:o,request:s,parseFailure:!0}),void this.requestErrored_(l,s,t)}return a[i]={sidxInfo:e.sidx,sidx:c},Object(y.a)(e,c,e.sidx.resolvedUri),n(!0)};this.request=((e,t,n,i)=>{let r,s=[],a=!1;const o=function(e,t,i,r){return t.abort(),a=!0,n(e,t,i,r)},c=function(e,t){if(a)return;if(e)return e.metadata=Ps({requestType:i,request:t,error:e}),o(e,t,"",s);const n=t.responseText.substring(s&&s.byteLength||0,t.responseText.length);if(s=Object(b.d)(s,Object(b.h)(n,!0)),r=r||Object(v.a)(s),s.length<10||r&&s.length<r+2)return ca(t,(()=>o(e,t,"",s)));const c=Object(x.a)(s);return"ts"===c&&s.length<188||!c&&s.length<376?ca(t,(()=>o(e,t,"",s))):o(null,t,c,s)},l={uri:e,beforeSend(e){e.overrideMimeType("text/plain; charset=x-user-defined"),e.addEventListener("progress",(function(t){let{total:n,loaded:i}=t;return Ks(e,null,{statusCode:e.status},c)}))}},d=t(l,(function(e,t){return Ks(d,e,t,c)}));return d})(s,this.vhs_.xhr,((t,n,i,r)=>{if(t)return a(t,n);if(!i||"mp4"!==i){const t=i||"unknown";return a({status:n.status,message:"Unsupported ".concat(t," container type for sidx segment at URL: ").concat(s),response:"",playlist:e,internal:!0,playlistExclusionDuration:1/0,code:2},n)}const{offset:o,length:c}=e.sidx.byterange;if(r.length>=c+o)return a(t,{response:r.subarray(o,o+c),status:n.status,uri:n.uri});this.request=this.vhs_.xhr({uri:s,responseType:"arraybuffer",requestType:"dash-sidx",headers:Zs({byterange:e.sidx.byterange})},a)}),"dash-sidx")}dispose(){this.isPaused_=!0,this.trigger("dispose"),this.stopRequest(),this.loadedPlaylists_={},r.a.clearTimeout(this.minimumUpdatePeriodTimeout_),r.a.clearTimeout(this.mediaRequest_),r.a.clearTimeout(this.mediaUpdateTimeout),this.mediaUpdateTimeout=null,this.mediaRequest_=null,this.minimumUpdatePeriodTimeout_=null,this.mainPlaylistLoader_.createMupOnMedia_&&(this.off("loadedmetadata",this.mainPlaylistLoader_.createMupOnMedia_),this.mainPlaylistLoader_.createMupOnMedia_=null),this.off()}hasPendingRequest(){return this.request||this.mediaRequest_}stopRequest(){if(this.request){const e=this.request;this.request=null,e.onreadystatechange=null,e.abort()}}media(e){if(!e)return this.media_;if("HAVE_NOTHING"===this.state)throw new Error("Cannot switch media playlist from "+this.state);const t=this.state;if("string"===typeof e){if(!this.mainPlaylistLoader_.main.playlists[e])throw new Error("Unknown playlist URI: "+e);e=this.mainPlaylistLoader_.main.playlists[e]}const n=!this.media_||e.id!==this.media_.id;if(n&&this.loadedPlaylists_[e.id]&&this.loadedPlaylists_[e.id].endList)return this.state="HAVE_METADATA",this.media_=e,void(n&&(this.trigger("mediachanging"),this.trigger("mediachange")));n&&(this.media_&&this.trigger("mediachanging"),this.addSidxSegments_(e,t,(n=>{this.haveMetadata({startingState:t,playlist:e})})))}haveMetadata(e){let{startingState:t,playlist:n}=e;this.state="HAVE_METADATA",this.loadedPlaylists_[n.id]=n,r.a.clearTimeout(this.mediaRequest_),this.mediaRequest_=null,this.refreshMedia_(n.id),"HAVE_MAIN_MANIFEST"===t?this.trigger("loadedmetadata"):this.trigger("mediachange")}pause(){this.isPaused_=!0,this.mainPlaylistLoader_.createMupOnMedia_&&(this.off("loadedmetadata",this.mainPlaylistLoader_.createMupOnMedia_),this.mainPlaylistLoader_.createMupOnMedia_=null),this.stopRequest(),r.a.clearTimeout(this.mediaUpdateTimeout),this.mediaUpdateTimeout=null,this.isMain_&&(r.a.clearTimeout(this.mainPlaylistLoader_.minimumUpdatePeriodTimeout_),this.mainPlaylistLoader_.minimumUpdatePeriodTimeout_=null),"HAVE_NOTHING"===this.state&&(this.started=!1)}
2load(e){this.isPaused_=!1,r.a.clearTimeout(this.mediaUpdateTimeout),this.mediaUpdateTimeout=null;const t=this.media();if(e){const e=t?t.targetDuration/2*1e3:5e3;this.mediaUpdateTimeout=r.a.setTimeout((()=>this.load()),e)}else this.started?t&&!t.endList?(this.isMain_&&!this.minimumUpdatePeriodTimeout_&&(this.trigger("minimumUpdatePeriod"),this.updateMinimumUpdatePeriodTimeout_()),this.trigger("mediaupdatetimeout")):this.trigger("loadedplaylist"):this.start()}start(){if(this.started=!0,!this.isMain_)return r.a.clearTimeout(this.mediaRequest_),void(this.mediaRequest_=r.a.setTimeout((()=>this.haveMain_()),0));this.requestMain_(((e,t)=>{this.haveMain_(),this.hasPendingRequest()||this.media_||this.media(this.mainPlaylistLoader_.main.playlists[0])}))}requestMain_(e){const t={manifestInfo:{uri:this.mainPlaylistLoader_.srcUrl}};this.trigger({type:"manifestrequeststart",metadata:t}),this.request=this.vhs_.xhr({uri:this.mainPlaylistLoader_.srcUrl,withCredentials:this.withCredentials,requestType:"dash-manifest"},((n,i)=>{if(n){const{requestType:e}=i;n.metadata=Ps({requestType:e,request:i,error:n})}if(this.requestErrored_(n,i))return void("HAVE_NOTHING"===this.state&&(this.started=!1));this.trigger({type:"manifestrequestcomplete",metadata:t});const r=i.responseText!==this.mainPlaylistLoader_.mainXml_;return this.mainPlaylistLoader_.mainXml_=i.responseText,i.responseHeaders&&i.responseHeaders.date?this.mainLoaded_=Date.parse(i.responseHeaders.date):this.mainLoaded_=Date.now(),this.mainPlaylistLoader_.srcUrl=Kr(this.mainPlaylistLoader_.srcUrl,i),r?(this.handleMain_(),void this.syncClientServerClock_((()=>e(i,r)))):e(i,r)}))}syncClientServerClock_(e){const t=Object(y.d)(this.mainPlaylistLoader_.mainXml_);return null===t?(this.mainPlaylistLoader_.clientOffset_=this.mainLoaded_-Date.now(),e()):"DIRECT"===t.method?(this.mainPlaylistLoader_.clientOffset_=t.value-Date.now(),e()):void(this.request=this.vhs_.xhr({uri:Yr(this.mainPlaylistLoader_.srcUrl,t.value),method:t.method,withCredentials:this.withCredentials,requestType:"dash-clock-sync"},((n,i)=>{if(!this.request)return;if(n){const{requestType:t}=i;return this.error.metadata=Ps({requestType:t,request:i,error:n}),this.mainPlaylistLoader_.clientOffset_=this.mainLoaded_-Date.now(),e()}let r;r="HEAD"===t.method?i.responseHeaders&&i.responseHeaders.date?Date.parse(i.responseHeaders.date):this.mainLoaded_:Date.parse(i.responseText),this.mainPlaylistLoader_.clientOffset_=r-Date.now(),e()})))}haveMain_(){this.state="HAVE_MAIN_MANIFEST",this.isMain_?this.trigger("loadedplaylist"):this.media_||this.media(this.childPlaylist_)}handleMain_(){r.a.clearTimeout(this.mediaRequest_),this.mediaRequest_=null;const e=this.mainPlaylistLoader_.main,t={manifestInfo:{uri:this.mainPlaylistLoader_.srcUrl}};let n;this.trigger({type:"manifestparsestart",metadata:t});try{n=(e=>{let{mainXml:t,srcUrl:n,clientOffset:i,sidxMapping:r,previousManifest:s}=e;const a=Object(y.c)(t,{manifestUri:n,clientOffset:i,sidxMapping:r,previousManifest:s});return Is(a,n,ua),a})({mainXml:this.mainPlaylistLoader_.mainXml_,srcUrl:this.mainPlaylistLoader_.srcUrl,clientOffset:this.mainPlaylistLoader_.clientOffset_,sidxMapping:this.mainPlaylistLoader_.sidxMapping_,previousManifest:e})}catch(s){this.error=s,this.error.metadata={errorType:Hr.Error.StreamingDashManifestParserError,error:s},this.trigger("error")}e&&(n=ha(e,n,this.mainPlaylistLoader_.sidxMapping_)),this.mainPlaylistLoader_.main=n||e;const i=this.mainPlaylistLoader_.main.locations&&this.mainPlaylistLoader_.main.locations[0];if(i&&i!==this.mainPlaylistLoader_.srcUrl&&(this.mainPlaylistLoader_.srcUrl=i),(!e||n&&n.minimumUpdatePeriod!==e.minimumUpdatePeriod)&&this.updateMinimumUpdatePeriodTimeout_(),this.addEventStreamToMetadataTrack_(n),n){const{duration:e,endList:i}=n,r=[];
vendor: 4,987 bytes, line 2
2n.playlists.forEach((e=>{r.push({id:e.id,bandwidth:e.attributes.BANDWIDTH,resolution:e.attributes.RESOLUTION,codecs:e.attributes.CODECS})}));const s={duration:e,isLive:!i,renditions:r};t.parsedManifest=s,this.trigger({type:"manifestparsecomplete",metadata:t})}return Boolean(n)}updateMinimumUpdatePeriodTimeout_(){const e=this.mainPlaylistLoader_;e.createMupOnMedia_&&(e.off("loadedmetadata",e.createMupOnMedia_),e.createMupOnMedia_=null),e.minimumUpdatePeriodTimeout_&&(r.a.clearTimeout(e.minimumUpdatePeriodTimeout_),e.minimumUpdatePeriodTimeout_=null);let t=e.main&&e.main.minimumUpdatePeriod;0===t&&(e.media()?t=1e3*e.media().targetDuration:(e.createMupOnMedia_=e.updateMinimumUpdatePeriodTimeout_,e.one("loadedmetadata",e.createMupOnMedia_))),"number"!==typeof t||t<=0?t<0&&this.logger_("found invalid minimumUpdatePeriod of ".concat(t,", not setting a timeout")):this.createMUPTimeout_(t)}createMUPTimeout_(e){const t=this.mainPlaylistLoader_;t.minimumUpdatePeriodTimeout_=r.a.setTimeout((()=>{t.minimumUpdatePeriodTimeout_=null,t.trigger("minimumUpdatePeriod"),t.createMUPTimeout_(e)}),e)}refreshXml_(){this.requestMain_(((e,t)=>{t&&(this.media_&&(this.media_=this.mainPlaylistLoader_.main.playlists[this.media_.id]),this.mainPlaylistLoader_.sidxMapping_=((e,t)=>{let n=pa(e.playlists,t);return Cs(e,((e,i,r,s)=>{if(e.playlists&&e.playlists.length){const i=e.playlists;n=Zr(n,pa(i,t))}})),n})(this.mainPlaylistLoader_.main,this.mainPlaylistLoader_.sidxMapping_),this.addSidxSegments_(this.media(),this.state,(e=>{this.refreshMedia_(this.media().id)})))}))}refreshMedia_(e){if(!e)throw new Error("refreshMedia_ must take a media id");this.media_&&this.isMain_&&this.handleMain_();const t=this.mainPlaylistLoader_.main.playlists,n=!this.media_||this.media_!==t[e];if(n?this.media_=t[e]:this.trigger("playlistunchanged"),!this.mediaUpdateTimeout){const e=()=>{this.media().endList||(this.mediaUpdateTimeout=r.a.setTimeout((()=>{this.trigger("mediaupdatetimeout"),e()}),Gs(this.media(),Boolean(n))))};e()}this.trigger("loadedplaylist")}addEventStreamToMetadataTrack_(e){if(e&&this.mainPlaylistLoader_.main.eventStream){const e=this.mainPlaylistLoader_.main.eventStream.map((e=>({cueTime:e.start,frames:[{data:e.messageData}]})));this.addMetadataToTextTrack("EventStream",e,this.mainPlaylistLoader_.main.duration)}}getKeyIdSet(e){if(e.contentProtection){const t=new Set;for(const n in e.contentProtection){const i=e.contentProtection[n].attributes["cenc:default_KID"];i&&t.add(i.replace(/-/g,"").toLowerCase())}return t}}}var ga={GOAL_BUFFER_LENGTH:30,MAX_GOAL_BUFFER_LENGTH:60,BACK_BUFFER_LENGTH:30,GOAL_BUFFER_LENGTH_RATE:1,INITIAL_BANDWIDTH:4194304,BANDWIDTH_VARIANCE:1.2,BUFFER_LOW_WATER_LINE:0,MAX_BUFFER_LOW_WATER_LINE:30,EXPERIMENTAL_MAX_BUFFER_LOW_WATER_LINE:16,BUFFER_LOW_WATER_LINE_RATE:1,BUFFER_HIGH_WATER_LINE:30};const fa=function(e){return e.on=e.addEventListener,e.off=e.removeEventListener,e},ba=function(e){return function(){const t=function(e){try{return URL.createObjectURL(new Blob([e],{type:"application/javascript"}))}catch(t){const n=new BlobBuilder;return n.append(e),URL.createObjectURL(n.getBlob())}}(e),n=fa(new Worker(t));n.objURL=t;const i=n.terminate;return n.on=n.addEventListener,n.off=n.removeEventListener,n.terminate=function(){return URL.revokeObjectURL(t),i.call(this)},n}},ya=function(e){return"var browserWorkerPolyFill = ".concat(fa.toString(),";\n")+"browserWorkerPolyFill(self);\n"+e},ja=function(e){return e.toString().replace(/^function.+?{/,"").slice(0,-1)},_a=ya(ja((function(){var t="undefined"!==typeof globalThis?globalThis:"undefined"!==typeof window?window:"undefined"!==typeof e?e:"undefined"!==typeof self?self:{},n=function(){this.init=function(){var e={};this.on=function(t,n){e[t]||(e[t]=[]),e[t]=e[t].concat(n)},this.off=function(t,n){var i;return!!e[t]&&(i=e[t].indexOf(n),e[t]=e[t].slice(),e[t].splice(i,1),i>-1)},this.trigger=function(t){var n,i,r,s;if(n=e[t])if(2===arguments.length)for(r=n.length,i=0;i<r;++i)n[i].call(this,arguments[1]);else{for(s=[],i=arguments.length,i=1;i<arguments.length;++i)s.push(arguments[i]);for(r=n.length,i=0;i<r;++i)n[i].apply(this,s)}},this.dispose=function(){e={}}}};n.prototype.pipe=function(e){return this.on("data",(function(t){e.push(t)})),this.on("done",(function(t){e.flush(t)})),this.on("partialdone",(function(t){e.partialFlush(t)})),this.on("endedtimeline",(function(t){e.endTimeline(t)})),this.on("reset",(function(t){e.reset(t)})),e},n.prototype.push=function(e){this.trigger("data",e)},n.prototype.flush=function(e){this.trigger("done",e)},n.prototype.partialFlush=function(e){this.trigger("partialdone",e)},n.prototype.endTimeline=function(e){this.trigger("endedtimeline",e)},n.prototype.reset=function(e){this.trigger("reset",e)};var i,r,s,a,o,c,l,d,u,h,p,m,g,f,b,y,j,_,v,x,O,T,S,w,A,k,C,E,I,D,P,R,L,M,N,B,U=n,F=Math.pow(2,32),z={getUint64:function(e){var t,n=new DataView(e.buffer,e.byteOffset,e.byteLength);return n.getBigUint64?(t=n.getBigUint64(0))<Number.MAX_SAFE_INTEGER?
vendor: 7,081 bytes, line 2
2Number(t):t:n.getUint32(0)*F+n.getUint32(4)},MAX_UINT32:F},q=z.MAX_UINT32;!function(){var e;if(S={avc1:[],avcC:[],btrt:[],dinf:[],dref:[],esds:[],ftyp:[],hdlr:[],mdat:[],mdhd:[],mdia:[],mfhd:[],minf:[],moof:[],moov:[],mp4a:[],mvex:[],mvhd:[],pasp:[],sdtp:[],smhd:[],stbl:[],stco:[],stsc:[],stsd:[],stsz:[],stts:[],styp:[],tfdt:[],tfhd:[],traf:[],trak:[],trun:[],trex:[],tkhd:[],vmhd:[]},"undefined"!==typeof Uint8Array){for(e in S)S.hasOwnProperty(e)&&(S[e]=[e.charCodeAt(0),e.charCodeAt(1),e.charCodeAt(2),e.charCodeAt(3)]);w=new Uint8Array(["i".charCodeAt(0),"s".charCodeAt(0),"o".charCodeAt(0),"m".charCodeAt(0)]),k=new Uint8Array(["a".charCodeAt(0),"v".charCodeAt(0),"c".charCodeAt(0),"1".charCodeAt(0)]),A=new Uint8Array([0,0,0,1]),C=new Uint8Array([0,0,0,0,0,0,0,0,118,105,100,101,0,0,0,0,0,0,0,0,0,0,0,0,86,105,100,101,111,72,97,110,100,108,101,114,0]),E=new Uint8Array([0,0,0,0,0,0,0,0,115,111,117,110,0,0,0,0,0,0,0,0,0,0,0,0,83,111,117,110,100,72,97,110,100,108,101,114,0]),I={video:C,audio:E},R=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,12,117,114,108,32,0,0,0,1]),P=new Uint8Array([0,0,0,0,0,0,0,0]),L=new Uint8Array([0,0,0,0,0,0,0,0]),M=L,N=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0]),B=L,D=new Uint8Array([0,0,0,1,0,0,0,0,0,0,0,0])}}(),i=function(e){var t,n,i=[],r=0;for(t=1;t<arguments.length;t++)i.push(arguments[t]);for(t=i.length;t--;)r+=i[t].byteLength;for(n=new Uint8Array(r+8),new DataView(n.buffer,n.byteOffset,n.byteLength).setUint32(0,n.byteLength),n.set(e,4),t=0,r=8;t<i.length;t++)n.set(i[t],r),r+=i[t].byteLength;return n},r=function(){return i(S.dinf,i(S.dref,R))},s=function(e){return i(S.esds,new Uint8Array([0,0,0,0,3,25,0,0,0,4,17,64,21,0,6,0,0,0,218,192,0,0,218,192,5,2,e.audioobjecttype<<3|e.samplingfrequencyindex>>>1,e.samplingfrequencyindex<<7|e.channelcount<<3,6,1,2]))},a=function(){return i(S.ftyp,w,A,w,k)},y=function(e){return i(S.hdlr,I[e])},o=function(e){return i(S.mdat,e)},b=function(e){var t=new Uint8Array([0,0,0,0,0,0,0,2,0,0,0,3,0,1,95,144,e.duration>>>24&255,e.duration>>>16&255,e.duration>>>8&255,255&e.duration,85,196,0,0]);return e.samplerate&&(t[12]=e.samplerate>>>24&255,t[13]=e.samplerate>>>16&255,t[14]=e.samplerate>>>8&255,t[15]=255&e.samplerate),i(S.mdhd,t)},f=function(e){return i(S.mdia,b(e),y(e.type),l(e))},c=function(e){return i(S.mfhd,new Uint8Array([0,0,0,0,(4278190080&e)>>24,(16711680&e)>>16,(65280&e)>>8,255&e]))},l=function(e){return i(S.minf,"video"===e.type?i(S.vmhd,D):i(S.smhd,P),r(),_(e))},d=function(e,t){for(var n=[],r=t.length;r--;)n[r]=x(t[r]);return i.apply(null,[S.moof,c(e)].concat(n))},u=function(e){for(var t=e.length,n=[];t--;)n[t]=m(e[t]);return i.apply(null,[S.moov,p(4294967295)].concat(n).concat(h(e)))},h=function(e){for(var t=e.length,n=[];t--;)n[t]=O(e[t]);return i.apply(null,[S.mvex].concat(n))},p=function(e){var t=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,2,0,1,95,144,(4278190080&e)>>24,(16711680&e)>>16,(65280&e)>>8,255&e,0,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255]);return i(S.mvhd,t)},j=function(e){var t,n,r=e.samples||[],s=new Uint8Array(4+r.length);for(n=0;n<r.length;n++)t=r[n].flags,s[n+4]=t.dependsOn<<4|t.isDependedOn<<2|t.hasRedundancy;return i(S.sdtp,s)},_=function(e){return i(S.stbl,v(e),i(S.stts,B),i(S.stsc,M),i(S.stsz,N),i(S.stco,L))},function(){var e,t;v=function(n){return i(S.stsd,new Uint8Array([0,0,0,0,0,0,0,1]),"video"===n.type?e(n):t(n))},e=function(e){var t,n,r=e.sps||[],s=e.pps||[],a=[],o=[];for(t=0;t<r.length;t++)a.push((65280&r[t].byteLength)>>>8),a.push(255&r[t].byteLength),a=a.concat(Array.prototype.slice.call(r[t]));for(t=0;t<s.length;t++)o.push((65280&s[t].byteLength)>>>8),o.push(255&s[t].byteLength),o=o.concat(Array.prototype.slice.call(s[t]));if(n=[S.avc1,new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,(65280&e.width)>>8,255&e.width,(65280&e.height)>>8,255&e.height,0,72,0,0,0,72,0,0,0,0,0,0,0,1,19,118,105,100,101,111,106,115,45,99,111,110,116,114,105,98,45,104,108,115,0,0,0,0,0,0,0,0,0,0,0,0,0,24,17,17]),i(S.avcC,new Uint8Array([1,e.profileIdc,e.profileCompatibility,e.levelIdc,255].concat([r.length],a,[s.length],o))),i(S.btrt,new Uint8Array([0,28,156,128,0,45,198,192,0,45,198,192]))],e.sarRatio){var c=e.sarRatio[0],l=e.sarRatio[1];n.push(i(S.pasp,new Uint8Array([(4278190080&c)>>24,(16711680&c)>>16,(65280&c)>>8,255&c,(4278190080&l)>>24,(16711680&l)>>16,(65280&l)>>8,255&l])))}return i.apply(null,n)},t=function(e){return i(S.mp4a,new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,(65280&e.channelcount)>>8,255&e.channelcount,(65280&e.samplesize)>>8,255&e.samplesize,0,0,0,0,(65280&e.samplerate)>>8,255&e.samplerate,0,0]),s(e))}}(),g=function(e){var t=new Uint8Array([0,0,0,7,0,0,0,0,0,0,0,0,(4278190080&e.id)>>24,(16711680&e.id)>>16,(65280&e.id)>>8,255&e.id,0,0,0,0,(4278190080&e.duration)>>24,(16711680&e.duration)>>16,(65280&e.duration)>>8,255&e.duration,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,(65280&e.width)>>8,255&e.width,0,0,(65280&e.height)>>8,255&e.height,0,0]);return i(S.tkhd,t)},x=function(e){var t,n,r,s,a,o;return t=i(S.tfhd,new Uint8Array([0,0,0,58,(4278190080&e.id)>>24,(16711680&e.id)>>16,(65280&e.id)>>8,255&e.id,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0])),a=Math.floor(e.baseMediaDecodeTime/q),o=Math.floor(e.baseMediaDecodeTime%q),n=i(S.tfdt,new Uint8Array([1,0,0,0,a>>>24&255,a>>>16&255,a>>>8&255,255&a,o>>>24&255,o>>>16&255,o>>>8&255,255&o])),92,"audio"===e.type?(r=T(e,92),i(S.traf,t,n,r)):(s=j(e),r=T(e,s.length+92),i(S.traf,t,n,r,s))},m=function(e){return e.duration=e.duration||4294967295,i(S.trak,g(e),f(e))},O=function(e){var t=new Uint8Array([0,0,0,0,(4278190080&e.id)>>24,(16711680&e.id)>>16,(65280&e.id)>>8,255&e.id,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,1]);return"video"!==e.type&&(t[t.length-1]=0),i(S.trex,t)},function(){var e,t,n;n=function(e,t){var n=0,i=0,r=0,s=0;return e.length&&(void 0!==e[0].duration&&(n=1),void 0!==e[0].size&&(i=2),void 0!==e[0].flags&&(r=4),void 0!==e[0].compositionTimeOffset&&(s=8)),[0,0,n|i|r|s,1,(4278190080&e.length)>>>24,(16711680&e.length)>>>16,(65280&e.length)>>>8,255&e.length,(4278190080&t)>>>24,(16711680&t)>>>16,(65280&t)>>>8,255&t]},t=function(e,t){var r,s,a,o,c,l;for(t+=20+16*(o=e.samples||[]).length,a=n(o,t),(s=new Uint8Array(a.length+16*o.length)).set(a),r=a.length,l=0;l<o.length;l++)c=o[l],s[r++]=(4278190080&c.duration)>>>24,s[r++]=(16711680&c.duration)>>>16,s[r++]=(65280&c.duration)>>>8,s[r++]=255&c.duration,s[r++]=(4278190080&c.size)>>>24,s[r++]=(16711680&c.size)>>>16,s[r++]=(65280&c.size)>>>8,s[r++]=255&c.size,s[r++]=c.flags.isLeading<<2|c.flags.dependsOn,s[r++]=c.flags.isDependedOn<<6|c.flags.hasRedundancy<<4|c.flags.paddingValue<<1|c.flags.isNonSyncSample,s[r++]=61440&c.flags.degradationPriority,s[r++]=15&c.flags.degradationPriority,s[r++]=(4278190080&c.compositionTimeOffset)>>>24,s[r++]=(16711680&c.compositionTimeOffset)>>>16,s[r++]=(65280&c.compositionTimeOffset)>>>8,s[r++]=255&c.compositionTimeOffset;return i(S.trun,s)},e=function(e,t){var r,s,a,o,c,l;
vendor: 8,571 bytes, line 2
2for(t+=20+8*(o=e.samples||[]).length,a=n(o,t),(r=new Uint8Array(a.length+8*o.length)).set(a),s=a.length,l=0;l<o.length;l++)c=o[l],r[s++]=(4278190080&c.duration)>>>24,r[s++]=(16711680&c.duration)>>>16,r[s++]=(65280&c.duration)>>>8,r[s++]=255&c.duration,r[s++]=(4278190080&c.size)>>>24,r[s++]=(16711680&c.size)>>>16,r[s++]=(65280&c.size)>>>8,r[s++]=255&c.size;return i(S.trun,r)},T=function(n,i){return"audio"===n.type?e(n,i):t(n,i)}}();var H,V,W,G,X,Y,K,Q,Z={ftyp:a,mdat:o,moof:d,moov:u,initSegment:function(e){var t,n=a(),i=u(e);return(t=new Uint8Array(n.byteLength+i.byteLength)).set(n),t.set(i,n.byteLength),t}},J=function(e,t){var n={size:0,flags:{isLeading:0,dependsOn:1,isDependedOn:0,hasRedundancy:0,degradationPriority:0,isNonSyncSample:1}};return n.dataOffset=t,n.compositionTimeOffset=e.pts-e.dts,n.duration=e.duration,n.size=4*e.length,n.size+=e.byteLength,e.keyFrame&&(n.flags.dependsOn=2,n.flags.isNonSyncSample=0),n},$={groupNalsIntoFrames:function(e){var t,n,i=[],r=[];for(r.byteLength=0,r.nalCount=0,r.duration=0,i.byteLength=0,t=0;t<e.length;t++)"access_unit_delimiter_rbsp"===(n=e[t]).nalUnitType?(i.length&&(i.duration=n.dts-i.dts,r.byteLength+=i.byteLength,r.nalCount+=i.length,r.duration+=i.duration,r.push(i)),(i=[n]).byteLength=n.data.byteLength,i.pts=n.pts,i.dts=n.dts):("slice_layer_without_partitioning_rbsp_idr"===n.nalUnitType&&(i.keyFrame=!0),i.duration=n.dts-i.dts,i.byteLength+=n.data.byteLength,i.push(n));return r.length&&(!i.duration||i.duration<=0)&&(i.duration=r[r.length-1].duration),r.byteLength+=i.byteLength,r.nalCount+=i.length,r.duration+=i.duration,r.push(i),r},groupFramesIntoGops:function(e){var t,n,i=[],r=[];for(i.byteLength=0,i.nalCount=0,i.duration=0,i.pts=e[0].pts,i.dts=e[0].dts,r.byteLength=0,r.nalCount=0,r.duration=0,r.pts=e[0].pts,r.dts=e[0].dts,t=0;t<e.length;t++)(n=e[t]).keyFrame?(i.length&&(r.push(i),r.byteLength+=i.byteLength,r.nalCount+=i.nalCount,r.duration+=i.duration),(i=[n]).nalCount=n.length,i.byteLength=n.byteLength,i.pts=n.pts,i.dts=n.dts,i.duration=n.duration):(i.duration+=n.duration,i.nalCount+=n.length,i.byteLength+=n.byteLength,i.push(n));return r.length&&i.duration<=0&&(i.duration=r[r.length-1].duration),r.byteLength+=i.byteLength,r.nalCount+=i.nalCount,r.duration+=i.duration,r.push(i),r},extendFirstKeyFrame:function(e){var t;return!e[0][0].keyFrame&&e.length>1&&(t=e.shift(),e.byteLength-=t.byteLength,e.nalCount-=t.nalCount,e[0][0].dts=t.dts,e[0][0].pts=t.pts,e[0][0].duration+=t.duration),e},generateSampleTable:function(e,t){var n,i,r,s,a,o=t||0,c=[];for(n=0;n<e.length;n++)for(s=e[n],i=0;i<s.length;i++)a=s[i],o+=(r=J(a,o)).size,c.push(r);return c},concatenateNalData:function(e){var t,n,i,r,s,a,o=0,c=e.byteLength,l=e.nalCount,d=new Uint8Array(c+4*l),u=new DataView(d.buffer);for(t=0;t<e.length;t++)for(r=e[t],n=0;n<r.length;n++)for(s=r[n],i=0;i<s.length;i++)a=s[i],u.setUint32(o,a.data.byteLength),o+=4,d.set(a.data,o),o+=a.data.byteLength;return d},generateSampleTableForFrame:function(e,t){var n,i=[];return n=J(e,t||0),i.push(n),i},concatenateNalDataForFrame:function(e){var t,n,i=0,r=e.byteLength,s=e.length,a=new Uint8Array(r+4*s),o=new DataView(a.buffer);for(t=0;t<e.length;t++)n=e[t],o.setUint32(i,n.data.byteLength),i+=4,a.set(n.data,i),i+=n.data.byteLength;return a}},ee=[33,16,5,32,164,27],te=[33,65,108,84,1,2,4,8,168,2,4,8,17,191,252],ne=function(e){for(var t=[];e--;)t.push(0);return t},ie=9e4;Y=function(e,t){return V(X(e,t))},K=function(e,t){return W(G(e),t)},Q=function(e,t,n){return G(n?e:e-t)};var re={ONE_SECOND_IN_TS:ie,secondsToVideoTs:V=function(e){return e*ie},secondsToAudioTs:W=function(e,t){return e*t},videoTsToSeconds:G=function(e){return e/ie},audioTsToSeconds:X=function(e,t){return e/t},audioTsToVideoTs:Y,videoTsToAudioTs:K,metadataTsToSeconds:Q},se=function(){if(!H){var e={96e3:[ee,[227,64],ne(154),[56]],88200:[ee,[231],ne(170),[56]],64e3:[ee,[248,192],ne(240),[56]],48e3:[ee,[255,192],ne(268),[55,148,128],ne(54),[112]],44100:[ee,[255,192],ne(268),[55,163,128],ne(84),[112]],32e3:[ee,[255,192],ne(268),[55,234],ne(226),[112]],24e3:[ee,[255,192],ne(268),[55,255,128],ne(268),[111,112],ne(126),[224]],16e3:[ee,[255,192],ne(268),[55,255,128],ne(268),[111,255],ne(269),[223,108],ne(195),[1,192]],12e3:[te,ne(268),[3,127,248],ne(268),[6,255,240],ne(268),[13,255,224],ne(268),[27,253,128],ne(259),[56]],11025:[te,ne(268),[3,127,248],ne(268),[6,255,240],ne(268),[13,255,224],ne(268),[27,255,192],ne(268),[55,175,128],ne(108),[112]],8e3:[te,ne(268),[3,121,16],ne(47),[7]]};t=e,H=Object.keys(t).reduce((function(e,n){return e[n]=new Uint8Array(t[n].reduce((function(e,t){return e.concat(t)}),[])),e}),{})}var t;return H},ae=re,oe={prefixWithSilence:function(e,t,n,i){var r,s,a,o,c,l=0,d=0,u=0;if(t.length&&(r=ae.audioTsToVideoTs(e.baseMediaDecodeTime,e.samplerate),s=Math.ceil(ae.ONE_SECOND_IN_TS/(e.samplerate/1024)),n&&i&&(l=r-Math.max(n,i),u=(d=Math.floor(l/s))*s),!(d<1||u>ae.ONE_SECOND_IN_TS/2))){for((a=se()[e.samplerate])||(a=t[0].data),o=0;o<d;o++)c=t[0],t.splice(0,0,{data:a,dts:c.dts-s,pts:c.pts-s});return e.baseMediaDecodeTime-=Math.floor(ae.videoTsToAudioTs(u,e.samplerate)),u}},trimAdtsFramesByEarliestDts:function(e,t,n){return t.minSegmentDts>=n?e:(t.minSegmentDts=1/0,e.filter((function(e){return e.dts>=n&&(t.minSegmentDts=Math.min(t.minSegmentDts,e.dts),t.minSegmentPts=t.minSegmentDts,!0)})))},generateSampleTable:function(e){var t,n,i=[];for(t=0;t<e.length;t++)n=e[t],i.push({size:n.data.byteLength,duration:1024});return i},concatenateFrameData:function(e){var t,n,i=0,r=new Uint8Array(function(e){var t,n=0;for(t=0;t<e.length;t++)n+=e[t].data.byteLength;return n}(e));for(t=0;t<e.length;t++)n=e[t],r.set(n.data,i),i+=n.data.byteLength;return r}},ce=re.ONE_SECOND_IN_TS,le={clearDtsInfo:function(e){delete e.minSegmentDts,delete e.maxSegmentDts,delete e.minSegmentPts,delete e.maxSegmentPts},calculateTrackBaseMediaDecodeTime:function(e,t){var n,i=e.minSegmentDts;return t||(i-=e.timelineStartInfo.dts),n=e.timelineStartInfo.baseMediaDecodeTime,n+=i,n=Math.max(0,n),"audio"===e.type&&(n*=e.samplerate/ce,n=Math.floor(n)),n},collectDtsInfo:function(e,t){"number"===typeof t.pts&&(void 0===e.timelineStartInfo.pts&&(e.timelineStartInfo.pts=t.pts),void 0===e.minSegmentPts?e.minSegmentPts=t.pts:e.minSegmentPts=Math.min(e.minSegmentPts,t.pts),void 0===e.maxSegmentPts?e.maxSegmentPts=t.pts:e.maxSegmentPts=Math.max(e.maxSegmentPts,t.pts)),"number"===typeof t.dts&&(void 0===e.timelineStartInfo.dts&&(e.timelineStartInfo.dts=t.dts),void 0===e.minSegmentDts?e.minSegmentDts=t.dts:e.minSegmentDts=Math.min(e.minSegmentDts,t.dts),void 0===e.maxSegmentDts?e.maxSegmentDts=t.dts:e.maxSegmentDts=Math.max(e.maxSegmentDts,t.dts))}},de={parseSei:function(e){for(var t=0,n={payloadType:-1,payloadSize:0},i=0,r=0;t<e.byteLength&&128!==e[t];){for(;255===e[t];)i+=255,t++;for(i+=e[t++];255===e[t];)r+=255,t++;if(r+=e[t++],!n.payload&&4===i){if("GA94"===String.fromCharCode(e[t+3],e[t+4],e[t+5],e[t+6])){n.payloadType=i,n.payloadSize=r,n.payload=e.subarray(t,t+r);break}n.payload=void 0}t+=r,i=0,r=0}return n},parseUserData:function(e){return 181!==e.payload[0]||49!==(e.payload[1]<<8|e.payload[2])||"GA94"!==String.fromCharCode(e.payload[3],e.payload[4],e.payload[5],e.payload[6])||3!==e.payload[7]?null:e.payload.subarray(8,e.payload.length-1)},parseCaptionPackets:function(e,t){var n,i,r,s,a=[];if(!(64&t[0]))return a;for(i=31&t[0],n=0;n<i;n++)s={type:3&t[(r=3*n)+2],pts:e},4&t[r+2]&&(s.ccData=t[r+3]<<8|t[r+4],a.push(s));return a},discardEmulationPreventionBytes:function(e){for(var t,n,i=e.byteLength,r=[],s=1;s<i-2;)0===e[s]&&0===e[s+1]&&3===e[s+2]?(r.push(s+2),s+=2):s++;if(0===r.length)return e;t=i-r.length,n=new Uint8Array(t);var a=0;for(s=0;s<t;a++,s++)a===r[0]&&(a++,r.shift()),n[s]=e[a];return n},USER_DATA_REGISTERED_ITU_T_T35:4},ue=U,he=de,pe=function(e){e=e||{},pe.prototype.init.call(this),this.parse708captions_="boolean"!==typeof e.parse708captions||e.parse708captions,this.captionPackets_=[],this.ccStreams_=[new Oe(0,0),new Oe(0,1),new Oe(1,0),new Oe(1,1)],this.parse708captions_&&(this.cc708Stream_=new ye({captionServices:e.captionServices})),this.reset(),this.ccStreams_.forEach((function(e){e.on("data",this.trigger.bind(this,"data")),e.on("partialdone",this.trigger.bind(this,"partialdone")),e.on("done",this.trigger.bind(this,"done"))}),this),this.parse708captions_&&(this.cc708Stream_.on("data",this.trigger.bind(this,"data")),this.cc708Stream_.on("partialdone",this.trigger.bind(this,"partialdone")),this.cc708Stream_.on("done",this.trigger.bind(this,"done")))};pe.prototype=new ue,pe.prototype.push=function(e){var t,n,i;
vendor: 4,462 bytes, line 2
2if("sei_rbsp"===e.nalUnitType&&(t=he.parseSei(e.escapedRBSP)).payload&&t.payloadType===he.USER_DATA_REGISTERED_ITU_T_T35&&(n=he.parseUserData(t)))if(e.dts<this.latestDts_)this.ignoreNextEqualDts_=!0;else{if(e.dts===this.latestDts_&&this.ignoreNextEqualDts_)return this.numSameDts_--,void(this.numSameDts_||(this.ignoreNextEqualDts_=!1));i=he.parseCaptionPackets(e.pts,n),this.captionPackets_=this.captionPackets_.concat(i),this.latestDts_!==e.dts&&(this.numSameDts_=0),this.numSameDts_++,this.latestDts_=e.dts}},pe.prototype.flushCCStreams=function(e){this.ccStreams_.forEach((function(t){return"flush"===e?t.flush():t.partialFlush()}),this)},pe.prototype.flushStream=function(e){this.captionPackets_.length?(this.captionPackets_.forEach((function(e,t){e.presortIndex=t})),this.captionPackets_.sort((function(e,t){return e.pts===t.pts?e.presortIndex-t.presortIndex:e.pts-t.pts})),this.captionPackets_.forEach((function(e){e.type<2?this.dispatchCea608Packet(e):this.dispatchCea708Packet(e)}),this),this.captionPackets_.length=0,this.flushCCStreams(e)):this.flushCCStreams(e)},pe.prototype.flush=function(){return this.flushStream("flush")},pe.prototype.partialFlush=function(){return this.flushStream("partialFlush")},pe.prototype.reset=function(){this.latestDts_=null,this.ignoreNextEqualDts_=!1,this.numSameDts_=0,this.activeCea608Channel_=[null,null],this.ccStreams_.forEach((function(e){e.reset()}))},pe.prototype.dispatchCea608Packet=function(e){this.setsTextOrXDSActive(e)?this.activeCea608Channel_[e.type]=null:this.setsChannel1Active(e)?this.activeCea608Channel_[e.type]=0:this.setsChannel2Active(e)&&(this.activeCea608Channel_[e.type]=1),null!==this.activeCea608Channel_[e.type]&&this.ccStreams_[(e.type<<1)+this.activeCea608Channel_[e.type]].push(e)},pe.prototype.setsChannel1Active=function(e){return 4096===(30720&e.ccData)},pe.prototype.setsChannel2Active=function(e){return 6144===(30720&e.ccData)},pe.prototype.setsTextOrXDSActive=function(e){return 256===(28928&e.ccData)||4138===(30974&e.ccData)||6186===(30974&e.ccData)},pe.prototype.dispatchCea708Packet=function(e){this.parse708captions_&&this.cc708Stream_.push(e)};var me={127:9834,4128:32,4129:160,4133:8230,4138:352,4140:338,4144:9608,4145:8216,4146:8217,4147:8220,4148:8221,4149:8226,4153:8482,4154:353,4156:339,4157:8480,4159:376,4214:8539,4215:8540,4216:8541,4217:8542,4218:9168,4219:9124,4220:9123,4221:9135,4222:9126,4223:9121,4256:12600},ge=function(e){return 32<=e&&e<=127||160<=e&&e<=255},fe=function(e){this.windowNum=e,this.reset()};fe.prototype.reset=function(){this.clearText(),this.pendingNewLine=!1,this.winAttr={},this.penAttr={},this.penLoc={},this.penColor={},this.visible=0,this.rowLock=0,this.columnLock=0,this.priority=0,this.relativePositioning=0,this.anchorVertical=0,this.anchorHorizontal=0,this.anchorPoint=0,this.rowCount=1,this.virtualRowCount=this.rowCount+1,this.columnCount=41,this.windowStyle=0,this.penStyle=0},fe.prototype.getText=function(){return this.rows.join("\n")},fe.prototype.clearText=function(){this.rows=[""],this.rowIdx=0},fe.prototype.newLine=function(e){for(this.rows.length>=this.virtualRowCount&&"function"===typeof this.beforeRowOverflow&&this.beforeRowOverflow(e),this.rows.length>0&&(this.rows.push(""),this.rowIdx++);this.rows.length>this.virtualRowCount;)this.rows.shift(),this.rowIdx--},fe.prototype.isEmpty=function(){return 0===this.rows.length||1===this.rows.length&&""===this.rows[0]},fe.prototype.addText=function(e){this.rows[this.rowIdx]+=e},fe.prototype.backspace=function(){if(!this.isEmpty()){var e=this.rows[this.rowIdx];this.rows[this.rowIdx]=e.substr(0,e.length-1)}};var be=function(e,t,n){this.serviceNum=e,this.text="",this.currentWindow=new fe(-1),this.windows=[],this.stream=n,"string"===typeof t&&this.createTextDecoder(t)};be.prototype.init=function(e,t){this.startPts=e;for(var n=0;n<8;n++)this.windows[n]=new fe(n),"function"===typeof t&&(this.windows[n].beforeRowOverflow=t)},be.prototype.setCurrentWindow=function(e){this.currentWindow=this.windows[e]},be.prototype.createTextDecoder=function(e){if("undefined"===typeof TextDecoder)this.stream.trigger("log",{level:"warn",message:"The `encoding` option is unsupported without TextDecoder support"});else try{this.textDecoder_=new TextDecoder(e)}catch(t){this.stream.trigger("log",{level:"warn",message:"TextDecoder could not be created with "+e+" encoding. "+t})}};var ye=function(e){e=e||{},ye.prototype.init.call(this);var t,n=this,i=e.captionServices||{},r={};
vendor: 12,977 bytes, line 2
2Object.keys(i).forEach((e=>{t=i[e],/^SERVICE/.test(e)&&(r[e]=t.encoding)})),this.serviceEncodings=r,this.current708Packet=null,this.services={},this.push=function(e){3===e.type?(n.new708Packet(),n.add708Bytes(e)):(null===n.current708Packet&&n.new708Packet(),n.add708Bytes(e))}};ye.prototype=new ue,ye.prototype.new708Packet=function(){null!==this.current708Packet&&this.push708Packet(),this.current708Packet={data:[],ptsVals:[]}},ye.prototype.add708Bytes=function(e){var t=e.ccData,n=t>>>8,i=255&t;this.current708Packet.ptsVals.push(e.pts),this.current708Packet.data.push(n),this.current708Packet.data.push(i)},ye.prototype.push708Packet=function(){var e=this.current708Packet,t=e.data,n=null,i=null,r=0,s=t[r++];for(e.seq=s>>6,e.sizeCode=63&s;r<t.length;r++)i=31&(s=t[r++]),7===(n=s>>5)&&i>0&&(n=s=t[r++]),this.pushServiceBlock(n,r,i),i>0&&(r+=i-1)},ye.prototype.pushServiceBlock=function(e,t,n){var i,r=t,s=this.current708Packet.data,a=this.services[e];for(a||(a=this.initService(e,r));r<t+n&&r<s.length;r++)i=s[r],ge(i)?r=this.handleText(r,a):24===i?r=this.multiByteCharacter(r,a):16===i?r=this.extendedCommands(r,a):128<=i&&i<=135?r=this.setCurrentWindow(r,a):152<=i&&i<=159?r=this.defineWindow(r,a):136===i?r=this.clearWindows(r,a):140===i?r=this.deleteWindows(r,a):137===i?r=this.displayWindows(r,a):138===i?r=this.hideWindows(r,a):139===i?r=this.toggleWindows(r,a):151===i?r=this.setWindowAttributes(r,a):144===i?r=this.setPenAttributes(r,a):145===i?r=this.setPenColor(r,a):146===i?r=this.setPenLocation(r,a):143===i?a=this.reset(r,a):8===i?a.currentWindow.backspace():12===i?a.currentWindow.clearText():13===i?a.currentWindow.pendingNewLine=!0:14===i?a.currentWindow.clearText():141===i&&r++},ye.prototype.extendedCommands=function(e,t){var n=this.current708Packet.data[++e];return ge(n)&&(e=this.handleText(e,t,{isExtended:!0})),e},ye.prototype.getPts=function(e){return this.current708Packet.ptsVals[Math.floor(e/2)]},ye.prototype.initService=function(e,t){var n,i,r=this;return(n="SERVICE"+e)in this.serviceEncodings&&(i=this.serviceEncodings[n]),this.services[e]=new be(e,i,r),this.services[e].init(this.getPts(t),(function(t){r.flushDisplayed(t,r.services[e])})),this.services[e]},ye.prototype.handleText=function(e,t,n){var i,r,s=n&&n.isExtended,a=n&&n.isMultiByte,o=this.current708Packet.data,c=s?4096:0,l=o[e],d=o[e+1],u=t.currentWindow;if(a?(r=[l,d],e++):r=[l],t.textDecoder_&&!s)i=t.textDecoder_.decode(new Uint8Array(r));else if(a){const e=r.map((e=>("0"+(255&e).toString(16)).slice(-2))).join("");i=String.fromCharCode(parseInt(e,16))}else i=function(e){var t=me[e]||e;return 4096&e&&e===t?"":String.fromCharCode(t)}(c|l);return u.pendingNewLine&&!u.isEmpty()&&u.newLine(this.getPts(e)),u.pendingNewLine=!1,u.addText(i),e},ye.prototype.multiByteCharacter=function(e,t){var n=this.current708Packet.data,i=n[e+1],r=n[e+2];return ge(i)&&ge(r)&&(e=this.handleText(++e,t,{isMultiByte:!0})),e},ye.prototype.setCurrentWindow=function(e,t){var n=7&this.current708Packet.data[e];return t.setCurrentWindow(n),e},ye.prototype.defineWindow=function(e,t){var n=this.current708Packet.data,i=n[e],r=7&i;t.setCurrentWindow(r);var s=t.currentWindow;return i=n[++e],s.visible=(32&i)>>5,s.rowLock=(16&i)>>4,s.columnLock=(8&i)>>3,s.priority=7&i,i=n[++e],s.relativePositioning=(128&i)>>7,s.anchorVertical=127&i,i=n[++e],s.anchorHorizontal=i,i=n[++e],s.anchorPoint=(240&i)>>4,s.rowCount=15&i,i=n[++e],s.columnCount=63&i,i=n[++e],s.windowStyle=(56&i)>>3,s.penStyle=7&i,s.virtualRowCount=s.rowCount+1,e},ye.prototype.setWindowAttributes=function(e,t){var n=this.current708Packet.data,i=n[e],r=t.currentWindow.winAttr;return i=n[++e],r.fillOpacity=(192&i)>>6,r.fillRed=(48&i)>>4,r.fillGreen=(12&i)>>2,r.fillBlue=3&i,i=n[++e],r.borderType=(192&i)>>6,r.borderRed=(48&i)>>4,r.borderGreen=(12&i)>>2,r.borderBlue=3&i,i=n[++e],r.borderType+=(128&i)>>5,r.wordWrap=(64&i)>>6,r.printDirection=(48&i)>>4,r.scrollDirection=(12&i)>>2,r.justify=3&i,i=n[++e],r.effectSpeed=(240&i)>>4,r.effectDirection=(12&i)>>2,r.displayEffect=3&i,e},ye.prototype.flushDisplayed=function(e,t){for(var n=[],i=0;i<8;i++)t.windows[i].visible&&!t.windows[i].isEmpty()&&n.push(t.windows[i].getText());t.endPts=e,t.text=n.join("\n\n"),this.pushCaption(t),t.startPts=e},ye.prototype.pushCaption=function(e){""!==e.text&&(this.trigger("data",{startPts:e.startPts,endPts:e.endPts,text:e.text,stream:"cc708_"+e.serviceNum}),e.text="",e.startPts=e.endPts)},ye.prototype.displayWindows=function(e,t){var n=this.current708Packet.data[++e],i=this.getPts(e);this.flushDisplayed(i,t);for(var r=0;r<8;r++)n&1<<r&&(t.windows[r].visible=1);return e},ye.prototype.hideWindows=function(e,t){var n=this.current708Packet.data[++e],i=this.getPts(e);this.flushDisplayed(i,t);for(var r=0;r<8;r++)n&1<<r&&(t.windows[r].visible=0);return e},ye.prototype.toggleWindows=function(e,t){var n=this.current708Packet.data[++e],i=this.getPts(e);this.flushDisplayed(i,t);for(var r=0;r<8;r++)n&1<<r&&(t.windows[r].visible^=1);return e},ye.prototype.clearWindows=function(e,t){var n=this.current708Packet.data[++e],i=this.getPts(e);this.flushDisplayed(i,t);for(var r=0;r<8;r++)n&1<<r&&t.windows[r].clearText();return e},ye.prototype.deleteWindows=function(e,t){var n=this.current708Packet.data[++e],i=this.getPts(e);this.flushDisplayed(i,t);for(var r=0;r<8;r++)n&1<<r&&t.windows[r].reset();return e},ye.prototype.setPenAttributes=function(e,t){var n=this.current708Packet.data,i=n[e],r=t.currentWindow.penAttr;return i=n[++e],r.textTag=(240&i)>>4,r.offset=(12&i)>>2,r.penSize=3&i,i=n[++e],r.italics=(128&i)>>7,r.underline=(64&i)>>6,r.edgeType=(56&i)>>3,r.fontStyle=7&i,e},ye.prototype.setPenColor=function(e,t){var n=this.current708Packet.data,i=n[e],r=t.currentWindow.penColor;return i=n[++e],r.fgOpacity=(192&i)>>6,r.fgRed=(48&i)>>4,r.fgGreen=(12&i)>>2,r.fgBlue=3&i,i=n[++e],r.bgOpacity=(192&i)>>6,r.bgRed=(48&i)>>4,r.bgGreen=(12&i)>>2,r.bgBlue=3&i,i=n[++e],r.edgeRed=(48&i)>>4,r.edgeGreen=(12&i)>>2,r.edgeBlue=3&i,e},ye.prototype.setPenLocation=function(e,t){var n=this.current708Packet.data,i=n[e],r=t.currentWindow.penLoc;return t.currentWindow.pendingNewLine=!0,i=n[++e],r.row=15&i,i=n[++e],r.column=63&i,e},ye.prototype.reset=function(e,t){var n=this.getPts(e);return this.flushDisplayed(n,t),this.initService(t.serviceNum,e)};var je={42:225,92:233,94:237,95:243,96:250,123:231,124:247,125:209,126:241,127:9608,304:174,305:176,306:189,307:191,308:8482,309:162,310:163,311:9834,312:224,313:160,314:232,315:226,316:234,317:238,318:244,319:251,544:193,545:201,546:211,547:218,548:220,549:252,550:8216,551:161,552:42,553:39,554:8212,555:169,556:8480,557:8226,558:8220,559:8221,560:192,561:194,562:199,563:200,564:202,565:203,566:235,567:206,568:207,569:239,570:212,571:217,572:249,573:219,574:171,575:187,800:195,801:227,802:205,803:204,804:236,805:210,806:242,807:213,808:245,809:123,810:125,811:92,812:94,813:95,814:124,815:126,816:196,817:228,818:214,819:246,820:223,821:165,822:164,823:9474,824:197,825:229,826:216,827:248,828:9484,829:9488,830:9492,831:9496},_e=function(e){return null===e?"":(e=je[e]||e,String.fromCharCode(e))},ve=[4352,4384,4608,4640,5376,5408,5632,5664,5888,5920,4096,4864,4896,5120,5152],xe=function(){for(var e=[],t=15;t--;)e.push({text:"",indent:0,offset:0});return e},Oe=function(e,t){Oe.prototype.init.call(this),this.field_=e||0,this.dataChannel_=t||0,this.name_="CC"+(1+(this.field_<<1|this.dataChannel_)),this.setConstants(),this.reset(),this.push=function(e){var t,n,i,r,s;if((t=32639&e.ccData)!==this.lastControlCode_){if(4096===(61440&t)?this.lastControlCode_=t:t!==this.PADDING_&&(this.lastControlCode_=null),i=t>>>8,r=255&t,t!==this.PADDING_)if(t===this.RESUME_CAPTION_LOADING_)this.mode_="popOn";else if(t===this.END_OF_CAPTION_)this.mode_="popOn",this.clearFormatting(e.pts),this.flushDisplayed(e.pts),n=this.displayed_,this.displayed_=this.nonDisplayed_,this.nonDisplayed_=n,this.startPts_=e.pts;else if(t===this.ROLL_UP_2_ROWS_)this.rollUpRows_=2,this.setRollUp(e.pts);else if(t===this.ROLL_UP_3_ROWS_)this.rollUpRows_=3,this.setRollUp(e.pts);else if(t===this.ROLL_UP_4_ROWS_)this.rollUpRows_=4,this.setRollUp(e.pts);else if(t===this.CARRIAGE_RETURN_)this.clearFormatting(e.pts),this.flushDisplayed(e.pts),this.shiftRowsUp_(),this.startPts_=e.pts;else if(t===this.BACKSPACE_)"popOn"===this.mode_?this.nonDisplayed_[this.row_].text=this.nonDisplayed_[this.row_].text.slice(0,-1):this.displayed_[this.row_].text=this.displayed_[this.row_].text.slice(0,-1);else if(t===this.ERASE_DISPLAYED_MEMORY_)this.flushDisplayed(e.pts),this.displayed_=xe();else if(t===this.ERASE_NON_DISPLAYED_MEMORY_)this.nonDisplayed_=xe();else if(t===this.RESUME_DIRECT_CAPTIONING_)"paintOn"!==this.mode_&&(this.flushDisplayed(e.pts),this.displayed_=xe()),this.mode_="paintOn",this.startPts_=e.pts;else if(this.isSpecialCharacter(i,r))s=_e((i=(3&i)<<8)|r),this[this.mode_](e.pts,s),this.column_++;else if(this.isExtCharacter(i,r))"popOn"===this.mode_?this.nonDisplayed_[this.row_].text=this.nonDisplayed_[this.row_].text.slice(0,-1):this.displayed_[this.row_].text=this.displayed_[this.row_].text.slice(0,-1),s=_e((i=(3&i)<<8)|r),this[this.mode_](e.pts,s),this.column_++;else if(this.isMidRowCode(i,r))this.clearFormatting(e.pts),this[this.mode_](e.pts," "),this.column_++,14===(14&r)&&this.addFormatting(e.pts,["i"]),1===(1&r)&&this.addFormatting(e.pts,["u"]);else if(this.isOffsetControlCode(i,r)){const e=3&r;this.nonDisplayed_[this.row_].offset=e,this.column_+=e}else if(this.isPAC(i,r)){var a=ve.indexOf(7968&t);if("rollUp"===this.mode_&&(a-this.rollUpRows_+1<0&&(a=this.rollUpRows_-1),this.setRollUp(e.pts,a)),a!==this.row_&&a>=0&&a<=14&&(this.clearFormatting(e.pts),this.row_=a),1&r&&-1===this.formatting_.indexOf("u")&&this.addFormatting(e.pts,["u"]),16===(16&t)){const e=(14&t)>>1;this.column_=4*e,this.nonDisplayed_[this.row_].indent+=e}this.isColorPAC(r)&&14===(14&r)&&this.addFormatting(e.pts,["i"])}else this.isNormalChar(i)&&(0===r&&(r=null),s=_e(i),s+=_e(r),this[this.mode_](e.pts,s),this.column_+=s.length)}else this.lastControlCode_=null}};Oe.prototype=new ue,Oe.prototype.flushDisplayed=function(e){const t=e=>{this.trigger("log",{level:"warn",message:"Skipping a malformed 608 caption at index "+e+"."})},n=[];this.displayed_.forEach(((e,i)=>{if(e&&e.text&&e.text.length){try{e.text=e.text.trim()}catch(r){t(i)}e.text.length&&n.push({text:e.text,line:i+1,position:10+Math.min(70,10*e.indent)+2.5*e.offset})}else void 0!==e&&null!==e||t(i)})),n.length&&this.trigger("data",{startPts:this.startPts_,endPts:e,content:n,stream:this.name_})},Oe.prototype.reset=function(){this.mode_="popOn",this.topRow_=0,this.startPts_=0,this.displayed_=xe(),this.nonDisplayed_=xe(),this.lastControlCode_=null,this.column_=0,this.row_=14,this.rollUpRows_=2,this.formatting_=[]},Oe.prototype.setConstants=function(){0===this.dataChannel_?(this.BASE_=16,this.EXT_=17,this.CONTROL_=(20|this.field_)<<8,this.OFFSET_=23):1===this.dataChannel_&&(this.BASE_=24,this.EXT_=25,this.CONTROL_=(28|this.field_)<<8,this.OFFSET_=31),this.PADDING_=0,this.RESUME_CAPTION_LOADING_=32|this.CONTROL_,this.END_OF_CAPTION_=47|this.CONTROL_,this.ROLL_UP_2_ROWS_=37|this.CONTROL_,this.ROLL_UP_3_ROWS_=38|this.CONTROL_,this.ROLL_UP_4_ROWS_=39|this.CONTROL_,this.CARRIAGE_RETURN_=45|this.CONTROL_,this.RESUME_DIRECT_CAPTIONING_=41|this.CONTROL_,this.BACKSPACE_=33|this.CONTROL_,this.ERASE_DISPLAYED_MEMORY_=44|this.CONTROL_,this.ERASE_NON_DISPLAYED_MEMORY_=46|this.CONTROL_},Oe.prototype.isSpecialCharacter=function(e,t){return e===this.EXT_&&t>=48&&t<=63},Oe.prototype.isExtCharacter=function(e,t){return(e===this.EXT_+1||e===this.EXT_+2)&&t>=32&&t<=63},Oe.prototype.isMidRowCode=function(e,t){return e===this.EXT_&&t>=32&&t<=47},Oe.prototype.isOffsetControlCode=function(e,t){return e===this.OFFSET_&&t>=33&&t<=35},Oe.prototype.isPAC=function(e,t){return e>=this.BASE_&&e<this.BASE_+8&&t>=64&&t<=127},Oe.prototype.isColorPAC=function(e){return e>=64&&e<=79||e>=96&&e<=127},Oe.prototype.isNormalChar=function(e){return e>=32&&e<=127},Oe.prototype.setRollUp=function(e,t){if("rollUp"!==this.mode_&&(this.row_=14,this.mode_="rollUp",this.flushDisplayed(e),this.nonDisplayed_=xe(),this.displayed_=xe()),void 0!==t&&t!==this.row_)for(var n=0;n<this.rollUpRows_;n++)this.displayed_[t-n]=this.displayed_[this.row_-n],this.displayed_[this.row_-n]={text:"",indent:0,offset:0};void 0===t&&(t=this.row_),this.topRow_=t-this.rollUpRows_+1},Oe.prototype.addFormatting=function(e,t){this.formatting_=this.formatting_.concat(t);var n=t.reduce((function(e,t){return e+"<"+t+">"}),"");this[this.mode_](e,n)},Oe.prototype.clearFormatting=function(e){if(this.formatting_.length){var t=this.formatting_.reverse().reduce((function(e,t){return e+"</"+t+">"}),"");this.formatting_=[],this[this.mode_](e,t)}},Oe.prototype.popOn=function(e,t){var n=this.nonDisplayed_[this.row_].text;n+=t,this.nonDisplayed_[this.row_].text=n},Oe.prototype.rollUp=function(e,t){var n=this.displayed_[this.row_].text;n+=t,this.displayed_[this.row_].text=n},Oe.prototype.shiftRowsUp_=function(){var e;
vendor: 6,736 bytes, line 2
2for(e=0;e<this.topRow_;e++)this.displayed_[e]={text:"",indent:0,offset:0};for(e=this.row_+1;e<15;e++)this.displayed_[e]={text:"",indent:0,offset:0};for(e=this.topRow_;e<this.row_;e++)this.displayed_[e]=this.displayed_[e+1];this.displayed_[this.row_]={text:"",indent:0,offset:0}},Oe.prototype.paintOn=function(e,t){var n=this.displayed_[this.row_].text;n+=t,this.displayed_[this.row_].text=n};var Te={CaptionStream:pe,Cea608Stream:Oe,Cea708Stream:ye},Se={H264_STREAM_TYPE:27,ADTS_STREAM_TYPE:15,METADATA_STREAM_TYPE:21},we=U,Ae="shared",ke=function(e,t){var n=1;for(e>t&&(n=-1);Math.abs(t-e)>4294967296;)e+=8589934592*n;return e},Ce=function(e){var t,n;Ce.prototype.init.call(this),this.type_=e||Ae,this.push=function(e){"metadata"!==e.type?this.type_!==Ae&&e.type!==this.type_||(void 0===n&&(n=e.dts),e.dts=ke(e.dts,n),e.pts=ke(e.pts,n),t=e.dts,this.trigger("data",e)):this.trigger("data",e)},this.flush=function(){n=t,this.trigger("done")},this.endTimeline=function(){this.flush(),this.trigger("endedtimeline")},this.discontinuity=function(){n=void 0,t=void 0},this.reset=function(){this.discontinuity(),this.trigger("reset")}};Ce.prototype=new we;var Ee,Ie={TimestampRolloverStream:Ce,handleRollover:ke},De=(e,t,n)=>{if(!e)return-1;for(var i=n;i<e.length;i++)if(e[i]===t)return i;return-1},Pe=De,Re=3,Le=function(e,t,n){var i,r="";for(i=t;i<n;i++)r+="%"+("00"+e[i].toString(16)).slice(-2);return r},Me=function(e,t,n){return decodeURIComponent(Le(e,t,n))},Ne=function(e,t,n){return unescape(Le(e,t,n))},Be=function(e){return e[0]<<21|e[1]<<14|e[2]<<7|e[3]},Ue={APIC:function(e){var t,n,i=1;e.data[0]===Re&&((t=Pe(e.data,0,i))<0||(e.mimeType=Ne(e.data,i,t),i=t+1,e.pictureType=e.data[i],i++,(n=Pe(e.data,0,i))<0||(e.description=Me(e.data,i,n),i=n+1,"--\x3e"===e.mimeType?e.url=Ne(e.data,i,e.data.length):e.pictureData=e.data.subarray(i,e.data.length))))},"T*":function(e){e.data[0]===Re&&(e.value=Me(e.data,1,e.data.length).replace(/\0*$/,""),e.values=e.value.split("\0"))},TXXX:function(e){var t;e.data[0]===Re&&-1!==(t=Pe(e.data,0,1))&&(e.description=Me(e.data,1,t),e.value=Me(e.data,t+1,e.data.length).replace(/\0*$/,""),e.data=e.value)},"W*":function(e){e.url=Ne(e.data,0,e.data.length).replace(/\0.*$/,"")},WXXX:function(e){var t;e.data[0]===Re&&-1!==(t=Pe(e.data,0,1))&&(e.description=Me(e.data,1,t),e.url=Ne(e.data,t+1,e.data.length).replace(/\0.*$/,""))},PRIV:function(e){var t;for(t=0;t<e.data.length;t++)if(0===e.data[t]){e.owner=Ne(e.data,0,t);break}e.privateData=e.data.subarray(t+1),e.data=e.privateData}},Fe={parseId3Frames:function(e){var t,n=10,i=0,r=[];if(!(e.length<10||e[0]!=="I".charCodeAt(0)||e[1]!=="D".charCodeAt(0)||e[2]!=="3".charCodeAt(0))){i=Be(e.subarray(6,10)),i+=10,64&e[5]&&(n+=4,n+=Be(e.subarray(10,14)),i-=Be(e.subarray(16,20)));do{if((t=Be(e.subarray(n+4,n+8)))<1)break;var s={id:String.fromCharCode(e[n],e[n+1],e[n+2],e[n+3]),data:e.subarray(n+10,n+t+10)};s.key=s.id,Ue[s.id]?Ue[s.id](s):"T"===s.id[0]?Ue["T*"](s):"W"===s.id[0]&&Ue["W*"](s),r.push(s),n+=10,n+=t}while(n<i);return r}},parseSyncSafeInteger:Be,frameParsers:Ue},ze=Se,qe=Fe;(Ee=function(e){var t,n={descriptor:e&&e.descriptor},i=0,r=[],s=0;if(Ee.prototype.init.call(this),this.dispatchType=ze.METADATA_STREAM_TYPE.toString(16),n.descriptor)for(t=0;t<n.descriptor.length;t++)this.dispatchType+=("00"+n.descriptor[t].toString(16)).slice(-2);this.push=function(e){var t,n,a,o,c;if("timed-metadata"===e.type)if(e.dataAlignmentIndicator&&(s=0,r.length=0),0===r.length&&(e.data.length<10||e.data[0]!=="I".charCodeAt(0)||e.data[1]!=="D".charCodeAt(0)||e.data[2]!=="3".charCodeAt(0)))this.trigger("log",{level:"warn",message:"Skipping unrecognized metadata packet"});else if(r.push(e),s+=e.data.byteLength,1===r.length&&(i=qe.parseSyncSafeInteger(e.data.subarray(6,10)),i+=10),!(s<i)){for(t={data:new Uint8Array(i),frames:[],pts:r[0].pts,dts:r[0].dts},c=0;c<i;)t.data.set(r[0].data.subarray(0,i-c),c),c+=r[0].data.byteLength,s-=r[0].data.byteLength,r.shift();n=10,64&t.data[5]&&(n+=4,n+=qe.parseSyncSafeInteger(t.data.subarray(10,14)),i-=qe.parseSyncSafeInteger(t.data.subarray(16,20)));do{if((a=qe.parseSyncSafeInteger(t.data.subarray(n+4,n+8)))<1){this.trigger("log",{level:"warn",message:"Malformed ID3 frame encountered. Skipping remaining metadata parsing."});break}if((o={id:String.fromCharCode(t.data[n],t.data[n+1],t.data[n+2],t.data[n+3]),data:t.data.subarray(n+10,n+a+10)}).key=o.id,qe.frameParsers[o.id]?qe.frameParsers[o.id](o):"T"===o.id[0]?qe.frameParsers["T*"](o):"W"===o.id[0]&&qe.frameParsers["W*"](o),"com.apple.streaming.transportStreamTimestamp"===o.owner){var l=o.data,d=(1&l[3])<<30|l[4]<<22|l[5]<<14|l[6]<<6|l[7]>>>2;d*=4,d+=3&l[7],o.timeStamp=d,void 0===t.pts&&void 0===t.dts&&(t.pts=o.timeStamp,t.dts=o.timeStamp),this.trigger("timestamp",o)}t.frames.push(o),n+=10,n+=a}while(n<i);this.trigger("data",t)}}}).prototype=new U;var He,Ve,We,Ge=Ee,Xe=U,Ye=Te,Ke=Se,Qe=Ie.TimestampRolloverStream,Ze=188;(He=function(){var e=new Uint8Array(Ze),t=0;He.prototype.init.call(this),this.push=function(n){var i,r=0,s=Ze;for(t?((i=new Uint8Array(n.byteLength+t)).set(e.subarray(0,t)),i.set(n,t),t=0):i=n;s<i.byteLength;)71!==i[r]||71!==i[s]?(r++,s++):(this.trigger("data",i.subarray(r,s)),r+=Ze,s+=Ze);r<i.byteLength&&(e.set(i.subarray(r),0),t=i.byteLength-r)},this.flush=function(){t===Ze&&71===e[0]&&(this.trigger("data",e),t=0),this.trigger("done")},this.endTimeline=function(){this.flush(),this.trigger("endedtimeline")},this.reset=function(){t=0,this.trigger("reset")}}).prototype=new Xe,Ve=function(){var e,t,n,i;Ve.prototype.init.call(this),i=this,this.packetsWaitingForPmt=[],this.programMapTable=void 0,e=function(e,i){var r=0;i.payloadUnitStartIndicator&&(r+=e[r]+1),"pat"===i.type?t(e.subarray(r),i):n(e.subarray(r),i)},t=function(e,t){t.section_number=e[7],t.last_section_number=e[8],i.pmtPid=(31&e[10])<<8|e[11],t.pmtPid=i.pmtPid},n=function(e,t){var n,r;if(1&e[5]){for(i.programMapTable={video:null,audio:null,"timed-metadata":{}},n=3+((15&e[1])<<8|e[2])-4,r=12+((15&e[10])<<8|e[11]);r<n;){var s=e[r],a=(31&e[r+1])<<8|e[r+2];s===Ke.H264_STREAM_TYPE&&null===i.programMapTable.video?i.programMapTable.video=a:s===Ke.ADTS_STREAM_TYPE&&null===i.programMapTable.audio?i.programMapTable.audio=a:s===Ke.METADATA_STREAM_TYPE&&(i.programMapTable["timed-metadata"][a]=s),r+=5+((15&e[r+3])<<8|e[r+4])}t.programMapTable=i.programMapTable}},this.push=function(t){var n={},i=4;if(n.payloadUnitStartIndicator=!!(64&t[1]),n.pid=31&t[1],n.pid<<=8,n.pid|=t[2],(48&t[3])>>>4>1&&(i+=t[i]+1),0===n.pid)n.type="pat",e(t.subarray(i),n),this.trigger("data",n);else if(n.pid===this.pmtPid)for(n.type="pmt",e(t.subarray(i),n),this.trigger("data",n);this.packetsWaitingForPmt.length;)this.processPes_.apply(this,this.packetsWaitingForPmt.shift());
vendor: 4,765 bytes, line 2
2else void 0===this.programMapTable?this.packetsWaitingForPmt.push([t,i,n]):this.processPes_(t,i,n)},this.processPes_=function(e,t,n){n.pid===this.programMapTable.video?n.streamType=Ke.H264_STREAM_TYPE:n.pid===this.programMapTable.audio?n.streamType=Ke.ADTS_STREAM_TYPE:n.streamType=this.programMapTable["timed-metadata"][n.pid],n.type="pes",n.data=e.subarray(t),this.trigger("data",n)}},Ve.prototype=new Xe,Ve.STREAM_TYPES={h264:27,adts:15},We=function(){var e,t=this,n=!1,i={data:[],size:0},r={data:[],size:0},s={data:[],size:0},a=function(e,n,i){var r,s,a=new Uint8Array(e.size),o={type:n},c=0,l=0;if(e.data.length&&!(e.size<9)){for(o.trackId=e.data[0].pid,c=0;c<e.data.length;c++)s=e.data[c],a.set(s.data,l),l+=s.data.byteLength;!function(e,t){var n;const i=e[0]<<16|e[1]<<8|e[2];t.data=new Uint8Array,1===i&&(t.packetLength=6+(e[4]<<8|e[5]),t.dataAlignmentIndicator=0!==(4&e[6]),192&(n=e[7])&&(t.pts=(14&e[9])<<27|(255&e[10])<<20|(254&e[11])<<12|(255&e[12])<<5|(254&e[13])>>>3,t.pts*=4,t.pts+=(6&e[13])>>>1,t.dts=t.pts,64&n&&(t.dts=(14&e[14])<<27|(255&e[15])<<20|(254&e[16])<<12|(255&e[17])<<5|(254&e[18])>>>3,t.dts*=4,t.dts+=(6&e[18])>>>1)),t.data=e.subarray(9+e[8]))}(a,o),r="video"===n||o.packetLength<=e.size,(i||r)&&(e.size=0,e.data.length=0),r&&t.trigger("data",o)}};We.prototype.init.call(this),this.push=function(o){({pat:function(){},pes:function(){var e,t;switch(o.streamType){case Ke.H264_STREAM_TYPE:e=i,t="video";break;case Ke.ADTS_STREAM_TYPE:e=r,t="audio";break;case Ke.METADATA_STREAM_TYPE:e=s,t="timed-metadata";break;default:return}o.payloadUnitStartIndicator&&a(e,t,!0),e.data.push(o),e.size+=o.data.byteLength},pmt:function(){var i={type:"metadata",tracks:[]};null!==(e=o.programMapTable).video&&i.tracks.push({timelineStartInfo:{baseMediaDecodeTime:0},id:+e.video,codec:"avc",type:"video"}),null!==e.audio&&i.tracks.push({timelineStartInfo:{baseMediaDecodeTime:0},id:+e.audio,codec:"adts",type:"audio"}),n=!0,t.trigger("data",i)}})[o.type]()},this.reset=function(){i.size=0,i.data.length=0,r.size=0,r.data.length=0,this.trigger("reset")},this.flushStreams_=function(){a(i,"video"),a(r,"audio"),a(s,"timed-metadata")},this.flush=function(){if(!n&&e){var i={type:"metadata",tracks:[]};null!==e.video&&i.tracks.push({timelineStartInfo:{baseMediaDecodeTime:0},id:+e.video,codec:"avc",type:"video"}),null!==e.audio&&i.tracks.push({timelineStartInfo:{baseMediaDecodeTime:0},id:+e.audio,codec:"adts",type:"audio"}),t.trigger("data",i)}n=!1,this.flushStreams_(),this.trigger("done")}},We.prototype=new Xe;var Je={PAT_PID:0,MP2T_PACKET_LENGTH:Ze,TransportPacketStream:He,TransportParseStream:Ve,ElementaryStream:We,TimestampRolloverStream:Qe,CaptionStream:Ye.CaptionStream,Cea608Stream:Ye.Cea608Stream,Cea708Stream:Ye.Cea708Stream,MetadataStream:Ge};for(var $e in Ke)Ke.hasOwnProperty($e)&&(Je[$e]=Ke[$e]);var et,tt=Je,nt=re.ONE_SECOND_IN_TS,it=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350];(et=function(e){var t,n=0;et.prototype.init.call(this),this.skipWarn_=function(e,t){this.trigger("log",{level:"warn",message:"adts skiping bytes ".concat(e," to ").concat(t," in frame ").concat(n," outside syncword")})},this.push=function(i){var r,s,a,o,c,l=0;if(e||(n=0),"audio"===i.type){var d;for(t&&t.length?(a=t,(t=new Uint8Array(a.byteLength+i.data.byteLength)).set(a),t.set(i.data,a.byteLength)):t=i.data;l+7<t.length;)if(255===t[l]&&240===(246&t[l+1])){if("number"===typeof d&&(this.skipWarn_(d,l),d=null),s=2*(1&~t[l+1]),r=(3&t[l+3])<<11|t[l+4]<<3|(224&t[l+5])>>5,c=(o=1024*(1+(3&t[l+6])))*nt/it[(60&t[l+2])>>>2],t.byteLength-l<r)break;this.trigger("data",{pts:i.pts+n*c,dts:i.dts+n*c,sampleCount:o,audioobjecttype:1+(t[l+2]>>>6&3),channelcount:(1&t[l+2])<<2|(192&t[l+3])>>>6,samplerate:it[(60&t[l+2])>>>2],samplingfrequencyindex:(60&t[l+2])>>>2,samplesize:16,data:t.subarray(l+7+s,l+r)}),n++,l+=r}else"number"!==typeof d&&(d=l),l++;"number"===typeof d&&(this.skipWarn_(d,l),d=null),t=t.subarray(l)}},this.flush=function(){n=0,this.trigger("done")},this.reset=function(){t=void 0,this.trigger("reset")},this.endTimeline=function(){t=void 0,this.trigger("endedtimeline")}}).prototype=new U;var rt,st,at,ot=et,ct=U,lt=function(e){var t=e.byteLength,n=0,i=0;this.length=function(){return 8*t},this.bitsAvailable=function(){return 8*t+i},this.loadWord=function(){var r=e.byteLength-t,s=new Uint8Array(4),a=Math.min(4,t);if(0===a)throw new Error("no bytes available");s.set(e.subarray(r,r+a)),n=new DataView(s.buffer).getUint32(0),i=8*a,t-=a},this.skipBits=function(e){var r;i>e?(n<<=e,i-=e):(e-=i,e-=8*(r=Math.floor(e/8)),t-=r,this.loadWord(),n<<=e,i-=e)},this.readBits=function(e){var r=Math.min(i,e),s=n>>>32-r;return(i-=r)>0?n<<=r:t>0&&this.loadWord(),(r=e-r)>0?s<<r|this.readBits(r):s},this.skipLeadingZeros=function(){var e;
vendor: 4,715 bytes, line 2
2for(e=0;e<i;++e)if(0!==(n&2147483648>>>e))return n<<=e,i-=e,e;return this.loadWord(),e+this.skipLeadingZeros()},this.skipUnsignedExpGolomb=function(){this.skipBits(1+this.skipLeadingZeros())},this.skipExpGolomb=function(){this.skipBits(1+this.skipLeadingZeros())},this.readUnsignedExpGolomb=function(){var e=this.skipLeadingZeros();return this.readBits(e+1)-1},this.readExpGolomb=function(){var e=this.readUnsignedExpGolomb();return 1&e?1+e>>>1:-1*(e>>>1)},this.readBoolean=function(){return 1===this.readBits(1)},this.readUnsignedByte=function(){return this.readBits(8)},this.loadWord()};(st=function(){var e,t,n=0;st.prototype.init.call(this),this.push=function(i){var r;t?((r=new Uint8Array(t.byteLength+i.data.byteLength)).set(t),r.set(i.data,t.byteLength),t=r):t=i.data;for(var s=t.byteLength;n<s-3;n++)if(1===t[n+2]){e=n+5;break}for(;e<s;)switch(t[e]){case 0:if(0!==t[e-1]){e+=2;break}if(0!==t[e-2]){e++;break}n+3!==e-2&&this.trigger("data",t.subarray(n+3,e-2));do{e++}while(1!==t[e]&&e<s);n=e-2,e+=3;break;case 1:if(0!==t[e-1]||0!==t[e-2]){e+=3;break}this.trigger("data",t.subarray(n+3,e-2)),n=e-2,e+=3;break;default:e+=3}t=t.subarray(n),e-=n,n=0},this.reset=function(){t=null,n=0,this.trigger("reset")},this.flush=function(){t&&t.byteLength>3&&this.trigger("data",t.subarray(n+3)),t=null,n=0,this.trigger("done")},this.endTimeline=function(){this.flush(),this.trigger("endedtimeline")}}).prototype=new ct,at={100:!0,110:!0,122:!0,244:!0,44:!0,83:!0,86:!0,118:!0,128:!0,138:!0,139:!0,134:!0},rt=function(){var e,t,n,i,r,s,a,o=new st;rt.prototype.init.call(this),e=this,this.push=function(e){"video"===e.type&&(t=e.trackId,n=e.pts,i=e.dts,o.push(e))},o.on("data",(function(a){var o={trackId:t,pts:n,dts:i,data:a,nalUnitTypeCode:31&a[0]};switch(o.nalUnitTypeCode){case 5:o.nalUnitType="slice_layer_without_partitioning_rbsp_idr";break;case 6:o.nalUnitType="sei_rbsp",o.escapedRBSP=r(a.subarray(1));break;case 7:o.nalUnitType="seq_parameter_set_rbsp",o.escapedRBSP=r(a.subarray(1)),o.config=s(o.escapedRBSP);break;case 8:o.nalUnitType="pic_parameter_set_rbsp";break;case 9:o.nalUnitType="access_unit_delimiter_rbsp"}e.trigger("data",o)})),o.on("done",(function(){e.trigger("done")})),o.on("partialdone",(function(){e.trigger("partialdone")})),o.on("reset",(function(){e.trigger("reset")})),o.on("endedtimeline",(function(){e.trigger("endedtimeline")})),this.flush=function(){o.flush()},this.partialFlush=function(){o.partialFlush()},this.reset=function(){o.reset()},this.endTimeline=function(){o.endTimeline()},a=function(e,t){var n,i=8,r=8;for(n=0;n<e;n++)0!==r&&(r=(i+t.readExpGolomb()+256)%256),i=0===r?i:r},r=function(e){for(var t,n,i=e.byteLength,r=[],s=1;s<i-2;)0===e[s]&&0===e[s+1]&&3===e[s+2]?(r.push(s+2),s+=2):s++;if(0===r.length)return e;t=i-r.length,n=new Uint8Array(t);var a=0;for(s=0;s<t;a++,s++)a===r[0]&&(a++,r.shift()),n[s]=e[a];return n},s=function(e){var t,n,i,r,s,o,c,l,d,u,h,p,m=0,g=0,f=0,b=0,y=[1,1];if(n=(t=new lt(e)).readUnsignedByte(),r=t.readUnsignedByte(),i=t.readUnsignedByte(),t.skipUnsignedExpGolomb(),at[n]&&(3===(s=t.readUnsignedExpGolomb())&&t.skipBits(1),t.skipUnsignedExpGolomb(),t.skipUnsignedExpGolomb(),t.skipBits(1),t.readBoolean()))for(h=3!==s?8:12,p=0;p<h;p++)t.readBoolean()&&a(p<6?16:64,t);if(t.skipUnsignedExpGolomb(),0===(o=t.readUnsignedExpGolomb()))t.readUnsignedExpGolomb();else if(1===o)for(t.skipBits(1),t.skipExpGolomb(),t.skipExpGolomb(),c=t.readUnsignedExpGolomb(),p=0;p<c;p++)t.skipExpGolomb();if(t.skipUnsignedExpGolomb(),t.skipBits(1),l=t.readUnsignedExpGolomb(),d=t.readUnsignedExpGolomb(),0===(u=t.readBits(1))&&t.skipBits(1),t.skipBits(1),t.readBoolean()&&(m=t.readUnsignedExpGolomb(),g=t.readUnsignedExpGolomb(),f=t.readUnsignedExpGolomb(),b=t.readUnsignedExpGolomb()),t.readBoolean()&&t.readBoolean()){switch(t.readUnsignedByte()){case 1:y=[1,1];break;case 2:y=[12,11];break;case 3:y=[10,11];break;case 4:y=[16,11];break;case 5:y=[40,33];break;case 6:y=[24,11];break;case 7:y=[20,11];break;case 8:y=[32,11];break;case 9:y=[80,33];break;case 10:y=[18,11];break;case 11:y=[15,11];break;case 12:y=[64,33];break;case 13:y=[160,99];break;case 14:y=[4,3];break;case 15:y=[3,2];break;case 16:y=[2,1];break;case 255:y=[t.readUnsignedByte()<<8|t.readUnsignedByte(),t.readUnsignedByte()<<8|t.readUnsignedByte()]}y&&(y[0],y[1])}return{profileIdc:n,levelIdc:i,profileCompatibility:r,width:16*(l+1)-2*m-2*g,height:(2-u)*(d+1)*16-2*f-2*b,sarRatio:y}}},rt.prototype=new ct;var dt,ut={H264Stream:rt,NalByteStream:st},ht=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350],pt=function(e,t){var n=e[t+6]<<21|e[t+7]<<14|e[t+8]<<7|e[t+9];return n=n>=0?n:0,(16&e[t+5])>>4?n+20:n+10},mt=function(e,t){return e.length-t<10||e[t]!=="I".charCodeAt(0)||e[t+1
vendor: 4,589 bytes, line 2
2]!=="D".charCodeAt(0)||e[t+2]!=="3".charCodeAt(0)?t:(t+=pt(e,t),mt(e,t))},gt=function(e){return e[0]<<21|e[1]<<14|e[2]<<7|e[3]},ft={isLikelyAacData:function(e){var t=mt(e,0);return e.length>=t+2&&255===(255&e[t])&&240===(240&e[t+1])&&16===(22&e[t+1])},parseId3TagSize:pt,parseAdtsSize:function(e,t){var n=(224&e[t+5])>>5,i=e[t+4]<<3;return 6144&e[t+3]|i|n},parseType:function(e,t){return e[t]==="I".charCodeAt(0)&&e[t+1]==="D".charCodeAt(0)&&e[t+2]==="3".charCodeAt(0)?"timed-metadata":!0&e[t]&&240===(240&e[t+1])?"audio":null},parseSampleRate:function(e){for(var t=0;t+5<e.length;){if(255===e[t]&&240===(246&e[t+1]))return ht[(60&e[t+2])>>>2];t++}return null},parseAacTimestamp:function(e){var t,n,i;t=10,64&e[5]&&(t+=4,t+=gt(e.subarray(10,14)));do{if((n=gt(e.subarray(t+4,t+8)))<1)return null;if("PRIV"===String.fromCharCode(e[t],e[t+1],e[t+2],e[t+3])){i=e.subarray(t+10,t+n+10);for(var r=0;r<i.byteLength;r++)if(0===i[r]){var s=unescape(function(e,t,n){var i,r="";for(i=t;i<n;i++)r+="%"+("00"+e[i].toString(16)).slice(-2);return r}(i,0,r));if("com.apple.streaming.transportStreamTimestamp"===s){var a=i.subarray(r+1),o=(1&a[3])<<30|a[4]<<22|a[5]<<14|a[6]<<6|a[7]>>>2;return o*=4,o+=3&a[7]}break}}t+=10,t+=n}while(t<e.byteLength);return null}},bt=ft;(dt=function(){var e=new Uint8Array,t=0;dt.prototype.init.call(this),this.setTimestamp=function(e){t=e},this.push=function(n){var i,r,s,a,o=0,c=0;for(e.length?(a=e.length,(e=new Uint8Array(n.byteLength+a)).set(e.subarray(0,a)),e.set(n,a)):e=n;e.length-c>=3;)if(e[c]!=="I".charCodeAt(0)||e[c+1]!=="D".charCodeAt(0)||e[c+2]!=="3".charCodeAt(0))if(255!==(255&e[c])||240!==(240&e[c+1]))c++;else{if(e.length-c<7)break;if(c+(o=bt.parseAdtsSize(e,c))>e.length)break;s={type:"audio",data:e.subarray(c,c+o),pts:t,dts:t},this.trigger("data",s),c+=o}else{if(e.length-c<10)break;if(c+(o=bt.parseId3TagSize(e,c))>e.length)break;r={type:"timed-metadata",data:e.subarray(c,c+o)},this.trigger("data",r),c+=o}i=e.length-c,e=i>0?e.subarray(c):new Uint8Array},this.reset=function(){e=new Uint8Array,this.trigger("reset")},this.endTimeline=function(){e=new Uint8Array,this.trigger("endedtimeline")}}).prototype=new U;var yt,jt,_t,vt,xt=U,Ot=Z,Tt=$,St=oe,wt=le,At=tt,kt=re,Ct=ot,Et=ut.H264Stream,It=dt,Dt=ft.isLikelyAacData,Pt=re.ONE_SECOND_IN_TS,Rt=["audioobjecttype","channelcount","samplerate","samplingfrequencyindex","samplesize"],Lt=["width","height","profileIdc","levelIdc","profileCompatibility","sarRatio"],Mt=function(e,t){t.stream=e,this.trigger("log",t)},Nt=function(e,t){for(var n=Object.keys(t),i=0;i<n.length;i++){var r=n[i];"headOfPipeline"!==r&&t[r].on&&t[r].on("log",Mt.bind(e,r))}},Bt=function(e,t){var n;if(e.length!==t.length)return!1;for(n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0},Ut=function(e,t,n,i,r,s){return{start:{dts:e,pts:e+(n-t)},end:{dts:e+(i-t),pts:e+(r-n)},prependedContentDuration:s,baseMediaDecodeTime:e}};jt=function(e,t){var n,i=[],r=0,s=0,a=1/0;n=(t=t||{}).firstSequenceNumber||0,jt.prototype.init.call(this),this.push=function(t){wt.collectDtsInfo(e,t),e&&Rt.forEach((function(n){e[n]=t[n]})),i.push(t)},this.setEarliestDts=function(e){r=e},this.setVideoBaseMediaDecodeTime=function(e){a=e},this.setAudioAppendStart=function(e){s=e},this.flush=function(){var o,c,l,d,u,h,p;0!==i.length?(o=St.trimAdtsFramesByEarliestDts(i,e,r),e.baseMediaDecodeTime=wt.calculateTrackBaseMediaDecodeTime(e,t.keepOriginalTimestamps),p=St.prefixWithSilence(e,o,s,a),e.samples=St.generateSampleTable(o),l=Ot.mdat(St.concatenateFrameData(o)),i=[],c=Ot.moof(n,[e]),d=new Uint8Array(c.byteLength+l.byteLength),n++,d.set(c),d.set(l,c.byteLength),wt.clearDtsInfo(e),u=Math.ceil(1024*Pt/e.samplerate),o.length&&(h=o.length*u,this.trigger("segmentTimingInfo",Ut(kt.audioTsToVideoTs(e.baseMediaDecodeTime,e.samplerate),o[0].dts,o[0].pts,o[0].dts+h,o[0].pts+h,p||0)),this.trigger("timingInfo",{start:o[0].pts,end:o[0].pts+h})),this.trigger("data",{track:e,boxes:d}),this.trigger("done","AudioSegmentStream")):this.trigger("done","AudioSegmentStream")},this.reset=function(){wt.clearDtsInfo(e),i=[],this.trigger("reset")}},jt.prototype=new xt,yt=function(e,t){var n,i,r,s=[],a=[];n=(t=t||{}).firstSequenceNumber||0,yt.prototype.init.call(this),delete e.minPTS,this.gopCache_=[],this.push=function(t){wt.collectDtsInfo(e,t),"seq_parameter_set_rbsp"!==t.nalUnitType||i||(i=t.config,e.sps=[t.data],Lt.forEach((function(t){e[t]=i[t]}),this)),"pic_parameter_set_rbsp"!==t.nalUnitType||r||(r=t.data,e.pps=[t.data]),s.push(t)},this.flush=function(){for(var i,r,o,c,l,d,u,h,p=0;s.length&&"access_unit_delimiter_rbsp"!==s[0].nalUnitType;)s.shift();
vendor: 19,067 bytes, line 2
2if(0===s.length)return this.resetStream_(),void this.trigger("done","VideoSegmentStream");if(i=Tt.groupNalsIntoFrames(s),(o=Tt.groupFramesIntoGops(i))[0][0].keyFrame||((r=this.getGopForFusion_(s[0],e))?(p=r.duration,o.unshift(r),o.byteLength+=r.byteLength,o.nalCount+=r.nalCount,o.pts=r.pts,o.dts=r.dts,o.duration+=r.duration):o=Tt.extendFirstKeyFrame(o)),a.length){var m;if(!(m=t.alignGopsAtEnd?this.alignGopsAtEnd_(o):this.alignGopsAtStart_(o)))return this.gopCache_.unshift({gop:o.pop(),pps:e.pps,sps:e.sps}),this.gopCache_.length=Math.min(6,this.gopCache_.length),s=[],this.resetStream_(),void this.trigger("done","VideoSegmentStream");wt.clearDtsInfo(e),o=m}wt.collectDtsInfo(e,o),e.samples=Tt.generateSampleTable(o),l=Ot.mdat(Tt.concatenateNalData(o)),e.baseMediaDecodeTime=wt.calculateTrackBaseMediaDecodeTime(e,t.keepOriginalTimestamps),this.trigger("processedGopsInfo",o.map((function(e){return{pts:e.pts,dts:e.dts,byteLength:e.byteLength}}))),u=o[0],h=o[o.length-1],this.trigger("segmentTimingInfo",Ut(e.baseMediaDecodeTime,u.dts,u.pts,h.dts+h.duration,h.pts+h.duration,p)),this.trigger("timingInfo",{start:o[0].pts,end:o[o.length-1].pts+o[o.length-1].duration}),this.gopCache_.unshift({gop:o.pop(),pps:e.pps,sps:e.sps}),this.gopCache_.length=Math.min(6,this.gopCache_.length),s=[],this.trigger("baseMediaDecodeTime",e.baseMediaDecodeTime),this.trigger("timelineStartInfo",e.timelineStartInfo),c=Ot.moof(n,[e]),d=new Uint8Array(c.byteLength+l.byteLength),n++,d.set(c),d.set(l,c.byteLength),this.trigger("data",{track:e,boxes:d}),this.resetStream_(),this.trigger("done","VideoSegmentStream")},this.reset=function(){this.resetStream_(),s=[],this.gopCache_.length=0,a.length=0,this.trigger("reset")},this.resetStream_=function(){wt.clearDtsInfo(e),i=void 0,r=void 0},this.getGopForFusion_=function(t){var n,i,r,s,a,o=1/0;for(a=0;a<this.gopCache_.length;a++)r=(s=this.gopCache_[a]).gop,e.pps&&Bt(e.pps[0],s.pps[0])&&e.sps&&Bt(e.sps[0],s.sps[0])&&(r.dts<e.timelineStartInfo.dts||(n=t.dts-r.dts-r.duration)>=-1e4&&n<=45e3&&(!i||o>n)&&(i=s,o=n));return i?i.gop:null},this.alignGopsAtStart_=function(e){var t,n,i,r,s,o,c,l;for(s=e.byteLength,o=e.nalCount,c=e.duration,t=n=0;t<a.length&&n<e.length&&(i=a[t],r=e[n],i.pts!==r.pts);)r.pts>i.pts?t++:(n++,s-=r.byteLength,o-=r.nalCount,c-=r.duration);return 0===n?e:n===e.length?null:((l=e.slice(n)).byteLength=s,l.duration=c,l.nalCount=o,l.pts=l[0].pts,l.dts=l[0].dts,l)},this.alignGopsAtEnd_=function(e){var t,n,i,r,s,o,c;for(t=a.length-1,n=e.length-1,s=null,o=!1;t>=0&&n>=0;){if(i=a[t],r=e[n],i.pts===r.pts){o=!0;break}i.pts>r.pts?t--:(t===a.length-1&&(s=n),n--)}if(!o&&null===s)return null;if(0===(c=o?n:s))return e;var l=e.slice(c),d=l.reduce((function(e,t){return e.byteLength+=t.byteLength,e.duration+=t.duration,e.nalCount+=t.nalCount,e}),{byteLength:0,duration:0,nalCount:0});return l.byteLength=d.byteLength,l.duration=d.duration,l.nalCount=d.nalCount,l.pts=l[0].pts,l.dts=l[0].dts,l},this.alignGopsWith=function(e){a=e}},yt.prototype=new xt,vt=function(e,t){this.numberOfTracks=0,this.metadataStream=t,"undefined"!==typeof(e=e||{}).remux?this.remuxTracks=!!e.remux:this.remuxTracks=!0,"boolean"===typeof e.keepOriginalTimestamps?this.keepOriginalTimestamps=e.keepOriginalTimestamps:this.keepOriginalTimestamps=!1,this.pendingTracks=[],this.videoTrack=null,this.pendingBoxes=[],this.pendingCaptions=[],this.pendingMetadata=[],this.pendingBytes=0,this.emittedTracks=0,vt.prototype.init.call(this),this.push=function(e){return e.content||e.text?this.pendingCaptions.push(e):e.frames?this.pendingMetadata.push(e):(this.pendingTracks.push(e.track),this.pendingBytes+=e.boxes.byteLength,"video"===e.track.type&&(this.videoTrack=e.track,this.pendingBoxes.push(e.boxes)),void("audio"===e.track.type&&(this.audioTrack=e.track,this.pendingBoxes.unshift(e.boxes))))}},vt.prototype=new xt,vt.prototype.flush=function(e){var t,n,i,r,s=0,a={captions:[],captionStreams:{},metadata:[],info:{}},o=0;if(this.pendingTracks.length<this.numberOfTracks){if("VideoSegmentStream"!==e&&"AudioSegmentStream"!==e)return;if(this.remuxTracks)return;if(0===this.pendingTracks.length)return this.emittedTracks++,void(this.emittedTracks>=this.numberOfTracks&&(this.trigger("done"),this.emittedTracks=0))}if(this.videoTrack?(o=this.videoTrack.timelineStartInfo.pts,Lt.forEach((function(e){a.info[e]=this.videoTrack[e]}),this)):this.audioTrack&&(o=this.audioTrack.timelineStartInfo.pts,Rt.forEach((function(e){a.info[e]=this.audioTrack[e]}),this)),this.videoTrack||this.audioTrack){for(1===this.pendingTracks.length?a.type=this.pendingTracks[0].type:a.type="combined",this.emittedTracks+=this.pendingTracks.length,i=Ot.initSegment(this.pendingTracks),a.initSegment=new Uint8Array(i.byteLength),a.initSegment.set(i),a.data=new Uint8Array(this.pendingBytes),r=0;r<this.pendingBoxes.length;r++)a.data.set(this.pendingBoxes[r],s),s+=this.pendingBoxes[r].byteLength;for(r=0;r<this.pendingCaptions.length;r++)(t=this.pendingCaptions[r]).startTime=kt.metadataTsToSeconds(t.startPts,o,this.keepOriginalTimestamps),t.endTime=kt.metadataTsToSeconds(t.endPts,o,this.keepOriginalTimestamps),a.captionStreams[t.stream]=!0,a.captions.push(t);for(r=0;r<this.pendingMetadata.length;r++)(n=this.pendingMetadata[r]).cueTime=kt.metadataTsToSeconds(n.pts,o,this.keepOriginalTimestamps),a.metadata.push(n);for(a.metadata.dispatchType=this.metadataStream.dispatchType,this.pendingTracks.length=0,this.videoTrack=null,this.pendingBoxes.length=0,this.pendingCaptions.length=0,this.pendingBytes=0,this.pendingMetadata.length=0,this.trigger("data",a),r=0;r<a.captions.length;r++)t=a.captions[r],this.trigger("caption",t);for(r=0;r<a.metadata.length;r++)n=a.metadata[r],this.trigger("id3Frame",n)}this.emittedTracks>=this.numberOfTracks&&(this.trigger("done"),this.emittedTracks=0)},vt.prototype.setRemux=function(e){this.remuxTracks=e},(_t=function(e){var t,n,i=this,r=!0;_t.prototype.init.call(this),e=e||{},this.baseMediaDecodeTime=e.baseMediaDecodeTime||0,this.transmuxPipeline_={},this.setupAacPipeline=function(){var r={};this.transmuxPipeline_=r,r.type="aac",r.metadataStream=new At.MetadataStream,r.aacStream=new It,r.audioTimestampRolloverStream=new At.TimestampRolloverStream("audio"),r.timedMetadataTimestampRolloverStream=new At.TimestampRolloverStream("timed-metadata"),r.adtsStream=new Ct,r.coalesceStream=new vt(e,r.metadataStream),r.headOfPipeline=r.aacStream,r.aacStream.pipe(r.audioTimestampRolloverStream).pipe(r.adtsStream),r.aacStream.pipe(r.timedMetadataTimestampRolloverStream).pipe(r.metadataStream).pipe(r.coalesceStream),r.metadataStream.on("timestamp",(function(e){r.aacStream.setTimestamp(e.timeStamp)})),r.aacStream.on("data",(function(s){"timed-metadata"!==s.type&&"audio"!==s.type||r.audioSegmentStream||(n=n||{timelineStartInfo:{baseMediaDecodeTime:i.baseMediaDecodeTime},codec:"adts",type:"audio"},r.coalesceStream.numberOfTracks++,r.audioSegmentStream=new jt(n,e),r.audioSegmentStream.on("log",i.getLogTrigger_("audioSegmentStream")),r.audioSegmentStream.on("timingInfo",i.trigger.bind(i,"audioTimingInfo")),r.adtsStream.pipe(r.audioSegmentStream).pipe(r.coalesceStream),i.trigger("trackinfo",{hasAudio:!!n,hasVideo:!!t}))})),r.coalesceStream.on("data",this.trigger.bind(this,"data")),r.coalesceStream.on("done",this.trigger.bind(this,"done")),Nt(this,r)},this.setupTsPipeline=function(){var r={};this.transmuxPipeline_=r,r.type="ts",r.metadataStream=new At.MetadataStream,r.packetStream=new At.TransportPacketStream,r.parseStream=new At.TransportParseStream,r.elementaryStream=new At.ElementaryStream,r.timestampRolloverStream=new At.TimestampRolloverStream,r.adtsStream=new Ct,r.h264Stream=new Et,r.captionStream=new At.CaptionStream(e),r.coalesceStream=new vt(e,r.metadataStream),r.headOfPipeline=r.packetStream,r.packetStream.pipe(r.parseStream).pipe(r.elementaryStream).pipe(r.timestampRolloverStream),r.timestampRolloverStream.pipe(r.h264Stream),r.timestampRolloverStream.pipe(r.adtsStream),r.timestampRolloverStream.pipe(r.metadataStream).pipe(r.coalesceStream),r.h264Stream.pipe(r.captionStream).pipe(r.coalesceStream),r.elementaryStream.on("data",(function(s){var a;if("metadata"===s.type){for(a=s.tracks.length;a--;)t||"video"!==s.tracks[a].type?n||"audio"!==s.tracks[a].type||((n=s.tracks[a]).timelineStartInfo.baseMediaDecodeTime=i.baseMediaDecodeTime):(t=s.tracks[a]).timelineStartInfo.baseMediaDecodeTime=i.baseMediaDecodeTime;t&&!r.videoSegmentStream&&(r.coalesceStream.numberOfTracks++,r.videoSegmentStream=new yt(t,e),r.videoSegmentStream.on("log",i.getLogTrigger_("videoSegmentStream")),r.videoSegmentStream.on("timelineStartInfo",(function(t){n&&!e.keepOriginalTimestamps&&(n.timelineStartInfo=t,r.audioSegmentStream.setEarliestDts(t.dts-i.baseMediaDecodeTime))})),r.videoSegmentStream.on("processedGopsInfo",i.trigger.bind(i,"gopInfo")),r.videoSegmentStream.on("segmentTimingInfo",i.trigger.bind(i,"videoSegmentTimingInfo")),r.videoSegmentStream.on("baseMediaDecodeTime",(function(e){n&&r.audioSegmentStream.setVideoBaseMediaDecodeTime(e)})),r.videoSegmentStream.on("timingInfo",i.trigger.bind(i,"videoTimingInfo")),r.h264Stream.pipe(r.videoSegmentStream).pipe(r.coalesceStream)),n&&!r.audioSegmentStream&&(r.coalesceStream.numberOfTracks++,r.audioSegmentStream=new jt(n,e),r.audioSegmentStream.on("log",i.getLogTrigger_("audioSegmentStream")),r.audioSegmentStream.on("timingInfo",i.trigger.bind(i,"audioTimingInfo")),r.audioSegmentStream.on("segmentTimingInfo",i.trigger.bind(i,"audioSegmentTimingInfo")),r.adtsStream.pipe(r.audioSegmentStream).pipe(r.coalesceStream)),i.trigger("trackinfo",{hasAudio:!!n,hasVideo:!!t})}})),r.coalesceStream.on("data",this.trigger.bind(this,"data")),r.coalesceStream.on("id3Frame",(function(e){e.dispatchType=r.metadataStream.dispatchType,i.trigger("id3Frame",e)})),r.coalesceStream.on("caption",this.trigger.bind(this,"caption")),r.coalesceStream.on("done",this.trigger.bind(this,"done")),Nt(this,r)},this.setBaseMediaDecodeTime=function(i){var r=this.transmuxPipeline_;e.keepOriginalTimestamps||(this.baseMediaDecodeTime=i),n&&(n.timelineStartInfo.dts=void 0,n.timelineStartInfo.pts=void 0,wt.clearDtsInfo(n),r.audioTimestampRolloverStream&&r.audioTimestampRolloverStream.discontinuity()),t&&(r.videoSegmentStream&&(r.videoSegmentStream.gopCache_=[]),t.timelineStartInfo.dts=void 0,t.timelineStartInfo.pts=void 0,wt.clearDtsInfo(t),r.captionStream.reset()),r.timestampRolloverStream&&r.timestampRolloverStream.discontinuity()},this.setAudioAppendStart=function(e){n&&this.transmuxPipeline_.audioSegmentStream.setAudioAppendStart(e)},this.setRemux=function(t){var n=this.transmuxPipeline_;e.remux=t,n&&n.coalesceStream&&n.coalesceStream.setRemux(t)},this.alignGopsWith=function(e){t&&this.transmuxPipeline_.videoSegmentStream&&this.transmuxPipeline_.videoSegmentStream.alignGopsWith(e)},this.getLogTrigger_=function(e){var t=this;return function(n){n.stream=e,t.trigger("log",n)}},this.push=function(e){if(r){var t=Dt(e);t&&"aac"!==this.transmuxPipeline_.type?this.setupAacPipeline():t||"ts"===this.transmuxPipeline_.type||this.setupTsPipeline(),r=!1}this.transmuxPipeline_.headOfPipeline.push(e)},this.flush=function(){r=!0,this.transmuxPipeline_.headOfPipeline.flush()},this.endTimeline=function(){this.transmuxPipeline_.headOfPipeline.endTimeline()},this.reset=function(){this.transmuxPipeline_.headOfPipeline&&this.transmuxPipeline_.headOfPipeline.reset()},this.resetCaptions=function(){this.transmuxPipeline_.captionStream&&this.transmuxPipeline_.captionStream.reset()}}).prototype=new xt;var Ft,zt,qt={Transmuxer:_t,VideoSegmentStream:yt,AudioSegmentStream:jt,AUDIO_PROPERTIES:Rt,VIDEO_PROPERTIES:Lt,generateSegmentTimingInfo:Ut},Ht=function(e){return e>>>0},Vt=function(e){return("00"+e.toString(16)).slice(-2)},Wt=function(e){var t="";return t+=String.fromCharCode(e[0]),t+=String.fromCharCode(e[1]),t+=String.fromCharCode(e[2]),t+=String.fromCharCode(e[3])},Gt=Ht,Xt=Wt,Yt=function(e,t){var n,i,r,s,a,o=[];if(!t.length)return null;for(n=0;n<e.byteLength;)i=Gt(e[n]<<24|e[n+1]<<16|e[n+2]<<8|e[n+3]),r=Xt(e.subarray(n+4,n+8)),s=i>1?n+i:e.byteLength,r===t[0]&&(1===t.length?o.push(e.subarray(n+8,s)):(a=Yt(e.subarray(n+8,s),t.slice(1))).length&&(o=o.concat(a))),n=s;return o},Kt=Yt,Qt=Ht,Zt=z.getUint64,Jt=function(e){var t={version:e[0],flags:new Uint8Array(e.subarray(1,4))};return 1===t.version?t.baseMediaDecodeTime=Zt(e.subarray(4)):t.baseMediaDecodeTime=Qt(e[4]<<24|e[5]<<16|e[6]<<8|e[7]),t},$t=function(e){var t,n=new DataView(e.buffer,e.byteOffset,e.byteLength),i={version:e[0],flags:new Uint8Array(e.subarray(1,4)),trackId:n.getUint32(4)},r=1&i.flags[2],s=2&i.flags[2],a=8&i.flags[2],o=16&i.flags[2],c=32&i.flags[2],l=65536&i.flags[0],d=131072&i.flags[0];return t=8,r&&(t+=4,i.baseDataOffset=n.getUint32(12),t+=4),s&&(i.sampleDescriptionIndex=n.getUint32(t),t+=4),a&&(i.defaultSampleDuration=n.getUint32(t),t+=4),o&&(i.defaultSampleSize=n.getUint32(t),t+=4),c&&(i.defaultSampleFlags=n.getUint32(t)),l&&(i.durationIsEmpty=!0),!r&&d&&(i.baseDataOffsetIsMoof=!0),i},en=z.getUint64,tn=function(e){return{isLeading:(12&e[0])>>>2,dependsOn:3&e[0],isDependedOn:(192&e[1])>>>6,hasRedundancy:(48&e[1])>>>4,paddingValue:(14&e[1])>>>1,isNonSyncSample:1&e[1],degradationPriority:e[2]<<8|e[3]}},nn=function(e){var t,n={version:e[0],flags:new Uint8Array(e.subarray(1,4)),samples:[]},i=new DataView(e.buffer,e.byteOffset,e.byteLength),r=1&n.flags[2],s=4&n.flags[2],a=1&n.flags[1],o=2&n.flags[1],c=4&n.flags[1],l=8&n.flags[1],d=i.getUint32(4),u=8;for(r&&(n.dataOffset=i.getInt32(u),u+=4),s&&d&&(t={flags:tn(e.subarray(u,u+4))},u+=4,a&&(t.duration=i.getUint32(u),u+=4),o&&(t.size=i.getUint32(u),u+=4),l&&(1===n.version?t.compositionTimeOffset=i.getInt32(u):t.compositionTimeOffset=i.getUint32(u),u+=4),n.samples.push(t),d--);d--;)t={},a&&(t.duration=i.getUint32(u),u+=4),o&&(t.size=i.getUint32(u),u+=4),c&&(t.flags=tn(e.subarray(u,u+4)),u+=4),l&&(1===n.version?t.compositionTimeOffset=i.getInt32(u):t.compositionTimeOffset=i.getUint32(u),u+=4),n.samples.push(t);return n},rn=z.getUint64,sn=function(e){return new Date(1e3*e-20828448e5)},an=Wt,on=function(e){var t,n,i=new DataView(e.buffer,e.byteOffset,e.byteLength),r=[];for(t=0;t+4<e.length;t+=n)if(n=i.getUint32(t),t+=4,n<=0)r.push("<span style='color:red;'>MALFORMED DATA</span>");else switch(31&e[t]){case 1:r.push("slice_layer_without_partitioning_rbsp");break;case 5:r.push("slice_layer_without_partitioning_rbsp_idr");break;case 6:r.push("sei_rbsp");break;case 7:r.push("seq_parameter_set_rbsp");break;case 8:r.push("pic_parameter_set_rbsp");break;case 9:r.push("access_unit_delimiter_rbsp");break;default:r.push("UNKNOWN NAL - "+e[t]&31)}return r},cn={avc1:function(e){var t=new DataView(e.buffer,e.byteOffset,e.byteLength);return{dataReferenceIndex:t.getUint16(6),width:t.getUint16(24),height:t.getUint16(26),horizresolution:t.getUint16(28)+t.getUint16(30)/16,vertresolution:t.getUint16(32)+t.getUint16(34)/16,frameCount:t.getUint16(40),depth:t.getUint16(74),config:Ft(e.subarray(78,e.byteLength))}},avcC:function(e){var t,n,i,r,s=new DataView(e.buffer,e.byteOffset,e.byteLength),a={configurationVersion:e[0],avcProfileIndication:e[1],profileCompatibility:e[2],avcLevelIndication:e[3],lengthSizeMinusOne:3&e[4],sps:[],pps:[]},o=31&e[5];for(i=6,r=0;r<o;r++)n=s.getUint16(i),i+=2,a.sps.push(new Uint8Array(e.subarray(i,i+n))),i+=n;for(t=e[i],i++,r=0;r<t;r++)n=s.getUint16(i),i+=2,a.pps.push(new Uint8Array(e.subarray(i,i+n))),i+=n;return a},btrt:function(e){var t=new DataView(e.buffer,e.byteOffset,e.byteLength);return{bufferSizeDB:t.getUint32(0),maxBitrate:t.getUint32(4),avgBitrate:t.getUint32(8)}},edts:function(e){return{boxes:Ft(e)}},elst:function(e){var t,n=new DataView(e.buffer,e.byteOffset,e.byteLength),i={version:n.getUint8(0),flags:new Uint8Array(e.subarray(1,4)),edits:[]},r=n.getUint32(4);for(t=8;r;r--)0===i.version?(i.edits.push({segmentDuration:n.getUint32(t),mediaTime:n.getInt32(t+4),mediaRate:n.getUint16(t+8)+n.getUint16(t+10)/65536}),t+=12):(i.edits.push({segmentDuration:rn(e.subarray(t)),mediaTime:rn(e.subarray(t+8)),mediaRate:n.getUint16(t+16)+n.getUint16(t+18)/65536}),t+=20);return i},esds:function(e){return{version:e[0],flags:new Uint8Array(e.subarray(1,4)),esId:e[6]<<8|e[7],streamPriority:31&e[8],decoderConfig:{objectProfileIndication:e[11],streamType:e[12]>>>2&63,bufferSize:e[13]<<16|e[14]<<8|e[15],maxBitrate:e[16]<<24|e[17]<<16|e[18]<<8|e[19],avgBitrate:e[20]<<24|e[21]<<16|e[22]<<8|e[23],decoderConfigDescriptor:{tag:e[24],length:e[25],audioObjectType:e[26]>>>3&31,samplingFrequencyIndex:(7&e[26])<<1|e[27]>>>7&1,channelConfiguration:e[27]>>>3&15}}}},ftyp:function(e){for(var t=new DataView(e.buffer,e.byteOffset,e.byteLength),n={majorBrand:an(e.subarray(0,4)),minorVersion:t.getUint32(4),compatibleBrands:[]},i=8;i<e.byteLength;)n.compatibleBrands.push(an(e.subarray(i,i+4))),i+=4;return n},dinf:function(e){return{boxes:Ft(e)}},dref:function(e){return{version:e[0],flags:new Uint8Array(e.subarray(1,4)),dataReferences:Ft(e.subarray(8))}},hdlr:function(e){var t={version:new DataView(e.buffer,e.byteOffset,e.byteLength).getUint8(0),flags:new Uint8Array(e.subarray(1,4)),handlerType:an(e.subarray(8,12)),name:""},n=8;for(n=24;n<e.byteLength;n++){if(0===e[n]){n++;break}t.name+=String.fromCharCode(e[n])}return t.name=decodeURIComponent(escape(t.name)),t},mdat:function(e){return{byteLength:e.byteLength,nals:on(e)}},mdhd:function(e){var t,n=new DataView(e.buffer,e.byteOffset,e.byteLength),i=4,r={version:n.getUint8(0),flags:new Uint8Array(e.subarray(1,4)),language:""};return 1===r.version?(i+=4,r.creationTime=sn(n.getUint32(i)),i+=8,r.modificationTime=sn(n.getUint32(i)),i+=4,r.timescale=n.getUint32(i),i+=8,r.duration=n.getUint32(i)):(r.creationTime=sn(n.getUint32(i)),i+=4,r.modificationTime=sn(n.getUint32(i)),i+=4,r.timescale=n.getUint32(i),i+=4,r.duration=n.getUint32(i)),i+=4,t=n.getUint16(i),r.language+=String.fromCharCode(96+(t>>10)),r.language+=String.fromCharCode(96+((992&t)>>5)),r.language+=String.fromCharCode(96+(31&t)),r},mdia:function(e){return{boxes:Ft(e)}},mfhd:function(e){return{version:e[0],flags:new Uint8Array(e.subarray(1,4)),sequenceNumber:e[4]<<24|e[5]<<16|e[6]<<8|e[7]}},minf:function(e){return{boxes:Ft(e)}},mp4a:function(e){var t=new DataView(e.buffer,e.byteOffset,e.byteLength),n={dataReferenceIndex:t.getUint16(6),channelcount:t.getUint16(16),samplesize:t.getUint16(18),samplerate:t.getUint16(24)+t.getUint16(26)/65536};return e.byteLength>28&&(n.streamDescriptor=Ft(e.subarray(28))[0]),n},moof:function(e){return{boxes:Ft(e)}},moov:function(e){return{boxes:Ft(e)}},mvex:function(e){return{boxes:Ft(e)}},mvhd:function(e){var t=new DataView(e.buffer,e.byteOffset,e.byteLength),n=4,i={version:t.getUint8(0),flags:new Uint8Array(e.subarray(1,4))};return 1===i.version?(n+=4,i.creationTime=sn(t.getUint32(n)),n+=8,i.modificationTime=sn(t.getUint32(n)),n+=4,i.timescale=t.getUint32(n),n+=8,i.duration=t.getUint32(n)):(i.creationTime=sn(t.getUint32(n)),n+=4,i.modificationTime=sn(t.getUint32(n)),n+=4,i.timescale=t.getUint32(n),n+=4,i.duration=t.getUint32(n)),n+=4,i.rate=t.getUint16(n)+t.getUint16(n+2)/16,n+=4,i.volume=t.getUint8(n)+t.getUint8(n+1)/8,n+=2,
vendor: 4,274 bytes, line 2
2n+=2,n+=8,i.matrix=new Uint32Array(e.subarray(n,n+36)),n+=36,n+=24,i.nextTrackId=t.getUint32(n),i},pdin:function(e){var t=new DataView(e.buffer,e.byteOffset,e.byteLength);return{version:t.getUint8(0),flags:new Uint8Array(e.subarray(1,4)),rate:t.getUint32(4),initialDelay:t.getUint32(8)}},sdtp:function(e){var t,n={version:e[0],flags:new Uint8Array(e.subarray(1,4)),samples:[]};for(t=4;t<e.byteLength;t++)n.samples.push({dependsOn:(48&e[t])>>4,isDependedOn:(12&e[t])>>2,hasRedundancy:3&e[t]});return n},sidx:function(e){var t=new DataView(e.buffer,e.byteOffset,e.byteLength),n={version:e[0],flags:new Uint8Array(e.subarray(1,4)),references:[],referenceId:t.getUint32(4),timescale:t.getUint32(8)},i=12;0===n.version?(n.earliestPresentationTime=t.getUint32(i),n.firstOffset=t.getUint32(i+4),i+=8):(n.earliestPresentationTime=en(e.subarray(i)),n.firstOffset=en(e.subarray(i+8)),i+=16),i+=2;var r=t.getUint16(i);for(i+=2;r>0;i+=12,r--)n.references.push({referenceType:(128&e[i])>>>7,referencedSize:2147483647&t.getUint32(i),subsegmentDuration:t.getUint32(i+4),startsWithSap:!!(128&e[i+8]),sapType:(112&e[i+8])>>>4,sapDeltaTime:268435455&t.getUint32(i+8)});return n},smhd:function(e){return{version:e[0],flags:new Uint8Array(e.subarray(1,4)),balance:e[4]+e[5]/256}},stbl:function(e){return{boxes:Ft(e)}},ctts:function(e){var t,n=new DataView(e.buffer,e.byteOffset,e.byteLength),i={version:n.getUint8(0),flags:new Uint8Array(e.subarray(1,4)),compositionOffsets:[]},r=n.getUint32(4);for(t=8;r;t+=8,r--)i.compositionOffsets.push({sampleCount:n.getUint32(t),sampleOffset:n[0===i.version?"getUint32":"getInt32"](t+4)});return i},stss:function(e){var t,n=new DataView(e.buffer,e.byteOffset,e.byteLength),i={version:n.getUint8(0),flags:new Uint8Array(e.subarray(1,4)),syncSamples:[]},r=n.getUint32(4);for(t=8;r;t+=4,r--)i.syncSamples.push(n.getUint32(t));return i},stco:function(e){var t,n=new DataView(e.buffer,e.byteOffset,e.byteLength),i={version:e[0],flags:new Uint8Array(e.subarray(1,4)),chunkOffsets:[]},r=n.getUint32(4);for(t=8;r;t+=4,r--)i.chunkOffsets.push(n.getUint32(t));return i},stsc:function(e){var t,n=new DataView(e.buffer,e.byteOffset,e.byteLength),i=n.getUint32(4),r={version:e[0],flags:new Uint8Array(e.subarray(1,4)),sampleToChunks:[]};for(t=8;i;t+=12,i--)r.sampleToChunks.push({firstChunk:n.getUint32(t),samplesPerChunk:n.getUint32(t+4),sampleDescriptionIndex:n.getUint32(t+8)});return r},stsd:function(e){return{version:e[0],flags:new Uint8Array(e.subarray(1,4)),sampleDescriptions:Ft(e.subarray(8))}},stsz:function(e){var t,n=new DataView(e.buffer,e.byteOffset,e.byteLength),i={version:e[0],flags:new Uint8Array(e.subarray(1,4)),sampleSize:n.getUint32(4),entries:[]};for(t=12;t<e.byteLength;t+=4)i.entries.push(n.getUint32(t));return i},stts:function(e){var t,n=new DataView(e.buffer,e.byteOffset,e.byteLength),i={version:e[0],flags:new Uint8Array(e.subarray(1,4)),timeToSamples:[]},r=n.getUint32(4);for(t=8;r;t+=8,r--)i.timeToSamples.push({sampleCount:n.getUint32(t),sampleDelta:n.getUint32(t+4)});return i},styp:function(e){return cn.ftyp(e)},tfdt:Jt,tfhd:$t,tkhd:function(e){var t=new DataView(e.buffer,e.byteOffset,e.byteLength),n=4,i={version:t.getUint8(0),flags:new Uint8Array(e.subarray(1,4))};return 1===i.version?(n+=4,i.creationTime=sn(t.getUint32(n)),n+=8,i.modificationTime=sn(t.getUint32(n)),n+=4,i.trackId=t.getUint32(n),n+=4,n+=8,i.duration=t.getUint32(n)):(i.creationTime=sn(t.getUint32(n)),n+=4,i.modificationTime=sn(t.getUint32(n)),n+=4,i.trackId=t.getUint32(n),n+=4,n+=4,i.duration=t.getUint32(n)),n+=4,n+=8,i.layer=t.getUint16(n),n+=2,i.alternateGroup=t.getUint16(n),n+=2,i.volume=t.getUint8(n)+t.getUint8(n+1)/8,n+=2,n+=2,i.matrix=new Uint32Array(e.subarray(n,n+36)),n+=36,i.width=t.getUint16(n)+t.getUint16(n+2)/65536,n+=4,i.height=t.getUint16(n)+t.getUint16(n+2)/65536,i},traf:function(e){return{boxes:Ft(e)}},trak:function(e){return{boxes:Ft(e)}},trex:function(e){var t=new DataView(e.buffer,e.byteOffset,e.byteLength);return{version:e[0],flags:new Uint8Array(e.subarray(1,4)),trackId:t.getUint32(4),defaultSampleDescriptionIndex:t.getUint32(8),defaultSampleDuration:t.getUint32(12),defaultSampleSize:t.getUint32(16),sampleDependsOn:3&e[20],sampleIsDependedOn:(192&e[21])>>6,sampleHasRedundancy:(48&e[21])>>4,samplePaddingValue:(14&e[21])>>
vendor: 20,663 bytes, line 2
21,sampleIsDifferenceSample:!!(1&e[21]),sampleDegradationPriority:t.getUint16(22)}},trun:nn,"url ":function(e){return{version:e[0],flags:new Uint8Array(e.subarray(1,4))}},vmhd:function(e){var t=new DataView(e.buffer,e.byteOffset,e.byteLength);return{version:e[0],flags:new Uint8Array(e.subarray(1,4)),graphicsmode:t.getUint16(4),opcolor:new Uint16Array([t.getUint16(6),t.getUint16(8),t.getUint16(10)])}}};Ft=function(e){for(var t,n,i,r,s,a=0,o=[],c=new ArrayBuffer(e.length),l=new Uint8Array(c),d=0;d<e.length;++d)l[d]=e[d];for(t=new DataView(c);a<e.byteLength;)n=t.getUint32(a),i=an(e.subarray(a+4,a+8)),r=n>1?a+n:e.byteLength,(s=(cn[i]||function(e){return{data:e}})(e.subarray(a+8,r))).size=n,s.type=i,o.push(s),a=r;return o},zt=function(e,t){var n;return t=t||0,n=new Array(2*t+1).join(" "),e.map((function(e,i){return n+e.type+"\n"+Object.keys(e).filter((function(e){return"type"!==e&&"boxes"!==e})).map((function(t){var i=n+" "+t+": ",r=e[t];if(r instanceof Uint8Array||r instanceof Uint32Array){var s=Array.prototype.slice.call(new Uint8Array(r.buffer,r.byteOffset,r.byteLength)).map((function(e){return" "+("00"+e.toString(16)).slice(-2)})).join("").match(/.{1,24}/g);return s?1===s.length?i+"<"+s.join("").slice(1)+">":i+"<\n"+s.map((function(e){return n+" "+e})).join("\n")+"\n"+n+" >":i+"<>"}return i+JSON.stringify(r,null,2).split("\n").map((function(e,t){return 0===t?e:n+" "+e})).join("\n")})).join("\n")+(e.boxes?"\n"+zt(e.boxes,t+1):"")})).join("\n")};var ln,dn,un,hn,pn,mn,gn,fn={inspect:Ft,textify:zt,parseType:an,findBox:Kt,parseTraf:cn.traf,parseTfdt:cn.tfdt,parseHdlr:cn.hdlr,parseTfhd:cn.tfhd,parseTrun:cn.trun,parseSidx:cn.sidx},bn=function(e){for(var t=0,n=String.fromCharCode(e[t]),i="";"\0"!==n;)i+=n,t++,n=String.fromCharCode(e[t]);return i+=n},yn=z.getUint64,jn=function(e,t){var n="\0"!==t.scheme_id_uri,i=0===e&&_n(t.presentation_time_delta)&&n,r=1===e&&_n(t.presentation_time)&&n;return!(e>1)&&i||r},_n=function(e){return void 0!==e||null!==e},vn={parseEmsgBox:function(e){var t,n,i,r,s,a,o,c=4,l=e[0];if(0===l)c+=(t=bn(e.subarray(c))).length,c+=(n=bn(e.subarray(c))).length,i=(d=new DataView(e.buffer)).getUint32(c),c+=4,s=d.getUint32(c),c+=4,a=d.getUint32(c),c+=4,o=d.getUint32(c),c+=4;else if(1===l){var d;i=(d=new DataView(e.buffer)).getUint32(c),c+=4,r=yn(e.subarray(c)),c+=8,a=d.getUint32(c),c+=4,o=d.getUint32(c),c+=4,c+=(t=bn(e.subarray(c))).length,c+=(n=bn(e.subarray(c))).length}var u={scheme_id_uri:t,value:n,timescale:i||1,presentation_time:r,presentation_time_delta:s,event_duration:a,id:o,message_data:new Uint8Array(e.subarray(c,e.byteLength))};return jn(l,u)?u:void 0},scaleTime:function(e,t,n,i){return e||0===e?e/t:i+n/t}},xn="undefined"!==typeof window?window:"undefined"!==typeof t?t:"undefined"!==typeof self?self:{},On=Ht,Tn=Vt,Sn=Kt,wn=Wt,An=vn,kn=$t,Cn=nn,En=Jt,In=z.getUint64,Dn=xn,Pn=Fe.parseId3Frames;ln=function(e){return Sn(e,["moov","trak"]).reduce((function(e,t){var n,i,r,s,a;return(n=Sn(t,["tkhd"])[0])?(i=n[0],s=On(n[r=0===i?12:20]<<24|n[r+1]<<16|n[r+2]<<8|n[r+3]),(a=Sn(t,["mdia","mdhd"])[0])?(r=0===(i=a[0])?12:20,e[s]=On(a[r]<<24|a[r+1]<<16|a[r+2]<<8|a[r+3]),e):null):null}),{})},dn=function(e,t){var n=Sn(t,["moof","traf"]).reduce((function(t,n){var i,r=Sn(n,["tfhd"])[0],s=On(r[4]<<24|r[5]<<16|r[6]<<8|r[7]),a=e[s]||9e4,o=Sn(n,["tfdt"])[0],c=new DataView(o.buffer,o.byteOffset,o.byteLength);let l;return"bigint"===typeof(i=1===o[0]?In(o.subarray(4,12)):c.getUint32(4))?l=i/Dn.BigInt(a):"number"!==typeof i||isNaN(i)||(l=i/a),l<Number.MAX_SAFE_INTEGER&&(l=Number(l)),l<t&&(t=l),t}),1/0);return"bigint"===typeof n||isFinite(n)?n:0},un=function(e,t){var n,i=Sn(t,["moof","traf"]),r=0,s=0;if(i&&i.length){var a=Sn(i[0],["tfhd"])[0],o=Sn(i[0],["trun"])[0],c=Sn(i[0],["tfdt"])[0];if(a)n=kn(a).trackId;if(c)r=En(c).baseMediaDecodeTime;if(o){var l=Cn(o);l.samples&&l.samples.length&&(s=l.samples[0].compositionTimeOffset||0)}}var d=e[n]||9e4;"bigint"===typeof r&&(s=Dn.BigInt(s),d=Dn.BigInt(d));var u=(r+s)/d;return"bigint"===typeof u&&u<Number.MAX_SAFE_INTEGER&&(u=Number(u)),u},hn=function(e){var t=Sn(e,["moov","trak"]),n=[];return t.forEach((function(e){var t=Sn(e,["mdia","hdlr"]),i=Sn(e,["tkhd"]);t.forEach((function(e,t){var r,s,a=wn(e.subarray(8,12)),o=i[t];"vide"===a&&(s=0===(r=new DataView(o.buffer,o.byteOffset,o.byteLength)).getUint8(0)?r.getUint32(12):r.getUint32(20),n.push(s))}))})),n},mn=function(e){var t=0===e[0]?12:20;return On(e[t]<<24|e[t+1]<<16|e[t+2]<<8|e[t+3])},pn=function(e){var t=Sn(e,["moov","trak"]),n=[];return t.forEach((function(e){var t,i,r={},s=Sn(e,["tkhd"])[0];s&&(i=(t=new DataView(s.buffer,s.byteOffset,s.byteLength)).getUint8(0),r.id=0===i?t.getUint32(12):t.getUint32(20));var a=Sn(e,["mdia","hdlr"])[0];if(a){var o=wn(a.subarray(8,12));r.type="vide"===o?"video":"soun"===o?"audio":o}var c=Sn(e,["mdia","minf","stbl","stsd"])[0];if(c){var l=c.subarray(8);r.codec=wn(l.subarray(4,8));var d,u=Sn(l,[r.codec])[0];u&&(/^[asm]vc[1-9]$/i.test(r.codec)?(d=u.subarray(78),"avcC"===wn(d.subarray(4,8))&&d.length>11?(r.codec+=".",r.codec+=Tn(d[9]),r.codec+=Tn(d[10]),r.codec+=Tn(d[11])):r.codec="avc1.4d400d"):/^mp4[a,v]$/i.test(r.codec)?(d=u.subarray(28),"esds"===wn(d.subarray(4,8))&&d.length>20&&0!==d[19]?(r.codec+="."+Tn(d[19]),r.codec+="."+Tn(d[20]>>>2&63).replace(/^0/,"")):r.codec="mp4a.40.2"):r.codec=r.codec.toLowerCase())}var h=Sn(e,["mdia","mdhd"])[0];h&&(r.timescale=mn(h)),n.push(r)})),n},gn=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return Sn(e,["emsg"]).map((e=>{var n=An.parseEmsgBox(new Uint8Array(e)),i=Pn(n.message_data);return{cueTime:An.scaleTime(n.presentation_time,n.timescale,n.presentation_time_delta,t),duration:An.scaleTime(n.event_duration,n.timescale),frames:i}}))};var Rn={findBox:Sn,parseType:wn,timescale:ln,startTime:dn,compositionStartTime:un,videoTrackIds:hn,tracks:pn,getTimescaleFromMediaHeader:mn,getEmsgID3:gn};const{parseTrun:Ln}=fn,{findBox:Mn}=Rn;var Nn=xn,Bn={getMdatTrafPairs:function(e){var t=Mn(e,["moof","traf"]),n=Mn(e,["mdat"]),i=[];return n.forEach((function(e,n){var r=t[n];i.push({mdat:e,traf:r})})),i},parseSamples:function(e,t,n){var i=t,r=n.defaultSampleDuration||0,s=n.defaultSampleSize||0,a=n.trackId,o=[];return e.forEach((function(e){var t=Ln(e).samples;t.forEach((function(e){void 0===e.duration&&(e.duration=r),void 0===e.size&&(e.size=s),e.trackId=a,e.dts=i,void 0===e.compositionTimeOffset&&(e.compositionTimeOffset=0),"bigint"===typeof i?(e.pts=i+Nn.BigInt(e.compositionTimeOffset),i+=Nn.BigInt(e.duration)):(e.pts=i+e.compositionTimeOffset,i+=e.duration)})),o=o.concat(t)})),o}},Un=de.discardEmulationPreventionBytes,Fn=Te.CaptionStream,zn=Kt,qn=Jt,Hn=$t,{getMdatTrafPairs:Vn,parseSamples:Wn}=Bn,Gn=function(e,t){for(var n=e,i=0;i<t.length;i++){var r=t[i];if(n<r.size)return r;n-=r.size}return null},Xn=function(e,t){var n={};return Vn(e).forEach((function(e){var i,r=e.mdat,s=e.traf,a=zn(s,["tfhd"]),o=Hn(a[0]),c=o.trackId,l=zn(s,["tfdt"]),d=l.length>0?qn(l[0]).baseMediaDecodeTime:0,u=zn(s,["trun"]);t===c&&u.length>0&&(i=function(e,t,n){var i,r,s,a,o=new DataView(e.buffer,e.byteOffset,e.byteLength),c={logs:[],seiNals:[]};for(r=0;r+4<e.length;r+=s)if(s=o.getUint32(r),r+=4,!(s<=0))switch(31&e[r]){case 6:var l=e.subarray(r+1,r+1+s),d=Gn(r,t);if(i={nalUnitType:"sei_rbsp",size:s,data:l,escapedRBSP:Un(l),trackId:n},d)i.pts=d.pts,i.dts=d.dts,a=d;else{if(!a){c.logs.push({level:"warn",message:"We've encountered a nal unit without data at "+r+" for trackId "+n+". See mux.js#223."});break}i.pts=a.pts,i.dts=a.dts}c.seiNals.push(i)}return c}(r,Wn(u,d,o),c),n[c]||(n[c]={seiNals:[],logs:[]}),n[c].seiNals=n[c].seiNals.concat(i.seiNals),n[c].logs=n[c].logs.concat(i.logs))})),n},Yn=function(){var e,t,n,i,r,s,a=!1;this.isInitialized=function(){return a},this.init=function(t){e=new Fn,a=!0,s=!!t&&t.isPartial,e.on("data",(function(e){e.startTime=e.startPts/i,e.endTime=e.endPts/i,r.captions.push(e),r.captionStreams[e.stream]=!0})),e.on("log",(function(e){r.logs.push(e)}))},this.isNewInit=function(e,t){return!(e&&0===e.length||t&&"object"===typeof t&&0===Object.keys(t).length)&&(n!==e[0]||i!==t[n])},this.parse=function(e,s,a){var o;if(!this.isInitialized())return null;if(!s||!a)return null;if(this.isNewInit(s,a))n=s[0],i=a[n];else if(null===n||!i)return t.push(e),null;for(;t.length>0;){var c=t.shift();this.parse(c,s,a)}return o=function(e,t,n){if(null===t)return null;var i=Xn(e,t)[t]||{};return{seiNals:i.seiNals,logs:i.logs,timescale:n}}(e,n,i),o&&o.logs&&(r.logs=r.logs.concat(o.logs)),null!==o&&o.seiNals?(this.pushNals(o.seiNals),this.flushStream(),r):r.logs.length?{logs:r.logs,captions:[],captionStreams:[]}:null},this.pushNals=function(t){if(!this.isInitialized()||!t||0===t.length)return null;t.forEach((function(t){e.push(t)}))},this.flushStream=function(){if(!this.isInitialized())return null;s?e.partialFlush():e.flush()},this.clearParsedCaptions=function(){r.captions=[],r.captionStreams={},r.logs=[]},this.resetCaptionStream=function(){if(!this.isInitialized())return null;e.reset()},this.clearAllCaptions=function(){this.clearParsedCaptions(),this.resetCaptionStream()},this.reset=function(){t=[],n=null,i=null,r?this.clearParsedCaptions():r={captions:[],captionStreams:{},logs:[]},this.resetCaptionStream()},this.reset()};const{parseTfdt:Kn}=fn,Qn=Kt,{getTimescaleFromMediaHeader:Zn}=Rn,{parseSamples:Jn,getMdatTrafPairs:$n}=Bn;var ei=function(){let e=9e4;this.init=function(t){const n=Qn(t,["moov","trak","mdia","mdhd"])[0];n&&(e=Zn(n))},this.parseSegment=function(t){const n=[],i=$n(t);let r=0;return i.forEach((function(t){const i=t.mdat,s=t.traf,a=Qn(s,["tfdt"])[0],o=Qn(s,["tfhd"])[0],c=Qn(s,["trun"]);if(a){const e=Kn(a);r=e.baseMediaDecodeTime}if(c.length&&o){const t=Jn(c,r,o);let s=0;t.forEach((function(t){const r=new TextDecoder("utf-8"),a=i.slice(s,s+t.size);if(Qn(a,["vtte"])[0])return void(s+=t.size);Qn(a,["vttc"]).forEach((function(i){const s=Qn(i,["payl"])[0],a=Qn(i,["sttg"])[0],o=t.pts/e,c=(t.pts+t.duration)/e;let l,d;if(s)try{l=r.decode(s)}catch(u){console.error(u)}if(a)try{d=r.decode(a)}catch(u){console.error(u)}t.duration&&l&&n.push({cueText:l,start:o,end:c,settings:d})})),s+=t.size}))}})),n}},ti=Se,ni=function(e){var t=31&e[1];return t<<=8,t|=e[2]},ii=function(e){return!!(64&e[1])},ri=function(e){var t=0;return(48&e[3])>>>4>1&&(t+=e[4]+1),t},si=function(e){switch(e){case 5:return"slice_layer_without_partitioning_rbsp_idr";case 6:return"sei_rbsp";case 7:return"seq_parameter_set_rbsp";case 8:return"pic_parameter_set_rbsp";case 9:return"access_unit_delimiter_rbsp";default:return null}},ai={parseType:function(e,t){var n=ni(e);return 0===n?"pat":n===t?"pmt":t?"pes":null},parsePat:function(e){var t=ii(e),n=4+ri(e);return t&&(n+=e[n]+1),(31&e[n+10])<<8|e[n+11]},parsePmt:function(e){var t={},n=ii(e),i=4+ri(e);if(n&&(i+=e[i]+1),1&e[i+5]){var r;r=3+((15&e[i+1])<<8|e[i+2])-4;for(var s=12+((15&e[i+10])<<8|e[i+11]);s<r;){var a=i+s;t[(31&e[a+1])<<8|e[a+2]]=e[a],s+=5+((15&e[a+3])<<8|e[a+4])}return t}},parsePayloadUnitStartIndicator:ii,parsePesType:function(e,t){switch(t[ni(e)]){case ti.H264_STREAM_TYPE:return"video";case ti.ADTS_STREAM_TYPE:return"audio";case ti.METADATA_STREAM_TYPE:return"timed-metadata";default:return null}},parsePesTime:function(e){if(!ii(e))return null;var t=4+ri(e);if(t>=e.byteLength)return null;var n,i=null;return 192&(n=e[t+7])&&((i={}).pts=(14&e[t+9])<<27|(255&e[t+10])<<20|(254&e[t+11])<<12|(255&e[t+12])<<5|(254&e[t+13])>>>3,i.pts*=4,i.pts+=(6&e[t+13])>>>1,i.dts=i.pts,64&n&&(i.dts=(14&e[t+14])<<27|(255&e[t+15])<<20|(254&e[t+16])<<12|(255&e[t+17])<<5|(254&e[t+18])>>>3,i.dts*=4,i.dts+=(6&e[t+18])>>>1)),i},videoPacketContainsKeyFrame:function(e){for(var t=4+ri(e),n=e.subarray(t),i=0,r=0,s=!1;r<n.byteLength-3;r++)if(1===n[r+2]){i=r+5;break}for(;i<n.byteLength;)switch(n[i]){case 0:if(0!==n[i-1]){i+=2;break}if(0!==n[i-2]){i++;break}r+3!==i-2&&"slice_layer_without_partitioning_rbsp_idr"===si(31&n[r+3])&&(s=!0);do{i++}while(1!==n[i]&&i<n.length);r=i-2,i+=3;break;case 1:if(0!==n[i-1]||0!==n[i-2]){i+=3;break}"slice_layer_without_partitioning_rbsp_idr"===si(31&n[r+3])&&(s=!0),r=i-2,i+=3;break;default:i+=3}return n=n.subarray(r),i-=r,r=0,n&&n.byteLength>3&&"slice_layer_without_partitioning_rbsp_idr"===si(31&n[r+3])&&(s=!0),s}},oi=Se,ci=Ie.handleRollover,li={};li.ts=ai,li.aac=ft;var di=re.ONE_SECOND_IN_TS,ui=188,hi=71,pi=function(e,t,n){for(var i,r,s,a,o=0,c=ui,l=!1;c<=e.byteLength;)if(e[o]!==hi||e[c]!==hi&&c!==e.byteLength)o++,c++;else{if(i=e.subarray(o,c),"pes"===li.ts.parseType(i,t.pid))r=li.ts.parsePesType(i,t.table),s=li.ts.parsePayloadUnitStartIndicator(i),"audio"===r&&s&&(a=li.ts.parsePesTime(i))&&(a.type="audio",n.audio.push(a),l=!0);if(l)break;o+=ui,c+=ui}for(o=(c=e.byteLength)-ui,l=!1;o>=0;)if(e[o]!==hi||e[c]!==hi&&c!==e.byteLength)o--,c--;else{if(i=e.subarray(o,c),"pes"===li.ts.parseType(i,t.pid))r=li.ts.parsePesType(i,t.table),s=li.ts.parsePayloadUnitStartIndicator(i),"audio"===r&&s&&(a=li.ts.parsePesTime(i))&&(a.type="audio",n.audio.push(a),l=!0);if(l)break;o-=ui,c-=ui}},mi=function(e,t,n){for(var i,r,s,a,o,c,l,d=0,u=ui,h=!1,p={data:[],size:0};u<e.byteLength;)if(e[d]!==hi||e[u]!==hi)d++,u++;else{if(i=e.subarray(d,u),"pes"===li.ts.parseType(i,t.pid))if(r=li.ts.parsePesType(i,t.table),s=li.ts.parsePayloadUnitStartIndicator(i),"video"===r&&(s&&!h&&(a=li.ts.parsePesTime(i))&&(a.type="video",n.video.push(a),h=!0),!n.firstKeyFrame)){if(s&&0!==p.size){for(o=new Uint8Array(p.size),c=0;p.data.length;)l=p.data.shift(),o.set(l,c),c+=l.byteLength;if(li.ts.videoPacketContainsKeyFrame(o)){var m=li.ts.parsePesTime(o);m?(n.firstKeyFrame=m,n.firstKeyFrame.type="video"):console.warn("Failed to extract PTS/DTS from PES at first keyframe. This could be an unusual TS segment, or else mux.js did not parse your TS segment correctly. If you know your TS segments do contain PTS/DTS on keyframes please file a bug report! You can try ffprobe to double check for yourself.")}p.size=0}p.data.push(i),p.size+=i.byteLength}if(h&&n.firstKeyFrame)break;d+=ui,u+=ui}for(d=(u=e.byteLength)-ui,h=!1;d>=0;)if(e[d]!==hi||e[u]!==hi)d--,u--;else{if(i=e.subarray(d,u),"pes"===li.ts.parseType(i,t.pid))r=li.ts.parsePesType(i,t.table),s=li.ts.parsePayloadUnitStartIndicator(i),"video"===r&&s&&(a=li.ts.parsePesTime(i))&&(a.type="video",n.video.push(a),h=!0);if(h)break;d-=ui,u-=ui}},gi=function(e){var t={pid:null,table:null},n={};for(var i in function(e,t){for(var n,i=0,r=ui;r<e.byteLength;)if(e[i]!==hi||e[r]!==hi)i++,r++;else{switch(n=e.subarray(i,r),li.ts.parseType(n,t.pid)){case"pat":t.pid=li.ts.parsePat(n);break;case"pmt":var s=li.ts.parsePmt(n);t.table=t.table||{},Object.keys(s).forEach((function(e){t.table[e]=s[e]}))}i+=ui,r+=ui}}(e,t),t.table){if(t.table.hasOwnProperty(i))switch(t.table[i]){case oi.H264_STREAM_TYPE:n.video=[],mi(e,t,n),0===n.video.length&&delete n.video;break;case oi.ADTS_STREAM_TYPE:n.audio=[],pi(e,t,n),0===n.audio.length&&delete n.audio}}return n},fi=function(e,t){var n;return n=li.aac.isLikelyAacData(e)?function(e){for(var t,n=!1,i=0,r=null,s=null,a=0,o=0;e.length-o>=3;){switch(li.aac.parseType(e,o)){case"timed-metadata":if(e.length-o<10){n=!0;break}if((a=li.aac.parseId3TagSize(e,o))>e.length){n=!0;break}null===s&&(t=e.subarray(o,o+a),s=li.aac.parseAacTimestamp(t)),o+=a;break;case"audio":if(e.length-o<7){n=!0;break}if((a=li.aac.parseAdtsSize(e,o))>e.length){n=!0;break}null===r&&(t=e.subarray(o,o+a),r=li.aac.parseSampleRate(t)),i++,o+=a;break;default:o++}if(n)return null}if(null===r||null===s)return null;var c=di/r;return{audio:[{type:"audio",dts:s,pts:s},{type:"audio",dts:s+1024*i*c,pts:s+1024*i*c}]}}(e):gi(e),n&&(n.audio||n.video)?(function(e,t){if(e.audio&&e.audio.length){var n=t;("undefined"===typeof n||isNaN(n))&&(n=e.audio[0].dts),e.audio.forEach((function(e){e.dts=ci(e.dts,n),e.pts=ci(e.pts,n),e.dtsTime=e.dts/di,e.ptsTime=e.pts/di}))}if(e.video&&e.video.length){var i=t;if(("undefined"===typeof i||isNaN(i))&&(i=e.video[0].dts),e.video.forEach((function(e){e.dts=ci(e.dts,i),e.pts=ci(e.pts,i),e.dtsTime=e.dts/di,e.ptsTime=e.pts/di})),e.firstKeyFrame){var r=e.firstKeyFrame;r.dts=ci(r.dts,i),r.pts=ci(r.pts,i),r.dtsTime=r.dts/di,r.ptsTime=r.pts/di}}}(n,t),n):null};class bi{constructor(e,t){this.options=t||{},this.self=e,this.init()}init(){this.transmuxer&&this.transmuxer.dispose(),this.transmuxer=new qt.Transmuxer(this.options),function(e,t){t.on("data",(function(t){const n=t.initSegment;t.initSegment={data:n.buffer,byteOffset:n.byteOffset,byteLength:n.byteLength};const i=t.data;t.data=i.buffer,e.postMessage({action:"data",segment:t,byteOffset:i.byteOffset,byteLength:i.byteLength},[t.data])})),t.on("done",(function(t){e.postMessage({action:"done"})})),t.on("gopInfo",(function(t){e.postMessage({action:"gopInfo",gopInfo:t})})),t.on("videoSegmentTimingInfo",(function(t){const n={start:{decode:re.videoTsToSeconds(t.start.dts),presentation:re.videoTsToSeconds(t.start.pts)},end:{decode:re.videoTsToSeconds(t.end.dts),presentation:re.videoTsToSeconds(t.end.pts)},baseMediaDecodeTime:re.videoTsToSeconds(t.baseMediaDecodeTime)};t.prependedContentDuration&&(n.prependedContentDuration=re.videoTsToSeconds(t.prependedContentDuration)),e.postMessage({action:"videoSegmentTimingInfo",videoSegmentTimingInfo:n})})),t.on("audioSegmentTimingInfo",(function(t){const n={start:{decode:re.videoTsToSeconds(t.start.dts),presentation:re.videoTsToSeconds(t.start.pts)},end:{decode:re.videoTsToSeconds(t.end.dts),presentation:re.videoTsToSeconds(t.end.pts)},baseMediaDecodeTime:re.videoTsToSeconds(t.baseMediaDecodeTime)};t.prependedContentDuration&&(n.prependedContentDuration=re.videoTsToSeconds(t.prependedContentDuration)),e.postMessage({action:"audioSegmentTimingInfo",audioSegmentTimingInfo:n})})),t.on("id3Frame",(function(t){e.postMessage({action:"id3Frame",id3Frame:t})})),t.on("caption",(function(t){e.postMessage({action:"caption",caption:t})})),t.on("trackinfo",(function(t){e.postMessage({action:"trackinfo",trackInfo:t})})),t.on("audioTimingInfo",(function(t){e.postMessage({action:"audioTimingInfo",audioTimingInfo:{start:re.videoTsToSeconds(t.start),end:re.videoTsToSeconds(t.end)}})})),t.on("videoTimingInfo",(function(t){e.postMessage({action:"videoTimingInfo",videoTimingInfo:{start:re.videoTsToSeconds(t.start),end:re.videoTsToSeconds(t.end)}})})),t.on("log",(function(t){e.postMessage({action:"log",log:t})}))}(this.self,this.transmuxer)}pushMp4Captions(e){this.captionParser||(this.captionParser=new Yn,this.captionParser.init());const t=new Uint8Array(e.data,e.byteOffset,e.byteLength),n=this.captionParser.parse(t,e.trackIds,e.timescales);this.self.postMessage({action:"mp4Captions",captions:n&&n.captions||[],logs:n&&n.logs||[],data:t.buffer},[t.buffer])}initMp4WebVttParser(e){this.webVttParser||(this.webVttParser=new ei);const t=new Uint8Array(e.data,e.byteOffset,e.byteLength);this.webVttParser.init(t)}getMp4WebVttText(e){this.webVttParser||(this.webVttParser=new ei);const t=new Uint8Array(e.data,e.byteOffset,e.byteLength),n=this.webVttParser.parseSegment(t);this.self.postMessage({action:"getMp4WebVttText",mp4VttCues:n||[],data:t.buffer},[t.buffer])}probeMp4StartTime(e){let{timescales:t,data:n}=e;const i=Rn.startTime(t,n);this.self.postMessage({action:"probeMp4StartTime",startTime:i,data:n},[n.buffer])}probeMp4Tracks(e){let{data:t}=e;const n=Rn.tracks(t);this.self.postMessage({action:"probeMp4Tracks",tracks:n,data:t},[t.buffer])}probeEmsgID3(e){let{data:t,offset:n}=e;const i=Rn.getEmsgID3(t,n);this.self.postMessage({action:"probeEmsgID3",id3Frames:i,emsgData:t},[t.buffer])}probeTs(e){let{data:t,baseStartTime:n}=e;const i="number"!==typeof n||isNaN(n)?void 0:n*re.ONE_SECOND_IN_TS,r=fi(t,i);let s=null;r&&(s={hasVideo:r.video&&2===r.video.length||!1,hasAudio:r.audio&&2===r.audio.length||!1},s.hasVideo&&(s.videoStart=r.video[0].ptsTime),s.hasAudio&&(s.audioStart=r.audio[0].ptsTime)),this.self.postMessage({action:"probeTs",result:s,data:t},[t.buffer])}clearAllMp4Captions(){this.captionParser&&this.captionParser.clearAllCaptions()}clearParsedMp4Captions(){this.captionParser&&this.captionParser.clearParsedCaptions()}push(e){const t=new Uint8Array(e.data,e.byteOffset,e.byteLength);this.transmuxer.push(t)}reset(){this.transmuxer.reset()}setTimestampOffset(e){const t=e.timestampOffset||0;this.transmuxer.setBaseMediaDecodeTime(Math.round(re.secondsToVideoTs(t)))}setAudioAppendStart(e){this.transmuxer.setAudioAppendStart(Math.ceil(re.secondsToVideoTs(e.appendStart)))}setRemux(e){this.transmuxer.setRemux(e.remux)}flush(e){this.transmuxer.flush(),self.postMessage({action:"done",type:"transmuxed"})}endTimeline(){this.transmuxer.endTimeline(),self.postMessage({action:"endedtimeline",type:"transmuxed"})}alignGopsWith(e){this.transmuxer.alignGopsWith(e.gopsToAlignWith.slice())}}
2self.onmessage=function(e){"init"===e.data.action&&e.data.options?this.messageHandlers=new bi(self,e.data.options):(this.messageHandlers||(this.messageHandlers=new bi(self)),e.data&&e.data.action&&"init"!==e.data.action&&this.messageHandlers[e.data.action]&&this.messageHandlers[e.data.action](e.data))}})));var va=ba(_a);const xa=e=>{const{transmuxer:t,bytes:n,audioAppendStart:i,gopsToAlignWith:r,remux:s,onData:a,onTrackInfo:o,onAudioTimingInfo:c,onVideoTimingInfo:l,onVideoSegmentTimingInfo:d,onAudioSegmentTimingInfo:u,onId3:h,onCaptions:p,onDone:m,onEndedTimeline:g,onTransmuxerLog:f,isEndOfTimeline:b,segment:y,triggerSegmentEventFn:j}=e,_={buffer:[]};let v=b;if(t.onmessage=n=>{t.currentTransmux===e&&("data"===n.data.action&&((e,t,n)=>{const{type:i,initSegment:r,captions:s,captionStreams:a,metadata:o,videoFrameDtsTime:c,videoFramePtsTime:l}=e.data.segment;t.buffer.push({captions:s,captionStreams:a,metadata:o});const d=e.data.segment.boxes||{data:e.data.segment.data},u={type:i,data:new Uint8Array(d.data,d.data.byteOffset,d.data.byteLength),initSegment:new Uint8Array(r.data,r.byteOffset,r.byteLength)};"undefined"!==typeof c&&(u.videoFrameDtsTime=c),"undefined"!==typeof l&&(u.videoFramePtsTime=l),n(u)})(n,_,a),"trackinfo"===n.data.action&&o(n.data.trackInfo),"gopInfo"===n.data.action&&((e,t)=>{t.gopInfo=e.data.gopInfo})(n,_),"audioTimingInfo"===n.data.action&&c(n.data.audioTimingInfo),"videoTimingInfo"===n.data.action&&l(n.data.videoTimingInfo),"videoSegmentTimingInfo"===n.data.action&&d(n.data.videoSegmentTimingInfo),"audioSegmentTimingInfo"===n.data.action&&u(n.data.audioSegmentTimingInfo),"id3Frame"===n.data.action&&h([n.data.id3Frame],n.data.id3Frame.dispatchType),"caption"===n.data.action&&p(n.data.caption),"endedtimeline"===n.data.action&&(v=!1,g()),"log"===n.data.action&&f(n.data.log),"transmuxed"===n.data.type&&(v||(t.onmessage=null,(e=>{let{transmuxedData:t,callback:n}=e;t.buffer=[],n(t)})({transmuxedData:_,callback:m}),Oa(t))))},t.onerror=()=>{const e={message:"Received an error message from the transmuxer worker",metadata:{errorType:Hr.Error.StreamingFailedToTransmuxSegment,segmentInfo:po({segment:y})}};m(null,e)},i&&t.postMessage({action:"setAudioAppendStart",appendStart:i}),Array.isArray(r)&&t.postMessage({action:"alignGopsWith",gopsToAlignWith:r}),"undefined"!==typeof s&&t.postMessage({action:"setRemux",remux:s}),n.byteLength){const e=n instanceof ArrayBuffer?n:n.buffer,i=n instanceof ArrayBuffer?0:n.byteOffset;j({type:"segmenttransmuxingstart",segment:y}),t.postMessage({action:"push",data:e,byteOffset:i,byteLength:n.byteLength},[e])}b&&t.postMessage({action:"endTimeline"}),t.postMessage({action:"flush"})},Oa=e=>{e.currentTransmux=null,e.transmuxQueue.length&&(e.currentTransmux=e.transmuxQueue.shift(),"function"===typeof e.currentTransmux?e.currentTransmux():xa(e.currentTransmux))},Ta=(e,t)=>{e.postMessage({action:t}),Oa(e)},Sa=(e,t)=>{if(!t.currentTransmux)return t.currentTransmux=e,void Ta(t,e);t.transmuxQueue.push(Ta.bind(null,t,e))},wa=e=>{if(!e.transmuxer.currentTransmux)return e.transmuxer.currentTransmux=e,void xa(e);e.transmuxer.transmuxQueue.push(e)};var Aa=e=>{Sa("reset",e)},ka=e=>{const t=new va;t.currentTransmux=null,t.transmuxQueue=[];const n=t.terminate;return t.terminate=()=>(t.currentTransmux=null,t.transmuxQueue.length=0,n.call(t)),t.postMessage({action:"init",options:e}),t};const Ca=function(e){const t=e.transmuxer,n=e.endAction||e.action,i=e.callback,r=h()({},e,{endAction:null,transmuxer:null,callback:null}),s=r=>{r.data.action===n&&(t.removeEventListener("message",s),r.data.data&&(r.data.data=new Uint8Array(r.data.data,e.byteOffset||0,e.byteLength||r.data.data.byteLength),e.data&&(e.data=r.data.data)),i(r.data))};if(t.addEventListener("message",s),e.data){const n=e.data instanceof ArrayBuffer;r.byteOffset=n?0:e.data.byteOffset,r.byteLength=e.data.byteLength;const i=[n?e.data:e.data.buffer];t.postMessage(r,i)}else t.postMessage(r)},Ea=2,Ia=-101,Da=-102,Pa="wvtt",Ra=e=>{e.forEach((e=>{e.abort()}))},La=(e,t)=>{const{requestType:n}=t,i=Ps({requestType:n,request:t,error:e});return t.timedout?{status:t.status,message:"HLS request timed-out at URL: "+t.uri,code:Ia,xhr:t,metadata:i}:t.aborted?{status:t.status,message:"HLS request aborted at URL: "+t.uri,code:Da,xhr:t,metadata:i}:e?{status:t.status,message:"HLS request errored at URL: "+t.uri,code:Ea,xhr:t,metadata:i}:"arraybuffer"===t.responseType&&0===t.response.byteLength?{status:t.status,message:"Empty HLS response at URL: "+t.uri,code:Ea,xhr:t,metadata:i}:null},Ma=(e,t,n,i)=>(r,s)=>{const a=s.response,o=La(r,s);if(o)return n(o,e);if(16!==a.byteLength)return n({status:s.status,message:"Invalid HLS key at URL: "+s.uri,code:Ea,xhr:s},e);const c=new DataView(a),l=new Uint32Array([c.getUint32(0),c.getUint32(4),c.getUint32(8),c.getUint32(12)]);for(let e=0;e<t.length;e++)t[e].bytes=l;const d={uri:s.uri};return i({type:"segmentkeyloadcomplete",segment:e,keyInfo:d}),n(null,e)},Na=(e,t)=>{const n=Object(x.a)(e.map.bytes);if("mp4"!==n){const i=e.map.resolvedUri||e.map.uri,r=n||"unknown";return t({internal:!0,message:"Found unsupported ".concat(r," container for initialization segment at URL: ").concat(i),code:Ea,metadata:{mediaType:r}})}Ca({action:"probeMp4Tracks",data:e.map.bytes,transmuxer:e.transmuxer,callback:n=>{let{tracks:i,data:r}=n;
2return e.map.bytes=r,i.forEach((function(t){e.map.tracks=e.map.tracks||{},e.map.tracks[t.type]||(e.map.tracks[t.type]=t,"number"===typeof t.id&&t.timescale&&(e.map.timescales=e.map.timescales||{},e.map.timescales[t.id]=t.timescale),"text"===t.type&&((e,t)=>{t===Pa&&e.transmuxer.postMessage({action:"initMp4WebVttParser",data:e.map.bytes})})(e,t.codec))})),t(null)}})},Ba=e=>{let{segment:t,finishProcessingFn:n,responseType:i,triggerSegmentEventFn:r}=e;return(e,s)=>{const a=La(e,s);if(a)return n(a,t);r({type:"segmentloaded",segment:t});const o="arraybuffer"!==i&&s.responseText?(e=>{const t=new Uint8Array(new ArrayBuffer(e.length));for(let n=0;n<e.length;n++)t[n]=e.charCodeAt(n);return t.buffer})(s.responseText.substring(t.lastReachedChar||0)):s.response;return t.stats=(e=>({bandwidth:e.bandwidth,bytesReceived:e.bytesReceived||0,roundTripTime:e.roundTripTime||0}))(s),t.key?t.encryptedBytes=new Uint8Array(o):t.bytes=new Uint8Array(o),n(null,t)}},Ua=e=>{let{segment:t,bytes:n,trackInfoFn:i,timingInfoFn:r,videoSegmentTimingInfoFn:s,audioSegmentTimingInfoFn:a,id3Fn:o,captionsFn:c,isEndOfTimeline:l,endedTimelineFn:d,dataFn:u,doneFn:h,onTransmuxerLog:p,triggerSegmentEventFn:m}=e;const g=t.map&&t.map.tracks||{},f=Boolean(g.audio&&g.video);let b=r.bind(null,t,"audio","start");const y=r.bind(null,t,"audio","end");let j=r.bind(null,t,"video","start");const _=r.bind(null,t,"video","end");Ca({action:"probeTs",transmuxer:t.transmuxer,data:n,baseStartTime:t.baseStartTime,callback:e=>{t.bytes=n=e.data;const r=e.result;r&&(i(t,{hasAudio:r.hasAudio,hasVideo:r.hasVideo,isMuxed:f}),i=null),wa({bytes:n,transmuxer:t.transmuxer,audioAppendStart:t.audioAppendStart,gopsToAlignWith:t.gopsToAlignWith,remux:f,onData:e=>{e.type="combined"===e.type?"video":e.type,u(t,e)},onTrackInfo:e=>{i&&(f&&(e.isMuxed=!0),i(t,e))},onAudioTimingInfo:e=>{b&&"undefined"!==typeof e.start&&(b(e.start),b=null),y&&"undefined"!==typeof e.end&&y(e.end)},onVideoTimingInfo:e=>{j&&"undefined"!==typeof e.start&&(j(e.start),j=null),_&&"undefined"!==typeof e.end&&_(e.end)},onVideoSegmentTimingInfo:e=>{const n={pts:{start:e.start.presentation,end:e.end.presentation},dts:{start:e.start.decode,end:e.end.decode}};m({type:"segmenttransmuxingtiminginfoavailable",segment:t,timingInfo:n}),s(e)},onAudioSegmentTimingInfo:e=>{const n={pts:{start:e.start.pts,end:e.end.pts},dts:{start:e.start.dts,end:e.end.dts}};m({type:"segmenttransmuxingtiminginfoavailable",segment:t,timingInfo:n}),a(e)},onId3:(e,n)=>{o(t,e,n)},onCaptions:e=>{c(t,[e])},isEndOfTimeline:l,onEndedTimeline:()=>{d()},onTransmuxerLog:p,onDone:(e,n)=>{h&&(e.type="combined"===e.type?"video":e.type,m({type:"segmenttransmuxingcomplete",segment:t}),h(n,t,e))},segment:t,triggerSegmentEventFn:m})}})},Fa=e=>{let{segment:t,bytes:n,trackInfoFn:i,timingInfoFn:r,videoSegmentTimingInfoFn:s,audioSegmentTimingInfoFn:a,id3Fn:o,captionsFn:c,isEndOfTimeline:l,endedTimelineFn:d,dataFn:u,doneFn:h,onTransmuxerLog:p,triggerSegmentEventFn:m}=e,g=new Uint8Array(n);if(Object(x.b)(g)){t.isFmp4=!0;const{tracks:e}=t.map;if(e.text&&(!e.audio||!e.video))return u(t,{data:g,type:"text"}),void((e,t,n)=>{t===Pa&&Ca({action:"getMp4WebVttText",data:e.bytes,transmuxer:e.transmuxer,callback:t=>{let{data:i,mp4VttCues:r}=t;e.bytes=i,n(null,e,{mp4VttCues:r})}})})(t,e.text.codec,h);const s={isFmp4:!0,hasVideo:!!e.video,hasAudio:!!e.audio};e.audio&&e.audio.codec&&"enca"!==e.audio.codec&&(s.audioCodec=e.audio.codec),e.video&&e.video.codec&&"encv"!==e.video.codec&&(s.videoCodec=e.video.codec),e.video&&e.audio&&(s.isMuxed=!0),i(t,s);const a=(e,n)=>{u(t,{data:g,type:s.hasAudio&&!s.isMuxed?"audio":"video"}),n&&n.length&&o(t,n),e&&e.length&&c(t,e),h(null,t,{})};Ca({action:"probeMp4StartTime",timescales:t.map.timescales,data:g,transmuxer:t.transmuxer,callback:i=>{let{data:o,startTime:c}=i;n=o.buffer,t.bytes=g=o,s.hasAudio&&!s.isMuxed&&r(t,"audio","start",c),s.hasVideo&&r(t,"video","start",c),Ca({action:"probeEmsgID3",data:g,transmuxer:t.transmuxer,offset:c,callback:i=>{let{emsgData:r,id3Frames:s}=i;n=r.buffer,t.bytes=g=r,e.video&&r.byteLength&&t.transmuxer?Ca({action:"pushMp4Captions",endAction:"mp4Captions",transmuxer:t.transmuxer,data:g,timescales:t.map.timescales,trackIds:[e.video.id],callback:e=>
2{n=e.data.buffer,t.bytes=g=e.data,e.logs.forEach((function(e){p(Zr(e,{stream:"mp4CaptionParser"}))})),a(e.captions,s)}}):a(void 0,s)}})}})}else if(t.transmuxer){if("undefined"===typeof t.container&&(t.container=Object(x.a)(g)),"ts"!==t.container&&"aac"!==t.container)return i(t,{hasAudio:!1,hasVideo:!1}),void h(null,t,{});Ua({segment:t,bytes:n,trackInfoFn:i,timingInfoFn:r,videoSegmentTimingInfoFn:s,audioSegmentTimingInfoFn:a,id3Fn:o,captionsFn:c,isEndOfTimeline:l,endedTimelineFn:d,dataFn:u,doneFn:h,onTransmuxerLog:p,triggerSegmentEventFn:m})}else h(null,t,{})},za=function(e,t){let{id:n,key:i,encryptedBytes:r,decryptionWorker:s,segment:a,doneFn:o}=e;const c=e=>{if(e.data.source===n){s.removeEventListener("message",c);const n=e.data.decrypted;t(new Uint8Array(n.bytes,n.byteOffset,n.byteLength))}};let l;s.onerror=()=>{const e="An error occurred in the decryption worker",t=po({segment:a}),n={message:e,metadata:{error:new Error(e),errorType:Hr.Error.StreamingFailedToDecryptSegment,segmentInfo:t,keyInfo:{uri:a.key.resolvedUri||a.map.key.resolvedUri}}};o(n,a)},s.addEventListener("message",c),l=i.bytes.slice?i.bytes.slice():new Uint32Array(Array.prototype.slice.call(i.bytes)),s.postMessage(ta({source:n,encrypted:r,key:l,iv:i.iv}),[r.buffer,l.buffer])},qa=e=>{let{activeXhrs:t,decryptionWorker:n,trackInfoFn:i,timingInfoFn:r,videoSegmentTimingInfoFn:s,audioSegmentTimingInfoFn:a,id3Fn:o,captionsFn:c,isEndOfTimeline:l,endedTimelineFn:d,dataFn:u,doneFn:h,onTransmuxerLog:p,triggerSegmentEventFn:m}=e,g=0,f=!1;return(e,b)=>{if(!f){if(e)return f=!0,Ra(t),h(e,b);if(g+=1,g===t.length){const e=function(){if(b.encryptedBytes)return(e=>{let{decryptionWorker:t,segment:n,trackInfoFn:i,timingInfoFn:r,videoSegmentTimingInfoFn:s,audioSegmentTimingInfoFn:a,id3Fn:o,captionsFn:c,isEndOfTimeline:l,endedTimelineFn:d,dataFn:u,doneFn:h,onTransmuxerLog:p,triggerSegmentEventFn:m}=e;m({type:"segmentdecryptionstart"}),za({id:n.requestId,key:n.key,encryptedBytes:n.encryptedBytes,decryptionWorker:t,segment:n,doneFn:h},(e=>{n.bytes=e,m({type:"segmentdecryptioncomplete",segment:n}),Fa({segment:n,bytes:n.bytes,trackInfoFn:i,timingInfoFn:r,videoSegmentTimingInfoFn:s,audioSegmentTimingInfoFn:a,id3Fn:o,captionsFn:c,isEndOfTimeline:l,endedTimelineFn:d,dataFn:u,doneFn:h,onTransmuxerLog:p,triggerSegmentEventFn:m})}))})({decryptionWorker:n,segment:b,trackInfoFn:i,timingInfoFn:r,videoSegmentTimingInfoFn:s,audioSegmentTimingInfoFn:a,id3Fn:o,captionsFn:c,isEndOfTimeline:l,endedTimelineFn:d,dataFn:u,doneFn:h,onTransmuxerLog:p,triggerSegmentEventFn:m});Fa({segment:b,bytes:b.bytes,trackInfoFn:i,timingInfoFn:r,videoSegmentTimingInfoFn:s,audioSegmentTimingInfoFn:a,id3Fn:o,captionsFn:c,isEndOfTimeline:l,endedTimelineFn:d,dataFn:u,doneFn:h,onTransmuxerLog:p,triggerSegmentEventFn:m})};if(b.endOfAllRequests=Date.now(),b.map&&b.map.encryptedBytes&&!b.map.bytes)return m({type:"segmentdecryptionstart",segment:b}),za({decryptionWorker:n,id:b.requestId+"-init",encryptedBytes:b.map.encryptedBytes,key:b.map.key,segment:b,doneFn:h},(n=>{b.map.bytes=n,m({type:"segmentdecryptioncomplete",segment:b}),Na(b,(n=>{if(n)return Ra(t),h(n,b);e()}))}));e()}}}},Ha=e=>{let{segment:t,progressFn:n,trackInfoFn:i,timingInfoFn:r,videoSegmentTimingInfoFn:s,audioSegmentTimingInfoFn:a,id3Fn:o,captionsFn:c,isEndOfTimeline:l,endedTimelineFn:d,dataFn:u}=e;return e=>{if(!e.target.aborted)return t.stats=Zr(t.stats,(e=>{const t=e.target,n={bandwidth:1/0,bytesReceived:0,roundTripTime:Date.now()-t.requestTime||0};return n.bytesReceived=e.loaded,n.bandwidth=Math.floor(n.bytesReceived/n.roundTripTime*8*1e3),n})(e)),!t.stats.firstBytesReceivedAt&&t.stats.bytesReceived&&(t.stats.firstBytesReceivedAt=Date.now()),n(e,t)}},Va=e=>{let{xhr:t,xhrOptions:n,decryptionWorker:i,segment:r,abortFn:s,progressFn:a,trackInfoFn:o,timingInfoFn:c,videoSegmentTimingInfoFn:l,audioSegmentTimingInfoFn:d,id3Fn:u,captionsFn:h,isEndOfTimeline:p,endedTimelineFn:m,dataFn:g,doneFn:f,onTransmuxerLog:b,triggerSegmentEventFn:y}=e;const j=[],_=qa({activeXhrs:j,decryptionWorker:i,trackInfoFn:o,timingInfoFn:c,videoSegmentTimingInfoFn:l,audioSegmentTimingInfoFn:d,id3Fn:u,captionsFn:h,isEndOfTimeline:p,endedTimelineFn:m,dataFn:g,doneFn:f,onTransmuxerLog:b,triggerSegmentEventFn:y});if(r.key&&!r.key.bytes){const e=[r.key];r.map&&!r.map.bytes&&r.map.key&&r.map.key.resolvedUri===r.key.resolvedUri&&e.push(r.map.key);const i=Zr(n,{uri:r.key.resolvedUri,responseType:"arraybuffer",requestType:"segment-key"}),s=Ma(r,e,_,y);y({type:"segmentkeyloadstart",segment:r,keyInfo:{uri:r.key.resolvedUri}});const a=t(i,s);j.push(a)}if(r.map&&!r.map.bytes){if(r.map.key&&(!r.key||r.key.resolvedUri!==r.map.key.resolvedUri)){const e=Zr(n,{uri:r.map.key.resolvedUri,responseType:"arraybuffer",requestType:"segment-key"}),i=Ma(r,[r.map.key],_,y);y({type:"segmentkeyloadstart",segment:r,keyInfo:{uri:r.map.key.resolvedUri}});const s=t(e,i);j.push(s)}const e=Zr(n,{uri:r.map.resolvedUri,responseType:"arraybuffer",headers:Zs(r.map),requestType:"segment-media-initialization"}),i=(e=>{let{segment:t,finishProcessingFn:n,triggerSegmentEventFn:i}=e;return(e,r)=>{const s=La(e,r);if(s)return n(s,t);const a=new Uint8Array(r.response);if(i({type:"segmentloaded",segment:t}),t.map.key)return t.map.encryptedBytes=a,n(null,t);t.map.bytes=a,Na(t,(function(e){if(e)return e.xhr=r,e.status=r.status,n(e,t);n(null,t)}))}})({segment:r,finishProcessingFn:_,triggerSegmentEventFn:y});y({type:"segmentloadstart",segment:r});const s=t(e,i);j.push(s)}const v=Zr(n,{uri:r.part&&r.part.resolvedUri||r.resolvedUri,responseType:"arraybuffer",headers:Zs(r),requestType:"segment"}),x=Ba({segment:r,finishProcessingFn:_,responseType:v.responseType,triggerSegmentEventFn:y});y({type:"segmentloadstart",segment:r});const O=t(v,x);O.addEventListener("progress",Ha({segment:r,progressFn:a,trackInfoFn:o,timingInfoFn:c,videoSegmentTimingInfoFn:l,audioSegmentTimingInfoFn:d,id3Fn:u,captionsFn:h,isEndOfTimeline:p,endedTimelineFn:m,dataFn:g})),j.push(O);const T={};
2return j.forEach((e=>{e.addEventListener("loadend",(e=>{let{loadendState:t,abortFn:n}=e;return e=>{e.target.aborted&&n&&!t.calledAbortFn&&(n(),t.calledAbortFn=!0)}})({loadendState:T,abortFn:s}))})),()=>Ra(j)},Wa=Qr("PlaylistSelector"),Ga=function(e){if(!e||!e.playlist)return;const t=e.playlist;return JSON.stringify({id:t.id,bandwidth:e.bandwidth,width:e.width,height:e.height,codecs:t.attributes&&t.attributes.CODECS||""})},Xa=function(e,t){if(!e)return"";const n=r.a.getComputedStyle(e);return n?n[t]:""},Ya=function(e,t){const n=e.slice();e.sort((function(e,i){const r=t(e,i);return 0===r?n.indexOf(e)-n.indexOf(i):r}))},Ka=function(e,t){let n,i;return e.attributes.BANDWIDTH&&(n=e.attributes.BANDWIDTH),n=n||r.a.Number.MAX_VALUE,t.attributes.BANDWIDTH&&(i=t.attributes.BANDWIDTH),i=i||r.a.Number.MAX_VALUE,n-i};let Qa=function(e){const{main:t,bandwidth:n,playerWidth:i,playerHeight:s,playerObjectFit:a,limitRenditionByPlayerDimensions:o,playlistController:c}=e;if(!t)return;const l={bandwidth:n,width:i,height:s,limitRenditionByPlayerDimensions:o};let d=t.playlists;Ss.isAudioOnly(t)&&(d=c.getAudioTrackPlaylists_(),l.audioOnly=!0);let u=d.map((e=>{let t;const n=e.attributes&&e.attributes.RESOLUTION&&e.attributes.RESOLUTION.width,i=e.attributes&&e.attributes.RESOLUTION&&e.attributes.RESOLUTION.height;return t=e.attributes&&e.attributes.BANDWIDTH,t=t||r.a.Number.MAX_VALUE,{bandwidth:t,width:n,height:i,playlist:e}}));Ya(u,((e,t)=>e.bandwidth-t.bandwidth)),u=u.filter((e=>!Ss.isIncompatible(e.playlist)));let h=u.filter((e=>Ss.isEnabled(e.playlist)));h.length||(h=u.filter((e=>!Ss.isDisabled(e.playlist))));const p=h.filter((e=>e.bandwidth*ga.BANDWIDTH_VARIANCE<n));let m=p[p.length-1];const g=p.filter((e=>e.bandwidth===m.bandwidth))[0];if(!1===o){const e=g||h[0]||u[0];if(e&&e.playlist){let t="sortedPlaylistReps";return g&&(t="bandwidthBestRep"),h[0]&&(t="enabledPlaylistReps"),Wa("choosing ".concat(Ga(e)," using ").concat(t," with options"),l),e.playlist}return Wa("could not choose a playlist with options",l),null}const f=p.filter((e=>e.width&&e.height));Ya(f,((e,t)=>e.width-t.width));const b=f.filter((e=>e.width===i&&e.height===s));m=b[b.length-1];const y=b.filter((e=>e.bandwidth===m.bandwidth))[0];let j,_,v,x;if(y||(j=f.filter((e=>"cover"===a?e.width>i&&e.height>s:e.width>i||e.height>s)),_=j.filter((e=>e.width===j[0].width&&e.height===j[0].height)),m=_[_.length-1],v=_.filter((e=>e.bandwidth===m.bandwidth))[0]),c.leastPixelDiffSelector){const e=f.map((e=>(e.pixelDiff=Math.abs(e.width-i)+Math.abs(e.height-s),e)));Ya(e,((e,t)=>e.pixelDiff===t.pixelDiff?t.bandwidth-e.bandwidth:e.pixelDiff-t.pixelDiff)),x=e[0]}const O=x||v||y||g||h[0]||u[0];if(O&&O.playlist){let e="sortedPlaylistReps";return x?e="leastPixelDiffRep":v?e="resolutionPlusOneRep":y?e="resolutionBestRep":g?e="bandwidthBestRep":h[0]&&(e="enabledPlaylistReps"),Wa("choosing ".concat(Ga(O)," using ").concat(e," with options"),l),O.playlist}return Wa("could not choose a playlist with options",l),null};const Za=function(){let e=this.useDevicePixelRatio&&r.a.devicePixelRatio||1;return isNaN(this.customPixelRatio)||(e=this.customPixelRatio),Qa({main:this.playlists.main,bandwidth:this.systemBandwidth,playerWidth:parseInt(Xa(this.tech_.el(),"width"),10)*e,playerHe
2ight:parseInt(Xa(this.tech_.el(),"height"),10)*e,playerObjectFit:this.usePlayerObjectFit?Xa(this.tech_.el(),"objectFit"):"",limitRenditionByPlayerDimensions:this.limitRenditionByPlayerDimensions,playlistController:this.playlistController_})};function Ja(e){try{return new URL(e).pathname.split("/").slice(-2).join("/")}catch(t){return""}}const $a=e=>{let{inbandTextTracks:t,metadataArray:n,timestampOffset:i,videoDuration:s}=e;if(!n)return;const a=r.a.WebKitDataCue||r.a.VTTCue,o=t.metadataTrack_;if(!o)return;if(n.forEach((e=>{const t=e.cueTime+i;!("number"!==typeof t||r.a.isNaN(t)||t<0)&&t<1/0&&e.frames&&e.frames.length&&e.frames.forEach((e=>{const n=new a(t,t,e.value||e.url||e.data||"");n.frame=e,n.value=e,function(e){Object.defineProperties(e.frame,{id:{get:()=>(Hr.log.warn("cue.frame.id is deprecated. Use cue.value.key instead."),e.value.key)},value:{get:()=>(Hr.log.warn("cue.frame.value is deprecated. Use cue.value.data instead."),e.value.data)},privateData:{get:()=>(Hr.log.warn("cue.frame.privateData is deprecated. Use cue.value.data instead."),e.value.data)}})}(n),o.addCue(n)}))})),!o.cues||!o.cues.length)return;const c=o.cues,l=[];for(let r=0;r<c.length;r++)c[r]&&l.push(c[r]);const d=l.reduce(((e,t)=>{const n=e[t.startTime]||[];return n.push(t),e[t.startTime]=n,e}),{}),u=Object.keys(d).sort(((e,t)=>Number(e)-Number(t)));u.forEach(((e,t)=>{const n=d[e],i=isFinite(s)?s:e,r=Number(u[t+1])||i;n.forEach((e=>{e.endTime=r}))}))},eo={id:"ID",class:"CLASS",startDate:"START-DATE",duration:"DURATION",endDate:"END-DATE",endOnNext:"END-ON-NEXT",plannedDuration:"PLANNED-DURATION",scte35Out:"SCTE35-OUT",scte35In:"SCTE35-IN"},to=new Set(["id","class","startDate","duration","endDate","endOnNext","startTime","endTime","processDateRange"]),no=(e,t,n)=>{e.metadataTrack_||(e.metadataTrack_=n.addRemoteTextTrack({kind:"metadata",label:"Timed Metadata"},!1).track,Hr.browser.IS_ANY_SAFARI||(e.metadataTrack_.inBandMetadataTrackDispatchType=t))},io=function(e,t,n){let i,r;if(n&&n.cues)for(i=n.cues.length;i--;)r=n.cues[i],r.startTime>=e&&r.endTime<=t&&n.removeCue(r)},ro=e=>"number"===typeof e&&isFinite(e),so=1/60,ao=e=>{const{startOfSegment:t,duration:n,segment:i,part:r,playlist:{mediaSequence:s,id:a,segments:o=[]},mediaIndex:c,partIndex:l,timeline:d}=e,u=o.length-1;let h="mediaIndex/partIndex increment";e.getMediaInfoForTime?h="getMediaInfoForTime (".concat(e.getMediaInfoForTime,")"):e.isSyncRequest&&(h="getSyncSegmentCandidate (isSyncRequest)"),e.independent&&(h+=" with independent ".concat(e.independent));const p="number"===typeof l,m=e.segment.uri?"segment":"pre-segment",g=p?us({preloadSegment:i})-1:0;return"".concat(m," [").concat(s+c,"/").concat(s+u,"]")+(p?" part [".concat(l,"/").concat(g,"]"):"")+" segment start/end [".concat(i.start," => ").concat(i.end,"]")+(p?" part start/end [".concat(r.start," => ").concat(r.end,"]"):"")+" startOfSegment [".concat(t,"]")+" duration [".concat(n,"]")+" timeline [".concat(d,"]")+" selected by [".concat(h,"]")+" playlist [".concat(a,"]")},oo=e=>"".concat(e,"TimingInfo"),co=e=>{let{timelineChangeController:t,currentTimeline:n,segmentTimeline:i,loaderType:r,audioDisabled:s}=e;if(n===i)return!1;if("audio"===r){const e=t.lastTimelineChange({type:"main"});return!e||e.to!==i}if("main"===r&&s){const e=t.pendingTimelineChange({type:"audio"});return!e||e.to!==i}return!1},lo=e=>{const t=e.pendingSegment_;if(!t)return;if(co({timelineChangeController:e.timelineChangeController_,currentTimeline:e.currentTimeline_,segmentTimeline:t.timeline,loaderType:e.loaderType_,audioDisabled:e.audioDisabled_})&&(e=>{if(!e)return!1;const t=e.pendingTimelineChange({type:"audio"}),n=e.pendingTimelineChange({type:"main"}),i=t&&n,r=i&&t.to!==n.to;return!(!i||-1===t.from||-1===n.from||!r)})(e.timelineChangeController_)){if((e=>{const t=e.timelineChangeController_.pendingTimelineChange({type:"audio"}),n=e.timelineChangeController_.pendingTimelineChange({type:"main"});return t&&n&&t.to<n.to})(e))return void e.timelineChangeController_.trigger("audioTimelineBehind");e.timelineChangeController_.trigger("fixBadTimelineChange")}},uo=e=>{let{segmentDuration:t,maxDuration:n}=e;return!!t&&Math.round(t)>n+$r},ho=(e,t)=>{if("hls"!==t)return null;const n=(e=>{let t=0;return["video","audio"].forEach((function(n){const i=e["".concat(n,"TimingInfo")];if(!i)return;const{start:s,end:a}=i;let o;"bigint"===typeof s||"bigint"===typeof a?o=r.a.BigInt(a)-r.a.BigInt(s):"number"===typeof s&&"number"===typeof a&&(o=a-s),"undefined"!==typeof o&&o>t&&(t=o)})),"bigint"===typeof t&&t<Number.MAX_SAFE_INTEGER&&(t=Number(t)),t})({audioTimingInfo:e.audioTimingInfo,videoTimingInfo:e.videoTimingInfo});if(!n)return null;const i=e.playlist.targetDuration,s=uo({segmentDuration:n,maxDuration:2*i}),a=uo({segmentDuration:n,maxDuration:i}),o="Segment with index ".concat(e.mediaIndex," ")+"from playlist ".concat(e.playlist.id," ")+"has a duration of ".concat(n," ")+"when the reported duration is ".concat(e.duration," ")+"and the target duration is ".concat(i,". ")+"For HLS content, a duration in excess of the target duration may result in playback issues. See the HLS specification section on EXT-X-TARGETDURATION for more details: https://tools.ietf.org/html/draft-pantos-http-live-streaming-23#section-4.3.3.1";return s||a?{severity:s?"warn":"info",message:o}:null},po=e=>{let{type:t,segment:n}=e;if(!n)return;const i=Boolean(n.key||n.map&&n.map.ke),r=Boolean(n.map&&!n.map.bytes),s=void 0===n.startOfSegment?n.start:n.startOfSegment;return{type:t||n.type,uri:n.resolvedUri||n.uri,start:s,duration:n.duration,isEncrypted:i,isMediaInitialization:r}};class mo extends Hr.EventTarget{constructor(e){if(super(),!e)throw new TypeError("Initialization settings are required");if("function"!==typeof e.currentTime)throw new TypeError("No currentTime getter specified");if(!e.mediaSource)throw new TypeError("No MediaSource specified");this.bandwidth=e.bandwidth,this.throughput={rate:0,count:0},this.roundTrip=NaN,this.resetStats_(),this.mediaIndex=null,this.partIndex=null,this.hasPlayed_=e.hasPlayed,this.currentTime_=e.currentTime,this.seekable_=e.seekable,this.seeking_=e.seeking,this.duration_=e.duration,this.mediaSource_=e.mediaSource,this.vhs_=e.vhs,this.loaderType_=e.loaderType,this.currentMediaInfo_=void 0,this.startingMediaInfo_=void 0,this.segmentMetadataTrack_=e.segmentMetadataTrack,this.goalBufferLength_=e.goalBufferLength,this.sourceType_=e.sourceType,this.sourceUpdater_=e.sourceUpdater,this.inbandTextTracks_=e.inbandTextTracks,this.state_="INIT",this.timelineChangeController_=e.timelineChangeController,this.shouldSaveSegmentTimingInfo_=!0,this.parse708captions_=e.parse708captions,this.useDtsForTimestampOffset_=e.useDtsForTimestampOffset,this.captionServices_=e.captionServices,this.exactManifestTimings=e.exactManifestTimings,this.addMetadataToTextTrack=e.addMetadataToTextTrack,this.checkBufferTimeout_=null,this.error_=void 0,this.currentTimeline_=-1,this.shouldForceTimestampOffsetAfterResync_=!1,this.pendingSegment_=null,this.xhrOptions_=null,this.pendingSegments_=[],this.audioDisabled_=!1,this.isPendingTimestampOffset_=!1,this.gopBuffer_=[],this.timeMapping_=0,this.safeAppend_=!1,this.appendInitSegment_={audio:!0,video:!0},this.playlistOfLastInitSegment_={audio:null,video:null},this.callQueue_=[],this.loadQueue_=[],this.metadataQueue_={id3:[],caption:[]},this.waitingOnRemove_=!1,this.quotaExceededErrorRetryTimeout_=null,this.activeInitSegmentId_=null,this.initSegments_={}
2,this.cacheEncryptionKeys_=e.cacheEncryptionKeys,this.keyCache_={},this.decrypter_=e.decrypter,this.syncController_=e.syncController,this.syncPoint_={segmentIndex:0,time:0},this.transmuxer_=this.createTransmuxer_(),this.triggerSyncInfoUpdate_=()=>this.trigger("syncinfoupdate"),this.syncController_.on("syncinfoupdate",this.triggerSyncInfoUpdate_),this.mediaSource_.addEventListener("sourceopen",(()=>{this.isEndOfStream_()||(this.ended_=!1)})),this.fetchAtBuffer_=!1,this.logger_=Qr("SegmentLoader[".concat(this.loaderType_,"]")),Object.defineProperty(this,"state",{get(){return this.state_},set(e){e!==this.state_&&(this.logger_("".concat(this.state_," -> ").concat(e)),this.state_=e,this.trigger("statechange"))}}),this.sourceUpdater_.on("ready",(()=>{this.hasEnoughInfoToAppend_()?this.processCallQueue_():lo(this)})),this.sourceUpdater_.on("codecschange",(e=>{this.trigger(h()({type:"codecschange"},e))})),"main"===this.loaderType_&&this.timelineChangeController_.on("pendingtimelinechange",(()=>{this.hasEnoughInfoToAppend_()?this.processCallQueue_():lo(this)})),"audio"===this.loaderType_&&this.timelineChangeController_.on("timelinechange",(e=>{this.trigger(h()({type:"timelinechange"},e)),this.hasEnoughInfoToLoad_()?this.processLoadQueue_():lo(this),this.hasEnoughInfoToAppend_()?this.processCallQueue_():lo(this)}))}get mediaSequenceSync_(){return this.syncController_.getMediaSequenceSync(this.loaderType_)}createTransmuxer_(){return ka({remux:!1,alignGopsAtEnd:this.safeAppend_,keepOriginalTimestamps:!0,parse708captions:this.parse708captions_,captionServices:this.captionServices_})}resetStats_(){this.mediaBytesTransferred=0,this.mediaRequests=0,this.mediaRequestsAborted=0,this.mediaRequestsTimedout=0,this.mediaRequestsErrored=0,this.mediaTransferDuration=0,this.mediaSecondsLoaded=0,this.mediaAppends=0}dispose(){this.trigger("dispose"),this.state="DISPOSED",this.pause(),this.abort_(),this.transmuxer_&&this.transmuxer_.terminate(),this.resetStats_(),this.checkBufferTimeout_&&r.a.clearTimeout(this.checkBufferTimeout_),this.syncController_&&this.triggerSyncInfoUpdate_&&this.syncController_.off("syncinfoupdate",this.triggerSyncInfoUpdate_),this.off()}setAudio(e){this.audioDisabled_=!e,e?this.appendInitSegment_.audio=!0:this.sourceUpdater_.removeAudio(0,this.duration_())}abort(){if("WAITING"!==this.state)return this.pendingSegment_&&(this.pendingSegment_=null),void this.timelineChangeController_.clearPendingTimelineChange(this.loaderType_);this.abort_(),this.state="READY",this.paused()||this.monitorBuffer_()}abort_(){this.pendingSegment_&&this.pendingSegment_.abortRequests&&this.pendingSegment_.abortRequests(),this.pendingSegment_=null,this.callQueue_=[],this.loadQueue_=[],this.metadataQueue_.id3=[],this.metadataQueue_.caption=[],this.timelineChangeController_.clearPendingTimelineChange(this.loaderType_),this.waitingOnRemove_=!1,r.a.
2clearTimeout(this.quotaExceededErrorRetryTimeout_),this.quotaExceededErrorRetryTimeout_=null}checkForAbort_(e){return"APPENDING"!==this.state||this.pendingSegment_?!this.pendingSegment_||this.pendingSegment_.requestId!==e:(this.state="READY",!0)}error(e){return"undefined"!==typeof e&&(this.logger_("error occurred:",e),this.error_=e),this.pendingSegment_=null,this.error_}endOfStream(){this.ended_=!0,this.transmuxer_&&Aa(this.transmuxer_),this.gopBuffer_.length=0,this.pause(),this.trigger("ended")}buffered_(){const e=this.getMediaInfo_();if(!this.sourceUpdater_||!e)return Jr();if("main"===this.loaderType_){const{hasAudio:t,hasVideo:n,isMuxed:i}=e;if(n&&t&&!this.audioDisabled_&&!i)return this.sourceUpdater_.buffered();if(n)return this.sourceUpdater_.videoBuffered()}return this.sourceUpdater_.audioBuffered()}initSegmentForMap(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(!e)return null;const n=na(e);let i=this.initSegments_[n];return t&&!i&&e.bytes&&(this.initSegments_[n]=i={resolvedUri:e.resolvedUri,byterange:e.byterange,bytes:e.bytes,tracks:e.tracks,timescales:e.timescales}),i||e}segmentKey(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(!e)return null;const n=ia(e);let i=this.keyCache_[n];this.cacheEncryptionKeys_&&t&&!i&&e.bytes&&(this.keyCache_[n]=i={resolvedUri:e.resolvedUri,bytes:e.bytes});const r={resolvedUri:(i||e).resolvedUri};return i&&(r.bytes=i.bytes),r}couldBeginLoading_(){return this.playlist_&&!this.paused()}load(){if(this.monitorBuffer_(),this.playlist_)return"INIT"===this.state&&this.couldBeginLoading_()?this.init_():void(!this.couldBeginLoading_()||"READY"!==this.state&&"INIT"!==this.state||(this.state="READY"))}init_(){return this.state="READY",this.resetEverything(),this.monitorBuffer_()}playlist(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!e)return;if(this.playlist_&&this.playlist_.endList&&e.endList&&this.playlist_.uri===e.uri)return;const n=this.playlist_,i=this.pendingSegment_;this.playlist_=e,this.xhrOptions_=t,"INIT"===this.state&&(e.syncInfo={mediaSequence:e.mediaSequence,time:0},"main"===this.loaderType_&&this.syncController_.setDateTimeMappingForStart(e));let r=null;if(n&&(n.id?r=n.id:n.uri&&(r=n.uri)),this.logger_("playlist update [".concat(r," => ").concat(e.id||e.uri,"]")),this.mediaSequenceSync_&&(this.mediaSequenceSync_.update(e,this.currentTime_()),this.logger_("Playlist update:\ncurrentTime: ".concat(this.currentTime_(),"\nbufferedEnd: ").concat(as(this.buffered_()),"\n"),this.mediaSequenceSync_.diagnostics)),this.trigger("syncinfoupdate"),"INIT"===this.state&&this.couldBeginLoading_())return this.init_();if(!n||n.uri!==e.uri){if(null!==this.mediaIndex){!e.endList&&"number"===typeof e.partTargetDuration?this.resetLoader():this.resyncLoader()}return this.currentMediaInfo_=void 0,void this.trigger("playlistupdate")}const s=e.mediaSequence-n.mediaSequence;if(this.logger_("live window shift [".concat(s,"]")),null!==this.mediaIndex)if(this.mediaIndex-=s,this.mediaIndex<0)this.mediaIndex=null,this.partIndex=null;else{const e=this.playlist_.segments[this.mediaIndex];if(this.partIndex&&(!e.parts||!e.parts.length||!e.parts[this.partIndex])){const e=this.mediaIndex;this.logger_("currently processing part (index ".concat(this.partIndex,") no longer exists.")),this.resetLoader(),this.mediaIndex=e}}i&&(i.mediaIndex-=s,i.mediaIndex<0?(i.mediaIndex=null,i.partIndex=null):(i.mediaIndex>=0&&(i.segment=e.segments[i.mediaIndex]),i.partIndex>=0&&i.segment.parts&&(i.part=i.segment.parts[i.partIndex]))),this.syncController_.saveExpiredSegmentInfo(n,e)}pause(){this.checkBufferTimeout_&&(r.a.clearTimeout(this.checkBufferTimeout_),this.checkBufferTimeout_=null)}paused(){return null===this.checkBufferTimeout_}resetEverything(e){this.ended_=!1,this.activeInitSegmentId_=null,this.appendInitSegment_={audio:!0,video:!0},this.resetLoader(),this.remove(0,1/0,e),this.transmuxer_&&(this.transmuxer_.postMessage({action:"clearAllMp4Captions"}),this.transmuxer_.postMessage({action:"reset"}))}resetLoader(){this.fetchAtBuffer_=!1,this.mediaSequenceSync_&&this.mediaSequenceSync_.resetAppendedStatus(),this.resyncLoader()}resyncLoader(){this.transmuxer_&&Aa(this.transmuxer_),this.mediaIndex=null,this.partIndex=null,this.syncPoint_=null,this.isPendingTimestampOffset_=!1;const e=this.currentMediaInfo_&&this.currentMediaInfo_.isFmp4;"hls"===this.sourceType_&&!e&&(this.shouldForceTimestampOffsetAfterResync_=!0),this.callQueue_=[],this.loadQueue_=[],this.metadataQueue_.id3=[],this.metadataQueue_.caption=[],this.abort(),this.transmuxer_&&this.transmuxer_.postMessage({action:"clearParsedMp4Captions"})}remove(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:()=>{},i=arguments.length>3&&void 0!==arguments[3]&&arguments[3];if(t===1/0&&(t=this.duration_()),t<=e)return void this.logger_("skipping remove because end ${end} is <= start ${start}");if(!this.sourceUpdater_||!this.getMediaInfo_())return void this.logger_("skipping remove because no source updater or starting media info");let r=1;const s=()=>{r--,0===r&&n()};!i&&this.audioDisabled_||(r++,this.sourceUpdater_.removeAudio(e,t,s)),(i||"main"===this.loaderType_)&&(this.gopBuffer_=((e,t,n,i)=>{const r=Math.ceil((t-i)*O.ONE_SECOND_IN_TS),s=Math.ceil((n-i)*O.ONE_SECOND_IN_TS),a=e.slice();let o=e.length;for(;o--&&!(e[o].pts<=s););if(-1===o)return a;let c=o+1;for(;c--&&!(e[c].pts<=r););return c=Math.max(c,0),a.splice(c,o-c+1),a})(this.gopBuffer_,e,t,this.timeMapping_),r++,this.sourceUpdater_.removeVideo(e,t,s));for(const a in this.inbandTextTracks_)io(e,t,this.inbandTextTracks_[a]);io(e,t,this.segmentMetadataTrack_),s()}monitorBuffer_(){this.checkBufferTimeout_&&r.a.clearTimeout(this.checkBufferTimeout_),this.checkBufferTimeout_=r.a.setTimeout(this.monitorBufferTick_.bind(this),1)}monitorBufferTick_(){"READY"===this.state&&this.fillBuffer_(),this.checkBufferTimeout_&&r.a.clearTimeout(this.checkBufferTimeout_),this.checkBufferTimeout_=r.a.setTimeout(this.monitorBufferTick_.bind(this),500)}fillBuffer_(){if(this.sourceUpdater_.updating())return;const e=this.chooseNextRequest_();if(!e)return;const t={segmentInfo:po({type:this.loaderType_,segment:e})};this.trigger({type:"segmentselected",metadata:t}),"number"===typeof e.timestampOffset&&(this.isPendingTimestampOffset_=!1,this.timelineChangeController_.pendingTimelineChange({type:this.loaderType_,from:this.currentTimeline_,to:e.timeline})),this.loadSegment_(e)}
2isEndOfStream_(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.mediaIndex,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.playlist_,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.partIndex;if(!t||!this.mediaSource_)return!1;const i="number"===typeof e&&t.segments[e],r=e+1===t.segments.length,s=!i||!i.parts||n+1===i.parts.length;return t.endList&&"open"===this.mediaSource_.readyState&&r&&s}chooseNextRequest_(){const e=this.buffered_(),t=as(e)||0,n=os(e,this.currentTime_()),i=!this.hasPlayed_()&&n>=1,r=n>=this.goalBufferLength_(),s=this.playlist_.segments;if(!s.length||i||r)return null;this.syncPoint_=this.syncPoint_||this.syncController_.getSyncPoint(this.playlist_,this.duration_(),this.currentTimeline_,this.currentTime_(),this.loaderType_);const a={partIndex:null,mediaIndex:null,startOfSegment:null,playlist:this.playlist_,isSyncRequest:Boolean(!this.syncPoint_)};if(a.isSyncRequest)a.mediaIndex=function(e,t,n){t=t||[];const i=[];let r=0;for(let s=0;s<t.length;s++){const a=t[s];if(e===a.timeline&&(i.push(s),r+=a.duration,r>n))return s}return 0===i.length?0:i[i.length-1]}(this.currentTimeline_,s,t),this.logger_("choose next request. Can not find sync point. Fallback to media Index: ".concat(a.mediaIndex));else if(null!==this.mediaIndex){const e=s[this.mediaIndex],n="number"===typeof this.partIndex?this.partIndex:-1;a.startOfSegment=e.end?e.end:t,e.parts&&e.parts[n+1]?(a.mediaIndex=this.mediaIndex,a.partIndex=n+1):a.mediaIndex=this.mediaIndex+1}else{let e,n,i;const r=this.fetchAtBuffer_?t:this.currentTime_();if(this.mediaSequenceSync_&&this.logger_("chooseNextRequest_ request after Quality Switch:\nFor TargetTime: ".concat(r,".\nCurrentTime: ").concat(this.currentTime_(),"\nBufferedEnd: ").concat(t,"\nFetch At Buffer: ").concat(this.fetchAtBuffer_,"\n"),this.mediaSequenceSync_.diagnostics),this.mediaSequenceSync_&&this.mediaSequenceSync_.isReliable){const t=this.getSyncInfoFromMediaSequenceSync_(r);if(!t){const e="No sync info found while using media sequence sync";return this.error({message:e,metadata:{errorType:Hr.Error.StreamingFailedToSelectNextSegment,error:new Error(e)}}),this.logger_("chooseNextRequest_ - no sync info found using media sequence sync"),null}this.logger_("chooseNextRequest_ mediaSequence syncInfo (".concat(t.start," --\x3e ").concat(t.end,")")),e=t.segmentIndex,n=t.partIndex,i=t.start}else{this.logger_("chooseNextRequest_ - fallback to a regular segment selection algorithm, based on a syncPoint.");const t=Ss.getMediaInfoForTime({exactManifestTimings:this.exactManifestTimings,playlist:this.playlist_,currentTime:r,startingPartIndex:this.syncPoint_.partIndex,startingSegmentIndex:this.syncPoint_.segmentIndex,startTime:this.syncPoint_.time});e=t.segmentIndex,n=t.partIndex,i=t.startTime}a.getMediaInfoForTime=this.fetchAtBuffer_?"bufferedEnd ".concat(r):"currentTime ".concat(r),a.mediaIndex=e,a.startOfSegment=i,a.partIndex=n,this.logger_("choose next request. Playlist switched and we have a sync point. Media Index: ".concat(a.mediaIndex," "))}const o=s[a.mediaIndex];let c=o&&"number"===typeof a.partIndex&&o.parts&&o.parts[a.partIndex];if(!o||"number"===typeof a.partIndex&&!c)return null;"number"!==typeof a.partIndex&&o.parts&&(a.partIndex=0,c=o.parts[0]);const l=this.vhs_.playlists&&this.vhs_.playlists.main&&this.vhs_.playlists.main.independentSegments||this.playlist_.independentSegments;if(!n&&c&&!l&&!c.independent)if(0===a.partIndex){const e=s[a.mediaIndex-1],t=e.parts&&e.parts.length&&e.parts[e.parts.length-1];t&&t.independent&&(a.mediaIndex-=1,a.partIndex=e.parts.length-1,a.independent="previous segment")}else o.parts[a.partIndex-1].independent&&(a.partIndex-=1,a.independent="previous part");const d=this.mediaSource_&&"ended"===this.mediaSource_.readyState;return a.mediaIndex>=s.length-1&&d&&!this.seeking_()?null:(this.shouldForceTimestampOffsetAfterResync_&&(this.shouldForceTimestampOffsetAfterResync_=!1,a.forceTimestampOffset=!0,this.logger_("choose next request. Force timestamp offset after loader resync")),this.generateSegmentInfo_(a))}getSyncInfoFromMediaSequenceSync_(e){if(!this.mediaSequenceSync_)return null;const t=Math.max(e,this.mediaSequenceSync_.start);e!==t&&this.logger_("getSyncInfoFromMediaSequenceSync_. Pulled target time from ".concat(e," to ").concat(t));const n=this.mediaSequenceSync_.getSyncInfoForTime(t);if(!n)return null;if(!n.isAppended)return n;const i=this.mediaSequenceSync_.getSyncInfoForTime(n.end);return i?(i.isAppended&&this.logger_("getSyncInfoFromMediaSequenceSync_: We encounter unexpected scenario where next media sequence sync info is also appended!"),i):null}generateSegmentInfo_(e){const{independent:t,playlist:n,mediaIndex:i,startOfSegment:r,isSyncRequest:s,partIndex:a,forceTimestampOffset:o,getMediaInfoForTime:c}=e,l=n.segments[i],d="number"===typeof a&&l.parts[a],u={requestId:"segment-loader-"+Math.random(),uri:d&&d.resolvedUri||l.resolvedUri,mediaIndex:i,partIndex:d?a:null,isSyncRequest:s,startOfSegment:r,playlist:n,bytes:null,encryptedBytes:null,timestampOffset:null,timeline:l.timeline,duration:d&&d.duration||l.duration,segment:l,part:d,byteLength:0,transmuxer:this.transmuxer_,getMediaInfoForTime:c,independent:t},h="undefined"!==typeof o?o:this.isPendingTimestampOffset_;u.timestampOffset=this.timestampOffsetForSegment_({segmentTimeline:l.timeline,currentTimeline:this.currentTimeline_,startOfSegment:r,buffered:this.buffered_(),overrideCheck:h});
2const p=as(this.sourceUpdater_.audioBuffered());return"number"===typeof p&&(u.audioAppendStart=p-this.sourceUpdater_.audioTimestampOffset()),this.sourceUpdater_.videoBuffered().length&&(u.gopsToAlignWith=((e,t,n)=>{if("undefined"===typeof t||null===t||!e.length)return[];const i=Math.ceil((t-n+3)*O.ONE_SECOND_IN_TS);let r;for(r=0;r<e.length&&!(e[r].pts>i);r++);return e.slice(r)})(this.gopBuffer_,this.currentTime_()-this.sourceUpdater_.videoTimestampOffset(),this.timeMapping_)),u}timestampOffsetForSegment_(e){return(e=>{let{segmentTimeline:t,currentTimeline:n,startOfSegment:i,buffered:r,overrideCheck:s}=e;return s||t!==n?t<n?i:r.length?r.end(r.length-1):i:null})(e)}earlyAbortWhenNeeded_(e){if(this.vhs_.tech_.paused()||!this.xhrOptions_.timeout||!this.playlist_.attributes.BANDWIDTH)return;if(Date.now()-(e.firstBytesReceivedAt||Date.now())<1e3)return;const t=this.currentTime_(),n=e.bandwidth,i=this.pendingSegment_.duration,r=Ss.estimateSegmentRequestTime(i,n,this.playlist_,e.bytesReceived),s=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;return((e.length?e.end(e.length-1):0)-t)/n}(this.buffered_(),t,this.vhs_.tech_.playbackRate())-1;if(r<=s)return;const a=function(e){const{main:t,currentTime:n,bandwidth:i,duration:r,segmentDuration:s,timeUntilRebuffer:a,currentTimeline:o,syncController:c}=e,l=t.playlists.filter((e=>!Ss.isIncompatible(e)));let d=l.filter(Ss.isEnabled);d.length||(d=l.filter((e=>!Ss.isDisabled(e))));const u=d.filter(Ss.hasAttribute.bind(null,"BANDWIDTH")).map((e=>{const t=c.getSyncPoint(e,r,o,n)?1:2;return{playlist:e,rebufferingImpact:Ss.estimateSegmentRequestTime(s,i,e)*t-a}})),h=u.filter((e=>e.rebufferingImpact<=0));return Ya(h,((e,t)=>Ka(t.playlist,e.playlist))),h.length?h[0]:(Ya(u,((e,t)=>e.rebufferingImpact-t.rebufferingImpact)),u[0]||null)}({main:this.vhs_.playlists.main,currentTime:t,bandwidth:n,duration:this.duration_(),segmentDuration:i,timeUntilRebuffer:s,currentTimeline:this.currentTimeline_,syncController:this.syncController_});if(!a)return;const o=r-s-a.rebufferingImpact;let c=.5;s<=$r&&(c=1),!a.playlist||a.playlist.uri===this.playlist_.uri||o<c||(this.bandwidth=a.playlist.attributes.BANDWIDTH*ga.BANDWIDTH_VARIANCE+1,this.trigger("earlyabort"))}handleAbort_(e){this.logger_("Aborting ".concat(ao(e))),this.mediaRequestsAborted+=1}handleProgress_(e,t){this.earlyAbortWhenNeeded_(t.stats),this.checkForAbort_(t.requestId)||this.trigger("progress")}handleTrackInfo_(e,t){const{hasAudio:n,hasVideo:i}=t,r={segmentInfo:po({type:this.loaderType_,segment:e}),trackInfo:{hasAudio:n,hasVideo:i}};this.trigger({type:"segmenttransmuxingtrackinfoavailable",metadata:r}),this.earlyAbortWhenNeeded_(e.stats),this.checkForAbort_(e.requestId)||this.checkForIllegalMediaSwitch(t)||(t=t||{},function(e,t){if(!e&&!t||!e&&t||e&&!t)return!1;if(e===t)return!0;const n=Object.keys(e).sort(),i=Object.keys(t).sort();if(n.length!==i.length)return!1;for(let r=0;r<n.length;r++){const s=n[r];if(s!==i[r])return!1;if(e[s]!==t[s])return!1}return!0}(this.currentMediaInfo_,t)||(this.appendInitSegment_={audio:!0,video:!0},this.startingMediaInfo_=t,this.currentMediaInfo_=t,this.logger_("trackinfo update",t),this.trigger("trackinfo")),this.checkForAbort_(e.requestId)||(this.pendingSegment_.trackInfo=t,this.hasEnoughInfoToAppend_()?this.processCallQueue_():lo(this)))}handleTimingInfo_(e,t,n,i){if(this.earlyAbortWhenNeeded_(e.stats),this.checkForAbort_(e.requestId))return;const r=this.pendingSegment_,s=oo(t);r[s]=r[s]||{},r[s][n]=i,this.logger_("timinginfo: ".concat(t," - ").concat(n," - ").concat(i)),this.hasEnoughInfoToAppend_()?this.processCallQueue_():lo(this)}handleCaptions_(e,t){if(this.earlyAbortWhenNeeded_(e.stats),this.checkForAbort_(e.requestId))return;if(0===t.length)return void this.logger_("SegmentLoader received no captions from a caption event");if(!this.pendingSegment_.hasAppendedData_)return void this.metadataQueue_.caption.push(this.handleCaptions_.bind(this,e,t));const n=null===this.sourceUpdater_.videoTimestampOffset()?this.sourceUpdater_.audioTimestampOffset():this.sourceUpdater_.videoTimestampOffset(),i={};t.forEach((e=>{i[e.stream]=i[e.stream]||{startTime:1/0,captions:[],endTime:0};const t=i[e.stream];t.startTime=Math.min(t.startTime,e.startTime+n),t.endTime=Math.max(t.endTime,e.endTime+n),t.captions.push(e)}
2)),Object.keys(i).forEach((e=>{const{startTime:t,endTime:s,captions:a}=i[e],o=this.inbandTextTracks_;this.logger_("adding cues from ".concat(t," -> ").concat(s," for ").concat(e)),function(e,t,n){if(!e[n]){t.trigger({type:"usage",name:"vhs-608"});let i=n;/^cc708_/.test(n)&&(i="SERVICE"+n.split("_")[1]);const r=t.textTracks().getTrackById(i);if(r)e[n]=r;else{let r=n,s=n,a=!1;const o=(t.options_.vhs&&t.options_.vhs.captionServices||{})[i];o&&(r=o.label,s=o.language,a=o.default),e[n]=t.addRemoteTextTrack({kind:"captions",id:i,default:a,label:r,language:s},!1).track}}}(o,this.vhs_.tech_,e),io(t,s,o[e]),function(e){let{inbandTextTracks:t,captionArray:n,timestampOffset:i}=e;if(!n)return;const s=r.a.WebKitDataCue||r.a.VTTCue;n.forEach((e=>{const n=e.stream;e.content?e.content.forEach((r=>{const a=new s(e.startTime+i,e.endTime+i,r.text);a.line=r.line,a.align="left",a.position=r.position,a.positionAlign="line-left",t[n].addCue(a)})):t[n].addCue(new s(e.startTime+i,e.endTime+i,e.text))}))}({captionArray:a,inbandTextTracks:o,timestampOffset:n})})),this.transmuxer_&&this.transmuxer_.postMessage({action:"clearParsedMp4Captions"})}handleId3_(e,t,n){if(this.earlyAbortWhenNeeded_(e.stats),this.checkForAbort_(e.requestId))return;this.pendingSegment_.hasAppendedData_?this.addMetadataToTextTrack(n,t,this.duration_()):this.metadataQueue_.id3.push(this.handleId3_.bind(this,e,t,n))}processMetadataQueue_(){this.metadataQueue_.id3.forEach((e=>e())),this.metadataQueue_.caption.forEach((e=>e())),this.metadataQueue_.id3=[],this.metadataQueue_.caption=[]}processCallQueue_(){const e=this.callQueue_;this.callQueue_=[],e.forEach((e=>e()))}processLoadQueue_(){const e=this.loadQueue_;this.loadQueue_=[],e.forEach((e=>e()))}hasEnoughInfoToLoad_(){if("audio"!==this.loaderType_)return!0;const e=this.pendingSegment_;return!!e&&(!this.getCurrentMediaInfo_()||!co({timelineChangeController:this.timelineChangeController_,currentTimeline:this.currentTimeline_,segmentTimeline:e.timeline,loaderType:this.loaderType_,audioDisabled:this.audioDisabled_}))}getCurrentMediaInfo_(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.pendingSegment_;return e&&e.trackInfo||this.currentMediaInfo_}getMediaInfo_(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.pendingSegment_;return this.getCurrentMediaInfo_(e)||this.startingMediaInfo_}getPendingSegmentPlaylist(){return this.pendingSegment_?this.pendingSegment_.playlist:null}hasEnoughInfoToAppend_(){if(!this.sourceUpdater_.ready())return!1;if(this.waitingOnRemove_||this.quotaExceededErrorRetryTimeout_)return!1;const e=this.pendingSegment_,t=this.getCurrentMediaInfo_();if(!e||!t)return!1;const{hasAudio:n,hasVideo:i,isMuxed:r}=t;return!(i&&!e.videoTimingInfo)&&(!(n&&!this.audioDisabled_&&!r&&!e.audioTimingInfo)&&!co({timelineChangeController:this.timelineChangeController_,currentTimeline:this.currentTimeline_,segmentTimeline:e.timeline,loaderType:this.loaderType_,audioDisabled:this.audioDisabled_}))}handleData_(e,t){if(this.earlyAbortWhenNeeded_(e.stats),this.checkForAbort_(e.requestId))return;if(this.callQueue_.length||!this.hasEnoughInfoToAppend_())return lo(this),void this.callQueue_.push(this.handleData_.bind(this,e,t));const n=this.pendingSegment_;if(this.setTimeMapping_(n.timeline),this.updateMediaSecondsLoaded_(n.part||n.segment),"closed"!==this.mediaSource_.readyState){if(e.map&&(e.map=this.initSegmentForMap(e.map,!0),n.segment.map=e.map),e.key&&this.segmentKey(e.key,!0),n.isFmp4=e.isFmp4,n.timingInfo=n.timingInfo||{},n.isFmp4)this.trigger("fmp4"),n.timingInfo.start=n[oo(t.type)].start;else{const e=this.getCurrentMediaInfo_(),t="main"===this.loaderType_&&e&&e.hasVideo;let i;t&&(i=n.videoTimingInfo.start),n.timingInfo.start=this.trueSegmentStart_({currentStart:n.timingInfo.start,playlist:n.playlist,mediaIndex:n.mediaIndex,currentVideoTimestampOffset:this.sourceUpdater_.videoTimestampOffset(),useVideoTimingInfo:t,firstVideoFrameTimeForData:i,videoTimingInfo:n.videoTimingInfo,audioTimingInfo:n.audioTimingInfo})}if(this.updateAppendInitSegmentStatus(n,t.type),this.updateSourceBufferTimestampOffset_(n),n.isSyncRequest){this.updateTimingInfoEnd_(n),this.syncController_.saveSegmentTimingInfo({segmentInfo:n,shouldSaveTimelineMapping:"main"===this.loaderType_});const e=this.chooseNextRequest_();if(e.mediaIndex!==n.mediaIndex||e.partIndex!==n.partIndex)return void this.logger_("sync segment was incorrect, not appending");this.logger_("sync segment was correct, appending")}n.hasAppendedData_=!0,this.processMetadataQueue_(),this.appendData_(n,t)}}updateAppendInitSegmentStatus(e,t){"main"!==this.loaderType_||"number"!==typeof e.timestampOffset||e.changedTimestampOffset||(this.appendInitSegment_={audio:!0,video:!0}),this.playlistOfLastInitSegment_[t]!==e.playlist&&(this.appendInitSegment_[t]=!0)}getInitSegmentAndUpdateState_(e){let{type:t,initSegment:n,map:i,playlist:r}=e;if(i){const e=na(i);if(this.activeInitSegmentId_===e)return null;n=this.initSegmentForMap(i,!0).bytes,this.activeInitSegmentId_=e}return n&&this.appendInitSegment_[t]?(this.playlistOfLastInitSegment_[t]=r,this.appendInitSegment_[t]=!1,this.activeInitSegmentId_=null,n):null}handleQuotaExceededError_(e,t){let{segmentInfo:n,type:i,bytes:s}=e;
2const a=this.sourceUpdater_.audioBuffered(),o=this.sourceUpdater_.videoBuffered();a.length>1&&this.logger_("On QUOTA_EXCEEDED_ERR, found gaps in the audio buffer: "+ss(a).join(", ")),o.length>1&&this.logger_("On QUOTA_EXCEEDED_ERR, found gaps in the video buffer: "+ss(o).join(", "));const c=a.length?a.start(0):0,l=a.length?a.end(a.length-1):0,d=o.length?o.start(0):0,u=o.length?o.end(o.length-1):0;if(l-c<=1&&u-d<=1)return this.logger_("On QUOTA_EXCEEDED_ERR, single segment too large to append to buffer, triggering an error. "+"Appended byte length: ".concat(s.byteLength,", ")+"audio buffer: ".concat(ss(a).join(", "),", ")+"video buffer: ".concat(ss(o).join(", "),", ")),this.error({message:"Quota exceeded error with append of a single segment of content",excludeUntil:1/0}),void this.trigger("error");this.waitingOnRemove_=!0,this.callQueue_.push(this.appendToSourceBuffer_.bind(this,{segmentInfo:n,type:i,bytes:s}));const h=this.currentTime_()-1;this.logger_("On QUOTA_EXCEEDED_ERR, removing audio/video from 0 to ".concat(h)),this.remove(0,h,(()=>{this.logger_("On QUOTA_EXCEEDED_ERR, retrying append in ".concat(1,"s")),this.waitingOnRemove_=!1,this.quotaExceededErrorRetryTimeout_=r.a.setTimeout((()=>{this.logger_("On QUOTA_EXCEEDED_ERR, re-processing call queue"),this.quotaExceededErrorRetryTimeout_=null,this.processCallQueue_()}),1e3)}),!0)}handleAppendError_(e,t){let{segmentInfo:n,type:i,bytes:r}=e;t&&(22!==t.code?(this.logger_("Received non QUOTA_EXCEEDED_ERR on append",t),this.error({message:"".concat(i," append of ").concat(r.length,"b failed for segment ")+"#".concat(n.mediaIndex," in playlist ").concat(n.playlist.id),metadata:{errorType:Hr.Error.StreamingFailedToAppendSegment}}),this.trigger("appenderror")):this.handleQuotaExceededError_({segmentInfo:n,type:i,bytes:r}))}appendToSourceBuffer_(e){let{segmentInfo:t,type:n,initSegment:i,data:r,bytes:s}=e;if(!s){const e=[r];let t=r.byteLength;i&&(e.unshift(i),t+=i.byteLength),s=(e=>{let t,n=0;return e.bytes&&(t=new Uint8Array(e.bytes),e.segments.forEach((e=>{t.set(e,n),n+=e.byteLength}))),t})({bytes:t,segments:e})}const a={segmentInfo:po({type:this.loaderType_,segment:t})};this.trigger({type:"segmentappendstart",metadata:a}),this.sourceUpdater_.appendBuffer({segmentInfo:t,type:n,bytes:s},this.handleAppendError_.bind(this,{segmentInfo:t,type:n,bytes:s}))}handleSegmentTimingInfo_(e,t,n){if(!this.pendingSegment_||t!==this.pendingSegment_.requestId)return;const i=this.pendingSegment_.segment,r="".concat(e,"TimingInfo");i[r]||(i[r]={}),i[r].transmuxerPrependedSeconds=n.prependedContentDuration||0,i[r].transmuxedPresentationStart=n.start.presentation,i[r].transmuxedDecodeStart=n.start.decode,i[r].transmuxedPresentationEnd=n.end.presentation,i[r].transmuxedDecodeEnd=n.end.decode,i[r].baseMediaDecodeTime=n.baseMediaDecodeTime}appendData_(e,t){const{type:n,data:i}=t;if(!i||!i.byteLength)return;if("audio"===n&&this.audioDisabled_)return;const r=this.getInitSegmentAndUpdateState_({type:n,initSegment:t.initSegment,playlist:e.playlist,map:e.isFmp4?e.segment.map:null});this.appendToSourceBuffer_({segmentInfo:e,type:n,initSegment:r,data:i})}loadSegment_(e){if(this.state="WAITING",this.pendingSegment_=e,this.trimBackBuffer_(e),"number"===typeof e.timestampOffset&&this.transmuxer_&&this.transmuxer_.postMessage({action:"clearAllMp4Captions"}),!this.hasEnoughInfoToLoad_())return lo(this),void this.loadQueue_.push((()=>{const t=h()({},e,{forceTimestampOffset:!0});h()(e,this.generateSegmentInfo_(t)),this.isPendingTimestampOffset_=!1,this.updateTransmuxerAndRequestSegment_(e)}));this.updateTransmuxerAndRequestSegment_(e)}updateTransmuxerAndRequestSegment_(e){this.shouldUpdateTransmuxerTimestampOffset_(e.timestampOffset)&&(this.gopBuffer_.length=0,e.gopsToAlignWith=[],this.timeMapping_=0,this.transmuxer_.postMessage({action:"reset"}),this.transmuxer_.postMessage({action:"setTimestampOffset",timestampOffset:e.timestampOffset}));const t=this.createSimplifiedSegmentObj_(e),n=this.isEndOfStream_(e.mediaIndex,e.playlist,e.partIndex),i=null!==this.mediaIndex,r=e.timeline!==this.currentTimeline_&&e.timeline>0,s=n||i&&r;this.logger_("Requesting\n".concat(Ja(e.uri),"\n").concat(ao(e))),t.map&&!t.map.bytes&&(this.logger_("going to request init segment."),this.appendInitSegment_={video:!0,audio:!0}),e.abortRequests=Va({xhr:this.vhs_.xhr,xhrOptions:this.xhrOptions_,decryptionWorker:this.decrypter_,segment:t,abortFn:this.handleAbort_.bind(this,e),progressFn:this.handleProgress_.bind(this),trackInfoFn:this.handleTrackInfo_.bind(this),timingInfoFn:this.handleTimingInfo_.b
2ind(this),videoSegmentTimingInfoFn:this.handleSegmentTimingInfo_.bind(this,"video",e.requestId),audioSegmentTimingInfoFn:this.handleSegmentTimingInfo_.bind(this,"audio",e.requestId),captionsFn:this.handleCaptions_.bind(this),isEndOfTimeline:s,endedTimelineFn:()=>{this.logger_("received endedtimeline callback")},id3Fn:this.handleId3_.bind(this),dataFn:this.handleData_.bind(this),doneFn:this.segmentRequestFinished_.bind(this),onTransmuxerLog:t=>{let{message:n,level:i,stream:r}=t;this.logger_("".concat(ao(e)," logged from transmuxer stream ").concat(r," as a ").concat(i,": ").concat(n))},triggerSegmentEventFn:e=>{let{type:t,segment:n,keyInfo:i,trackInfo:r,timingInfo:s}=e;const a={segmentInfo:po({segment:n})};i&&(a.keyInfo=i),r&&(a.trackInfo=r),s&&(a.timingInfo=s),this.trigger({type:t,metadata:a})}})}trimBackBuffer_(e){const t=((e,t,n)=>{let i=t-ga.BACK_BUFFER_LENGTH;e.length&&(i=Math.max(i,e.start(0)));const r=t-n;return Math.min(r,i)})(this.seekable_(),this.currentTime_(),this.playlist_.targetDuration||10);t>0&&this.remove(0,t)}createSimplifiedSegmentObj_(e){const t=e.segment,n=e.part,i=e.segment.key||e.segment.map&&e.segment.map.key,r=e.segment.map&&!e.segment.map.bytes,s={resolvedUri:n?n.resolvedUri:t.resolvedUri,byterange:n?n.byterange:t.byterange,requestId:e.requestId,transmuxer:e.transmuxer,audioAppendStart:e.audioAppendStart,gopsToAlignWith:e.gopsToAlignWith,part:e.part,type:this.loaderType_,start:e.startOfSegment,duration:e.duration,isEncrypted:i,isMediaInitialization:r},a=e.playlist.segments[e.mediaIndex-1];if(a&&a.timeline===t.timeline&&(a.videoTimingInfo?s.baseStartTime=a.videoTimingInfo.transmuxedDecodeEnd:a.audioTimingInfo&&(s.baseStartTime=a.audioTimingInfo.transmuxedDecodeEnd)),t.key){const n=t.key.iv||new Uint32Array([0,0,0,e.mediaIndex+e.playlist.mediaSequence]);s.key=this.segmentKey(t.key),s.key.iv=n}return t.map&&(s.map=this.initSegmentForMap(t.map)),s}saveTransferStats_(e){this.mediaRequests+=1,e&&(this.mediaBytesTransferred+=e.bytesReceived,this.mediaTransferDuration+=e.roundTripTime)}saveBandwidthRelatedStats_(e,t){if(this.pendingSegment_.byteLength=t.bytesReceived,e<so)return void this.logger_("Ignoring segment's bandwidth because its duration of ".concat(e)+" is less than the min to record ".concat(so));const n={bandwidthInfo:{from:this.bandwidth,to:t.bandwidth}};this.trigger({type:"bandwidthupdated",metadata:n}),this.bandwidth=t.bandwidth,this.roundTrip=t.roundTripTime}handleTimeout_(){this.mediaRequestsTimedout+=1,this.bandwidth=1,this.roundTrip=NaN,this.trigger("bandwidthupdate"),this.trigger("timeout")}segmentRequestFinished_(e,t,n){if(this.callQueue_.length)return void this.callQueue_.push(this.segmentRequestFinished_.bind(this,e,t,n));if(this.saveTransferStats_(t.stats),!this.pendingSegment_)return;if(t.requestId!==this.pendingSegment_.requestId)return;if(e){if(this.pendingSegment_=null,this.state="READY",e.code===Da)return;return this.pause(),e.code===Ia?void this.handleTimeout_():(this.mediaRequestsErrored+=1,this.error(e),void this.trigger("error"))}const i=this.pendingSegment_;this.saveBandwidthRelatedStats_(i.duration,t.stats),i.endOfAllRequests=t.endOfAllRequests,n.gopInfo&&(this.gopBuffer_=((e,t,n)=>{if(!t.length)return e;if(n)return t.slice();const i=t[0].pts;let r=0;for(;r<e.length&&!(e[r].pts>=i);r++);return e.slice(0,r).concat(t)})(this.gopBuffer_,n.gopInfo,this.safeAppend_)),this.state="APPENDING",this.trigger("appending"),this.waitForAppendsToComplete_(i)}setTimeMapping_(e){const t=this.syncController_.mappingForTimeline(e);null!==t&&(this.timeMapping_=t)}updateMediaSecondsLoaded_(e){"number"===typeof e.start&&"number"===typeof e.end?this.mediaSecondsLoaded+=e.end-e.start:this.mediaSecondsLoaded+=e.duration}shouldUpdateTransmuxerTimestampOffset_(e){return null!==e&&("main"===this.loaderType_&&e!==this.sourceUpdater_.videoTimestampOffset()||!this.audioDisabled_&&e!==this.sourceUpdater_.audioTimestampOffset())}trueSegmentStart_(e){let{currentStart:t,playlist:n,mediaIndex:i,firstVideoFrameTimeForData:r,currentVideoTimestampOffset:s,useVideoTimingInfo:a,videoTimingInfo:o,audioTimingInfo:c}=e;if("undefined"!==typeof t)return t;if(!a)return c.start;const l=n.segments[i-1];return 0!==i&&l&&"undefined"!==typeof l.start&&l.end===r+s?o.start:r}waitForAppendsToComplete_(e){const t=this.getCurrentMediaInfo_(e);if(!t)return this.error({message:"No starting media returned, likely due to an unsupported media format.",playlistExclusionDuration:1/0}),void this.trigger("error");const{hasAudio:n,hasVideo:i,isMuxed:r}=t,s="main"===this.loaderType_&&i,a=!this.audioDisabled_&&n&&!r;if(e.waitingOnAppends=0,!e.hasAppendedData_)return e.timingInfo||"number"!==typeof e.timestampOffset||(this.isPendingTimestampOffset_=!0),e.timingInfo={start:0},e.waitingOnAppends++,this.isPendingTimestampOffset_||(this.updateSourceBufferTimestampOffset_(e),this.processMetadataQueue_()),void this.checkAppendsDone_(e);s&&e.waitingOnAppends++,a&&e.waitingOnAppends++,s&&this.sourceUpdater_.videoQueueCallback(this.checkAppendsDone_.bind(this,e)),a&&this.sourceUpdater_.audioQueueCallback(this.checkAppendsDone_.bind(this,e))}
2checkAppendsDone_(e){this.checkForAbort_(e.requestId)||(e.waitingOnAppends--,0===e.waitingOnAppends&&this.handleAppendsDone_())}checkForIllegalMediaSwitch(e){const t=((e,t,n)=>"main"===e&&t&&n?n.hasAudio||n.hasVideo?t.hasVideo&&!n.hasVideo?"Only audio found in segment when we expected video. We can't switch to audio only from a stream that had video. To get rid of this message, please add codec information to the manifest.":!t.hasVideo&&n.hasVideo?"Video found in segment when we expected only audio. We can't switch to a stream with video from an audio only stream. To get rid of this message, please add codec information to the manifest.":null:"Neither audio nor video found in segment.":null)(this.loaderType_,this.getCurrentMediaInfo_(),e);return!!t&&(this.error({message:t,playlistExclusionDuration:1/0}),this.trigger("error"),!0)}updateSourceBufferTimestampOffset_(e){if(null===e.timestampOffset||"number"!==typeof e.timingInfo.start||e.changedTimestampOffset||"main"!==this.loaderType_)return;let t=!1;e.timestampOffset-=this.getSegmentStartTimeForTimestampOffsetCalculation_({videoTimingInfo:e.segment.videoTimingInfo,audioTimingInfo:e.segment.audioTimingInfo,timingInfo:e.timingInfo}),e.changedTimestampOffset=!0,e.timestampOffset!==this.sourceUpdater_.videoTimestampOffset()&&(this.sourceUpdater_.videoTimestampOffset(e.timestampOffset),t=!0),e.timestampOffset!==this.sourceUpdater_.audioTimestampOffset()&&(this.sourceUpdater_.audioTimestampOffset(e.timestampOffset),t=!0),t&&this.trigger("timestampoffset")}getSegmentStartTimeForTimestampOffsetCalculation_(e){let{videoTimingInfo:t,audioTimingInfo:n,timingInfo:i}=e;return this.useDtsForTimestampOffset_?t&&"number"===typeof t.transmuxedDecodeStart?t.transmuxedDecodeStart:n&&"number"===typeof n.transmuxedDecodeStart?n.transmuxedDecodeStart:i.start:i.start}updateTimingInfoEnd_(e){e.timingInfo=e.timingInfo||{};const t=this.getMediaInfo_(),n="main"===this.loaderType_&&t&&t.hasVideo&&e.videoTimingInfo?e.videoTimingInfo:e.audioTimingInfo;n&&(e.timingInfo.end="number"===typeof n.end?n.end:n.start+e.duration)}handleAppendsDone_(){if(this.pendingSegment_){const e={segmentInfo:po({type:this.loaderType_,segment:this.pendingSegment_})};this.trigger({type:"appendsdone",metadata:e})}if(!this.pendingSegment_)return this.state="READY",void(this.paused()||this.monitorBuffer_());const e=this.pendingSegment_;e.part&&e.part.syncInfo?e.part.syncInfo.markAppended():e.segment.syncInfo&&e.segment.syncInfo.markAppended(),this.updateTimingInfoEnd_(e),this.shouldSaveSegmentTimingInfo_&&this.syncController_.saveSegmentTimingInfo({segmentInfo:e,shouldSaveTimelineMapping:"main"===this.loaderType_});const t=ho(e,this.sourceType_);if(t&&("warn"===t.severity?Hr.log.warn(t.message):this.logger_(t.message)),this.recordThroughput_(e),this.pendingSegment_=null,this.state="READY",e.isSyncRequest&&(this.trigger("syncinfoupdate"),!e.hasAppendedData_))return void this.logger_("Throwing away un-appended sync request ".concat(ao(e)));this.logger_("Appended ".concat(ao(e))),this.addSegmentMetadataCue_(e),this.fetchAtBuffer_=!0,this.currentTimeline_!==e.timeline&&(this.timelineChangeController_.lastTimelineChange({type:this.loaderType_,from:this.currentTimeline_,to:e.timeline}),"main"!==this.loaderType_||this.audioDisabled_||this.timelineChangeController_.lastTimelineChange({type:"audio",from:this.currentTimeline_,to:e.timeline})),this.currentTimeline_=e.timeline,this.trigger("syncinfoupdate");const n=e.segment,i=e.part,r=n.end&&this.currentTime_()-n.end>3*e.playlist.targetDuration,s=i&&i.end&&this.currentTime_()-i.end>3*e.playlist.partTargetDuration;if(r||s)return this.logger_("bad ".concat(r?"segment":"part"," ").concat(ao(e))),void this.resetEverything();null!==this.mediaIndex&&this.trigger("bandwidthupdate"),this.trigger("progress"),this.mediaIndex=e.mediaIndex,this.partIndex=e.partIndex,this.isEndOfStream_(e.mediaIndex,e.playlist,e.partIndex)&&this.endOfStream(),this.trigger("appended"),e.hasAppendedData_&&this.mediaAppends++,this.paused()||this.monitorBuffer_()}recordThroughput_(e){if(e.duration<so)return void this.logger_("Ignoring segment's throughput because its duration of ".concat(e.duration)+" is less than the min to record ".concat(so));const t=this.throughput.rate,n=Date.now()-e.endOfAllRequests+1,i=Math.floor(e.byteLength/n*8*1e3);this.throughput.rate+=(i-t)/++this.throughput.count}addSegmentMetadataCue_(e){if(!this.segmentMetadataTrack_)return;const t=e.segment,n=t.start,i=t.end;if(!ro(n)||!ro(i))return;io(n,i,this.segmentMetadataTrack_);const s=r.a.WebKitDataCue||r.a.VTTCue,a={custom:t.custom,dateTimeObject:t.dateTimeObject,dateTimeString:t.dateTimeString,programDateTime:t.programDateTime,bandwidth:e.playlist.attributes.BANDWIDTH,resolution:e.playlist.attributes.RESOLUTION,codecs:e.playlist.attributes.CODECS,byteLength:e.byteLength,uri:e.ur
2i,timeline:e.timeline,playlist:e.playlist.id,start:n,end:i},o=new s(n,i,JSON.stringify(a));o.value=a,this.segmentMetadataTrack_.addCue(o)}}function go(){}const fo=function(e){return"string"!==typeof e?e:e.replace(/./,(e=>e.toUpperCase()))},bo=["video","audio"],yo=(e,t)=>{const n=t["".concat(e,"Buffer")];return n&&n.updating||t.queuePending[e]},jo=(e,t)=>{if(0===t.queue.length)return;let n=0,i=t.queue[n];if("mediaSource"!==i.type){if("mediaSource"!==e&&t.ready()&&"closed"!==t.mediaSource.readyState&&!yo(e,t)){if(i.type!==e){if(n=((e,t)=>{for(let n=0;n<t.length;n++){const i=t[n];if("mediaSource"===i.type)return null;if(i.type===e)return n}return null})(e,t.queue),null===n)return;i=t.queue[n]}return t.queue.splice(n,1),t.queuePending[e]=i,i.action(e,t),i.doneFn?void 0:(t.queuePending[e]=null,void jo(e,t))}}else t.updating()||"closed"===t.mediaSource.readyState||(t.queue.shift(),i.action(t),i.doneFn&&i.doneFn(),jo("audio",t),jo("video",t))},_o=(e,t)=>{const n=t["".concat(e,"Buffer")],i=fo(e);n&&(n.removeEventListener("updateend",t["on".concat(i,"UpdateEnd_")]),n.removeEventListener("error",t["on".concat(i,"Error_")]),t.codecs[e]=null,t["".concat(e,"Buffer")]=null)},vo=(e,t)=>e&&t&&-1!==Array.prototype.indexOf.call(e.sourceBuffers,t),xo=(e,t,n)=>(i,r)=>{const s=r["".concat(i,"Buffer")];if(vo(r.mediaSource,s)){r.logger_("Appending segment ".concat(t.mediaIndex,"'s ").concat(e.length," bytes to ").concat(i,"Buffer"));try{s.appendBuffer(e)}catch(a){r.logger_("Error with code ".concat(a.code," ")+(22===a.code?"(QUOTA_EXCEEDED_ERR) ":"")+"when appending segment ".concat(t.mediaIndex," to ").concat(i,"Buffer")),r.queuePending[i]=null,n(a)}}},Oo=(e,t)=>(n,i)=>{const r=i["".concat(n,"Buffer")];if(vo(i.mediaSource,r)){i.logger_("Removing ".concat(e," to ").concat(t," from ").concat(n,"Buffer"));try{r.remove(e,t)}catch(s){i.logger_("Remove ".concat(e," to ").concat(t," from ").concat(n,"Buffer failed"))}}},To=e=>(t,n)=>{const i=n["".concat(t,"Buffer")];vo(n.mediaSource,i)&&(n.logger_("Setting ".concat(t,"timestampOffset to ").concat(e)),i.timestampOffset=e)},So=e=>(t,n)=>{e()},wo=e=>t=>{if("open"===t.mediaSource.readyState){t.logger_("Calling mediaSource endOfStream(".concat(e||"",")"));try{t.mediaSource.endOfStream(e)}catch(n){Hr.log.warn("Failed to call media source endOfStream",n)}}},Ao=e=>t=>{t.logger_("Setting mediaSource duration to ".concat(e));try{t.mediaSource.duration=e}catch(n){Hr.log.warn("Failed to set media source duration",n)}},ko=()=>(e,t)=>{if("open"!==t.mediaSource.readyState)return;const n=t["".concat(e,"Buffer")];if(vo(t.mediaSource,n)){t.logger_("calling abort on ".concat(e,"Buffer"));try{n.abort()}catch(i){Hr.log.warn("Failed to abort on ".concat(e,"Buffer"),i)}}},Co=(e,t)=>n=>{const i=fo(e),r=Object(g.e)(t);n.logger_("Adding ".concat(e,"Buffer with codec ").concat(t," to mediaSource"));const s=n.mediaSource.addSourceBuffer(r);s.addEventListener("updateend",n["on".concat(i,"UpdateEnd_")]),s.addEventListener("error",n["on".concat(i,"Error_")]),n.codecs[e]=t,n["".concat(e,"Buffer")]=s},Eo=e=>t=>{const n=t["".concat(e,"Buffer")];if(_o(e,t),vo(t.mediaSource,n)){t.logger_("Removing ".concat(e,"Buffer with codec ").concat(t.codecs[e]," from mediaSource"));try{t.mediaSource.removeSourceBuffer(n)}catch(i){Hr.log.warn("Failed to removeSourceBuffer ".concat(e,"Buffer"),i)}}},Io=e=>(t,n)=>{const i=n["".concat(t,"Buffer")],r=Object(g.e)(e);if(!vo(n.mediaSource,i))return;const s=e.substring(0,e.indexOf(".")),a=n.codecs[t];if(a.substring(0,a.indexOf("."))===s)return;const o={codecsChangeInfo:{from:a,to:e}};n.trigger({type:"codecschange",metadata:o}),n.logger_("changing ".concat(t,"Buffer codec from ").concat(a," to ").concat(e));try{i.changeType(r),n.codecs[t]=e}catch(c){o.errorType=Hr.Error.StreamingCodecsChangeError,o.error=c,c.metadata=o,n.error_=c,n.trigger("error"),Hr.log.warn("Failed to changeType on ".concat(t,"Buffer"),c)}},Do=e=>{let{type:t,sourceUpdater:n,action:i,doneFn:r,name:s}=e;n.queue.push({type:t,action:i,doneFn:r,name:s}),jo(t,n)},Po=(e,t)=>n=>{const i=function(e){if(0===e.length)return"Buffered Ranges are empty";let t="Buffered Ranges: \n";for(let n=0;n<e.length;n++){const i=e.start(n),r=e.end(n);t+="".concat(i," --\x3e ").concat(r,". Duration (").concat(r-i,")\n")}return t}(t["".concat(e,"Buffered")]());if(t.logger_('received "updateend" event for '.concat(e," Source Buffer: "),i),t.queuePending[e]){const n=t.queuePending[e].doneFn;t.queuePending[e]=null,n&&n(t["".concat(e,"Error_")])}jo(e,t)};class Ro extends Hr.EventTarget{constructor(e){super(),this.mediaSource=e,this.sourceopenListener_=()=>jo("mediaSource",this),this.mediaSource.addEventListener("sourceopen",this.sourceopenListener_),this.logger_=Qr("SourceUpdater"),this.audioTimestampOffset_=0,this.videoTimestampOffset_=0,this.queue=[],this.queuePending={audio:null,video:null},this.delayedAudioAppendQueue_=[],this.videoAppendQueued_=!1,this.codecs={},this.onVideoUpdateEnd_=Po("video",this),this.onAudioUpdateEnd_=Po("audio",this),this.onVideoError_=e=>{this.videoError_=e},this.onAudioError_=e=>{this.audioError_=e},this.createdSourceBuffers_=!1,this.initializedEme_=!1,this.triggeredReady_=!1}initializedEme(){this.initializedEme_=!0,this.triggerReady()}hasCreatedSourceBuffers(){return this.createdSourceBuffers_}hasInitializedAnyEme(){return this.initializedEme_}ready(){return this.hasCreatedSourceBuffers()&&this.hasInitializedAnyEme()}createSourceBuffers(e){this.hasCreatedSourceBuffers()||(this.addOrChangeSourceBuffers(e),this.createdSourceBuffers_=!0,this.trigger("createdsourcebuffers"),this.triggerReady())}
2triggerReady(){this.ready()&&!this.triggeredReady_&&(this.triggeredReady_=!0,this.trigger("ready"))}addSourceBuffer(e,t){Do({type:"mediaSource",sourceUpdater:this,action:Co(e,t),name:"addSourceBuffer"})}abort(e){Do({type:e,sourceUpdater:this,action:ko(e),name:"abort"})}removeSourceBuffer(e){this.canRemoveSourceBuffer()?Do({type:"mediaSource",sourceUpdater:this,action:Eo(e),name:"removeSourceBuffer"}):Hr.log.error("removeSourceBuffer is not supported!")}canRemoveSourceBuffer(){return!Hr.browser.IS_FIREFOX&&r.a.MediaSource&&r.a.MediaSource.prototype&&"function"===typeof r.a.MediaSource.prototype.removeSourceBuffer}static canChangeType(){return r.a.SourceBuffer&&r.a.SourceBuffer.prototype&&"function"===typeof r.a.SourceBuffer.prototype.changeType}canChangeType(){return this.constructor.canChangeType()}changeType(e,t){this.canChangeType()?Do({type:e,sourceUpdater:this,action:Io(t),name:"changeType"}):Hr.log.error("changeType is not supported!")}addOrChangeSourceBuffers(e){if(!e||"object"!==typeof e||0===Object.keys(e).length)throw new Error("Cannot addOrChangeSourceBuffers to undefined codecs");Object.keys(e).forEach((t=>{const n=e[t];if(!this.hasCreatedSourceBuffers())return this.addSourceBuffer(t,n);this.canChangeType()&&this.changeType(t,n)}))}appendBuffer(e,t){const{segmentInfo:n,type:i,bytes:r}=e;if(this.processedAppend_=!0,"audio"===i&&this.videoBuffer&&!this.videoAppendQueued_)return this.delayedAudioAppendQueue_.push([e,t]),void this.logger_("delayed audio append of ".concat(r.length," until video append"));if(Do({type:i,sourceUpdater:this,action:xo(r,n||{mediaIndex:-1},t),doneFn:t,name:"appendBuffer"}),"video"===i){if(this.videoAppendQueued_=!0,!this.delayedAudioAppendQueue_.length)return;const e=this.delayedAudioAppendQueue_.slice();this.logger_("queuing delayed audio ".concat(e.length," appendBuffers")),this.delayedAudioAppendQueue_.length=0,e.forEach((e=>{this.appendBuffer.apply(this,e)}))}}audioBuffered(){return vo(this.mediaSource,this.audioBuffer)&&this.audioBuffer.buffered?this.audioBuffer.buffered:Jr()}videoBuffered(){return vo(this.mediaSource,this.videoBuffer)&&this.videoBuffer.buffered?this.videoBuffer.buffered:Jr()}buffered(){const e=vo(this.mediaSource,this.videoBuffer)?this.videoBuffer:null,t=vo(this.mediaSource,this.audioBuffer)?this.audioBuffer:null;return t&&!e?this.audioBuffered():e&&!t?this.videoBuffered():function(e,t){let n=null,i=null,r=0;const s=[],a=[];if(!e||!e.length||!t||!t.length)return Jr();let o=e.length;for(;o--;)s.push({time:e.start(o),type:"start"}),s.push({time:e.end(o),type:"end"});for(o=t.length;o--;)s.push({time:t.start(o),type:"start"}),s.push({time:t.end(o),type:"end"});for(s.sort((function(e,t){return e.time-t.time})),o=0;o<s.length;o++)"start"===s[o].type?(r++,2===r&&(n=s[o].time)):"end"===s[o].type&&(r--,1===r&&(i=s[o].time)),null!==n&&null!==i&&(a.push([n,i]),n=null,i=null);return Jr(a)}(this.audioBuffered(),this.videoBuffered())}setDuration(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:go;Do({type:"mediaSource",sourceUpdater:this,action:Ao(e),name:"duration",doneFn:t})}endOfStream(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:go;"string"!==typeof e&&(e=void 0),Do({type:"mediaSource",sourceUpdater:this,action:wo(e),name:"endOfStream",doneFn:t})}removeAudio(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:go;this.audioBuffered().length&&0!==this.audioBuffered().end(0)?Do({type:"audio",sourceUpdater:this,action:Oo(e,t),doneFn:n,name:"remove"}):n()}removeVideo(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:go;this.videoBuffered().length&&0!==this.videoBuffered().end(0)?Do({type:"video",sourceUpdater:this,action:Oo(e,t),doneFn:n,name:"remove"}):n()}updating(){return!(!yo("audio",this)&&!yo("video",this))}audioTimestampOffset(e){return"undefined"!==typeof e&&this.audioBuffer&&this.audioTimestampOffset_!==e&&(Do({type:"audio",sourceUpdater:this,action:To(e),name:"timestampOffset"}),this.audioTimestampOffset_=e),this.audioTimestampOffset_}videoTimestampOffset(e){return"undefined"!==typeof e&&this.videoBuffer&&this.videoTimestampOffset_!==e&&(Do({type:"video",sourceUpdater:this,action:To(e),name:"timestampOffset"}),this.videoTimestampOffset_=e),this.videoTimestampOffset_}audioQueueCallback(e){this.audioBuffer&&Do({type:"audio",sourceUpdater:this,action:So(e),name:"callback"})}videoQueueCallback(e){this.videoBuffer&&Do({type:"video",sourceUpdater:this,action:So(e),name:"callback"})}dispose(){this.trigger("dispose"),bo.forEach((e=>{this.abort(e),this.canRemoveSourceBuffer()?this.removeSourceBuffer(e):this["".concat(e,"QueueCallback")]((()=>_o(e,this)))})),this.videoAppendQueued_=!1,this.delayedAudioAppendQueue_.length=0,this.sourceopenListener_&&this.mediaSource.removeEventListener("sourceopen",this.sourceopenListener_),this.off()}}const Lo=e=>decodeURIComponent(escape(String.fromCharCode.apply(null,e))),Mo=new Uint8Array("\n\n".split("").map((e=>e.charCodeAt(0))));
2class No extends Error{constructor(){super("Trying to parse received VTT cues, but there is no WebVTT. Make sure vtt.js is loaded.")}}class Bo extends mo{constructor(e){super(e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}),this.mediaSource_=null,this.subtitlesTrack_=null,this.featuresNativeTextTracks_=e.featuresNativeTextTracks,this.loadVttJs=e.loadVttJs,this.shouldSaveSegmentTimingInfo_=!1}buffered_(){if(!this.subtitlesTrack_||!this.subtitlesTrack_.cues||!this.subtitlesTrack_.cues.length)return Jr();const e=this.subtitlesTrack_.cues;return Jr([[e[0].startTime,e[e.length-1].startTime]])}initSegmentForMap(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(!e)return null;const n=na(e);let i=this.initSegments_[n];if(t&&!i&&e.bytes){const t=Mo.byteLength+e.bytes.byteLength,r=new Uint8Array(t);r.set(e.bytes),r.set(Mo,e.bytes.byteLength),this.initSegments_[n]=i={resolvedUri:e.resolvedUri,byterange:e.byterange,bytes:r}}return i||e}couldBeginLoading_(){return this.playlist_&&this.subtitlesTrack_&&!this.paused()}init_(){return this.state="READY",this.resetEverything(),this.monitorBuffer_()}track(e){return"undefined"===typeof e||(this.subtitlesTrack_=e,"INIT"===this.state&&this.couldBeginLoading_()&&this.init_()),this.subtitlesTrack_}remove(e,t){io(e,t,this.subtitlesTrack_)}fillBuffer_(){const e=this.chooseNextRequest_();if(e){if(null===this.syncController_.timestampOffsetForTimeline(e.timeline)){const e=()=>{this.state="READY",this.paused()||this.monitorBuffer_()};return this.syncController_.one("timestampoffset",e),void(this.state="WAITING_ON_TIMELINE")}this.loadSegment_(e)}}timestampOffsetForSegment_(){return null}chooseNextRequest_(){return this.skipEmptySegments_(super.chooseNextRequest_())}skipEmptySegments_(e){for(;e&&e.segment.empty;){if(e.mediaIndex+1>=e.playlist.segments.length){e=null;break}e=this.generateSegmentInfo_({playlist:e.playlist,mediaIndex:e.mediaIndex+1,startOfSegment:e.startOfSegment+e.duration,isSyncRequest:e.isSyncRequest})}return e}stopForError(e){this.error(e),this.state="READY",this.pause(),this.trigger("error")}segmentRequestFinished_(e,t,n){if(!this.subtitlesTrack_)return void(this.state="READY");if(this.saveTransferStats_(t.stats),!this.pendingSegment_)return this.state="READY",void(this.mediaRequestsAborted+=1);if(e)return e.code===Ia&&this.handleTimeout_(),e.code===Da?this.mediaRequestsAborted+=1:this.mediaRequestsErrored+=1,void this.stopForError(e);const i=this.pendingSegment_,s=n.mp4VttCues&&n.mp4VttCues.length;s&&(i.mp4VttCues=n.mp4VttCues),this.saveBandwidthRelatedStats_(i.duration,t.stats),t.key&&this.segmentKey(t.key,!0),this.state="APPENDING",this.trigger("appending");const a=i.segment;if(a.map&&(a.map.bytes=t.map.bytes),i.bytes=t.bytes,"function"!==typeof r.a.WebVTT&&"function"===typeof this.loadVttJs)return this.state="WAITING_ON_VTTJS",void this.loadVttJs().then((()=>this.segmentRequestFinished_(e,t,n)),(()=>this.stopForError({message:"Error loading vtt.js"})));a.requested=!0;try{this.parseVTTCues_(i)}catch(o){return void this.stopForError({message:o.message,metadata:{errorType:Hr.Error.StreamingVttParserError,error:o}})}if(s||this.updateTimeMapping_(i,this.syncController_.timelines[i.timeline],this.playlist_),i.cues.length?i.timingInfo={start:i.cues[0].startTime,end:i.cues[i.cues.length-1].endTime}:i.timingInfo={start:i.startOfSegment,end:i.startOfSegment+i.duration},i.isSyncRequest)return this.trigger("syncinfoupdate"),this.pendingSegment_=null,void(this.state="READY");i.byteLength=i.bytes.byteLength,this.mediaSecondsLoaded+=a.duration,i.cues.forEach((e=>{this.subtitlesTrack_.addCue(this.featuresNativeTextTracks_?new r.a.VTTCue(e.startTime,e.endTime,e.text):e)})),function(e){const t=e.cues;if(!t)return;const n={};for(let i=t.length-1;i>=0;i--){const r=t[i],s="".concat(r.startTime,"-").concat(r.endTime,"-").concat(r.text);n[s]?e.removeCue(r):n[s]=r}}(this.subtitlesTrack_),this.handleAppendsDone_()}handleData_(e,t){const n=e&&"vtt"===e.type,i=t&&"text"===t.type;n&&i&&super.handleData_(e,t)}updateTimingInfoEnd_(){}parseMp4VttCues_(e){const t=null===this.sourceUpdater_.videoTimestampOffset()?this.sourceUpdater_.audioTimestampOffset():this.sourceUpdater_.videoTimestampOffset();
2e.mp4VttCues.forEach((n=>{const i=n.start+t,s=n.end+t,a=new r.a.VTTCue(i,s,n.cueText);n.settings&&n.settings.split(" ").forEach((e=>{const t=e.split(":"),n=t[0],i=t[1];a[n]=isNaN(i)?i:Number(i)})),e.cues.push(a)}))}parseVTTCues_(e){let t,n=!1;if("function"!==typeof r.a.WebVTT)throw new No;if(e.cues=[],e.timestampmap={MPEGTS:0,LOCAL:0},e.mp4VttCues)return void this.parseMp4VttCues_(e);"function"===typeof r.a.TextDecoder?t=new r.a.TextDecoder("utf8"):(t=r.a.WebVTT.StringDecoder(),n=!0);const i=new r.a.WebVTT.Parser(r.a,r.a.vttjs,t);if(i.oncue=e.cues.push.bind(e.cues),i.ontimestampmap=t=>{e.timestampmap=t},i.onparsingerror=e=>{Hr.log.warn("Error encountered when parsing cues: "+e.message)},e.segment.map){let t=e.segment.map.bytes;n&&(t=Lo(t)),i.parse(t)}let s=e.bytes;n&&(s=Lo(s)),i.parse(s),i.flush()}updateTimeMapping_(e,t,n){const i=e.segment;if(!t)return;if(!e.cues.length)return void(i.empty=!0);const{MPEGTS:r,LOCAL:s}=e.timestampmap,a=r/O.ONE_SECOND_IN_TS-s+t.mapping;if(e.cues.forEach((e=>{const n=e.endTime-e.startTime,i=this.handleRollover_(e.startTime+a,t.time);e.startTime=Math.max(i,0),e.endTime=Math.max(i+n,0)})),!n.syncInfo){const t=e.cues[0].startTime,r=e.cues[e.cues.length-1].startTime;n.syncInfo={mediaSequence:n.mediaSequence+e.mediaIndex,time:Math.min(t,r-i.duration)}}}handleRollover_(e,t){if(null===t)return e;let n=e*O.ONE_SECOND_IN_TS;const i=t*O.ONE_SECOND_IN_TS;let r;for(r=i<n?-8589934592:8589934592;Math.abs(n-i)>4294967296;)n+=r;return n/O.ONE_SECOND_IN_TS}}const Uo=function(e,t){const n=e.cues;for(let i=0;i<n.length;i++){const e=n[i];if(t>=e.adStartTime&&t<=e.adEndTime)return e}return null};class Fo{constructor(e){let{start:t,end:n,segmentIndex:i,partIndex:r=null,appended:s=!1}=e;this.start_=t,this.end_=n,this.segmentIndex_=i,this.partIndex_=r,this.appended_=s}isInRange(e){return e>=this.start&&e<this.end}markAppended(){this.appended_=!0}resetAppendedStatus(){this.appended_=!1}get isAppended(){return this.appended_}get start(){return this.start_}get end(){return this.end_}get segmentIndex(){return this.segmentIndex_}get partIndex(){return this.partIndex_}}class zo{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];this.segmentSyncInfo_=e,this.partsSyncInfo_=t}get segmentSyncInfo(){return this.segmentSyncInfo_}get partsSyncInfo(){return this.partsSyncInfo_}get hasPartsSyncInfo(){return this.partsSyncInfo_.length>0}resetAppendStatus(){this.segmentSyncInfo_.resetAppendedStatus(),this.partsSyncInfo_.forEach((e=>e.resetAppendedStatus()))}}class qo{constructor(){this.storage_=new Map,this.diagnostics_="",this.isReliable_=!1,this.start_=-1/0,this.end_=1/0}get start(){return this.start_}get end(){return this.end_}get diagnostics(){return this.diagnostics_}get isReliable(){return this.isReliable_}resetAppendedStatus(){this.storage_.forEach((e=>e.resetAppendStatus()))}update(e,t){const{mediaSequence:n,segments:i}=e;if(this.isReliable_=this.isReliablePlaylist_(n,i),this.isReliable_)return this.updateStorage_(i,n,this.calculateBaseTime_(n,i,t))}getSyncInfoForTime(e){for(const{segmentSyncInfo:t,partsSyncInfo:n}of this.storage_.values())if(n.length){for(const i of n)if(i.isInRange(e))return i}else if(t.isInRange(e))return t;return null}getSyncInfoForMediaSequence(e){return this.storage_.get(e)}updateStorage_(e,t,n){const i=new Map;let r="\n",s=n,a=t;this.start_=s,e.forEach(((e,t)=>{const n=this.storage_.get(a),o=s,c=o+e.duration,l=Boolean(n&&n.segmentSyncInfo&&n.segmentSyncInfo.isAppended),d=new Fo({start:o,end:c,appended:l,segmentIndex:t});e.syncInfo=d;let u=s;const h=(e.parts||[]).map(((e,i)=>{const s=u,o=u+e.duration,c=Boolean(n&&n.partsSyncInfo&&n.partsSyncInfo[i]&&n.partsSyncInfo[i].isAppended),l=new Fo({start:s,end:o,appended:c,segmentIndex:t,partIndex:i});return u=o,r+="Media Sequence: ".concat(a,".").concat(i," | Range: ").concat(s," --\x3e ").concat(o," | Appended: ").concat(c,"\n"),e.syncInfo=l,l}));i.set(a,new zo(d,h)),r+="".concat(Ja(e.resolvedUri)," | Media Sequence: ").concat(a," | Range: ").concat(o," --\x3e ").concat(c," | Appended: ").concat(l,"\n"),a++,s=c})),this.end_=s,this.storage_=i,this.diagnostics_=r}calculateBaseTime_(e,t,n){if(!this.storage_.size)return 0;if(this.storage_.has(e))return this.storage_.get(e).segmentSyncInfo.start;const i=Math.min(...this.storage_.keys());if(e<i){const n=i-e;let r=this.storage_.get(i).segmentSyncInfo.start;for(let e=0;e<n;e++){r-=t[e].duration}return r}return n}isReliablePlaylist_(e,t){return void 0!==e&&null!==e&&Array.isArray(t)&&t.length}}class Ho extends qo{constructor(e){super(),this.parent_=e}calculateBaseTime_(e,t,n){if(!this.storage_.size){const t=this.parent_.getSyncInfoForMediaSequence(e);return t?t.segmentSyncInfo.start:0}return super.calculateBaseTime_(e,t,n)}}const Vo=[{name:"VOD",run:(e,t,n,i,r)=>{if(n!==1/0){return{time:0,segmentIndex:0,partIndex:null}}return null}},{name:"MediaSequence",run:(e,t,n,i,r,s)=>{const a=e.getMediaSequenceSync(s);if(!a)return null;if(!a.isReliable)return null;const o=a.getSyncInfoForTime(r);return o?{time:o.start,partIndex:o.partIndex,segmentIndex:o.segmentIndex}:null}},{name:"ProgramDateTime",run:(e,t,n,i,r)=>{if(!Object.keys(e.timelineToDatetimeMappings).length)return null;let s=null,a=null;const o=ls(t);r=r||0;for(let c=0;c<o.length;c++){const n=o[t.endList||0===r?c:o.length-(c+1)],i=n.segment,l=e.timelineToDatetimeMappings[i.timeline];if(!l||!i.dateTimeObject)continue;let d=i.dateTimeObject.getTime()/1e3+l;if(i.parts&&"number"===typeof n.partIndex)for(let e=0;e<n.partIndex;e++)d+=i.parts[e].duration;const u=Math.abs(r-d);if(null!==a&&(0===u||a<u))break;a=u,s={time:d,segmentIndex:n.segmentIndex,partIndex:n.partIndex}}return s}},{name:"Segment",run:(e,t,n,i,r)=>{let s=null,a=null;r=r||0;const o=ls(t);for(let c=0;c<o.length;c++){const e=o[t.endList||0===r?c:o.length-(c+1)],n=e.segment,l=e.part&&e.part.start||n&&n.start;if(n.timeline===i&&"undefined"!==typeof l){const t=Math.abs(r-l);if(null!==a&&a<t)break;(!s||null===a||a>=t)&&(a=t,s={time:l,segmentIndex:e.segmentIndex,partIndex:e.partIndex})}}return s}},{name:"Discontinuity",run:(e,t,n,i,r)=>{let s=null;if(r=r||0,t.discontinuityStarts&&t.discontinuityStarts.length){let n=null;for(let i=0;i<t.discontinuityStarts.length;i++){const a=t.discontinuityStarts[i],o=t.discontinuitySequence+i+1,c=e.discontinuities[o];if(c){const e=Math.abs(r-c.time);if(null!==n&&n<e)break;(!s||null===n||n>=e)&&(n=e,s={time:c.time,segmentIndex:a,partIndex:null})}}}return s}},{name:"Playlist",run:(e,t,n,i,r)=>{if(t.syncInfo){return{time:t.syncInfo.time,segmentIndex:t.syncInfo.mediaSequence-t.mediaSequence,partIndex:null}}return null}}];class Wo extends Hr.EventTarget{constructor(){super(),this.timelines=[],this.discontinuities=[],this.timelineToDatetimeMappings={};const e=new qo,t=new Ho(e),n=new Ho(e);this.mediaSequenceStorage_={main:e,audio:t,vtt:n},this.logger_=Qr("SyncController")}getMediaSequenceSync(e){return this.mediaSequenceStorage_[e]||null}getSyncPoint(e,t,n,i,r){if(t!==1/0){return Vo.find((e=>{let{name:t}=e;return"VOD"===t})).run(this,e,t)}const s=this.runStrategies_(e,t,n,i,r);if(!s.length)return null;for(const a of s){const{syncPoint:t,strategy:n}
2=a,{segmentIndex:r,time:s}=t;if(r<0)continue;const o=s,c=o+e.segments[r].duration;if(this.logger_("Strategy: ".concat(n,". Current time: ").concat(i,". selected segment: ").concat(r,". Time: [").concat(o," -> ").concat(c,"]}")),i>=o&&i<c)return this.logger_("Found sync point with exact match: ",t),t}return this.selectSyncPoint_(s,{key:"time",value:i})}getExpiredTime(e,t){if(!e||!e.segments)return null;const n=this.runStrategies_(e,t,e.discontinuitySequence,0);if(!n.length)return null;const i=this.selectSyncPoint_(n,{key:"segmentIndex",value:0});return i.segmentIndex>0&&(i.time*=-1),Math.abs(i.time+gs({defaultDuration:e.targetDuration,durationList:e.segments,startIndex:i.segmentIndex,endIndex:0}))}runStrategies_(e,t,n,i,r){const s=[];for(let a=0;a<Vo.length;a++){const o=Vo[a],c=o.run(this,e,t,n,i,r);c&&(c.strategy=o.name,s.push({strategy:o.name,syncPoint:c}))}return s}selectSyncPoint_(e,t){let n=e[0].syncPoint,i=Math.abs(e[0].syncPoint[t.key]-t.value),r=e[0].strategy;for(let s=1;s<e.length;s++){const a=Math.abs(e[s].syncPoint[t.key]-t.value);a<i&&(i=a,n=e[s].syncPoint,r=e[s].strategy)}return this.logger_("syncPoint for [".concat(t.key,": ").concat(t.value,"] chosen with strategy")+" [".concat(r,"]: [time:").concat(n.time,",")+" segmentIndex:".concat(n.segmentIndex)+("number"===typeof n.partIndex?",partIndex:".concat(n.partIndex):"")+"]"),n}saveExpiredSegmentInfo(e,t){const n=t.mediaSequence-e.mediaSequence;if(n>86400)Hr.log.warn("Not saving expired segment info. Media sequence gap ".concat(n," is too large."));else for(let i=n-1;i>=0;i--){const n=e.segments[i];if(n&&"undefined"!==typeof n.start){t.syncInfo={mediaSequence:e.mediaSequence+i,time:n.start},this.logger_("playlist refresh sync: [time:".concat(t.syncInfo.time,",")+" mediaSequence: ".concat(t.syncInfo.mediaSequence,"]")),this.trigger("syncinfoupdate");break}}}setDateTimeMappingForStart(e){if(this.timelineToDatetimeMappings={},e.segments&&e.segments.length&&e.segments[0].dateTimeObject){const t=e.segments[0],n=t.dateTimeObject.getTime()/1e3;this.timelineToDatetimeMappings[t.timeline]=-n}}saveSegmentTimingInfo(e){let{segmentInfo:t,shouldSaveTimelineMapping:n}=e;const i=this.calculateSegmentTimeMapping_(t,t.timingInfo,n),r=t.segment;i&&(this.saveDiscontinuitySyncInfo_(t),t.playlist.syncInfo||(t.playlist.syncInfo={mediaSequence:t.playlist.mediaSequence+t.mediaIndex,time:r.start}));const s=r.dateTimeObject;r.discontinuity&&n&&s&&(this.timelineToDatetimeMappings[r.timeline]=-s.getTime()/1e3)}timestampOffsetForTimeline(e){return"undefined"===typeof this.timelines[e]?null:this.timelines[e].time}mappingForTimeline(e){return"undefined"===typeof this.timelines[e]?null:this.timelines[e].mapping}calculateSegmentTimeMapping_(e,t,n){const i=e.segment,r=e.part;let s,a,o=this.timelines[e.timeline];if("number"===typeof e.timestampOffset)o={time:e.startOfSegment,mapping:e.startOfSegment-t.start},n&&(this.timelines[e.timeline]=o,this.trigger("timestampoffset"),this.logger_("time mapping for timeline ".concat(e.timeline,": ")+"[time: ".concat(o.time,"] [mapping: ").concat(o.mapping,"]"))),s=e.startOfSegment,a=t.end+o.mapping;else{if(!o)return!1;s=t.start+o.mapping,a=t.end+o.mapping}return r&&(r.start=s,r.end=a),(!i.start||s<i.start)&&(i.start=s),i.end=a,!0}saveDiscontinuitySyncInfo_(e){const t=e.playlist,n=e.segment;if(n.discontinuity)this.discontinuities[n.timeline]={time:n.start,accuracy:0};else if(t.discontinuityStarts&&t.discontinuityStarts.length)for(let i=0;i<t.discontinuityStarts.length;i++){const r=t.discontinuityStarts[i],s=t.discontinuitySequence+i+1,a=r-e.mediaIndex,o=Math.abs(a);if(!this.discontinuities[s]||this.discontinuities[s].accuracy>o){let i;i=a<0?n.start-gs({defaultDuration:t.targetDuration,durationList:t.segments,startIndex:e.mediaIndex,endIndex:r}):n.end+gs({defaultDuration:t.targetDuration,durationList:t.segments,startIndex:e.mediaIndex+1,endIndex:r}),this.discontinuities[s]={time:i,accuracy:o}}}}dispose(){this.trigger("dispose"),this.off()}}class Go extends Hr.EventTarget{constructor(){super(),this.pendingTimelineChanges_={},this.lastTimelineChanges_={}}clearPendingTimelineChange(e){this.pendingTimelineChanges_[e]=null,this.trigger("pendingtimelinechange")}pendingTimelineChange(e){let{type:t,from:n,to:i}=e;return"number"===typeof n&&"number"===typeof i&&(this.pendingTimelineChanges_[t]={type:t,from:n,to:i},this.trigger("pendingtimelinechange")),this.pendingTimelineChanges_[t]}lastTimelineChange(e){let{type:t,from:n,to:i}=e;if("number"===typeof n&&"number"===typeof i){this.lastTimelineChanges_[t]={type:t,from:n,to:i},delete this.pendingTimelineChanges_[t];
vendor: 5,517 bytes, line 2
2const e={timelineChangeInfo:{from:n,to:i}};this.trigger({type:"timelinechange",metadata:e})}return this.lastTimelineChanges_[t]}dispose(){this.trigger("dispose"),this.pendingTimelineChanges_={},this.lastTimelineChanges_={},this.off()}}const Xo=ya(ja((function(){var t=function(){function e(){this.listeners={}}var t=e.prototype;return t.on=function(e,t){this.listeners[e]||(this.listeners[e]=[]),this.listeners[e].push(t)},t.off=function(e,t){if(!this.listeners[e])return!1;var n=this.listeners[e].indexOf(t);return this.listeners[e]=this.listeners[e].slice(0),this.listeners[e].splice(n,1),n>-1},t.trigger=function(e){var t=this.listeners[e];if(t)if(2===arguments.length)for(var n=t.length,i=0;i<n;++i)t[i].call(this,arguments[1]);else for(var r=Array.prototype.slice.call(arguments,1),s=t.length,a=0;a<s;++a)t[a].apply(this,r)},t.dispose=function(){this.listeners={}},t.pipe=function(e){this.on("data",(function(t){e.push(t)}))},e}();let n=null;class i{constructor(e){let t,i,r;n||(n=function(){const e=[[[],[],[],[],[]],[[],[],[],[],[]]],t=e[0],n=e[1],i=t[4],r=n[4];let s,a,o;const c=[],l=[];let d,u,h,p,m,g;for(s=0;s<256;s++)l[(c[s]=s<<1^283*(s>>7))^s]=s;for(a=o=0;!i[a];a^=d||1,o=l[o]||1)for(p=o^o<<1^o<<2^o<<3^o<<4,p=p>>8^255&p^99,i[a]=p,r[p]=a,h=c[u=c[d=c[a]]],g=16843009*h^65537*u^257*d^16843008*a,m=257*c[p]^16843008*p,s=0;s<4;s++)t[s][a]=m=m<<24^m>>>8,n[s][p]=g=g<<24^g>>>8;for(s=0;s<5;s++)t[s]=t[s].slice(0),n[s]=n[s].slice(0);return e}()),this._tables=[[n[0][0].slice(),n[0][1].slice(),n[0][2].slice(),n[0][3].slice(),n[0][4].slice()],[n[1][0].slice(),n[1][1].slice(),n[1][2].slice(),n[1][3].slice(),n[1][4].slice()]];const s=this._tables[0][4],a=this._tables[1],o=e.length;let c=1;if(4!==o&&6!==o&&8!==o)throw new Error("Invalid aes key size");const l=e.slice(0),d=[];for(this._key=[l,d],t=o;t<4*o+28;t++)r=l[t-1],(t%o===0||8===o&&t%o===4)&&(r=s[r>>>24]<<24^s[r>>16&255]<<16^s[r>>8&255]<<8^s[255&r],t%o===0&&(r=r<<8^r>>>24^c<<24,c=c<<1^283*(c>>7))),l[t]=l[t-o]^r;for(i=0;t;i++,t--)r=l[3&i?t:t-4],d[i]=t<=4||i<4?r:a[0][s[r>>>24]]^a[1][s[r>>16&255]]^a[2][s[r>>8&255]]^a[3][s[255&r]]}decrypt(e,t,n,i,r,s){const a=this._key[1];let o,c,l,d=e^a[0],u=i^a[1],h=n^a[2],p=t^a[3];const m=a.length/4-2;let g,f=4;const b=this._tables[1],y=b[0],j=b[1],_=b[2],v=b[3],x=b[4];for(g=0;g<m;g++)o=y[d>>>24]^j[u>>16&255]^_[h>>8&255]^v[255&p]^a[f],c=y[u>>>24]^j[h>>16&255]^_[p>>8&255]^v[255&d]^a[f+1],l=y[h>>>24]^j[p>>16&255]^_[d>>8&255]^v[255&u]^a[f+2],p=y[p>>>24]^j[d>>16&255]^_[u>>8&255]^v[255&h]^a[f+3],f+=4,d=o,u=c,h=l;for(g=0;g<4;g++)r[(3&-g)+s]=x[d>>>24]<<24^x[u>>16&255]<<16^x[h>>8&255]<<8^x[255&p]^a[f++],o=d,d=u,u=h,h=p,p=o}}class r extends t{constructor(){super(t),this.jobs=[],this.delay=1,this.timeout_=null}processJob_(){this.jobs.shift()(),this.jobs.length?this.timeout_=setTimeout(this.processJob_.bind(this),this.delay):this.timeout_=null}push(e){this.jobs.push(e),this.timeout_||(this.timeout_=setTimeout(this.processJob_.bind(this),this.delay))}}const s=function(e){return e<<24|(65280&e)<<8|(16711680&e)>>8|e>>>24};class a{constructor(e,t,n,i){const o=a.STEP,c=new Int32Array(e.buffer),l=new Uint8Array(e.byteLength);let d=0;for(this.asyncStream_=new r,this.asyncStream_.push(this.decryptChunk_(c.subarray(d,d+o),t,n,l)),d=o;d<c.length;d+=o)n=new Uint32Array([s(c[d-4]),s(c[d-3]),s(c[d-2]),s(c[d-1])]),this.asyncStream_.push(this.decryptChunk_(c.subarray(d,d+o),t,n,l));this.asyncStream_.push((function(){var e;i(null,(e=l).subarray(0,e.byteLength-e[e.byteLength-1]))}))}static get STEP(){return 32e3}decryptChunk_(e,t,n,r){return function(){const a=function(e,t,n){const r=new Int32Array(e.buffer,e.byteOffset,e.byteLength>>2),a=new i(Array.prototype.slice.call(t)),o=new Uint8Array(e.byteLength),c=new Int32Array(o.buffer);let l,d,u,h,p,m,g,f,b;for(l=n[0],d=n[1],u=n[2],h=n[3],b=0;b<r.length;b+=4)p=s(r[b]),m=s(r[b+1]),g=s(r[b+2]),f=s(r[b+3]),a.decrypt(p,m,g,f,c,b),c[b]=s(c[b]^l),c[b+1]=s(c[b+1]^d),c[b+2]=s(c[b+2]^u),c[b+3]=s(c[b+3]^h),l=p,d=m,u=g,h=f;return o}(e,t,n);r.set(a,e.byteOffset)}}}var o,c="undefined"!==typeof globalThis?globalThis:"undefined"!==typeof window?window:"undefined"!==typeof e?e:"undefined"!==typeof self?self:{};o="undefined"!==typeof window?window:"undefined"!==typeof c?c:"undefined"!==typeof self?self:{};var l=o.BigInt||Number;l("0x1"),l("0x100"),l("0x10000"),l("0x1000000"),l("0x100000000"),l("0x10000000000"),l("0x1000000000000"),l("0x100000000000000"),l("0x10000000000000000"),function(){var e=new Uint16Array([65484]),t=new Uint8Array(e.buffer,e.byteOffset,e.byteLength);255===t[0]||t[0]}();const d=function(e){const t={};return Object.keys(e).forEach((n=>{const i=e[n];var r;r=i,("function"===ArrayBuffer.isView?ArrayBuffer.isView(r):r&&r.buffer instanceof ArrayBuffer)?t[n]={bytes:i.buffer,byteOffset:i.byteOffset,byteLength:i.byteLength}:t[n]=i})),t};self.onmessage=function(e){const t=e.data,n=new Uint8Array(t.encrypted.bytes,t.encrypted.byteOffset,t.encrypted.byteLength),i=new Uint32Array(t.key.bytes,t.key.byteOffset,t.key.byteLength/4),r=new Uint32Array(t.iv.bytes,t.iv.byteOffset,t.iv.byteLength/4);new a(n,i,r,(function(e,n){self.postMessage(d({source:t.source,decrypted:n}),[n.buffer])}))}})));var Yo=ba(Xo);const Ko=e=>{let t=e.default?"main":"alternative";return e.characteristics&&e.characteristics.indexOf("public.accessibility.describes-video")>=0&&(t="main-desc"),t},Qo=(e,t)=>{e.abort(),e.pause(),t&&t.activePlaylistLoader&&(t.activePlaylistLoader.pause(),t.activePlaylistLoader=null)},Zo=(e,t)=>{t.activePlaylistLoader=e,e.load()},Jo={AUDIO:(e,t)=>
vendor: 5,688 bytes, line 2
2()=>{const{mediaTypes:{[e]:n},excludePlaylist:i}=t,r=n.activeTrack(),s=n.activeGroup(),a=(s.filter((e=>e.default))[0]||s[0]).id,o=n.tracks[a];if(r!==o){Hr.log.warn("Problem encountered loading the alternate audio track.Switching back to default.");for(const e in n.tracks)n.tracks[e].enabled=n.tracks[e]===o;n.onTrackChanged()}else i({error:{message:"Problem encountered loading the default audio track."}})},SUBTITLES:(e,t)=>()=>{const{mediaTypes:{[e]:n}}=t;Hr.log.warn("Problem encountered loading the subtitle track.Disabling subtitle track.");const i=n.activeTrack();i&&(i.mode="disabled"),n.onTrackChanged()}},$o={AUDIO:(e,t,n)=>{if(!t)return;const{tech:i,requestOptions:r,segmentLoaders:{[e]:s}}=n;t.on("loadedmetadata",(()=>{const e=t.media();s.playlist(e,r),(!i.paused()||e.endList&&"none"!==i.preload())&&s.load()})),t.on("loadedplaylist",(()=>{s.playlist(t.media(),r),i.paused()||s.load()})),t.on("error",Jo[e](e,n))},SUBTITLES:(e,t,n)=>{const{tech:i,requestOptions:r,segmentLoaders:{[e]:s},mediaTypes:{[e]:a}}=n;t.on("loadedmetadata",(()=>{const e=t.media();s.playlist(e,r),s.track(a.activeTrack()),(!i.paused()||e.endList&&"none"!==i.preload())&&s.load()})),t.on("loadedplaylist",(()=>{s.playlist(t.media(),r),i.paused()||s.load()})),t.on("error",Jo[e](e,n))}},ec={AUDIO:(e,t)=>{const{vhs:n,sourceType:i,segmentLoaders:{[e]:r},requestOptions:s,main:{mediaGroups:a},mediaTypes:{[e]:{groups:o,tracks:c,logger_:l}},mainPlaylistLoader:d}=t,u=Ts(d.main);a[e]&&0!==Object.keys(a[e]).length||(a[e]={main:{default:{default:!0}}},u&&(a[e].main.default.playlists=d.main.playlists));for(const h in a[e]){o[h]||(o[h]=[]);for(const r in a[e][h]){let p,m=a[e][h][r];if(u?(l("AUDIO group '".concat(h,"' label '").concat(r,"' is a main playlist")),m.isMainPlaylist=!0,p=null):p="vhs-json"===i&&m.playlists?new Ys(m.playlists[0],n,s):m.resolvedUri?new Ys(m.resolvedUri,n,s):m.playlists&&"dash"===i?new ma(m.playlists[0],n,s,d):null,m=Zr({id:r,playlistLoader:p},m),$o[e](e,m.playlistLoader,t),o[h].push(m),"undefined"===typeof c[r]){const e=new Hr.AudioTrack({id:r,kind:Ko(m),enabled:!1,language:m.language,default:m.default,label:r});c[r]=e}}}r.on("error",Jo[e](e,t))},SUBTITLES:(e,t)=>{const{tech:n,vhs:i,sourceType:r,segmentLoaders:{[e]:s},requestOptions:a,main:{mediaGroups:o},mediaTypes:{[e]:{groups:c,tracks:l}},mainPlaylistLoader:d}=t;for(const u in o[e]){c[u]||(c[u]=[]);for(const s in o[e][u]){if(!i.options_.useForcedSubtitles&&o[e][u][s].forced)continue;let h,p=o[e][u][s];if("hls"===r)h=new Ys(p.resolvedUri,i,a);else if("dash"===r){if(!p.playlists.filter((e=>e.excludeUntil!==1/0)).length)return;h=new ma(p.playlists[0],i,a,d)}else"vhs-json"===r&&(h=new Ys(p.playlists?p.playlists[0]:p.resolvedUri,i,a));if(p=Zr({id:s,playlistLoader:h},p),$o[e](e,p.playlistLoader,t),c[u].push(p),"undefined"===typeof l[s]){const e=n.addRemoteTextTrack({id:s,kind:"subtitles",default:p.default&&p.autoselect,language:p.language,label:s},!1).track;l[s]=e}}}s.on("error",Jo[e](e,t))},"CLOSED-CAPTIONS":(e,t)=>{const{tech:n,main:{mediaGroups:i},mediaTypes:{[e]:{groups:r,tracks:s}}}=t;for(const a in i[e]){r[a]||(r[a]=[]);for(const t in i[e][a]){const o=i[e][a][t];if(!/^(?:CC|SERVICE)/.test(o.instreamId))continue;const c=n.options_.vhs&&n.options_.vhs.captionServices||{};let l={label:t,language:o.language,instreamId:o.instreamId,default:o.default&&o.autoselect};if(c[l.instreamId]&&(l=Zr(l,c[l.instreamId])),void 0===l.default&&delete l.default,r[a].push(Zr({id:t},o)),"undefined"===typeof s[t]){const e=n.addRemoteTextTrack({id:l.instreamId,kind:"captions",default:l.default,language:l.language,label:l.label},!1).track;s[t]=e}}}}},tc=(e,t)=>{for(let n=0;n<e.length;n++){if(xs(t,e[n]))return!0;if(e[n].playlists&&tc(e[n].playlists,t))return!0}return!1},nc={AUDIO:(e,t)=>()=>{const{mediaTypes:{[e]:{tracks:n}}}=t;for(const e in n)if(n[e].enabled)return n[e];return null},SUBTITLES:(e,t)=>()=>{const{mediaTypes:{[e]:{tracks:n}}}=t;for(const e in n)if("showing"===n[e].mode||"hidden"===n[e].mode)return n[e];return null}},ic=e=>{["AUDIO","SUBTITLES","CLOSED-CAPTIONS"].forEach((t=>{ec[t](t,e)}));const{mediaTypes:t,mainPlaylistLoader:n,tech:i,vhs:r,segmentLoaders:{AUDIO:s,main:a}}=e;["AUDIO","SUBTITLES"].forEach((n=>{t[n].activeGroup=((e,t)=>n=>{const{mainPlaylistLoader:i,mediaTypes:{[e]:{groups:r}}}=t,s=i.media();if(!s)return null;let a=null;s.attributes[e]&&(a=r[s.attributes[e]]);const o=Object.keys(r);if(!a)if("AUDIO"===e&&o.length>1&&Ts(t.main))for(let e=0;e<o.length;e++){const t=r[o[e]];if(tc(t,s)){a=t;break}}else r.main?a=r.main:1===o.length&&(a=r[o[0]]);return"undefined"===typeof n?a:null!==n&&a&&a.filter((e=>e.id===n.id))[0]||null})(n,e),t[n].activeTrack=nc[n](n,e),t[n].onGroupChanged=((e,t)=>()=>{const{segmentLoaders:{[e]:n,main:i},mediaTypes:{[e]:r}}=t,s=r.activeTrack(),a=r.getActiveGroup(),o=r.activePlaylistLoader,c=r.lastGroup_;a&&c&&a.id===c.id||(r.lastGroup_=a,r.lastTrack_=s,Qo(n,r),a&&!a.isMainPlaylist&&(a.playlistLoader?(n.resyncLoader(),Zo(a.playlistLoader,r)):o&&i.resetEverything()))})(n,e),t[n].onGroupChanging=((e,t)=>()=>{const{segmentLoaders:{[e]:n},mediaTypes:{[e]:i}}=t;i.lastGroup_=null,n.abort(),n.pause()})(n,e),t[n].onTrackChanged=((e,t)=>()=>{const{mainPlaylistLoader:n,segmentLoaders:{[e]:i,main:r},mediaTypes:{[e]:s}}=t,a=s.activeTrack(),o=s.getActiveGroup(),c=s.activePlaylistLoader,l=s.lastTrack_;if((!l||!a||l.id!==a.id)&&(s.lastGroup_=o,s.lastTrack_=a,Qo(i,s),o)){if(o.isMainPlaylist){if(!a||!l||a.id===l.id)return;const e=t.vhs.playlistController_,i=e.selectPlaylist();if(e.media()===i)return;return s.logger_("track change. Switching main audio from ".concat(l.id," to ").concat(a.id)),n.pause(),r.resetEverything(),void e.fastQualityChange_(i)}
2if("AUDIO"===e){if(!o.playlistLoader)return r.setAudio(!0),void r.resetEverything();i.setAudio(!0),r.setAudio(!1)}c!==o.playlistLoader?(i.track&&i.track(a),i.resetEverything(),Zo(o.playlistLoader,s)):Zo(o.playlistLoader,s)}})(n,e),t[n].getActiveGroup=((e,t)=>{let{mediaTypes:n}=t;return()=>{const t=n[e].activeTrack();return t?n[e].activeGroup(t):null}})(n,e)}));const o=t.AUDIO.activeGroup();if(o){const e=(o.filter((e=>e.default))[0]||o[0]).id;t.AUDIO.tracks[e].enabled=!0,t.AUDIO.onGroupChanged(),t.AUDIO.onTrackChanged();t.AUDIO.getActiveGroup().playlistLoader?(a.setAudio(!1),s.setAudio(!0)):a.setAudio(!0)}n.on("mediachange",(()=>{["AUDIO","SUBTITLES"].forEach((e=>t[e].onGroupChanged()))})),n.on("mediachanging",(()=>{["AUDIO","SUBTITLES"].forEach((e=>t[e].onGroupChanging()))}));const c=()=>{t.AUDIO.onTrackChanged(),i.trigger({type:"usage",name:"vhs-audio-change"})};i.audioTracks().addEventListener("change",c),i.remoteTextTracks().addEventListener("change",t.SUBTITLES.onTrackChanged),r.on("dispose",(()=>{i.audioTracks().removeEventListener("change",c),i.remoteTextTracks().removeEventListener("change",t.SUBTITLES.onTrackChanged)})),i.clearTracks("audio");for(const l in t.AUDIO.tracks)i.audioTracks().addTrack(t.AUDIO.tracks[l])};class rc{constructor(){this.priority_=[],this.pathwayClones_=new Map}set version(e){1===e&&(this.version_=e)}set ttl(e){this.ttl_=e||300}set reloadUri(e){e&&(this.reloadUri_=Yr(this.reloadUri_,e))}set priority(e){e&&e.length&&(this.priority_=e)}set pathwayClones(e){e&&e.length&&(this.pathwayClones_=new Map(e.map((e=>[e.ID,e]))))}get version(){return this.version_}get ttl(){return this.ttl_}get reloadUri(){return this.reloadUri_}get priority(){return this.priority_}get pathwayClones(){return this.pathwayClones_}}class sc extends Hr.EventTarget{constructor(e,t){super(),this.currentPathway=null,this.defaultPathway=null,this.queryBeforeStart=!1,this.availablePathways_=new Set,this.steeringManifest=new rc,this.proxyServerUrl_=null,this.manifestType_=null,this.ttlTimeout_=null,this.request_=null,this.currentPathwayClones=new Map,this.nextPathwayClones=new Map,this.excludedSteeringManifestURLs=new Set,this.logger_=Qr("Content Steering"),this.xhr_=e,this.getBandwidth_=t}assignTagProperties(e,t){this.manifestType_=t.serverUri?"HLS":"DASH";const n=t.serverUri||t.serverURL;if(!n)return this.logger_("steering manifest URL is ".concat(n,", cannot request steering manifest.")),void this.trigger("error");n.startsWith("data:")?this.decodeDataUriManifest_(n.substring(n.indexOf(",")+1)):(this.steeringManifest.reloadUri=Yr(e,n),this.defaultPathway=t.pathwayId||t.defaultServiceLocation,this.queryBeforeStart=t.queryBeforeStart,this.proxyServerUrl_=t.proxyServerURL,this.defaultPathway&&!this.queryBeforeStart&&this.trigger("content-steering"))}requestSteeringManifest(e){const t=this.steeringManifest.reloadUri;if(!t)return;const n=e?t:this.getRequestURI(t);if(!n)return this.logger_("No valid content steering manifest URIs. Stopping content steering."),this.trigger("error"),void this.dispose();const i={contentSteeringInfo:{uri:n}};this.trigger({type:"contentsteeringloadstart",metadata:i}),this.request_=this.xhr_({uri:n,requestType:"content-steering-manifest"},((e,t)=>{if(e){if(410===t.status)return this.logger_("manifest request 410 ".concat(e,".")),this.logger_("There will be no more content steering requests to ".concat(n," this session.")),void this.excludedSteeringManifestURLs.add(n);if(429===t.status){const n=t.responseHeaders["retry-after"];return this.logger_("manifest request 429 ".concat(e,".")),this.logger_("content steering will retry in ".concat(n," seconds.")),void this.startTTLTimeout_(parseInt(n,10))}return this.logger_("manifest failed to load ".concat(e,".")),void this.startTTLTimeout_()}let r;this.trigger({type:"contentsteeringloadcomplete",metadata:i});try{r=JSON.parse(this.request_.responseText)}catch(a){const e={errorType:Hr.Error.StreamingContentSteeringParserError,error:a};this.trigger({type:"error",metadata:e})}this.assignSteeringProperties_(r);const s={contentSteeringInfo:i.contentSteeringInfo,contentSteeringManifest:{version:this.steeringManifest.version,reloadUri:this.steeringManifest.reloadUri,priority:this.steeringManifest.priority}};this.trigger({type:"contentsteeringparsed",metadata:s}),this.startTTLTimeout_()}))}setProxyServerUrl_(e){const t=new r.a.URL(e),n=new r.a.URL(this.proxyServerUrl_);return n.searchParams.set("url",encodeURI(t.toString())),this.setSteeringParams_(n.toString())}decodeDataUriManifest_(e){const t=JSON.parse(r.a.atob(e));this.assignSteeringProperties_(t)}setSteeringParams_(e){const t=new r.a.URL(e),n=this.getPathway(),i=this.getBandwidth_();if(n){const e="_".concat(this.manifestType_,"_pathway");t.searchParams.set(e,n)}if(i){const e="_".concat(this.manifestType_,"_throughput");t.searchParams.set(e,i)}return t.toString()}assignSteeringProperties_(e){if(this.steeringManifest.version=e.VERSION,!this.steeringManifest.version)return this.logger_("manifest version is ".concat(e.VERSION,", which is not supported.")),void this.trigger("error");this.steeringManifest.ttl=e.TTL,this.steeringManifest.reloadUri=e["RELOAD-URI"],this.steeringManifest.priority=e["PATHWAY-PRIORITY"]||e["SERVICE-LOCATION-PRIORITY"],this.steeringManifest.pathwayClones=e["PATHWAY-CLONES"],this.nextPathwayClones=this.steeringManifest.pathwayClones,this.availablePathways_.size||(this.logger_("There are no available pathways for c
2ontent steering. Ending content steering."),this.trigger("error"),this.dispose());const t=(e=>{for(const t of e)if(this.availablePathways_.has(t))return t;return[...this.availablePathways_][0]})(this.steeringManifest.priority);this.currentPathway!==t&&(this.currentPathway=t,this.trigger("content-steering"))}getPathway(){return this.currentPathway||this.defaultPathway}getRequestURI(e){if(!e)return null;const t=e=>this.excludedSteeringManifestURLs.has(e);if(this.proxyServerUrl_){const n=this.setProxyServerUrl_(e);if(!t(n))return n}const n=this.setSteeringParams_(e);return t(n)?null:n}startTTLTimeout_(){const e=1e3*(arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.steeringManifest.ttl);this.ttlTimeout_=r.a.setTimeout((()=>{this.requestSteeringManifest()}),e)}clearTTLTimeout_(){r.a.clearTimeout(this.ttlTimeout_),this.ttlTimeout_=null}abort(){this.request_&&this.request_.abort(),this.request_=null}dispose(){this.off("content-steering"),this.off("error"),this.abort(),this.clearTTLTimeout_(),this.currentPathway=null,this.defaultPathway=null,this.queryBeforeStart=null,this.proxyServerUrl_=null,this.manifestType_=null,this.ttlTimeout_=null,this.request_=null,this.excludedSteeringManifestURLs=new Set,this.availablePathways_=new Set,this.steeringManifest=new rc}addAvailablePathway(e){e&&this.availablePathways_.add(e)}clearAvailablePathways(){this.availablePathways_.clear()}excludePathway(e){return this.availablePathways_.delete(e)}didDASHTagChange(e,t){return!t&&this.steeringManifest.reloadUri||t&&(Yr(e,t.serverURL)!==this.steeringManifest.reloadUri||t.defaultServiceLocation!==this.defaultPathway||t.queryBeforeStart!==this.queryBeforeStart||t.proxyServerURL!==this.proxyServerUrl_)}getAvailablePathways(){return this.availablePathways_}}let ac;const oc=["mediaRequests","mediaRequestsAborted","mediaRequestsTimedout","mediaRequestsErrored","mediaTransferDuration","mediaBytesTransferred","mediaAppends"],cc=function(e){return this.audioSegmentLoader_[e]+this.mainSegmentLoader_[e]};class lc extends Hr.EventTarget{constructor(e){super(),this.fastQualityChange_=((e,t)=>{let n=null;return function(){for(var i=arguments.length,r=new Array(i),s=0;s<i;s++)r[s]=arguments[s];clearTimeout(n),n=setTimeout((()=>{e.apply(null,r)}),t)}})(this.fastQualityChange_.bind(this),100);const{src:t,withCredentials:n,tech:i,bandwidth:s,externVhs:a,useCueTags:o,playlistExclusionDuration:c,enableLowInitialPlaylist:l,sourceType:d,cacheEncryptionKeys:u,bufferBasedABR:h,leastPixelDiffSelector:p,captionServices:m,experimentalUseMMS:g}=e;if(!t)throw new Error("A non-empty playlist URL or JSON manifest string is required");let{maxPlaylistRetries:f}=e;null!==f&&"undefined"!==typeof f||(f=1/0),ac=a,this.bufferBasedABR=Boolean(h),this.leastPixelDiffSelector=Boolean(p),this.withCredentials=n,this.tech_=i,this.vhs_=i.vhs,this.player_=e.player_,this.sourceType_=d,this.useCueTags_=o,this.playlistExclusionDuration=c,this.maxPlaylistRetries=f,this.enableLowInitialPlaylist=l,this.usingManagedMediaSource_=!1,this.useCueTags_&&(this.cueTagsTrack_=this.tech_.addTextTrack("metadata","ad-cues"),this.cueTagsTrack_.inBandMetadataTrackDispatchType=""),this.requestOptions_={withCredentials:n,maxPlaylistRetries:f,timeout:null},this.on("error",this.pauseLoading),this.mediaTypes_=(()=>{const e={};return["AUDIO","SUBTITLES","CLOSED-CAPTIONS"].forEach((t=>{e[t]={groups:{},tracks:{},activePlaylistLoader:null,activeGroup:go,activeTrack:go,getActiveGroup:go,onGroupChanged:go,onTrackChanged:go,lastTrack_:null,logger_:Qr("MediaGroups[".concat(t,"]"))}})),e})(),g&&r.a.ManagedMediaSource?(this.tech_.el_.disableRemotePlayback=!0,this.mediaSource=new r.a.ManagedMediaSource,this.usingManagedMediaSource_=!0,Hr.log("Using ManagedMediaSource")):r.a.MediaSource&&(this.mediaSource=new r.a.MediaSource),this.handleDurationChange_=this.handleDurationChange_.bind(this),this.handleSourceOpen_=this.handleSourceOpen_.bind(this),this.handleSourceEnded_=this.handleSourceEnded_.bind(this),this.load=this.load.bind(this),this.pause=this.pause.bind(this),this.mediaSource.addEventListener("durationchange",this.handleDurationChange_),this.mediaSource.addEventListener("sourceopen",this.handleSourceOpen_),this.mediaSource.addEventListener("sourceended",this.handleSourceEnded_),this.mediaSource.addEventListener("startstreaming",this.load),this.mediaSource.addEventListener("endstreaming",this.pause),this.seekable_=Jr(),this.hasPlayed_=!1,this.syncController_=new Wo(e),this.segmentMetadataTrack_=i.addRemoteTextTrack({kind:"metadata",label:"segment-metadata"},!1).track,this.segmentMetadataTrack_.mode="hidden",this.decrypter_=new Yo,this.sourceUpdater_=new Ro(this.mediaSource),this.inbandTextTracks_={},this.timelineChangeController_=new Go,this.keyStatusMap_=new Map;const b={vhs:this.vhs_,parse708captions:e.parse708captions,useDtsForTimestampOffset:e.useDtsForTimestampOffset,captionServices:m,mediaSource:this.mediaSource,currentTime:this.tech_.currentTime.bind(this.tech_),seekable:()=>this.seekable(),seeking:()=>this.tech_.seeking(),duration:()=>this.duration(),hasPlayed:()=>this.hasPlayed_,goalBufferLength:()=>this.goalBufferLength(),bandwidth:s,syncController:this.syncController_,decrypter:this.decrypter_,sourceType:this.sourceType_,inbandTextTracks:this.inbandTextTracks_,cacheEncryptionKeys:u,sourceUpdater:this.sourceUpdater_,timelineChangeController:this.timelineChangeController_,exactManifestTimings:e.exactManifestTimings,addMetadataToTextTrack:this.addMetadataToTextTrack.bind(this)};this.mainPlaylistLoader_="dash"===this.sourceType_?new ma(t,this.vhs_,Zr(this.requestOptions_,{addMetadataToTextTrack:this.addMetadataToTextTrack.bind(this)})):new Ys(t,this.vhs_,Zr(this.requestOptions_,{addDateRangesToTextTrack:this.addDateRangesToTextTrack_.bind(this)})),this.setupMainPlaylistLoaderListeners_(),this.mainSegmentLoader_=new mo(Zr(b,{segmentMetadataTrack:this.segmentMetadataTrack_,loaderType:"main"}),e),this.audioSegmentLoader_=new mo(Zr(b,{loaderType:"audio"}),e),this.subtitleSegmentLoader_=new Bo(Zr(b,{loaderType:"vtt",featuresNativeTextTracks:this.tech_.featuresNativeTextTracks,loadVttJs:()=>new Promise(((e,t)=>{function n(){i.off("vttjserror",r),e()}function r(){i.off("vttjsloaded",n),t()}i.one("vttjsloaded",n),i.one("vttjserror",r),i.addWebVttScript_()}))}),e);this.contentSteeringController_=new sc(this.vhs_.xhr,(()=>this.mainSegmentLoader_.bandwidth)),this.setupSegmentLoaderListeners_(),this.bufferBasedABR&&(this.mainPlaylistLoader_.one("loadedplaylist",(()=>this.startABRTimer_())),this.tech_.on("pause",(()=>this.stopABRTimer_())),this.tech_.on("play",(()=>this.startABRTimer_()))),oc.forEach((e=>{this[e+"_"]=cc.bind(this,e)})),this.logger_=Qr("pc"),this.triggeredFmp4Usage=!1,"none"===this.tech_.preload()?(this.loadOnPlay_=()=>{this.loadOnPlay_=null,this.mainPlaylistLoader_.load()},this.tech_.one("play",this.loadOnPlay_)):this.mainPlaylistLoader_.load(),this.timeToLoadedData__=-1,this.mainAppendsToLoadedData__=-1,this.audioAppendsToLoadedData__=-1;const y="none"===this.tech_.preload()?"play":"loadstart";this.tech_.one(y,(()=>{const e=Date.now();this.tech_.one("loadeddata",(()=>{this.timeToLoadedData__=Date.now()-e,this.mainAppendsToLoadedData__=this.mainSegmentLoader_.mediaAppends,this.audioAppendsToLoadedData__=this.audioSegmentLoader_.mediaAppends}))}
2))}mainAppendsToLoadedData_(){return this.mainAppendsToLoadedData__}audioAppendsToLoadedData_(){return this.audioAppendsToLoadedData__}appendsToLoadedData_(){const e=this.mainAppendsToLoadedData_(),t=this.audioAppendsToLoadedData_();return-1===e||-1===t?-1:e+t}timeToLoadedData_(){return this.timeToLoadedData__}checkABR_(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"abr";const t=this.selectPlaylist();t&&this.shouldSwitchToMedia_(t)&&this.switchMedia_(t,e)}switchMedia_(e,t,n){const i=this.media(),r=i&&(i.id||i.uri),s=e&&(e.id||e.uri);if(r&&r!==s){this.logger_("switch media ".concat(r," -> ").concat(s," from ").concat(t));const n={renditionInfo:{id:s,bandwidth:e.attributes.BANDWIDTH,resolution:e.attributes.RESOLUTION,codecs:e.attributes.CODECS},cause:t};this.trigger({type:"renditionselected",metadata:n}),this.tech_.trigger({type:"usage",name:"vhs-rendition-change-".concat(t)})}this.mainPlaylistLoader_.media(e,n)}switchMediaForDASHContentSteering_(){["AUDIO","SUBTITLES","CLOSED-CAPTIONS"].forEach((e=>{const t=this.mediaTypes_[e],n=t?t.activeGroup():null,i=this.contentSteeringController_.getPathway();if(n&&i){const t=(n.length?n[0].playlists:n.playlists).filter((e=>e.attributes.serviceLocation===i));t.length&&this.mediaTypes_[e].activePlaylistLoader.media(t[0])}}))}startABRTimer_(){this.stopABRTimer_(),this.abrTimer_=r.a.setInterval((()=>this.checkABR_()),250)}stopABRTimer_(){this.tech_.scrubbing&&this.tech_.scrubbing()||(r.a.clearInterval(this.abrTimer_),this.abrTimer_=null)}getAudioTrackPlaylists_(){const e=this.main(),t=e&&e.playlists||[];if(!e||!e.mediaGroups||!e.mediaGroups.AUDIO)return t;const n=e.mediaGroups.AUDIO,i=Object.keys(n);let r;if(Object.keys(this.mediaTypes_.AUDIO.groups).length)r=this.mediaTypes_.AUDIO.activeTrack();else{const e=n.main||i.length&&n[i[0]];for(const t in e)if(e[t].default){r={label:t};break}}if(!r)return t;const s=[];for(const a in n)if(n[a][r.label]){const t=n[a][r.label];if(t.playlists&&t.playlists.length)s.push.apply(s,t.playlists);else if(t.uri)s.push(t);else if(e.playlists.length)for(let n=0;n<e.playlists.length;n++){const t=e.playlists[n];t.attributes&&t.attributes.AUDIO&&t.attributes.AUDIO===a&&s.push(t)}}return s.length?s:t}setupMainPlaylistLoaderListeners_(){this.mainPlaylistLoader_.on("loadedmetadata",(()=>{const e=this.mainPlaylistLoader_.media(),t=1.5*e.targetDuration*1e3;vs(this.mainPlaylistLoader_.main,this.mainPlaylistLoader_.media())?this.requestOptions_.timeout=0:this.requestOptions_.timeout=t,e.endList&&"none"!==this.tech_.preload()&&(this.mainSegmentLoader_.playlist(e,this.requestOptions_),this.mainSegmentLoader_.load()),ic({sourceType:this.sourceType_,segmentLoaders:{AUDIO:this.audioSegmentLoader_,SUBTITLES:this.subtitleSegmentLoader_,main:this.mainSegmentLoader_},tech:this.tech_,requestOptions:this.requestOptions_,mainPlaylistLoader:this.mainPlaylistLoader_,vhs:this.vhs_,main:this.main(),mediaTypes:this.mediaTypes_,excludePlaylist:this.excludePlaylist.bind(this)}),this.triggerPresenceUsage_(this.main(),e),this.setupFirstPlay(),!this.mediaTypes_.AUDIO.activePlaylistLoader||this.mediaTypes_.AUDIO.activePlaylistLoader.media()?this.trigger("selectedinitialmedia"):this.mediaTypes_.AUDIO.activePlaylistLoader.one("loadedmetadata",(()=>{this.trigger("selectedinitialmedia")}))})),this.mainPlaylistLoader_.on("loadedplaylist",(()=>{this.loadOnPlay_&&this.tech_.off("play",this.loadOnPlay_);let e=this.mainPlaylistLoader_.media();if(!e){let t;if(this.attachContentSteeringListeners_(),this.initContentSteeringController_(),this.excludeUnsupportedVariants_(),this.enableLowInitialPlaylist&&(t=this.selectInitialPlaylist()),t||(t=this.selectPlaylist()),!t||!this.shouldSwitchToMedia_(t))return;this.initialMedia_=t,this.switchMedia_(this.initialMedia_,"initial");if(!("vhs-json"===this.sourceType_&&this.initialMedia_.segments))return;e=this.initialMedia_}this.handleUpdatedMediaPlaylist(e)})),this.mainPlaylistLoader_.on("error",(()=>{const e=this.mainPlaylistLoader_.error;this.excludePlaylist({playlistToExclude:e.playlist,error:e})})),this.mainPlaylistLoader_.on("mediachanging",(()=>{this.mainSegmentLoader_.abort(),this.mainSegmentLoader_.pause()})),this.mainPlaylistLoader_.on("mediachange",(()=>{const e=this.mainPlaylistLoader_.media(),t=1.5*e.targetDuration*1e3;vs(this.mainPlaylistLoader_.main,this.mainPlaylistLoader_.media())?this.requestOptions_.timeout=0:this.requestOptions_.timeout=t,"dash"===this.sourceType_&&this.mainPlaylistLoader_.isPaused&&this.mainPlaylistLoader_.load(),this.mainSegmentLoader_.pause(),this.mainSegmentLoader_.playlist(e,this.requestOptions_),this.waitingForFastQualityPlaylistReceived_?this.runFastQualitySwitch_():this.mainSegmentLoader_.load(),this.tech_.trigger({type:"mediachange",bubbles:!0})})),this.mainPlaylistLoader_.on("playlistunchanged",(()=>{const e=this.mainPlaylistLoader_.media();if("playlist-unchanged"===e.lastExcludeReason_)return;this.stuckAtPlaylistEnd_(e)&&(this.excludePlaylist({error:{message:"Playlist no longer updating.",reason:"playlist-unchanged"}}),this.tech_.trigger("playliststuck"))})),this.mainPlaylistLoader_.on("renditiondisabled",(()=>{this.tech_.trigger({type:"usage",name:"vhs-rendition-disabled"})})),this.mainPlaylistLoader_.on("renditionenabled",(()=>{this.tech_.trigger({type:"usage",name:"vhs-rendition-enabled"})}));["manifestrequeststart","manifestrequestcomplete","manifestparsestart","manifestparsecomplete","playlistrequeststart","playlistrequestcomplete","playlistparsestart","playlistparsecomplete","renditiondisabled","renditionenabled"].forEach((e=>{this.mainPlaylistLoader_.on(e,(e=>{this.player_.trigger(h()({},e))}))}))}handleUpdatedMediaPlaylist(e){this.useCueTags_&&this.updateAdCues_(e),this.mainSegmentLoader_.pause(),this.mainSegmentLoader_.playlist(e,this.requestOptions_),this.waitingForFastQualityPlaylistReceived_&&this.runFastQualitySwitch_(),this.updateDuration(!e.endList),this.tech_.paused()||(this.mainSegmentLoader_.load(),this.audioSegmentLoader_&&this.audioSegmentLoader_.load())}triggerPresenceUsage_(e,t){const n=e.mediaGroups||{};let i=!0;const r=Object.keys(n.AUDIO);for(const s in n.AUDIO)for(const e in n.AUDIO[s]){n.AUDIO[s][e].uri||(i=!1)}i&&this.tech_.trigger({type:"usage",name:"vhs-demuxed"}),Object.keys(n.SUBTITLES).length&&this.tech_.trigger({type:"usage",name:"vhs-webvtt"}),ac.Playlist.isAes(t)&&this.tech_.trigger({type:"usage",name:"vhs-aes"}),r.length&&Object.keys(n.AUDIO[r[0]]).length>1&&this.tech_.trigger({type:"usage",name:"vhs-alternate-audio"}),this.useCueTags_&&this.tech_.trigger({type:"usage",name:"vhs-playlist-cue-tags"})}shouldSwitchToMedia_(e){const t=this.mainPlaylistLoader_.media()||this.mainPlaylistLoader_.pen
2dingMedia_,n=this.tech_.currentTime(),i=this.bufferLowWaterLine(),r=this.bufferHighWaterLine();return function(e){let{currentPlaylist:t,buffered:n,currentTime:i,nextPlaylist:r,bufferLowWaterLine:s,bufferHighWaterLine:a,duration:o,bufferBasedABR:c,log:l}=e;if(!r)return Hr.log.warn("We received no playlist to switch to. Please check your stream."),!1;const d="allowing switch ".concat(t&&t.id||"null"," -> ").concat(r.id);if(!t)return l("".concat(d," as current playlist is not set")),!0;if(r.id===t.id)return!1;const u=Boolean(ns(n,i).length);if(!t.endList)return u||"number"!==typeof t.partTargetDuration?(l("".concat(d," as current playlist is live")),!0):(l("not ".concat(d," as current playlist is live llhls, but currentTime isn't in buffered.")),!1);const h=os(n,i),p=c?ga.EXPERIMENTAL_MAX_BUFFER_LOW_WATER_LINE:ga.MAX_BUFFER_LOW_WATER_LINE;if(o<p)return l("".concat(d," as duration < max low water line (").concat(o," < ").concat(p,")")),!0;const m=r.attributes.BANDWIDTH,g=t.attributes.BANDWIDTH;if(m<g&&(!c||h<a)){let e="".concat(d," as next bandwidth < current bandwidth (").concat(m," < ").concat(g,")");return c&&(e+=" and forwardBuffer < bufferHighWaterLine (".concat(h," < ").concat(a,")")),l(e),!0}if((!c||m>g)&&h>=s){let e="".concat(d," as forwardBuffer >= bufferLowWaterLine (").concat(h," >= ").concat(s,")");return c&&(e+=" and next bandwidth > current bandwidth (".concat(m," > ").concat(g,")")),l(e),!0}return l("not ".concat(d," as no switching criteria met")),!1}({buffered:this.tech_.buffered(),currentTime:n,currentPlaylist:t,nextPlaylist:e,bufferLowWaterLine:i,bufferHighWaterLine:r
vendor: 2,845 bytes, line 2
2,duration:this.duration(),bufferBasedABR:this.bufferBasedABR,log:this.logger_})}setupSegmentLoaderListeners_(){this.mainSegmentLoader_.on("bandwidthupdate",(()=>{this.checkABR_("bandwidthupdate"),this.tech_.trigger("bandwidthupdate")})),this.mainSegmentLoader_.on("timeout",(()=>{this.bufferBasedABR&&this.mainSegmentLoader_.load()})),this.bufferBasedABR||this.mainSegmentLoader_.on("progress",(()=>{this.trigger("progress")})),this.mainSegmentLoader_.on("error",(()=>{const e=this.mainSegmentLoader_.error();this.excludePlaylist({playlistToExclude:e.playlist,error:e})})),this.mainSegmentLoader_.on("appenderror",(()=>{this.error=this.mainSegmentLoader_.error_,this.trigger("error")})),this.mainSegmentLoader_.on("syncinfoupdate",(()=>{this.onSyncInfoUpdate_()})),this.mainSegmentLoader_.on("timestampoffset",(()=>{this.tech_.trigger({type:"usage",name:"vhs-timestamp-offset"})})),this.audioSegmentLoader_.on("syncinfoupdate",(()=>{this.onSyncInfoUpdate_()})),this.audioSegmentLoader_.on("appenderror",(()=>{this.error=this.audioSegmentLoader_.error_,this.trigger("error")})),this.mainSegmentLoader_.on("ended",(()=>{this.logger_("main segment loader ended"),this.onEndOfStream()})),this.timelineChangeController_.on("audioTimelineBehind",(()=>{const e=this.audioSegmentLoader_.pendingSegment_;if(!e||!e.segment||!e.segment.syncInfo)return;const t=e.segment.syncInfo.end+.01;this.tech_.setCurrentTime(t)})),this.timelineChangeController_.on("fixBadTimelineChange",(()=>{this.logger_("Fix bad timeline change. Restarting al segment loaders..."),this.mainSegmentLoader_.pause(),this.mainSegmentLoader_.resetEverything(),this.mediaTypes_.AUDIO.activePlaylistLoader&&(this.audioSegmentLoader_.pause(),this.audioSegmentLoader_.resetEverything()),this.mediaTypes_.SUBTITLES.activePlaylistLoader&&(this.subtitleSegmentLoader_.pause(),this.subtitleSegmentLoader_.resetEverything()),this.load()})),this.mainSegmentLoader_.on("earlyabort",(e=>{this.bufferBasedABR||(this.delegateLoaders_("all",["abort"]),this.excludePlaylist({error:{message:"Aborted early because there isn't enough bandwidth to complete the request without rebuffering."},playlistExclusionDuration:10}))}));const e=()=>{if(!this.sourceUpdater_.hasCreatedSourceBuffers())return this.tryToCreateSourceBuffers_();const e=this.getCodecsOrExclude_();e&&this.sourceUpdater_.addOrChangeSourceBuffers(e)};this.mainSegmentLoader_.on("trackinfo",e),this.audioSegmentLoader_.on("trackinfo",e),this.mainSegmentLoader_.on("fmp4",(()=>{this.triggeredFmp4Usage||(this.tech_.trigger({type:"usage",name:"vhs-fmp4"}),this.triggeredFmp4Usage=!0)})),this.audioSegmentLoader_.on("fmp4",(()=>{this.triggeredFmp4Usage||(this.tech_.trigger({type:"usage",name:"vhs-fmp4"}),this.triggeredFmp4Usage=!0)})),this.audioSegmentLoader_.on("ended",(()=>{this.logger_("audioSegmentLoader ended"),this.onEndOfStream()}))
2;["segmentselected","segmentloadstart","segmentloaded","segmentkeyloadstart","segmentkeyloadcomplete","segmentdecryptionstart","segmentdecryptioncomplete","segmenttransmuxingstart","segmenttransmuxingcomplete","segmenttransmuxingtrackinfoavailable","segmenttransmuxingtiminginfoavailable","segmentappendstart","appendsdone","bandwidthupdated","timelinechange","codecschange"].forEach((e=>{this.mainSegmentLoader_.on(e,(e=>{this.player_.trigger(h()({},e))})),this.audioSegmentLoader_.on(e,(e=>{this.player_.trigger(h()({},e))})),this.subtitleSegmentLoader_.on(e,(e=>{this.player_.trigger(h()({},e))}))}))}mediaSecondsLoaded_(){return Math.max(this.audioSegmentLoader_.mediaSecondsLoaded+this.mainSegmentLoader_.mediaSecondsLoaded)}load(){this.mainSegmentLoader_.load(),this.mediaTypes_.AUDIO.activePlaylistLoader&&this.audioSegmentLoader_.load(),this.mediaTypes_.SUBTITLES.activePlaylistLoader&&this.subtitleSegmentLoader_.load()}pause(){this.mainSegmentLoader_.pause(),this.mediaTypes_.AUDIO.activePlaylistLoader&&this.audioSegmentLoader_.pause(),this.mediaTypes_.SUBTITLES.activePlaylistLoader&&this.subtitleSegmentLoader_.pause()}fastQualityChange_(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.selectPlaylist();e&&e===this.mainPlaylistLoader_.media()?this.logger_("skipping fastQualityChange because new media is same as old"):(this.switchMedia_(e,"fast-quality"),this.waitingForFastQualityPlaylistReceived_=!0)}runFastQualitySwitch_(){this.waitingForFastQualityPlaylistReceived_=!1,this.mainSegmentLoader_.pause(),this.mainSegmentLoader_.resetEverything(),this.mediaTypes_.AUDIO.activePlaylistLoader&&(this.audioSegmentLoader_.pause(),this.audioSegmentLoader_.resetEverything()),this.mediaTypes_.SUBTITLES.activePlaylistLoader&&(this.subtitleSegmentLoader_.pause(),this.subtitleSegmentLoader_.resetEverything()),this.load()}play(){if(this.setupFirstPlay())return;this.tech_.ended()&&this.tech_.setCurrentTime(0),this.hasPlayed_&&this.load();const e=this.tech_.seekable();return this.tech_.duration()===1/0&&this.tech_.currentTime()<e.start(0)?this.tech_.setCurrentTime(e.end(e.length-1)):void 0}setupFirstPlay(){const e=this.mainPlaylistLoader_.media();if(!e||this.tech_.paused()||this.hasPlayed_)return!1;if(!e.endList||e.start){const t=this.seekable();if(!t.length)return!1;const n=t.end(0);let i=n;if(e.start){const r=e.start.timeOffset;i=r<0?Math.max(n+r,t.start(0)):Math.min(n,r)}this.trigger("firstplay"),this.tech_.setCurrentTime(i)}return this.hasPlayed_=!0,this.load(),!0}handleSourceOpen_(){if(this.tryToCreateSourceBuffers_(),this.tech_.autoplay()){const e=this.tech_.play();"undefined"!==typeof e&&"function"===typeof e.then&&e.then(null,(e=>{}))}this.trigger("sourceopen")}handleSourceEnded_(){if(!this.inbandTextTracks_.metadataTrack_)return;const e=this.inbandTextTracks_.metadataTrack_.cues;if(!e||!e.length)return;const t=this.duration();e[e.length-1].endTime=isNaN(t)||Math.abs(t)===1/0?Number.MAX_VALUE:t}handleDurationChange_(){this.tech_.trigger("durationchange")}onEndOfStream(){let e=this.mainSegmentLoader_.ended_;if(this.mediaTypes_.AUDIO.activePlaylistLoader){const t=this.mainSegmentLoader_.getCurrentMediaInfo_();e=!t||t.hasVideo?e&&this.audioSegmentLoader_.ended_:this.audioSegmentLoader_.ended_}e&&(this.stopABRTimer_(),this.sourceUpdater_.endOfStream())}stuckAtPlaylistEnd_(e){if(!this.seekable().length)return!1;const t=this.syncController_.getExpiredTime(e,this.duration());if(null===t)return!1;const n=ac.Playlist.playlistEnd(e,t),i=this.tech_.currentTime(),r=this.tech_.buffered();if(!r.length)return n-i<=es;const s=r.end(r.length-1);return s-i<=es&&n-s<=es}excludePlaylist(e){let{playlistToExclude:t=this.mainPlaylistLoader_.media(),error:n={},playlistExclusionDuration:i}=e;if(t=t||this.mainPlaylistLoader_.media(),i=i||n.playlistExclusionDuration||this.playlistExclusionDuration,!t)return this.error=n,void("open"!==this.mediaSource.readyState?this.trigger("error"):this.sourceUpdater_.endOfStream("network"));t.playlistErrors_++;const r=this.mainPlaylistLoader_.main.playlists,s=r.filter(js),a=1===s.length&&s[0]===t;if(1===r.length&&i!==1/0)return Hr.log.warn("Problem encountered with playlist ".concat(t.id,". ")+"Trying again since it is the only playlist."),this.tech_.trigger("retryplaylist"),this.mainPlaylistLoader_.load(a);if(a){if(this.main().contentSteering){const e=this.pathwayAttribute_(t),n=1e3*this.contentSteeringController_.steeringManifest.ttl;return this.contentSteeringController_.excludePathway(e),this.excludeThenChangePathway_(),void setTimeout((()=>{this.contentSteeringController_.addAvailablePathway(e)}),n)}let e=!1;r.forEach((n=>{if(n===t)return;const i=n.excludeUntil;"undefined"!==typeof i&&i!==1/0&&(e=!0,delete n.excludeUntil)})),e&&(Hr.log.warn("Removing other playlists from the exclusion list because the last rendition is about to be excluded."),this.tech_.trigger("retryplaylist"))}let o;o=t.playlistErrors_>this.maxPlaylistRetries?1/0:Date.now()+1e3*i,t.excludeUntil=o,n.reason&&(t.lastExcludeReason_=n.reason),this.tech_.trigger("excludeplaylist"),this.tech_.trigger({type:"usage",name:"vhs-rendition-excluded"});const c=this.selectPlaylist();if(!c)return this.error="Playback cannot continue. No available working or supported playlists.",void this.trigger("error");const l=n.internal?this.logger_:Hr.log.warn,d=n.message?" "+n.message:"";l("".concat(n.internal?"Internal problem":"Problem"," encountered with playlist ").concat(t.id,".")+"".concat(d," Switching to playlist ").concat(c.id,".")),c.attributes.AUDIO!==t.attributes.AUDIO&&this.delegateLoaders_("audio",["abort","pause"]),c.attributes.SUBTITLES!==t.attributes.SUBTITLES&&this.delegateLoaders_("subtitle",["abort","pause"]),this.delegateLoaders_("main",["abort","pause"]);const u=c.targetDuration/2*1e3||5e3,h="number"===typeof c.lastRequest&&Date.now()-c.lastRequest<=u;return this.switchMedia_(c,"exclude",a||h)}pauseLoading(){this.delegateLoaders_("all",["abort","pause"]),this.stopABRTimer_()}delegateLoaders_(e,t){const n=[],i="all"===e;(i||"main"===e)&&n.push(this.mainPlaylistLoader_);const r=[];(i||"audio"===e)&&r.push("AUDIO"),(i||"subtitle"===e)&&(r.push("CLOSED-CAPTIONS"),r.push("SUBTITLES")),r.forEach((e=>{const t=this.mediaTypes_[e]&&this.mediaTypes_[e].activePlaylistLoader;t&&n.push(t)})),["main","audio","subtitle"].forEach((t=>{const i=this["".concat(t,"SegmentLoader_")];!i||e!==t&&"all"!==e||n.push(i)}
vendor: 5,215 bytes, line 2
2)),n.forEach((e=>t.forEach((t=>{"function"===typeof e[t]&&e[t]()}))))}setCurrentTime(e){const t=ns(this.tech_.buffered(),e);return this.mainPlaylistLoader_&&this.mainPlaylistLoader_.media()&&this.mainPlaylistLoader_.media().segments?t&&t.length?e:(this.mainSegmentLoader_.pause(),this.mainSegmentLoader_.resetEverything(),this.mediaTypes_.AUDIO.activePlaylistLoader&&(this.audioSegmentLoader_.pause(),this.audioSegmentLoader_.resetEverything()),this.mediaTypes_.SUBTITLES.activePlaylistLoader&&(this.subtitleSegmentLoader_.pause(),this.subtitleSegmentLoader_.resetEverything()),void this.load()):0}duration(){if(!this.mainPlaylistLoader_)return 0;const e=this.mainPlaylistLoader_.media();return e?e.endList?this.mediaSource?this.mediaSource.duration:ac.Playlist.duration(e):1/0:0}seekable(){return this.seekable_}getSeekableRange_(e,t){const n=e.media();if(!n)return null;const i=this.syncController_.getMediaSequenceSync(t);if(i&&i.isReliable){const e=i.start,t=i.end;if(!isFinite(e)||!isFinite(t))return null;const r=ac.Playlist.liveEdgeDelay(this.mainPlaylistLoader_.main,n);return Jr([[e,Math.max(e,t-r)]])}const r=this.syncController_.getExpiredTime(n,this.duration());if(null===r)return null;const s=ac.Playlist.seekable(n,r,ac.Playlist.liveEdgeDelay(this.mainPlaylistLoader_.main,n));return s.length?s:null}computeFinalSeekable_(e,t){if(!t)return e;const n=e.start(0),i=e.end(0),r=t.start(0),s=t.end(0);return r>i||n>s?e:Jr([[Math.max(n,r),Math.min(i,s)]])}onSyncInfoUpdate_(){if(!this.mainPlaylistLoader_)return;const e=this.getSeekableRange_(this.mainPlaylistLoader_,"main");if(!e)return;let t;if(this.mediaTypes_.AUDIO.activePlaylistLoader&&(t=this.getSeekableRange_(this.mediaTypes_.AUDIO.activePlaylistLoader,"audio"),!t))return;const n=this.seekable_;if(this.seekable_=this.computeFinalSeekable_(e,t),!this.seekable_)return;if(n&&n.length&&this.seekable_.length&&n.start(0)===this.seekable_.start(0)&&n.end(0)===this.seekable_.end(0))return;this.logger_("seekable updated [".concat(rs(this.seekable_),"]"));const i={seekableRanges:this.seekable_};this.trigger({type:"seekablerangeschanged",metadata:i}),this.tech_.trigger("seekablechanged")}updateDuration(e){if(this.updateDuration_&&(this.mediaSource.removeEventListener("sourceopen",this.updateDuration_),this.updateDuration_=null),"open"!==this.mediaSource.readyState)return this.updateDuration_=this.updateDuration.bind(this,e),void this.mediaSource.addEventListener("sourceopen",this.updateDuration_);if(e){const e=this.seekable();if(!e.length)return;return void((isNaN(this.mediaSource.duration)||this.mediaSource.duration<e.end(e.length-1))&&this.sourceUpdater_.setDuration(e.end(e.length-1)))}const t=this.tech_.buffered();let n=ac.Playlist.duration(this.mainPlaylistLoader_.media());t.length>0&&(n=Math.max(n,t.end(t.length-1))),this.mediaSource.duration!==n&&this.sourceUpdater_.setDuration(n)}dispose(){this.trigger("dispose"),this.decrypter_.terminate(),this.mainPlaylistLoader_.dispose(),this.mainSegmentLoader_.dispose(),this.contentSteeringController_.dispose(),this.keyStatusMap_.clear(),this.loadOnPlay_&&this.tech_.off("play",this.loadOnPlay_),["AUDIO","SUBTITLES"].forEach((e=>{const t=this.mediaTypes_[e].groups;for(const n in t)t[n].forEach((e=>{e.playlistLoader&&e.playlistLoader.dispose()}))})),this.audioSegmentLoader_.dispose(),this.subtitleSegmentLoader_.dispose(),this.sourceUpdater_.dispose(),this.timelineChangeController_.dispose(),this.stopABRTimer_(),this.updateDuration_&&this.mediaSource.removeEventListener("sourceopen",this.updateDuration_),this.mediaSource.removeEventListener("durationchange",this.handleDurationChange_),this.mediaSource.removeEventListener("sourceopen",this.handleSourceOpen_),this.mediaSource.removeEventListener("sourceended",this.handleSourceEnded_),this.off()}main(){return this.mainPlaylistLoader_.main}media(){return this.mainPlaylistLoader_.media()||this.initialMedia_}areMediaTypesKnown_(){const e=!!this.mediaTypes_.AUDIO.activePlaylistLoader,t=!!this.mainSegmentLoader_.getCurrentMediaInfo_(),n=!e||!!this.audioSegmentLoader_.getCurrentMediaInfo_();return!(!t||!n)}getCodecsOrExclude_(){const e={main:this.mainSegmentLoader_.getCurrentMediaInfo_()||{},audio:this.audioSegmentLoader_.getCurrentMediaInfo_()||{}},t=this.mainSegmentLoader_.getPendingSegmentPlaylist()||this.media();e.video=e.main;const n=Us(this.main(),t),i={},r=!!this.mediaTypes_.AUDIO.activePlaylistLoader;if(e.main.hasVideo&&(i.video=n.video||e.main.videoCodec||g.b),e.main.isMuxed&&(i.video+=",".concat(n.audio||e.main.audioCodec||g.a)),(e.main.hasAudio&&!e.main.isMuxed||e.audio.hasAudio||r)&&(i.audio=n.audio||e.main.audioCodec||e.audio.audioCodec||g.a,e.audio.isFmp4=e.main.hasAudio&&!e.main.isMuxed?e.main.isFmp4:e.audio.isFmp4),!i.audio&&!i.video)return void this.excludePlaylist({playlistToExclude:t,error:{message:"Could not determine codecs for playlist."},playlistExclusionDuration:1/0});const s=(e,t)=>e?Object(g.c)(t,this.usingManagedMediaSource_):Object(g.g)(t),a={};let o;if(["video","audio"].forEach((function(t){if(i.hasOwnProperty(t)&&!s(e[t].isFmp4,i[t])){const n=e[t].isFmp4?"browser":"muxer";a[n]=a[n]||[],a[n].push(i[t]),"audio"===t&&(o=n)}})),r&&o&&t.attributes.AUDIO){const e=t.attributes.AUDIO;
2this.main().playlists.forEach((n=>{(n.attributes&&n.attributes.AUDIO)===e&&n!==t&&(n.excludeUntil=1/0)})),this.logger_("excluding audio group ".concat(e," as ").concat(o,' does not support codec(s): "').concat(i.audio,'"'))}if(!Object.keys(a).length){if(this.sourceUpdater_.hasCreatedSourceBuffers()&&!this.sourceUpdater_.canChangeType()){const e=[];if(["video","audio"].forEach((t=>{const n=(Object(g.h)(this.sourceUpdater_.codecs[t]||"")[0]||{}).type,r=(Object(g.h)(i[t]||"")[0]||{}).type;n&&r&&n.toLowerCase()!==r.toLowerCase()&&e.push('"'.concat(this.sourceUpdater_.codecs[t],'" -> "').concat(i[t],'"'))})),e.length)return void this.excludePlaylist({playlistToExclude:t,error:{message:"Codec switching not supported: ".concat(e.join(", "),"."),internal:!0},playlistExclusionDuration:1/0})}return i}{const e=Object.keys(a).reduce(((e,t)=>(e&&(e+=", "),e+="".concat(t,' does not support codec(s): "').concat(a[t].join(","),'"'))),"")+".";this.excludePlaylist({playlistToExclude:t,error:{internal:!0,message:e},playlistExclusionDuration:1/0})}}tryToCreateSourceBuffers_(){if("open"!==this.mediaSource.readyState||this.sourceUpdater_.hasCreatedSourceBuffers())return;if(!this.areMediaTypesKnown_())return;const e=this.getCodecsOrExclude_();if(!e)return;this.sourceUpdater_.createSourceBuffers(e);const t=[e.video,e.audio].filter(Boolean).join(",");this.excludeIncompatibleVariants_(t)}excludeUnsupportedVariants_(){const e=this.main().playlists,t=[];Object.keys(e).forEach((n=>{const i=e[n];if(-1!==t.indexOf(i.id))return;t.push(i.id);const r=Us(this.main,i),s=[];!r.audio||Object(g.g)(r.audio)||Object(g.c)(r.audio,this.usingManagedMediaSource_)||s.push("audio codec ".concat(r.audio)),!r.video||Object(g.g)(r.video)||Object(g.c)(r.video,this.usingManagedMediaSource_)||s.push("video codec ".concat(r.video)),r.text&&"stpp.ttml.im1t"===r.text&&s.push("text codec ".concat(r.text)),s.length&&(i.excludeUntil=1/0,this.logger_("excluding ".concat(i.id," for unsupported: ").concat(s.join(", "))))}))}excludeIncompatibleVariants_(e){const t=[],n=this.main().playlists,i=Ns(Object(g.h)(e)),r=Bs(i),s=i.video&&Object(g.h)(i.video)[0]||null,a=i.audio&&Object(g.h)(i.audio)[0]||null;Object.keys(n).forEach((e=>{const i=n[e];if(-1!==t.indexOf(i.id)||i.excludeUntil===1/0)return;t.push(i.id);const o=[],c=Us(this.mainPlaylistLoader_.main,i),l=Bs(c);if(c.audio||c.video){if(l!==r&&o.push('codec count "'.concat(l,'" !== "').concat(r,'"')),!this.sourceUpdater_.canChangeType()){const e=c.video&&Object(g.h)(c.video)[0]||null,t=c.audio&&Object(g.h)(c.audio)[0]||null;e&&s&&e.type.toLowerCase()!==s.type.toLowerCase()&&o.push('video codec "'.concat(e.type,'" !== "').concat(s.type,'"')),t&&a&&t.type.toLowerCase()!==a.type.toLowerCase()&&o.push('audio codec "'.concat(t.type,'" !== "').concat(a.type,'"'))}o.length&&(i.excludeUntil=1/0,this.logger_("excluding ".concat(i.id,": ").concat(o.join(" && "))))}}))}updateAdCues_(e){let t=0;const n=this.seekable();n.length&&(t=n.start(0)),function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;if(!e.segments)return;let i,s=n;for(let a=0;a<e.segments.length;a++){const n=e.segments[a];if(i||(i=Uo(t,s+n.duration/2)),i){if("cueIn"in n){i.endTime=s,i.adEndTime=s,s+=n.duration,i=null;continue}if(s<i.endTime){s+=n.duration;continue}i.endTime+=n.duration}else if("cueOut"in n&&(i=new r.a.VTTCue(s,s+n.duration,n.cueOut),i.adStartTime=s,i.adEndTime=s+parseFloat(n.cueOut),t.addCue(i)),"cueOutCont"in n){const[e,a]=n.cueOutCont.split("/").map(parseFloat);i=new r.a.VTTCue(s,s+n.duration,""),i.adStartTime=s-e,i.adEndTime=i.adStartTime+a,t.addCue(i)}s+=n.duration}}(e,this.cueTagsTrack_,t)}goalBufferLength(){const e=this.tech_.currentTime(),t=ga.GOAL_BUFFER_LENGTH,n=ga.GOAL_BUFFER_LENGTH_RATE,i=Math.max(t,ga.MAX_GOAL_BUFFER_LENGTH);return Math.min(t+e*n,i)}bufferLowWaterLine(){const e=this.tech_.currentTime(),t=ga.BUFFER_LOW_WATER_LINE,n=ga.BUFFER_LOW_WATER_LINE_RATE,i=Math.max(t,ga.MAX_BUFFER_LOW_WATER_LINE),r=Math.max(t,ga.EXPERIMENTAL_MAX_BUFFER_LOW_WATER_LINE);return Math.min(t+e*n,this.bufferBasedABR?r:i)}bufferHighWaterLine(){return ga.BUFFER_HIGH_WATER_LINE}addDateRangesToTextTrack_(e){no(this.inbandTextTracks_,"com.apple.streaming",this.tech_),(e=>{let{inbandTextTracks:t,dateRanges:n}=e;const i=t.metadataTrack_;if(!i)return;const s=r.a.WebKitDataCue||r.a.VTTCue;
2n.forEach((e=>{for(const t of Object.keys(e)){if(to.has(t))continue;const n=new s(e.startTime,e.endTime,"");n.id=e.id,n.type="com.apple.quicktime.HLS",n.value={key:eo[t],data:e[t]},"scte35Out"!==t&&"scte35In"!==t||(n.value.data=new Uint8Array(n.value.data.match(/[\da-f]{2}/gi)).buffer),i.addCue(n)}e.processDateRange()}))})({inbandTextTracks:this.inbandTextTracks_,dateRanges:e})}addMetadataToTextTrack(e,t,n){const i=this.sourceUpdater_.videoBuffer?this.sourceUpdater_.videoTimestampOffset():this.sourceUpdater_.audioTimestampOffset();no(this.inbandTextTracks_,e,this.tech_),$a({inbandTextTracks:this.inbandTextTracks_,metadataArray:t,timestampOffset:i,videoDuration:n})}pathwayAttribute_(e){return e.attributes["PATHWAY-ID"]||e.attributes.serviceLocation}initContentSteeringController_(){const e=this.main();if(e.contentSteering){for(const t of e.playlists)this.contentSteeringController_.addAvailablePathway(this.pathwayAttribute_(t));this.contentSteeringController_.assignTagProperties(e.uri,e.contentSteering),this.contentSteeringController_.queryBeforeStart?this.contentSteeringController_.requestSteeringManifest(!0):this.tech_.one("canplay",(()=>{this.contentSteeringController_.requestSteeringManifest()}))}}resetContentSteeringController_(){this.contentSteeringController_.clearAvailablePathways(),this.contentSteeringController_.dispose(),this.initContentSteeringController_()}attachContentSteeringListeners_(){this.contentSteeringController_.on("content-steering",this.excludeThenChangePathway_.bind(this));["contentsteeringloadstart","contentsteeringloadcomplete","contentsteeringparsed"].forEach((e=>{this.contentSteeringController_.on(e,(e=>{this.trigger(h()({},e))}))})),"dash"===this.sourceType_&&this.mainPlaylistLoader_.on("loadedplaylist",(()=>{const e=this.main();(this.contentSteeringController_.didDASHTagChange(e.uri,e.contentSteering)||(()=>{const t=this.contentSteeringController_.getAvailablePathways(),n=[];for(const i of e.playlists){const e=i.attributes.serviceLocation;if(e&&(n.push(e),!t.has(e)))return!0}return!(n.length||!t.size)})())&&this.resetContentSteeringController_()}))}excludeThenChangePathway_(){const e=this.contentSteeringController_.getPathway();if(!e)return;this.handlePathwayClones_();const t=this.main().playlists,n=new Set;let i=!1;Object.keys(t).forEach((r=>{const s=t[r],a=this.pathwayAttribute_(s),o=a&&e!==a;s.excludeUntil===1/0&&"content-steering"===s.lastExcludeReason_&&!o&&(delete s.excludeUntil,delete s.lastExcludeReason_,i=!0);const c=!s.excludeUntil&&s.excludeUntil!==1/0;!n.has(s.id)&&o&&c&&(n.add(s.id),s.excludeUntil=1/0,s.lastExcludeReason_="content-steering",this.logger_("excluding ".concat(s.id," for ").concat(s.lastExcludeReason_)))})),"DASH"===this.contentSteeringController_.manifestType_&&Object.keys(this.mediaTypes_).forEach((t=>{const n=this.mediaTypes_[t];if(n.activePlaylistLoader){const t=n.activePlaylistLoader.media_;t&&t.attributes.serviceLocation!==e&&(i=!0)}})),i&&this.changeSegmentPathway_()}handlePathwayClones_(){const e=this.main().playlists,t=this.contentSteeringController_.currentPathwayClones,n=this.contentSteeringController_.nextPathwayClones;if(t&&t.size||n&&n.size){for(const[e,i]of t.entries()){n.get(e)||(this.mainPlaylistLoader_.updateOrDeleteClone(i),this.contentSteeringController_.excludePathway(e))}for(const[i,r]of n.entries()){const n=t.get(i);if(n)this.equalPathwayClones_(n,r)||(this.mainPlaylistLoader_.updateOrDeleteClone(r,!0),this.contentSteeringController_.addAvailablePathway(i));else{e.filter((e=>e.attributes["PATHWAY-ID"]===r["BASE-ID"])).forEach((e=>{this.mainPlaylistLoader_.addClonePathway(r,e)})),this.contentSteeringController_.addAvailablePathway(i)}}this.contentSteeringController_.currentPathwayClones=new Map(JSON.parse(JSON.stringify([...n])))}}equalPathwayClones_(e,t){if(e["BASE-ID"]!==t["BASE-ID"]||e.ID!==t.ID||e["URI-REPLACEMENT"].HOST!==t["URI-REPLACEMENT"].HOST)return!1;const n=e["URI-REPLACEMENT"].PARAMS,i=t["URI-REPLACEMENT"].PARAMS;for(const r in n)if(n[r]!==i[r])return!1;for(const r in i)if(n[r]!==i[r])return!1;return!0}changeSegmentPathway_(){const e=this.selectPlaylist();this.pauseLoading(),"DASH"===this.contentSteeringController_.manifestType_&&this.switchMediaForDASHContentSteering_(),this.switchMedia_(e,"content-steering")}excludeNonUsablePlaylistsByKeyId_(){if(!this.mainPlaylistLoader_||!this.mainPlaylistLoader_.main)return;let e=0;const t="non-usable";
2this.mainPlaylistLoader_.main.playlists.forEach((n=>{const i=this.mainPlaylistLoader_.getKeyIdSet(n);i&&i.size&&i.forEach((i=>{const r="usable",s=this.keyStatusMap_.has(i)&&this.keyStatusMap_.get(i)===r,a=n.lastExcludeReason_===t&&n.excludeUntil===1/0;s?s&&a&&(delete n.excludeUntil,delete n.lastExcludeReason_,this.logger_("enabling playlist ".concat(n.id," because key ID ").concat(i," is ").concat(r))):(n.excludeUntil!==1/0&&n.lastExcludeReason_!==t&&(n.excludeUntil=1/0,n.lastExcludeReason_=t,this.logger_("excluding playlist ".concat(n.id," because the key ID ").concat(i," doesn't exist in the keyStatusMap or is not ").concat(r))),e++)}))})),e>=this.mainPlaylistLoader_.main.playlists.length&&this.mainPlaylistLoader_.main.playlists.forEach((e=>{const n=e&&e.attributes&&e.attributes.RESOLUTION&&e.attributes.RESOLUTION.height<720,i=e.excludeUntil===1/0&&e.lastExcludeReason_===t;n&&i&&(delete e.excludeUntil,Hr.log.warn("enabling non-HD playlist ".concat(e.id," because all playlists were excluded due to ").concat(t," key IDs")))}))}addKeyStatus_(e,t){const n=("string"===typeof e?e:(e=>{const t=new Uint8Array(e);return Array.from(t).map((e=>e.toString(16).padStart(2,"0"))).join("")})(e)).slice(0,32).toLowerCase();this.logger_("KeyStatus '".concat(t,"' with key ID ").concat(n," added to the keyStatusMap")),this.keyStatusMap_.set(n,t)}updatePlaylistByKeyStatus(e,t){this.addKeyStatus_(e,t),this.waitingForFastQualityPlaylistReceived_||this.excludeNonUsableThenChangePlaylist_(),this.mainPlaylistLoader_.off("loadedplaylist",this.excludeNonUsableThenChangePlaylist_.bind(this)),this.mainPlaylistLoader_.on("loadedplaylist",this.excludeNonUsableThenChangePlaylist_.bind(this))}excludeNonUsableThenChangePlaylist_(){this.excludeNonUsablePlaylistsByKeyId_(),this.fastQualityChange_()}}class dc{constructor(e,t,n){const{playlistController_:i}=e,r=i.fastQualityChange_.bind(i);if(t.attributes){const e=t.attributes.RESOLUTION;this.width=e&&e.width,this.height=e&&e.height,this.bandwidth=t.attributes.BANDWIDTH,this.frameRate=t.attributes["FRAME-RATE"]}var s,a,o;this.codecs=Us(i.main(),t),this.playlist=t,this.id=n,this.enabled=(s=e.playlists,a=t.id,o=r,e=>{const t=s.main.playlists[a],n=ys(t),i=js(t);if("undefined"===typeof e)return i;e?delete t.disabled:t.disabled=!0;const r={renditionInfo:{id:a,bandwidth:t.attributes.BANDWIDTH,resolution:t.attributes.RESOLUTION,codecs:t.attributes.CODECS},cause:"fast-quality"};return e===i||n||(e?(o(t),s.trigger({type:"renditionenabled",metadata:r})):s.trigger({type:"renditiondisabled",metadata:r})),e})}}const uc=["seeking","seeked","pause","playing","error"];class hc extends Hr.EventTarget{constructor(e){super(),this.playlistController_=e.playlistController,this.tech_=e.tech,this.seekable=e.seekable,this.allowSeeksWithinUnsafeLiveWindow=e.allowSeeksWithinUnsafeLiveWindow,this.liveRangeSafeTimeDelta=e.liveRangeSafeTimeDelta,this.media=e.media,this.playedRanges_=[],this.consecutiveUpdates=0,this.lastRecordedTime=null,this.checkCurrentTimeTimeout_=null,this.logger_=Qr("PlaybackWatcher"),this.logger_("initialize");const t=()=>this.monitorCurrentTime_(),n=()=>this.monitorCurrentTime_(),i=()=>this.techWaiting_(),s=()=>this.resetTimeUpdate_(),a=this.playlistController_,o=["main","subtitle","audio"],c={};o.forEach((e=>{c[e]={reset:()=>this.resetSegmentDownloads_(e),updateend:()=>this.checkSegmentDownloads_(e)},a["".concat(e,"SegmentLoader_")].on("appendsdone",c[e].updateend),a["".concat(e,"SegmentLoader_")].on("playlistupdate",c[e].reset),this.tech_.on(["seeked","seeking"],c[e].reset)}));const l=e=>{["main","audio"].forEach((t=>{a["".concat(t,"SegmentLoader_")][e]("appended",this.seekingAppendCheck_)}))};this.seekingAppendCheck_=()=>{this.fixesBadSeeks_()&&(this.consecutiveUpdates=0,this.lastRecordedTime=this.tech_.currentTime(),l("off"))},this.clearSeekingAppendCheck_=()=>l("off"),this.watchForBadSeeking_=()=>{this.clearSeekingAppendCheck_(),l("on")},this.tech_.on("seeked",this.clearSeekingAppendCheck_),this.tech_.on("seeking",this.watchForBadSeeking_),this.tech_.on("waiting",i),this.tech_.on(uc,s),this.tech_.on("canplay",n),this.tech_.one("play",t),this.dispose=()=>{this.clearSeekingAppendCheck_(),this.logger_("dispose"),this.tech_.off("waiting",i),this.tech_.off(uc,s),this.tech_.off("canplay",n),this.tech_.off("play",t),this.tech_.off("seeking",this.watchForBadSeeking_),this.tech_.off("seeked",this.clearSeekingAppendCheck_),o.forEach((e=>{a["".concat(e,"SegmentLoader_")].off("appendsdone",c[e].updateend),a["".concat(e,"SegmentLoader_")].off("playlistupdate",c[e].reset),this.tech_.off(["seeked","seeking"],c[e].reset)})),this.checkCurrentTimeTimeout_&&r.a.clearTimeout(this.checkCurrentTimeTimeout_),this.resetTimeUpdate_()}}monitorCurrentTime_(){this.checkCurrentTime_(),this.checkCurrentTimeTimeout_&&r.a.clearTimeout(this.checkCurrentTimeTimeout_),this.checkCurrentTimeTimeout_=r.a.setTimeout(this.monitorCurrentTime_.bind(this),250)}resetSegmentDownloads_(e){const t=this.playlistController_["".concat(e,"SegmentLoader_")];this["".concat(e,"StalledDownloads_")]>0&&this.logger_("resetting possible stalled download count for ".concat(e," loader")),this["".concat(e,"StalledDownloads_")]=0,this["".concat(e,"Buffered_")]=t.buffered_()}checkSegmentDownloads_(e){const t=this.playlistController_,n=t["".concat(e,"SegmentLoader_")],i=n.buffered_(),r=function(e,t){if(e===t)return!1;if(!e&&t||!t&&e)return!0;
2if(e.length!==t.length)return!0;for(let n=0;n<e.length;n++)if(e.start(n)!==t.start(n)||e.end(n)!==t.end(n))return!0;return!1}(this["".concat(e,"Buffered_")],i);if(this["".concat(e,"Buffered_")]=i,r){const n={bufferedRanges:i};return t.trigger({type:"bufferedrangeschanged",metadata:n}),void this.resetSegmentDownloads_(e)}this["".concat(e,"StalledDownloads_")]++,this.logger_("found #".concat(this["".concat(e,"StalledDownloads_")]," ").concat(e," appends that did not increase buffer (possible stalled download)"),{playlistId:n.playlist_&&n.playlist_.id,buffered:ss(i)}),this["".concat(e,"StalledDownloads_")]<10||(this.logger_("".concat(e," loader stalled download exclusion")),this.resetSegmentDownloads_(e),this.tech_.trigger({type:"usage",name:"vhs-".concat(e,"-download-exclusion")}),"subtitle"!==e&&t.excludePlaylist({error:{message:"Excessive ".concat(e," segment downloading detected.")},playlistExclusionDuration:1/0}))}checkCurrentTime_(){if(this.tech_.paused()||this.tech_.seeking())return;const e=this.tech_.currentTime(),t=this.tech_.buffered();if(this.lastRecordedTime===e&&(!t.length||e+es>=t.end(t.length-1)))return this.techWaiting_();if(this.consecutiveUpdates>=5&&e===this.lastRecordedTime)this.consecutiveUpdates++,this.waiting_();else if(e===this.lastRecordedTime)this.consecutiveUpdates++;else{this.playedRanges_.push(Jr([this.lastRecordedTime,e]));const t={playedRanges:this.playedRanges_};this.playlistController_.trigger({type:"playedrangeschanged",metadata:t}),this.consecutiveUpdates=0,this.lastRecordedTime=e}}resetTimeUpdate_(){this.consecutiveUpdates=0}fixesBadSeeks_(){if(!this.tech_.seeking())return!1;const e=this.seekable(),t=this.tech_.currentTime();let n;if(this.afterSeekableWindow_(e,t,this.media(),this.allowSeeksWithinUnsafeLiveWindow)){n=e.end(e.length-1)}if(this.beforeSeekableWindow_(e,t)){const t=e.start(0);n=t+(t===e.end(0)?0:es)}if("undefined"!==typeof n)return this.logger_("Trying to seek outside of seekable at time ".concat(t," with ")+"seekable range ".concat(rs(e),". Seeking to ")+"".concat(n,".")),this.tech_.setCurrentTime(n),!0;const i=this.playlistController_.sourceUpdater_,r=this.tech_.buffered(),s=i.audioBuffer?i.audioBuffered():null,a=i.videoBuffer?i.videoBuffered():null,o=this.media(),c=o.partTargetDuration?o.partTargetDuration:2*(o.targetDuration-$r),l=[s,a];for(let u=0;u<l.length;u++){if(!l[u])continue;if(os(l[u],t)<c)return!1}const d=is(r,t);return 0!==d.length&&(n=d.start(0)+es,this.logger_("Buffered region starts (".concat(d.start(0),") ")+" just beyond seek point (".concat(t,"). Seeking to ").concat(n,".")),this.tech_.setCurrentTime(n),!0)}waiting_(){if(this.techWaiting_())return;const e=this.tech_.currentTime(),t=this.tech_.buffered(),n=ns(t,e);return n.length&&e+3<=n.end(0)?(this.resetTimeUpdate_(),this.tech_.setCurrentTime(e),this.logger_("Stopped at ".concat(e," while inside a buffered region ")+"[".concat(n.start(0)," -> ").concat(n.end(0),"]. Attempting to resume ")+"playback by seeking to the current time."),void this.tech_.trigger({type:"usage",name:"vhs-unknown-waiting"})):void 0}techWaiting_(){const e=this.seekable(),t=this.tech_.currentTime();if(this.tech_.seeking())return!0;if(this.beforeSeekableWindow_(e,t)){const n=e.end(e.length-1);return this.logger_("Fell out of live window at time ".concat(t,". Seeking to ")+"live point (seekable end) ".concat(n)),this.resetTimeUpdate_(),this.tech_.setCurrentTime(n),this.tech_.trigger({type:"usage",name:"vhs-live-resync"}),!0}const n=this.tech_.vhs.playlistController_.sourceUpdater_,i=this.tech_.buffered();if(this.videoUnderflow_({audioBuffered:n.audioBuffered(),videoBuffered:n.videoBuffered(),currentTime:t}))return this.resetTimeUpdate_(),this.tech_.setCurrentTime(t),this.tech_.trigger({type:"usage",name:"vhs-video-underflow"}),!0;const r=is(i,t);return r.length>0&&(this.logger_("Stopped at ".concat(t," and seeking to ").concat(r.start(0))),this.resetTimeUpdate_(),this.skipTheGap_(t),!0)}afterSeekableWindow_(e,t,n){let i=arguments.length>3&&void 0!==arguments[3]&&arguments[3];if(!e.length)return!1;let r=e.end(e.length-1)+es;const s=!n.endList,a="number"===typeof n.partTargetDuration;return s&&(a||i)&&(r=e.end(e.length-1)+3*n.targetDuration),t>r}beforeSeekableWindow_(e,t){return!!(e.length&&e.start(0)>0&&t<e.start(0)-this.liveRangeSafeTimeDelta)}videoUnderflow_(e){let t,{videoBuffered:n,audioBuffered:i,currentTime:r}=e;if(n){if(n.length&&i.length){const e=ns(n,r-3),s=ns(n,r),a=ns(i,r);a.length&&!s.length&&e.length&&(t={start:e.end(0),end:a.end(0)})}else{is(n,r).length||(t=this.gapFromVideoUnderflow_(n,r))}return!!t&&(this.logger_("Encountered a gap in video from ".concat(t.start," to ").concat(t.end,". ")+"Seeking to current time ".concat(r)),!0)}}skipTheGap_(e){const t=this.tech_.buffered(),n=this.tech_.currentTime(),i=is(t,n);if(this.resetTimeUpdate_(),0===i.length||n!==e)return;this.logger_("skipTheGap_:","currentTime:",n,"scheduled currentTime:",e,"nextRange start:",i.start(0)),this.tech_.setCurrentTime(i.start(0)+$r);const r={gapInfo:{from:n,to:i.start(0)}};this.playlistController_.trigger({type:"gapjumped",metadata:r}),this.tech_.trigger({type:"usage",name:"vhs-gap-skip"})}gapFromVideoUnderflow_(e,t){const n=function(e){if(e.length<2)return Jr();const t=[];for(let n=1;n<e.length;n++){const i=e.end(n-1),r=e.start(n);t.push([i,r])}return Jr(t)}(e);for(let i=0;i<n.length;i++){const e=n.start(i),r=n.end(i);if(t-e<4&&t-e>2)return{start:e,end:r}}return null}}const pc={errorInterval:30,getSource(e){return e(this.tech({IWillNotUseThisInPlugins:!0}).currentSource_||this.currentSource())}},mc=function(e,t){let n=0,i=0;const r=Zr(pc,t);e.ready((()=>{e.trigger({type:"usage",name:"vhs-error-reload-initialized"})}));const s=function(){i&&e.currentTime(i)},a=function(t){null!==t&&void 0!==t&&(i=e.duration()!==1/0&&e.currentTime()||0,e.one("loadedmetadata",s),e.src(t),e.trigger({type:"usage",name:"vhs-error-reload"}),e.play())},o=function(){if(Date.now()-n<1e3*r.errorInterval)e.trigger({type:"usage",name:"vhs-error-reload-canceled"});else{if(r.getSource&&"function"===typeof r.getSource)return n=Date.now(),r.getSource.call(e,a);Hr.log.error("ERROR: reloadSourceOnError - The option getSource must be a function!")}},c=function(){e.off("loadedmetadata",s),e.off("error",o),e.off("dispose",c)};e.on("error",o),e.on("dispose",c),e.reloadSourceOnError=function(t){c(),mc(e,t)}},gc=function(e){mc(this,e)};var fc="3.17.2";const bc={PlaylistLoader:Ys,Playlist:Ss,utils:sa,STANDARD_PLAYLIST_SELECTOR:Za,INITIAL_PLAYLIST_SELECTOR:function(){const e=this.playlists.main.playlists.filter(Ss.isEnabled);Ya(e,((e,t)=>
2Ka(e,t)));return e.filter((e=>!!Us(this.playlists.main,e).video))[0]||null},lastBandwidthSelector:Za,movingAverageBandwidthSelector:function(e){let t=-1,n=-1;if(e<0||e>1)throw new Error("Moving average bandwidth decay must be between 0 and 1.");return function(){let i=this.useDevicePixelRatio&&r.a.devicePixelRatio||1;return isNaN(this.customPixelRatio)||(i=this.customPixelRatio),t<0&&(t=this.systemBandwidth,n=this.systemBandwidth),this.systemBandwidth>0&&this.systemBandwidth!==n&&(t=e*this.systemBandwidth+(1-e)*t,n=this.systemBandwidth),Qa({main:this.playlists.main,bandwidth:t,playerWidth:parseInt(Xa(this.tech_.el(),"width"),10)*i,playerHeight:parseInt(Xa(this.tech_.el(),"height"),10)*i,playerObjectFit:this.usePlayerObjectFit?Xa(this.tech_.el(),"objectFit"):"",limitRenditionByPlayerDimensions:this.limitRenditionByPlayerDimensions,playlistController:this.playlistController_})}},comparePlaylistBandwidth:Ka,comparePlaylistResolution:function(e,t){let n,i;return e.attributes.RESOLUTION&&e.attributes.RESOLUTION.width&&(n=e.attributes.RESOLUTION.width),n=n||r.a.Number.MAX_VALUE,t.attributes.RESOLUTION&&t.attributes.RESOLUTION.width&&(i=t.attributes.RESOLUTION.width),i=i||r.a.Number.MAX_VALUE,n===i&&e.attributes.BANDWIDTH&&t.attributes.BANDWIDTH?e.attributes.BANDWIDTH-t.attributes.BANDWIDTH:n-i},xhr:Qs()};Object.keys(ga).forEach((e=>{Object.defineProperty(bc,e,{get:()=>(Hr.log.warn("using Vhs.".concat(e," is UNSAFE be sure you know what you are doing")),ga[e]),set(t){Hr.log.warn("using Vhs.".concat(e," is UNSAFE be sure you know what you are doing")),"number"!==typeof t||t<0?Hr.log.warn("value of Vhs.".concat(e," must be greater than or equal to 0")):ga[e]=t}})}));const yc="videojs-vhs",jc=function(e,t){const n=t.media();let i=-1;for(let r=0;r<e.length;r++)if(e[r].id===n.id){i=r;break}e.selectedIndex_=i,e.trigger({selectedIndex:i,type:"change"})};bc.canPlaySource=function(){return Hr.log.warn("VHS is no longer a tech. Please remove it from your player's techOrder.")};const _c=e=>{let{player:t,sourceKeySystems:n,audioMedia:i,mainPlaylists:r}=e;if(!t.eme.initializeMediaKeys)return Promise.resolve();const s=((e,t)=>e.reduce(((e,n)=>{if(!n.contentProtection)return e;const i=t.reduce(((e,t)=>{const i=n.contentProtection[t];return i&&i.pssh&&(e[t]={pssh:i.pssh}),e}),{});return Object.keys(i).length&&e.push(i),e}),[]))(i?r.concat([i]):r,Object.keys(n)),a=[],o=[];return s.forEach((e=>{o.push(new Promise(((e,n)=>{t.tech_.one("keysessioncreated",e)}))),a.push(new Promise(((n,i)=>{t.eme.initializeMediaKeys({keySystems:e},(e=>{e?i(e):n()}))})))})),Promise.race([Promise.all(a),Promise.race(o)])},vc=e=>{let{player:t,sourceKeySystems:n,media:i,audioMedia:r}=e;const s=((e,t,n)=>{if(!e)return e;let i={};t&&t.attributes&&t.attributes.CODECS&&(i=Ns(Object(g.h)(t.attributes.CODECS))),n&&n.attributes&&n.attributes.CODECS&&(i.audio=n.attributes.CODECS);const r=Object(g.e)(i.video),s=Object(g.e)(i.audio),a={};for(const o in e)a[o]={},s&&(a[o].audioContentType=s),r&&(a[o].videoContentType=r),t.contentProtection&&t.contentProtection[o]&&t.contentProtection[o].pssh&&(a[o].pssh=t.contentProtection[o].pssh),"string"===typeof e[o]&&(a[o].url=e[o]);return Zr(e,a)})(n,i,r);return!!s&&(t.currentSource().keySystems=s,!(s&&!t.eme)||(Hr.log.warn("DRM encrypted source cannot be decrypted without a DRM plugin"),!1))},xc=()=>{if(!r.a.localStorage)return null;const e=r.a.localStorage.getItem(yc);if(!e)return null;try{return JSON.parse(e)}catch(t){return null}},Oc=(e,t)=>{e._requestCallbackSet||(e._requestCallbackSet=new Set),e._requestCallbackSet.add(t)},Tc=(e,t)=>{e._responseCallbackSet||(e._responseCallbackSet=new Set),e._responseCallbackSet.add(t)},Sc=(e,t)=>{e._requestCallbackSet&&(e._requestCallbackSet.delete(t),e._requestCallbackSet.size||delete e._requestCallbackSet)},wc=(e,t)=>{e._responseCallbackSet&&(e._responseCallbackSet.delete(t),e._responseCallbackSet.size||delete e._responseCallbackSet)};bc.supportsNativeHls=function(){if(!a.a||!a.a.createElement)return!1;const e=a.a.createElement("video");if(!Hr.getTech("Html5").isSupported())return!1;return["application/vnd.apple.mpegurl","audio/mpegurl","audio/x-mpegurl","application/x-mpegurl","video/x-mpegurl","video/mpegurl","application/mpegurl"].some((function(t){return/maybe|probably/i.test(e.canPlayType(t))}))}(),bc.supportsNativeDash=!!(a.a&&a.a.createElement&&Hr.getTech("Html5").isSupported())&&/maybe|probably/i.test(a.a.createElement("video").canPlayType("application/d
2ash+xml")),bc.supportsTypeNatively=e=>"hls"===e?bc.supportsNativeHls:"dash"===e&&bc.supportsNativeDash,bc.isSupported=function(){return Hr.log.warn("VHS is no longer a tech. Please remove it from your player's techOrder.")},bc.xhr.onRequest=function(e){Oc(bc.xhr,e)},bc.xhr.onResponse=function(e){Tc(bc.xhr,e)},bc.xhr.offRequest=function(e){Sc(bc.xhr,e)},bc.xhr.offResponse=function(e){wc(bc.xhr,e)};const Ac=Hr.getComponent("Component");class kc extends Ac{constructor(e,t,n){if(super(t,n.vhs),"number"===typeof n.initialBandwidth&&(this.options_.bandwidth=n.initialBandwidth),this.logger_=Qr("VhsHandler"),t.options_&&t.options_.playerId){const e=Hr.getPlayer(t.options_.playerId);this.player_=e}if(this.tech_=t,this.source_=e,this.stats={},this.ignoreNextSeekingEvent_=!1,this.setOptions_(),this.options_.overrideNative&&t.overrideNativeAudioTracks&&t.overrideNativeVideoTracks)t.overrideNativeAudioTracks(!0),t.overrideNativeVideoTracks(!0);else if(this.options_.overrideNative&&(t.featuresNativeVideoTracks||t.featuresNativeAudioTracks))throw new Error("Overriding native VHS requires emulated tracks. See https://git.io/vMpjB");this.on(a.a,["fullscreenchange","webkitfullscreenchange","mozfullscreenchange","MSFullscreenChange"],(e=>{const t=a.a.fullscreenElement||a.a.webkitFullscreenElement||a.a.mozFullScreenElement||a.a.msFullscreenElement;t&&t.contains(this.tech_.el())?this.playlistController_.fastQualityChange_():this.playlistController_.checkABR_()})),this.on(this.tech_,"seeking",(function(){this.ignoreNextSeekingEvent_?this.ignoreNextSeekingEvent_=!1:this.setCurrentTime(this.tech_.currentTime())})),this.on(this.tech_,"error",(function(){this.tech_.error()&&this.playlistController_&&this.playlistController_.pauseLoading()})),this.on(this.tech_,"play",this.play)}setOptions_(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(this.options_=Zr(this.options_,e),this.options_.withCredentials=this.options_.withCredentials||!1,this.options_.limitRenditionByPlayerDimensions=!1!==this.options_.limitRenditionByPlayerDimensions,this.options_.useDevicePixelRatio=this.options_.useDevicePixelRatio||!1,this.options_.usePlayerObjectFit=this.options_.usePlayerObjectFit||!1,this.options_.useBandwidthFromLocalStorage="undefined"!==typeof this.source_.useBandwidthFromLocalStorage?this.source_.useBandwidthFromLocalStorage:this.options_.useBandwidthFromLocalStorage||!1,this.options_.useForcedSubtitles=this.options_.useForcedSubtitles||!1,this.options_.useNetworkInformationApi="undefined"===typeof this.options_.useNetworkInformationApi||this.options_.useNetworkInformationApi,this.options_.useDtsForTimestampOffset=this.options_.useDtsForTimestampOffset||!1,this.options_.customTagParsers=this.options_.customTagParsers||[],this.options_.customTagMappers=this.options_.customTagMappers||[],this.options_.cacheEncryptionKeys=this.options_.cacheEncryptionKeys||!1,this.options_.llhls=!1!==this.options_.llhls,this.options_.bufferBasedABR=this.options_.bufferBasedABR||!1,"number"!==typeof this.options_.playlistExclusionDuration&&(this.options_.playlistExclusionDuration=60),"number"!==typeof this.options_.bandwidth&&this.options_.useBandwidthFromLocalStorage){const e=xc();e&&e.bandwidth&&(this.options_.bandwidth=e.bandwidth,this.tech_.trigger({type:"usage",name:"vhs-bandwidth-from-local-storage"})),e&&e.throughput&&(this.options_.throughput=e.throughput,this.tech_.trigger({type:"usage",name:"vhs-throughput-from-local-storage"}))}"number"!==typeof this.options_.bandwidth&&(this.options_.bandwidth=ga.INITIAL_BANDWIDTH),this.options_.enableLowInitialPlaylist=this.options_.enableLowInitialPlaylist&&this.options_.bandwidth===ga.INITIAL_BANDWIDTH,["withCredentials","useDevicePixelRatio","usePlayerObjectFit","customPixelRatio","limitRenditionByPlayerDimensions","bandwidth","customTagParsers","customTagMappers","cacheEncryptionKeys","playlistSelector","initialPlaylistSelector","bufferBasedABR","liveRangeSafeTimeDelta","llhls","useForcedSubtitles","useNetworkInformationApi","useDtsForTimestampOffset","exactManifestTimings","leastPixelDiffSelector"].forEach((e=>{"undefined"!==typeof this.source_[e]&&(this.options_[e]=this.source_[e])})),this.limitRenditionByPlayerDimensions=this.options_.limitRenditionByPlayerDimensions,this.useDevicePixelRatio=this.options_.useDevicePixelRatio,this.usePlayerObjectFit=this.options_.usePlayerObjectFit;const t=this.options_.customPixelRatio;"number"===typeof t&&t>=0&&(this.customPixelRatio=t)}setOptions(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.setOptions_(e)}src(e,t){if(!e)return;var n;this.setOptions_(),this.options_.src=0===(n=this.source_.src).toLowerCase().indexOf("data:application/vnd.videojs.vhs+json,")?JSON.parse(n.substring(n.indexOf(",")+1)):n,this.options_.tech=this.tech_,this.options_.externVhs=bc,this.options_.sourceType=Object(f.a)(t),this.options_.seekTo=e=>{this.tech_.setCurrentTime(e)},this.options_.player_=this.player_,this.playlistController_=new lc(this.options_);const i=Zr({liveRangeSafeTimeDelta:es},this.options_,{seekable:()=>this.seekable(),media:()=>this.playlistController_.media(),playlistController:this.playlistController_});this.playbackWatcher_=new hc(i),this.attachStreamingEventListeners_(),this.playlistController_.on("error",(()=>{const e=Hr.players[this.tech_.options_.playerId];let t=this.playlistController_.error;"object"!==typeof t||t.code?"string"===typeof t&&(t={message:t,code:3}):t.code=3,e.error(t)}));const s=this.options_.bufferBasedABR?bc.movingAverageBandwidthSelector(.55):bc.STANDARD_PLAYLIST_SELECTOR;this.playlistController_.selectPlaylist=this.selectPlaylist?this.selectPlaylist.bind(this):s.bind(this),this.playlistController_.selectInitialPlaylist=bc.INITIAL_PLAYLIST_SELECTOR.bind(this),this.playlists=this.playlistController_.mainPlaylistLoader_,this.mediaSource=this.playlistController_.mediaSource,Object.defineProperties(this,{selectPlaylist:{get(){return this.playlistController_.selectPlaylist},set(e){this.playlistController_.selectPlaylist=e.bind(this)}},throughput:{get(){return this.playlistController_.mainSegmentLoader_.throughput.rate},set(e){this.playlistController_.mainSegmentLoader_.throughput.rate=e,this.playlistController_.mainSegmentLoader_.throughput.count=1}},bandwidth:{get(){let e=this.playlistController_.mainSegmentLoader_.bandwidth;const t=r.a.navigator.connection||r.a.navigator.mozConnection||r.a.navigator.webkitConnection,n=1e7;if(this.options_.useNetworkInformationApi&&t){const i=1e3*t.downlink*1e3;e=i>=n&&e>=n?Math.max(e,i):i}return e},set(e){this.playlistController_.mainSegmentLoader_.bandwidth=e,this.playlistController_.mainSegmentLoader_.throughput={rate:0,count:0}}},systemBandwidth:{get(){const e=1/(this.bandwidth||1);let t;t=this.throughput>0?1/this.throughput:0;return Math.floor(1/(e+t))},set(){Hr.log.error('The "systemBandwidth" property is read-only')}}}),this.options_.bandwidth&&(this.bandwidth=this.options_.bandwidth),this.options_.throughput&&(this.throughput=this.options_.throughput),Object.defineProperties(this.stats,{bandwidth:{get:()=>this.bandwidth||0,enumerable:!0},mediaRequests:{get:()=>this.playlistController_.mediaRequests_()||0,enumerable:!0},mediaRequestsAborted:{get:()=>this.playlistController_.mediaRequestsAborted_()||0,enumerable:!0},mediaRequestsTimedout:{get:()=>this.playlistController_.mediaRequestsTimedout_()||0,enumerable:!0},mediaRequestsErrored:{get:()=>this.playlistController_.mediaRequestsErrored_()||0,enumerable:!0},mediaTransferDuration:{get:()=>this.playlistController_.mediaTransferDuration_()||0,enumerable:!0},mediaBytesTransferred:{get:()=>this.playlistController_.mediaBytesTransferred_()||0,enumerable:!0},mediaSecondsLoaded:{get:()=>this.playlistController_.mediaSecondsLoaded_()||0,enumerable:!0},mediaAppends:{get:()=>this.playlistController_.mediaAppends_()||0,enumerable:!0},mainAppendsToLoadedData:{get:()=>this.playlistController_.mainAppendsToLoadedData_()||0,enumerable:!0},audioAppendsToLoadedData:{get:()=>this.playlistController_.audioAppendsToLoadedData_()||0,enumerable:!0},appendsToLoadedData:{get:()=>this.playlistController_.appendsToLoadedData_()||0,enumerable:!0},timeToLoadedData:{get:()=>this.playlistController_.timeToLoadedData_()||0,enumerable:!0},buffered:{get:()=>ss(this.tech_.buffered()),enumerable:!0},currentTime:{get:()=>this.tech_.currentTime(),enumerable:!0},currentSource:{get:()=>this.tech_.currentSource_,enumerable:!0},currentTech:{get:()=>this.tech_.name_,enumerable:!0},duration:{get:()=>this.tech_.duration(),enumerable:!0},main:{get:()=>this.playlists.main,enumerable:!0},playerDimensions:{get:()=>this.tech_.currentDimensions(),enumerable:!0},seekable:{get:()=>ss(this.tech_.seekable()),enumerable:!0},timestamp:{get:()=>Date.now(),enumerable:!0},videoPlaybackQuality:{get:()=>this.tech_.getVideoPlaybackQuality(),enumerable:!0}}),this.tech_.one("canplay",this.playlistController_.setupFirstPlay.bind(this.playlistController_)),this.tech_.on("bandwidthupdate",(()=>{this.options_.useBandwidthFromLocalStorage&&(e=>{if(!r.a.localStorage)return!1;let t=xc();t=t?Zr(t,e):e;try{r.a.localStorage.setItem(yc,JSON.stringify(t))}catch(n){return!1}})({bandwidth:this.bandwidth,throughput:Math.round(this.throughput)})})),this.playlistController_.on("selectedinitialmedia",(()=>{var e;(e=this).representations=()=>{const t=e.playlistController_.main(),n=Ts(t)?e.playlistController_.getAudioTrackPlaylists_():t.playlists;return n?n.filter((e=>!ys(e))).map(((t,n)=>new dc(e,t,t.id))):[]}})),this.playlistController_.sourceUpdater_.on("createdsourcebuffers",(()=>{this.setupEme_()})),this.on(this.playlistController_,"progress",(function(){this.tech_.trigger("progress")})),this.on(this.playlistController_,"firstplay",(function(){this.ignoreNextSeekingEvent_=!0})),this.setupQualityLevels_(),this.tech_.el()&&(this.mediaSourceUrl_=r.a.URL.createObjectURL(this.playlistController_.mediaSource),(Hr.browser.IS_ANY_SAFARI||Hr.browser.IS_IOS)&&this.options_.overrideNative&&"hls"===this.options_.sourceType&&"function"===typeof this.tech_.addSourceElement?(this.tech_.addSourceElement(this.mediaSourceUrl_),this.tech_.addSourceElement(this.source_.src)):this.tech_.src(this.mediaSourceUrl_))}createKeySessions_(){const e=this.playlistController_.mediaTypes_.AUDIO.activePlaylistLoader;this.logger_("waiting for EME key session creation"),_c({player:this.player_,sourceKeySystems:this.source_.keySystems,audioMedia:e&&e.media(),mainPlaylists:this.playlists.main.playlists}).then((()=>{this.logger_("created EME key session"),this.playlistController_.sourceUpdater_.initializedEme()})).catch((e=>{this.logger_("error while creating EME key session",e),this.player_.error({message:"Failed to initialize media ke
2ys for EME",code:3})}))}handleWaitingForKey_(){this.logger_("waitingforkey fired, attempting to create any new key sessions"),this.createKeySessions_()}setupEme_(){const e=this.playlistController_.mediaTypes_.AUDIO.activePlaylistLoader,t=vc({player:this.player_,sourceKeySystems:this.source_.keySystems,media:this.playlists.media(),audioMedia:e&&e.media()});this.player_.tech_.on("keystatuschange",(e=>{this.playlistController_.updatePlaylistByKeyStatus(e.keyId,e.status)})),this.handleWaitingForKey_=this.handleWaitingForKey_.bind(this),this.player_.tech_.on("waitingforkey",this.handleWaitingForKey_),t?this.createKeySessions_():this.playlistController_.sourceUpdater_.initializedEme()}setupQualityLevels_(){const e=Hr.players[this.tech_.options_.playerId];e&&e.qualityLevels&&!this.qualityLevels_&&(this.qualityLevels_=e.qualityLevels(),this.playlistController_.on("selectedinitialmedia",(()=>{!function(e,t){t.representations().forEach((t=>{e.addQualityLevel(t)})),jc(e,t.playlists)}(this.qualityLevels_,this)})),this.playlists.on("mediachange",(()=>{jc(this.qualityLevels_,this.playlists)})))}static version(){return{"@videojs/http-streaming":fc,"mux.js":"7.1.0","mpd-parser":"1.3.1","m3u8-parser":"7.2.0","aes-decrypter":"4.0.2"}}version(){return this.constructor.version()}canChangeType(){return Ro.canChangeType()}play(){this.playlistController_.play()}setCurrentTime(e){this.playlistController_.setCurrentTime(e)}duration(){return this.playlistController_.duration()}seekable(){return this.playlistController_.seekable()}dispose(){this.playbackWatcher_&&this.playbackWatcher_.dispose(),this.playlistController_&&this.playlistController_.dispose(),this.qualityLevels_&&this.qualityLevels_.dispose(),this.tech_&&this.tech_.vhs&&delete this.tech_.vhs,this.mediaSourceUrl_&&r.a.URL.revokeObjectURL&&(r.a.URL.revokeObjectURL(this.mediaSourceUrl_),this.mediaSourceUrl_=null),this.tech_&&this.tech_.off("waitingforkey",this.handleWaitingForKey_),super.dispose()}convertToProgramTime(e,t){return aa({playlist:this.playlistController_.media(),time:e,callback:t})}seekToProgramTime(e,t){let n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:2;return oa({programTime:e,playlist:this.playlistController_.media(),retryCount:i,pauseAfterSeek:n,seekTo:this.options_.seekTo,tech:this.options_.tech,callback:t})}setupXhrHooks_(){this.xhr.onRequest=e=>{Oc(this.xhr,e)},this.xhr.onResponse=e=>{Tc(this.xhr,e)},this.xhr.offRequest=e=>{Sc(this.xhr,e)},this.xhr.offResponse=e=>{wc(this.xhr,e)},this.player_.trigger("xhr-hooks-ready")}attachStreamingEventListeners_(){["seekablerangeschanged","bufferedrangeschanged","contentsteeringloadstart","contentsteeringloadcomplete","contentsteeringparsed"].forEach((e=>{this.playlistController_.on(e,(e=>{this.player_.trigger(h()({},e))}))})),["gapjumped","playedrangeschanged"].forEach((e=>{this.playbackWatcher_.on(e,(e=>{this.player_.trigger(h()({},e))}))}))}}const Cc={name:"videojs-http-streaming",VERSION:fc,canHandleSource(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const n=Zr(Hr.options,t);return!(!n.vhs.experimentalUseMMS&&!Object(g.c)("avc1.4d400d,mp4a.40.2",!1))&&Cc.canPlayType(e.type,n)},handleSource(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const i=Zr(Hr.options,n);return t.vhs=new kc(e,t,i),t.vhs.xhr=Qs(),t.vhs.setupXhrHooks_(),t.vhs.src(e.src,e.type),t.vhs},canPlayType(e,t){const n=Object(f.a)(e);if(!n)return"";const i=Cc.getOverrideNative(t);return!bc.supportsTypeNatively(n)||i?"maybe":""},getOverrideNative(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{vhs:t={}}=e,n=!(Hr.browser.IS_ANY_SAFARI||Hr.browser.IS_IOS),{overrideNative:i=n}=t;return i}};Object(g.c)("avc1.4d400d,mp4a.40.2",!0)&&Hr.getTech("Html5").registerSourceHandler(Cc,0),Hr.VhsHandler=kc,Hr.VhsSourceHandler=Cc,Hr.Vhs=bc,Hr.use||Hr.registerComponent("Vhs",bc),Hr.options.vhs=Hr.options.vhs||{},Hr.getPlugin&&Hr.getPlugin("reloadSourceOnError")||Hr.registerPlugin("reloadSourceOnError",gc)}).call(this,n(112))},194:function(e,t,n){(function(t){var n;n="undefined"!==typeof window?window:"undefined"!==typeof t?t:"undefined"!==typeof self?self:{},e.exports=n}).call(this,n(112))},195:function(e,t,n){"use strict";var i=n(0),r=n.n(i),s=n(5),a=n(79);n(63);t.a=()=>{const{t:e,i18n:t}=Object(a.a)(),{pathname:n}=Object(s.i)(),[i,o]=r.a.useState(!1),[c,l]=r.a.useState(!1),[d,u]=r.a.useState(!1),[h,p]=r.a.useState(!1);return r.a.useEffect((()=>{o(Boolean(Object(s.g)(n,{path:["/".concat(t.language,"/").concat(e("scuola")),"/".concat(t.language,"/").concat(e("scuola"),"/:classSlug"),"/".concat(t.language,"/").concat(e("scuola"),"/:classSlug/").concat(e("moduli")),"/".concat(t.language,"/").concat(e("scuola"),"/:classSlug/").concat(e("moduli"),"/:moduleSlug"),"/".concat(t.language,"/").concat(e("scuola"),"/:classSlug/").concat(e("moduli"),"/:moduleSlug/").concat(e("lezioni"),"/:chapterSlug"),"/".concat(t.language,"/").concat(e("scuola"),"/:classSlug/").concat(e("moduli"),"/:moduleSlug/").concat(e("lezioni"),"/:chapterSlug/:test")]})))}),[n]),r.a.useEffect((()=>{l(Boolean(Object(s.g)(n,{path:["/".concat(t.language,"/").concat(e("scopri"),"/").concat(e("benessere")),"/".concat(t.language,"/").concat(e("benessere")),"/".concat(t.language,"/").concat(e("benessere"),"/:classSlug"),"/".concat(t.language,"/").concat(e("benessere"),"/:classSlug/").concat(e("moduli")),"/".concat(t.language,"/").concat(e("benessere"),"/:classSlug/").concat(e("moduli"),"/:moduleSlug"),"/".concat(t.language,"/").concat(e("benessere"),"/:classSlug/").concat(e("moduli"),"/:moduleSlug/").concat(e("lezioni"),"/:chapterSlug"),"/".concat(t.language,"/").concat(e("benessere"),"/:classSlug/").concat(e("moduli"),"/:moduleSlug/").concat(e("lezioni"),"/:chapterSlug/:test")]})))}),[n]),r.a.useEffect((()=>{u(Boolean(Object(s.g)(n,{path:["/".concat(t.language,"/").concat(e("horeca")),"/".concat(t.language,"/").concat(e("horeca-brand"),"/:brandSlug"),"/".concat(t.language,"/").concat(e("horeca"),"/:courseSlug"),"/".concat(t.language,"/").concat(e("horeca"),"/:courseSlug/").concat(e("lezioni"),"/:lessonSlug"),"/".concat(t.language,"/").concat(e("horeca"),"/:courseSlug/").concat(e("lezioni"),"/:lessonSlug/:test")]})))}),[n]),r.a.useEffect((()=>{p((()=>c?{key:"wellness",translation:e("benessere"),fullTranslation:e("benessere"),layoutColor:"#F3F1EB"}:i?{key:"basics",translation:e("scuola"),fullTranslation:e("La Scuola"),layoutColor:"#121416"}:!!d&&{key:"horeca",translation:e("horeca"),fullTranslation:e("Horeca"),layoutColor:"#121416"}))}),[c,i,d]),{isBasic:i,isWellness:c,isHoreca:d,packageType:h}}},196:function(e,t,n){"use strict";n.d(t,"a",(function(){return _}));var i=n(0),r=n.n(i),s=n(714),a=n(725),o=n(726),c=n(727),l=n(111),d=n(720),u=n(717),h=n(202),p=n.n(h),m=n(656),g=n(1);const f=Object(s.a)({root:{"& .MuiDialog-paper":{backgroundColor:"#26292D",borderRadius:10},"&.wellness":{"& .MuiDialog-paper":{backgroundColor:"#fff"}}}})(a.a),b=Object(s.a)({root:{padding:0}})(o.a),y=Object(s.a)((e=>({root:{padding:0},truncate:{whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",paddingRight:"30px"},closeButton:{position:"absolute",right:e.spacing(1),top:e.spacing(1),color:e.palette.grey[500]}})))((e=>{const{children:t,classes:n,onClose:i,...r}=e;return Object(g.jsxs)(c.a,{sx:{minHeight:"60px",p:0},...r,children:[t&&Object(g.jsx)(l.a,{p:2.5,pr:6,children:Object(g.jsx)(d.a,{component:"div",className:n.truncate,variant:"body1",children:Object(g.jsx)("b",{children:t})})}),Boolean(i)&&Object(g.jsx)(u.a,{"aria-label":"close",className:n.closeButton,onClick:()=>{i()},size:"large",children:Object(g.jsx)(p.a,{})})]})})),j=r.a.forwardRef((function(e,t){return Object(g.jsx)(m.a,{direction:"up",ref:t,...e})}));function _(e){const{children:t,open:n,title:i,fullScreen:r,handleClose:s,hideTitle:a,...o}=e;return Object(g.jsxs)(f,{fullScreen:r||!1,open:n,onClose:()=>s(),TransitionComponent:j,...o,children:[!a&&Object(g.jsx)(y,{onClose:()=>s(),children:i}),Object(g.jsx)(b,{children:t})]})}},197:function(e,t,n){"use strict";n.d(t,"g",(function(){return r})),n.d(t,"e",(function(){return s})),n.d(t,"k",(function(){return a})),n.d(t,"j",(function(){return o}
2)),n.d(t,"i",(function(){return c})),n.d(t,"b",(function(){return u})),n.d(t,"f",(function(){return h})),n.d(t,"c",(function(){return p})),n.d(t,"h",(function(){return m})),n.d(t,"d",(function(){return g})),n.d(t,"a",(function(){return f}));var i=n(194),r=function(e,t,n){return void 0===n&&(n=" "),(function(e,t){for(var n="";t--;)n+=e;return n}(n,t)+e.toString()).slice(-t)},s=function(e){return"function"===ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer instanceof ArrayBuffer},a=function(e){return e instanceof Uint8Array?e:(Array.isArray(e)||s(e)||e instanceof ArrayBuffer||(e="number"!==typeof e||"number"===typeof e&&e!==e?0:[e]),new Uint8Array(e&&e.buffer||e,e&&e.byteOffset||0,e&&e.byteLength||0))},o=function(e){e=a(e);for(var t="",n=0;n<e.length;n++)t+=r(e[n].toString(16),2,"0");return t},c=function(e){e=a(e);for(var t="",n=0;n<e.length;n++)t+=r(e[n].toString(2),8,"0");return t},l=n.n(i).a.BigInt||Number,d=[l("0x1"),l("0x100"),l("0x10000"),l("0x1000000"),l("0x100000000"),l("0x10000000000"),l("0x1000000000000"),l("0x100000000000000"),l("0x10000000000000000")],u=(function(){var e=new Uint16Array([65484]),t=new Uint8Array(e.buffer,e.byteOffset,e.byteLength);255===t[0]||t[0]}(),function(e,t){var n=void 0===t?{}:t,i=n.signed,r=void 0!==i&&i,s=n.le,o=void 0!==s&&s;e=a(e);var c=o?"reduce":"reduceRight",u=(e[c]?e[c]:Array.prototype[c]).call(e,(function(t,n,i){var r=o?i:Math.abs(i+1-e.length);return t+l(n)*d[r]}),l(0));if(r){var h=d[e.length]/l(2)-l(1);(u=l(u))>h&&(u-=h,u-=h,u-=l(2))}return Number(u)}),h=function(e,t){var n=(void 0===t?{}:t).le,i=void 0!==n&&n;("bigint"!==typeof e&&"number"!==typeof e||"number"===typeof e&&e!==e)&&(e=0),e=l(e);for(var r,s=(r=e,Math.ceil(function(e){return e.toString(2).length}(r)/8)),a=new Uint8Array(new ArrayBuffer(s)),o=0;o<s;o++){var c=i?o:Math.abs(o+1-a.length);a[c]=Number(e/d[o]&l(255)),e<0&&(a[c]=Math.abs(~a[c]),a[c]-=0===o?1:2)}return a},p=function(e){if(!e)return"";e=Array.prototype.slice.call(e);var t=String.fromCharCode.apply(null,a(e));try{return decodeURIComponent(escape(t))}catch(n){}return t},m=function(e,t){if("string"!==typeof e&&e&&"function"===typeof e.toString&&(e=e.toString()),"string"!==typeof e)return new Uint8Array;t||(e=unescape(encodeURIComponent(e)));for(var n=new Uint8Array(e.length),i=0;i<e.length;i++)n[i]=e.charCodeAt(i);return n},g=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];if((t=t.filter((function(e){return e&&(e.byteLength||e.length)&&"string"!==typeof e}))).length<=1)return a(t[0]);var i=t.reduce((function(e,t,n){return e+(t.byteLength||t.length)}),0),r=new Uint8Array(i),s=0;return t.forEach((function(e){e=a(e),r.set(e,s),s+=e.byteLength})),r},f=function(e,t,n){var i=void 0===n?{}:n,r=i.offset,s=void 0===r?0:r,o=i.mask,c=void 0===o?[]:o;e=a(e);var l=(t=a(t)).every?t.every:Array.prototype.every;return t.length&&e.length-s>=t.length&&l.call(t,(function(t,n){return t===(c[n]?c[n]&e[s+n]:e[s+n])}))}},198:function(e,t,n){"use strict";n.d(t,"a",(function(){return u}));n(0);var i=n(645),r=n(701),s=n(463),a=n(734),o=n(688),c=n(1);const l=Object(i.a)(r.a)((e=>{let{theme:t}=e;return{fontSize:18,color:"#B1B8BE",fontWeight:"bold","&.Mui-focused":{color:"#B1B8BE"}}})),d=Object(i.a)(s.c)((e=>{let{theme:t}=e;return{borderRadius:10,backgroundColor:"#2F3337",border:"1px solid #42474d",fontSize:16,padding:"10px 12px",color:"#fff",fontFamily:"Raleway",boxSizing:"border-box",height:43,"label + &":{marginTop:t.spacing(3)},"&.MuiAutocomplete-inputRoot":{padding:0,paddingLeft:12},"& .MuiAutocomplete-popupIndicator":{color:"#B1B8BE"},"& .MuiInputBase-input":{position:"relative","&.Mui-disabled":{WebkitTextFillColor:"gray"}},"& .MuiButton-contained":{}}}));function u(e){const{fullWidth:t,label:n,InputProps:i,inputProps:r,InputLabelProps:s,...o}=e;return Object(c.jsxs)(a.a,{fullWidth:t,variant:"standard",children:[Boolean(n)&&Object(c.jsx)(l,{...s,shrink:!0,children:n}),Object(c.jsx)(d,{...o,...i,inputProps:r})]})}const h=Object(i.a)(o.a)((e=>{let{theme:t}=e;return{"& label, & label.Mui-focused, ":{color:"#b1b8be",fontSize:"0.9rem"},"& .MuiOutlinedInput-root .MuiOutlinedInput-notchedOutline":{borderColor:"#42474d",borderWidth:"1.2px"},"& .MuiOutlinedInput-root.Mui-focused .MuiOutlinedInput-notchedOutline":{borderColor:"#b1b8be",borderWidth:"1.2px"},"&.light":{"& label, & label.Mui-focused, ":{color:"#B2B8BD"},"& .MuiOutlinedInput-root .MuiOutlinedInput-notchedOutline":{borderColor:"#B2B8BD",borderWidth:"1.5px"},"& .MuiOutlinedInput-root.Mui-focused .MuiOutlinedInput-notchedOutline":{borderColor:"#B2B8BD",borderWidth:"1.5px"},"& .MuiOutlinedInput-root":{backgroundColor:"#FFF"},"& .MuiOutlinedInput-input":{color:t.palette.dark.main}},"& .MuiOutlinedInput-root":{borderRadius:"10px",backgroundColor:"#26292D"},"& .MuiOutlinedInput-input":{"&.MuiInputBase-inputSizeSmall":{padding:"10px"},padding:"15px",color:"#fff"},"& .MuiInputLabel-outlined":{transform:"translate(14px, 17px) scale(1)"},"& .MuiInputLabel-outlined.MuiInputLabel-shrink":{transform:"translate(14px, -6px) scale(0.75)"}}}));t.b=h},201:function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));var i,r,s=n(0);function a(){return a=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)({}).hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},a.apply(null,arguments)}function o(e,t){let{title:n,titleId:o,...c}=e;return s.createElement("svg",a({id:"Livello_1",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",x:"0px",y:"0px",viewBox:"0 0 346.1 61.3",style:{enableBackgroun
2d:"new 0 0 346.1 61.3"},xmlSpace:"preserve",ref:t,"aria-labelledby":o},c),n?s.createElement("title",{id:o},n):null,i||(i=s.createElement("style",{type:"text/css"},"\n\t.st0{fill:currentColor;}\n")),r||(r=s.createElement("g",null,s.createElement("path",{className:"st0",d:"M42.9,53.5c-4.3-4.7-6.7-10.9-6.7-17.9c0-6.9,2.6-13.2,6.9-17.9s10.1-7.4,16.6-7.4c1.6,0,3.1,0.1,4.7,0.5h0.1 l-1.6,7.9h-0.1c-1-0.3-2.1-0.4-3.2-0.4c-4.3,0-8.4,1.8-11.3,5c-3.1,3.4-4.7,7.4-4.7,12.2c0,9.6,7,17,15.9,17c1.2,0,2.2-0.1,3.2-0.4 h0.1l1.6,7.9h-0.1c-1.7,0.4-3.2,0.5-4.8,0.5C53,60.8,47,58.2,42.9,53.5z"}),s.createElement("path",{className:"st0",d:"M83.3,10.8h3.6V11l15.8,49.5h-8v-0.1l-2.1-6.9H77.7l-2.1,7h-7.9v-0.3L83.3,10.8z M85.1,29.2l-5,15.9h10.1 L85.1,29.2z"}),s.createElement("path",{className:"st0",d:"M16.2,10.8h3.6V11l15.8,49.5h-8v-0.1l-2.1-6.9H10.6l-2.1,7H0.7v-0.3L16.2,10.8z M18,29.2l-4.9,15.9h10.1 L18,29.2z"}),s.createElement("path",{className:"st0",d:"M107.9,10.8h7c6.6,0.1,12.6,2.7,16.8,7.2c4.3,4.4,6.7,10.6,6.7,17.5S136,48.5,131.7,53 c-4.3,4.5-10.1,7.2-16.7,7.4h-7.2V10.8H107.9z M130.9,35.5c0-9.2-6.5-16.1-15.5-16.4v33C124.3,51.7,130.9,44.6,130.9,35.5z"}),s.createElement("path",{className:"st0",d:"M142.8,10.8h23.9v8.3h-16.3v15.8h13.9v8.3h-13.9v8.9h16.4v8.3h-23.9V10.8H142.8z M150.2,0.6h6.3l2.1,7.2h-4.7 L150.2,0.6z"}),s.createElement("path",{className:"st0",d:"M207.7,10.8h3v49.6h-7.5V36.3l-11,19.2l-0.1-0.3l-11-18.9v24.1h-7.5V10.8h3V11L192,39.3L207.7,10.8z"}),s.createElement("path",{className:"st0",d:"M218,60.4V10.8h7.5v49.6H218z"}),s.createElement("path",{className:"st0",d:"M246,10.8h3.6V11l15.8,49.5h-8v-0.1l-2.1-6.9h-14.9l-2.1,7h-7.9v-0.3L246,10.8z M247.9,29.2l-5,15.9H253 L247.9,29.2z"}),s.createElement("polygon",{className:"st0",points:"289.9,60.4 289.9,19.9 281.5,19.9 281.5,10.8 305.7,10.8 305.7,19.9 297.4,19.9 297.4,60.4 "}),s.createElement("polygon",{className:"st0",points:"325.7,60.4 312.1,11 320,11 328.5,41.9 336.7,11 344.6,11 331.4,60.4 "}),s.createElement("rect",{x:274,y:52.9,className:"st0",width:7.5,height:7.5}))))}const c=s.forwardRef(o);n.p},204:function(e,t,n){"use strict";n.d(t,"a",(function(){return u}));n(0);var i=n(645),r=n(736),s=n(690),a=n(1);const o=Object(i.a)("span")((e=>{let{theme:t}=e;return{borderRadius:11,width:28,height:28,backgroundColor:"#555C64",display:"flex",justifyContent:"center",alignItems:"center"}})),c=Object(i.a)(o)({"&:before":{display:"block",width:"45%",height:"45%",backgroundColor:"#fff",borderRadius:"30%",content:'""'}}),l=Object(i.a)(s.a)({"&.small":{"& span:not(.MuiTouchRipple-root)":{width:20,height:20,borderRadius:5}},"&.MuiCheckbox-colorSecondary":{"& span:not(.MuiTouchRipple-root)":{backgroundColor:"#fff",border:"1.2px solid #41474E"},"&.Mui-checked":{"& span:not(.MuiTouchRipple-root)":{"&:before":{backgroundColor:"#41474E"}}}},"&.wellness":{"& .unchecked":{backgroundColor:"#E6E4DC"},"& .checked":{backgroundColor:"#E6E4DC","&:before":{backgroundColor:"#26292D"}}}}),d=Object(i.a)(r.a)((e=>{let{theme:t}=e;return{}}));function u(e){return Object(a.jsx)(d,{control:Object(a.jsx)(l,{c
2olor:"default",icon:Object(a.jsx)(o,{className:"unchecked"}),checkedIcon:Object(a.jsx)(c,{className:"checked"}),...e}),label:e.label||"",variant:"default"})}},205:function(e,t,n){"use strict";t.a={it:"https://www.iubenda.com/termini-e-condizioni/39756041",en:"https://www.iubenda.com/terms-and-conditions/70243759",es:"https://www.iubenda.com/condiciones-de-uso/56970618"}},206:function(e,t,n){"use strict";t.a={it:"https://www.iubenda.com/privacy-policy/39756041",en:"https://www.iubenda.com/privacy-policy/70243759",es:"https://www.iubenda.com/privacy-policy/56970618"}},207:function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var i,r=n(0);function s(){return s=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)({}).hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},s.apply(null,arguments)}function a(e,t){let{title:n,titleId:a,...o}=e;return r.createElement("svg",s({xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",ref:t,"aria-labelledby":a},o),n?r.createElement("title",{id:a},n):null,i||(i=r.createElement("g",{id:"Raggruppa_5054","data-name":"Raggruppa 5054",transform:"translate(-89 -677)"},r.createElement("rect",{id:"Rettangolo_2144","data-name":"Rettangolo 2144",width:24,height:24,transform:"translate(89 677)",fill:"none"}),r.createElement("g",{id:"Raggruppa_5038","data-name":"Raggruppa 5038",transform:"translate(89.641 679)"},r.createElement("path",{id:"Tracciato_9014","data-name":"Tracciato 9014",d:"M72.65,20.281a.714.714,0,0,1-.682-.5c-.585-1.829-1.4-5.312-2.437-10.361q-.808.745-1.608,1.5a.717.717,0,0,1-.984-1.042c2.109-1.989,4.27-3.923,6.361-5.793C74.547,2.97,75.8,1.854,77.04.719h0a.618.618,0,0,1,.075-.074A1.434,1.434,0,0,1,79.1.74c1.133,1.025,2.265,2.034,3.4,3.042,2.206,1.966,4.488,4,6.708,6.1a.716.716,0,1,1-.984,1.042q-.87-.822-1.752-1.632c-.05.253-.1.519-.155.8-.616,3.161-1.46,7.489-2.166,9.7a.755.755,0,0,1-.686.5s-2.315-.014-3.592-.016a.716.716,0,0,1-.715-.712l-.026-4.088H76.913l.047,4.075a.717.717,0,0,1-.716.725c-1.547,0-3.2.009-3.577.017H72.65m7.935-1.448c.818,0,1.772.008,2.352.011.65-2.249,1.408-6.138,1.973-9.035.119-.61.228-1.17.324-1.652C84,7.037,82.76,5.934,81.546,4.851Q79.833,3.326,78.117,1.78a.709.709,0,0,1-.057-.057c-.016.016-.038.04-.055.055-1.249,1.138-2.5,2.257-3.75,3.375-1.149,1.028-2.321,2.076-3.491,3.14,1.012,5,1.823,8.545,2.413,10.548.561-.005,1.433-.009,2.342-.011l-.047-4.075a.717.717,0,0,1,.716-.725h3.653a.717.717,0,0,1,.716.712Z",transform:"translate(-66.715 -0.29)",fill:"currentColor"})))))}const o=r.forwardRef(a);n.p},208:function(e,t,n){"use strict";n.d(t,"a",(function(){return m}));var i=n(0),r=n.n(i),s=n(645),a=n(111),o=n(649),c=n(720),l=n(188),d=n(14),u=n.n(d),h=n(1);const p=Object(s.a)(a.a)((e=>{let{theme:t}=e;return{backgroundColor:"rgba(234, 0, 51, 0.55)",borderRadius:6,width:64,padding:t.spacing(1,0),textAlign:"center"}}));function m(e){const{end:t,onEnded:n,type:i,variantProps:s,...d}=e,m=r.a.useRef(),g="22:00",[f,b]=r.a.useState(u()(g,"HH:mm").diff(u()(),"seconds")<=0?u()(g,"HH:mm").add(1,"days"):u()(g,"HH:mm")),[y,j]=r.a.useState(f.diff(u()(),"seconds"));return r.a.useEffect((()=>{y<=0&&(n&&t===u()().format("DD-MM-YYYY")&&n(),b(u()(g,"HH:mm").add(1,"days")))}),[y]),r.a.useEffect((()=>{j(f.diff(u()(),"seconds"))}),[f]),r.a.useEffect((()=>(m.current=setInterval((()=>{j((e=>e-1))}),1e3),()=>{clearInterval(m.current)})),[]),i&&"variant"===i?Object(h.jsx)(o.a,{direction:"row",spacing:3,children:Object(l.l)(y,!0,!0).map((e=>Object(h.jsxs)(a.a,{children:[Object(h.jsx)(p,{...!!s&&{...s.timeContainerProps},children:Object(h.jsx)(c.a,{variant:"h6",color:"text.primary",...!!s&&{...s.valueProps},children:Object(h.jsx)("b",{children:e.value})})}),Object(h.jsx)(c.a,{align:"center",color:"text.primary",sx:{fontSize:10,mt:1},...!!s&&{...s.labelProps},children:e.label})]},e.value+e.label)))}):Object(h.jsx)(c.a,{...d,children:Object(l.l)(y,!0)})}},209:function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var i,r=n(0);function s(){return s=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)({}).hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},s.apply(null,arguments)}function a(e,t){let{title:n,titleId:a,...o}=e;return r.createElement("svg",s({xmlns:"http://www.w3.org/2000/svg",width:24,height:22.4,viewBox:"0 0 24 22.4",ref:t,"aria-labelledby":a},o),n?r.createElement("title",{id:a},n):null,i||(i=r.createElement("g",{id:"Raggruppa_6481","data-name":"Raggruppa 6481",transform:"translate(-0.813 -0.758)"},r.createElement("path",{id:"Poligono_5","data-name":"Poligono 5",d:"M9.315.854a.3.3,0,0,1,.569,0l2.068,6.2a.3.3,0,0,0,.19.19l6.2,2.068a.3.3,0,0,1,0,.569l-6.2,2.068a.3.3,0,0,0-.19.19l-2.068,6.2a.3.3,0,0,1-.569,0l-2.068-6.2a.3.3,0,0,0-.19-.19L.854,9.885a.3.3,0,0,1,0-.569l6.2-2.068a.3.3,0,0,0,.19-.19Z",transform:"translate(0.813 0.758)",fill:"currentColor"}),r.createElement("path",{id:"Poligono_6","data-name":"Poligono 6",d:"M5.315.854a.3.3,0,0,1,.569,0l1.068,3.2a.3.3,0,0,0,.19.19l3.2,1.068a.3.3,0,0,1,0,.569l-3.2,1.068a.3.3,0,0,0-.19.19l-1.068,3.2a.3.3,0,0,1-.569,0l-1.068-3.2a.3.3,0,0,0-.19-.19L.854,5.885a.3.3,0,0,1,0-.569l3.2-1.068a.3.3,0,0,0,.19-.19Z",transform:"translate(13.613 11.958)",fill:"currentColor"}))))}const o=r.forwardRef(a);n.p},210:function(e,t,n){"use strict";function i(e,t){return void 0===t&&(t=Object),t&&"function"===typeof t.freeze?t.freeze(e):e}var r=i({HTML:"text/html",isHTML:function(e){return e===r.HTML},XML_APPLICATION:"application/xml",XML_TEXT:"text/xml",XML_XHTML_APPLICATION:"application/xhtml+xml",XML_SVG_IMAGE:"image/svg+xml"}),s=i({HTML:"http://www.w3.org/1999/xhtml",isHTML:function(e){return e===s.HTML},SVG:"http://www.w3.org/2000/svg",XML:"http://www.w3.org/XML/1998/namespace",XMLNS:"http://www.w3.org/2000/xmlns/"});t.assign=function(e,t){if(null===e||"object"!==typeof e)throw new TypeError("target is not an object");for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e},t.find=function(e,t,n){if(void 0===n&&(n=Array.prototype),e&&"function"===typeof n.find)return n.find.call(e,t);for(var i=0;i<e.length;i++)if(Object.prototype.hasOwnProperty.call(e,i)){var r=e[i];if(t.call(void 0,r,i,e))return r}},t.freeze=i,t.MIME_TYPE=r,t.NAMESPACE=s},211:function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));var i,r,s=n(0);function a(){return a=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)({}).hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},a.apply(null,arguments)}function o(e,t){let{title:n,titleId:o,...c}=e;return s.createElement("svg",a({xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",width:24,height:24,viewBox:"0 0 24 24",ref:t,"aria-labelledby":o},c),n?s.createElement("title",{id:o},n):null,i||(i=s.createElement("defs",null,s.createElement("clipPath",{id:"clip-path"},s.createElement("rect",{id:"Rettangolo_2483","data-name":"Rettangolo 2483",width:24,height:20.877})))),r||(r=s.createElement("g",{id:"Raggruppa_6039","data-name":"Raggruppa 6039",transform:"translate(-528 -2795)"},s.createElement("rect",{id:"Rettangolo_2484","data-name":"Rettangolo 2484",width:24,height:24,transform:"translate(528 2795)",fill:"none"}),s.createElement("g",{id:"Raggruppa_6037","data-name":"Raggruppa 6037",transform:"translate(528 2796.562)"},s.createElement("g",{id:"Raggruppa_6037-2","data-name":"Raggruppa 6037",transform:"translate(0 0)",clipPath:"url(#clip-path)"},s.createElement("path",{id:"Tracciato_9180","data-name":"Tracciato 9180",d:"M17.815,4.589A2.553,2.553,0,1,0,13.8,3.213,10.48,10.48,0,0,0,2.571,10.208c-.246.721-.48,1.4,9.935,4.975,5.453,1.871,7.818,2.439,8.9,2.439.779,0,.881-.3.99-.614A10.5,10.5,0,0,0,17.815,4.589m-6.1,2.991a4.376,4.376,0,0,0-3.387,2.664A.783.783,0,1,1,6.9,9.586a5.918,5.918,0,0,1,4.7-3.569.783.783,0,0,1,.107,1.562m3.625-5.343h0a.977.977,0,0,1,.5-.568.99.99,0,1,1-.5.568",transform:"translate(0.111 0)"}),s.createElement("path",{id:"Tracciato_9181","data-name":"Tracciato 9181",d:"M12,20.082A109.064,109.064,0,0,1,.7,19.5a.783.783,0,0,1-.7-.859.8.8,0,0,1,.861-.7,107.533,107.533,0,0,0,22.27,0,.791.791,0,0,1,.861.7.783.783,0,0,1-.7.859,109.064,109.064,0,0,1-11.3.586",transform:"translate(0 0.796)"}))))))}const c=s.forwardRef(o);n.p},212:function(e,t,n){"use strict";n.d(t,"a",(function(){return Qe}));var i=n(0),r=n.n(i),s=n(79),a=n(5),o=n(275),c=n(20),l=n(35),d=n(55),u=n(269),h=n(699),p=n(692),m=n(718),g=n(111),f=n(37),b=n(1);const y=r.a.forwardRef((function(e,t){return Object(b.jsx)(p.a,{elevation:6,ref:t,variant:"filled",...e})}));function j(){const{config:e}=r.a.useContext(f.a),{t:t}=Object(s.a)(),{layoutState:n,showError:i}=r.a.useContext(d.a),a={"NOT-AUTHORIZED":t("Sessione utente non valida o scaduta"),"UPGRADE-NEEDED":t("Per utilizzare questa funzionalit\xe0 devi comprare il corso o un abbonamento"),"DUPLICATED[QUIZ]":t("Il quiz per la lezione \xe8 gi\xe0 stato sostenuto"),"DUPLICATED[EMAIL]":t("L'indirizzo email r
2isulta gi\xe0 utilizzato"),"DUPLICATED[EXT_PROFILES]":t("Utente gi\xe0 registrato"),"INVALID[CREDENTIALS]":t("Utente non trovato"),"INVALID[TOKEN]":t("Credenziali non valide"),"INVALID[USERNAME]":t("Campo 'username' non valido"),"INVALID[PASSWORD]":e.password_policy_txt,"INVALID[EMAIL]":t("Email non valida"),"INVALID-GC[SENDER]":t("Campo 'email' mittente non valido"),"INVALID-GC[RECIPIENT]":t("Campo 'email' destinatario non valido"),"INVALID-GC[TOKEN]":t("Codice non valido"),"MISSING[EMAIL]":t("Campo 'email' mancante"),"MISSING[FIRST_NAME]":t("Campo 'nome' mancante"),"MISSING[LAST_NAME]":t("Campo 'cognome' mancante"),"MISSING[SENDER]":t("Campo 'email' mancante"),"NOT-FOUND[TOKEN]":t("Il codice fornito non \xe8 stato trovato"),"NOT-FOUND[REFERRAL_ID]":t("L'utente che ti ha invitato non \xe8 stato trovato"),"Devi accettare le Privacy Policy per proseguire!":t("Devi accettare le Privacy Policy per proseguire!"),"activate-account":t("E-mail da verificare. Ti abbiamo inviato una mail per attivare il tuo account: controlla la tua casella e clicca sul pulsante \u201cAttiva\u201d"),"Si \xe8 verificato un errore durante il caricamento, si prega di riprovare.":t("Si \xe8 verificato un errore durante il caricamento, si prega di riprovare.")};return Object(b.jsx)(h.a,{open:!1!==n.error,autoHideDuration:6e3,onClose:()=>i(!1),children:Object(b.jsxs)(y,{onClose:()=>i(!1),severity:"error",children:[n.error&&n.error.error_message in a?a[n.error.error_message]:t("Ops! Qualcosa \xe8 andato storto..."),n.error&&n.error.action&&Object(b.jsx)(g.a,{mt:1,children:Object(b.jsx)(m.a,{onClick:n.error.action.onClick,sx:{mt:1},color:"secondary",variant:"contained",size:"small",children:Object(b.jsx)("b",{children:n.error.action.label})})})]})})}const _=r.a.forwardRef((function(e,t){return Object(b.jsx)(p.a,{elevation:6,ref:t,variant:"filled",...e})}));function v(){const{layoutState:e,showSuccess:t}=r.a.useContext(d.a);return Object(b.jsx)(h.a,{open:!1!==e.success,autoHideDuration:6e3,onClose:()=>t(!1),children:Object(b.jsx)(_,{onClose:()=>t(!1),severity:"success",children:e.success?e.success.message:""})})}var x=n(645),O=n(28),T=n(205),S=n(206),w=n(719),A=n(705),k=n(716),C=n(720),E=n(721),I=n(700),D=n(646),P=n(647),R=n(648),L=n(201),M=n.p+"static/media/youtube.deabf4eb.svg",
2N=n.p+"static/media/instagram.41f1ea4c.svg",B=n.p+"static/media/facebook.7aec6fb2.svg",U=n.p+"static/media/linkedin.4fbd71db.svg",F=n.p+"static/media/telegram.39b6a7f2.svg",z=n(218),q=n(219),H=n(14),V=n.n(H);const W=Object(x.a)(g.a)((e=>{let{theme:t}=e;return{backgroundColor:"#26292D",color:"#B1B8BE"}}));function G(e){const{t:t,i18n:n}=Object(s.a)(),i=r.a.useRef();return r.a.useEffect((()=>{window.Trustpilot&&i.current&&window.Trustpilot.loadFromElement(i.current,!0)}),[i]),Object(b.jsx)(W,{children:Object(b.jsx)(w.a,{maxWidth:!1,sx:{maxWidth:1700},children:Object(b.jsx)(A.a,{container:!0,justifyContent:"center",children:Object(b.jsx)(A.a,{item:!0,xs:10,sx:{py:5},children:Object(b.jsxs)(A.a,{container:!0,spacing:5,justifyContent:"space-between",children:[Object(b.jsxs)(A.a,{item:!0,xs:12,md:3,children:[Object(b.jsx)(g.a,{sx:{color:e=>e.palette.text.primary},children:Object(b.jsx)(k.a,{component:L.a,color:"inherit",viewBox:"0 0 346.1 61.3",sx:{fontSize:{xs:"1.6rem"},width:"auto"}})}),Object(b.jsxs)(C.a,{component:"h6",variant:"caption",sx:{mt:2},children:[Object(b.jsxs)(g.a,{componet:"span",sx:{display:{xs:"none",sm:"block"}},children:["Acad\xe8mia.tv s.r.l.",Object(b.jsx)("br",{}),"Via Riva di Trento, 11A",Object(b.jsx)("br",{}),"20139 - Milano (MI) - Italy",Object(b.jsx)("br",{}),"P.IVA: 11454950962",Object(b.jsx)("br",{}),Object(b.jsx)("br",{}),"\xa9 ",V()().year()," Copyright"]}),Object(b.jsxs)(g.a,{componet:"span",sx:{display:{sm:"none"}},children:["Acad\xe8mia.tv s.r.l. Via Riva di Trento, 11A",Object(b.jsx)("br",{}),"20139 - Milano (MI) - Italy P.IVA: 11454950962",Object(b.jsx)("br",{}),Object(b.jsx)("br",{}),"\xa9 ",V()().year()," Copyright"]})]})]}),Object(b.jsxs)(A.a,{item:!0,xs:6,md:3,children:[Object(b.jsx)(C.a,{variant:"h6",color:"textPrimary",sx:{mb:2},children:Object(b.jsx)("b",{children:"About"})}),Object(b.jsxs)(E.a,{children:[Object(b.jsx)(I.a,{disablePadding:!0,children:Object(b.jsx)(D.a,{sx:{px:0},onClick:()=>{Object(O.e)({event:"footer_nav",event_id:"09",event_trigger:"GAevent",event_detail:"terms"}),window.open(T.a[n.language.split("-")[0]],"_blank")},children:Object(b.jsx)(P.a,{children:Object(b.jsx)(C.a,{variant:"subtitle2",children:t("Termini e condizioni")})})})}),Object(b.jsx)(I.a,{disablePadding:!0,children:Object(b.jsx)(D.a,{sx:{px:0},onClick:()=>{Object(O.e)({event:"footer_nav",event_id:"09",event_trigger:"GAevent",event_detail:"privacy"}),window.open(S.a[n.language.split("-")[0]],"_blank")},children:Object(b.jsx)(P.a,{children:Object(b.jsx)(C.a,{variant:"subtitle2",children:t("Privacy policy")})})})}),Object(b.jsx)(I.a,{disablePadding:!0,children:Object(b.jsx)(D.a,{sx:{px:0},onClick:()=>{Object(O.e)({event:"footer_nav",event_id:"09",event_trigger:"GAevent",event_detail:"support"}),window.location="mailto:[email protected]"},children:Object(b.jsx)(P.a,{children:Object(b.jsx)(C.a,{variant:"subtitle2",children:t("Assistenza e supporto")})})})}),"it"===n.language&&Object(b.jsx)(I.a,{disablePadding:!0,children:Object(b.jsx)(D.a,{sx:{px:0},onClick:()=>{Object(O.e)({event:"footer_nav",event_id:"09",event_trigger:"GAevent",event_detail:"partnership"}),window.open("https://ac.academia.tv/business","_blank")},children:Object(b.jsx)(P.a,{children:Object(b.jsx)(C.a,{variant:"subtitle2",children:t("Partnership")})})})})]})]}),Object(b.jsxs)(A.a,{item:!0,xs:6,md:3,children:[Object(b.jsx)(C.a,{variant:"h6",color:"textPrimary",sx:{mb:2},children:Object(b.jsx)("b",{children:"Social"})}),Object(b.jsxs)(E.a,{children:[Object(b.jsx)(I.a,{disablePadding:!0,children:Object(b.jsxs)(D.a,{sx:{px:0},onClick:()=>{Object(O.e)({event:"footer_nav",event_id:"09",event_trigger:"GAevent",event_detail:"telegram"}),window.open("https://t.me/+0atHlu9OHyA4NGM0","_blank")},children:[Object(b.jsx)(R.a,{children:Object(b.jsx)("img",{src:F,width:"20"})}),Object(b.jsx)(P.a,{children:Object(b.jsx)(C.a,{variant:"subtitle2",children:"Telegram"})})]})}),Object(b.jsx)(I.a,{disablePadding:!0,children:Object(b.jsxs)(D.a,{sx:{px:0},onClick:()=>{Object(O.e)({event:"footer_nav",event_id:"09",event_trigger:"GAevent",event_detail:"instagram"}),window.open("https://www.instagram.com/academia_ita/","_blank")},children:[Object(b.jsx)(R.a,{children:Object(b.jsx)("img",{src:N})}),Object(b.jsx)(P.a,{children:Object(b.jsx)(C.a,{variant:"subtitle2",children:"Instagram"})})]})}),Object(b.jsx)(I.a,{disablePadding:!0,children:Object(b.jsxs)(D.a,{sx:{px:0},onClick:()=>{Object(O.e)({event:"footer_nav",event_id:"09",event_trigger:"GAevent",event_detail:"facebook"}),"it"===n.language&&window.open("https://www.facebook.com/IT.academia.tv","_blank"),"en"===n.language&&window.open("https://www.facebook.com/EN.academia.tv","_blank"),"es"===n.language&&window.open("https://www.facebook.com/ES.academia.tv","_blank")},children:[Object(b.jsx)(R.a,{children:Object(b.jsx)("img",{src:B})}),Object(b.jsx)(P.a,{children:Object(b.jsx)(C.a,{variant:"subtitle2",children:"Facebook"})})]})}),Object(b.jsx)(I.a,{disablePadding:!0,children:Object(b.jsxs)(D.a,{sx:{px:0},onClick:()=>{Object(O.e)({event:"footer_nav",event_id:"09",event_trigger:"GAevent",event_detail:"linkedin"}),window.open("https://www.linkedin.com/company/academiachefincamicia/","_blank")},children:[Object(b.jsx)(R.a,{children:Object(b.jsx)("img",{src:U})}),Object(b.jsx)(P.a,{children:Object(b.jsx)(C.a,{variant:"subtitle2",children:"Linkedin"})})]})}),Object(b.jsx)(I.a,{disablePadding:!0,children:Object(b.jsxs)(D.a,{sx:{px:0},onClick:()=>{Object(O.e)({event:"footer_nav",event_id:"09",event_trigger:"GAevent",event_detail:"youtube"}),window.open("https://www.youtube.com/channel/UCGHXbVQuk8T4N7O-_HKCf-g","_blank")},children:[Object(b.jsx)(R.a,{children:Object(b.jsx)("img",{src:M})}),Object(b.jsx)(P.a,{children:Object(b.jsx)(C.a,{variant:"subtitle2",children:"Youtube"})})]})})]})]}),Object(b.jsxs)(A.a,{item:!0,xs:12,md:3,children:[Object(b.jsx)(C.a,{variant:"h6",color:"textPrimary",sx:{mb:4},children:Object(b.jsx)("b",{children:"App"})}),Object(b.jsx)(g.a,{mb:2,children:Object(b.jsx)("img",{src:z.a,width:"150",style:{cursor:"pointer"},onClick:()=>{Object(O.e)({event:"footer_nav",event_id:"09",event_trigger:"GAevent",event_detail:"app_android"}),window.open("https://apps.apple.com/it/app/acad%C3%A8mia/id1502080183","_blank")}})}),Object(b.jsx)("img",{src:q.a,width:"160",style:{cursor:"pointer"},onClick:()=>{Object(O.e)({event:"footer_nav",event_id:"09",event_trigger:"GAevent",event_detail:"app_ios"}),window.open("https://play.google.com/store/apps/details?id=com.chefincamicia.academia","_blank")}})]})]})})})})})}var X=n(27),Y=n(724),K=n(717),Q=n(191),Z=n(208),J=n(202),$=n.n(J);const ee=Object(x.a)(g.a)((e=>{let{theme:t}=e;return{backgroundColor:"#E90133",color:"#fff"}}));function te(e){const{bannerType:t}=e,n=Object(a.i)(),{auth:i}=r.a.useContext(c.a),[o,d]=r.a.useState([]),{request:u,cancelToken:h}=r.a.useContext(l.a),[p,m]=r.a.useState({}),{t:f,i18n:y}=Object(s.a)(),j=new URLSearchParams(n.search).get("nodefcpn")||localStorage.getItem("nodefcpn");return r.a.useEffect((()=>{m(o.reduce(((e,t)=>({...e,[t.title]:!Boolean(sessionStorage.getItem(t.title))})),{}))}),[o]),r.a.useEffect((()=>{t&&(async()=>{const e=h.source(),n=await u("get","/v2/banners/".concat(t,"/top"),e.token);n&&d(n)})()}),[t,i]),Object(b.jsx)(r.a.Fragment,{children:o.map((e=>!Boolean(j)&&Object(b.jsx)(Y.a,{in:p[e.title],children:Object(b.jsx)(ee,{sx:{py:1,px:{xs:1,md:3},...Boolean(e.bg_color)&&{backgroundColor:e.bg_color},...Boolean(e.text_color)&&{color:e.text_color}},children:Object(b.jsxs)(A.a,{container:!0,spacing:1,children:[Object(b.jsx)(A.a,{item:!0,xs:9,md:7,sx:{display:"flex",alignItems:"center"},children:Object(b.jsxs)(g.a,{children:[Object(b.jsx)(C.a,{variant:"h6",component:"span",sx:{textShadow:"0 2px 3px rgba(0, 0, 0, 0.2)",textTransform:"uppercase",mr:2,display:{xs:"block",md:"inline"}},children:Object(b.jsx)("b",{children:e.title})}),Object(b.jsx)(C.a,{component:"span",sx:{textShadow:"0 0 2px rgba(0, 0, 0, 0.1)",fontSize:{xs:"0.8rem",md:"1rem"}},children:e.description}),Boolean(e.countdown_enabled)&&Object(b.jsx)(Z.a,{end:e.countdown_enabled,onEnded:()=>m((t=>(sessionStorage.setItem(e.title,1),{...t,[e.title]:!1}))),sx:{fontSize:{xs:"0.8rem",md:"1rem"},display:{fontWeight:"bold",xs:"block",md:"none"}}})]})}),Object(b.jsxs)(A.a,{item:!0,xs:5,sx:{textAlign:"right",display:{xs:"none",md:"block"}},children:[Boolean(e.countdown_enabled)&&Object(b.jsx)(Z.a,{component:"span",end:e.countdown_enabled,onEnded:()=>m((t=>(sessionStorage.setItem(e.title,1),{...t,[e.title]:!1}))),sx:{fontWeight:"bold"}}),Object(b.jsx)(Q.a,{color:"secondary",component:X.b,target:e.cta_target,to:{pathname:e.cta_url.split("?")[0],search:e.cta_url.split("?")[1]?e.cta_url.split("?")[1]:"",state:{from:n.pathname}},sx:{mx:2,...Boolean(e.button_bg_color)&&{backgroundColor:e.button_bg_color},...Boolean(e.button_text_color)&&{color:e.button_text_color}},children:e.cta_label}),Object(b.jsx)(K.a,{sx:{color:"#fff"},onClick:()=>{m((t=>(sessionStorage.setItem(e.title,1),{...t,[e.title]:!1})))},children:Object(b.jsx)($.a,{fontSize:"large"})})]}),Object(b.jsxs)(A.a,{item:!0,xs:3,sx:{textAlign:"right",display:{xs:"block",md:"none"}},children:[Object(b.jsx)(K.a,{sx:{color:"#fff",p:0},onClick:()=>{m((t=>(sessionStorage.setItem(e.title,1),{...t,[e.title]:!1})))},children:Object(b.jsx)($.a,{fontSize:"large"})}),Object(b.jsx)("br",{}),Object(b.jsx)("br",{}),Object(b.jsx)(Q.a,{color:"secondary",component:X.b,target:e.cta_target,to:{pathname:e.cta_url.split("?")[0],search:e.cta_url.split("?")[1]?e.cta_url.split("?")[1]:"",state:{from:n.pathname}},sx:{fontSize:10,padding:"8px 16px",...Boolean(e.button_bg_color)&&{backgroundColor:e.button_bg_color},...Boolean(e.button_text_color)&&{color:e.button_text_color}},children:Object(b.jsx)("b",{children:e.cta_label})})]})]})})},e.id)))})}var ne=n(223),ie=n(714),re=n(262),se=n.n(re),ae=n(195),oe=n(81),ce=n(732),le=n(733),de=n(707),ue=n(222),he=n(260),pe=n.n(he),me=n(226),ge=n(207);var fe=Object(ie.a)({appBar:{backgroundColor:"transparent",boxShadow:"none",transition:"background-color .5s ease, color .5s ease",color:"#fff",marginBottom:"-75px",position:"relative","& .MuiToolbar-regular":{justifyContent:"space-between",alignItems:"center",minHeight:"75px"}},appBarScrolled:{position:"fixed",backgroundColor:"#27292D",boxShadow:"0px 2px 4px -1px rgb(0 0 0 / 20%), 0px 4px 5px 0px rgb(0 0 0 / 14%), 0px 1px 10px 0px rgb(0 0 0 / 12%)","&.wellness":{backgroundColor:"#EFEDE5",color:"#27292D","& .variant":{color:"#27292D !important"}}},logo:{maxWidth:"221px",width:"100%"}})((function(e){const t=Object(a.h)(),{t:n,i18n:i}=Object(s.a)(),{currentCategory:o}=Object(oe.a)(),l=Object(a.i)(),{packageType:d,isWellness:u}=Object(ae.a)(),{classes:h,headerBg:p}=e,{auth:y}=r.a.useContext(c.a),{config:j}=r.a.useContext(f.a),_=Object(a.g)(l.pathname,{path:"/".concat(i.language,"/").concat(n("cerca"),"/:section?"),exact:!0}),[v,x]=r.a.useState(!1),[T,S]=r.a.useState(!1),w=r.a.useRef(),A=e=>{w.current&&document.documentElement.scrollTop>w.current.offsetTop?x(!0):x(!1)};return r.a.useEffect((()=>(window.addEventListener("scroll",A),()=>{window.removeEventListener("scroll",A)})),[]),Object(b.jsxs)(ce.a,{ref:w,className:se()(h.appBar,{[d.key]:!0,[h.appBarScrolled]:v}),style:{backgroundColor:p||""},children:[Object(b.jsxs)(le.a,{children:[Object(b.jsx)(K.a,{className:se()(h.menu),color:"inherit",size:"large",component:X.b,to:"/".concat(i.language,"/").concat(n("cerca")),sx:{display:{md:"none"}},children:Object(b.jsx)(k.a,{component:me.a,color:"inherit"})}),Object(b.jsxs)(g.a,{sx:{display:"flex",alignItems:"center",flexDirection:{xs:"column",md:"row"},"& img":{width:"100%",mr:{xs:0,md:2},maxWidth:{xs:171,md:221}},"& .MuiChip-root":{mt:1}},children:[Object(b.jsx)(k.a,{onClick:()=>t.push("/"+i.language),component:L.a,color:"inherit",viewBox:"0 0 346.1 61.3",sx:{fontSize:{md:"2.4rem",xs:"1.5rem"},width:"auto",cursor:"pointer"}}),Boolean(d)&&Object(b.jsx)(de.a,{color:d.key,size:"small",label:Object(b.jsx)("b",{children:d.fullTranslation}),component:X.b,to:"/".concat(i.language,"/").concat(d.translation),clickable:!0,sx:{textTransform:"uppercase",ml:1}}),!!_&&Object(b.jsx)(K.a,{component:X.b,to:"/".concat(i.language),color:"light",sx:{background:"#333639",ml:3,display:{xs:"none",md:"inline-flex"}},children:Object(b.jsx)(k.a,{component:ge.a})})]}),Object(b.jsxs)(g.a,{sx:{display:{xs:"none",md:"inline-flex"}},children:[!Boolean(e.hideSubButton)&&(!y.isAuthenticated||y.isAuthenticated&&y.user&&y.user.data&&!y.user.data.flag_active_subscription&&!u||y.isAuthenticated&&y.user&&y.user.data&&!y.user.data.flag_active_wellness_subscription&&u||y.isAuthenticated&&y.user&&y.user.data&&y.user.data.flag_active_wellness_subscription&&y.user.data.flag_active_subscription&&!y.user.data.flag_active_pro)&&Object(b.jsx)(m.a,{component:X.b,variant:"contained",color:"primary",size:"large",to:{pathname:"/".concat(i.language,"/paywall"),...!y.isAuthenticated||y.isAuthenticated&&y.user&&y.user.data&&(!y.user.data.flag_active_subscription||!y.user.data.flag_active_wellness_subscription)?{search:"from=".concat(d&&"horeca"!==d.key?d.key:"masterclass")}:{},state:{from:l.pathname}},onClick:e=>{Object(O.e)({event:"cta_click",event_id:"03",event_trigger:"GAevent",event_detail:"buy_".concat(d&&"horeca"!==d.key?d.key:"masterclass"),event_subdetail
2:e.target.innerText})},style:{color:"white !important"},children:y.user&&y.user.data&&y.user.data.flag_active_wellness_subscription&&y.user.data.flag_active_subscription&&!y.user.data.flag_active_pro?n("Scopri il piano PRO"):n("Inizia ora")}),!Boolean(e.hideSubButton)&&!u&&(!y.isAuthenticated||y.isAuthenticated&&y.user&&y.user.data&&!y.user.data.flag_active_subscription)&&Object(b.jsx)(m.a,{component:X.b,variant:"contained",size:"large",to:{pathname:Object(a.f)("/:lang/:courses/:courseSlug/:lessons/:lessonSlug",{lang:i.language,courses:n("corsi"),courseSlug:j.free_lesson_course_slug,lessons:n("lezioni"),lessonSlug:j.free_lesson_slug}),state:{from:l.pathname}},onClick:()=>{Object(O.e)({event:"free_lesson",event_id:"03",event_trigger:"GAevent",event_detail:"".concat(o," header")})},color:"secondary",sx:{ml:2},children:n("Guarda lezione gratuita")}),!Boolean(e.hideSubButton)&&u&&d&&(!y.isAuthenticated||y.isAuthenticated&&y.user&&y.user.data&&!y.user.data.flag_active_wellness_subscription)&&Object(b.jsx)(m.a,{component:X.b,variant:"contained",to:{pathname:Object(a.f)("/:lang/:package/:classSlug/:modules/:moduleSlug/:lessons/:chapterSlug",{lang:i.language,package:d.translation,classSlug:j.wellness_free_lesson_course_pkg_slug,modules:n("moduli"),moduleSlug:j.wellness_free_lesson_course_slug,lessons:n("lezioni"),chapterSlug:j.wellness_free_lesson_slug}),state:{from:l.pathname}},className:se()(h.button,"variant"),onClick:()=>{Object(O.e)({event:"free_lesson",event_id:"03",event_trigger:"GAevent",event_detail:"".concat(o," header")})},color:"secondary",sx:{ml:2},children:n("Guarda lezione gratuita")})]}),Object(b.jsx)(K.a,{color:"inherit",size:"large",className:"variant",onClick:()=>S(!0),sx:{display:{md:"none"}},children:Object(b.jsx)(pe.a,{})}),Object(b.jsxs)(g.a,{sx:{display:{xs:"none",md:"inline-flex"}},children:[Object(b.jsx)(m.a,{variant:"text",color:"white",component:X.b,to:"/".concat(i.language,"/").concat(n("cerca"),"/").concat(n("corsi"),"?p=1"),sx:{mr:2,textTransform:"capitalize"},activeStyle:{textDecoration:"underline"},className:"variant",children:n("corsi")}),j.recipes_enabled&&Object(b.jsx)(m.a,{variant:"text",color:"white",component:X.b,to:"/".concat(i.language,"/").concat(n("cerca"),"/").concat(n("ricette"),"?p=1"),sx:{mr:2,textTransform:"capitalize"},activeStyle:{textDecoration:"underline"},className:"variant",children:n("ricette")}),Object(b.jsx)(m.a,{variant:"text",color:"white",component:X.b,to:"/".concat(i.language,"/").concat(n("cerca"),"/").concat(n("tecniche"),"?p=1"),sx:{mr:2,textTransform:"capitalize"},activeStyle:{textDecoration:"underline"},className:"variant",children:n("tecniche")}),Object(b.jsx)(m.a,{variant:"text",color:"white",component:X.b,to:"/".concat(i.language,"/").concat(n("cerca")),activeStyle:{textDecoration:"underline"},sx:{mr:2,textTransform:"capitalize"},endIcon:Object(b.jsx)(k.a,{component:me.a,color:"inherit",sx:{fontSize:"1rem"}}),className:"variant",children:n("cerca")}),Object(b.jsx)(m.a,{variant:"text",color:"white",onClick:()=>S(!0),endIcon:Object(b.jsx)(pe.a,{}),className:"variant",children:n("Menu")})]})]}),Object(b.jsx)(ue.a,{open:T,setOpen:S})]})})),be=n(64),ye=n(196),je=n(200),_e=n(231);var ve=()=>{const{layoutState:e,toggleAuthDialog:t}=r.a.useContext(d.a);return Object(b.jsx)(ye.a,{maxWidth:"md",scroll:"body",fullScreen:je.isMobileOnly,open:e.openAuthDialog,handleClose:()=>{t(!1)},children:Object(b.jsx)(g.a,{sx:{minWidth:{lg:850}},children:Object(b.jsx)(_e.b,{})})})},xe=n(709),Oe=n(188),Te=n(204),Se=n(192),we=n(659),Ae=n(739),ke=n(697),Ce=n(688),Ee=n(740),Ie=n(649),De=n(729),Pe=n(555),Re=n(556),Le=n(29),Me=n(229),Ne=n.n(Me),Be=n(241),Ue=n.n(Be),Fe=n(242),ze=n.n(Fe),qe=n(281),He=n.n(qe);Object(Le.a)(we.a)((e=>{let{theme:t}=e;return{["&.".concat(Pe.a.alternativeLabel)]:{top:10,left:"calc(-50% + 16px)",right:"calc(50% + 16px)"},["&.".concat(Pe.a.active)]:{["& .".concat(Pe.a.line)]:{borderColor:"#e90134"}},["&.".concat(Pe.a.completed)]:{["& .".concat(Pe.a.line)]:{borderColor:"#e90134"}},["& .".concat(Pe.a.line)]:{borderColor:"#42474d",borderTopWidth:3,borderRadius:1}}}));const Ve=Object(Le.a)("div")((e=>{let{theme:t,ownerState:n}=e;return{color:"currentColor",width:"100%","& .QontoStepIcon-completedIcon":{color:"#fff !important",zIndex:1,fontSize:18},"& .QontoStepIcon-circle":{borderRadius:1.5,height:3,backgroundColor:"currentColor"},["& .".concat(Re.a.iconContainer)]:{paddingRight:0}}})),We=Object(Le.a)(Ae.a)((e=>{let{theme:t}=e;return{flexGrow:1,"&:first-of-type":{paddingLeft:0},"&:last-of-type":{paddingRight:0}}})),Ge=Object(Le.a)(ke.a)((e=>{let{theme:t}=e;return{width:"100%",color:"#535860","&.error":{color:t.palette.primary.main},"&.active":{color:"#fff","&.wellness":{color:"#E5E4DC"}},["& .".concat(Re.a.iconContainer)]:{width:"100%",paddingRight:0}}}));function Xe(e){const{active:t,completed:n,className:i}=e;return Object(b.jsx)(Ve,{ownerState:{active:t},className:i,children:Object(b.jsx)("div",{className:"QontoStepIcon-circle "+(n||t?"completed":"")}
2)})}const Ye=e=>{const{t:t}=Object(s.a)(),{auth:n,login:i}=r.a.useContext(c.a),{request:a,cancelToken:o}=r.a.useContext(l.a),{packageType:d,isHoreca:u}=Object(ae.a)(),[h,p]=r.a.useState({first_name:"",last_name:"",register_step:"user-data"});return Object(b.jsx)(A.a,{container:!0,justifyContent:"center",children:Object(b.jsx)(A.a,{item:!0,xs:12,sm:8,lg:6,sx:{textAlign:"center"},children:Object(b.jsxs)(g.a,{textAlign:"center",p:4,children:[Object(b.jsx)(C.a,{variant:"h5",color:"text.primary_".concat(d.key),gutterBottom:!0,children:Object(b.jsx)("b",{children:t("Certificato")})}),Object(b.jsxs)(C.a,{color:"text.secondary_".concat(d.key),children:[t("Per rilasciare il certificato di fine corso \xe8 necessario inserire o confermare il tuo nome e cognome"),"."]}),Object(b.jsx)(g.a,{mt:4,children:Object(b.jsx)(Ce.a,{fullWidth:!0,label:t("Nome"),value:h.first_name,InputProps:{sx:{color:e=>d&&!u?e.palette.text["primary_".concat(d.key)]:e.palette.text.primary}},onChange:e=>p({...h,first_name:e.target.value})})}),Object(b.jsx)(g.a,{mt:2,mb:4,children:Object(b.jsx)(Ce.a,{fullWidth:!0,label:t("Cognome"),value:h.last_name,InputProps:{sx:{color:e=>d&&!u?e.palette.text["primary_".concat(d.key)]:e.palette.text.primary}},onChange:e=>p({...h,last_name:e.target.value})})}),Object(b.jsx)(m.a,{variant:"contained",color:"primary",onClick:()=>{(async()=>
2{const t=o.source(),r=await a("put","/v2/user",t.token,h);r&&(i({token:n.user.token,data:r}),e.getTest())})()},children:t("Conferma")})]})})})};var Ke=()=>{const{t:e,i18n:t}=Object(s.a)(),n=Object(a.h)(),{packageType:i,isHoreca:o}=Object(ae.a)(),{courseSlug:c,lessonSlug:u,classSlug:h,moduleSlug:p,chapterSlug:f}=Object(a.j)(),{layoutState:y,toggleTest:j}=r.a.useContext(d.a),{request:_,cancelToken:v}=r.a.useContext(l.a),[x,T]=r.a.useState({}),[S,w]=r.a.useState(null),[k,L]=r.a.useState(0),[M,N]=r.a.useState(!1),[B,U]=r.a.useState(!1),[F,z]=r.a.useState(!1),q=i&&!o?{course_id:y.openTest.moduleId}:{lesson_id:y.openTest},H=async()=>{const e=v.source();let t=null;t=i&&!o?await _("get","/v2/course-packages/"+i.key+"/"+y.openTest.classId+"/items/"+y.openTest.moduleId+"/quiz",e.token):await _("get","/v2/lessons/"+y.openTest+"/quiz",e.token),t?(Object(O.a)("lesson_test_question",{...q,question_index:1}),U(!1),w(t)):U(!0)};return r.a.useEffect((()=>{Boolean(y.openTest)&&(Object(O.a)("lesson_test_start",{...q}),H())}),[y.openTest,i]),Object(b.jsxs)(ye.a,{maxWidth:"md",scroll:"body",fullScreen:je.isMobileOnly,open:Boolean(y.openTest),className:i&&!o?i.key:"",...F&&{hideTitle:!0},handleClose:()=>{j(!1),S&&(i&&!o?n.push(Object(a.f)("/:lang/:package/:classSlug/:modules/:moduleSlug/:lessons/:chapterSlug",{lang:t.language,package:i.translation,classSlug:h,modules:e("moduli"),moduleSlug:p,lessons:e("lezioni"),chapterSlug:f})):n.push(Object(a.f)("/:lang/:courses/:courseSlug/:lessons/:lessonSlug",{lang:t.language,courses:e(o?"horeca":"corsi"),courseSlug:c,lessons:e("lezioni"),lessonSlug:u})))},children:[F&&Object(b.jsx)(g.a,{sx:{p:1},children:Object(b.jsx)(K.a,{"aria-label":"close",onClick:()=>{z(!1)},size:"large",color:"light",children:Object(b.jsx)(He.a,{})})}),B&&Object(b.jsx)(Ye,{getTest:H}),S&&Object(b.jsx)(r.a.Fragment,{children:Object(b.jsxs)(g.a,{pb:{xs:3,sm:5},px:{xs:3,sm:5,md:10,lg:12},sx:{color:e=>i&&!o?e.palette.text["primary_".concat(i.key)]:e.palette.text.primary},children:[F?Object(b.jsx)(b.Fragment,{children:Object(b.jsx)(C.a,{variant:"caption",gutterBottom:!0,color:"text.primary_".concat(i.key),children:Object(b.jsxs)(xe.a,{t:e,children:["Risposte corrette ",{c:F.user_points},"/",{d:F.total_points}]})})}):Object(b.jsx)(b.Fragment,{children:i&&!o?Object(b.jsxs)(r.a.Fragment,{children:[Object(b.jsxs)(C.a,{variant:"caption",gutterBottom:!0,color:"text.primary_".concat(i.key),children:["TEST - ",e("Classe")+" "+S.quiz.course.package.title]}),Object(b.jsx)(C.a,{color:"text.secondary_".concat(i.key),gutterBottom:!0,children:Object(b.jsx)("b",{children:S.quiz.course.title})})]}):Object(b.jsxs)(r.a.Fragment,{children:[Object(b.jsxs)(C.a,{variant:"caption",gutterBottom:!0,sx:{color:"#555C64"},children:["TEST - ",e("Lezione")+" "+S.quiz.lesson.lesson_num]}),Object(b.jsx)(C.a,{color:"textSecondary",gutterBottom:!0,children:Object(b.jsx)("b",{children:S.quiz.lesson.title})})]})}),!Boolean(M)||F?Object(b.jsxs)(r.a.Fragment,{children:[Object(b.jsx)(g.a,{my:2,sx:{maxWidth:{xs:"100%",sm:"70%",lg:"60%"}},children:Object(b.jsx)(Ee.a,{activeStep:k,connector:Object(b.jsx)(r.a.Fragment,{}),children:S.quiz.questions.map(((e,t)=>{const n=e.answers.reduce(((e,t)=>e||!(!t.correct||!t.selected)),!1);return Object(b.jsx)(b.Fragment,{children:Object(b.jsxs)(We,{children:[F&&Object(b.jsx)(C.a,{variant:"caption",component:"div",align:"center",color:"primary",children:n||t>k?Object(b.jsx)(Ue.a,{fontSize:"inherit",sx:{color:"transparent"}}):Object(b.jsx)(Ue.a,{fontSize:"inherit"})}),Object(b.jsx)(Ge,{StepIconComponent:Xe,className:!n&&F&&t<=k?"error":k===t||t<=k?"active ".concat(i?i.key:""):""})]},"step"+e.id)})}))})}),Object(b.jsx)(Ne.a,{enableMouseEvents:!0,index:k,onChangeIndex:e=>{Object(O.a)("lesson_test_question",{...q,question_index:e+1}),L(e)},children:S.quiz.questions.map(((t,n)=>Object(b.jsxs)(g.a,{children:[Object(b.jsx)(C.a,{gutterBottom:!0,color:i&&!o?"text.secondary_".concat(i.key):"text.secondary",children:Object(b.jsx)("b",{children:e("DOMANDA")+" "+(n+1)})}),Object(b.jsx)(C.a,{variant:"h5",gutterBottom:!0,children:Object(b.jsx)("b",{children:t.text})}),Object(b.jsx)(E.a,{sx:{width:"100%"},children:t.answers.map((e=>{const t="checkbox-list-label-".concat(e.id);return Object(b.jsx)(b.Fragment,{children:Object(b.jsx)(I.a,{disablePadding:!0,children:Object(b.jsxs)(D.a,{role:void 0,onClick:()=>{var t,i;F||(t=e.id,i=n,T({...x,[i]:t}))},dense:!0,...F&&{sx:{pl:0}},children:[Object(b.jsx)(R.a,{children:Object(b.jsxs)(Ie.a,{direction:"row",alignItems:"center",spacing:1,sx:{},children:[F&&!e.correct&&e.selected&&Object(b.jsx)(Ue.a,{color:"primary"}),F&&(e.correct&&!e.selected||e.correct&&e.selected)&&Object(b.jsx)(ze.a,{sx:{color:e=>i&&"wellness"===i.key?"#289D00":e.palette.lightGreen.main}}),F&&!e.correct&&!e.selected&&Object(b.jsx)(g.a,{sx:{width:24}}),Object(b.jsx)(Te.a,{edge:"start",className:i&&!o?i.key:"",checked:Boolean(x[n])&&x[n]===e.id,tabIndex:-1,disableRipple:!0,inputProps:{"aria-labelledby":t},...!F&&{sx:{ml:0}}})]})}),Object(b.jsx)(P.a,{id:t,primaryTypographyProps:{variant:"body1"},children:e.text})]})},e.id)})}))})]},"question"+t.id)))}),Object(b.jsxs)(Ie.a,{direction:"row",justifyContent:"space-between",sx:{mt:3},children:[Object(b.jsx)("div",{children:k>0&&Object(b.jsx)(m.a,{variant:"contained",color:"darkGray",onClick:()=>{L(k-1)},children:e("Indietro")})}),Object(b.jsx)("div",{children:Object(b.jsx)(m.a,{variant:"contained",color:"primary",onClick:()=>{(async()=>{const e=k+1;if(e!==S.quiz.questions.length||M||M.test_passed)Object(O.a)("lesson_test_question",{...q,question_index:e+1}),e===S.quiz.questions.length?z(!1):L(e);else{const e=v.source(),t=await _("post",i&&!o?"/v2/course-packages/"+i.key+"/"+y.openTest.classId+"/items/"+y.openTest.moduleId+"/quiz":"/v2/quiz/"+S.quiz.id,e.token,{quiz_id:S.quiz.id,answers:S.quiz.questions.reduce(((e,t,n)=>
2(e.push({question_id:t.id,answer_id:x[n]}),e)),[])});t&&(w({...S,quiz:{...t.quiz}}),t.test_passed?Object(O.a)("lesson_test_completed_success",q):Object(O.a)("lesson_test_completed_failure",q),N(t),z(!1))}})()},disabled:!S.quiz.questions.reduce(((e,t,n)=>!(!e||!Boolean(x[n]))),!0)&&k===S.quiz.questions.length-1,children:e(F?"Avanti":"Conferma")})})]})]}):Object(b.jsx)(g.a,{mt:4,sx:{minWidth:{xs:"auto",sm:"400px",lg:"500px",xl:"650px"},color:e=>i&&!o?e.palette.text["primary_".concat(i.key)]:e.palette.text.primary},children:Object(b.jsx)(A.a,{container:!0,justifyContent:"center",children:Object(b.jsxs)(A.a,{item:!0,xs:12,sm:8,lg:6,sx:{textAlign:"center"},children:[!!M.certificate&&Object(b.jsx)(Se.a,{src:M.certificate.image_url,useSet:!0,sx:{width:76}}),Object(b.jsx)(C.a,{variant:"h4",color:"inherit",gutterBottom:!0,children:Object(b.jsxs)("b",{children:[M.test_passed?e("Complimenti"):e("Che peccato"),"!"]})}),!!M.certificate&&Object(b.jsxs)(b.Fragment,{children:[Object(b.jsxs)(C.a,{color:i&&!o?"text.secondary_".concat(i.key):"#F5F5F5",gutterBottom:!0,children:[e("Hai ottenuto il certificato del corso:"),Object(b.jsx)("br",{}),Object(b.jsx)("b",{children:M.quiz.course.title})]}),Object(b.jsx)(g.a,{sx:{my:2},children:Object(b.jsx)(m.a,{variant:"contained",component:De.a,href:M.certificate.pdf_url,onClick:()=>Object(O.a)("certificate_download",{course_id:M.course.id}),target:"_blank",rel:"noopener noreferrer",download:!0,color:"primary",children:e("Scarica il certificato")})})]}),Object(b.jsx)(C.a,{color:i&&!o?"text.secondary_".concat(i.key):"#F5F5F5",gutterBottom:!0,children:e("Hai risposto correttamente a")}),Object(b.jsx)(C.a,{variant:"h3",color:i&&!o?"text.secondary_".concat(i.key):"#F5F5F5",gutterBottom:!0,children:Object(b.jsxs)("b",{children:[M.user_points,"/",M.total_points]})}),!M.test_passed&&Object(b.jsxs)(Ie.a,{direction:"row",justifyContent:"center",spacing:2,sx:{mt:3},children:[Object(b.jsx)("div",{children:Object(b.jsx)(m.a,{variant:"contained",color:"darkGray",onClick:()=>{L(0),z({total_points:M.total_points,user_points:M.user_points})},sx:{p:"8px 17px",minWidth:135},children:e("Vedi risutalti")})}),Object(b.jsx)("div",{children:Object(b.jsx)(m.a,{variant:"contained",size:"small",color:"secondary",onClick:()=>{L(0),T({}),N(!1),z(!1)},sx:{p:"8px 17px",minWidth:130},children:e("Ripeti il test")})})]}),M.test_passed&&Object(b.jsx)(m.a,{variant:"contained",color:"darkGray",onClick:()=>{L(0),z({total_points:M.total_points,user_points:M.user_points})},sx:{p:"8px 17px",minWidth:130},children:e("Vedi risutalti")}),Boolean(S.lesson_next)&&Object(b.jsxs)(g.a,{my:5,sx:{backgroundColor:"#2F3337",borderRadius:"10px",padding:"13px"},children:[Object(b.jsxs)(A.a,{container:!0,justifyContent:"center",sx:{mb:2},children:[Object(b.jsx)(A.a,{item:!0,xs:5,children:Object(b.jsx)(Se.a,{src:Object(Oe.m)(S.lesson_next.img_cover),sx:{width:"100%",borderRadius:"10px"},useSet:{sizes:[["down","md","100vw"],["150px"]]}})}),Object(b.jsxs)(A.a,{item:!0,xs:7,sx:{pl:1},children:[Object(b.jsxs)(C.a,{component:"h6",align:"left",variant:"caption",color:"textSecondary",gutterBottom:!0,children:[e("Lezione")," ",S.lesson_next.lesson_num]}),Object(b.jsx)(C.a,{component:"h6",align:"left",variant:"caption",color:"textPrimary",gutterBottom:!0,children:Object(b.jsx)("b",{children:S.lesson_next.title})})]})]}),Object(b.jsx)(m.a,{variant:"contained",component:De.a,href:Object(a.f)("/:lang/:courses/:courseSlug/:lessons/:lessonSlug",{lang:t.language,courses:e(o?"horeca":"corsi"),courseSlug:c,lessons:e("lezioni"),lessonSlug:S.lesson_next.slug}),color:"primary",children:e("Prossima lezione")})]})]})})})]})})]})};function Qe(e){let{title:t,bg:n,color:i,lesson:h,homeSlogged:p,headerBg:m,hideSubButton:f,disableMaxWidth:y,loading:_,bannerType:x,children:O}=e;const{auth:T}=r.a.useContext(c.a),{t:S,i18n:A}=Object(s.a)(),k=Object(a.i)(),{request:C,cancelToken:E}=r.a.useContext(l.a),{showSuccess:I}=r.a.useContext(d.a),[D,P]=r.a.useState([]),R=new URLSearchParams(k.search),L="en"===A.language.split("-")[0]?"en-GB":A.language.split("-")[0];return r.a.useEffect((()=>
2{if(R.has("sconto")){(async e=>{const t=E.source();await C("post","/v2/renewal-campaigns/"+e,t.token)&&I({message:S("Credito applicato correttamente al tuo prossimo rinnovo! Puoi verificarlo dal men\xf9 > Profilo > Dati account > Pagamenti")})})(R.get("sconto"))}}),[T.isAuthenticated]),r.a.useEffect((()=>{Boolean(window.Android)||(async()=>{const e=E.source(),t=await C("get","/v2/metas",e.token,{path:k.pathname,query:k.search});t&&P(t.metas)})()}),[k]),Object(b.jsxs)(g.a,{bgcolor:n||"",color:i||"",overflow:"hidden",children:[!Boolean(window.Android)&&Object(b.jsxs)(u.a,{titleTemplate:"%s - Acad\xe8mia.tv",title:t,htmlAttributes:{lang:A.language.split("-")[0]},children:[D.map(((e,t)=>r.a.cloneElement(Object(o.a)(e,{replace:e=>{let{attribs:t,children:n}=e;if(t)return"application/ld+json"===t.type&&n&&n.length?Object(b.jsx)("script",{type:"application/ld+json",children:n[0].data}):void 0}}),{key:"meta-"+t}))),Object(b.jsx)("script",{type:"text/javascript",children:'\n var _iub = _iub || [];\n _iub.csConfiguration = {"siteId":1819621,"cookiePolicyId":'.concat({it:39756041,"en-GB":70243759,es:56970618}[L],',"lang":"').concat(L,'"}\n ')}),Object(b.jsx)("script",{type:"text/javascript",src:"https://embeds.iubenda.com/widgets/93c3b528-6db6-11ee-8bfc-5ad8d8c564c0.js"}),Object(b.jsx)("script",{type:"text/javascript",src:"//cdn.iubenda.com/cs/iubenda_cs.js",charset:"UTF-8",async:!0})]}),!Boolean(window.Android)&&Object(b.jsx)(te,{bannerType:x}),!Boolean(window.Android)&&!Boolean(h)&&!Boolean(p)&&Object(b.jsx)(fe,{hideSubButton:f,headerBg:m}),Object(b.jsxs)(w.a,{maxWidth:!1,sx:{pb:10,maxWidth:y?"100%":1700,minHeight:"100vh"},children:[O,(_||T.isAuthenticated&&T.user.data&&!T.user.data)&&Object(b.jsx)(be.a,{}
2),Object(b.jsx)(j,{}),Object(b.jsx)(v,{}),Object(b.jsx)(ve,{}),Object(b.jsx)(Ke,{}),Object(b.jsx)(ne.b,{})]}),!Boolean(window.Android)&&!Boolean(h)&&Object(b.jsx)(G,{})]})}},215:function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));var i,r,s=n(0);function a(){return a=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)({}).hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},a.apply(null,arguments)}function o(e,t){let{title:n,titleId:o,...c}=e;return s.createElement("svg",a({xmlns:"http://www.w3.org/2000/svg",width:29.044,height:29.043,viewBox:"0 0 29.044 29.043",ref:t,"aria-labelledby":o},c),n?s.createElement("title",{id:o},n):null,i||(i=s.createElement("defs",null,s.createElement("style",null,"\n .cls-1{fill:currentColor}\n "))),r||(r=s.createElement("g",{id:"Icon_feather-gift","data-name":"Icon feather-gift",transform:"translate(1 1)"},s.createElement("path",{id:"Tracciato_86","data-name":"Tracciato 86",className:"cls-1",d:"M27.635 32.521H6a1 1 0 0 1-1-1V18a1 1 0 0 1 2 0v12.521h19.635V18a1 1 0 0 1 2 0v13.521a1 1 0 0 1-1 1z",transform:"translate(-3.296 -4.479)"}),s.createElement("path",{id:"Tracciato_87","data-name":"Tracciato 87",className:"cls-1",d:"M3 9.5h27.044a1 1 0 0 1 1 1v6.761a1 1 0 0 1-1 1H3a1 1 0 0 1-1-1V10.5a1 1 0 0 1 1-1zm26.044 2H4v4.761h25.044z",transform:"translate(-3 -3.739)"}),s.createElement("path",{id:"Tracciato_88","data-name":"Tracciato 88",className:"cls-1",d:"M18 31.782a1 1 0 0 1-1-1V10.5a1 1 0 0 1 2 0v20.282a1 1 0 0 1-1 1z",transform:"translate(-4.478 -3.739)"}),s.createElement("path",{id:"Tracciato_89","data-name":"Tracciato 89",className:"cls-1",d:"M16.965 10.761H10.88a4.38 4.38 0 1 1 0-8.761c2.322 0 4.291 1.348 5.693 3.9a14.258 14.258 0 0 1 1.372 3.666 1 1 0 0 1-.981 1.2zM10.88 4a2.38 2.38 0 1 0 0 4.761h4.764C15.056 7.021 13.636 4 10.88 4z",transform:"translate(-3.443 -3)"}),s.createElement("path",{id:"Tracciato_90","data-name":"Tracciato 90",className:"cls-1",d:"M24.085 10.761H18a1 1 0 0 1-.981-1.2A14.258 14.258 0 0 1 18.391 5.9c1.4-2.55 3.372-3.9 5.693-3.9a4.38 4.38 0 1 1 0 8.761zm-4.764-2h4.764a2.38 2.38 0 1 0 0-4.761c-2.756 0-4.175 3.021-4.764 4.761z",transform:"translate(-4.478 -3)"}))))}const c=s.forwardRef(o);n.p},216:function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var i,r=n(0);function s(){return s=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)({}).hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},s.apply(null,arguments)}function a(e,t){let{title:n,titleId:a,...o}=e;return r.createElement("svg",s({xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",ref:t,"aria-labelledby":a},o),n?r.createElement("title",{id:a},n):null,i||(i=r.createElement("g",{id:"Raggruppa_5055","data-name":"Raggruppa 5055",transform:"translate(-41 -717)"},r.createElement("rect",{id:"Rettangolo_2145","data-name":"Rettangolo 2145",width:24,height:24,transform:"translate(41 717)",fill:"none"}),r.createElement("g",{id:"Raggruppa_5023","data-name":"Raggruppa 5023",transform:"translate(41 720)"},r.createElement("path",{id:"Tracciato_9012","data-name":"Tracciato 9012",d:"M20.161,85.737H9.6a.716.716,0,0,1,0-1.433H20.161a.716.716,0,0,1,0,1.433",transform:"translate(-2.519 -66.718)",fill:"currentColor"}),r.createElement("path",{id:"Tracciato_9013","data-name":"Tracciato 9013",d:"M19.952,59.755H3.964A3.968,3.968,0,0,0,0,63.719V71.36a3.968,3.968,0,0,0,3.964,3.964H19.952a3.942,3.942,0,0,0,2.1-.61,2.137,2.137,0,0,0,1.561-1.85,3.955,3.955,0,0,0,.3-1.5V63.719a3.969,3.969,0,0,0-3.964-3.964M14.061,67.87a.737.737,0,0,1-.092.1l-3.084,2.67a.716.716,0,1,1-.969-1.055l.032-.027,2.43-2.1-2.405-1.9a.716.716,0,0,1,.888-1.123l3.085,2.44a.716.716,0,0,1,.117,1",transform:"translate(0 -59.755)",fill:"currentColor"})))))}const o=r.forwardRef(a);n.p},217:function(e,t,n){"use strict";n.d(t,"a",(function(){return l}));var i,r,s,a=n(0);function o(){return o=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)({}).hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},o.apply(null,arguments)}function c(e,t){let{title:n,titleId:c,...l}=e;return a.createElement("svg",o({xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",width:24,height:24,viewBox:"0 0 24 24",ref:t,"aria-labelledby":c},l),n?a.createElement("title",{id:c},n):null,i||(i=a.createElement("defs",null,a.createElement("clipPath",{id:"clip-path"},a.createElement("rect",{id:"Rettangolo_1948","data-name":"Rettangolo 1948",width:16.794,height:24,fill:"
2currentColor"})))),a.createElement("g",{id:"Raggruppa_4961","data-name":"Raggruppa 4961",transform:"translate(-146 -330)",style:{mixBlendMode:"normal",isolation:"isolate"}},r||(r=a.createElement("g",{id:"Raggruppa_4432","data-name":"Raggruppa 4432",transform:"translate(150 330)"},a.createElement("g",{id:"Raggruppa_4432-2","data-name":"Raggruppa 4432",transform:"translate(0 0)",clipPath:"url(#clip-path)"},a.createElement("path",{id:"Tracciato_8964","data-name":"Tracciato 8964",d:"M16.48.136A.74.74,0,0,0,15.789.05C6.357,3.661,1.095,7.552.148,11.614A4.95,4.95,0,0,0,1.106,16l1.512,1.594A20.909,20.909,0,0,0,1.151,23.2a.74.74,0,0,0,.677.8l.062,0a.741.741,0,0,0,.737-.679,19.813,19.813,0,0,1,1.261-4.915,8.79,8.79,0,0,0,3.311.729,6.17,6.17,0,0,0,3.275-.92c5.938-3.63,6.307-16.895,6.32-17.457A.742.742,0,0,0,16.48.136M9.775,10.527a16.845,16.845,0,0,0-5.123,6.155.74.74,0,1,1-1.323-.665A18.285,18.285,0,0,1,8.9,9.33a.74.74,0,1,1,.871,1.2",transform:"translate(0 0)",fill:"currentColor"})))),s||(s=a.createElement("rect",{id:"Rettangolo_2108","data-name":"Rettangolo 2108",width:24,height:24,transform:"translate(146 330)",fill:"none"}))))}const l=a.forwardRef(c);n.p},218:function(e,t,n){"use strict";t.a="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAbYAAACQCAMAAABTVb7dAAAAV1BMVEVHcEz///+mpqacnJyjo6OlpaUAAACmpqafn5+lpaUgICAmJiahoaEICAj6+voyMjK7u7sSEhJQUFDo6OhBQUHMzMzy8vLb29uOjo5/f39wcHBeXl5nZ2frYYj4AAAACnRSTlMA////K27/zA6hvBmzCQAAEjxJREFUeNrsnYt2pCgQQKclk0lQEFBA1P//zgUERdGOkmw6puXs2Z3Z+ORaT4rKnz/z8fL3/V92jZ80/r3/fftzd7y8T0cX13j0mGC8v30MrVE9q+uyzK/xwFGWZV2zXgEnci8b1P4OQtbnr36g12s8dFgApRqkaZXbmxG1QjF6TdaPG5A1htuKiXsxjgioL/n6oWLHjKF7j2TNUFPwmp8fy82qyoVnYql1l6j95EFVJG/vF7UTCFyrFeXfhQ95Ufvx2Gg78ydfjF27qJ3Ao9Qx3L+3QEUWlzdyhpGDSU0aYWPXlJxCT/aa1dsobJeKPIuazLy4vV3CdqLReuum3UhwZbRO400Wzpk0OvKaj9MMNWhJkyApr9k4zWBaSw5+ZHFNxnlGqbXkgK25JuNcoduL9UjaazLOM+gQcWuPpLsm40Sj8diuqO1kruT7nz/akayvuTjR6B224sJ2ptHZCKDIiitsO1/gll3Yzoft7ZK2s43aYvst0obQk2EDvwEb5VX/FNTQ/4WN5ocrHGjdNw1oujz5pvJ2q+AlbZ+wmLI6uhBUc3EzA1epS0jInJ1f2NIG7LmZ/oO56RZbZvbfINFENQJn9MKWJmncTv3tkMygUosazjpWq0r/IdVClfWTLNF/NTYKbm4cy01rAZXDI0Dzx6sa6VuxUYI9tkNGBmoR80tHpZa3KbGNYJ6jhbeTRzJFIVrxihZukb4U3PgeKIT0ebFR7qEdFJhaY/NZUaSKovO6MzN+StWM3wBsjQ4WvHOzrDhXiOnbEv2XjnNvFmlndfV4nPaZi8pcqiijB6Od+dgw74djIeHcnVVyTp4AWzHK2i07hK3UZ8QGDTXCfwSOaS3d/8BkmFmtk4EyR3Hj1mh61M039sfBxaVEu6khhpNzjdedVONb9fux9bdpHFstp3rmqqUcoMLGA1IYWbDPB43jUnFpEGQeG69uWAgy3H+YeWjoiqoyh4PRURWSV+Y/c/WNtKhiWRQSDyIbYHt9CmylmKjhg2FvYyWjYeGUdvp6pKaIsspJLzByh8z2BU05d9g0mbosy0DaEDFClSOUaxnDbIjEcaNtJKqdPg1mQB9idhqhTl+qfkJpA4GwHQ2ZR6sop+2sk0tZYksJ9Uq55xTOFoLwXl7a2BQ2kkF9IqXaQX1qtLeZVPfYHmF+NFz9yaQNVRM1ftiDH5wPa3wyZs/OsRYD91MFGicAYx5rkCKjJEfOXtqySROWANi9DePzGKR0gU3MXv7JpC2wbCKlMgUq72+I3l2v2ogiEA2wTc6Pw4aciK2e2S2xaSV5E0XQZ+DJpE1Ohi01qwi7hhihE85SyaWFRLUiXFbWSYmxOSVpFC6ILw2IrOyZc2yvjXUkBfF9PZ5L2uBErflEkoOWxsqRARuHS1998nruSBuPM6JMTrHJAhvqnHYXvHw+aatHDdl8LuFgsltCo1CRtFkPkTSq7dg9JWmkLVtcU6OQtiGVirCZhh8NsUGFtYjPJW2do1al7Nsv6zoPPVJB7QWr+VPlxp2nS5ckUpKGroycXD7kyNgKNpv4qjPnlD6XtLXDYhlIWae0ToSffaTnrzLBGZ6CdtUYT5KNrgYVd6TNci9ddqxpjCdZjWFCJG1orGTQQlqgARsbL/jrsWEhAUtcpdSTOTr7tZ62wsVcTtw6bJetmZciBO7ZNquvM2cMBztZeWtn48MZNkVIP8Z4wClUgryV+4XYUFhygygK/qzHkXocm7VSkOoTjYMgoHfNZa2vpKlZOFpJ3hp9XaruepKvryYrluWUQoCHsNxkVWp9Zs4jl6Qxl0L6kZnLi9psVwMpZSYV9suw5cw0OSxWSj8oUxnhnJPsQF0Is5l+Tojx+FwAgSwdySV2Ymd06U2aYzi/J21WyPTVuFlybbxLIvTVK0yW2Mw6kSAgM07qkPk3X8lNSH1bIH4VNuSXsG1GJOxjiMoiyEzeMNnbL68T4xXFlK3yiRfnUkIXG3JI7mKbsvrY/bRzhSqgjlySUo6rBe5KrTtYlb8JG20DaHZSG0eubMn8J2Yu2D5wUGknXIiKqOBRShNdSzLmKan+OyctfG3B8MQdANOCTw1Ai/yHpaNrybPx5jXQCqBgrzkAy1IV2GZccgLGYxEr9F2zDsEGNL8FW86XaIwqa+qy5+IWD4z3vrk2WjCyiAjNLOjr4q93De/8yHsn2mNXbvNTiyOOY2vX2Nwf5Dmq4H4ytgbfjg9+9Tx5KDbU3JIGv7qwPRJbL9KwHSwtucaXYitxIjV57eh/HDYbxaYMcunIB2JjicJ2eSSPxIZkoqxd1B6JrU2jVl37ix+JDfEkavjyRh6KLa/SXP9zTYipQjIZyqajvwNbn0RNHO5Tk3NpB//2UI92RVAphCVgvyAnmaV5kYfffDSh392YaFbd5cjVp8eWpiMPNzycTOj3rpnAYlVZNPTc2GCaQ3L4revHhHtldaZ06n5sLE1HHn6iaQMI/kYNlQduMhZCBCYuDDtrpVSrVH4ebGlRGzisq+QnTk4eaEzbCdKabVdMjYvBOHgMtwDCzoMtbcnm8G4AFqwxiO/Skkj51EBh9mO5XwfqCyyCjSjnwwaSsPVpOlKKtLNT3RHp9xWEfi9t8TL0PB+27FuwoYFXNygt8k1xk8uRR/u7HLfJr3oWbEf9/yGmr5zWkt9k+5uNtVy/x7V9NiV5NPbizhepU3rSJA++8Y2hduEPP4tLcrCtxxA9YeYXiT6KH2i+0ltmeQzUx6A9mQS2FayKXdgQ1C7oR49j2uPQ46d9cwAgknRkPmZAl1rSFKn6pjFU2WwU5u38nWt7zLDH8JUN/mB19wXFJo2+7Vv9j7mQuabjK+0N2sVMVr5kdPnQfDwcmZZis1Y7ZeFOW77FF2Hr0lbbjukTMoqo28DfrMZXJgLOwRQqzKGwMaVJ+2BnMtneeFftMMT9PQOQqzCfiUk/QzAe3sl5hyTYhothItv9m+r3YyvTkluHtCTEk0XL1hJcEzY2ryETagUbnNdP403HlO9Ie9/DFhW0YVmuYFN43tiqXJYLYPDl2FBaIcmhtW3g/MhpmhbrPiO2LpqoJsIGo3Vdnt+32/d+9eA2tqkxVPjeLMJWV7N+ZKgTycVSB1YAEhe3D/iStApyWq6nULOKjcVvPLVncNhY/MB4Q55q/0ny8jg2lK1+0KJbYiPzNnJsdcfEvsKbA9jSIoBFr5YdUa8PeuVKpzyHTQ4OpySETNtFMJtjc74I18dM2f1ildskl5iwHG3NVJb5jVrmz1k/i8n1rQhommx8oKmpSvg8phOYfSff6grLrGnbZuwB0XwxtkSfJG4u8kGM4Y/vV3wahw0P++rM/hxYjm31eLxWIVRpdp/m40a5jUY3fWiWiFpzDewOHh8ABNt5fK2G7ellVEZNlivEt7GfsBzy1EEkj5U9DdGaL76+L8JWphaS725TImcZQJfnIuuZ+qArsu8r4glP2KbF6XFhZsNFAnNFJ0hfrsV6cdzmV3UDnUiLRYpo8jgmDdgNN6wm2+23Uu5RkwewwcQyyRsu9nFjizkZfMlZH8ER26xlDXPcKjrHFnogvqIar78onWcTbBtDEq+rxdhcOnPW3hll83Xe0fqi5Sc6E3532p7qmyN1kqml5Pc9tKXPU6H5Bzkr2BuxcbrmCbIZtrm68X7c1i9hbVeWt3G26HEZYwNr9Wm5nH0iK2W+bM2QuS0Wzddia5OxYbLjCyqXb+KsRraGbZ6spDI8l63qQwRmIhnbrhKsgBPzX2wXY5OrEgJm77LyzINgydWotPpabBTf0sF9XEqjokoEEpWjeGzV+hdFUIBtqQ5dLH+n1AE21cr+5vYeNrhe9lLPHjNu9eW+M7BuJsovxZa4drOzoMcRCSpuUBetkHtsSz2Si+DrZes39F7ovSVA05xjWXYXfnERtn69fMK5Uy6lGn1qyBUcLR8F7V2kPISt/oS4fVidTEVketzLVyjCtnxa9/UObWjYxuqZ2lknAftFvwe1jS3bWGAi4YGxhhhCbdzDxdhr3I7tb+OfwNbt0pHzMK1YuhZe+y9dPO8n5pvm/s7/jwVfB18q6IE4ObMRNr5RiavCECDG1n2y/v7YblKVTq36IAjwLXsLEIxIJfosCdz4uusAT7uhLIp9QSSCUyy3vUzqnhpu5CbUBrb2k4uUx7DlIhnbR/qa7Sq23MLmI6UQW3RH51/v30Y+5jvGZb8IG15rLGoa0oQfXIxNfSu2xCXu2NU9mPEsU6RtE9uBhSS50PARNnFf2pofIW225dj/UlNy32xme7GVAbb/2rvWdVVZINzCau0QRNE8YPd/nZ8imMDg6Wu3s4fpZ5mH1xnm8A7TeIzkFtKsdsKaBSMZe5Kc80YySaMa+ETi1bDtVbcSr3w+HolN2MoYRj3Bc65Hu4OVZK2uq12SeqrxPpck2U0l2grbvtVteSCbWptyW0rTvaApTHVQ1iyfxm1OLbv2aCFlUuKZ19QLW+1xfww4vQHA22DTmeuN/K0lLwCrrQALZkljWkkNG4GXrfsUNmc5rTxNySxPernPwOY1khx22XVCCXtgU+G2eBtsexLKy60z4nn31PiovKROJGrYrP4ravBTOcg+ooWvbKtUFRzLk5ra5MCmqBr2YtsaLrALW1b9vwbp7bDtKLstriY09fWP6m9aK5XcgKa7MWIJU910RO4OltMlM8AmYIuK56aS75AK63hE+GCDilL9NT6k4L8A2/Ye7mV/VtkMaFSfspKVBVsOVuGYGQI2LuMBym2N/Tat17RgL2zm9emnWhqOGABbAXLFiCeceAVsV/LypnvhL4XFyVQRn9XtSQmU6s0S71bknrduuQ2q22idyh/UwtNuuXHTmtr4kMn/aiKdVl+oagHlxPlqJvce2DYGbyvW3ftMJsW4vydsPyMTMdPMKT1ze4QtebK5RnJbNJe0M+c/x2ODWwYWiIw8QULsIulTKSHYdFV8UvlXb9aajVx2bXFdbMAtWZECVAVSeFSfUYbRxRe5d3jEWcwKUdlBuTqiHPjBRRwX7ciJg2mbT75F3v1pv689Znysmk4mLenGclJgrGj7z8lzPf0kw3IEtfmGQLCN287dW8kBythoM7K/BBtM8dtXZnu+sDCBmSry5FD01FkSdUSZl0CeXsE2bJGelGU+6cR+LEb73Z/KgDGBbmHcUqf/UWMsZPrI0uVkgqXdbHwr8r6loCq3dKzvnAPgbpjcX3OZ7NpnQDvgxayXGRnJLWcH9AkNWFcAgIv0JrZ4bjGAYMIpTYEy3COHjpzQyeGKPAMpVfmq3rCdsNlE6KrmfaRciLRcxd6G/K5q3l8psylsDlG8dEJgMXLuV1CRqNfwI+wrVNQw5i4rHIaNsvs8B/31sPV9Q+NOAtWUJoObJ084X8eQjOajO+1LtkYqObPGRLCrC9tVGC90NZtiyyAGUHK3X/4Jweu55GFUWp0bBnXmx8PscU6Zo5XNUvtn3GAhSRdl+rBjRl7Lb6p6Xd+PKpB6E3TaMPUpkEkFgPLRUCapsa/ZpHAT1+ODqRZ3E2FNZRPOWuyqJXJp35QWEwSSuzBP9eMlZBmnzGv2+kYp6KSce06UMYbXXkLWDuJ90eLhe07twk0sUJqmkZ1VMKrbWRt1v0HNqleIFnVaVdIlqe7Id0VZIeq6bqzT0kKO9kmJYPbUB3X98CnZcBiSw0beAtuVvnsshQkbhe/TISVsmW11zbAsB+CFe6Pw49j3PDYf9tIp9++Gzbfs7ttb40jyxbCJAFuA7TNhI8FIHkho0LZDCv9ebft+I/kbjOTxtO3Uw1YEbTuQtAo2FGA7kjwQup1ON4T4Ma634G33md+fH3P5o2+erNlo2L5qpMnXz/irEbqcTheExDXIYSSLJGxnhJrwMI4juIPtLGEj4WEcRxhB6HQ6/elcyTBl7Whhm4wAwuJ2KEfy0sPW+SRRGEV5GI+EyKVNLm4HCbiDXK9CZiR76SK3Jkw0P4gfiZSN7NSNBHU7irQdbIOySXUjYaj5ESSORmUbVjcRzOQBTGQ9rmzKmURtwO3ThQo0UbbBTCIecPt01IiJmkyVBH378IitC7T7ks1Uzj1uIvglnytMovbnBOAWhTjgU4UTV9eknezXN9IUIc/1gfaR1wjSNYlb708iEj2CqfwsT4SJCHW6Rs4nWM43NCAnWl6wOI5xkH8m3eNnrOBtE0lQ0M2HWqdwCrgeO2LspRrkHwghvZYtgTZo3OX3FwX5JPm9XRzQ/gOG4dSpShwzawAAAABJRU5ErkJggg=="},219:function(e,t,n){"use strict";t.a="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAeMAAACQCAMAAAAMaPPRAAABHVBMVEVHcEyVlZWampqfn5+LioWKioqfn5+ioqKdnZ2RkZGXl5eenp6Xl5f///8AAACmpqYEBAQA8HYICAiLi4t7e3sA4P8Ay/8AxP8A1f8A0P8PDw7x8fH7N0UA2//yMUoVFRX6+vrp6ena2tqUlJTnKk//yQD/zwAgICA/Pz9PT0+dnZ0uLi5lZWXi4uI0NDT/1wB2dnbJycn/xAC+vr4G53eysrIAOkXT09NWVlYoKChvb29GRkaIiIhdXV0R2HcA1/Y8PDz+vgB+fn44ODjRL1KDg4MAxvaRkZEA1r4BzdMpBw0KLB5DKQ2lHzMbf0wfs2hyFiI8r9D+hxvPrQ9Wm71uiKySjXycgxQSTzCM1TRpVwuIcwR+1ToagpSc1SsHDiYxAAAADXRSTlMAJHy28hLJ2/HxQJtWDeRqhAAAGAlJREFUeNrsnQtzm9YSxxNnEnfSAEdItR1IykNjI/GQjTEXCSFfWRrX7bgTzzRzJ3HT5vt/jHtewEFC6FFJBQ2bdiwBArQ//rt7HqAXL1J7/fLo1bEp1FZxO3519PL1izx7ffTmh9o/h2JvjnIovz1Gq8x2s7aqWxvH4uN3M5Rf/4gW33ctQxJrq7ZJhtWdIJw/ZiC/fgMXNXt8bYdiVoSk/DJF/BIiNrtS7ZkDMnFoZiAjxFbtlgOzAYT8JkYMc3G7RnyAkB9gTqYVNWwy1YgPVclv40jdr/1xkNal0fqdIDzU5dZhmgSr63eQ8StBGNbeOFDrCMIr2G46FkxQO+NADbRR++mtIIxqXxysjVDVdSQIvdoVh1taC8IRTMemUbviYM0wYUI+FtpK7YqDNeUBtp5+qBkfdOupKRzXjGvGtdWMa6sZ11Yzrq1mnG9AXKn7FYCSnljNeNDBNrbYE1PgAjo8NpgIvt/uirSVT7buTGe6cqzQFATzqpc6HW1psO+m6O+ULFTobjq95Kh0cwn+VeZPj1jmoMYVPDFzJCUfH7Af6pWcMXh8fFTEPZ2XyVFTg8kgRmRznIy9JEUqWesRD7bTrUfJGKk49uhWnDuMz/sKfShB3oQ7RH8djmvBP914N5zsExoAvo4QK/i3n3d6yFrpcjGkhwym+CDwlQCYD+nlZvz4dAvt6SvYL2NommBkGUu+mqzrZhhDyh7dWBFkZqmgpIzVyVLGcMfhBoxBOzkxuV89xtLft8SeHsGeGMvIsNN0K8P4Hq0MBN9BgpEo42RrDytZ8bCnnSBwMGvHSBhz3HQxYzXejTwsZow3xHaVLLbxifm+A3egKZVj/PfpbxTy7afHvTB2ptA6IxMhCgyGsRhADw6h64wHqiLI2OnC3De0deh8pEARSV2+nyqiqPRaGkIvpox9sIixHKIMO0SXmFfMOJjPx5KH9AuPo1zBo/tVYyz+cppCvv0k7oFx7A/DhQ5zpZSxAj1nk3We7I0JY518AwPi1KBXo1T9qPZyYmcTxlx3IeMOBEvjiFHI2EWXAP6XRGp08CZ5Lchuv2qMHyFjAvkG/tt9Wmb9YUB5qN2UsQU9R6cmTXsin2GMIVr8AFLTp0yBjfTdoavha80oYIxrYBlfCEsYzzYG4IdC8rLXESuXj/+DGEPINxgytKfHvTHmDRr5Yh2jt5lIAhkH9BsMVXQBhNC5maktKFO2KWP0v7mEsSFjqOsxNhwacBKrIGOkZIQYUd5tWs76A7JQlTQfu/CtPxQzjGMdI5g9HmZsNxNpUA7XKeMBSpvTYsYteAhjXcaSj+r6rlhtxkjJRMc3N43bT/tibKnYxZQxCEmjtwvmdQxQUBZRxg6zjXubJFjE2BBh3nTEIsb28porhzEgja+gL1aaMYac2O7SctYfqJi5T9tOYkSavvpDL9WxZUDrehgKRKKOZ+IoqbQwYx71VLRyGat6AE1XUVlfzFiLb+W2meWhhk/MaXeqzPj0t4Rw46bR2FVazvgDKDrOpkk/Fz/UaN9GBGb6QHDU7sMNZ27tkVQsbcJYhFA1qbAPRB6s2gciZHpPdbrUrGTNdZKF3MCMGztKyzM6nmXMS7bgEA+LM4xdKOBljPmpjMu2AsacPtyEMS/2BYLZl6qr41TJCWWw51hNxC2NMOVmhrGK7+lBsXqaTZWZWI0VDAvvnHw8GUGzBaTk4ppL831fQP+Fcz4dBhhy9RifnGQgNyhhZE9fxd0ynqoYUIYx6q+cyKT8baP+Zdu2R0PyPRR1tuZCcFUjZYyumkCJ5hhr9NLoanjsYr2aKxWz7eDyfo5xUHrGJxnIGDOx7beWs4yjTNuJsQeiTqZ9TFTrzroTZeC47YT7P/qowXy/kDEQcEfJhowBanuhvjiVZSwUf6gMjE8zSmZkjClvOS1nGFsy2wcCeq0gvgOvT1zJtI9pfZt2d6YLHljGvI+aRwsZ8xOc0tdjbIVuvNEU9bXwvBv3kyNzybcou44ZJTdmbLutZZaxgvo8hglj1AXVnmOc0THucXIYyaO+TdyaShn3yDDgIsYo4w7WYwwcNYFIGaNAEZ/YYD6BlI8xskTJv2Z1TNIy2AFjsePFVSqN1RC5TPs/2qTrek7HSIZcMKbnAzp63H2ZMsZl10LGaBRDl9bUMaq2QzE5fp90iQqkdxMPSlnlZ1ys5G2mZTS2OB6PO/3IxWOLCs/EajRs2IL8FBO9knJ0jPMpJ5u4kWvh2QLp2CJljLpE5+tqe4wOe+8QHbKMJ2NqBimfxsx7emFotLCX4mIQZwQ8xcEQ5nrZy6pjNic35m1raTkz0YJzM3MEwAOeqOFh+ni+xbyOecXHTSnd8xwclN0BP8OY78pcQfsYDzKzjBN7WDQPBLT
2w5ALXQz00Kp460MMvAy9Aa7QeX4lYzSo5B3JjS2PLrBPlaHauTzqlhpuAfMa80lSZuT4mM/RI9wZEoYgxnjO0HmNevEqOSXvgwNhJtnM6PF8NHbM5OQ/ydlrLD2QajabpbjOZ2TiSZVpI2YFMtEwK7EiW3fnnmXQ8Dbtc1bx+XCmEcKfpvA0d7hC9CMiEnWE8e0dz3JAggm/Q7K+xzFiUnN7sXB94meDgwslJgc1bHul31bx/R8XrMH5/sqKSt5KWDYvYwGDYKXABvX6UTti8H1lSsvUgp94Dg2HYbF51B2JmFyBzFFzyWniOr2TFlhzVImtEizElPb34fXpIaWpHUXJieJHVnzRbfUvky8/4/cpKhmm5LE8JAjvYB9j9If81xqsreUed2LXtnjGr5JNiJUPKX8XavRVk/H5eyAuV3Lh9eqz9W0HGa+TkUqXlmvEajNfJydtrLde2J8ZnGygZUn6si6/KMKaIc5VcEK4bN3Varg7jsw2V3GjUabkyjDdTMrTnz3/WabkijDdU8vfz8/PPv9e+rkas3kjJz+fX5+cX519+r4uvKug4R8mny5T8/RoihnZx/aUO2JWI1TNKPj1ZpuTn62sM+eL84uLzn5sXX8DojMJJFE3CUad+SO9uGP/37CxXyafFSv5+TWWMIV9smpYl25VVOv6uqrI7quP+7hjP5+RCJf91TWVMEF9cXn5ZnzIYNx1uxpz73t4xDx1s6/2AjudkTQ/8Zp8d7AY2WWGVSMezSj4tyMnf7xLGGDGifP5lzYBt+DKXY3J735DpVCB7rQ/pOaeuaj5DtEUW9koVq1fOyX8RxFTHRMhQymulZYne7pljeneviMHWGKMrtJkUFVclYvxxkZIX5eTnu7vruzkdQ8iXq6dlxVe5haa1qqljjpkoWi7GZzHlwpz8y6+piu8YHVPIGDG0FQO25WZCnB4EusZCv6+qjlEY6pVax6vk5Oe7WMZMzZUwvvy8CuQe4yE37BkKNKMXpuCj6uqY44JB2Rh//Hj2caGST+eUjFSco+OU8rcVqq0gicp+PDcZPccWdEgZpgpiVXTcTcw2gzgSkVsay8Q4K+QlOfn5jjCeyceJjC8vL5YKWXHTZwPM1NDiGK3bc2X9TxizZ6qM4idd9Eun40IlZ3MyUfFdXl2dUF5Wd4Fmcp/EPEugCLKw375RsC3G6VND8MM+Sxqrl+Xk6A9Wxtm6+nJVxt24X8sW812+7+7v7THGT4rj6J09JdPxijn5fx8+/HGXn48vk3B9sQSRoseIS9IluEUdkwcg0H2VNlYX5eTo5w8x5DQfX8wKeVnNZVMZt0szWrVNxj3Sd2eWUcfLcjIEDVX8gUJmY/V5VsbL2k6A1tR6aRBvVccK+XpeuWN1fk6GgfrnDwzkBfn44tuyqnpE660S/fb2NhmTG9zxg2lKqONiJccqppDZWJ3W1SsMMQLabvI2kjFY9mswSzfIuTNtoY4L97UpYyBu7edl/kmszlNyomICOU/HK00VsGgTcv3f3pY6YdMUzGY4XnQUy45MQWi3uou+tNGftM2Hq6G0XMfK8KpptqNwCtaM1XpBrIZfoS34ghnZFlh+NYNlF+wajH9aQcmMihnImbr6+tsq0uyTiktb91pWJhozZJHzrcS+zvySiJEjVysZBtFCiR+6ruu5fi5joLSTYU+9L26p5pLCdLRcjX/RxtKxeTPfqK9h87bE+KcE8mIlZ1ScQmbq6usV5whEtKhek3Dk/L+9q/9NHDnDXKJsqt2FGZlUutpXbAMrgwMIFyFjCCpHQKg5RUrb7U/V/f//Rj2eD8+XiQ0mZX1+c3e6zRow88zzfvsdqZNA+l5wHQh1LAtEMsn542SawRD7Ba4OY/vAlz1jOApg7GfFTnAUirVmMiphhv801Dmmzr4sjDke65kcs1jG+Jd/iTzOXVSc429YrOciUgsAgfDFjLlarxdXbSBVqx2QibHyac46fw6kmZUDeVJLzStOsQmMhQPubcri8VEmYxZ3NCATiL8VaA4IM27e1AnRkitdjafLDVqx57oiNDcXDY6sjEq1ivGz+mnCZJBjGA+IugnkXCZsa8rlzgji0b/o//kVgUQbzFul8fgdJiMWKzxOQMYY//rfAsaVzPqOZFupRQAf5TPR4+Oyhgsjo863VNKnOTCOxromnkUejCGb/jOUahJwrW8aidLMGFAdN8crEeNjTP7L9z5CWAsygvjXYs16ZNC8fPd6jANEZDNghtF/WD74oayu4YGZabBfTg8zuifY2CzqzDeteXu6bM+sbIwhVQnWbL9eLH2CuPuYgfGClhYX6z1zCTBeHMYG/Q5dsF1O0xtApwd66pKQLfneEM5iPD7C5P9
20Or/QHxnkb9/+9u+CT0k4WowzeBwaqd7Ch2ih9aIVPDo/65Eu7ZOZ3IsxodsgxPfGdskMu9vwMczEeEm3C6l6UjPgZ2DspJLetidjDJe4Lt7GNg16s2bql/SUaDLIdgPO0NV/FpjM0fh7n8KrY3LxZ9rIpo1y8RjlO6mmnqXbgjYKYW1tEsDGqZNl0FluSz5eoyuMXuNnYGwT3s6FM9qaymj0Y30gIVEfgs9lLoDb3LbkG0DWaIP3bDqn85ncm10uj/8qMDklcuxudTCRNTB33oo/HtHVqj6YjTHxR8c884mfgiOwRVN11c055/sQWgidB5TaMsZkO3DD/QxS7Z7lxTjM6Nkzor2h5sPiDzLILtpItat3e9qK6mreJmMuI5RjFncSfBOLLELceX05YWQV+T6DXDyOdTXEa2kNdEnvsZ1GpL4u3ZTMo900NfbBc7UY++KnGc97iqU82jYDYzddcV0uE9oRGQSHy29ulO5SelgkUUyuWTrGnE3+mSrs2BZ3KMiyTX59OSntShCRghFob0UJqc+10ae3AxZhGvjSsXgBOSoqGXHbU04zTsMTGeMx/2mQDFDUlru1GDs+96SEivGkF7oumug4GxkbbKEf04yHSxTAwKHTO0vHmLfJGOSExUxZCzTevZ1YGiRrH+Sie+x27uUwSCDyCB8xoRziwsz4jKlly9a9g4Sxl2pJGPGJKXe+NrQYd5mEAVgKboasqxczhz/7Gd/gIC2p012E7YyzugDGvE3+Gf2LIRZRxkj3305+TnGAv5oTHb9sTPUvcUDlyyP8Nm02uVbeBOaYTir3ulp7GukwXrDw9hlw/d7uNjIy/GrPpj+2KSo2KGIcBdoYfcX5FwEfJoTGJTAW4+QUYh5l9E8/NsQnC+30Od56+cjUK8kGyF+YrAqgfFSTFISEJj4/Vw1+DB3GBJbFmqOcNRuZ+fPVWTzeZNjvFW/BVmnS08nxPNBJGPNxMg+xwOPX8+YGHDR+siKA8gmO04MDNFsFUOWvLglRADaeJq7pync0GG/JzXEI957NInWnDB5Psh7uwhhHDvO6iGkJ4aUwTm3y952IMMV593ZmhZukdeiZ0fprSEBrMx5nYzzKwDigPCbLe8iD8VTKNYZ7Lyt2KMRjlj1zA386Gm1BaAkYk02NvC585IkzbV2Mx9QmIxb3O32Zyf23l9aZQt1c50jpaZ+mBAlUMusjlwbIK30ThzGmm4MkoOeyJ6/T1WuxNDWwC/eB6HlMzqpp+hM6pvsZODzG2E1xljzaF9PVmMf/3In4YiafZYhlj1fNdcmxa+KX9fS1yNTTIpzv6TdBwLroxtoqoITxJAV47Ec5kjk5eeyrVfOhgDHR0AH09GFCuRgjmBNFndCYR/r1pZRWSkrkZuAdrxajhD1dfyD5rIBpaFJ0kg/DWzvUIlA9OdQ1K0gYQ4sW8NfvzSYpxGNXrSM9CbqaxvMr/GvLuyzGiMUUXw5iZIjLaTYzWMlAO0bBC/jkpGHpdNdzmrCmEIrKmqQKk/zgiM9rsvUJtTmQuS4SM+wzeWyq6VAS21GMWwbeBmGYn8bn8Pg7grgvmuPd20urNFlRh6OreRqGtWWRM5N84U9CnQBn/5aangm4b6Z5Z9vSJKqeHC3GIyVfjTgWrs/jsYqxAUSfi06WcHIHTmdhjFlMmIyBLscQczucxSZzMbkAPZ/+VZfQbkXdFZMrKzW53gkCId/9A4mmJs70E+2tgWlfSEbdibgC+Pg4ci3aksA7yx6ncQLdNo6MMd+b0LUvizFmMYM5Qbj0SXoPLA9szZcsxeutgSs2O6F2ZMJZZ06JuqGBiC+YXqdLHTPvYAlBOF0+a0uQs9tWVv14Sz+N2hFzn1wbjowz7DG5Y3J6XytiOznFGAJdA8tFMI5ZzADGP7u3VukCn/jEHmqOWO5Bl/udtVEC6qbjP5umvQGsg5bAwILPZrCwTTPau3Lb3pY1iiw90/S4Hli11ydgw1si0zC9Eb1WbkErxOMV6zGLPz96suQcCBcqFGhMPhHjmMXYGFODXKoh5kAeuc0jYvEGac2WxLHcdHksFk9NUswsl0szs6fmDJ+bPSLMHVExTs9fc9zu2MoqOxXjMev1caTP5zCmmbn8w1BOwzhhcSKYxGUbYj4lfWSghmSPHnTZfItbdE/bZ8fFW+Ysd88erZpIb7Y8L1+9UL6C68gYk5riex23Z2LMIE7w7V/AEPOJpqcMKlu+7OBoSD/mpy7CQaii0uYNqAfkRQ4z+6uHXU0fr3Fevho+SDunS7QTh7Fd9FGwUzCmEHfwf85OTb8Dsr4tmo0+EmJmGcNQbvrzZVQGYjSf9sUSf+3IcxIK63W3VLDuJKZJY29womBMc3q5T+g8AeNUUSO5kCGWFPbDTNjfTthbaVfNXHODFy2lYI+o7Lvc4ytTJdaBj73U0s4WXI8AXOGHi9Ig2Fxwn+YES13lKcAvOoLxEl9BHfSJz97T9aPYViV/u+F4HOZqnzgHYxHi1w9AGOeQ1mBMT0GdRtlqyvCmQWzD4quWnnZhYYwMeicrfNIfcwntUbKjXDAwKK+6+JWJCO3w8adZSUB2yDgz08AvOqaopCugvUTv6YT75Asoryf2eHQ5jAWIXz92trxpe56H1hi+tyFs86ixgqZtH7sAGp6HLyAJ4uCIKTHRTZW+pe2stySJANe7GMY8xBc2xLoF/cAPJB91yPUowgfKKqNZvzSMOYg/xBB/tMDJVFwJODvlGdlL6jJQoOJ0CsYIYozy7qSu6WuXVWyIRThJ9mx0NbdInsnyW+Vj/NvfeRbvXqt4yMs6UKbM0Cz449Xc5EH3rEA5GJv/SCBGP/3dyV3T1y20Ey8FlNYew6vZ0aR6FpoXwLj1O2NxJQ1xEgfRB0zXeDVgRJ55Ux5U+/9J+4T5Ubkxbv2OWbw78eGWH0FGaYplsRpOZ26zWaDd4iOE9IsXG0yXH+OX110sr5U+U8/XPqPgXg+NSc1i2roMxjHKsbQqLSbQQTy4nhsMM6YVlIZxq/IHZ0HDVyqG4+H13J/0dOolMP4DCD+iDa/n4xXdHInkNq0a4/P09b7Luobc2fCadJc3nyHxWzXGZ8egz6M2mIPedBhVIg9QY1x956PG+A9gfWqMa4xrqQbG9zXGlfYhD+BT4xb49fHv1RWvB24bNwBM6qWorEQA3DQ+A7Cul6KysgDgc+On2CDXS1FZ6YH7nxqxQQarei0qKhsAbu8aja8AtM16NSopxh6Ar41YPgEwrJejkrICceSEJPa6/KhejyoGTj7yuBL5AkCvBrmCELcB+IIhbtx9qkGuIsSHWFPfEYxR/AT8lVEvS4UEPvdAEjcxkGMm+/vHemWqQ+KH2BZ/4iCO1XVskwF4WHm2AWv5scWwvcEUwfnlriHI3dd79Gu/vd8+1PJDy77dQ1Def5UgRijfJCjXUgX50/2NinCC8ueb2xrnH178+9ubzzzC/wNYI8lvyZkL+AAAAABJRU5ErkJggg=="},220:function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var i=n(0),r=n.n(i),s=n(111),a=n(1);function o(e){const{children:t,value:n,index:i,...o}=e;return Object(a.jsx)(s.a,{role:"tabpanel",hidden:n!==i,id:"simple-tabpanel-".concat(i),"aria-labelledby":"simple-tab-".concat(i),...o,children:n===i&&Object(a.jsx)(r.a.Fragment,{children:t})})}},221:function(e,t,n){"use strict";var i=n(0),r=n.n(i),s=n(645),a=n(199),o=n.n(a),c=n(214),l=n.n(c),d=n(111),u=n(717),h=n(1);const p=Object(s.a)(d.a)((e=>{let{theme:t}=e;return{width:"100%",display:"flex",flexWrap:"wrap",backgroundColor:"transparent",position:"relative",[t.breakpoints.down("md")]:{overflow:"hidden"}}})),m=Object(s.a)(d.a)((e=>{let{theme:t}=e;return{width:"100%",flexWrap:"nowrap",alignContent:"flex-start",transform:"translateZ(0)",display:"flex",padding:"2px 2px 10px 2px",overflowY:"hidden",overflowX:"auto",scrollBehavior:"smooth",WebkitOverflowScrolling:"touch","& > div":{marginLeft:t.spacing(1),marginRight:t.spacing(1),[t.breakpoints.up("md")]:{marginRight:t.spacing(2)}},"&.dontScroll":{flexWrap:"wrap"},"& > div:first-child":{marginLeft:0},"& > div:last-child":{marginRight:0}}})),g=Object(s.a)(d.a)((e=>{let{theme:t}=e;return{position:"absolute",top:0,left:t.spacing(-5),color:"#c8ccd0",height:"100%",padding:"0 5px",zIndex:1,display:"flex",justifyContent:"center",alignItems:"center",flexDirection:"column",[t.breakpoints.down("md")]:{dis
2play:"none"}}}));t.a=e=>{const{dontScroll:t,children:n,onScrollEnd:i,sliderContainerProps:s,sliderContentProps:a}=e,c=r.a.useRef(null),[d,f]=r.a.useState({right:!1,left:!1}),b=e=>{if(!c.current)return;const t=c.current.getBoundingClientRect();Math.round(t.bottom)-window.innerHeight<=0&&i&&i()};return r.a.useEffect((()=>{if(t)return window.removeEventListener("scroll",b),window.addEventListener("scroll",b),()=>{window.removeEventListener("scroll",b)}}),[n]),r.a.useEffect((()=>{!t&&c.current&&c.current.scrollWidth>c.current.offsetWidth&&(0===c.current.scrollLeft&&f({left:!1,right:!0}),c.current.scrollLeft>0&&f({left:!0,right:!0}))}),[t,n,c.current]),Object(h.jsxs)(p,{...s,children:[d.left&&Boolean(c.current)&&Object(h.jsx)(g,{sx:{left:e=>e.spacing(-7),right:"auto"},children:Object(h.jsx)(u.a,{color:"inherit",onClick:()=>c.current.scrollLeft-=Math.round(c.current.offsetWidth),children:Object(h.jsx)(l.a,{fontSize:"large",color:"inherit"})})}),d.right&&Boolean(c.current)&&Object(h.jsx)(g,{sx:{left:"auto",right:e=>e.spacing(-7)},children:Object(h.jsx)(u.a,{color:"inherit",onClick:()=>c.current.scrollLeft+=Math.round(c.current.offsetWidth),children:Object(h.jsx)(o.a,{fontSize:"large",color:"inherit"})})}),Object(h.jsx)(m,{className:t&&"dontScroll",ref:c,onScroll:e=>{const t=Math.round(e.target.scrollLeft),n=e.target.scrollWidth-e.target.offsetWidth;0===t&&f({left:!1,right:!0}),!(t>0&&t<n-10)||d.left&&d.right||f({left:!0,right:!0}),t>=n-10&&d.right&&(f({left:!0,right:!1}),i&&i())},...a,children:n})]})}},222:function(e,t,n){"use strict";n.d(t,"a",(function(){return Ye}));var i=n(0),r=n.n(i),s=n(5),a=n(27),o=n(79),c=n(685),l=n(195),d=n(81),u=n(28),h=n(645),p=n(20),m=n(37),g=n(725),f=n(700),b=n(656),y=n(111),j=n(689),_=n(648),v=n(706),x=n(647),O=n(649),T=n(720),S=n(716),w=n(724),A=n(721),k=n(707),C=n(729),E=n(731),I=n(191),D=n(199),P=n.n(D),R=n(277),L=n.n(R),M=n(717),N=n(202),B=n.n(N),U=n(1);function F(e){return Object(U.jsx)(y.a,{sx:{textAlign:"right",pt:{md:2},mb:{xs:1,md:3}},children:Object(U.jsx)(M.a,{edge:"start","aria-label":"menu",onClick:()=>e.handleBack(),size:"large",sx:{color:"#6B7074"},children:Object(U.jsx)(B.a,{fontSize:"inherit"})})})}var z,q=n.p+"static/media/profile.5d267387.svg",H=n.p+"static/media/login.0472535a.svg",V=n.p+"static/media/blog.6cf6497f.svg";function W(){return W=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)({}).hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},W.apply(null,arguments)}function G(e,t){let{title:n,titleId:r,...s}=e;return i.createElement("svg",W({xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",ref:t,"aria-labelledby":r},s),n?i.createElement("title",{id:r},n):null,z||(z=i.createElement("g",{id:"Raggruppa_5056","data-name":"Raggruppa 5056",transform:"translate(-89 -717)"},i.createElement("rect",{id:"Rettangolo_2146","data-name":"Rettangolo 2146",
2width:24,height:24,transform:"translate(89 717)",fill:"none"}),i.createElement("g",{id:"Raggruppa_5039","data-name":"Raggruppa 5039",transform:"translate(89 720)"},i.createElement("path",{id:"Tracciato_9015","data-name":"Tracciato 9015",d:"M69.674,59.288H85.662a3.968,3.968,0,0,1,3.964,3.964v7.641a3.968,3.968,0,0,1-3.964,3.964H69.674a3.968,3.968,0,0,1-3.964-3.964V63.252a3.968,3.968,0,0,1,3.964-3.964M85.662,73.427a2.535,2.535,0,0,0,2.532-2.534V63.252a2.534,2.534,0,0,0-2.532-2.532H69.674a2.534,2.534,0,0,0-2.532,2.532v7.641a2.534,2.534,0,0,0,2.532,2.532Z",transform:"translate(-65.71 -59.288)",fill:"currentColor"}),i.createElement("path",{id:"Tracciato_9016","data-name":"Tracciato 9016",d:"M85.871,85.27H75.308a.716.716,0,1,1,0-1.433H85.871a.716.716,0,1,1,0,1.433",transform:"translate(-68.23 -66.251)",fill:"currentColor"}),i.createElement("path",{id:"Tracciato_9017","data-name":"Tracciato 9017",d:"M79.967,72.135a.717.717,0,0,1-.469-1.258l2.43-2.1-2.405-1.9a.716.716,0,0,1,.889-1.123l3.084,2.44a.716.716,0,0,1,.117,1.006.694.694,0,0,1-.092.1l-3.084,2.67a.713.713,0,0,1-.468.175",transform:"translate(-69.551 -61.078)",fill:"currentColor"})))))}const X=i.forwardRef(G);var Y,K;n.p;function Q(){return Q=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)({}).hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},Q.apply(null,arguments)}function Z(e,t){let{title:n,titleId:r,...s}=e;return i.createElement("svg",Q({xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",width:24,height:23.997,viewBox:"0 0 24 23.997",ref:t,"aria-labelledby":r},s),n?i.createElement("title",{id:r},n):null,Y||(Y=i.createElement("defs",null,i.createElement("clipPath",{id:"clip-path"},i.createElement("rect",{id:"Rettangolo_3480","data-name":"Rettangolo 3480",width:24,height:23.997,fill:"currentColor"})))),K||(K=i.createElement("g",{id:"Raggruppa_9702","data-name":"Raggruppa 9702",clipPath:"url(#clip-path)"},i.createElement("path",{id:"Tracciato_9720","data-name":"Tracciato 9720",d:"M23.98,9.227a.911.911,0,0,0-.249-.791l-.17-.17L18.45,3.156,15.562.268a.918.918,0,0,0-.744-.26C14.806.008,14.8,0,14.784,0H5.525A5.53,5.53,0,0,0,0,5.522V18.475A5.53,5.53,0,0,0,5.525,24H18.476A5.529,5.529,0,0,0,24,18.475V9.324c0-.034-.018-.064-.019-.1M15.829,3.118,20.88,8.169H16.062a.233.233,0,0,1-.233-.234Zm2.647,19.053H5.525a3.7,3.7,0,0,1-3.7-3.7V5.522a3.7,3.7,0,0,1,3.7-3.7H14V7.935A2.063,2.063,0,0,0,16.062,10h6.109v8.479a3.7,3.7,0,0,1-3.7,3.7",transform:"translate(0 0)",fill:"currentColor"}),i.createElement("path",{id:"Tracciato_9721","data-name":"Tracciato 9721",d:"M11.825,11.25a3.942,3.942,0,0,0-.562-4.87L9.227,4.344A.913.913,0,0,0,7.934,5.634L9.971,7.671a2.1,2.1,0,0,1,.493,2.218L7.033,6.458A.913.913,0,0,0,5.74,7.748l3.421,3.421a2.186,2.186,0,0,1-2.206-.482L4.919,8.652A.913.913,0,0,0,3.627,9.942l2.036,2.036a3.944,3.944,0,0,0,4.87.563l4.826,4.825a.913.913,0,0,0,1.292-1.291Z",transform:"translate(0.843 1.023)",fill:"currentColor"}))))}const J=i.forwardRef(Z);var $;n.p;function ee(){return ee=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)({}).hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},ee.apply(null,arguments)}function te(e,t){let{title:n,titleId:r,...s}=e;return i.createElement("svg",ee({xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",ref:t,"aria-labelledby":r},s),n?i.createElement("title",{id:r},n):null,$||($=i.createElement("g",{id:"Raggruppa_5064","data-name":"Raggruppa 5064",transform:"translate(-90 -895)"},i.createElement("rect",{id:"Rettangolo_2153","data-name":"Rettangolo 2153",width:24,height:24,transform:"translate(90 895)",fill:"none"}),i.createElement("g",{id:"Raggruppa_5045","data-name":"Raggruppa 5045",transform:"translate(92.504 895.737)"},i.createElement("path",{id:"Tracciato_9020","data-name":"Tracciato 9020",d:"M77.2,329.335a9.494,9.494,0,0,1-7.583-15.2.667.667,0,1,1,1.067.8,8.16,8.16,0,1,0,13.067.034.667.667,0,0,1,1.067-.8,9.493,9.493,0,0,1-7.613,15.165Z",transform:"translate(-67.711 -306.811)",fill:"currentColor"}),i.createElement("path",{id:"Tracciato_9021","data-name":"Tracciato 9021",d:"M82.807,319.359a1.1,1.1,0,0,1,1.086.917c.009.057.02.116.031.175a3.765,3.765,0,0,1,.081.652,4.108,4.108,0,0,1-4.1,4.1,4.185,4.185,0,0,1-.467-.026,4.14,4.14,0,0,1-3.037-2.03,3.851,3.851,0,0,1-.516-2.823,1.206,1.206,0,0,1,1.177-.957,1.178,1.178,0,0,1,.193.016,16.8,16.8,0,0,0,2.652.16,14.04,14.04,0,0,0,2.608-.151,1.247,1.247,0,0,1,.294-.037M79.9,320.88a19.1,19.1,0,0,1-2.739-.157,2.541,2.541,0,0,0,.377,1.745,2.8,2.8,0,0,0,2.041,1.389,2.865,2.865,0,0,0,.321.018,2.773,2.773,0,0,0,2.77-2.77,2.661,2.661,0,0,0-.052-.37,17.149,17.149,0,0,1-2.717.146",transform:"translate(-70.409 -308.642)",fill:"currentColor"}),i.createElement("path",{id:"Tracciato_9022","data-name":"Tracciato 9022",d:"M78.732,303.287h.076a2.775,2.775,0,0,1,2.523,1.562,3.07,3.07,0,0,1,1.141-.222,2.667,2.667,0,0,1,2.583,1.816,2.4,2.4,0,0,1,.1.637c0,.049.005.095.009.133v.064a2.667,2.667,0,0,1-2.529,2.8l-.071,0c0,.255-.009.5-.021.747-.01.216-.019.419-.019.621v.009c-.007.525-.432.906-1.262,1.133a9.921,9.921,0,0,1-2.476.257,10.848,10.848,0,0,1-2.511-.245c-.327-.081-1.321-.329-1.321-1.119,0-.208-.009-.418-.019-.639-.011-.25-.
2023-.507-.02-.77a2.712,2.712,0,0,1-2.1-1.1,2.812,2.812,0,0,1-.382-2.538,2.652,2.652,0,0,1,2.575-1.815,2.951,2.951,0,0,1,1.133.228l.014.006a2.7,2.7,0,0,1,2.576-1.568m2.417,2.987a1.09,1.09,0,0,1-.966-.738,1.439,1.439,0,0,0-1.4-.915h-.049a1.383,1.383,0,0,0-1.379.828,1.191,1.191,0,0,1-1.047.8,1.743,1.743,0,0,1-.673-.167,1.618,1.618,0,0,0-.624-.127,1.327,1.327,0,0,0-1.3.881,1.5,1.5,0,0,0,.186,1.35,1.387,1.387,0,0,0,1.155.555h.006a1.074,1.074,0,0,1,1.2,1.234c-.007.261,0,.527.017.807.006.14.013.283.017.429a7.509,7.509,0,0,0,2.5.3,6.779,6.779,0,0,0,2.407-.3c0-.151.011-.3.018-.444.013-.285.026-.555.016-.819a1.182,1.182,0,0,1,.283-.879,1.218,1.218,0,0,1,.9-.316,1.333,1.333,0,0,0,1.422-1.238,1.251,1.251,0,0,0,0-.212c0-.051-.007-.1-.009-.149a1.314,1.314,0,0,0-.037-.3v0a1.32,1.32,0,0,0-1.312-.886,1.762,1.762,0,0,0-.726.161A1.48,1.48,0,0,1,81.149,306.273Z",transform:"translate(-69.236 -303.284)",fill:"currentColor"}),i.createElement("path",{id:"Tracciato_9023","data-name":"Tracciato 9023",d:"M73.4,332.707a.667.667,0,0,1-.374-1.219,10.457,10.457,0,0,1,11.694,0,.667.667,0,1,1-.747,1.1,9.123,9.123,0,0,0-10.2,0,.665.665,0,0,1-.373.115",transform:"translate(-69.386 -312.089)",fill:"currentColor"})))))}const ne=i.forwardRef(te);n.p;var ie=n(207);n.p;n.p;var re=n(215);var se,ae;n.p;function oe(){return oe=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)({}).hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},oe.apply(null,arguments)}function ce(e,t){let{title:n,titleId:r,...s}=e;return i.createElement("svg",oe({xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",width:24,height:24,viewBox:"0 0 24 24",ref:t,"aria-labelledby":r},s),n?i.createElement("title",{id:r},n):null,se||(se=i.createElement("defs",null,i.createElement("clipPath",{id:"clip-path"},i.createElement("rect",{id:"Rettangolo_2159","data-name":"Rettangolo 2159",width:18.442,height:18.442,fill:"currentColor"})))),ae||(ae=i.createElement("g",{id:"Raggruppa_5078","data-name":"Raggruppa 5078",transform:"translate(-90 -1033)"},i.createElement("g",{id:"Raggruppa_5075","data-name":"Raggruppa 5075",transform:"translate(49 -3)"},i.createElement("rect",{id:"Rettangolo_2160","data-name":"Rettangolo 2160",width:24,height:24,transform:"translate(41 1036)",fill:"none"}),i.createElement("g",{id:"Raggruppa_5072","data-name":"Raggruppa 5072",transform:"translate(43.779 1038.999)"},i.createElement("g",{id:"Raggruppa_5071","data-name":"Raggruppa 5071",transform:"translate(0 0.001)",clipPath:"url(#clip-path)"},i.createElement("path",{id:"Tracciato_9061","data-name":"Tracciato 9061",d:"M16.6,1.383a.436.436,0,0,1,.461.461V16.6a.436.436,0,0,1-.461.461H1.844a.436.436,0,0,1-.461-.461V1.844a.436.436,0,0,1,.461-.461ZM16.6,0H1.844A1.85,1.85,0,0,0,0,1.844V16.6a1.85,1.85,0,0,0,1.844,1.844H16.6A1.85,1.85,0,0,0,18.443,16.6V1.844A1.85,1.85,0,0,0,16.6,0",transform:"translate(0 0)",fill:"currentColor"}),i.createElement("path",{id:"Tracciato_9062","data-name":"Tracciato 9062",d:"M12.954,16.864a.727.727,0,0,1-.737-.737V10.87a.712.712,0,0,1,.737-.645.727.727,0,0,1,.737.737v5.256a.782.782,0,0,1-.737.646",transform:"translate(-3.734 -3.125)",fill:"currentColor"}),i.createElement("path",{id:"Tracciato_9063","data-name":"Tracciato 9063",d:"M12.914,6.507a.83.83,0,1,1-.83.83.83.83,0,0,1,.83-.83",transform:"translate(-3.693 -1.989)",fill:"currentColor"})))))))}const le=i.forwardRef(ce);n.p;var de,ue=n(216);n(211);function he(){return he=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)({}).hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},he.apply(null,arguments)}function pe(e,t){let{title:n,titleId:r,...s}=e;return i.createElement("svg",he({xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",ref:t,"aria-labelledby":r},s),n?i.createElement("title",{id:r},n):null,de||(de=i.createElement("g",{id:"Raggruppa_5063","data-name":"Raggruppa 5063",transform:"translate(-41 -895)"},i.createElement("rect",{id:"Rettangolo_2154","data-name":"Rettangolo 2154",width:24,height:24,transform:"translate(41 895)",fill:"none"}),i.createElement("g",{id:"Raggruppa_5048","data-name":"Raggruppa 5048",transform:"translate(43.503 895.735)"},i.createElement("path",{id:"Tracciato_9047","data-name":"Tracciato 9047",d:"M18.922,315.035a.667.667,0,0,0-1.067.8A8.168,8.168,0,0,1,16.722,326.8a10.4,10.4,0,0,0-10.833,0,8.161,8.161,0,0,1-1.1-11.007A.667.667,0,0,0,3.72,315a9.5,9.5,0,1,0,15.2.042",transform:"translate(-1.809 -307.672)",fill:"currentColor"}),i.createElement("path",{id:"Tracciato_9048","data-name":"Tracciato 9048",d:"M16.732,320.234c-.035.006-.071.013-.106.023a13.407,13.407,0,0,1-2.63.155,16.515,16.515,0,0,1-2.654-.163,1.207,1.207,0,0,0-1.353.933v.009a3.79,3.79,0,0,0,.509,2.813,4.177,4.177,0,0,0,3.041,2.039,4.1,4.1,0,0,0,4.545-3.608,3.868,3.868,0,0,0,.025-.519,5.649,5.649,0,0,0-.111-.776,1.1,1.1,0,0,0-1.267-.908",transform:"translate(-4.508 -309.5)",fill:"currentColor"}),i.createElement("path",{id:"Tracciato_9049","data-name":"Tracciato 9049",d:"M9.017,310.942c0,.257.009.513.02.769.009.213.019.425.019.637,0,1.128,2.084,1.365,3.833,1.365,1.7,0,3.72-.241,3.739-1.4,0-.207.01-.414.019-.621.012-.247.023-.5.021-.743.039,0,.078,0,.117-.006a2.667,2.667,0,0,0,2.484-2.811,3.42,3.42,0,0,0-.1-.781l-.021-.076a2.773,2.773,0,0,0-3.564-1.635c-.051.019-.1.039-.151.061a2.757,2.757,0,0,0-2.491-1.554h-.026a2.729,2.729,0,0,0-2.657,1.57q-.1-.046-.2-.082a2.743,2.743,0,0,0-3.51,1.633,2.7,2.7,0,0,0-.17,1.007,2.734,2.734,0,0,0,2.637,2.667",transform:"translate(-3.333 -304.142)",fill:"currentColor"})))))}const me=i.forwardRef(pe);var ge;n.p;function fe(){return fe=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)({}).hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},fe.apply(null,arguments)}function be(e,t){let{title:n,titleId:r,...s}=e;return i.createElement("svg",fe({xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",ref:t,"aria-labelledby":r},s),n?i.createElement("title",{id:r},n):null,ge||(ge=i.createElement("g",{id:"Raggruppa_5053","data-name":"Raggruppa 5053",transform:"translate(-41 -677)"},i.createElement("rect",{id:"Rettangolo_2142","data-name":"Rettangolo 2142",width:24,height:24,transform:"translate(41 677)",fill:"none"}),i.createElement("g",{id:"Raggruppa_5022","data-name":"Raggruppa 5022",transform:"translate(41.641 679)"},i.createElement("path",{id:"Tracciato_9010","data-name":"Tracciato 9010",d:"M6.777,19.99a.71
25.715,0,0,1-.683-.5c-.585-1.832-1.4-5.316-2.437-10.361q-.807.744-1.607,1.5a.716.716,0,1,1-.984-1.042c2.116-2,4.285-3.937,6.383-5.814,1.232-1.1,2.464-2.2,3.693-3.322a1.134,1.134,0,0,1,.094-.092,1.435,1.435,0,0,1,1.994.09c1.135,1.027,2.271,2.038,3.4,3.048,2.2,1.964,4.484,4,6.7,6.09a.716.716,0,0,1-.984,1.042Q21.48,9.807,20.6,9c-.049.253-.1.519-.155.8-.616,3.161-1.459,7.49-2.167,9.7a.717.717,0,0,1-.682.5h0s-2.315-.014-3.592-.016a.717.717,0,0,1-.715-.711l-.027-4.088H11.04l.047,4.075a.718.718,0,0,1-.716.725c-1.547,0-3.2.008-3.577.018H6.777",transform:"translate(-0.841 0.001)",fill:"currentColor"})))))}const ye=i.forwardRef(be);var je;n.p,n(217);function _e(){return _e=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)({}).hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},_e.apply(null,arguments)}function ve(e,t){let{title:n,titleId:r,...s}=e;return i.createElement("svg",_e({xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",ref:t,"aria-labelledby":r},s),n?i.createElement("title",{id:r},n):null,je||(je=i.createElement("g",{id:"Raggruppa_5065","data-name":"Raggruppa 5065",transform:"translate(-41 -941)"},i.createElement("rect",{id:"Rettangolo_2155","data-name":"Rettangolo 2155",width:24,height:24,transform:"translate(41 941)",fill:"none"}),i.createElement("g",{id:"Raggruppa_5034","data-name":"Raggruppa 5034",transform:"translate(44 943)"},i.createElement("path",{id:"Tracciato_9050","data-name":"Tracciato 9050",d:"M13.52,377.051H9.161a3.138,3.138,0,0,1,0-6.276c3.933,0,5.014,5.2,5.061,5.419a.717.717,0,0,1-.559.845.745.745,0,0,1-.143.014m-4.359-4.846a1.706,1.706,0,0,0,0,3.411h3.413c-.422-1.246-1.439-3.411-3.413-3.411",transform:"translate(-4.544 -370.775)",fill:"currentColor"}),i.createElement("path",{id:"Tracciato_9051","data-name":"Tracciato 9051",d:"M20.563,377.051H16.2a.716.716,0,0,1-.717-.716.7.7,0,0,1,.014-.144c.044-.218,1.129-5.416,5.062-5.416a3.138,3.138,0,1,1,0,6.276m-3.413-1.433h3.413a1.706,1.706,0,0,0,.07-3.411h-.07c-1.974,0-2.991,2.164-3.413,3.411",transform:"translate(-7.229 -370.775)",fill:"currentColor"}),i.createElement("path",{id:"Tracciato_9052","data-name":"Tracciato 9052",d:"M12.054,381.129H4.19a.232.232,0,0,0-.231.231v1.807a.232.232,0,0,0,.231.231h7.863a.232.232,0,0,0,.231-.231V381.36a.232.232,0,0,0-.231-.231",transform:"translate(-3.959 -373.712)",fill:"currentColor"}),i.createElement("path",{id:"Tracciato_9053","data-name":"Tracciato 9053",d:"M25.3,381.129H17.626a.232.232,0,0,0-.231.231v1.807a.231.231,0,0,0,.23.231H25.3a.232.232,0,0,0,.233-.23h0V381.36a.232.232,0,0,0-.231-.231",transform:"translate(-7.77 -373.712)",fill:"currentColor"}),i.createElement("path",{id:"Tracciato_9054","data-name":"Tracciato 9054",d:"M12.32,386.3H5.367a.232.232,0,0,0-.231.231v7.79a.232.232,0,0,0,.231.231h6.954a.232.232,0,0,0,.231-.231v-7.79a.232.232,0,0,0-.231-.231",transform:"translate(-4.293 -375.178)",fill:"currentColor"}),i.createElement("path",{id:"Tracciato_9055","data-name":"Tracciato 9055",d:"M24.673,394.549H17.719a.232.232,0,0,1-.231-.231v-7.79a.232.232,0,0,1,.231-.231h6.954a.232.232,0,0,1,.231.231v7.79a.232.232,0,0,1-.231.231",transform:"translate(-7.796 -375.178)",fill:"currentColor"})))))}const xe=i.forwardRef(ve);var Oe,Te;n.p,n(225);function Se(){return Se=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)({}).hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},Se.apply(null,arguments)}function we(e,t){let{title:n,titleId:r,...s}=e;return i.createElement("svg",Se({xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",width:24,height:24,viewBox:"0 0 24 24",ref:t,"aria-labelledby":r},s),n?i.createElement("title",{id:r},n):null,Oe||(Oe=i.createElement("defs",null,i.createElement("clipPath",{id:"clip-path"},i.createElement("rect",{id:"Rettangolo_2159","data-name":"Rettangolo 2159",width:18.442,height:18.442,fill:"currentColor"})))),Te||(Te=i.createElement("g",{id:"Raggruppa_5077","data-name":"Raggruppa 5077",transform:"translate(-41 -1033)"},i.createElement("rect",{id:"Rettangolo_2160","data-name":"Rettangolo 2160",width:24,height:24,transform:"translate(41 1033)",fill:"none"}),i.createElement("g",{id:"Raggruppa_5076","data-name":"Raggruppa 5076",transform:"translate(-0.579)"},i.createElement("rect",{id:"Rettangolo_2161","data-name":"Rettangolo 2161",width:17,height:17,rx:1,transform:"translate(45 1037)",fill:"currentColor"}),i.createElement("g",{id:"Raggruppa_5072","data-name":"Raggruppa 5072",transform:"translate(44.358 1035.999)"},i.createElement("g",{id:"Raggruppa_5071","data-name":"Raggruppa 5071",transform:"translate(0 0.001)",clipPath:"url(#clip-path)"},i.createElement("path",{id:"Tracciato_9061","data-name":"Tracciato 9061",d:"M16.6,1.383a.436.436,0,0,1,.461.461V16.6a.43
26.436,0,0,1-.461.461H1.844a.436.436,0,0,1-.461-.461V1.844a.436.436,0,0,1,.461-.461ZM16.6,0H1.844A1.85,1.85,0,0,0,0,1.844V16.6a1.85,1.85,0,0,0,1.844,1.844H16.6A1.85,1.85,0,0,0,18.443,16.6V1.844A1.85,1.85,0,0,0,16.6,0",transform:"translate(0 0)",fill:"currentColor"}),i.createElement("path",{id:"Tracciato_9062","data-name":"Tracciato 9062",d:"M12.954,16.864a.727.727,0,0,1-.737-.737V10.87a.712.712,0,0,1,.737-.645.727.727,0,0,1,.737.737v5.256a.782.782,0,0,1-.737.646",transform:"translate(-3.734 -3.125)",fill:"#27292d"}),i.createElement("path",{id:"Tracciato_9063","data-name":"Tracciato 9063",d:"M12.914,6.507a.83.83,0,1,1-.83.83.83.83,0,0,1,.83-.83",transform:"translate(-3.693 -1.989)",fill:"#27292d"})))))))}const Ae=i.forwardRef(we);n.p;var ke,Ce,Ee,Ie,De,Pe=n(230),Re=n(228);function Le(){return Le=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)({}).hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},Le.apply(null,arguments)}function Me(e,t){let{title:n,titleId:r,...s}=e;return i.createElement("svg",Le({id:"Raggruppa_6522","data-name":"Raggruppa 6522",xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",ref:t,"aria-labelledby":r},s),n?i.createElement("title",{id:r},n):null,ke||(ke=i.createElement("path",{id:"Tracciato_9186","data-name":"Tracciato 9186",d:"M5.816,21.124a2.658,2.658,0,1,1-2.659-2.659A2.659,2.659,0,0,1,5.816,21.124Z",transform:"translate(0.424 -0.707)",fill:"currentColor"})),Ce||(Ce=i.createElement("path",{id:"Tracciato_9186_-_Contorno","data-name":"Tracciato 9186 - Contorno",d:"M3.082,17.465A3.583,3.583,0,1,1-.5,21.048,3.587,3.587,0,0,1,3.082,17.465Zm0,5.317a1.734,1.734,0,1,0-1.733-1.734A1.736,1.736,0,0,0,3.082,22.782Z",transform:"translate(0.5 -0.631)",fill:"currentColor"})),Ee||(Ee=i.createElement("path",{id:"Tracciato_9187","data-name":"Tracciato 9187",d:"M23.611,3.159A2.658,2.658,0,1,1,20.953.5,2.659,2.659,0,0,1,23.611,3.159Z",transform:"translate(-0.536 0.424)",fill:"currentColor"})),Ie||(Ie=i.createElement("path",{id:"Tracciato_9187_-_Contorno","data-name":"Tracciato 9187 - Contorno",d:"M20.877-.5A3.583,3.583,0,1,1,17.3,3.083,3.587,3.587,0,0,1,20.877-.5Zm0,5.317a1.734,1.734,0,1,0-1.733-1.734A1.736,1.736,0,0,0,20.877,4.817Z",transform:"translate(-0.46 0.5)",fill:"currentColor"})),De||(De=i.createElement("path",{id:"Tracciato_9188","data-name":"Tracciato 9188",d:"M15.966,23.5a5.07,5.07,0,0,1-5.093-5.036V4.536A3.191,3.191,0,0,0,7.667,1.366h-.2A3.191,3.191,0,0,0,4.264,4.536v8.135a.944.944,0,0,1-1.888,0V4.536A5.07,5.07,0,0,1,7.469-.5h.2A5.07,5.07,0,0,1,12.76,4.536V18.463a3.206,3.206,0,0,0,6.412,0V10.328a.944.944,0,0,1,1.888,0v8.135A5.071,5.071,0,0,1,15.966,23.5Z",transform:"translate(0.283 0.5)",fill:"currentColor"})))}const Ne=i.forwardRef(Me);n.p;var Be=n.p+"static/media/comingsoon.2fdcc24c.svg",Ue=n(254),Fe=n.n(Ue),ze=n(255),qe=n.n(ze);const He=Object(c.a)((e=>({menuIcon:{color:"#fff",minWidth:"40px",justifyContent:"center",marginRight:"20px"}}))),Ve=Object(h.a)(g.a)((e=>{let{theme:t}=e;return{"& .MuiPaper-root":{backgroundColor:"#2F3337",color:"#fff"}}})),We=Object(h.a)(f.a)((e=>{let{theme:t}=e;return{"&.active":{"& .icon":{"&.active":{display:"inline"},"&.inactive":{display:"none"}}},"& .icon":{"&.active":{display:"none"},"&.inactive":{display:"inline"}}}})),Ge=r.a.forwardRef((function(e,t){return Object(U.jsx)(b.a,{direction:"left",ref:t,...e})})),Xe=e=>{const{i18n:t,t:n}=Object(o.a)(),{currentCategory:i}=Object(d.a)(),{packageType:c,isWellness:h}=Object(l.a)(),g=Object(s.i)(),f=Object(s.h)(),{handleMenuClose:b}=e,E=He(),{auth:D,logout:R}=r.a.useContext(p.a),{config:M}=r.a.useContext(m.a),[N,B]=r.a.useState({courses:!1,recipes:!1}),[z,W]=r.a.useState(!1);return Object(U.jsxs)(y.a,{p:1,sx:{pb:{xs:10,sm:1}},children:[Object(U.jsx)(F,{handleBack:()=>b()}),Object(U.jsxs)(y.a,{sx:{borderRadius:"14px",backgroundColor:"#555C64",mb:{xs:1,md:3}},children:[Object(U.jsxs)(j.a,{sx:{p:2,display:"flex",width:"100%",textAlign:"left"},onClick:()=>{D.isAuthenticated?W(!z):f.push("/".concat(t.language,"/auth/login"),{from:g.pathname+g.search})},children:[Object(U.jsx)(_.a,{className:E.menuIcon,children:D.isAuthenticated&&D.user&&D.user.data&&D.user.data.img_avatar?Object(U.jsx)(v.a,{src:D.user.data.img_avatar}):Object(U.jsx)("img",{src:D.isAuthenticated?q:H})}),Object(U.jsx)(x.a,{children:Object(U.jsxs)(O.a,{direction:"row",alignItems:"center",spacing:3,children:[Object(U.jsx)(T.a,{fontSize:"inherit",color:"inherit",children:Object(U.jsx)("b",{children:D.isAuthenticated?D.user.data.first_name||n("Profilo"):n("Accedi")})}),D.isAuthenticated&&D.user&&D.user.data&&Object(U.jsxs)(y.a,{sx:{borderRadius:"5px",background:"#41474E",padding:"1px 10px"},children:[Object(U.jsx)(S.a,{component:Pe.a,color:"gold",sx:{fontSize:16,verticalAlign:"middle"}}),"\xa0",Object(U.jsx)("b",{children:D.user.data.achievements_count||"0"})]})]})}),D.isAuthenticated&&Object(U.jsx)(r.a.Fragment,{children:z?Object(U.jsx)(L.a,{fontSize:"large"}):Object(U.jsx)(P.a,{fontSize:"large"})})]}),Object(U.jsx)(w.a,{in:z,children:Object(U.jsxs)(A.a,{children:[Object(U.jsxs)(We,{button:!0,component:a.b,activeStyle:{textDecoration:"underline"},to:"/".concat(t.language,"/user/progress"),children:[Object(U.jsx)(_.a,{className:E.menuIcon}),Object(U.jsx)(x.a,{children:n("I miei progressi")})]}),Object(U.jsxs)(We,{button:!0,component:a.b,activeStyle:{textDecoration:"underline"},to:"/".concat(t.language,"/user/profile"),children:[Object(U.jsx)(_.a,{className:E.menuIcon}),Object(U.jsx)(x.a,{children:n("Dati account")}
2)]}),Object(U.jsxs)(We,{component:a.b,activeStyle:{textDecoration:"underline"},to:"/".concat(t.language,"/user/referral"),button:!0,children:[Object(U.jsx)(_.a,{className:E.menuIcon}),Object(U.jsx)(x.a,{children:n("Invita un amico")})]}),Object(U.jsxs)(We,{activeStyle:{textDecoration:"underline"},onClick:()=>R(),button:!0,sx:{mb:2},children:[Object(U.jsx)(_.a,{className:E.menuIcon}),Object(U.jsx)(x.a,{children:n("Logout")})]})]})})]}),Object(U.jsxs)(A.a,{children:[Object(U.jsxs)(We,{button:!0,exact:!0,component:a.b,activeStyle:{textDecoration:"underline"},to:"/".concat(t.language),onClick:()=>{Object(u.e)({event:"menu_nav",event_id:"08",event_trigger:"GAevent",event_detail:"home"})},sx:{mb:1},children:[Object(U.jsxs)(_.a,{className:E.menuIcon,children:[Object(U.jsx)(S.a,{className:"icon inactive",component:ie.a,sx:{color:e=>e.palette.text.primary,fontSize:"2rem"}}),Object(U.jsx)(S.a,{className:"icon active",component:ye,sx:{color:e=>e.palette.text.primary,fontSize:"2rem"}})]}),Object(U.jsx)(x.a,{children:Object(U.jsx)("b",{children:n("Home")})})]}),Object(U.jsxs)(We,{button:!0,onClick:()=>{B({...N,courses:!N.courses})},sx:{mb:1},children:[Object(U.jsxs)(_.a,{className:E.menuIcon,children:[Object(U.jsx)(S.a,{className:"icon inactive",component:X,sx:{color:e=>e.palette.text.primary,fontSize:"2rem"}}),Object(U.jsx)(S.a,{className:"icon active",component:ue.a,sx:{color:e=>e.palette.text.primary,fontSize:"2rem"}})]}),Object(U.jsx)(x.a,{children:Object(U.jsx)("b",{children:n("Corsi di cucina")})}),N.courses?Object(U.jsx)(Fe.a,{}):Object(U.jsx)(qe.a,{})]}),Object(U.jsxs)(w.a,{in:N.courses,children:[Object(U.jsxs)(We,{button:!0,component:a.b,activeStyle:{textDecoration:"underline"},to:"/".concat(t.language,"/").concat(n("corsi")),onClick:()=>{Object(u.e)({event:"menu_nav",event_id:"08",event_trigger:"GAevent",event_detail:"masterclass"})},sx:{mb:1},children:[Object(U.jsx)(_.a,{className:E.menuIcon}),Object(U.jsx)(x.a,{children:n("MasterClass")})]}),M.basics_enabled&&Object(U.jsxs)(We,{button:!0,component:a.b,to:"/".concat(t.language,"/").concat(n("scuola")),onClick:()=>{Object(u.e)({event:"menu_nav",event_id:"08",event_trigger:"GAevent",event_detail:"basics"})},sx:{mb:1,"&.active":{"& .text":{textDecoration:"underline"}}},children:[Object(U.jsx)(_.a,{className:E.menuIcon}),Object(U.jsx)(x.a,{children:n("La scuola")})]}),M.horeca_enabled&&Object(U.jsxs)(We,{button:!0,component:a.b,to:"/".concat(t.language,"/").concat(n("horeca")),onClick:()=>{Object(u.e)({event:"menu_nav",event_id:"08",event_trigger:"GAevent",event_detail:"horeca"})},sx:{mb:1,"&.active":{"& .text":{textDecoration:"underline"}}},children:[Object(U.jsx)(_.a,{className:E.menuIcon}),Object(U.jsx)(x.a,{children:n("HoReCa")})]}),M.wellness_enabled&&Object(U.jsxs)(We,{button:!0,component:a.b,to:"/".concat(t.language,"/").concat(n("benessere")),onClick:()=>{Object(u.e)({event:"menu_nav",event_id:"08",event_trigger:"GAevent",event_detail:"wellness"})},sx:{mb:1,"&.active":{borderRadius:"14px",py:1.5,background:"#444E43","& .text":{textDecoration:"underline"}}},children:[Object(U.jsx)(_.a,{className:E.menuIcon}),Object(U.jsx)(x.a,{children:n("Benessere")})]})]}),M.recipes_enabled&&Object(U.jsxs)(U.Fragment,{children:[Object(U.jsxs)(We,{button:!0,onClick:()=>{B({...N,recipes:!N.recipes})},sx:{mb:1},children:[Object(U.jsx)(_.a,{className:E.menuIcon,children:Object(U.jsx)(S.a,{className:"icon inactive",component:J,sx:{color:e=>e.palette.text.primary,fontSize:"2rem"}})}),Object(U.jsx)(x.a,{children:Object(U.jsx)("b",{children:n("Ricette")})}),Object(U.jsx)(k.a,{color:"white",size:"small",label:Object(U.jsx)("b",{children:n("Novit\xe0")}),sx:{mr:1}}),N.recipes?Object(U.jsx)(Fe.a,{}):Object(U.jsx)(qe.a,{})]}),Object(U.jsxs)(w.a,{in:N.recipes,children:[Object(U.jsxs)(We,{button:!0,component:a.b,activeStyle:{textDecoration:"underline"},to:"/".concat(t.language,"/").concat(n("ricette")),onClick:()=>{Object(u.e)({event:"menu_nav",event_id:"08",event_trigger:"GAevent",event_detail:"recipes"})},sx:{mb:1},children:[Object(U.jsx)(_.a,{className:E.menuIcon}
2),Object(U.jsx)(x.a,{children:n("Sezione Ricette")})]}),Object(U.jsxs)(We,{button:!0,component:a.b,activeStyle:{textDecoration:"underline"},to:"/".concat(t.language,"/").concat(n("pasti")),onClick:()=>{Object(u.e)({event:"menu_nav",event_id:"08",event_trigger:"GAevent",event_detail:"meals"})},sx:{mb:1},children:[Object(U.jsx)(_.a,{className:E.menuIcon}),Object(U.jsx)(x.a,{children:n("Pasti")})]}),Object(U.jsxs)(We,{button:!0,component:a.b,activeStyle:{textDecoration:"underline"},to:"/".concat(t.language,"/user/recipes"),onClick:()=>{Object(u.e)({event:"menu_nav",event_id:"08",event_trigger:"GAevent",event_detail:"favorites_recipes"})},sx:{mb:1},children:[Object(U.jsx)(_.a,{className:E.menuIcon}),Object(U.jsx)(x.a,{children:n("Ricette preferite")})]}),Object(U.jsxs)(We,{button:!0,component:a.b,activeStyle:{textDecoration:"underline"},to:"/".concat(t.language,"/user/shopping-list"),onClick:()=>{Object(u.e)({event:"menu_nav",event_id:"08",event_trigger:"GAevent",event_detail:"shopping_list"})},sx:{mb:1},children:[Object(U.jsx)(_.a,{className:E.menuIcon}),Object(U.jsx)(x.a,{children:n("Lista della spesa")})]})]})]}),M.learning_paths_enabled&&Object(U.jsxs)(We,{button:!0,component:a.b,activeStyle:{textDecoration:"underline"},to:"/".concat(t.language,"/").concat(n("percorsi")),onClick:()=>{Object(u.e)({event:"menu_nav",event_id:"08",event_trigger:"GAevent",event_detail:"learning_paths"})},sx:{mb:1},children:[Object(U.jsxs)(_.a,{className:E.menuIcon,children:[Object(U.jsx)(S.a,{className:"icon inactive",component:Re.a,sx:{color:e=>e.palette.text.primary,fontSize:"2rem"}}),Object(U.jsx)(S.a,{className:"icon active",component:Ne,sx:{color:e=>e.palette.text.primary,fontSize:"2rem"}})]}),Object(U.jsx)(x.a,{children:Object(U.jsx)("b",{children:n("Percorsi")})})]}),"it"===t.language&&Object(U.jsxs)(We,{button:!0,component:C.a,activeStyle:{textDecoration:"underline"},href:"https://ac.academia.tv/comingsoon",onClick:()=>{Object(u.e)({event:"menu_nav",event_id:"08",event_trigger:"GAevent",event_detail:"coming_soon"})},sx:{mb:1},children:[Object(U.jsx)(_.a,{className:E.menuIcon,children:Object(U.jsx)("img",{src:Be,width:"30"})}),Object(U.jsx)(x.a,{children:Object(U.jsx)("b",{children:n("Corsi in arrivo")})})]}),Object(U.jsxs)(We,{button:!0,component:a.b,activeStyle:{textDecoration:"underline"},to:{pathname:"/".concat(t.language,"/giftcard"),search:"from=".concat(c?c.key:"masterclass")},onClick:()=>{Object(u.e)({event:"menu_nav",event_id:"08",event_trigger:"GAevent",event_detail:"giftcard"})},sx:{mb:1},children:[Object(U.jsxs)(_.a,{className:E.menuIcon,children:[Object(U.jsx)(S.a,{className:"icon inactive",viewBox:"0 0 29.044 29.043",component:re.a,sx:{color:e=>e.palette.text.primary,fontSize:"2rem"}}),Object(U.jsx)(S.a,{className:"icon active",component:xe,sx:{color:e=>e.palette.text.primary,fontSize:"2rem"}})]}),Object(U.jsx)(x.a,{children:Object(U.jsx)("b",{children:n("Giftcard - Regalo")})})]}),Object(U.jsxs)(We,{button:!0,component:a.b,activeStyle:{textDecoration:"underline"},to:"/".concat(t.language,"/").concat(n("maestri")),onClick:()=>{Object(u.e)({event:"menu_nav",event_id:"08",event_trigger:"GAevent",event_detail:"masters"})},sx:{mb:1},children:[Object(U.jsxs)(_.a,{className:E.menuIcon,children:[Object(U.jsx)(S.a,{className:"icon inactive",component:ne,sx:{color:e=>e.palette.text.primary,fontSize:"2.2rem"}}),Object(U.jsx)(S.a,{className:"icon active",component:me,sx:{color:e=>e.palette.text.primary,fontSize:"2.2rem"}})]}),Object(U.jsx)(x.a,{children:Object(U.jsx)("b",{children:n("I maestri")})})]}),Object(U.jsxs)(We,{button:!0,component:a.b,activeStyle:{textDecoration:"underline"},to:"/".concat(t.language,"/user/faq"),onClick:()=>{Object(u.e)({event:"menu_nav",event_id:"08",event_trigger:"GAevent",event_detail:"faq"})},sx:{mb:1},children:[Object(U.jsxs)(_.a,{className:E.menuIcon,children:[Object(U.jsx)(S.a,{className:"icon inactive",component:le,sx:{color:e=>e.palette.text.primary,fontSize:"2.2rem"}}),Object(U.jsx)(S.a,{className:"icon active",component:Ae,sx:{color:e=>e.palette.text.primary,fontSize:"2.2rem"}})]}),Object(U.jsx)(x.a,{children:Object(U.jsx)("b",{children:n("Domande frequenti")})})]}),"it"===t.language&&Object(U.jsxs)(We,{button:!0,component:C.a,activeStyle:{textDecoration:"underline"},href:"https://blog.academia.tv/",onClick:()=>{Object(u.e)({event:"menu_nav",event_id:"08",event_trigger:"GAevent",event_detail:"blog"})}
2,sx:{mb:1},children:[Object(U.jsx)(_.a,{className:E.menuIcon,children:Object(U.jsx)("img",{src:V,width:"30"})}),Object(U.jsx)(x.a,{children:Object(U.jsx)("b",{children:n("Blog")})})]}),(!D.isAuthenticated||D.isAuthenticated&&D.user&&D.user.data&&!D.user.data.flag_active_subscription&&!h||D.isAuthenticated&&D.user&&D.user.data&&!D.user.data.flag_active_wellness_subscription&&h)&&Object(U.jsx)(We,{children:Object(U.jsx)(x.a,{children:Object(U.jsx)(I.a,{fullWidth:!0,component:a.b,to:{pathname:"/".concat(t.language,"/paywall"),search:"from=".concat(c&&"horeca"!==c.key?c.key:"masterclass"),state:{from:g.pathname}},onClick:()=>{Object(u.e)({event:"cta_click",event_id:"03",event_trigger:"GAevent",event_detail:"buy_".concat(c&&"horeca"!==c.key?c.key:"masterclass"),event_subdetail:n("Attiva l'abbonamento")})},color:"primary",children:n("Attiva l'abbonamento")})})}),!h&&(!D.isAuthenticated||D.isAuthenticated&&D.user&&D.user.data&&!D.user.data.flag_active_subscription)&&Object(U.jsx)(We,{children:Object(U.jsx)(x.a,{children:Object(U.jsx)(I.a,{fullWidth:!0,component:a.b,to:{pathname:Object(s.f)("/:lang/:courses/:courseSlug/:lessons/:lessonSlug",{lang:t.language,courses:n("corsi"),courseSlug:M.free_lesson_course_slug,lessons:n("lezioni"),lessonSlug:M.free_lesson_slug}),state:{from:g.pathname}},color:"secondary",onClick:()=>{Object(u.e)({event:"free_lesson",event_id:"03",event_trigger:"GAevent",event_detail:"".concat(i," menu")})},children:n("Guarda lezione gratuita")})})}),h&&c&&(!D.isAuthenticated||D.isAuthenticated&&D.user&&D.user.data&&!D.user.data.flag_active_wellness_subscription)&&Object(U.jsx)(We,{children:Object(U.jsx)(x.a,{children:Object(U.jsx)(I.a,{fullWidth:!0,component:a.b,to:{pathname:Object(s.f)("/:lang/:package/:classSlug/:modules/:moduleSlug/:lessons/:chapterSlug",{lang:t.language,package:c.translation,classSlug:M.wellness_free_lesson_course_pkg_slug,modules:n("moduli"),moduleSlug:M.wellness_free_lesson_course_slug,lessons:n("lezioni"),chapterSlug:M.wellness_free_lesson_slug}),state:{from:g.pathname}},onClick:()=>{Object(u.e)({event:"free_lesson",event_id:"03",event_trigger:"GAevent",event_detail:"".concat(i," menu")})},color:"secondary",children:n("Guarda lezione gratuita")})})})]})]})};function Ye(e){const t=Object(s.i)(),{open:n,setOpen:i}=e,{auth:a}=r.a.useContext(p.a),[o,c]=r.a.useState(!1),l=()=>{i(!1)};return r.a.useEffect((()=>{o?l():c(!0)}),[a,t.pathname]),Object(U.jsxs)(r.a.Fragment,{children:[Object(U.jsx)(Ve,{fullScreen:!0,open:n,onClose:l,TransitionComponent:Ge,sx:{display:{xs:"block",sm:"none"}},children:Object(U.jsx)(Xe,{handleMenuClose:l})}),Object(U.jsx)(E.a,{anchor:"right",open:n,onClose:l,sx:{"& .MuiPaper-root":{minWidth:375},display:{xs:"none",sm:"block","& .MuiDrawer-paper":{backgroundColor:"#26292D",color:"#fff"}}},children:Object(U.jsx)(Xe,{handleMenuClose:l})})]})}},223:function(e,t,n){"use strict";n.d(t,"b",(function(){return U})),n.d(t,"a",(function(){return F}));var i,r=n(0),s=n.n(r),a=n(5),o=n(27),c=n(35),l=n(79),d=n(20),u=n(37),h=n(728),p=n(729),m=n(111),g=n(730),f=n(720),b=n(705),y=n(649),j=n(706),_=n(716),v=n(718),x=n(717),O=n(196),T=n(56),S=n(657),w=n(192),A=n(259),k=n.n(A),C=n(209),E=n(227);function I(){return I=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)({}).hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},I.apply(null,arguments)}function D(e,t){let{title:n,titleId:s,...a}=e;return r.createElement("svg",I({xmlns:"http://www.w3.org/2000/svg",width:23.999,height:23.999,viewBox:"0 0 23.999 23.999",ref:t,"aria-labelledby":s},a),n?r.createElement("title",{id:s},n):null,i||(i=r.createElement("g",{id:"Raggruppa_6485","data-name":"Raggruppa 6485",transform:"translate(-1065.517 -221.088)"},r.createElement("path",{id:"My_path_4_","data-name":"My path (4)",d:"M23.6,2H4.4A2.4,2.4,0,0,0,2.012,4.4L2,26l4.8-4.8H23.6A2.407,2.407,0,0,0,26,18.8V4.4A2.407,2.407,0,0,0,23.6,2Zm0,16.8H5.8L4.4,20.2V4.4H23.6Z",transform:"translate(1063.517 219.088)",fill:"currentColor"}),r.createElement("g",{id:"Raggruppa_6115","data-name":"Raggruppa 6115",transform:"translate(1071.824 225.528)"},r.createElement("path",{id:"Poligono_5","data-name":"Poligono 5",d:"M4.269.854a.3.3,0,0,1,.569,0l.806,2.419a.3.3,0,0,0,.19.19l2.419.806a.3.3,0,0,1,0,.569l-2.419.806a.3.3,0,0,0-.19.19L4.838,8.254a.3.3,0,0,1-.569,0L3.463,5.834a.3.3,0,0,0-.19-.19L.854,4.838a.3.3,0,0,1,0-.569l2.419-.806a.3.3,0,0,0,.19-.19Z",transform:"translate(0 0)",fill:"currentColor"}),r.createElement("path",{id:"Poligono_6","data-name":"Poligono 6",d:"M2.372.854a.3.3,0,0,1,.569,0l.332,1a.3.3,0,0,0,.19.19l1,.332a.3.3,0,0,1,0,.569l-1,.332a.3.3,0,0,0-.19.19l-.332,1a.3.3,0,0,1-.569,0l-.332-1a.3.3,0,0,0-.19-.19l-1-.332a.3.3,0,0,1,0-.569l1-.332a.3.3,0,0,0,.19-.19Z",transform:"translate(6.072 5.313)",fill:"currentColor"})))))}const P=r.forwardRef(D);n.p;var R=n.p+"static/media/whatsapp.39072750.svg",L=n(276),M=n.n(L),N=n(1);const B="microphone",U=e=>{const{auth:t}=s.a.useContext(d.a),{config:n}=s.a.useContext(u.a),[i,r]=s.a.useState(null);return Object(N.jsx)(N.Fragment,{children:!Boolean(window.Android)&&!!n&&n.tutor_help_enabled&&!t.isAuthenticated&&Object(N.jsx)(N.Fragment,{children:Object(N.jsx)(h.a,{component:p.a,href:n.tutor_help_url,target:"_blank",color:"white",sx:{position:"fixed",zIndex:1,bottom:16,right:16},children:Object(N.jsx)(w.a,{src:R,sx:{width:40,height:40}})})})})},F=e=>{const{sx:t,buttonProps:n,iconProps:i,variant:r}=e,{t:h,i18n:p}=Object(l.a)(),w=Object(T.a)(),A=Object(a.i)(),I=Object(S.a)(w.breakpoints.down("md")),{auth:D}=s.a.useContext(d.a),{config:R}=s.a.useContext(u.a),[L,U]=s.a.useState(null),{request:F,cancelToken:z}=s.a.useContext(c.a),[q,H]=s.a.useState(!1);return Object(N.jsx)(m.a,{...t,children:!!R&&R.tutor_ai_enabled&&Object(N.jsxs)(N.Fragment,{children:[Object(N.jsx)(g.a,{open:q&&!I&&!!D.user&&!!D.user.data&&D.user.data.flag_active_pro,onClose:()=>{H(!1)},anchorReference:"none",PaperProps:{sx:{position:"fixed",right:24,bottom:24,margin:10,width:400}},children:Object(N.jsx)(m.a,{sx:{width:400,height:"75vh",overflow:"hidden"},children:Object(N.jsx)("iframe",{title:"chatbot",src:R.tutor_ai_url,allow:B,width:"100%",height:"100%",style:{border:"none"}})})}),Object(N.jsx)(O.a,{fullWidth:!0,maxWidth:"lg",scroll:"body",fullScreen:!0,open:q&&I&&!!D.user&&!!D.user.data&&D.user.data.flag_active_pro,handleClose:()=>{H(!1)},children:Object(N.jsx)(m.a,{sx:{width:"100%",height:"100vh",overflow:"hidden"},children:Object(N.jsx)("iframe",{title:"chatbot",src:R.tutor_ai_url,allow:B,width:"100%",height:"100%",style:{border:"none"}})})}),Object(N.jsx)(O.a,{fullWidth:!0,maxWidth:"lg",scroll:"body",fullScreen:I,open:q&&(!!D.user&&!!D.user.data&&!D.user.data.flag_active_pro||!D.isAuthenticated),handleClose:()=>{H(!1)},children:Object(N.jsxs)(m.a,{sx:{px:3,pb:3,textAlign:"center"},children:[Object(N.jsx)(f.a,{variant:"h6",color:"textPrimary",sx:{mb:4},children:Object(N.jsx)("b",{children:h("Che cos\u2019\xe8 il Tutor AI? Come pu\xf2 migliorarmi?")})}),Object(N.jsxs)(b.a,{container:!0,spacing:4,justify:!0,children:[Object(N.jsx)(b.a,{item:!0,xs:12,md:4,children:Object(N.jsxs)(y.a,{alignItems:"center",justifyContent:"center",children:[Object(N.jsx)(j.a,{variant:"rounded",sx:{width:98,height:98,background:"#42474E",borderRadius:"20px",mb:3},children:Object(N.jsx)(_.a,{component:E.a,sx:{color:"#b1b8be",fontSize:45}})}),Object(N.jsx)(f.a,{variant:"h6",color:"textPrimary",sx:{mb:3},children:Object(N.jsx)("b",{children:h("Assistente AI \u2013 Formato dai nostri Maestri")})}),Object(N.jsx)(f.a,{color:"textSecondary",children:h("Il sapere dei pi\xf9 grandi chef del mondo racchiuso in un unico assistente digitale di cucina, creato da Acad\xe8mia.tv.")})]})}),Object(N.jsx)(b.a,{item:!0,xs:12,md:4,children:Object(N.jsxs)(y.a,{alignItems:"center",justifyContent:"center",children:[Object(N.jsx)(j.a,{variant:"rounded",sx:{width:98,height:98,background:"#42474E",borderRadius:"20px",mb:3},children:Object(N.jsx)(M.a,{sx:{color:"#b1b8be",fontSize:45}})}),Object(N.jsx)(f.a,{variant:"h6",color:"textPrimary",sx:{mb:3},children:Object(N.jsx)("b",{children:h("Supporto in tempo reale, e pi\xf9 sicurezza ai fornelli")})}),Object(N.jsx)(f.a,{color:"textSecondary",children:h("Disponibile 24 ore su 24: risponde ai tuoi dubbi, ti guida passo dopo passo nelle ricette e ti aiuta a perfezionarle.")})]})}),Object(N.jsx)(b.a,{item:!0,xs:12,md:4,children:Object(N.jsxs)(y.a,{alignItems:"center",justifyContent:"center",children:[Object(N.jsx)(j.a,{variant:"rounded",sx:{width:98,height:98,background:"#42474E",borderRadius:"20px",mb:3},children:Object(N.jsx)(_.a,{component:P,sx:{color:"#b1b8be",fontSize:45}})}),Object(N.jsx)(f.a,{variant:"h6",color:"textPrimary",sx:{mb:3},children:Object(N.jsx)("b",{children:h("Un\u2019esperienza Premium, su misura per te")})}),Object(N.jsx)(f.a,{color:"textSecondary",children:h("Selezione di ricette, menu personalizzati, planning settimanale: tutto adattato ai tuoi gusti e alle tue esigenze.")})]})})]}),Object(N.jsxs)(y.a,{sx:{mt:4},justifyContent:"center",alignItems:"center",children:[Object(N.jsx)(f.a,{color:"textPrimary",sx:{mb:2,maxWidth:"400px"},children:h("Tutor \xe8 incluso nel piano PRO, insieme a video in 4k, Live e Libri di cucina digitali esclusivi")}),Object(N.jsx)(v.a,{size:"large",variant:"contained",color:"primary",component:o.b,to:{pathname:"/".concat(p.language,"/paywall"),search:"from=masterclass",state:{from:A.pathname}},children:Object(N.jsx)("b",{children:h("Scopri il piano PRO")})})]})]})}),r&&"icon"===r?Object(N.jsx)(x.a,{size:"large",sx:{backgroundColor:"#F7F7F7","&:hover":{backgroundColor:"#E1E1E1"}},onClick:()=>{H(!0)},children:Object(N.jsx)(_.a,{component:C.a,color:"darkVariant",fontSize:"large"})}):Object(N.jsx)(v.a,{fullWidth:!0,variant:"contained",color:"white",size:"large",endIcon:Object(N.jsx)(k.a,{color:"inherit"}),sx:{justifyContent:"space-between"},onClick:()=>{H(!0)},...n,children:Object(N.jsxs)("span",{children:[Object(N.jsx)(_.a,{component:C.a,color:"primary",sx:{verticalAlign:"bottom",mr:1},...i})," ",h("Chiedi al Tutor")]})})]})})}},225:function(e,t,n){"use strict";n.d(t,"a",(function(){return o}
2));var i,r=n(0);function s(){return s=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)({}).hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},s.apply(null,arguments)}function a(e,t){let{title:n,titleId:a,...o}=e;return r.createElement("svg",s({xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",ref:t,"aria-labelledby":a},o),n?r.createElement("title",{id:a},n):null,i||(i=r.createElement("g",{id:"Raggruppa_5057","data-name":"Raggruppa 5057",transform:"translate(-41 -761)"},r.createElement("rect",{id:"Rettangolo_2147","data-name":"Rettangolo 2147",width:24,height:24,transform:"translate(41 761)",fill:"none"}),r.createElement("g",{id:"Raggruppa_5027","data-name":"Raggruppa 5027",transform:"translate(45 762.37)"},r.createElement("path",{id:"Tracciato_9011","data-name":"Tracciato 9011",d:"M21.459,123.174a.534.534,0,0,0-.208-.042,1.827,1.827,0,0,1,0-3.653.537.537,0,0,0,0-1.075H8.262a2.989,2.989,0,0,0-2.984,2.943V137a2.663,2.663,0,0,0,2.661,2.661H21.168a1.056,1.056,0,0,0,1.054-1.054V124.182a1.048,1.048,0,0,0-.763-1.008m-8.7,7.085a.28.28,0,0,1-.458.21l-.951-.779a.286.286,0,0,0-.358,0l-.963.775a.28.28,0,0,1-.457-.211v-6.047l3.186-.006Zm-4.5-10.78H19a2.9,2.9,0,0,0,0,3.656H8.123a1.771,1.771,0,0,1-1.77-1.758,1.912,1.912,0,0,1,1.91-1.9",transform:"translate(-5.278 -118.404)",fill:"currentColor"})))))}const o=r.forwardRef(a);n.p},226:function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var i=n(0);function r(){return r=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)({}).hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},r.apply(null,arguments)}function s(e,t){let{title:n,titleId:s,...a}=e;return i.createElement("svg",r({xmlns:"http://www.w3.org/2000/svg",width:22,height:21.999,viewBox:"0 0 22 21.999",ref:t,"aria-labelledby":s},a),n?i.createElement("title",{id:s},n):null,i.createElement("g",{"data-name":"Raggruppa 3943"},i.createElement("g",{"data-name":"Raggruppa 1954"},i.createElement("path",{"data-name":"Unione 52",d:"m19.683 21.6-3.972-3.974A9.8 9.8 0 0 1 2.872 2.87a9.8 9.8 0 0 1 14.757 12.839l3.971 3.974a1.357 1.357 0 1 1-1.92 1.918zM2.714 9.8A7.089 7.089 0 1 0 9.8 2.715 7.1 7.1 0 0 0 2.714 9.8z",style:{fill:"currentColor"}}))))}const a=i.forwardRef(s);n.p},227:function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var i,r=n(0);function s(){return s=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)({}).hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},s.apply(null,arguments)}function a(e,t){let{title:n,titleId:a,...o}=e;return r.createElement("svg",s({xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",width:"24px",height:"25px",viewBox:"0 0 24 25",ref:t,"aria-labelledby":a},o),n?r.createElement("title",{id:a},n):null,i||(i=r.createElement("defs",null,r.createElement("clipPath",{id:"clip1"},r.createElement("path",{d:"M 10 19 L 23.910156 19 L 23.910156 25 L 10 25 Z M 10 19 "})))),r.createElement("g",{id:"surface1"},r.createElement("path",{style:{stroke:"none",fillRule:"nonzero",fill:"currentColor",fillOpacity:1},d:"M 0 23.320312 L 0 25.109375 L 8.367188 25.109375 L 8.367188 23.320312 C 8.371094 23.121094 8.390625 22.921875 8.425781 22.726562 L 3.3125 22.726562 C 4.894531 21.976562 6.617188 21.570312 8.367188 21.535156 C 8.5 21.535156 8.644531 21.546875 8.773438 21.546875 C 9.21875 20.660156 9.898438 19.914062 10.734375 19.386719 C 9.953125 19.242188 9.164062 19.160156 8.367188 19.148438 C 5.570312 19.148438 0 20.546875 0 23.320312 "}),r.createElement("g",{clipPath:"url(#clip1)",clipRule:"nonzero"},r.createElement("path",{style:{stroke:"none",fillRule:"nonzero",fill:"currentColor",fillOpacity:1},d:"M 17.332031 19.746094 C 15.132812 19.746094 10.757812 20.949219 10.757812 23.324219 L 10.757812 25.109375 L 23.910156 25.109375 L 23.910156 23.324219 C 23.910156 20.949219 19.535156 19.746094 17.335938 19.746094 "})),r.createElement("path",{style:{stroke:"none",fillRule:"nonzero",fill:"currentColor",fillOpacity:1},d:"M 14.71875 16.410156 C 14.992188 16.902344 15.394531 17.304688 15.886719
217.578125 C 16.785156 18.085938 17.882812 18.085938 18.78125 17.578125 C 20.222656 16.78125 20.746094 14.96875 19.945312 13.527344 C 19.148438 12.089844 17.332031 11.570312 15.886719 12.363281 C 14.445312 13.160156 13.921875 14.972656 14.71875 16.410156 "}),r.createElement("path",{style:{stroke:"none",fillRule:"nonzero",fill:"currentColor",fillOpacity:1},d:"M 4.222656 11.585938 C 4.199219 11.765625 4.183594 12.40625 4.183594 12.59375 C 4.183594 14.898438 6.058594 16.765625 8.367188 16.765625 C 10.679688 16.765625 12.550781 14.898438 12.550781 12.59375 C 12.550781 12.402344 12.535156 11.757812 12.511719 11.578125 C 11.734375 11.769531 10.945312 11.910156 10.148438 11.992188 C 10.152344 12.039062 10.160156 12.542969 10.160156 12.59375 C 10.160156 13.582031 9.359375 14.378906 8.367188 14.378906 C 7.378906 14.378906 6.574219 13.582031 6.574219 12.59375 C 6.574219 12.546875 6.585938 12.046875 6.585938 12 C 5.789062 11.925781 5 11.785156 4.222656 11.585938 "}),r.createElement("path",{style:{stroke:"none",fillRule:"nonzero",fill:"currentColor",fillOpacity:1},d:"M 4.296875 7.03125 L 4.296875 9.484375 C 5.609375 9.890625 6.976562 10.085938 8.351562 10.070312 C 9.761719 10.078125 11.167969 9.882812 12.523438 9.484375 L 12.523438 7.007812 C 13.460938 6.785156 14.191406 6.050781 14.402344 5.113281 C 14.617188 4.175781 14.277344 3.195312 13.53125 2.589844 C 12.78125 1.984375 11.753906 1.851562 10.878906 2.253906 C 10.742188 0.972656 9.660156 0 8.367188 0 C 7.078125 0 5.996094 0.972656 5.859375 2.253906 C 4.972656 1.855469 3.9375 1.996094 3.191406 2.617188 C 2.445312 3.238281 2.121094 4.230469 2.355469 5.171875 C 2.59375 6.109375 3.347656 6.832031 4.296875 7.03125 "})))}const o=r.forwardRef(a);n.p},228:function(e,t,n){"use strict";n.d(t,"a",(function(){return l}));var i,r,s,a=n(0);function o(){return o=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)({}).hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},o.apply(null,arguments)}function c(e,t){let{title:n,titleId:c,...l}=e;return a.createElement("svg",o({id:"Raggruppa_6521","data-name":"Raggruppa 6521",xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",ref:t,"aria-labelledby":c},l),n?a.createElement("title",{id:c},n):null,i||(i=a.createElement("path",{id:"Tracciato_9186","data-name":"Tracciato 9186",d:"M3.082,17.465A3.583,3.583,0,1,1-.5,21.048,3.587,3.587,0,0,1,3.082,17.465Zm0,5.317a1.734,1.734,0,1,0-1.733-1.734A1.736,1.736,0,0,0,3.082,22.782Z",transform:"translate(0.5 -0.631)",fill:"currentColor"})),r||(r=a.createElement("path",{id:"Tracciato_9187","data-name":"Tracciato 9187",d:"M20.877-.5A3.583,3.583,0,1,1,17.3,3.083,3.587,3.587,0,0,1,20.877-.5Zm0,5.317a1.734,1.734,0,1,0-1.733-1.734A1.736,1.736,0,0,0,20.877,4.817Z",transform:"translate(-0.46 0.5)",fill:"currentColor"})),s||(s=a.createElement("path",{id:"Tracciato_9188","data-name":"Tracciato 9188",d:"M15.966,23.5a5.07,5.07,0,0,1-5.093-5.036V4.536A3.191,3.191,0,0,0,7.667,1.366h-.2A3.191,3.191,0,0,0,4.264,4.536v8.135a.944.944,0,0,1-1.888,0V4.536A5.07,5.07,0,0,1,7.469-.5h.2A5.07,5.07,0,0,1,12.76,4.536V18.463a3.206,3.206,0,0,0,6.412,0V10.328a.944.944,0,0,1,1.888,0v8.135A5.071,5.071,0,0,1,15.966,23.5Z",transform:"translate(0.283 0.5)",fill:"currentColor"})))}const l=a.forwardRef(c);n.p},230:function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));var i,r,s=n(0);function a(){return a=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)({}).hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},a.apply(null,arguments)}function o(e,t){let{title:n,titleId:o,...c}=e;return s.createElement("svg",a({width:24,height:24,viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",ref:t,"aria-labelledby":o},c),n?s.createElement("title",{id:o},n):null,i||(i=s.createElement("defs",null,s.createElement("clipPath",{id:"clip-path"},s.createElement("rect",{transform:"translate(0)",width:24,height:20.326,fill:"currentColor","data-name":"Rettangolo 2256"})))),r||(r=s.createElement("g",{transform:"translate(-443 -449)","data-name":"Raggruppa 5701"},s.createElement("rect",{transform:"translate(443 449)",width:24,height:24,fill:"none","data-name":"Rettangolo 2479"}),s.createElement("g",{transform:"translate(443 451)","data-name":"Raggruppa 5691"},s.createElement("g",{transform:"translate(0)",clipPath:"url(#clip-path)","data-name":"Raggruppa 5159"},s.createElement("path",{transform:"translate(0)",d:"M23.752,1.247a.816.816,0,0,0-.577-.24H20.728c.005-.22.01-.445.01-.673A.333.333,0,0,0,20.4,0H3.588a.333.333,0,0,0-.334.334c0,.23.005.453.01.673H.814A.816.816,0,0,0,0,1.823c0,.162.028,4.005,2.276,6.125a15.017,15.017,0,0,0,4.458,2.711.792.792,0,0,0,.286.051.924.924,0,0,0,.187-.023,29.339,29.339,0,0,0,3.414,2.564.37.37,0,0,0,.033.023V15.2a22.048,22.048,0,0,0-1.98,1.874l-.2,1.039-1.262.786c-.185.137-.253,1.431-.253,1.431h10.09s-.073-1.285-.263-1.431l-1.2-.786-.2-1.037c-1.017-.923-1.593-1.53-2.033-1.861V13.286A27.864,27.864,0,0,0,16.829,10.7a.772.772,0,0,0,.152.015.862.862,0,0,0,.286-.051,15.017,15.017,0,0,0,4.458-2.711C23.972,5.834,24,1.99,24,1.826a.86.86,0,0,0-.248-.579M3.394,6.762a6.952,6.952,0,0,1-1.7-4.122H3.368a13.042,13.042,0,0,0,1.6,5.31A9.959,9.959,0,0,1,3.394,6.762m17.2,0a10.053,10.053,0,0,1-1.535,1.163A13.234,13.234,0,0,0,20.622,2.64H22.3a7.039,7.039,0,0,1-1.709,4.122",fill:"
2currentColor","data-name":"Tracciato 9053"}))))))}const c=s.forwardRef(o);n.p},231:function(e,t,n){"use strict";n.d(t,"a",(function(){return ee})),n.d(t,"b",(function(){return ne}));var i=n(0),r=n.n(i),s=n(79),a=n(709),o=n(28),c=n(36),l=n(205),d=n(206),u=n(220),h=n(192),p=n(163),m=n(188),g=n(200),f=n(685),b=n(645),y=n(5),j=n(27),_=n(20),v=n(35),x=n(37),O=n(55),T=n(198),S=n(204),w=n(232),A=n(191),k=n(111),C=n(705),E=n(720),I=n(717),D=n(738),P=n(729),R=n(229),L=n.n(R),M=n(246),N=n(270),B=n.n(N),U=n(271),F=n.n(U),z=n(266),q=n.n(z),H=n(263),V=n.n(H),W=n(199),G=n.n(W),X=n(214),Y=n.n(X),K=n(1);const Q=e=>{const{t:t}=Object(s.a)(),{setTab:n}=e,{toggleAuthDialog:i}=r.a.useContext(O.a),{request:a,cancelToken:o}=r.a.useContext(v.a),{auth:c,login:l}=r.a.useContext(_.a),[d,u]=r.a.useState({register_step:"user-profile",first_name:"",last_name:"",mobile_phone:"",location:"",location_id:"",birthday:"",flag_horeca:null});return Object(K.jsxs)(k.a,{px:4,pb:7,children:[Object(K.jsx)(C.a,{container:!0,children:Object(K.jsx)(C.a,{item:!0,xs:!0,children:Object(K.jsxs)(k.a,{mb:6,children:[Object(K.jsx)(E.a,{variant:"subtitle1",children:"1/2"}),Object(K.jsx)(E.a,{variant:"h4",children:Object(K.jsx)("b",{children:t("Dicci qualcosa di te!")})}),Object(K.jsx)(E.a,{variant:"h6",children:t("Ci aiuter\xe0 a migliorare la tua esperienza in piattaforma.")})]})})}),Object(K.jsxs)(C.a,{container:!0,spacing:4,sx:{mb:2},children:[Object(K.jsx)(C.a,{item:!0,xs:12,sm:6,children:Object(K.jsx)(T.b,{fullWidth:!0,label:t("Nome"),value:d.first_name,onChange:e=>u({...d,first_name:e.target.value})})}),Object(K.jsx)(C.a,{item:!0,xs:12,sm:6,children:Object(K.jsx)(T.b,{fullWidth:!0,label:t("Cognome"),value:d.last_name,onChange:e=>u({...d,last_name:e.target.value})})})]}),Object(K.jsxs)(C.a,{container:!0,spacing:4,sx:{mb:2},children:[Object(K.jsx)(C.a,{item:!0,xs:12,sm:6,children:Object(K.jsx)(T.b,{fullWidth:!0,label:t("Data di nascita"),type:"date",value:d.birthday,onChange:e=>u({...d,birthday:e.target.value}),InputLabelProps:{shrink:!0}})}),Object(K.jsx)(C.a,{item:!0,xs:12,sm:6,children:Object(K.jsx)(w.a,{initialValue:d.location,formParams:d,handleAddressSelect:e=>{u((t=>({...t,location_id:e.place_id,location:e.formatted_address})))},renderInput:e=>Object(K.jsx)(T.b,{...e,label:t("Citt\xe0"),fullWidth:!0})})})]}),Object(K.jsxs)(C.a,{container:!0,spacing:4,sx:{mb:2},children:[Object(K.jsx)(C.a,{item:!0,xs:12,sm:6,children:Object(K.jsx)(T.b,{fullWidth:!0,label:t("Numero cellulare"),value:d.mobile_phone,onChange:e=>u({...d,mobile_phone:e.target.value})})}),Object(K.jsxs)(C.a,{item:!0,xs:12,sm:6,children:[Object(K.jsx)(E.a,{children:t("Lavori nel mondo Food & Beverage?")}),Object(K.jsx)(S.a,{label:t("Si"),checked:d.flag_horeca,onChange:e=>u({...d,flag_horeca:!0})}),Object(K.jsx)(S.a,{label:t("No"),checked:!1===d.flag_horeca,onChange:e=>u({...d,flag_horeca:!1})})]})]}),Object(K.jsx)(C.a,{container:!0,spacing:4,children:Object(K.jsx)(C.a,{item:!0,xs:12,sx:{display:"flex",alignItems:"center",justifyContent:"center"},children:Object(K.jsxs)(k.a,{textAlign:"center",children:[Object(K.jsx)(A.a,{fullWidth:g.isMobileOnly,color:"primary",onClick:()=>(async()=>{const e=o.source();await a("put","/v2/user",e.token,d)&&(l({...c.user,data:{...c.user.data,...d}}),n("user-interests"))})(),sx:{mb:2,fontSize:"1.2rem",px:{sm:10}},children:t("Conferma i dati")}),Object(K.jsx)(E.a,{color:"textSecondary",onClick:()=>i(!1),children:t("Non adesso")})]})})})]})},Z=Object(b.a)(k.a)((e=>{let{theme:t}=e;return{position:"absolute",top:"10px",right:"10px"}})),J=Object(f.a)((e=>({imageList:{width:"100%",height:"auto",transform:"translateZ(0)"},image:{borderRadius:"15px",width:"100%"},titleBar:{background:"transparent"},icon:{color:"white",fontSize:"2rem"},imageListItem:{},imageListItemItem:{overflow:"visible"},imageListItemSelected:{position:"relative","&:after":{border:"4px solid white",borderRadius:"15px",position:"absolute",content:'""',top:0,left:0,width:"100%",height:"100%",boxSizing:"border-box"}},forward:{position:"absolute",top:"50%",right:"-10px",color:"#c8ccd0"},backward:{position:"absolute",top:"50%",left:"-10px",color:"#c8ccd0"}}))),$=e=>{const{t:t}=Object(s.a)(),n=J(),{login:i,auth:a}=r.a.useContext(_.a),{request:l,cancelToken:d}=r.a.useContext(v.a),{toggleAuthDialog:u}=r.a.useContext(O.a),[p,f]=r.a.useState(!1),[b,y]=r.a.useState([]),[j,x]=r.a.useState([]),[T,S]=r.a.useState(0),w=Object(m.n)(b,g.isMobileOnly?6:24),D=async e=>{f(!0),e.preventDefault();const t=d.source();await l("put","/v2/user",t.token,{register_step:"user-interests",interests:j})?(async()=>{const e=d.source(),t=await l("get","/v2/me",e.token);t?(i({token:a.user.token,data:t}),Object(o.e)(Object(o.g)({event:"signup_completed"},t)),Object(o.a)("signup_preferences"),u(!1)):f(!1)})():f(!1)};return r.a.useEffect((()=>{(async()=>{const e=d.source(),t=await l("get","/v2/tags/user-interests",e.token);t&&y(t.tags)})()}),[]),Object(K.jsxs)(k.a,{px:4,pb:4,children:[Object(K.jsx)(C.a,{container:!0,children:Object(K.jsx)(C.a,{item:!0,xs:!0,children:Object(K.jsxs)(k.a,{mb:2,children:[Object(K.jsx)(E.a,{variant:"subtitle1",children:"2/2"}),Object(K.jsx)(E.a,{variant:"h4",children:Object(K.jsx)("b",{children:t("Dicci qualcosa di te!")})}),Object(K.jsx)(E.a,{variant:"h6",children:t("Quali sono i tuoi interessi in cucina?")})]})})}),Object(K.jsxs)(k.a,{position:"relative",px:{xs:0,md:6},mt:3,children:[T>0&&Object(K.jsx)(I.a,{className:n.backward,onClick:()=>S(T-1),size:"large",children:Object(K.jsx)(Y.a,{})}),T<w.length-1&&Object(K.jsx)(I.a,{className:n.forward,onClick:()=>S(T+1),size:"large",children:Object(K.jsx)(G.a,{})}),Object(K.jsx)(L.a,{index:T,onChangeIndex:e=>{S({index:e})},enableMouseEvents:!0,children:w.map(((e,t)=>Object(K.jsx)(C.a,{container:!0,spacing:1,children:e.map((e=>{const t=j.indexOf(e.id)>-1;return Object(K.jsxs)(C.a,{item:!0,xs:6,sm:3,md:2,children:[Object(K.jsxs)(k.a,{position:"relative",className:Object(c.a)(n.imageListItem,{[n.imageListItemSelected]:t}),onClick:()=>{return t=e.id,void x((e=>{const n=[...e],i=e.indexOf(t);return i>-1?n.splice(i,1):n.push(t),n}));var t},children:[t&&Object(K.jsx)(Z,{children:Object(K.jsx)(V.a,{className:n.icon})}),Object(K.jsx)(h.a,{className:n.image,src:e.img_cover,alt:e.title,useSet:{sizes:[["down","md","50vw"],["150px"]]}})]}),Object(K.jsx)(k.a,{mt:1,children:Object(K.jsx)(E.a,{children:e.title})})]},e.id)}))},"chunk"+t)))})]}),Object(K.jsx)(C.a,{container:!0,children:Object(K.jsxs)(C.a,{item:!0,xs:!0,children:[Object(K.jsx)(k.a,{mt:4,textAlign:"center",children:Object(K.jsx)(A.a,{fullWidth:g.isMobileOnly,color:"primary",onClick:e=>D(e),sx:{mb:2,fontSize:"1.2rem",px:{sm:15}},loading:p,children:t("Prosegui")})}),Object(K.jsx)(k.a,{textAlign:"center",children:Object(K.jsx)(E.a,{color:"textSecondary",onClick:()=>u(!1),children:t("Non adesso")})})]})})]})},ee=e=>{const{t:t,i18n:n}=Object(s.a)(),i=Object(y.i)(),c=Object(y.h)(),{buy:u,courseId:h}=Object(y.j)(),{auth:m,login:g}=r.a.useContext(_.a),{config:f}=r.a.useContext(x.a),{request:b,cancelToken:w}=r.a.useContext(v.a),{showError:R}=r.a.useContext(O.a),[L,N]=r.a.useState(!1),[U,z]=r.a.useState(!1),[H,V]=r.a.useState(!1),[W,G]=r.a.useState({email:sessionStorage.getItem("register-email")||"",password:"",flag_updates:!1}),X=new URLSearchParams(i.search),Y=new URLSearchParams(i.hash.substring(1)),Q=JSON.parse(Y.get("state")),[Z,J,$]=Object(p.a)(["referrals"]),ee=X.has("to")?X.get("to"):!(!Q||!Q.to)&&Q.to;ee&&localStorage.setItem("redirectTo",ee);return r.a.useEffect((()=>
2{if(Boolean(m.user)&&Boolean(m.user.data)){Object(o.e)({event:"register",event_id:"05",event_trigger:"GAevent",lead_email:m.user.data.email,event_detail:u?"buy_"+o.f[u]:null});const e=localStorage.getItem("redirectTo");e&&!Boolean(u)?c.push(e):(i.state&&i.state.from&&!Boolean(u)&&c.push(i.state.from),i.state&&i.state.from||Boolean(u)||c.push("/"))}}),[m.user]),Object(K.jsx)(k.a,{children:Object(K.jsx)(C.a,{container:!0,children:Object(K.jsxs)(C.a,{item:!0,xs:!0,children:[Object(K.jsx)(k.a,{mb:2,children:Object(K.jsx)(E.a,{variant:"h5",color:"dark.main",children:Object(K.jsx)("b",{children:Boolean(u)?t("Registrati e vai al pagamento"):t("Iscriviti ad Acad\xe8mia.tv")})})}),Object(K.jsxs)("form",{onSubmit:e=>(async e=>{if(e.preventDefault(),!W.flag_updates)return void R({error_message:t("Devi accettare le Privacy Policy per proseguire!")});N(!0);const n=w.source();let i={...W};const r=Z.referrals||null,s=sessionStorage.getItem("x-cic-referral-code"),a=sessionStorage.getItem("x-cic-campaign");s&&(i.referrals={friend_invite:s}),a&&(i.referrals={campaign_id:a}),r&&(i.referrals={...i.referrals,...r},$("referrals",{path:"/"}));const c=await b("post","/v2/register",n.token,i);c?(Object(o.a)("signup_data"),g({token:c.token.token,data:{id:c.token.user_id,email:W.email,profile_status:c.profile_status}})):N(!1)})(e),autoComplete:"new-password",children:[Object(K.jsx)(k.a,{my:2,children:Object(K.jsx)(T.b,{fullWidth:!0,className:"light",label:t("Email"),value:W.email,autoComplete:"new-password",onChange:e=>G({...W,email:e.target.value})})}),Object(K.jsx)(k.a,{mb:2,children:Object(K.jsx)(T.b,{fullWidth:!0,className:"light",type:U?"text":"password",label:t("Password"),autoComplete:"new-password",value:W.password,onChange:e=>G({...W,password:e.target.value}),InputProps:{endAdornment:Object(K.jsx)(D.a,{position:"end",children:Object(K.jsx)(I.a,{"aria-label":t("toggle password visibility"),onClick:()=>z(!U),onMouseDown:e=>e.preventDefault(),edge:"end",style:{color:"#B2B8BD"},size:"large",children:U?Object(K.jsx)(B.a,{}):Object(K.jsx)(F.a,{})})})}})}),Object(K.jsxs)(k.a,{pl:1,mb:2,children:[Object(K.jsx)(E.a,{variant:"caption",children:t("La password deve avere almeno:")}),Object(K.jsxs)(k.a,{children:[Object(K.jsx)(E.a,{component:"span",color:"textSecondary",style:/^(.*[a-zA-Z].*)$/.test(W.password)?{color:"#46c455"}:{},children:Object(K.jsx)(q.a,{style:{fontSize:"0.75rem",verticalAlign:"middle",marginRight:"10px"}})}),Object(K.jsx)(E.a,{variant:"caption",children:t("una lettera")})]}),Object(K.jsxs)(k.a,{children:[Object(K.jsx)(E.a,{component:"span",color:"textSecondary",style:/^(.*\d.*)$/.test(W.password)?{color:"#46c455"}:{},children:Object(K.jsx)(q.a,{style:{fontSize:"0.75rem",verticalAlign:"middle",marginRight:"10px"}})}),Object(K.jsx)(E.a,{variant:"caption",children:t("un numero")})]}),Object(K.jsxs)(k.a,{children:[Object(K.jsx)(E.a,{color:"textSecondary",component:"span",style:/^(?=.*[@#.\u20ac_&-,+()*:;!?])/.test(W.password)?{color:"#46c455"}:{},children:Object(K.jsx)(q.a,{style:{fontSize:"0.75rem",verticalAlign:"middle",marginRight:"10px"}})}),Object(K.jsxs)(E.a,{variant:"caption",children:[t("un simbolo")," @#.\u20ac_&-,+()*:;!?"]})]}),Object(K.jsxs)(k.a,{children:[Object(K.jsx)(E.a,{color:"textSecondary",component:"span",style:/^.{8,}$/.test(W.password)?{color:"#46c455"}:{},children:Object(K.jsx)(q.a,{style:{fontSize:"0.75rem",verticalAlign:"middle",marginRight:"10px"}})}),Object(K.jsx)(E.a,{variant:"caption",children:t("8 caratteri")})]})]}),Object(K.jsx)(k.a,{children:Object(K.jsx)(S.a,{label:Object(K.jsxs)(K.Fragment,{children:[Object(K.jsx)(E.a,{variant:"caption",component:"div",gutterBottom:!0,children:Object(K.jsxs)(a.a,{t:t,children:["Compilando il form accetto la ",Object(K.jsx)(P.a,{color:"inherit",onClick:()=>window.open(d.a[n.language.split("-")[0]],"_blank"),children:"Privacy e Policy"})]})}),Object(K.jsx)(E.a,{variant:"caption",component:"div",gutterBottom:!0,children:Object(K.jsxs)(a.a,{t:t,children:["Procedendo acconsenti ai nostri ",Object(K.jsx)(P.a,{color:"inherit",onClick:()=>window.open(l.a[n.language.split("-")[0]],"_blank"),sx:{cursor:"pointer"},children:"T&Cs"}),"."]})}),Object(K.jsx)(E.a,{variant:"caption",component:"div",children:t("Sono consapevole che gli abbonamenti sono soggetti a rinnovo automatico a prezzo pieno")})]}),checked:W.flag_updates,onChange:e=>G({...W,flag_updates:!W.flag_updates}),sx:{"& .checked":{backgroundColor:"#fff",border:"1px solid #B3B8BD","&:before":{backgroundColor:"#41474E"}},"& .unchecked":{backgroundColor:"#fff",border:"1px solid #B3B8BD"}}})}),H&&Object(K.jsx)(k.a,{sx:{mt:1},children:Object(K.jsx)(E.a,{color:"primary",variant:"caption",children:t("Per iscriversi \xe8 necessario accettare i termini e condizioni")})}),Object(K.jsx)(k.a,{mt:2,children:Object(K.jsx)(A.a,{disabled:!Boolean(W.email)||!W.flag_updates||!new RegExp(f.password_policy).test(W.password),fullWidth:!0,size:"large",type:"submit",color:"primary",loading:L,children:t("Registrati")})}),Object(K.jsx)(k.a,{my:2,textAlign:"center",children:Object(K.jsx)(A.c,{fullWidth:!0,size:"large",variant:"contained",color:"dark",disabled:L,setLoading:N,provider:"google",...W.flag_updates||Y.has("id_token")?{socialCallBack:e=>{(async(e,t)=>{const n=w.source();let i={provider:e,token:t};const r=Z.referrals||null,s=sessionStorage.getItem("x-cic-referral-code"),a=sessionStorage.getItem("x-cic-campaign");s&&(i.referrals={friend_invite:s}),a&&(i.referrals={campaign_id:a}),r&&(i.referrals={...i.referrals,...r},$("referrals",{path:"/"}));
2const c=await b("post","/v2/login",n.token,i);c?("fb"===e&&Object(o.a)("signup_facebook"),"ggl"===e&&Object(o.a)("signup_google"),"app"===e&&Object(o.a)("signup_apple"),g({token:c.token.token,data:{profile_status:c.profile_status}})):N(!1)})("ggl",e)}}:{onClick:()=>{V(!0)}},startIcon:Object(K.jsx)(M.c,{}),children:t("Accedi con Google")})}),Object(K.jsxs)(k.a,{mt:4,textAlign:"center",children:[Object(K.jsx)(E.a,{color:"dark.main",variant:"body2",children:t("Hai gi\xe0 un account?")}),Object(K.jsx)(E.a,{children:Object(K.jsx)(P.a,{component:j.b,color:"dark.main",to:{pathname:"/"+n.language+"/auth/login"+(u?"/"+u+"/"+(h||""):""),search:i.search,state:{...i.state}},underline:"hover",children:Object(K.jsx)("b",{children:t("Accedi")})})})]})]})]})})})},te=(Object(f.a)((e=>({social:{margin:e.spacing(1)}}))),e=>{const{setTab:t}=e,{t:n}=Object(s.a)(),{auth:i}=r.a.useContext(_.a),{request:a,cancelToken:o}=r.a.useContext(v.a),{toggleAuthDialog:c}=r.a.useContext(O.a),[l,d]=r.a.useState(!1),[u,h]=r.a.useState(""),p=sessionStorage.getItem("checkout-purchase-id");return Object(K.jsxs)(k.a,{px:4,pb:4,children:[Object(K.jsx)(C.a,{container:!0,children:Object(K.jsx)(C.a,{item:!0,xs:!0,children:Object(K.jsxs)(k.a,{mb:2,children:[Object(K.jsx)(E.a,{variant:"subtitle1",children:"1/3"}),Object(K.jsx)(E.a,{variant:"h4",children:Object(K.jsx)("b",{children:n("Inserisci il numero della tua tessera Volare")})}),Object(K.jsx)(E.a,{variant:"h6",children:n("Guadagna 10 punti per ogni \u20ac speso")})]})})}),Object(K.jsx)(k.a,{sx:{py:3,textAlign:"center"},children:Object(K.jsx)(T.b,{sx:{width:343},label:n("N\xb0Tessera Volare"),value:u,onChange:e=>h(e.target.value)})}),Object(K.jsx)(C.a,{container:!0,children:Object(K.jsxs)(C.a,{item:!0,xs:!0,children:[Object(K.jsx)(k.a,{mt:4,textAlign:"center",children:Object(K.jsx)(A.a,{fullWidth:g.isMobileOnly,color:"primary",onClick:e=>(async e=>{d(!0),e.preventDefault();const n=o.source();await a("post","/v2/purchases/"+p+"/referral/volare",n.token,{referral_code:u})&&(localStorage.setItem("saved-volare-card",1),sessionStorage.removeItem("checkout-purchase-id"),i.user.data.profile_status.completed?c(!1):t(i.user.data.profile_status.next_step)),d(!1)})(e),sx:{mb:2,fontSize:"1.2rem",px:{sm:15}},loading:l,children:n("Conferma dati")})}),Object(K.jsx)(k.a,{textAlign:"center",children:Object(K.jsx)(E.a,{color:"textSecondary",onClick:()=>c(!1),children:n("Non adesso")})})]})})]})}),ne=()=>{const{auth:e}=r.a.useContext(_.a),t=sessionStorage.getItem("checkout-purchase-id"),[n,i]=r.a.useState(Boolean(t)?"volare-card":e.user.data.profile_status.next_step);return Object(K.jsxs)(k.a,{children:[Object(K.jsx)(u.a,{value:n,index:"volare-card",children:Object(K.jsx)(te,{setTab:i})}),Object(K.jsx)(u.a,{value:n,index:"user-interests",children:Object(K.jsx)($,{setTab:i})}),Object(K.jsx)(u.a,{value:n,index:"user-profile",children:Object(K.jsx)(Q,{setTab:i})})]})}},232:function(e,t,n){"use strict";var i=n(0),r=n.n(i),s=n(79),a=n(188),o=n(198),c=n(708),l=n(280),d=n.n(l),u=n(705),h=n(720),p=n(111),m=n(685),g=n(278),f=n.n(g),b=n(279),y=n.n(b),j=n(1);const _={current:null},v={current:null},x=Object(m.a)((e=>({icon:{color:e.palette.text.secondary,marginRight:e.spacing(2)}})));t.a=e=>{const{i18n:t}=Object(s.a)(),[n,i]=(x(),r.a.useState(null)),[l,m]=r.a.useState(""),[g,b]=r.a.useState([]),O=r.a.useRef(!1);"undefined"===typeof window||O.current||(document.querySelector("#google-maps")||Object(a.g)("https://maps.googleapis.com/maps/api/js?key=AIzaSyBu2G_lY5DD9AxeU70GbKkmS6DAFtnq0ws&libraries=places",document.querySelector("head"),"google-maps"),O.current=!0);const T=r.a.useMemo((()=>y()(((e,n)=>{_.current.getPlacePredictions({...e,types:["(cities)"],componentRestrictions:{country:t.language}},n)}),200)),[]),S=r.a.useMemo((()=>y()((t=>{v.current.getDetails({placeId:t},(t=>{e.handleAddressSelect(t,e.formParams)}))}),200)),[e.formParams]);return r.a.useEffect((()=>{let e=!0;if(!_.current&&window.google&&window.google.maps&&(_.current=new window.google.maps.places.AutocompleteService,v.current=new window.google.maps.places.PlacesService(document.createElement("div"))),_.current){if(""!==l)return T({input:l},(t=>{if(e){let e=[];n&&(e=[n]),t&&(e=[...e,...t]),b(e)}})),()=>{e=!1};b(n?[n]:[])}}),[n,l,T]),r.a.useEffect((()=>{e.initialValue&&(b([{description:e.initialValue}]),i({description:e.initialValue}))}
2),[e.initialValue]),Object(j.jsx)(c.a,{id:"google-autocomplete",getOptionLabel:e=>"string"===typeof e?e:e.description,filterOptions:e=>e,options:g,autoComplete:!0,includeInputInList:!0,filterSelectedOptions:!0,disableClearable:!0,value:n,onChange:(e,t)=>{t&&S(t.place_id),b(t?[t,...g]:g),i(t)},onInputChange:(e,t)=>{m(t)},renderInput:Boolean(e.renderInput)?e.renderInput:t=>Object(j.jsx)(o.b,{...t,label:e.label,fullWidth:!0}),renderOption:(e,t)=>{if(Boolean(t.structured_formatting)){const n=t.structured_formatting.main_text_matched_substrings,i=f()(t.structured_formatting.main_text,n.map((e=>[e.offset,e.offset+e.length])));return Object(j.jsx)("li",{...e,children:Object(j.jsxs)(u.a,{container:!0,alignItems:"center",children:[Object(j.jsx)(u.a,{item:!0,children:Object(j.jsx)(p.a,{component:d.a,sx:{color:"text.secondary",mr:2}})}),Object(j.jsxs)(u.a,{item:!0,xs:!0,children:[i.map(((e,t)=>Object(j.jsx)(h.a,{component:"span",variant:"body1",sx:{fontWeight:e.highlight?700:400,color:"#000"},children:e.text},t))),Object(j.jsx)(h.a,{variant:"body2",color:"textSecondary",children:t.structured_formatting.secondary_text})]})]})})}return Object(j.jsx)("li",{...e,children:Object(j.jsxs)(u.a,{container:!0,alignItems:"center",children:[Object(j.jsx)(u.a,{item:!0,children:Object(j.jsx)(p.a,{component:d.a,sx:{color:"text.secondary",mr:2}})}),Object(j.jsx)(u.a,{item:!0,xs:!0,children:Object(j.jsx)(h.a,{component:"span",variant:"body1",sx:{fontWeight:700,color:"#000"},children:t.description})})]})})}})}},236:function(e,t,n){"use strict";var i=n(0),r=n.n(i),s=n(188);t.a=e=>{const{img:t}=e,n=r.a.useRef(),[i,a]=r.a.useState(0),[o,c]=r.a.useState();return r.a.useEffect((()=>{if(!n.current)return;const e=n.current,t=()=>{a(e.clientWidth||0)};t();const i=new ResizeObserver((()=>{t()}));return i.observe(e),()=>i.disconnect()}),[]),r.a.useEffect((()=>{if(t&&n.current){let e=i||n.current.clientWidth;e=e>200?e:200,c("\n image-set(\n ".concat(["url(".concat(Object(s.m)(t,e),") 1x"),"url(".concat(Object(s.m)(t,Math.round(1.5*e)),") 1.5x"),"url(".concat(Object(s.m)(t,Math.round(2*e)),") 2x")].join(", "),"\n )"))}}),[t,i]),{imageSet:o,ref:n}}},237:function(e,t,n){(function(t){var i,r="undefined"!==typeof t?t:"undefined"!==typeof window?window:{},s=n(291);"undefined"!==typeof document?i=document:(i=r["__GLOBAL_DOCUMENT_CACHE@4"])||(i=r["__GLOBAL_DOCUMENT_CACHE@4"]=s),e.exports=i}).call(this,n(112))},243:function(e,t,n){"use strict";t.a=n.p+"static/media/icona-play.74a9d070.png"},244:function(e,t,n){"use strict";var i=n(0),r=n.n(i);var s=(e,t)=>{const[n,i]=r.a.useState(!1);return r.a.useEffect((()=>{const n=new IntersectionObserver(((e,t)=>{e[0].isIntersecting&&(i(!0),t.unobserve(e[0].target),t.disconnect())}),t);return e.current&&n.observe(e.current),()=>n.disconnect()}),[e]),n},a=n(111),o=n(333),c=n(221),l=n(1);const d=e=>{const{smallerImage:t,cols:n,width:i,sx:r,sliderProps:s}=e;return Object(l.jsx)(c.a,{...s,children:Array.from({length:n},((e,s)=>Object(l.jsx)(a.a,{sx:{borderRadius:"10px",overflow:"hidden",width:i||100/n+"%",minWidth:i||346},children:Object(l.jsx)(o.a,{variant:"rect",sx:{height:{xs:t?160:220,lg:n&&2===n?300:t?160:220},...r}})},s)))})};t.a=e=>{const{children:t,loadingProps:n,loadContent:o,LoadingComponent:c}=e,u=Object(i.useRef)(null),h=s(u),[p,m]=r.a.useState(!!o);return r.a.useEffect((()=>{h&&o&&(m(!0),o().then((()=>{setTimeout((()=>{m(!1)}),100)})))}),[h]),Object(l.jsx)(a.a,{ref:u,children:h&&!p?Object(l.jsx)(l.Fragment,{children:t}):Object(l.jsx)(l.Fragment,{children:c?Object(l.jsx)(c,{}):Object(l.jsx)(d,{...n})})})}},247:function(e,t,n){"use strict";var i=n(189);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=i(n(190)),s=n(1),a=(0,r.default)((0,s.jsx)("path",{d:"M17 3H7c-1.1 0-1.99.9-1.99 2L5 21l7-3 7 3V5c0-1.1-.9-2-2-2z"}),"Bookmark");t.default=a},248:function(e,t,n){"use strict";var i=n(189);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=i(n(190)),s=n(1),a=(0,r.default)((0,s.jsx)("path",{d:"M9 16.17 4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z"}),"Check");t.default=a},249:function(e,t,n){"use strict";var i=n(189);
2Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=i(n(190)),s=n(1),a=(0,r.default)((0,s.jsx)("path",{d:"M17 3H7c-1.1 0-1.99.9-1.99 2L5 21l7-3 7 3V5c0-1.1-.9-2-2-2zm0 15-5-2.18L7 18V5h10v13z"}),"BookmarkBorder");t.default=a},251:function(e,t,n){"use strict";(function(e){var i=n(303),r=n(304),s=n(305);function a(){return c.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function o(e,t){if(a()<t)throw new RangeError("Invalid typed array length");return c.TYPED_ARRAY_SUPPORT?(e=new Uint8Array(t)).__proto__=c.prototype:(null===e&&(e=new c(t)),e.length=t),e}function c(e,t,n){if(!c.TYPED_ARRAY_SUPPORT&&!(this instanceof c))return new c(e,t,n);if("number"===typeof e){if("string"===typeof t)throw new Error("If encoding is specified then the first argument must be a string");return u(this,e)}return l(this,e,t,n)}function l(e,t,n,i){if("number"===typeof t)throw new TypeError('"value" argument must not be a number');return"undefined"!==typeof ArrayBuffer&&t instanceof ArrayBuffer?function(e,t,n,i){if(t.byteLength,n<0||t.byteLength<n)throw new RangeError("'offset' is out of bounds");if(t.byteLength<n+(i||0))throw new RangeError("'length' is out of bounds");t=void 0===n&&void 0===i?new Uint8Array(t):void 0===i?new Uint8Array(t,n):new Uint8Array(t,n,i);c.TYPED_ARRAY_SUPPORT?(e=t).__proto__=c.prototype:e=h(e,t);return e}(e,t,n,i):"string"===typeof t?function(e,t,n){"string"===typeof n&&""!==n||(n="utf8");if(!c.isEncoding(n))throw new TypeError('"encoding" must be a valid string encoding');var i=0|m(t,n);e=o(e,i);var r=e.write(t,n);r!==i&&(e=e.slice(0,r));return e}(e,t,n):function(e,t){if(c.isBuffer(t)){var n=0|p(t.length);return 0===(e=o(e,n)).length||t.copy(e,0,0,n),e}if(t){if("undefined"!==typeof ArrayBuffer&&t.buffer instanceof ArrayBuffer||"length"in t)return"number"!==typeof t.length||(i=t.length)!==i?o(e,0):h(e,t);if("Buffer"===t.type&&s(t.data))return h(e,t.data)}var i;throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}(e,t)}function d(e){if("number"!==typeof e)throw new TypeError('"size" argument must be a number');if(e<0)throw new RangeError('"size" argument must not be negative')}function u(e,t){if(d(t),e=o(e,t<0?0:0|p(t)),!c.TYPED_ARRAY_SUPPORT)for(var n=0;n<t;++n)e[n]=0;return e}function h(e,t){var n=t.length<0?0:0|p(t.length);e=o(e,n);for(var i=0;i<n;i+=1)e[i]=255&t[i];return e}function p(e){if(e>=a())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+a().toString(16)+" bytes");return 0|e}function m(e,t){if(c.isBuffer(e))return e.length;if("undefined"!==typeof ArrayBuffer&&"function"===typeof ArrayBuffer.isView&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer))return e.byteLength;"string"!==typeof e&&(e=""+e);var n=e.length;if(0===n)return 0;for(var i=!1;;)switch(t){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":case void 0:return z(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return q(e).length;default:if(i)return z(e).length;t=(""+t).toLowerCase(),i=!0}}function g(e,t,n){var i=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return"";if((n>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return E(this,t,n);case"utf8":case"utf-8":return w(this,t,n);case"ascii":return k(this,t,n);case"latin1":case"binary":return C(this,t,n);case"base64":return S(this,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return I(this,t,n);default:if(i)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),i=!0}}function f(e,t,n){var i=e[t];e[t]=e[n],e[n]=i}function b(e,t,n,i,r){if(0===e.length)return-1;if("string"===typeof n?(i=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),n=+n,isNaN(n)&&(n=r?0:e.length-1),n<0&&(n=e.length+n),n>=e.length){if(r)return-1;n=e.length-1}else if(n<0){if(!r)return-1;n=0}if("string"===typeof t&&(t=c.from(t,i)),c.isBuffer(t))return 0===t.length?-1:y(e,t,n,i,r);if("number"===typeof t)return t&=255,c.TYPED_ARRAY_SUPPORT&&"function"===typeof Uint8Array.prototype.indexOf?r?Uint8Array.prototype.indexOf.call(e,t,n):Uint8Array.prototype.lastIndexOf.call(e,t,n):y(e,[t],n,i,r);throw new TypeError("val must be string, number or Buffer")}function y(e,t,n,i,r){var s,a=1,o=e.length,c=t.length;if(void 0!==i&&("ucs2"===(i=String(i).toLowerCase())||"ucs-2"===i||"utf16le"===i||"utf-16le"===i)){if(e.length<2||t.length<2)return-1;a=2,o/=2,c/=2,n/=2}function l(e,t){return 1===a?e[t]:e.readUInt16BE(t*a)}if(r){var d=-1;for(s=n;s<o;s++)if(l(e,s)===l(t,-1===d?0:s-d)){if(-1===d&&(d=s),s-d+1===c)return d*a}else-1!==d&&(s-=s-d),d=-1}else for(n+c>o&&(n=o-c),s=n;s>=0;s--){for(var u=!0,h=0;h<c;h++)if(l(e,s+h)!==l(t,h)){u=!1;break}if(u)return s}return-1}function j(e,t,n,i){n=Number(n)||0;var r=e.length-n;i?(i=Number(i))>r&&(i=r):i=r;var s=t.length;if(s%2!==0)throw new TypeError("Invalid hex string");i>s/2&&(i=s/2);for(var a=0;a<i;++a){var o=parseInt(t.substr(2*a,2),16);if(isNaN(o))return a;e[n+a]=o}return a}function _(e,t,n,i){return H(z(t,e.length-n),e,n,i)}function v(e,t,n,i){return H(function(e){for(var t=[],n=0;n<e.length;++n)t.push(255&e.charCodeAt(n));return t}(t),e,n,i)}function x(e,t,n,i){return v(e,t,n,i)}function O(e,t,n,i){return H(q(t),e,n,i)}function T(e,t,n,i){return H(function(e,t){for(var n,i,r,s=[],a=0;a<e.length&&!((t-=2)<0);++a)i=(n=e.charCodeAt(a))>>8,r=n%256,s.push(r),s.push(i);return s}(t,e.length-n),e,n,i)}
vendor: 5,513 bytes, line 2
2function S(e,t,n){return 0===t&&n===e.length?i.fromByteArray(e):i.fromByteArray(e.slice(t,n))}function w(e,t,n){n=Math.min(e.length,n);for(var i=[],r=t;r<n;){var s,a,o,c,l=e[r],d=null,u=l>239?4:l>223?3:l>191?2:1;if(r+u<=n)switch(u){case 1:l<128&&(d=l);break;case 2:128===(192&(s=e[r+1]))&&(c=(31&l)<<6|63&s)>127&&(d=c);break;case 3:s=e[r+1],a=e[r+2],128===(192&s)&&128===(192&a)&&(c=(15&l)<<12|(63&s)<<6|63&a)>2047&&(c<55296||c>57343)&&(d=c);break;case 4:s=e[r+1],a=e[r+2],o=e[r+3],128===(192&s)&&128===(192&a)&&128===(192&o)&&(c=(15&l)<<18|(63&s)<<12|(63&a)<<6|63&o)>65535&&c<1114112&&(d=c)}null===d?(d=65533,u=1):d>65535&&(d-=65536,i.push(d>>>10&1023|55296),d=56320|1023&d),i.push(d),r+=u}return function(e){var t=e.length;if(t<=A)return String.fromCharCode.apply(String,e);var n="",i=0;for(;i<t;)n+=String.fromCharCode.apply(String,e.slice(i,i+=A));return n}(i)}t.Buffer=c,t.SlowBuffer=function(e){+e!=e&&(e=0);return c.alloc(+e)},t.INSPECT_MAX_BYTES=50,c.TYPED_ARRAY_SUPPORT=void 0!==e.TYPED_ARRAY_SUPPORT?e.TYPED_ARRAY_SUPPORT:function(){try{var e=new Uint8Array(1);return e.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===e.foo()&&"function"===typeof e.subarray&&0===e.subarray(1,1).byteLength}catch(t){return!1}}(),t.kMaxLength=a(),c.poolSize=8192,c._augment=function(e){return e.__proto__=c.prototype,e},c.from=function(e,t,n){return l(null,e,t,n)},c.TYPED_ARRAY_SUPPORT&&(c.prototype.__proto__=Uint8Array.prototype,c.__proto__=Uint8Array,"undefined"!==typeof Symbol&&Symbol.species&&c[Symbol.species]===c&&Object.defineProperty(c,Symbol.species,{value:null,configurable:!0})),c.alloc=function(e,t,n){return function(e,t,n,i){return d(t),t<=0?o(e,t):void 0!==n?"string"===typeof i?o(e,t).fill(n,i):o(e,t).fill(n):o(e,t)}(null,e,t,n)},c.allocUnsafe=function(e){return u(null,e)},c.allocUnsafeSlow=function(e){return u(null,e)},c.isBuffer=function(e){return!(null==e||!e._isBuffer)},c.compare=function(e,t){if(!c.isBuffer(e)||!c.isBuffer(t))throw new TypeError("Arguments must be Buffers");if(e===t)return 0;for(var n=e.length,i=t.length,r=0,s=Math.min(n,i);r<s;++r)if(e[r]!==t[r]){n=e[r],i=t[r];break}return n<i?-1:i<n?1:0},c.isEncoding=function(e){switch(String(e).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},c.concat=function(e,t){if(!s(e))throw new TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return c.alloc(0);var n;if(void 0===t)for(t=0,n=0;n<e.length;++n)t+=e[n].length;var i=c.allocUnsafe(t),r=0;for(n=0;n<e.length;++n){var a=e[n];if(!c.isBuffer(a))throw new TypeError('"list" argument must be an Array of Buffers');a.copy(i,r),r+=a.length}return i},c.byteLength=m,c.prototype._isBuffer=!0,c.prototype.swap16=function(){var e=this.length;if(e%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var t=0;t<e;t+=2)f(this,t,t+1);return this},c.prototype.swap32=function(){var e=this.length;if(e%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var t=0;t<e;t+=4)f(this,t,t+3),f(this,t+1,t+2);return this},c.prototype.swap64=function(){var e=this.length;if(e%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var t=0;t<e;t+=8)f(this,t,t+7),f(this,t+1,t+6),f(this,t+2,t+5),f(this,t+3,t+4);return this},c.prototype.toString=function(){var e=0|this.length;return 0===e?"":0===arguments.length?w(this,0,e):g.apply(this,arguments)},c.prototype.equals=function(e){if(!c.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e||0===c.compare(this,e)},c.prototype.inspect=function(){var e="",n=t.INSPECT_MAX_BYTES;return this.length>0&&(e=this.toString("hex",0,n).match(/.{2}/g).join(" "),this.length>n&&(e+=" ... ")),"<Buffer "+e+">"},c.prototype.compare=function(e,t,n,i,r){if(!c.isBuffer(e))throw new TypeError("Argument must be a Buffer");if(void 0===t&&(t=0),void 0===n&&(n=e?e.length:0),void 0===i&&(i=0),void 0===r&&(r=this.length),t<0||n>e.length||i<0||r>this.length)throw new RangeError("out of range index");if(i>=r&&t>=n)return 0;if(i>=r)return-1;if(t>=n)return 1;if(this===e)return 0;for(var s=(r>>>=0)-(i>>>=0),a=(n>>>=0)-(t>>>=0),o=Math.min(s,a),l=this.slice(i,r),d=e.slice(t,n),u=0;u<o;++u)if(l[u]!==d[u]){s=l[u],a=d[u];break}return s<a?-1:a<s?1:0},c.prototype.includes=function(e,t,n){return-1!==this.indexOf(e,t,n)},c.prototype.indexOf=function(e,t,n){return b(this,e,t,n,!0)},c.prototype.lastIndexOf=function(e,t,n){return b(this,e,t,n,!1)},c.prototype.write=function(e,t,n,i){if(void 0===t)i="utf8",n=this.length,t=0;else if(void 0===n&&"string"===typeof t)i=t,n=this.length,t=0;else{if(!isFinite(t))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");t|=0,isFinite(n)?(n|=0,void 0===i&&(i="utf8")):(i=n,n=void 0)}var r=this.length-t;if((void 0===n||n>r)&&(n=r),e.length>0&&(n<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");i||(i="utf8");for(var s=!1;;)switch(i){case"hex":return j(this,e,t,n);case"utf8":case"utf-8":return _(this,e,t,n);case"ascii":return v(this,e,t,n);case"latin1":case"binary":return x(this,e,t,n);case"base64":return O(this,e,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return T(this,e,t,n);default:if(s)throw new TypeError("Unknown encoding: "+i);i=(""+i).toLowerCase(),s=!0}},c.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var A=4096;
vendor: 5,954 bytes, line 2
2function k(e,t,n){var i="";n=Math.min(e.length,n);for(var r=t;r<n;++r)i+=String.fromCharCode(127&e[r]);return i}function C(e,t,n){var i="";n=Math.min(e.length,n);for(var r=t;r<n;++r)i+=String.fromCharCode(e[r]);return i}function E(e,t,n){var i=e.length;(!t||t<0)&&(t=0),(!n||n<0||n>i)&&(n=i);for(var r="",s=t;s<n;++s)r+=F(e[s]);return r}function I(e,t,n){for(var i=e.slice(t,n),r="",s=0;s<i.length;s+=2)r+=String.fromCharCode(i[s]+256*i[s+1]);return r}function D(e,t,n){if(e%1!==0||e<0)throw new RangeError("offset is not uint");if(e+t>n)throw new RangeError("Trying to access beyond buffer length")}function P(e,t,n,i,r,s){if(!c.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>r||t<s)throw new RangeError('"value" argument is out of bounds');if(n+i>e.length)throw new RangeError("Index out of range")}function R(e,t,n,i){t<0&&(t=65535+t+1);for(var r=0,s=Math.min(e.length-n,2);r<s;++r)e[n+r]=(t&255<<8*(i?r:1-r))>>>8*(i?r:1-r)}function L(e,t,n,i){t<0&&(t=4294967295+t+1);for(var r=0,s=Math.min(e.length-n,4);r<s;++r)e[n+r]=t>>>8*(i?r:3-r)&255}function M(e,t,n,i,r,s){if(n+i>e.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function N(e,t,n,i,s){return s||M(e,0,n,4),r.write(e,t,n,i,23,4),n+4}function B(e,t,n,i,s){return s||M(e,0,n,8),r.write(e,t,n,i,52,8),n+8}c.prototype.slice=function(e,t){var n,i=this.length;if((e=~~e)<0?(e+=i)<0&&(e=0):e>i&&(e=i),(t=void 0===t?i:~~t)<0?(t+=i)<0&&(t=0):t>i&&(t=i),t<e&&(t=e),c.TYPED_ARRAY_SUPPORT)(n=this.subarray(e,t)).__proto__=c.prototype;else{var r=t-e;n=new c(r,void 0);for(var s=0;s<r;++s)n[s]=this[s+e]}return n},c.prototype.readUIntLE=function(e,t,n){e|=0,t|=0,n||D(e,t,this.length);for(var i=this[e],r=1,s=0;++s<t&&(r*=256);)i+=this[e+s]*r;return i},c.prototype.readUIntBE=function(e,t,n){e|=0,t|=0,n||D(e,t,this.length);for(var i=this[e+--t],r=1;t>0&&(r*=256);)i+=this[e+--t]*r;return i},c.prototype.readUInt8=function(e,t){return t||D(e,1,this.length),this[e]},c.prototype.readUInt16LE=function(e,t){return t||D(e,2,this.length),this[e]|this[e+1]<<8},c.prototype.readUInt16BE=function(e,t){return t||D(e,2,this.length),this[e]<<8|this[e+1]},c.prototype.readUInt32LE=function(e,t){return t||D(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},c.prototype.readUInt32BE=function(e,t){return t||D(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},c.prototype.readIntLE=function(e,t,n){e|=0,t|=0,n||D(e,t,this.length);for(var i=this[e],r=1,s=0;++s<t&&(r*=256);)i+=this[e+s]*r;return i>=(r*=128)&&(i-=Math.pow(2,8*t)),i},c.prototype.readIntBE=function(e,t,n){e|=0,t|=0,n||D(e,t,this.length);for(var i=t,r=1,s=this[e+--i];i>0&&(r*=256);)s+=this[e+--i]*r;return s>=(r*=128)&&(s-=Math.pow(2,8*t)),s},c.prototype.readInt8=function(e,t){return t||D(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},c.prototype.readInt16LE=function(e,t){t||D(e,2,this.length);var n=this[e]|this[e+1]<<8;return 32768&n?4294901760|n:n},c.prototype.readInt16BE=function(e,t){t||D(e,2,this.length);var n=this[e+1]|this[e]<<8;return 32768&n?4294901760|n:n},c.prototype.readInt32LE=function(e,t){return t||D(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},c.prototype.readInt32BE=function(e,t){return t||D(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},c.prototype.readFloatLE=function(e,t){return t||D(e,4,this.length),r.read(this,e,!0,23,4)},c.prototype.readFloatBE=function(e,t){return t||D(e,4,this.length),r.read(this,e,!1,23,4)},c.prototype.readDoubleLE=function(e,t){return t||D(e,8,this.length),r.read(this,e,!0,52,8)},c.prototype.readDoubleBE=function(e,t){return t||D(e,8,this.length),r.read(this,e,!1,52,8)},c.prototype.writeUIntLE=function(e,t,n,i){(e=+e,t|=0,n|=0,i)||P(this,e,t,n,Math.pow(2,8*n)-1,0);var r=1,s=0;for(this[t]=255&e;++s<n&&(r*=256);)this[t+s]=e/r&255;return t+n},c.prototype.writeUIntBE=function(e,t,n,i){(e=+e,t|=0,n|=0,i)||P(this,e,t,n,Math.pow(2,8*n)-1,0);var r=n-1,s=1;for(this[t+r]=255&e;--r>=0&&(s*=256);)this[t+r]=e/s&255;return t+n},c.prototype.writeUInt8=function(e,t,n){return e=+e,t|=0,n||P(this,e,t,1,255,0),c.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[t]=255&e,t+1},c.prototype.writeUInt16LE=function(e,t,n){return e=+e,t|=0,n||P(this,e,t,2,65535,0),c.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):R(this,e,t,!0),t+2},c.prototype.writeUInt16BE=function(e,t,n){return e=+e,t|=0,n||P(this,e,t,2,65535,0),c.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):R(this,e,t,!1),t+2},c.prototype.writeUInt32LE=function(e,t,n){return e=+e,t|=0,n||P(this,e,t,4,4294967295,0),c.TYPED_ARRAY_SUPPORT?(this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e):L(this,e,t,!0),t+4},c.prototype.writeUInt32BE=function(e,t,n){return e=+e,t|=0,n||P(this,e,t,4,4294967295,0),c.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):L(this,e,t,!1),t+4},c.prototype.writeIntLE=function(e,t,n,i){if(e=+e,t|=0,!i){var r=Math.pow(2,8*n-1);P(this,e,t,n,r-1,-r)}var s=0,a=1,o=0;for(this[t]=255&e;++s<n&&(a*=256);)e<0&&0===o&&0!==this[t+s-1]&&(o=1),this[t+s]=(e/a|0)-o&255;return t+n},c.prototype.writeIntBE=function(e,t,n,i){if(e=+e,t|=0,!i){var r=Math.pow(2,8*n-1);P(this,e,t,n,r-1,-r)}var s=n-1,a=1,o=0;for(this[t+s]=255&e;--s>=0&&(a*=256);)e<0&&0===o&&0!==this[t+s+1]&&(o=1),this[t+s]=(e/a|0)-o&255;return t+n},c.prototype.writeInt8=function(e,t,n){return e=+e,t|=0,n||P(this,e,t,1,127,-128),c.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),e<0&&(e=255+e+1),this[t]=255&e,t+1},c.prototype.writeInt16LE=function(e,t,n){return e=+e,t|=0,n||P(this,e,t,2,32767,-32768),c.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):R(this,e,t,!0),t+2},c.prototype.writeInt16BE=function(e,t,n){return e=+e,t|=0,n||P(this,e,t,2,32767,-32768),c.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):R(this,e,t,!1),t+2},c.prototype.writeInt32LE=function(e,t,n){return e=+e,t|=0,n||P(this,e,t,4,2147483647,-2147483648),
vendor: 4,186 bytes, line 2
2c.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24):L(this,e,t,!0),t+4},c.prototype.writeInt32BE=function(e,t,n){return e=+e,t|=0,n||P(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),c.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):L(this,e,t,!1),t+4},c.prototype.writeFloatLE=function(e,t,n){return N(this,e,t,!0,n)},c.prototype.writeFloatBE=function(e,t,n){return N(this,e,t,!1,n)},c.prototype.writeDoubleLE=function(e,t,n){return B(this,e,t,!0,n)},c.prototype.writeDoubleBE=function(e,t,n){return B(this,e,t,!1,n)},c.prototype.copy=function(e,t,n,i){if(n||(n=0),i||0===i||(i=this.length),t>=e.length&&(t=e.length),t||(t=0),i>0&&i<n&&(i=n),i===n)return 0;if(0===e.length||0===this.length)return 0;if(t<0)throw new RangeError("targetStart out of bounds");if(n<0||n>=this.length)throw new RangeError("sourceStart out of bounds");if(i<0)throw new RangeError("sourceEnd out of bounds");i>this.length&&(i=this.length),e.length-t<i-n&&(i=e.length-t+n);var r,s=i-n;if(this===e&&n<t&&t<i)for(r=s-1;r>=0;--r)e[r+t]=this[r+n];else if(s<1e3||!c.TYPED_ARRAY_SUPPORT)for(r=0;r<s;++r)e[r+t]=this[r+n];else Uint8Array.prototype.set.call(e,this.subarray(n,n+s),t);return s},c.prototype.fill=function(e,t,n,i){if("string"===typeof e){if("string"===typeof t?(i=t,t=0,n=this.length):"string"===typeof n&&(i=n,n=this.length),1===e.length){var r=e.charCodeAt(0);r<256&&(e=r)}if(void 0!==i&&"string"!==typeof i)throw new TypeError("encoding must be a string");if("string"===typeof i&&!c.isEncoding(i))throw new TypeError("Unknown encoding: "+i)}else"number"===typeof e&&(e&=255);if(t<0||this.length<t||this.length<n)throw new RangeError("Out of range index");if(n<=t)return this;var s;if(t>>>=0,n=void 0===n?this.length:n>>>0,e||(e=0),"number"===typeof e)for(s=t;s<n;++s)this[s]=e;else{var a=c.isBuffer(e)?e:z(new c(e,i).toString()),o=a.length;for(s=0;s<n-t;++s)this[s+t]=a[s%o]}return this};var U=/[^+\/0-9A-Za-z-_]/g;function F(e){return e<16?"0"+e.toString(16):e.toString(16)}function z(e,t){var n;t=t||1/0;for(var i=e.length,r=null,s=[],a=0;a<i;++a){if((n=e.charCodeAt(a))>55295&&n<57344){if(!r){if(n>56319){(t-=3)>-1&&s.push(239,191,189);continue}if(a+1===i){(t-=3)>-1&&s.push(239,191,189);continue}r=n;continue}if(n<56320){(t-=3)>-1&&s.push(239,191,189),r=n;continue}n=65536+(r-55296<<10|n-56320)}else r&&(t-=3)>-1&&s.push(239,191,189);if(r=null,n<128){if((t-=1)<0)break;s.push(n)}else if(n<2048){if((t-=2)<0)break;s.push(n>>6|192,63&n|128)}else if(n<65536){if((t-=3)<0)break;s.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;s.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return s}function q(e){return i.toByteArray(function(e){if((e=function(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}(e).replace(U,"")).length<2)return"";for(;e.length%4!==0;)e+="=";return e}(e))}function H(e,t,n,i){for(var r=0;r<i&&!(r+n>=t.length||r>=e.length);++r)t[r+n]=e[r];return r}}).call(this,n(112))},252:function(e,t,n){var i=n(210),r=i.find,s=i.NAMESPACE;function a(e){return""!==e}function o(e,t){return e.hasOwnProperty(t)||(e[t]=!0),e}function c(e){if(!e)return[];var t=function(e){return e?e.split(/[\t\n\f\r ]+/).filter(a):[]}(e);return Object.keys(t.reduce(o,{}))}function l(e,t){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])}function d(e,t){var n=e.prototype;if(!(n instanceof t)){function i(){}i.prototype=t.prototype,l(n,i=new i),e.prototype=n=i}n.constructor!=e&&("function"!=typeof e&&console.error("unknown Class:"+e),n.constructor=e)}var u={},h=u.ELEMENT_NODE=1,p=u.ATTRIBUTE_NODE=2,m=u.TEXT_NODE=3,g=u.CDATA_SECTION_NODE=4,f=u.ENTITY_REFERENCE_NODE=5,b=u.ENTITY_NODE=6,y=u.PROCESSING_INSTRUCTION_NODE=7,j=u.COMMENT_NODE=8,_=u.DOCUMENT_NODE=9,v=u.DOCUMENT_TYPE_NODE=10,x=u.DOCUMENT_FRAGMENT_NODE=11,O=u.NOTATION_NODE=12,T={},S={},w=(T.INDEX_SIZE_ERR=(S[1]="Index size error",1),T.DOMSTRING_SIZE_ERR=(S[2]="DOMString size error",2),T.HIERARCHY_REQUEST_ERR=(S[3]="Hierarchy request error",3)),A=(T.WRONG_DOCUMENT_ERR=(S[4]="Wrong document",4),T.INVALID_CHARACTER_ERR=(S[5]="Invalid character",5),T.NO_DATA_ALLOWED_ER
vendor: 9,589 bytes, line 2
2R=(S[6]="No data allowed",6),T.NO_MODIFICATION_ALLOWED_ERR=(S[7]="No modification allowed",7),T.NOT_FOUND_ERR=(S[8]="Not found",8)),k=(T.NOT_SUPPORTED_ERR=(S[9]="Not supported",9),T.INUSE_ATTRIBUTE_ERR=(S[10]="Attribute in use",10));T.INVALID_STATE_ERR=(S[11]="Invalid state",11),T.SYNTAX_ERR=(S[12]="Syntax error",12),T.INVALID_MODIFICATION_ERR=(S[13]="Invalid modification",13),T.NAMESPACE_ERR=(S[14]="Invalid namespace",14),T.INVALID_ACCESS_ERR=(S[15]="Invalid access",15);function C(e,t){if(t instanceof Error)var n=t;else n=this,Error.call(this,S[e]),this.message=S[e],Error.captureStackTrace&&Error.captureStackTrace(this,C);return n.code=e,t&&(this.message=this.message+": "+t),n}function E(){}function I(e,t){this._node=e,this._refresh=t,D(this)}function D(e){var t=e._node._inc||e._node.ownerDocument._inc;if(e._inc!==t){var n=e._refresh(e._node);if(je(e,"length",n.length),!e.$$length||n.length<e.$$length)for(var i=n.length;i in e;i++)Object.prototype.hasOwnProperty.call(e,i)&&delete e[i];l(n,e),e._inc=t}}function P(){}function R(e,t){for(var n=e.length;n--;)if(e[n]===t)return n}function L(e,t,n,i){if(i?t[R(t,i)]=n:t[t.length++]=n,e){n.ownerElement=e;var r=e.ownerDocument;r&&(i&&q(r,e,i),function(e,t,n){e&&e._inc++;var i=n.namespaceURI;i===s.XMLNS&&(t._nsMap[n.prefix?n.localName:""]=n.value)}(r,e,n))}}function M(e,t,n){var i=R(t,n);if(!(i>=0))throw new C(A,new Error(e.tagName+"@"+n));for(var r=t.length-1;i<r;)t[i]=t[++i];if(t.length=r,e){var s=e.ownerDocument;s&&(q(s,e,n),n.ownerElement=null)}}function N(){}function B(){}function U(e){return("<"==e?"<":">"==e&&">")||"&"==e&&"&"||'"'==e&&"""||"&#"+e.charCodeAt()+";"}function F(e,t){if(t(e))return!0;if(e=e.firstChild)do{if(F(e,t))return!0}while(e=e.nextSibling)}function z(){this.ownerDocument=this}function q(e,t,n,i){e&&e._inc++,n.namespaceURI===s.XMLNS&&delete t._nsMap[n.prefix?n.localName:""]}function H(e,t,n){if(e&&e._inc){e._inc++;var i=t.childNodes;if(n)i[i.length++]=n;else{for(var r=t.firstChild,s=0;r;)i[s++]=r,r=r.nextSibling;i.length=s,delete i[i.length]}}}function V(e,t){var n=t.previousSibling,i=t.nextSibling;return n?n.nextSibling=i:e.firstChild=i,i?i.previousSibling=n:e.lastChild=n,t.parentNode=null,t.previousSibling=null,t.nextSibling=null,H(e.ownerDocument,e),t}function W(e){return e&&e.nodeType===B.DOCUMENT_TYPE_NODE}function G(e){return e&&e.nodeType===B.ELEMENT_NODE}function X(e){return e&&e.nodeType===B.TEXT_NODE}function Y(e,t){var n=e.childNodes||[];if(r(n,G)||W(t))return!1;var i=r(n,W);return!(t&&i&&n.indexOf(i)>n.indexOf(t))}function K(e,t){var n=e.childNodes||[];if(r(n,(function(e){return G(e)&&e!==t})))return!1;var i=r(n,W);return!(t&&i&&n.indexOf(i)>n.indexOf(t))}function Q(e,t,n){if(!function(e){return e&&(e.nodeType===B.DOCUMENT_NODE||e.nodeType===B.DOCUMENT_FRAGMENT_NODE||e.nodeType===B.ELEMENT_NODE)}(e))throw new C(w,"Unexpected parent node type "+e.nodeType);if(n&&n.parentNode!==e)throw new C(A,"child not in parent");if(!function(e){return e&&(G(e)||X(e)||W(e)||e.nodeType===B.DOCUMENT_FRAGMENT_NODE||e.nodeType===B.COMMENT_NODE||e.nodeType===B.PROCESSING_INSTRUCTION_NODE)}(t)||W(t)&&e.nodeType!==B.DOCUMENT_NODE)throw new C(w,"Unexpected node type "+t.nodeType+" for parent node type "+e.nodeType)}function Z(e,t,n){var i=e.childNodes||[],s=t.childNodes||[];if(t.nodeType===B.DOCUMENT_FRAGMENT_NODE){var a=s.filter(G);if(a.length>1||r(s,X))throw new C(w,"More than one element or text in fragment");if(1===a.length&&!Y(e,n))throw new C(w,"Element in fragment can not be inserted before doctype")}if(G(t)&&!Y(e,n))throw new C(w,"Only one element can be added and only after doctype");if(W(t)){if(r(i,W))throw new C(w,"Only one doctype is allowed");var o=r(i,G);if(n&&i.indexOf(o)<i.indexOf(n))throw new C(w,"Doctype can only be inserted before an element");if(!n&&o)throw new C(w,"Doctype can not be appended since element is present")}}function J(e,t,n){var i=e.childNodes||[],s=t.childNodes||[];if(t.nodeType===B.DOCUMENT_FRAGMENT_NODE){var a=s.filter(G);if(a.length>1||r(s,X))throw new C(w,"More than one element or text in fragment");if(1===a.length&&!K(e,n))throw new C(w,"Element in fragment can not be inserted before doctype")}if(G(t)&&!K(e,n))throw new C(w,"Only one element can be added and only after doctype");if(W(t)){if(r(i,(function(e){return W(e)&&e!==n})))throw new C(w,"Only one doctype is allowed");var o=r(i,G);if(n&&i.indexOf(o)<i.indexOf(n))throw new C(w,"Doctype can only be inserted before an element")}}function $(e,t,n,i){Q(e,t,n),e.nodeType===B.DOCUMENT_NODE&&(i||Z)(e,t,n);var r=t.parentNode;if(r&&r.removeChild(t),t.nodeType===x){var s=t.firstChild;if(null==s)return t;var a=t.lastChild}else s=a=t;var o=n?n.previousSibling:e.lastChild;s.previousSibling=o,a.nextSibling=n,o?o.nextSibling=s:e.firstChild=s,null==n?e.lastChild=a:n.previousSibling=a;do{s.parentNode=e}while(s!==a&&(s=s.nextSibling));return H(e.ownerDocument||e,e),t.nodeType==x&&(t.firstChild=t.lastChild=null),t}function ee(){this._nsMap={}}function te(){}function ne(){}function ie(){}function re(){}function se(){}function ae(){}function oe(){}function ce(){}function le(){}function de(){}function ue(){}function he(){}function pe(e,t){var n=[],i=9==this.nodeType&&this.documentElement||this,r=i.prefix,s=i.namespaceURI;if(s&&null==r&&null==(r=i.lookupPrefix(s)))var a=[{namespace:s,prefix:null}];return fe(this,n,e,t,a),n.join("")}function me(e,t,n){var i=e.prefix||"",r=e.namespaceURI;if(!r)return!1;if("xml"===i&&r===s.XML||r===s.XMLNS)return!1;for(var a=n.length;a--;){var o=n[a];if(o.prefix===i)return o.namespace!==r}return!0}function ge(e,t,n){e.push(" ",t,'="',n.replace(/[<>&"\t\n\r]/g,U),'"')}function fe(e,t,n,i,r){if(r||(r=[]),i){if(!(e=i(e)))return;if("string"==typeof e)return void t.push(e)}switch(e.nodeType){case h:var a=e.attributes,o=a.length,c=e.firstChild,l=e.tagName,d=l;if(!(n=s.isHTML(e.namespaceURI)||n)&&!e.prefix&&e.namespaceURI){for(var u,b=0;b<a.length;b++)if("xmlns"===a.item(b).name){u=a.item(b).value;break}if(!u)for(var O=r.length-1;O>=0;O--){if(""===(T=r[O]).prefix&&T.namespace===e.namespaceURI){u=T.namespace;break}}if(u!==e.namespaceURI)for(O=r.length-1;O>=0;O--){var T;if((T=r[O]).namespace===e.namespaceURI){T.prefix&&(d=T.prefix+":"+l);break}}}t.push("<",d);for(var S=0;S<o;S++){"xmlns"==(w=a.item(S)).prefix?r.push({prefix:w.localName,namespace:w.value}):"xmlns"==w.nodeName&&r.push({prefix:"",namespace:w.value})}for(S=0;S<o;S++){var w,A,k;if(me(w=a.item(S),0,r))ge(t,(A=w.prefix||"")?"xmlns:"+A:"xmlns",k=w.namespaceURI),r.push({prefix:A,namespace:k});fe(w,t,n,i,r)}if(l===d&&me(e,0,r))ge(t,(A=e.prefix||"")?"xmlns:"+A:"xmlns",k=e.namespaceURI),r.push({prefix:A,namespace:k});if(c||n&&!/^(?:meta|link|img|br|hr|input)$/i.test(l)){if(t.push(">"),n&&/^script$/i.test(l))for(;c;)c.data?t.push(c.data):fe(c,t,n,i,r.slice()),c=c.nextSibling;else for(;c;)fe(c,t,n,i,r.slice()),c=c.nextSibling;t.push("</",d,">")}else t.push("/>");return;case _:case x:for(c=e.firstChild;c;)fe(c,t,n,i,r.slice()),c=c.nextSibling;return;case p:return ge(t,e.name,e.value);case m:return t.push(e.data.replace(/[<&>]/g,U));case g:return t.push("<![CDATA[",e.data,"]]>");case j:return t.push("\x3c!--",e.data,"--\x3e");case v:var C=e.publicId,E=e.systemId;if(t.push("<!DOCTYPE ",e.name),C)t.push(" PUBLIC ",C),E&&"."!=E&&t.push(" ",E),t.push(">");else if(E&&"."!=E)t.push(" SYSTEM ",E,">");else{var I=e.internalSubset;I&&t.push(" [",I,"]"),t.push(">")}return;case y:return t.push("<?",e.target," ",e.data,"?>");case f:return t.push("&",e.nodeName,";");default:t.push("??",e.nodeName)}}function be(e,t,n){var i;switch(t.nodeType){case h:(i=t.cloneNode(!1)).ownerDocument=e;case x:break;case p:n=!0}if(i||(i=t.cloneNode(!1)),i.ownerDocument=e,i.parentNode=null,n)for(var r=t.firstChild;r;)i.appendChild(be(e,r,n)),r=r.nextSibling;return i}function ye(e,t,n){var i=new t.constructor;for(var r in t)if(Object.prototype.hasOwnProperty.call(t,r)){var s=t[r];"object"!=typeof s&&s!=i[r]&&(i[r]=s)}switch(t.childNodes&&(i.childNodes=new E),i.ownerDocument=e,i.nodeType){case h:var a=t.attributes,o=i.attributes=new P,c=a.length;o._ownerElement=i;for(var l=0;l<c;l++)i.setAttributeNode(ye(e,a.item(l),!0));break;case p:n=!0}if(n)for(var d=t.firstChild;d;)i.appendChild(ye(e,d,n)),d=d.nextSibling;return i}function je(e,t,n){e[t]=n}C.prototype=Error.prototype,l(T,C),E.prototype={length:0,item:function(e){return e>=0&&e<this.length?this[e]:null},toString:function(e,t){for(var n=[],i=0;i<this.length;i++)fe(this[i],n,e,t);return n.join("")},filter:function(e){return Array.prototype.filter.call(this,e)},indexOf:function(e){return Array.prototype.indexOf.call(this,e)}},I.prototype.item=function(e){return D(this),this[e]||null},d(I,E),P.prototype={length:0,item:E.prototype.item,getNamedItem:function(e){for(var t=this.length;t--;){var n=this[t];if(n.nodeName==e)return n}},setNamedItem:function(e){var t=e.ownerElement;if(t&&t!=this._ownerElement)throw new C(k);var n=this.getNamedItem(e.nodeName);return L(this._ownerElement,this,e,n),n},setNamedItemNS:function(e){var t,n=e.ownerElement;if(n&&n!=this._ownerElement)throw new C(k);return t=this.getNamedItemNS(e.namespaceURI,e.localName),L(this._ownerElement,this,e,t),t},removeNamedItem:function(e){var t=this.getNamedItem(e);return M(this._ownerElement,this,t),t},removeNamedItemNS:function(e,t){var n=this.getNamedItemNS(e,t);return M(this._ownerElement,this,n),n},getNamedItemNS:function(e,t){for(var n=this.length;n--;){var i=this[n];if(i.localName==t&&i.namespaceURI==e)return i}return null}},N.prototype={hasFeature:function(e,t){return!0},createDocument:function(e,t,n){var i=new z;
vendor: 4,416 bytes, line 2
2if(i.implementation=this,i.childNodes=new E,i.doctype=n||null,n&&i.appendChild(n),t){var r=i.createElementNS(e,t);i.appendChild(r)}return i},createDocumentType:function(e,t,n){var i=new ae;return i.name=e,i.nodeName=e,i.publicId=t||"",i.systemId=n||"",i}},B.prototype={firstChild:null,lastChild:null,previousSibling:null,nextSibling:null,attributes:null,parentNode:null,childNodes:null,ownerDocument:null,nodeValue:null,namespaceURI:null,prefix:null,localName:null,insertBefore:function(e,t){return $(this,e,t)},replaceChild:function(e,t){$(this,e,t,J),t&&this.removeChild(t)},removeChild:function(e){return V(this,e)},appendChild:function(e){return this.insertBefore(e,null)},hasChildNodes:function(){return null!=this.firstChild},cloneNode:function(e){return ye(this.ownerDocument||this,this,e)},normalize:function(){for(var e=this.firstChild;e;){var t=e.nextSibling;t&&t.nodeType==m&&e.nodeType==m?(this.removeChild(t),e.appendData(t.data)):(e.normalize(),e=t)}},isSupported:function(e,t){return this.ownerDocument.implementation.hasFeature(e,t)},hasAttributes:function(){return this.attributes.length>0},lookupPrefix:function(e){for(var t=this;t;){var n=t._nsMap;if(n)for(var i in n)if(Object.prototype.hasOwnProperty.call(n,i)&&n[i]===e)return i;t=t.nodeType==p?t.ownerDocument:t.parentNode}return null},lookupNamespaceURI:function(e){for(var t=this;t;){var n=t._nsMap;if(n&&Object.prototype.hasOwnProperty.call(n,e))return n[e];t=t.nodeType==p?t.ownerDocument:t.parentNode}return null},isDefaultNamespace:function(e){return null==this.lookupPrefix(e)}},l(u,B),l(u,B.prototype),z.prototype={nodeName:"#document",nodeType:_,doctype:null,documentElement:null,_inc:1,insertBefore:function(e,t){if(e.nodeType==x){for(var n=e.firstChild;n;){var i=n.nextSibling;this.insertBefore(n,t),n=i}return e}return $(this,e,t),e.ownerDocument=this,null===this.documentElement&&e.nodeType===h&&(this.documentElement=e),e},removeChild:function(e){return this.documentElement==e&&(this.documentElement=null),V(this,e)},replaceChild:function(e,t){$(this,e,t,J),e.ownerDocument=this,t&&this.removeChild(t),G(e)&&(this.documentElement=e)},importNode:function(e,t){return be(this,e,t)},getElementById:function(e){var t=null;return F(this.documentElement,(function(n){if(n.nodeType==h&&n.getAttribute("id")==e)return t=n,!0})),t},getElementsByClassName:function(e){var t=c(e);return new I(this,(function(n){var i=[];return t.length>0&&F(n.documentElement,(function(r){if(r!==n&&r.nodeType===h){var s=r.getAttribute("class");if(s){var a=e===s;if(!a){var o=c(s);a=t.every((l=o,function(e){return l&&-1!==l.indexOf(e)}))}a&&i.push(r)}}var l})),i}))},createElement:function(e){var t=new ee;return t.ownerDocument=this,t.nodeName=e,t.tagName=e,t.localName=e,t.childNodes=new E,(t.attributes=new P)._ownerElement=t,t},createDocumentFragment:function(){var e=new de;return e.ownerDocument=this,e.childNodes=new E,e},createTextNode:function(e){var t=new ie;return t.ownerDocument=this,t.appendData(e),t},createComment:function(e){var t=new re;return t.ownerDocument=this,t.appendData(e),t},createCDATASection:function(e){var t=new se;return t.ownerDocument=this,t.appendData(e),t},createProcessingInstruction:function(e,t){var n=new ue;return n.ownerDocument=this,n.tagName=n.nodeName=n.target=e,n.nodeValue=n.data=t,n},createAttribute:function(e){var t=new te;return t.ownerDocument=this,t.name=e,t.nodeName=e,t.localName=e,t.specified=!0,t},createEntityReference:function(e){var t=new le;return t.ownerDocument=this,t.nodeName=e,t},createElementNS:function(e,t){var n=new ee,i=t.split(":"),r=n.attributes=new P;return n.childNodes=new E,n.ownerDocument=this,n.nodeName=t,n.tagName=t,n.namespaceURI=e,2==i.length?(n.prefix=i[0],n.localName=i[1]):n.localName=t,r._ownerElement=n,n},createAttributeNS:function(e,t){var n=new te,i=t.split(":");return n.ownerDocument=this,n.nodeName=t,n.name=t,n.namespaceURI=e,n.specified=!0,2==i.length?(n.prefix=i[0],n.localName=i[1]):n.localName=t,n}},d(z,B),ee.prototype={nodeType:h,hasAttribute:function(e){return null!=this.getAttributeNode(e)},getAttribute:function(e){var t=this.getAttributeNode(e);return t&&t.value||""},getAttributeNode:function(e){return this.attributes.getNamedItem(e)},setAttribute:function(e,t){var n=this.ownerDocument.createAttribute(e);n.value=n.nodeValue=""+t,this.setAttributeNode(n)},removeAttribute:function(e){var t=this.getAttributeNode(e);t&&this.removeAttributeNode(t)}
2,appendChild:function(e){return e.nodeType===x?this.insertBefore(e,null):function(e,t){return t.parentNode&&t.parentNode.removeChild(t),t.parentNode=e,t.previousSibling=e.lastChild,t.nextSibling=null,t.previousSibling?t.previousSibling.nextSibling=t:e.firstChild=t,e.lastChild=t,H(e.ownerDocument,e,t),t}(this,e)},setAttributeNode:function(e){return this.attributes.setNamedItem(e)},setAttributeNodeNS:function(e){return this.attributes.setNamedItemNS(e)},removeAttributeNode:function(e){return this.attributes.removeNamedItem(e.nodeName)},removeAttributeNS:function(e,t){var n=this.getAttributeNodeNS(e,t);n&&this.removeAttributeNode(n)},hasAttributeNS:function(e,t){return null!=this.getAttributeNodeNS(e,t)},getAttributeNS:function(e,t){var n=this.getAttributeNodeNS(e,t);return n&&n.value||""},setAttributeNS:function(e,t,n){var i=this.ownerDocument.createAttributeNS(e,t);i.value=i.nodeValue=""+n,this.setAttributeNode(i)},getAttributeNodeNS:function(e,t){return this.attributes.getNamedItemNS(e,t)},getElementsByTagName:function(e){return new I(this,(function(t){var n=[];return F(t,(function(i){i===t||i.nodeType!=h||"*"!==e&&i.tagName!=e||n.push(i)})),n}))},getElementsByTagNameNS:function(e,t){return new I(this,(function(n){var i=[];return F(n,(function(r){r===n||r.nodeType!==h||"*"!==e&&r.namespaceURI!==e||"*"!==t&&r.localName!=t||i.push(r)})),i}))}},z.prototype.getElementsByTagName=ee.prototype.getElementsByTagName,z.prototype.getElementsByTagNameNS=ee.prototype.getElementsByTagNameNS,d(ee,B),te.prototype.nodeType=p,d(te,B),ne.prototype={data:"",substringData:function(e,t){return this.data.substring(e,e+t)},appendData:function(e){e=this.data+e,this.nodeValue=this.data=e,this.length=e.length},insertData:function(e,t){this.replaceData(e,0,t)},appendChild:function(e){throw new Error(S[w])},deleteData:function(e,t){this.replaceData(e,t,"")},replaceData:function(e,t,n){n=this.data.substring(0,e)+n+this.data.substring(e+t),this.nodeValue=this.data=n,this.length=n.length}},d(ne,B),ie.prototype={nodeName:"#text",nodeType:m,splitText:function(e){var t=this.data,n=t.substring(e);t=t.substring(0,e),this.data=this.nodeValue=t,this.length=t.length;var i=this.ownerDocument.createTextNode(n);return this.parentNode&&this.parentNode.insertBefore(i,this.nextSibling),i}},d(ie,ne),re.prototype={nodeName:"#comment",nodeType:j},d(re,ne),se.prototype={nodeName:"#cdata-section",nodeType:g},d(se,ne),ae.prototype.nodeType=v,d(ae,B),oe.prototype.nodeType=O,d(oe,B),ce.prototype.nodeType=b,d(ce,B),le.prototype.nodeType=f,d(le,B),de.prototype.nodeName="#document-fragment",de.prototype.nodeType=x,d(de,B),ue.prototype.nodeType=y,d(ue,B),he.prototype.serializeToString=function(e,t,n){return pe.call(e,t,n)},B.prototype.toString=pe;try{if(Object.defineProperty){function _e(e){switch(e.nodeType){case h:case x:var t=[];for(e=e.firstChild;e;)7!==e.nodeType&&8!==e.nodeType&&t.push(_e(e)),e=e.nextSibling;return t.join("");default:return e.nodeValue}}Object.defineProperty(I.prototype,"length",{get:function(){return D(this),this.$$length}}),Object.defineProperty(B.prototype,"textContent",{get:function(){return _e(this)},set:function(e){switch(this.nodeType){case h:case x:for(;this.firstChild;)this.removeChild(this.firstChild);(e||String(e))&&this.appendChild(this.ownerDocument.createTextNode(e));break;default:this.data=e,this.value=e,this.nodeValue=e}}}),je=function(e,t,n){e["$$"+t]=n}}}catch(ve){}t.DocumentType=ae,t.DOMException=C,t.DOMImplementation=N,t.Element=ee,t.Node=B,t.NodeList=E,t.XMLSerializer=he},253:function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));var i=n(197),r=Object(i.k)([73,68,51]),s=function e(t,n){return void 0===n&&(n=0),(t=Object(i.k)(t)).length-n<10||!Object(i.a)(t,r,{offset:n})?n:(n+=function(e,t){void 0===t&&(t=0);var n=(e=Object(i.k)(e))[t+5],r=e[t+6]<<21|e[t+7]<<14|e[t+8]<<7|e[t+9];return(16&n)>>4?r+20:r+10}(t,n),e(t,n))}},256:function(e,t,n){"use strict";var i=n(0),r=n.n(i),s=n(193),a=(n(195),n(79)),o=n(28),c=n(188),l=n(5),d=n(35),u=n(30),h=n.n(u),p=n(689),m=n.p+"static/media/backward.ad7fa589.svg",g=n(1);const f=e=>{const t=e.vjsComponent.player();return Object(g.jsx)(p.a,{onClick:()=>{var e=t.currentTime()-10;e<0&&(e=0),t.currentTime(e)},sx:{background:"url("+m+") center center no-repeat !important",width:40,height:22}})},b=s.a.getComponent("Component");class y extends b{constructor(e,t){super(e,t),this.mount=this.mount.bind(this),e.ready((()=>{this.mount()})),this.addClass("vjs-control"),this.on("dispose",(()=>{h.a.unmountComponentAtNode(this.el())}))}mount(){h.a.render(Object(g.jsx)(f,{vjsComponent:this}),this.el())}}b.registerComponent("vjsBackward",y);var j=n.p+"static/media/forward.f8b7ed68.svg";const _=e=>{const t=e.vjsComponent.player();return Object(g.jsx)(p.a,{onClick:()=>{var e=t.currentTime()+10;e<0&&(e=0),t.currentTime(e)},sx:{background:"url("+j+") center center no-repeat !important",width:40,height:22}})},v=s.a.getComponent("Component");class x extends v{constructor(e,t){super(e,t),this.mount=this.mount.bind(this),e.ready((()=>{this.mount()})),this.addClass("vjs-control"),this.on("dispose",(()=>{h.a.unmountComponentAtNode(this.el())}))}mount(){h.a.render(Object(g.jsx)(_,{vjsComponent:this}),this.el())}}v.registerComponent("vjsForward",x);var O=n(82),T=n(730),S=n(111),w=n(720),A=n(717),k=n.p+"static/media/next.7cd4e204.svg",C=n(187),E=n(192),I=n(243);const D=e=>{const{t:t}=Object(a.a)(),n=e.vjsComponent.options(),i=(e.vjsComponent.player(),n.video?n.video.lesson_next:null),[s,o]=r.a.useState(null);return Object(g.jsxs)(C.a,{theme:O.a,children:[Object(g.jsx)(p.a,{onClick:e=>{o(e.currentTarget)},children:Object(g.jsx)("img",{src:k})}),i&&Object(g.jsxs)(T.a,{anchorEl:s,keepMounted:!0,open:Boolean(s),onClose:()=>{o(null)},sx:{"& .MuiPopover-paper":{background:"rgba(0, 0, 0, 0.8)",overflow:"hidden",color:"#fff",width:{xs:"250px",md:"340px"}}},anchorOrigin:{vertical:"top",horizontal:"right"},transformOrigin:{vertical:"bottom",horizontal:"right"},container:n.anchorRef.current,children:[Object(g.jsx)(S.a,{p:1,children:Object(g.jsxs)(w.a,{variant:"subtitle1",children:[Object(g.jsx)("b",{children:t("Episodio successivo:")}),Object(g.jsx)("br",{}),Object(g.jsxs)("b",{children:[i.lesson_num," -"]})," ",i.title]})}),Object(g.jsxs)(S.a,{sx:{height:150,position:"relative",display:"flex",justifyContent:"center",alignItems:"center"},children:[Object(g.jsx)(E.a,{alt:i.title,src:i.img_cover,sx:{width:"100%",position:"absolute",top:0,left:0}
2,useSet:{sizes:[["down","md","100vw"],["300px"]]}}),Object(g.jsx)(A.a,{onClick:()=>n.handleClickLesson(i),children:Object(g.jsx)("img",{alt:"",src:I.a,width:150})})]})]})]})},P=s.a.getComponent("Component");class R extends P{constructor(e,t){super(e,t),this.mount=this.mount.bind(this),e.ready((()=>{this.mount()})),this.addClass("vjs-control"),this.on("dispose",(()=>{h.a.unmountComponentAtNode(this.el())}))}mount(){h.a.render(Object(g.jsx)(D,{vjsComponent:this}),this.el())}}P.registerComponent("vjsNextLesson",R);var L=n(645),M=n(737),N=n(595),B=n(4),U=n(2),F=n(36),z=n(183),q=n(181),H=n(29),V=n(54),W=n(325),G=n(328),X=n(65),Y=n(345),K=n(522),Q=n(521),Z=n(158),J=n(179);function $(e){return Object(Z.a)("MuiMenuItem",e)}var ee=Object(J.a)("MuiMenuItem",["root","focusVisible","dense","disabled","divider","gutters","selected"]);const te=["autoFocus","component","dense","divider","disableGutters","focusVisibleClassName","role","tabIndex"],ne=Object(H.a)(p.a,{shouldForwardProp:e=>Object(H.b)(e)||"classes"===e,name:"MuiMenuItem",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.dense&&t.dense,n.divider&&t.divider,!n.disableGutters&&t.gutters]}})((e=>{let{theme:t,ownerState:n}=e;return Object(U.a)({},t.typography.body1,{display:"flex",justifyContent:"flex-start",alignItems:"center",position:"relative",textDecoration:"none",minHeight:48,paddingTop:6,paddingBottom:6,boxSizing:"border-box",whiteSpace:"nowrap"},!n.disableGutters&&{paddingLeft:16,paddingRight:16},n.divider&&{borderBottom:"1px solid ".concat(t.palette.divider),backgroundClip:"padding-box"},{"&:hover":{textDecoration:"none",backgroundColor:t.palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}},["&.".concat(ee.selected)]:{backgroundColor:Object(q.a)(t.palette.primary.main,t.palette.action.selectedOpacity),["&.".concat(ee.focusVisible)]:{backgroundColor:Object(q.a)(t.palette.primary.main,t.palette.action.selectedOpacity+t.palette.action.focusOpacity)}},["&.".concat(ee.selected,":hover")]:{backgroundColor:Object(q.a)(t.palette.primary.main,t.palette.action.selectedOpacity+t.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:Object(q.a)(t.palette.primary.main,t.palette.action.selectedOpacity)}},["&.".concat(ee.focusVisible)]:{backgroundColor:t.palette.action.focus},["&.".concat(ee.disabled)]:{opacity:t.palette.action.disabledOpacity},["& + .".concat(Y.a.root)]:{marginTop:t.spacing(1),marginBottom:t.spacing(1)},["& + .".concat(Y.a.inset)]:{marginLeft:52},["& .".concat(Q.a.root)]:{marginTop:0,marginBottom:0},["& .".concat(Q.a.inset)]:{paddingLeft:36},["& .".concat(K.a.root)]:{minWidth:36}},!n.dense&&{[t.breakpoints.up("sm")]:{minHeight:"auto"}},n.dense&&Object(U.a)({minHeight:36},t.typography.body2,{["& .".concat(K.a.root," svg")]:{fontSize:"1.25rem"}}))}));var ie=i.forwardRef((function(e,t){const n=Object(V.a)({props:e,name:"MuiMenuItem"}),{autoFocus:r=!1,component:s="li",dense:a=!1,divider:o=!1,disableGutters:c=!1,focusVisibleClassName:l,role:d="menuitem",tabIndex:u}=n,h=Object(B.a)(n,te),p=i.useContext(W.a),m={dense:a||p.dense||!1,disableGutters:c},f=i.useRef(null);Object(G.a)((()=>{r&&f.current&&f.current.focus()}),[r]);const b=Object(U.a)({},n,{dense:m.dense,divider:o,disableGutters:c}),y=(e=>{const{disabled:t,dense:n,divider:i,disableGutters:r,selected:s,classes:a}=e,o={root:["root",n&&"dense",t&&"disabled",!r&&"gutters",i&&"divider",s&&"selected"]},c=Object(z.a)(o,$,a);return Object(U.a)({},a,c)})(n),j=Object(X.a)(f,t);let _;return n.disabled||(_=void 0!==u?u:-1),Object(g.jsx)(W.a.Provider,{value:m,children:Object(g.jsx)(ne,Object(U.a)({ref:j,role:d,tabIndex:_,component:s,focusVisibleClassName:Object(F.a)(y.focusVisible,l)},h,{ownerState:b,classes:y}))})})),re=n(648),se=n(647),ae=n(248),oe=n.n(ae),ce=n.p+"static/media/local.69183764.svg";const le=Object(L.a)(M.a)((e=>{let{theme:t}=e;return{color:"#fff",fontWeight:"bold",fontSize:"0.875rem",lineHeight:"30px",backgroundColor:"transparent"}})),de=e=>{const t=r.a.useRef(),n=r.a.useRef(),[i,s]=r.a.useState(null),[a,c]=r.a.useState(null),l=r.a.useRef(),d=e.vjsComponent.options(),u=e.vjsComponent.player(),h=u.audioTracks(),m=u.textTracks(),f=()=>{s(null)};return r.a.useEffect((()=>{u.on("loadedmetadata",(()=>{if(!t.current){for(var e=0;e<h.length;e++){(i=h[e]).language===localStorage.getItem("inv_audio")&&(i.enabled=!0)}t.current=!0}if(!n.current){for(e=0;e<m.length;e++){var i;"subtitles"===(i=m[e]).kind&&(i.language===localStorage.getItem("inv_sub")?i.mode="showing":i.mode="disabled")}n.current=!0}})),d.video&&(l.current&&"off"!==l.current?Object(o.a)("subtitle_on",{video_id:d.video.lesson.id}):l.current&&"off"===l.current&&Object(o.a)("subtitle_off",{video_id:d.video.lesson.id}))}),[l.current]),Object(g.jsxs)(r.a.Fragment,{children:[Object(g.jsx)(p.a,{onClick:e=>{s(e.currentTarget)},children:Object(g.jsx)("img",{alt:"",src:ce})}
2),Object(g.jsxs)(N.a,{anchorEl:i,keepMounted:!0,open:Boolean(i),onClose:f,MenuListProps:{dense:!0,disablePadding:!0},anchorOrigin:{vertical:"top",horizontal:"right"},transformOrigin:{vertical:"bottom",horizontal:"right"},container:d.anchorRef.current,children:[Object(g.jsx)(le,{children:"Audio"}),h.tracks_.map((e=>Object(g.jsxs)(ie,{selected:e.enabled,onClick:t=>{e.enabled=!0,localStorage.setItem("inv_audio",e.language),Object(o.a)("audio_language",{video_id:d.video.lesson.id,lang:e.language}),c(e.language),f();const n=e.id;let i=null;for(let e=0;e<m.length;e++)if("showing"===m[e].mode){i=m[e].id;break}d.handleSyncChromecastTracks(n,i)},children:[Object(g.jsx)(re.a,{style:{minWidth:"30px",color:"#fff"},children:e.enabled&&Object(g.jsx)(oe.a,{fontSize:"inherit",color:"inherit"})}),Object(g.jsx)(se.a,{primary:e.label,style:{paddingRight:"20px",margin:0}})]},"audio"+e.id))),Object(g.jsx)(le,{children:"Sottotitoli"}),m.tracks_.map(((e,t)=>"hidden"!==e.mode&&"subtitles"===e.kind&&Object(g.jsxs)(ie,{selected:"showing"===e.mode,onClick:n=>{for(let e=0;e<m.length;e++)m[e].mode="disabled";if("subtitles"===m[t].kind){l.current!==e.language?(m[t].mode="showing",l.current=e.language,localStorage.setItem("inv_sub",e.language)):(l.current="off",localStorage.removeItem("inv_sub")),f();let n=null;for(let e=0;e<h.length;e++)if(h[e].enabled){n=h[e].id;break}let i=null;"showing"===m[t].mode&&(i=m[t].id),d.handleSyncChromecastTracks(n,i)}},children:[Object(g.jsx)(re.a,{style:{minWidth:"30px",color:"#fff"},children:(l.current===e.language||"showing"===e.mode)&&Object(g.jsx)(oe.a,{fontSize:"inherit",color:"inherit"})}),Object(g.jsx)(se.a,{primary:e.label,style:{paddingRight:"20px",margin:0}})]},"text"+e.id)))]})]})},ue=s.a.getComponent("Component");class he extends ue{constructor(e,t){super(e,t),this.mount=this.mount.bind(this),e.ready((()=>{this.mount()})),this.addClass("vjs-control"),this.on("dispose",(()=>{h.a.unmountComponentAtNode(this.el())}))}mount(){h.a.render(Object(g.jsx)(de,{vjsComponent:this}),this.el())}}ue.registerComponent("vjsLocalization",he);n(63);var pe=n.p+"static/media/speed.49d22ce7.svg";const me=Object(L.a)(M.a)((e=>{let{theme:t}=e;return{color:"#fff",fontWeight:"bold",fontSize:"0.875rem",lineHeight:"30px",backgroundColor:"transparent"}})),ge=e=>{const{t:t}=Object(a.a)(),n=e.vjsComponent.options(),i=e.vjsComponent.player(),s=i.playbackRate(),[o,c]=r.a.useState(null),[l,d]=r.a.useState(s),u=i.playbackRates(),h=()=>{c(null)};return Object(g.jsxs)(r.a.Fragment,{children:[Object(g.jsx)(p.a,{onClick:e=>{c(e.currentTarget)},children:Object(g.jsx)("img",{alt:"",src:pe})}),Object(g.jsxs)(N.a,{anchorEl:o,keepMounted:!0,open:Boolean(o),onClose:h,MenuListProps:{dense:!0,disablePadding:!0},anchorOrigin:{vertical:"top",horizontal:"right"},transformOrigin:{vertical:"bottom",horizontal:"right"},container:n.anchorRef.current,children:[Object(g.jsx)(me,{children:t("Velocit\xe0 di riproduzione")}),u.map((e=>Object(g.jsxs)(ie,{selected:l===e,onClick:t=>{d(e),i.playbackRate(e),h()},children:[Object(g.jsx)(re.a,{style:{minWidth:"30px",color:"#fff"},children:l===e&&Object(g.jsx)(oe.a,{fontSize:"inherit",color:"inherit"})}),Object(g.jsx)(se.a,{primary:"x "+e,style:{paddingRight:"20px",margin:0}})]},e)))]})]})},fe=s.a.getComponent("Component");class be extends fe{constructor(e,t){super(e,t),this.mount=this.mount.bind(this),e.ready((()=>{this.mount()})),this.addClass("vjs-control"),this.on("dispose",(()=>{h.a.unmountComponentAtNode(this.el())}))}mount(){h.a.render(Object(g.jsx)(ge,{vjsComponent:this}),this.el())}}fe.registerComponent("vjsPlaybackRate",be);var ye=n(725),je=n(729),_e=n(191);const ve={basics:{dialogBg:"#26292D",innerBoxBg:"#191b1d"},wellness:{dialogBg:"#fff",innerBoxBg:"#EFEDE5"}},xe=e=>{const{t:t,i18n:n}=Object(a.a)(),i=e.vjsComponent.options(),s=e.vjsComponent.player(),o=i.video?i.video.lesson_next:null,d=i.video?i.video.lesson:null,[u,h]=r.a.useState(!1),[m,f]=r.a.useState(!1),b=r.a.useRef();return r.a.useEffect((()=>(s.on("ended",(async()=>{f(!0);const e=await i.handleEvent("lw",Math.round(s.duration()));e&&e.is_progress_completed&&d.test_id&&h(!0),Boolean(o)&&(b.current=setTimeout((()=>{i.handleClickLesson(o)}),5e3))})),()=>{b.current&&(clearTimeout(b.current),b.current=null)})),[]),Object(g.jsx)(C.a,{theme:O.a,children:Object(g.jsxs)(ye.a,{container:s.el(),maxWidth:"xs",onClose:()=>f(!1),open:m,sx:{"& .MuiPaper-root":{background:i.package?ve[i.package.key].dialogBg:"#26292D",color:e=>i.package?e.palette.text["primary_".concat(i.package.key)]:"#fff",p:3}},children:[Object(g.jsxs)(S.a,{textAlign:"center",sx:{mb:2},children:[i.package?Object(g.jsx)(w.a,{color:"inherit",gutterBottom:!0,children:Object(g.jsx)("b",{children:Boolean(o)?t("Continua con il prossimo capitolo"):t("Hai concluso questo modulo")})}):Object(g.jsx)(w.a,{variant:"h6",color:"inherit",gutterBottom:!0,children:Object(g.jsx)("b",{children:t("Hai terminato questa lezione!")})}),Boolean(d)&&Boolean(d.test_id)&&!d.test_passed&&u?Object(g.jsx)(_e.a,{component:je.a,href:i.package?Object(l.f)("/:lang/:package/:classSlug/:modules/:moduleSlug/:lessons/:chapterSlug/test",{lang:n.language,package:i.package.translation,classSlug:d.course.package.slug,modules:t("moduli"),moduleSlug:d.course.slug,lessons:t("lezioni"),chapterSlug:d.slug}):Object(l.f)("/:lang/:courses/:courseSlug/:lessons/:lessonSlug/test",{lang:n.language,courses:i.isHoreca?t("horeca"):t("corsi"),courseSlug:d.course_slug,lessons:t("lezioni"),lessonSlug:d.slug}),color:"secondary",children:t("Fai il test")}):i.package&&Boolean(o)&&o.can_watch?Object(g.jsx)(_e.a,{fullWidth:!0,component:je.a,size:"small",onClick:()=>i.handleClickLesson(o),variant:"contained",color:i.package.key,children:t("Prossimo capitolo")}):i.package&&Boolean(o)&&!o.can_watch?Object(g.jsx)(_e.a,{fullWidth:!0,size:"small",component:je.a,href:"/".concat(n.language,"/paywall/").concat(d.course.id),variant:"contained",color:"primary",children:t("Attiva l'abbonamento")}):Object(g.jsx)(r.a.Fragment,{})]}),Boolean(o)&&!i.package&&Object(g.jsxs)(S.a,{sx:{background:"#2F3337",borderRadius:"10px",p:2},children:[Object(g.jsx)(w.a,{component:"h6",variant:"caption",sx:{textTransform:"uppercase"},gutterBottom:!0,children:t("Prossima lezione")}),Object(g.jsxs)(p.a,{onClick:()=>i.handleClickLesson(o),sx:{display:"flex !important",width:"100%"},children:[Object(g.jsx)("img",{alt:o.title,src:Object(c.m)(o.img_cover,200),style:{width:"95px",borderRadius:"10px",marginRight:"10px"}}),Object(g.jsxs)(S.a,{textAlign:"left",children:[Object(g.jsxs)(w.a,{color:"textPrimary",variant:"subtitle2",children:[t("LEZIONE")," ",o.lesson_num]}
2),Object(g.jsx)(w.a,{color:"textPrimary",sx:{display:"-webkit-box",WebkitLineClamp:2,WebkitBoxOrient:"vertical",overflow:"hidden"},children:Object(g.jsx)("b",{children:o.title})})]})]})]}),Boolean(o)&&i.package&&Object(g.jsx)(S.a,{sx:{background:i.package?ve[i.package.key].innerBoxBg:"#191b1d",borderRadius:"10px",p:2},children:Object(g.jsxs)(p.a,{onClick:()=>i.handleClickLesson(o),sx:{display:"flex !important",width:"100%"},children:[Object(g.jsx)("img",{src:Object(c.m)(o.img_cover,200),style:{width:"95px",borderRadius:"10px",marginRight:"10px"}}),Object(g.jsxs)(S.a,{textAlign:"left",children:[Object(g.jsx)(w.a,{component:"h6",variant:"caption",children:t("Prossimo capitolo")}),Object(g.jsx)(w.a,{color:"inherit",variant:"subtitle2",children:o.course.title}),Object(g.jsx)(w.a,{color:"inherit",sx:{display:"-webkit-box",WebkitLineClamp:2,WebkitBoxOrient:"vertical",overflow:"hidden"},children:Object(g.jsx)("b",{children:o.title})})]})]})})]})})},Oe=s.a.getComponent("Component");class Te extends Oe{constructor(e,t){super(e,t),this.mount=this.mount.bind(this),e.ready((()=>{this.mount()})),this.addClass("vjs-endlesson-dialog"),this.on("dispose",(()=>{h.a.unmountComponentAtNode(this.el())}))}mount(){h.a.render(Object(g.jsx)(xe,{vjsComponent:this}),this.el())}}Oe.registerComponent("vjsEndLesson",Te);const Se=Object(L.a)(w.a)((e=>{let{theme:t}=e;return{color:"#fff",textShadow:"0 3px 6px rgba(0, 0, 0, 0.16)",marginTop:"7px",fontFamily:"Raleway",paddingLeft:"20px"}})),we=e=>{const{t:t}=Object(a.a)(),n=e.vjsComponent.options(),i=e.vjsComponent.player(),s=n.video?n.video.lesson:{},[c,l]=r.a.useState(null);return r.a.useEffect((()=>{i.on("statechanged",(()=>{void 0!==typeof i.state.currentAd&&l(i.state.currentAd)}))}),[]),Object(g.jsx)(C.a,{theme:O.a,children:Object(g.jsx)(S.a,{children:c?Object(g.jsxs)(Se,{variant:"caption",color:"textPrimary",children:[c.label_A.text,"\xa0\u2022\xa0",!!c.label_B&&"text"===c.label_B.type&&c.label_B.text,!!c.label_B&&"link"===c.label_B.type&&Object(g.jsx)(je.a,{href:c.label_B.url,target:"_blank",underline:"always",color:"inherit",onClick:()=>{Object(o.a)("video_adv_clicked",{video_id:s.id,video_adv_id:c.adv_campaign_id,video_adv_name:c.title,video_adv_type:i.state.typeAd,video_adv_link:c.label_B.url}),n.handleEvent("click",c.session_id,{adv_campaign_id:c.adv_campaign_id,lesson_id:s.id,elapsed:Math.round(i.currentTime())})},children:c.label_B.text})]}):Object(g.jsxs)(g.Fragment,{children:[Object(g.jsxs)(Se,{className:"title",variant:"caption",color:"textPrimary",children:[t("LEZIONE")," ",s.lesson_num||""]}),Object(g.jsx)(Se,{className:"subtitle",color:"textPrimary",gutterBottom:!0,sx:{mt:0},children:Object(g.jsx)("b",{children:s.title||""})})]})})})},Ae=s.a.getComponent("Component");class ke extends Ae{constructor(e,t){super(e,t),this.mount=this.mount.bind(this),e.ready((()=>{this.mount()})),this.addClass("vjs-title-bar"),this.on("dispose",(()=>{h.a.unmountComponentAtNode(this.el())}))}mount(){h.a.render(Object(g.jsx)(we,{vjsComponent:this}),this.el())}}Ae.registerComponent("vjsTitle",ke);var Ce=n(246);const Ee=Object(L.a)(A.a)((e=>{let{theme:t}=e;return{color:"#fff",fontFamily:"Raleway",textShadow:"0 3px 6px rgba(0, 0, 0, 0.16)",fontWeight:"bold"}})),Ie=e=>{const t=e.vjsComponent.player(),[n,i]=r.a.useState(!0),s=r.a.useRef(),a=e=>{const t=document.body.scrollTop||document.documentElement.scrollTop;s.current.offsetParent&&t>s.current.offsetParent.offsetTop&&i(!0)};return r.a.useEffect((()=>(window.addEventListener("scroll",a),()=>{window.removeEventListener("scroll",a)})),[]),r.a.useEffect((()=>{t.muted(n)}),[n]),Object(g.jsx)(Ee,{ref:s,onClick:()=>{i(!n)},children:n?Object(g.jsx)(Ce.e,{style:{fontSize:30}}):Object(g.jsx)(Ce.d,{style:{fontSize:30}})})},De=s.a.getComponent("Component");class Pe extends De{constructor(e,t){super(e,t),this.mount=this.mount.bind(this),e.ready((()=>{this.mount()})),this.addClass("vjs-mute-button"),this.on("dispose",(()=>{h.a.unmountComponentAtNode(this.el())}))}mount(){h.a.render(Object(g.jsx)(Ie,{vjsComponent:this}),this.el())}}De.registerComponent("vjsMute",Pe);var Re=n(718),Le=n(317),Me=n.n(Le);const Ne=Object(L.a)(Re.a)((e=>{let{theme:t}=e;return{color:"#D0D0D0",backgroundColor:"rgba(0, 0, 0, 0.7)",fontSize:12,"&:hover":{backgroundColor:"rgba(0, 0, 0, 0.7)"}}})),Be=e=>{const{t:t}=Object(a.a)(),n=e.vjsComponent.options(),i=e.vjsComponent.player(),s=n.video?n.video.lesson:{},[c,l]=r.a.useState(null),[d,u]=r.a.useState(null),[h,p]=r.a.useState(null);return r.a.useEffect((()=>{i.on("statechanged",(()=>{void 0!==typeof i.state.currentAd&&l(i.state.currentAd)}))}),[]),r.a.useEffect((()=>{c&&(i.on("aca-timeupdate",(()=>{u(i.remainingTimeDisplay())})),i.on("loadeddata",(()=>{p(i.duration())})))}),[c]),Object(g.jsxs)(C.a,{theme:O.a,children:[!!c&&"countdown"===c.button.type&&Object(g.jsxs)(Ne,{component:"div",children:[t("Inizia tra")," ",0===d?h:d]}),!!c&&"skip"===c.button.type&&Object(g.jsx)(Ne,{component:"div",endIcon:Object(g.jsx)(Me.a,{}),onClick:()=>{Object(o.a)("video_adv_skipped",{video_id:s.id,video_adv_id:c.adv_campaign_id,video_adv_name:c.title,video_adv_type:i.state.typeAd,video_adv_skipped_after:Math.round(i.currentTime())}),n.handleEvent("view",c.session_id,{adv_campaign_id:c.adv_campaign_id,lesson_id:s.id,skipped:!0,elapsed:Math.round(i.currentTime())}),i.trigger("ads-ad-ended")},children:t("Salta")})]})},Ue=s.a.getComponent("Component");class Fe extends Ue{constructor(e,t){super(e,t),this.mount=this.mount.bind(this),e.ready((()=>{this.mount()})),this.addClass("vjs-skip-ad"),this.on("dispose",(()=>{h.a.unmountComponentAtNode(this.el())}))}mount(){h.a.render(Object(g.jsx)(Be,{vjsComponent:this}),this.el())}}Ue.registerComponent("vjsSkipAd",Fe);var ze=n(318),qe=n.n(ze);const He=e=>{const t=e.vjsComponent.options();return Object(g.jsx)(A.a,{onClick:()=>{t.handleChromeCast()},children:Object(g.jsx)(qe.a,{})})},Ve=s.a.getComponent("Component");class We extends Ve{constructor(e,t){super(e,t),this.mount=this.mount.bind(this),e.ready((()=>{this.mount()})),this.addClass("vjs-control"),this.on("dispose",(()=>{h.a.unmountComponentAtNode(this.el())}))}mount(){h.a.render(Object(g.jsx)(He,{vjsComponent:this}),this.el())}}if(!s.a.getComponent("vjsChromecast"))try{Ve.registerComponent("vjsChromecast",We)}catch(Wt){console.warn("vjsChromecast: impossibile registrare il componente (probabilmente gi\xe0 registrato)",Wt)}n(319),n(320);var Ge=n(84),Xe=(n(321),n(194)),Ye=n.n(Xe),Ke=n(237),Qe=n.n(Ke),Ze="7.5.2";var Je=function(e,t){t.isImmediatePropagationStopped=function(){return!0},t.cancelBubble=!0,t.isPropagationStopped=function(){return!0}},$e=function(e,t,n){Je(0,n),e.trigger({type:t+n.type,originalEvent:n})};function et(e){"playing"===e.type?function(e,t){e.ads.isInAdMode()&&(e.ads.isContentResuming()?e.ads._contentEnding&&$e(e,"content",t):$e(e,"ad",t))}(this,e):"ended"===e.type?function(e,t){e.ads.isInAdMode()?e.ads.isContentResuming()?(Je(0,t),e.trigger("resumeended")):$e(e,"ad",t):e.ads._contentHasEnded||e.ads.stitchedAds()||($e(e,"content",t),e.trigger("readyforpostroll"))}(this,e):"loadstart"===e.type||"loadeddata"===e.type||"loadedmetadata"===e.type?function(e,t){if(!("loadstart"===t.type&&!e.ads._hasThereBeenALoadStartDuringPlayerLife||"loadeddata"===t.type&&!e.ads._hasThereBeenALoadedData||"loadedmetadata"===t.type&&!e.ads._hasThereBeenALoadedMetaData))if(e.ads.inAdBreak())$e(e,"ad",t);else{if(e.currentSrc()!==e.ads.contentSrc)return;$e(e,"content",t)}}(this,e):"play"===e.type?function(e,t){e.ads.inAdBreak()?$e(e,"ad",t):e.ads.isContentResuming()&&$e(e,"content",t)}(this,e):this.ads.isInAdMode()&&(this.ads.isContentResuming()?$e(this,"content",e):$e(this,"ad",e))}function tt(){return tt=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},tt.apply(this,arguments)}function nt(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,it(e,t)}function it(e,t){return it=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},it(e,t)}var rt={},st=function(){!function(e){if(s.a.dom.isInFrame()&&"function"!==typeof Ye.a.__tcfapi){for(var t,n=Ye.a,i={};n;){try{if(n.frames.__tcfapiLocator){t=n;break}}catch(r){}if(n===Ye.a.top)break;n=n.parent}if(!t)return;
2Ye.a.__tcfapi=function(e,n,r,s){var a=Math.random()+"",o={__tcfapiCall:{command:e,parameter:s,version:n,callId:a}};i[a]=r,t.postMessage(o,"*")},Ye.a.addEventListener("message",(function(e){var t={};try{t="string"===typeof e.data?JSON.parse(e.data):e.data}catch(r){}var n=t.__tcfapiReturn;n&&"function"===typeof i[n.callId]&&(i[n.callId](n.returnValue,n.success),i[n.callId]=null)}),!1)}}(),"function"===typeof Ye.a.__tcfapi&&Ye.a.__tcfapi("addEventListener",2,(function(e,t){t&&(rt=e)}))},at="",ot=function(e,t){if(void 0===t&&(t=Ye.a),t.__uspapi)t.__uspapi("getUSPData",1,(function(t,n){var i=n?t.uspString:null;at=i,e(i)}));else{var n=function(e){for(var t=e.parent;t!==e.top;){try{if(t.frames&&t.frames.__uspapiLocator)return t}catch(n){}t=t.parent}try{if(e.top.frames&&e.top.frames.__uspapiLocator)return e.top}catch(n){}return null}(t);if(!n)return void e(null);var i=Math.random().toString(36).substring(2),r={__uspapiCall:{command:"getUSPData",version:1,callId:i}};t.addEventListener("message",(function n(r){if(r&&r.data&&r.data.__uspapiReturn&&r.data.__uspapiReturn.callId===i){t.removeEventListener("message",n,!1);var s=r.data.__uspapiReturn,a=s.returnValue,o=s.success?a.uspString:null;at=o,e(o)}}),!1),n.postMessage(r,"*")}},ct={AdsBeforePrerollError:"ads-before-preroll-error",AdsPrerollError:"ads-preroll-error",AdsMidrollError:"ads-midroll-error",AdsPostrollError:"ads-postroll-error",AdsMacroReplacementFailed:"ads-macro-replacement-failed",AdsResumeContentFailed:"ads-resume-content-failed"},lt=function(e,t){return t?encodeURIComponent(e):e},dt=function(e,t){var n={};return["description","tags","reference_id","ad_keys"].forEach((function(i){e&&e[i]?n["{mediainfo."+i+"}"]=e[i]:t["{mediainfo."+i+"}"]?n["{mediainfo."+i+"}"]=t["{mediainfo."+i+"}"]:n["{mediainfo."+i+"}"]=""})),["custom_fields","customFields"].forEach((function(t){!function(e,t,n){if(e&&e[n])for(var i=e[n],r=Object.keys(i),s=0;s<r.length;s++)t["{mediainfo."+n+"."+r[s]+"}"]=i[r[s]]}(e,n,t)})),n},ut=function(e,t,n,i,r){for(var a in void 0===i&&(i={}),t){var o=i.hasOwnProperty(a)?i[a]:a;if(o.startsWith("r:"))try{var c=new RegExp(o.slice(2),"g");e=e.replace(c,lt(t[a],n))}catch(l){r.ads.error({errorType:ct.AdsMacroReplacementFailed,macro:a,error:l}),s.a.log.warn('Unable to replace macro with regex "'+o+'". The provided regex may be invalid.')}else e=e.split(o).join(lt(t[a],n))}return e};function ht(e,t,n){void 0===t&&(t=!1),void 0===n&&(n={});var i=n.disableDefaultMacros||!1,r=n.macroNameOverrides||{};delete n.disableDefaultMacros,delete n.macroNameOverrides;var a=n;if(i)return ut(e,a,t,r);var o,c=function(e){var t={},n=e.replace(/{([^}=]+)=([^}]*)}/g,(function(e,n,i){return t["{"+n+"}"]=i,"{"+n+"}"}));return{defaults:t,modifiedString:n}}(e),l=c.defaults,d=c.modifiedString;for(var u in e=d,tt(a,{"{player.id}":(o=this).options_["data-player"]||o.id_,"{player.height}":o.currentHeight(),"{player.width}":o.currentWidth(),"{player.heightInt}":Math.round(o.currentHeight()),"{player.widthInt}":Math.round(o.currentWidth()),"{player.autoplay}":o.autoplay()?1:0,"{player.muted}":o.muted()?1:0,"{player.language}":o.language()||"","{mediainfo.id}":o.mediainfo?o.mediainfo.id:"","{mediainfo.name}":o.mediainfo?o.mediainfo.name:"","{mediainfo.duration}":o.mediainfo?o.mediainfo.duration:"","{player.duration}":o.duration(),"{player.durationInt}":Math.round(o.duration()),"{player.live}":o.duration()===1/0?1:0,"{player.pageUrl}":s.a.dom.isInFrame()?Qe.a.referrer:Ye.a.location.href,"{playlistinfo.id}":o.playlistinfo?o.playlistinfo.id:"","{playlistinfo.name}":o.playlistinfo?o.playlistinfo.name:"","{timestamp}":(new Date).getTime(),"{document.referrer}":Qe.a.referrer,"{window.location.href}":Ye.a.location.href,"{random}":Math.floor(1e12*Math.random())},dt(this.mediainfo,l),function(e){var t={};return Object.keys(e).forEach((function(n){t["{tcf."+n+"}"]=e[n]})),t["{tcf.gdprAppliesInt}"]=e.gdprApplies?1:0,t}(rt),{"{usp.uspString}":at},function(e,t,n){var i=new RegExp("{pageVariable\\.([^}]+)}","g"),r={},a=(e.match(i)||[]).concat(Object.keys(n).filter((function(t){return i.test(t)&&e.includes(n[t])})));if(a)return a.forEach((function(e){for(var n,i=e,a=e.slice(14,-1),o=a.split("."),c=Ye.a,l=0;l<o.length;l++)if(l===o.length-1)n=c[o[l]];else if("undefined"===typeof(c=c[o[l]]))break;var d=typeof n;null===n?r[i]="null":void 0===n?t[i]?r[i]=t[i]:(s.a.log.warn('Page variable "'+a+'" not found'),r[i]=""):"str
2ing"!==d&&"number"!==d&&"boolean"!==d?(s.a.log.warn('Page variable "'+a+'" is not a supported type'),r[i]=""):r[i]=n})),r}(e,l,r)),e=ut(e,a,t,r,this),l)e=e.replace(u,l[u]);return e}var pt={processMetadataTracks:function(e,t){for(var n=e.textTracks(),i=function(n){"metadata"===n.kind&&(e.ads.cueTextTracks.setMetadataTrackMode(n),t(e,n))},r=0;r<n.length;r++)i(n[r]);n.addEventListener("addtrack",(function(e){i(e.track)}))},setMetadataTrackMode:function(e){},getSupportedAdCue:function(e,t){return t},isSupportedAdCue:function(e,t){return!0},getCueId:function(e,t){return t.id}},mt=function(e,t){return void 0!==t&&e.ads.includedCues[t]},gt=function(e,t){void 0!==t&&""!==t&&(e.ads.includedCues[t]=!0)};function ft(){!1!==this.ads._shouldBlockPlay&&(this.paused()||(this.ads.debug("Playback was canceled by cancelContentPlay"),this.pause()),this.ads._cancelledPlay=!0)}pt.processAdTrack=function(e,t,n,i){e.ads.includedCues={};for(var r=0;r<t.length;r++){var a=t[r],o=this.getSupportedAdCue(e,a);if(!this.isSupportedAdCue(e,a))return void s.a.log.warn("Skipping as this is not a supported ad cue.",a);var c=this.getCueId(e,a),l=a.startTime;if(mt(e,c))return void s.a.log("Skipping ad already seen with ID "+c);i&&i(e,o,c,l),n(e,o,c,l),gt(e,c)}};var bt={},yt=s.a;bt.isMiddlewareMediatorSupported=function(){return!yt.browser.IS_IOS&&!yt.browser.IS_ANDROID&&!!(yt.use&&yt.middleware&&yt.middleware.TERMINATOR)},bt.playMiddleware=function(e){return{setSource:function(e,t){t(null,e)},callPlay:function(){if(e.ads&&!0===e.ads._shouldBlockPlay)return e.ads.debug("Using playMiddleware to block content playback"),e.ads._playBlocked=!0,yt.middleware.TERMINATOR},play:function(t,n){e.ads&&e.ads._playBlocked&&t?(e.ads.debug("Play call to Tech was terminated."),e.trigger("play"),e.addClass("vjs-has-started"),e.ads._playBlocked=!1):n&&n.catch&&n.catch((function(t){"NotAllowedError"!==t.name||s.a.browser.IS_SAFARI||e.trigger("pause")}))}}},bt.testHook=function(e){yt=e};var jt=bt.playMiddleware,_t=bt.isMiddlewareMediatorSupported;var vt={src:"data:video/mp4;base64,AAAAIGZ0eXBpc29tAAACAGlzb21pc28yYXZjMW1wNDEAAAAIZnJlZQAAAxJtZGF03ABMYXZjNjEuMy4xMDAAQiAIwRg4AAACrgYF//+q3EXpvebZSLeWLNgg2SPu73gyNjQgLSBjb3JlIDE2NCByMzEwOCAzMWUxOWY5IC0gSC4yNjQvTVBFRy00IEFWQyBjb2RlYyAtIENvcHlsZWZ0IDIwMDMtMjAyMyAtIGh0dHA6Ly93d3cudmlkZW9sYW4ub3JnL3gyNjQuaHRtbCAtIG9wdGlvbnM6IGNhYmFjPTEgcmVmPTMgZGVibG9jaz0xOjA6MCBhbmFseXNlPTB4MzoweDExMyBtZT1oZXggc3VibWU9NyBwc3k9MSBwc3lfcmQ9MS4wMDowLjAwIG1peGVkX3JlZj0xIG1lX3JhbmdlPTE2IGNocm9tYV9tZT0xIHRyZWxsaXM9MSA4eDhkY3Q9MSBjcW09MCBkZWFkem9uZT0yMSwxMSBmYXN0X3Bza2lwPTEgY2hyb21hX3FwX29mZnNldD0tMiB0aHJlYWRzPTcgbG9va2FoZWFkX3RocmVhZHM9MSBzbGljZWRfdGhyZWFkcz0wIG5yPTAgZGVjaW1hdGU9MSBpbnRlcmxhY2VkPTAgYmx1cmF5X2NvbXBhdD0wIGNvbnN0cmFpbmVkX2ludHJhPTAgYmZyYW1lcz0zIGJfcHlyYW1pZD0yIGJfYWRhcHQ9MSBiX2JpYXM9MCBkaXJlY3Q9MSB3ZWlnaHRiPTEgb3Blbl9nb3A9MCB3ZWlnaHRwPTIga2V5aW50PTI1MCBrZXlpbnRfbWluPTI1IHNjZW5lY3V0PTQwIGludHJhX3JlZnJlc2g9MCByY19sb29rYWhlYWQ9NDAgcmM9Y3JmIG1idHJlZT0xIGNyZj0yMy4wIHFjb21wPTAuNjAgcXBtaW49MCBxcG1heD02OSBxcHN0ZXA9NCBpcF9yYXRpbz0xLjQwIGFxPTE6MS4wMACAAAAAOWWIhAAn//71sXwKaunqigzoMi7hlyTJrrYi4m0AwABFxzcqWKGahTaoBcQAAMWK4AlcFlIICBeldSEQBGCMHAAABVNtb292AAAAbG12aGQAAAAAAAAAAAAAAAAAAAPoAAAAIgABAAABAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADAAACQXRyYWsAAABcdGtoZAAAAAMAAAAAAAAAAAAAAAEAAAAAAAAAIgAAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAEAAAAABQAAAAPAAAAAAACRlZHRzAAAAHGVsc3QAAAAAAAAAAQAAACIAAAAAAAEAAAAAAbltZGlhAAAAIG1kaGQAAAAAAAAAAAAAAAAAADwAAAACAFXEAAAAAAAtaGRscgAAAAAAAAAAdmlkZQAAAAAAAAAAAAAAAFZpZGVvSGFuZGxlcgAAAAFkbWluZgAAABR2bWhkAAAAAQAAAAAAAAAAAAAAJGRpbmYAAAAcZHJlZgAAAAAAAAABAAAADHVybCAAAAABAAABJHN0YmwAAADAc3RzZAAAAAAAAAABAAAAsGF2YzEAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAABQADwAEgAAABIAAAAAAAAAAEUTGF2YzYxLjMuMTAwIGxpYngyNjQAAAAAAAAAAAAAAAAY//8AAAA2YXZjQwFkAA3/4QAZZ2QADazZQUH7ARAAAAMAEAAAAwPA8UKZYAEABmjr48siwP34+AAAAAAQcGFzcAAAAAEAAAABAAAAFGJ0cnQAAAAAAALAEAACwBAAAAAYc3R0cwAAAAAAAAABAAAAAQAAAgAAAAAcc3RzYwAAAAAAAAABAAAAAQAAAAEAAAABAAAAFHN0c3oAAAAAAAAC7wAAAAEAAAAUc3RjbwAAAAAAAAABAAAARQAAAj10cmFrAAAAXHRraGQAAAADAAAAAAAAAAAAAAACAAAAAAAAABgAAAAAAAAAAAAAAAEBAAAAAAEAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAkZWR0cwAAABxlbHN0AAAAAAAAAAEAAAAXAAAEAAABAAAAAAG1bWRpYQAAACBtZGhkAAAAAAAAAAAAAAAAAACsRAAACABVxAAAAAAALWhkbHIAAAAAAAAAAHNvdW4AAAAAAAAAAAAAAABTb3VuZEhhbmRsZXIAAAABYG1pbmYAAAAQc21oZAAAAAAAAAAAAAAAJGRpbmYAAAAcZHJlZgAAAAAAAAABAAAADHVybCAAAAABAAABJHN0YmwAAAB+c3RzZAAAAAAAAAABAAAAbm1wNGEAAAAAAAAAAQAAAAAAAAAAAAIAEAAAAACsRAAAAAAANmVzZHMAAAAAA4CAgCUAAgAEgICAF0AVAAAAAAH0AAAAEisFgICABRIQVuUABoCAgAECAAAAFGJ0cnQAAAAAAAH0AAAAEisAAAAYc3R0cwAAAAAAAAABAAAAAgAABAAAAAAcc3RzYwAAAAAAAAABAAAAAQAAAAEAAAABAAAAHHN0c3oAAAAAAAAAAAAAAAIAAAAVAAAABgAAABhzdGNvAAAAAAAAAAIAAAAwAAADNAAAABpzZ3BkAQAAAHJvbGwAAAACAAAAAf//AAAAHHNiZ3AAAAAAcm9sbAAAAAEAAAACAAAAAQAAAGF1ZHRhAAAAWW1ldGEAAAAAAAAAIWhkbHIAAAAAAAAAAG1kaXJhcHBsAAAAAAAAAAAAAAAALGlsc3QAAAAkqXRvbwAAABxkYXRhAAAAAQAAAABMYXZmNjEuMS4xMDA=",type:"video/mp4"},xt=function(){function e(){}return e.getState=function(t){if(t)return e.states_&&e.states_[t]?e.states_[t]:void 0},e.registerState=function(t,n){if("string"!==typeof t||!t)throw new Error('Illegal state name, "'+t+'"; must be a non-empty string.');return e.states_||(e.states_={}),e.states_[t]=n,n},e}(),Ot=function(){function e(e){this.player=e}e._getName=function(){return"Anonymous State"};var t=e.prototype;return t.transitionTo=function(e){var t=this.player;this.cleanup(t);var n=new e(t);t.ads._state=n,t.ads.debug(this.constructor._getName()+" -> "+n.constructor._getName());for(var i=arguments.length,r=new Array(i>1?i-1:0),s=1;s<i;s++)r[s-1]=arguments[s];n.init.apply(n,[t].concat(r))},t.init=function(){},t.cleanup=function(){},t.onPlay=function(){},t.onPlaying=function(){},t.onEnded=function(){},t.onAdEnded=function(){},t.onAdsReady=function(){s.a.log.warn("Unexpected adsready event")},t.onAdsError=function(){},t.onAdsCanceled=function(){},t.onAdTimeout=function(){},t.onAdStarted=function(){},t.onAdSkipped=function(){},t.onContentChanged=function(){},t.onContentResumed=function(){},t.onReadyForPostroll=function(){s.a.log.warn("Unexpected readyforpostroll event")},t.onNoPreroll=function(){},t.onNoPostroll=function(){},t.startLinearAdMode=function(){s.a.log.warn("Unexpected startLinearAdMode invocation (State via "+this.constructor._getName()+")")},t.endLinearAdMode=function(){s.a.log.warn("Unexpected endLinearAdMode invocation (State via "+this.constructor._getName()+")")},t.skipLinearAdMode=function(){s.a.log.warn("Unexpected skipLinearAdMode invocation (State via "+this.constructor._getName()+")")},t.isAdState=function(){throw new Error("isAdState unimplemented for "+this.constructor._getName())},t.isWaitingForAdBreak=function(){return!1},t.isContentResuming=function(){return!1},t.inAdBreak=function(){return!1},t.handleEvent=function(e){var t=this.player;"play"===e?this.onPlay(t):"adsready"===e?this.onAdsReady(t):"adserror"===e?this.onAdsError(t):"adscanceled"===e?this.onAdsCanceled(t):"adtimeout"===e?this.onAdTimeout(t):"ads-ad-started"===e?this.onAdStarted(t):"ads-ad-skipped"===e?this.onAdSkipped(t):"contentchanged"===e?this.onContentChanged(t):"contentresumed"===e?this.onContentResumed(t):"readyforpostroll"===e?this.onReadyForPostroll(t):"playing"===e?this.onPlaying(t):"ended"===e?this.onEnded(t):"nopreroll"===e?this.onNoPreroll(t):"nopostroll"===e?this.onNoPostroll(t):"adended"===e&&this.onAdEnded(t)},e}();xt.registerState("State",Ot);var Tt=function(e){function t(t){var n;return(n=e.call(this,t)||this).contentResuming=!1,n.waitingForAdBreak=!1,n}nt(t,e);var n=t.prototype;return n.isAdState=function(){return!0},n.onPlaying=function(){var e=xt.getState("ContentPlayback");this.contentResuming&&this.transitionTo(e)},n.onContentResumed=function(){var e=xt.getState("ContentPlayback");this.contentResuming&&this.transitionTo(e)},n.isWaitingForAdBreak=function(){return this.waitingForAdBreak},n.isContentResuming=function(){return this.contentResuming},n.inAdBreak=function(){return!0===this.player.ads._inLinearAdMode},t}(Ot);xt.registerState("AdState",Tt);var St=function(e){function t(){return e.apply(this,arguments)||this}nt(t,e);var n=t.prototype;return n.isAdState=function(){return!1},n.onContentChanged=function(e){var t=xt.getState("BeforePreroll"),n=xt.getState("Preroll");e.ads.debug("Received contentchanged event (ContentState)"),e.paused()?this.transitionTo(t):(this.transitionTo(n,!1),e.pause(),e.ads._pausedOnContentupdate=!0)},t}(Ot);xt.registerState("ContentState",St);var wt,At=function(e){function t(){return e.apply(this,arguments)||this}nt(t,e),t._getName=function(){return"AdsDone"};var n=t.prototype;return n.init=function(e){e.ads._contentHasEnded=!0,e.trigger("ended")},n.startLinearAdMode=function(){s.a.log.warn("Unexpected startLinearAdMode invocation (AdsDone)")},t}(xt.getState("ContentState"));xt.registerState("AdsDone",At);var kt={start:function(e){e.ads.debug("Starting ad break"),e.ads._inLinearAdMode=!0,e.trigger("adstart"),e.ads.shouldTakeSnapshots()&&(e.ads.snapshot=function(e){var t;t=s.a.browser.IS_IOS&&e.ads.isLive(e)&&e.seekable().length>0?e.currentTime()-e.seekable().end(0):e.currentTime();var n=e.$(".vjs-tech"),i=e.textTracks?e.textTracks():[],r=[],a={ended:e.ended(),currentSrc:e.currentSrc(),sources:e.currentSources(),src:e.tech_.src(),currentTime:t,type:e.currentType()};n&&(a.style=n.getAttribute("style"));for(var o=0;o<i.length;o++){var c=i[o];r.push({track:c,mode:c.mode}),c.mode="disabled"}return a.suppressedTracks=r,a}(e)),e.ads.shouldPlayContentBehindAd(e)&&!e.ads.settings.stitchedAds&&(e.ads.preAdVolume_=e.volume(),e.volume(0)),e.addClass("vjs-ad-playing"),e.hasClass("vjs-live")&&e.removeClass("vjs-live"),e.ads.removeNativePoster(),e.ads.preAdPlaybackRate_=e.playbackRate(),e.playbackRate(1),e.controlBar&&e.controlBar.playbackRateMenuButton&&e.controlBar.playbackRateMenuButton.playbackRateSupported&&!e.controlBar.playbackRateMenuButton.hasClass("vjs-hidden")?(e.controlBar.playbackRateMenuButton.hide(),e.ads.showPlaybackMenuOnAdEnd_=!0):e.ads.showPlaybackMenuOnAdEnd_=!1},end:function(e,t){e.ads.debug("Ending ad break"),void 0===t&&(t=function(){}),e.ads.adType=null,e.ads._inLinearAdMode=!1,e.trigger("adend"),e.removeClass("vjs-ad-playing"),e.ads.isLive(e)&&e.addClass("vjs-live"),e.ads.shouldTakeSnapshots()?function(e,t){var n=e.ads.snapshot;if(void 0===t&&(t=function(){}),!0===e.ads.disableNextSnapshotRestore)return e.ads.disableNextSnapshotRestore=!1,delete e.ads.snapshot,void t();var i,r=e.$(".vjs-tech"),a=20,o=n.suppressedTracks,c=function(){for(var e=0;e<o.length;e++)(i=o[e]).track.mode=i.mode},l=function(){var t;if(s.a.browser.IS_IOS&&e.ads.isLive(e)){if(n.currentTime<0&&(t=e.seekable().length>0?e.seekable().end(0)+n.currentTime:e.currentTime(),e.currentTime(t)),e.paused()){var i=e.play();i&&i.catch&&i.catch((function(e){s.a.log.warn("Play promise rejected in IOS snapshot resume",e)}))}}else if(n.ended)e.currentTime(e.duration());else{e.currentTime(n.currentTime);var r=e.play();r&&r.catch&&r.catch((function(e){s.a.log.warn("Play promise rejected in snapshot resume",e)}))}e.ads.shouldRemoveAutoplay_&&(e.autoplay(!1),e.ads.shouldRemoveAutoplay_=!1)},d=function t(){if(e.off("contentcanplay",t),wt&&e.clearTimeout(wt),(r=e.el().querySelector(".vjs-tech")).readyState>1)return l();if(void 0===r.seekable)return l();if(r.seekable.length>0)return l();if(a--)e.setTimeout(t,50);else try{l()}catch(n){e.ads.error({errorType:ct.AdsResumeContentFailed,error:n}),s.a.log.warn("Failed to resume the content after an advertisement",n)}};if("style"in n&&r.setAttribute("style",n.style||""),e.ads.videoElementRecycled())e.one("resumeended",(function(){delete e.ads.snapshot,t()})),e.one("contentloadedmetadata",c),s.a.browser.IS_IOS&&!e.autoplay()&&"function"===typeof e.techCall_&&(e.techCall_("setAutoplay",!0),e.ads.shouldRemoveAutoplay_=!0),e.src(n.sources),e.one("contentcanplay",d),wt=e.setTimeout(d,2e3);else{if(c(),!e.ended()){var u=e.play();u&&u.catch&&u.catch((function(e){s.a.log.warn("Play promise rejected in snapshot restore",e)}))}delete e.ads.snapshot,t()}}(e,t):(e.ads.preAdVolume_&&e.volume(e.ads.preAdVolume_),t()),e.playbackRate(e.ads.preAdPlaybackRate_),e.ads.showPlaybackMenuOnAdEnd_&&e.controlBar.playbackRateMenuButton.show()}},Ct=function(e){function t(){return e.apply(this,arguments)||this}nt(t,e),t._getName=function(){return"Preroll"};var n=t.prototype;return n.init=function(e,t,n){if(this.waitingForAdBreak=!0,e.addClass("vjs-ad-loading"),n||e.ads.nopreroll_)return this.resumeAfterNoPreroll(e);var i=e.ads.settings.timeout;"number"===typeof e.ads.settings.prerollTimeout&&(i=e.ads.settings.prerollTimeout),this._timeout=e.setTimeout((function(){e.trigger("adtimeout")}),i),t?this.handleAdsReady():this.adsReady=!1},n.onAdsReady=function(e){e.ads.inAdBreak()?s.a.log.warn("Unexpected adsready event (Preroll)"):(e.ads.debug("Received adsready event (Preroll)"),this.handleAdsReady())},n.handleAdsReady=function(){this.adsReady=!0,this.readyForPreroll()},n.afterLoadStart=function(e){var t=this.player;t.ads._hasThereBeenALoadStartDuringPlayerLife?e():(t.ads.debug("Waiting for loadstart..."),t.one("loadstart",(function(){t.ads.debug("Received loadstart event"),e()})))},n.noPreroll=function(){var e=this;this.afterLoadStart((function(){e.player.ads.debug("Skipping prerolls due to nopreroll event (Preroll)"),e.resumeAfterNoPreroll(e.player)}))},n.readyForPreroll=function(){var e=this.player;this.afterLoadStart((function(){e.ads.debug("Triggered readyforpreroll event (Preroll)"),e.trigger("readyforpreroll")}))},n.onAdsCanceled=function(e){var t=this;e.ads.debug("adscanceled (Preroll)"),this.afterLoadStart((function(){t.resumeAfterNoPreroll(e)}))},n.onAdsError=function(e){var t=this;s.a.log("adserror (Preroll)"),e.ads.error({errorType:ct.AdsPrerollError}),this.inAdBreak()?e.ads.endLinearAdMode():this.afterLoadStart((function(){t.resumeAfterNoPreroll(e)}))},n.startLinearAdMode=function(){var e=this.player;!this.adsReady||e.ads.inAdBreak()||this.isContentResuming()?s.a.log.warn("Unexpected startLinearAdMode invocation (Preroll)"):(this.clearTimeout(e),e.ads.adType="preroll",this.waitingForAdBreak=!1,kt.start(e),e.ads._shouldBlockPlay=!1)},n.onAdStarted=function(e){e.removeClass("vjs-ad-loading")},n.endLinearAdMode=function(){var e=this.player;this.inAdBreak()&&(e.removeClass("vjs-ad-loading"),e.addClass("vjs-ad-content-resuming"),this.contentResuming=!0,kt.end(e))},n.skipLinearAdMode=function(){var e=this,t=this.player;t.ads.inAdBreak()||this.isContentResuming()?s.a.log.warn("Unexpected skipLinearAdMode invocation"):this.afterLoadStart((function(){t.trigger("adskip"),t.ads.debug("skipLinearAdMode (Preroll)"),e.resumeAfterNoPreroll(t)}))},n.onAdTimeout=function(e){var t=this;this.afterLoadStart((function(){e.ads.debug("adtimeout (Preroll)"),t.resumeAfterNoPreroll(e)}))},n.onNoPreroll=function(e){e.ads.inAdBreak()||this.isContentResuming()?s.a.log.warn("Unexpected nopreroll event (Preroll)"):this.noPreroll()},n.resumeAfterNoPreroll=function(e){if(this.contentResuming=!0,e.ads._shouldBlockPlay=!1,this.cleanupPartial(e),e.ads._playRequested||e.ads._pausedOnContentupdate)if(e.paused()){e.ads.debug("resumeAfterNoPreroll: attempting to resume playback (Preroll)");var t=e.play();t&&t.then&&t.then(null,(function(e){}))}else e.ads.debug("resumeAfterNoPreroll: already playing (Preroll)"),e.trigger("play"),e.trigger("playing")},n.cleanup=function(e){e.ads._hasThereBeenALoadStartDuringPlayerLife||s.a.log.warn("Leaving Preroll state before loadstart event can cause issues."),this.cleanupPartial(e)},n.cleanupPartial=function(e){e.removeClass("vjs-ad-loading"),e.removeClass("vjs-ad-content-resuming"),this.clearTimeout(e)},n.clearTimeout=function(e){e.clearTimeout(this._timeout),this._timeout=null},t}(xt.getState("AdState"));xt.registerState("Preroll",Ct);var Et=function(e){function t(){return e.apply(this,arguments)||this}nt(t,e),t._getName=function(){return"BeforePreroll"};var n=t.prototype;return n.init=function(e){this.adsReady=!1,this.shouldResumeToContent=!1,e.ads._shouldBlockPlay=!e.ads.settings.allowVjsAutoplay||!e.autoplay()},n.onAdsReady=function(e){e.ads.debug("Received adsready event (BeforePreroll)"),this.adsReady=!0},n.onPlay=function(e){var t=xt.getState("Preroll");e.ads.debug("Received play event (BeforePreroll)"),this.transitionTo(t,this.adsReady,this.shouldResu
2meToContent)},n.onAdsCanceled=function(e){e.ads.debug("adscanceled (BeforePreroll)"),this.shouldResumeToContent=!0},n.onAdsError=function(){this.player.ads.debug("adserror (BeforePreroll)"),this.player.ads.error({errorType:ct.AdsBeforePrerollError}),this.shouldResumeToContent=!0},n.onNoPreroll=function(){this.player.ads.debug("Skipping prerolls due to nopreroll event (BeforePreroll)"),this.shouldResumeToContent=!0},n.skipLinearAdMode=function(){var e=this.player;e.trigger("adskip"),e.ads.debug("skipLinearAdMode (BeforePreroll)"),this.shouldResumeToContent=!0},n.onContentChanged=function(){this.init(this.player)},t}(xt.getState("ContentState"));xt.registerState("BeforePreroll",Et);var It=function(e){function t(){return e.apply(this,arguments)||this}nt(t,e),t._getName=function(){return"Midroll"};var n=t.prototype;return n.init=function(e){e.ads.adType="midroll",kt.start(e),e.addClass("vjs-ad-loading")},n.onAdStarted=function(e){e.removeClass("vjs-ad-loading")},n.endLinearAdMode=function(){var e=this.player;this.inAdBreak()&&(this.contentResuming=!0,e.addClass("vjs-ad-content-resuming"),e.removeClass("vjs-ad-loading"),kt.end(e))},n.onAdsError=function(e){e.ads.error({errorType:ct.AdsMidrollError}),this.inAdBreak()&&e.ads.endLinearAdMode()},n.cleanup=function(e){e.removeClass("vjs-ad-loading"),e.removeClass("vjs-ad-content-resuming")},t}(xt.getState("AdState"));xt.registerState("Midroll",It);var Dt=function(e){function t(){return e.apply(this,arguments)||this}nt(t,e),t._getName=function(){return"Postroll"};var n=t.prototype;return n.init=function(e){if(this.waitingForAdBreak=!0,e.ads._contentEnding=!0,e.ads.nopostroll_){this.resumeContent(e);var t=xt.getState("AdsDone");this.transitionTo(t)}else{e.addClass("vjs-ad-loading");var n=e.ads.settings.timeout;"number"===typeof e.ads.settings.postrollTimeout&&(n=e.ads.settings.postrollTimeout),this._postrollTimeout=e.setTimeout((function(){e.trigger("adtimeout")}),n)}},n.startLinearAdMode=function(){var e=this.player;e.ads.inAdBreak()||this.isContentResuming()?s.a.log.warn("Unexpected startLinearAdMode invocation (Postroll)"):(e.ads.adType="postroll",e.clearTimeout(this._postrollTimeout),this.waitingForAdBreak=!1,kt.start(e))},n.onAdStarted=function(e){e.removeClass("vjs-ad-loading")},n.endLinearAdMode=function(){var e=this,t=this.player,n=xt.getState("AdsDone");this.inAdBreak()&&(t.removeClass("vjs-ad-loading"),this.resumeContent(t),kt.end(t,(function(){e.transitionTo(n)})))},n.skipLinearAdMode=function(){var e=this.player;e.ads.inAdBreak()||this.isContentResuming()?s.a.log.warn("Unexpected skipLinearAdMode invocation"):(e.ads.debug("Postroll abort (skipLinearAdMode)"),e.trigger("adskip"),this.abort(e))},n.onAdTimeout=function(e){e.ads.debug("Postroll abort (adtimeout)"),this.abort(e)},n.onAdsError=function(e){e.ads.debug("Postroll abort (adserror)"),e.ads.error({errorType:ct.AdsPostrollError}),e.ads.inAdBreak()?e.ads.endLinearAdMode():this.abort(e)},n.onContentChanged=function(e){if(this.isContentResuming()){var t=xt.getState("BeforePreroll");this.transitionTo(t)}else if(!this.inAdBreak()){var n=xt.getState("Preroll");this.transitionTo(n)}},n.onNoPostroll=function(e){this.isContentResuming()||this.inAdBreak()?s.a.log.warn("Unexpected nopostroll event (Postroll)"):this.abort(e)},n.resumeContent=function(e){this.contentResuming=!0,e.addClass("vjs-ad-content-resuming")},n.abort=function(e){var t=xt.getState("AdsDone");this.resumeContent(e),e.removeClass("vjs-ad-loading"),this.transitionTo(t)},n.cleanup=function(e){e.removeClass("vjs-ad-content-resuming"),e.clearTimeout(this._postrollTimeout),e.ads._contentEnding=!1},t}(xt.getState("AdState"));xt.registerState("Postroll",Dt);var Pt=function(e){function t(){return e.apply(this,arguments)||this}nt(t,e),t._getName=function(){return"ContentPlayback"};var n=t.prototype;return n.init=function(e){e.ads._shouldBlockPlay=!1},n.onAdsReady=function(e){e.ads.debug("Received adsready event (ContentPlayback)"),e.ads.nopreroll_||(e.ads.debug("Triggered readyforpreroll event (ContentPlayback)"),e.trigger("readyforpreroll"))},n.onReadyForPostroll=function(e){var t=xt.getState("Postroll");e.ads.debug("Received readyforpostroll event"),this.transitionTo(t)},n.startLinearAdMode=function(){var e=xt.getState("Midroll");this.transitionTo(e)},t}(xt.getState("ContentState"));xt.registerState("ContentPlayback",Pt);var Rt=function(e){function t(){return e.apply(this,arguments)||this}nt(t,e),t._getName=function(){return"StitchedContentPlayback"};var n=t.prototype;return n.init=function(){this.player.ads._shouldBlockPlay=!1}
2,n.onContentChanged=function(){this.player.ads.debug("Received contentchanged event ("+this.constructor._getName()+")")},n.startLinearAdMode=function(){var e=xt.getState("StitchedAdRoll");this.transitionTo(e)},t}(xt.getState("ContentState"));xt.registerState("StitchedContentPlayback",Rt);var Lt=function(e){function t(){return e.apply(this,arguments)||this}nt(t,e),t._getName=function(){return"StitchedAdRoll"};var n=t.prototype;return n.init=function(){this.waitingForAdBreak=!1,this.contentResuming=!1,this.player.ads.adType="stitched",kt.start(this.player)},n.onPlaying=function(){},n.onContentResumed=function(){},n.onAdEnded=function(){this.endLinearAdMode(),this.player.trigger("ended")},n.endLinearAdMode=function(){var e=xt.getState("StitchedContentPlayback");kt.end(this.player),this.transitionTo(e)},t}(xt.getState("AdState"));xt.registerState("StitchedAdRoll",Lt);var Mt=function(e){function t(){return e.apply(this,arguments)||this}nt(t,e),t._getName=function(){return"OutstreamPending"};var n=t.prototype;return n.init=function(e){this.adsReady=!1},n.onPlay=function(e){var t=xt.getState("OutstreamPlayback");e.ads.debug("Received play event (OutstreamPending)"),this.transitionTo(t,this.adsReady)},n.onAdsReady=function(e){e.ads.debug("Received adsready event (OutstreamPending)"),this.adsReady=!0},n.onAdsError=function(){this.player.ads.debug("adserror (OutstreamPending)"),this.adsReady=!1},t}(xt.getState("AdState"));xt.registerState("OutstreamPending",Mt);var Nt=function(e){function t(){return e.apply(this,arguments)||this}nt(t,e),t._getName=function(){return"OutstreamPlayback"};var n=t.prototype;return n.init=function(e,t){e.addClass("vjs-ad-loading"),t?this.handleAdsReady():this.abort(e)},n.onAdsReady=function(e){e.ads.inAdBreak()?s.a.log.warn("Unexpected adsready event (Preroll)"):(e.ads.debug("Received adsready event (Preroll)"),this.handleAdsReady())},n.abort=function(e){var t=xt.getState("OutstreamDone");e.removeClass("vjs-ad-loading"),this.transitionTo(t)},n.onAdStarted=function(e){e.removeClass("vjs-ad-loading")},n.handleAdsReady=function(){this.adsReady=!0,this.readyForOutstreamPlayback()},n.readyForOutstreamPlayback=function(){var e=this.player;this.afterLoadStart((function(){e.trigger("readyforoutstream")}))},n.startLinearAdMode=function(){var e=this.player;this.adsReady&&!e.ads.inAdBreak()&&kt.start(e)},n.cleanup=function(e){e.ads._hasThereBeenALoadStartDuringPlayerLife||s.a.log.warn("Leaving OutstreamPlayback state before loadstart event can cause issues."),this.cleanupPartial(e)},n.cleanupPartial=function(e){e.removeClass("vjs-ad-loading"),e.removeClass("vjs-ad-content-resuming"),this.clearTimeout(e)},n.clearTimeout=function(e){e.clearTimeout(this._timeout),this._timeout=null},n.onAdStarted=function(e){e.removeClass("vjs-ad-loading")},n.onAdsError=function(e){var t=this;s.a.log("adserror (OutstreamPlayback)"),this.inAdBreak()?e.ads.endLinearAdMode():this.afterLoadStart((function(){t.abort(e)}))},n.onAdTimeout=function(e){var t=this;this.afterLoadStart((function(){e.ads.debug("adtimeout (OutstreamPlayback)"),t.abort(e)}))},n.onAdsCanceled=function(e){var t=this;e.ads.debug("adscanceled (OutstreamPlaybac)"),this.afterLoadStart((function(){t.abort(e)}))},n.endLinearAdMode=function(){var e=this;if(this.inAdBreak()){this.player.removeClass("vjs-ad-loading");var t=xt.getState("OutstreamDone");kt.end(this.player,(function(){e.transitionTo(t)}))}},n.afterLoadStart=function(e){var t=this.player;t.ads._hasThereBeenALoadStartDuringPlayerLife?e():(t.ads.debug("Waiting for loadstart..."),t.one("loadstart",(function(){t.ads.debug("Received loadstart event"),e()})))},n.skipLinearAdMode=function(){var e=this,t=this.player,n=xt.getState("OutstreamDone");this.inAdBreak()?s.a.log.warn("Unexpected skipLinearAdMode invocation"):this.afterLoadStart((function(){t.trigger("adskip"),t.ads.debug("skipLinearAdMode (OutstreamPlayback)"),e.transitionTo(n)}))},t}(xt.getState("AdState"));xt.registerState("OutstreamPlayback",Nt);var Bt=function(e){function t(){return e.apply(this,arguments)||this}nt(t,e),t._getName=function(){return"OutstreamDone"};var n=t.prototype;return n.init=function(e){e.trigger("ended")},n.startLinearAdMode=function(){s.a.log.warn("Unexpected startLinearAdMode invocation (OutstreamDone)")},t}(xt.getState("AdState"));xt.registerState("OutstreamDone",Bt);var Ut,Ft=bt.isMiddlewareMediatorSupported,zt=s.a.getTech("Html5").Events,qt={timeout:5e3,prerollTimeout:void 0,postrollTimeout:void 0,debug:!1,stitchedAds:!1,contentIsLive:void 0,liveCuePoints:!0,allowVjsAutoplay:s.a.options.normalizeAutoplay||!1},Ht=function(e){var t=this,n=s.a.obj.merge(qt,e),i=[];
2zt.concat(["firstplay","loadedalldata"]).forEach((function(e){-1===i.indexOf(e)&&i.push(e)})),t.on(i,et),Ft()||function(e,t){t&&s.a.log("Using cancelContentPlay to block content playback"),e.on("play",ft)}(t,n.debug),t.setTimeout((function(){t.ads._hasThereBeenALoadStartDuringPlayerLife||""===t.src()||s.a.log.error("videojs-contrib-ads has not seen a loadstart event 5 seconds after being initialized, but a source is present. This indicates that videojs-contrib-ads was initialized too late. It must be initialized immediately after video.js in the same tick. As a result, some ads will not play and some media events will be incorrect. For more information, see http://videojs.github.io/videojs-contrib-ads/integrator/getting-started.html")}),5e3),t.on("ended",(function(){t.hasClass("vjs-has-started")||t.addClass("vjs-has-started")})),t.on("contenttimeupdate",(function(){t.removeClass("vjs-waiting")})),t.on(["addurationchange","adcanplay"],(function(){if(!t.ads.settings.stitchedAds&&!t.hasStarted()&&(!t.ads.snapshot||t.currentSrc()!==t.ads.snapshot.currentSrc)&&t.ads.inAdBreak()){var e=t.play();e&&e.catch&&e.catch((function(e){s.a.log.warn("Play promise rejected when playing ad",e)}))}})),t.on("nopreroll",(function(){t.ads.debug("Received nopreroll event"),t.ads.nopreroll_=!0})),t.on("nopostroll",(function(){t.ads.debug("Received nopostroll event"),t.ads.nopostroll_=!0})),t.on("playing",(function(){t.ads._cancelledPlay=!1,t.ads._pausedOnContentupdate=!1})),t.on("play",(function(){t.ads._playRequested=!0})),t.one("loadstart",(function(){t.ads._hasThereBeenALoadStartDuringPlayerLife=!0})),t.on("loadeddata",(function(){t.ads._hasThereBeenALoadedData=!0})),t.on("loadedmetadata",(function(){t.ads._hasThereBeenALoadedMetaData=!0})),t.ads=function(e){return{disableNextSnapshotRestore:!1,_contentEnding:!1,_contentHasEnded:!1,_hasThereBeenALoadStartDuringPlayerLife:!1,_hasThereBeenALoadedData:!1,_hasThereBeenALoadedMetaData:!1,_inLinearAdMode:!1,_shouldBlockPlay:!1,_playBlocked:!1,_playRequested:!1,_error:null,adType:null,VERSION:Ze,reset:function(){e.ads.disableNextSnapshotRestore=!1,e.ads._contentEnding=!1,e.ads._contentHasEnded=!1,e.ads.snapshot=null,e.ads.adType=null,e.ads._hasThereBeenALoadedData=!1,e.ads._hasThereBeenALoadedMetaData=!1,e.ads._cancelledPlay=!1,e.ads._shouldBlockPlay=!1,e.ads._playBlocked=!1,e.ads.nopreroll_=!1,e.ads.nopostroll_=!1,e.ads._playRequested=!1,e.ads._error=null},startLinearAdMode:function(){e.ads._state.startLinearAdMode()},endLinearAdMode:function(){e.ads._state.endLinearAdMode()},skipLinearAdMode:function(){e.ads._state.skipLinearAdMode()},stitchedAds:function(e){return void 0!==e&&(s.a.log.warn("Using player.ads.stitchedAds() as a setter is deprecated, it should be set as an option upon initialization of contrib-ads."),this.settings.stitchedAds=!!e),this.settings.stitchedAds},videoElementRecycled:function(){if(e.ads.shouldPlayContentBehindAd(e))return!1;if(!this.snapshot)throw new Error("You cannot use videoElementRecycled while there is no snapshot.");var t=e.tech_.src()!==this.snapshot.src,n=e.currentSrc()!==this.snapshot.currentSrc;return t||n},isLive:function(t){return void 0===t&&(t=e),"boolean"===typeof t.ads.settings.contentIsLive?t.ads.settings.contentIsLive:t.duration()===1/0||"8"===s.a.browser.IOS_VERSION&&0===t.duration()},shouldPlayContentBehindAd:function(t){if(void 0===t&&(t=e),t)return!!t.ads.settings.liveCuePoints&&!s.a.browser.IS_IOS&&!s.a.browser.IS_ANDROID&&t.duration()===1/0;throw new Error("shouldPlayContentBehindAd requires a player as a param")},shouldTakeSnapshots:function(t){return void 0===t&&(t=e),!this.shouldPlayContentBehindAd(t)&&!this.stitchedAds()},isInAdMode:function(){return this._state.isAdState()},isWaitingForAdBreak:function(){return this._state.isWaitingForAdBreak()},isContentResuming:function(){return this._state.isContentResuming()},isAdPlaying:function(){return this._state.inAdBreak()},inAdBreak:function(){return this._state.inAdBreak()},removeNativePoster:function(){var t=e.$(".vjs-tech");t&&t.removeAttribute("poster")},debug:function(){if(this.settings.debug){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];1===t.length&&"string"===typeof t[0]?s.a.log("ADS: "+t[0]):s.a.log.a
2pply(s.a,["ADS:"].concat(t))}},error:function(t){if(void 0===t)return this._error||null;null!==t&&t.errorType?(this._error=t,s.a.log.error("An error with Ads occured. Type: "+t.errorType+"."),e.trigger({type:"vjsadserror",error:this._error})):this._error=null}}}(t),t.ads.settings=n,n.stitchedAds=!!n.stitchedAds,"outstream"===n.playerMode?(t.src(vt),t.ads._state=new(xt.getState("OutstreamPending"))(t)):n.stitchedAds?t.ads._state=new(xt.getState("StitchedContentPlayback"))(t):t.ads._state=new(xt.getState("BeforePreroll"))(t),t.ads._state.init(t),t.ads.cueTextTracks=pt,t.ads.adMacroReplacement=ht.bind(t),function(e){e.ads.contentSrc=e.currentSrc(),e.ads._seenInitialLoadstart=!1,e.on("loadstart",(function(){if(!e.ads.inAdBreak()){var t=e.currentSrc();t!==e.ads.contentSrc&&(e.ads._seenInitialLoadstart&&e.trigger({type:"contentchanged"}),e.trigger({type:"contentupdate",oldValue:e.ads.contentSrc,newValue:t}),e.ads.contentSrc=t),e.ads._seenInitialLoadstart=!0}}))}(t),t.on("contentchanged",t.ads.reset);var r=function(){var e=t.textTracks();if(!t.ads.shouldPlayContentBehindAd(t)&&t.ads.inAdBreak()&&t.tech_.featuresNativeTextTracks&&s.a.browser.IS_IOS&&!Array.isArray(t.textTracks()))for(var n=0;n<e.length;n++){var i=e[n];"showing"===i.mode&&(i.mode="disabled")}};t.ready((function(){t.textTracks().addEventListener("change",r)})),t.on(["play","playing","ended","adsready","adscanceled","adskip","adserror","adtimeout","adended","ads-ad-started","ads-ad-skipped","contentchanged","dispose","contentresumed","readyforpostroll","nopreroll","nopostroll"],(function(e){t.ads._state.handleEvent(e.type)})),t.on("dispose",(function(){t.ads.reset(),t.textTracks().removeEventListener("change",r)})),st(),ot((function(){})),t.ads.listenToTcf=st,t.ads.updateUsPrivacyString=function(e){return ot(e)}};Ht.Error=ct,Ht.VERSION=Ze,Ut=Ht,!function(){if(s.a.getPlugin)return Boolean(s.a.getPlugin("ads"));var e=s.a.getComponent("Player");return Boolean(e&&e.prototype.ads)}(s.a)&&((s.a.registerPlugin||s.a.plugin)("ads",Ut),_t()&&!s.a.usingContribAdsMiddleware_&&(s.a.use("*",jt),s.a.usingContribAdsMiddleware_=!0,s.a.log.debug("Play middleware has been registered with videojs")));!function(e,t,n,i){(n.registerPlugin||n.plugin)("academiaAds",(function(e){var t=this,n={},r=e.progress,a=e&&e.pre_roll!==i,o=(e&&e.mid_roll,e&&e.post_roll,function(){n={},t.trigger("adsready")}),c=function(e){t.controlBar.childNameIndex_.VjsBackward.el_.classList[e]("disabled"),t.controlBar.childNameIndex_.VjsForward.el_.classList[e]("disabled"),t.controlBar.childNameIndex_.VjsLocalization.el_.classList[e]("disabled"),t.controlBar.childNameIndex_.VjsNextLesson&&t.controlBar.childNameIndex_.VjsNextLesson.el_.classList[e]("disabled"),t.controlBar.childNameIndex_.VjsPlaybackRate.el_.classList[e]("disabled"),t.controlBar.childNameIndex_.vjsChromecast&&t.controlBar.childNameIndex_.vjsChromecast.el_.classList[e]("vjs-hidden")},l=function(e,i){if(e&&0!==e.length){var r,a;n[i]||(n[i]=0),n.video||(n.video={},n.video.title=(r="vjsTitle",a="title",t.getChild(r).el_.getElementsByClassName(a)[0]).innerHTML),t.setState({...t.state,currentAd:e[n[i]],typeAd:i}),t.ads.startLinearAdMode(),n.adPlaying=!0,c("add");var o=e[n[i]].url;t.src(o),t.trigger("ads-ad-started"),t.one("adended",(function(){t.trigger("ads-ad-ended-no-skip"),n[i]++,n[i]<e.length?l(e,i):t.trigger("ads-ad-ended")}))}else s.a.log("No inventory to play.")};t.ads(e),e.enabled&&o(),t.on("adsready",(function(){a||t.trigger("nopreroll")})),t.on("contentchanged",(function(){o()})),t.on("ads-ad-ended",(function(){console.log("[ACA ADS] ads-ad-ended, progress:",r),t.setState({...t.state,currentAd:null,typeAd:null}),t.ads.endLinearAdMode(),n.adPlaying=!1,c("remove");const e=Number(r)||0;if(e<=0)return;const i=()=>{t.currentTime(e),t.off("contentresumed",i),t.off("loadedmetadata",i)};t.readyState()>=1?setTimeout((()=>{i()}),1500):(t.one("contentresumed",i),t.one("loadedmetadata",i))})),t.on("readyforpreroll",(function(){!n.prerollPlayed&&a&&(n.prerollPlayed=!0,l(e.pre_roll,"preroll"))}))}))}(window,document,s.a);const Vt=r.a.memo((e=>{let t;const{t:n,i18n:i}=Object(a.a)(),u=new URLSearchParams(window.location.search).get("lesson_progress"),h=r.a.useRef(null),p=r.a.useRef(!1),m=Object(l.h)(),f=r.a.useRef(null),b=r.a.useRef(null),y=r.a.useRef({}),[j,_]=r.a.useState(!1),{request:v,cancelToken:x}=r.a.useContext(d.a),O=e.video?u||(e.video.lesson.progress>=e.video.lesson.duration?0:e.video.lesson.progress):0,T=e.video?e.video.lesson.id:null,S=e.trailer?{course_id:e.video.course.id}:{video_id:T},w=()=>Object(g.jsx)("div",{ref:b,"data-vjs-player":!0,...e.containerProps,children:Object(g.jsx)("video",{ref:f,playsInl
2ine:!0,className:e.className?e.className+" video-js vjs-big-play-centered":"video-js vjs-big-play-centered"})}),A=t=>{e.packageType?m.push(Object(l.f)("/:lang/:package/:classSlug/:modules/:moduleSlug/:lessons/:chapterSlug",{lang:i.language,package:e.packageType.translation,classSlug:t.course.package.slug,modules:n("moduli"),moduleSlug:t.course.slug,lessons:n("lezioni"),chapterSlug:t.slug})):m.push(Object(l.f)("/:lang/:courses/:courseSlug/:lessons/:lessonSlug",{lang:i.language,courses:e.isHoreca?n("horeca"):n("corsi"),courseSlug:t.course_slug,lessons:n("lezioni"),lessonSlug:t.slug}))},k=()=>{if(window.__CAST_READY__&&t&&t.hasClass("vjs-casting")){const a=window.cast.framework.CastContext.getInstance().getCurrentSession();if(a){const o=a.getMediaSession();if(o){const a=t.currentTime();var e,n,i,r,s;if(Math.abs(o.getEstimatedTime()-a)>1)p.current=!0,E(),o.seek({currentTime:a,resumeState:null===(e=window)||void 0===e||null===(n=e.chrome)||void 0===n||null===(i=n.cast)||void 0===i||null===(r=i.media)||void 0===r||null===(s=r.SeekResumeState)||void 0===s?void 0:s.PLAYBACK_START}),setTimeout((()=>{p.current=!1,C()}),1e3)}}}},C=()=>{h.current||(h.current=setInterval((()=>{if(!p.current&&window.__CAST_READY__&&t&&t.hasClass("vjs-casting")){const e=window.cast.framework.CastContext.getInstance().getCurrentSession();if(e){const n=e.getMediaSession();if(n){const e=n.getEstimatedTime();t.currentTime(e),t.trigger("timeupdate");const i=t.controlBar&&t.controlBar.playToggle;i&&i.el_&&i.el_.classList&&(i.el_.classList.remove("vjs-playing"),i.el_.classList.remove("vjs-paused"),"PLAYING"===n.playerState?i.el_.classList.add("vjs-playing"):"PAUSED"!==n.playerState&&"IDLE"!==n.playerState||i.el_.classList.add("vjs-paused"))}}}}),500))},E=()=>{h.current&&(clearInterval(h.current),h.current=null)},I=(e,t)=>{if(window.__CAST_READY__){const n=window.cast.framework.CastContext.getInstance().getCurrentSession();if(n){const i=n.getMediaSession();if(i&&i.media&&i.media.tracks){const n=i.media.tracks;let r=[];if(e){const t=((e,t)=>{console.log(e,t);const n=t.find((t=>"AUDIO"===t.type&&t.name===e));return n?n.trackId:null})(e,n);null!==t&&r.push(t)}if(t){const e=((e,t)=>{console.log(e,t);const n=t.find((t=>"SUBTITLE"===t.subtype&&t.name===e));return n?n.trackId:null})(t,n);null!==e&&r.push(e)}const s=new window.chrome.cast.media.EditTracksInfoRequest(r);i.editTracksInfo(s)}}}},D=()=>{if(window.__CAST_READY__&&t&&t.play){const n=window.cast.framework.CastContext.getInstance();E(),n.addEventListener(window.cast.framework.CastContextEventType.SESSION_STATE_CHANGED,(function(e){switch(e.sessionState){case window.cast.framework.SessionState.SESSION_STARTED:t.addClass("vjs-casting"),t.pause(),C();break;case window.cast.framework.SessionState.SESSION_RESUMED:break;case window.cast.framework.SessionState.SESSION_ENDED:t.removeClass("vjs-casting"),E(),t.play()}})),n.requestSession().then((async()=>{const i=new window.chrome.cast.media.MediaInfo(e.options.sources[0].src,e.options.sources[0].type);i.customData={maxVideoHeight:e.maxHeight};const r=new window.chrome.cast.media.LoadRequest(i);r.currentTime=t.currentTime();const s=n.getCurrentSession();s&&(await s.loadMedia(r),C())}))}else alert("Chromecast non disponibile o SDK non caricata!")},P=()=>{if(window.__CAST_READY__&&t.hasClass("vjs-casting")){const e=window.cast.framework.CastContext.getInstance().getCurrentSession();if(e){const n=e.getMediaSession();n&&"PLAYING"!==n.playerState?n.play():n&&"PLAYING"===n.playerState&&n.pause(),t.pause()}}},R=async(e,t)=>{const n=x.source(),i=await v("get",e,n.token);i&&t&&t(i)},L=async(e,t)=>{const n=x.source();return await v("post","/v2/events/lesson",n.token,{l:T,e:e,t:t},!0)},M=async(e,t,n)=>{const i=x.source();return await v("post","/v2/events/adv-campaign/"+t+"/"+e,i.token,n,!0)},N=async(n,i)=>{const r=Math.round(i/n*100);25!==r||Boolean(y.current.firstQuarter)?50!==r||Boolean(y.current.midPoint)?75!==r||Boolean(y.current.thirdQuarter)||(y.current.thirdQuarter=!0,t.state.currentAd?Object(o.a)("video_adv_third_quartile",{video_id:T,video_adv_id:t.state.currentAd.adv_campaign_id,video_adv_name:t.state.currentAd.title,video_adv_type:t.state.typeAd}):Object(o.a)(e.trailer?"trailer_third_quartile":"video_third_quartile",S)):(y.current.midPoint=!0,t.state.currentAd?Object(o.a)("video_adv_mid_point",{video_id:T,video_adv_id:t.state.currentAd.adv_campaign_id,video_adv_name:t.state.currentAd.title,video_adv_type:t.state.typeAd}):Object(o.a)(e.trailer?"trailer_mid_point":"video_mid_point",S)):(y.current.firstQuarter=!0,t.state.currentAd?Object(o.a)("video_adv_first_quartile",{video_id:T,video_adv_id:t.state.currentAd.adv_campaign_id,video_adv_name:t.state.currentAd.title,video_adv_type:t.state.typeAd}):Object(o.a)(e.trailer?"trailer_first_quartile":"video_first_quartile",S))};return r.a.useEffect((()=>()=>{h.current&&(clearInterval(h.current),h.current=null)}),[]),r.a.useEffect((()=>{const n={playsinline:!0,poster:!!e.poster&&Object(c.m)(e.poster,Math.round(2*b.current.clientWidth)),responsive:!0,fluid:!0,controls:!0,muted:!1,preload:"auto",techOrder:["html5"],playbackRates:[.75,1,1.25],withCredentials:!0,html5:{enableSourceset:!1,vhs:{overrideNative:!s.a.browser.IS_SAFARI,withCredentials:!0},nativeVideoTracks:s.a.browser.IS_SAFARI||s.a.browser.IS_CHROME,nativeAudioTracks:s.a.browser.IS_SAFARI||s.a.browser.IS_CHROME,nativeTextTracks:s.a.browser.IS_SAFARI||s.a.browser.IS_CHROME}
2,controlBar:{children:["playToggle","remainingTimeDisplay","progressControl","volumePanel","fullscreenToggle"]},sources:[{type:"application/x-mpegURL"}]},i=f.current;if(!i)return;t=Object(s.a)(i,{...n,...e.options});const r=e.video&&!!e.video.video_ads&&e.video.video_ads.enabled&&!!e.video.video_ads.pre_roll.length;return r&&t.academiaAds({...e.video.video_ads,progress:O}),t.ready((()=>{window.bodymovin.loadAnimation({wrapper:t.getChild("loadingSpinner").el(),animType:"svg",loop:!0,animationData:Ge,rendererSettings:{preserveAspectRatio:"xMidYMid slice"},renderConfig:{viewBoxOnly:!0}}),r||t.currentTime(O),e.disableAutoplay||(t.play(),e.fireEvents&&e.trailer&&Object(o.a)("watch_trailer",S))})),(t=>{t.getChild("controlBar").addChild("vjsBackward",{package:e.packageType,isHoreca:e.isHoreca,video:e.video,anchorRef:b},1),t.getChild("controlBar").addChild("vjsForward",{package:e.packageType,isHoreca:e.isHoreca,video:e.video,anchorRef:b},2),t.getChild("controlBar").addChild("vjsPlaybackRate",{package:e.packageType,isHoreca:e.isHoreca,video:e.video,anchorRef:b},6),e.video&&e.video.lesson_next&&t.getChild("controlBar").addChild("vjsNextLesson",{package:e.packageType,isHoreca:e.isHoreca,video:e.video,handleClickLesson:A,anchorRef:b},7),(e.title||e.video&&e.video.video_ads)&&t.addChild("vjsTitle",{package:e.packageType,isHoreca:e.isHoreca,video:e.video,handleEvent:M}),t.addChild("vjsSkipAd",{package:e.packageType,isHoreca:e.isHoreca,video:e.video,handleEvent:M}),e.mute&&t.addChild("vjsMute",{package:e.packageType,isHoreca:e.isHoreca,video:e.video}),t.getChild("controlBar").addChild("vjsLocalization",{package:e.packageType,isHoreca:e.isHoreca,handleSyncChromecastTracks:I,video:e.video,anchorRef:b},6),window.__CAST_READY__&&!t.getChild("controlBar").getChild("vjsChromecast")&&t.getChild("controlBar").addChild("vjsChromecast",{package:e.packageType,isHoreca:e.isHoreca,handleChromeCast:()=>D(),video:e.video,anchorRef:b}),e.disableEndLesson||t.addChild("vjsEndLesson",{package:e.packageType,isHoreca:e.isHoreca,video:e.video,handleClickLesson:A,handleRequest:R,handleEvent:L})})(t),e.fireEvents&&(t=>{t.on("ads-ad-started",(function(){Object(o.a)("video_adv_start",{video_id:T,video_adv_id:t.state.currentAd.adv_campaign_id,video_adv_name:t.state.currentAd.title,video_adv_type:t.state.typeAd})})),t.on("play",(t=>{Object(o.a)(e.trailer?"trailer_start":"video_start",S)})),t.on("pause",(n=>{t.state.currentAd||(e.trailer||L("lw",Math.round(t.currentTime())),Object(o.a)(e.trailer?"trailer_stop":"video_stop",S))})),t.on("timeupdate",(e=>{t.state.currentAd&&t.trigger("aca-timeupdate"),N(t.duration(),Math.round(t.currentTime()))})),t.on("ended",(t=>{Object(o.a)(e.trailer?"trailer_completed":"video_completed",S)})),t.on("ads-ad-ended-no-skip",(()=>{Object(o.a)("video_adv_completed",{video_id:T,video_adv_id:t.state.currentAd.adv_campaign_id,video_adv_name:t.state.currentAd.title,video_adv_type:t.state.typeAd}),M("view",t.state.currentAd.session_id,{adv_campaign_id:t.state.currentAd.adv_campaign_id,lesson_id:e.video.lesson.id,skipped:!1,elapsed:t.duration()})}))})(t),window.__CAST_READY__&&(t.on("seeked",k),t.on("seeking",k),t.on("play",P),t.on("pause",P)),()=>{t&&t.el()&&(T&&L("lw",Math.round(t.currentTime())),window.__CAST_READY__&&(t.off("seeked",k),t.off("seeking",k)),t.dispose())}}),[e.options]),Object(g.jsx)(w,{})}));t.a=Vt},257:function(e,t,n){"use strict";n.d(t,"a",(function(){return xe}));var i=n(0),r=n.n(i),s=n(27),a=n(5),o=n(79),c=(n(20),n(35)),l=n(195),d=n(236),u=n(28),h=n(264),p=n(188),m=n(191),g=(n(244),n(645)),f=n(111),b=n(4),y=n(2),j=n(183),_=n(36),v=n(29),x=n(54),O=n(21),T=n(158),S=n(179);function w(e){return Object(T.a)("MuiImageListItemBar",e)}Object(S.a)("MuiImageListItemBar",["root","positionBottom","positionTop","positionBelow","titleWrap","titleWrapBottom","titleWrapTop","titleWrapBelow","titleWrapActionPosLeft","titleWrapActionPosRight","title","subtitle","actionIcon","actionIconActionPosLeft","actionIconActionPosRight"]);var A=n(1);const k=["actionIcon","actionPosition","className","subtitle","title","position"],C=Object(v.a)("div",{name:"MuiImageListItemBar",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t["position".concat(Object(O.a)(n.position))]]}})((e=>{let{theme:t,ownerState:n}=e;return Object(y.a)({position:"absolute",left:0,right:0,background:"rgba(0, 0, 0, 0.5)",display:"flex",alignItems:"center",fontFamily:t.typography.fontFamily},"bottom"===n.position&&{bottom:0},"top"===n.position&&{top:0},"below"===n.position&&{position:"relative",background:"transparent",alignItems:"normal"})})),E=Object(v.a)("div",{name:"MuiImageListItemBar",slot:"TitleWrap",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.titleWrap,t["titleWrap".concat(Object(O.a)(n.position))],n.actionIcon&&t["titleWrapActionPos".concat(Object(O.a)(n.actionPosition))]]}})((e=>{let{theme:t,ownerState:n}=e;return Object(y.a)({flexGrow:1,padding:"12px 16px",color:t.palette.common.white,overflow:"hidden"},"below"===n.position&&{padding:"6px 0 12px",color:"inherit"},n.actionIcon&&"left"===n.actionPosition&&{paddingLeft:0},n.actionIcon&&"right"===n.actionPosition&&{paddingRight:0})})),I=Object(v.a)("div",{name:"MuiImageListItemBar",slot:"Title",overridesResolver:(e,t)=>t.title})((e=>{let{theme:t}=e;return{fontSize:t.typography.pxToRem(16),lineHeight:"24px",textOverflow:"ellipsis",overflow:"hidden",
2whiteSpace:"nowrap"}})),D=Object(v.a)("div",{name:"MuiImageListItemBar",slot:"Subtitle",overridesResolver:(e,t)=>t.subtitle})((e=>{let{theme:t}=e;return{fontSize:t.typography.pxToRem(12),lineHeight:1,textOverflow:"ellipsis",overflow:"hidden",whiteSpace:"nowrap"}})),P=Object(v.a)("div",{name:"MuiImageListItemBar",slot:"ActionIcon",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.actionIcon,t["actionIconActionPos".concat(Object(O.a)(n.actionPosition))]]}})((e=>{let{ownerState:t}=e;return Object(y.a)({},"left"===t.actionPosition&&{order:-1})}));var R=i.forwardRef((function(e,t){const n=Object(x.a)({props:e,name:"MuiImageListItemBar"}),{actionIcon:i,actionPosition:r="right",className:s,subtitle:a,title:o,position:c="bottom"}=n,l=Object(b.a)(n,k),d=Object(y.a)({},n,{position:c,actionPosition:r}),u=(e=>{const{classes:t,position:n,actionIcon:i,actionPosition:r}=e,s={root:["root","position".concat(Object(O.a)(n))],titleWrap:["titleWrap","titleWrap".concat(Object(O.a)(n)),i&&"titleWrapActionPos".concat(Object(O.a)(r))],title:["title"],subtitle:["subtitle"],actionIcon:["actionIcon","actionIconActionPos".concat(Object(O.a)(r))]};return Object(j.a)(s,w,t)})(d);return Object(A.jsxs)(C,Object(y.a)({ownerState:d,className:Object(_.a)(u.root,s),ref:t},l,{children:[Object(A.jsxs)(E,{ownerState:d,className:u.titleWrap,children:[Object(A.jsx)(I,{className:u.title,children:o}),a?Object(A.jsx)(D,{className:u.subtitle,children:a}):null]}),i?Object(A.jsx)(P,{ownerState:d,className:u.actionIcon,children:i}):null]}))})),L=n(720),M=n(717),N=n(707),B=n(705),U=n(716),F=n(334),z=n(706),q=n(199),H=n.n(q),V=n(214),W=n.n(V),G=n(247),X=n.n(G),Y=n(249),K=n.n(Y),Q=n(192),Z=n(267),J=n(268),$=n(282),ee=n(261),te=n(243),ne=n(265);const ie=Object(g.a)(f.a)((e=>{let{theme:t}=e;return{display:"flex",flexWrap:"wrap",backgroundColor:"transparent",position:"relative",marginLeft:"-8px",marginRight:"-8px",[t.breakpoints.down("md")]:{overflow:"hidden"}}})),re=Object(g.a)("ul")((e=>{let{theme:t}=e;return{flexWrap:"nowrap",alignContent:"flex-start",transform:"translateZ(0)",display:"flex",padding:0,margin:0,listStyle:"none",overflowY:"hidden",overflowX:"auto",scrollBehavior:"smooth",WebkitOverflowScrolling:"touch","&.dontScroll":{flexWrap:"wrap",overflow:"hidden",margin:"auto",[t.breakpoints.down("md")]:{justifyContent:"center"},"& > li":{}}}})),se=Object(g.a)("li")((e=>{let{theme:t}=e;return{position:"relative",boxSizing:"border-box",flexShrink:0,width:"33.33%",minWidth:"346px",minHeight:"fit-content",borderLeft:"8px solid transparent",borderRight:"8px solid transparent",borderTop:"13px solid transparent",borderBottom:"13px solid transparent",[t.breakpoints.down("lg")]:{},"&.l":{"& .content":{maxHeight:"79%"}},"&.tags":{minWidth:"190px",maxWidth:"190px"},"&.t":{minWidth:"190px",maxWidth:"190px",maxHeight:"345px",minHeight:"345px","&:not(.banner) > div:first-of-type":{borderBottomLeftRadius:0,borderBottomRightRadius:0},"&:not(.banner) img":{borderBottomLeftRadius:0,borderBottomRightRadius:0},"&.banner":{minHeight:"200px","& img":{width:"100%"}},"& .content":{backgroundPosition:"top center",backgroundSize:"100%"}},"&.smallerImage":{width:"20%",minWidth:"250px","& > div:first-of-type":{maxHeight:"80%"}},"&.banner":{width:"100%",maxWidth:"none","& > div:first-of-type":{maxHeight:"100%"}}}})),ae=Object(g.a)(f.a)((e=>{let{theme:t}=e;return{backgroundPosition:"center center",backgroundSize:"cover",backgroundRepeat:"no-repeat",borderRadius:"10px",overflow:"hidden",position:"relative",height:"100%",width:"100%",zIndex:"2",marginBottom:"-4px"}})),oe=Object(g.a)(f.a)((e=>{let{theme:t}=e;return{color:"#fff",position:"absolute",left:0,width:"100%",padding:"15px",boxSizing:"border-box",background:"linear-gradient(180deg, rgba(0,0,0,0) 0%, rgba(0,0,0,0.6) 100%)"}})),ce=Object(g.a)(f.a)((e=>{let{theme:t}=e;return{width:"100%",position:"relative",color:"#B1B8BE",height:"auto",zIndex:"1",marginTop:"-10px",paddingTop:"10px",borderBottomLeftRadius:"10px",borderBottomRightRadius:"10px",display:"flex",alignItems:"flex-end",paddingBottom:"3.5%"}})),le=Object(g.a)(f.a)((e=>{let{theme:t}=e;return{width:"175px",position:"absolute",bottom:0,backgroundColor:"#26292D",height:"110px",padding:"16px",boxSizing:"border-box",color:"#fff",borderBottomLeftRadius:"10px",borderBottomRightRadius:"10px",zIndex:3,"& .MuiChip-root":{height:"auto",backgroundColor:"#41474E",borderRadius:"14px",fontSize:"12px",color:"#fff",fontWeight:"bold",padding:"4px 10px","& .MuiChip-label":{padding:0}}}})),de=Object(g.a)(R)((e=>{let{theme:t}=e;return{background:"linear-gradient(0deg, rgba(0,0,0,0) 0%, rgba(0,0,0,0.3) 100%)",paddingRight:"10px","& .MuiButton-containedSizeSmall":{backgroundColor:"#F5F5F5",fontWeight:"bold",textTransform:"none",color:"#474C53",borderRadius:"12px",padding:"4px 17px"}}})),ue=Object(g.a)(L.a)((e=>{let{theme:t}=e;return{textShadow:"0 3px 6px rgb(0 0 0 / 30%)",lineHeight:1.2,whiteSpace:"nowrap",textOverflow:"ellipsis",overflow:"hidden"}})),he=Object(g.a)(m.b)((e=>{let{theme:t}=e;return{position:"absolute",top:"40%",right:"-80px",color:"#c8ccd0","&.wellness":{backgroundColor:"#fff",color:"#BAB8B2"},"&.grey":{backgroundColor:"#D1D1D1",color:"#fff"}}})),pe=Object(g.a)(m.b)((e=>{let{theme:t}=e;return{position:"absolute",top:"40%",left:"-80px",color:"#c8ccd0","&.wellness":{backgroundColor:"#fff",color:"#BAB8B2"},"&.grey":{backgroundColor:"#D1D1D1",color:"#fff"}}})),me=Object(g.a)(M.a)((e=>{let{theme:t}=e;return{position:"absolute",top:"50%",left:"50%",width:"120px",marginTop:"-60px",marginLeft:"-60px",color:"#c8ccd0"}})),ge=r.a.forwardRef((e=>{const{children:t,cover:n,sx:i,...r}=e,{imageSet:s,ref:a}=Object(d.a)({img:n});return Object(A.jsx)(ae,{ref:a,...r,sx:{...i,backgroundImage:s},children:t})})),fe=e=>{const{t:t}=Object(o.a)(),{item:n,type:i,isBanner:s,payoff:a}=e;return"t"!==i&&"l"!==i||s?"t"===i&&s?Object(A.jsx)(oe,{sx:{top:0,height:"100%",display:"flex",alignItems:{xs:"flex-end",md:"center"},pl:{xs:2,md:8}},children:Object(A.jsxs)(f.a,{children:[n.free&&!n.can_watch&&!a&&Object(A.jsx)(_e,{payoff:t("Contenuto gratuito")}),a&&Object(A.jsx)(_e,{payoff:a}),Object(A.jsx)(ue,{variant:"h5",children:Object(A.jsx)("b",{children:n.first_name})}),Object(A.jsx)(ue,{variant:"h3",children:Object(A.jsx)("b",{children:n.last_name})}),n.subtitle&&Object(A.jsx)(ue,{variant:"subtitle1",children:n.subtitle})]})}):Object(A.jsxs)(oe,{bottom:"bigTags"===i?"35%":-1,sx:{..."bigTags"===i&&{background:"none"}},children:["standard"===n.course_type&&Boolean(n.highlights)&&Object(A.jsx)(N.a,{color:"masterclass",size:"small",label:Object(A.jsx)("b",{children:n.highlights}),sx:{mb:1}}),"basics"===n.course_type&&Object(A.jsx)(N.a,{color:"basics",size:"small",label:n.package.title,sx:{mb:1}}),"wellness"===n.course_type&&Object(A.jsx)(N.a,{color:"wellness",size:"small",label:n.package.title,sx:{mb:1}}),"horeca"===n.course_type&&!!n.brands&&n.brands.map((e=>Object(A.jsx)(Q.a,{useSet:!0,src:e.img_brand,alt:e.name,sx:{mb:1,height:30,width:"auto"}}))),n.label&&"bigTags"===i&&Object(A.jsx)(ue,{component:"h3",align:"center",variant:"h4",children:Object(A.jsx)("b",{children:n.label})}),n.title&&!s&&"bigTags"!==i&&Object(A.jsx)(ue,{component:"h3",align:"tags"===i?"center":"left",variant:"tags"===i?"subtitle1":"h6",children:Object(A.jsx)("b",{children:n.title})}),n.title&&s&&Object(A.jsx)(ue,{component:"h3",variant:"h4",children:Object(A.jsx)("b",{children:n.title})}),n.subtitle&&Object(A.jsx)(ue,{variant:"subtitle1",children:n.subtitle})]}):"l"===i&&n.has_cooking_box?Object(A.jsx)(oe,{bottom:0,sx:{background:"transparent"},children:Object(A.jsxs)(f.a,{bgcolor:"#fff",color:"#303337",borderRadius:"18px",textAlign:"center",display:"inline-flex",alignItems:"center",pl:2,pr:1,py:"5px",children:[Object(A.jsx)(L.a,{sx:{mr:1},children:Object(A.jsx)("b",{children:t("Box ingredienti")})}),Object(A.jsx)("img",{alt:"",src:ne.a,style:{width:"25px"}})]})}):!n.free||n.can_watch||a?Object(A.jsx)(r.a.Fragment,{}):Object(A.jsx)(oe,{bottom:-1,children:Object(A.jsx)(_e,{payoff:t("Contenuto gratuito")})})},be=e=>{const{t:t}=Object(o.a)(),{isWellness:n,isHoreca:i}=Object(l.a)(),{item:s,type:a,smallerImage:d,isBanner:u,showCourseTitle:m}=e,{request:g,cancelToken:b}=r.a.useContext(c.a),[y,j]=r.a.useState(!1),[_,v]=r.a.useState(s.is_favorite);if(("c"===a||"l"===a)&&!u)return Object(A.jsx)(ce,{bgcolor:"l"===a||n?"transparent":"#26292D",children:Object(A.jsx)(B.a,{container:!0,justifyContent:"center",children:Object(A.jsxs)(B.a,{item:!0,xs:"l"===a?12:11,children:["undefined"!==typeof s.duration&&"undefined"!==typeof s.progress&&Object(A.jsx)(B.a,{container:!0,children:Object(A.jsx)(B.a,{item:!0,xs:!0,children:Object(A.jsx)(h.a,{duration:s.duration,progress:s.progress,LinearProgressProps:{...n&&{color:"wellness"},...i&&{color:"horeca"}}})})}),"l"===a&&Object(A.jsx)(f.a,{mt:1,children:Object(A.jsxs)(B.a,{container:!0,justifyContent:"space-between",children:[Object(A.jsx)(B.a,{item:!0,xs:d||!1 in s?12:10,children:Object(A.jsxs)(f.a,{textAlign:"left",px:1,children:[Object(A.jsx)(L.a,{variant:"caption",color:"textSecondary",gutterBottom:!0,children:m?s.course_title:Object(A.jsxs)(A.Fragment,{children:[t("Lezione")," ",s.lesson_num]})}),Object(A.jsx)(L.a,{variant:"subtitle2",color:"textPrimary",sx:{whiteSpace:"nowrap",textOverflow:"ellipsis",overflow:"hidden"},children:Object(A.jsx)("b",{children:s.title})}),s.subtitle&&Object(A.jsx)(L.a,{variant:"caption",gutterBottom:!0,style:{color:"#7e7e7e",textTransform:"uppercase"},children:Object(A.jsx)("b",{children:s.subtitle})})]})}),!d&&"is_favorite"in s&&Object(A.jsxs)(B.a,{item:!0,xs:"auto",children:[Object(A.jsx)(M.a,{sx:{backgroundColor:"#373A40"},color:"white",onClick:()=>{s.is_favorite?(async()=>{const e=b.source();await g("delete","/v2/favorites/lesson/"+s.id,e.token)&&v(!1)})():(async()=>{const e=b.source();await g("post","/v2/favorites",e.token,{lesson_id:s.id})&&j(!0)})()},children:y?Object(A.jsx)(U.a,{component:Z.a}
2):Object(A.jsxs)(A.Fragment,{children:[!_&&Object(A.jsx)(K.a,{}),_&&Object(A.jsx)(X.a,{})]})}),y&&Object(A.jsx)(L.a,{align:"center",color:"textPrimary",sx:{fontSize:"8px",mt:.5},children:t("Salvata")})]})]})}),"c"===a&&Object(A.jsx)(f.a,{mt:1,children:Object(A.jsxs)(B.a,{container:!0,children:[Object(A.jsx)(B.a,{item:!0,xs:!0,children:Object(A.jsx)(f.a,{textAlign:"left",children:Object(A.jsxs)(L.a,{color:n?"text.secondary_wellness":"text.secondary",variant:"subtitle2",children:[Object(A.jsx)(U.a,{component:ee.a,fontSize:"inherit",color:"inherit",sx:{mr:.5,verticalAlign:"middle"}})," ",Object(p.l)(s.course_duration)]})})}),Object(A.jsx)(B.a,{item:!0,xs:!0,children:Object(A.jsx)(f.a,{textAlign:"center",children:Object(A.jsxs)(L.a,{color:n?"text.secondary_wellness":"text.secondary",variant:"subtitle2",children:[Object(A.jsx)(U.a,{component:J.a,fontSize:"inherit",color:"inherit",sx:{mr:.5,verticalAlign:"middle"}})," ",s.lesson_completed_count,"/",s.lesson_count," ",t("lezioni")]})})}),Object(A.jsx)(B.a,{item:!0,xs:!0,children:Object(A.jsx)(f.a,{textAlign:"right",children:Object(A.jsxs)(L.a,{color:n?"text.secondary_wellness":"text.secondary",variant:"subtitle2",children:[Object(A.jsx)(U.a,{component:$.a,fontSize:"inherit",color:"inherit",sx:{mr:.5,verticalAlign:"middle"}})," ",s.test_completed_count,"/",s.test_count," ",t("test")]})})})]})})]})})});if("t"===a&&!u){const e=s.tags&&s.tags.split(",")[0];return Object(A.jsxs)(le,{children:[Object(A.jsx)(L.a,{variant:"caption",children:Object(A.jsx)("b",{children:s.first_name})}),Object(A.jsx)(L.a,{variant:"h5",gutterBottom:!0,sx:{whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},children:Object(A.jsx)("b",{children:s.last_name})}),e&&Object(A.jsx)(N.a,{label:e})]})}return Object(A.jsx)(r.a.Fragment,{})},ye=e=>{const{t:t,i18n:n}=Object(o.a)(),{item:i}=e;return Object(A.jsx)(de,{position:"top",sx:{background:"transparent"},title:Object(A.jsx)(N.a,{color:"default",size:"medium",label:Object(p.l)(i.duration),sx:{color:"#fff",fontWeight:"bold",backgroundColor:"rgba(0,0,0,0.5)",borderRadius:"12px"}}),actionIcon:i.test_available&&Object(A.jsx)(m.a,{component:s.b,size:"small",color:"secondary",variant:"contained",to:Object(a.f)("/:lang/:courses/:courseSlug/:lessons/:lessonSlug/test",{lang:n.language,courses:t("corsi"),courseSlug:i.course_slug,lessons:t("lezioni"),lessonSlug:i.slug}),children:t("Fai il test")})})},je=e=>{const{t:t}=Object(o.a)(),{rank:n,item:i,isRanked:s}=e;return Object(A.jsx)(de,{position:"top",title:Object(A.jsx)(f.a,{sx:{display:"flex"},children:i.trainers_list&&Object(A.jsxs)(r.a.Fragment,{children:[Object(A.jsx)(f.a,{children:Object(A.jsx)(F.a,{max:2,children:i.trainers_list.map((e=>Object(A.jsx)(z.a,{alt:e.first_name+" "+e.last_name,src:Object(p.m)(e.img_portrait,100)},"avatar"+e.id)))})}),Object(A.jsx)(f.a,{pl:1,sx:{maxWidth:"60%",whiteSpace:"normal",lineHeight:1,display:"flex",alignItems:"center"},children:Object(A.jsx)(ue,{variant:"caption",children:Object(A.jsx)("b",{children:Object(p.o)(i)})})})]})}),actionIcon:Object(A.jsxs)(A.Fragment,{children:[i.free&&!i.can_watch&&"horeca"!==i.course_type&&Object(A.jsx)(N.a,{size:"small",color:"white",label:t("Contenuto gratuito"),sx:{fontWeight:"bold",mb:1,display:"flex",...(!Boolean(i.trainers_list)||s)&&{mt:1}}}),s&&Object(A.jsxs)(f.a,{bgcolor:"#fff",color:"#303337",borderRadius:"9px",textAlign:"center",display:"table",px:1,mt:Boolean(i.trainers_list)?0:1,ml:"auto",children:[Object(A.jsx)(L.a,{variant:"caption",children:t("Top")}),Object(A.jsx)(L.a,{variant:"h5",style:{marginTop:"-10px"},children:Object(A.jsx)("b",{children:n+1})})]})]})})},_e=e=>{const{payoff:t}=e;return Object(A.jsx)(N.a,{size:"small",color:"white",label:t,sx:{fontWeight:"bold"}})},ve=e=>{const{item:t}=e;return Object(A.jsx)(me,{onClick:()=>e.handleClickItem(t),children:Object(A.jsx)("img",{alt:"",src:te.a,style:{width:"100%",minHeight:"auto"}})})};function xe(e){const{t:t,i18n:n}=Object(o.a)(),i=Array.isArray(e.data)?e.data:[e.data],{packageType:c}=Object(l.a)(),d=Object(a.h)(),p=Object(a.i)(),g=[],b=[],y=r.a.useRef(null),[j,_]=r.a.useState({right:!1,left:!1});e.type&&g.push(e.type),e.smallerImage&&g.push("smallerImage"),e.isBanner&&g.push("banner"),e.packages&&g.push("basics"),e.dontScroll&&b.push("dontScroll");const v=t=>{if(!y.current)return;const n=y.current.getBoundingClientRect();Math.round(n.bottom)-window.innerHeight<=0&&e.onScrollEnd&&e.onScrollEnd()};r.a.useEffect((()=>
2{if(e.dontScroll)return window.removeEventListener("scroll",v),window.addEventListener("scroll",v),()=>{window.removeEventListener("scroll",v)}}),[i]);const x=i=>{if("c"===e.handleClickItem&&("standard"===i.course_type&&d.push(Object(a.f)("/:lang/:courses/:courseSlug",{lang:n.language,courses:t("corsi"),courseSlug:i.slug})),"horeca"===i.course_type&&d.push(Object(a.f)("/:lang/horeca/:courseSlug",{lang:n.language,courseSlug:i.slug}))),"l"===e.handleClickItem&&("standard"===i.course_type&&d.push(Object(a.f)("/:lang/:courses/:courseSlug/:lessons/:lessonSlug",{lang:n.language,courses:t("corsi"),courseSlug:i.course_slug,lessons:t("lezioni"),lessonSlug:i.slug}),{from:p.pathname}),"horeca"===i.course_type&&d.push(Object(a.f)("/:lang/horeca/:courseSlug/:lessons/:lessonSlug",{lang:n.language,courseSlug:i.course_slug,lessons:t("lezioni"),lessonSlug:i.slug}),{from:p.pathname}),"basics"===i.course_type&&d.push(Object(a.f)("/:lang/:school/:classSlug/:modules/:moduleSlug/:lessons/:chapterSlug",{lang:n.language,school:t("scuola"),classSlug:i.package.slug,modules:t("moduli"),moduleSlug:i.course_slug,lessons:t("lezioni"),chapterSlug:i.slug}),{from:p.pathname}),"wellness"===i.course_type&&d.push(Object(a.f)("/:lang/:package/:classSlug/:modules/:moduleSlug/:lessons/:chapterSlug",{lang:n.language,package:t("benessere"),classSlug:i.package.slug,modules:t("moduli"),moduleSlug:i.course_slug,lessons:t("lezioni"),chapterSlug:i.slug}),{from:p.pathname})),"lp"===e.handleClickItem&&d.push(Object(a.f)("/:lang/:paths/:pathSlug",{lang:n.language,paths:t("percorsi"),pathSlug:i.slug})),"t"===e.handleClickItem&&(Object(u.a)("open_chef",{chef_id:i.id}),d.push(Object(a.f)("/:lang/:trainers/:trainerSlug",{lang:n.language,trainers:t("maestri"),trainerSlug:i.slug}))),"pc"===e.handleClickItem&&"basics"===i.package_type&&d.push(Object(a.f)("/:lang/:school/:classSlug",{lang:n.language,school:t("scuola"),classSlug:i.slug})),"pc"===e.handleClickItem&&"wellness"===i.package_type&&d.push(Object(a.f)("/:lang/:package/:classSlug",{lang:n.language,package:t("benessere"),classSlug:i.slug})),"c"===e.handleClickItem&&"basics"===i.course_type&&d.push(Object(a.f)("/:lang/:school/:classSlug/:modules/:moduleSlug",{lang:n.language,school:t("scuola"),classSlug:i.package.slug,modules:t("moduli"),moduleSlug:i.slug})),"c"===e.handleClickItem&&"wellness"===i.course_type&&d.push(Object(a.f)("/:lang/:package/:classSlug/:modules/:moduleSlug",{lang:n.language,package:t("benessere"),classSlug:i.package.slug,modules:t("moduli"),moduleSlug:i.slug})),"tags"===e.handleClickItem&&i.filters&&i.filters.filter_keys.length){const e=i.filters.filter_keys.reduce(((e,t,n)=>({...e,[t]:i.filters.filter_values[n]})),{}),r=new URLSearchParams(e);d.push(Object(a.f)("/:lang/:search/:section/?"+r.toString(),{lang:n.language,search:t("cerca"),section:t("corsi")}))}};return r.a.useEffect((()=>{!e.dontScroll&&y.current.scrollWidth>y.current.clientWidth&&_({left:!1,right:!0})}),[i]),Object(A.jsxs)(ie,{children:[j.right&&Object(A.jsx)(he,{onClick:()=>y.current.scrollLeft+=Math.round(y.current.offsetWidth),className:c.key||e.arrowsClassName,size:"small",children:Object(A.jsx)(H.a,{fontSize:"large"})}),j.left&&Object(A.jsx)(pe,{onClick:()=>y.current.scrollLeft-=Math.round(y.current.offsetWidth),className:c.key||e.arrowsClassName,size:"small",children:Object(A.jsx)(W.a,{fontSize:"large"})}),Object(A.jsx)(re,{ref:y,className:b.join(" "),onScroll:t=>(t=>{const n=Math.round(t.target.scrollLeft),i=t.target.scrollWidth-t.target.offsetWidth;0===n&&_({left:!1,right:!0}),!(n>0&&n<i)||j.left&&j.right||_({left:!0,right:!0}),n>=i-10&&j.right&&(_({left:!0,right:!1}),e.onScrollEnd&&e.onScrollEnd())})(t),sx:{width:"100%"},children:i.map(((i,r)=>Object(A.jsxs)(se,{className:g.join(" "),onClick:()=>{(!e.packages&&e.handleClickItem&&!e.play||e.packages&&e.handleClickItem&&i.enabled)&&x(i)},style:e.cols?{width:100/e.cols+"%",cursor:!e.packages&&e.handleClickItem&&!e.play||e.packages&&e.handleClickItem&&i.enabled?"pointer":"default"}:{cursor:!e.packages&&e.handleClickItem&&!e.play||e.packages&&e.handleClickItem&&i.enabled?"pointer":"default",marginBottom:e.dontScroll?"10px":0},children:[Object(A.jsxs)(ge,{className:"content",cover:i.img||i.img_cover,sx:{boxSizing:"border-box",height:{xs:e.smallerImage?160:220,lg:e.cols&&2===e.cols?300:e.smallerImage?160:220},"&:hover":{md:{outline:e.packages&&e.handleClickItem&&!e.disableHover||e.forceHover?"2px solid #fff":"none"}}},children:[i.hasOwnProperty("enabled")&&!i.enabled&&Object(A.jsx)(f.a,{sx:{position:"absolute",top:0,left:0,bottom:0,right:0,width:"100%",height:"100%",zIndex:2,background:"rgba(0,0,0,0.7)",display:"flex",justifyContent:"center",alignItems:"center"},children:Object(A.jsx)(L.a,{variant:"h6",color:"textPrimary",sx:{letterSpacing:3},children:Object(A.jsx)("b",{children:i.course_status_text?i.course_status_text:t("PROSSIMAMENTE")})})}
2),!e.type&&e.payoff&&Object(A.jsx)(de,{position:"top",sx:{textAlign:"right",zIndex:2,background:"transparent",top:20,...i.free&&!i.can_watch&&"horeca"!==i.course_type&&{top:50}},actionIcon:Object(A.jsx)(_e,{payoff:e.payoff})}),"l"===e.type&&e.smallerImage&&e.showBookmark&&i.is_favorite&&Object(A.jsx)(f.a,{sx:{position:"absolute",width:15,height:15,right:15,top:10},children:Object(A.jsx)(X.a,{color:"white"})}),e.topBar&&Object(A.jsx)(ye,{item:i}),(i.trainers_list||e.isRanked||i.free)&&"l"!==e.type&&Object(A.jsx)(je,{isRanked:e.isRanked,item:i,rank:r}),e.play&&Object(A.jsx)(ve,{handleClickItem:x,item:i}),Object(A.jsx)(fe,{payoff:e.payoff,isBanner:e.isBanner,smallerImage:e.smallerImage,type:e.type,item:i}),Boolean(e.forceProgress)&&Object(A.jsx)(f.a,{sx:{position:"absolute",bottom:0,width:"100%"},children:Object(A.jsx)(h.a,{duration:i[e.forceProgress.duration],progress:i[e.forceProgress.progress]})})]}),!e.hideItemBottomBar&&Object(A.jsx)(be,{showCourseTitle:e.showCourseTitle,isBanner:e.isBanner,smallerImage:e.smallerImage,type:e.type,item:i}),e.cta&&!i.can_watch&&!i.free&&Object(A.jsx)(f.a,{textAlign:"center",pt:1,children:Object(A.jsx)(m.a,{component:s.b,to:"/"+n.language+"/paywall/"+i.id,color:"primary",children:t("Ottieni il corso")})})]},e.type+i.id+r)))})]})}},261:function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var i,r=n(0);function s(){return s=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)({}).hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},s.apply(null,arguments)}function a(e,t){let{title:n,titleId:a,...o}=e;return r.createElement("svg",s({id:"Raggruppa_3946","data-name":"Raggruppa 3946",xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",ref:t,"aria-labelledby":a},o),n?r.createElement("title",{id:a},n):null,i||(i=r.createElement("g",{id:"Raggruppa_5018","data-name":"Raggruppa 5018"},r.createElement("path",{id:"Tracciato_8301","data-name":"Tracciato 8301",d:"M14.95,14.649a.9.9,0,0,1-.4-.095l-4.8-2.4a.9.9,0,0,1-.5-.805v-7.2a.9.9,0,1,1,1.8,0v6.644l4.3,2.15a.9.9,0,0,1-.4,1.705",transform:"translate(1.85 0.65)",fill:"currentColor"}),r.createElement("path",{id:"Tracciato_8302","data-name":"Tracciato 8302",d:"M12,1.8A10.2,10.2,0,1,1,1.8,12,10.211,10.211,0,0,1,12,1.8M12,0A12,12,0,1,0,24,12,12,12,0,0,0,12,0",fill:"currentColor"}))))}const o=r.forwardRef(a);n.p},264:function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var i=n(645),r=n(336),s=n(1);const a=Object(i.a)(r.a)((e=>{let{theme:t}=e;return{backgroundColor:"transparent",padding:0,marginTop:"10px","& .MuiMobileStepper-progress":{borderRadius:"5px",width:"100%",backgroundColor:"rgba(0,0,0,0.3) !important"}}}));function o(e){const{duration:t,progress:n,...i}=e;return Object(s.jsx)(a,{variant:"progress",steps:1e3*t,activeStep:1e3*n,position:"static",...i})}},265:function(e,t,n){"use strict";t.a=n.p+"static/media/cookinbox.6c649e8c.svg"},267:function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var i,r=n(0);function s(){return s=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)({}).hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},s.apply(null,arguments)}function a(e,t){let{title:n,titleId:a,...o}=e;return r.createElement("svg",s({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",ref:t,"aria-labelledby":a},o),n?r.createElement("title",{id:a},n):null,i||(i=r.createElement("path",{d:"m19 21-7-3-7 3V5c0-1.1.9-2 2-2h7c-.63.84-1 1.87-1 3 0 2.76 2.24 5 5 5 .34 0 .68-.03 1-.1zM17.83 9 15 6.17l1.41-1.41 1.41 1.41 3.54-3.54 1.41 1.41z",fill:"currentColor"})))}const o=r.forwardRef(a);n.p},268:function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var i,r=n(0);function s(){return s=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)({}).hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},s.apply(null,arguments)}function a(e,t){let{title:n,titleId:a,...o}=e;return r.createElement("svg",s({xmlns:"http://www.w3.org/2000/svg",width:23.365,height:23.363,viewBox:"0 0 23.365 23.363",ref:t,"aria-labelledby":a},o),n?r.createElement("title",{id:a},n):null,i||(i=r.createElement("g",null,r.createElement("g",{transform:"translate(0.75 0.75)"},r.createElement("rect",{width:21.864,height:21.863,fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeMiterlimit:10,strokeWidth:"1.5px",rx:5})),r.createElement("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5px",d:"M234.191 356.274l4.77 3.773
2-4.77 4.129",transform:"translate(0.75 0.75) translate(-225.034 -349.228)"}))))}const o=r.forwardRef(a);n.p},282:function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));var i,r,s=n(0);function a(){return a=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)({}).hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},a.apply(null,arguments)}function o(e,t){let{title:n,titleId:o,...c}=e;return s.createElement("svg",a({xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",width:24,height:24,viewBox:"0 0 24 24",ref:t,"aria-labelledby":o},c),n?s.createElement("title",{id:o},n):null,i||(i=s.createElement("defs",null,s.createElement("clipPath",{id:"clip-path"},s.createElement("rect",{id:"Rettangolo_1604","data-name":"Rettangolo 1604",width:24,height:24,fill:"currentColor"})))),r||(r=s.createElement("g",{id:"Raggruppa_3952","data-name":"Raggruppa 3952",clipPath:"url(#clip-path)"},s.createElement("path",{id:"Tracciato_8712","data-name":"Tracciato 8712",d:"M2.77,0a2.769,2.769,0,1,0,2.77,2.77A2.769,2.769,0,0,0,2.77,0m0,9.23A2.77,2.77,0,1,0,5.539,12,2.769,2.769,0,0,0,2.77,9.23Zm0,9.23a2.77,2.77,0,1,0,2.77,2.77,2.769,2.769,0,0,0-2.77-2.77m20.492,1.552H8.372a.679.679,0,0,0-.738.6v1.2a.679.679,0,0,0,.738.6h14.89a.68.68,0,0,0,.738-.6V20.622a.676.676,0,0,0-.731-.6h-.007Zm0-18.452H8.372a.678.678,0,0,0-.738.594V3.366a.678.678,0,0,0,.738.594h14.89A.679.679,0,0,0,24,3.366v-1.2a.675.675,0,0,0-.732-.6h-.006Zm0,9.23H8.372a.678.678,0,0,0-.738.594V12.6a.678.678,0,0,0,.738.594h14.89A.679.679,0,0,0,24,12.6V11.4a.675.675,0,0,0-.731-.6h-.007Z",fill:"currentColor"}))))}const c=s.forwardRef(o);n.p},291:function(e,t){},292:function(e,t,n){"use strict";var i=n(194),r=n(83),s=n(293),a=n(294),o=n(295);d.httpHandler=n(296),d.requestInterceptorsStorage=new a,d.responseInterceptorsStorage=new a,d.retryManager=new o;var c=function(e){var t={};return e?(e.trim().split("\n").forEach((function(e){var n=e.indexOf(":"),i=e.slice(0,n).trim().toLowerCase(),r=e.slice(n+1).trim();"undefined"===typeof t[i]?t[i]=r:Array.isArray(t[i])?t[i].push(r):t[i]=[t[i],r]})),t):t};function l(e,t,n){var i=e;return s(t)?(n=t,"string"===typeof e&&(i={uri:e})):i=r({},t,{uri:e}),i.callback=n,i}function d(e,t,n){return u(t=l(e,t,n))}function u(e){if("undefined"===typeof e.callback)throw new Error("callback argument missing");if(e.requestType&&d.requestInterceptorsStorage.getIsEnabled()){var t={uri:e.uri||e.url,headers:e.headers||{},body:e.body,metadata:e.metadata||{},retry:e.retry,timeout:e.timeout},n=d.requestInterceptorsStorage.execute(e.requestType,t);e.uri=n.uri,e.headers=n.headers,e.body=n.body,e.metadata=n.metadata,e.retry=n.retry,e.timeout=n.timeout}var i=!1,r=function(t,n,r){i||(i=!0,e.callback(t,n,r))};function s(){var e=void 0;if(e=p.response?p.response:p.responseText||function(e){try{if("document"===e.responseType)return e.responseXML;var t=e.responseXML&&"parsererror"===e.responseXML.documentElement.nodeName;if(""===e.responseType&&!t)return e.responseXML}catch(n){}return null}(p),_)try{e=JSON.parse(e)}catch(t){}return e}function a(t){if(clearTimeout(m),clearTimeout(e.retryTimeout),t instanceof Error||(t=new Error(""+(t||"Unknown XMLHttpRequest Error"))),t.statusCode=0,h||!d.retryManager.getIsEnabled()||!e.retry||!e.retry.shouldRetry()){if(e.requestType&&d.responseInterceptorsStorage.getIsEnabled()){var n={headers:v.headers||{},body:v.body,responseUrl:p.responseURL,responseType:p.responseType},i=d.responseInterceptorsStorage.execute(e.requestType,n);v.body=i.body,v.headers=i.headers}return r(t,v)}e.retryTimeout=setTimeout((function(){e.retry.moveToNextAttempt(),e.xhr=p,u(e)}),e.retry.getCurrentFuzzedDelay())}function o(){if(!h){var t;clearTimeout(m),clearTimeout(e.retryTimeout),t=e.useXDR&&void 0===p.status?200:1223===p.status?204:p.status;var n=v,i=null;if(0!==t?(n={body:s(),statusCode:t,method:f,headers:{},url:g,rawRequest:p},p.getAllResponseHeaders&&(n.headers=c(p.getAllResponseHeaders()))):i=new Error("Internal XMLHttpRequest Error"),e.requestType&&d.responseInterceptorsStorage.getIsEnabled()){var a={headers:n.headers||{},body:n.body,responseUrl:p.responseURL,responseType:p.responseType},o=d.responseInterceptorsStorage.execute(e.requestType,a);n.body=o.body,n.headers=o.headers}return r(i,n,n.body)}}var l,h,p=e.xhr||null;p||(p=e.cors||e.useXDR?new d.XDomainRequest:new d.XMLHttpRequest);var m,g=p.url=e.uri||e.url,f=p.method=e.method||"GET",b=e.body||e.data,y=p.headers=e.headers||{},j=!!e.sync,_=!1,v={body:void 0,headers:{},statusCode:0,method:f,url:g,rawRequest:p};if("json"in e&&!1!==e.json&&(_=!0,y.accept||y.Accept||(y.Accept="application/json"),"GET"!==f&&"HEAD"!==f&&(y["content-type"]||y["Content-Type"]||(y["Content-Type"]="application/json"),b=JSON.stringify(!0===e.json?b:e.json))),p.onreadystatechange=function(){4!==p.readyState||d.responseInterceptorsStorage.getIsEnabled()||setTimeout(o,0)},p.onload=o,p.onerror=a,p.onprogress=function(){},p.onabort=function(){h=!0,clearTimeout(e.retryTimeout)},p.ontimeout=a,p.open(f,g,!j,e.username,e.password),j||(p.withCredentials=!!e.withCredentials),!j&&e.timeout>0&&(m=setTimeout((function(){if(!h){h=!0,p.abort("timeout");var e=new Error("XMLHttpRequest timeout");e.code="ETIMEDOUT",a(e)}}),e.timeout)),p.setRequestHeader)for(l in y)y.hasOwnProperty(l)&&p.setRequestHeader(l,y[l]);else if(e.headers&&!function(e){for(var t in e)if(e.hasOwnProperty(t))return!1;return!0}(e.headers))throw new Error("Headers cannot be set on an XDomainRequest object");return"responseType"in e&&(p.responseType=e.responseType),"beforeSend"in e&&"function"===typeof e.beforeSend&&e.beforeSend(p),p.send(b||null),p}e.exports=d,e.exports.default=d,d.XMLHttpRequest=i.XMLHttpRequest||function(){},d.XDomainRequest="withCredentials"in new d.XMLHttpRequest?d.XMLHttpRequest:i.XD
2omainRequest,function(e,t){for(var n=0;n<e.length;n++)t(e[n])}(["get","put","post","patch","head","delete"],(function(e){d["delete"===e?"del":e]=function(t,n,i){return(n=l(t,n,i)).method=e.toUpperCase(),u(n)}}))},293:function(e,t){e.exports=function(e){if(!e)return!1;var t=n.call(e);return"[object Function]"===t||"function"===typeof e&&"[object RegExp]"!==t||"undefined"!==typeof window&&(e===window.setTimeout||e===window.alert||e===window.confirm||e===window.prompt)};var n=Object.prototype.toString},294:function(e,t,n){"use strict";function i(e,t){var n="undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(n)return(n=n.call(e)).next.bind(n);if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"===typeof e)return r(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return r(e,t)}(e))||t&&e&&"number"===typeof e.length){n&&(e=n);var i=0;return function(){return i>=e.length?{done:!0}:{done:!1,value:e[i++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function r(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n<t;n++)i[n]=e[n];return i}var s=function(){function e(){this.typeToInterceptorsMap_=new Map,this.enabled_=!1}var t=e.prototype;return t.getIsEnabled=function(){return this.enabled_},t.enable=function(){this.enabled_=!0},t.disable=function(){this.enabled_=!1},t.reset=function(){this.typeToInterceptorsMap_=new Map,this.enabled_=!1},t.addInterceptor=function(e,t){this.typeToInterceptorsMap_.has(e)||this.typeToInterceptorsMap_.set(e,new Set);var n=this.typeToInterceptorsMap_.get(e);return!n.has(t)&&(n.add(t),!0)},t.removeInterceptor=function(e,t){var n=this.typeToInterceptorsMap_.get(e);return!(!n||!n.has(t))&&(n.delete(t),!0)},t.clearInterceptorsByType=function(e){return!!this.typeToInterceptorsMap_.get(e)&&(this.typeToInterceptorsMap_.delete(e),this.typeToInterceptorsMap_.set(e,new Set),!0)},t.clear=function(){return!!this.typeToInterceptorsMap_.size&&(this.typeToInterceptorsMap_=new Map,!0)},t.getForType=function(e){return this.typeToInterceptorsMap_.get(e)||new Set},t.execute=function(e,t){for(var n,r=i(this.getForType(e));!(n=r()).done;){var s=n.value;try{t=s(t)}catch(a){}}return t},e}();e.exports=s},295:function(e,t,n){"use strict";var i=function(){function e(){this.maxAttempts_=1,this.delayFactor_=.1,this.fuzzFactor_=.1,this.initialDelay_=1e3,this.enabled_=!1}var t=e.prototype;return t.getIsEnabled=function(){return this.enabled_},t.enable=function(){this.enabled_=!0},t.disable=function(){this.enabled_=!1},t.reset=function(){this.maxAttempts_=1,this.delayFactor_=.1,this.fuzzFactor_=.1,this.initialDelay_=1e3,this.enabled_=!1},t.getMaxAttempts=function(){return this.maxAttempts_},t.setMaxAttempts=function(e){this.maxAttempts_=e},t.getDelayFactor=function(){return this.delayFactor_},t.setDelayFactor=function(e){this.delayFactor_=e},t.getFuzzFactor=function(){return this.fuzzFactor_},t.setFuzzFactor=function(e){this.fuzzFactor_=e},t.getInitialDelay=function(){return this.initialDelay_},t.setInitialDelay=function(e){this.initialDelay_=e},t.createRetry=function(e){var t=void 0===e?{}:e,n=t.maxAttempts,i=t.delayFactor,s=t.fuzzFactor,a=t.initialDelay;return new r({maxAttempts:n||this.maxAttempts_,delayFactor:i||this.delayFactor_,fuzzFactor:s||this.fuzzFactor_,initialDelay:a||this.initialDelay_})},e}(),r=function(){function e(e){this.maxAttempts_=e.maxAttempts,this.delayFactor_=e.delayFactor,this.fuzzFactor_=e.fuzzFactor,this.currentDelay_=e.initialDelay,this.currentAttempt_=1}var t=e.prototype;return t.moveToNextAttempt=function(){this.currentAttempt_++;var e=this.currentDelay_*this.delayFactor_;this.currentDelay_=this.currentDelay_+e},t.shouldRetry=function(){return this.currentAttempt_<this.maxAttempts_},t.getCurrentDelay=function(){return this.currentDelay_},t.getCurrentMinPossibleDelay=function(){return(1-this.fuzzFactor_)*this.currentDelay_},t.getCurrentMaxPossibleDelay=function(){return(1+this.fuzzFactor_)*this.currentDelay_},t.getCurrentFuzzedDelay=function(){var e=this.getCurrentMinPossibleDelay(),t=this.getCurrentMaxPossibleDelay();return e+Math.random()*(t-e)},e}();e.exports=i},296:function(e,t,n){"use strict";var i=n(194);e.exports=function(e,t){return void 0===t&&(t=!1),function(n,r,s){if(n)e(n);else if(r.statusCode>=400&&r.statusCode<=599){var a=s;if(t)if(i.TextDecoder){var o=function(e){void 0===e&&(e="");return e.toLowerCase().split(";").reduce((function(e,t){var n=t.split("="),i=n[0],r=n[1];return"charset"===i.trim()?r.trim():e}),"utf-8")}(r.headers&&r.headers["content-type"]);try{a=new TextDecoder(o).decode(s)}catch(c){}}else a=String.fromCharCode.apply(null,new Uint8Array(s));e({cause:a})}else e(null,s)}}},297:function(e,t,n){var i=n(194),r=e.exports={WebVTT:n(298),VTTCue:n(299),VTTRegion:n(300)};i.vttjs=r,i.WebVTT=r.WebVTT;var s=r.VTTCue,a=r.VTTRegion,o=i.VTTCue,c=i.VTTRegion;r.shim=function(){i.VTTCue=s,i.VTTRegion=a},r.restore=function(){i.VTTCue=o,i.VTTRegion=c},i.VTTCue||r.shim()},298:function(e,t,n){var i=n(237),r=Object.create||function(){function e(){}return function(t){if(1!==arguments.length)throw new Error("Object.create shim only accepts one parameter.");return e.prototype=t,new e}}();
vendor: 5,390 bytes, line 2
2function s(e,t){this.name="ParsingError",this.code=e.code,this.message=t||e.message}function a(e){function t(e,t,n,i){return 3600*(0|e)+60*(0|t)+(0|n)+(0|i)/1e3}var n=e.match(/^(\d+):(\d{1,2})(:\d{1,2})?\.(\d{3})/);return n?n[3]?t(n[1],n[2],n[3].replace(":",""),n[4]):n[1]>59?t(n[1],n[2],0,n[4]):t(0,n[1],n[2],n[4]):null}function o(){this.values=r(null)}function c(e,t,n,i){var r=i?e.split(i):[e];for(var s in r)if("string"===typeof r[s]){var a=r[s].split(n);if(2===a.length)t(a[0].trim(),a[1].trim())}}function l(e,t,n){var i=e;function r(){var t=a(e);if(null===t)throw new s(s.Errors.BadTimeStamp,"Malformed timestamp: "+i);return e=e.replace(/^[^\sa-zA-Z-]+/,""),t}function l(){e=e.replace(/^\s+/,"")}if(l(),t.startTime=r(),l(),"--\x3e"!==e.substr(0,3))throw new s(s.Errors.BadTimeStamp,"Malformed time stamp (time stamps must be separated by '--\x3e'): "+i);e=e.substr(3),l(),t.endTime=r(),l(),function(e,t){var i=new o;c(e,(function(e,t){switch(e){case"region":for(var r=n.length-1;r>=0;r--)if(n[r].id===t){i.set(e,n[r].region);break}break;case"vertical":i.alt(e,t,["rl","lr"]);break;case"line":var s=t.split(","),a=s[0];i.integer(e,a),i.percent(e,a)&&i.set("snapToLines",!1),i.alt(e,a,["auto"]),2===s.length&&i.alt("lineAlign",s[1],["start","center","end"]);break;case"position":s=t.split(","),i.percent(e,s[0]),2===s.length&&i.alt("positionAlign",s[1],["start","center","end"]);break;case"size":i.percent(e,t);break;case"align":i.alt(e,t,["start","center","end","left","right"])}}),/:/,/\s/),t.region=i.get("region",null),t.vertical=i.get("vertical","");try{t.line=i.get("line","auto")}catch(r){}t.lineAlign=i.get("lineAlign","start"),t.snapToLines=i.get("snapToLines",!0),t.size=i.get("size",100);try{t.align=i.get("align","center")}catch(r){t.align=i.get("align","middle")}try{t.position=i.get("position","auto")}catch(r){t.position=i.get("position",{start:0,left:0,center:50,middle:50,end:100,right:100},t.align)}t.positionAlign=i.get("positionAlign",{start:"start",left:"start",center:"center",middle:"center",end:"end",right:"end"},t.align)}(e,t)}s.prototype=r(Error.prototype),s.prototype.constructor=s,s.Errors={BadSignature:{code:0,message:"Malformed WebVTT signature."},BadTimeStamp:{code:1,message:"Malformed time stamp."}},o.prototype={set:function(e,t){this.get(e)||""===t||(this.values[e]=t)},get:function(e,t,n){return n?this.has(e)?this.values[e]:t[n]:this.has(e)?this.values[e]:t},has:function(e){return e in this.values},alt:function(e,t,n){for(var i=0;i<n.length;++i)if(t===n[i]){this.set(e,t);break}},integer:function(e,t){/^-?\d+$/.test(t)&&this.set(e,parseInt(t,10))},percent:function(e,t){return!!(t.match(/^([\d]{1,3})(\.[\d]*)?%$/)&&(t=parseFloat(t))>=0&&t<=100)&&(this.set(e,t),!0)}};var d=i.createElement&&i.createElement("textarea"),u={c:"span",i:"i",b:"b",u:"u",ruby:"ruby",rt:"rt",v:"span",lang:"span"},h={white:"rgba(255,255,255,1)",lime:"rgba(0,255,0,1)",cyan:"rgba(0,255,255,1)",red:"rgba(255,0,0,1)",yellow:"rgba(255,255,0,1)",magenta:"rgba(255,0,255,1)",blue:"rgba(0,0,255,1)",black:"rgba(0,0,0,1)"},p={v:"title",lang:"lang"},m={rt:"ruby"};function g(e,t){function n(){if(!t)return null;var e,n=t.match(/^([^<]*)(<[^>]*>?)?/);return e=n[1]?n[1]:n[2],t=t.substr(e.length),e}function i(e,t){return!m[t.localName]||m[t.localName]===e.localName}function r(t,n){var i=u[t];if(!i)return null;var r=e.document.createElement(i),s=p[t];return s&&n&&(r[s]=n.trim()),r}for(var s,o,c=e.document.createElement("div"),l=c,g=[];null!==(s=n());)if("<"!==s[0])l.appendChild(e.document.createTextNode((o=s,d.innerHTML=o,o=d.textContent,d.textContent="",o)));else{if("/"===s[1]){g.length&&g[g.length-1]===s.substr(2).replace(">","")&&(g.pop(),l=l.parentNode);continue}var f,b=a(s.substr(1,s.length-2));if(b){f=e.document.createProcessingInstruction("timestamp",b),l.appendChild(f);continue}var y=s.match(/^<([^.\s/0-9>]+)(\.[^\s\\>]+)?([^>\\]+)?(\\?)>?$/);if(!y)continue;if(!(f=r(y[1],y[3])))continue;if(!i(l,f))continue;if(y[2]){var j=y[2].split(".");j.forEach((function(e){var t=/^bg_/.test(e),n=t?e.slice(3):e;if(h.hasOwnProperty(n)){var i=t?"background-color":"color",r=h[n];f.style[i]=r}})),f.className=j.join(" ")}g.push(y[1]),l.appendChild(f),l=f}return c}var f=[[1470,1470],[1472,1472],[1475,1475],[1478,1478],[1488,1514],[1520,1524],[1544,1544],[1547,1547],[1549,1549],[1563,1563],[1566,1610],[1645,1647],[1649,1749],[1765,1766],[1774,1775],[1786,1805],[1807,1808],[1810,1839],[1869,1957],[1969,1969],[1984,2026],[2036,2037],[2042,2042],[2048,2069],[2074,2074],[2084,2084],[2088,2088],[2096,2110],[2112,2136],[2142,2142],[2208,2208],[2210,2220],[8207,8207],[64285,64285],[64287,64296],[64298,64310],[64312,64316],[64318,64318],[64320,64321],[64323,64324],[64326,64449],[64467,64829],[64848,64911],[64914,64967],[65008,65020],[65136,65140],[65142,65276],[67584,67589],[67592,67592],[67594,67637],[67639,67640],[67644,67644],[67647,67669],[67671,67679],[67840,67867],[67872,67897],[67903,67903],[67968,68023],[68030,68031],[68096,68096],[68112,68115],[68117,68119],[68121,68147],[68160,68167],[68176,68184],[68192,68223],[68352,68405],[68416,68437],[68440,68466],[68472,68479],[68608,68680],[126464,126467],[126469,126495],[126497,126498],[126500,126500],[126503,126503],[126505,126514],[126516,126519],[126521,126521],[126523,126523],[126530,126530],[126535,126535],[126537,126537],[126539,126539],[126541,126543],[126545,126546],[126548,126548],[126551,126551
vendor: 6,114 bytes, line 2
2],[126553,126553],[126555,126555],[126557,126557],[126559,126559],[126561,126562],[126564,126564],[126567,126570],[126572,126578],[126580,126583],[126585,126588],[126590,126590],[126592,126601],[126603,126619],[126625,126627],[126629,126633],[126635,126651],[1114109,1114109]];function b(e){for(var t=0;t<f.length;t++){var n=f[t];if(e>=n[0]&&e<=n[1])return!0}return!1}function y(e){var t=[],n="";if(!e||!e.childNodes)return"ltr";function i(e,t){for(var n=t.childNodes.length-1;n>=0;n--)e.push(t.childNodes[n])}function r(e){if(!e||!e.length)return null;var t=e.pop(),n=t.textContent||t.innerText;if(n){var s=n.match(/^.*(\n|\r)/);return s?(e.length=0,s[0]):n}return"ruby"===t.tagName?r(e):t.childNodes?(i(e,t),r(e)):void 0}for(i(t,e);n=r(t);)for(var s=0;s<n.length;s++)if(b(n.charCodeAt(s)))return"rtl";return"ltr"}function j(){}function _(e,t,n){j.call(this),this.cue=t,this.cueDiv=g(e,t.text);var i={color:"rgba(255, 255, 255, 1)",backgroundColor:"rgba(0, 0, 0, 0.8)",position:"relative",left:0,right:0,top:0,bottom:0,display:"inline",writingMode:""===t.vertical?"horizontal-tb":"lr"===t.vertical?"vertical-lr":"vertical-rl",unicodeBidi:"plaintext"};this.applyStyles(i,this.cueDiv),this.div=e.document.createElement("div"),i={direction:y(this.cueDiv),writingMode:""===t.vertical?"horizontal-tb":"lr"===t.vertical?"vertical-lr":"vertical-rl",unicodeBidi:"plaintext",textAlign:"middle"===t.align?"center":t.align,font:n.font,whiteSpace:"pre-line",position:"absolute"},this.applyStyles(i),this.div.appendChild(this.cueDiv);var r=0;switch(t.positionAlign){case"start":case"line-left":r=t.position;break;case"center":r=t.position-t.size/2;break;case"end":case"line-right":r=t.position-t.size}""===t.vertical?this.applyStyles({left:this.formatStyle(r,"%"),width:this.formatStyle(t.size,"%")}):this.applyStyles({top:this.formatStyle(r,"%"),height:this.formatStyle(t.size,"%")}),this.move=function(e){this.applyStyles({top:this.formatStyle(e.top,"px"),bottom:this.formatStyle(e.bottom,"px"),left:this.formatStyle(e.left,"px"),right:this.formatStyle(e.right,"px"),height:this.formatStyle(e.height,"px"),width:this.formatStyle(e.width,"px")})}}function v(e){var t,n,i,r;if(e.div){n=e.div.offsetHeight,i=e.div.offsetWidth,r=e.div.offsetTop;var s=(s=e.div.childNodes)&&(s=s[0])&&s.getClientRects&&s.getClientRects();e=e.div.getBoundingClientRect(),t=s?Math.max(s[0]&&s[0].height||0,e.height/s.length):0}this.left=e.left,this.right=e.right,this.top=e.top||r,this.height=e.height||n,this.bottom=e.bottom||r+(e.height||n),this.width=e.width||i,this.lineHeight=void 0!==t?t:e.lineHeight}function x(e,t,n,i){var r=new v(t),s=t.cue,a=function(e){if("number"===typeof e.line&&(e.snapToLines||e.line>=0&&e.line<=100))return e.line;if(!e.track||!e.track.textTrackList||!e.track.textTrackList.mediaElement)return-1;for(var t=e.track,n=t.textTrackList,i=0,r=0;r<n.length&&n[r]!==t;r++)"showing"===n[r].mode&&i++;return-1*++i}(s),o=[];if(s.snapToLines){var c;switch(s.vertical){case"":o=["+y","-y"],c="height";break;case"rl":o=["+x","-x"],c="width";break;case"lr":o=["-x","+x"],c="width"}var l=r.lineHeight,d=l*Math.round(a),u=n[c]+l,h=o[0];Math.abs(d)>u&&(d=d<0?-1:1,d*=Math.ceil(u/l)*l),a<0&&(d+=""===s.vertical?n.height:n.width,o=o.reverse()),r.move(h,d)}else{var p=r.lineHeight/n.height*100;switch(s.lineAlign){case"center":a-=p/2;break;case"end":a-=p}switch(s.vertical){case"":t.applyStyles({top:t.formatStyle(a,"%")});break;case"rl":t.applyStyles({left:t.formatStyle(a,"%")});break;case"lr":t.applyStyles({right:t.formatStyle(a,"%")})}o=["+y","-x","+x","-y"],r=new v(t)}var m=function(e,t){for(var r,s=new v(e),a=1,o=0;o<t.length;o++){for(;e.overlapsOppositeAxis(n,t[o])||e.within(n)&&e.overlapsAny(i);)e.move(t[o]);if(e.within(n))return e;var c=e.intersectPercentage(n);a>c&&(r=new v(e),a=c),e=new v(s)}return r||s}(r,o);t.move(m.toCSSCompatValues(n))}function O(){}j.prototype.applyStyles=function(e,t){for(var n in t=t||this.div,e)e.hasOwnProperty(n)&&(t.style[n]=e[n])},j.prototype.formatStyle=function(e,t){return 0===e?0:e+t},_.prototype=r(j.prototype),_.prototype.constructor=_,v.prototype.move=function(e,t){switch(t=void 0!==t?t:this.lineHeight,e){case"+x":this.left+=t,this.right+=t;break;case"-x":this.left-=t,this.right-=t;break;case"+y":this.top+=t,this.bottom+=t;break;case"-y":this.top-=t,this.bottom-=t}},v.prototype.overlaps=function(e){return this.left<e.right&&this.right>e.left&&this.top<e.bottom&&this.bottom>e.top},v.prototype.overlapsAny=function(e){for(var t=0;t<e.length;t++)if(this.overlaps(e[t]))return!0;return!1},v.prototype.within=function(e){return this.top>=e.top&&this.bottom<=e.bottom&&this.left>=e.left&&this.right<=e.right},v.prototype.overlapsOppositeAxis=function(e,t){switch(t){case"+x":return this.left<e.left;case"-x":return this.right>e.right;case"+y":return this.top<e.top;case"-y":return this.bottom>e.bottom}},v.prototype.intersectPercentage=function(e){return Math.max(0,Math.min(this.right,e.right)-Math.max(this.left,e.left))*Math.max(0,Math.min(this.bottom,e.bottom)-Math.max(this.top,e.top))/(this.height*this.width)},v.prototype.toCSSCompatValues=function(e){return{top:this.top-e.top,bottom:e.bottom-this.bottom,left:this.left-e.left,right:e.right-this.right,height:this.height,width:this.width}},v.getSimpleBoxPosition=function(e){var t=e.div?e.div.offsetHeight:e.tagName?e.offsetHeight:0,n=e.div?e.div.offsetWidth:e.tagName?e.offsetWidth:0,i=e.div?e.div.offsetTop:e.tagName?e.offsetTop:0;return{left:(e=e.div?e.div.getBoundingClientRect():e.tagName?e.getBoundingClientRect():e).left,right:e.right,top:e.top||i,height:e.height||t,bottom:e.bottom||i+(e.height||t),width:e.width||n}},O.StringDecoder=function(){return{decode:function(e){if(!e)return"";if("string"!==typeof e)throw new Error("Error - expected string data.");return decodeURIComponent(encodeURIComponent(e))}}},O.convertCueToDOMTree=function(e,t){return e&&t?g(e,t):null};O.processCues=function(e,t,n){if(!e||!t||!n)return null;for(;n.firstChild;)n.removeChild(n.firstChild);var i=e.document.createElement("div");if(i.style.position="absolute",i.style.left="0",i.style.right="0",i.style.top="0",i.style.bottom="0",
vendor: 7,155 bytes, line 2
2i.style.margin="1.5%",n.appendChild(i),function(e){for(var t=0;t<e.length;t++)if(e[t].hasBeenReset||!e[t].displayState)return!0;return!1}(t)){var r=[],s=v.getSimpleBoxPosition(i),a={font:Math.round(.05*s.height*100)/100+"px sans-serif"};!function(){for(var n,o,c=0;c<t.length;c++)o=t[c],n=new _(e,o,a),i.appendChild(n.div),x(0,n,s,r),o.displayState=n.div,r.push(v.getSimpleBoxPosition(n))}()}else for(var o=0;o<t.length;o++)i.appendChild(t[o].displayState)},O.Parser=function(e,t,n){n||(n=t,t={}),t||(t={}),this.window=e,this.vttjs=t,this.state="INITIAL",this.buffer="",this.decoder=n||new TextDecoder("utf8"),this.regionList=[]},O.Parser.prototype={reportOrThrowError:function(e){if(!(e instanceof s))throw e;this.onparsingerror&&this.onparsingerror(e)},parse:function(e){var t=this;function n(){for(var e=t.buffer,n=0;n<e.length&&"\r"!==e[n]&&"\n"!==e[n];)++n;var i=e.substr(0,n);return"\r"===e[n]&&++n,"\n"===e[n]&&++n,t.buffer=e.substr(n),i}function i(e){e.match(/X-TIMESTAMP-MAP/)?c(e,(function(e,n){if("X-TIMESTAMP-MAP"===e)!function(e){var n=new o;c(e,(function(e,t){switch(e){case"MPEGT":n.integer(e+"S",t);break;case"LOCA":n.set(e+"L",a(t))}}),/[^\d]:/,/,/),t.ontimestampmap&&t.ontimestampmap({MPEGTS:n.get("MPEGTS"),LOCAL:n.get("LOCAL")})}(n)}),/=/):c(e,(function(e,n){if("Region"===e)!function(e){var n=new o;if(c(e,(function(e,t){switch(e){case"id":n.set(e,t);break;case"width":n.percent(e,t);break;case"lines":n.integer(e,t);break;case"regionanchor":case"viewportanchor":var i=t.split(",");if(2!==i.length)break;var r=new o;if(r.percent("x",i[0]),r.percent("y",i[1]),!r.has("x")||!r.has("y"))break;n.set(e+"X",r.get("x")),n.set(e+"Y",r.get("y"));break;case"scroll":n.alt(e,t,["up"])}}),/=/,/\s/),n.has("id")){var i=new(t.vttjs.VTTRegion||t.window.VTTRegion);i.width=n.get("width",100),i.lines=n.get("lines",3),i.regionAnchorX=n.get("regionanchorX",0),i.regionAnchorY=n.get("regionanchorY",100),i.viewportAnchorX=n.get("viewportanchorX",0),i.viewportAnchorY=n.get("viewportanchorY",100),i.scroll=n.get("scroll",""),t.onregion&&t.onregion(i),t.regionList.push({id:n.get("id"),region:i})}}(n)}),/:/)}e&&(t.buffer+=t.decoder.decode(e,{stream:!0}));try{var r;if("INITIAL"===t.state){if(!/\r\n|\n/.test(t.buffer))return this;var d=(r=n()).match(/^WEBVTT([ \t].*)?$/);if(!d||!d[0])throw new s(s.Errors.BadSignature);t.state="HEADER"}for(var u=!1;t.buffer;){if(!/\r\n|\n/.test(t.buffer))return this;switch(u?u=!1:r=n(),t.state){case"HEADER":/:/.test(r)?i(r):r||(t.state="ID");continue;case"NOTE":r||(t.state="ID");continue;case"ID":if(/^NOTE($|[ \t])/.test(r)){t.state="NOTE";break}if(!r)continue;t.cue=new(t.vttjs.VTTCue||t.window.VTTCue)(0,0,"");try{t.cue.align="center"}catch(p){t.cue.align="middle"}if(t.state="CUE",-1===r.indexOf("--\x3e")){t.cue.id=r;continue}case"CUE":try{l(r,t.cue,t.regionList)}catch(p){t.reportOrThrowError(p),t.cue=null,t.state="BADCUE";continue}t.state="CUETEXT";continue;case"CUETEXT":var h=-1!==r.indexOf("--\x3e");if(!r||h&&(u=!0)){t.oncue&&t.oncue(t.cue),t.cue=null,t.state="ID";continue}t.cue.text&&(t.cue.text+="\n"),t.cue.text+=r.replace(/\u2028/g,"\n").replace(/u2029/g,"\n");continue;case"BADCUE":r||(t.state="ID");continue}}}catch(p){t.reportOrThrowError(p),"CUETEXT"===t.state&&t.cue&&t.oncue&&t.oncue(t.cue),t.cue=null,t.state="INITIAL"===t.state?"BADWEBVTT":"BADCUE"}return this},flush:function(){var e=this;try{if(e.buffer+=e.decoder.decode(),(e.cue||"HEADER"===e.state)&&(e.buffer+="\n\n",e.parse()),"INITIAL"===e.state)throw new s(s.Errors.BadSignature)}catch(t){e.reportOrThrowError(t)}return e.onflush&&e.onflush(),this}},e.exports=O},299:function(e,t){var n={"":1,lr:1,rl:1},i={start:1,center:1,end:1,left:1,right:1,auto:1,"line-left":1,"line-right":1};function r(e){return"string"===typeof e&&(!!i[e.toLowerCase()]&&e.toLowerCase())}function s(e,t,i){this.hasBeenReset=!1;var s="",a=!1,o=e,c=t,l=i,d=null,u="",h=!0,p="auto",m="start",g="auto",f="auto",b=100,y="center";Object.defineProperties(this,{id:{enumerable:!0,get:function(){return s},set:function(e){s=""+e}},pauseOnExit:{enumerable:!0,get:function(){return a},set:function(e){a=!!e}},startTime:{enumerable:!0,get:function(){return o},set:function(e){if("number"!==typeof e)throw new TypeError("Start time must be set to a number.");o=e,this.hasBeenReset=!0}},endTime:{enumerable:!0,get:function(){return c},set:function(e){if("number"!==typeof e)throw new TypeError("End time must be set to a number.");c=e,this.hasBeenReset=!0}},text:{enumerable:!0,get:function(){return l},set:function(e){l=""+e,this.hasBeenReset=!0}},region:{enumerable:!0,get:function(){return d},set:function(e){d=e,this.hasBeenReset=!0}},vertical:{enumerable:!0,get:function(){return u},set:function(e){var t=function(e){return"string"===typeof e&&!!n[e.toLowerCase()]&&e.toLowerCase()}(e);if(!1===t)throw new SyntaxError("Vertical: an invalid or illegal direction string was specified.");u=t,this.hasBeenReset=!0}},snapToLines:{enumerable:!0,get:function(){return h},set:function(e){h=!!e,this.hasBeenReset=!0}},line:{enumerable:!0,get:function(){return p},set:function(e){if("number"!==typeof e&&"auto"!==e)throw new SyntaxError("Line: an invalid number or illegal string was specified.");p=e,this.hasBeenReset=!0}},lineAlign:{enumerable:!0,get:function(){return m},set:function(e){var t=r(e);t?(m=t,this.hasBeenReset=!0):console.warn("lineAlign: an invalid or illegal string was specified.")}},position:{enumerable:!0,get:function(){return g},set:function(e){if(e<0||e>100)throw new Error("Position must be between 0 and 100.");g=e,this.hasBeenReset=!0}},positionAlign:{enumerable:!0,get:function(){return f},set:function(e){var t=r(e);t?(f=t,this.hasBeenReset=!0):console.warn("positionAlign: an invalid or illegal string was specified.")}},size:{enumerable:!0,get:function(){return b},set:function(e){if(e<0||e>100)throw new Error("Size must be between 0 and 100.");b=e,this.hasBeenReset=!0}},align:{enumerable:!0,get:function(){return y},set:function(e){var t=r(e);if(!t)throw new SyntaxError("align: an invalid or illegal alignment string was specified.");y=t,this.hasBeenReset=!0}}}),this.displayState=void 0}s.prototype.getCueAsHTML=function(){return WebVTT.convertCueToDOMTree(window,this.text)},e.exports=s},300:function(e,t){var n={"":!0,up:!0};function i(e){return"number"===typeof e&&e>=0&&e<=100}e.exports=function(){var e=100,t=3,r=0,s=100,a=0,o=100,c="";Object.defineProperties(this,{width:{enumerable:!0,get:function(){return e},set:function(t){if(!i(t))throw new Error("Width must be between 0 and 100.");e=t}},lines:{enumerable:!0,get:function(){return t},set:function(e){if("number"!==typeof e)throw new TypeError("Lines must be set to a number.");t=e}},regionAnchorY:{enumerable:!0,get:function(){return s},set:function(e){if(!i(e))throw new Error("RegionAnchorX must be between 0 and 100.");s=e}},regionAnchorX:{enumerable:!0,get:function(){return r},set:function(e){if(!i(e))throw new Error("RegionAnchorY must be between 0 and 100.");r=e}},viewportAnchorY:{enumerable:!0,get:function(){return o},set:function(e){if(!i(e))throw new Error("ViewportAnchorY must be between 0 and 100.");o=e}},viewportAnchorX:{enumerable:!0,get:function(){return a}
2,set:function(e){if(!i(e))throw new Error("ViewportAnchorX must be between 0 and 100.");a=e}},scroll:{enumerable:!0,get:function(){return c},set:function(e){var t=function(e){return"string"===typeof e&&!!n[e.toLowerCase()]&&e.toLowerCase()}(e);!1===t?console.warn("Scroll: an invalid or illegal string was specified."):c=t}}})}},301:function(e,t,n){"use strict";var i=n(194),r=n.n(i),s="https://example.com";t.a=function(e,t){if(/^[a-z]+:/i.test(t))return t;/^data:/.test(e)&&(e=r.a.location&&r.a.location.href||"");var n=/^\/\//.test(e),i=!r.a.location&&!/\/\//i.test(e);e=new r.a.URL(e,r.a.location||s);var a=new URL(t,e);return i?a.href.slice(19):n?a.href.slice(a.protocol.length):a.href}},302:function(e,t,n){"use strict";(function(e){n.d(t,"a",(function(){return a}));var i=n(194),r=n.n(i),s=function(t){return r.a.atob?r.a.atob(t):e.from(t,"base64").toString("binary")};function a(e){for(var t=s(e),n=new Uint8Array(t.length),i=0;i<t.length;i++)n[i]=t.charCodeAt(i);return n}}).call(this,n(251).Buffer)},303:function(e,t,n){"use strict";t.byteLength=function(e){var t=c(e),n=t[0],i=t[1];return 3*(n+i)/4-i},t.toByteArray=function(e){var t,n,i=c(e),a=i[0],o=i[1],l=new s(function(e,t,n){return 3*(t+n)/4-n}(0,a,o)),d=0,u=o>0?a-4:a;for(n=0;n<u;n+=4)t=r[e.charCodeAt(n)]<<18|r[e.charCodeAt(n+1)]<<12|r[e.charCodeAt(n+2)]<<6|r[e.charCodeAt(n+3)],l[d++]=t>>16&255,l[d++]=t>>8&255,l[d++]=255&t;2===o&&(t=r[e.charCodeAt(n)]<<2|r[e.charCodeAt(n+1)]>>4,l[d++]=255&t);1===o&&(t=r[e.charCodeAt(n)]<<10|r[e.charCodeAt(n+1)]<<4|r[e.charCodeAt(n+2)]>>2,l[d++]=t>>8&255,l[d++]=255&t);return l},t.fromByteArray=function(e){for(var t,n=e.length,r=n%3,s=[],a=16383,o=0,c=n-r;o<c;o+=a)s.push(l(e,o,o+a>c?c:o+a));1===r?(t=e[n-1],s.push(i[t>>2]+i[t<<4&63]+"==")):2===r&&(t=(e[n-2]<<8)+e[n-1],s.push(i[t>>10]+i[t>>4&63]+i[t<<2&63]+"="));return s.join("")};for(var i=[],r=[],s="undefined"!==typeof Uint8Array?Uint8Array:Array,a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",o=0;o<64;++o)i[o]=a[o],r[a.charCodeAt(o)]=o;function c(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var n=e.indexOf("=");return-1===n&&(n=t),[n,n===t?0:4-n%4]}function l(e,t,n){for(var r,s,a=[],o=t;o<n;o+=3)r=(e[o]<<16&16711680)+(e[o+1]<<8&65280)+(255&e[o+2]),a.push(i[(s=r)>>18&63]+i[s>>12&63]+i[s>>6&63]+i[63&s]);return a.join("")}r["-".charCodeAt(0)]=62,r["_".charCodeAt(0)]=63},304:function(e,t){t.read=function(e,t,n,i,r){var s,a,o=8*r-i-1,c=(1<<o)-1,l=c>>1,d=-7,u=n?r-1:0,h=n?-1:1,p=e[t+u];for(u+=h,s=p&(1<<-d)-1,p>>=-d,d+=o;d>0;s=256*s+e[t+u],u+=h,d-=8);for(a=s&(1<<-d)-1,s>>=-d,d+=i;d>0;a=256*a+e[t+u],u+=h,d-=8);if(0===s)s=1-l;else{if(s===c)return a?NaN:1/0*(p?-1:1);a+=Math.pow(2,i),s-=l}return(p?-1:1)*a*Math.pow(2,s-i)},t.write=function(e,t,n,i,r,s){var a,o,c,l=8*s-r-1,d=(1<<l)-1,u=d>>1,h=23===r?Math.pow(2,-24)-Math.pow(2,-77):0,p=i?0:s-1,m=i?1:-1,g=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(o=isNaN(t)?1:0,a=d):(a=Math.floor(Math.log(t)/Math.LN2),t*(c=Math.pow(2,-a))<1&&(a--,c*=2),(t+=a+u>=1?h/c:h*Math.pow(2,1-u))*c>=2&&(a++,c/=2),a+u>=d?(o=0,a=d):a+u>=1?(o=(t*c-1)*Math.pow(2,r),a+=u):(o=t*Math.pow(2,u-1)*Math.pow(2,r),a=0));r>=8;e[n+p]=255&o,p+=m,o/=256,r-=8);for(a=a<<r|o,l+=r;l>0;e[n+p]=255&a,p+=m,a/=256,l-=8);e[n+p-m]|=128*g}},305:function(e,t){var n={}.toString;e.exports=Array.isArray||function(e){return"[object Array]"==n.call(e)}},306:function(e,t,n){"use strict";n.d(t,"i",(function(){return c})),n.d(t,"h",(function(){return l})),n.d(t,"d",(function(){return d})),n.d(t,"f",(function(){return u})),n.d(t,"e",(function(){return h})),n.d(t,"c",(function(){return p})),n.d(t,"g",(function(){return m})),n.d(t,"a",(function(){return g})),n.d(t,"b",(function(){return f}));var i=n(194),r=n.n(i),s={mp4:/^(av0?1|avc0?[1234]|vp0?9|flac|opus|mp3|mp4a|mp4v|stpp.ttml.im1t)/,webm:/^(vp0?[89]|av0?1|opus|vorbis)/,ogg:/^(vp0?[89]|theora|flac|opus|vorbis)/,video:/^(av0?1|avc0?[1234]|vp0?[89]|hvc1|hev1|theora|mp4v)/,audio:/^(mp4a|flac|vorbis|opus|ac-[34]|ec-3|alac|mp3|speex|aac)/,text:/^(stpp.ttml.im1t)/,muxerVideo:/^(avc0?1)/,muxerAudio:/^(mp4a)/,muxerText:/a^/},a=["video","audio","text"],o=["Video","Audio","Text"],c=function(e){return e?e.replace(/avc1\.(\d+)\.(\d+)/i,(function(e,t,n){return"avc1."+("00"+Number(t).toString(16)).slice(-2)+"00"+("00"+Number(n).toString(16)).slice(-2)})):e},l=function(e){void 0===e&&(e="");var t=e.split(","),n=[];return t.forEach((function(e){var t;e=e.trim(),a.forEach((function(i){var r=s[i].exec(e.toLowerCase());if(r&&!(r.length<=1)){t=i;var a=e.substring(0,r[1].length),o=e.replace(a,"");
2n.push({type:a,details:o,mediaType:i})}})),t||n.push({type:e,details:"",mediaType:"unknown"})})),n},d=function(e,t){if(!e.mediaGroups.AUDIO||!t)return null;var n=e.mediaGroups.AUDIO[t];if(!n)return null;for(var i in n){var r=n[i];if(r.default&&r.playlists)return l(r.playlists[0].attributes.CODECS)}return null},u=function(e){return void 0===e&&(e=""),s.audio.test(e.trim().toLowerCase())},h=function(e){if(e&&"string"===typeof e){var t,n=e.toLowerCase().split(",").map((function(e){return c(e.trim())})),i="video";1===n.length&&u(n[0])?i="audio":1===n.length&&(void 0===(t=n[0])&&(t=""),s.text.test(t.trim().toLowerCase()))&&(i="application");var r="mp4";return n.every((function(e){return s.mp4.test(e)}))?r="mp4":n.every((function(e){return s.webm.test(e)}))?r="webm":n.every((function(e){return s.ogg.test(e)}))&&(r="ogg"),i+"/"+r+';codecs="'+e+'"'}},p=function(e,t){return void 0===e&&(e=""),void 0===t&&(t=!1),r.a.MediaSource&&r.a.MediaSource.isTypeSupported&&r.a.MediaSource.isTypeSupported(h(e))||t&&r.a.ManagedMediaSource&&r.a.ManagedMediaSource.isTypeSupported&&r.a.ManagedMediaSource.isTypeSupported(h(e))||!1},m=function(e){return void 0===e&&(e=""),e.toLowerCase().split(",").every((function(e){e=e.trim();for(var t=0;t<o.length;t++){if(s["muxer"+o[t]].test(e))return!0}return!1}))},g="mp4a.40.2",f="avc1.4d400d"},307:function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));var i=/^(audio|video|application)\/(x-|vnd\.apple\.)?mpegurl/i,r=/^application\/dash\+xml/i,s=function(e){return i.test(e)?"hls":r.test(e)?"dash":"application/vnd.videojs.vhs+json"===e?"vhs-json":null}},308:function(e,t,n){!function(t){var n=/^(?=((?:[a-zA-Z0-9+\-.]+:)?))\1(?=((?:\/\/[^\/?#]*)?))\2(?=((?:(?:[^?#\/]*\/)*[^;?#\/]*)?))\3((?:;[^?#]*)?)(\?[^#]*)?(#[^]*)?$/,i=/^(?=([^\/?#]*))\1([^]*)$/,r=/(?:\/|^)\.(?=\/)/g,s=/(?:\/|^)\.\.\/(?!\.\.\/)[^\/]*(?=\/)/g,a={buildAbsoluteURL:function(e,t,n){if(n=n||{},e=e.trim(),!(t=t.trim())){if(!n.alwaysNormalize)return e;var r=a.parseURL(e);if(!r)throw new Error("Error trying to parse base URL.");return r.path=a.normalizePath(r.path),a.buildURLFromParts(r)}var s=a.parseURL(t);if(!s)throw new Error("Error trying to parse relative URL.");if(s.scheme)return n.alwaysNormalize?(s.path=a.normalizePath(s.path),a.buildURLFromParts(s)):t;var o=a.parseURL(e);if(!o)throw new Error("Error trying to parse base URL.");if(!o.netLoc&&o.path&&"/"!==o.path[0]){var c=i.exec(o.path);o.netLoc=c[1],o.path=c[2]}o.netLoc&&!o.path&&(o.path="/");var l={scheme:o.scheme,netLoc:s.netLoc,path:null,params:s.params,query:s.query,fragment:s.fragment};if(!s.netLoc&&(l.netLoc=o.netLoc,"/"!==s.path[0]))if(s.path){var d=o.path,u=d.substring(0,d.lastIndexOf("/")+1)+s.path;l.path=a.normalizePath(u)}else l.path=o.path,s.params||(l.params=o.params,s.query||(l.query=o.query));return null===l.path&&(l.path=n.alwaysNormalize?a.normalizePath(s.path):s.path),a.buildURLFromParts(l)},parseURL:function(e){var t=n.exec(e);return t?{scheme:t[1]||"",netLoc:t[2]||"",path:t[3]||"",params:t[4]||"",query:t[5]||"",fragment:t[6]||""}:null},normalizePath:function(e){for(e=e.split("").reverse().join("").replace(r,"");e.length!==(e=e.replace(s,"")).length;);return e.split("").reverse().join("")},buildURLFromParts:function(e){return e.scheme+e.netLoc+e.path+e.params+e.query+e.fragment}};e.exports=a}()},309:function(e,t,n){"use strict";(function(e){n.d(t,"a",(function(){return a}));var i=n(194),r=n.n(i),s=function(t){return r.a.atob?r.a.atob(t):e.from(t,"base64").toString("binary")};function a(e){for(var t=s(e),n=new Uint8Array(t.length),i=0;i<t.length;i++)n[i]=t.charCodeAt(i);return n}}).call(this,n(251).Buffer)},310:function(e,t,n){var i=n(252);t.DOMImplementation=i.DOMImplementation,t.XMLSerializer=i.XMLSerializer,t.DOMParser=n(311).DOMParser},311:function(e,t,n){var i=n(210),r=n(252),s=n(312),a=n(313),o=r.DOMImplementation,c=i.NAMESPACE,l=a.ParseError,d=a.XMLReader;function u(e){return e.replace(/\r[\n\u0085]/g,"\n").replace(/[\r\u0085\u2028]/g,"\n")}function h(e){this.options=e||{locator:{}}}function p(){this.cdata=!1}function m(e,t){t.lineNumber=e.lineNumber,t.columnNumber=e.columnNumber}function g(e){if(e)return"\n@"+(e.systemId||"")+"#[line:"+e.lineNumber+",col:"+e.columnNumber+"]"}function f(e,t,n){return"string"==typeof e?e.substr(t,n):e.length>
vendor: 6,610 bytes, line 2
2=t+n||t?new java.lang.String(e,t,n)+"":e}function b(e,t){e.currentElement?e.currentElement.appendChild(t):e.doc.appendChild(t)}h.prototype.parseFromString=function(e,t){var n=this.options,i=new d,r=n.domBuilder||new p,a=n.errorHandler,o=n.locator,l=n.xmlns||{},h=/\/x?html?$/.test(t),m=h?s.HTML_ENTITIES:s.XML_ENTITIES;o&&r.setDocumentLocator(o),i.errorHandler=function(e,t,n){if(!e){if(t instanceof p)return t;e=t}var i={},r=e instanceof Function;function s(t){var s=e[t];!s&&r&&(s=2==e.length?function(n){e(t,n)}:e),i[t]=s&&function(e){s("[xmldom "+t+"]\t"+e+g(n))}||function(){}}return n=n||{},s("warning"),s("error"),s("fatalError"),i}(a,r,o),i.domBuilder=n.domBuilder||r,h&&(l[""]=c.HTML),l.xml=l.xml||c.XML;var f=n.normalizeLineEndings||u;return e&&"string"===typeof e?i.parse(f(e),l,m):i.errorHandler.error("invalid doc source"),r.doc},p.prototype={startDocument:function(){this.doc=(new o).createDocument(null,null,null),this.locator&&(this.doc.documentURI=this.locator.systemId)},startElement:function(e,t,n,i){var r=this.doc,s=r.createElementNS(e,n||t),a=i.length;b(this,s),this.currentElement=s,this.locator&&m(this.locator,s);for(var o=0;o<a;o++){e=i.getURI(o);var c=i.getValue(o),l=(n=i.getQName(o),r.createAttributeNS(e,n));this.locator&&m(i.getLocator(o),l),l.value=l.nodeValue=c,s.setAttributeNode(l)}},endElement:function(e,t,n){var i=this.currentElement;i.tagName;this.currentElement=i.parentNode},startPrefixMapping:function(e,t){},endPrefixMapping:function(e){},processingInstruction:function(e,t){var n=this.doc.createProcessingInstruction(e,t);this.locator&&m(this.locator,n),b(this,n)},ignorableWhitespace:function(e,t,n){},characters:function(e,t,n){if(e=f.apply(this,arguments)){if(this.cdata)var i=this.doc.createCDATASection(e);else i=this.doc.createTextNode(e);this.currentElement?this.currentElement.appendChild(i):/^\s*$/.test(e)&&this.doc.appendChild(i),this.locator&&m(this.locator,i)}},skippedEntity:function(e){},endDocument:function(){this.doc.normalize()},setDocumentLocator:function(e){(this.locator=e)&&(e.lineNumber=0)},comment:function(e,t,n){e=f.apply(this,arguments);var i=this.doc.createComment(e);this.locator&&m(this.locator,i),b(this,i)},startCDATA:function(){this.cdata=!0},endCDATA:function(){this.cdata=!1},startDTD:function(e,t,n){var i=this.doc.implementation;if(i&&i.createDocumentType){var r=i.createDocumentType(e,t,n);this.locator&&m(this.locator,r),b(this,r),this.doc.doctype=r}},warning:function(e){console.warn("[xmldom warning]\t"+e,g(this.locator))},error:function(e){console.error("[xmldom error]\t"+e,g(this.locator))},fatalError:function(e){throw new l(e,this.locator)}},"endDTD,startEntity,endEntity,attributeDecl,elementDecl,externalEntityDecl,internalEntityDecl,resolveEntity,getExternalSubset,notationDecl,unparsedEntityDecl".replace(/\w+/g,(function(e){p.prototype[e]=function(){return null}})),t.__DOMHandler=p,t.normalizeLineEndings=u,t.DOMParser=h},312:function(e,t,n){"use strict";var i=n(210).freeze;t.XML_ENTITIES=i({amp:"&",apos:"'",gt:">",lt:"<",quot:'"'}),t.HTML_ENTITIES=i({Aacute:"\xc1",aacute:"\xe1",Abreve:"\u0102",abreve:"\u0103",ac:"\u223e",acd:"\u223f",acE:"\u223e\u0333",Acirc:"\xc2",acirc:"\xe2",acute:"\xb4",Acy:"\u0410",acy:"\u0430",AElig:"\xc6",aelig:"\xe6",af:"\u2061",Afr:"\ud835\udd04",afr:"\ud835\udd1e",Agrave:"\xc0",agrave:"\xe0",alefsym:"\u2135",aleph:"\u2135",Alpha:"\u0391",alpha:"\u03b1",Amacr:"\u0100",amacr:"\u0101",amalg:"\u2a3f",AMP:"&",amp:"&",And:"\u2a53",and:"\u2227",andand:"\u2a55",andd:"\u2a5c",andslope:"\u2a58",andv:"\u2a5a",ang:"\u2220",ange:"\u29a4",angle:"\u2220",angmsd:"\u2221",angmsdaa:"\u29a8",angmsdab:"\u29a9",angmsdac:"\u29aa",angmsdad:"\u29ab",angmsdae:"\u29ac",angmsdaf:"\u29ad",angmsdag:"\u29ae",angmsdah:"\u29af",angrt:"\u221f",angrtvb:"\u22be",angrtvbd:"\u299d",angsph:"\u2222",angst:"\xc5",angzarr:"\u237c",Aogon:"\u0104",aogon:"\u0105",Aopf:"\ud835\udd38",aopf:"\ud835\udd52",ap:"\u2248",apacir:"\u2a6f",apE:"\u2a70",ape:"\u224a",apid:"\u224b",apos:"'",ApplyFunction:"\u2061",approx:"\u2248",approxeq:"\u224a",Aring:"\xc5",aring:"\xe5",Ascr:"\ud835\udc9c",ascr:"\ud835\udcb6",Assign:"\u2254",ast:"*",asymp:"\u2248",asympeq:"\u224d",Atilde:"\xc3",atilde:"\xe3",Auml:"\xc4",auml:"\xe4",awconint:"\u2233",awint:"\u2a11",backcong:"\u224c",backepsilon:"\u03f6",backprime:"\u2035",backsim:"\u223d",backsimeq:"\u22cd",Backslash:"\u2216",Barv:"\u2ae7",barvee:"\u22bd",Barwed:"\u2306",barwed:"\u2305",barwedge:"\u2305",bbrk:"\u23b5",bbrktbrk:"\u23b6",bcong:"\u224c",Bcy:"\u0411",bcy:"\u0431",bdquo:"\u201e",becaus:"\u2235",Because:"\u2235",because:"\u2235",bemptyv:"\u29b0",bepsi:"\u03f6",bernou:"\u212c",Bernoullis:"\u212c",Beta:"\u0392",beta:"\u03b2",beth:"\u2136",between:"\u226c",Bfr:"\ud835\udd05",bfr:"\ud835\udd1f",bigcap:"\u22c2",bigcirc:"\u25ef",bigcup:"\u22c3",bigodot:"\u2a00",bigoplus:"\u2a01",bigotimes:"\u2a02",bigsqcup:"\u2a06",bigstar:"\u2605",bigtriangledown:"\u25bd",bigtriangleup:"\u25b3",biguplus:"\u2a04",bigvee:"\u22c1",bigwedge:"\u22c0",bkarow:"\u290d",blacklozenge:"\u29eb",blacksquare:"\u25aa",blacktriangle:"\u25b4",blacktriangledown:"\u25be",blacktriangleleft:"\u25c2",blacktriangleright:"\u25b8",blank:"\u2423",blk12:"\u2592",blk14:"\u2591",blk34:"\u2593",block:"\u2588",bne:"=\u20e5",bnequiv:"\u2261\u20e5",bNot:"\u2aed",bnot:"\u2310",Bopf:"\ud835\udd39",bopf:"\ud835\udd53",bot:"\u22a5",bottom:"\u22a5",bowtie:"\u22c8",boxbox:"\u29c9",boxDL:"\u2557",boxDl:"\u2556",boxdL:"\u2555",boxdl:"\u2510",boxDR:"\u2554",boxDr:"\u2553",boxdR:"\u2552",boxdr:"\u250c",boxH:"\u2550",boxh:"\u2500",boxHD:"\u2566",boxHd:"\u2564",boxhD:"\u2565",boxhd:"\u252c",boxHU:"\u2569",boxHu:"\u2567",boxhU:"\u2568",boxhu:"\u2534",boxminus:"\u229f",boxplus:"\u229e",boxtimes:"\u22a0",boxUL:"\u255d",boxUl:"\u255c",boxuL:"\u255b",boxul:"\u2518",boxUR:"\u255a",boxUr:"\u2559",boxuR:"\u2558",boxur:"\u2514",boxV:"\u2551",boxv:"\u2502",boxVH:"\u256c",boxVh:"\u256b",boxvH:"\u256a",boxvh:"\u253c",boxVL:"\u2563",boxVl:"\u2562",boxvL:"\u2561",boxvl:"\u2524",boxVR:"\u2560",boxVr:"\u255f",boxvR:"\u255e",boxvr:"\u251c",bprime:"\u2035",Breve:"\u02d8",breve:"\u02d8",brvbar:"\xa6",Bscr:"\u212c",bscr:"\ud835\udcb7",bsemi:"\u204f",bsim:"\u223d",bsime:"\u22cd",bsol:"\\",bsolb:"\u29c5",bsolhsub:"\u27c8",bull:"\u2022",bullet:"\u2022",bump:"\u224e",bumpE:"\u2aae",bumpe:"\u224f",Bumpeq:"\u224e",bumpeq:"\u224f",Cacute:"\u0106",cacute:"\u0107",Cap:"\u22d2",cap:"\u2229",capand:"\u2a44",capbrcup:"\u2a49",capcap:"\u2a4b",capcup:"\u2a47",capdot:"\u2a40",CapitalDifferentialD:"\u2145",caps:"\u2229\ufe00",caret:"\u2041",caron:"\u02c7",Cayleys:"\u212d",ccaps:"\u2a4d",Ccaron:"\u010c",ccaron:"\u010d",Ccedil
2:"\xc7",ccedil:"\xe7",Ccirc:"\u0108",ccirc:"\u0109",Cconint:"\u2230",ccups:"\u2a4c",ccupssm:"\u2a50",Cdot:"\u010a",cdot:"\u010b",cedil:"\xb8",Cedilla:"\xb8",cemptyv:"\u29b2",cent:"\xa2",CenterDot:"\xb7",centerdot:"\xb7",Cfr:"\u212d",cfr:"\ud835\udd20",CHcy:"\u0427",chcy:"\u0447",check:"\u2713",checkmark:"\u2713",Chi:"\u03a7",chi:"\u03c7",cir:"\u25cb",circ:"\u02c6",circeq:"\u2257",circlearrowleft:"\u21ba",circlearrowright:"\u21bb",circledast:"\u229b",circledcirc:"\u229a",circleddash:"\u229d",CircleDot:"\u2299",circledR:"\xae",circledS:"\u24c8",CircleMinus:"\u2296",CirclePlus:"\u2295",CircleTimes:"\u2297",cirE:"\u29c3",cire:"\u2257",cirfnint:"\u2a10",cirmid:"\u2aef",cirscir:"\u29c2",ClockwiseContourIntegral:"\u2232",CloseCurlyDoubleQuote:"\u201d",CloseCurlyQuote:"\u2019",clubs:"\u2663",clubsuit:"\u2663",Colon:"\u2237",colon:":",Colone:"\u2a74",colone:"\u2254",coloneq:"\u2254",comma:",",commat:"@",comp:"\u2201",compfn:"\u2218",complement:"\u2201",complexes:"\u2102",cong:"\u2245",congdot:"\u2a6d",Congruent:"\u2261",Conint:"\u222f",conint:"\u222e",ContourIntegral:"\u222e",Copf:"\u2102",copf:"\ud835\udd54",coprod:"\u2210",Coproduct:"\u2210",COPY:"\xa9",copy:"\xa9",copysr:"\u2117",CounterClockwiseContourIntegral:"\u2233",crarr:"\u21b5",Cross:"\u2a2f",cross:"\u2717",Cscr:"\ud835\udc9e",cscr:"\ud835\udcb8",csub:"\u2acf",csube:"\u2ad1",csup:"\u2ad0",csupe:"\u2ad2",ctdot:"\u22ef",cudarrl:"\u2938",cudarrr:"\u2935",cuepr:"\u22de",cuesc:"\u22df",cularr:"\u21b6",cularrp:"\u293d",Cup:"\u22d3",cup:"\u222a",cupbrcap:"\u2a48",CupCap:"\u224d",cupcap:"\u2a46",cupcup:"\u2a4a",cupdot:"\u228d",cupor:"\u2a45",cups:"\u222a\ufe00",curarr:"\u21b7",curarrm:"\u293c",curlyeqprec:"\u22de",curlyeqsucc:"\u22df",curlyvee:"\u22ce",curlywedge:"\u22cf",curren:"\xa4",curvearrowleft:"\u21b6",curvearrowright:"\u21b7",cuvee:"\u22ce",cuwed:"\u22cf",cwconint:"\u2232",cwint:"\u2231",cylcty:"\u232d",Dagger:"\u2021",dagger:"\u2020",daleth:"\u2138",Darr:"\u21a1",dArr:"\u21d3",darr:"\u2193",dash:"\u2010",Dashv:"\u2ae4",dashv:"\u22a3",dbkarow:"\u290f",dblac:"\u02dd",Dcaron:"\u010e",dcaron:"\u010f",Dcy:"\u0414",dcy:"\u0434",DD:"\u2145",dd:"\u2146",ddagger:"\u2021",ddarr:"\u21ca",DDotrahd:"\u2911",ddotseq:"\u2a77",deg:"\xb0",Del:"\u2207",Delta:"\u0394",delta:"\u03b4",demptyv:"\u29b1",dfisht:"\u297f",Dfr:"\ud835\udd07",dfr:"\ud835\udd21",dHar:"\u2965",dharl:"\u21c3",dharr:"\u21c2",DiacriticalAcute:"\xb4",DiacriticalDot:"\u02d9",DiacriticalDoubleAcute:"\u02dd",DiacriticalGrave:"`",DiacriticalTilde:"\u02dc",diam:"\u22c4",Diamond:"\u22c4",diamond:"\u22c4",diamondsuit:"\u2666",diams:"\u2666",die:"\xa8",DifferentialD:"\u2146",digamma:"\u03dd",disin:"\u22f2",div:"\xf7",divide:"\xf7",divideontimes:"\u22c7",divonx:"\u22c7",DJcy:"\u0402",djcy:"\u0452",dlcorn:"\u231e",dlcrop:"\u230d",dollar:"$",Dopf:"\ud835\udd3b",dopf:"\ud835\udd55",Dot:"\xa8",dot:"\u02d9",DotDot:"\u20dc",doteq:"\u2250",doteqdot:"\u2251",DotEqual:"\u2250",dotminus:"\u2238",dotplus:"\u2214",dotsquare:"\u22a1",doublebarwedge:"\u2306",DoubleContourIntegral:"\u222f",DoubleDot:"\xa8",DoubleDownArrow:"\u21d3",DoubleLeftArrow:"\u21d0",DoubleLeftRightArrow:"\u21d4",DoubleLeftTee:"\u2ae4",DoubleLongLeftArrow:"\u27f8",DoubleLongLeftRightArrow:"\u27fa",DoubleLongRightArrow:"\u27f9",DoubleRightArrow:"\u21d2",DoubleRightTee:"\u22a8",DoubleUpArrow:"\u21d1",DoubleUpDownArrow:"\u21d5",DoubleVerticalBar:"\u2225",DownArrow:"\u2193",Downarrow:"\u21d3",downarrow:"\u2193",DownArrowBar:"\u2913",DownArrowUpArrow:"\u21f5",DownBreve:"\u0311",downdownarrows:"\u21ca",downharpoonleft:"\u21c3",downharpoonright:"\u21c2",DownLeftRightVector:"\u2950",DownLeftTeeVector:"\u295e",DownLeftVector:"\u21bd",DownLeftVectorBar:"\u2956",DownRightTeeVector:"\u295f",DownRightVector:"\u21c1",DownRightVectorBar:"\u2957",DownTee:"\u22a4",DownTeeArrow:"\u21a7",drbkarow:"\u2910",drcorn:"\u231f",drcrop:"\u230c",Dscr:"\ud835\udc9f",dscr:"\ud835\udcb9",DScy:"\u0405",dscy:"\u0455",dsol:"\u29f6",Dstrok:"\u0110",dstrok:"\u0111",dtdot:"\u22f1",dtri:"\u25bf",dtrif:"\u25be",duarr:"\u21f5",duhar:"\u296f",dwangle:"\u29a6",DZcy:"\u040f",dzcy:"\u045f",dzigrarr:"\u27ff",Eacute:"\xc9",eacute:"\xe9",easter:"\u2a6e",Ecaron:"\u011a",ecaron:"\u011b",ecir:"\u2256",Ecirc:"\xca",ecirc:"\xea",ecolon:"\u2255",Ecy:"\u042d",ecy:"\u044d",eDDot:"\u2a77",
2Edot:"\u0116",eDot:"\u2251",edot:"\u0117",ee:"\u2147",efDot:"\u2252",Efr:"\ud835\udd08",efr:"\ud835\udd22",eg:"\u2a9a",Egrave:"\xc8",egrave:"\xe8",egs:"\u2a96",egsdot:"\u2a98",el:"\u2a99",Element:"\u2208",elinters:"\u23e7",ell:"\u2113",els:"\u2a95",elsdot:"\u2a97",Emacr:"\u0112",emacr:"\u0113",empty:"\u2205",emptyset:"\u2205",EmptySmallSquare:"\u25fb",emptyv:"\u2205",EmptyVerySmallSquare:"\u25ab",emsp:"\u2003",emsp13:"\u2004",emsp14:"\u2005",ENG:"\u014a",eng:"\u014b",ensp:"\u2002",Eogon:"\u0118",eogon:"\u0119",Eopf:"\ud835\udd3c",eopf:"\ud835\udd56",epar:"\u22d5",eparsl:"\u29e3",eplus:"\u2a71",epsi:"\u03b5",Epsilon:"\u0395",epsilon:"\u03b5",epsiv:"\u03f5",eqcirc:"\u2256",eqcolon:"\u2255",eqsim:"\u2242",eqslantgtr:"\u2a96",eqslantless:"\u2a95",Equal:"\u2a75",equals:"=",EqualTilde:"\u2242",equest:"\u225f",Equilibrium:"\u21cc",equiv:"\u2261",equivDD:"\u2a78",eqvparsl:"\u29e5",erarr:"\u2971",erDot:"\u2253",Escr:"\u2130",escr:"\u212f",esdot:"\u2250",Esim:"\u2a73",esim:"\u2242",Eta:"\u0397",eta:"\u03b7",ETH:"\xd0",eth:"\xf0",Euml:"\xcb",euml:"\xeb",euro:"\u20ac",excl:"!",exist:"\u2203",Exists:"\u2203",expectation:"\u2130",ExponentialE:"\u2147",exponentiale:"\u2147",fallingdotseq:"\u2252",Fcy:"\u0424",fcy:"\u0444",female:"\u2640",ffilig:"\ufb03",fflig:"\ufb00",ffllig:"\ufb04",Ffr:"\ud835\udd09",ffr:"\ud835\udd23",filig:"\ufb01",FilledSmallSquare:"\u25fc",FilledVerySmallSquare:"\u25aa",fjlig:"fj",flat:"\u266d",fllig:"\ufb02",fltns:"\u25b1",fnof:"\u0192",Fopf:"\ud835\udd3d",fopf:"\ud835\udd57",ForAll:"\u2200",forall:"\u2200",fork:"\u22d4",forkv:"\u2ad9",Fouriertrf:"\u2131",fpartint:"\u2a0d",frac12:"\xbd",frac13:"\u2153",frac14:"\xbc",frac15:"\u2155",frac16:"\u2159",frac18:"\u215b",frac23:"\u2154",frac25:"\u2156",frac34:"\xbe",frac35:"\u2157",frac38:"\u215c",frac45:"\u2158",frac56:"\u215a",frac58:"\u215d",frac78:"\u215e",frasl:"\u2044",frown:"\u2322",Fscr:"\u2131",fscr:"\ud835\udcbb",gacute:"\u01f5",Gamma:"\u0393",gamma:"\u03b3",Gammad:"\u03dc",gammad:"\u03dd",gap:"\u2a86",Gbreve:"\u011e",gbreve:"\u011f",Gcedil:"\u0122",Gcirc:"\u011c",gcirc:"\u011d",Gcy:"\u0413",gcy:"\u0433",Gdot:"\u0120",gdot:"\u0121",gE:"\u2267",ge:"\u2265",gEl:"\u2a8c",gel:"\u22db",geq:"\u2265",geqq:"\u2267",geqslant:"\u2a7e",ges:"\u2a7e",gescc:"\u2aa9",gesdot:"\u2a80",gesdoto:"\u2a82",gesdotol:"\u2a84",gesl:"\u22db\ufe00",gesles:"\u2a94",Gfr:"\ud835\udd0a",gfr:"\ud835\udd24",Gg:"\u22d9",gg:"\u226b",ggg:"\u22d9",gimel:"\u2137",GJcy:"\u0403",gjcy:"\u0453",gl:"\u2277",gla:"\u2aa5",glE:"\u2a92",glj:"\u2aa4",gnap:"\u2a8a",gnapprox:"\u2a8a",gnE:"\u2269",gne:"\u2a88",gneq:"\u2a88",gneqq:"\u2269",gnsim:"\u22e7",Gopf:"\ud835\udd3e",gopf:"\ud835\udd58",grave:"`",GreaterEqual:"\u2265",GreaterEqualLess:"\u22db",GreaterFullEqual:"\u2267",GreaterGreater:"\u2aa2",GreaterLess:"\u2277",GreaterSlantEqual:"\u2a7e",GreaterTilde:"\u2273",Gscr:"\ud835\udca2",gscr:"\u210a",gsim:"\u2273",gsime:"\u2a8e",gsiml:"\u2a90",Gt:"\u226b",GT:">",gt:">",gtcc:"\u2aa7",gtcir:"\u2a7a",gtdot:"\u22d7",gtlPar:"\u2995",gtquest:"\u2a7c",gtrapprox:"\u2a86",gtrarr:"\u2978",gtrdot:"\u22d7",gtreqless:"\u22db",gtreqqless:"\u2a8c",gtrless:"\u2277",gtrsim:"\u2273",gvertneqq:"\u2269\ufe00",gvnE:"\u2269\ufe00",Hacek:"\u02c7",hairsp:"\u200a",half:"\xbd",hamilt:"\u210b",HARDcy:"\u042a",hardcy:"\u044a",hArr:"\u21d4",harr:"\u2194",harrcir:"\u2948",harrw:"\u21ad",Hat:"^",hbar:"\u210f",Hcirc:"\u0124",hcirc:"\u0125",hearts:"\u2665",heartsuit:"\u2665",hellip:"\u2026",hercon:"\u22b9",Hfr:"\u210c",hfr:"\ud835\udd25",HilbertSpace:"\u210b",hksearow:"\u2925",hkswarow:"\u2926",hoarr:"\u21ff",homtht:"\u223b",hookleftarrow:"\u21a9",hookrightarrow:"\u21aa",Hopf:"\u210d",hopf:"\ud835\udd59",horbar:"\u2015",HorizontalLine:"\u2500",Hscr:"\u210b",hscr:"\ud835\udcbd",hslash:"\u210f",Hstrok:"\u0126",hstrok:"\u0127",HumpDownHump:"\u224e",HumpEqual:"\u224f",hybull:"\u2043",hyphen:"\u2010",Iacute:"\xcd",iacute:"\xed",ic:"\u2063",Icirc:"\xce",icirc:"\xee",Icy:"\u0418",icy:"\u0438",Idot:"\u0130",IEcy:"\u0415",iecy:"\u0435",iexcl:"\xa1",iff:"\u21d4",Ifr:"\u2111",ifr:"\ud835\udd26",Igrave:"\xcc",igrave:"\xec",ii:"\u2148",iiiint:"\u2a0c",iiint:"\u222d",iinfin:"\u29dc",iiota:"\u2129",IJlig:"\u0132",ijlig:"\u0133",Im:"\u2111",Imacr:"\u012a",imacr:"\u012b",image:"\u2111",ImaginaryI:"\u2148",imagline:"\u2110",imagpart:"\u2111",imath:"\u0131",imof:"\u22b7",imped:"\u01b5",Implies:"\u21d2",in:"\u2208",incare:"\u2105",infin:"\u221e",infintie:"\u29dd",inodot:"\u0131",Int:"\u222c",int:"\u222b",intcal:"\u22ba",integers:"\u2124",Integral:"\u222b",intercal:"\u22ba",Intersection:"\u22c2",intlarhk:"\u2a17",intprod:"\u2a3c",InvisibleComma:"\u2063",InvisibleTimes:"\u2062",IOcy:"\u0401",iocy:"\u0451",Iogon:"\u012e",iogon:"\u012f",Iopf:"\ud835\udd40",iopf:"\ud835\udd5a",Iota:"\u0399",iota:"\u03b9",iprod:"\u2a3c",iquest:"\xbf",Iscr:"\u2110",iscr:"\ud835\udcbe",isin:"\u2208",isindot:"\u22f5",isinE:"\u22f9",isins:"\u22f4",isinsv:"\u22f3",isinv:"\u2208",it:"\u2062",Itilde:"\u0128",itilde:"\u0129",Iukcy:"\u0406",iukcy:"\u0456",Iuml:"\xcf",iuml:"\xef",Jcirc:"\u0134",jcirc:"\u0135",Jcy:"\u0419",jcy:"\u0439",Jfr:"\ud835\udd0d",jfr:"\ud835\udd27",jmath:"\u0237",Jopf:"\ud835\udd41",jopf:"\ud835\udd5b",Jscr:"\ud835\udca5",jscr:"\ud835\udcbf",Jsercy:"\u0408",jsercy:"\u0458",Jukcy:"\u0404",jukcy:"\u0454",Kappa:"\u039a",kappa:"\u03ba",kappav:"\u03f0",Kcedil:"\u0136",kcedil
2:"\u0137",Kcy:"\u041a",kcy:"\u043a",Kfr:"\ud835\udd0e",kfr:"\ud835\udd28",kgreen:"\u0138",KHcy:"\u0425",khcy:"\u0445",KJcy:"\u040c",kjcy:"\u045c",Kopf:"\ud835\udd42",kopf:"\ud835\udd5c",Kscr:"\ud835\udca6",kscr:"\ud835\udcc0",lAarr:"\u21da",Lacute:"\u0139",lacute:"\u013a",laemptyv:"\u29b4",lagran:"\u2112",Lambda:"\u039b",lambda:"\u03bb",Lang:"\u27ea",lang:"\u27e8",langd:"\u2991",langle:"\u27e8",lap:"\u2a85",Laplacetrf:"\u2112",laquo:"\xab",Larr:"\u219e",lArr:"\u21d0",larr:"\u2190",larrb:"\u21e4",larrbfs:"\u291f",larrfs:"\u291d",larrhk:"\u21a9",larrlp:"\u21ab",larrpl:"\u2939",larrsim:"\u2973",larrtl:"\u21a2",lat:"\u2aab",lAtail:"\u291b",latail:"\u2919",late:"\u2aad",lates:"\u2aad\ufe00",lBarr:"\u290e",lbarr:"\u290c",lbbrk:"\u2772",lbrace:"{",lbrack:"[",lbrke:"\u298b",lbrksld:"\u298f",lbrkslu:"\u298d",Lcaron:"\u013d",lcaron:"\u013e",Lcedil:"\u013b",lcedil:"\u013c",lceil:"\u2308",lcub:"{",Lcy:"\u041b",lcy:"\u043b",ldca:"\u2936",ldquo:"\u201c",ldquor:"\u201e",ldrdhar:"\u2967",ldrushar:"\u294b",ldsh:"\u21b2",lE:"\u2266",le:"\u2264",LeftAngleBracket:"\u27e8",LeftArrow:"\u2190",Leftarrow:"\u21d0",leftarrow:"\u2190",LeftArrowBar:"\u21e4",LeftArrowRightArrow:"\u21c6",leftarrowtail:"\u21a2",LeftCeiling:"\u2308",LeftDoubleBracket:"\u27e6",LeftDownTeeVector:"\u2961",LeftDownVector:"\u21c3",LeftDownVectorBar:"\u2959",LeftFloor:"\u230a",leftharpoondown:"\u21bd",leftharpoonup:"\u21bc",leftleftarrows:"\u21c7",LeftRightArrow:"\u2194",Leftrightarrow:"\u21d4",leftrightarrow:"\u2194",leftrightarrows:"\u21c6",leftrightharpoons:"\u21cb",leftrightsquigarrow:"\u21ad",LeftRightVector:"\u294e",LeftTee:"\u22a3",LeftTeeArrow:"\u21a4",LeftTeeVector:"\u295a",leftthreetimes:"\u22cb",LeftTriangle:"\u22b2",LeftTriangleBar:"\u29cf",LeftTriangleEqual:"\u22b4",LeftUpDownVector:"\u2951",LeftUpTeeVector:"\u2960",LeftUpVector:"\u21bf",LeftUpVectorBar:"\u2958",LeftVector:"\u21bc",LeftVectorBar:"\u2952",lEg:"\u2a8b",leg:"\u22da",leq:"\u2264",leqq:"\u2266",leqslant:"\u2a7d",les:"\u2a7d",lescc:"\u2aa8",lesdot:"\u2a7f",lesdoto:"\u2a81",lesdotor:"\u2a83",lesg:"\u22da\ufe00",lesges:"\u2a93",lessapprox:"\u2a85",lessdot:"\u22d6",lesseqgtr:"\u22da",lesseqqgtr:"\u2a8b",LessEqualGreater:"\u22da",LessFullEqual:"\u2266",LessGreater:"\u2276",lessgtr:"\u2276",LessLess:"\u2aa1",lesssim:"\u2272",LessSlantEqual:"\u2a7d",LessTilde:"\u2272",lfisht:"\u297c",lfloor:"\u230a",Lfr:"\ud835\udd0f",lfr:"\ud835\udd29",lg:"\u2276",lgE:"\u2a91",lHar:"\u2962",lhard:"\u21bd",lharu:"\u21bc",lharul:"\u296a",lhblk:"\u2584",LJcy:"\u0409",ljcy:"\u0459",Ll:"\u22d8",ll:"\u226a",llarr:"\u21c7",llc
2orner:"\u231e",Lleftarrow:"\u21da",llhard:"\u296b",lltri:"\u25fa",Lmidot:"\u013f",lmidot:"\u0140",lmoust:"\u23b0",lmoustache:"\u23b0",lnap:"\u2a89",lnapprox:"\u2a89",lnE:"\u2268",lne:"\u2a87",lneq:"\u2a87",lneqq:"\u2268",lnsim:"\u22e6",loang:"\u27ec",loarr:"\u21fd",lobrk:"\u27e6",LongLeftArrow:"\u27f5",Longleftarrow:"\u27f8",longleftarrow:"\u27f5",LongLeftRightArrow:"\u27f7",Longleftrightarrow:"\u27fa",longleftrightarrow:"\u27f7",longmapsto:"\u27fc",LongRightArrow:"\u27f6",Longrightarrow:"\u27f9",longrightarrow:"\u27f6",looparrowleft:"\u21ab",looparrowright:"\u21ac",lopar:"\u2985",Lopf:"\ud835\udd43",lopf:"\ud835\udd5d",loplus:"\u2a2d",lotimes:"\u2a34",lowast:"\u2217",lowbar:"_",LowerLeftArrow:"\u2199",LowerRightArrow:"\u2198",loz:"\u25ca",lozenge:"\u25ca",lozf:"\u29eb",lpar:"(",lparlt:"\u2993",lrarr:"\u21c6",lrcorner:"\u231f",lrhar:"\u21cb",lrhard:"\u296d",lrm:"\u200e",lrtri:"\u22bf",lsaquo:"\u2039",Lscr:"\u2112",lscr:"\ud835\udcc1",Lsh:"\u21b0",lsh:"\u21b0",lsim:"\u2272",lsime:"\u2a8d",lsimg:"\u2a8f",lsqb:"[",lsquo:"\u2018",lsquor:"\u201a",Lstrok:"\u0141",lstrok:"\u0142",Lt:"\u226a",LT:"<",lt:"<",ltcc:"\u2aa6",ltcir:"\u2a79",ltdot:"\u22d6",lthree:"\u22cb",ltimes:"\u22c9",ltlarr:"\u2976",ltquest:"\u2a7b",ltri:"\u25c3",ltrie:"\u22b4",ltrif:"\u25c2",ltrPar:"\u2996",lurdshar:"\u294a",luruhar:"\u2966",lvertneqq:"\u2268\ufe00",lvnE:"\u2268\ufe00",macr:"\xaf",male:"\u2642",malt:"\u2720",maltese:"\u2720",Map:"\u2905",map:"\u21a6",mapsto:"\u21a6",mapstodown:"\u21a7",mapstoleft:"\u21a4",mapstoup:"\u21a5",marker:"\u25ae",mcomma:"\u2a29",Mcy:"\u041c",mcy:"\u043c",mdash:"\u2014",mDDot:"\u223a",measuredangle:"\u2221",MediumSpace:"\u205f",Mellintrf:"\u2133",Mfr:"\ud835\udd10",mfr:"\ud835\udd2a",mho:"\u2127",micro:"\xb5",mid:"\u2223",midast:"*",midcir:"\u2af0",middot:"\xb7",minus:"\u2212",minusb:"\u229f",minusd:"\u2238",minusdu:"\u2a2a",MinusPlus:"\u2213",mlcp:"\u2adb",mldr:"\u2026",mnplus:"\u2213",models:"\u22a7",Mopf:"\ud835\udd44",mopf:"\ud835\udd5e",mp:"\u2213",Mscr:"\u2133",mscr:"\ud835\udcc2",mstpos:"\u223e",Mu:"\u039c",mu:"\u03bc",multimap:"\u22b8",mumap:"\u22b8",nabla:"\u2207",Nacute:"\u0143",nacute:"\u0144",nang:"\u2220\u20d2",nap:"\u2249",napE:"\u2a70\u0338",napid:"\u224b\u0338",napos:"\u0149",napprox:"\u2249",natur:"\u266e",natural:"\u266e",naturals:"\u2115",nbsp:"\xa0",nbump:"\u224e\u0338",nbumpe:"\u224f\u0338",ncap:"\u2a43",Ncaron:"\u0147",ncaron:"\u0148",Ncedil:"\u0145",ncedil:"\u0146",ncong:"\u2247",ncongdot:"\u2a6d\u0338",ncup:"\u2a42",Ncy:"\u041d",ncy:"\u043d",ndash:"\u2013",ne:"\u2260",nearhk:"\u2924",neArr:"\u21d7",nearr:"\u2197",nearrow:"\u2197",nedot:"\u2250\u0338",NegativeMediumSpace:"\u200b",NegativeThickSpace:"\u200b",NegativeThinSpace:"\u200b",NegativeVeryThinSpace:"\u200b",nequiv:"\u2262",nesear:"\u2928",nesim:"\u2242\u0338",NestedGreaterGreater:"\u226b",NestedLessLess:"\u226a",NewLine:"\n",nexist:"\u2204",nexists:"\u2204",Nfr:"\ud835\udd11",nfr:"\ud835\udd2b",ngE:"\u2267\u0338",nge:"\u2271",ngeq:"\u2271",ngeqq:"\u2267\u0338",ngeqslant:"\u2a7e\u0338",nges:"\u2a7e\u0338",nGg:"\u22d9\u0338",ngsim:"\u2275",nGt:"\u226b\u20d2",ngt:"\u226f",ngtr:"\u226f",nGtv:"\u226b\u0338",nhArr:"\u21ce",nharr:"\u21ae",nhpar:"\u2af2",ni:"\u220b",nis:"\u22fc",nisd:"\u22fa",niv:"\u220b",NJcy:"\u040a",njcy:"\u045a",nlArr:"\u21cd",nlarr:"\u219a",nldr:"\u2025",nlE:"\u2266\u0338",nle:"\u2270",nLeftarrow:"\u21cd",nleftarrow:"\u219a",nLeftrightarrow:"\u21ce",nleftrightarrow:"\u21ae",nleq:"\u2270",nleqq:"\u2266\u0338",nleqslant:"\u2a7d\u0338",nles:"\u2a7d\u0338",nless:"\u226e",nLl:"\u22d8\u0338",nlsim:"\u2274",nLt:"\u226a\u20d2",nlt:"\u226e",nltri:"\u22ea",nltrie:"\u22ec",nLtv:"\u226a\u0338",nmid:"\u2224",NoBreak:"\u2060",NonBreakingSpace:"\xa0",Nopf:"\u2115",nopf:"\ud835\udd5f",Not:"\u2aec",not:"\xac",NotCongruent:"\u2262",NotCupCap:"\u226d",NotDoubleVerticalBar:"\u2226",NotElement:"\u2209",NotEqual:"\u2260",NotEqualTilde:"\u2242\u0338",NotExists:"\u2204",NotGreater:"\u226f",NotGreaterEqual:"\u2271",NotGreaterFullEqual:"\u2267\u0338",NotGreaterGreater:"\u226b\u0338",NotGreaterLess:"\u2279",NotGreaterSlantEqual:"\u2a7e\u0338",NotGreaterTilde:"\u2275",NotHumpDownHump:"\u224e\u0338",NotHumpEqual:"\u224f\u0338",notin:"\u2209",notindot:"\u22f5\u0338",notinE:"\u22f9\u0338",notinva:"\u2209",notinvb:"\u22f7",notinvc:"\u22f6",NotLeftTriangle:"\u22ea",NotLeftTriangleBar:"\u29cf\u
20338",NotLeftTriangleEqual:"\u22ec",NotLess:"\u226e",NotLessEqual:"\u2270",NotLessGreater:"\u2278",NotLessLess:"\u226a\u0338",NotLessSlantEqual:"\u2a7d\u0338",NotLessTilde:"\u2274",NotNestedGreaterGreater:"\u2aa2\u0338",NotNestedLessLess:"\u2aa1\u0338",notni:"\u220c",notniva:"\u220c",notnivb:"\u22fe",notnivc:"\u22fd",NotPrecedes:"\u2280",NotPrecedesEqual:"\u2aaf\u0338",NotPrecedesSlantEqual:"\u22e0",NotReverseElement:"\u220c",NotRightTriangle:"\u22eb",NotRightTriangleBar:"\u29d0\u0338",NotRightTriangleEqual:"\u22ed",NotSquareSubset:"\u228f\u0338",NotSquareSubsetEqual:"\u22e2",NotSquareSuperset:"\u2290\u0338",NotSquareSupersetEqual:"\u22e3",NotSubset:"\u2282\u20d2",NotSubsetEqual:"\u2288",NotSucceeds:"\u2281",NotSucceedsEqual:"\u2ab0\u0338",NotSucceedsSlantEqual:"\u22e1",NotSucceedsTilde:"\u227f\u0338",NotSuperset:"\u2283\u20d2",NotSupersetEqual:"\u2289",NotTilde:"\u2241",NotTildeEqual:"\u2244",NotTildeFullEqual:"\u2247",NotTildeTilde:"\u2249",NotVerticalBar:"\u2224",npar:"\u2226",nparallel:"\u2226",nparsl:"\u2afd\u20e5",npart:"\u2202\u0338",npolint:"\u2a14",npr:"\u2280",nprcue:"\u22e0",npre:"\u2aaf\u0338",nprec:"\u2280",npreceq:"\u2aaf\u0338",nrArr:"\u21cf",nrarr:"\u219b",nrarrc:"\u2933\u0338",nrarrw:"\u219d\u0338",nRightarrow:"\u21cf",nrightarrow:"\u219b",nrtri:"\u22eb",nrtrie:"\u22ed",nsc:"\u2281",nsccue:"\u22e1",nsce:"\u2ab0\u0338",Nscr:"\ud835\udca9",nscr:"\ud835\udcc3",nshortmid:"\u2224",nshortparallel:"\u2226",nsim:"\u2241",nsime:"\u2244",nsimeq:"\u2244",nsmid:"\u2224",nspar:"\u2226",nsqsube:"\u22e2",nsqsupe:"\u22e3",nsub:"\u2284",nsubE:"\u2ac5\u0338",nsube:"\u2288",nsubset:"\u2282\u20d2",nsubseteq:"\u2288",nsubseteqq:"\u2ac5\u0338",nsucc:"\u2281",nsucceq:"\u2ab0\u0338",nsup:"\u2285",nsupE:"\u2ac6\u0338",nsupe:"\u2289",nsupset:"\u2283\u20d2",nsupseteq:"\u2289",nsupseteqq:"\u2ac6\u0338",ntgl:"\u2279",Ntilde:"\xd1",ntilde:"\xf1",ntlg:"\u2278",ntriangleleft:"\u22ea",ntrianglelefteq:"\u22ec",ntriangleright:"\u22eb",ntrianglerighteq:"\u22ed",Nu:"\u039d",nu:"\u
203bd",num:"#",numero:"\u2116",numsp:"\u2007",nvap:"\u224d\u20d2",nVDash:"\u22af",nVdash:"\u22ae",nvDash:"\u22ad",nvdash:"\u22ac",nvge:"\u2265\u20d2",nvgt:">\u20d2",nvHarr:"\u2904",nvinfin:"\u29de",nvlArr:"\u2902",nvle:"\u2264\u20d2",nvlt:"<\u20d2",nvltrie:"\u22b4\u20d2",nvrArr:"\u2903",nvrtrie:"\u22b5\u20d2",nvsim:"\u223c\u20d2",nwarhk:"\u2923",nwArr:"\u21d6",nwarr:"\u2196",nwarrow:"\u2196",nwnear:"\u2927",Oacute:"\xd3",oacute:"\xf3",oast:"\u229b",ocir:"\u229a",Ocirc:"\xd4",ocirc:"\xf4",Ocy:"\u041e",ocy:"\u043e",odash:"\u229d",Odblac:"\u0150",odblac:"\u0151",odiv:"\u2a38",odot:"\u2299",odsold:"\u29bc",OElig:"\u0152",oelig:"\u0153",ofcir:"\u29bf",Ofr:"\ud835\udd12",ofr:"\ud835\udd2c",ogon:"\u02db",Ograve:"\xd2",ograve:"\xf2",ogt:"\u29c1",ohbar:"\u29b5",ohm:"\u03a9",oint:"\u222e",olarr:"\u21ba",olcir:"\u29be",olcross:"\u29bb",oline:"\u203e",olt:"\u29c0",Omacr:"\u014c",omacr:"\u014d",Omega:"\u03a9",omega:"\u03c9",Omicron:"\u039f",omicron:"\u03bf",omid:"\u29b6",ominus:"\u2296",Oopf:"\ud835\udd46",oopf:"\ud835\udd60",opar:"\u29b7",OpenCurlyDoubleQuote:"\u201c",OpenCurlyQuote:"\u2018",operp:"\u29b9",oplus:"\u2295",Or:"\u2a54",or:"\u2228",orarr:"\u21bb",ord:"\u2a5d",order:"\u2134",orderof:"\u2134",ordf:"\xaa",ordm:"\xba",origof:"\u22b6",oror:"\u2a56",orslope:"\u2a57",orv:"\u2a5b",oS:"\u24c8",Oscr:"\ud835\udcaa",oscr:"\u2134",Oslash:"\xd8",oslash:"\xf8",osol:"\u2298",Otilde:"\xd5",otilde:"\xf5",Otimes:"\u2a37",otimes:"\u2297",otimesas:"\u2a36",Ouml:"\xd6",ouml:"\xf6",ovbar:"\u233d",OverBar:"\u203e",OverBrace:"\u23de",OverBracket:"\u23b4",OverParenthesis:"\u23dc",par:"\u2225",para:"\xb6",parallel:"\u2225",parsim:"\u2af3",parsl:"\u2afd",part:"\u2202",PartialD:"\u2202",Pcy:"\u041f",pcy:"\u043f",percnt:"%",period:".",permil:"\u2030",perp:"\u22a5",pertenk:"\u2031",Pfr:"\ud835\udd13",pfr:"\ud835\udd2d",Phi:"\u03a6",phi:"\u03c6",phiv:"\u03d5",phmmat:"\u2133",phone:"\u260e",Pi:"\u03a0",pi:"\u03c0",pitchfork:"\u22d4",piv:"\u03d6",planck:"\u210f",planckh:"\u210e",plankv:"\u210f",plus:"+",plusacir:"\u2a23",plusb:"\u229e",pluscir:"\u2a22",plusdo:"\u2214",plusdu:"\u2a25",pluse:"\u2a72",PlusMinus:"\xb1",plusmn:"\xb1",plussim:"\u2a26",plustwo:"\u2a27",pm:"\xb1",Poincareplane:"\u210c",pointint:"\u2a15",Popf:"\u2119",popf:"\ud835\udd61",pound:"\xa3",Pr:"\u2abb",pr:"\u227a",prap:"\u2ab7",prcue:"\u227c",prE:"\u2ab3",pre:"\u2aaf",prec:"\u227a",precapprox:"\u2ab7",preccurlyeq:"\u227c",Precedes:"\u227a",PrecedesEqual:"\u2aaf",PrecedesSlantEqual:"\u227c",PrecedesTilde:"\u227e",preceq:"\u2aaf",precnapprox:"\u2ab9",precneqq:"\u2ab5",precnsim:"\u22e8",precsim:"\u227e",Prime:"\u2033",prime:"\u2032",primes:"\u2119",prnap:"\u2ab9",prnE:"\u2ab5",prnsim:"\u22e8",prod:"\u220f",Product:"\u220f",profalar:"\u232e",profline:"\u2312",profsurf:"\u2313",prop:"\u221d",Proportion:"\u2237",Proportional:"\u221d",propto:"\u221d",prsim:"\u227e",prurel:"\u22b0",Pscr:"\ud835\udcab",pscr:"\ud835\udcc5",Psi:"\u03a8",psi:"\u03c8",puncsp:"\u2008",Qfr:"\ud835\udd14",qfr:"\ud835\udd2e",qint:"\u2a0c",Qopf:"\u211a",qopf:"\ud835\udd62",qprime:"\u2057",Qscr:"\ud835\udcac",qscr:"\ud835\udcc6",quaternions:"\u210d",quatint:"\u2a16",quest:"?",questeq:"\u225f",QUOT:'"',quot:'"',rAarr:"\u21db",race:"\u223d\u0331",Racute:"\u0154",racute:"\u0155",radic:"\u221a",raemptyv:"\u29b3",Rang:"\u27eb",rang:"\u27e9",rangd:"\u2992",range:"\u29a5",rangle:"\u27e9",raquo:"\xbb",Rarr:"\u21a0",rArr:"\u21d2",rarr:"\u2192",rarrap:"\u2975",rarrb:"\u21e5",rarrbfs:"\u2920",rarrc:"\u2933",rarrfs:"\u291e",rarrhk:"\u21aa",rarrlp:"\u21ac",rarrpl:"\u2945",rarrsim:"\u2974",Rarrtl:"\u2916",rarrtl:"\u21a3",rarrw:"\u219d",rAtail:"\u291c",ratail:"\u291a",ratio:"\u2236",rationals:"\u211a",RBarr:"\u2910",rBarr:"\u290f",rbarr:"\u290d",rbbrk:"\u2773",rbrace:"}",rbrack:"]",rbrke:"\u298c",rbrksld:"\u298e",rbrkslu:"\u2990",Rcaron:"\u0158",rcaron:"\u0159",Rcedil:"\u0156",rcedil:"\u0157",rceil:"\u2309",rcub:"}",Rcy:"\u0420",rcy:"\u0440",rdca:"\u2937",rdldhar:"\u2969",rdquo:"\u201d",rdquor:"\u201d",rdsh:"\u21b3",Re:"\u211c",real:"\u211c",realine:"\u211b",realpart:"\u211c",reals:"\u211d",rect:"\u25ad",REG:"\xae",reg:"\xae",ReverseElement:"\u220b",ReverseEquilibrium:"\u21cb",ReverseUpEquilibrium:"\u296f",rfisht:"\u297d",rfloor:"\u230b",Rfr:"\u211c",rfr:"\ud835\udd2f",rHar:"\u2964",rhard:"\u21c1",rharu:"\u21c0",rharul:"\u296c",Rho:"\u03a1",rho:"\u03c1",rhov:"\u
203f1",RightAngleBracket:"\u27e9",RightArrow:"\u2192",Rightarrow:"\u21d2",rightarrow:"\u2192",RightArrowBar:"\u21e5",RightArrowLeftArrow:"\u21c4",rightarrowtail:"\u21a3",RightCeiling:"\u2309",RightDoubleBracket:"\u27e7",RightDownTeeVector:"\u295d",RightDownVector:"\u21c2",RightDownVectorBar:"\u2955",RightFloor:"\u230b",rightharpoondown:"\u21c1",rightharpoonup:"\u21c0",rightleftarrows:"\u21c4",rightleftharpoons:"\u21cc",rightrightarrows:"\u21c9",rightsquigarrow:"\u219d",RightTee:"\u22a2",RightTeeArrow:"\u21a6",RightTeeVector:"\u295b",rightthreetimes:"\u22cc",RightTriangle:"\u22b3",RightTriangleBar:"\u29d0",RightTriangleEqual:"\u22b5",RightUpDownVector:"\u294f",RightUpTeeVector:"\u295c",RightUpVector:"\u21be",RightUpVectorBar:"\u2954",RightVector:"\u21c0",RightVectorBar:"\u2953",ring:"\u02da",risingdotseq:"\u2253",rlarr:"\u21c4",rlhar:"\u21cc",rlm:"\u200f",rmoust:"\u23b1",rmoustache:"\u23b1",rnmid:"\u2aee",roang:"\u27ed",roarr:"\u21fe",robrk:"\u27e7",ropar:"\u2986",Ropf:"\u211d",ropf:"\ud835\udd63",roplus:"\u2a2e",rotimes:"\u2a35",RoundImplies:"\u2970",rpar:")",rpargt:"\u2994",rppolint:"\u2a12",rrarr:"\u21c9",Rrightarrow:"\u21db",rsaquo:"\u203a",Rscr:"\u211b",rscr:"\ud835\udcc7",Rsh:"\u21b1",rsh:"\u21b1",rsqb:"]",rsquo:"\u2019",rsquor:"\u2019",rthree:"\u22cc",rtimes:"\u22ca",rtri:"\u25b9",rtrie:"\u22b5",rtrif:"\u25b8",rtriltri:"\u29ce",RuleDelayed:"\u29f4",ruluhar:"\u2968",rx:"\u211e",Sacute:"\u015a",sacute:"\u015b",sbquo:"\u201a",Sc:"\u2abc",sc:"\u227b",scap:"\u2ab8",Scaron:"\u0160",scaron:"\u0161",sccue:"\u227d",scE:"\u2ab4",sce:"\u2ab0",Scedil:"\u015e",scedil:"\u015f",Scirc:"\u015c",scirc:"\u015d",scnap:"\u2aba",scnE:"\u2ab6",scnsim:"\u22e9",scpolint:"\u2a13",scsim:"\u227f",Scy:"\u0421",scy:"\u0441",sdot:"\u22c5",sdotb:"\u22a1",sdote:"\u2a66",searhk:"\u2925",seArr:"\u21d8",searr:"\u2198",searrow:"\u2198",sect:"\xa7",semi:";",seswar:"\u2929",setminus:"\u2216",setmn:"\u2216",sext:"\u2736",Sfr:"\ud835\udd16",sfr:"\ud835\udd30",sfrown:"\u2322",sharp:"\u266f",SHCHcy:"\u0429",shchcy:"\u0449",SHcy:"\u0428",shcy:"\u0448",ShortDownArrow:"\u2193",ShortLeftArrow:"\u2190",shortmid:"\u2223",shortparallel:"\u2225",ShortRightArrow:"\u2192",ShortUpArrow:"\u2191",shy:"\xad",Sigma:"\u03a3",sigma:"\u03c3",sigmaf:"\u03c2",sigmav:"\u03c2",sim:"\u223c",simdot:"\u2a6a",sime:"\u2243",simeq:"\u2243",simg:"\u2a9e",simgE:"\u2aa0",siml:"\u2a9d",simlE:"\u2a9f",simne:"\u2246",simplus:"\u2a24",simrarr:"\u2972",slarr:"\u2190",SmallCircle:"\u2218",smallsetminus:"\u2216",smashp:"\u2a33",smeparsl:"\u29e4",smid:"\u2223",smile:"\u2323",smt:"\u2aaa",smte:"\u2aac",smtes:"\u2aac\ufe00",SOFTcy:"\u042c",softcy:"\u044c",sol:"/",solb:"\u29c4",solbar:"\u233f",Sopf:"\ud835\udd4a",sopf:"\ud835\udd64",spades:"\u2660",spadesuit:"\u2660",spar:"\u2225",sqcap:"\u2293",sqcaps:"\u2293\ufe00",sqcup:"\u2294",sqcups:"\u2294\ufe00",Sqrt:"\u221a",sqsub:"\u228f",sqsube:"\u2291",sqsubset:"\u228f",sqsubseteq:"\u2291",sqsup:"\u2290",sqsupe:"\u2292",sqsupset:"\u2290",sqsupseteq:"\u2292",squ:"\u25a1",Square:"\u25a1",square:"\u25a1",SquareIntersection:"\u2293",SquareSubset:"\u228f",SquareSubsetEqual:"\u2291",SquareSuperset:"\u2290",SquareSupersetEqual:"\u2292",SquareUnion:"\u2294",squarf:"\u25aa",squf:"\u25aa",srarr:"\u2192",Sscr:"\ud835\udcae",sscr:"\ud835\udcc8",ssetmn:"\u2216",ssmile:"\u2323",sstarf:"\u22c6",Star:"\u22c6",star:"\u2606",starf:"\u2605",straightepsilon:"\u03f5",straightphi:"\u03d5",strns:"\xaf",Sub:"\u22d0",sub:"\u2282",subdot:"\u2abd",subE:"\u2ac5",sube:"\u2286",subedot:"\u2ac3",submult:"\u2ac1",subnE:"\u2acb",subne:"\u228a",subplus:"\u2abf",subrarr:"\u2979",Subset:"\u22d0",subset:"\u2282",subseteq:"\u2286",subseteqq:"\u2ac5",SubsetEqual:"\u2286",subsetneq:"\u228a",subsetneqq:"\u2acb",subsim:"\u2ac7",subsub:"\u2ad5",subsup:"\u2ad3",succ:"\u227b",succapprox:"\u2ab8",succcurlyeq:"\u227d",Succeeds:"\u227b",SucceedsEqual:"\u2ab0",SucceedsSlantEqual:"\u227d",SucceedsTilde:"\u227f",succeq:"\u2ab0",succnapprox:"\u2aba",succneqq:"\u2ab6",succnsim:"\u22e9",succsim:"\u227f",SuchThat:"\u220b",Sum:"\u2211",sum:"\u2211",sung:"\u266a",Sup:"\u22d1",sup:"\u2283",sup1:"\xb9",sup2:"\xb2",sup3:"\xb3",supdot:"\u2abe",supdsub:"\u2ad8",supE:"\u2ac6",supe:"\u2287",supedot:"\u2ac4",Superset:"\u2283",SupersetEqual:"\u2287",suphsol:"\u27c9",suphsub
2:"\u2ad7",suplarr:"\u297b",supmult:"\u2ac2",supnE:"\u2acc",supne:"\u228b",supplus:"\u2ac0",Supset:"\u22d1",supset:"\u2283",supseteq:"\u2287",supseteqq:"\u2ac6",supsetneq:"\u228b",supsetneqq:"\u2acc",supsim:"\u2ac8",supsub:"\u2ad4",supsup:"\u2ad6",swarhk:"\u2926",swArr:"\u21d9",swarr:"\u2199",swarrow:"\u2199",swnwar:"\u292a",szlig:"\xdf",Tab:"\t",target:"\u2316",Tau:"\u03a4",tau:"\u03c4",tbrk:"\u23b4",Tcaron:"\u0164",tcaron:"\u0165",Tcedil:"\u0162",tcedil:"\u0163",Tcy:"\u0422",tcy:"\u0442",tdot:"\u20db",telrec:"\u2315",Tfr:"\ud835\udd17",tfr:"\ud835\udd31",there4:"\u2234",Therefore:"\u2234",therefore:"\u2234",Theta:"\u0398",theta:"\u03b8",thetasym:"\u03d1",thetav:"\u03d1",thickapprox:"\u2248",thicksim:"\u223c",ThickSpace:"\u205f\u200a",thinsp:"\u2009",ThinSpace:"\u2009",thkap:"\u2248",thksim:"\u223c",THORN:"\xde",thorn:"\xfe",Tilde:"\u223c",tilde:"\u02dc",TildeEqual:"\u2243",TildeFullEqual:"\u2245",TildeTilde:"\u2248",times:"\xd7",timesb:"\u22a0",timesbar:"\u2a31",timesd:"\u2a30",tint:"\u222d",toea:"\u2928",top:"\u22a4",topbot:"\u2336",topcir:"\u2af1",Topf:"\ud835\udd4b",topf:"\ud835\udd65",topfork:"\u2ada",tosa:"\u2929",tprime:"\u2034",TRADE:"\u2122",trade:"\u2122",triangle:"\u25b5",triangledown:"\u25bf",triangleleft:"\u25c3",trianglelefteq:"\u22b4",triangleq:"\u225c",triangleright:"\u25b9",trianglerighteq:"\u22b5",tridot:"\u25ec",trie:"\u225c",triminus:"\u2a3a",TripleDot:"\u20db",triplus:"\u2a39",trisb:"\u29cd",tritime:"\u2a3b",trpezium:"\u23e2",Tscr:"\ud835\udcaf",tscr:"\ud835\udcc9",TScy:"\u0426",tscy:"\u0446",TSHcy:"\u040b",tshcy:"\u045b",Tstrok:"\u0166",tstrok:"\u0167",twixt:"\u226c",twoheadleftarrow:"\u219e",twoheadrightarrow:"\u21a0",Uacute:"\xda",uacute:"\xfa",Uarr:"\u219f",uArr:"\u21d1",uarr:"\u2191",Uarrocir:"\u2949",Ubrcy:"\u040e",ubrcy:"\u045e",Ubreve:"\u016c",ubreve:"\u016d",Ucirc:"\xdb",ucirc:"\xfb",Ucy:"\u0423",ucy:"\u0443",udarr:"\u21c5",Udblac:"\u0170",udblac:"\u0171",udhar:"\u296e",ufisht:"\u297e",Ufr:"\ud835\udd18",ufr:"\ud835\udd32",Ugrave:"\xd9",ugrave:"\xf9",uHar:"\u2963",uharl:"\u21bf",uharr:"\u21be",uhblk:"\u2580",ulcorn:"\u231c",ulcorner:"\u231c",ulcrop:"\u230f",ultri:"\u25f8",Umacr:"\u016a",umacr:"\u016b",uml:"\xa8",UnderBar:"_",UnderBrace:"\u23df",UnderBracket:"\u23b5",UnderParenthesis:"\u23dd",Union:"\u22c3",UnionPlus:"\u228e",Uogon:"\u0172",uogon:"\u0173",Uopf:"\ud835\udd4c",uopf:"\ud835\udd66",UpArrow:"\u2191",Uparrow:"\u21d1",uparrow:"\u2191",UpArrowBar:"\u2912",UpArrowDownArrow:"\u21c5",UpDownArrow:"\u2195",Updownarrow:"\u21d5",updownarrow:"\u2195",UpEquilibrium:"\u296e",upharpoonleft:"\u21bf",upharpoonright:"\u21be",uplus:"\u228e",UpperLeftArrow:"\u2196",UpperRightArrow:"\u2197",Upsi:"\u03d2",upsi:"\u03c5",upsih:"\u03d2",Upsilon:"\u03a5",upsilon:"\u03c5",UpTee:"\u22a5",UpTeeArrow:"\u21a5",upuparrows:"\u21c8",urcorn:"\u231d",urcorner:"\u231d",urcrop:"\u230e",Uring:"\u016e",uring:"\u016f",urtri:"\u25f9",Uscr:"\ud835\udcb0",uscr:"\ud835\udcca",utdot:"\u22f0",Utilde:"\u0168",utilde:"\u0169",utri:"\u25b5",utrif:"\u25b4",uuarr:"\u21c8",Uuml:"\xdc",uuml:"\xfc",uwangle:"\u29a7",vangrt:"\u299c",varepsilon:"\u03f5",varkappa:"\u03f0",varnothing:"\u2205",varphi:"\u03d5",varpi:"\u03d6",varpropto:"\u221d",vArr:"\u21d5",varr:"\u2195",varrho:"\u03f1",varsigma:"\u03c2",varsubsetneq:"\u228a\ufe00",varsubsetneqq:"\u2acb\ufe00",varsupsetneq:"\u228b\ufe00",varsupsetneqq:"\u2acc\ufe00",vartheta:"\u03d1",vartriangleleft:"\u22b2",vartriangleright:"\u22b3",Vbar:"\u2aeb",vBar:"\u2ae8",vBarv:"\u2ae9",Vcy:"\u0412",vcy:"\u0432",VDash:"\u22ab",Vdash:"\u22a9",vDash:"\u22a8",vdash:"\u22a2",Vdashl:"\u2ae6",Vee:"\u22c1",vee:"\u2228",veebar:"\u22bb",veeeq:"\u225a",vellip:"\u22ee",Verbar:"\u2016",verbar:"|",Vert:"\u2016",vert:"|",VerticalBar:"\u2223",VerticalLine:"|",VerticalSeparator:"\u2758",VerticalTilde:"\u2240",VeryThinSpace:"\u200a",Vfr:"\ud835\udd19",vfr:"\ud835\udd33",vltri:"\u22b2",vnsub:"\u2282\u20d2",vnsup:"\u2283\u20d2",Vopf:"\ud835\udd4d",vopf:"\ud835\udd67",vprop:"\u221d",vrtri:"\u22b3",Vscr:"\ud835\udcb1",vscr:"\ud835\udccb",vsubnE:"\u2acb\ufe00",vsubne:"\u228a\ufe00",vsupnE:"\u2acc\ufe00",vsupne:"\u228b\ufe00",Vvdash:"\u22aa",vzigzag:"\u299a",Wcirc:"\u0174",wcirc:"\u0175",wedbar:"\u2a5f",Wedge:"\u22c0",wedge:"\u2227",wedgeq:"\u2259",weierp:"\u2118",Wfr:"\ud835\udd1a",wfr:"\ud835\udd34",Wopf:"\ud835\udd4e",wopf:"\ud835\udd68",wp:"\u2118",wr:"\u2240",wreath:"\u2240",Wscr:"\ud835\udcb2",wscr:"\ud835\udccc",xcap:"\u22c2",xcirc:"\u25ef",xcup:"\u22c3",xdtri:"\u25bd",Xfr:"\ud835\udd1b",xfr:"\ud835\udd35",xhArr:"\u27fa",xharr:"\u27f7",Xi:"\u039e",xi:"\u03be",xlArr:"\u27f8",xlarr:"\u27f5",xmap:"\u27fc",xnis:"\u22fb",xod
vendor: 5,788 bytes, line 2
2ot:"\u2a00",Xopf:"\ud835\udd4f",xopf:"\ud835\udd69",xoplus:"\u2a01",xotime:"\u2a02",xrArr:"\u27f9",xrarr:"\u27f6",Xscr:"\ud835\udcb3",xscr:"\ud835\udccd",xsqcup:"\u2a06",xuplus:"\u2a04",xutri:"\u25b3",xvee:"\u22c1",xwedge:"\u22c0",Yacute:"\xdd",yacute:"\xfd",YAcy:"\u042f",yacy:"\u044f",Ycirc:"\u0176",ycirc:"\u0177",Ycy:"\u042b",ycy:"\u044b",yen:"\xa5",Yfr:"\ud835\udd1c",yfr:"\ud835\udd36",YIcy:"\u0407",yicy:"\u0457",Yopf:"\ud835\udd50",yopf:"\ud835\udd6a",Yscr:"\ud835\udcb4",yscr:"\ud835\udcce",YUcy:"\u042e",yucy:"\u044e",Yuml:"\u0178",yuml:"\xff",Zacute:"\u0179",zacute:"\u017a",Zcaron:"\u017d",zcaron:"\u017e",Zcy:"\u0417",zcy:"\u0437",Zdot:"\u017b",zdot:"\u017c",zeetrf:"\u2128",ZeroWidthSpace:"\u200b",Zeta:"\u0396",zeta:"\u03b6",Zfr:"\u2128",zfr:"\ud835\udd37",ZHcy:"\u0416",zhcy:"\u0436",zigrarr:"\u21dd",Zopf:"\u2124",zopf:"\ud835\udd6b",Zscr:"\ud835\udcb5",zscr:"\ud835\udccf",zwj:"\u200d",zwnj:"\u200c"}),t.entityMap=t.HTML_ENTITIES},313:function(e,t,n){var i=n(210).NAMESPACE,r=/[A-Z_a-z\xC0-\xD6\xD8-\xF6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/,s=new RegExp("[\\-\\.0-9"+r.source.slice(1,-1)+"\\u00B7\\u0300-\\u036F\\u203F-\\u2040]"),a=new RegExp("^"+r.source+s.source+"*(?::"+r.source+s.source+"*)?$"),o=0,c=1,l=2,d=3,u=4,h=5,p=6,m=7;function g(e,t){this.message=e,this.locator=t,Error.captureStackTrace&&Error.captureStackTrace(this,g)}function f(){}function b(e,t){return t.lineNumber=e.lineNumber,t.columnNumber=e.columnNumber,t}function y(e,t,n,r,s,a){function g(e,t,i){n.attributeNames.hasOwnProperty(e)&&a.fatalError("Attribute "+e+" redefined"),n.addValue(e,t.replace(/[\t\n\r]/g," ").replace(/&#?\w+;/g,s),i)}for(var f,b=++t,y=o;;){var j=e.charAt(b);switch(j){case"=":if(y===c)f=e.slice(t,b),y=d;else{if(y!==l)throw new Error("attribute equal must after attrName");y=d}break;case"'":case'"':if(y===d||y===c){if(y===c&&(a.warning('attribute value must after "="'),f=e.slice(t,b)),t=b+1,!((b=e.indexOf(j,t))>0))throw new Error("attribute value no end '"+j+"' match");g(f,_=e.slice(t,b),t-1),y=h}else{if(y!=u)throw new Error('attribute value must after "="');g(f,_=e.slice(t,b),t),a.warning('attribute "'+f+'" missed start quot('+j+")!!"),t=b+1,y=h}break;case"/":switch(y){case o:n.setTagName(e.slice(t,b));case h:case p:case m:y=m,n.closed=!0;case u:case c:break;case l:n.closed=!0;break;default:throw new Error("attribute invalid close char('/')")}break;case"":return a.error("unexpected end of input"),y==o&&n.setTagName(e.slice(t,b)),b;case">":switch(y){case o:n.setTagName(e.slice(t,b));case h:case p:case m:break;case u:case c:"/"===(_=e.slice(t,b)).slice(-1)&&(n.closed=!0,_=_.slice(0,-1));case l:y===l&&(_=f),y==u?(a.warning('attribute "'+_+'" missed quot(")!'),g(f,_,t)):(i.isHTML(r[""])&&_.match(/^(?:disabled|checked|selected)$/i)||a.warning('attribute "'+_+'" missed value!! "'+_+'" instead!!'),g(_,_,t));break;case d:throw new Error("attribute value missed!!")}return b;case"\x80":j=" ";default:if(j<=" ")switch(y){case o:n.setTagName(e.slice(t,b)),y=p;break;case c:f=e.slice(t,b),y=l;break;case u:var _=e.slice(t,b);a.warning('attribute "'+_+'" missed quot(")!!'),g(f,_,t);case h:y=p}else switch(y){case l:n.tagName;i.isHTML(r[""])&&f.match(/^(?:disabled|checked|selected)$/i)||a.warning('attribute "'+f+'" missed value!! "'+f+'" instead2!!'),g(f,f,t),t=b,y=c;break;case h:a.warning('attribute space is required"'+f+'"!!');case p:y=c,t=b;break;case d:y=u,t=b;break;case m:throw new Error("elements closed character '/' and '>' must be connected to")}}b++}}function j(e,t,n){for(var r=e.tagName,s=null,a=e.length;a--;){var o=e[a],c=o.qName,l=o.value;if((p=c.indexOf(":"))>0)var d=o.prefix=c.slice(0,p),u=c.slice(p+1),h="xmlns"===d&&u;else u=c,d=null,h="xmlns"===c&&"";o.localName=u,!1!==h&&(null==s&&(s={},x(n,n={})),n[h]=s[h]=l,o.uri=i.XMLNS,t.startPrefixMapping(h,l))}for(a=e.length;a--;){(d=(o=e[a]).prefix)&&("xml"===d&&(o.uri=i.XML),"xmlns"!==d&&(o.uri=n[d||""]))}var p;(p=r.indexOf(":"))>0?(d=e.prefix=r.slice(0,p),u=e.localName=r.slice(p+1)):(d=null,u=e.localName=r);var m=e.uri=n[d||""];if(t.startElement(m,u,r,e),!e.closed)return e.currentNSMap=n,e.localNSMap=s,!0;if(t.endElement(m,u,r),s)for(d in s)Object.prototype.hasOwnProperty.call(s,d)&&t.endPrefixMapping(d)}function _(e,t,n,i,r){if(/^(?:script|textarea)$/i.test(n)){var s=e.indexOf("</"+n+">",t),a=e.substring(t+1,s);if(/[&<]/.test(a))return/^script$/i.test(n)?(r.characters(a,0,a.length),s):(a=a.replace(/&#?\w+;/g,i),r.characters(a,0,a.length),s)}return t+1}function v(e,t,n,i){var r=i[n];return null==r&&((r=e.lastIndexOf("</"+n+">"))<t&&(r=e.lastIndexOf("</"+n)),i[n]=r),r<t}function x(e,t){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])}function O(e,t,n,i){if("-"===e.charAt(t+2))return"-"===e.charAt(t+3)?(r=e.indexOf("--\x3e",t+4))>t?(n.comment(e,t+4,r-t-4),r+3):(i.error("Unclosed comment"),-1):-1;if("CDATA["==e.substr(t+3,6)){var r=e.indexOf("]]>",t+9);return n.startCDATA(),n.characters(e,t+9,r-t-9),n.endCDATA(),r+3}var s=function(e,t){var n,i=[],r=/'[^']+'|"[^"]+"|[^\s<>\/=]+=?|(\/?\s*>|<)/g;r.lastIndex=t,r.exec(e);for(;n=r.exec(e);)if(i.push(n),n[1])return i}(e,t),a=s.length;if(a>1&&/!doctype/i.test(s[0][0])){var o=s[1][0],c=!1,l=!1;a>3&&(/^public$/i.test(s[2][0])?(c=s[3][0],l=a>4&&s[4][0]):/^system$/i.test(s[2][0])&&(l=s[3][0]));var d=s[a-1];return n.startDTD(o,c,l),n.endDTD(),d.index+d[0].length}return-1}function T(e,t,n){var i=e.indexOf("?>",t);if(i){var r=e.substring(t,i).match(/^<\?(\S*)\s*([\s\S]*?)\s*$/);if(r){r[0].length;return n.processingInstruction(r[1],r[2]),i+2}return-1}return-1}function S(){this.attributeNames={}}g.prototype=new Error,g.prototype.name=g.name,f.prototype={parse:function(e,t,n){var r=this.domBuilder;r.startDocument(),x(t,t={}
vendor: 4,249 bytes, line 2
2),function(e,t,n,r,s){function a(e){if(e>65535){var t=55296+((e-=65536)>>10),n=56320+(1023&e);return String.fromCharCode(t,n)}return String.fromCharCode(e)}function o(e){var t=e.slice(1,-1);return Object.hasOwnProperty.call(n,t)?n[t]:"#"===t.charAt(0)?a(parseInt(t.substr(1).replace("x","0x"))):(s.error("entity not found:"+e),e)}function c(t){if(t>x){var n=e.substring(x,t).replace(/&#?\w+;/g,o);p&&l(x),r.characters(n,0,t-x),x=t}}function l(t,n){for(;t>=u&&(n=h.exec(e));)d=n.index,u=d+n[0].length,p.lineNumber++;p.columnNumber=t-d+1}var d=0,u=0,h=/.*(?:\r\n?|\n)|.*$/g,p=r.locator,m=[{currentNSMap:t}],f={},x=0;for(;;){try{var w=e.indexOf("<",x);if(w<0){if(!e.substr(x).match(/^\s*$/)){var A=r.doc,k=A.createTextNode(e.substr(x));A.appendChild(k),r.currentElement=k}return}switch(w>x&&c(w),e.charAt(w+1)){case"/":var C=e.indexOf(">",w+3),E=e.substring(w+2,C).replace(/[ \t\n\r]+$/g,""),I=m.pop();C<0?(E=e.substring(w+2).replace(/[\s<].*/,""),s.error("end tag name: "+E+" is not complete:"+I.tagName),C=w+1+E.length):E.match(/\s</)&&(E=E.replace(/[\s<].*/,""),s.error("end tag name: "+E+" maybe not complete"),C=w+1+E.length);var D=I.localNSMap,P=I.tagName==E;if(P||I.tagName&&I.tagName.toLowerCase()==E.toLowerCase()){if(r.endElement(I.uri,I.localName,E),D)for(var R in D)Object.prototype.hasOwnProperty.call(D,R)&&r.endPrefixMapping(R);P||s.fatalError("end tag name: "+E+" is not match the current start tagName:"+I.tagName)}else m.push(I);C++;break;case"?":p&&l(w),C=T(e,w,r);break;case"!":p&&l(w),C=O(e,w,r,s);break;default:p&&l(w);var L=new S,M=m[m.length-1].currentNSMap,N=(C=y(e,w,L,M,o,s),L.length);if(!L.closed&&v(e,C,L.tagName,f)&&(L.closed=!0,n.nbsp||s.warning("unclosed xml attribute")),p&&N){for(var B=b(p,{}),U=0;U<N;U++){var F=L[U];l(F.offset),F.locator=b(p,{})}r.locator=B,j(L,r,M)&&m.push(L),r.locator=p}else j(L,r,M)&&m.push(L);i.isHTML(L.uri)&&!L.closed?C=_(e,C,L.tagName,o,r):C++}}catch(z){if(z instanceof g)throw z;s.error("element parse error: "+z),C=-1}C>x?x=C:c(Math.max(w,x)+1)}}(e,t,n,r,this.errorHandler),r.endDocument()}},S.prototype={setTagName:function(e){if(!a.test(e))throw new Error("invalid tagName:"+e);this.tagName=e},addValue:function(e,t,n){if(!a.test(e))throw new Error("invalid attribute:"+e);this.attributeNames[e]=this.length,this[this.length++]={qName:e,value:t,offset:n}},length:0,getLocalName:function(e){return this[e].localName},getLocator:function(e){return this[e].locator},getQName:function(e){return this[e].qName},getURI:function(e){return this[e].uri},getValue:function(e){return this[e].value}},t.XMLReader=f,t.ParseError=g},314:function(e,t,n){var i=n(315).getUint64;e.exports=function(e){var t=new DataView(e.buffer,e.byteOffset,e.byteLength),n={version:e[0],flags:new Uint8Array(e.subarray(1,4)),references:[],referenceId:t.getUint32(4),timescale:t.getUint32(8)},r=12;0===n.version?(n.earliestPresentationTime=t.getUint32(r),n.firstOffset=t.getUint32(r+4),r+=8):(n.earliestPresentationTime=i(e.subarray(r)),n.firstOffset=i(e.subarray(r+8)),r+=16),r+=2;var s=t.getUint16(r);for(r+=2;s>0;r+=12,s--)n.references.push({referenceType:(128&e[r])>>>7,referencedSize:2147483647&t.getUint32(r),subsegmentDuration:t.getUint32(r+4),startsWithSap:!!(128&e[r+8]),sapType:(112&e[r+8])>>>4,sapDeltaTime:268435455&t.getUint32(r+8)});return n}},315:function(e,t){var n=Math.pow(2,32);e.exports={getUint64:function(e){var t,i=new DataView(e.buffer,e.byteOffset,e.byteLength);return i.getBigUint64?(t=i.getBigUint64(0))<Number.MAX_SAFE_INTEGER?Number(t):t:i.getUint32(0)*n+i.getUint32(4)},MAX_UINT32:n}},316:function(e,t){var n,i,r,s,a,o,c,l=9e4;n=function(e){return e*l},i=function(e,t){return e*t},r=function(e){return e/l},s=function(e,t){return e/t},a=function(e,t){return n(s(e,t))},o=function(e,t){return i(r(e),t)},c=function(e,t,n){return r(n?e:e-t)},e.exports={ONE_SECOND_IN_TS:l,secondsToVideoTs:n,secondsToAudioTs:i,videoTsToSeconds:r,audioTsToSeconds:s,audioTsToVideoTs:a,videoTsToAudioTs:o,metadataTsToSeconds:c}},317:function(e,t,n){"use strict";var i=n(189);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=i(n(190)),s=n(1),a=(0,r.default)((0,s.jsx)("path",{d:"m6 18 8.5-6L6 6v12zM16 6v12h2V6h-2z"}),"SkipNext");t.default=a},318:function(e,t,n){"use strict";var i=n(189);
vendor: 7,172 bytes, line 2
2Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=i(n(190)),s=n(1),a=(0,r.default)((0,s.jsx)("path",{d:"M21 3H3c-1.1 0-2 .9-2 2v3h2V5h18v14h-7v2h7c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zM1 18v3h3c0-1.66-1.34-3-3-3zm0-4v2c2.76 0 5 2.24 5 5h2c0-3.87-3.13-7-7-7zm0-4v2c4.97 0 9 4.03 9 9h2c0-6.08-4.93-11-11-11z"}),"Cast");t.default=a},319:function(e,t,n){},320:function(e,t,n){},321:function(e,t,n){},322:function(e,t,n){"use strict";n.d(t,"a",(function(){return T})),n.d(t,"b",(function(){return S}));var i,r=n(197),s=(new Uint8Array([79,112,117,115,72,101,97,100]),function(e){return"string"===typeof e?Object(r.h)(e):e}),a=function(e){e=Object(r.k)(e);for(var t=[],n=0;e.length>n;){var s=e[n],a=0,o=0,c=e[++o];for(o++;128&c;)a=(127&c)<<7,c=e[o],o++;a+=127&c;for(var l=0;l<i.length;l++){var d=i[l],u=d.id,h=d.parser;if(s===u){t.push(h(e.subarray(o,o+a)));break}}n+=a+o}return t};i=[{id:3,parser:function(e){var t={tag:3,id:e[0]<<8|e[1],flags:e[2],size:3,dependsOnEsId:0,ocrEsId:0,descriptors:[],url:""};if(128&t.flags&&(t.dependsOnEsId=e[t.size]<<8|e[t.size+1],t.size+=2),64&t.flags){var n=e[t.size];t.url=Object(r.c)(e.subarray(t.size+1,t.size+1+n)),t.size+=n}return 32&t.flags&&(t.ocrEsId=e[t.size]<<8|e[t.size+1],t.size+=2),t.descriptors=a(e.subarray(t.size))||[],t}},{id:4,parser:function(e){return{tag:4,oti:e[0],streamType:e[1],bufferSize:e[2]<<16|e[3]<<8|e[4],maxBitrate:e[5]<<24|e[6]<<16|e[7]<<8|e[8],avgBitrate:e[9]<<24|e[10]<<16|e[11]<<8|e[12],descriptors:a(e.subarray(13))}}},{id:5,parser:function(e){return{tag:5,bytes:e}}},{id:6,parser:function(e){return{tag:6,bytes:e}}}];var o=function e(t,n,i){void 0===i&&(i=!1),n=function(e){return Array.isArray(e)?e.map((function(e){return s(e)})):[s(e)]}(n),t=Object(r.k)(t);var a=[];if(!n.length)return a;for(var o=0;o<t.length;){var c=(t[o]<<24|t[o+1]<<16|t[o+2]<<8|t[o+3])>>>0,l=t.subarray(o+4,o+8);if(0===c)break;var d=o+c;if(d>t.length){if(i)break;d=t.length}var u=t.subarray(o+8,d);Object(r.a)(l,n[0])&&(1===n.length?a.push(u):a.push.apply(a,e(u,n.slice(1),i))),o=d}return a},c={EBML:Object(r.k)([26,69,223,163]),DocType:Object(r.k)([66,130]),Segment:Object(r.k)([24,83,128,103]),SegmentInfo:Object(r.k)([21,73,169,102]),Tracks:Object(r.k)([22,84,174,107]),Track:Object(r.k)([174]),TrackNumber:Object(r.k)([215]),DefaultDuration:Object(r.k)([35,227,131]),TrackEntry:Object(r.k)([174]),TrackType:Object(r.k)([131]),FlagDefault:Object(r.k)([136]),CodecID:Object(r.k)([134]),CodecPrivate:Object(r.k)([99,162]),VideoTrack:Object(r.k)([224]),AudioTrack:Object(r.k)([225]),Cluster:Object(r.k)([31,67,182,117]),Timestamp:Object(r.k)([231]),TimestampScale:Object(r.k)([42,215,177]),BlockGroup:Object(r.k)([160]),BlockDuration:Object(r.k)([155]),Block:Object(r.k)([161]),SimpleBlock:Object(r.k)([163])},l=[128,64,32,16,8,4,2,1],d=function(e,t,n,i){void 0===n&&(n=!0),void 0===i&&(i=!1);var s=function(e){for(var t=1,n=0;n<l.length&&!(e&l[n]);n++)t++;return t}(e[t]),a=e.subarray(t,t+s);return n&&((a=Array.prototype.slice.call(e,t,t+s))[0]^=l[s-1]),{length:s,value:Object(r.b)(a,{signed:i}),bytes:a}},u=function e(t){return"string"===typeof t?t.match(/.{1,2}/g).map((function(t){return e(t)})):"number"===typeof t?Object(r.f)(t):t},h=function e(t,n,i){if(i>=n.length)return n.length;var s=d(n,i,!1);if(Object(r.a)(t.bytes,s.bytes))return i;var a=d(n,i+s.length);return e(t,n,i+a.length+a.value+s.length)},p=function e(t,n){n=function(e){return Array.isArray(e)?e.map((function(e){return u(e)})):[u(e)]}(n),t=Object(r.k)(t);var i=[];if(!n.length)return i;for(var s=0;s<t.length;){var a=d(t,s,!1),o=d(t,s+a.length),c=s+a.length+o.length;127===o.value&&(o.value=h(a,t,c),o.value!==t.length&&(o.value-=c));var l=c+o.value>t.length?t.length:c+o.value,p=t.subarray(c,l);Object(r.a)(n[0],a.bytes)&&(1===n.length?i.push(p):i=i.concat(e(p,n.slice(1)))),s+=a.length+o.length+p.length}return i},m=n(253),g=Object(r.k)([0,0,0,1]),f=Object(r.k)([0,0,1]),b=Object(r.k)([0,0,3]),y=function(e){for(var t=[],n=1;n<e.length-2;)Object(r.a)(e.subarray(n,n+3),b)&&(t.push(n+2),n++),n++;if(0===t.length)return e;var i=e.length-t.length,s=new Uint8Array(i),a=0;for(n=0;n<i;a++,n++)a===t[0]&&(a++,t.shift()),s[n]=e[a];return s},j=function(e,t,n,i){void 0===i&&(i=1/0),e=Object(r.k)(e),n=[].concat(n);for(var s,a=0,o=0;a<e.length&&(o<i||s);){var c=void 0;if(Object(r.a)(e.subarray(a),g)?c=4:Object(r.a)(e.subarray(a),f)&&(c=3),c){if(o++,s)return y(e.subarray(s,a));var l=void 0;"h264"===t?l=31&e[a+c]:"h265"===t&&(l=e[a+c]>>1&63),-1!==n.indexOf(l)&&(s=a+c),a+=c+("h264"===t?1:2)}else a++}return e.subarray(0,0)},_={webm:Object(r.k)([119,101,98,109]),matroska:Object(r.k)([109,97,116,114,111,115,107,97]),flac:Object(r.k)([102,76,97,67]),ogg:Object(r.k)([79,103,103,83]),ac3:Object(r.k)([11,119]),riff:Object(r.k)([82,73,70,70]),avi:Object(r.k)([65,86,73]),wav:Object(r.k)([87,65,86,69]),"3gp":Object(r.k)([102,116,121,112,51,103]),mp4:Object(r.k)([102,116,121,112]),fmp4:Object(r.k)([115,116,121,112]),mov:Object(r.k)([102,116,121,112,113,116]),moov:Object(r.k)([109,111,111,118]),moof:Object(r.k)([109,111,111,102])},v={aac:function(e){var t=Object(m.a)(e);return Object(r.a)(e,[255,16],{offset:t,mask:[255,22]})},mp3:function(e){var t=Object(m.a)(e);return Object(r.a)(e,[255,2],{offset:t,mask:[255,6]})},webm:function(e){var t=p(e,[c.EBML,c.DocType])[0];return Object(r.a)(t,_.webm)},mkv:function(e){var t=p(e,[c.EBML,c.DocType])[0];return Object(r.a)(t,_.matroska)},mp4:function(e){return!v["3gp"](e)&&!v.mov(e)&&(!(!Object(r.a)(e,_.mp4,{offset:4})&&!Object(r.a)(e,_.fmp4,{offset:4}))||(!(!Object(r.a)(e,_.moof,{offset:4})&&!Object(r.a)(e,_.moov,{offset:4}))||void 0))},mov:function(e){return Object(r.a)(e,_.mov,{offset:4})},"3gp":function(e){return Object(r.a)(e,_["3gp"],{offset:4})},ac3:function(e){var t=Object(m.a)(e);return Object(r.a)(e,_.ac3,{offset:t})},ts:function(e){if(e.length<189&&e.length>=1)return 71===e[0];for(var t=0;t+188<e.length&&t<188;){if(71===e[t]&&71===e[t+188])return!0;t+=1}return!1},flac:function(e){var t=Object(m.a)(e);return Object(r.a)(e,_.flac,{offset:t})},ogg:function(e){return Object(r.a)(e,_.ogg)},avi:function(e){return Object(r.a)(e,_.riff)&&Object(r.a)(e,_.avi,{offset:8})},wav:function(e){return Object(r.a)(e,_.riff)&&Object(r.a)(e,_.wav,{offset:8})},h264:function(e){return function(e,t,n){return j(e,"h264",t,n)}(e,7,3).length},h265:function(e){return function(e,t,n){return j(e,"h265",t,n)}(e,[32,33],3).length}},x=Object.keys(v).filter((function(e){return"ts"!==e&&"h264"!==e&&"h265"!==e})).concat(["ts","h264","h265"]);x.forEach((function(e){var t=v[e];v[e]=function(e){return t(Object(r.k)(e))}}));var O=v,T=function(e){e=Object(r.k)(e);for(var t=0;t<x.length;t++){var n=x[t];if(O[n](e))return n}return""},S=function(e){return o(e,["moof"]).length>0}},323:function(e,t,n){"use strict";n.d(t,"a",(function(){return A})),n.d(t,"b",(function(){return R})),n.d(t,"c",(function(){return de})),n.d(t,"d",(function(){return ue}));var i=n(308),r=n.n(i),s=n(194),a=n.n(s),o="http://example.com",c=function(e,t){if(/^[a-z]+:/i.test(t))return t;/^data:/.test(e)&&(e=a.a.location&&a.a.location.href||"");var n="function"===typeof a.a.URL,i=/^\/\//.test(e),s=!a.a.location&&!/\/\//i.test(e);
2if(n?e=new a.a.URL(e,a.a.location||o):/\/\//i.test(e)||(e=r.a.buildAbsoluteURL(a.a.location&&a.a.location.href||"",e)),n){var c=new URL(t,e);return s?c.href.slice(18):i?c.href.slice(c.protocol.length):c.href}return r.a.buildAbsoluteURL(e,t)},l=n(309),d=n(310);const u=e=>!!e&&"object"===typeof e,h=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return t.reduce(((e,t)=>("object"!==typeof t||Object.keys(t).forEach((n=>{Array.isArray(e[n])&&Array.isArray(t[n])?e[n]=e[n].concat(t[n]):u(e[n])&&u(t[n])?e[n]=h(e[n],t[n]):e[n]=t[n]})),e)),{})},p=e=>Object.keys(e).map((t=>e[t])),m=e=>e.reduce(((e,t)=>e.concat(t)),[]),g=e=>{if(!e.length)return[];const t=[];for(let n=0;n<e.length;n++)t.push(e[n]);return t};var f="INVALID_NUMBER_OF_PERIOD",b="DASH_EMPTY_MANIFEST",y="DASH_INVALID_XML",j="NO_BASE_URL",_="SEGMENT_TIME_UNSPECIFIED",v="UNSUPPORTED_UTC_TIMING_SCHEME";const x=e=>{let{baseUrl:t="",source:n="",range:i="",indexRange:r=""}=e;const s={uri:n,resolvedUri:c(t||"",n)};if(i||r){const e=(i||r).split("-");let t,n=a.a.BigInt?a.a.BigInt(e[0]):parseInt(e[0],10),o=a.a.BigInt?a.a.BigInt(e[1]):parseInt(e[1],10);n<Number.MAX_SAFE_INTEGER&&"bigint"===typeof n&&(n=Number(n)),o<Number.MAX_SAFE_INTEGER&&"bigint"===typeof o&&(o=Number(o)),t="bigint"===typeof o||"bigint"===typeof n?a.a.BigInt(o)-a.a.BigInt(n)+a.a.BigInt(1):o-n+1,"bigint"===typeof t&&t<Number.MAX_SAFE_INTEGER&&(t=Number(t)),s.byterange={length:t,offset:n}}return s},O=e=>(e&&"number"!==typeof e&&(e=parseInt(e,10)),isNaN(e)?null:e),T={static(e){const{duration:t,timescale:n=1,sourceDuration:i,periodDuration:r}=e,s=O(e.endNumber),a=t/n;return"number"===typeof s?{start:0,end:s}:"number"===typeof r?{start:0,end:r/a}:{start:0,end:i/a}},dynamic(e){const{NOW:t,clientOffset:n,availabilityStartTime:i,timescale:r=1,duration:s,periodStart:a=0,minimumUpdatePeriod:o=0,timeShiftBufferDepth:c=1/0}=e,l=O(e.endNumber),d=(t+n)/1e3,u=i+a,h=d+o-u,p=Math.ceil(h*r/s),m=Math.floor((d-u-c)*r/s),g=Math.floor((d-u)*r/s);return{start:Math.max(0,m),end:"number"===typeof l?l:Math.min(p,g)}}},S=e=>{const{type:t,duration:n,timescale:i=1,periodDuration:r,sourceDuration:s}=e,{start:a,end:o}=T[t](e),c=((e,t)=>{const n=[];for(let i=e;i<t;i++)n.push(i);return n})(a,o).map((e=>t=>{const{duration:n,timescale:i=1,periodStart:r,startNumber:s=1}=e;return{number:s+t,duration:n/i,timeline:r,time:t*n}})(e));if("static"===t){const e=c.length-1,t="number"===typeof r?r:s;c[e].duration=t-n/i*e}return c},w=e=>{const{baseUrl:t,initialization:n={},sourceDuration:i,indexRange:r="",periodStart:s,presentationTime:a,number:o=0,duration:c}=e;if(!t)throw new Error(j);const l=x({baseUrl:t,source:n.sourceURL,range:n.range}),d=x({baseUrl:t,source:t,indexRange:r});if(d.map=l,c){const t=S(e);t.length&&(d.duration=t[0].duration,d.timeline=t[0].timeline)}else i&&(d.duration=i,d.timeline=s);return d.presentationTime=a||s,d.number=o,[d]},A=(e,t,n)=>{const i=e.sidx.map?e.sidx.map:null,r=e.sidx.duration,s=e.timeline||0,o=e.sidx.byterange,c=o.offset+o.length,l=t.timescale,d=t.references.filter((e=>1!==e.referenceType)),u=[],h=e.endList?"static":"dynamic",p=e.sidx.timeline;let m,g=p,f=e.mediaSequence||0;m="bigint"===typeof t.firstOffset?a.a.BigInt(c)+t.firstOffset:c+t.firstOffset;for(let b=0;b<d.length;b++){const e=t.references[b],o=e.referencedSize,c=e.subsegmentDuration;let d;d="bigint"===typeof m?m+a.a.BigInt(o)-a.a.BigInt(1):m+o-1;const y="".concat(m,"-").concat(d),j=w({baseUrl:n,timescale:l,timeline:s,periodStart:p,presentationTime:g,number:f,duration:c,sourceDuration:r,indexRange:y,type:h})[0];i&&(j.map=i),u.push(j),m+="bigint"===typeof m?a.a.BigInt(o):o,g+=c/l,f++}return e.segments=u,e},k=["AUDIO","SUBTITLES"],C=1/60,E=e=>{return(t=e,n=e=>{let{timeline:t}=e;return t},p(t.reduce(((e,t)=>(t.forEach((t=>{e[n(t)]=t})),e)),{}))).sort(((e,t)=>e.timeline>t.timeline?1:-1));var t,n},I=e=>{let t=[];var n,i;return n=e,i=(e,n,i,r)=>{t=t.concat(e.playlists||[])},k.forEach((function(e){for(var t in n.mediaGroups[e])for(var r in n.mediaGroups[e][t]){var s=n.mediaGroups[e][t][r];i(s,e,t,r)}})),t},D=e=>{let{playlist:t,mediaSequence:n}=e;
2t.mediaSequence=n,t.segments.forEach(((e,n)=>{e.number=t.mediaSequence+n}))},P=e=>{let{oldManifest:t,newManifest:n}=e;const i=t.playlists.concat(I(t)),r=n.playlists.concat(I(n));return n.timelineStarts=E([t.timelineStarts,n.timelineStarts]),(e=>{let{oldPlaylists:t,newPlaylists:n,timelineStarts:i}=e;n.forEach((e=>{e.discontinuitySequence=i.findIndex((function(t){let{timeline:n}=t;return n===e.timeline}));const n=((e,t)=>{for(let n=0;n<e.length;n++)if(e[n].attributes.NAME===t)return e[n];return null})(t,e.attributes.NAME);if(!n)return;if(e.sidx)return;const r=e.segments[0],s=n.segments.findIndex((function(e){return Math.abs(e.presentationTime-r.presentationTime)<C}));if(-1===s)return D({playlist:e,mediaSequence:n.mediaSequence+n.segments.length}),e.segments[0].discontinuity=!0,e.discontinuityStarts.unshift(0),void((!n.segments.length&&e.timeline>n.timeline||n.segments.length&&e.timeline>n.segments[n.segments.length-1].timeline)&&e.discontinuitySequence--);n.segments[s].discontinuity&&!r.discontinuity&&(r.discontinuity=!0,e.discontinuityStarts.unshift(0),e.discontinuitySequence--),D({playlist:e,mediaSequence:n.segments[s].number})}))})({oldPlaylists:i,newPlaylists:r,timelineStarts:n.timelineStarts}),n},R=e=>e&&e.uri+"-"+(e=>{let t;return t="bigint"===typeof e.offset||"bigint"===typeof e.length?a.a.BigInt(e.offset)+a.a.BigInt(e.length)-a.a.BigInt(1):e.offset+e.length-1,"".concat(e.offset,"-").concat(t)})(e.byterange),L=e=>{const t=e.reduce((function(e,t){return e[t.attributes.baseUrl]||(e[t.attributes.baseUrl]=[]),e[t.attributes.baseUrl].push(t),e}),{});let n=[];return Object.values(t).forEach((e=>{const t=p(e.reduce(((e,t)=>{const n=t.attributes.id+(t.attributes.lang||"");return e[n]?(t.segments&&(t.segments[0]&&(t.segments[0].discontinuity=!0),e[n].segments.push(...t.segments)),t.attributes.contentProtection&&(e[n].attributes.contentProtection=t.attributes.contentProtection)):(e[n]=t,e[n].attributes.timelineStarts=[]),e[n].attributes.timelineStarts.push({start:t.attributes.periodStart,timeline:t.attributes.periodStart}),e}),{}));n=n.concat(t)})),n.map((e=>{var t,n;return e.discontinuityStarts=(t=e.segments||[],n="discontinuity",t.reduce(((e,t,i)=>(t[n]&&e.push(i),e)),[])),e}))},M=(e,t)=>{const n=R(e.sidx),i=n&&t[n]&&t[n].sidx;return i&&A(e,i,e.sidx.resolvedUri),e},N=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!Object.keys(t).length)return e;for(const n in e)e[n]=M(e[n],t);return e},B=e=>{let{attributes:t,segments:n,sidx:i,discontinuityStarts:r}=e;const s={attributes:{NAME:t.id,AUDIO:"audio",SUBTITLES:"subs",RESOLUTION:{width:t.width,height:t.height},CODECS:t.codecs,BANDWIDTH:t.bandwidth,"PROGRAM-ID":1},uri:"",endList:"static"===t.type,timeline:t.periodStart,resolvedUri:t.baseUrl||"",targetDuration:t.duration,discontinuityStarts:r,timelineStarts:t.timelineStarts,segments:n};return t.frameRate&&(s.attributes["FRAME-RATE"]=t.frameRate),t.contentProtection&&(s.contentProtection=t.contentProtection),t.serviceLocation&&(s.attributes.serviceLocation=t.serviceLocation),i&&(s.sidx=i),s},U=e=>{let{attributes:t}=e;return"video/mp4"===t.mimeType||"video/webm"===t.mimeType||"video"===t.contentType},F=e=>{let{attributes:t}=e;return"audio/mp4"===t.mimeType||"audio/webm"===t.mimeType||"audio"===t.contentType},z=e=>{let{attributes:t}=e;return"text/vtt"===t.mimeType||"text"===t.contentType},q=e=>e?Object.keys(e).reduce(((t,n)=>{const i=e[n];return t.concat(i.playlists)}),[]):[],H=e=>{let{dashPlaylists:t,locations:n,contentSteering:i,sidxMapping:r={},previousManifest:s,eventStream:a}=e;if(!t.length)return{};const{sourceDuration:o,type:c,suggestedPresentationDelay:l,minimumUpdatePeriod:d}=t[0].attributes,u=L(t.filter(U)).map(B),h=L(t.filter(F)),p=L(t.filter(z)),m=t.map((e=>e.attributes.captionServices)).filter(Boolean),g={allowCache:!0,discontinuityStarts:[],segments:[],endList:!0,mediaGroups:{AUDIO:{},VIDEO:{},"CLOSED-CAPTIONS":{},SUBTITLES:{}},uri:"",duration:o,playlists:N(u,r)};d>=0&&(g.minimumUpdatePeriod=1e3*d),n&&(g.locations=n),i&&(g.contentSteering=i),"dynamic"===c&&(g.suggestedPresentationDelay=l),a&&a.length>0&&(g.eventStream=a);const f=0===g.playlists.length,b=h.length?function(e){let t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=arguments.length>2&&void 0!==arguments[2]&&arguments[2];const r=e.reduce(((e,r)=>{const s=r.attributes.role&&r.attributes.role.value||"",a=r.attributes.lang||"";let o=r.attributes.label||"main";if(a&&!r.attributes.label){const e=s?" (".concat(s,")"):"";o="".concat(r.attributes.lang).concat(e)}e[o]||(e[o]={language:a,autoselect:!0,default:"main"===s,playlists:[],uri:""});const c=M(((e,t)=>{let{attributes:n,segments:i,sidx:r,mediaSequence:s,discontinuitySequence:a,discontinuityStarts:o}=e;const c={attributes:{NAME:n.id,BANDWIDTH:n.bandwidth,CODECS:n.codecs,"PROGRAM-ID":1},uri:"",endList:"static"===n.type,timeline:n.periodStart,resolvedUri:n.baseUrl||"",targetDuration:n.duration,discontinuitySequence:a,discontinuityStarts:o,timelineStarts:n.timelineStarts,mediaSequence:s,segments:i};return n.contentProtection&&(c.contentProtection=n.contentProtection),n.serviceLocation&&(c.attributes.serviceLocation=n.serviceLocation),r&&(c.sidx=r),t&&(c.attributes.AUDIO="audio",c.attributes.SUBTITLES="subs"),c})(r,i),n);return e[o].playlists.push(c),"undefined"===typeof t&&"main"===s&&(t=r,t.default=!0),e}),{});t||(r[Object.keys(r)[0]].default=!0);return r}(h,r,f):null,y=p.length?function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e.reduce(((e,n)=>{const i=n.attributes.label||n.attributes.lang||"text",r=n.attributes.lang||"und";return e[i]||(e[i]={language:r,default:!1,autoselect:!1,playlists:[],uri:""}),e[i].playlists.push(M((e=>{let{attributes:t,segments:n,mediaSequence:i,discontinuityStarts:r,discontinuitySequence:s}=e;"undefined"===typeof n&&(n=[{uri:t.baseUrl,timeline:t.periodStart,resolvedUri:t.baseUrl||"",duration:t.sourceDuration,number:0}],t.duration=t.sourceDuration);const a={NAME:t.id,BANDWIDTH:t.bandwidth,"PROGRAM-ID":1};t.codecs&&(a.CODECS=t.codecs);const o={attributes:a,uri:"",endList:"static"===t.type,timeline:t.periodStart,resolvedUri:t.baseUrl||"",targetDuration:t.duration,timelineStarts:t.timelineStarts,discontinuityStarts:r,discontinuitySequence:s,mediaSequence:i,segments:n};return t.serviceLocation&&(o.attributes.serviceLocation=t.serviceLocation),o})(n),t)),e}),{})}(p,r):null,j=u.concat(q(b),q(y)),_=j.map((e=>{let{timelineStarts:t}=e;return t}));var v,x;return g.timelineStarts=E(_),v=j,x=g.timelineStarts,v.forEach((e=>{e.mediaSequence=0,e.discontinuitySequence=x.findIndex((function(t){let{timeline:n}=t;return n===e.timeline}
2)),e.segments&&e.segments.forEach(((e,t)=>{e.number=t}))})),b&&(g.mediaGroups.AUDIO.audio=b),y&&(g.mediaGroups.SUBTITLES.subs=y),m.length&&(g.mediaGroups["CLOSED-CAPTIONS"].cc=m.reduce(((e,t)=>t?(t.forEach((t=>{const{channel:n,language:i}=t;e[i]={autoselect:!1,default:!1,instreamId:n,language:i},t.hasOwnProperty("aspectRatio")&&(e[i].aspectRatio=t.aspectRatio),t.hasOwnProperty("easyReader")&&(e[i].easyReader=t.easyReader),t.hasOwnProperty("3D")&&(e[i]["3D"]=t["3D"])})),e):e),{})),s?P({oldManifest:s,newManifest:g}):g},V=(e,t,n)=>{const{NOW:i,clientOffset:r,availabilityStartTime:s,timescale:a=1,periodStart:o=0,minimumUpdatePeriod:c=0}=e,l=(i+r)/1e3+c-(s+o);return Math.ceil((l*a-t)/n)},W=(e,t)=>{const{type:n,minimumUpdatePeriod:i=0,media:r="",sourceDuration:s,timescale:a=1,startNumber:o=1,periodStart:c}=e,l=[];let d=-1;for(let u=0;u<t.length;u++){const h=t[u],p=h.d,m=h.r||0,g=h.t||0;let f;if(d<0&&(d=g),g&&g>d&&(d=g),m<0){const o=u+1;f=o===t.length?"dynamic"===n&&i>0&&r.indexOf("$Number$")>0?V(e,d,p):(s*a-d)/p:(t[o].t-d)/p}else f=m+1;const b=o+l.length+f;let y=o+l.length;for(;y<b;)l.push({number:y,duration:p/a,time:d,timeline:c}),d+=p,y++}return l},G=/\$([A-z]*)(?:(%0)([0-9]+)d)?\$/g,X=(e,t)=>e.replace(G,(e=>(t,n,i,r)=>{if("$$"===t)return"$";if("undefined"===typeof e[n])return t;const s=""+e[n];return"RepresentationID"===n?s:(r=i?parseInt(r,10):1,s.length>=r?s:"".concat(new Array(r-s.length+1).join("0")).concat(s))})(t)),Y=(e,t)=>{const n={RepresentationID:e.id,Bandwidth:e.bandwidth||0},{initialization:i={sourceURL:"",range:""}}
vendor: 4,285 bytes, line 2
2=e,r=x({baseUrl:e.baseUrl,source:X(i.sourceURL,n),range:i.range}),s=((e,t)=>e.duration||t?e.duration?S(e):W(e,t):[{number:e.startNumber||1,duration:e.sourceDuration,time:0,timeline:e.periodStart}])(e,t);return s.map((t=>{n.Number=t.number,n.Time=t.time;const i=X(e.media||"",n),s=e.timescale||1,a=e.presentationTimeOffset||0,o=e.periodStart+(t.time-a)/s;return{uri:i,timeline:t.timeline,duration:t.duration,resolvedUri:c(e.baseUrl||"",i),map:r,number:t.number,presentationTime:o}}))},K=(e,t)=>{const{duration:n,segmentUrls:i=[],periodStart:r}=e;if(!n&&!t||n&&t)throw new Error(_);const s=i.map((t=>((e,t)=>{const{baseUrl:n,initialization:i={}}=e,r=x({baseUrl:n,source:i.sourceURL,range:i.range}),s=x({baseUrl:n,source:t.media,range:t.mediaRange});return s.map=r,s})(e,t)));let a;n&&(a=S(e)),t&&(a=W(e,t));return a.map(((t,n)=>{if(s[n]){const i=s[n],a=e.timescale||1,o=e.presentationTimeOffset||0;return i.timeline=t.timeline,i.duration=t.duration,i.number=t.number,i.presentationTime=r+(t.time-o)/a,i}})).filter((e=>e))},Q=e=>{let t,n,{attributes:i,segmentInfo:r}=e;r.template?(n=Y,t=h(i,r.template)):r.base?(n=w,t=h(i,r.base)):r.list&&(n=K,t=h(i,r.list));const s={attributes:i};if(!n)return s;const a=n(t,r.segmentTimeline);if(t.duration){const{duration:e,timescale:n=1}=t;t.duration=e/n}else a.length?t.duration=a.reduce(((e,t)=>Math.max(e,Math.ceil(t.duration))),0):t.duration=0;return s.attributes=t,s.segments=a,r.base&&t.indexRange&&(s.sidx=a[0],s.segments=[]),s},Z=(e,t)=>g(e.childNodes).filter((e=>{let{tagName:n}=e;return n===t})),J=e=>e.textContent.trim(),$=e=>{const t=/P(?:(\d*)Y)?(?:(\d*)M)?(?:(\d*)D)?(?:T(?:(\d*)H)?(?:(\d*)M)?(?:([\d.]*)S)?)?/.exec(e);if(!t)return 0;const[n,i,r,s,a,o]=t.slice(1);return 31536e3*parseFloat(n||0)+2592e3*parseFloat(i||0)+86400*parseFloat(r||0)+3600*parseFloat(s||0)+60*parseFloat(a||0)+parseFloat(o||0)},ee={mediaPresentationDuration:e=>$(e),availabilityStartTime(e){return/^\d+-\d+-\d+T\d+:\d+:\d+(\.\d+)?$/.test(t=e)&&(t+="Z"),Date.parse(t)/1e3;var t},minimumUpdatePeriod:e=>$(e),suggestedPresentationDelay:e=>$(e),type:e=>e,timeShiftBufferDepth:e=>$(e),start:e=>$(e),width:e=>parseInt(e,10),height:e=>parseInt(e,10),bandwidth:e=>parseInt(e,10),frameRate:e=>(e=>parseFloat(e.split("/").reduce(((e,t)=>e/t))))(e),startNumber:e=>parseInt(e,10),timescale:e=>parseInt(e,10),presentationTimeOffset:e=>parseInt(e,10),duration(e){const t=parseInt(e,10);return isNaN(t)?$(e):t},d:e=>parseInt(e,10),t:e=>parseInt(e,10),r:e=>parseInt(e,10),presentationTime:e=>parseInt(e,10),DEFAULT:e=>e},te=e=>e&&e.attributes?g(e.attributes).reduce(((e,t)=>{const n=ee[t.name]||ee.DEFAULT;return e[t.name]=n(t.value),e}),{}):{},ne={"urn:uuid:1077efec-c0b2-4d02-ace3-3c1e52e2fb4b":"org.w3.clearkey","urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed":"com.widevine.alpha","urn:uuid:9a04f079-9840-4286-ab92-e65be0885f95":"com.microsoft.playready","urn:uuid:f239e769-efa3-4850-9c16-a903c6932efb":"com.adobe.primetime","urn:mpeg:dash:mp4protection:2011":"mp4protection"},ie=(e,t)=>t.length?m(e.map((function(e){return t.map((function(t){const n=J(t),i=c(e.baseUrl,n),r=h(te(t),{baseUrl:i});return i!==n&&!r.serviceLocation&&e.serviceLocation&&(r.serviceLocation=e.serviceLocation),r}))}))):e,re=e=>{const t=Z(e,"SegmentTemplate")[0],n=Z(e,"SegmentList")[0],i=n&&Z(n,"SegmentURL").map((e=>h({tag:"SegmentURL"},te(e)))),r=Z(e,"SegmentBase")[0],s=n||t,a=s&&Z(s,"SegmentTimeline")[0],o=n||r||t,c=o&&Z(o,"Initialization")[0],l=t&&te(t);l&&c?l.initialization=c&&te(c):l&&l.initialization&&(l.initialization={sourceURL:l.initialization});const d={template:l,segmentTimeline:a&&Z(a,"S").map((e=>te(e))),list:n&&h(te(n),{segmentUrls:i,initialization:te(c)}),base:r&&h(te(r),{initialization:te(c)})};return Object.keys(d).forEach((e=>{d[e]||delete d[e]})),d},se=e=>m(Z(e.node,"EventStream").map((t=>{const n=te(t),i=n.schemeIdUri;return Z(t,"Event").map((t=>{const r=te(t),s=r.presentationTime||0,a=n.timescale||1,o=r.duration||0,c=s/a+e.attributes.start;return{schemeIdUri:i,value:n.value,id:r.id,start:c,end:c+o/a,messageData:J(t)||r.messageData,contentEncoding:n.contentEncoding,presentationTimeOffset:n.presentationTimeOffset||0}}))}))),ae=(e,t,n)=>i=>{const r=te(i),s=ie(t,Z(i,"BaseURL")),a=Z(i,"Role")[0],o={role:te(a)};let c=h(e,r,o);const d=Z(i,"Accessibility")[0],u=(e=>
2{if("urn:scte:dash:cc:cea-608:2015"===e.schemeIdUri)return("string"!==typeof e.value?[]:e.value.split(";")).map((e=>{let t,n;return n=e,/^CC\d=/.test(e)?[t,n]=e.split("="):/^CC\d$/.test(e)&&(t=e),{channel:t,language:n}}));if("urn:scte:dash:cc:cea-708:2015"===e.schemeIdUri)return("string"!==typeof e.value?[]:e.value.split(";")).map((e=>{const t={channel:void 0,language:void 0,aspectRatio:1,easyReader:0,"3D":0};if(/=/.test(e)){const[n,i=""]=e.split("=");t.channel=n,t.language=e,i.split(",").forEach((e=>{const[n,i]=e.split(":");"lang"===n?t.language=i:"er"===n?t.easyReader=Number(i):"war"===n?t.aspectRatio=Number(i):"3D"===n&&(t["3D"]=Number(i))}))}else t.language=e;return t.channel&&(t.channel="SERVICE"+t.channel),t}))})(te(d));u&&(c=h(c,{captionServices:u}));const p=Z(i,"Label")[0];if(p&&p.childNodes.length){const e=p.childNodes[0].nodeValue.trim();c=h(c,{label:e})}const g=Z(i,"ContentProtection").reduce(((e,t)=>{const n=te(t);n.schemeIdUri&&(n.schemeIdUri=n.schemeIdUri.toLowerCase());const i=ne[n.schemeIdUri];if(i){e[i]={attributes:n};const r=Z(t,"cenc:pssh")[0];if(r){const t=J(r);e[i].pssh=t&&Object(l.a)(t)}}return e}),{});Object.keys(g).length&&(c=h(c,{contentProtection:g}));const f=re(i),b=Z(i,"Representation"),y=h(n,f);return m(b.map(((e,t,n)=>i=>{const r=Z(i,"BaseURL"),s=ie(t,r),a=h(e,te(i)),o=re(i);return s.map((e=>({segmentInfo:h(n,o),attributes:h(a,e)})))})(c,s,y)))},oe=(e,t)=>(n,i)=>{const r=ie(t,Z(n.node,"BaseURL")),s=h(e,{periodStart:n.attributes.start});"number"===typeof n.attributes.duration&&(s.periodDuration=n.attributes.duration);const a=Z(n.node,"AdaptationSet"),o=re(n.node);return m(a.map(ae(s,r,o)))},ce=(e,t)=>{if(e.length>1&&t({type:"warn",message:"The MPD manifest should contain no more than one ContentSteering tag"}),!e.length)return null;const n=h({serverURL:J(e[0])},te(e[0]));return n.queryBeforeStart="true"===n.queryBeforeStart,n},le=e=>{if(""===e)throw new Error(b);const t=new d.DOMParser;let n,i;try{n=t.parseFromString(e,"application/xml"),i=n&&"MPD"===n.documentElement.tagName?n.documentElement:null}catch(r){}if(!i||i&&i.getElementsByTagName("parsererror").length>0)throw new Error(y);return i},de=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const n=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const{manifestUri:n="",NOW:i=Date.now(),clientOffset:r=0,eventHandler:s=function(){}}=t,a=Z(e,"Period");if(!a.length)throw new Error(f);const o=Z(e,"Location"),c=te(e),l=ie([{baseUrl:n}],Z(e,"BaseURL")),d=Z(e,"ContentSteering");c.type=c.type||"static",c.sourceDuration=c.mediaPresentationDuration||0,c.NOW=i,c.clientOffset=r,o.length&&(c.locations=o.map(J));const u=[];return a.forEach(((e,t)=>{const n=te(e),i=u[t-1];n.start=(e=>{let{attributes:t,priorPeriodAttributes:n,mpdType:i}=e;return"number"===typeof t.start?t.start:n&&"number"===typeof n.start&&"number"===typeof n.duration?n.start+n.duration:n||"static"!==i?null:0})({attributes:n,priorPeriodAttributes:i?i.attributes:null,mpdType:c.type}),u.push({node:e,attributes:n})})),{locations:c.locations,contentSteeringInfo:ce(d,s),representationInfo:m(u.map(oe(c,l))),eventStream:m(u.map(se))}}(le(e),t),i=n.representationInfo.map(Q);return H({dashPlaylists:i,locations:n.locations,contentSteering:n.contentSteeringInfo,sidxMapping:t.sidxMapping,previousManifest:t.previousManifest,eventStream:n.eventStream})},ue=e=>(e=>{const t=Z(e,"UTCTiming")[0];if(!t)return null;const n=te(t);switch(n.schemeIdUri){case"urn:mpeg:dash:utc:http-head:2014":case"urn:mpeg:dash:utc:http-head:2012":n.method="HEAD";break;case"urn:mpeg:dash:utc:http-xsdate:2014":case"urn:mpeg:dash:utc:http-iso:2014":case"urn:mpeg:dash:utc:http-xsdate:2012":case"urn:mpeg:dash:utc:http-iso:2012":n.method="GET";break;case"urn:mpeg:dash:utc:direct:2014":case"urn:mpeg:dash:utc:direct:2012":n.method="DIRECT",n.value=Date.parse(n.value);break;default:throw new Error(v)}return n})(le(e))},324:function(e,t,n){"use strict";n.d(t,"a",(function(){return g}));var i=function(){function e(){this.listeners={}}var t=e.prototype;return t.on=function(e,t){this.listeners[e]||(this.listeners[e]=[]),this.listeners[e].push(t)},t.off=function(e,t){if(!this.listeners[e])return!1;var n=this.listeners[e].indexOf(t);return this.listeners[e]=this.listeners[e].slice(0),this.listeners[e].splice(n,1),n>-1},t.trigger=function(e){var t=this.listeners[e];if(t)if(2===arguments.length)for(var n=t.length,i=0;i<n;++i)t[i].call(this,arguments[1]);
vendor: 5,651 bytes, line 2
2else for(var r=Array.prototype.slice.call(arguments,1),s=t.length,a=0;a<s;++a)t[a].apply(this,r)},t.dispose=function(){this.listeners={}},t.pipe=function(e){this.on("data",(function(t){e.push(t)}))},e}(),r=n(83),s=n.n(r),a=n(302);class o extends i{constructor(){super(),this.buffer=""}push(e){let t;for(this.buffer+=e,t=this.buffer.indexOf("\n");t>-1;t=this.buffer.indexOf("\n"))this.trigger("data",this.buffer.substring(0,t)),this.buffer=this.buffer.substring(t+1)}}const c=String.fromCharCode(9),l=function(e){const t=/([0-9.]*)?@?([0-9.]*)?/.exec(e||""),n={};return t[1]&&(n.length=parseInt(t[1],10)),t[2]&&(n.offset=parseInt(t[2],10)),n},d=function(e){const t={};if(!e)return t;const n=e.split(new RegExp('(?:^|,)((?:[^=]*)=(?:"[^"]*"|[^,]*))'));let i,r=n.length;for(;r--;)""!==n[r]&&(i=/([^=]*)=(.*)/.exec(n[r]).slice(1),i[0]=i[0].replace(/^\s+|\s+$/g,""),i[1]=i[1].replace(/^\s+|\s+$/g,""),i[1]=i[1].replace(/^['"](.*)['"]$/g,"$1"),t[i[0]]=i[1]);return t},u=e=>{const t=e.split("x"),n={};return t[0]&&(n.width=parseInt(t[0],10)),t[1]&&(n.height=parseInt(t[1],10)),n};class h extends i{constructor(){super(),this.customParsers=[],this.tagMappers=[]}push(e){let t,n;if(0===(e=e.trim()).length)return;if("#"!==e[0])return void this.trigger("data",{type:"uri",uri:e});this.tagMappers.reduce(((t,n)=>{const i=n(e);return i===e?t:t.concat([i])}),[e]).forEach((e=>{for(let t=0;t<this.customParsers.length;t++)if(this.customParsers[t].call(this,e))return;if(0===e.indexOf("#EXT"))if(e=e.replace("\r",""),t=/^#EXTM3U/.exec(e),t)this.trigger("data",{type:"tag",tagType:"m3u"});else{if(t=/^#EXTINF:([0-9\.]*)?,?(.*)?$/.exec(e),t)return n={type:"tag",tagType:"inf"},t[1]&&(n.duration=parseFloat(t[1])),t[2]&&(n.title=t[2]),void this.trigger("data",n);if(t=/^#EXT-X-TARGETDURATION:([0-9.]*)?/.exec(e),t)return n={type:"tag",tagType:"targetduration"},t[1]&&(n.duration=parseInt(t[1],10)),void this.trigger("data",n);if(t=/^#EXT-X-VERSION:([0-9.]*)?/.exec(e),t)return n={type:"tag",tagType:"version"},t[1]&&(n.version=parseInt(t[1],10)),void this.trigger("data",n);if(t=/^#EXT-X-MEDIA-SEQUENCE:(\-?[0-9.]*)?/.exec(e),t)return n={type:"tag",tagType:"media-sequence"},t[1]&&(n.number=parseInt(t[1],10)),void this.trigger("data",n);if(t=/^#EXT-X-DISCONTINUITY-SEQUENCE:(\-?[0-9.]*)?/.exec(e),t)return n={type:"tag",tagType:"discontinuity-sequence"},t[1]&&(n.number=parseInt(t[1],10)),void this.trigger("data",n);if(t=/^#EXT-X-PLAYLIST-TYPE:(.*)?$/.exec(e),t)return n={type:"tag",tagType:"playlist-type"},t[1]&&(n.playlistType=t[1]),void this.trigger("data",n);if(t=/^#EXT-X-BYTERANGE:(.*)?$/.exec(e),t)return n=s()(l(t[1]),{type:"tag",tagType:"byterange"}),void this.trigger("data",n);if(t=/^#EXT-X-ALLOW-CACHE:(YES|NO)?/.exec(e),t)return n={type:"tag",tagType:"allow-cache"},t[1]&&(n.allowed=!/NO/.test(t[1])),void this.trigger("data",n);if(t=/^#EXT-X-MAP:(.*)$/.exec(e),t){if(n={type:"tag",tagType:"map"},t[1]){const e=d(t[1]);e.URI&&(n.uri=e.URI),e.BYTERANGE&&(n.byterange=l(e.BYTERANGE))}this.trigger("data",n)}else{if(t=/^#EXT-X-STREAM-INF:(.*)$/.exec(e),t)return n={type:"tag",tagType:"stream-inf"},t[1]&&(n.attributes=d(t[1]),n.attributes.RESOLUTION&&(n.attributes.RESOLUTION=u(n.attributes.RESOLUTION)),n.attributes.BANDWIDTH&&(n.attributes.BANDWIDTH=parseInt(n.attributes.BANDWIDTH,10)),n.attributes["FRAME-RATE"]&&(n.attributes["FRAME-RATE"]=parseFloat(n.attributes["FRAME-RATE"])),n.attributes["PROGRAM-ID"]&&(n.attributes["PROGRAM-ID"]=parseInt(n.attributes["PROGRAM-ID"],10))),void this.trigger("data",n);if(t=/^#EXT-X-MEDIA:(.*)$/.exec(e),t)return n={type:"tag",tagType:"media"},t[1]&&(n.attributes=d(t[1])),void this.trigger("data",n);if(t=/^#EXT-X-ENDLIST/.exec(e),t)this.trigger("data",{type:"tag",tagType:"endlist"});else if(t=/^#EXT-X-DISCONTINUITY/.exec(e),t)this.trigger("data",{type:"tag",tagType:"discontinuity"});else{if(t=/^#EXT-X-PROGRAM-DATE-TIME:(.*)$/.exec(e),t)return n={type:"tag",tagType:"program-date-time"},t[1]&&(n.dateTimeString=t[1],n.dateTimeObject=new Date(t[1])),void this.trigger("data",n);if(t=/^#EXT-X-KEY:(.*)$/.exec(e),t)return n={type:"tag",tagType:"key"},t[1]&&(n.attributes=d(t[1]),n.attributes.IV&&("0x"===n.attributes.IV.substring(0,2).toLowerCase()&&(n.attributes.IV=n.attributes.IV.substring(2)),n.attributes.IV=n.attributes.IV.match(/.{8}/g),n.attributes.IV[0]=parseInt(n.attributes.IV[0],16),n.attributes.IV[1]=parseInt(n.attributes.IV[1],16),n.attributes.IV[2]=parseInt(n.attributes.IV[2],16),n.attributes.IV[3]=parseInt(n.attributes.IV[3],16),n.attributes.IV=new Uint32Array(n.attributes.IV))),void this.trigger("data",n);if(t=/^#EXT-X-START:(.*)$/.exec(e),t)return n={type:"tag",tagType:"start"},t[1]&&(n.attributes=d(t[1]),n.attributes["TIME-OFFSET"]=parseFloat(n.attributes["TIME-OFFSET"]),n.attributes.PRECISE=/YES/.test(n.attributes.PRECISE)),void this.trigger("data",n);if(t=/^#EXT-X-CUE-OUT-CONT:(.*)?$/.exec(e),t)return n={type:"tag",tagType:"cue-out-cont"},t[1]?n.data=t[1]:n.data="",void this.trigger("data",n);if(t=/^#EXT-X-CUE-OUT:(.*)?$/.exec(e),t)return n={type:"tag",tagType:"cue-out"},t[1]?n.data=t[1]:n.data="",void this.trigger("data",n);if(t=/^#EXT-X-CUE-IN:?(.*)?$/.exec(e),t)return n={type:"tag",tagType:"cue-in"},t[1]?n.data=t[1]:n.data="",void this.trigger("data",n);if(t=/^#EXT-X-SKIP:(.*)$/.exec(e),t&&t[1])return n={type:"tag",tagType:"skip"},n.attributes=d(t[1]),n.attributes.hasOwnProperty("SKIPPED-SEGMENTS")&&(n.attributes["SKIPPED-SEGMENTS"]=parseInt(n.attributes["SKIPPED-SEGMENTS"],10)),n.attributes.hasOwnProperty("RECENTLY-REMOVED-DATERANGES")&&(n.attributes["RECENTLY-REMOVED-DATERANGES"]=n.attributes["RECENTLY-REMOVED-DATERANGES"].split(c)),void this.trigger("data",n);
2if(t=/^#EXT-X-PART:(.*)$/.exec(e),t&&t[1])return n={type:"tag",tagType:"part"},n.attributes=d(t[1]),["DURATION"].forEach((function(e){n.attributes.hasOwnProperty(e)&&(n.attributes[e]=parseFloat(n.attributes[e]))})),["INDEPENDENT","GAP"].forEach((function(e){n.attributes.hasOwnProperty(e)&&(n.attributes[e]=/YES/.test(n.attributes[e]))})),n.attributes.hasOwnProperty("BYTERANGE")&&(n.attributes.byterange=l(n.attributes.BYTERANGE)),void this.trigger("data",n);if(t=/^#EXT-X-SERVER-CONTROL:(.*)$/.exec(e),t&&t[1])return n={type:"tag",tagType:"server-control"},n.attributes=d(t[1]),["CAN-SKIP-UNTIL","PART-HOLD-BACK","HOLD-BACK"].forEach((function(e){n.attributes.hasOwnProperty(e)&&(n.attributes[e]=parseFloat(n.attributes[e]))})),["CAN-SKIP-DATERANGES","CAN-BLOCK-RELOAD"].forEach((function(e){n.attributes.hasOwnProperty(e)&&(n.attributes[e]=/YES/.test(n.attributes[e]))})),void this.trigger("data",n);if(t=/^#EXT-X-PART-INF:(.*)$/.exec(e),t&&t[1])return n={type:"tag",tagType:"part-inf"},n.attributes=d(t[1]),["PART-TARGET"].forEach((function(e){n.attributes.hasOwnProperty(e)&&(n.attributes[e]=parseFloat(n.attributes[e]))})),void this.trigger("data",n);if(t=/^#EXT-X-PRELOAD-HINT:(.*)$/.exec(e),t&&t[1])return n={type:"tag",tagType:"preload-hint"},n.attributes=d(t[1]),["BYTERANGE-START","BYTERANGE-LENGTH"].forEach((function(e){if(n.attributes.hasOwnProperty(e)){n.attributes[e]=parseInt(n.attributes[e],10);const t="BYTERANGE-LENGTH"===e?"length":"offset";n.attributes.byterange=n.attributes.byterange||{},n.attributes.byterange[t]=n.attributes[e],delete n.attributes[e]}})),void this.trigger("data",n);if(t=/^#EXT-X-RENDITION-REPORT:(.*)$/.exec(e),t&&t[1])return n={type:"tag",tagType:"rendition-report"},n.attributes=d(t[1]),["LAST-MSN","LAST-PART"].forEach((function(e){n.attributes.hasOwnProperty(e)&&(n.attributes[e]=parseInt(n.attributes[e],10))})),void this.trigger("data",n);if(t=/^#EXT-X-DATERANGE:(.*)$/.exec(e),t&&t[1]){n={type:"tag",tagType:"daterange"},n.attributes=d(t[1]),["ID","CLASS"].forEach((function(e){n.attributes.hasOwnProperty(e)&&(n.attributes[e]=String(n.attributes[e]))})),["START-DATE","END-DATE"].forEach((function(e){n.attributes.hasOwnProperty(e)&&(n.attributes[e]=new Date(n.attributes[e]))})),["DURATION","PLANNED-DURATION"].forEach((function(e){n.attributes.hasOwnProperty(e)&&(n.attributes[e]=parseFloat(n.attributes[e]))})),["END-ON-NEXT"].forEach((function(e){n.attributes.hasOwnProperty(e)&&(n.attributes[e]=/YES/i.test(n.attributes[e]))})),["SCTE35-CMD"," SCTE35-OUT","SCTE35-IN"].forEach((function(e){n.attributes.hasOwnProperty(e)&&(n.attributes[e]=n.attributes[e].toString(16))}));const e=/^X-([A-Z]+-)+[A-Z]+$/;for(const t in n.attributes){if(!e.test(t))continue;const i=/[0-9A-Fa-f]{6}/g.test(n.attributes[t]),r=/^\d+(\.\d+)?$/.test(n.attributes[t]);n.attributes[t]=i?n.attributes[t].toString(16):r?parseFloat(n.attributes[t]):String(n.attributes[t])}this.trigger("data",n)}else if(t=/^#EXT-X-INDEPENDENT-SEGMENTS/.exec(e),t)this.trigger("data",{type:"tag",tagType:"independent-segments"});else if(t=/^#EXT-X-I-FRAMES-ONLY/.exec(e),t)this.trigger("data",{type:"tag",tagType:"i-frames-only"});else{if(t=/^#EXT-X-CONTENT-STEERING:(.*)$/.exec(e),t)return n={type:"tag",tagType:"content-steering"},n.attributes=d(t[1]),void this.trigger("data",n);if(t=/^#EXT-X-I-FRAME-STREAM-INF:(.*)$/.exec(e),t)return n={type:"tag",tagType:"i-frame-playlist"},n.attributes=d(t[1]),n.attributes.URI&&(n.uri=n.attributes.URI),n.attributes.BANDWIDTH&&(n.attributes.BANDWIDTH=parseInt(n.attributes.BANDWIDTH,10)),n.attributes.RESOLUTION&&(n.attributes.RESOLUTION=u(n.attributes.RESOLUTION)),n.attributes["AVERAGE-BANDWIDTH"]&&(n.attributes["AVERAGE-BANDWIDTH"]=parseInt(n.attributes["AVERAGE-BANDWIDTH"],10)),n.attributes["FRAME-RATE"]&&(n.attributes["FRAME-RATE"]=parseFloat(n.attributes["FRAME-RATE"])),void this.trigger("data",n);if(t=/^#EXT-X-DEFINE:(.*)$/.exec(e),t)return n={type:"tag",tagType:"define"},n.attributes=d(t[1]),void this.trigger("data",n);this.trigger("data",{type:"tag",data:e.slice(4)})}}}}else this.trigger("data",{type:"comment",text:e.slice(1)})}))}addParser(e){let{expression:t,customType:n,dataParser:i,segment:r}=e;"function"!==typeof i&&(i=e=>e),this.customParsers.push((e=>{if(t.exec(e))return this.trigger("data",{type:"custom",data:i(e),customType:n,segment:r}),!0}))}addTagMapper(e){let{expression:t,map:n}=e;this.tagMappers.push((e=>t.test(e)?n(e):e))}}const p=function(e){const t={};return Object.keys(e).forEach((function(n){var i;t[(i=n,i.toLowerCase().replace(/-(\w)/g,(e=>e[1].toUpperCase())))]=e[n]})),t},m=function(e){const{serverControl:t,targetDuration:n,partTargetDuration:i}=e;if(!t)return;const r="#EXT-X-SERVER-CONTROL",s="holdBack",a="partHoldBack",o=n&&3*n,c=i&&2*i;n&&!t.hasOwnProperty(s)&&(t[s]=o,this.trigger("info",{message:"".concat(r," defaulting HOLD-BACK to targetDuration * 3 (").concat(o,").")})),o&&t[s]<o&&(this.trigger("warn",{message:"".concat(r," clamping HOLD-BACK (").concat(t[s],") to targetDuration * 3 (").concat(o,")")}),t[s]=o),i&&!t.hasOwnProperty(a)&&(t[a]=3*i,this.trigger("info",{message:"".concat(r," defaulting PART-HOLD-BACK to partTargetDuration * 3 (").concat(t[a],").")})),i&&t[a]<c&&(this.trigger("warn",{message:"".concat(r," clamping PART-HOLD-BACK (").concat(t[a],") to partTargetDuration * 2 (").concat(c,").")}),t[a]=c)};class g extends i{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};super(),this.lineStream=new o,this.parseStream=new h,this.lineStream.pipe(this.parseStream),this.mainDef
vendor: 9,620 bytes, line 2
2initions=e.mainDefinitions||{},this.params=new URL(e.uri,"https://a.com").searchParams,this.lastProgramDateTime=null;const t=this,n=[];let i,r,c={},l=!1;const d=function(){},u={AUDIO:{},VIDEO:{},"CLOSED-CAPTIONS":{},SUBTITLES:{}};let g=0;this.manifest={allowCache:!0,discontinuityStarts:[],dateRanges:[],iFramePlaylists:[],segments:[]};let f=0,b=0;const y={};this.on("end",(()=>{c.uri||!c.parts&&!c.preloadHints||(!c.map&&i&&(c.map=i),!c.key&&r&&(c.key=r),c.timeline||"number"!==typeof g||(c.timeline=g),this.manifest.preloadSegment=c)})),this.parseStream.on("data",(function(e){let o,h;if(t.manifest.definitions)for(const n in t.manifest.definitions)if(e.uri&&(e.uri=e.uri.replace("{$".concat(n,"}"),t.manifest.definitions[n])),e.attributes)for(const i in e.attributes)"string"===typeof e.attributes[i]&&(e.attributes[i]=e.attributes[i].replace("{$".concat(n,"}"),t.manifest.definitions[n]));({tag(){({version(){e.version&&(this.manifest.version=e.version)},"allow-cache"(){this.manifest.allowCache=e.allowed,"allowed"in e||(this.trigger("info",{message:"defaulting allowCache to YES"}),this.manifest.allowCache=!0)},byterange(){const t={};"length"in e&&(c.byterange=t,t.length=e.length,"offset"in e||(e.offset=f)),"offset"in e&&(c.byterange=t,t.offset=e.offset),f=t.offset+t.length},endlist(){this.manifest.endList=!0},inf(){"mediaSequence"in this.manifest||(this.manifest.mediaSequence=0,this.trigger("info",{message:"defaulting media sequence to zero"})),"discontinuitySequence"in this.manifest||(this.manifest.discontinuitySequence=0,this.trigger("info",{message:"defaulting discontinuity sequence to zero"})),e.title&&(c.title=e.title),e.duration>0&&(c.duration=e.duration),0===e.duration&&(c.duration=.01,this.trigger("info",{message:"updating zero segment duration to a small value"})),this.manifest.segments=n},key(){if(e.attributes)if("NONE"!==e.attributes.METHOD)if(e.attributes.URI){if("com.apple.streamingkeydelivery"===e.attributes.KEYFORMAT)return this.manifest.contentProtection=this.manifest.contentProtection||{},void(this.manifest.contentProtection["com.apple.fps.1_0"]={attributes:e.attributes});if("com.microsoft.playready"===e.attributes.KEYFORMAT)return this.manifest.contentProtection=this.manifest.contentProtection||{},void(this.manifest.contentProtection["com.microsoft.playready"]={uri:e.attributes.URI});if("urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed"===e.attributes.KEYFORMAT){return-1===["SAMPLE-AES","SAMPLE-AES-CTR","SAMPLE-AES-CENC"].indexOf(e.attributes.METHOD)?void this.trigger("warn",{message:"invalid key method provided for Widevine"}):("SAMPLE-AES-CENC"===e.attributes.METHOD&&this.trigger("warn",{message:"SAMPLE-AES-CENC is deprecated, please use SAMPLE-AES-CTR instead"}),"data:text/plain;base64,"!==e.attributes.URI.substring(0,23)?void this.trigger("warn",{message:"invalid key URI provided for Widevine"}):e.attributes.KEYID&&"0x"===e.attributes.KEYID.substring(0,2)?(this.manifest.contentProtection=this.manifest.contentProtection||{},void(this.manifest.contentProtection["com.widevine.alpha"]={attributes:{schemeIdUri:e.attributes.KEYFORMAT,keyId:e.attributes.KEYID.substring(2)},pssh:Object(a.a)(e.attributes.URI.split(",")[1])})):void this.trigger("warn",{message:"invalid key ID provided for Widevine"}))}e.attributes.METHOD||this.trigger("warn",{message:"defaulting key method to AES-128"}),r={method:e.attributes.METHOD||"AES-128",uri:e.attributes.URI},"undefined"!==typeof e.attributes.IV&&(r.iv=e.attributes.IV)}else this.trigger("warn",{message:"ignoring key declaration without URI"});else r=null;else this.trigger("warn",{message:"ignoring key declaration without attribute list"})},"media-sequence"(){isFinite(e.number)?this.manifest.mediaSequence=e.number:this.trigger("warn",{message:"ignoring invalid media sequence: "+e.number})},"discontinuity-sequence"(){isFinite(e.number)?(this.manifest.discontinuitySequence=e.number,g=e.number):this.trigger("warn",{message:"ignoring invalid discontinuity sequence: "+e.number})},"playlist-type"(){/VOD|EVENT/.test(e.playlistType)?this.manifest.playlistType=e.playlistType:this.trigger("warn",{message:"ignoring unknown playlist type: "+e.playlist})},map(){i={},e.uri&&(i.uri=e.uri),e.byterange&&(i.byterange=e.byterange),r&&(i.key=r)},"stream-inf"(){this.manifest.playlists=n,this.manifest.mediaGroups=this.manifest.mediaGroups||u,e.attributes?(c.attributes||(c.attributes={}),s()(c.attributes,e.attributes)):this.trigger("warn",{message:"ignoring empty stream-inf attributes"})},media(){if(this.manifest.mediaGroups=this.manifest.mediaGroups||u,!(e.attributes&&e.attributes.TYPE&&e.attributes["GROUP-ID"]&&e.attributes.NAME))return void this.trigger("warn",{message:"ignoring incomplete or missing media group"});const t=this.manifest.mediaGroups[e.attributes.TYPE];t[e.attributes["GROUP-ID"]]=t[e.attributes["GROUP-ID"]]||{},o=t[e.attributes["GROUP-ID"]],h={default:/yes/i.test(e.attributes.DEFAULT)},h.default?h.autoselect=!0:h.autoselect=/yes/i.test(e.attributes.AUTOSELECT),e.attributes.LANGUAGE&&(h.language=e.attributes.LANGUAGE),e.attributes.URI&&(h.uri=e.attributes.URI),e.attributes["INSTREAM-ID"]&&(h.instreamId=e.attributes["INSTREAM-ID"]),e.attributes.CHARACTERISTICS&&(h.characteristics=e.attributes.CHARACTERISTICS),e.attributes.FORCED&&(h.forced=/yes/i.test(e.attributes.FORCED)),o[e.attributes.NAME]=h},discontinuity(){g+=1,c.discontinuity=!0,this.manifest.discontinuityStarts.push(n.length)},"program-date-time"(){"undefined"===typeof this.manifest.dateTimeString&&(this.manifest.dateTimeString=e.dateTimeString,this.manifest.dateTimeObject=e.dateTimeObject),c.dateTimeString=e.dateTimeString,c.dateTimeObject=e.dateTimeObject;const{lastProgramDateTime:t}=this;this.lastProgramDateTime=new Date(e.dateTimeString).getTime(),null===t&&this.manifest.segments.reduceRight(((e,t)=>(t.programDateTime=e-1e3*t.duration,t.programDateTime)),this.lastProgramDateTime)},targetduration(){!isFinite(e.duration)||e.duration<0?this.trigger("warn",{message:"ignoring invalid target duration: "+e.duration}):(this.manifest.targetDuration=e.duration,m.call(this,this.manifest))},start(){e.attributes&&!isNaN(e.attributes["TIME-OFFSET"])?this.manifest.start={timeOffset:e.attributes["TIME-OFFSET"],precise:e.attributes.PRECISE}:this.trigger("warn",{message:"ignoring start declaration without appropriate attribute list"})},"cue-out"(){c.cueOut=e.data},"cue-out-cont"(){c.cueOutCont=e.data},"cue-in"(){c.cueIn=e.data},skip(){this.manifest.skip=p(e.attributes),this.warnOnMissingAttributes_("#EXT-X-SKIP",e.attributes,["SKIPPED-SEGMENTS"])},part(){l=!0;const t=this.manifest.segments.length,n=p(e.attributes);c.parts=c.parts||[],c.parts.push(n),n.byterange&&(n.byterange.hasOwnProperty("offset")||(n.byterange.offset=b),b=n.byterange.offset+n.byterange.length);const i=c.parts.length-1;this.warnOnMissingAttributes_("#EXT-X-PART #".concat(i," for segment #").concat(t),e.attributes,["URI","DURATION"]),this.manifest.renditionReports&&this.manifest.renditionReports.forEach(((e,t)=>{e.hasOwnProperty("lastPart")||this.trigger("warn",{message:"#EXT-X-RENDITION-REPORT #".concat(t," lacks required attribute(s): LAST-PART")})}))},"server-control"(){const t=this.manifest.serverControl=p(e.attributes);t.hasOwnProperty("canBlockReload")||(t.canBlockReload=!1,this.trigger("info",{message:"#EXT-X-SERVER-CONTROL defaulting CAN-BLOCK-RELOAD to false"})),m.call(this,this.manifest),t.canSkipDateranges&&!t.hasOwnProperty("canSkipUntil")&&this.trigger("warn",{message:"#EXT-X-SERVER-CONTROL lacks required attribute CAN-SKIP-UNTIL which is required when CAN-SKIP-DATERANGES is set"})},"preload-hint"(){const t=this.manifest.segments.length,n=p(e.attributes),i=n.type&&"PART"===n.type;c.preloadHints=c.preloadHints||[],c.preloadHints.push(n),n.byterange&&(n.byterange.hasOwnProperty("offset")||(n.byterange.offset=i?b:0,i&&(b=n.byterange.offset+n.byterange.length)));const r=c.preloadHints.length-1;if(this.warnOnMissingAttributes_("#EXT-X-PRELOAD-HINT #".concat(r," for segment #").concat(t),e.attributes,["TYPE","URI"]),n.type)for(let e=0;e<c.preloadHints.length-1;e++){const i=c.preloadHints[e];i.type&&(i.type===n.type&&this.trigger("warn",{message:"#EXT-X-PRELOAD-HINT #".concat(r," for segment #").concat(t," has the same TYPE ").concat(n.type," as preload hint #").concat(e)}))}},"rendition-report"(){const t=p(e.attributes);this.manifest.renditionReports=this.manifest.renditionReports||[],this.manifest.renditionReports.push(t);const n=this.manifest.renditionReports.length-1,i=["LAST-MSN","URI"];l&&i.push("LAST-PART"),this.warnOnMissingAttributes_("#EXT-X-RENDITION-REPORT #".concat(n),e.attributes,i)},"part-inf"(){this.manifest.partInf=p(e.attributes),this.warnOnMissingAttributes_("#EXT-X-PART-INF",e.attributes,["PART-TARGET"]),this.manifest.partInf.partTarget&&(this.manifest.partTargetDuration=this.manifest.partInf.partTarget),m.call(this,this.manifest)},daterange(){this.manifest.dateRanges.push(p(e.attributes));const t=this.manifest.dateRanges.length-1;this.warnOnMissingAttributes_("#EXT-X-DATERANGE #".concat(t),e.attributes,["ID","START-DATE"]);const n=this.manifest.dateRanges[t];n.endDate&&n.startDate&&new Date(n.endDate)<new Date(n.startDate)&&this.trigger("warn",{message:"EXT-X-DATERANGE END-DATE must be equal to or later than the value of the START-DATE"}),n.duration&&n.duration<0&&this.trigger("warn",{message:"EXT-X-DATERANGE DURATION must not be negative"}),n.plannedDuration&&n.plannedDuration<0&&this.trigger("warn",{message:"EXT-X-DATERANGE PLANNED-DURATION must not be negative"});const i=!!n.endOnNext;if(i&&!n.class&&this.trigger("warn",{message:"EXT-X-DATERANGE with an END-ON-NEXT
2=YES attribute must have a CLASS attribute"}),i&&(n.duration||n.endDate)&&this.trigger("warn",{message:"EXT-X-DATERANGE with an END-ON-NEXT=YES attribute must not contain DURATION or END-DATE attributes"}),n.duration&&n.endDate){const e=n.startDate.getTime()+1e3*n.duration;this.manifest.dateRanges[t].endDate=new Date(e)}if(y[n.id]){for(const t in y[n.id])if(n[t]&&JSON.stringify(y[n.id][t])!==JSON.stringify(n[t])){this.trigger("warn",{message:"EXT-X-DATERANGE tags with the same ID in a playlist must have the same attributes values"});break}const e=this.manifest.dateRanges.findIndex((e=>e.id===n.id));this.manifest.dateRanges[e]=s()(this.manifest.dateRanges[e],n),y[n.id]=s()(y[n.id],n),this.manifest.dateRanges.pop()}else y[n.id]=n},"independent-segments"(){this.manifest.independentSegments=!0},"i-frames-only"(){this.manifest.iFramesOnly=!0,this.requiredCompatibilityversion(this.manifest.version,4)},"content-steering"(){this.manifest.contentSteering=p(e.attributes),this.warnOnMissingAttributes_("#EXT-X-CONTENT-STEERING",e.attributes,["SERVER-URI"])},define(){this.manifest.definitions=this.manifest.definitions||{};const t=(e,t)=>{e in this.manifest.definitions?this.trigger("error",{message:"EXT-X-DEFINE: Duplicate name ".concat(e)}):this.manifest.definitions[e]=t};if("QUERYPARAM"in e.attributes){if("NAME"in e.attributes||"IMPORT"in e.attributes)return void this.trigger("error",{message:"EXT-X-DEFINE: Invalid attributes"});const n=this.params.get(e.attributes.QUERYPARAM);return n?void t(e.attributes.QUERYPARAM,decodeURIComponent(n)):void this.trigger("error",{message:"EXT-X-DEFINE: No query param ".concat(e.attributes.QUERYPARAM)})}return"NAME"in e.attributes?"IMPORT"in e.attributes?void this.trigger("error",{message:"EXT-X-DEFINE: Invalid attributes"}):"VALUE"in e.attributes&&"string"===typeof e.attributes.VALUE?void t(e.attributes.NAME,e.attributes.VALUE):void this.trigger("error",{message:"EXT-X-DEFINE: No value for ".concat(e.attributes.NAME)}):"IMPORT"in e.attributes?this.mainDefinitions[e.attributes.IMPORT]?void t(e.attributes.IMPORT,this.mainDefinitions[e.attributes.IMPORT]):void this.trigger("error",{message:"EXT-X-DEFINE: No value ".concat(e.attributes.IMPORT," to import, or IMPORT used on main playlist")}):void this.trigger("error",{message:"EXT-X-DEFINE: No attribute"})},"i-frame-playlist"(){this.manifest.iFramePlaylists.push({attributes:e.attributes,uri:e.uri,timeline:g}),this.warnOnMissingAttributes_("#EXT-X-I-FRAME-STREAM-INF",e.attributes,["BANDWIDTH","URI"])}}[e.tagType]||d).call(t)},uri(){c.uri=e.uri,n.push(c),this.manifest.targetDuration&&!("duration"in c)&&(this.trigger("warn",{message:"defaulting segment duration to the target duration"}),c.duration=this.manifest.targetDuration),r&&(c.key=r),c.timeline=g,i&&(c.map=i),b=0,null!==this.lastProgramDateTime&&(c.programDateTime=this.lastProgramDateTime,this.lastProgramDateTime+=1e3*c.duration),c={}},comment(){},custom(){e.segment?(c.custom=c.custom||{},c.custom[e.customType]=e.data):(this.manifest.custom=this.manifest.custom||{},this.manifest.custom[e.customType]=e.data)}})[e.type].call(t)}))}requiredCompatibilityversion(e,t){(e<t||!e)&&this.trigger("warn",{message:"manifest must be at least version ".concat(t)})}warnOnMissingAttributes_(e,t,n){const i=[];n.forEach((function(e){t.hasOwnProperty(e)||i.push(e)})),i.length&&this.trigger("warn",{message:"".concat(e," lacks required attribute(s): ").concat(i.join(", "))})}push(e){this.lineStream.push(e)}end(){this.lineStream.push("\n"),this.manifest.dateRanges.length&&null===this.lastProgramDateTime&&this.trigger("warn",{message:"A playlist with EXT-X-DATERANGE tag must contain atleast one EXT-X-PROGRAM-DATE-TIME tag"}),this.lastProgramDateTime=null,this.trigger("end")}addParser(e){this.parseStream.addParser(e)}addTagMapper(e){this.parseStream.addTagMapper(e)}}},326:function(e,t,n){"use strict";var i=n(189);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=i(n(190)),s=n(1),a=(0,r.default)((0,s.jsx)("path",{d:"M16.59 8.59 12 13.17 7.41 8.59 6 10l6 6 6-6z"}),"ExpandMore");t.default=a},327:function(e,t,n){"use strict";var i=n(0);const r=i.createContext({});t.a=r},333:function(e,t,n){"use strict";var i=n(31),r=n(4),s=n(2),a=n(0),o=n(36),c=n(38),l=n(183),d=n(34),u=n(181),h=n(29),p=n(54),m=n(158),g=n(179);function f(e){return Object(m.a)("MuiSkeleton",e)}Object(g.a)("MuiSkeleton",["root","text","rectangular","circular","pulse","wave","withChildren","fitContent","heightAuto"]);var b,y,j,_,v=n(1);const x=["animation","className","component","height","style","variant","width"];let O,T,S,w;const A=Object(c.c)(O||(O=b||(b=Object(i.a)(["\n 0% {\n opacity: 1;\n }\n\n 50% {\n opacity: 0.4;\n }\n\n 100% {\n opacity: 1;\n }\n"])))),k=Object(c.c)(T||(T=y||(y=Object(i.a)(["\n 0% {\n transform: translateX(-100%);\n }\n\n 50% {\n /* +0.5s of delay between each loop */\n transform: translateX(100%);\n }\n\n 100% {\n transform: translateX(100%);\n }\n"])))),C=Object(h.a)("span",{name:"MuiSkeleton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;
2return[t.root,t[n.variant],!1!==n.animation&&t[n.animation],n.hasChildren&&t.withChildren,n.hasChildren&&!n.width&&t.fitContent,n.hasChildren&&!n.height&&t.heightAuto]}})((e=>{let{theme:t,ownerState:n}=e;const i=Object(d.d)(t.shape.borderRadius)||"px",r=Object(d.g)(t.shape.borderRadius);return Object(s.a)({display:"block",backgroundColor:Object(u.a)(t.palette.text.primary,"light"===t.palette.mode?.11:.13),height:"1.2em"},"text"===n.variant&&{marginTop:0,marginBottom:0,height:"auto",transformOrigin:"0 55%",transform:"scale(1, 0.60)",borderRadius:"".concat(r).concat(i,"/").concat(Math.round(r/.6*10)/10).concat(i),"&:empty:before":{content:'"\\00a0"'}},"circular"===n.variant&&{borderRadius:"50%"},n.hasChildren&&{"& > *":{visibility:"hidden"}},n.hasChildren&&!n.width&&{maxWidth:"fit-content"},n.hasChildren&&!n.height&&{height:"auto"})}),(e=>{let{ownerState:t}=e;return"pulse"===t.animation&&Object(c.b)(S||(S=j||(j=Object(i.a)(["\n animation: "," 1.5s ease-in-out 0.5s infinite;\n "]))),A)}),(e=>{let{ownerState:t,theme:n}=e;return"wave"===t.animation&&Object(c.b)(w||(w=_||(_=Object(i.a)(["\n position: relative;\n overflow: hidden;\n\n /* Fix bug in Safari https://bugs.webkit.org/show_bug.cgi?id=68196 */\n -webkit-mask-image: -webkit-radial-gradient(white, black);\n\n &::after {\n animation: "," 1.6s linear 0.5s infinite;\n background: linear-gradient(90deg, transparent, ",", transparent);\n content: '';\n position: absolute;\n transform: translateX(-100%); /* Avoid flash during server-side hydration */\n bottom: 0;\n left: 0;\n right: 0;\n top: 0;\n }\n "]))),k,n.palette.action.hover)})),E=a.forwardRef((function(e,t){const n=Object(p.a)({props:e,name:"MuiSkeleton"}),{animation:i="pulse",className:a,component:c="span",height:d,style:u,variant:h="text",width:m}=n,g=Object(r.a)(n,x),b=Object(s.a)({},n,{animation:i,component:c,variant:h,hasChildren:Boolean(g.children)}),y=(e=>{const{classes:t,variant:n,animation:i,hasChildren:r,width:s,height:a}=e,o={root:["root",n,i,r&&"withChildren",r&&!s&&"fitContent",r&&!a&&"heightAuto"]};return Object(l.a)(o,f,t)})(b);return Object(v.jsx)(C,Object(s.a)({as:c,ref:t,className:Object(o.a)(y.root,a),ownerState:b},g,{style:Object(s.a)({width:m,height:d},u)}))}));t.a=E},334:function(e,t,n){"use strict";var i=n(4),r=n(2),s=n(0),a=(n(240),n(36)),o=n(183),c=n(29),l=n(54),d=n(706),u=n(158),h=n(179);function p(e){return Object(u.a)("MuiAvatarGroup",e)}var m=Object(h.a)("MuiAvatarGroup",["root","avatar"]),g=n(1);const f=["children","className","max","spacing","variant"],b={small:-16,medium:null},y=Object(c.a)("div",{name:"MuiAvatarGroup",slot:"Root",overridesResolver:(e,t)=>Object(r.a)({["& .".concat(m.avatar)]:t.avatar},t.root)})((e=>{let{theme:t}=e;return{"& .MuiAvatar-root":{border:"2px solid ".concat(t.palette.background.default),boxSizing:"content-box",marginLeft:-8,"&:last-child":{marginLeft:0}},display:"flex",flexDirection:"row-reverse"}})),j=Object(c.a)(d.a,{name:"MuiAvatarGroup",slot:"Avatar",overridesResolver:(e,t)=>t.avatar})((e=>{let{theme:t}=e;return{border:"2px solid ".concat(t.palette.background.default),boxSizing:"content-box",marginLeft:-8,"&:last-child":{marginLeft:0}}})),_=s.forwardRef((function(e,t){const n=Object(l.a)({props:e,name:"MuiAvatarGroup"}),{children:c,className:d,max:u=5,spacing:h="medium",variant:m="circular"}=n,_=Object(i.a)(n,f),v=u<2?2:u,x=Object(r.a)({},n,{max:u,spacing:h,variant:m}),O=(e=>{const{classes:t}=e;return Object(o.a)({root:["root"],avatar:["avatar"]},p,t)})(x),T=s.Children.toArray(c).filter((e=>s.isValidElement(e))),S=T.length>v?T.length-v+1:0,w=h&&void 0!==b[h]?b[h]:-h;return Object(g.jsxs)(y,Object(r.a)({ownerState:x,className:Object(a.a)(O.root,d),ref:t},_,{children:[S?Object(g.jsxs)(j,{ownerState:x,className:O.avatar,style:{marginLeft:w},variant:m,children:["+",S]}):null,T.slice(0,T.length-S).reverse().map((e=>s.cloneElement(e,{className:Object(a.a)(e.props.className,O.avatar),style:Object(r.a)({marginLeft:w},e.props.style),variant:e.props.variant||m})))]}))}));t.a=_},335:function(e,t,n){"use strict";var i=n(189);
2Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=i(n(190)),s=n(1),a=(0,r.default)((0,s.jsx)("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"}),"RadioButtonUncheckedOutlined");t.default=a},336:function(e,t,n){"use strict";var i=n(4),r=n(2),s=n(0),a=n(36),o=n(183),c=n(715),l=n(21),d=n(186),u=n(54),h=n(29),p=n(158),m=n(179);function g(e){return Object(p.a)("MuiMobileStepper",e)}Object(m.a)("MuiMobileStepper",["root","positionBottom","positionTop","positionStatic","dots","dot","dotActive","progress"]);var f=n(1);const b=["activeStep","backButton","className","LinearProgressProps","nextButton","position","steps","variant"],y=Object(h.a)(c.a,{name:"MuiMobileStepper",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t["position".concat(Object(l.a)(n.position))]]}})((e=>{let{theme:t,ownerState:n}=e;return Object(r.a)({display:"flex",flexDirection:"row",justifyContent:"space-between",alignItems:"center",background:t.palette.background.default,padding:8},"bottom"===n.position&&{position:"fixed",bottom:0,left:0,right:0,zIndex:t.zIndex.mobileStepper},"top"===n.position&&{position:"fixed",top:0,left:0,right:0,zIndex:t.zIndex.mobileStepper})})),j=Object(h.a)("div",{name:"MuiMobileStepper",slot:"Dots",overridesResolver:(e,t)=>t.dots})((e=>{let{ownerState:t}=e;return Object(r.a)({},"dots"===t.variant&&{display:"flex",flexDirection:"row"})})),_=Object(h.a)("div",{name:"MuiMobileStepper",slot:"Dot",shouldForwardProp:e=>Object(h.c)(e)&&"dotActive"!==e,overridesResolver:(e,t)=>{const{dotActive:n}=e;return[t.dot,n&&t.dotActive]}})((e=>{let{theme:t,ownerState:n,dotActive:i}=e;return Object(r.a)({},"dots"===n.variant&&Object(r.a)({transition:t.transitions.create("background-color",{duration:t.transitions.duration.shortest}),backgroundColor:t.palette.action.disabled,borderRadius:"50%",width:8,height:8,margin:"0 2px"},i&&{backgroundColor:t.palette.primary.main}))})),v=Object(h.a)(d.a,{name:"MuiMobileStepper",slot:"Progress",overridesResolver:(e,t)=>t.progress})((e=>{let{ownerState:t}=e;return Object(r.a)({},"progress"===t.variant&&{width:"50%"})})),x=s.forwardRef((function(e,t){const n=Object(u.a)({props:e,name:"MuiMobileStepper"}),{activeStep:c=0,backButton:d,className:h,LinearProgressProps:p,nextButton:m,position:x="bottom",steps:O,variant:T="dots"}=n,S=Object(i.a)(n,b),w=Object(r.a)({},n,{activeStep:c,position:x,variant:T}),A=(e=>{const{classes:t,position:n}=e,i={root:["root","position".concat(Object(l.a)(n))],dots:["dots"],dot:["dot"],dotActive:["dotActive"],progress:["progress"]};return Object(o.a)(i,g,t)})(w);return Object(f.jsxs)(y,Object(r.a)({square:!0,elevation:0,className:Object(a.a)(A.root,h),ref:t,ownerState:w},S,{children:[d,"text"===T&&Object(f.jsxs)(s.Fragment,{children:[c+1," / ",O]}),"dots"===T&&Object(f.jsx)(j,{ownerState:w,className:A.dots,children:[...new Array(O)].map(((e,t)=>Object(f.jsx)(_,{className:Object(a.a)(A.dot,t===c&&A.dotActive),ownerState:w,dotActive:t===c},t)))}),"progress"===T&&Object(f.jsx)(v,Object(r.a)({ownerState:w,className:A.progress,variant:"determinate",value:Math.ceil(c/(O-1)*100)},p)),m]}))}));t.a=x},337:function(e,t,n){"use strict";var i=n(189);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=i(n(190)),s=n(1),a=(0,r.default)((0,s.jsx)("path",{d:"M11 7h2v2h-2zm0 4h2v6h-2zm1-9C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8z"}),"InfoOutlined");t.default=a},338:function(e,t,n){"use strict";var i=n(0),r=n.n(i),s=n(35),a=n(79),o=n(353),c=n(709),l=n(28),d=n(5),u=n(85),h=n(56),p=n(657),m=n(188),g=n(645),f=n(20),b=n(37),y=n(192),j=n(707),_=n(715),v=n(648),x=n(700),O=n(647),T=n(111),S=n(705),w=n(720),A=n(649),k=n(394),C=n(716),E=n(725),I=n(717),D=n(729),P=n(721),R=n(722),L=n(208),M=n(196),N=n(242),B=n.n(N),U=n(241),F=n.n(U),z=n(343),q=n.n(z),H=(n(339),n(209)),V=n(337),W=n.n(V),G=n(341),X=n.n(G),Y=n(335),K=n.n(Y),Q=n(342),Z=n.n(Q),J=n(340),$=n(1);const ee=Object(g.a)(j.a)((e=>{let{theme:t}=e;return{backgroundColor:"#F5F5F5",color:"#41474E",borderRadius:"7px",fontWeight:"bold","& .MuiChip-icon":{color:"#919191"},"& .MuiChip-deleteIcon":{color:"#B1B8BE",fontSize:17,"&:hover":{color:"inherit"}}}})),te=Object(g.a)(_.a)((e=>{let{theme:t}=e;return{boxSizing:"border-box",color:"#2F3337",position:"relative",borderRadius:"10px",zIndex:1}}
2)),ne=Object(g.a)(v.a)((e=>{let{theme:t}=e;return{color:"#26292D",minWidth:"35px"}})),ie=Object(g.a)(x.a)((e=>{let{theme:t}=e;return{[t.breakpoints.down("sm")]:{paddingTop:0,paddingBottom:0}}})),re=Object(g.a)(O.a)((e=>{let{theme:t}=e;return{[t.breakpoints.down("sm")]:{"& .MuiListItemText-primary":{fontSize:"0.9rem"}}}})),se=Object(g.a)(T.a)((e=>{let{theme:t}=e;return{backgroundColor:"#FFBA00",borderTopLeftRadius:"7px",borderBottomLeftRadius:"7px",padding:"4px 8px 4px 10px",position:"absolute",color:"#41474E",top:"87px",right:0,"&.green":{top:"53px",backgroundColor:t.palette.green.main,color:"#fff"}}})),ae=e=>{const{home:t,from:n}=e,i=Object(h.a)(),{t:o}=(Object(p.a)(i.breakpoints.down("md")),Object(a.a)()),{courseId:u}=Object(d.j)(),g=new URLSearchParams(window.location.search).get("paymentType"),{auth:b}=r.a.useContext(f.a),y=JSON.parse(localStorage.getItem("dscfcpn")),{request:j,cancelToken:_}=r.a.useContext(s.a),[v,x]=r.a.useState({}),[O,E]=r.a.useState(g||localStorage.getItem("paymentType")||"card");return r.a.useEffect((()=>{(async()=>{const e=_.source();let t;if(t=y?await j("get",Boolean(u)?"/v2/offers/course/"+u+"/with-discount/"+y.value:"/v2/offers/with-discount/"+y.value,e.token):await j("get",Boolean(u)?"/v2/offers/course/"+u:"/v2/offers",e.token),t){let e=null,i=null,r=null,s=null,a=null,o=null,c=null,l=null,d=null,u=null,h=null;Boolean(t.offers)?((b.isAuthenticated&&b.user&&b.user.data&&b.user.data.flag_active_subscription&&!b.user.data.flag_active_wellness_subscription||!b.isAuthenticated&&Boolean(n)&&"wellness"===n||Boolean(n)&&"wellness"===n&&b.isAuthenticated&&b.user&&b.user.data&&!b.user.data.flag_active_subscription&&!b.user.data.flag_active_wellness_subscription)&&(r=t.offers.find((e=>"w_y"===e.type))),Boolean(n)&&"wellness"===n&&(b.isAuthenticated&&b.user&&b.user.data&&!b.user.data.flag_active_wellness_subscription||!b.isAuthenticated)&&(a=t.offers.find((e=>"w_y+y"===e.type)),o=t.offers.find((e=>"w_y+y+pro"===e.type))),Boolean(n)&&b.isAuthenticated&&b.user&&b.user.data&&b.user.data.flag_active_subscription&&!b.user.data.flag_active_wellness_subscription&&(u=t.offers.find((e=>"w_y+pro"===e.type))),(b.isAuthenticated&&b.user&&b.user.data&&!b.user.data.flag_active_subscription&&b.user.data.flag_active_wellness_subscription||!b.isAuthenticated&&Boolean(n)&&("masterclass"===n||"basics"===n)||(Boolean(n)&&"masterclass"===n||"basics"===n)&&b.isAuthenticated&&b.user&&b.user.data&&!b.user.data.flag_active_subscription&&!b.user.data.flag_active_wellness_subscription)&&(e=t.offers.find((e=>"y"===e.type))),Boolean(n)&&("basics"===n||"masterclass"===n)&&(b.isAuthenticated&&b.user&&b.user.data&&!b.user.data.flag_active_wellness_subscription||!b.isAuthenticated)&&(a=t.offers.find((e=>"y+w_y"===e.type)),o=t.offers.find((e=>"y+w_y+pro"===e.type))),b.isAuthenticated&&b.user&&b.user.data&&!b.user.data.flag_active_subscription&&b.user.data.flag_active_wellness_subscription&&(d=t.offers.find((e=>"y+pro"===e.type))),b.isAuthenticated&&b.user&&b.user.data&&b.user.data.flag_active_wellness_subscription&&b.user.data.flag_active_subscription&&(h=t.offers.find((e=>"pro"===e.type)))):(r=t.plan_wellness_subscription,e=t.plan_subscription,a=t.plan_wellness_dual_subscription||t.plan_dual_subscription,o=t.plan_pro_dual_subscription,d=t.plan_pro_subscription,h=t.plan_pro_addon_subscription,u=t.plan_pro_wellness_subscription),x({plan_subscription:e,plan_pro_subscription:d,plan_wellness_subscription:r,plan_pro_wellness_subscription:u,plan_wellness_double:s,plan_course:t.plan_course||null,plan_wellness_dual_subscription:a,plan_pro_dual_subscription:o,plan_subscription_monthly:c,plan_double:i,plan_now_tv:l,plan_pro_addon_subscription:h})}})()}),[]),r.a.useEffect((()=>{if(!t){const e=Object.keys(v);if(e.length){const t=e.reduce(((e,t)=>{if(v[t]){const n=Object(m.j)(v[t].packages.filter((e=>!0===e.is_checked)),v[t]);e.push({item_name:l.f[v[t].type],item_id:v[t].id,price:n.total/100,item_brand:"academia",item_category:"courses",item_variant:"c"===v[t].type?v[t].slug:"annual",index:e.length+1,quantity:1})}return e}),[]);Object(l.e)({event:"view_item_list",ecommerce:{ecom_currency:"EUR",items:t}})}}}),[v]),Object($.jsxs)(r.a.Fragment,{children:[Object($.jsx)(S.a,{mb:1,container:!0,justifyContent:"center",spacing:4,children:Object($.jsxs)(S.a,{item:!0,xs:11,md:10,lg:8,xl:6,children:[Object($.jsx)(w.a,{variant:"h5",color:"inherit",sx:{textAlign:"center"},children:Object($.jsx)("b",{children:o("Abbonamento annuale con 200+ corsi di Pizza, Pane, Pasticceria, Piatti stellati e tradizionali.")})}),Object($.jsxs)(w.a,{component:"div",variant:"caption",color:"inherit",sx:{textAlign:"center",my:2},children:[Object($.jsx)("b",{children:o("Approfitta dell'offerta per i nuovi abbonati -50%")})," (",Object($.jsx)("del",{children:o("8,25\u20ac/mese")}),")"]}),Object($.jsx)(A.a,{direction:"row",justifyContent:"center",children:Object($.jsx)(L.a,{type:"variant",variantProps:{valueProps:{color:"#E90134"},timeContainerProps:{sx:{backgroundColor:"rgba(234, 0, 51, 0.30)"}},labelProps:{color:"darkSecondary.main"}}})})]})}),Object($.jsxs)(T.a,{sx:{mt:2,textAlign:"center"},children:[Object($.jsx)(w.a,{component:"div",variant:"caption",color:"inherit",children:o("Modalit\xe0 di pagamento")}),Object($.jsxs)(k.a,{color:"black",variant:"outlined",size:"small",disableElevation:!0,sx:{mt:2},children:[Object($.jsx)(R.a,{size:"large",sx:{lineHeight:1,borderColor:"#E0E0E0",borderWidth:1,fontSize:12,backgroundColor:"#fff","&:hover":{border:"1px solid #E0E0E0 !important"},minWidth:"150px !important",justifyContent:"flex-start"},startIcon:Object($.jsxs)(A.a,{direction:"row",alignItems:"center",spacing:.5,children:["payp
2al"===O?Object($.jsx)(X.a,{fontSize:"small"}):Object($.jsx)(K.a,{fontSize:"small"}),Object($.jsx)(C.a,{component:J.a,viewBox:"0 0 154.728 190.5",sx:{fontSize:14}})]}),onClick:()=>{localStorage.setItem("paymentType","paypal"),E("paypal")},children:o("PayPal")}),Object($.jsxs)(R.a,{size:"large",sx:{lineHeight:1,borderColor:"#E0E0E0",borderWidth:1,fontSize:12,backgroundColor:"#fff","&:hover":{border:"1px solid #E0E0E0 !important"},minWidth:"150px !important",justifyContent:"flex-start"},startIcon:Object($.jsxs)(A.a,{direction:"row",alignItems:"center",spacing:.5,children:["card"===O?Object($.jsx)(X.a,{fontSize:"small"}):Object($.jsx)(K.a,{fontSize:"small"}),Object($.jsx)(Z.a,{fontSize:"small"})]}),onClick:()=>{localStorage.setItem("paymentType","card"),E("card")},children:[o("Carta")," / ",o("Bonifico bancario")]})]})]}),Object($.jsx)(T.a,{sx:{px:{sm:4}},children:Object($.jsxs)(S.a,{sx:{mt:2},container:!0,justifyContent:"center",spacing:4,children:[Boolean(v.plan_subscription)&&Object($.jsx)(S.a,{item:!0,xs:11,sm:6,md:5,lg:4,xl:3,sx:{position:"relative"},children:Object($.jsx)(pe,{offers:v,paymentType:O})}),Boolean(v.plan_pro_subscription)&&Object($.jsx)(S.a,{item:!0,xs:11,sm:6,md:5,lg:4,xl:3,sx:{position:"relative"},children:Object($.jsx)(ge,{offers:v,paymentType:O})}),Boolean(v.plan_pro_addon_subscription)&&Object($.jsx)(S.a,{item:!0,xs:11,sm:6,md:5,lg:4,xl:3,sx:{position:"relative"},children:Object($.jsx)(me,{offers:v,paymentType:O})}),Boolean(v.plan_wellness_subscription)&&Object($.jsx)(S.a,{item:!0,xs:11,sm:6,md:5,lg:4,xl:3,sx:{position:"relative"},children:Object($.jsx)(ye,{offers:v,paymentType:O})}),Boolean(v.plan_pro_wellness_subscription)&&Object($.jsx)(S.a,{item:!0,xs:11,sm:6,md:5,lg:4,xl:3,sx:{position:"relative"},children:Object($.jsx)(je,{offers:v,paymentType:O})}),Boolean(v.plan_pro_dual_subscription)&&Object($.jsx)(S.a,{item:!0,xs:11,sm:6,md:5,lg:4,xl:3,sx:{position:"relative"},children:Object($.jsx)(be,{offers:v,paymentType:O})}),Boolean(v.plan_wellness_double)&&Object($.jsx)(S.a,{item:!0,xs:11,sm:6,md:5,lg:4,xl:3,sx:{position:"relative"},children:Object($.jsx)(ue,{offers:v,paymentType:O})}),Boolean(v.plan_course)&&Object($.jsx)(S.a,{item:!0,xs:11,sm:6,md:5,lg:4,xl:3,sx:{position:"relative"},children:Object($.jsx)(_e,{offers:v,paymentType:O})}),Boolean(v.plan_subscription_monthly)&&Object($.jsx)(S.a,{item:!0,xs:11,sm:6,md:5,lg:4,xl:3,sx:{position:"relative"},children:Object($.jsx)(he,{offers:v,paymentType:O})}),Boolean(v.plan_double)&&Object($.jsx)(S.a,{item:!0,xs:11,sm:6,md:5,lg:4,xl:3,sx:{position:"relative"},children:Object($.jsx)(le,{offers:v,paymentType:O})}),Boolean(v.plan_now_tv)&&Object($.jsx)(S.a,{item:!0,xs:11,sm:6,md:5,lg:4,xl:3,sx:{position:"relative"},children:Object($.jsx)(ce,{offers:v,paymentType:O})})]})}),Object($.jsx)(w.a,{align:"center",sx:{my:3},variant:"caption",component:"h6",children:Object($.jsxs)(c.a,{t:o,children:["Pagamento sicuro. Offerta valida per il primo anno, rinnovo automatico a prezzo pieno del prodotto selezionato",Object($.jsx)("br",{})," allo scadere dei 12 mesi. ",Object($.jsx)("b",{children:"Disdici quando vuoi"}),"."]})})]})},oe=e=>{const{t:t}=Object(a.a)(),n=Object(u.useStripe)(),i=Object(d.i)(),o=Object(d.h)(),{buy:g}=Object(d.j)(),b=Object(h.a)(),_=Object(p.a)(b.breakpoints.down("md")),[v,x]=r.a.useState(!1),{offer:O,badge:k,children:C,showCta:P,OfferBoxProps:L,bestChoise:M,paymentType:N,isPro:B}=e,{auth:U}=r.a.useContext(f.a),z=localStorage.getItem("nodefcpn"),{request:H,cancelToken:V}=r.a.useContext(s.a),G=new URLSearchParams(i.search).get("v")||localStorage.getItem("x-cic-version"),[X,Y]=r.a.useState(!1),K=r.a.useRef(!1),Q=r.a.useRef(!1),[Z,J]=r.a.useState(z?O.packages.filter((e=>e.is_checked&&e.items&&!e.items.find((e=>"d"===e.type)))):O.packages.filter((e=>e.is_checked))),ne=new URLSearchParams(i.search).get("to"),[ie,re]=r.a.useState({total:0,subtotal:0}),se=Z.find((e=>e.items&&Boolean(e.items.find((e=>"d"===e.type))))),ae=async()=>{if(X||K.current)return;K.current=!0,Y(!0);const e={packages:Z.map((e=>e.id)),upgrade:Boolean(O.upgradeable_to_annual_sub),payment_type:N||localStorage.getItem("paymentType")};P&&(window.Android&&window.Android.onAddToCart&&window.Android.onAddToCart(JSON.stringify({sku_id:O.sku_id,item_id:O.id,price:ie.total/100,currency:"EUR",product:O.type,product_name:l.f[O.type]})),Object(l.e)(Object(l.g)({event:"add_to_cart",ecommerce:{items:[{item_name:l.f[O.type],item_id:O.id,price:ie.total/100,item_brand:"academia",item_category:"courses",item_variant:"c"===O.type?O.slug:"annual",quantity:1}]}},U.user&&U.user.data)),sessionStorage.setItem("checkout-previous-url",i.pathname+i.search));
2try{const t=V.source(),r=await H("post","/v2/payment/checkout/"+O.id,t.token,e,!1,{auth:O.type,courseId:O.course?O.course.id:""});r&&(sessionStorage.setItem("checkout-sku-id",O.sku_id),sessionStorage.setItem("checkout-purchase-id",r.purchase_id),Boolean(window.Android)?Object(m.c)(G,"2.11.13")>=0?window.Android.onPurchaseStarted(JSON.stringify({sku_id:O.sku_id,item_id:O.id,price:ie.total/100,currency:"EUR",product_name:l.f[O.type]})):window.Android.onPurchaseStarted(O.sku_id):r.tracking_info&&Object(l.e)(Object(l.g)({event:"begin_checkout",ecommerce:{items:[{item_name:l.f[O.type],item_id:O.id,price:ie.total/100,item_brand:"academia",item_category:"courses",item_variant:"c"===O.type?O.slug:"annual",quantity:1}]}},U.user&&U.user.data)),ne&&o.push({...i,state:{...i.state,from:ne}}),await n.redirectToCheckout({sessionId:r.token}))}finally{Y(!1),K.current=!1}};return r.a.useEffect((()=>{const e=Object(m.j)(Z,O);re(e)}),[Z,O]),r.a.useEffect((()=>{Q.current||!Boolean(U.user)||!Boolean(U.user.data)||P||X||K.current||(Q.current=!0,ae())}),[U.user,P,X]),Object($.jsx)($.Fragment,{children:Object($.jsxs)(te,{sx:{p:1,pb:3,boxShadow:"0px 6px 12px #00000034",borderRadius:"20px",...M&&{border:"1.5px solid #E90133"}},...L,children:[_&&Boolean(g)?Object($.jsx)(r.a.Fragment,{children:Object($.jsxs)(S.a,{container:!0,justifyContent:"space-between",alignItems:"center",spacing:4,sx:{p:1},children:[Object($.jsx)(S.a,{item:!0,xs:"auto",children:Boolean(O.course)?Object($.jsxs)(w.a,{color:"dark.main",children:[Object($.jsx)("b",{children:O.course.title}),Object($.jsx)("br",{}),O.course.trainers]}):Object($.jsx)(w.a,{color:"dark.main",children:Object($.jsx)("b",{children:Object($.jsx)("span",{dangerouslySetInnerHTML:{__html:O.title}})})})}),Object($.jsx)(S.a,{item:!0,xs:"auto"})]})}):Object($.jsxs)(r.a.Fragment,{children:[M&&Object($.jsx)(j.a,{size:"small",color:"red",label:Object($.jsx)("b",{children:t("Miglior scelta")}),sx:{position:"absolute",right:15,top:-13}}),Boolean(se)&&Object($.jsx)(j.a,{size:"small",color:"greenVariant",label:Object($.jsx)("b",{children:se.title}),sx:{position:"absolute",right:15,top:20}}),Object($.jsx)(T.a,{px:2.5,mt:4,children:Object($.jsxs)(S.a,{container:!0,justifyContent:"space-between",children:[Object($.jsxs)(S.a,{item:!0,xs:"c"===O.type?8:12,children:[Object($.jsx)(w.a,{variant:"h5",color:"dark.main",children:Object($.jsx)("b",{children:Object($.jsx)("span",{dangerouslySetInnerHTML:{__html:O.title}})})}),Object($.jsxs)(w.a,{component:"p",variant:"caption",color:"dark.main",children:[!!O.course&&Object($.jsxs)(c.a,{t:t,children:["Accedi senza termini di scadenza al ",Object($.jsxs)("b",{children:["corso ",{c:O.course.title}]})]}),!!O.type_description&&!Boolean(O.course)&&Object($.jsx)($.Fragment,{children:O.type_description})]}),Boolean(ie.total)&&Object($.jsxs)(A.a,{direction:"row",alignItems:"baseline",spacing:2,children:[Object($.jsxs)(T.a,{children:[Object($.jsx)(w.a,{variant:"h4",component:"span",color:"greenVariant.contrastText",children:"m_4"===O.type?Object($.jsx)("b",{children:(ie.total/100/4).toLocaleString("it-IT",{style:"currency",currency:"EUR"})}):Object($.jsx)("b",{children:("c"!==O.type?("y"===O.type||"w_y"===O.type||"w_y+y"===O.type||O.type,ie.total/100/12):ie.total/100).toLocaleString("it-IT",{minimumFractionDigits:2,maximumFractionDigits:2})})}),"\xa0\xa0",Object($.jsxs)(w.a,{component:"span",color:"dark.main",children:[Object($.jsx)(w.a,{component:"span",color:"greenVariant.contrastText",children:"\u20ac"}),!Boolean(O.course)&&Object($.jsxs)($.Fragment,{children:["/",t("mese")]})]})]}),!!O.amount_yearbook&&Object($.jsxs)(T.a,{children:[Object($.jsx)(R.a,{size:"small",variant:"text",color:"dark",endIcon:Object($.jsx)(W.a,{fontSize:"small",color:"inherit"}),onClick:()=>x(!0),children:t("Info")}),Object($.jsx)(E.a,{fullWidth:!0,open:v,onClose:()=>x(!1),maxWidth:"xs",children:Object($.jsxs)(T.a,{sx:{p:2},children:[Object($.jsx)(T.a,{sx:{textAlign:"right"},children:Object($.jsx)(I.a,{size:"large",color:"light",onClick:()=>x(!1),children:Object($.jsx)(F.a,{sx:{fontSize:"2rem"}})})}),Object($.jsx)(w.a,{variant:"h6",align:"center",color:"primary",sx:{mb:3},children:Object($.jsx)("b",{children:t("Listino vigente")})}),Object($.jsxs)(S.a,{container:!0,spacing:2,children:[Object($.jsx)(S.a,{item:!0,xs:7,children:Object($.jsxs)(w.a,{variant:"caption",color:"text.primary_wellness",sx:{pl:1},children:[t("Prodotto (Durata 12 mesi):")," ",Object($.jsx)("br",{})," ",Object($.jsx)("b",{style:{paddingLeft:8},children:Object($.jsx)("span",{dangerouslySetInnerHTML:{__html:O.title}}
2)})]})}),Object($.jsx)(S.a,{item:!0,xs:!0,children:Object($.jsx)(w.a,{variant:"caption",color:"text.primary_wellness",align:"right",component:"div",children:t("Prezzo attuale (\u20ac)")})}),Object($.jsx)(S.a,{item:!0,xs:!0,children:Object($.jsx)(w.a,{variant:"caption",color:"text.primary_wellness",align:"right",component:"div",sx:{pr:1},children:t("Prezzo pieno (\u20ac)")})})]}),Object($.jsx)(T.a,{sx:{borderRadius:"9px",border:"2px solid #F5F5F5",mt:1,py:2},children:Object($.jsxs)(S.a,{container:!0,spacing:2,alignItems:"center",children:[Object($.jsx)(S.a,{item:!0,xs:7,children:Object($.jsx)(w.a,{variant:"caption",component:"div",color:"text.primary_wellness",sx:{pl:1},children:t("Contenuti della piattaforma")})}),Object($.jsx)(S.a,{item:!0,xs:!0,children:Object($.jsx)(w.a,{variant:"caption",component:"div",color:"text.primary_wellness",align:"right",children:Object($.jsx)("b",{children:((ie.total-ie.annuaryTotal)/100).toLocaleString("it-IT",{minimumFractionDigits:2,maximumFractionDigits:2})})})}),Object($.jsx)(S.a,{item:!0,xs:!0,children:Object($.jsx)(w.a,{variant:"caption",component:"div",color:"text.primary_wellness",align:"right",sx:{pr:1},children:Object($.jsx)("del",{children:((ie.subtotal-O.amount_yearbook)/100).toLocaleString("it-IT",{minimumFractionDigits:2,maximumFractionDigits:2})})})})]})}),Object($.jsx)(T.a,{sx:{borderRadius:"9px",border:"2px solid #F5F5F5",mt:"-2px",py:2},children:Object($.jsxs)(S.a,{container:!0,spacing:2,alignItems:"center",children:[Object($.jsx)(S.a,{item:!0,xs:7,children:Object($.jsx)(w.a,{variant:"caption",component:"div",color:"text.primary_wellness",sx:{pl:1},children:t("Annuario in PDF")})}),Object($.jsx)(S.a,{item:!0,xs:!0,children:Object($.jsx)(w.a,{variant:"caption",component:"div",color:"text.primary_wellness",align:"right",children:Object($.jsx)("b",{children:(ie.annuaryTotal/100).toLocaleString("it-IT",{minimumFractionDigits:2,maximumFractionDigits:2})})})}),Object($.jsx)(S.a,{item:!0,xs:!0,children:Object($.jsx)(w.a,{variant:"caption",component:"div",color:"text.primary_wellness",align:"right",sx:{pr:1},children:Object($.jsx)("del",{children:(O.amount_yearbook/100).toLocaleString("it-IT",{minimumFractionDigits:2,maximumFractionDigits:2})})})})]})}),Object($.jsx)(T.a,{sx:{borderRadius:"9px",background:"#F5F5F5",mt:"-2px",py:2},children:Object($.jsxs)(S.a,{container:!0,spacing:2,alignItems:"center",children:[Object($.jsx)(S.a,{item:!0,xs:7,children:Object($.jsx)(w.a,{variant:"caption",component:"div",color:"text.primary_wellness",sx:{pl:1},children:t("Totale annuale")})}),Object($.jsx)(S.a,{item:!0,xs:!0,children:Object($.jsx)(w.a,{variant:"caption",component:"div",color:"text.primary_wellness",align:"right",children:Object($.jsx)("b",{children:(ie.total/100).toLocaleString("it-IT",{minimumFractionDigits:2,maximumFractionDigits:2})})})}),Object($.jsx)(S.a,{item:!0,xs:!0,children:Object($.jsx)(w.a,{variant:"caption",component:"div",color:"text.primary_wellness",align:"right",sx:{pr:1},children:Object($.jsx)("del",{children:(ie.subtotal/100).toLocaleString("it-IT",{minimumFractionDigits:2,maximumFractionDigits:2})})})})]})}),Object($.jsx)(T.a,{sx:{mt:"-2px",py:2},children:Object($.jsxs)(S.a,{container:!0,spacing:2,alignItems:"center",children:[Object($.jsx)(S.a,{item:!0,xs:7,children:Object($.jsx)(w.a,{variant:"caption",component:"div",color:"text.primary_wellness",sx:{pl:1},children:Object($.jsx)("b",{children:t("Totale al mese")})})}),Object($.jsx)(S.a,{item:!0,xs:!0,children:Object($.jsx)(w.a,{variant:"caption",component:"div",color:"greenVariant.contrastText",align:"right",children:Object($.jsx)("b",{children:(ie.total/100/12).toLocaleString("it-IT",{minimumFractionDigits:2,maximumFractionDigits:2})})})}),Object($.jsx)(S.a,{item:!0,xs:!0,children:Object($.jsx)(w.a,{variant:"caption",component:"div",color:"text.primary_wellness",align:"right",sx:{pr:1},children:Object($.jsx)("del",{children:(ie.subtotal/100/12).toLocaleString("it-IT",{minimumFractionDigits:2,maximumFractionDigits:2})})})})]})}),Object($.jsx)(T.a,{sx:{textAlign:"center",my:3},children:Object($.jsx)(R.a,{variant:"contained",color:"primary",size:"large",onClick:()=>x(!1),children:t("Torna indietro")})}),Object($.jsx)(w.a,{variant:"caption",color:"text.primary_wellness",sx:{fontSize:10},children:t("L'offerta, se attiva, \xe8 valida esclusivamente per l'anno di attivazione. Alla scadenza dei 12 mesi, l'abbonamento si rinnover\xe0 automaticamente a prezzo pieno del listino vigente, salvo disdetta da parte dell'utente. L'utente ricever\xe0 apposita comunicazione almeno 30 giorni prima della scadenza. La disdetta pu\xf2 essere effettuata in qualsiasi momento dal tuo profilo personale, con effetto alla naturale scadenza del periodo in corso.")})]})})]})]}),Object($.jsx)(T.a,{mt:1,children:Object($.jsx)(w.a,{variant:"caption",component:"div",color:"dark.main",children:Object($.jsxs)(r.a.Fragment,{children:[Object($.jsxs)(c.a,{t:t,children:["Pagamento unico di ",Object($.jsx)("b",{children:{c:(ie.total/100).toLocaleStr
2ing("it-IT",{style:"currency",currency:"EUR"})}})]}),"\xa0",Boolean(se)&&Object($.jsx)("del",{children:(ie.subtotal/100).toLocaleString("it-IT",{style:"currency",currency:"EUR"})})]})})})]}),Boolean(O.course)&&Object($.jsx)(S.a,{item:!0,xs:4,children:Object($.jsx)(y.a,{src:O.course.img_cover,sx:{width:"100%",borderRadius:"15px"},useSet:{sizes:[["150px"]]}})})]})}),P&&Object($.jsx)(T.a,{textAlign:"center",mt:3,px:2.5,children:Boolean(O.course)?Object($.jsx)(R.a,{fullWidth:!0,size:"large",variant:"contained",loading:X,color:"primary",onClick:()=>ae(),children:t("Ottieni corso")}):Object($.jsx)(R.a,{fullWidth:!0,size:"large",variant:"contained",loading:X,color:"primary",onClick:()=>ae(),children:O.upgradeable_to_annual_sub?t("Passa all'abbonamento"):t("Abbonati ora")})}),B&&Object($.jsx)(fe,{loading:X,handleCheckout:ae}),!!C&&Object($.jsx)(w.a,{color:"dark.main",sx:{mt:2,px:2.5},children:Object($.jsxs)("b",{children:[t("Include"),":"]})}),C]}),(U.isAuthenticated||!U.isAuthenticated&&!P)&&Boolean(O.packages.length)&&Object($.jsx)(T.a,{sx:{my:{xs:1,md:2}},children:O.packages.map((e=>{const n=Z.find((t=>t.id===e.id));return e.is_optional&&Object($.jsx)(r.a.Fragment,{children:Boolean(n)?Object($.jsxs)(T.a,{textAlign:"center",children:[Object($.jsx)(ee,{icon:Object($.jsx)(q.a,{sx:{fontSize:14}}),deleteIcon:Object($.jsx)(F.a,{}),label:e.summary,onDelete:()=>{const t=Z.findIndex((t=>t.id===e.id)),n=Z.slice();t>-1&&n.splice(t,1),J(n)}}),Object($.jsxs)(T.a,{sx:{mt:{xs:1,md:2}},children:[Object($.jsx)(D.a,{variant:"caption",align:"center",color:"text.dark",underline:"always",href:"javascript:void(0)",onClick:()=>{const t=Z.findIndex((t=>t.id===e.id)),n=Z.slice();t>-1&&n.splice(t,1),J(n)},children:t("Hai un altro coupon? Sostituiscilo")}),Object($.jsx)(w.a,{sx:{mt:{xs:0,md:2}},component:"div",variant:"caption",align:"center",children:e.description})]})]}):Object($.jsxs)(T.a,{textAlign:"center",children:[Object($.jsx)(w.a,{variant:"caption",align:"center",color:"text.dark",children:Object($.jsx)("b",{children:e.disclaimer})}),Object($.jsx)("br",{}),Object($.jsxs)(D.a,{variant:"caption",align:"center",color:"text.dark",sx:{mt:{xs:1,md:2}},underline:"none",href:"javascript:void(0)",onClick:()=>{const t=Z.slice();t.push(e),J(t)},children:[t("Riattiva il codice promozionale:")," ",Object($.jsx)("u",{children:e.title})]})]})},e.id)}))})]})})},ce=e=>{const{t:t}=Object(a.a)(),{request:n,cancelToken:i}=r.a.useContext(s.a),[o,c]=r.a.useState(e.offers?e.offers:{});return r.a.useEffect((()=>{Boolean(e.offers)||(async()=>{const e=i.source(),t=await n("get","/v2/offers",e.token);if(t)if(Boolean(t.offers)){const e=t.offers.find((e=>"y+w_y+now"===e.type));c({plan_now_tv:e})}else c(t)})()}),[]),Boolean(Object.keys(o).length)&&Object($.jsx)(oe,{paymentType:e.paymentType,offer:o.plan_now_tv,showCta:Boolean(e.offers),children:Object($.jsxs)(P.a,{dense:!0,sx:{color:"dark.main"},children:[Object($.jsxs)(ie,{children:[Object($.jsx)(ne,{children:Object($.jsx)(B.a,{color:"green"})}),Object($.jsx)(re,{primary:Object($.jsx)("b",{children:t("Abbonamento MasterClass + Scuola + Benessere")})})]}),Object($.jsxs)(ie,{children:[Object($.jsx)(ne,{children:Object($.jsx)(B.a,{color:"green"})}),Object($.jsx)(re,{primary:Object($.jsx)("b",{children:t("Contiene tutti i punti dell'offerta Acad\xe8mia.tv + Benessere")})})]}),Object($.jsxs)(ie,{children:[Object($.jsx)(ne,{children:Object($.jsx)(B.a,{color:"green"})}),Object($.jsx)(re,{primary:Object($.jsx)("b",{children:t("Accesso per 12 mesi ai corsi presenti e futuri")})})]}),Object($.jsxs)(ie,{sx:{borderRadius:"4px",backgroundColor:"#397F88","& .MuiListItemText-primary":{color:"#fff"},"& .MuiListItemText-secondary":{color:"#fff",fontSize:12}},children:[Object($.jsx)(ne,{children:Object($.jsx)(B.a,{color:"white"})}),Object($.jsx)(re,{primary:Object($.jsx)("b",{children:t("I primi 3 mesi di Serie TV e Show di NOW (anzich\xe8 8,99\u20ac/m)")}),secondary:Object($.jsxs)($.Fragment,{children:["I tuoi Show preferiti, come ",Object($.jsx)("b",{children:"MasterChef Italia - Nuova stagione e Bruno Barbieri - 4 Hotel"}
2)," e le migliori Serie TV internazionali e Sky Original.",Object($.jsx)("br",{}),"Offerta valida solo per nuovi abbonati NOW. Dal 4\xb0 mese il Pass Entertainment si rinnova al prezzo di listino in vigore, salvo disdetta."]})})]})]})})},le=e=>{const{t:t,i18n:n}=Object(a.a)(),{config:i}=r.a.useContext(b.a),{request:o,cancelToken:c}=r.a.useContext(s.a),l=JSON.parse(localStorage.getItem("dscfcpn")),[d,u]=r.a.useState(e.offers?e.offers:{});return r.a.useEffect((()=>{Boolean(e.offers)||(async()=>{const e=c.source();let t;if(t=l?await o("get","/v2/offers/with-discount/"+l.value,e.token):await o("get","/v2/offers",e.token),t)if(Boolean(t.offers)){const e=t.offers.find((e=>"dp"===e.type));u({plan_double:e})}else u(t)})()}),[]),Boolean(Object.keys(d).length)&&Object($.jsx)(oe,{paymentType:e.paymentType,offer:d.plan_double,showCta:Boolean(e.offers),children:Object($.jsxs)(P.a,{dense:!0,sx:{color:"dark.main"},children:[Object($.jsxs)(ie,{sx:{backgroundColor:"#F3F3F3","& .MuiListItemText-secondary":{color:"#27292D",fontSize:12}},children:[Object($.jsx)(ne,{children:Object($.jsx)(B.a,{color:"green"})}),Object($.jsx)(re,{primary:Object($.jsx)("b",{children:t("Abbonamento MasterClass")}),secondary:t("Corsi pratici di cucina professionali")})]}),Object($.jsxs)(ie,{children:[Object($.jsx)(ne,{children:Object($.jsx)(B.a,{color:"green"})}),Object($.jsx)(re,{primary:Object($.jsx)("b",{children:t("GiftCard da regalare a chi vuoi")})})]}),Object($.jsxs)(ie,{children:[Object($.jsx)(ne,{children:Object($.jsx)(B.a,{color:"green"})}),Object($.jsx)(re,{primary:Object($.jsx)("b",{children:t("Accesso per 12 mesi ai corsi presenti e futuri in uscita ogni mese")})})]}),i.basics_enabled&&Object($.jsxs)(ie,{children:[Object($.jsx)(ne,{children:Object($.jsx)(B.a,{color:"green"})}),Object($.jsx)(re,{primary:t("Entra nel mondo del lavoro con la Scuola")})]}),Object($.jsxs)(ie,{children:[Object($.jsx)(ne,{children:Object($.jsx)(B.a,{color:"green"})}),Object($.jsx)(re,{primary:t("Tutti i ricettari e certificati scaricabili")})]}),Object($.jsxs)(ie,{children:[Object($.jsx)(ne,{children:Object($.jsx)(B.a,{color:"green"})}),Object($.jsx)(re,{primary:Object($.jsxs)($.Fragment,{children:[Object($.jsx)("b",{children:Object(m.l)(d.plan_double.stats.course_duration_tot)})," ",t("di contenuti esclusivi")]})})]}),Object($.jsxs)(ie,{children:[Object($.jsx)(ne,{children:Object($.jsx)(B.a,{color:"green"})}),Object($.jsx)(re,{primary:Object($.jsxs)($.Fragment,{children:[Object($.jsx)("b",{children:d.plan_double.stats.course_count})," ",t("corsi in alta qualit\xe0")]})})]})]})})},de=e=>{const{t:t,i18n:n}=Object(a.a)(),{courseId:i}=Object(d.j)(),{config:o}=r.a.useContext(b.a),l=JSON.parse(localStorage.getItem("dscfcpn")),{request:u,cancelToken:h}=r.a.useContext(s.a),[p,m]=r.a.useState(e.offers?e.offers:{});return r.a.useEffect((()=>{Boolean(e.offers)||(async()=>{const e=h.source();let t;if(t=l?await u("get","/v2/offers/with-discount/"+l.value,e.token):await u("get","/v2/offers",e.token),t)if(Boolean(t.offers)){const e=t.offers.find((e=>"w_y+y"===e.type||"y+w_y"===e.type));m({plan_wellness_dual_subscription:e})}else m(t)})()}),[]),Boolean(Object.keys(p).length)&&Object($.jsx)(oe,{paymentType:e.paymentType,offer:p.plan_wellness_dual_subscription,showCta:Boolean(e.offers),children:Object($.jsxs)(P.a,{dense:!0,sx:{color:"dark.main"},children:[o.basics_enabled&&Object($.jsxs)(ie,{children:[Object($.jsx)(ne,{children:Object($.jsx)(B.a,{color:"green"})}),Object($.jsx)(re,{primary:Object($.jsx)("b",{children:t("Corsi di cucina per appassionati e principianti")})})]}),Object($.jsxs)(ie,{children:[Object($.jsx)(ne,{children:Object($.jsx)(B.a,{color:"green"})}),Object($.jsx)(re,{primary:Object($.jsx)("b",{children:t("Ricettari da scaricare")})})]}),Object($.jsxs)(ie,{children:[Object($.jsx)(ne,{children:Object($.jsx)(B.a,{color:"green"})}),Object($.jsx)(re,{primary:Object($.jsx)("b",{children:t("Certificati a fine corso")})})]}),Object($.jsxs)(ie,{children:[Object($.jsx)(ne,{children:Object($.jsx)(B.a,{color:"green"})}),Object($.jsx)(re,{primary:Object($.jsxs)(c.a,{t:t,children:[Object($.jsxs)("b",{children:[{c:p.plan_wellness_dual_subscription.stats.course_count}," corsi"]})," in HD e nuovi corsi ogni mese"]})})]}),o.recipes_enabled&&Object($.jsxs)(ie,{children:[Object($.jsx)(ne,{children:Object($.jsx)(B.a,{color:"green"})}),Object($.jsx)(re,{primary:Object($.jsxs)(c.a,{t:t,children:[Object($.jsxs)("b",{children:[{c:p.plan_wellness_dual_subscription.stats.recipe_count}," ricette"]})," incluse"]})})]}),!!p.plan_wellness_dual_subscription.amount_yearbook&&Object($.jsxs)(ie,{children:[Object($.jsx)(ne,{children:Object($.jsx)(B.a,{color:"green"})}),Object($.jsx)(re,{primary:Object($.jsx)("b",{children:t("Annuario in PDF")})})]}),o.wellness_enabled&&Object($.jsxs)(ie,{children:[Object($.jsx)(ne,{children:Object($.jsx)(B.a,{color:"green"})}),Object($.jsx)(re,{primary:Object($.jsx)("b",{children:t("Benessere: alimentazione, diete e salute")}
2)})]}),Object($.jsxs)(ie,{children:[Object($.jsx)(ne,{children:Object($.jsx)(F.a,{sx:{color:"#D1D1D1"}})}),Object($.jsx)(re,{sx:{color:"#D1D1D1"},primary:Object($.jsx)("del",{children:Object($.jsx)("b",{children:t("Tutor AI: Aiuto cuoco digitale 24/7")})})})]}),Object($.jsxs)(ie,{children:[Object($.jsx)(ne,{children:Object($.jsx)(F.a,{sx:{color:"#D1D1D1"}})}),Object($.jsx)(re,{sx:{color:"#D1D1D1"},primary:Object($.jsx)("del",{children:Object($.jsx)("b",{children:t("3 Libri di cucina digitali esclusivi")})})})]}),Object($.jsxs)(ie,{children:[Object($.jsx)(ne,{children:Object($.jsx)(F.a,{sx:{color:"#D1D1D1"}})}),Object($.jsx)(re,{sx:{color:"#D1D1D1"},primary:Object($.jsx)("del",{children:Object($.jsx)("b",{children:t("3 Dirette Cooking show")})})})]}),Object($.jsxs)(ie,{children:[Object($.jsx)(ne,{children:Object($.jsx)(F.a,{sx:{color:"#D1D1D1"}})}),Object($.jsx)(re,{sx:{color:"#D1D1D1"},primary:Object($.jsx)("del",{children:Object($.jsx)("b",{children:t("Risoluzione video in 4K")})})})]})]})})},ue=e=>{const{t:t,i18n:n}=Object(a.a)(),{request:i,cancelToken:o}=r.a.useContext(s.a),l=JSON.parse(localStorage.getItem("dscfcpn")),[d,u]=r.a.useState(e.offers?e.offers:{}),{config:h}=r.a.useContext(b.a);return r.a.useEffect((()=>{Boolean(e.offers)||(async()=>{const e=o.source();let t;if(t=l?await i("get","/v2/offers/with-discount/"+l.value,e.token):await i("get","/v2/offers",e.token),t)if(Boolean(t.offers)){const e=t.offers.find((e=>"w_dp"===e.type));u({plan_wellness_double:e})}else u(t)})()}),[]),Boolean(Object.keys(d).length)&&Object($.jsx)(oe,{paymentType:e.paymentType,offer:d.plan_wellness_double,showCta:Boolean(e.offers),badge:Object($.jsx)(se,{children:Object($.jsx)(w.a,{variant:"subtitle2",children:Object($.jsx)("b",{children:t("Miglior prezzo")})})}),children:Object($.jsxs)(P.a,{dense:!0,sx:{color:"dark.main"},children:[Object($.jsxs)(ie,{children:[Object($.jsx)(ne,{children:Object($.jsx)(B.a,{color:"green"})}),Object($.jsx)(re,{primary:Object($.jsx)(w.a,{color:"green.main",children:Object($.jsx)("b",{children:t("Un abbonamento per 12 mesi")})})})]}),Object($.jsxs)(ie,{children:[Object($.jsx)(ne,{children:Object($.jsx)(B.a,{color:"green"})}),Object($.jsx)(re,{primary:t("Accesso illimitato ai corsi presenti e futuri")})]}),Object($.jsxs)(ie,{children:[Object($.jsx)(ne,{children:Object($.jsx)(B.a,{color:"green"})}),Object($.jsx)(re,{primary:t("Impara da professionisti alimentari")})]}),Object($.jsxs)(ie,{children:[Object($.jsx)(ne,{children:Object($.jsx)(B.a,{color:"green"})}),Object($.jsx)(re,{primary:t("Tutti i ricettari e certificati scaricabili")})]}),Object($.jsxs)(ie,{children:[Object($.jsx)(ne,{children:Object($.jsx)(B.a,{color:"green"})}),Object($.jsx)(re,{primary:Object($.jsxs)($.Fragment,{children:[Object($.jsx)("b",{children:Object(m.l)(d.plan_wellness_double.stats.course_duration_tot)})," ",t("di contenuti esclusivi")]})})]}),Object($.jsxs)(ie,{children:[Object($.jsx)(ne,{children:Object($.jsx)(B.a,{color:"green"})}),Object($.jsx)(re,{primary:Object($.jsxs)(c.a,{t:t,children:[Object($.jsxs)("b",{children:[{c:d.plan_wellness_double.stats.course_count}," corsi"]})," in alta qualit\xe0"]})})]}),h.recipes_enabled&&Object($.jsxs)(ie,{children:[Object($.jsx)(ne,{children:Object($.jsx)(B.a,{color:"green"})}),Object($.jsx)(re,{primary:Object($.jsxs)(c.a,{t:t,children:[Object($.jsxs)("b",{children:[{c:d.plan_wellness_double.stats.recipe_count}," ricette"]})," incluse"]})})]}),!!d.plan_wellness_double.amount_yearbook&&Object($.jsxs)(ie,{children:[Object($.jsx)(ne,{children:Object($.jsx)(B.a,{color:"green"})}),Object($.jsx)(re,{primary:Object($.jsx)("b",{children:t("Annuario in PDF")})})]}),h.wellness_enabled&&Object($.jsxs)(ie,{children:[Object($.jsx)(ne,{children:Object($.jsx)(F.a,{sx:{color:"#D1D1D1"}})}),Object($.jsx)(re,{sx:{color:"#D1D1D1"},primary:Object($.jsx)("del",{children:Object($.jsx)("b",{children:t("Benessere: alimentazione, diete e salute")})})})]}),Object($.jsxs)(ie,{children:[Object($.jsx)(ne,{children:Object($.jsx)(F.a,{sx:{color:"#D1D1D1"}})}),Object($.jsx)(re,{sx:{color:"#D1D1D1"},primary:Object($.jsx)("del",{children:Object($.jsx)("b",{children:t("Tutor AI: Aiuto cuoco digitale 24/7")})})})]}),Object($.jsxs)(ie,{children:[Object($.jsx)(ne,{children:Object($.jsx)(F.a,{sx:{color:"#D1D1D1"}}
2)}),Object($.jsx)(re,{sx:{color:"#D1D1D1"},primary:Object($.jsx)("del",{children:Object($.jsx)("b",{children:t("3 Libri di cucina digitali esclusivi")})})})]}),Object($.jsxs)(ie,{children:[Object($.jsx)(ne,{children:Object($.jsx)(F.a,{sx:{color:"#D1D1D1"}})}),Object($.jsx)(re,{sx:{color:"#D1D1D1"},primary:Object($.jsx)("del",{children:Object($.jsx)("b",{children:t("3 Dirette Cooking show")})})})]}),Object($.jsxs)(ie,{children:[Object($.jsx)(ne,{children:Object($.jsx)(F.a,{sx:{color:"#D1D1D1"}})}),Object($.jsx)(re,{sx:{color:"#D1D1D1"},primary:Object($.jsx)("del",{children:Object($.jsx)("b",{children:t("Risoluzione video in 4K")})})})]})]})})},he=e=>{const{t:t}=Object(a.a)(),{config:n}=r.a.useContext(b.a),{request:i,cancelToken:o}=r.a.useContext(s.a),c=JSON.parse(localStorage.getItem("dscfcpn")),[l,d]=r.a.useState(e.offers?e.offers:{});return r.a.useEffect((()=>{Boolean(e.offers)||(async()=>{const e=o.source();let t;if(t=c?await i("get","/v2/offers/with-discount/"+c.value,e.token):await i("get","/v2/offers",e.token),t)if(Boolean(t.offers)){const e=t.offers.find((e=>"m_4"===e.type));d({plan_subscription_monthly:e})}else d(t)})()}),[]),Boolean(Object.keys(l).length)&&Object($.jsx)(oe,{paymentType:e.paymentType,offer:l.plan_subscription_monthly,showCta:Boolean(e.offers),children:Object($.jsxs)(P.a,{dense:!0,sx:{color:"dark.main"},children:[Object($.jsxs)(ie,{sx:{backgroundColor:"#F3F3F3","& .MuiListItemText-secondary":{color:"#27292D",fontSize:12}},children:[Object($.jsx)(ne,{children:Object($.jsx)(B.a,{color:"green"})}),Object($.jsx)(re,{primary:Object($.jsx)("b",{children:t("Abbonamento MasterClass")}),secondary:t("Corsi pratici di cucina professionali")})]}),Object($.jsxs)(ie,{children:[Object($.jsx)(ne,{children:Object($.jsx)(B.a,{color:"green"})}),Object($.jsx)(re,{primary:Object($.jsx)("b",{children:t("Accesso per 4 mesi ai corsi presenti e futuri")})})]}),n.basics_enabled&&Object($.jsxs)(ie,{children:[Object($.jsx)(ne,{children:Object($.jsx)(B.a,{color:"green"})}),Object($.jsx)(re,{primary:t("Entra nel mondo del lavoro con la Scuola")})]}),Object($.jsxs)(ie,{children:[Object($.jsx)(ne,{children:Object($.jsx)(B.a,{color:"green"})}),Object($.jsx)(re,{primary:t("Tutti i ricettari e certificati scaricabili")})]}),Object($.jsxs)(ie,{children:[Object($.jsx)(ne,{children:Object($.jsx)(B.a,{color:"green"})}),Object($.jsx)(re,{primary:Object($.jsxs)($.Fragment,{children:[Object($.jsx)("b",{children:Object(m.l)(l.plan_subscription_monthly.stats.course_duration_tot)})," ",t("di contenuti esclusivi")]})})]}),Object($.jsxs)(ie,{children:[Object($.jsx)(ne,{children:Object($.jsx)(B.a,{color:"green"})}),Object($.jsx)(re,{primary:Object($.jsxs)($.Fragment,{children:[Object($.jsx)("b",{children:l.plan_subscription_monthly.stats.course_count})," ",t("corsi in alta qualit\xe0")]})})]})]})})},pe=e=>{const{t:t,i18n:n}=Object(a.a)(),{courseId:i}=Object(d.j)(),{config:o}=r.a.useContext(b.a),l=JSON.parse(localStorage.getItem("dscfcpn")),{request:u,cancelToken:h}=r.a.useContext(s.a),[p,m]=r.a.useState(e.offers?e.offers:{}),{userSelectedForABtest:g}=ve();return r.a.useEffect((()=>{Boolean(e.offers)||(async()=>{const e=h.source();let t;if(t=l?await u("get","/v2/offers/with-discount/"+l.value,e.token):await u("get","/v2/offers",e.token),t)if(Boolean(t.offers)){const e=t.offers.find((e=>"y"===e.type));m({plan_subscription:e})}else m(t)})()}),[]),console.log(o),Boolean(Object.keys(p).length)&&Object($.jsx)(oe,{paymentType:e.paymentType,offer:p.plan_subscription,showCta:Boolean(e.offers),children:Object($.jsxs)(P.a,{dense:!0,sx:{color:"dark.main"},children:[o.basics_enabled&&Object($.jsxs)(ie,{children:[Object($.jsx)(ne,{children:Object($.jsx)(B.a,{color:"green"})}),Object($.jsx)(re,{primary:Object($.jsx)("b",{children:t("Corsi di cucina per appassionati e principianti")})})]}),Object($.jsxs)(ie,{children:[Object($.jsx)(ne,{children:Object($.jsx)(B.a,{color:"green"})}),Object($.jsx)(re,{primary:Object($.jsx)("b",{children:t("Ricettari da scaricare")})})]}),Object($.jsxs)(ie,{children:[Object($.jsx)(ne,{children:Object($.jsx)(B.a,{color:"green"})}),Object($.jsx)(re,{primary:Object($.jsx)("b",{children:t("Certificati a fine corso")})})]}),Object($.jsxs)(ie,{children:[Object($.jsx)(ne,{children:Object($.jsx)(B.a,{color:"green"})}),Object($.jsx)(re,{primary:Object($.jsxs)(c.a,{t:t,children:[Object($.jsxs)("b",{children:[{c:p.plan_subscription.stats.course_count}," corsi"]})," in HD e nuovi corsi ogni mese"]})})]}),o.recipes_enabled&&Object($.jsxs)(ie,{children:[Object($.jsx)(ne,{children:Object($.jsx)(B.a,{color:"green"})}),Object($.jsx)(re,{primary:Object($.jsxs)(c.a,{t:t,children:[Object($.jsxs)("b",{children:[{c:p.plan_subscription.stats.recipe_count}," ricette"]})," incluse"]})})]}),!!p.plan_subscription.amount_yearbook&&Object($.jsxs)(ie,{children:[Object($.jsx)(ne,{children:Object($.jsx)(B.a,{color:"green"})}),Object($.jsx)(re,{primary:Object($.jsx)("b",{children:t("Annuario in PDF")})})]}),o.wellness_enabled&&Object($.jsxs)(ie,{children:[Object($.jsx)(ne,{children:Object($.jsx)(F.a,{sx:{color:"#D1D1D1"}}
2)}),Object($.jsx)(re,{sx:{color:"#D1D1D1"},primary:Object($.jsx)("del",{children:Object($.jsx)("b",{children:t("Benessere: alimentazione, diete e salute")})})})]}),"it"===n.language&&Object($.jsxs)($.Fragment,{children:[Object($.jsxs)(ie,{children:[Object($.jsx)(ne,{children:Object($.jsx)(F.a,{sx:{color:"#D1D1D1"}})}),Object($.jsx)(re,{sx:{color:"#D1D1D1"},primary:Object($.jsx)("del",{children:Object($.jsx)("b",{children:t("Tutor AI: Aiuto cuoco digitale 24/7")})})})]}),Object($.jsxs)(ie,{children:[Object($.jsx)(ne,{children:Object($.jsx)(F.a,{sx:{color:"#D1D1D1"}})}),Object($.jsx)(re,{sx:{color:"#D1D1D1"},primary:Object($.jsx)("del",{children:Object($.jsx)("b",{children:t("3 Libri di cucina digitali esclusivi")})})})]}),Object($.jsxs)(ie,{children:[Object($.jsx)(ne,{children:Object($.jsx)(F.a,{sx:{color:"#D1D1D1"}})}),Object($.jsx)(re,{sx:{color:"#D1D1D1"},primary:Object($.jsx)("del",{children:Object($.jsx)("b",{children:t("3 Dirette Cooking show")})})})]}),Object($.jsxs)(ie,{children:[Object($.jsx)(ne,{children:Object($.jsx)(F.a,{sx:{color:"#D1D1D1"}})}),Object($.jsx)(re,{sx:{color:"#D1D1D1"},primary:Object($.jsx)("del",{children:Object($.jsx)("b",{children:t("Risoluzione video in 4K")})})})]})]})]})})},me=e=>{const{t:t}=Object(a.a)(),{courseId:n}=Object(d.j)(),{config:i}=r.a.useContext(b.a),o=JSON.parse(localStorage.getItem("dscfcpn")),{request:c,cancelToken:l}=r.a.useContext(s.a),[u,h]=r.a.useState(e.offers?e.offers:{}),{userSelectedForABtest:p}=ve();return r.a.useEffect((()=>{Boolean(e.offers)||(async()=>{const e=l.source();let t;if(t=o?await c("get","/v2/offers/with-discount/"+o.value,e.token):await c("get","/v2/offers",e.token),t)if(Boolean(t.offers)){const e=t.offers.find((e=>"pro"===e.type));h({plan_pro_addon_subscription:e})}else h(t)})()}),[]),Boolean(Object.keys(u).length)&&Object($.jsx)(oe,{paymentType:e.paymentType,offer:u.plan_pro_addon_subscription,showCta:Boolean(e.offers),bestChoise:!!n,isPro:!0})},ge=e=>{const{t:t,i18n:n}=Object(a.a)(),{courseId:i}=Object(d.j)(),{config:o}=r.a.useContext(b.a),l=JSON.parse(localStorage.getItem("dscfcpn")),{request:u,cancelToken:h}=r.a.useContext(s.a),[p,m]=r.a.useState(e.offers?e.offers:{}),{userSelectedForABtest:g}=ve();return r.a.useEffect((()=>{Boolean(e.offers)||(async()=>{const e=h.source();let t;if(t=l?await u("get","/v2/offers/with-discount/"+l.value,e.token):await u("get","/v2/offers",e.token),t)if(Boolean(t.offers)){const e=t.offers.find((e=>"y+pro"===e.type));m({plan_pro_subscription:e})}else m(t)})()}),[]),Boolean(Object.keys(p).length)&&Object($.jsx)(oe,{paymentType:e.paymentType,offer:p.plan_pro_subscription,showCta:Boolean(e.offers),bestChoise:!0,isPro:!0,children:Object($.jsxs)(P.a,{dense:!0,sx:{color:"dark.main"},children:[o.basics_enabled&&Object($.jsxs)(ie,{children:[Object($.jsx)(ne,{children:Object($.jsx)(B.a,{color:"green"})}),Object($.jsx)(re,{primary:Object($.jsx)("b",{children:t("Corsi di cucina per appassionati e principianti")})})]}),Object($.jsxs)(ie,{children:[Object($.jsx)(ne,{children:Object($.jsx)(B.a,{color:"green"})}),Object($.jsx)(re,{primary:Object($.jsx)("b",{children:t("Ricettari da scaricare")})})]}),Object($.jsxs)(ie,{children:[Object($.jsx)(ne,{children:Object($.jsx)(B.a,{color:"green"})}),Object($.jsx)(re,{primary:Object($.jsx)("b",{children:t("Certificati a fine corso")})})]}),Object($.jsxs)(ie,{children:[Object($.jsx)(ne,{children:Object($.jsx)(B.a,{color:"green"})}),Object($.jsx)(re,{primary:Object($.jsxs)(c.a,{t:t,children:[Object($.jsxs)("b",{children:[{c:p.plan_pro_subscription.stats.course_count}," corsi"]})," in HD e nuovi corsi ogni mese"]})})]}),o.wellness_enabled&&Object($.jsxs)(ie,{children:[Object($.jsx)(ne,{children:Object($.jsx)(F.a,{sx:{color:"#D1D1D1"}})}),Object($.jsx)(re,{sx:{color:"#D1D1D1"},primary:Object($.jsx)("del",{children:Object($.jsx)("b",{children:t("Benessere: alimentazione, diete e salute")})})})]}),o.recipes_enabled&&Object($.jsxs)(ie,{children:[Object($.jsx)(ne,{children:Object($.jsx)(B.a,{color:"green"})}),Object($.jsx)(re,{primary:Object($.jsxs)(c.a,{t:t,children:[Object($.jsxs)("b",{children:[{c:p.plan_pro_subscription.stats.recipe_count}," ricette"]})," incluse"]})})]}),!!p.plan_pro_subscription.amount_yearbook&&Object($.jsxs)(ie,{children:[Object($.jsx)(ne,{children:Object($.jsx)(B.a,{color:"green"})}),Object($.jsx)(re,{primary:Object($.jsx)("b",{children:t("Annuario in PDF")})})]})]})})},fe=e=>{const{t:t,i18n:n}=Object(a.a)(),i=Object(d.k)("/".concat(n.language,"/auth/:type/:buy?/:courseId?")),{handleCheckout:s,loading:o}=e,[c,l]=r.a.useState(!1),u=Object(h.a)(),m=Object(p.a)(u.breakpoints.down("md")),g=[{title:t("Tutor AI: Aiuto cuoco digitale 24/7"),description:t("L\u2019assistente di cucina ideato da Acad\xe8mia.tv che racchiude l\u2019esperienza dei pi\xf9 grandi chef del mondo. Sempre disponibile, ti risponde in tempo reale, ti guida passo dopo passo nelle ricette e ti aiuta a migliorarle.")},{title:t("3 Libri di cucina digitali esclusivi"),description:t("Ricevi gratuitamente 3 libri di cucina digitali, che ti verranno inviati via email durante l\u2019anno di abbonamento.")},{title:t("3 Dirette Cooking show"),description:t("Partecipa a dirette esclusive per cucinare insieme allo chef e interagire con lui in tempo reale. Per il pubblico l\u2019accesso \xe8 a pagamento, ma per te sar\xe0 incluso.")},{title:t("Risoluzione video in 4K"),description:t("Solo con il pacchetto Pro puoi goderti le lezioni in altissima definizione 4K: un\u2019esperienza visiva esclusiva che gli altri piani non offrono.")}];return Object($.jsxs)(T.a,{sx:{my:3,borderRadius:"9px",backgroundColor:"#FFEAEE",p:2},children:[Object($.jsxs)(M.a,{fullWidth:!0,maxWidth:"lg",scroll:"body",fullScreen:m,open:c,className:"wellness",handleClose:()=>{l(!1)},children:[Object($.jsxs)(w.a,{align:"center",variant:"h5",color:"primary",children:[Object($.jsx)("b",{children:t("Solo nel piano PRO")})," ",Object($.jsx)(C.a,{component:H.a,fontSize:"inherit",color:"inherit"})]}),Object($.jsxs)(T.a,{sx:{p:3},children:[Object($.jsx)(S.a,{container:!0,spacing:2,alignItems:"stretch",children:g.map(((e,t)=>Object($.jsx)(S.a,{item:!0,xs:12,md:6,xl:3,children:Object($.jsxs)(T.a,{sx:{backgroundColor:"#FFEAEE",borderRadius:"9px",px:2,py:3,textAlign:"center",boxSizing:"border-box",height:"100%"},children:[Object($.jsx)(B.a,{color:"primary",sx:{fontSize:30}}),Object($.jsx)(w.a,{variant:"h6",color:"text.dark",sx:{my:2},children:Object($.jsx)("b",{children:e.title})}),Object($.jsx)(w.a,{component:"p",variant:"caption",color:"text.dark",children:e.description})]})},"info"+t)))}),Object($.jsxs)(T.a,{sx:{textAlign:"center",mt:3},children:[Object($.jsx)(w.a,{color:"text.dark",children:Object($.jsx)("b",{children:t("Attiva oggi il piano PRO")})}),Object($.jsx)(R.a,{loading:o,size:"large",variant:"contained",color:"primary",sx:{mt:2},onClick:()=>{i?l(!1):s()},children:t("Inizia ora")})]})]})]}),Object($.jsxs)(A.a,{direction:"row",justifyContent:"space-between",alignItems:"center",children:[Object($.jsxs)(w.a,{component:"div",variant:"caption",sx:{fontWeight:"bold",color:"#D61A3C"},children:[t("Solo nel piano PRO")," ",Object($.jsx)(C.a,{component:H.a,fontSize:"inherit",color:"inherit"})]}),Object($.jsx)(T.a,{children:Object($.jsx)(R.a,{size:"small",variant:"text",color:"dark",endIcon:Object($.jsx)(W.a,{fontSize:"small",color:"inherit"}),onClick:()=>l(!0),children:t("Info")})})]}),Object($.jsxs)(P.a,{dense:!0,children:[Object($.jsxs)(ie,{disablePadding:!0,children:[Object($.jsx)(ne,{children:Object($.jsx)(B.a,{color:"primary"})}),Object($.jsx)(re,{primary:Object($.jsx)("b",{children:t("Tutor AI: Aiuto cuoco digitale 24/7")})})]}),Object($.jsxs)(ie,{disablePadding:!0,children:[Object($.jsx)(ne,{children:Object($.jsx)(B.a,{color:"primary"})}),Object($.jsx)(re,{primary:Object($.jsx)("b",{children:t("3 Libri di cucina digitali esclusivi")})})]}),Object($.jsxs)(ie,{disablePadding:!0,children:[Object($.jsx)(ne,{children:Object($.jsx)(B.a,{color:"primary"})}),Object($.jsx)(re,{primary:Object($.jsx)("b",{children:t("3 Dirette Cooking show")})})]}),Object($.jsxs)(ie,{disablePadding:!0,children:[Object($.jsx)(ne,{children:Object($.jsx)(B.a,{color:"primary"})}),Object($.jsx)(re,{primary:Object($.jsx)("b",{children:t("Risoluzione video in 4K")})})]})]})]})},be=e=>{const{t:t,i18n:n}=Object(a.a)(),{courseId:i}=Object(d.j)(),{config:o}=r.a.useContext(b.a),l=JSON.parse(localStorage.getItem("dscfcpn")),{request:u,cancelToken:h}=r.a.useContext(s.a),[p,m]=r.a.useState(e.offers?e.offers:{});return r.a.useEffect((()=>{Boolean(e.offers)||(async()=>{const e=h.source();let t;if(t=l?await u("get","/v2/offers/with-discount/"+l.value,e.token):await u("get","/v2/offers",e.token),t)if(Boolean(t.offers)){const e=t.offers.find((e=>"w_y+y+pro"===e.type||"y+w_y+pro"===e.type));m({plan_pro_dual_subscription:e})}else m(t)}
2)()}),[]),Boolean(Object.keys(p).length)&&Object($.jsx)(oe,{paymentType:e.paymentType,offer:p.plan_pro_dual_subscription,showCta:Boolean(e.offers),bestChoise:!0,isPro:!0,children:Object($.jsxs)(P.a,{dense:!0,sx:{color:"dark.main"},children:[o.basics_enabled&&Object($.jsxs)(ie,{children:[Object($.jsx)(ne,{children:Object($.jsx)(B.a,{color:"green"})}),Object($.jsx)(re,{primary:Object($.jsx)("b",{children:t("Corsi di cucina per appassionati e principianti")})})]}),Object($.jsxs)(ie,{children:[Object($.jsx)(ne,{children:Object($.jsx)(B.a,{color:"green"})}),Object($.jsx)(re,{primary:Object($.jsx)("b",{children:t("Ricettari da scaricare")})})]}),Object($.jsxs)(ie,{children:[Object($.jsx)(ne,{children:Object($.jsx)(B.a,{color:"green"})}),Object($.jsx)(re,{primary:Object($.jsx)("b",{children:t("Certificati a fine corso")})})]}),Object($.jsxs)(ie,{children:[Object($.jsx)(ne,{children:Object($.jsx)(B.a,{color:"green"})}),Object($.jsx)(re,{primary:Object($.jsxs)(c.a,{t:t,children:[Object($.jsxs)("b",{children:[{c:p.plan_pro_dual_subscription.stats.course_count}," corsi"]})," in HD e nuovi corsi ogni mese"]})})]}),o.wellness_enabled&&Object($.jsxs)(ie,{children:[Object($.jsx)(ne,{children:Object($.jsx)(B.a,{color:"green"})}),Object($.jsx)(re,{primary:Object($.jsx)("b",{children:t("Benessere: alimentazione, diete e salute")})})]}),o.recipes_enabled&&Object($.jsxs)(ie,{children:[Object($.jsx)(ne,{children:Object($.jsx)(B.a,{color:"green"})}),Object($.jsx)(re,{primary:Object($.jsxs)(c.a,{t:t,children:[Object($.jsxs)("b",{children:[{c:p.plan_pro_dual_subscription.stats.recipe_count}," ricette"]})," incluse"]})})]}),!!p.plan_pro_dual_subscription.amount_yearbook&&Object($.jsxs)(ie,{children:[Object($.jsx)(ne,{children:Object($.jsx)(B.a,{color:"green"})}),Object($.jsx)(re,{primary:Object($.jsx)("b",{children:t("Annuario in PDF")})})]})]})})},ye=e=>{const{t:t,i18n:n}=Object(a.a)(),{config:i}=r.a.useContext(b.a),{request:o,cancelToken:l}=r.a.useContext(s.a),d=JSON.parse(localStorage.getItem("dscfcpn")),[u,h]=r.a.useState(e.offers?e.offers:{}),{userSelectedForABtest:p}=ve();return r.a.useEffect((()=>{Boolean(e.offers)||(async()=>{const e=l.source();let t;if(t=d?await o("get","/v2/offers/with-discount/"+d.value,e.token):await o("get","/v2/offers",e.token),t)if(Boolean(t.offers)){const e=t.offers.find((e=>"w_y"===e.type));h({plan_wellness_subscription:e})}else h(t)})()}),[]),Boolean(Object.keys(u).length)&&Object($.jsx)(oe,{paymentType:e.paymentType,offer:u.plan_wellness_subscription,showCta:Boolean(e.offers),children:Object($.jsxs)(P.a,{dense:!0,sx:{color:"dark.main"},children:[i.basics_enabled&&Object($.jsxs)(ie,{children:[Object($.jsx)(ne,{children:Object($.jsx)(F.a,{sx:{color:"#D1D1D1"}})}),Object($.jsx)(re,{sx:{color:"#D1D1D1"},primary:Object($.jsx)("del",{children:Object($.jsx)("b",{children:t("Corsi di cucina per appassionati e principianti")})})})]}),Object($.jsxs)(ie,{children:[Object($.jsx)(ne,{children:Object($.jsx)(B.a,{color:"green"})}),Object($.jsx)(re,{primary:Object($.jsx)("b",{children:t("Ricettari da scaricare")})})]}),Object($.jsxs)(ie,{children:[Object($.jsx)(ne,{children:Object($.jsx)(B.a,{color:"green"})}),Object($.jsx)(re,{primary:Object($.jsx)("b",{children:t("Certificati a fine corso")})})]}),Object($.jsxs)(ie,{children:[Object($.jsx)(ne,{children:Object($.jsx)(B.a,{color:"green"})}),Object($.jsx)(re,{primary:Object($.jsxs)(c.a,{t:t,children:[Object($.jsxs)("b",{children:[{c:u.plan_wellness_subscription.stats.course_count}," corsi"]})," in HD e nuovi corsi ogni mese"]})})]}),i.wellness_enabled&&Object($.jsxs)(ie,{children:[Object($.jsx)(ne,{children:Object($.jsx)(B.a,{color:"green"})}),Object($.jsx)(re,{primary:Object($.jsx)("b",{children:t("Benessere: alimentazione, diete e salute")})})]}),i.recipes_enabled&&Object($.jsxs)(ie,{children:[Object($.jsx)(ne,{children:Object($.jsx)(B.a,{color:"green"})}),Object($.jsx)(re,{primary:Object($.jsxs)(c.a,{t:t,children:[Object($.jsxs)("b",{children:[{c:u.plan_wellness_subscription.stats.recipe_count}," ricette"]})," incluse"]})})]}),!!u.plan_wellness_subscription.amount_yearbook&&Object($.jsxs)(ie,{children:[Object($.jsx)(ne,{children:Object($.jsx)(B.a,{color:"green"})}),Object($.jsx)(re,{primary:Object($.jsx)("b",{children:t("Annuario in PDF")})})]}),Object($.jsxs)(ie,{children:[Object($.jsx)(ne,{children:Object($.jsx)(F.a,{sx:{color:"#D1D1D1"}}
2)}),Object($.jsx)(re,{sx:{color:"#D1D1D1"},primary:Object($.jsx)("del",{children:Object($.jsx)("b",{children:t("Tutor AI: Aiuto cuoco digitale 24/7")})})})]}),Object($.jsxs)(ie,{children:[Object($.jsx)(ne,{children:Object($.jsx)(F.a,{sx:{color:"#D1D1D1"}})}),Object($.jsx)(re,{sx:{color:"#D1D1D1"},primary:Object($.jsx)("del",{children:Object($.jsx)("b",{children:t("3 Libri di cucina digitali esclusivi")})})})]}),Object($.jsxs)(ie,{children:[Object($.jsx)(ne,{children:Object($.jsx)(F.a,{sx:{color:"#D1D1D1"}})}),Object($.jsx)(re,{sx:{color:"#D1D1D1"},primary:Object($.jsx)("del",{children:Object($.jsx)("b",{children:t("3 Dirette Cooking show")})})})]}),Object($.jsxs)(ie,{children:[Object($.jsx)(ne,{children:Object($.jsx)(F.a,{sx:{color:"#D1D1D1"}})}),Object($.jsx)(re,{sx:{color:"#D1D1D1"},primary:Object($.jsx)("del",{children:Object($.jsx)("b",{children:t("Risoluzione video in 4K")})})})]})]})})},je=e=>{const{t:t,i18n:n}=Object(a.a)(),{config:i}=r.a.useContext(b.a),{request:o,cancelToken:l}=r.a.useContext(s.a),d=JSON.parse(localStorage.getItem("dscfcpn")),[u,h]=r.a.useState(e.offers?e.offers:{}),{userSelectedForABtest:p}=ve();return r.a.useEffect((()=>{Boolean(e.offers)||(async()=>{const e=l.source();let t;if(t=d?await o("get","/v2/offers/with-discount/"+d.value,e.token):await o("get","/v2/offers",e.token),t)if(Boolean(t.offers)){const e=t.offers.find((e=>"w_y+pro"===e.type));h({plan_pro_wellness_subscription:e})}else h(t)})()}),[]),Boolean(Object.keys(u).length)&&Object($.jsx)(oe,{paymentType:e.paymentType,offer:u.plan_pro_wellness_subscription,showCta:Boolean(e.offers),isPro:!0,children:Object($.jsxs)(P.a,{dense:!0,sx:{color:"dark.main"},children:[i.basics_enabled&&Object($.jsxs)(ie,{children:[Object($.jsx)(ne,{children:Object($.jsx)(F.a,{sx:{color:"#D1D1D1"}})}),Object($.jsx)(re,{sx:{color:"#D1D1D1"},primary:Object($.jsx)("del",{children:Object($.jsx)("b",{children:t("Corsi di cucina per appassionati e principianti")})})})]}),Object($.jsxs)(ie,{children:[Object($.jsx)(ne,{children:Object($.jsx)(B.a,{color:"green"})}),Object($.jsx)(re,{primary:Object($.jsx)("b",{children:t("Ricettari da scaricare")})})]}),Object($.jsxs)(ie,{children:[Object($.jsx)(ne,{children:Object($.jsx)(B.a,{color:"green"})}),Object($.jsx)(re,{primary:Object($.jsx)("b",{children:t("Certificati a fine corso")})})]}),Object($.jsxs)(ie,{children:[Object($.jsx)(ne,{children:Object($.jsx)(B.a,{color:"green"})}),Object($.jsx)(re,{primary:Object($.jsxs)(c.a,{t:t,children:[Object($.jsxs)("b",{children:[{c:u.plan_pro_wellness_subscription.stats.course_count}," corsi"]})," in HD e nuovi corsi ogni mese"]})})]}),i.wellness_enabled&&Object($.jsxs)(ie,{children:[Object($.jsx)(ne,{children:Object($.jsx)(B.a,{color:"green"})}),Object($.jsx)(re,{primary:Object($.jsx)("b",{children:t("Benessere: alimentazione, diete e salute")})})]}),i.recipes_enabled&&Object($.jsxs)(ie,{children:[Object($.jsx)(ne,{children:Object($.jsx)(B.a,{color:"green"})}),Object($.jsx)(re,{primary:Object($.jsxs)(c.a,{t:t,children:[Object($.jsxs)("b",{children:[{c:u.plan_pro_wellness_subscription.stats.recipe_count}," ricette"]})," incluse"]})})]}),!!u.plan_pro_wellness_subscription.amount_yearbook&&Object($.jsxs)(ie,{children:[Object($.jsx)(ne,{children:Object($.jsx)(B.a,{color:"green"})}),Object($.jsx)(re,{primary:Object($.jsx)("b",{children:t("Annuario in PDF")})})]})]})})},_e=e=>{const{t:t}=Object(a.a)(),{buy:n,courseId:i}=Object(d.j)(),{request:o,cancelToken:l}=r.a.useContext(s.a),u=JSON.parse(localStorage.getItem("dscfcpn")),{config:h}=r.a.useContext(b.a),[p,m]=r.a.useState(e.offers?e.offers:{});return r.a.useEffect((()=>{Boolean(e.offers)||(async()=>{const e=l.source();let t;if(t=u?await o("get","/v2/offers/course/"+i+"/with-discount/"+u.value,e.token):await o("get","/v2/offers/course/"+i,e.token),t)if(Boolean(t.offers)){const e=t.offers.find((e=>"y"===e.type));m({plan_subscription:e})}else m(t)})()}),[]),Boolean(Object.keys(p).length)&&Object($.jsx)(oe,{paymentType:e.paymentType,offer:p.plan_course,showCta:!Boolean(n),children:Object($.jsxs)(P.a,{dense:!0,sx:{color:"dark.main"},children:[Object($.jsxs)(ie,{children:[Object($.jsx)(ne,{children:Object($.jsx)(B.a,{color:"green"})}),Object($.jsx)(re,{primary:Object($.jsx)("b",{children:t("Accesso limitato ad un solo corso")})})]}),Object($.jsxs)(ie,{children:[Object($.jsx)(ne,{children:Object($.jsx)(F.a,{sx:{color:"#D1D1D1"}}
2)}),Object($.jsx)(re,{sx:{color:"#D1D1D1"},primary:Object($.jsx)("del",{children:Object($.jsx)("b",{children:t("MasterClass: corsi per appassionati")})})})]}),h.basics_enabled&&Object($.jsxs)(ie,{children:[Object($.jsx)(ne,{children:Object($.jsx)(F.a,{sx:{color:"#D1D1D1"}})}),Object($.jsx)(re,{sx:{color:"#D1D1D1"},primary:Object($.jsx)("del",{children:Object($.jsx)("b",{children:t("La Scuola: corsi di base")})})})]}),Object($.jsxs)(ie,{children:[Object($.jsx)(ne,{children:Object($.jsx)(F.a,{sx:{color:"#D1D1D1"}})}),Object($.jsx)(re,{sx:{color:"#D1D1D1"},primary:Object($.jsx)("del",{children:t("Ricettari da scaricare")})})]}),Object($.jsxs)(ie,{children:[Object($.jsx)(ne,{children:Object($.jsx)(F.a,{sx:{color:"#D1D1D1"}})}),Object($.jsx)(re,{sx:{color:"#D1D1D1"},primary:Object($.jsx)("del",{children:t("Certificati a fine corso")})})]}),Object($.jsxs)(ie,{children:[Object($.jsx)(ne,{children:Object($.jsx)(F.a,{sx:{color:"#D1D1D1"}})}),Object($.jsx)(re,{sx:{color:"#D1D1D1"},primary:Object($.jsx)("del",{children:t("Nuovi corsi ogni mese")})})]}),Object($.jsxs)(ie,{children:[Object($.jsx)(ne,{children:Object($.jsx)(F.a,{sx:{color:"#D1D1D1"}})}),Object($.jsx)(re,{sx:{color:"#D1D1D1"},primary:Object($.jsx)("del",{children:Object($.jsxs)(c.a,{t:t,children:[Object($.jsxs)("b",{children:[{c:p.plan_subscription.stats.course_count}," corsi"]})," in alta qualit\xe0"]})})})]})]})})};var ve=t.a=e=>{const{i18n:t}=Object(a.a)(),{client:n}=r.a.useContext(s.a),i=new URLSearchParams(window.location.search),c={Subscription:e=>Object($.jsx)(o.h,{...e}),Course:e=>Object($.jsx)(o.a,{...e}),Double:e=>Object($.jsx)(o.b,{...e}),Wellness:e=>Object($.jsx)(o.j,{...e}),DualSub:e=>Object($.jsx)(o.c,{...e}),Offers:e=>Object($.jsx)(o.e,{...e}),DualSubPro:e=>Object($.jsx)(o.d,{...e}),SubscriptionPro:e=>Object($.jsx)(o.i,{...e}),WellnessPro:e=>Object($.jsx)(o.k,{...e}),ProPlan:e=>Object($.jsx)(o.g,{...e})},[l,d]=r.a.useState(c),u={forceNew:!1,enabled:!1,prefix:Array.from("89abcdef"),inventories:["it"]};return r.a.useLayoutEffect((()=>{if(u.enabled&&n.id&&u.inventories.find((e=>e===t.language))){const e=n.id.charAt(0);u.prefix.find((t=>t===e))||u.forceNew?d({Subscription:e=>Object($.jsx)(pe,{...e}),Course:e=>Object($.jsx)(_e,{...e}),Double:e=>Object($.jsx)(le,{...e}),Wellness:e=>Object($.jsx)(ye,{...e}),DualSub:e=>Object($.jsx)(de,{...e}),Offers:e=>Object($.jsx)(ae,{...e}),DualSubPro:e=>Object($.jsx)(be,{...e}),SubscriptionPro:e=>Object($.jsx)(ge,{...e}),WellnessPro:e=>Object($.jsx)(je,{...e}),ProPlan:e=>Object($.jsx)(me,{...e})}):d(c)}}),[n,t.language]),r.a.useEffect((()=>{i.has("readabtest")&&console.log(u)}),[]),{...l}}},339:function(e,t,n){"use strict";n.p},340:function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var i,r=n(0);function s(){return s=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)({}).hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},s.apply(null,arguments)}function a(e,t){let{title:n,titleId:a,...o}=e;return r.createElement("svg",s({xmlns:"http://www.w3.org/2000/svg",width:584.798,height:720,viewBox:"0 0 154.728 190.5",xmlnsV:"https://vecta.io/nano",ref:t,"aria-labelledby":a},o),n?r.createElement("title",{id:a},n):null,i||(i=r.createElement("g",{transform:"translate(898.192 276.071)"},r.createElement("path",{clipPath:"none",d:"M-837.663-237.968a5.49 5.49 0 0 0-5.423 4.633l-9.013 57.15-8.281 52.514-.005.044.01-.044 8.281-52.514c.421-2.669 2.719-4.633 5.42-4.633h26.404c26.573 0 49.127-19.387 53.246-45.658.314-1.996.482-3.973.52-5.924v-.003h-.003c-6.753-3.543-14.683-5.565-23.372-5.565z",fill:"#001c64"}),r.createElement("path",{clipPath:"none",d:"M-766.506-232.402c-.037 1.951-.207 3.93-.52 5.926-4.119 26.271-26.673 45.658-53.246 45.658h-26.404c-2.701 0-4.999 1.964-5.42 4.633l-8.281 52.514-5.197 32.947a4.46 4.46 0 0 0 4.405 5.153h28.66a5.49 5.49 0 0 0 5.423-4.633l7.55-47.881c.423-2.669 2.722-4.636 5.423-4.636h16.876c26.573 0 49.124-19.386 53.243-45.655 2.924-18.649-6.46-35.614-22.511-44.026z",fill:"#0070e0"}),r.createElement("path",{clipPath:"none",d:"M-870.225-276.071a5.49 5.49 0 0 0-5.423 4.636l-22.489 142.608a4.46 4.46 0 0 0 4.405 5.156h33.351l8.281-52.514 9.013-57.15a5.49 5.49 0 0 1 5.423-4.633h47.782c8.691 0 16.621 2.025 23.375 5.563.46-23.917-19.275-43.666-46.412-43.666z",fill:"#003087"}))))}const o=r.forwardRef(a);n.p},341:function(e,t,n){"use strict";var i=n(189);
2Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=i(n(190)),s=n(1),a=(0,r.default)([(0,s.jsx)("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"},"0"),(0,s.jsx)("circle",{cx:"12",cy:"12",r:"5"},"1")],"RadioButtonCheckedOutlined");t.default=a},342:function(e,t,n){"use strict";var i=n(189);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=i(n(190)),s=n(1),a=(0,r.default)((0,s.jsx)("path",{d:"M20 4H4c-1.11 0-1.99.89-1.99 2L2 18c0 1.11.89 2 2 2h16c1.11 0 2-.89 2-2V6c0-1.11-.89-2-2-2zm0 14H4v-6h16v6zm0-10H4V6h16v2z"}),"CreditCardOutlined");t.default=a},343:function(e,t,n){"use strict";var i=n(189);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=i(n(190)),s=n(1),a=(0,r.default)((0,s.jsx)("path",{d:"m21.41 11.58-9-9C12.05 2.22 11.55 2 11 2H4c-1.1 0-2 .9-2 2v7c0 .55.22 1.05.59 1.42l9 9c.36.36.86.58 1.41.58.55 0 1.05-.22 1.41-.59l7-7c.37-.36.59-.86.59-1.41 0-.55-.23-1.06-.59-1.42zM5.5 7C4.67 7 4 6.33 4 5.5S4.67 4 5.5 4 7 4.67 7 5.5 6.33 7 5.5 7z"}),"LocalOffer");t.default=a},344:function(e,t,n){"use strict";var i=n(189);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=i(n(190)),s=n(1),a=(0,r.default)((0,s.jsx)("path",{d:"M12 17.27 18.18 21l-1.64-7.03L22 9.24l-7.19-.61L12 2 9.19 8.63 2 9.24l5.46 4.73L5.82 21z"}),"Star");t.default=a},345:function(e,t,n){"use strict";n.d(t,"b",(function(){return s}));var i=n(158),r=n(179);function s(e){return Object(i.a)("MuiDivider",e)}const a=Object(r.a)("MuiDivider",["root","absolute","fullWidth","inset","middle","flexItem","light","vertical","withChildren","withChildrenVertical","textAlignRight","textAlignLeft","wrapper","wrapperVertical"]);t.a=a},352:function(e,t,n){"use strict";n.d(t,"a",(function(){return m}));n(0);var i=n(705),r=n(111),s=n(720),a=n(377),o=n(378),c=n(326),l=n.n(c),d=n(645),u=n(376);var h=Object(d.a)(u.a)((e=>{let{theme:t}=e;return{backgroundColor:"#26292D",padding:"20px 0 20px 20px",borderRadius:"10px !important","&.variant":{backgroundColor:"#FFFFFF",color:"#272727",boxShadow:"0 0 6px 0 rgba(0, 0, 0, 0.16)","& svg":{color:"#c8ccd0"}},"& svg":{color:"#fff"}}})),p=n(1);function m(e){const{data:t,title:n,itemColumn:c,alignTitle:d,variant:u}=e;return Object(p.jsx)(i.a,{container:!0,justifyContent:"center",children:Object(p.jsxs)(i.a,{item:!0,xs:12,children:[Object(p.jsx)(r.a,{textAlign:d||"center",mb:4,children:Object(p.jsx)(s.a,{variant:"h5",color:"textPrimary",sx:u?{color:"#272727"}:{},children:Object(p.jsx)("b",{children:n})})}),Object(p.jsx)(i.a,{container:!0,spacing:6,children:t.map(((e,t)=>Object(p.jsx)(i.a,{item:!0,xs:12,md:c||12,children:Object(p.jsxs)(h,{className:u?"variant":"",children:[Object(p.jsx)(a.a,{expandIcon:Object(p.jsx)(l.a,{}),"aria-controls":"faq-"+t+"-content",id:"faq-"+t+"-header",children:Object(p.jsx)(s.a,{children:Object(p.jsx)("b",{children:e.question})})}),Object(p.jsxs)(o.a,{children:[Boolean(e.answer)&&Object(p.jsx)(s.a,{color:"textSecondary",children:Object(p.jsx)("span",{dangerouslySetInnerHTML:{__html:e.answer}})}),Boolean(e.component)&&e.component]})]})},"faq-"+t)))})]})})}},353:function(e,t,n){"use strict";n.d(t,"e",(function(){return ae})),n.d(t,"b",(function(){return le})),n.d(t,"c",(function(){return de})),n.d(t,"h",(function(){return pe})),n.d(t,"g",(function(){return me})),n.d(t,"i",(function(){return ge})),n.d(t,"f",(function(){return fe})),n.d(t,"d",(function(){return be})),n.d(t,"j",(function(){return ye})),n.d(t,"k",(function(){return je})),n.d(t,"a",(function(){return _e}));var i=n(0),r=n.n(i),s=n(79),a=n(709),o=n(28),c=n(5),l=n(85),d=n(56),u=n(657),h=n(338),p=n(188),m=n(645),g=n(35),f=n(20),b=n(37),y=n(192),j=n(707),_=n(715),v=n(648),x=n(700),O=n(647),T=n(111),S=n(705),w=n(720),A=n(649),k=n(394),C=n(716),E=n(725),I=n(717),D=n(729),P=n(721),R=n(722),L=n(208),M=n(196),N=n(242),B=n.n(N),U=n(241),F=n.n(U),z=n(343),q=n.n(z),H=(n(339),n(209)),V=n(337),W=n.n(V),G=n(341),X=n.n(G),Y=n(335),K=n.n(Y),Q=n(342),Z=n.n(Q),J=n(340),$=n(1);const ee=Object(m.a)(j.a)((e=>{let{theme:t}=e;return{backgroundColor:"#F5F5F5",color:"#41474E",borderRadius:"7px",fontWeight:"bold","& .MuiChip-icon":{color:"#919191"},"& .MuiChip-deleteIcon":{color:"#B1B8BE",fontSize:17,"&:hover":{color:"inherit"}}}})),te=Object(m.a)(_.a)((e=>{let{theme:t}=e;return{boxSizing:"border-box",color:"#2F3337",position:"relative",borderRadius:"10px",zIndex:1}}
2)),ne=Object(m.a)(v.a)((e=>{let{theme:t}=e;return{color:"#26292D",minWidth:"35px"}})),ie=Object(m.a)(x.a)((e=>{let{theme:t}=e;return{[t.breakpoints.down("sm")]:{paddingTop:0,paddingBottom:0}}})),re=Object(m.a)(O.a)((e=>{let{theme:t}=e;return{[t.breakpoints.down("sm")]:{"& .MuiListItemText-primary":{fontSize:"0.9rem"}}}})),se=Object(m.a)(T.a)((e=>{let{theme:t}=e;return{backgroundColor:"#FFBA00",borderTopLeftRadius:"7px",borderBottomLeftRadius:"7px",padding:"4px 8px 4px 10px",position:"absolute",color:"#41474E",top:"87px",right:0,"&.green":{top:"53px",backgroundColor:t.palette.green.main,color:"#fff"}}})),ae=e=>{const{home:t,from:n}=e,i=Object(d.a)(),{t:l}=(Object(u.a)(i.breakpoints.down("md")),Object(s.a)()),{courseId:h}=Object(c.j)(),m=new URLSearchParams(window.location.search).get("paymentType"),{auth:b}=r.a.useContext(f.a),y=JSON.parse(localStorage.getItem("dscfcpn")),{request:j,cancelToken:_}=r.a.useContext(g.a),[v,x]=r.a.useState({}),[O,E]=r.a.useState(m||localStorage.getItem("paymentType")||"card");return r.a.useEffect((()=>{(async()=>{const e=_.source();let t;if(t=y?await j("get",Boolean(h)?"/v2/offers/course/"+h+"/with-discount/"+y.value:"/v2/offers/with-discount/"+y.value,e.token):await j("get",Boolean(h)?"/v2/offers/course/"+h:"/v2/offers",e.token),t){let e=null,i=null,r=null,s=null,a=null,o=null,c=null,l=null,d=null,u=null,h=null;Boolean(t.offers)?((b.isAuthenticated&&b.user&&b.user.data&&b.user.data.flag_active_subscription&&!b.user.data.flag_active_wellness_subscription||!b.isAuthenticated&&Boolean(n)&&"wellness"===n||Boolean(n)&&"wellness"===n&&b.isAuthenticated&&b.user&&b.user.data&&!b.user.data.flag_active_subscription&&!b.user.data.flag_active_wellness_subscription)&&(r=t.offers.find((e=>"w_y"===e.type))),Boolean(n)&&"wellness"===n&&(b.isAuthenticated&&b.user&&b.user.data&&!b.user.data.flag_active_wellness_subscription||!b.isAuthenticated)&&(a=t.offers.find((e=>"w_y+y"===e.type)),o=t.offers.find((e=>"w_y+y+pro"===e.type))),Boolean(n)&&b.isAuthenticated&&b.user&&b.user.data&&b.user.data.flag_active_subscription&&!b.user.data.flag_active_wellness_subscription&&(u=t.offers.find((e=>"w_y+pro"===e.type))),(b.isAuthenticated&&b.user&&b.user.data&&!b.user.data.flag_active_subscription&&b.user.data.flag_active_wellness_subscription||!b.isAuthenticated&&Boolean(n)&&("masterclass"===n||"basics"===n)||(Boolean(n)&&"masterclass"===n||"basics"===n)&&b.isAuthenticated&&b.user&&b.user.data&&!b.user.data.flag_active_subscription&&!b.user.data.flag_active_wellness_subscription)&&(e=t.offers.find((e=>"y"===e.type))),Boolean(n)&&("basics"===n||"masterclass"===n)&&(b.isAuthenticated&&b.user&&b.user.data&&!b.user.data.flag_active_wellness_subscription||!b.isAuthenticated)&&(a=t.offers.find((e=>"y+w_y"===e.type)),o=t.offers.find((e=>"y+w_y+pro"===e.type))),b.isAuthenticated&&b.user&&b.user.data&&!b.user.data.flag_active_subscription&&b.user.data.flag_active_wellness_subscription&&(d=t.offers.find((e=>"y+pro"===e.type))),b.isAuthenticated&&b.user&&b.user.data&&b.user.data.flag_active_wellness_subscription&&b.user.data.flag_active_subscription&&(h=t.offers.find((e=>"pro"===e.type)))):(r=t.plan_wellness_subscription,e=t.plan_subscription,a=t.plan_wellness_dual_subscription||t.plan_dual_subscription,o=t.plan_pro_dual_subscription,d=t.plan_pro_subscription,h=t.plan_pro_addon_subscription,u=t.plan_pro_wellness_subscription),x({plan_subscription:e,plan_pro_subscription:d,plan_wellness_subscription:r,plan_pro_wellness_subscription:u,plan_wellness_double:s,plan_course:t.plan_course||null,plan_wellness_dual_subscription:a,plan_pro_dual_subscription:o,plan_subscription_monthly:c,plan_double:i,plan_now_tv:l,plan_pro_addon_subscription:h})}})()}),[]),r.a.useEffect((()=>{if(!t){const e=Object.keys(v);if(e.length){const t=e.reduce(((e,t)=>{if(v[t]){const n=Object(p.j)(v[t].packages.filter((e=>!0===e.is_checked)),v[t]);e.push({item_name:o.f[v[t].type],item_id:v[t].id,price:n.total/100,item_brand:"academia",item_category:"courses",item_variant:"c"===v[t].type?v[t].slug:"annual",index:e.length+1,quantity:1})}return e}),[]);Object(o.e)({event:"view_item_list",ecommerce:{ecom_currency:"EUR",items:t}})}}}),[v]),Object($.jsxs)(r.a.Fragment,{children:[Object($.jsx)(S.a,{mb:1,container:!0,justifyContent:"center",spacing:4,children:Object($.jsxs)(S.a,{item:!0,xs:11,md:10,lg:8,xl:6,children:[Object($.jsx)(w.a,{variant:"h5",color:"inherit",sx:{textAlign:"center"},children:Object($.jsx)("b",{children:l("Abbonamento annuale con 200+ corsi di Pizza, Pane, Pasticceria, Piatti stellati e tradizionali.")})}),Object($.jsxs)(w.a,{component:"div",variant:"caption",color:"inherit",sx:{textAlign:"center",my:2},children:[Object($.jsx)("b",{children:l("Approfitta dell'offerta per i nuovi abbonati -50%")})," (",Object($.jsx)("del",{children:l("8,25\u20ac/mese")}),")"]}),Object($.jsx)(A.a,{direction:"row",justifyContent:"center",children:Object($.jsx)(L.a,{type:"variant",variantProps:{valueProps:{color:"#E90134"},timeContainerProps:{sx:{backgroundColor:"rgba(234, 0, 51, 0.30)"}},labelProps:{color:"darkSecondary.main"}}})})]})}),Object($.jsxs)(T.a,{sx:{mt:2,textAlign:"center"},children:[Object($.jsx)(w.a,{component:"div",variant:"caption",color:"inherit",children:l("Modalit\xe0 di pagamento")}),Object($.jsxs)(k.a,{color:"black",variant:"outlined",size:"small",disableElevation:!0,sx:{mt:2},children:[Object($.jsx)(R.a,{size:"large",sx:{lineHeight:1,borderColor:"#E0E0E0",borderWidth:1,fontSize:12,backgroundColor:"#fff","&:hover":{border:"1px solid #E0E0E0 !important"},minWidth:"150px !important",justifyContent:"flex-start"},startIcon:Object($.jsxs)(A.a,{direction:"row",alignItems:"center",spacing:.5,children:["payp
2al"===O?Object($.jsx)(X.a,{fontSize:"small"}):Object($.jsx)(K.a,{fontSize:"small"}),Object($.jsx)(C.a,{component:J.a,viewBox:"0 0 154.728 190.5",sx:{fontSize:14}})]}),onClick:()=>{localStorage.setItem("paymentType","paypal"),E("paypal")},children:l("PayPal")}),Object($.jsxs)(R.a,{size:"large",sx:{lineHeight:1,borderColor:"#E0E0E0",borderWidth:1,fontSize:12,backgroundColor:"#fff","&:hover":{border:"1px solid #E0E0E0 !important"},minWidth:"150px !important",justifyContent:"flex-start"},startIcon:Object($.jsxs)(A.a,{direction:"row",alignItems:"center",spacing:.5,children:["card"===O?Object($.jsx)(X.a,{fontSize:"small"}):Object($.jsx)(K.a,{fontSize:"small"}),Object($.jsx)(Z.a,{fontSize:"small"})]}),onClick:()=>{localStorage.setItem("paymentType","card"),E("card")},children:[l("Carta")," / ",l("Bonifico bancario")]})]})]}),Object($.jsx)(T.a,{sx:{px:{sm:4}},children:Object($.jsxs)(S.a,{sx:{mt:2},container:!0,justifyContent:"center",spacing:4,children:[Boolean(v.plan_subscription)&&Object($.jsx)(S.a,{item:!0,xs:11,sm:6,md:5,lg:4,xl:3,sx:{position:"relative"},children:Object($.jsx)(pe,{offers:v,paymentType:O})}),Boolean(v.plan_pro_subscription)&&Object($.jsx)(S.a,{item:!0,xs:11,sm:6,md:5,lg:4,xl:3,sx:{position:"relative"},children:Object($.jsx)(ge,{offers:v,paymentType:O})}),Boolean(v.plan_pro_addon_subscription)&&Object($.jsx)(S.a,{item:!0,xs:11,sm:6,md:5,lg:4,xl:3,sx:{position:"relative"},children:Object($.jsx)(me,{offers:v,paymentType:O})}),Boolean(v.plan_wellness_subscription)&&Object($.jsx)(S.a,{item:!0,xs:11,sm:6,md:5,lg:4,xl:3,sx:{position:"relative"},children:Object($.jsx)(ye,{offers:v,paymentType:O})}),Boolean(v.plan_pro_wellness_subscription)&&Object($.jsx)(S.a,{item:!0,xs:11,sm:6,md:5,lg:4,xl:3,sx:{position:"relative"},children:Object($.jsx)(je,{offers:v,paymentType:O})}),Boolean(v.plan_wellness_dual_subscription)&&Object($.jsx)(S.a,{item:!0,xs:11,sm:6,md:5,lg:4,xl:3,sx:{position:"relative"},children:Object($.jsx)(de,{offers:v,paymentType:O})}),Boolean(v.plan_pro_dual_subscription)&&Object($.jsx)(S.a,{item:!0,xs:11,sm:6,md:5,lg:4,xl:3,sx:{position:"relative"},children:Object($.jsx)(be,{offers:v,paymentType:O})}),Boolean(v.plan_wellness_double)&&Object($.jsx)(S.a,{item:!0,xs:11,sm:6,md:5,lg:4,xl:3,sx:{position:"relative"},children:Object($.jsx)(ue,{offers:v,paymentType:O})}),Boolean(v.plan_course)&&Object($.jsx)(S.a,{item:!0,xs:11,sm:6,md:5,lg:4,xl:3,sx:{position:"relative"},children:Object($.jsx)(_e,{offers:v,paymentType:O})}),Boolean(v.plan_subscription_monthly)&&Object($.jsx)(S.a,{item:!0,xs:11,sm:6,md:5,lg:4,xl:3,sx:{position:"relative"},children:Object($.jsx)(he,{offers:v,paymentType:O})}),Boolean(v.plan_double)&&Object($.jsx)(S.a,{item:!0,xs:11,sm:6,md:5,lg:4,xl:3,sx:{position:"relative"},children:Object($.jsx)(le,{offers:v,paymentType:O})}),Boolean(v.plan_now_tv)&&Object($.jsx)(S.a,{item:!0,xs:11,sm:6,md:5,lg:4,xl:3,sx:{position:"relative"},children:Object($.jsx)(ce,{offers:v,paymentType:O})})]})}),Object($.jsx)(w.a,{align:"center",sx:{my:3},variant:"caption",component:"h6",children:Object($.jsxs)(a.a,{t:l,children:["Pagamento sicuro. Offerta valida per il primo anno, rinnovo automatico a prezzo pieno del prodotto selezionato",Object($.jsx)("br",{})," allo scadere dei 12 mesi. ",Object($.jsx)("b",{children:"Disdici quando vuoi"}),"."]})})]})},oe=e=>{const{t:t}=Object(s.a)(),n=Object(l.useStripe)(),i=Object(c.i)(),h=Object(c.h)(),{buy:m}=Object(c.j)(),b=Object(d.a)(),_=Object(u.a)(b.breakpoints.down("md")),[v,x]=r.a.useState(!1),{offer:O,badge:k,children:C,showCta:P,OfferBoxProps:L,bestChoise:M,paymentType:N,isPro:B}=e,{auth:U}=r.a.useContext(f.a),z=localStorage.getItem("nodefcpn"),{request:H,cancelToken:V}=r.a.useContext(g.a),G=new URLSearchParams(i.search).get("v")||localStorage.getItem("x-cic-version"),[X,Y]=r.a.useState(!1),K=r.a.useRef(!1),Q=r.a.useRef(!1),[Z,J]=r.a.useState(z?O.packages.filter((e=>e.is_checked&&e.items&&!e.items.find((e=>"d"===e.type)))):O.packages.filter((e=>e.is_checked))),ne=new URLSearchParams(i.search).get("to"),[ie,re]=r.a.useState({total:0,subtotal:0}),se=Z.find((e=>e.items&&Boolean(e.items.find((e=>"d"===e.type))))),ae=async()=>
2{if(X||K.current)return;K.current=!0,Y(!0);const e={packages:Z.map((e=>e.id)),upgrade:Boolean(O.upgradeable_to_annual_sub),payment_type:N||localStorage.getItem("paymentType")};P&&(window.Android&&window.Android.onAddToCart&&window.Android.onAddToCart(JSON.stringify({sku_id:O.sku_id,item_id:O.id,price:ie.total/100,currency:"EUR",product:O.type,product_name:o.f[O.type]})),Object(o.e)(Object(o.g)({event:"add_to_cart",ecommerce:{items:[{item_name:o.f[O.type],item_id:O.id,price:ie.total/100,item_brand:"academia",item_category:"courses",item_variant:"c"===O.type?O.slug:"annual",quantity:1}]}},U.user&&U.user.data)),sessionStorage.setItem("checkout-previous-url",i.pathname+i.search));try{const t=V.source(),r=await H("post","/v2/payment/checkout/"+O.id,t.token,e,!1,{auth:O.type,courseId:O.course?O.course.id:""});r&&(sessionStorage.setItem("checkout-sku-id",O.sku_id),sessionStorage.setItem("checkout-purchase-id",r.purchase_id),Boolean(window.Android)?Object(p.c)(G,"2.11.13")>=0?window.Android.onPurchaseStarted(JSON.stringify({sku_id:O.sku_id,item_id:O.id,price:ie.total/100,currency:"EUR",product_name:o.f[O.type]})):window.Android.onPurchaseStarted(O.sku_id):r.tracking_info&&Object(o.e)(Object(o.g)({event:"begin_checkout",ecommerce:{items:[{item_name:o.f[O.type],item_id:O.id,price:ie.total/100,item_brand:"academia",item_category:"courses",item_variant:"c"===O.type?O.slug:"annual",quantity:1}]}},U.user&&U.user.data)),ne&&h.push({...i,state:{...i.state,from:ne}}),await n.redirectToCheckout({sessionId:r.token}))}finally{Y(!1),K.current=!1}};return r.a.useEffect((()=>{const e=Object(p.j)(Z,O);re(e)}),[Z,O]),r.a.useEffect((()=>{Q.current||!Boolean(U.user)||!Boolean(U.user.data)||P||X||K.current||(Q.current=!0,ae())}),[U.user,P,X]),Object($.jsx)($.Fragment,{children:Object($.jsxs)(te,{sx:{p:1,pb:3,boxShadow:"0px 6px 12px #00000034",borderRadius:"20px",...M&&{border:"1.5px solid #E90133"}},...L,children:[_&&Boolean(m)?Object($.jsx)(r.a.Fragment,{children:Object($.jsxs)(S.a,{container:!0,justifyContent:"space-between",alignItems:"center",spacing:4,sx:{p:1},children:[Object($.jsx)(S.a,{item:!0,xs:"auto",children:Boolean(O.course)?Object($.jsxs)(w.a,{color:"dark.main",children:[Object($.jsx)("b",{children:O.course.title}),Object($.jsx)("br",{}),O.course.trainers]}):Object($.jsx)(w.a,{color:"dark.main",children:Object($.jsx)("b",{children:Object($.jsx)("span",{dangerouslySetInnerHTML:{__html:O.title}})})})}),Object($.jsx)(S.a,{item:!0,xs:"auto"})]})}):Object($.jsxs)(r.a.Fragment,{children:[M&&Object($.jsx)(j.a,{size:"small",color:"red",label:Object($.jsx)("b",{children:t("Miglior scelta")}),sx:{position:"absolute",right:15,top:-13}}),Boolean(se)&&Object($.jsx)(j.a,{size:"small",color:"greenVariant",label:Object($.jsx)("b",{children:se.title}),sx:{position:"absolute",right:15,top:20}}),Object($.jsx)(T.a,{px:2.5,mt:4,children:Object($.jsxs)(S.a,{container:!0,justifyContent:"space-between",children:[Object($.jsxs)(S.a,{item:!0,xs:"c"===O.type?8:12,children:[Object($.jsx)(w.a,{variant:"h5",color:"dark.main",children:Object($.jsx)("b",{children:Object($.jsx)("span",{dangerouslySetInnerHTML:{__html:O.title}})})}),Object($.jsxs)(w.a,{component:"p",variant:"caption",color:"dark.main",children:[!!O.course&&Object($.jsxs)(a.a,{t:t,children:["Accedi senza termini di scadenza al ",Object($.jsxs)("b",{children:["corso ",{c:O.course.title}]})]}),!!O.type_description&&!Boolean(O.course)&&Object($.jsx)($.Fragment,{children:O.type_description})]}),Boolean(ie.total)&&Object($.jsxs)(A.a,{direction:"row",alignItems:"baseline",spacing:2,children:[Object($.jsxs)(T.a,{children:[Object($.jsx)(w.a,{variant:"h4",component:"span",color:"greenVariant.contrastText",children:"m_4"===O.type?Object($.jsx)("b",{children:(ie.total/100/4).toLocaleString("it-IT",{style:"currency",currency:"EUR"})}):Object($.jsx)("b",{children:("c"!==O.type?("y"===O.type||"w_y"===O.type||"w_y+y"===O.type||O.type,ie.total/100/12):ie.total/100).toLocaleString("it-IT",{minimumFractionDigits:2,maximumFractionDigits:2})})}),"\xa0\xa0",Object($.jsxs)(w.a,{component:"span",color:"dark.main",children:[Object($.jsx)(w.a,{component:"span",color:"greenVariant.contrastText",children:"\u20ac"}),!Boolean(O.course)&&Object($.jsxs)($.Fragment,{children:["/",t("mese")]})]})]}),!!O.amount_yearbook&&Object($.jsxs)(T.a,{children:[Object($.jsx)(R.a,{size:"small",variant:"text",color:"dark",endIcon:Object($.jsx)(W.a,{fontSize:"small",color:"inherit"}),onClick:()=>x(!0),children:t("Info")}),Object($.jsx)(E.a,{fullWidth:!0,open:v,onClose:()=>x(!1),maxWidth:"xs",children:Object($.jsxs)(T.a,{sx:{p:2},children:[Object($.jsx)(T.a,{sx:{textAlign:"right"},children:Object($.jsx)(I.a,{size:"large",color:"light",onClick:()=>x(!1),children:Object($.jsx)(F.a,{sx:{fontSize:"2rem"}})})}),Object($.jsx)(w.a,{variant:"h6",align:"center",color:"primary",sx:{mb:3},children:Object($.jsx)("b",{children:t("Listino vigente")})}),Object($.jsxs)(S.a,{container:!0,spacing:2,children:[Object($.jsx)(S.a,{item:!0,xs:7,children:Object($.jsxs)(w.a,{variant:"caption",color:"text.primary_wellness",sx:{pl:1},children:[t("Prodotto (Durata 12 mesi):")," ",Object($.jsx)("br",{})," ",Object($.jsx)("b",{style:{paddingLeft:8},children:Object($.jsx)("span",{dangerouslySetInnerHTML:{__html:O.title}}
2)})]})}),Object($.jsx)(S.a,{item:!0,xs:!0,children:Object($.jsx)(w.a,{variant:"caption",color:"text.primary_wellness",align:"right",component:"div",children:t("Prezzo attuale (\u20ac)")})}),Object($.jsx)(S.a,{item:!0,xs:!0,children:Object($.jsx)(w.a,{variant:"caption",color:"text.primary_wellness",align:"right",component:"div",sx:{pr:1},children:t("Prezzo pieno (\u20ac)")})})]}),Object($.jsx)(T.a,{sx:{borderRadius:"9px",border:"2px solid #F5F5F5",mt:1,py:2},children:Object($.jsxs)(S.a,{container:!0,spacing:2,alignItems:"center",children:[Object($.jsx)(S.a,{item:!0,xs:7,children:Object($.jsx)(w.a,{variant:"caption",component:"div",color:"text.primary_wellness",sx:{pl:1},children:t("Contenuti della piattaforma")})}),Object($.jsx)(S.a,{item:!0,xs:!0,children:Object($.jsx)(w.a,{variant:"caption",component:"div",color:"text.primary_wellness",align:"right",children:Object($.jsx)("b",{children:((ie.total-ie.annuaryTotal)/100).toLocaleString("it-IT",{minimumFractionDigits:2,maximumFractionDigits:2})})})}),Object($.jsx)(S.a,{item:!0,xs:!0,children:Object($.jsx)(w.a,{variant:"caption",component:"div",color:"text.primary_wellness",align:"right",sx:{pr:1},children:Object($.jsx)("del",{children:((ie.subtotal-O.amount_yearbook)/100).toLocaleString("it-IT",{minimumFractionDigits:2,maximumFractionDigits:2})})})})]})}),Object($.jsx)(T.a,{sx:{borderRadius:"9px",border:"2px solid #F5F5F5",mt:"-2px",py:2},children:Object($.jsxs)(S.a,{container:!0,spacing:2,alignItems:"center",children:[Object($.jsx)(S.a,{item:!0,xs:7,children:Object($.jsx)(w.a,{variant:"caption",component:"div",color:"text.primary_wellness",sx:{pl:1},children:t("Annuario in PDF")})}),Object($.jsx)(S.a,{item:!0,xs:!0,children:Object($.jsx)(w.a,{variant:"caption",component:"div",color:"text.primary_wellness",align:"right",children:Object($.jsx)("b",{children:(ie.annuaryTotal/100).toLocaleString("it-IT",{minimumFractionDigits:2,maximumFractionDigits:2})})})}),Object($.jsx)(S.a,{item:!0,xs:!0,children:Object($.jsx)(w.a,{variant:"caption",component:"div",color:"text.primary_wellness",align:"right",sx:{pr:1},children:Object($.jsx)("del",{children:(O.amount_yearbook/100).toLocaleString("it-IT",{minimumFractionDigits:2,maximumFractionDigits:2})})})})]})}),Object($.jsx)(T.a,{sx:{borderRadius:"9px",background:"#F5F5F5",mt:"-2px",py:2},children:Object($.jsxs)(S.a,{container:!0,spacing:2,alignItems:"center",children:[Object($.jsx)(S.a,{item:!0,xs:7,children:Object($.jsx)(w.a,{variant:"caption",component:"div",color:"text.primary_wellness",sx:{pl:1},children:t("Totale annuale")})}),Object($.jsx)(S.a,{item:!0,xs:!0,children:Object($.jsx)(w.a,{variant:"caption",component:"div",color:"text.primary_wellness",align:"right",children:Object($.jsx)("b",{children:(ie.total/100).toLocaleString("it-IT",{minimumFractionDigits:2,maximumFractionDigits:2})})})}),Object($.jsx)(S.a,{item:!0,xs:!0,children:Object($.jsx)(w.a,{variant:"caption",component:"div",color:"text.primary_wellness",align:"right",sx:{pr:1},children:Object($.jsx)("del",{children:(ie.subtotal/100).toLocaleString("it-IT",{minimumFractionDigits:2,maximumFractionDigits:2})})})})]})}),Object($.jsx)(T.a,{sx:{mt:"-2px",py:2},children:Object($.jsxs)(S.a,{container:!0,spacing:2,alignItems:"center",children:[Object($.jsx)(S.a,{item:!0,xs:7,children:Object($.jsx)(w.a,{variant:"caption",component:"div",color:"text.primary_wellness",sx:{pl:1},children:Object($.jsx)("b",{children:t("Totale al mese")})})}),Object($.jsx)(S.a,{item:!0,xs:!0,children:Object($.jsx)(w.a,{variant:"caption",component:"div",color:"greenVariant.contrastText",align:"right",children:Object($.jsx)("b",{children:(ie.total/100/12).toLocaleString("it-IT",{minimumFractionDigits:2,maximumFractionDigits:2})})})}),Object($.jsx)(S.a,{item:!0,xs:!0,children:Object($.jsx)(w.a,{variant:"caption",component:"div",color:"text.primary_wellness",align:"right",sx:{pr:1},children:Object($.jsx)("del",{children:(ie.subtotal/100/12).toLocaleString("it-IT",{minimumFractionDigits:2,maximumFractionDigits:2})})})})]})}),Object($.jsx)(T.a,{sx:{textAlign:"center",my:3},children:Object($.jsx)(R.a,{variant:"contained",color:"primary",size:"large",onClick:()=>x(!1),children:t("Torna indietro")})}),Object($.jsx)(w.a,{variant:"caption",color:"text.primary_wellness",sx:{fontSize:10},children:t("L'offerta, se attiva, \xe8 valida esclusivamente per l'anno di attivazione. Alla scadenza dei 12 mesi, l'abbonamento si rinnover\xe0 automaticamente a prezzo pieno del listino vigente, salvo disdetta da parte dell'utente. L'utente ricever\xe0 apposita comunicazione almeno 30 giorni prima della scadenza. La disdetta pu\xf2 essere effettuata in qualsiasi momento dal tuo profilo personale, con effetto alla naturale scadenza del periodo in corso.")})]})})]})]}),Object($.jsx)(T.a,{mt:1,children:Object($.jsx)(w.a,{variant:"caption",component:"div",color:"dark.main",children:Object($.jsxs)(r.a.Fragment,{children:[Object($.jsxs)(a.a,{t:t,children:["Pagamento unico di ",Object($.jsx)("b",{children:{c:(ie.total/100).toLocaleStr
2ing("it-IT",{style:"currency",currency:"EUR"})}})]}),"\xa0",Boolean(se)&&Object($.jsx)("del",{children:(ie.subtotal/100).toLocaleString("it-IT",{style:"currency",currency:"EUR"})})]})})})]}),Boolean(O.course)&&Object($.jsx)(S.a,{item:!0,xs:4,children:Object($.jsx)(y.a,{src:O.course.img_cover,sx:{width:"100%",borderRadius:"15px"},useSet:{sizes:[["150px"]]}})})]})}),P&&Object($.jsx)(T.a,{textAlign:"center",mt:3,px:2.5,children:Boolean(O.course)?Object($.jsx)(R.a,{fullWidth:!0,size:"large",variant:"contained",loading:X,color:"primary",onClick:()=>ae(),children:t("Ottieni corso")}):Object($.jsx)(R.a,{fullWidth:!0,size:"large",variant:"contained",loading:X,color:"primary",onClick:()=>ae(),children:O.upgradeable_to_annual_sub?t("Passa all'abbonamento"):t("Abbonati ora")})}),B&&Object($.jsx)(fe,{loading:X,handleCheckout:ae}),!!C&&Object($.jsx)(w.a,{color:"dark.main",sx:{mt:2,px:2.5},children:Object($.jsxs)("b",{children:[t("Include"),":"]})}),C]}),(U.isAuthenticated||!U.isAuthenticated&&!P)&&Boolean(O.packages.length)&&Object($.jsx)(T.a,{sx:{my:{xs:1,md:2}},children:O.packages.map((e=>{const n=Z.find((t=>t.id===e.id));return e.is_optional&&Object($.jsx)(r.a.Fragment,{children:Boolean(n)?Object($.jsxs)(T.a,{textAlign:"center",children:[Object($.jsx)(ee,{icon:Object($.jsx)(q.a,{sx:{fontSize:14}}),deleteIcon:Object($.jsx)(F.a,{}),label:e.summary,onDelete:()=>{const t=Z.findIndex((t=>t.id===e.id)),n=Z.slice();t>-1&&n.splice(t,1),J(n)}}),Object($.jsxs)(T.a,{sx:{mt:{xs:1,md:2}},children:[Object($.jsx)(D.a,{variant:"caption",align:"center",color:"text.dark",underline:"always",href:"javascript:void(0)",onClick:()=>{const t=Z.findIndex((t=>t.id===e.id)),n=Z.slice();t>-1&&n.splice(t,1),J(n)},children:t("Hai un altro coupon? Sostituiscilo")}),Object($.jsx)(w.a,{sx:{mt:{xs:0,md:2}},component:"div",variant:"caption",align:"center",children:e.description})]})]}):Object($.jsxs)(T.a,{textAlign:"center",children:[Object($.jsx)(w.a,{variant:"caption",align:"center",color:"text.dark",children:Object($.jsx)("b",{children:e.disclaimer})}),Object($.jsx)("br",{}),Object($.jsxs)(D.a,{variant:"caption",align:"center",color:"text.dark",sx:{mt:{xs:1,md:2}},underline:"none",href:"javascript:void(0)",onClick:()=>{const t=Z.slice();t.push(e),J(t)},children:[t("Riattiva il codice promozionale:")," ",Object($.jsx)("u",{children:e.title})]})]})},e.id)}))})]})})},ce=e=>{const{t:t}=Object(s.a)(),{request:n,cancelToken:i}=r.a.useContext(g.a),[a,o]=r.a.useState(e.offers?e.offers:{});return r.a.useEffect((()=>{Boolean(e.offers)||(async()=>{const e=i.source(),t=await n("get","/v2/offers",e.token);if(t)if(Boolean(t.offers)){const e=t.offers.find((e=>"y+w_y+now"===e.type));o({plan_now_tv:e})}else o(t)})()}),[]),Boolean(Object.keys(a).length)&&Object($.jsx)(oe,{paymentType:e.paymentType,offer:a.plan_now_tv,showCta:Boolean(e.offers),children:Object($.jsxs)(P.a,{dense:!0,sx:{color:"dark.main"},children:[Object($.jsxs)(ie,{children:[Object($.jsx)(ne,{children:Object($.jsx)(B.a,{color:"green"})}),Object($.jsx)(re,{primary:Object($.jsx)("b",{children:t("Abbonamento MasterClass + Scuola + Benessere")})})]}),Object($.jsxs)(ie,{children:[Object($.jsx)(ne,{children:Object($.jsx)(B.a,{color:"green"})}),Object($.jsx)(re,{primary:Object($.jsx)("b",{children:t("Contiene tutti i punti dell'offerta Acad\xe8mia.tv + Benessere")})})]}),Object($.jsxs)(ie,{children:[Object($.jsx)(ne,{children:Object($.jsx)(B.a,{color:"green"})}),Object($.jsx)(re,{primary:Object($.jsx)("b",{children:t("Accesso per 12 mesi ai corsi presenti e futuri")})})]}),Object($.jsxs)(ie,{sx:{borderRadius:"4px",backgroundColor:"#397F88","& .MuiListItemText-primary":{color:"#fff"},"& .MuiListItemText-secondary":{color:"#fff",fontSize:12}},children:[Object($.jsx)(ne,{children:Object($.jsx)(B.a,{color:"white"})}),Object($.jsx)(re,{primary:Object($.jsx)("b",{children:t("I primi 3 mesi di Serie TV e Show di NOW (anzich\xe8 8,99\u20ac/m)")}),secondary:Object($.jsxs)($.Fragment,{children:["I tuoi Show preferiti, come ",Object($.jsx)("b",{children:"MasterChef Italia - Nuova stagione e Bruno Barbieri - 4 Hotel"}
2)," e le migliori Serie TV internazionali e Sky Original.",Object($.jsx)("br",{}),"Offerta valida solo per nuovi abbonati NOW. Dal 4\xb0 mese il Pass Entertainment si rinnova al prezzo di listino in vigore, salvo disdetta."]})})]})]})})},le=e=>{const{t:t,i18n:n}=Object(s.a)(),{config:i}=r.a.useContext(b.a),{request:a,cancelToken:o}=r.a.useContext(g.a),c=JSON.parse(localStorage.getItem("dscfcpn")),[l,d]=r.a.useState(e.offers?e.offers:{});return r.a.useEffect((()=>{Boolean(e.offers)||(async()=>{const e=o.source();let t;if(t=c?await a("get","/v2/offers/with-discount/"+c.value,e.token):await a("get","/v2/offers",e.token),t)if(Boolean(t.offers)){const e=t.offers.find((e=>"dp"===e.type));d({plan_double:e})}else d(t)})()}),[]),Boolean(Object.keys(l).length)&&Object($.jsx)(oe,{paymentType:e.paymentType,offer:l.plan_double,showCta:Boolean(e.offers),children:Object($.jsxs)(P.a,{dense:!0,sx:{color:"dark.main"},children:[Object($.jsxs)(ie,{sx:{backgroundColor:"#F3F3F3","& .MuiListItemText-secondary":{color:"#27292D",fontSize:12}},children:[Object($.jsx)(ne,{children:Object($.jsx)(B.a,{color:"green"})}),Object($.jsx)(re,{primary:Object($.jsx)("b",{children:t("Abbonamento MasterClass")}),secondary:t("Corsi pratici di cucina professionali")})]}),Object($.jsxs)(ie,{children:[Object($.jsx)(ne,{children:Object($.jsx)(B.a,{color:"green"})}),Object($.jsx)(re,{primary:Object($.jsx)("b",{children:t("GiftCard da regalare a chi vuoi")})})]}),Object($.jsxs)(ie,{children:[Object($.jsx)(ne,{children:Object($.jsx)(B.a,{color:"green"})}),Object($.jsx)(re,{primary:Object($.jsx)("b",{children:t("Accesso per 12 mesi ai corsi presenti e futuri in uscita ogni mese")})})]}),i.basics_enabled&&Object($.jsxs)(ie,{children:[Object($.jsx)(ne,{children:Object($.jsx)(B.a,{color:"green"})}),Object($.jsx)(re,{primary:t("Entra nel mondo del lavoro con la Scuola")})]}),Object($.jsxs)(ie,{children:[Object($.jsx)(ne,{children:Object($.jsx)(B.a,{color:"green"})}),Object($.jsx)(re,{primary:t("Tutti i ricettari e certificati scaricabili")})]}),Object($.jsxs)(ie,{children:[Object($.jsx)(ne,{children:Object($.jsx)(B.a,{color:"green"})}),Object($.jsx)(re,{primary:Object($.jsxs)($.Fragment,{children:[Object($.jsx)("b",{children:Object(p.l)(l.plan_double.stats.course_duration_tot)})," ",t("di contenuti esclusivi")]})})]}),Object($.jsxs)(ie,{children:[Object($.jsx)(ne,{children:Object($.jsx)(B.a,{color:"green"})}),Object($.jsx)(re,{primary:Object($.jsxs)($.Fragment,{children:[Object($.jsx)("b",{children:l.plan_double.stats.course_count})," ",t("corsi in alta qualit\xe0")]})})]})]})})},de=e=>{const{t:t,i18n:n}=Object(s.a)(),{courseId:i}=Object(c.j)(),{config:o}=r.a.useContext(b.a),l=JSON.parse(localStorage.getItem("dscfcpn")),{request:d,cancelToken:u}=r.a.useContext(g.a),[h,p]=r.a.useState(e.offers?e.offers:{});return r.a.useEffect((()=>{Boolean(e.offers)||(async()=>{const e=u.source();let t;if(t=l?await d("get","/v2/offers/with-discount/"+l.value,e.token):await d("get","/v2/offers",e.token),t)if(Boolean(t.offers)){const e=t.offers.find((e=>"w_y+y"===e.type||"y+w_y"===e.type));p({plan_wellness_dual_subscription:e})}else p(t)})()}),[]),Boolean(Object.keys(h).length)&&Object($.jsx)(oe,{paymentType:e.paymentType,offer:h.plan_wellness_dual_subscription,showCta:Boolean(e.offers),children:Object($.jsxs)(P.a,{dense:!0,sx:{color:"dark.main"},children:[o.basics_enabled&&Object($.jsxs)(ie,{children:[Object($.jsx)(ne,{children:Object($.jsx)(B.a,{color:"green"})}),Object($.jsx)(re,{primary:Object($.jsx)("b",{children:t("Corsi di cucina per appassionati e principianti")})})]}),Object($.jsxs)(ie,{children:[Object($.jsx)(ne,{children:Object($.jsx)(B.a,{color:"green"})}),Object($.jsx)(re,{primary:Object($.jsx)("b",{children:t("Ricettari da scaricare")})})]}),Object($.jsxs)(ie,{children:[Object($.jsx)(ne,{children:Object($.jsx)(B.a,{color:"green"})}),Object($.jsx)(re,{primary:Object($.jsx)("b",{children:t("Certificati a fine corso")})})]}),Object($.jsxs)(ie,{children:[Object($.jsx)(ne,{children:Object($.jsx)(B.a,{color:"green"})}),Object($.jsx)(re,{primary:Object($.jsxs)(a.a,{t:t,children:[Object($.jsxs)("b",{children:[{c:h.plan_wellness_dual_subscription.stats.course_count}," corsi"]})," in HD e nuovi corsi ogni mese"]})})]}),o.recipes_enabled&&Object($.jsxs)(ie,{children:[Object($.jsx)(ne,{children:Object($.jsx)(B.a,{color:"green"})}),Object($.jsx)(re,{primary:Object($.jsxs)(a.a,{t:t,children:[Object($.jsxs)("b",{children:[{c:h.plan_wellness_dual_subscription.stats.recipe_count}," ricette"]})," incluse"]})})]}),!!h.plan_wellness_dual_subscription.amount_yearbook&&Object($.jsxs)(ie,{children:[Object($.jsx)(ne,{children:Object($.jsx)(B.a,{color:"green"})}),Object($.jsx)(re,{primary:Object($.jsx)("b",{children:t("Annuario in PDF")})})]}),o.wellness_enabled&&Object($.jsxs)(ie,{children:[Object($.jsx)(ne,{children:Object($.jsx)(B.a,{color:"green"})}),Object($.jsx)(re,{primary:Object($.jsx)("b",{children:t("Benessere: alimentazione, diete e salute")}
2)})]}),Object($.jsxs)(ie,{children:[Object($.jsx)(ne,{children:Object($.jsx)(F.a,{sx:{color:"#D1D1D1"}})}),Object($.jsx)(re,{sx:{color:"#D1D1D1"},primary:Object($.jsx)("del",{children:Object($.jsx)("b",{children:t("Tutor AI: Aiuto cuoco digitale 24/7")})})})]}),Object($.jsxs)(ie,{children:[Object($.jsx)(ne,{children:Object($.jsx)(F.a,{sx:{color:"#D1D1D1"}})}),Object($.jsx)(re,{sx:{color:"#D1D1D1"},primary:Object($.jsx)("del",{children:Object($.jsx)("b",{children:t("3 Libri di cucina digitali esclusivi")})})})]}),Object($.jsxs)(ie,{children:[Object($.jsx)(ne,{children:Object($.jsx)(F.a,{sx:{color:"#D1D1D1"}})}),Object($.jsx)(re,{sx:{color:"#D1D1D1"},primary:Object($.jsx)("del",{children:Object($.jsx)("b",{children:t("3 Dirette Cooking show")})})})]}),Object($.jsxs)(ie,{children:[Object($.jsx)(ne,{children:Object($.jsx)(F.a,{sx:{color:"#D1D1D1"}})}),Object($.jsx)(re,{sx:{color:"#D1D1D1"},primary:Object($.jsx)("del",{children:Object($.jsx)("b",{children:t("Risoluzione video in 4K")})})})]})]})})},ue=e=>{const{t:t,i18n:n}=Object(s.a)(),{request:i,cancelToken:o}=r.a.useContext(g.a),c=JSON.parse(localStorage.getItem("dscfcpn")),[l,d]=r.a.useState(e.offers?e.offers:{}),{config:u}=r.a.useContext(b.a);return r.a.useEffect((()=>{Boolean(e.offers)||(async()=>{const e=o.source();let t;if(t=c?await i("get","/v2/offers/with-discount/"+c.value,e.token):await i("get","/v2/offers",e.token),t)if(Boolean(t.offers)){const e=t.offers.find((e=>"w_dp"===e.type));d({plan_wellness_double:e})}else d(t)})()}),[]),Boolean(Object.keys(l).length)&&Object($.jsx)(oe,{paymentType:e.paymentType,offer:l.plan_wellness_double,showCta:Boolean(e.offers),badge:Object($.jsx)(se,{children:Object($.jsx)(w.a,{variant:"subtitle2",children:Object($.jsx)("b",{children:t("Miglior prezzo")})})}),children:Object($.jsxs)(P.a,{dense:!0,sx:{color:"dark.main"},children:[Object($.jsxs)(ie,{children:[Object($.jsx)(ne,{children:Object($.jsx)(B.a,{color:"green"})}),Object($.jsx)(re,{primary:Object($.jsx)(w.a,{color:"green.main",children:Object($.jsx)("b",{children:t("Un abbonamento per 12 mesi")})})})]}),Object($.jsxs)(ie,{children:[Object($.jsx)(ne,{children:Object($.jsx)(B.a,{color:"green"})}),Object($.jsx)(re,{primary:t("Accesso illimitato ai corsi presenti e futuri")})]}),Object($.jsxs)(ie,{children:[Object($.jsx)(ne,{children:Object($.jsx)(B.a,{color:"green"})}),Object($.jsx)(re,{primary:t("Impara da professionisti alimentari")})]}),Object($.jsxs)(ie,{children:[Object($.jsx)(ne,{children:Object($.jsx)(B.a,{color:"green"})}),Object($.jsx)(re,{primary:t("Tutti i ricettari e certificati scaricabili")})]}),Object($.jsxs)(ie,{children:[Object($.jsx)(ne,{children:Object($.jsx)(B.a,{color:"green"})}),Object($.jsx)(re,{primary:Object($.jsxs)($.Fragment,{children:[Object($.jsx)("b",{children:Object(p.l)(l.plan_wellness_double.stats.course_duration_tot)})," ",t("di contenuti esclusivi")]})})]}),Object($.jsxs)(ie,{children:[Object($.jsx)(ne,{children:Object($.jsx)(B.a,{color:"green"})}),Object($.jsx)(re,{primary:Object($.jsxs)(a.a,{t:t,children:[Object($.jsxs)("b",{children:[{c:l.plan_wellness_double.stats.course_count}," corsi"]})," in alta qualit\xe0"]})})]}),u.recipes_enabled&&Object($.jsxs)(ie,{children:[Object($.jsx)(ne,{children:Object($.jsx)(B.a,{color:"green"})}),Object($.jsx)(re,{primary:Object($.jsxs)(a.a,{t:t,children:[Object($.jsxs)("b",{children:[{c:l.plan_wellness_double.stats.recipe_count}," ricette"]})," incluse"]})})]}),!!l.plan_wellness_double.amount_yearbook&&Object($.jsxs)(ie,{children:[Object($.jsx)(ne,{children:Object($.jsx)(B.a,{color:"green"})}),Object($.jsx)(re,{primary:Object($.jsx)("b",{children:t("Annuario in PDF")})})]}),u.wellness_enabled&&Object($.jsxs)(ie,{children:[Object($.jsx)(ne,{children:Object($.jsx)(F.a,{sx:{color:"#D1D1D1"}})}),Object($.jsx)(re,{sx:{color:"#D1D1D1"},primary:Object($.jsx)("del",{children:Object($.jsx)("b",{children:t("Benessere: alimentazione, diete e salute")})})})]}),Object($.jsxs)(ie,{children:[Object($.jsx)(ne,{children:Object($.jsx)(F.a,{sx:{color:"#D1D1D1"}})}),Object($.jsx)(re,{sx:{color:"#D1D1D1"},primary:Object($.jsx)("del",{children:Object($.jsx)("b",{children:t("Tutor AI: Aiuto cuoco digitale 24/7")})})})]}),Object($.jsxs)(ie,{children:[Object($.jsx)(ne,{children:Object($.jsx)(F.a,{sx:{color:"#D1D1D1"}}
2)}),Object($.jsx)(re,{sx:{color:"#D1D1D1"},primary:Object($.jsx)("del",{children:Object($.jsx)("b",{children:t("3 Libri di cucina digitali esclusivi")})})})]}),Object($.jsxs)(ie,{children:[Object($.jsx)(ne,{children:Object($.jsx)(F.a,{sx:{color:"#D1D1D1"}})}),Object($.jsx)(re,{sx:{color:"#D1D1D1"},primary:Object($.jsx)("del",{children:Object($.jsx)("b",{children:t("3 Dirette Cooking show")})})})]}),Object($.jsxs)(ie,{children:[Object($.jsx)(ne,{children:Object($.jsx)(F.a,{sx:{color:"#D1D1D1"}})}),Object($.jsx)(re,{sx:{color:"#D1D1D1"},primary:Object($.jsx)("del",{children:Object($.jsx)("b",{children:t("Risoluzione video in 4K")})})})]})]})})},he=e=>{const{t:t}=Object(s.a)(),{config:n}=r.a.useContext(b.a),{request:i,cancelToken:a}=r.a.useContext(g.a),o=JSON.parse(localStorage.getItem("dscfcpn")),[c,l]=r.a.useState(e.offers?e.offers:{});return r.a.useEffect((()=>{Boolean(e.offers)||(async()=>{const e=a.source();let t;if(t=o?await i("get","/v2/offers/with-discount/"+o.value,e.token):await i("get","/v2/offers",e.token),t)if(Boolean(t.offers)){const e=t.offers.find((e=>"m_4"===e.type));l({plan_subscription_monthly:e})}else l(t)})()}),[]),Boolean(Object.keys(c).length)&&Object($.jsx)(oe,{paymentType:e.paymentType,offer:c.plan_subscription_monthly,showCta:Boolean(e.offers),children:Object($.jsxs)(P.a,{dense:!0,sx:{color:"dark.main"},children:[Object($.jsxs)(ie,{sx:{backgroundColor:"#F3F3F3","& .MuiListItemText-secondary":{color:"#27292D",fontSize:12}},children:[Object($.jsx)(ne,{children:Object($.jsx)(B.a,{color:"green"})}),Object($.jsx)(re,{primary:Object($.jsx)("b",{children:t("Abbonamento MasterClass")}),secondary:t("Corsi pratici di cucina professionali")})]}),Object($.jsxs)(ie,{children:[Object($.jsx)(ne,{children:Object($.jsx)(B.a,{color:"green"})}),Object($.jsx)(re,{primary:Object($.jsx)("b",{children:t("Accesso per 4 mesi ai corsi presenti e futuri")})})]}),n.basics_enabled&&Object($.jsxs)(ie,{children:[Object($.jsx)(ne,{children:Object($.jsx)(B.a,{color:"green"})}),Object($.jsx)(re,{primary:t("Entra nel mondo del lavoro con la Scuola")})]}),Object($.jsxs)(ie,{children:[Object($.jsx)(ne,{children:Object($.jsx)(B.a,{color:"green"})}),Object($.jsx)(re,{primary:t("Tutti i ricettari e certificati scaricabili")})]}),Object($.jsxs)(ie,{children:[Object($.jsx)(ne,{children:Object($.jsx)(B.a,{color:"green"})}),Object($.jsx)(re,{primary:Object($.jsxs)($.Fragment,{children:[Object($.jsx)("b",{children:Object(p.l)(c.plan_subscription_monthly.stats.course_duration_tot)})," ",t("di contenuti esclusivi")]})})]}),Object($.jsxs)(ie,{children:[Object($.jsx)(ne,{children:Object($.jsx)(B.a,{color:"green"})}),Object($.jsx)(re,{primary:Object($.jsxs)($.Fragment,{children:[Object($.jsx)("b",{children:c.plan_subscription_monthly.stats.course_count})," ",t("corsi in alta qualit\xe0")]})})]})]})})},pe=e=>{const{t:t,i18n:n}=Object(s.a)(),{courseId:i}=Object(c.j)(),{config:o}=r.a.useContext(b.a),l=JSON.parse(localStorage.getItem("dscfcpn")),{request:d,cancelToken:u}=r.a.useContext(g.a),[p,m]=r.a.useState(e.offers?e.offers:{}),{userSelectedForABtest:f}=Object(h.a)();return r.a.useEffect((()=>{Boolean(e.offers)||(async()=>{const e=u.source();let t;if(t=l?await d("get","/v2/offers/with-discount/"+l.value,e.token):await d("get","/v2/offers",e.token),t)if(Boolean(t.offers)){const e=t.offers.find((e=>"y"===e.type));m({plan_subscription:e})}else m(t)})()}),[]),console.log(o),Boolean(Object.keys(p).length)&&Object($.jsx)(oe,{paymentType:e.paymentType,offer:p.plan_subscription,showCta:Boolean(e.offers),children:Object($.jsxs)(P.a,{dense:!0,sx:{color:"dark.main"},children:[o.basics_enabled&&Object($.jsxs)(ie,{children:[Object($.jsx)(ne,{children:Object($.jsx)(B.a,{color:"green"})}),Object($.jsx)(re,{primary:Object($.jsx)("b",{children:t("Corsi di cucina per appassionati e principianti")})})]}),Object($.jsxs)(ie,{children:[Object($.jsx)(ne,{children:Object($.jsx)(B.a,{color:"green"})}),Object($.jsx)(re,{primary:Object($.jsx)("b",{children:t("Ricettari da scaricare")})})]}),Object($.jsxs)(ie,{children:[Object($.jsx)(ne,{children:Object($.jsx)(B.a,{color:"green"})}),Object($.jsx)(re,{primary:Object($.jsx)("b",{children:t("Certificati a fine corso")})})]}),Object($.jsxs)(ie,{children:[Object($.jsx)(ne,{children:Object($.jsx)(B.a,{color:"green"})}),Object($.jsx)(re,{primary:Object($.jsxs)(a.a,{t:t,children:[Object($.jsxs)("b",{children:[{c:p.plan_subscription.stats.course_count}," corsi"]})," in HD e nuovi corsi ogni mese"]})})]}),o.recipes_enabled&&Object($.jsxs)(ie,{children:[Object($.jsx)(ne,{children:Object($.jsx)(B.a,{color:"green"})}),Object($.jsx)(re,{primary:Object($.jsxs)(a.a,{t:t,children:[Object($.jsxs)("b",{children:[{c:p.plan_subscription.stats.recipe_count}," ricette"]})," incluse"]})})]}),!!p.plan_subscription.amount_yearbook&&Object($.jsxs)(ie,{children:[Object($.jsx)(ne,{children:Object($.jsx)(B.a,{color:"green"})}),Object($.jsx)(re,{primary:Object($.jsx)("b",{children:t("Annuario in PDF")})})]}),o.wellness_enabled&&Object($.jsxs)(ie,{children:[Object($.jsx)(ne,{children:Object($.jsx)(F.a,{sx:{color:"#D1D1D1"}}
2)}),Object($.jsx)(re,{sx:{color:"#D1D1D1"},primary:Object($.jsx)("del",{children:Object($.jsx)("b",{children:t("Benessere: alimentazione, diete e salute")})})})]}),"it"===n.language&&Object($.jsxs)($.Fragment,{children:[Object($.jsxs)(ie,{children:[Object($.jsx)(ne,{children:Object($.jsx)(F.a,{sx:{color:"#D1D1D1"}})}),Object($.jsx)(re,{sx:{color:"#D1D1D1"},primary:Object($.jsx)("del",{children:Object($.jsx)("b",{children:t("Tutor AI: Aiuto cuoco digitale 24/7")})})})]}),Object($.jsxs)(ie,{children:[Object($.jsx)(ne,{children:Object($.jsx)(F.a,{sx:{color:"#D1D1D1"}})}),Object($.jsx)(re,{sx:{color:"#D1D1D1"},primary:Object($.jsx)("del",{children:Object($.jsx)("b",{children:t("3 Libri di cucina digitali esclusivi")})})})]}),Object($.jsxs)(ie,{children:[Object($.jsx)(ne,{children:Object($.jsx)(F.a,{sx:{color:"#D1D1D1"}})}),Object($.jsx)(re,{sx:{color:"#D1D1D1"},primary:Object($.jsx)("del",{children:Object($.jsx)("b",{children:t("3 Dirette Cooking show")})})})]}),Object($.jsxs)(ie,{children:[Object($.jsx)(ne,{children:Object($.jsx)(F.a,{sx:{color:"#D1D1D1"}})}),Object($.jsx)(re,{sx:{color:"#D1D1D1"},primary:Object($.jsx)("del",{children:Object($.jsx)("b",{children:t("Risoluzione video in 4K")})})})]})]})]})})},me=e=>{const{t:t}=Object(s.a)(),{courseId:n}=Object(c.j)(),{config:i}=r.a.useContext(b.a),a=JSON.parse(localStorage.getItem("dscfcpn")),{request:o,cancelToken:l}=r.a.useContext(g.a),[d,u]=r.a.useState(e.offers?e.offers:{}),{userSelectedForABtest:p}=Object(h.a)();return r.a.useEffect((()=>{Boolean(e.offers)||(async()=>{const e=l.source();let t;if(t=a?await o("get","/v2/offers/with-discount/"+a.value,e.token):await o("get","/v2/offers",e.token),t)if(Boolean(t.offers)){const e=t.offers.find((e=>"pro"===e.type));u({plan_pro_addon_subscription:e})}else u(t)})()}),[]),Boolean(Object.keys(d).length)&&Object($.jsx)(oe,{paymentType:e.paymentType,offer:d.plan_pro_addon_subscription,showCta:Boolean(e.offers),bestChoise:!!n,isPro:!0})},ge=e=>{const{t:t,i18n:n}=Object(s.a)(),{courseId:i}=Object(c.j)(),{config:o}=r.a.useContext(b.a),l=JSON.parse(localStorage.getItem("dscfcpn")),{request:d,cancelToken:u}=r.a.useContext(g.a),[p,m]=r.a.useState(e.offers?e.offers:{}),{userSelectedForABtest:f}=Object(h.a)();return r.a.useEffect((()=>{Boolean(e.offers)||(async()=>{const e=u.source();let t;if(t=l?await d("get","/v2/offers/with-discount/"+l.value,e.token):await d("get","/v2/offers",e.token),t)if(Boolean(t.offers)){const e=t.offers.find((e=>"y+pro"===e.type));m({plan_pro_subscription:e})}else m(t)})()}),[]),Boolean(Object.keys(p).length)&&Object($.jsx)(oe,{paymentType:e.paymentType,offer:p.plan_pro_subscription,showCta:Boolean(e.offers),bestChoise:!0,isPro:!0,children:Object($.jsxs)(P.a,{dense:!0,sx:{color:"dark.main"},children:[o.basics_enabled&&Object($.jsxs)(ie,{children:[Object($.jsx)(ne,{children:Object($.jsx)(B.a,{color:"green"})}),Object($.jsx)(re,{primary:Object($.jsx)("b",{children:t("Corsi di cucina per appassionati e principianti")})})]}),Object($.jsxs)(ie,{children:[Object($.jsx)(ne,{children:Object($.jsx)(B.a,{color:"green"})}),Object($.jsx)(re,{primary:Object($.jsx)("b",{children:t("Ricettari da scaricare")})})]}),Object($.jsxs)(ie,{children:[Object($.jsx)(ne,{children:Object($.jsx)(B.a,{color:"green"})}),Object($.jsx)(re,{primary:Object($.jsx)("b",{children:t("Certificati a fine corso")})})]}),Object($.jsxs)(ie,{children:[Object($.jsx)(ne,{children:Object($.jsx)(B.a,{color:"green"})}),Object($.jsx)(re,{primary:Object($.jsxs)(a.a,{t:t,children:[Object($.jsxs)("b",{children:[{c:p.plan_pro_subscription.stats.course_count}," corsi"]})," in HD e nuovi corsi ogni mese"]})})]}),o.wellness_enabled&&Object($.jsxs)(ie,{children:[Object($.jsx)(ne,{children:Object($.jsx)(F.a,{sx:{color:"#D1D1D1"}})}),Object($.jsx)(re,{sx:{color:"#D1D1D1"},primary:Object($.jsx)("del",{children:Object($.jsx)("b",{children:t("Benessere: alimentazione, diete e salute")})})})]}),o.recipes_enabled&&Object($.jsxs)(ie,{children:[Object($.jsx)(ne,{children:Object($.jsx)(B.a,{color:"green"})}),Object($.jsx)(re,{primary:Object($.jsxs)(a.a,{t:t,children:[Object($.jsxs)("b",{children:[{c:p.plan_pro_subscription.stats.recipe_count}," ricette"]})," incluse"]})})]}),!!p.plan_pro_subscription.amount_yearbook&&Object($.jsxs)(ie,{children:[Object($.jsx)(ne,{children:Object($.jsx)(B.a,{color:"green"})}),Object($.jsx)(re,{primary:Object($.jsx)("b",{children:t("Annuario in PDF")})})]})]})})},fe=e=>{const{t:t,i18n:n}=Object(s.a)(),i=Object(c.k)("/".concat(n.language,"/auth/:type/:buy?/:courseId?")),{handleCheckout:a,loading:o}=e,[l,h]=r.a.useState(!1),p=Object(d.a)(),m=Object(u.a)(p.breakpoints.down("md")),g=[{title:t("Tutor AI: Aiuto cuoco digitale 24/7"),description:t("L\u2019assistente di cucina ideato da Acad\xe8mia.tv che racchiude l\u2019esperienza dei pi\xf9 grandi chef del mondo. Sempre disponibile, ti risponde in tempo reale, ti guida passo dopo passo nelle ricette e ti aiuta a migliorarle.")},{title:t("3 Libri di cucina digitali esclusivi"),description:t("Ricevi gratuitamente 3 libri di cucina digitali, che ti verranno inviati via email durante l\u2019anno di abbonamento.")},{title:t("3 Dirette Cooking show"),description:t("Partecipa a dirette esclusive per cucinare insieme allo chef e interagire con lui in tempo reale. Per il pubblico l\u2019accesso \xe8 a pagamento, ma per te sar\xe0 incluso.")},{title:t("Risoluzione video in 4K"),description:t("Solo con il pacchetto Pro puoi goderti le lezioni in altissima definizione 4K: un\u2019esperienza visiva esclusiva che gli altri piani non offrono.")}];return Object($.jsxs)(T.a,{sx:{my:3,borderRadius:"9px",backgroundColor:"#FFEAEE",p:2},children:[Object($.jsxs)(M.a,{fullWidth:!0,maxWidth:"lg",scroll:"body",fullScreen:m,open:l,className:"wellness",handleClose:()=>{h(!1)},children:[Object($.jsxs)(w.a,{align:"center",variant:"h5",color:"primary",children:[Object($.jsx)("b",{children:t("Solo nel piano PRO")})," ",Object($.jsx)(C.a,{component:H.a,fontSize:"inherit",color:"inherit"})]}),Object($.jsxs)(T.a,{sx:{p:3},children:[Object($.jsx)(S.a,{container:!0,spacing:2,alignItems:"stretch",children:g.map(((e,t)=>Object($.jsx)(S.a,{item:!0,xs:12,md:6,xl:3,children:Object($.jsxs)(T.a,{sx:{backgroundColor:"#FFEAEE",borderRadius:"9px",px:2,py:3,textAlign:"center",boxSizing:"border-box",height:"100%"},children:[Object($.jsx)(B.a,{color:"primary",sx:{fontSize:30}}),Object($.jsx)(w.a,{variant:"h6",color:"text.dark",sx:{my:2},children:Object($.jsx)("b",{children:e.title})}),Object($.jsx)(w.a,{component:"p",variant:"caption",color:"text.dark",children:e.description})]})},"info"+t)))}),Object($.jsxs)(T.a,{sx:{textAlign:"center",mt:3},children:[Object($.jsx)(w.a,{color:"text.dark",children:Object($.jsx)("b",{children:t("Attiva oggi il piano PRO")})}),Object($.jsx)(R.a,{loading:o,size:"large",variant:"contained",color:"primary",sx:{mt:2},onClick:()=>{i?h(!1):a()},children:t("Inizia ora")})]})]})]}),Object($.jsxs)(A.a,{direction:"row",justifyContent:"space-between",alignItems:"center",children:[Object($.jsxs)(w.a,{component:"div",variant:"caption",sx:{fontWeight:"bold",color:"#D61A3C"},children:[t("Solo nel piano PRO")," ",Object($.jsx)(C.a,{component:H.a,fontSize:"inherit",color:"inherit"})]}),Object($.jsx)(T.a,{children:Object($.jsx)(R.a,{size:"small",variant:"text",color:"dark",endIcon:Object($.jsx)(W.a,{fontSize:"small",color:"inherit"}),onClick:()=>h(!0),children:t("Info")})})]}),Object($.jsxs)(P.a,{dense:!0,children:[Object($.jsxs)(ie,{disablePadding:!0,children:[Object($.jsx)(ne,{children:Object($.jsx)(B.a,{color:"primary"})}),Object($.jsx)(re,{primary:Object($.jsx)("b",{children:t("Tutor AI: Aiuto cuoco digitale 24/7")})})]}),Object($.jsxs)(ie,{disablePadding:!0,children:[Object($.jsx)(ne,{children:Object($.jsx)(B.a,{color:"primary"})}),Object($.jsx)(re,{primary:Object($.jsx)("b",{children:t("3 Libri di cucina digitali esclusivi")})})]}),Object($.jsxs)(ie,{disablePadding:!0,children:[Object($.jsx)(ne,{children:Object($.jsx)(B.a,{color:"primary"})}),Object($.jsx)(re,{primary:Object($.jsx)("b",{children:t("3 Dirette Cooking show")})})]}),Object($.jsxs)(ie,{disablePadding:!0,children:[Object($.jsx)(ne,{children:Object($.jsx)(B.a,{color:"primary"})}),Object($.jsx)(re,{primary:Object($.jsx)("b",{children:t("Risoluzione video in 4K")})})]})]})]})},be=e=>{const{t:t,i18n:n}=Object(s.a)(),{courseId:i}=Object(c.j)(),{config:o}=r.a.useContext(b.a),l=JSON.parse(localStorage.getItem("dscfcpn")),{request:d,cancelToken:u}=r.a.useContext(g.a),[h,p]=r.a.useState(e.offers?e.offers:{});return r.a.useEffect((()=>{Boolean(e.offers)||(async()=>{const e=u.source();let t;if(t=l?await d("get","/v2/offers/with-discount/"+l.value,e.token):await d("get","/v2/offers",e.token),t)if(Boolean(t.offers)){const e=t.offers.find((e=>"w_y+y+pro"===e.type||"y+w_y+pro"===e.type));p({plan_pro_dual_subscription:e})}else p(t)})()}),[]),Boolean(Object.keys(h).length)&&Object($.jsx)(oe,{paymentType:e.paymentType,offer:h.plan_pro_dual_subscription,showCta:Bo
2olean(e.offers),bestChoise:!0,isPro:!0,children:Object($.jsxs)(P.a,{dense:!0,sx:{color:"dark.main"},children:[o.basics_enabled&&Object($.jsxs)(ie,{children:[Object($.jsx)(ne,{children:Object($.jsx)(B.a,{color:"green"})}),Object($.jsx)(re,{primary:Object($.jsx)("b",{children:t("Corsi di cucina per appassionati e principianti")})})]}),Object($.jsxs)(ie,{children:[Object($.jsx)(ne,{children:Object($.jsx)(B.a,{color:"green"})}),Object($.jsx)(re,{primary:Object($.jsx)("b",{children:t("Ricettari da scaricare")})})]}),Object($.jsxs)(ie,{children:[Object($.jsx)(ne,{children:Object($.jsx)(B.a,{color:"green"})}),Object($.jsx)(re,{primary:Object($.jsx)("b",{children:t("Certificati a fine corso")})})]}),Object($.jsxs)(ie,{children:[Object($.jsx)(ne,{children:Object($.jsx)(B.a,{color:"green"})}),Object($.jsx)(re,{primary:Object($.jsxs)(a.a,{t:t,children:[Object($.jsxs)("b",{children:[{c:h.plan_pro_dual_subscription.stats.course_count}," corsi"]})," in HD e nuovi corsi ogni mese"]})})]}),o.wellness_enabled&&Object($.jsxs)(ie,{children:[Object($.jsx)(ne,{children:Object($.jsx)(B.a,{color:"green"})}),Object($.jsx)(re,{primary:Object($.jsx)("b",{children:t("Benessere: alimentazione, diete e salute")})})]}),o.recipes_enabled&&Object($.jsxs)(ie,{children:[Object($.jsx)(ne,{children:Object($.jsx)(B.a,{color:"green"})}),Object($.jsx)(re,{primary:Object($.jsxs)(a.a,{t:t,children:[Object($.jsxs)("b",{children:[{c:h.plan_pro_dual_subscription.stats.recipe_count}," ricette"]})," incluse"]})})]}),!!h.plan_pro_dual_subscription.amount_yearbook&&Object($.jsxs)(ie,{children:[Object($.jsx)(ne,{children:Object($.jsx)(B.a,{color:"green"})}),Object($.jsx)(re,{primary:Object($.jsx)("b",{children:t("Annuario in PDF")})})]})]})})},ye=e=>{const{t:t,i18n:n}=Object(s.a)(),{config:i}=r.a.useContext(b.a),{request:o,cancelToken:c}=r.a.useContext(g.a),l=JSON.parse(localStorage.getItem("dscfcpn")),[d,u]=r.a.useState(e.offers?e.offers:{}),{userSelectedForABtest:p}=Object(h.a)();return r.a.useEffect((()=>{Boolean(e.offers)||(async()=>{const e=c.source();let t;if(t=l?await o("get","/v2/offers/with-discount/"+l.value,e.token):await o("get","/v2/offers",e.token),t)if(Boolean(t.offers)){const e=t.offers.find((e=>"w_y"===e.type));u({plan_wellness_subscription:e})}else u(t)})()}),[]),Boolean(Object.keys(d).length)&&Object($.jsx)(oe,{paymentType:e.paymentType,offer:d.plan_wellness_subscription,showCta:Boolean(e.offers),children:Object($.jsxs)(P.a,{dense:!0,sx:{color:"dark.main"},children:[i.basics_enabled&&Object($.jsxs)(ie,{children:[Object($.jsx)(ne,{children:Object($.jsx)(F.a,{sx:{color:"#D1D1D1"}})}),Object($.jsx)(re,{sx:{color:"#D1D1D1"},primary:Object($.jsx)("del",{children:Object($.jsx)("b",{children:t("Corsi di cucina per appassionati e principianti")})})})]}),Object($.jsxs)(ie,{children:[Object($.jsx)(ne,{children:Object($.jsx)(B.a,{color:"green"})}),Object($.jsx)(re,{primary:Object($.jsx)("b",{children:t("Ricettari da scaricare")})})]}),Object($.jsxs)(ie,{children:[Object($.jsx)(ne,{children:Object($.jsx)(B.a,{color:"green"})}),Object($.jsx)(re,{primary:Object($.jsx)("b",{children:t("Certificati a fine corso")})})]}),Object($.jsxs)(ie,{children:[Object($.jsx)(ne,{children:Object($.jsx)(B.a,{color:"green"})}),Object($.jsx)(re,{primary:Object($.jsxs)(a.a,{t:t,children:[Object($.jsxs)("b",{children:[{c:d.plan_wellness_subscription.stats.course_count}," corsi"]})," in HD e nuovi corsi ogni mese"]})})]}),i.wellness_enabled&&Object($.jsxs)(ie,{children:[Object($.jsx)(ne,{children:Object($.jsx)(B.a,{color:"green"})}),Object($.jsx)(re,{primary:Object($.jsx)("b",{children:t("Benessere: alimentazione, diete e salute")})})]}),i.recipes_enabled&&Object($.jsxs)(ie,{children:[Object($.jsx)(ne,{children:Object($.jsx)(B.a,{color:"green"})}),Object($.jsx)(re,{primary:Object($.jsxs)(a.a,{t:t,children:[Object($.jsxs)("b",{children:[{c:d.plan_wellness_subscription.stats.recipe_count}," ricette"]})," incluse"]})})]}),!!d.plan_wellness_subscription.amount_yearbook&&Object($.jsxs)(ie,{children:[Object($.jsx)(ne,{children:Object($.jsx)(B.a,{color:"green"})}),Object($.jsx)(re,{primary:Object($.jsx)("b",{children:t("Annuario in PDF")})})]}),Object($.jsxs)(ie,{children:[Object($.jsx)(ne,{children:Object($.jsx)(F.a,{sx:{color:"#D1D1D1"}}
2)}),Object($.jsx)(re,{sx:{color:"#D1D1D1"},primary:Object($.jsx)("del",{children:Object($.jsx)("b",{children:t("Tutor AI: Aiuto cuoco digitale 24/7")})})})]}),Object($.jsxs)(ie,{children:[Object($.jsx)(ne,{children:Object($.jsx)(F.a,{sx:{color:"#D1D1D1"}})}),Object($.jsx)(re,{sx:{color:"#D1D1D1"},primary:Object($.jsx)("del",{children:Object($.jsx)("b",{children:t("3 Libri di cucina digitali esclusivi")})})})]}),Object($.jsxs)(ie,{children:[Object($.jsx)(ne,{children:Object($.jsx)(F.a,{sx:{color:"#D1D1D1"}})}),Object($.jsx)(re,{sx:{color:"#D1D1D1"},primary:Object($.jsx)("del",{children:Object($.jsx)("b",{children:t("3 Dirette Cooking show")})})})]}),Object($.jsxs)(ie,{children:[Object($.jsx)(ne,{children:Object($.jsx)(F.a,{sx:{color:"#D1D1D1"}})}),Object($.jsx)(re,{sx:{color:"#D1D1D1"},primary:Object($.jsx)("del",{children:Object($.jsx)("b",{children:t("Risoluzione video in 4K")})})})]})]})})},je=e=>{const{t:t,i18n:n}=Object(s.a)(),{config:i}=r.a.useContext(b.a),{request:o,cancelToken:c}=r.a.useContext(g.a),l=JSON.parse(localStorage.getItem("dscfcpn")),[d,u]=r.a.useState(e.offers?e.offers:{}),{userSelectedForABtest:p}=Object(h.a)();return r.a.useEffect((()=>{Boolean(e.offers)||(async()=>{const e=c.source();let t;if(t=l?await o("get","/v2/offers/with-discount/"+l.value,e.token):await o("get","/v2/offers",e.token),t)if(Boolean(t.offers)){const e=t.offers.find((e=>"w_y+pro"===e.type));u({plan_pro_wellness_subscription:e})}else u(t)})()}),[]),Boolean(Object.keys(d).length)&&Object($.jsx)(oe,{paymentType:e.paymentType,offer:d.plan_pro_wellness_subscription,showCta:Boolean(e.offers),isPro:!0,children:Object($.jsxs)(P.a,{dense:!0,sx:{color:"dark.main"},children:[i.basics_enabled&&Object($.jsxs)(ie,{children:[Object($.jsx)(ne,{children:Object($.jsx)(F.a,{sx:{color:"#D1D1D1"}})}),Object($.jsx)(re,{sx:{color:"#D1D1D1"},primary:Object($.jsx)("del",{children:Object($.jsx)("b",{children:t("Corsi di cucina per appassionati e principianti")})})})]}),Object($.jsxs)(ie,{children:[Object($.jsx)(ne,{children:Object($.jsx)(B.a,{color:"green"})}),Object($.jsx)(re,{primary:Object($.jsx)("b",{children:t("Ricettari da scaricare")})})]}),Object($.jsxs)(ie,{children:[Object($.jsx)(ne,{children:Object($.jsx)(B.a,{color:"green"})}),Object($.jsx)(re,{primary:Object($.jsx)("b",{children:t("Certificati a fine corso")})})]}),Object($.jsxs)(ie,{children:[Object($.jsx)(ne,{children:Object($.jsx)(B.a,{color:"green"})}),Object($.jsx)(re,{primary:Object($.jsxs)(a.a,{t:t,children:[Object($.jsxs)("b",{children:[{c:d.plan_pro_wellness_subscription.stats.course_count}," corsi"]})," in HD e nuovi corsi ogni mese"]})})]}),i.wellness_enabled&&Object($.jsxs)(ie,{children:[Object($.jsx)(ne,{children:Object($.jsx)(B.a,{color:"green"})}),Object($.jsx)(re,{primary:Object($.jsx)("b",{children:t("Benessere: alimentazione, diete e salute")})})]}),i.recipes_enabled&&Object($.jsxs)(ie,{children:[Object($.jsx)(ne,{children:Object($.jsx)(B.a,{color:"green"})}),Object($.jsx)(re,{primary:Object($.jsxs)(a.a,{t:t,children:[Object($.jsxs)("b",{children:[{c:d.plan_pro_wellness_subscription.stats.recipe_count}," ricette"]})," incluse"]})})]}),!!d.plan_pro_wellness_subscription.amount_yearbook&&Object($.jsxs)(ie,{children:[Object($.jsx)(ne,{children:Object($.jsx)(B.a,{color:"green"})}),Object($.jsx)(re,{primary:Object($.jsx)("b",{children:t("Annuario in PDF")})})]})]})})},_e=e=>{const{t:t}=Object(s.a)(),{buy:n,courseId:i}=Object(c.j)(),{request:o,cancelToken:l}=r.a.useContext(g.a),d=JSON.parse(localStorage.getItem("dscfcpn")),{config:u}=r.a.useContext(b.a),[h,p]=r.a.useState(e.offers?e.offers:{});return r.a.useEffect((()=>{Boolean(e.offers)||(async()=>{const e=l.source();let t;if(t=d?await o("get","/v2/offers/course/"+i+"/with-discount/"+d.value,e.token):await o("get","/v2/offers/course/"+i,e.token),t)if(Boolean(t.offers)){const e=t.offers.find((e=>"y"===e.type));p({plan_subscription:e})}else p(t)})()}),[]),Boolean(Object.keys(h).length)&&Object($.jsx)(oe,{paymentType:e.paymentType,offer:h.plan_course,showCta:!Boolean(n),children:Object($.jsxs)(P.a,{dense:!0,sx:{color:"dark.main"},children:[Object($.jsxs)(ie,{children:[Object($.jsx)(ne,{children:Object($.jsx)(B.a,{color:"green"})}),Object($.jsx)(re,{primary:Object($.jsx)("b",{children:t("Accesso limitato ad un solo corso")})})]}),Object($.jsxs)(ie,{children:[Object($.jsx)(ne,{children:Object($.jsx)(F.a,{sx:{color:"#D1D1D1"}}
2)}),Object($.jsx)(re,{sx:{color:"#D1D1D1"},primary:Object($.jsx)("del",{children:Object($.jsx)("b",{children:t("MasterClass: corsi per appassionati")})})})]}),u.basics_enabled&&Object($.jsxs)(ie,{children:[Object($.jsx)(ne,{children:Object($.jsx)(F.a,{sx:{color:"#D1D1D1"}})}),Object($.jsx)(re,{sx:{color:"#D1D1D1"},primary:Object($.jsx)("del",{children:Object($.jsx)("b",{children:t("La Scuola: corsi di base")})})})]}),Object($.jsxs)(ie,{children:[Object($.jsx)(ne,{children:Object($.jsx)(F.a,{sx:{color:"#D1D1D1"}})}),Object($.jsx)(re,{sx:{color:"#D1D1D1"},primary:Object($.jsx)("del",{children:t("Ricettari da scaricare")})})]}),Object($.jsxs)(ie,{children:[Object($.jsx)(ne,{children:Object($.jsx)(F.a,{sx:{color:"#D1D1D1"}})}),Object($.jsx)(re,{sx:{color:"#D1D1D1"},primary:Object($.jsx)("del",{children:t("Certificati a fine corso")})})]}),Object($.jsxs)(ie,{children:[Object($.jsx)(ne,{children:Object($.jsx)(F.a,{sx:{color:"#D1D1D1"}})}),Object($.jsx)(re,{sx:{color:"#D1D1D1"},primary:Object($.jsx)("del",{children:t("Nuovi corsi ogni mese")})})]}),Object($.jsxs)(ie,{children:[Object($.jsx)(ne,{children:Object($.jsx)(F.a,{sx:{color:"#D1D1D1"}})}),Object($.jsx)(re,{sx:{color:"#D1D1D1"},primary:Object($.jsx)("del",{children:Object($.jsxs)(a.a,{t:t,children:[Object($.jsxs)("b",{children:[{c:h.plan_subscription.stats.course_count}," corsi"]})," in alta qualit\xe0"]})})})]})]})})}},364:function(e,t,n){"use strict";t.a={border:0,clip:"rect(0 0 0 0)",height:"1px",margin:-1,overflow:"hidden",padding:0,position:"absolute",whiteSpace:"nowrap",width:"1px"}},366:function(e,t,n){"use strict";var i=n(4),r=n(2),s=n(0),a=n(36),o=n(364),c=n(183),l=n(56),d=n(21),u=n(419),h=n(351),p=n(395),m=n(65),g=n(239),f=n(1),b=Object(g.a)(Object(f.jsx)("path",{d:"M12 17.27L18.18 21l-1.64-7.03L22 9.24l-7.19-.61L12 2 9.19 8.63 2 9.24l5.46 4.73L5.82 21z"}),"Star"),y=Object(g.a)(Object(f.jsx)("path",{d:"M22 9.24l-7.19-.62L12 2 9.19 8.63 2 9.24l5.46 4.73L5.82 21 12 17.27 18.18 21l-1.63-7.03L22 9.24zM12 15.4l-3.76 2.27 1-4.28-3.32-2.88 4.38-.38L12 6.1l1.71 4.04 4.38.38-3.32 2.88 1 4.28L12 15.4z"}),"StarBorder"),j=n(54),_=n(29),v=n(158),x=n(179);function O(e){return Object(v.a)("MuiRating",e)}var T=Object(x.a)("MuiRating",["root","sizeSmall","sizeMedium","sizeLarge","readOnly","disabled","focusVisible","visuallyHidden","pristine","label","labelEmptyValueActive","icon","iconEmpty","iconFilled","iconHover","iconFocus","iconActive","decimal"]);const S=["value"],w=["className","defaultValue","disabled","emptyIcon","emptyLabelText","getLabelText","highlightSelectedOnly","icon","IconContainerComponent","max","name","onChange","onChangeActive","onMouseLeave","onMouseMove","precision","readOnly","size","value"];function A(e,t){if(null==e)return e;const n=Math.round(e/t)*t;return Number(n.toFixed(function(e){const t=e.toString().split(".")[1];return t?t.length:0}(t)))}const k=Object(_.a)("span",{name:"MuiRating",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[{["& .".concat(T.visuallyHidden)]:t.visuallyHidden},t.root,t["size".concat(Object(d.a)(n.size))],n.readOnly&&t.readOnly]}})((e=>{let{theme:t,ownerState:n}=e;return Object(r.a)({display:"inline-flex",position:"relative",fontSize:t.typography.pxToRem(24),color:"#faaf00",cursor:"pointer",textAlign:"left",WebkitTapHighlightColor:"transparent",["&.".concat(T.disabled)]:{opacity:t.palette.action.disabledOpacity,pointerEvents:"none"},["&.".concat(T.focusVisible," .").concat(T.iconActive)]:{outline:"1px solid #999"},["& .".concat(T.visuallyHidden)]:o.a},"small"===n.size&&{fontSize:t.typography.pxToRem(18)},"large"===n.size&&{fontSize:t.typography.pxToRem(30)},n.readOnly&&{pointerEvents:"none"})})),C=Object(_.a)("label",{name:"MuiRating",slot:"Label",overridesResolver:(e,t)=>t.label})((e=>{let{ownerState:t}=e;return Object(r.a)({cursor:"inherit"},t.emptyValueFocused&&{top:0,bottom:0,position:"absolute",outline:"1px solid #999",width:"100%"})})),E=Object(_.a)("span",{name:"MuiRating",slot:"Icon",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.icon,n.iconEmpty&&t.iconEmpty,n.iconFilled&&t.iconFilled,n.iconHover&&t.iconHover,n.iconFocus&&t.iconFocus,n.iconActive&&t.iconActive]}})((e=>{let{theme:t,ownerState:n}=e;return Object(r.a)({display:"flex",transition:t.transitions.create("transform",{duration:t.transitions.duration.shortest}),pointerEvents:"none"},n.iconActive&&{transform:"scale(1.2)"},n.iconEmpty&&{color:t.palette.action.disabled})}
2)),I=Object(_.a)("span",{name:"MuiRating",slot:"Decimal",shouldForwardProp:e=>Object(_.c)(e)&&"iconActive"!==e,overridesResolver:(e,t)=>{const{iconActive:n}=e;return[t.decimal,n&&t.iconActive]}})((e=>{let{iconActive:t}=e;return Object(r.a)({position:"relative"},t&&{transform:"scale(1.2)"})}));function D(e){const t=Object(i.a)(e,S);return Object(f.jsx)("span",Object(r.a)({},t))}function P(e){const{classes:t,disabled:n,emptyIcon:i,focus:o,getLabelText:c,highlightSelectedOnly:l,hover:d,icon:h,IconContainerComponent:p,isActive:m,itemValue:g,labelProps:b,name:y,onBlur:j,onChange:_,onClick:v,onFocus:x,readOnly:O,ownerState:T,ratingValue:S,ratingValueRounded:w}=e,A=l?g===S:g<=S,k=g<=d,I=g<=o,D=g===w,P=Object(u.a)(),R=Object(f.jsx)(E,{as:p,value:g,className:Object(a.a)(t.icon,A?t.iconFilled:t.iconEmpty,k&&t.iconHover,I&&t.iconFocus,m&&t.iconActive),ownerState:Object(r.a)({},T,{iconEmpty:!A,iconFilled:A,iconHover:k,iconFocus:I,iconActive:m}),children:i&&!A?i:h});return O?Object(f.jsx)("span",Object(r.a)({},b,{children:R})):Object(f.jsxs)(s.Fragment,{children:[Object(f.jsxs)(C,Object(r.a)({ownerState:Object(r.a)({},T,{emptyValueFocused:void 0}),htmlFor:P},b,{children:[R,Object(f.jsx)("span",{className:t.visuallyHidden,children:c(g)})]})),Object(f.jsx)("input",{className:t.visuallyHidden,onFocus:x,onBlur:j,onChange:_,onClick:v,disabled:n,value:g,id:P,type:"radio",name:y,checked:D})]})}const R=Object(f.jsx)(b,{fontSize:"inherit"}),L=Object(f.jsx)(y,{fontSize:"inherit"});function M(e){return"".concat(e," Star").concat(1!==e?"s":"")}const N=s.forwardRef((function(e,t){const n=Object(j.a)({name:"MuiRating",props:e}),{className:o,defaultValue:g=null,disabled:b=!1,emptyIcon:y=L,emptyLabelText:_="Empty",getLabelText:v=M,highlightSelectedOnly:x=!1,icon:T=R,IconContainerComponent:S=D,max:E=5,name:N,onChange:B,onChangeActive:U,onMouseLeave:F,onMouseMove:z,precision:q=1,readOnly:H=!1,size:V="medium",value:W}=n,G=Object(i.a)(n,w),X=Object(u.a)(N),[Y,K]=Object(h.a)({controlled:W,default:g,name:"Rating"}),Q=A(Y,q),Z=Object(l.a)(),[{hover:J,focus:$},ee]=s.useState({hover:-1,focus:-1});let te=Q;-1!==J&&(te=J),-1!==$&&(te=$);const{isFocusVisibleRef:ne,onBlur:ie,onFocus:re,ref:se}=Object(p.a)(),[ae,oe]=s.useState(!1),ce=s.useRef(),le=Object(m.a)(se,ce),de=Object(m.a)(le,t),ue=e=>{let t=""===e.target.value?null:parseFloat(e.target.value);-1!==J&&(t=J),K(t),B&&B(e,t)},he=e=>{0===e.clientX&&0===e.clientY||(ee({hover:-1,focus:-1}),K(null),B&&parseFloat(e.target.value)===Q&&B(e,null))},pe=e=>{re(e),!0===ne.current&&oe(!0);const t=parseFloat(e.target.value);ee((e=>({hover:e.hover,focus:t})))},me=e=>{if(-1!==J)return;ie(e),!1===ne.current&&oe(!1);ee((e=>({hover:e.hover,focus:-1})))},[ge,fe]=s.useState(!1),be=Object(r.a)({},n,{defaultValue:g,disabled:b,emptyIcon:y,emptyLabelText:_,emptyValueFocused:ge,focusVisible:ae,getLabelText:v,icon:T,IconContainerComponent:S,max:E,precision:q,readOnly:H,size:V}),ye=(e=>{const{classes:t,size:n,readOnly:i,disabled:r,emptyValueFocused:s,focusVisible:a}=e,o={root:["root","size".concat(Object(d.a)(n)),r&&"disabled",a&&"focusVisible",i&&"readyOnly"],label:["label","pristine"],labelEmptyValue:[s&&"labelEmptyValueActive"],icon:["icon"],iconEmpty:["iconEmpty"],iconFilled:["iconFilled"],iconHover:["iconHover"],iconFocus:["iconFocus"],iconActive:["iconActive"],decimal:["decimal"],visuallyHidden:["visuallyHidden"]};return Object(c.a)(o,O,t)})(be);return Object(f.jsxs)(k,Object(r.a)({ref:de,onMouseMove:e=>{z&&z(e);const t=ce.current,{right:n,left:i}=t.getBoundingClientRect(),{width:r}=t.firstChild.getBoundingClientRect();let s;s="rtl"===Z.direction?(n-e.clientX)/(r*E):(e.clientX-i)/(r*E);let a=A(E*s+q/2,q);a=function(e,t,n){return e<t?t:e>n?n:e}(a,q,E),ee((e=>e.hover===a&&e.focus===a?e:{hover:a,focus:a})),oe(!1),U&&J!==a&&U(e,a)},onMouseLeave:e=>{F&&F(e);ee({hover:-1,focus:-1}),U&&-1!==J&&U(e,-1)},className:Object(a.a)(ye.root,o),ownerState:be,role:H?"img":null,"aria-label":H?v(te):null},G,{children:[Array.from(new Array(E)).map(((e,t)=>{const n=t+1,i={classes:ye,disabled:b,emptyIcon:y,focus:$,getLabelText:v,highlightSelectedOnly:x,hover:J,icon:T,IconContainerComponent:S,name:X,onBlur:me,onChange:ue,onClick:he,onFocus:pe,ratingValue:te,ratingValueRounded:Q,readOnly:H,ownerState:be},s=n===Math.ceil(te)&&(-1!==J||-1!==$);if(q<1){const e=Array.from(new Array(1/q));return Object(f.jsx)(I,{className:Object(a.a)(ye.decimal,s&&ye.iconActive),ownerState:be,iconActive:s,children:e.map(((t,s)=>{const a=A(n-1+(s+1)*q,q);return Object(f.jsx)(P,Object(r.a)({},i,{isActive:!1,itemValue:a,labelProps:{style:e.length-1===s?{}:{width:a===te?"".concat((s+1)*q*100,"%"):"0%",overflow:"hidden",zIndex:1,position:"absolute"}}}),a)}))},n)}return Object(f.jsx)(P,Object(r.a)({},i,{isActive:s,itemValue:n}),n)})),!H&&!b&&Object(f.jsxs)(C,{className:Object(a.a)(ye.label,ye.labelEmptyValue),ownerState:be,children:[Object(f.jsx)("input",{className:ye.visuallyHidden,value:"",id:"".concat(X,"-empty"),type:"radio",name:X,checked:null==Q,onFocus:()=>fe(!0),onBlur:()=>fe(!1),onChange:ue}),Object(f.jsx)("span",{className:ye.visuallyHidden,children:_})]})]}))}));t.a=N},375:function(e,t,n){"use strict";n.d(t,"a",(function(){return _}));var i,r=n(0),s=n.n(r),a=n(79),o=n(195),c=n(35),l=n(649),d=n(720),u=n(111),h=n(716),p=n(414),m=n(344),g=n.n(m);function f(){return f=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)({}).hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},f.apply(null,arguments)}function b(e,t){let{title:n,titleId:s,...a}=e;return r.createElement("svg",f({xmlns:"http://www.w3.org/2000/svg",width:30.97,height:29.418,viewBox:"0 0 30.97 29.418",ref:t,"aria-labelledby":s},a),n?r.createElement("title",{id:s},n):null,i||(i=r.createElement("path",{id:"svg-path_2_","data-name":"svg-path (2)",d:"M15.65,22.844l8.436,5.092-2.239-9.6L29.3,11.883l-9.815-.833L15.65,2l-3.836,9.05L2,11.883,9.453,18.34l-2.239,9.6Z",transform:"translate(-0.165 -0.078)",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeWidth:1.5})))}const y=r.forwardRef(b);n.p;var j=n(1);const _=e=>{const{value:t,children:n,...i}=e;return Object(j.jsxs)(l.a,{direction:"row",spacing:1,alignItems:"center",...i,children:[Object(j.jsx)(g.a,{color:"inherit",fontSize:"small"}),Object(j.jsx)(d.a,{color:"inherit",children:Object(j.jsx)("b",{children:t.toLocaleStr
2ing("it-IT")})}),n]})};t.b=e=>{const{course:t,onChange:n,...i}=e,{request:r,cancelToken:l}=s.a.useContext(c.a),{t:m}=Object(a.a)(),{packageType:g}=Object(o.a)(),[f,b]=s.a.useState(!1),[_,v]=s.a.useState(0),x={default:"#26292D",wellness:"#E6E4DC"};return s.a.useEffect((()=>{_&&(b(!0),(async()=>{const e=l.source();await r("post","/v2/ratings",e.token,{course_id:t.id,user_rating:_})&&n&&n(_),b(!1)})())}),[_]),Object(j.jsx)(u.a,{sx:{background:x[g.key]||x.default,color:e=>g?e.palette.text["primary_".concat(g.key)]:e.palette.text.primary,borderRadius:"20px",pt:4,pb:2},children:Object(j.jsxs)(u.a,{sx:{maxWidth:600,m:"0 auto"},children:[Object(j.jsx)(p.a,{disabled:f,value:_,size:"large",emptyIcon:Object(j.jsx)(h.a,{component:y,viewBox:"0 0 30.97 29.418",fontSize:"inherit"}),sx:{mb:3},onChange:(e,t)=>{v(t)},...i}),Object(j.jsxs)(d.a,{color:"inherit",align:"center",sx:{px:2},children:[Object(j.jsxs)("b",{children:[m("Valutazione corso"),":"]})," ",m("Seleziona da 1 a 5 stelle dove 5 \xe8 il massimo")]})]})})}},376:function(e,t,n){"use strict";var i=n(4),r=n(2),s=n(0),a=(n(240),n(36)),o=n(183),c=n(29),l=n(54),d=n(724),u=n(715),h=n(327),p=n(351),m=n(158),g=n(179);function f(e){return Object(m.a)("MuiAccordion",e)}var b=Object(g.a)("MuiAccordion",["root","rounded","expanded","disabled","gutters","region"]),y=n(1);const j=["children","className","defaultExpanded","disabled","disableGutters","expanded","onChange","square","TransitionComponent","TransitionProps"],_=Object(c.a)(u.a,{name:"MuiAccordion",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[{["& .".concat(b.region)]:t.region},t.root,!n.square&&t.rounded,!n.disableGutters&&t.gutters]}})((e=>{let{theme:t}=e;const n={duration:t.transitions.duration.shortest};return{position:"relative",transition:t.transitions.create(["margin"],n),overflowAnchor:"none","&:before":{position:"absolute",left:0,top:-1,right:0,height:1,content:'""',opacity:1,backgroundColor:t.palette.divider,transition:t.transitions.create(["opacity","background-color"],n)},"&:first-of-type":{"&:before":{display:"none"}},["&.".concat(b.expanded)]:{"&:before":{opacity:0}
2,"&:first-of-type":{marginTop:0},"&:last-of-type":{marginBottom:0},"& + &":{"&:before":{display:"none"}}},["&.".concat(b.disabled)]:{backgroundColor:t.palette.action.disabledBackground}}}),(e=>{let{theme:t,ownerState:n}=e;return Object(r.a)({},!n.square&&{borderRadius:0,"&:first-of-type":{borderTopLeftRadius:t.shape.borderRadius,borderTopRightRadius:t.shape.borderRadius},"&:last-of-type":{borderBottomLeftRadius:t.shape.borderRadius,borderBottomRightRadius:t.shape.borderRadius,"@supports (-ms-ime-align: auto)":{borderBottomLeftRadius:0,borderBottomRightRadius:0}}},!n.disableGutters&&{["&.".concat(b.expanded)]:{margin:"16px 0"}})})),v=s.forwardRef((function(e,t){const n=Object(l.a)({props:e,name:"MuiAccordion"}),{children:c,className:u,defaultExpanded:m=!1,disabled:g=!1,disableGutters:b=!1,expanded:v,onChange:x,square:O=!1,TransitionComponent:T=d.a,TransitionProps:S}=n,w=Object(i.a)(n,j),[A,k]=Object(p.a)({controlled:v,default:m,name:"Accordion",state:"expanded"}),C=s.useCallback((e=>{k(!A),x&&x(e,!A)}),[A,x,k]),[E,...I]=s.Children.toArray(c),D=s.useMemo((()=>({expanded:A,disabled:g,disableGutters:b,toggle:C})),[A,g,b,C]),P=Object(r.a)({},n,{square:O,disabled:g,disableGutters:b,expanded:A}),R=(e=>{const{classes:t,square:n,expanded:i,disabled:r,disableGutters:s}=e,a={root:["root",!n&&"rounded",i&&"expanded",r&&"disabled",!s&&"gutters"],region:["region"]};return Object(o.a)(a,f,t)})(P);return Object(y.jsxs)(_,Object(r.a)({className:Object(a.a)(R.root,u),ref:t,ownerState:P,square:O},w,{children:[Object(y.jsx)(h.a.Provider,{value:D,children:E}),Object(y.jsx)(T,Object(r.a)({in:A,timeout:"auto"},S,{children:Object(y.jsx)("div",{"aria-labelledby":E.props.id,id:E.props["aria-controls"],role:"region",className:R.region,children:I})}))]}))}));t.a=v},377:function(e,t,n){"use strict";var i=n(4),r=n(2),s=n(0),a=n(36),o=n(183),c=n(29),l=n(54),d=n(689),u=n(327),h=n(158),p=n(179);function m(e){return Object(h.a)("MuiAccordionSummary",e)}var g=Object(p.a)("MuiAccordionSummary",["root","expanded","focusVisible","disabled","gutters","contentGutters","content","expandIconWrapper"]),f=n(1);const b=["children","className","expandIcon","focusVisibleClassName","onClick"],y=Object(c.a)(d.a,{name:"MuiAccordionSummary",slot:"Root",overridesResolver:(e,t)=>t.root})((e=>{let{theme:t,ownerState:n}=e;const i={duration:t.transitions.duration.shortest};return Object(r.a)({display:"flex",minHeight:48,padding:t.spacing(0,2),transition:t.transitions.create(["min-height","background-color"],i),["&.".concat(g.focusVisible)]:{backgroundColor:t.palette.action.focus},["&.".concat(g.disabled)]:{opacity:t.palette.action.disabledOpacity},["&:hover:not(.".concat(g.disabled,")")]:{cursor:"pointer"}},!n.disableGutters&&{["&.".concat(g.expanded)]:{minHeight:64}})})),j=Object(c.a)("div",{name:"MuiAccordionSummary",slot:"Content",overridesResolver:(e,t)=>t.content})((e=>{let{theme:t,ownerState:n}=e;return Object(r.a)({display:"flex",flexGrow:1,margin:"12px 0"},!n.disableGutters&&{transition:t.transitions.create(["margin"],{duration:t.transitions.duration.shortest}),["&.".concat(g.expanded)]:{margin:"20px 0"}})})),_=Object(c.a)("div",{name:"MuiAccordionSummary",slot:"ExpandIconWrapper",overridesResolver:(e,t)=>t.expandIconWrapper})((e=>{let{theme:t}=e;return{display:"flex",color:t.palette.action.active,transform:"rotate(0deg)",transition:t.transitions.create("transform",{duration:t.transitions.duration.shortest}),["&.".concat(g.expanded)]:{transform:"rotate(180deg)"}}})),v=s.forwardRef((function(e,t){const n=Object(l.a)({props:e,name:"MuiAccordionSummary"}),{children:c,className:d,expandIcon:h,focusVisibleClassName:p,onClick:g}=n,v=Object(i.a)(n,b),{disabled:x=!1,disableGutters:O,expanded:T,toggle:S}=s.useContext(u.a),w=Object(r.a)({},n,{expanded:T,disabled:x,disableGutters:O}),A=(e=>{const{classes:t,expanded:n,disabled:i,disableGutters:r}=e,s={root:["root",n&&"expanded",i&&"disabled",!r&&"gutters"],focusVisible:["focusVisible"],content:["content",n&&"expanded",!r&&"contentGutters"],expandIconWrapper:["expandIconWrapper",n&&"expanded"]};return Object(o.a)(s,m,t)})(w);return Object(f.jsxs)(y,Object(r.a)({focusRipple:!1,disableRipple:!0,disabled:x,component:"div","aria-expanded":T,className:Object(a.a)(A.root,d),focusVisibleClassName:Object(a.a)(A.focusVisible,p),onClick:e=>{S&&S(e),g&&g(e)},ref:t,ownerState:w},v,{children:[Object(f.jsx)(j,{className:A.content,ownerState:w,children:c}),h&&Object(f.jsx)(_,{className:A.expandIconWrapper,ownerState:w,children:h})]}))}));t.a=v},378:function(e,t,n){"use strict";var i=n(2),r=n(4),s=n(0),a=n(36),o=n(183),c=n(29),l=n(54),d=n(158),u=n(179);
2function h(e){return Object(d.a)("MuiAccordionDetails",e)}Object(u.a)("MuiAccordionDetails",["root"]);var p=n(1);const m=["className"],g=Object(c.a)("div",{name:"MuiAccordionDetails",slot:"Root",overridesResolver:(e,t)=>t.root})((e=>{let{theme:t}=e;return{padding:t.spacing(1,2,2)}})),f=s.forwardRef((function(e,t){const n=Object(l.a)({props:e,name:"MuiAccordionDetails"}),{className:s}=n,c=Object(r.a)(n,m),d=n,u=(e=>{const{classes:t}=e;return Object(o.a)({root:["root"]},h,t)})(d);return Object(p.jsx)(g,Object(i.a)({className:Object(a.a)(u.root,s),ref:t,ownerState:d},c))}));t.a=f},381:function(e,t,n){"use strict";n(0);var i=n(256),r=n(685),s=n(111),a=n(1);const o=Object(r.a)((e=>({playerBg:{height:"100% !important",width:"100%",top:0,left:0,position:"absolute !important","& video":{objectFit:"cover",height:"100vh !important"},"& .vjs-poster":{height:"100vh",backgroundSize:"cover",cursor:"default"}}})));t.a=e=>{const t=o();return e.video?Object(a.jsx)(i.a,{mute:e.mute,className:t.playerBg,title:!1,poster:e.cover,options:{loop:!0,muted:!0,controls:!1,sources:[{src:e.video,type:"mp4"===e.video.split(".").pop()?"video/mp4":"application/x-mpegURL"}]}}):Object(a.jsx)(s.a,{className:t.playerBg,sx:{backgroundImage:"url(".concat(e.cover,")"),backgroundPosition:"center center",backgroundSize:"cover",backgroundRepeat:"no-repeat"}})}},384:function(e,t,n){"use strict";var i=n(0),r=n.n(i),s=n(79),a=n(5),o=n(27),c=n(375),l=n(20),d=n(195),u=n(188),h=n(645),p=n(720),m=n(705),g=n(111),f=n(649),b=n(729),y=n(334),j=n(706),_=n(707),v=n(56),x=n(657),O=n(191),T=n(381),S=n(192),w=n(265),A=n(1);const k=Object(h.a)("div")((e=>{let{theme:t}=e;return{position:"absolute",paddingBottom:"80px",bottom:0,left:0,width:"100%",background:"linear-gradient(180deg, rgba(0,0,0,0) 10%, rgba(0,0,0,0.8) 100%)",[t.breakpoints.down("md")]:{paddingBottom:"15px"}}})),C=Object(h.a)(p.a)((e=>{let{theme:t}=e;return{color:"#fff",textShadow:"0 3px 6px rgba(0, 0, 0, 0.16)",marginTop:"10px"}}));t.a=e=>{const{t:t,i18n:n}=Object(s.a)(),i=Object(a.i)(),{auth:h}=r.a.useContext(l.a),E=Object(v.a)(),I=Object(x.a)(E.breakpoints.down("md")),{isHoreca:D}=Object(d.a)(),P={standard:t("MasterClass"),wellness:t("Benessere"),basics:t("La Scuola")};return Object(A.jsx)(m.a,{container:!0,children:Object(A.jsx)(m.a,{item:!0,xs:!0,children:Object(A.jsxs)(g.a,{position:"relative",height:"100vh",overflow:"hidden",children:[Object(A.jsx)(T.a,{mute:!0,cover:e.course.img_background,video:I&&e.course.trailer_url_portrait?e.course.trailer_url_portrait:e.course.trailer_url_landscape}),Object(A.jsx)(k,{sx:{...e.isHome&&{pb:"30px"}},children:Object(A.jsx)(m.a,{container:!0,justifyContent:"center",children:Object(A.jsx)(m.a,{item:!0,xs:11,sm:10,children:Object(A.jsxs)(m.a,{container:!0,justifyContent:"space-between",children:[Object(A.jsx)(m.a,{item:!0,xs:12,md:!0,children:e.course.lesson_current&&e.isCourse?Object(A.jsxs)(m.a,{container:!0,justifyContent:"space-between",spacing:3,children:[Object(A.jsx)(m.a,{sx:{display:{xs:"none",lg:"block"}},item:!0,xs:12,md:3,children:Object(A.jsx)(S.a,{useSet:!0,src:e.course.lesson_current.img_cover,style:{width:"100%",borderRadius:"15px"}})}),Object(A.jsxs)(m.a,{item:!0,xs:12,md:11,lg:9,children:[Object(A.jsxs)(C,{variant:"h6",color:"textPrimary",sx:{marginTop:0},children:[t("LEZIONE")," ",e.course.lessons.findIndex((t=>t.id===e.course.lesson_current.id))+1]}),Object(A.jsx)(C,{variant:"h5",color:"textPrimary",sx:{marginTop:0,fontWeight:"bold"},children:e.course.lesson_current.title}),Object(A.jsxs)(f.a,{alignItems:"center",sx:{alignItems:{xs:"flex-start",md:"center"},flexDirection:{md:"row"}},children:[Object(A.jsx)(C,{component:"h1",sx:{marginTop:0},variant:"subtitle1",color:"textPrimary",children:e.course.title}),Object(A.jsx)(g.a,{sx:{ml:{xs:0,md:1},mt:{xs:1,md:0},pt:.3,pb:.5,px:1,background:"#26292D",borderRadius:"6px",color:e=>e.palette.text.primary},children:Object(A.jsx)(c.a,{value:e.course.average_rating,children:!Boolean(e.course.user_rating)&&e.course.can_rate&&Object(A.jsx)(b.a,{underline:"always",variant:"subtitle2",color:"text.primary",sx:{cursor:"pointer"},onClick:()=>{window.scrollTo({top:e.descRef.current.offsetTop-100,behavior:"smooth"})},children:t("Dai un voto")})})})]})]})]}):e.isHome?Object(A.jsxs)(A.Fragment,{children:[Object(A.jsxs)(f.a,{direction:"row",alignItems:"center",children:[Object(A.jsx)(y.a,{max:2,children:e.course.trainers_list.map((e=>Object(A.jsx)(j.a,{alt:e.first_name+" "+e.last_name,src:Object(u.m)(e.img_portrait,100)},"avatar"+e.id)))}),Object(A.jsx)(g.a,{sx:{mx:2},children:Object(A.jsx)(p.a,{color:"text.primary",variant:"h6",children:Object(u.o)(e.course)}
2)}),Object(A.jsx)(g.a,{ml:"auto",children:Object(A.jsx)(_.a,{color:"white",size:"small",label:Object(A.jsx)("b",{children:t("Novit\xe0")})})})]}),Object(A.jsx)(C,{component:"h1",variant:"h2",color:"textPrimary",sx:{textShadow:"0px 3px 4px #00000066",mt:0,mb:2,fontWeight:"bold"},children:e.course.title}),Object(A.jsxs)(p.a,{color:"text.primary",children:[P[e.course.course_type]," \u2022 ",e.course.highlights]})]}):Object(A.jsxs)(r.a.Fragment,{children:[Object(A.jsxs)(f.a,{direction:"row",alignItems:"center",children:[Object(A.jsx)(y.a,{max:2,children:e.course.trainers_list.map((e=>Object(A.jsx)(j.a,{alt:e.first_name+" "+e.last_name,src:Object(u.m)(e.img_portrait,100)},"avatar"+e.id)))}),Object(A.jsx)(C,{color:"text.primary",sx:{ml:1,mt:0},children:Object(u.o)(e.course)})]}),Object(A.jsx)(C,{component:"h1",variant:"h5",color:"textPrimary",sx:{mt:1,fontWeight:"bold"},children:e.course.title}),Object(A.jsxs)(f.a,{direction:"row",spacing:1,alignItems:"center",sx:{mt:1},children:[Object(A.jsxs)(C,{color:"text.primary",sx:{mt:0},children:[t("Valutazione"),":"]}),Object(A.jsx)(g.a,{sx:{pt:.3,pb:.5,px:1,background:"#26292D",borderRadius:"6px",color:e=>e.palette.text.primary},children:Object(A.jsx)(c.a,{value:e.course.average_rating})})]})]})}),Object(A.jsx)(m.a,{item:!0,xs:12,md:!0,children:Object(A.jsx)(g.a,{width:"100%",height:"100%",textAlign:"right",display:"flex",justifyContent:{xs:"flex-start",md:"flex-end"},children:Object(A.jsxs)(g.a,{my:2,alignSelf:"flex-end",children:[e.course.lesson_current&&e.course.lesson_current.has_cooking_box&&Object(A.jsxs)(g.a,{bgcolor:"#fff",color:"#303337",borderRadius:"18px",textAlign:"center",display:"inline-flex",direction:"column",alignItems:"center",pl:2,pr:1,py:"5px",mb:1,mr:{xs:0,sm:1,md:0},children:[Object(A.jsx)(p.a,{sx:{mr:1},children:Object(A.jsx)("b",{children:t("Box ingredienti")})}),Object(A.jsx)(S.a,{src:w.a,style:{width:"25px"}})]}),Object(A.jsx)(g.a,{children:e.isCourse&&(!h.isAuthenticated||h.user&&!e.course.can_watch)?Object(A.jsx)(A.Fragment,{children:e.course.free?Object(A.jsx)(A.Fragment,{children:Object(A.jsx)(O.a,{to:{pathname:"/".concat(n.language,"/auth/register"),state:{from:i.pathname}},color:"primary",component:o.b,children:t("Guarda gratis")})}):Object(A.jsx)(O.a,{to:{pathname:"/".concat(n.language,"/paywall/").concat(e.course.id),state:{from:i.pathname}},color:"primary",component:o.b,children:t("Ottieni ora")})}):e.isCourse&&e.course.can_watch?Object(A.jsx)(O.a,{to:{pathname:Object(a.f)("/:lang/:courses/:courseSlug/:lessons/:lessonSlug",{lang:n.language,courses:t(D?"horeca":"corsi"),courseSlug:e.course.slug,lessons:t("lezioni"),lessonSlug:e.course.lesson_current?e.course.lesson_current.slug:e.course.lessons[0].slug}),state:{from:i.pathname}},color:"primary",component:o.b,children:e.course.lesson_current?t("Continua a guardare"):t("Inizia il corso")}):Object(A.jsx)(O.a,{to:{..."standard"!==e.course.course_type&&"horeca"!==e.course.course_type?{pathname:Object(a.f)("/:lang/:package/:classSlug/:modules/:moduleSlug",{lang:n.language,package:"basics"===e.course.course_type?t("scuola"):t("benessere"),classSlug:e.course.package.slug,modules:t("moduli"),moduleSlug:e.course.slug})}:{pathname:Object(a.f)("/:lang/:courses/:courseSlug",{lang:n.language,courses:"horeca"===e.course.course_type?t("horeca"):t("corsi"),courseSlug:e.course.slug})},state:{from:i.pathname,scroll:!0}},color:"primary",component:o.b,children:t("Vai al corso")})})]})})})]})})})})]})})})}},385:function(e,t,n){"use strict";t.a=n.p+"static/media/desktop-it.b43fcdb9.jpg"},386:function(e,t,n){"use strict";t.a=n.p+"static/media/mobile-it.621e838f.jpg"},387:function(e,t,n){"use strict";t.a=n.p+"static/media/desktop-en.af4c62b3.jpg"},388:function(e,t,n){"use strict";t.a=n.p+"static/media/mobile-en.3d1aabce.jpg"},389:function(e,t,n){"use strict";t.a=n.p+"static/media/desktop-es.cbd117ba.jpg"},390:function(e,t,n){"use strict";t.a=n.p+"static/media/mobile-es.bf13ec55.jpg"},394:function(e,t,n){"use strict";var i=n(4),r=n(2),s=n(0),a=(n(240),n(36)),o=n(183),c=n(181),l=n(21),d=n(29),u=n(54),h=n(158),p=n(179);function m(e){return Object(h.a)("MuiButtonGroup",e)}var g=Object(p.a)("MuiButtonGroup",["root","contained","outlined","text","disableElevation","disabled","fullWidth","vertical","grouped","groupedHorizontal","groupedVertical","groupedText","groupedTextHorizontal","groupedTextVertical","groupedTextPrimary","groupedTextSecondary","groupedOutlined","groupedOutlinedHorizontal","groupedOutlinedVertical","groupedOutlinedPrimary","groupedOutlinedSecondary","groupedContained","groupedContainedHorizontal","groupedContainedVertical","groupedContainedPrimary","groupedContainedSecondary"]),f=n(1);const b=["children","className","color","component","disabled","disableElevation","disableFocusRipple","disableRipple","fullWidth","orientation","size","variant"],y=Object(d.a)("div",{name:"MuiButtonGroup",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[{["& .".concat(g.grouped)]:t.grouped},{["& .".concat(g.grouped)]:t["grouped".concat(Object(l.a)(n.orientation))]},{["& .".concat(g.grouped)]:t["grouped".concat(Object(l.a)(n.variant))]},{["& .".concat(g.grouped)]:t["grouped".concat(Object(l.a)(n.variant)).concat(Object(l.a)(n.orientation))]},{["& .".concat(g.grouped)]:t["grouped".concat(Object(l.a)(n.variant)).concat(Object(l.a)(n.color))]}
2,t.root,t[n.variant],!0===n.disableElevation&&t.disableElevation,n.fullWidth&&t.fullWidth,"vertical"===n.orientation&&t.vertical]}})((e=>{let{theme:t,ownerState:n}=e;return Object(r.a)({display:"inline-flex",borderRadius:t.shape.borderRadius},"contained"===n.variant&&{boxShadow:t.shadows[2]},n.disableElevation&&{boxShadow:"none"},n.fullWidth&&{width:"100%"},"vertical"===n.orientation&&{flexDirection:"column"},{["& .".concat(g.grouped)]:Object(r.a)({minWidth:40,"&:not(:first-of-type)":Object(r.a)({},"horizontal"===n.orientation&&{borderTopLeftRadius:0,borderBottomLeftRadius:0},"vertical"===n.orientation&&{borderTopRightRadius:0,borderTopLeftRadius:0},"outlined"===n.variant&&"horizontal"===n.orientation&&{marginLeft:-1},"outlined"===n.variant&&"vertical"===n.orientation&&{marginTop:-1}),"&:not(:last-of-type)":Object(r.a)({},"horizontal"===n.orientation&&{borderTopRightRadius:0,borderBottomRightRadius:0},"vertical"===n.orientation&&{borderBottomRightRadius:0,borderBottomLeftRadius:0},"text"===n.variant&&"horizontal"===n.orientation&&{borderRight:"1px solid ".concat("light"===t.palette.mode?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)")},"text"===n.variant&&"vertical"===n.orientation&&{borderBottom:"1px solid ".concat("light"===t.palette.mode?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)")},"text"===n.variant&&"inherit"!==n.color&&{borderColor:Object(c.a)(t.palette[n.color].main,.5)},"outlined"===n.variant&&"horizontal"===n.orientation&&{borderRightColor:"transparent"},"outlined"===n.variant&&"vertical"===n.orientation&&{borderBottomColor:"transparent"},"contained"===n.variant&&"horizontal"===n.orientation&&{borderRight:"1px solid ".concat(t.palette.grey[400]),["&.".concat(g.disabled)]:{borderRight:"1px solid ".concat(t.palette.action.disabled)}},"contained"===n.variant&&"vertical"===n.orientation&&{borderBottom:"1px solid ".concat(t.palette.grey[400]),["&.".concat(g.disabled)]:{borderBottom:"1px solid ".concat(t.palette.action.disabled)}},"contained"===n.variant&&"inherit"!==n.color&&{borderColor:t.palette[n.color].dark}),"&:hover":Object(r.a)({},"outlined"===n.variant&&"inherit"!==n.color&&{borderColor:t.palette[n.color].main},"contained"===n.variant&&{boxShadow:"none"})},"contained"===n.variant&&{boxShadow:"none"})})})),j=s.forwardRef((function(e,t){const n=Object(u.a)({props:e,name:"MuiButtonGroup"}),{children:c,className:d,color:h="primary",component:p="div",disabled:g=!1,disableElevation:j=!1,disableFocusRipple:_=!1,disableRipple:v=!1,fullWidth:x=!1,orientation:O="horizontal",size:T="medium",variant:S="outlined"}=n,w=Object(i.a)(n,b),A=Object(r.a)({},n,{color:h,component:p,disabled:g,disableElevation:j,disableFocusRipple:_,disableRipple:v,fullWidth:x,orientation:O,size:T,variant:S}),k=(e=>{const{classes:t,color:n,disabled:i,disableElevation:r,fullWidth:s,orientation:a,variant:c}=e,d={root:["root",c,"vertical"===a&&"vertical",s&&"fullWidth",r&&"disableElevation"],grouped:["grouped","grouped".concat(Object(l.a)(a)),"grouped".concat(Object(l.a)(c)),"grouped".concat(Object(l.a)(c)).concat(Object(l.a)(a)),"grouped".concat(Object(l.a)(c)).concat(Object(l.a)(n)),i&&"disabled"]};return Object(o.a)(d,m,t)})(A);return Object(f.jsx)(y,Object(r.a)({as:p,role:"group",className:Object(a.a)(k.root,d),ref:t,ownerState:A},w,{children:s.Children.map(c,(e=>s.isValidElement(e)?s.cloneElement(e,{className:Object(a.a)(k.grouped,e.props.className),color:e.props.color||h,disabled:e.props.disabled||g,disableElevation:e.props.disableElevation||j,disableFocusRipple:_,disableRipple:v,fullWidth:x,size:e.props.size||T,variant:e.props.variant||S}):null))}))}));t.a=j},413:function(e,t,n){"use strict";t.a=n.p+"static/media/discover.48301172.jpg"},414:function(e,t,n){"use strict";var i=n(2),r=n(0),s=n(366),a=n(1);let o=!1;t.a=r.forwardRef((function(e,t){return o||(console.warn(["Material-UI: The Rating component was moved from the lab to the core.","","You should use `import { Rating } from '@material-ui/core'`","or `import Rating from '@material-ui/core/Rating'`"].join("\n")),o=!0),Object(a.jsx)(s.a,Object(i.a)({ref:t},e))}))},417:function(e,t,n){"use strict";n.d(t,"i",(function(){return $})),n.d(t,"g",(function(){return ee})),n.d(t,"f",(function(){return te})),n.d(t,"a",(function(){return ne})),n.d(t,"b",(function(){return ie})),n.d(t,"e",(function(){return re})),n.d(t,"j",(function(){return se})),n.d(t,"k",(function(){return ae})),n.d(t,"d",(function(){return oe})),n.d(t,"c",(function(){return ce})),n.d(t,"h",(function(){return le}));var i,r,s=n(0),a=n.n(s),o=n(27),c=n(5),l=n(79),d=n(709),u=(n(200),n(28)),h=(n(212),n(257)),p=(n(221),n(413)),m=n(244),g=(n(384),n(208)),f=n(338),b=(n(35),n(20)),y=n(37),j=n(645),_=(n(188),n(236)),v=n(56),x=n(111),O=n(719),T=n(705),S=n(689),w=n(649),A=n(720),k=n(707),C=n(657),E=(n(724),n(729)),I=n(716),D=n(191),P=n(256),R=n(385),L=n(386),M=n(387),N=n(388),B=n(389),U=n(390),F=n(217),z=n(211);function q(){return q=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)({}).hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},q.apply(null,arguments)}function H(e,t){let{title:n,titleId:a,...o}=e;return s.createElement("svg",q({xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",width:24,height:24,viewBox:"0 0 24 24",ref:t,"aria-labelledby":a},o),n?s.createElement("title",{id:a},n):null,i||(i=s.createElement("defs",null,s.createElement("clipPath",{id:"clip-path"},s.createElement("rect",{id:"Rettangolo_2021","data-name":"Rettangolo 2021",width:19.128,height:24,fill:"
2currentColor"})))),r||(r=s.createElement("g",{id:"Raggruppa_5011","data-name":"Raggruppa 5011",transform:"translate(-122 -466)"},s.createElement("g",{id:"Raggruppa_5007","data-name":"Raggruppa 5007",transform:"translate(124 466)"},s.createElement("g",{id:"Raggruppa_4552","data-name":"Raggruppa 4552",transform:"translate(0 0)",clipPath:"url(#clip-path)"},s.createElement("path",{id:"Tracciato_8989","data-name":"Tracciato 8989",d:"M18.267,5.385a.6.6,0,0,0-.235-.048,2.062,2.062,0,1,1,0-4.124.607.607,0,1,0,0-1.213H3.369A3.374,3.374,0,0,0,0,3.324V21a3.007,3.007,0,0,0,3,3H17.939a1.193,1.193,0,0,0,1.19-1.19V6.523a1.184,1.184,0,0,0-.861-1.138m-9.817,8a.311.311,0,0,1-.072.193.316.316,0,0,1-.445.044L6.86,12.74a.323.323,0,0,0-.4,0l-1.087.875a.316.316,0,0,1-.516-.238V6.551l3.6-.007ZM3.369,1.213h12.12a3.269,3.269,0,0,0,0,4.128H3.211a2,2,0,0,1-2-1.985A2.159,2.159,0,0,1,3.369,1.213",transform:"translate(0 0)",fill:"currentColor"}))),s.createElement("rect",{id:"Rettangolo_2137","data-name":"Rettangolo 2137",width:24,height:24,transform:"translate(122 466)",fill:"none"}))))}const V=s.forwardRef(H);n.p;var W,G=n(216);function X(){return X=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)({}).hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},X.apply(null,arguments)}function Y(e,t){let{title:n,titleId:i,...r}=e;return s.createElement("svg",X({xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",ref:t,"aria-labelledby":i},r),n?s.createElement("title",{id:i},n):null,W||(W=s.createElement("g",{id:"Raggruppa_5013","data-name":"Raggruppa 5013",transform:"translate(-129 -556)"},s.createElement("path",{id:"Icon_awesome-lock","data-name":"Icon awesome-lock",d:"M18.575,10.5H17.46V7.125a7.059,7.059,0,1,0-14.117,0V10.5H2.229A2.24,2.24,0,0,0,0,12.75v9A2.24,2.24,0,0,0,2.229,24H18.575A2.24,2.24,0,0,0,20.8,21.75v-9A2.24,2.24,0,0,0,18.575,10.5Zm-4.829,0H7.058V7.125a3.344,3.344,0,1,1,6.687,0Z",transform:"translate(131 556)",fill:"currentColor"}),s.createElement("rect",{id:"Rettangolo_2139","data-name":"Rettangolo 2139",width:24,height:24,transform:"translate(129 556)",fill:"none"}))))}const K=s.forwardRef(Y);n.p,n(218),n(219),n.p;var Q=n(1);const Z=Object(j.a)(x.a)((e=>{let{theme:t}=e;return{paddingTop:"34px",paddingBottom:"34px",backgroundColor:"#2F3337",borderRadius:"15px"}})),J=Object(j.a)(x.a)((e=>{let{theme:t}=e;return{display:"block",textDecoration:"none",borderRadius:"20px",padding:"60px 0",cursor:"pointer",boxSizing:"border-box","&:hover":{outline:"2px solid #fff"},"&.wellness":{background:"rgba(31, 45, 29)"},"&.masterclass":{background:"rgba(47, 26, 26)"},"&.basics":{background:"rgba(46, 36, 27)"},"&.horeca":{background:"rgba(37, 19, 38)"},"&.disabled":{position:"relative","& .opacity":{opacity:.65},"& .icon":{display:"block",fontSize:"2.5rem",marginLeft:"auto",marginRight:"10px",marginTop:"10px"},"& .lock":{position:"absolute",top:0,left:0,right:0,bottom:0,width:"100%",height:"100%",display:"block"}}}})),$=e=>{const{t:t,i18n:n}=Object(l.a)(),{widget:i}=e,{ref:r,imageSet:s}=Object(_.a)({img:i.image_url});return Object(Q.jsx)(O.a,{maxWidth:!1,sx:{maxWidth:1700,my:4},children:Object(Q.jsx)(T.a,{container:!0,justifyContent:"center",spacing:10,children:Object(Q.jsx)(T.a,{item:!0,xs:11,sm:10,children:Object(Q.jsxs)(T.a,{container:!0,justifyContent:"center",spacing:3,children:[Object(Q.jsx)(T.a,{item:!0,xs:12,md:4,lg:3,children:Object(Q.jsx)(S.a,{component:o.b,to:{pathname:"/".concat(n.language,"/").concat(t("ricette"))},sx:{width:"100%"},children:Object(Q.jsxs)(w.a,{ref:r,justifyContent:"space-between",sx:{backgroundImage:s,backgroundPosition:"center center",backgroundSize:"cover",backgroundRepeat:"no-repeat",height:340,borderRadius:2.5,p:3},children:[Object(Q.jsxs)(w.a,{direction:"row",justifyContent:"space-between",children:[Object(Q.jsxs)(x.a,{children:[Object(Q.jsx)(A.a,{variant:"caption",component:"div",color:"text.primary",children:i.subtitle}),Object(Q.jsx)(A.a,{variant:"h4",color:"text.primary",children:Object(Q.jsx)("b",{children:i.title})})]}),Object(Q.jsx)(x.a,{children:Object(Q.jsx)(k.a,{size:"small",color:"white",label:Object(Q.jsx)("b",{children:t("Novit\xe0")})})})]}),Object(Q.jsx)(A.a,{variant:"caption",component:"div",color:"text.primary",children:i.text})]})})}
2),Object(Q.jsx)(T.a,{item:!0,md:8,lg:9,sx:{display:{xs:"none",sm:"block"}},children:Object(Q.jsxs)(w.a,{justifyContent:"center",sx:{height:"100%",backgroundColor:"#2F3337",borderRadius:2.5,p:4,boxSizing:"border-box"},children:[Object(Q.jsx)(A.a,{variant:"h4",color:"text.primary",sx:{mb:2},children:Object(Q.jsx)("b",{children:t("Ricette facili e buonissime da preparare a casa tua ogni giorno")})}),Object(Q.jsx)(A.a,{variant:"h6",color:"text.secondary",sx:{mb:3},children:t("Migliora le tue abitudini alimentari, risparmia e pianifica i tuoi pasti settimanali su misura per te e la tua famiglia.")}),Object(Q.jsx)("div",{children:Object(Q.jsx)(D.a,{component:o.b,variant:"contained",color:"white",to:{pathname:"/".concat(n.language,"/").concat(t("ricette"))},children:t("Scopri tutte le ricette")})})]})})]})})})})},ee=e=>{const{t:t,i18n:n}=Object(l.a)(),{widget:i}=e,{ref:r,imageSet:s}=Object(_.a)({img:i.image_url});return Object(Q.jsx)(O.a,{maxWidth:!1,sx:{maxWidth:1700,my:4},children:Object(Q.jsx)(T.a,{container:!0,justifyContent:"center",spacing:10,children:Object(Q.jsx)(T.a,{item:!0,xs:11,sm:10,children:Object(Q.jsxs)(T.a,{container:!0,justifyContent:"center",spacing:3,children:[Object(Q.jsx)(T.a,{item:!0,xs:12,md:4,lg:3,children:Object(Q.jsx)(S.a,{component:o.b,to:{pathname:"/".concat(n.language,"/").concat(t("percorsi"))},sx:{width:"100%"},children:Object(Q.jsxs)(w.a,{ref:r,justifyContent:"space-between",sx:{backgroundImage:s,backgroundPosition:"center center",backgroundSize:"cover",backgroundRepeat:"no-repeat",height:340,borderRadius:2.5,p:3},children:[Object(Q.jsxs)(w.a,{direction:"row",justifyContent:"space-between",children:[Object(Q.jsxs)(x.a,{children:[Object(Q.jsx)(A.a,{variant:"caption",component:"div",color:"text.primary",children:i.subtitle}),Object(Q.jsx)(A.a,{variant:"h4",color:"text.primary",children:Object(Q.jsx)("b",{children:i.title})})]}),Object(Q.jsx)(x.a,{children:Object(Q.jsx)(k.a,{size:"small",color:"white",label:Object(Q.jsx)("b",{children:t("Novit\xe0")})})})]}),Object(Q.jsx)(A.a,{variant:"caption",component:"div",color:"text.primary",children:i.text})]})})}),Object(Q.jsx)(T.a,{item:!0,md:8,lg:9,sx:{display:{xs:"none",sm:"block"}},children:Object(Q.jsxs)(w.a,{justifyContent:"center",sx:{height:"100%",backgroundColor:"#2F3337",borderRadius:2.5,p:4,boxSizing:"border-box"},children:[Object(Q.jsx)(A.a,{variant:"h4",color:"text.primary",sx:{mb:2},children:Object(Q.jsx)("b",{children:t("Trasforma la tua cucina in un laboratorio un Percorso alla volta")})}),Object(Q.jsx)(A.a,{variant:"h6",color:"text.secondary",sx:{mb:3},children:t("Migliora le tue tecniche e le tue abilit\xe0 grazie a video-lezioni guidate passo dopo passo.")}),Object(Q.jsx)("div",{children:Object(Q.jsx)(D.a,{component:o.b,variant:"contained",color:"white",to:{pathname:"/".concat(n.language,"/").concat(t("percorsi"))},children:t("Scegli il tuo percorso")})})]})})]})})})})},te=e=>{const{t:t,i18n:n}=Object(l.a)(),{config:i}=a.a.useContext(y.a),{auth:r}=a.a.useContext(b.a);return(i.basics_enabled||i.wellness_enabled)&&Object(Q.jsxs)(Q.Fragment,{children:[Object(Q.jsx)(O.a,{maxWidth:!1,sx:{maxWidth:1700,my:4},children:Object(Q.jsxs)(T.a,{container:!0,justifyContent:"center",children:[Object(Q.jsx)(T.a,{item:!0,xs:11,sm:10,children:Object(Q.jsx)(x.a,{mb:4,children:Object(Q.jsx)(A.a,{variant:"h5",color:"textPrimary",gutterBottom:!0,children:Object(Q.jsx)("b",{children:t("Cosa vuoi imparare oggi?")})})})}),Object(Q.jsx)(T.a,{item:!0,xs:11,sm:10,children:Object(Q.jsxs)(T.a,{container:!0,spacing:2,children:[Object(Q.jsx)(T.a,{item:!0,xs:6,lg:3,children:Object(Q.jsxs)(J,{className:"masterclass ".concat(r.isAuthenticated&&r.user.data.flag_active_subscription?"":"disabled"),component:o.b,to:{pathname:"/".concat(n.language,"/").concat(t("corsi"))},children:[Object(Q.jsxs)(x.a,{className:"opacity",children:[Object(Q.jsxs)(A.a,{align:"center",color:"masterclass.main",variant:"h4",children:[Object(Q.jsx)(I.a,{component:G.a,sx:{color:"#FFDDDD",fontSize:{xs:"1.2rem",lg:"2rem"}}})," ",Object(Q.jsx)("b",{className:"label",children:t("MasterClass")})]}),Object(Q.jsx)(A.a,{align:"center",color:"#FFDDDD",variant:"h6",className:"label",children:t("Appassionati")})]}
2),Object(Q.jsx)(x.a,{className:"lock",sx:{display:"none"},children:Object(Q.jsxs)(w.a,{justifyContent:"space-between",sx:{textAlign:"center",height:"100%"},children:[Object(Q.jsx)(I.a,{component:K,className:"icon opacity",sx:{color:"#fff",fontSize:"7rem"}})," ",Object(Q.jsx)("br",{}),Object(Q.jsx)(A.a,{align:"center",variant:"body1",color:"text.primary",sx:{mb:2},children:Object(Q.jsx)("b",{children:Object(Q.jsxs)(d.a,{t:t,children:["Scopri ",Object(Q.jsx)("span",{className:"label",children:"la sezione"})]})})})]})})]})}),i.basics_enabled&&Object(Q.jsx)(T.a,{item:!0,xs:6,lg:3,children:Object(Q.jsxs)(J,{className:"basics ".concat(r.isAuthenticated&&r.user.data.flag_active_subscription?"":"disabled"),component:o.b,to:{pathname:"/".concat(n.language,"/").concat(t("scuola"))},children:[Object(Q.jsxs)(x.a,{className:"opacity",children:[Object(Q.jsxs)(A.a,{align:"center",color:"basics.main",variant:"h4",children:[Object(Q.jsx)(I.a,{component:V,viewBox:"0 0 24 24",sx:{color:"#FFDDDD",fontSize:{xs:"1.2rem",lg:"2rem"}}})," ",Object(Q.jsx)("b",{className:"label",children:t("La Scuola")})]}),Object(Q.jsx)(A.a,{align:"center",color:"#FFDFBF",variant:"h6",className:"label",children:t("Principianti")})]}),Object(Q.jsx)(x.a,{className:"lock",sx:{display:"none"},children:Object(Q.jsxs)(w.a,{justifyContent:"space-between",sx:{textAlign:"center",height:"100%"},children:[Object(Q.jsx)(I.a,{component:K,className:"icon opacity",sx:{color:"#fff",fontSize:"7rem"}})," ",Object(Q.jsx)("br",{}),Object(Q.jsx)(A.a,{align:"center",variant:"body1",color:"text.primary",sx:{mb:2},children:Object(Q.jsx)("b",{children:Object(Q.jsxs)(d.a,{t:t,children:["Scopri ",Object(Q.jsx)("span",{className:"label",children:"la sezione"})]})})})]})})]})}),i.horeca_enabled&&Object(Q.jsx)(T.a,{item:!0,xs:6,lg:3,children:Object(Q.jsxs)(J,{className:"horeca ".concat(r.isAuthenticated?"":"disabled"),component:o.b,to:{pathname:"/".concat(n.language,"/").concat(t("horeca"))},children:[Object(Q.jsxs)(x.a,{className:"opacity",children:[Object(Q.jsxs)(A.a,{align:"center",color:"#FD419F",variant:"h4",children:[Object(Q.jsx)(I.a,{component:z.a,sx:{color:"#fed5f1",fontSize:{xs:"1.2rem",lg:"2rem"}}})," ",Object(Q.jsx)("b",{className:"label",children:t("HoReCa")})]}),Object(Q.jsx)(A.a,{align:"center",color:"#fed5f1",variant:"h6",className:"label",children:t("Professionisti")})]}),Object(Q.jsx)(x.a,{className:"lock",sx:{display:"none"},children:Object(Q.jsxs)(w.a,{justifyContent:"space-between",sx:{textAlign:"center",height:"100%"},children:[Object(Q.jsx)(I.a,{component:K,className:"icon opacity",sx:{color:"#fff",fontSize:"7rem"}}),Object(Q.jsx)("br",{}),Object(Q.jsx)(A.a,{align:"center",variant:"body1",color:"text.primary",sx:{mb:2},children:Object(Q.jsx)("b",{children:Object(Q.jsxs)(d.a,{t:t,children:["Scopri ",Object(Q.jsx)("span",{className:"label",children:"la sezione"})]})})})]})})]})}),i.wellness_enabled&&Object(Q.jsx)(T.a,{item:!0,xs:6,lg:3,children:Object(Q.jsxs)(J,{className:"wellness ".concat(r.isAuthenticated&&r.user.data.flag_active_wellness_subscription?"":"disabled"),component:o.b,to:{pathname:"/".concat(n.language,"/").concat(t("benessere"))},children:[Object(Q.jsxs)(x.a,{className:"opacity",children:[Object(Q.jsxs)(A.a,{align:"center",color:"wellness.main",variant:"h4",children:[Object(Q.jsx)(I.a,{component:F.a,sx:{color:"#E4EBDB",fontSize:{xs:"1.2rem",lg:"2rem"}}})," ",Object(Q.jsx)("b",{className:"label",children:t("Benessere")})]}),Object(Q.jsx)(A.a,{align:"center",color:"#E4EBDB",variant:"h6",className:"label",children:t("Salute")})]}),Object(Q.jsx)(x.a,{className:"lock",sx:{display:"none"},children:Object(Q.jsxs)(w.a,{justifyContent:"space-between",sx:{textAlign:"center",height:"100%"},children:[Object(Q.jsx)(I.a,{component:K,className:"icon opacity",sx:{color:"#fff",fontSize:"7rem"}}),Object(Q.jsx)("br",{}),Object(Q.jsx)(A.a,{align:"center",variant:"body1",color:"text.primary",sx:{mb:2},children:Object(Q.jsx)("b",{children:Object(Q.jsxs)(d.a,{t:t,children:["Scopri ",Object(Q.jsx)("span",{className:"label",children:"la sezione"})]})})})]})})]})})]})})]})}),i.basics_enabled&&r.isAuthenticated&&r.user&&r.user.data&&!r.user.data.flag_active_subscription&&Object(Q.jsxs)(Q.Fragment,{children:[Object(Q.jsx)(x.a,{py:8,bgcolor:"#27292D",children:Object(Q.jsx)(O.a,{maxWidth:!1,sx:{maxWidth:1700},children:Object(Q.jsx)(T.a,{container:!0,justifyContent:"center",children:Object(Q.jsx)(T.a,{item:!0,xs:11,lg:10,children:Object(Q.jsxs)(T.a,{container:!0,children:[Object(Q.jsx)(T.a,{item:!0,xs:12,md:6,children:Object(Q.jsx)(x.a,{sx:{borderRadius:"10px",overflow:"hidden"},children:Object(Q.jsx)(P.a,{trailer:!0,disableEndLesson:!0,disableAutoplay:!0,fireEvents:!0,video:{course:{},lesson:{progress:0}},poster:i.trailer_img_cover,options:{sources:[{src:i.trailer_url,type:"application/x-mpegURL"}]}})})}),Object(Q.jsx)(T.a,{item:!0,xs:12,md:6,children:Object(Q.jsx)(x.a,{display:"flex",height:"100%",
2justifyContent:"center",alignItems:"center",children:Object(Q.jsxs)(x.a,{sx:{maxWidth:{md:"70%"},mt:{xs:2,md:0}},children:[Object(Q.jsx)(x.a,{mb:2,children:Object(Q.jsxs)(A.a,{variant:"h3",color:"masterclass.main",children:[Object(Q.jsx)(I.a,{component:G.a,sx:{color:"#FFDDDD",fontSize:{sm:"2rem"}}})," ",Object(Q.jsx)("b",{children:t("MasterClass")})]})}),Object(Q.jsx)(A.a,{variant:"h6",color:"text.primary",sx:{mb:3},children:Object(Q.jsxs)(d.a,{t:t,children:["Un percorso ",Object(Q.jsx)("b",{children:"altamente formativo con grandi chef"})," e maestri della cucina con ricette stellate, pasticceria panificazione e molto altro."]})}),Object(Q.jsx)(D.a,{component:o.b,to:{pathname:"/".concat(n.language,"/").concat(t("corsi"))},color:"primary",children:t("Scopri la sezione")})]})})})]})})})})}),Object(Q.jsx)(x.a,{py:8,children:Object(Q.jsx)(O.a,{maxWidth:!1,sx:{maxWidth:1700},children:Object(Q.jsx)(T.a,{container:!0,justifyContent:"center",children:Object(Q.jsx)(T.a,{item:!0,xs:11,lg:10,children:Object(Q.jsxs)(T.a,{container:!0,sx:{flexDirection:{md:"row-reverse"}},children:[Object(Q.jsx)(T.a,{item:!0,xs:12,md:6,children:Object(Q.jsx)(x.a,{sx:{borderRadius:"10px",overflow:"hidden"},children:Object(Q.jsx)(P.a,{trailer:!0,disableEndLesson:!0,disableAutoplay:!0,fireEvents:!0,video:{course:{},lesson:{progress:0}},poster:i.basics_trailer_img_cover,options:{sources:[{src:i.basics_trailer_url,type:"application/x-mpegURL"}]}})})}),Object(Q.jsx)(T.a,{item:!0,xs:12,md:6,children:Object(Q.jsx)(x.a,{display:"flex",height:"100%",justifyContent:"center",alignItems:"center",children:Object(Q.jsxs)(x.a,{sx:{maxWidth:{md:"70%"},mt:{xs:2,md:0}},children:[Object(Q.jsx)(x.a,{mb:2,children:Object(Q.jsxs)(A.a,{variant:"h3",color:"basics.main",children:[Object(Q.jsx)(I.a,{component:V,viewBox:"0 0 24 24",sx:{color:"#FFDDDD",fontSize:{md:"2rem"}}})," ",Object(Q.jsx)("b",{children:t("La Scuola")})]})}),Object(Q.jsx)(A.a,{variant:"h6",color:"text.primary",sx:{mb:3},children:Object(Q.jsxs)(d.a,{t:t,children:["Pasticceria di Base, Tecniche di taglio e cottura. Migliora le tue abilit\xe0 in cucina ",Object(Q.jsx)("b",{children:"partendo dalle basi"}),"."]})}),Object(Q.jsx)(D.a,{component:o.b,to:{pathname:"/".concat(n.language,"/").concat(t("scuola"))},color:"primary",children:t("Scopri la sezione")})]})})})]})})})})})]})]})},ne=e=>{const{type:t,category:n,loadData:i,handleClickItem:r}=e,[s,o]=a.a.useState([]);return Object(Q.jsx)(O.a,{maxWidth:!1,sx:{maxWidth:1700,my:4},children:Object(Q.jsx)(T.a,{container:!0,justifyContent:"center",children:Object(Q.jsx)(T.a,{item:!0,xs:11,sm:10,children:Object(Q.jsxs)(x.a,{children:[Object(Q.jsx)(x.a,{mb:2,children:Object(Q.jsx)(A.a,{variant:"h5",color:"textPrimary",children:Object(Q.jsx)("b",{children:n.title})})}),Object(Q.jsx)(m.a,{loadContent:async()=>{i(n.id,(e=>{o((()=>e.reduce(((e,n,i)=>("c"!==r&&"c"!==t||(e=Array.isArray(e)?e:[{...e,img:e.img_cover,duration:e.lesson_count,course_duration:e.duration,progress:e.lesson_completed_count,enabled:"coming_soon"!==e.course_status}]).push({...n,img:n.img_cover,duration:n.lesson_count,course_duration:n.duration,progress:n.lesson_completed_count,enabled:"coming_soon"!==n.course_status}),"l"!==r&&"l"!==t||(e=Array.isArray(e)?e:[{...e,img:e.img_cover,subtitle:e.course_title,num:0}]).push({...n,img:n.img_cover,subtitle:n.course_title,num:i}),e)),[])))}))},loadingProps:{cols:n.columns},children:Object(Q.jsx)(h.a,{cols:n.columns,handleClickItem:r||t,payoff:n.payoff,play:"l"===t,type:t,isRanked:"ranked"===n.item_style,data:s})})]})})})})},ie=e=>{const{t:t}=Object(l.a)(),{type:n,widget:i,loadData:r,handleClickItem:s}=e,[o,c]=a.a.useState([]);return Object(Q.jsx)(O.a,{maxWidth:!1,sx:{maxWidth:1700,my:4},children:Object(Q.jsxs)(T.a,{container:!0,justifyContent:"center",children:[Object(Q.jsx)(T.a,{item:!0,xs:11,sm:10,children:Object(Q.jsx)(x.a,{mb:4,children:Object(Q.jsx)(A.a,{variant:"h5",color:"textPrimary",gutterBottom:!0,children:Object(Q.jsx)("b",{children:i.title})})})}),Object(Q.jsx)(T.a,{item:!0,xs:11,sm:10,children:Object(Q.jsx)(m.a,{loadContent:async()=>{r(i.id,(e=>{c((()=>e.reduce(((e,t)=>(e.push({...t,img:t.img_cover,enabled:!1}),e)),[])))}))},loadingProps:{cols:i.columns},children:Object(Q.jsx)(h.a,{data:o})})})]})})},re=e=>{const{t:t,i18n:n}=Object(l.a)(),{widget:i,loadData:r}=e,[s,c]=a.a.useState([]);return Object(Q.jsx)(x.a,{bgcolor:"#26292D",children:Object(Q.jsx)(O.a,{maxWidth:!1,sx:{maxWidth:1700},children:Object(Q.jsxs)(T.a,{container:!0,justifyContent:"center",children:[Object(Q.jsx)(T.a,{item:!0,xs:11,sm:10,children:Object(Q.jsxs)(w.a,{direction:"row",justifyContent:"space-between",alignItems:"center",sx:{my:2},children:[Object(Q.jsx)(x.a,{children:Object(Q.jsx)(A.a,{variant:"h6",color:"textPrimary",gutterBottom:!0,children:Object(Q.jsx)("b",{children:i.title})})}),Object(Q.jsx)(x.a,{children:Object(Q.jsxs)(E.a,{component:o.b,to:"/".concat(n.language,"/user/progress"),variant:"body1",color:"light.main",children:[t("I miei progressi")," >"]})})]})}),Object(Q.jsx)(T.a,{item:!0,xs:11,sm:10,children:Object(Q.jsx)(m.a,{loadContent:async()=>{r(i.id,(e=>{c((()=>e.reduce(((e,t)=>(e.push({...t,package_title:t.package?t.package.title:null,enabled:!0,duration:t.lesson_count,progress:t.lesson_completed_count,course_duration:t.duration}),e)),[])))}))},loadingProps:{cols:3},children:Object(Q.jsx)(h.a,{handleClickItem:"c",type:"c",data:s})})})]})})})},se=e=>{const{t:t}=Object(l.a)(),{loadData:n,widget:i}=e,[r,s]=a.a.useState([]);return Object(Q.jsx)(O.a,{maxWidth:!1,sx:{maxWidth:1700,my:4},children:Object(Q.jsx)(T.a,{container:!0,justifyContent:"center",children:Object(Q.jsxs)(T.a,{item:!0,xs:11,sm:10,children:[Object(Q.jsx)(x.a,{mb:2,children:Object(Q.jsx)(A.a,{variant:"h5",color:"textPrimary",children:Object(Q.jsx)("b",{children:i.title})})}),Object(Q.jsx)(m.a,{loadContent:async()=>{n(i.id,(e=>{s((()=>e.reduce(((e,t)=>(e.push({...t,img:t.img_portrait}),e)),[])))}))},loadingProps:{cols:10,width:190},children:Object(Q.jsx)(h.a,{handleClickItem:"t",type:"t",data:r,isRanked:"ranked"===i.item_style})})]})})})},ae=e=>{const{t:t,i18n:n}=Object(l.a)(),{auth:i}=a.a.useContext(b.a);return Object(Q.jsxs)(O.a,{maxWidth:!1,sx:{maxWidth:1700,my:4},children:[i.isAuthenticated&&i.user&&i.user.data&&i.user.data.renewable_annual_sub&&Object(Q.jsx)(T.a,{container:!0,justifyContent:"center",children:Object(Q.jsx)(T.a,{item:!0,xs:11,sm:10,children:Object(Q.jsx)(Z,{children:Object(Q.jsxs)(T.a,{container:!0,justifyContent:"space-around",spacing:3,children:[Object(Q.jsxs)(T.a,{item:!0,xs:11,md:7,children:[Object(Q.jsx)(A.a,{variant:"h5",color:"textPrimary",children:Object(Q.jsx)("b",{children:t("Non perdere tutti i tuoi progressi!")})}),Object(Q.jsx)(A.a,{variant:"subtitle1",color:"textSecondary",children:Object(Q.jsx)("b",{children:t("Il tuo abbonamento \xe8 scaduto, riattivalo!")})})]}),Object(Q.jsx)(T.a,{item:!0,xs:11,md:4,lg:3,children:Object(Q.jsx)(x.a,{textAlign:"center",children:Object(Q.jsx)(D.a,{color:"primary",component:o.b,to:{pathname:"/".concat(n.language,"/paywall"),search:"from=masterclass"},onClick:e=>{Object(u.e)({event:"cta_click",event_id:"03",event_trigger:"GAevent",event_detail:"buy_masterclass",event_subdetail
2:e.target.innerText})},children:t("Riattiva l'abbonamento")})})})]})})})}),i.isAuthenticated&&i.user&&i.user.data&&(!i.user.data.flag_active_subscription||i.user.data.upgradeable_to_annual_sub)&&!i.user.data.renewable_annual_sub&&Object(Q.jsx)(T.a,{container:!0,justifyContent:"center",children:Object(Q.jsx)(T.a,{item:!0,xs:11,sm:10,children:Object(Q.jsx)(Z,{children:Object(Q.jsxs)(T.a,{container:!0,justifyContent:"space-around",spacing:3,children:[Object(Q.jsxs)(T.a,{item:!0,xs:11,md:7,children:[Object(Q.jsx)(A.a,{variant:"h5",color:"textPrimary",children:Object(Q.jsx)("b",{children:t("Tantissimi corsi ti aspettano")})}),Object(Q.jsx)(A.a,{variant:"subtitle1",color:"textSecondary",children:Object(Q.jsx)("b",{children:t("Approfitta dell'offerta a te riservata e passa all'abbonamento annuale")})})]}),Object(Q.jsx)(T.a,{item:!0,xs:11,md:4,lg:3,children:Object(Q.jsx)(x.a,{textAlign:"center",children:Object(Q.jsx)(D.a,{color:"primary",component:o.b,to:{pathname:"/".concat(n.language,"/paywall"),search:"from=masterclass"},onClick:e=>{Object(u.e)({event:"cta_click",event_id:"03",event_trigger:"GAevent",event_detail:"buy_masterclass",event_subdetail:e.target.innerText})},children:t("Passa all'abbonamento")})})})]})})})})]})},oe=()=>{const e=Object(c.h)(),{i18n:t}=Object(l.a)(),n=Object(v.a)(),i=Object(C.a)(n.breakpoints.down("md"));return Object(Q.jsx)(O.a,{maxWidth:!1,sx:{maxWidth:1700,my:4},children:Object(Q.jsx)(T.a,{container:!0,justifyContent:"center",children:Object(Q.jsx)(T.a,{item:!0,xs:11,sm:10,children:Object(Q.jsxs)(x.a,{sx:{cursor:"pointer"},onClick:()=>e.push("/".concat(t.language,"/giftcard")),children:[!i&&Object(Q.jsxs)(x.a,{children:["it"===t.language.split("-")[0]&&Object(Q.jsx)("img",{alt:"giftcard",src:R.a,style:{width:"100%",borderRadius:"10px"}}),"en"===t.language.split("-")[0]&&Object(Q.jsx)("img",{alt:"giftcard",src:M.a,style:{width:"100%",borderRadius:"10px"}}),"es"===t.language.split("-")[0]&&Object(Q.jsx)("img",{alt:"giftcard",src:B.a,style:{width:"100%",borderRadius:"10px"}})]}),i&&Object(Q.jsxs)(x.a,{children:["it"===t.language.split("-")[0]&&Object(Q.jsx)("img",{alt:"giftcard",src:L.a,style:{width:"100%",borderRadius:"10px"}}),"en"===t.language.split("-")[0]&&Object(Q.jsx)("img",{alt:"giftcard",src:N.a,style:{width:"100%",borderRadius:"10px"}}),"es"===t.language.split("-")[0]&&Object(Q.jsx)("img",{alt:"giftcard",src:U.a,style:{width:"100%",borderRadius:"10px"}})]})]})})})})},ce=e=>{const{paywallRef:t}=e,{t:n}=Object(l.a)(),i=Object(v.a)(),r=Object(C.a)(i.breakpoints.down("md")),{config:s}=a.a.useContext(y.a);return Object(Q.jsx)(x.a,{sx:{background:"url("+p.a+") center center /cover no-repeat"},children:Object(Q.jsx)(x.a,{sx:{background:"rgba(0,0,0,0.80)",boxSizing:"border-box",pt:{xs:7}},children:Object(Q.jsx)(O.a,{maxWidth:!1,sx:{maxWidth:1700},children:Object(Q.jsx)(T.a,{container:!0,justifyContent:"center",alignItems:"center",sx:{minHeight:"100vh"},children:Object(Q.jsx)(T.a,{item:!0,xs:11,children:Object(Q.jsxs)(w.a,{spacing:r?3:6,direction:r?"column-reverse":"row",children:[Object(Q.jsxs)(x.a,{children:[Object(Q.jsx)(A.a,{component:"h1",variant:"h3",color:"text.primary",sx:{mb:3},children:Object(Q.jsx)("b",{children:n("Corsi di cucina online per cucinare a casa tua come uno chef")})}),Object(Q.jsx)(A.a,{component:"h2",variant:"h5",color:"text.primary",sx:{mb:3},children:n("Impara passo passo tecniche e segreti dei grandi chef in un unico abbonamento su Academia TV")}),Object(Q.jsx)(x.a,{children:Object(Q.jsx)(D.a,{fullWidth:r,onClick:()=>window.scrollTo({top:t.current.offsetTop-60,behavior:"smooth"}),variant:"contained",color:"primary",sx:{px:3},children:Object(Q.jsxs)(d.a,{t:n,children:["Inizia ora da ",{c:(s.subscription_price/100/12).toLocaleString("it-IT",{style:"currency",currency:"EUR"})},"/mese"]})})}),Object(Q.jsxs)(A.a,{color:"text.primary",variant:"caption",component:"div",sx:{mt:3,mb:2},children:[Object(Q.jsx)("b",{children:n("Approfitta dell'offerta per i nuovi abbonati -50%")})," (",Object(Q.jsx)("del",{children:n("8,25\u20ac/mese")}),")"]}),Object(Q.jsx)(g.a,{type:"variant"})]}),Object(Q.jsx)(x.a,{children:Object(Q.jsx)(x.a,{sx:{width:{md:"45vw"}},children:Object(Q.jsx)(x.a,{sx:{borderRadius:"10px",overflow:"hidden"},children:Object(Q.jsx)(P.a,{trailer:!0,disableEndLesson:!0,disableAutoplay:!0,fireEvents:!0,video:{course:{},lesson:{progress:0}},poster:s.trailer_img_cover,options:{sources:[{src:s.trailer_url,type:"application/x-mpegURL"}]}})})})})]})})})})})})},le=e=>{const{paywallRef:t}=e,{Offers:n}=Object(f.a)();return Object(Q.jsx)(x.a,{ref:t,sx:{background:"#F5F5F5",mt:3},children:Object(Q.jsx)(T.a,{container:!0,justifyContent:"center",children:Object(Q.jsx)(T.a,{item:!0,xs:12,sx:{pt:6,color:e=>e.palette.darkSecondary.main},children:Object(Q.jsx)(n,{home:!0,from:"masterclass"})})})})}},712:function(e,t,n){"use strict";n.r(t);var i=n(0),r=n.n(i),s=n(79),a=n(195),o=n(35),c=n(20),l=n(56),d=n(5),u=n(27),h=n(709),p=n(28),m=n(212),g=n(257),f=n(244),b=n(236),y=n(37),j=n(645),_=n(720),v=n(719),x=n(705),O=n(111),T=n(657),S=n(716),w=n(352),A=n(191),k=n(217),C=n(215),E=n(225),I=n(256),D=n(1);const P=Object(j.a)(_.a)((e=>{let{theme:t}=e;return{textShadow:"0 3px 6px rgba(0, 0, 0, 0.16)"}})),R={basics:"#26292D",wellness:"#E6E4DC"},L=e=>{const{t:t}=Object(s.a)(),{packageType:n}
2=Object(a.a)(),{type:i,category:o,loadData:c,handleClickItem:l}=e,[d,u]=r.a.useState([]);return Object(D.jsx)(v.a,{maxWidth:!1,sx:{maxWidth:1700,mt:8},children:Object(D.jsxs)(x.a,{container:!0,justifyContent:"center",children:[Object(D.jsx)(x.a,{item:!0,xs:11,sm:10,children:Object(D.jsx)(O.a,{mb:4,children:Object(D.jsx)(_.a,{variant:"h5",color:"text.primary_".concat(n.key),gutterBottom:!0,children:Object(D.jsx)("b",{children:o.title})})})}),Object(D.jsx)(x.a,{item:!0,xs:11,sm:10,children:Object(D.jsx)(f.a,{loadContent:async()=>{c(o.id,(e=>{u((()=>e.reduce(((e,t)=>(e.push({...t,img:t.img_cover,enabled:!1}),e)),[])))}))},loadingProps:{cols:o.columns},children:Object(D.jsx)(g.a,{data:d})})})]})})},M=()=>{const{t:e,i18n:t}=Object(s.a)(),n=Object(l.a)(),{auth:i}=r.a.useContext(c.a),a=Object(d.i)(),o=Object(T.a)(n.breakpoints.down("md"));return Object(D.jsx)(O.a,{sx:{alignSelf:"center",flex:1},children:Object(D.jsx)(x.a,{container:!0,justifyContent:"center",alignItems:"center",children:Object(D.jsxs)(x.a,{item:!0,xs:11,md:9,lg:7,xl:5,children:[Object(D.jsxs)(P,{component:"h1",align:"center",variant:"h3",gutterBottom:!0,color:"#D0E6B5",children:[Object(D.jsx)(S.a,{component:k.a,sx:{color:"#E4EBDB",fontSize:"2rem"}})," ",Object(D.jsx)("b",{children:e("Benessere")})]}),Object(D.jsx)(P,{component:"h2",align:"center",variant:"h5",color:"text.primary",children:Object(D.jsx)(h.a,{t:e,children:"Il tuo percorso nell'educazione alimentare"})}),(!i.isAuthenticated||i.isAuthenticated&&i.user&&i.user.data&&!i.user.data.flag_active_wellness_subscription)&&Object(D.jsxs)(O.a,{sx:{textAlign:"center",mt:5},children:[Object(D.jsx)(A.a,{fullWidth:o,component:u.b,to:{pathname:"/".concat(t.language,"/paywall"),search:"from=wellness",state:{from:a.pathname}},onClick:e=>{Object(p.e)({event:"cta_click",event_id:"03",event_trigger:"GAevent",event_detail:"buy_wellness",event_subdetail:e.target.innerText})},variant:"contained",color:"primary",sx:{px:3,mr:{md:1},mb:{xs:1,md:0}},children:e("Attiva l'abbonamento")}),Object(D.jsx)(A.a,{fullWidth:o,component:u.b,to:{pathname:"/".concat(t.language,"/giftcard/").concat(e("scegli")),search:"from=wellness"},variant:"contained",color:"secondary",sx:{px:3},startIcon:Object(D.jsx)(S.a,{viewBox:"0 0 29.044 29.043",component:C.a,sx:{color:"inherit"}}),children:e("Regala i corsi")})]})]})})})},N=()=>{const{t:e,i18n:t}=Object(s.a)(),n=Object(l.a)(),{auth:i}=r.a.useContext(c.a),a=Object(d.i)(),o=Object(T.a)(n.breakpoints.down("md"));return Object(D.jsx)(O.a,{sx:{alignSelf:"center",flex:1},children:Object(D.jsx)(x.a,{container:!0,justifyContent:"center",alignItems:"center",children:Object(D.jsxs)(x.a,{item:!0,xs:11,md:9,lg:7,xl:5,children:[Object(D.jsxs)(P,{component:"h1",align:"center",variant:"h3",gutterBottom:!0,color:"#FF7F00",children:[Object(D.jsx)(S.a,{viewBox:"0 0 24 30",component:E.a,sx:{color:"#FFDFBF",fontSize:"2rem"}})," ",Object(D.jsx)("b",{children:e("La Scuola")})]}),Object(D.jsx)(P,{component:"h2",align:"center",variant:"h5",color:"text.primary",children:Object(D.jsx)(h.a,{t:e,children:"Il tuo percorso dalle basi della cucina"})}),(!i.isAuthenticated||i.isAuthenticated&&i.user&&i.user.data&&!i.user.data.flag_active_subscription)&&Object(D.jsxs)(O.a,{sx:{textAlign:"center",mt:5},children:[Object(D.jsx)(A.a,{fullWidth:o,component:u.b,to:{pathname:"/".concat(t.language,"/paywall"),search:"from=masterclass",state:{from:a.pathname}},onClick:e=>{Object(p.e)({event:"cta_click",event_id:"03",event_trigger:"GAevent",event_detail:"buy_masterclass",event_subdetail:e.target.innerText})},variant:"contained",color:"primary",sx:{px:3,mr:{md:1},mb:{xs:1,md:0}},children:e("Attiva l'abbonamento")}),Object(D.jsx)(A.a,{fullWidth:o,component:u.b,to:{pathname:"/".concat(t.language,"/giftcard/").concat(e("scegli")),search:"from=masterclass"},variant:"contained",color:"secondary",sx:{px:3},startIcon:Object(D.jsx)(S.a,{viewBox:"0 0 29.044 29.043",component:C.a,sx:{color:"inherit"}}),children:e("Regala i corsi")})]})]})})})},B=()=>{const{packageType:e}=Object(a.a)(),{config:t}=r.a.useContext(y.a),n=Object(l.a)(),i=Object(T.a)(n.breakpoints.down("md")),{imageSet:s,ref:o}=Object(b.a)({img:i?t["".concat(e.key,"_cover_url_portrait")]:t["".concat(e.key,"_cover_url_landscape")]});return Object(D.jsx)(x.a,{container:!0,children:Object(D.jsx)(x.a,{item:!0,xs:!0,children:Object(D.jsxs)(O.a,{ref:o,sx:{boxSizing:"border-box",height:{xs:"60vh",md:"100vh"},backgroundImage:s,backgroundPosition:"center center",backgroundSize:"cover",backgroundRepeat:"no-repeat",display:"flex",alignItems:"flex-end"},children:["basics"===e.key&&Object(D.jsx)(N,{}),"wellness"===e.key&&Object(D.jsx)(M,{})]})})})},U=()=>{const{auth:e}=r.a.useContext(c.a),{t:t,i18n:n}=Object(s.a)(),i=Object(d.i)();return Object(D.jsxs)(D.Fragment,{children:[Object(D.jsx)(_.a,{variant:"h4",color:"wellness.contrastText",gutterBottom:!0,children:Object(D.jsx)("b",{children:Object(D.jsx)(h.a,{t:t,children:"Il cibo pu\xf2 migliorare la tua vita e quella di chi ami."})})}),Object(D.jsx)(_.a,{variant:"h6",color:"text.primary_wellness",sx:{mb:4},children:Object(D.jsx)(h.a,{t:t,children:"L'Accademia del Benessere offre un percorso di consapevolezza alimentare, grazie a consigli di dietologi, dietisti, biologi e chef"})}),(!e.isAuthenticated||e.isAuthenticated&&e.user&&e.user.data&&!e.user.data.flag_active_wellness_subscription)&&Object(D.jsx)(O.a,{sx:{textAlign:{xs:"center",md:"left"}},children:Object(D.jsx)(A.a,{color:"primary",variant:"contained",component:u.b,to:{pathname:"/".concat(n.language,"/scopri/benessere"),state:{from:i.pathname}},children:t("Dimmi di pi\xf9")})})]})},F=()=>{const{auth:e}=r.a.useContext(c.a),{t:t,i18n:n}=Object(s.a)(),i=Object(d.i)();return Object(D.jsxs)(D.Fragment,{children:[Object(D.jsx)(_.a,{variant:"h3",color:"textPrimary",gutterBottom:!0,children:Object(D.jsx)("b",{children:Object(D.jsxs)(h.a,{t:t,children:["Da zero a chef:",Object(D.jsx)("br",{})," la cucina dalle basi"]})})}),Object(D.jsx)(_.a,{variant:"h6",color:"textPrimary",sx:{mb:4},children:t("Creme, meringhe o julienne non saranno pi\xf9 un mistero. Migliora la tua cucina partendo dalle basi.")}),(!e.isAuthenticated||e.isAuthenticated&&e.user&&e.user.data&&!e.user.data.flag_active_subscription)&&Object(D.jsx)(O.a,{sx:{textAlign:{xs:"center",md:"left"}},children:Object(D.jsx)(A.a,{color:"primary",variant:"contained",component:u.b,to:{pathname:"/".concat(n.language,"/paywall"),search:"from=masterclass",state:{from:i.pathname}},onClick:e=>{Object(p.e)({event:"cta_click",event_id:"03",event_trigger:"GAevent",event_detail:"buy_masterclass",event_subdetail
2:e.target.innerText})},children:t("Attiva l'abbonamento")})})]})},z=e=>{const{data:t}=e,{packageType:n}=Object(a.a)(),{config:i}=r.a.useContext(y.a);return Boolean(n)&&Object(D.jsx)(O.a,{bgcolor:R[n.key],children:Object(D.jsx)(v.a,{maxWidth:!1,sx:{maxWidth:1700},children:Object(D.jsx)(x.a,{container:!0,justifyContent:"center",children:Object(D.jsx)(x.a,{item:!0,xs:11,md:10,sx:{py:6},children:Object(D.jsxs)(x.a,{container:!0,children:[Object(D.jsx)(x.a,{item:!0,xs:12,md:6,children:Object(D.jsx)(O.a,{sx:{borderRadius:"10px",overflow:"hidden"},children:Object(D.jsx)(I.a,{trailer:!0,disableEndLesson:!0,disableAutoplay:!0,fireEvents:!0,video:{course:{id:i["".concat(n.key,"_free_lesson_course_id")],lesson:{id:i["".concat(n.key,"_free_lesson_id")]}},lesson:{progress:0}},poster:i["".concat(n.key,"_trailer_img_cover")],options:{sources:[{src:i["".concat(n.key,"_trailer_url")],type:"application/x-mpegURL"}]}})})}),Object(D.jsx)(x.a,{item:!0,xs:12,md:6,sx:{display:"flex",flexDirection:"column",justifyContent:"center"},children:Object(D.jsxs)(O.a,{sx:{pt:{xs:4,md:0},pl:{xs:0,md:4}},children:["basics"===n.key&&Object(D.jsx)(F,{}),"wellness"===n.key&&Object(D.jsx)(U,{})]})})]})})})})})},q=e=>{const{t:t}=Object(s.a)(),{widget:n,loadData:i}=e,[o,c]=r.a.useState([]),{packageType:l}=Object(a.a)();return Boolean(l)&&Object(D.jsx)(O.a,{bgcolor:R[l.key],mb:6,pb:2,children:Object(D.jsx)(v.a,{maxWidth:!1,sx:{maxWidth:1700},children:Object(D.jsxs)(x.a,{container:!0,justifyContent:"center",children:[Object(D.jsx)(x.a,{item:!0,xs:11,sm:10,children:Object(D.jsx)(O.a,{my:2,children:Object(D.jsx)(_.a,{variant:"h5",color:"text.primary_".concat(l.key),children:Object(D.jsx)("b",{children:n.title})})})}),Object(D.jsx)(x.a,{item:!0,xs:11,sm:10,children:Object(D.jsx)(f.a,{loadContent:async()=>{i(n.id,(e=>{c((()=>e.reduce(((e,t)=>(e.push({...t,package_title:t.package?t.package.title:null,enabled:!0,duration:t.lesson_count,progress:t.lesson_completed_count,course_duration:t.duration}),e)),[])))}))},loadingProps:{..."wellness"===l.key&&{sx:{backgroundColor:"rgba(0, 0, 0, 0.11)"}},cols:n.columns},children:Object(D.jsx)(g.a,{cols:n.columns,handleClickItem:"c",type:"c",data:o})})})]})})})},H=e=>{const{t:t}=Object(s.a)(),{packageType:n}=Object(a.a)(),{widget:i,loadData:o}=e,[c,l]=r.a.useState([]);return Boolean(n)&&Object(D.jsx)(v.a,{maxWidth:!1,sx:{maxWidth:1700,my:4},children:Object(D.jsx)(x.a,{container:!0,justifyContent:"center",children:Object(D.jsxs)(x.a,{item:!0,xs:11,sm:10,children:[Object(D.jsx)(O.a,{mb:2,children:Object(D.jsx)(_.a,{variant:"h5",color:"text.primary_".concat(n.key),children:Object(D.jsx)("b",{children:i.title})})}),Object(D.jsx)(f.a,{loadContent:async()=>{o(i.id,(e=>{l((()=>e.reduce(((e,t)=>(e.push({...t,img:t.img_cover,type:"l"}),e)),[])))}))},loadingProps:{..."wellness"===n.key&&{sx:{backgroundColor:"rgba(0, 0, 0, 0.11)"}},cols:i.columns||3},children:Object(D.jsx)(g.a,{cols:i.columns||3,payoff:i.payoff,play:!0,handleClickItem:"l",data:c})})]})})})},V=e=>{const{t:t}=Object(s.a)(),{packageType:n}=Object(a.a)(),{widget:i,loadData:o}=e,[c,l]=r.a.useState([]);return Boolean(n)&&Object(D.jsx)(v.a,{maxWidth:!1,sx:{maxWidth:1700},children:Object(D.jsx)(x.a,{container:!0,justifyContent:"center",children:Object(D.jsxs)(x.a,{item:!0,xs:11,sm:10,children:[Object(D.jsx)(O.a,{mt:4,children:Object(D.jsx)(_.a,{variant:"h5",color:"text.primary_".concat(n.key),children:Object(D.jsx)("b",{children:i.title})})}),Object(D.jsx)(f.a,{loadContent:async()=>{o(i.id,(e=>{l((()=>e.reduce(((e,t)=>(e.push({...t,title:!1,img:t.img_enriched_cover}),e)),[])))}))},width:"33.3%",sliderProps:{dontScroll:!0},loadingProps:{..."wellness"===n.key&&{sx:{backgroundColor:"rgba(0, 0, 0, 0.11)"}},cols:9},children:Object(D.jsx)(g.a,{dontScroll:!0,packages:!0,type:"pc",handleClickItem:"pc",data:c})})]})})})},W=e=>{const{t:t}=Object(s.a)(),{packageType:n}=Object(a.a)(),{widget:i,loadData:o}=e,[c,l]=r.a.useState([]);return Boolean(n)&&Object(D.jsx)(v.a,{maxWidth:!1,sx:{maxWidth:1700},children:Object(D.jsx)(x.a,{container:!0,justifyContent:"center",children:Object(D.jsxs)(x.a,{item:!0,xs:11,sm:10,children:[Object(D.jsx)(O.a,{mt:4,children:Object(D.jsx)(_.a,{variant:"h5",color:"text.primary_".concat(n.key),children:Object(D.jsx)("b",{children:i.title})})}),Object(D.jsx)(f.a,{loadContent:async()=>{o(i.id,(e=>{l((()=>e.reduce(((e,t)=>(e.push({...t,package_title:t.package.title,img_cover:t.img_cover,enabled:"coming_soon"!==t.course_status}),e)),[])))}))},loadingProps:{..."wellness"===n.key&&{sx:{backgroundColor:"rgba(0, 0, 0, 0.11)"}},cols:i.columns||3},children:Object(D.jsx)(g.a,{packages:!0,type:"pm",handleClickItem:"pm",data:c})})]})})})},G=e=>{const{t:t,i18n:n}=Object(s.a)(),{packageType:i}=Object(a.a)();return Boolean(i)&&"basics"===i.key&&Object(D.jsx)(v.a,{maxWidth:!1,sx:{maxWidth:1700,my:4},children:Object(D.jsx)(x.a,{container:!0,justifyContent:"center",children:Object(D.jsxs)(x.a,{item:!0,xs:11,sm:10,children:[Object(D.jsx)(_.a,{align:"center",color:"text.primary_".concat(i.key),children:Object(D.jsx)("b",{children:t("Sei pronto per la preparazione di una ricetta?")})}),Object(D.jsx)(_.a,{align:"center",color:"text.secondary_".concat(i.key),children:t("Metti alla prova quello che hai imparato con i corsi di A
2cad\xe8mia:")}),Object(D.jsx)(O.a,{textAlign:"center",mt:2,children:Object(D.jsx)(A.a,{color:"primary",variant:"contained",component:u.b,to:"/".concat(n.language,"/").concat(t("corsi")),children:t("Tutti i corsi")})})]})})})},X=e=>{const{t:t}=Object(s.a)(),{packageType:n}=Object(a.a)(),{widget:i,loadData:o}=e,[c,l]=r.a.useState([]);return Boolean(n)&&Object(D.jsx)(v.a,{maxWidth:!1,sx:{maxWidth:1700},children:Object(D.jsx)(x.a,{container:!0,justifyContent:"center",children:Object(D.jsxs)(x.a,{item:!0,xs:11,sm:10,children:[Object(D.jsx)(O.a,{mt:4,children:Object(D.jsx)(_.a,{variant:"h5",color:"text.primary_".concat(n.key),children:Object(D.jsxs)("b",{children:[t("Nuovi corsi"),":"]})})}),Object(D.jsx)(f.a,{loadContent:async()=>{o(i.id,(e=>{l((()=>e.reduce(((e,t)=>(e.push({...t,img:t.img_cover}),e)),[])))}))},loadingProps:{..."wellness"===n.key&&{sx:{backgroundColor:"rgba(0, 0, 0, 0.11)"}},cols:i.columns||2},children:Object(D.jsx)(g.a,{cols:i.columns||2,payoff:i.payoff,handleClickItem:"c",data:c})})]})})})},Y=e=>{const{faq:t}=e,{t:n,i18n:i}=Object(s.a)();return t&&Object(D.jsx)(v.a,{maxWidth:!1,sx:{maxWidth:1700,my:4},children:Object(D.jsx)(x.a,{container:!0,justifyContent:"center",children:Object(D.jsx)(x.a,{item:!0,xs:11,sm:10,children:Object(D.jsx)(f.a,{children:Object(D.jsx)(w.a,{title:t.title,data:t.faq,itemColumn:6})})})})})};var K=n(417);t.default=()=>{const{t:e}=Object(s.a)(),{packageType:t}=Object(a.a)(),{auth:n}=r.a.useContext(c.a),{request:i,cancelToken:l}=r.a.useContext(o.a),[d,u]=r.a.useState(null),h=async(e,n)=>{const r=l.source(),s=await i("get","/v2/pages/home_".concat(t.key,"/widgets/").concat(e),r.token);s&&n(s.items)};return r.a.useEffect((()=>{t&&(async()=>{const e=l.source(),n=await i("get","/v2/pages/home_"+t.key,e.token);n&&u(n)})()}),[n,t]),Object(D.jsx)(m.a,{title:e("Corsi di cucina online"),bg:Boolean(t)&&t.layoutColor,disableMaxWidth:!0,loading:!Boolean(d),bannerType:Boolean(t)&&t.key,children:!!d&&d.widgets&&Object(D.jsx)(D.Fragment,{children:d.widgets.items.map(((e,t)=>{switch(e.type){case"section_header":return Object(D.jsx)(B,{},e.id+t);case"section_tutorial":return Object(D.jsx)(z,{},e.id+t);case"courses_recent":return Object(D.jsx)(q,{widget:e,loadData:h},e.id+t);case"paywall":return Object(D.jsx)(K.h,{},e.id+t);case"lessons_list":return Object(D.jsx)(H,{widget:e,loadData:h},e.id+t);case"courses_latest":return Object(D.jsx)(X,{widget:e,loadData:h},e.id+t);case"courses_list":return Object(D.jsx)(W,{widget:e,loadData:h},e.id+t);case"packages_list":return Object(D.jsx)(V,{widget:e,loadData:h},e.id+t);case"courses_coming_soon":return Object(D.jsx)(L,{category:e,loadData:h},e.id+t);case"box_cta_courses":return Object(D.jsx)(G,{});case"faq":return Object(D.jsx)(Y,{faq:{title:e.title,faq:e.items}},e.id+t);default:return null}}))})})}}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.