axotube 1.44.0 → 1.45.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/service-core.js +1 -1
- package/dist/service-core.json +2 -2
- package/dist/userScript.js +1 -1
- package/package.json +1 -1
package/dist/userScript.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
!function(){"use strict";function e(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var t;t||(t=1,function(){if("undefined"==typeof globalThis)try{Object.defineProperty(Object.prototype,"__globalThis__",{get:function(){return this},configurable:!0}),__globalThis__.globalThis=__globalThis__,delete Object.prototype.__globalThis__}catch(e){"undefined"!=typeof window?window.globalThis=window:"undefined"!=typeof self&&(self.globalThis=self)}}(),window.NodeList&&!NodeList.prototype.forEach&&(NodeList.prototype.forEach=Array.prototype.forEach),window.HTMLCollection&&!HTMLCollection.prototype.forEach&&(HTMLCollection.prototype.forEach=Array.prototype.forEach),function(){var e=window.EventTarget;if(void 0!==e)try{return void new e}catch(e){}window.EventTarget=function(){var e={};return{addEventListener:function(t,n){"function"==typeof n&&(e[t]||(e[t]=[]),-1===e[t].indexOf(n)&&e[t].push(n))},removeEventListener:function(t,n){var i=e[t];if(i){var r=i.indexOf(n);-1!==r&&i.splice(r,1)}},dispatchEvent:function(t){var n=e[t&&t.type];if(n)for(var i=n.slice(),r=0;r<i.length;r++)try{i[r].call(this,t)}catch(e){console.error(e)}return!(t&&t.defaultPrevented)}}},e&&(window.EventTarget.prototype=e.prototype)}(),function(){function e(){this.aborted=!1,this._cbs=[]}function t(){this.signal=new e}"undefined"==typeof AbortController&&(e.prototype.addEventListener=function(e,t){"abort"===e&&"function"==typeof t&&this._cbs.push(t)},e.prototype.removeEventListener=function(e,t){if("abort"===e){var n=this._cbs.indexOf(t);-1!==n&&this._cbs.splice(n,1)}},e.prototype.dispatchEvent=function(e){if(e&&"abort"===e.type)for(var t=this._cbs.slice(),n=0;n<t.length;n++)t[n](e)},t.prototype.abort=function(){this.signal.aborted||(this.signal.aborted=!0,this.signal.dispatchEvent({type:"abort",bubbles:!1,cancelable:!1}))},window.AbortSignal=e,window.AbortController=t)}(),function(){function e(e,t){var n,i=!!(t=t||{}).bubbles,r=!!t.cancelable,a=void 0!==t.detail?t.detail:null;try{(n=document.createEvent("CustomEvent")).initCustomEvent(e,i,r,a)}catch(t){(n=document.createEvent("Event")).initEvent(e,i,r),n.detail=a}return n}"function"!=typeof CustomEvent&&(window.Event&&window.Event.prototype&&(e.prototype=window.Event.prototype),window.CustomEvent=e)}(),"undefined"!=typeof Promise&&"function"!=typeof Promise.prototype.finally&&(Promise.prototype.finally=function(e){var t=this.constructor||Promise;return this.then(function(n){return t.resolve(e()).then(function(){return n})},function(n){return t.resolve(e()).then(function(){throw n})})}),"undefined"!=typeof Promise&&"function"!=typeof Promise.allSettled&&(Promise.allSettled=function(e){return Promise.all(Array.prototype.map.call(e,function(e){return Promise.resolve(e).then(function(e){return{status:"fulfilled",value:e}},function(e){return{status:"rejected",reason:e}})}))}),function(){function e(t,n,i){for(var r=0;r<t.length;r++)n>0&&Array.isArray(t[r])?e(t[r],n-1,i):i.push(t[r]);return i}"function"!=typeof Array.prototype.flat&&(Array.prototype.flat=function(t){return e(this,(t=void 0===t?1:Math.floor(t))<0?0:t,[])})}(),"function"!=typeof Array.prototype.flatMap&&(Array.prototype.flatMap=function(e,t){return Array.prototype.map.call(this,e,t).flat(1)}),"function"!=typeof String.prototype.replaceAll&&(String.prototype.replaceAll=function(e,t){return"string"!=typeof e?this.replace(e,t):this.split(e).join("function"==typeof t?t(e,0,String(this)):String(t))}),"function"==typeof Object.values&&"function"==typeof Object.entries||(Object.values=Object.values||function(e){for(var t=Object.keys(e),n=[],i=0;i<t.length;i++)n.push(e[t[i]]);return n},Object.entries=Object.entries||function(e){for(var t=Object.keys(e),n=[],i=0;i<t.length;i++)n.push([t[i],e[t[i]]]);return n}),"function"!=typeof Object.fromEntries&&(Object.fromEntries=function(e){var t=Object.create(null);if("function"==typeof e.forEach)e.forEach(function(e){t[e[0]]=e[1]});else for(var n=Array.isArray(e)?e:Array.prototype.slice.call(e),i=0;i<n.length;i++)t[n[i][0]]=n[i][1];return t}),"function"!=typeof queueMicrotask&&(window.queueMicrotask=function(e){Promise.resolve().then(e).catch(function(e){setTimeout(function(){throw e},0)})}),window.Element&&"function"!=typeof Element.prototype.closest&&(Element.prototype.closest=function(e){for(var t=this;t&&1===t.nodeType;){if(t.matches?t.matches(e):t.msMatchesSelector?t.msMatchesSelector(e):t.webkitMatchesSelector&&t.webkitMatchesSelector(e))return t;t=t.parentElement||t.parentNode}return null}),function(){if(window.Element){var e=Element.prototype;"function"!=typeof e.matches&&(e.matches=e.msMatchesSelector||e.webkitMatchesSelector||function(e){for(var t=(this.document||this.ownerDocument).querySelectorAll(e),n=t.length;--n>=0&&t.item(n)!==this;);return n>-1})}}(),function(){if("undefined"!=typeof Intl&&"function"!=typeof Intl.Locale){var e={US:"en",GB:"en",AU:"en",CA:"en",IN:"hi",IE:"en",NZ:"en",FR:"fr",DE:"de",ES:"es",IT:"it",PT:"pt",BR:"pt",MX:"es",AR:"es",CO:"es",CL:"es",RU:"ru",UA:"uk",PL:"pl",NL:"nl",BE:"nl",SE:"sv",NO:"no",DK:"da",FI:"fi",TR:"tr",GR:"el",CZ:"cs",SK:"sk",HU:"hu",RO:"ro",BG:"bg",HR:"hr",RS:"sr",JP:"ja",KR:"ko",VN:"vi",TH:"th",ID:"id",MY:"ms",PH:"tl",SA:"ar",AE:"ar",EG:"ar",IL:"he",IR:"fa",PK:"ur",BD:"bn",LK:"si"};t.prototype.maximize=function(){return this},Intl.Locale=t}function t(t,n){n=n||{},this.language=e[n.region]||"en"}}());var n;function i(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=Array(t);n<t;n++)i[n]=e[n];return i}function r(e){if(Array.isArray(e))return e}function a(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}function o(e,t,n){return t=g(t),k(e,y()?Reflect.construct(t,n||[],g(e).constructor):t.apply(e,n))}function s(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function u(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function l(e,t){return e.get(a(e,t))}function c(e,t,n){s(e,t),t.set(e,n)}function h(e,t,n){return e.set(a(e,t),n),n}function d(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,C(i.key),i)}}function p(e,t,n){return t&&d(e.prototype,t),n&&d(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function f(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=P(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var i=0,r=function(){};return{s:r,n:function(){return i>=e.length?{done:!0}:{done:!1,value:e[i++]}},e:function(e){throw e},f:r}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,o=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return o=e.done,e},e:function(e){s=!0,a=e},f:function(){try{o||null==n.return||n.return()}finally{if(s)throw a}}}}function m(e,t,n){return(t=C(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function g(e){return g=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},g(e)}function v(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&w(e,t)}function y(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(y=function(){return!!e})()}function b(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function x(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function S(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,i)}return n}function E(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?S(Object(n),!0).forEach(function(t){m(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):S(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function k(e,t){if(t&&("object"==typeof t||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function w(e,t){return w=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},w(e,t)}function D(e,t){return r(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var i,r,a,o,s=[],u=!0,l=!1;try{if(a=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;u=!1}else for(;!(u=(i=a.call(n)).done)&&(s.push(i.value),s.length!==t);u=!0);}catch(e){l=!0,r=e}finally{try{if(!u&&null!=n.return&&(o=n.return(),Object(o)!==o))return}finally{if(l)throw r}}return s}}(e,t)||P(e,t)||x()}function A(e){return function(e){if(Array.isArray(e))return i(e)}(e)||b(e)||P(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function C(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var i=n.call(e,t||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}function T(e){return T="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},T(e)}function P(e,t){if(e){if("string"==typeof e)return i(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?i(e,t):void 0}}n||(n=1,function(){var e=!1;try{var t=0,n=[];e="xbx"!=="aba".replaceAll("a",function(e,i){return t+=1,n.push(i),"x"})||2!==t||0!==n[0]||2!==n[1]}catch(t){e=!0}e&&(String.prototype.replaceAll=function(e,t){var n=String(this);if(e instanceof RegExp){if(!e.global)throw new TypeError("replaceAll requires a global RegExp");return n.replace(e,t)}var i=new RegExp(String(e).replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),"g");return n.replace(i,t)})}(),function(){var e=!1;try{var t=Object.fromEntries([["a",1]]);e=Object.getPrototypeOf(t)!==Object.prototype}catch(t){e=!0}e&&(Object.fromEntries=function(e){var t={};function n(e){if(e)try{Object.defineProperty(t,e[0],{value:e[1],enumerable:!0,configurable:!0,writable:!0})}catch(n){t[e[0]]=e[1]}}if(e&&"function"==typeof e.forEach)e.forEach(n);else for(var i=Array.isArray(e)?e:Array.prototype.slice.call(e||[]),r=0;r<i.length;r++)n(i[r]);return t})}());var F="undefined"!=typeof globalThis&&globalThis||"undefined"!=typeof self&&self||"undefined"!=typeof global&&global||{},B="URLSearchParams"in F,I="Symbol"in F&&"iterator"in Symbol,L="FileReader"in F&&"Blob"in F&&function(){try{return new Blob,!0}catch(e){return!1}}(),O="FormData"in F,R="ArrayBuffer"in F;if(R)var N=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],M=ArrayBuffer.isView||function(e){return e&&N.indexOf(Object.prototype.toString.call(e))>-1};function _(e){if("string"!=typeof e&&(e=String(e)),/[^a-z0-9\-#$%&'*+.^_`|~!]/i.test(e)||""===e)throw new TypeError('Invalid character in header field name: "'+e+'"');return e.toLowerCase()}function U(e){return"string"!=typeof e&&(e=String(e)),e}function j(e){var t={next:function(){var t=e.shift();return{done:void 0===t,value:t}}};return I&&(t[Symbol.iterator]=function(){return t}),t}function H(e){this.map={},e instanceof H?e.forEach(function(e,t){this.append(t,e)},this):Array.isArray(e)?e.forEach(function(e){if(2!=e.length)throw new TypeError("Headers constructor: expected name/value pair to be length 2, found"+e.length);this.append(e[0],e[1])},this):e&&Object.getOwnPropertyNames(e).forEach(function(t){this.append(t,e[t])},this)}function z(e){if(!e._noBody)return e.bodyUsed?Promise.reject(new TypeError("Already read")):void(e.bodyUsed=!0)}function V(e){return new Promise(function(t,n){e.onload=function(){t(e.result)},e.onerror=function(){n(e.error)}})}function K(e){var t=new FileReader,n=V(t);return t.readAsArrayBuffer(e),n}function G(e){if(e.slice)return e.slice(0);var t=new Uint8Array(e.byteLength);return t.set(new Uint8Array(e)),t.buffer}function W(){return this.bodyUsed=!1,this._initBody=function(e){var t;this.bodyUsed=this.bodyUsed,this._bodyInit=e,e?"string"==typeof e?this._bodyText=e:L&&Blob.prototype.isPrototypeOf(e)?this._bodyBlob=e:O&&FormData.prototype.isPrototypeOf(e)?this._bodyFormData=e:B&&URLSearchParams.prototype.isPrototypeOf(e)?this._bodyText=e.toString():R&&L&&((t=e)&&DataView.prototype.isPrototypeOf(t))?(this._bodyArrayBuffer=G(e.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):R&&(ArrayBuffer.prototype.isPrototypeOf(e)||M(e))?this._bodyArrayBuffer=G(e):this._bodyText=e=Object.prototype.toString.call(e):(this._noBody=!0,this._bodyText=""),this.headers.get("content-type")||("string"==typeof e?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):B&&URLSearchParams.prototype.isPrototypeOf(e)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},L&&(this.blob=function(){var e=z(this);if(e)return e;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))}),this.arrayBuffer=function(){if(this._bodyArrayBuffer){var e=z(this);return e||(ArrayBuffer.isView(this._bodyArrayBuffer)?Promise.resolve(this._bodyArrayBuffer.buffer.slice(this._bodyArrayBuffer.byteOffset,this._bodyArrayBuffer.byteOffset+this._bodyArrayBuffer.byteLength)):Promise.resolve(this._bodyArrayBuffer))}if(L)return this.blob().then(K);throw new Error("could not read as ArrayBuffer")},this.text=function(){var e,t,n,i,r,a=z(this);if(a)return a;if(this._bodyBlob)return e=this._bodyBlob,t=new FileReader,n=V(t),i=/charset=([A-Za-z0-9_-]+)/.exec(e.type),r=i?i[1]:"utf-8",t.readAsText(e,r),n;if(this._bodyArrayBuffer)return Promise.resolve(function(e){for(var t=new Uint8Array(e),n=new Array(t.length),i=0;i<t.length;i++)n[i]=String.fromCharCode(t[i]);return n.join("")}(this._bodyArrayBuffer));if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)},O&&(this.formData=function(){return this.text().then(q)}),this.json=function(){return this.text().then(JSON.parse)},this}H.prototype.append=function(e,t){e=_(e),t=U(t);var n=this.map[e];this.map[e]=n?n+", "+t:t},H.prototype.delete=function(e){delete this.map[_(e)]},H.prototype.get=function(e){return e=_(e),this.has(e)?this.map[e]:null},H.prototype.has=function(e){return this.map.hasOwnProperty(_(e))},H.prototype.set=function(e,t){this.map[_(e)]=U(t)},H.prototype.forEach=function(e,t){for(var n in this.map)this.map.hasOwnProperty(n)&&e.call(t,this.map[n],n,this)},H.prototype.keys=function(){var e=[];return this.forEach(function(t,n){e.push(n)}),j(e)},H.prototype.values=function(){var e=[];return this.forEach(function(t){e.push(t)}),j(e)},H.prototype.entries=function(){var e=[];return this.forEach(function(t,n){e.push([n,t])}),j(e)},I&&(H.prototype[Symbol.iterator]=H.prototype.entries);var J=["CONNECT","DELETE","GET","HEAD","OPTIONS","PATCH","POST","PUT","TRACE"];function X(e,t){if(!(this instanceof X))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');var n,i,r=(t=t||{}).body;if(e instanceof X){if(e.bodyUsed)throw new TypeError("Already read");this.url=e.url,this.credentials=e.credentials,t.headers||(this.headers=new H(e.headers)),this.method=e.method,this.mode=e.mode,this.signal=e.signal,r||null==e._bodyInit||(r=e._bodyInit,e.bodyUsed=!0)}else this.url=String(e);if(this.credentials=t.credentials||this.credentials||"same-origin",!t.headers&&this.headers||(this.headers=new H(t.headers)),this.method=(n=t.method||this.method||"GET",i=n.toUpperCase(),J.indexOf(i)>-1?i:n),this.mode=t.mode||this.mode||null,this.signal=t.signal||this.signal||function(){if("AbortController"in F)return(new AbortController).signal}(),this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&r)throw new TypeError("Body not allowed for GET or HEAD requests");if(this._initBody(r),!("GET"!==this.method&&"HEAD"!==this.method||"no-store"!==t.cache&&"no-cache"!==t.cache)){var a=/([?&])_=[^&]*/;if(a.test(this.url))this.url=this.url.replace(a,"$1_="+(new Date).getTime());else{this.url+=(/\?/.test(this.url)?"&":"?")+"_="+(new Date).getTime()}}}function q(e){var t=new FormData;return e.trim().split("&").forEach(function(e){if(e){var n=e.split("="),i=n.shift().replace(/\+/g," "),r=n.join("=").replace(/\+/g," ");t.append(decodeURIComponent(i),decodeURIComponent(r))}}),t}function Y(e,t){if(!(this instanceof Y))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');if(t||(t={}),this.type="default",this.status=void 0===t.status?200:t.status,this.status<200||this.status>599)throw new RangeError("Failed to construct 'Response': The status provided (0) is outside the range [200, 599].");this.ok=this.status>=200&&this.status<300,this.statusText=void 0===t.statusText?"":""+t.statusText,this.headers=new H(t.headers),this.url=t.url||"",this._initBody(e)}X.prototype.clone=function(){return new X(this,{body:this._bodyInit})},W.call(X.prototype),W.call(Y.prototype),Y.prototype.clone=function(){return new Y(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new H(this.headers),url:this.url})},Y.error=function(){var e=new Y(null,{status:200,statusText:""});return e.ok=!1,e.status=0,e.type="error",e};var Q=[301,302,303,307,308];Y.redirect=function(e,t){if(-1===Q.indexOf(t))throw new RangeError("Invalid status code");return new Y(null,{status:t,headers:{location:e}})};var Z=F.DOMException;try{new Z}catch(e){(Z=function(e,t){this.message=e,this.name=t;var n=Error(e);this.stack=n.stack}).prototype=Object.create(Error.prototype),Z.prototype.constructor=Z}function $(e,t){return new Promise(function(n,i){var r=new X(e,t);if(r.signal&&r.signal.aborted)return i(new Z("Aborted","AbortError"));var a=new XMLHttpRequest;function o(){a.abort()}if(a.onload=function(){var e,t,i={statusText:a.statusText,headers:(e=a.getAllResponseHeaders()||"",t=new H,e.replace(/\r?\n[\t ]+/g," ").split("\r").map(function(e){return 0===e.indexOf("\n")?e.substr(1,e.length):e}).forEach(function(e){var n=e.split(":"),i=n.shift().trim();if(i){var r=n.join(":").trim();try{t.append(i,r)}catch(e){console.warn("Response "+e.message)}}}),t)};0===r.url.indexOf("file://")&&(a.status<200||a.status>599)?i.status=200:i.status=a.status,i.url="responseURL"in a?a.responseURL:i.headers.get("X-Request-URL");var o="response"in a?a.response:a.responseText;setTimeout(function(){n(new Y(o,i))},0)},a.onerror=function(){setTimeout(function(){i(new TypeError("Network request failed"))},0)},a.ontimeout=function(){setTimeout(function(){i(new TypeError("Network request timed out"))},0)},a.onabort=function(){setTimeout(function(){i(new Z("Aborted","AbortError"))},0)},a.open(r.method,function(e){try{return""===e&&F.location.href?F.location.href:e}catch(t){return e}}(r.url),!0),"include"===r.credentials?a.withCredentials=!0:"omit"===r.credentials&&(a.withCredentials=!1),"responseType"in a&&(L?a.responseType="blob":R&&(a.responseType="arraybuffer")),t&&"object"===T(t.headers)&&!(t.headers instanceof H||F.Headers&&t.headers instanceof F.Headers)){var s=[];Object.getOwnPropertyNames(t.headers).forEach(function(e){s.push(_(e)),a.setRequestHeader(e,U(t.headers[e]))}),r.headers.forEach(function(e,t){-1===s.indexOf(t)&&a.setRequestHeader(t,e)})}else r.headers.forEach(function(e,t){a.setRequestHeader(t,e)});r.signal&&(r.signal.addEventListener("abort",o),a.onreadystatechange=function(){4===a.readyState&&r.signal.removeEventListener("abort",o)}),a.send(void 0===r._bodyInit?null:r._bodyInit)})}$.polyfill=!0,F.fetch||(F.fetch=$,F.Headers=H,F.Request=X,F.Response=Y);var ee=!1,te=null,ne=!1,ie=null;function re(){if(ee){if(ee=!1,ie){try{ie.disconnect()}catch(e){}ie=null}te&&te.parentNode&&te.parentNode.removeChild(te),te=null}}function ae(){if(!ee&&!ne&&document.getElementById){var e=document.getElementById("loader");if(e){var t;try{t=window.getComputedStyle(e)}catch(e){t=null}(te=document.createElement("div")).id="ytaf-boot-overlay";var n=t&&t.backgroundColor||"rgb(40, 40, 40)",i=t&&t.backgroundImage||"none";te.style.cssText="position:fixed;top:0;left:0;width:100%;height:100%;z-index:2147483647;background-color:"+n+";background-image:"+i+";background-position:"+(t&&t.backgroundPosition||"center center")+";background-repeat:"+(t&&t.backgroundRepeat||"no-repeat")+";background-size:"+(t&&t.backgroundSize||"60%")+";",(document.body||document.documentElement).appendChild(te),ee=!0,ne=!0}}}function oe(){if(!ne&&document.documentElement){try{(ie=new MutationObserver(function(){ae(),ne&&ie&&ie.disconnect()})).observe(document.documentElement,{childList:!0,subtree:!0})}catch(e){}ae(),setTimeout(ae,50),setTimeout(ae,200),setTimeout(ae,800),setTimeout(ae,2e3)}}function se(){return"undefined"!=typeof window&&window.h5vcc&&window.h5vcc.tizentube||null}window.__releaseBootLoader=re,setTimeout(function(){if(ie){try{ie.disconnect()}catch(e){}ie=null}re()},1e4),document.documentElement?oe():document.addEventListener("DOMContentLoaded",oe);var ue,le,ce={defaults:{enableAdBlock:!0,blockPlayerAdTracking:!0,blockAdTelemetry:!0,blockViewStatsTelemetry:!1,removeLiveVideos:!1,removeTopLiveGames:!1,removeMostRelevant:!1,enableSponsorBlock:!0,enableSponsorBlockToasts:!0,sponsorBlockManualSkips:["intro","outro","filler"],enableSponsorBlockSponsor:!0,enableSponsorBlockIntro:!0,enableSponsorBlockOutro:!0,enableSponsorBlockInteraction:!0,enableSponsorBlockSelfPromo:!0,enableSponsorBlockPreview:!0,enableSponsorBlockMusicOfftopic:!0,enableSponsorBlockFiller:!1,enableSponsorBlockHighlight:!0,videoSpeed:1,preferredVideoQuality:"auto",enableDeArrowTitles:!0,enableDeArrowThumbnails:!0,routeColor:"#0f0f0f",routeBackgroundUrl:"",themePreset:"default",textTheme:"default",userAgentProfile:"auto",enableFixedUI:!1,enableHqThumbnails:!0,enableLongPress:!0,enableShorts:!0,dontCheckUpdateUntil:0,enableWhoIsWatchingMenu:!1,permanentlyEnableWhoIsWatchingMenu:!1,enableWhosWatchingMenuOnAppExit:!1,enableShowUserLanguage:!0,enableShowOtherLanguages:!1,showWelcomeToast:!0,enablePreviousNextButtons:!0,enableSuperThanksButton:!1,enableSpeedControlsButton:!0,enablePatchingVideoPlayer:!0,enableMPButton:!0,enableSwapMPWithPIP:!1,enablePreviews:!0,previewLengthSeconds:40,enableRemainingTime:!1,enablePauseOnBlur:!1,enableLowMemoryMode:!1,enableHideWatchedVideos:!1,hideWatchedVideosThreshold:80,hideWatchedVideosPages:[],enableHideEndScreenCards:!1,enableYouThereRenderer:!0,enableScreenDimming:!1,dimmingTimeout:60,dimmingOpacity:.5,enablePaidPromotionOverlay:!0,speedSettingsIncrement:.25,videoPreferredCodec:"any",enableAutoSubtitles:!0,autoSubtitleLanguage:"en",autoSubtitleAllowAuto:!0,launchToOnStartup:null,reloadHomeOnStartup:!0,disabledSidebarContents:[],disableChannelsOnSidebar:!1,enableUpdater:!0,autoFrameRate:!1,autoFrameRatePauseVideoFor:0,enableSigninReminder:!1,sortSubscriptionsByAlphabet:!1,enableReducedMotion:!1,enablePerformanceMode:!1,enablePanelShrink:!0,enableDeArrowPeek:!0,panelShrinkPercent:"60",clockMode:"off",clockFormat:"24h",clockPosition:"topRight",clockShowSeconds:!1,enableOnePressMode:!1,enableExperimentalResolution:!1,experimentalMaxResolution:"1440p"},ranges:{videoSpeed:[.05,5],hideWatchedVideosThreshold:[0,100],dimmingTimeout:[1,3600],dimmingOpacity:[0,1],speedSettingsIncrement:[.01,1],autoFrameRatePauseVideoFor:[0,1e4],previewLengthSeconds:[5,120],dontCheckUpdateUntil:[0,9007199254740991]},enums:{preferredVideoQuality:["auto","2160p","1440p","1080p","720p","480p","360p","240p","144p"],videoPreferredCodec:["any","vp9","av01","avc1"],themePreset:["default","black","darkGray","charcoal","navy","darkRed","darkGreen","darkPurple"],textTheme:["default","white","gray","red","blue","green","purple","yellow"],userAgentProfile:["auto","samsung","android"],experimentalMaxResolution:["1440p","2160p"],autoSubtitleLanguage:["en","hi","es","fr","de","pt","ja","ko","ru"],panelShrinkPercent:["50","60","70"],clockMode:["off","always","notPlaying"],clockFormat:["24h","12h","12hNoAmPm"],clockPosition:["topLeft","topRight","bottomLeft","bottomRight"]},themePresetColors:{default:"#0f0f0f",black:"#000000",darkGray:"#1c1a1a",charcoal:"#121212",navy:"#0d1b2a",darkRed:"#3b0505",darkGreen:"#052e1b",darkPurple:"#1a1025"}};var he=function(){if(le)return ue;le=1;var e=ce;return ue={validateConfigValue:function(t,n){var i=e.defaults;if(!Object.prototype.hasOwnProperty.call(i,t))return!1;var r=i[t];if(null===r)return null===n||"string"==typeof n;if(Array.isArray(r))return Array.isArray(n)&&n.every(function(e){return"string"==typeof e});if("number"==typeof r){if("number"!=typeof n||!isFinite(n))return!1;var a=e.ranges[t];return!a||n>=a[0]&&n<=a[1]}if(T(n)!==T(r))return!1;var o=e.enums[t];return(!o||-1!==o.indexOf(n))&&(!("routeColor"===t&&!/^#[0-9a-f]{6}$/i.test(n))&&!("routeBackgroundUrl"===t&&n&&!/^https?:\/\/\S+$/i.test(n)))}},ue}(),de=e(he),pe="ytaf-configuration",fe=JSON.parse,me=JSON.stringify,ge=function(e){return fe(me(e))},ve=ge,ye=ge(ce.defaults);ye.enableFixedUI=!se()||ce.defaults.enableFixedUI;var be,xe=de.validateConfigValue;function Se(e){if(Object.prototype.hasOwnProperty.call(ye,e))return void 0===be[e]&&(be[e]=ge(ye[e])),be[e];console.warn("[AxoTube:config] Unknown config key",e)}function Ee(e,t){if(!xe(e,t))return console.warn("[AxoTube:config] Rejected invalid config value",e,t),!1;be[e]=ge(t);var n=function(){try{return!!window.localStorage&&(window.localStorage[pe]=me(be),!0)}catch(e){if("QuotaExceededError"===e.name){console.warn("[AxoTube:config] localStorage quota exceeded; replacing axotube config only");try{return"function"==typeof window.localStorage.removeItem?window.localStorage.removeItem(pe):delete window.localStorage[pe],window.localStorage[pe]=me(be),!0}catch(e){return console.error("[AxoTube:config] Failed to persist axotube config:",e),!1}}return console.error("[AxoTube:config] Failed to persist config:",e),!1}}();return ke.dispatchEvent(new CustomEvent("configChange",{detail:{key:e,value:ge(t)}})),n}!function(){be=ge(ye);try{if(!window.localStorage||!window.localStorage[pe])return;var e=fe(window.localStorage[pe]);if(!e||"object"!==T(e)||Array.isArray(e))return;Object.keys(e).forEach(function(t){xe(t,e[t])&&(be[t]=ge(e[t]))})}catch(e){console.warn("[AxoTube:config] Config read failed; using defaults:",e)}}();var ke=new EventTarget;function we(){return ge(be)}var De,Ae="axotube-user-agent-applied";function Ce(){return!!Se("enablePerformanceMode")}function Te(){return Ce()||!!Se("enableReducedMotion")}function Pe(){return Ce()||!!Se("enableLowMemoryMode")}function Fe(){return!!Se("enablePreviews")&&!Ce()}function Be(){return Se("enableHqThumbnails")?Te()||Pe()?"hover":"eager":"off"}function Ie(e){e&&"object"===T(e)&&Pe()&&(e.feature_switches&&"object"===T(e.feature_switches)||(e.feature_switches={}),e.feature_switches.enable_memory_saving_mode=!0)}!function(){var e="android"===Se("userAgentProfile")?{ua:"Mozilla/5.0 (Linux; Android 13; Pixel 7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Mobile Safari/537.36",marker:"Pixel 7"}:{ua:"Mozilla/5.0 (SMART-TV; LINUX; Tizen 4.0) AppleWebKit/537.3 (KHTML, like Gecko) SamsungBrowser/2.1 TV Safari/537.3",marker:"SamsungBrowser/2.1"};if((!navigator.userAgent||-1===navigator.userAgent.indexOf(e.marker))&&function(e){try{if(window.tizen&&window.tizen.websetting&&"function"==typeof window.tizen.websetting.setUserAgentString)return window.tizen.websetting.setUserAgentString(e),!0}catch(e){console.warn("[AxoTube:userAgentSpoofing] setUserAgentString failed:",e)}return!1}(e.ua))try{sessionStorage.getItem(Ae)!==e.ua&&(sessionStorage.setItem(Ae,e.ua),location.reload())}catch(e){}}(),ke.addEventListener("configChange",function(e){var t;"enablePerformanceMode"===(null===(t=e.detail)||void 0===t?void 0:t.key)&&(Se("enablePerformanceMode")||(Ee("enableReducedMotion",!1),Ee("enableLowMemoryMode",!1)))});try{var Le=window.environment;Object.defineProperty(window,"environment",{configurable:!0,get:function(){return De},set:function(e){Ie(e),De=e}}),De=Le,Ie(Le)}catch(e){console.warn("[AxoTube:lowMemoryMode] low memory mode unavailable:",e)}var Oe={"1440p":"2560x1440","2160p":"3840x2160"},Re={width:function(e){return Number(e)>0&&Number(e)<=7680},height:function(e){return Number(e)>0&&Number(e)<=4320},framerate:function(e){return Number(e)>0&&Number(e)<=60},bitrate:function(e){return Number(e)>0&&Number(e)<=2e8},eotf:function(e){return"bt709"===e||("smpte2084"===e||"arib-std-b67"===e)&&Ne()},channels:function(e){return Number(e)>0&&Number(e)<=8},cryptoblockformat:function(e){return"subsample"===e},"decode-to-texture":function(e){return"true"===e||"false"===e}};function Ne(){return!(!window.matchMedia||!window.matchMedia("(dynamic-range: high)").matches)}function Me(e){var t=e.split("."),n="vp09"===t[0]?t[6]:"av01"===t[0]?t[7]:void 0;return"16"===n||"18"===n}var _e="__axotubeResolutionOwner";if(!window[_e]){if(window[_e]=!0,Se("enableExperimentalResolution"))try{window.h5vcc=window.h5vcc||{},window.h5vcc.system=window.h5vcc.system||{},window.h5vcc.system.getVideoContainerSizeOverride=function(){var e=Se("experimentalMaxResolution");return Oe[e]||Oe["1440p"]},function(){if(window.MediaSource&&"function"==typeof MediaSource.isTypeSupported){var e=MediaSource.isTypeSupported.bind(MediaSource);MediaSource.isTypeSupported=function(t){for(var n=String(t).split(";"),i=[n[0].trim()],r=1;r<n.length;r++){var a=n[r].trim(),o=a.indexOf("="),s=(-1===o?a:a.slice(0,o)).trim().toLowerCase(),u=(-1===o?"":a.slice(o+1)).trim().replace(/^"|"$/g,"");if("codecs"===s){for(var l=u.split(","),c=0;c<l.length;c++)if(Me(l[c].trim())&&!Ne())return!1;i.push(a)}else if(Re[s]){if(!Re[s](u))return!1}else i.push(a)}return e(i.join("; "))}}}()}catch(e){console.warn("[AxoTube:experimentalResolution] Could not install overrides:",e)}ke.addEventListener("configChange",function(e){var t,n=(null===(t=e.detail)||void 0===t?void 0:t.key)||"";("enableExperimentalResolution"===n||"experimentalMaxResolution"===n&&Se("enableExperimentalResolution"))&&setTimeout(function(){return location.reload()},300)})}var Ue={avc1:["avc1"],vp9:["vp09","vp9"],av01:["av01"]};var je="__axotubeCodecOwner";if(!window[je]){window[je]=!0;try{!function(e){if(window.MediaSource&&"function"==typeof MediaSource.isTypeSupported){var t=function(e){if(!Ue[e])return[];var t=[];return Object.keys(Ue).forEach(function(n){n!==e&&(t=t.concat(Ue[n]))}),t}(e);if(0!==t.length){var n=MediaSource.isTypeSupported.bind(MediaSource);MediaSource.isTypeSupported=function(e){var i=String(e).toLowerCase();if(-1!==i.indexOf("codecs"))for(var r=0;r<t.length;r++)if(-1!==i.indexOf(t[r]))return!1;return n(e)}}}}(Se("videoPreferredCodec"))}catch(e){console.warn("[AxoTube:codecPreference] Could not install codec preference:",e)}ke.addEventListener("configChange",function(e){var t;"videoPreferredCodec"===((null===(t=e.detail)||void 0===t?void 0:t.key)||"")&&setTimeout(function(){return location.reload()},300)})}var He=function(e){return"string"==typeof e},ze=function(){var e,t,n=new Promise(function(n,i){e=n,t=i});return n.resolve=e,n.reject=t,n},Ve=function(e){return null==e?"":""+e},Ke=/###/g,Ge=function(e){return e&&e.indexOf("###")>-1?e.replace(Ke,"."):e},We=function(e){return!e||He(e)},Je=function(e,t,n){for(var i=He(t)?t.split("."):t,r=0;r<i.length-1;){if(We(e))return{};var a=Ge(i[r]);!e[a]&&n&&(e[a]=new n),e=Object.prototype.hasOwnProperty.call(e,a)?e[a]:{},++r}return We(e)?{}:{obj:e,k:Ge(i[r])}},Xe=function(e,t,n){var i=Je(e,t,Object),r=i.obj,a=i.k;if(void 0===r&&1!==t.length){for(var o=t[t.length-1],s=t.slice(0,t.length-1),u=Je(e,s,Object);void 0===u.obj&&s.length;){var l;o="".concat(s[s.length-1],".").concat(o),s=s.slice(0,s.length-1),null!==(l=u=Je(e,s,Object))&&void 0!==l&&l.obj&&void 0!==u.obj["".concat(u.k,".").concat(o)]&&(u.obj=void 0)}u.obj["".concat(u.k,".").concat(o)]=n}else r[a]=n},qe=function(e,t){var n=Je(e,t),i=n.obj,r=n.k;if(i&&Object.prototype.hasOwnProperty.call(i,r))return i[r]},Ye=function(e,t,n){for(var i in t)"__proto__"!==i&&"constructor"!==i&&(i in e?He(e[i])||e[i]instanceof String||He(t[i])||t[i]instanceof String?n&&(e[i]=t[i]):Ye(e[i],t[i],n):e[i]=t[i]);return e},Qe=function(e){return e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")},Ze={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"},$e=function(e){return He(e)?e.replace(/[&<>"'\/]/g,function(e){return Ze[e]}):e},et=[" ",",","?","!",";"],tt=new(function(){return p(function e(t){u(this,e),this.capacity=t,this.regExpMap=new Map,this.regExpQueue=[]},[{key:"getRegExp",value:function(e){var t=this.regExpMap.get(e);if(void 0!==t)return t;var n=new RegExp(e);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(e,n),this.regExpQueue.push(e),n}}])}())(20),nt=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:".";if(e){if(e[t]){if(!Object.prototype.hasOwnProperty.call(e,t))return;return e[t]}for(var i=t.split(n),r=e,a=0;a<i.length;){if(!r||"object"!==T(r))return;for(var o=void 0,s="",u=a;u<i.length;++u)if(u!==a&&(s+=n),void 0!==(o=r[s+=i[u]])){if(["string","number","boolean"].indexOf(T(o))>-1&&u<i.length-1)continue;a+=u-a+1;break}r=o}return r}},it=function(e){return null==e?void 0:e.replace(/_/g,"-")},rt={type:"logger",log:function(e){this.output("log",e)},warn:function(e){this.output("warn",e)},error:function(e){this.output("error",e)},output:function(e,t){var n,i;null===(n=console)||void 0===n||null===(n=n[e])||void 0===n||null===(i=n.apply)||void 0===i||i.call(n,console,t)}},at=function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};u(this,e),this.init(t,n)}return p(e,[{key:"init",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.prefix=t.prefix||"i18next:",this.logger=e||rt,this.options=t,this.debug=t.debug}},{key:"log",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return this.forward(t,"log","",!0)}},{key:"warn",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return this.forward(t,"warn","",!0)}},{key:"error",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return this.forward(t,"error","")}},{key:"deprecate",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return this.forward(t,"warn","WARNING DEPRECATED: ",!0)}},{key:"forward",value:function(e,t,n,i){return i&&!this.debug?null:(He(e[0])&&(e[0]="".concat(n).concat(this.prefix," ").concat(e[0])),this.logger[t](e))}},{key:"create",value:function(t){return new e(this.logger,E(E({},{prefix:"".concat(this.prefix,":").concat(t,":")}),this.options))}},{key:"clone",value:function(t){return(t=t||this.options).prefix=t.prefix||this.prefix,new e(this.logger,t)}}])}(),ot=new at,st=function(){return p(function e(){u(this,e),this.observers={}},[{key:"on",value:function(e,t){var n=this;return e.split(" ").forEach(function(e){n.observers[e]||(n.observers[e]=new Map);var i=n.observers[e].get(t)||0;n.observers[e].set(t,i+1)}),this}},{key:"off",value:function(e,t){this.observers[e]&&(t?this.observers[e].delete(t):delete this.observers[e])}},{key:"emit",value:function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),i=1;i<t;i++)n[i-1]=arguments[i];this.observers[e]&&Array.from(this.observers[e].entries()).forEach(function(e){for(var t=D(e,2),i=t[0],r=t[1],a=0;a<r;a++)i.apply(void 0,n)});this.observers["*"]&&Array.from(this.observers["*"].entries()).forEach(function(t){for(var i=D(t,2),r=i[0],a=i[1],o=0;o<a;o++)r.apply(r,[e].concat(n))})}}])}(),ut=function(e){function t(e){var n,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{ns:["translation"],defaultNS:"translation"};return u(this,t),(n=o(this,t)).data=e||{},n.options=i,void 0===n.options.keySeparator&&(n.options.keySeparator="."),void 0===n.options.ignoreJSONStructure&&(n.options.ignoreJSONStructure=!0),n}return v(t,e),p(t,[{key:"addNamespaces",value:function(e){this.options.ns.indexOf(e)<0&&this.options.ns.push(e)}},{key:"removeNamespaces",value:function(e){var t=this.options.ns.indexOf(e);t>-1&&this.options.ns.splice(t,1)}},{key:"getResource",value:function(e,t,n){var i,r,a,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},s=void 0!==o.keySeparator?o.keySeparator:this.options.keySeparator,u=void 0!==o.ignoreJSONStructure?o.ignoreJSONStructure:this.options.ignoreJSONStructure;if(e.indexOf(".")>-1)r=e.split(".");else if(r=[e,t],n)if(Array.isArray(n))(a=r).push.apply(a,A(n));else if(He(n)&&s){var l;(l=r).push.apply(l,A(n.split(s)))}else r.push(n);var c=qe(this.data,r);return!c&&!t&&!n&&e.indexOf(".")>-1&&(e=r[0],t=r[1],n=r.slice(2).join(".")),!c&&u&&He(n)?nt(null===(i=this.data)||void 0===i||null===(i=i[e])||void 0===i?void 0:i[t],n,s):c}},{key:"addResource",value:function(e,t,n,i){var r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{silent:!1},a=void 0!==r.keySeparator?r.keySeparator:this.options.keySeparator,o=[e,t];n&&(o=o.concat(a?n.split(a):n)),e.indexOf(".")>-1&&(i=t,t=(o=e.split("."))[1]),this.addNamespaces(t),Xe(this.data,o,i),r.silent||this.emit("added",e,t,n,i)}},{key:"addResources",value:function(e,t,n){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{silent:!1};for(var r in n)(He(n[r])||Array.isArray(n[r]))&&this.addResource(e,t,r,n[r],{silent:!0});i.silent||this.emit("added",e,t,n)}},{key:"addResourceBundle",value:function(e,t,n,i,r){var a=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{silent:!1,skipCopy:!1},o=[e,t];e.indexOf(".")>-1&&(i=n,n=t,t=(o=e.split("."))[1]),this.addNamespaces(t);var s=qe(this.data,o)||{};a.skipCopy||(n=JSON.parse(JSON.stringify(n))),i?Ye(s,n,r):s=E(E({},s),n),Xe(this.data,o,s),a.silent||this.emit("added",e,t,n)}},{key:"removeResourceBundle",value:function(e,t){this.hasResourceBundle(e,t)&&delete this.data[e][t],this.removeNamespaces(t),this.emit("removed",e,t)}},{key:"hasResourceBundle",value:function(e,t){return void 0!==this.getResource(e,t)}},{key:"getResourceBundle",value:function(e,t){return t||(t=this.options.defaultNS),this.getResource(e,t)}},{key:"getDataByLanguage",value:function(e){return this.data[e]}},{key:"hasLanguageSomeTranslations",value:function(e){var t=this.getDataByLanguage(e);return!!(t&&Object.keys(t)||[]).find(function(e){return t[e]&&Object.keys(t[e]).length>0})}},{key:"toJSON",value:function(){return this.data}}])}(st),lt={processors:{},addPostProcessor:function(e){this.processors[e.name]=e},handle:function(e,t,n,i,r){var a=this;return e.forEach(function(e){var o,s;t=null!==(o=null===(s=a.processors[e])||void 0===s?void 0:s.process(t,n,i,r))&&void 0!==o?o:t}),t}},ct=Symbol("i18next/PATH_KEY");function ht(e,t){var n,i,r=e(function(){var e,t=[],n=Object.create(null);return n.get=function(i,r){var a,o;return null===(a=e)||void 0===a||null===(o=a.revoke)||void 0===o||o.call(a),r===ct?t:(t.push(r),(e=Proxy.revocable(i,n)).proxy)},Proxy.revocable(Object.create(null),n).proxy}()),a=r[ct],o=null!==(n=null==t?void 0:t.keySeparator)&&void 0!==n?n:".",s=null!==(i=null==t?void 0:t.nsSeparator)&&void 0!==i?i:":";if(a.length>1&&s){var u=null==t?void 0:t.ns;if((u?Array.isArray(u)?u:[u]:[]).includes(a[0]))return"".concat(a[0]).concat(s).concat(a.slice(1).join(o))}return a.join(o)}var dt={},pt=function(e){return!He(e)&&"boolean"!=typeof e&&"number"!=typeof e},ft=function(e){function t(e){var n,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return u(this,t),function(e,t,n){e.forEach(function(e){t[e]&&(n[e]=t[e])})}(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],e,n=o(this,t)),n.options=i,void 0===n.options.keySeparator&&(n.options.keySeparator="."),n.logger=ot.create("translator"),n}return v(t,e),p(t,[{key:"changeLanguage",value:function(e){e&&(this.language=e)}},{key:"exists",value:function(e){var t=E({},arguments.length>1&&void 0!==arguments[1]?arguments[1]:{interpolation:{}});if(null==e)return!1;var n=this.resolve(e,t);if(void 0===(null==n?void 0:n.res))return!1;var i=pt(n.res);return!1!==t.returnObjects||!i}},{key:"extractFromKey",value:function(e,t){var n=void 0!==t.nsSeparator?t.nsSeparator:this.options.nsSeparator;void 0===n&&(n=":");var i=void 0!==t.keySeparator?t.keySeparator:this.options.keySeparator,r=t.ns||this.options.defaultNS||[],a=n&&e.indexOf(n)>-1,o=!(this.options.userDefinedKeySeparator||t.keySeparator||this.options.userDefinedNsSeparator||t.nsSeparator||function(e,t,n){t=t||"",n=n||"";var i=et.filter(function(e){return t.indexOf(e)<0&&n.indexOf(e)<0});if(0===i.length)return!0;var r=tt.getRegExp("(".concat(i.map(function(e){return"?"===e?"\\?":e}).join("|"),")")),a=!r.test(e);if(!a){var o=e.indexOf(n);o>0&&!r.test(e.substring(0,o))&&(a=!0)}return a}(e,n,i));if(a&&!o){var s=e.match(this.interpolator.nestingRegexp);if(s&&s.length>0)return{key:e,namespaces:He(r)?[r]:r};var u=e.split(n);(n!==i||n===i&&this.options.ns.indexOf(u[0])>-1)&&(r=u.shift()),e=u.join(i)}return{key:e,namespaces:He(r)?[r]:r}}},{key:"translate",value:function(e,n,i){var r=this,a="object"===T(n)?E({},n):n;if("object"!==T(a)&&this.options.overloadTranslationOptionHandler&&(a=this.options.overloadTranslationOptionHandler(arguments)),"object"===T(a)&&(a=E({},a)),a||(a={}),null==e)return"";"function"==typeof e&&(e=ht(e,E(E({},this.options),a))),Array.isArray(e)||(e=[String(e)]),e=e.map(function(e){return"function"==typeof e?ht(e,E(E({},r.options),a)):String(e)});var o=void 0!==a.returnDetails?a.returnDetails:this.options.returnDetails,s=void 0!==a.keySeparator?a.keySeparator:this.options.keySeparator,u=this.extractFromKey(e[e.length-1],a),l=u.key,c=u.namespaces,h=c[c.length-1],d=void 0!==a.nsSeparator?a.nsSeparator:this.options.nsSeparator;void 0===d&&(d=":");var p=a.lng||this.language,f=a.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if("cimode"===(null==p?void 0:p.toLowerCase()))return f?o?{res:"".concat(h).concat(d).concat(l),usedKey:l,exactUsedKey:l,usedLng:p,usedNS:h,usedParams:this.getUsedParamsDetails(a)}:"".concat(h).concat(d).concat(l):o?{res:l,usedKey:l,exactUsedKey:l,usedLng:p,usedNS:h,usedParams:this.getUsedParamsDetails(a)}:l;var m=this.resolve(e,a),g=null==m?void 0:m.res,v=(null==m?void 0:m.usedKey)||l,y=(null==m?void 0:m.exactUsedKey)||l,b=void 0!==a.joinArrays?a.joinArrays:this.options.joinArrays,x=!this.i18nFormat||this.i18nFormat.handleAsObject,S=void 0!==a.count&&!He(a.count),k=t.hasDefaultValue(a),w=S?this.pluralResolver.getSuffix(p,a.count,a):"",D=a.ordinal&&S?this.pluralResolver.getSuffix(p,a.count,{ordinal:!1}):"",A=S&&!a.ordinal&&0===a.count,C=A&&a["defaultValue".concat(this.options.pluralSeparator,"zero")]||a["defaultValue".concat(w)]||a["defaultValue".concat(D)]||a.defaultValue,P=g;x&&!g&&k&&(P=C);var F=pt(P),B=Object.prototype.toString.apply(P);if(!(x&&P&&F&&["[object Number]","[object Function]","[object RegExp]"].indexOf(B)<0)||He(b)&&Array.isArray(P))if(x&&He(b)&&Array.isArray(g))(g=g.join(b))&&(g=this.extendTranslation(g,e,a,i));else{var I=!1,L=!1;!this.isValidLookup(g)&&k&&(I=!0,g=C),this.isValidLookup(g)||(L=!0,g=l);var O=(a.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&L?void 0:g,R=k&&C!==g&&this.options.updateMissing;if(L||I||R){if(this.logger.log(R?"updateKey":"missingKey",p,h,l,R?C:g),s){var N=this.resolve(l,E(E({},a),{},{keySeparator:!1}));N&&N.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}var M=[],_=this.languageUtils.getFallbackCodes(this.options.fallbackLng,a.lng||this.language);if("fallback"===this.options.saveMissingTo&&_&&_[0])for(var U=0;U<_.length;U++)M.push(_[U]);else"all"===this.options.saveMissingTo?M=this.languageUtils.toResolveHierarchy(a.lng||this.language):M.push(a.lng||this.language);var j=function(e,t,n){var i,o=k&&n!==g?n:O;r.options.missingKeyHandler?r.options.missingKeyHandler(e,h,t,o,R,a):null!==(i=r.backendConnector)&&void 0!==i&&i.saveMissing&&r.backendConnector.saveMissing(e,h,t,o,R,a),r.emit("missingKey",e,h,t,g)};this.options.saveMissing&&(this.options.saveMissingPlurals&&S?M.forEach(function(e){var t=r.pluralResolver.getSuffixes(e,a);A&&a["defaultValue".concat(r.options.pluralSeparator,"zero")]&&t.indexOf("".concat(r.options.pluralSeparator,"zero"))<0&&t.push("".concat(r.options.pluralSeparator,"zero")),t.forEach(function(t){j([e],l+t,a["defaultValue".concat(t)]||C)})}):j(M,l,C))}g=this.extendTranslation(g,e,a,m,i),L&&g===l&&this.options.appendNamespaceToMissingKey&&(g="".concat(h).concat(d).concat(l)),(L||I)&&this.options.parseMissingKeyHandler&&(g=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?"".concat(h).concat(d).concat(l):l,I?g:void 0,a))}else{if(!a.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");var H=this.options.returnedObjectHandler?this.options.returnedObjectHandler(v,P,E(E({},a),{},{ns:c})):"key '".concat(l," (").concat(this.language,")' returned an object instead of string.");return o?(m.res=H,m.usedParams=this.getUsedParamsDetails(a),m):H}if(s){var z=Array.isArray(P),V=z?[]:{},K=z?y:v;for(var G in P)if(Object.prototype.hasOwnProperty.call(P,G)){var W="".concat(K).concat(s).concat(G);V[G]=k&&!g?this.translate(W,E(E({},a),{},{defaultValue:pt(C)?C[G]:void 0},{joinArrays:!1,ns:c})):this.translate(W,E(E({},a),{joinArrays:!1,ns:c})),V[G]===W&&(V[G]=P[G])}g=V}}return o?(m.res=g,m.usedParams=this.getUsedParamsDetails(a),m):g}},{key:"extendTranslation",value:function(e,t,n,i,r){var a,o=this;if(null!==(a=this.i18nFormat)&&void 0!==a&&a.parse)e=this.i18nFormat.parse(e,E(E({},this.options.interpolation.defaultVariables),n),n.lng||this.language||i.usedLng,i.usedNS,i.usedKey,{resolved:i});else if(!n.skipInterpolation){var s;n.interpolation&&this.interpolator.init(E(E({},n),{interpolation:E(E({},this.options.interpolation),n.interpolation)}));var u,l=He(e)&&(void 0!==(null==n||null===(s=n.interpolation)||void 0===s?void 0:s.skipOnVariables)?n.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);if(l){var c=e.match(this.interpolator.nestingRegexp);u=c&&c.length}var h=n.replace&&!He(n.replace)?n.replace:n;if(this.options.interpolation.defaultVariables&&(h=E(E({},this.options.interpolation.defaultVariables),h)),e=this.interpolator.interpolate(e,h,n.lng||this.language||i.usedLng,n),l){var d=e.match(this.interpolator.nestingRegexp);u<(d&&d.length)&&(n.nest=!1)}!n.lng&&i&&i.res&&(n.lng=this.language||i.usedLng),!1!==n.nest&&(e=this.interpolator.nest(e,function(){for(var e=arguments.length,i=new Array(e),a=0;a<e;a++)i[a]=arguments[a];return(null==r?void 0:r[0])!==i[0]||n.context?o.translate.apply(o,i.concat([t])):(o.logger.warn("It seems you are nesting recursively key: ".concat(i[0]," in key: ").concat(t[0])),null)},n)),n.interpolation&&this.interpolator.reset()}var p=n.postProcess||this.options.postProcess,f=He(p)?[p]:p;return null!=e&&null!=f&&f.length&&!1!==n.applyPostProcessor&&(e=lt.handle(f,e,t,this.options&&this.options.postProcessPassResolved?E({i18nResolved:E(E({},i),{},{usedParams:this.getUsedParamsDetails(n)})},n):n,this)),e}},{key:"resolve",value:function(e){var t,n,i,r,a,o=this,s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return He(e)&&(e=[e]),Array.isArray(e)&&(e=e.map(function(e){return"function"==typeof e?ht(e,E(E({},o.options),s)):e})),e.forEach(function(e){if(!o.isValidLookup(t)){var u=o.extractFromKey(e,s),l=u.key;n=l;var c=u.namespaces;o.options.fallbackNS&&(c=c.concat(o.options.fallbackNS));var h=void 0!==s.count&&!He(s.count),d=h&&!s.ordinal&&0===s.count,p=void 0!==s.context&&(He(s.context)||"number"==typeof s.context)&&""!==s.context,f=s.lngs?s.lngs:o.languageUtils.toResolveHierarchy(s.lng||o.language,s.fallbackLng);c.forEach(function(e){var u,c;o.isValidLookup(t)||(a=e,dt["".concat(f[0],"-").concat(e)]||null===(u=o.utils)||void 0===u||!u.hasLoadedNamespace||null!==(c=o.utils)&&void 0!==c&&c.hasLoadedNamespace(a)||(dt["".concat(f[0],"-").concat(e)]=!0,o.logger.warn('key "'.concat(n,'" for languages "').concat(f.join(", "),'" won\'t get resolved as namespace "').concat(a,'" was not yet loaded'),"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),f.forEach(function(n){var a;if(!o.isValidLookup(t)){r=n;var u,c=[l];if(null!==(a=o.i18nFormat)&&void 0!==a&&a.addLookupKeys)o.i18nFormat.addLookupKeys(c,l,n,e,s);else{var f;h&&(f=o.pluralResolver.getSuffix(n,s.count,s));var m="".concat(o.options.pluralSeparator,"zero"),g="".concat(o.options.pluralSeparator,"ordinal").concat(o.options.pluralSeparator);if(h&&(s.ordinal&&0===f.indexOf(g)&&c.push(l+f.replace(g,o.options.pluralSeparator)),c.push(l+f),d&&c.push(l+m)),p){var v="".concat(l).concat(o.options.contextSeparator||"_").concat(s.context);c.push(v),h&&(s.ordinal&&0===f.indexOf(g)&&c.push(v+f.replace(g,o.options.pluralSeparator)),c.push(v+f),d&&c.push(v+m))}}for(;u=c.pop();)o.isValidLookup(t)||(i=u,t=o.getResource(n,e,u,s))}}))})}}),{res:t,usedKey:n,exactUsedKey:i,usedLng:r,usedNS:a}}},{key:"isValidLookup",value:function(e){return!(void 0===e||!this.options.returnNull&&null===e||!this.options.returnEmptyString&&""===e)}},{key:"getResource",value:function(e,t,n){var i,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return null!==(i=this.i18nFormat)&&void 0!==i&&i.getResource?this.i18nFormat.getResource(e,t,n,r):this.resourceStore.getResource(e,t,n,r)}},{key:"getUsedParamsDetails",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.replace&&!He(e.replace),n=t?e.replace:e;if(t&&void 0!==e.count&&(n.count=e.count),this.options.interpolation.defaultVariables&&(n=E(E({},this.options.interpolation.defaultVariables),n)),!t){n=E({},n);var i,r=f(["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"]);try{for(r.s();!(i=r.n()).done;){delete n[i.value]}}catch(e){r.e(e)}finally{r.f()}}return n}}],[{key:"hasDefaultValue",value:function(e){var t="defaultValue";for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t===n.substring(0,12)&&void 0!==e[n])return!0;return!1}}])}(st),mt=function(){return p(function e(t){u(this,e),this.options=t,this.supportedLngs=this.options.supportedLngs||!1,this.logger=ot.create("languageUtils")},[{key:"getScriptPartFromCode",value:function(e){if(!(e=it(e))||e.indexOf("-")<0)return null;var t=e.split("-");return 2===t.length?null:(t.pop(),"x"===t[t.length-1].toLowerCase()?null:this.formatLanguageCode(t.join("-")))}},{key:"getLanguagePartFromCode",value:function(e){if(!(e=it(e))||e.indexOf("-")<0)return e;var t=e.split("-");return this.formatLanguageCode(t[0])}},{key:"formatLanguageCode",value:function(e){if(He(e)&&e.indexOf("-")>-1){var t;try{t=Intl.getCanonicalLocales(e)[0]}catch(e){}return t&&this.options.lowerCaseLng&&(t=t.toLowerCase()),t||(this.options.lowerCaseLng?e.toLowerCase():e)}return this.options.cleanCode||this.options.lowerCaseLng?e.toLowerCase():e}},{key:"isSupportedCode",value:function(e){return("languageOnly"===this.options.load||this.options.nonExplicitSupportedLngs)&&(e=this.getLanguagePartFromCode(e)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(e)>-1}},{key:"getBestMatchFromCodes",value:function(e){var t,n=this;return e?(e.forEach(function(e){if(!t){var i=n.formatLanguageCode(e);n.options.supportedLngs&&!n.isSupportedCode(i)||(t=i)}}),!t&&this.options.supportedLngs&&e.forEach(function(e){if(!t){var i=n.getScriptPartFromCode(e);if(n.isSupportedCode(i))return t=i;var r=n.getLanguagePartFromCode(e);if(n.isSupportedCode(r))return t=r;t=n.options.supportedLngs.find(function(e){return e===r?e:e.indexOf("-")<0&&r.indexOf("-")<0?void 0:e.indexOf("-")>0&&r.indexOf("-")<0&&e.substring(0,e.indexOf("-"))===r||0===e.indexOf(r)&&r.length>1?e:void 0})}}),t||(t=this.getFallbackCodes(this.options.fallbackLng)[0]),t):null}},{key:"getFallbackCodes",value:function(e,t){if(!e)return[];if("function"==typeof e&&(e=e(t)),He(e)&&(e=[e]),Array.isArray(e))return e;if(!t)return e.default||[];var n=e[t];return n||(n=e[this.getScriptPartFromCode(t)]),n||(n=e[this.formatLanguageCode(t)]),n||(n=e[this.getLanguagePartFromCode(t)]),n||(n=e.default),n||[]}},{key:"toResolveHierarchy",value:function(e,t){var n=this,i=this.getFallbackCodes((!1===t?[]:t)||this.options.fallbackLng||[],e),r=[],a=function(e){e&&(n.isSupportedCode(e)?r.push(e):n.logger.warn("rejecting language code not found in supportedLngs: ".concat(e)))};return He(e)&&(e.indexOf("-")>-1||e.indexOf("_")>-1)?("languageOnly"!==this.options.load&&a(this.formatLanguageCode(e)),"languageOnly"!==this.options.load&&"currentOnly"!==this.options.load&&a(this.getScriptPartFromCode(e)),"currentOnly"!==this.options.load&&a(this.getLanguagePartFromCode(e))):He(e)&&a(this.formatLanguageCode(e)),i.forEach(function(e){r.indexOf(e)<0&&a(n.formatLanguageCode(e))}),r}}])}(),gt={zero:0,one:1,two:2,few:3,many:4,other:5},vt={select:function(e){return 1===e?"one":"other"},resolvedOptions:function(){return{pluralCategories:["one","other"]}}},yt=function(){return p(function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};u(this,e),this.languageUtils=t,this.options=n,this.logger=ot.create("pluralResolver"),this.pluralRulesCache={}},[{key:"clearCache",value:function(){this.pluralRulesCache={}}},{key:"getRule",value:function(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=it("dev"===e?"en":e),r=n.ordinal?"ordinal":"cardinal",a=JSON.stringify({cleanedCode:i,type:r});if(a in this.pluralRulesCache)return this.pluralRulesCache[a];try{t=new Intl.PluralRules(i,{type:r})}catch(i){if("undefined"==typeof Intl)return this.logger.error("No Intl support, please use an Intl polyfill!"),vt;if(!e.match(/-|_/))return vt;var o=this.languageUtils.getLanguagePartFromCode(e);t=this.getRule(o,n)}return this.pluralRulesCache[a]=t,t}},{key:"needsPlural",value:function(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=this.getRule(e,n);return i||(i=this.getRule("dev",n)),(null===(t=i)||void 0===t?void 0:t.resolvedOptions().pluralCategories.length)>1}},{key:"getPluralFormsOfKey",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return this.getSuffixes(e,n).map(function(e){return"".concat(t).concat(e)})}},{key:"getSuffixes",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=this.getRule(e,n);return i||(i=this.getRule("dev",n)),i?i.resolvedOptions().pluralCategories.sort(function(e,t){return gt[e]-gt[t]}).map(function(e){return"".concat(t.options.prepend).concat(n.ordinal?"ordinal".concat(t.options.prepend):"").concat(e)}):[]}},{key:"getSuffix",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=this.getRule(e,n);return i?"".concat(this.options.prepend).concat(n.ordinal?"ordinal".concat(this.options.prepend):"").concat(i.select(t)):(this.logger.warn("no plural rule found for: ".concat(e)),this.getSuffix("dev",t,n))}}])}(),bt=function(e,t,n){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:".",r=!(arguments.length>4&&void 0!==arguments[4])||arguments[4],a=function(e,t,n){var i=qe(e,n);return void 0!==i?i:qe(t,n)}(e,t,n);return!a&&r&&He(n)&&void 0===(a=nt(e,n,i))&&(a=nt(t,n,i)),a},xt=function(e){return e.replace(/\$/g,"$$$$")},St=function(){return p(function e(){var t,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};u(this,e),this.logger=ot.create("interpolator"),this.options=n,this.format=(null==n||null===(t=n.interpolation)||void 0===t?void 0:t.format)||function(e){return e},this.init(n)},[{key:"init",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};e.interpolation||(e.interpolation={escapeValue:!0});var t=e.interpolation,n=t.escape,i=t.escapeValue,r=t.useRawValueToEscape,a=t.prefix,o=t.prefixEscaped,s=t.suffix,u=t.suffixEscaped,l=t.formatSeparator,c=t.unescapeSuffix,h=t.unescapePrefix,d=t.nestingPrefix,p=t.nestingPrefixEscaped,f=t.nestingSuffix,m=t.nestingSuffixEscaped,g=t.nestingOptionsSeparator,v=t.maxReplaces,y=t.alwaysFormat;this.escape=void 0!==n?n:$e,this.escapeValue=void 0===i||i,this.useRawValueToEscape=void 0!==r&&r,this.prefix=a?Qe(a):o||"{{",this.suffix=s?Qe(s):u||"}}",this.formatSeparator=l||",",this.unescapePrefix=c?"":h||"-",this.unescapeSuffix=this.unescapePrefix?"":c||"",this.nestingPrefix=d?Qe(d):p||Qe("$t("),this.nestingSuffix=f?Qe(f):m||Qe(")"),this.nestingOptionsSeparator=g||",",this.maxReplaces=v||1e3,this.alwaysFormat=void 0!==y&&y,this.resetRegExp()}},{key:"reset",value:function(){this.options&&this.init(this.options)}},{key:"resetRegExp",value:function(){var e=function(e,t){return(null==e?void 0:e.source)===t?(e.lastIndex=0,e):new RegExp(t,"g")};this.regexp=e(this.regexp,"".concat(this.prefix,"(.+?)").concat(this.suffix)),this.regexpUnescape=e(this.regexpUnescape,"".concat(this.prefix).concat(this.unescapePrefix,"(.+?)").concat(this.unescapeSuffix).concat(this.suffix)),this.nestingRegexp=e(this.nestingRegexp,"".concat(this.nestingPrefix,"((?:[^()\"']+|\"[^\"]*\"|'[^']*'|\\((?:[^()]|\"[^\"]*\"|'[^']*')*\\))*?)").concat(this.nestingSuffix))}},{key:"interpolate",value:function(e,t,n,i){var r,a,o,s,u=this,l=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},c=function(e){if(e.indexOf(u.formatSeparator)<0){var r=bt(t,l,e,u.options.keySeparator,u.options.ignoreJSONStructure);return u.alwaysFormat?u.format(r,void 0,n,E(E(E({},i),t),{},{interpolationkey:e})):r}var a=e.split(u.formatSeparator),o=a.shift().trim(),s=a.join(u.formatSeparator).trim();return u.format(bt(t,l,o,u.options.keySeparator,u.options.ignoreJSONStructure),s,n,E(E(E({},i),t),{},{interpolationkey:o}))};this.resetRegExp();var h=(null==i?void 0:i.missingInterpolationHandler)||this.options.missingInterpolationHandler,d=void 0!==(null==i||null===(r=i.interpolation)||void 0===r?void 0:r.skipOnVariables)?i.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:function(e){return xt(e)}},{regex:this.regexp,safeValue:function(e){return u.escapeValue?xt(u.escape(e)):xt(e)}}].forEach(function(t){for(s=0;a=t.regex.exec(e);){var n=a[1].trim();if(void 0===(o=c(n)))if("function"==typeof h){var r=h(e,a,i);o=He(r)?r:""}else if(i&&Object.prototype.hasOwnProperty.call(i,n))o="";else{if(d){o=a[0];continue}u.logger.warn("missed to pass in variable ".concat(n," for interpolating ").concat(e)),o=""}else He(o)||u.useRawValueToEscape||(o=Ve(o));var l=t.safeValue(o);if(e=e.replace(a[0],l),d?(t.regex.lastIndex+=o.length,t.regex.lastIndex-=a[0].length):t.regex.lastIndex=0,++s>=u.maxReplaces)break}}),e}},{key:"nest",value:function(e,t){for(var n,i,r,a=this,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},s=function(e,t){var n,i,o=a.nestingOptionsSeparator;if(e.indexOf(o)<0)return e;var s=e.split(new RegExp("".concat(Qe(o),"[ ]*{"))),u="{".concat(s[1]);e=s[0];var l=(u=a.interpolate(u,r)).match(/'/g),c=u.match(/"/g);((null!==(n=null==l?void 0:l.length)&&void 0!==n?n:0)%2==0&&!c||(null!==(i=null==c?void 0:c.length)&&void 0!==i?i:0)%2!=0)&&(u=u.replace(/'/g,'"'));try{r=JSON.parse(u),t&&(r=E(E({},t),r))}catch(t){return a.logger.warn("failed parsing options string in nesting for key ".concat(e),t),"".concat(e).concat(o).concat(u)}return r.defaultValue&&r.defaultValue.indexOf(a.prefix)>-1&&delete r.defaultValue,e};n=this.nestingRegexp.exec(e);){var u=[];(r=(r=E({},o)).replace&&!He(r.replace)?r.replace:r).applyPostProcessor=!1,delete r.defaultValue;var l=/{.*}/.test(n[1])?n[1].lastIndexOf("}")+1:n[1].indexOf(this.formatSeparator);if(-1!==l&&(u=n[1].slice(l).split(this.formatSeparator).map(function(e){return e.trim()}).filter(Boolean),n[1]=n[1].slice(0,l)),(i=t(s.call(this,n[1].trim(),r),r))&&n[0]===e&&!He(i))return i;He(i)||(i=Ve(i)),i||(this.logger.warn("missed to resolve ".concat(n[1]," for nesting ").concat(e)),i=""),u.length&&(i=u.reduce(function(e,t){return a.format(e,t,o.lng,E(E({},o),{},{interpolationkey:n[1].trim()}))},i.trim())),e=e.replace(n[0],i),this.regexp.lastIndex=0}return e}}])}(),Et=function(e){var t=e.toLowerCase().trim(),n={};if(e.indexOf("(")>-1){var i=e.split("(");t=i[0].toLowerCase().trim();var a=i[1].substring(0,i[1].length-1);if("currency"===t&&a.indexOf(":")<0)n.currency||(n.currency=a.trim());else if("relativetime"===t&&a.indexOf(":")<0)n.range||(n.range=a.trim());else{a.split(";").forEach(function(e){if(e){var t=e.split(":"),i=r(u=t)||b(u)||P(u)||x(),a=i[0],o=i.slice(1).join(":").trim().replace(/^'+|'+$/g,""),s=a.trim();n[s]||(n[s]=o),"false"===o&&(n[s]=!1),"true"===o&&(n[s]=!0),isNaN(o)||(n[s]=parseInt(o,10))}var u})}}return{formatName:t,formatOptions:n}},kt=function(e){var t={};return function(n,i,r){var a=r;r&&r.interpolationkey&&r.formatParams&&r.formatParams[r.interpolationkey]&&r[r.interpolationkey]&&(a=E(E({},a),{},m({},r.interpolationkey,void 0)));var o=i+JSON.stringify(a),s=t[o];return s||(s=e(it(i),r),t[o]=s),s(n)}},wt=function(e){return function(t,n,i){return e(it(n),i)(t)}},Dt=function(){return p(function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};u(this,e),this.logger=ot.create("formatter"),this.options=t,this.init(t)},[{key:"init",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{interpolation:{}};this.formatSeparator=t.interpolation.formatSeparator||",";var n=t.cacheInBuiltFormats?kt:wt;this.formats={number:n(function(e,t){var n=new Intl.NumberFormat(e,E({},t));return function(e){return n.format(e)}}),currency:n(function(e,t){var n=new Intl.NumberFormat(e,E(E({},t),{},{style:"currency"}));return function(e){return n.format(e)}}),datetime:n(function(e,t){var n=new Intl.DateTimeFormat(e,E({},t));return function(e){return n.format(e)}}),relativetime:n(function(e,t){var n=new Intl.RelativeTimeFormat(e,E({},t));return function(e){return n.format(e,t.range||"day")}}),list:n(function(e,t){var n=new Intl.ListFormat(e,E({},t));return function(e){return n.format(e)}})}}},{key:"add",value:function(e,t){this.formats[e.toLowerCase().trim()]=t}},{key:"addCached",value:function(e,t){this.formats[e.toLowerCase().trim()]=kt(t)}},{key:"format",value:function(e,t,n){var i=this,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},a=t.split(this.formatSeparator);if(a.length>1&&a[0].indexOf("(")>1&&a[0].indexOf(")")<0&&a.find(function(e){return e.indexOf(")")>-1})){var o=a.findIndex(function(e){return e.indexOf(")")>-1});a[0]=[a[0]].concat(A(a.splice(1,o))).join(this.formatSeparator)}return a.reduce(function(e,t){var a=Et(t),o=a.formatName,s=a.formatOptions;if(i.formats[o]){var u=e;try{var l,c=(null==r||null===(l=r.formatParams)||void 0===l?void 0:l[r.interpolationkey])||{},h=c.locale||c.lng||r.locale||r.lng||n;u=i.formats[o](e,h,E(E(E({},s),r),c))}catch(e){i.logger.warn(e)}return u}return i.logger.warn("there was no format function for ".concat(o)),e},e)}}])}(),At=function(e){function t(e,n,i){var r,a,s,l=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return u(this,t),(s=o(this,t)).backend=e,s.store=n,s.services=i,s.languageUtils=i.languageUtils,s.options=l,s.logger=ot.create("backendConnector"),s.waitingReads=[],s.maxParallelReads=l.maxParallelReads||10,s.readingCalls=0,s.maxRetries=l.maxRetries>=0?l.maxRetries:5,s.retryTimeout=l.retryTimeout>=1?l.retryTimeout:350,s.state={},s.queue=[],null===(r=s.backend)||void 0===r||null===(a=r.init)||void 0===a||a.call(r,i,l.backend,l),s}return v(t,e),p(t,[{key:"queueLoad",value:function(e,t,n,i){var r=this,a={},o={},s={},u={};return e.forEach(function(e){var i=!0;t.forEach(function(t){var s="".concat(e,"|").concat(t);!n.reload&&r.store.hasResourceBundle(e,t)?r.state[s]=2:r.state[s]<0||(1===r.state[s]?void 0===o[s]&&(o[s]=!0):(r.state[s]=1,i=!1,void 0===o[s]&&(o[s]=!0),void 0===a[s]&&(a[s]=!0),void 0===u[t]&&(u[t]=!0)))}),i||(s[e]=!0)}),(Object.keys(a).length||Object.keys(o).length)&&this.queue.push({pending:o,pendingCount:Object.keys(o).length,loaded:{},errors:[],callback:i}),{toLoad:Object.keys(a),pending:Object.keys(o),toLoadLanguages:Object.keys(s),toLoadNamespaces:Object.keys(u)}}},{key:"loaded",value:function(e,t,n){var i=e.split("|"),r=i[0],a=i[1];t&&this.emit("failedLoading",r,a,t),!t&&n&&this.store.addResourceBundle(r,a,n,void 0,void 0,{skipCopy:!0}),this.state[e]=t?-1:2,t&&n&&(this.state[e]=0);var o={};this.queue.forEach(function(n){var i,s,u,l,c;i=n.loaded,s=a,u=Je(i,[r],Object),l=u.obj,c=u.k,l[c]=l[c]||[],l[c].push(s),function(e,t){void 0!==e.pending[t]&&(delete e.pending[t],e.pendingCount--)}(n,e),t&&n.errors.push(t),0!==n.pendingCount||n.done||(Object.keys(n.loaded).forEach(function(e){o[e]||(o[e]={});var t=n.loaded[e];t.length&&t.forEach(function(t){void 0===o[e][t]&&(o[e][t]=!0)})}),n.done=!0,n.errors.length?n.callback(n.errors):n.callback())}),this.emit("loaded",o),this.queue=this.queue.filter(function(e){return!e.done})}},{key:"read",value:function(e,t,n){var i=this,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,a=arguments.length>4&&void 0!==arguments[4]?arguments[4]:this.retryTimeout,o=arguments.length>5?arguments[5]:void 0;if(!e.length)return o(null,{});if(this.readingCalls>=this.maxParallelReads)this.waitingReads.push({lng:e,ns:t,fcName:n,tried:r,wait:a,callback:o});else{this.readingCalls++;var s=function(s,u){if(i.readingCalls--,i.waitingReads.length>0){var l=i.waitingReads.shift();i.read(l.lng,l.ns,l.fcName,l.tried,l.wait,l.callback)}s&&u&&r<i.maxRetries?setTimeout(function(){i.read.call(i,e,t,n,r+1,2*a,o)},a):o(s,u)},u=this.backend[n].bind(this.backend);if(2!==u.length)return u(e,t,s);try{var l=u(e,t);l&&"function"==typeof l.then?l.then(function(e){return s(null,e)}).catch(s):s(null,l)}catch(e){s(e)}}}},{key:"prepareLoading",value:function(e,t){var n=this,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=arguments.length>3?arguments[3]:void 0;if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),r&&r();He(e)&&(e=this.languageUtils.toResolveHierarchy(e)),He(t)&&(t=[t]);var a=this.queueLoad(e,t,i,r);if(!a.toLoad.length)return a.pending.length||r(),null;a.toLoad.forEach(function(e){n.loadOne(e)})}},{key:"load",value:function(e,t,n){this.prepareLoading(e,t,{},n)}},{key:"reload",value:function(e,t,n){this.prepareLoading(e,t,{reload:!0},n)}},{key:"loadOne",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",i=e.split("|"),r=i[0],a=i[1];this.read(r,a,"read",void 0,void 0,function(i,o){i&&t.logger.warn("".concat(n,"loading namespace ").concat(a," for language ").concat(r," failed"),i),!i&&o&&t.logger.log("".concat(n,"loaded namespace ").concat(a," for language ").concat(r),o),t.loaded(e,i,o)})}},{key:"saveMissing",value:function(e,t,n,i,r){var a,o,s,u=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{},l=arguments.length>6&&void 0!==arguments[6]?arguments[6]:function(){};if(null===(a=this.services)||void 0===a||null===(a=a.utils)||void 0===a||!a.hasLoadedNamespace||null!==(o=this.services)&&void 0!==o&&null!==(o=o.utils)&&void 0!==o&&o.hasLoadedNamespace(t)){if(null!=n&&""!==n){if(null!==(s=this.backend)&&void 0!==s&&s.create){var c=E(E({},u),{},{isUpdate:r}),h=this.backend.create.bind(this.backend);if(h.length<6)try{var d;(d=5===h.length?h(e,t,n,i,c):h(e,t,n,i))&&"function"==typeof d.then?d.then(function(e){return l(null,e)}).catch(l):l(null,d)}catch(e){l(e)}else h(e,t,n,i,l,c)}e&&e[0]&&this.store.addResource(e[0],t,n,i)}}else this.logger.warn('did not save key "'.concat(n,'" as the namespace "').concat(t,'" was not yet loaded'),"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")}}])}(st),Ct=function(){return{debug:!1,initAsync:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!1,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:function(e){var t={};if("object"===T(e[1])&&(t=e[1]),He(e[1])&&(t.defaultValue=e[1]),He(e[2])&&(t.tDescription=e[2]),"object"===T(e[2])||"object"===T(e[3])){var n=e[3]||e[2];Object.keys(n).forEach(function(e){t[e]=n[e]})}return t},interpolation:{escapeValue:!0,format:function(e){return e},prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0},cacheInBuiltFormats:!0}},Tt=function(e){var t,n;return He(e.ns)&&(e.ns=[e.ns]),He(e.fallbackLng)&&(e.fallbackLng=[e.fallbackLng]),He(e.fallbackNS)&&(e.fallbackNS=[e.fallbackNS]),(null===(t=e.supportedLngs)||void 0===t||null===(n=t.indexOf)||void 0===n?void 0:n.call(t,"cimode"))<0&&(e.supportedLngs=e.supportedLngs.concat(["cimode"])),"boolean"==typeof e.initImmediate&&(e.initAsync=e.initImmediate),e},Pt=function(){},Ft="__i18next_supportNoticeShown",Bt=function(e){function t(){var e,n,i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=arguments.length>1?arguments[1]:void 0;if(u(this,t),(e=o(this,t)).options=Tt(i),e.services={},e.logger=ot,e.modules={external:[]},n=e,Object.getOwnPropertyNames(Object.getPrototypeOf(n)).forEach(function(e){"function"==typeof n[e]&&(n[e]=n[e].bind(n))}),r&&!e.isInitialized&&!i.isClone){if(!e.options.initAsync)return e.init(i,r),k(e,e);setTimeout(function(){e.init(i,r)},0)}return e}return v(t,e),p(t,[{key:"init",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;this.isInitializing=!0,"function"==typeof t&&(n=t,t={}),null==t.defaultNS&&t.ns&&(He(t.ns)?t.defaultNS=t.ns:t.ns.indexOf("translation")<0&&(t.defaultNS=t.ns[0]));var i,r,a,o,s,u,l=Ct();this.options=E(E(E({},l),this.options),Tt(t)),this.options.interpolation=E(E({},l.interpolation),this.options.interpolation),void 0!==t.keySeparator&&(this.options.userDefinedKeySeparator=t.keySeparator),void 0!==t.nsSeparator&&(this.options.userDefinedNsSeparator=t.nsSeparator),"function"!=typeof this.options.overloadTranslationOptionHandler&&(this.options.overloadTranslationOptionHandler=l.overloadTranslationOptionHandler),!1===this.options.showSupportNotice||((null==(i=this)||null===(r=i.modules)||void 0===r||null===(r=r.backend)||void 0===r||null===(r=r.name)||void 0===r?void 0:r.indexOf("Locize"))>0||(null==i||null===(a=i.modules)||void 0===a||null===(a=a.backend)||void 0===a||null===(a=a.constructor)||void 0===a||null===(a=a.name)||void 0===a?void 0:a.indexOf("Locize"))>0||null!=i&&null!==(o=i.options)&&void 0!==o&&null!==(o=o.backend)&&void 0!==o&&o.backends&&i.options.backend.backends.some(function(e){var t,n;return(null==e||null===(t=e.name)||void 0===t?void 0:t.indexOf("Locize"))>0||(null==e||null===(n=e.constructor)||void 0===n||null===(n=n.name)||void 0===n?void 0:n.indexOf("Locize"))>0})||null!=i&&null!==(s=i.options)&&void 0!==s&&null!==(s=s.backend)&&void 0!==s&&s.projectId||null!=i&&null!==(u=i.options)&&void 0!==u&&null!==(u=u.backend)&&void 0!==u&&u.backendOptions&&i.options.backend.backendOptions.some(function(e){return null==e?void 0:e.projectId}))||"undefined"!=typeof globalThis&&globalThis[Ft]||("undefined"!=typeof console&&void 0!==console.info&&console.info("🌐 i18next is made possible by our own product, Locize — consider powering your project with managed localization (AI, CDN, integrations): https://locize.com 💙"),"undefined"!=typeof globalThis&&(globalThis[Ft]=!0));var c=function(e){return e?"function"==typeof e?new e:e:null};if(!this.options.isClone){var h;this.modules.logger?ot.init(c(this.modules.logger),this.options):ot.init(null,this.options),h=this.modules.formatter?this.modules.formatter:Dt;var d=new mt(this.options);this.store=new ut(this.options.resources,this.options);var p=this.services;p.logger=ot,p.resourceStore=this.store,p.languageUtils=d,p.pluralResolver=new yt(d,{prepend:this.options.pluralSeparator,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),this.options.interpolation.format&&this.options.interpolation.format!==l.interpolation.format&&this.logger.deprecate("init: you are still using the legacy format function, please use the new approach: https://www.i18next.com/translation-function/formatting"),!h||this.options.interpolation.format&&this.options.interpolation.format!==l.interpolation.format||(p.formatter=c(h),p.formatter.init&&p.formatter.init(p,this.options),this.options.interpolation.format=p.formatter.format.bind(p.formatter)),p.interpolator=new St(this.options),p.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},p.backendConnector=new At(c(this.modules.backend),p.resourceStore,p,this.options),p.backendConnector.on("*",function(t){for(var n=arguments.length,i=new Array(n>1?n-1:0),r=1;r<n;r++)i[r-1]=arguments[r];e.emit.apply(e,[t].concat(i))}),this.modules.languageDetector&&(p.languageDetector=c(this.modules.languageDetector),p.languageDetector.init&&p.languageDetector.init(p,this.options.detection,this.options)),this.modules.i18nFormat&&(p.i18nFormat=c(this.modules.i18nFormat),p.i18nFormat.init&&p.i18nFormat.init(this)),this.translator=new ft(this.services,this.options),this.translator.on("*",function(t){for(var n=arguments.length,i=new Array(n>1?n-1:0),r=1;r<n;r++)i[r-1]=arguments[r];e.emit.apply(e,[t].concat(i))}),this.modules.external.forEach(function(t){t.init&&t.init(e)})}if(this.format=this.options.interpolation.format,n||(n=Pt),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){var f=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);f.length>0&&"dev"!==f[0]&&(this.options.lng=f[0])}this.services.languageDetector||this.options.lng||this.logger.warn("init: no languageDetector is used and no lng is defined");["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"].forEach(function(t){e[t]=function(){var n;return(n=e.store)[t].apply(n,arguments)}});["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(function(t){e[t]=function(){var n;return(n=e.store)[t].apply(n,arguments),e}});var m=ze(),g=function(){var t=function(t,i){e.isInitializing=!1,e.isInitialized&&!e.initializedStoreOnce&&e.logger.warn("init: i18next is already initialized. You should call init just once!"),e.isInitialized=!0,e.options.isClone||e.logger.log("initialized",e.options),e.emit("initialized",e.options),m.resolve(i),n(t,i)};if(e.languages&&!e.isInitialized)return t(null,e.t.bind(e));e.changeLanguage(e.options.lng,t)};return this.options.resources||!this.options.initAsync?g():setTimeout(g,0),m}},{key:"loadResources",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Pt,i=He(e)?e:this.language;if("function"==typeof e&&(n=e),!this.options.resources||this.options.partialBundledLanguages){var r,a;if("cimode"===(null==i?void 0:i.toLowerCase())&&(!this.options.preload||0===this.options.preload.length))return n();var o=[],s=function(e){e&&("cimode"!==e&&t.services.languageUtils.toResolveHierarchy(e).forEach(function(e){"cimode"!==e&&o.indexOf(e)<0&&o.push(e)}))};if(i)s(i);else this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(function(e){return s(e)});null===(r=this.options.preload)||void 0===r||null===(a=r.forEach)||void 0===a||a.call(r,function(e){return s(e)}),this.services.backendConnector.load(o,this.options.ns,function(e){e||t.resolvedLanguage||!t.language||t.setResolvedLanguage(t.language),n(e)})}else n(null)}},{key:"reloadResources",value:function(e,t,n){var i=ze();return"function"==typeof e&&(n=e,e=void 0),"function"==typeof t&&(n=t,t=void 0),e||(e=this.languages),t||(t=this.options.ns),n||(n=Pt),this.services.backendConnector.reload(e,t,function(e){i.resolve(),n(e)}),i}},{key:"use",value:function(e){if(!e)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!e.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return"backend"===e.type&&(this.modules.backend=e),("logger"===e.type||e.log&&e.warn&&e.error)&&(this.modules.logger=e),"languageDetector"===e.type&&(this.modules.languageDetector=e),"i18nFormat"===e.type&&(this.modules.i18nFormat=e),"postProcessor"===e.type&<.addPostProcessor(e),"formatter"===e.type&&(this.modules.formatter=e),"3rdParty"===e.type&&this.modules.external.push(e),this}},{key:"setResolvedLanguage",value:function(e){if(e&&this.languages&&!(["cimode","dev"].indexOf(e)>-1)){for(var t=0;t<this.languages.length;t++){var n=this.languages[t];if(!(["cimode","dev"].indexOf(n)>-1)&&this.store.hasLanguageSomeTranslations(n)){this.resolvedLanguage=n;break}}!this.resolvedLanguage&&this.languages.indexOf(e)<0&&this.store.hasLanguageSomeTranslations(e)&&(this.resolvedLanguage=e,this.languages.unshift(e))}}},{key:"changeLanguage",value:function(e,t){var n=this;this.isLanguageChangingTo=e;var i=ze();this.emit("languageChanging",e);var r=function(e){n.language=e,n.languages=n.services.languageUtils.toResolveHierarchy(e),n.resolvedLanguage=void 0,n.setResolvedLanguage(e)},a=function(a){e||a||!n.services.languageDetector||(a=[]);var o,s,u=He(a)?a:a&&a[0],l=n.store.hasLanguageSomeTranslations(u)?u:n.services.languageUtils.getBestMatchFromCodes(He(a)?[a]:a);l&&(n.language||r(l),n.translator.language||n.translator.changeLanguage(l),null===(o=n.services.languageDetector)||void 0===o||null===(s=o.cacheUserLanguage)||void 0===s||s.call(o,l));n.loadResources(l,function(a){!function(a,o){o?n.isLanguageChangingTo===e&&(r(o),n.translator.changeLanguage(o),n.isLanguageChangingTo=void 0,n.emit("languageChanged",o),n.logger.log("languageChanged",o)):n.isLanguageChangingTo=void 0,i.resolve(function(){return n.t.apply(n,arguments)}),t&&t(a,function(){return n.t.apply(n,arguments)})}(a,l)})};return e||!this.services.languageDetector||this.services.languageDetector.async?!e&&this.services.languageDetector&&this.services.languageDetector.async?0===this.services.languageDetector.detect.length?this.services.languageDetector.detect().then(a):this.services.languageDetector.detect(a):a(e):a(this.services.languageDetector.detect()),i}},{key:"getFixedT",value:function(e,t,n){var i=this,r=function(e,t){var a;if("object"!==T(t)){for(var o=arguments.length,s=new Array(o>2?o-2:0),u=2;u<o;u++)s[u-2]=arguments[u];a=i.options.overloadTranslationOptionHandler([e,t].concat(s))}else a=E({},t);a.lng=a.lng||r.lng,a.lngs=a.lngs||r.lngs,a.ns=a.ns||r.ns,""!==a.keyPrefix&&(a.keyPrefix=a.keyPrefix||n||r.keyPrefix);var l,c=i.options.keySeparator||".";return a.keyPrefix&&Array.isArray(e)?l=e.map(function(e){return"function"==typeof e&&(e=ht(e,E(E({},i.options),t))),"".concat(a.keyPrefix).concat(c).concat(e)}):("function"==typeof e&&(e=ht(e,E(E({},i.options),t))),l=a.keyPrefix?"".concat(a.keyPrefix).concat(c).concat(e):e),i.t(l,a)};return He(e)?r.lng=e:r.lngs=e,r.ns=t,r.keyPrefix=n,r}},{key:"t",value:function(){for(var e,t=arguments.length,n=new Array(t),i=0;i<t;i++)n[i]=arguments[i];return null===(e=this.translator)||void 0===e?void 0:e.translate.apply(e,n)}},{key:"exists",value:function(){for(var e,t=arguments.length,n=new Array(t),i=0;i<t;i++)n[i]=arguments[i];return null===(e=this.translator)||void 0===e?void 0:e.exists.apply(e,n)}},{key:"setDefaultNamespace",value:function(e){this.options.defaultNS=e}},{key:"hasLoadedNamespace",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;var i=n.lng||this.resolvedLanguage||this.languages[0],r=!!this.options&&this.options.fallbackLng,a=this.languages[this.languages.length-1];if("cimode"===i.toLowerCase())return!0;var o=function(e,n){var i=t.services.backendConnector.state["".concat(e,"|").concat(n)];return-1===i||0===i||2===i};if(n.precheck){var s=n.precheck(this,o);if(void 0!==s)return s}return!!this.hasResourceBundle(i,e)||(!(this.services.backendConnector.backend&&(!this.options.resources||this.options.partialBundledLanguages))||!(!o(i,e)||r&&!o(a,e)))}},{key:"loadNamespaces",value:function(e,t){var n=this,i=ze();return this.options.ns?(He(e)&&(e=[e]),e.forEach(function(e){n.options.ns.indexOf(e)<0&&n.options.ns.push(e)}),this.loadResources(function(e){i.resolve(),t&&t(e)}),i):(t&&t(),Promise.resolve())}},{key:"loadLanguages",value:function(e,t){var n=this,i=ze();He(e)&&(e=[e]);var r=this.options.preload||[],a=e.filter(function(e){return r.indexOf(e)<0&&n.services.languageUtils.isSupportedCode(e)});return a.length?(this.options.preload=r.concat(a),this.loadResources(function(e){i.resolve(),t&&t(e)}),i):(t&&t(),Promise.resolve())}},{key:"dir",value:function(e){var t,n;if(e||(e=this.resolvedLanguage||((null===(t=this.languages)||void 0===t?void 0:t.length)>0?this.languages[0]:this.language)),!e)return"rtl";try{var i=new Intl.Locale(e);if(i&&i.getTextInfo){var r=i.getTextInfo();if(r&&r.direction)return r.direction}}catch(e){}var a=(null===(n=this.services)||void 0===n?void 0:n.languageUtils)||new mt(Ct());return e.toLowerCase().indexOf("-latn")>1?"ltr":["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam","ckb"].indexOf(a.getLanguagePartFromCode(e))>-1||e.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}},{key:"cloneInstance",value:function(){var e=this,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Pt,r=n.forkResourceStore;r&&delete n.forkResourceStore;var a=E(E(E({},this.options),n),{isClone:!0}),o=new t(a);void 0===n.debug&&void 0===n.prefix||(o.logger=o.logger.clone(n));if(["store","services","language"].forEach(function(t){o[t]=e[t]}),o.services=E({},this.services),o.services.utils={hasLoadedNamespace:o.hasLoadedNamespace.bind(o)},r){var s=Object.keys(this.store.data).reduce(function(t,n){return t[n]=E({},e.store.data[n]),t[n]=Object.keys(t[n]).reduce(function(e,i){return e[i]=E({},t[n][i]),e},t[n]),t},{});o.store=new ut(s,a),o.services.resourceStore=o.store}if(n.interpolation){var u=E(E(E({},Ct().interpolation),this.options.interpolation),n.interpolation),l=E(E({},a),{},{interpolation:u});o.services.interpolator=new St(l)}return o.translator=new ft(o.services,a),o.translator.on("*",function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),i=1;i<t;i++)n[i-1]=arguments[i];o.emit.apply(o,[e].concat(n))}),o.init(a,i),o.translator.options=a,o.translator.backendConnector.services.utils={hasLoadedNamespace:o.hasLoadedNamespace.bind(o)},o}},{key:"toJSON",value:function(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}],[{key:"createInstance",value:function(){var e=new t(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},arguments.length>1?arguments[1]:void 0);return e.createInstance=t.createInstance,e}}])}(st),It=Bt.createInstance();It.createInstance,It.dir,It.init,It.loadResources,It.reloadResources,It.use,It.changeLanguage,It.getFixedT;var Lt=It.t;It.exists,It.setDefaultNamespace,It.hasLoadedNamespace,It.loadNamespaces,It.loadLanguages;var Ot={en:{translation:{settings:{phoneSync:{title:"Phone sync",subtitle:"Pair a phone to change settings from it",intro:"Scan the code with your phone's camera to pair it. No typing needed.",address:"Or open {{url}} on your phone and enter the code.",code:"Pairing code: {{code}}",waiting:"Phone sync needs AxoTube's TV service. On a Samsung TV, open this panel again in a few seconds. On other devices, phone sync is not available.",qrHint:"Scan this with your phone's camera. The code is in the QR, so there is nothing to type.",noQr:"No phone address found. Check that the TV is on the same Wi-Fi as your phone, then open this again."},ttSettings:{title:"AxoTube Settings",summary:"Open AxoTube Settings",madeByText:"Made by Aayush with ❤️"},seconds:"{{count}} s",minutes:"{{count}} min",hintBack:"◀ Back",hintClose:"◀ Close",common:{auto:"Auto",any:"Any"},segmentModes:{skip:"Skip automatically",show:"Show skip button",off:"Off"},ads:{title:"Ads & sponsors",subtitle:"Ad blocking and SponsorBlock",blockAds:"Block ads",paidPromotion:"Show paid promotion notices",sponsorBlock:"Enable SponsorBlock",playerTracking:"Block player ad tracking",adTelemetry:"Block ad telemetry",viewStats:"Block view statistics",liveVideos:"Hide Live shelf",topLiveGames:"Hide Top Live Games shelf",mostRelevant:"Hide Most Relevant shelf",segmentTypes:{title:"Segment types",subtitle:"Press OK to change a type. It cycles through: skip automatically, show a skip button, off."},segments:{sponsor:"Sponsors",intro:"Intros",outro:"Outros",interaction:"Interaction reminders",selfpromo:"Self-promotion",preview:"Previews and recaps",filler:"Tangents and jokes",music_offtopic:"Off-topic music"},highlightButton:"Show highlight button",notices:"Show SponsorBlock notices"},playback:{title:"Playback",subtitle:"Quality, speed and captions",quality:{title:"Video quality",subtitle:"Quality used when a video starts. The closest available one is used if needed."},codec:{title:"Video codec",subtitle:"Preferred codec. Any lets YouTube choose."},speedStep:{title:"Speed step",subtitle:"How much each speed button press changes the playback speed."},frameRate:{title:"Frame rate",subtitle:"Switch the TV's refresh rate to match the video.",match:"Match video frame rate",pause:{title:"Pause during switch",subtitle:"Playback pauses for this long while the TV changes its refresh rate."}},pauseInBackground:"Out-of-focus pause (also when menus or panels open)",remainingTime:"Show time remaining",captions:{title:"Captions",subtitle:"Turn captions on by default, and choose the language they use.",onByDefault:"Subtitles on by default",language:{title:"Subtitle language",subtitle:"Preferred language for automatic captions."},allowAuto:"Allow auto-generated captions",myLanguage:"Show captions in my language",otherLanguages:"Show other languages"},languages:{en:"English",hi:"Hindi",es:"Spanish",fr:"French",de:"German",pt:"Portuguese",ja:"Japanese",ko:"Korean",ru:"Russian"},experimental:{title:"Higher resolutions (experimental)",subtitle:"Lets YouTube offer resolutions above the TV screen size. Can stutter on limited TVs. Restarts the app when changed.",unlock:"Unlock 1440p and 4K",max:{title:"Maximum resolution",subtitle:"Highest resolution YouTube may offer while the unlock is on."}},panelShrink:{title:"Video size while reading",subtitle:"Shrinks the video when the description or comments are open.",on:"Shrink video for description and comments",size:{title:"Video size",subtitle:"How large the video stays while a panel is open."}}},playerControls:{title:"Player controls",subtitle:"Extra buttons in the player. Turn on the first option to use the others.",customize:"Extra player buttons",previousNext:"Previous and next",speed:"Speed button",superThanks:"Super Thanks button",miniPlayer:"Mini player button",pipInsteadOfMini:"Use picture-in-picture instead of mini player",onePress:"One-press remote mode (OK plays or pauses, left and right skip 10 s)",hints:{customize:"Master switch for the extra buttons below. Off shows YouTube's own player buttons only.",previousNext:"Adds previous and next buttons to the player. Needs the switch above.",speed:"Shows a button that changes the playback speed.",superThanks:"Shows or hides the Super Thanks button.",miniPlayer:"Adds a button that shrinks the video into a mini player.",pipInsteadOfMini:"That button opens picture-in-picture instead of the mini player.",paidPromotion:"Shows a notice on videos with paid promotion.",onePress:"Remote-friendly controls: OK plays or pauses, left and right skip 10 seconds."}},browsing:{title:"Browsing",subtitle:"Thumbnails, previews and what appears on screen",thumbnails:{title:"Thumbnails and titles",subtitle:"DeArrow shows community titles and thumbnails in place of clickbait. Service: dearrow.ajay.app"},hqThumbnails:"High-quality thumbnails",deArrowTitles:"DeArrow titles",deArrowThumbnails:"DeArrow thumbnails",previews:{title:"Video previews",subtitle:"Plays a short preview when a video is focused.",on:"Show video previews",length:"Preview length"},hideWatched:{title:"Hide watched videos",subtitle:"Hides videos you have mostly watched.",on:"Hide watched videos",threshold:{title:"Watched threshold",subtitle:"Videos watched past this percentage are hidden."},pages:{title:"Hide on these pages",subtitle:"Pages where watched videos are hidden."}},shorts:"Show Shorts",endScreens:"Hide end screen cards",longPress:"Long press OK to add to queue",stillWatching:'Show "Are you still watching?" prompts',deArrowPeek:"Long press shows the other title and thumbnail"},home:{title:"Home & sidebar",subtitle:"Startup page and sidebar items",startup:{title:"Startup page",subtitle:"The page AxoTube opens at launch."},reloadHome:"Reload home on startup",sidebarItems:{title:"Hide sidebar items",subtitle:"Selected items are hidden from the sidebar."},hideChannels:"Hide channels from the sidebar",sortSubscriptions:"Sort subscriptions A to Z"},appearance:{title:"Appearance",subtitle:"Colours, clock, dimming and performance",theme:{title:"Theme",subtitle:"Colours used across the interface.",presets:{title:"Preset",subtitle:"A ready-made colour set."},background:{title:"Background colour",subtitle:"Colour behind the main content."},text:{title:"Text colour",subtitle:"Colour of the text in the interface."}},colors:{default:"Default (dark)",black:"Black",darkGray:"Dark gray",charcoal:"Charcoal",navy:"Navy blue",darkRed:"Dark red",darkGreen:"Dark green",darkPurple:"Dark purple"},textColors:{default:"Default",white:"White",gray:"Gray",red:"Red",blue:"Blue",green:"Green",purple:"Purple",yellow:"Yellow"},dimming:{title:"Screen dimming",subtitle:"Dims the screen when you stop interacting.",on:"Dim the screen when idle",timeout:{title:"Dim after",subtitle:"How long to wait before the screen dims."},opacity:{title:"Dimming strength",subtitle:"How dark the screen gets."}},fullAnimations:"Full-quality animations",performance:"Performance mode (memory part applies after reload)",clock:{title:"Clock",subtitle:"Show the time on screen.",show:{title:"When to show",subtitle:"Always, or only while no video is playing.",off:"Off",always:"Always",notPlaying:"When no video is playing"},format:{title:"Time format",subtitle:"24-hour, or 12-hour with or without AM and PM.",h24:"24-hour (14:05)",h12:"12-hour with AM/PM (2:05 PM)",h12NoAmPm:"12-hour, no AM/PM (2:05)"},position:{title:"Position",subtitle:"Corner of the screen for the clock.",topLeft:"Top left",topRight:"Top right",bottomLeft:"Bottom left",bottomRight:"Bottom right"},seconds:"Show seconds"}},system:{title:"System",subtitle:"Memory, accounts and updates",whosWatching:{title:"Who's watching menu",subtitle:"Choose a profile when the app starts.",on:"Show who's watching menu",always:"Always show it",onExit:"Show when leaving the app"},signInReminder:"Sign-in reminder for guests",welcome:"Welcome message",updates:{title:"Updates",subtitle:"Version {{version}}. Checks for new releases.",checkNow:"Check for updates now",onStartup:"Check for updates on startup"},reload:"Reload AxoTube",restartCast:"Restart cast receiver"},about:{title:"About AxoTube",version:"Version {{version}}",scanMessage:"Scan the QR code to open {{name}}.",subtitle:"Versions and status",userscript:"✅ Userscript {{version}}, running",serviceOnline:"✅ Service {{version}}, online on port 8090",serviceOffline:"⚠️ Service not reachable on port 8090",proxyOnline:"✅ Proxy {{version}}, online on port 8081",proxyOffline:"⚠️ Proxy not reachable on port 8081",bundleCurrent:"📦 App bundle {{version}}",bundleUpdate:"📦 App bundle {{current}}, update {{latest}} ready",bundleUnknown:"📦 App bundle not checked yet",launchMode:"🚀 Launch mode: {{mode}}",launchUnknown:"🚀 Launch mode unknown while the service is not running",socials:{title:"🔗 Socials",subtitle:"Pick one to show its QR code.",githubHint:"Source code, releases and issues",discordHint:"Community chat"}},webConfig:{title:"Web config",subtitle:"Pairing code, phone address and service status",online:"AxoTube service: online",offline:"AxoTube service is not running, so the web config page is not available.",qrTitle:"📱 Pair with your phone",qrSubtitle:"Show a code for your phone to scan",rowHint:"Also on your phone: background image and more"},status:{checking:"Checking the services…"},advanced:{title:"Advanced",subtitle:"Diagnostics, user agent and launch mode",diagnostics:{title:"Diagnostics page",subtitle:"Launch log, versions and what the app last did"},userAgent:{title:"User agent",subtitle:"The browser identity YouTube sees. Takes effect after AxoTube reloads. The phone agent is experimental on TV.",samsung:"Samsung TV (default)",android:"Android phone (experimental)"},launch:{title:"Launch mode",subtitle:"Applies the next time AxoTube starts. SDB needs developer mode on the TV.",proxy:"Proxy (recommended)",debugger:"SDB debugger launch",proxyShort:"proxy",debuggerShort:"SDB debugger",saved:"Launch mode saved. It applies the next time AxoTube starts.",failed:"Could not save the launch mode. Is AxoTube running?"}},moreOnWeb:{text:"More settings, like a background image, are on the web config page."},axotube:{title:"AxoTube",subtitle:"Web config, updates, who’s watching and startup behaviour of AxoTube"}},welcomeMsg:{title:"Welcome to AxoTube",subtitle:"Go to settings and click on AxoTube Settings for settings."},sponsorblock:{segments:{sponsor:"sponsored segment",intro:"intro",outro:"outro",interaction:"interaction reminder",selfpromo:"self-promotion",preview:"recap or preview",filler:"tangents",music_offtopic:"non-music part",poi_highlight:"highlight"},toasts:{skipping:"Skipping {{segment}}",notSkipping:"Not skipping {{segment}} (was skipped {{count}} times)",skip:"Skip {{segment}}",skipToHighlight:"Skip to highlight",undone:"Skip undone: {{segment}}"}},app:{name:"axotube"},menu:{play:"Play",saveWatchLater:"Save to Watch Later",saveToPlaylist:"Save to Playlist",addToQueue:"Add to Queue"},player:{miniPlayer:"Mini Player",pictureInPicture:"Picture in Picture",speedControls:"Speed Controls",previous:"Previous",next:"Next",withAxotube:"with axotube"},toasts:{queueAdded:"Video added to queue.",queueAddFailed:"Nothing to add to the queue.",queueCleared:"Video queue cleared.",updateDownloading:"Downloading update, please wait...",upToDate:"You are on the latest version ({{version}}).",updateNoApk:"Version {{version}} is available, but no compatible APK was found in the release.",updateCheckFailed:"Could not check for updates.",serviceConnected:"Service connected",commandReceived:"Command received",pairingWithUrl:"Open {{url}} on your phone · code {{code}}",pairingCodeOnly:"Phone pairing code: {{code}}",updateApplyFailed:"The update could not be applied. Try again later.",castRestarted:"Cast receiver restarted. Phones should see the TV again shortly.",castRestarting:"Restarting cast receiver…",castRestartWait:"Cast receiver was just restarted. Try again in a few seconds.",castRestartFailed:"Could not restart the cast receiver.",castRestartNotRunning:"Cast discovery is not running. Restart the app to bring it back.",castRestartUnsupported:"Restarting cast is not available on this device."},playback:{retryPrompt:"Playback stopped at {{time}}. Press blue to retry from there."},updater:{reloadWhenPaused:"Update installed. It takes effect when playback pauses or the video ends.",modalTitle:"Update Available",modalBody:"A new version of axotube is available: {{latest}}\nCurrent version: {{current}}\nRelease date: {{date}}\nRelease notes:",unknownDate:"Unknown",updateNow:"Update Now",updateNowSubtitle:"Click to download the latest version.",remindLater:"Remind Me Later",remindLaterSubtitle:"Check for updates later.",modalBodyNew:"Version {{latest}} is available. You are on {{current}}. Update now and the page will reload.",applying:"Updating…"}}}};It.init({lng:"en",fallbackLng:"en",resources:Ot,debug:!1,interpolation:{escapeValue:!1}});var Rt;Rt||(Rt=1,function(){function e(e){return void 0===e?0:Number(e)}function t(e,t){return e!==t&&!(isNaN(e)&&isNaN(t))}self.DOMRect=function(n,i,r,a){var o,s,u,l,c,h,d,p;o=e(n),s=e(i),u=e(r),l=e(a),Object.defineProperties(this,{x:{get:function(){return o},set:function(e){t(o,e)&&(o=e,c=h=void 0)},enumerable:!0},y:{get:function(){return s},set:function(e){t(s,e)&&(s=e,d=p=void 0)},enumerable:!0},width:{get:function(){return u},set:function(e){t(u,e)&&(u=e,c=h=void 0)},enumerable:!0},height:{get:function(){return l},set:function(e){t(l,e)&&(l=e,d=p=void 0)},enumerable:!0},left:{get:function(){return void 0===c&&(c=o+Math.min(0,u)),c},enumerable:!0},right:{get:function(){return void 0===h&&(h=o+Math.max(0,u)),h},enumerable:!0},top:{get:function(){return void 0===d&&(d=s+Math.min(0,l)),d},enumerable:!0},bottom:{get:function(){return void 0===p&&(p=s+Math.max(0,l)),p},enumerable:!0}})}}());var Nt=null,Mt=null,_t=null,Ut=null,jt=null,Ht=!1,zt=[];function Vt(){try{return"undefined"==typeof window?null:window._yttv||null}catch(e){return null}}function Kt(e,t){try{var n=e[t],i=n&&n.instance;if(i&&"function"==typeof i.resolveCommand)return{root:n,instance:i}}catch(e){}return null}function Gt(e){if(jt)try{jt(e)}catch(e){}}function Wt(){var e=Vt();if(e){if(e===Nt&&null!==_t){var t=Kt(e,Mt);if(t&&t.root===_t&&t.instance===Ut)return Gt(t.instance),t.instance}Nt=e,_t=null,Ut=null,Mt=null;try{for(var n in e){var i=Kt(e,n);if(i)return Mt=n,_t=i.root,Ut=i.instance,Gt(i.instance),i.instance}}catch(e){}}try{if("undefined"!=typeof window&&"function"==typeof window._yttv_resolveCommand)return{resolveCommand:function(e,t){return window._yttv_resolveCommand(e,t)}}}catch(e){}return null}function Jt(){return!!Wt()}function Xt(e,t){var n=Wt();return n?{dispatched:!0,result:n.resolveCommand(e,t)}:{dispatched:!1}}function qt(e,t){return Xt(e,t).result}function Yt(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!e)return Promise.resolve(!1);var n=void 0===t.maxAttempts?50:t.maxAttempts,i=void 0===t.retryDelayMs?200:t.retryDelayMs;return new Promise(function(t){var r=0;!function a(){var o=Wt();if(o)try{o.resolveCommand(e),t(!0)}catch(e){try{console.warn("[AxoTube:nativeCommand] native command threw after dispatch attempt; not retrying",e)}catch(e){}t(!0)}else r>=n?t(!1):(r+=1,setTimeout(a,i))}()})}function Qt(){var e=Vt();if(!e)return!1;var t=!1;try{for(var n in e){var i=Kt(e,n);i&&(t=!0,Gt(i.instance))}}catch(e){}return t}var Zt=[250,1e3,3e3];function $t(){Qt();var e,t=f(zt);try{for(t.s();!(e=t.n()).done;){var n=e.value;clearTimeout(n)}}catch(e){t.e(e)}finally{t.f()}zt=Zt.map(function(e){return setTimeout(Qt,e)})}function en(e){return ln(Lt("menu.addToQueue"),{clickTrackingParams:null,playlistEditEndpoint:{customAction:{action:"ADD_TO_QUEUE",parameters:e}}})}function tn(e,t){return qt(e,t)}function nn(e,t,n){var i={title:{simpleText:e},subtitle:{simpleText:t},accessibilityData:{accessibilityData:{label:t?"".concat(e," - ").concat(t):e}},trackingParams:"CAEQlYkGGhMI"};n&&n.length>0&&(i.image={thumbnails:n}),tn({openPopupAction:{popupType:"TOAST",popup:{overlayToastRenderer:i}}})}function rn(e,t,n,i){var r=function(e,t,n,i){var r="string"==typeof e?{title:e,subtitle:""}:e||{title:"",subtitle:""},a={openPopupAction:{popupType:"MODAL",popup:{overlaySectionRenderer:{overlay:{overlayTwoPanelRenderer:{actionPanel:{overlayPanelRenderer:{header:{overlayPanelHeaderRenderer:r.overlayPanelHeaderRenderer||{title:{simpleText:r.title}}},content:t}},backButton:{buttonRenderer:{accessibilityData:{accessibilityData:{label:"Back"}},command:{signalAction:{signal:"POPUP_BACK"}}}}}},dismissalCommand:{signalAction:{signal:"POPUP_BACK"}}}},uniqueId:n}};return r.subtitle&&(a.openPopupAction.popup.overlaySectionRenderer.overlay.overlayTwoPanelRenderer.actionPanel.overlayPanelRenderer.header.overlayPanelHeaderRenderer.subtitle={simpleText:r.subtitle}),i&&(a.openPopupAction.shouldMatchUniqueId=!0,a.openPopupAction.updateAction=!0),a}(e,t,n,i);tn(r)}function an(e,t){return{overlayPanelItemListRenderer:{items:e,selectedIndex:t}}}function on(e,t,n){var i={compactLinkRenderer:{serviceEndpoint:{commandExecutorCommand:{commands:n}}}};return e&&(i.compactLinkRenderer.title={simpleText:e.title}),e&&e.subtitle&&(i.compactLinkRenderer.subtitle={simpleText:e.subtitle}),t&&(i.compactLinkRenderer.icon={iconType:t.icon}),t&&t.secondaryIcon&&(i.compactLinkRenderer.secondaryIcon={iconType:t.secondaryIcon}),i}function sn(e,t,n,i,r){return{timelyActionRenderer:{actionButtons:[{buttonRenderer:{isDisabled:!1,text:{runs:[{text:e}]},icon:{iconType:t},trackingParams:null,command:n}}],triggerTimeMs:i,timeoutMs:r,type:""}}}function un(e){return{clickTrackingParams:null,showMenuCommand:{contentId:e.videoId,thumbnail:{thumbnails:e.thumbnails},title:{simpleText:e.title},subtitle:{simpleText:e.subtitle},menu:{menuRenderer:{items:[cn(Lt("menu.play"),{clickTrackingParams:null,watchEndpoint:e.watchEndpointData}),ln(Lt("menu.saveWatchLater"),{clickTrackingParams:null,playlistEditEndpoint:{playlistId:"WL",actions:[{addedVideoId:e.videoId,action:"ACTION_ADD_VIDEO"}]}}),cn(Lt("menu.saveToPlaylist"),{clickTrackingParams:null,addToPlaylistEndpoint:{videoId:e.videoId}}),en(e.item)],trackingParams:null,accessibility:{accessibilityData:{label:"Video options"}}}}}}}function ln(e,t){return{menuServiceItemRenderer:{text:{runs:[{text:e}]},serviceEndpoint:t,trackingParams:null}}}function cn(e,t){return{menuNavigationItemRenderer:{text:{runs:[{text:e}]},navigationEndpoint:t,trackingParams:null}}}function hn(e){return{overlayMessageRenderer:{title:{simpleText:e}}}}function dn(e){return{qrCodeRenderer:{qrCodeImage:{thumbnails:[{url:e}]},style:"QR_CODE_RENDERER_STYLE_ATA_SIDESHEET",trackingParams:null}}}function pn(e,t,n,i){return{isDisabled:e,text:{runs:[{text:t}]},icon:{iconType:n},command:i,trackingParams:null}}function fn(e){try{return e&&"function"==typeof e.getInstance&&e.getInstance()||null}catch(e){return null}}function mn(e){if(!e)return null;try{var t=Object.getPrototypeOf(e);if(!t)return null;var n,i=f(Object.getOwnPropertyNames(t));try{for(i.s();!(n=i.n()).done;){var r=n.value,a=void 0;try{a=e[r]}catch(e){continue}if("function"==typeof a)try{if(a.toString().includes("ytlrActionRouter"))return a}catch(e){}}}catch(e){i.e(e)}finally{i.f()}}catch(e){}return null}function gn(){if(window._yttv){var e=null,t=null;try{for(var n in window._yttv){var i=void 0;try{i=window._yttv[n]}catch(e){continue}if(i&&"function"==typeof i.getInstance){var r=fn(i);if(r){try{if(i.toString().includes("ytlrActionRouter")){t=mn(e=r);break}}catch(e){}var a=mn(r);if(a){e=r,t=a;break}}}}}catch(e){return}if(e&&t){var o=null;try{for(var s in window._yttv){var u=void 0;try{u=window._yttv[s]}catch(e){continue}if("function"==typeof u)try{if(u.toString().includes("this.actionName")){o=u;break}}catch(e){}}}catch(e){}if(o)return{executeFunction:t.bind(e),commandFunction:o}}}}ke.addEventListener("configChange",function(e){if("disabledSidebarContents"===e.detail.key||"disableChannelsOnSidebar"===e.detail.key)try{var t=gn();t&&t.executeFunction(new t.commandFunction("reloadGuideAction"))}catch(e){console.warn("[AxoTube:customGuideAction] Guide reload failed:",e)}});var vn=null;var yn=["adSlot","adPlacements","playerAds","promo","Promo","hideLogo","tvMasthead","attestation","adBreak","adClientParams"],bn=["adPlacements","playerAds","adSlots","paidContentOverlay","streamingData","contents","endscreen","messages","entries","title","continuationContents","playerOverlays","transportControls","attestation","adBreakHeartbeatParams","playerResponse"];function xn(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function Sn(e){return!(!e||!e.adSlotRenderer)}function En(e){return!!(e&&e.tileRenderer&&("TVHTML5_TILE_RENDERER_TYPE_SHORTS"===e.tileRenderer.tvhtml5ShelfRendererType||e.tileRenderer.onSelectCommand&&e.tileRenderer.onSelectCommand.reelWatchEndpoint))}function kn(e){if(!e||"object"!==T(e))return!1;for(var t=Object.keys(e),n=0;n<t.length;n++)if(-1!==t[n].toLowerCase().indexOf("promo"))return!0;return!!(e.shelfRenderer&&e.shelfRenderer.tvhtml5Metadata&&e.shelfRenderer.tvhtml5Metadata.hideLogo)}function wn(e){return!(!e||"object"!==T(e)||!e.tvMastheadRenderer)}function Dn(e){if(!e)return"";var t=e.title||e.headerRenderer&&e.headerRenderer.tvHeaderRenderer&&e.headerRenderer.tvHeaderRenderer.title;return t?"string"==typeof t.simpleText?t.simpleText:t.runs&&t.runs[0]&&"string"==typeof t.runs[0].text?t.runs[0].text:"":""}function An(e){return e?/recommend/i.test(e)?null:/top\s+live\s+games?/i.test(e)?"topLiveGames":/most\s+relevant/i.test(e)?"mostRelevant":/^live(\s+now)?$/i.test(e.trim())?"live":null:null}function Cn(e,t){try{if("undefined"==typeof window)return;var n=window.__axotubeAdblockStats||(window.__axotubeAdblockStats={});n[e]=(n[e]||0)+(void 0===t?1:t)}catch(e){}}function Tn(){try{if("undefined"==typeof window||!0!==window.__axotubeAdblockDebug)return;if("undefined"==typeof console)return;var e=["[AxoTube:adblock]"].concat(Array.prototype.slice.call(arguments));console.log.apply(console,e)}catch(e){}}var Pn={};function Fn(e,t){var n=Pn[e];if(n||(n=Pn[e]={errors:0,open:!1}),!n.open)try{return t()}catch(t){return n.errors++,Cn("error:"+e),Tn("filter error",e,t),void(n.errors>=5&&(n.open=!0,"undefined"!=typeof console&&console.warn&&console.warn("[AxoTube:adblock] '"+e+"' disabled after 5 errors this session")))}}var Bn=["attestation","adBreakHeartbeatParams"];function In(e){for(var t=0,n=0;n<Bn.length;n++)xn(e,Bn[n])&&(delete e[Bn[n]],t++);return t}function Ln(e){var t=new Map;return{get:function(e){return t.get(e)},has:function(e){return t.has(e)},set:function(n,i){for(t.set(n,i);t.size>e;)t.delete(t.keys().next().value);return i},delete:function(e){return t.delete(e)},clear:function(){t.clear()}}}var On=["maxresdefault.jpg","sddefault.jpg","hqdefault.jpg","mqdefault.jpg","default.jpg"],Rn={"maxresdefault.jpg":{width:1280,height:720},"sddefault.jpg":{width:640,height:480},"hqdefault.jpg":{width:480,height:360},"mqdefault.jpg":{width:320,height:180},"default.jpg":{width:120,height:90}},Nn=Ln(256),Mn=new Map;function _n(e){if(!e||!e.includes("i.ytimg.com/vi/"))return null;var t=e.match(/\/vi\/([a-zA-Z0-9_-]+)\//);return t?t[1]:null}function Un(e){return Array.isArray(e)&&e.length>0&&e[0].width&&e[0].width>100}var jn=Ln(256);function Hn(e){var t,n=[],i=f(On);try{for(i.s();!(t=i.n()).done;){var r=t.value,a=Rn[r];n.push({url:"https://i.ytimg.com/vi/".concat(e,"/").concat(r),width:a.width,height:a.height})}}catch(e){i.e(e)}finally{i.f()}return n}function zn(e,t){if(e&&"object"===T(e))for(var n in e)"thumbnails"===n&&Un(e[n])?e[n]=t:"object"===T(e[n])&&zn(e[n],t)}var Vn,Kn=(Vn=5e3,function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=null;try{"function"==typeof AbortController&&(n=new AbortController)}catch(e){}var i=n?E(E({},t),{},{signal:n.signal}):t,r=null,a=new Promise(function(e,t){r=setTimeout(function(){try{n&&n.abort()}catch(e){}t(new Error("Fetch timed out after ".concat(Vn,"ms")))},Vn)});return Promise.race([fetch(e,i),a]).finally(function(){null!==r&&clearTimeout(r)})}),Gn=Ln(256),Wn=Ln(256);function Jn(e){return e&&e.titles&&0!==e.titles.length?e.titles.reduce(function(e,t){return e.votes>t.votes?e:t}).title:null}function Xn(e,t){if(!t||!t.thumbnails||0===t.thumbnails.length)return null;var n=t.thumbnails.reduce(function(e,t){return e.votes>t.votes?e:t});return void 0===n.timestamp||null===n.timestamp?null:Number.isFinite(Number(n.timestamp))?[{url:"https://dearrow-thumb.ajay.app/api/v1/getThumbnail?videoID=".concat(e,"&time=").concat(n.timestamp),width:1280,height:640}]:null}function qn(e,t,n,i,r){try{if(i&&n.titles&&n.titles.length>0){var a,o=Jn(n);null!==(a=e.tileRenderer)&&void 0!==a&&null!==(a=a.metadata)&&void 0!==a&&null!==(a=a.tileMetadataRenderer)&&void 0!==a&&a.title&&(e.tileRenderer.metadata.tileMetadataRenderer.title.simpleText=o)}if(r){var s,u=Xn(t,n);u&&null!==(s=e.tileRenderer)&&void 0!==s&&null!==(s=s.header)&&void 0!==s&&null!==(s=s.tileHeaderRenderer)&&void 0!==s&&s.thumbnail&&(e.tileRenderer.header.tileHeaderRenderer.thumbnail.thumbnails=u)}}catch(e){console.warn("[AxoTube:deArrow] Error processing DeArrow data:",e)}}function Yn(e){var t=Se("enableDeArrowTitles"),n=Se("enableDeArrowThumbnails"),i=Se("enableDeArrowPeek");if(t||n||i)for(var r=function(){var i=e[a];if(i.adSlotRenderer)return e.splice(a,1),0;if(!i.tileRenderer)return 0;var r=i.tileRenderer.contentId;if(!r)return 0;!function(e,t){var n,i,r,a;if(!Wn.get(t)){var o=e.tileRenderer;Wn.set(t,{title:null!==(n=null==o||null===(i=o.metadata)||void 0===i||null===(i=i.tileMetadataRenderer)||void 0===i||null===(i=i.title)||void 0===i?void 0:i.simpleText)&&void 0!==n?n:null,thumbnails:null!==(r=null==o||null===(a=o.header)||void 0===a||null===(a=a.tileHeaderRenderer)||void 0===a||null===(a=a.thumbnail)||void 0===a?void 0:a.thumbnails)&&void 0!==r?r:null})}}(i,r);var o={item:i,titlesEnabled:t,thumbnailsEnabled:n},s=Gn.get(r);if(s)return s.data?qn(i,r,s.data,t,n):Array.isArray(s.waiters)&&s.waiters.push(o),0;var u={data:null,waiters:[o]};Gn.set(r,u),Kn("https://sponsor.ajay.app/api/branding?videoID=".concat(r)).then(function(e){if(!e.ok)throw new Error("DeArrow HTTP ".concat(e.status));return e.json()}).then(function(e){u.data=e;var t=u.waiters.slice();u.waiters.length=0;var n,i=f(t);try{for(i.s();!(n=i.n()).done;){var a=n.value;qn(a.item,r,e,a.titlesEnabled,a.thumbnailsEnabled)}}catch(e){i.e(e)}finally{i.f()}}).catch(function(){Gn.get(r)===u&&Gn.delete(r)})},a=e.length-1;a>=0;a--)r()}function Qn(e){var t=e.tileRenderer,n={};return void 0!==t.contentType&&(n.contentType=t.contentType),void 0!==t.style&&(n.style=t.style),void 0!==t.contentId&&(n.contentId=t.contentId),void 0!==t.trackingParams&&(n.trackingParams=t.trackingParams),void 0!==t.metadata&&(n.metadata=ve(t.metadata)),void 0!==t.header&&(n.header=ve(t.header)),void 0!==t.onSelectCommand&&(n.onSelectCommand=ve(t.onSelectCommand)),{tileRenderer:n}}function Zn(e){return e.some(function(e){var t;return"ADD_TO_QUEUE"===(null==e||null===(t=e.menuServiceItemRenderer)||void 0===t||null===(t=t.serviceEndpoint)||void 0===t||null===(t=t.playlistEditEndpoint)||void 0===t||null===(t=t.customAction)||void 0===t?void 0:t.action)})}function $n(e){if(Fe()&&!/#\/watch/.test(location.hash||"")){var t,n=1e3*Se("previewLengthSeconds"),i=f(e);try{for(i.s();!(t=i.n()).done;){var r,a,o,s=t.value;if(s.tileRenderer){var u=null===(r=s.tileRenderer.onSelectCommand)||void 0===r?void 0:r.watchEndpoint;if(u&&!(null!==(a=s.tileRenderer)&&void 0!==a&&null!==(a=a.onFocusCommand)&&void 0!==a&&a.playbackEndpoint||null!==(o=s.tileRenderer)&&void 0!==o&&null!==(o=o.onFocusCommand)&&void 0!==o&&o.commandExecutorCommand)){var l=ve({watchEndpoint:u});s.tileRenderer.onFocusCommand={startInlinePlaybackCommand:{blockAdoption:!0,caption:!1,delayMs:3e3,durationMs:n,muted:!1,restartPlaybackBeforeSeconds:10,resumeVideo:!0,playbackEndpoint:l}}}}}}catch(e){i.e(e)}finally{i.f()}}}function ei(e){if(!Se("enableHideWatchedVideos"))return e;var t=Se("hideWatchedVideosPages");if(!t||!t.length)return e;var n=Se("hideWatchedVideosThreshold"),i=location.hash.substring(1),r=function(e){var t={},n=e.indexOf("?");if(-1===n)return t;for(var i=e.slice(n+1).split("&"),r=0;r<i.length;r++)if(i[r]){var a=i[r].indexOf("="),o=-1===a?i[r]:i[r].slice(0,a),s=-1===a?"":i[r].slice(a+1);try{t[decodeURIComponent(o)]=decodeURIComponent(s)}catch(e){t[o]=s}}return t}(i),a=r.browseId||r.browse_id||"",o="/"===i?"home":i.startsWith("/search")?"search":a.replace("FE","").replace("topics_","");return t.includes(o)?e.filter(function(e){var t;if(!e.tileRenderer)return!0;var i=null===(t=e.tileRenderer.header)||void 0===t||null===(t=t.tileHeaderRenderer)||void 0===t||null===(t=t.thumbnailOverlays)||void 0===t||null===(t=t.find(function(e){return e.thumbnailOverlayResumePlaybackRenderer}))||void 0===t?void 0:t.thumbnailOverlayResumePlaybackRenderer;return!i||(i.percentDurationWatched||0)<=n}):e}function ti(e,t){return function(e){if("eager"===Be()){var t,n=f(e);try{for(n.s();!(t=n.n()).done;){var i=t.value;if(i.tileRenderer)try{var r,a,o,s,u=null===(r=i.tileRenderer.onSelectCommand)||void 0===r||null===(r=r.watchEndpoint)||void 0===r?void 0:r.videoId;if(!u)continue;if((null===(a=i.tileRenderer.header)||void 0===a||null===(a=a.tileHeaderRenderer)||void 0===a||null===(a=a.thumbnail)||void 0===a?void 0:a.thumbnails)===jn.get(u))continue;var l=jn.get(u);l||(l=jn.set(u,Hn(u))),null!==(o=i.tileRenderer.header)&&void 0!==o&&null!==(o=o.tileHeaderRenderer)&&void 0!==o&&null!==(o=o.thumbnail)&&void 0!==o&&o.thumbnails&&(i.tileRenderer.header.tileHeaderRenderer.thumbnail.thumbnails=l),null!==(s=i.tileRenderer.onFocusCommand)&&void 0!==s&&null!==(s=s.startInlinePlaybackCommand)&&void 0!==s&&null!==(s=s.playbackEndpoint)&&void 0!==s&&null!==(s=s.startPlaylistItemEndpoint)&&void 0!==s&&null!==(s=s.playlistItemData)&&void 0!==s&&null!==(s=s.thumbnail)&&void 0!==s&&s.thumbnails&&(i.tileRenderer.onFocusCommand.startInlinePlaybackCommand.playbackEndpoint.startPlaylistItemEndpoint.playlistItemData.thumbnail.thumbnails=l),i.tileRenderer.onFocusCommand&&zn(i.tileRenderer.onFocusCommand,l)}catch(e){console.warn("[AxoTube:hqThumbnails] Error processing thumbnail:",e)}}}catch(e){n.e(e)}finally{n.f()}}}(e),Yn(e),function(e){if(Se("enableLongPress")){var t,n=f(e);try{for(n.s();!(t=n.n()).done;){var i,r,a,o,s,u,l=t.value;if(l.tileRenderer&&"TILE_STYLE_YTLR_DEFAULT"===l.tileRenderer.style&&l.tileRenderer.contentId&&null!==(i=l.tileRenderer.onSelectCommand)&&void 0!==i&&i.watchEndpoint)if(l.tileRenderer.onLongPressCommand){var c,h=null===(c=l.tileRenderer.onLongPressCommand)||void 0===c||null===(c=c.showMenuCommand)||void 0===c||null===(c=c.menu)||void 0===c||null===(c=c.menuRenderer)||void 0===c?void 0:c.items;Array.isArray(h)&&!Zn(h)&&h.push(en(Qn(l)))}else{var d=null===(r=l.tileRenderer.metadata)||void 0===r?void 0:r.tileMetadataRenderer;if(d&&null!==(a=l.tileRenderer.header)&&void 0!==a&&null!==(a=a.tileHeaderRenderer)&&void 0!==a&&null!==(a=a.thumbnail)&&void 0!==a&&a.thumbnails){var p=null===(o=d.lines)||void 0===o||null===(o=o[0])||void 0===o||null===(o=o.lineRenderer)||void 0===o||null===(o=o.items)||void 0===o||null===(o=o[0])||void 0===o||null===(o=o.lineItemRenderer)||void 0===o?void 0:o.text;if(p){var m=(null===(s=p.runs)||void 0===s||null===(s=s[0])||void 0===s?void 0:s.text)||p.simpleText||"",g=Qn(l),v=un({videoId:g.tileRenderer.contentId,thumbnails:g.tileRenderer.header.tileHeaderRenderer.thumbnail.thumbnails,title:(null===(u=d.title)||void 0===u?void 0:u.simpleText)||"",subtitle:m,watchEndpointData:g.tileRenderer.onSelectCommand.watchEndpoint,item:g});l.tileRenderer.onLongPressCommand=v}}}}}catch(e){n.e(e)}finally{n.f()}}}(e),t&&$n(e),ei(e)}function ni(e,t){for(var n=t||{},i=n.optional||{},r=e.length-1;r>=0;r--){var a=e[r];if(a&&"object"===T(a))if(n.removeAds&&(kn(a)||wn(a)))Cn(wn(a)?"bannerRemoved":"shelfRemoved"),e.splice(r,1);else if(a.shelfRenderer){var o=a.shelfRenderer,s=An(Dn(o));if(s&&i[s])Cn("optionalShelfRemoved"),e.splice(r,1);else{var u=o.content&&o.content.horizontalListRenderer;if(u&&u.items)if(n.removeShorts&&"TVHTML5_SHELF_RENDERER_TYPE_SHORTS"===o.tvhtml5ShelfRendererType)e.splice(r,1);else{var l=u.items,c=0;if(n.removeAds||n.removeShorts)(c=l.length-(l=l.filter(function(e){return!(n.removeAds&&Sn(e)||n.removeShorts&&En(e))})).length)&&(u.items=l,Cn("itemRemoved",c));c>0&&0===l.length?(Cn("emptyShelfRemoved"),e.splice(r,1)):u.items=ti(l,!1!==n.addPreviews)}}}}}var ii=["adSlotRenderer","promoShelfRenderer","tvMastheadRenderer"],ri=["adPlacements","adSlots"],ai=["playerAds"],oi=["attestation","adBreakHeartbeatParams"];function si(e){for(var t=0;t<ii.length;t++)if(xn(e,ii[t]))return!0;return!1}function ui(e,t,n){return n.signin?e:function(e,t){return e.filter(function(e){return!(e&&e[t])})}(e,t)}function li(e,t){var n=(Array.isArray(e.timelyActionRenderers)?e.timelyActionRenderers:[]).filter(function(e){return!function(e){var t=e&&e.timelyActionRenderer&&e.timelyActionRenderer.actionButtons;return!!Array.isArray(t)&&t.some(function(e){return e&&e.buttonRenderer&&e.buttonRenderer.command&&e.buttonRenderer.command.showEngagementPanelEndpoint&&e.buttonRenderer.command.showEngagementPanelEndpoint.customAction&&"SKIP"===e.buttonRenderer.command.showEngagementPanelEndpoint.customAction.action})}(e)});e.timelyActionRenderers=n.concat(t)}function ci(e,t){var n,i,r,a=null==e||null===(n=e.playerOverlays)||void 0===n?void 0:n.playerOverlayRenderer;a&&li(a,function(e){var t,n=[],i=e.sponsorManualSkips;if(!Array.isArray(i)||0===i.length||null===(t=window)||void 0===t||null===(t=t.sponsorblock)||void 0===t||!t.segments)return n;var r,a=f(window.sponsorblock.segments);try{for(a.s();!(r=a.n()).done;){var o=r.value;i.includes(o.category)&&n.push(sn(Lt("sponsorblock.toasts.skip",{segment:Lt("sponsorblock.segments.".concat(o.category))}),"SKIP_NEXT",{clickTrackingParams:null,showEngagementPanelEndpoint:{customAction:{action:"SKIP",parameters:{time:o.segment[1]}}}},1e3*o.segment[0],1e3*o.segment[1]-1e3*o.segment[0]))}}catch(e){a.e(e)}finally{a.f()}return n}(t));var o=null==e||null===(i=e.transportControls)||void 0===i||null===(i=i.transportControlsRenderer)||void 0===i?void 0:i.promotedActions;if(o&&t.sponsorHighlight&&null!==(r=window)&&void 0!==r&&null!==(r=r.sponsorblock)&&void 0!==r&&r.segments){var s=window.sponsorblock.segments.find(function(e){return"poi_highlight"===e.category});s&&o.push({type:"TRANSPORT_CONTROLS_BUTTON_TYPE_SPONSORBLOCK_HIGHLIGHT",button:{buttonRenderer:pn(!1,Lt("sponsorblock.toasts.skipToHighlight"),"SKIP_NEXT",{clickTrackingParams:null,customAction:{action:"SKIP",parameters:{time:s.segment[0]}}})}})}}var hi=["/pagead/","/ptracking","/eligibility_check"],di=["/api/stats/watchtime","/api/stats/playback","/api/stats/qoe","/api/stats/atr"];function pi(e,t){for(var n=0;n<t.length;n++)if(-1!==e.indexOf(t[n]))return!0;return!1}var fi,mi="data:application/json,{}";function gi(e){return function(e,t){return!!("string"==typeof e&&e&&(t.ads&&pi(e,hi)||t.viewStats&&pi(e,di)))}(e,{ads:!1!==Se("blockAdTelemetry"),viewStats:!!Se("blockViewStatsTelemetry")})}function vi(e,t,n){return{removeAds:t,removeShorts:!e.shorts,addPreviews:n,optional:{live:e.removeLiveVideos,topLiveGames:e.removeTopLiveGames,mostRelevant:e.removeMostRelevant}}}function yi(e){e.sort(function(e,t){var n,i,r,a,o,s,u=null==e||null===(n=e.tabRenderer)||void 0===n?void 0:n.title,l=null==t||null===(i=t.tabRenderer)||void 0===i?void 0:i.title;return null===(r=e.tabRenderer)||void 0===r||!r.selected||null!==(a=t.tabRenderer)&&void 0!==a&&a.selected?null!==(o=e.tabRenderer)&&void 0!==o&&o.selected||null===(s=t.tabRenderer)||void 0===s||!s.selected?u&&l?u.localeCompare(l):0:1:-1})}!function(e){if(e&&!e.__axotubeTelemetryHooks){e.__axotubeTelemetryHooks=!0;var t=e.XMLHttpRequest;if(t&&t.prototype&&"function"==typeof t.prototype.open){var n=t.prototype.open;t.prototype.open=function(e,t){var i=Array.prototype.slice.call(arguments);try{gi(t)&&(Cn("telemetryBlocked"),Tn("blocked XHR",t),i[0]="GET",i[1]=mi)}catch(e){Tn("telemetry XHR hook error",e)}return n.apply(this,i)}}if("function"==typeof e.fetch){var i=e.fetch;e.fetch=function(t){try{var n="string"==typeof t?t:t&&t.url;if(gi(n))return Cn("telemetryBlocked"),Tn("blocked fetch",n),"function"==typeof e.Response&&"function"==typeof Promise?Promise.resolve(new e.Response("{}",{status:200,headers:{"Content-Type":"application/json"}})):i.call(this,mi)}catch(e){Tn("telemetry fetch hook error",e)}return i.apply(this,arguments)}}var r=e.navigator;if(r&&"function"==typeof r.sendBeacon){var a=r.sendBeacon;r.sendBeacon=function(e){try{if(gi(e))return Cn("telemetryBlocked"),Tn("blocked beacon",e),!0}catch(e){Tn("telemetry beacon hook error",e)}return a.apply(this,arguments)}}}}("undefined"!=typeof window?window:null),function(e){if(vn)return vn;var t=JSON.parse,n=[];function i(i,r){var a=t.apply(this,arguments);if(!a||"object"!==T(a)||Array.isArray(a))return a;for(var o=0;o<e.length;o++)try{e[o](a,i)}catch(e){n[o]||(n[o]=!0,console.error("[AxoTube:responsePipeline] AxoTube JSON response filter failed:",e))}return a}function r(){var e=!1;try{if("undefined"==typeof window||!window._yttv)return!1;var t=window._yttv;for(var n in t)try{var r=t[n]&&t[n].JSON;r&&"function"==typeof r.parse&&(e=!0,r.parse!==i&&(r.parse=i))}catch(e){}}catch(e){}return e}JSON.parse=i,vn=i;var a=r();if("undefined"!=typeof window&&"function"==typeof setTimeout){var o=function(){a=r()||a,++s>=32||setTimeout(o,!a&&s<20?250:5e3)},s=0;setTimeout(o,a?5e3:250)}}([function(e,t){var n,i,r,a,o,s,u;if(function(e){for(var t=0;t<bn.length;t++)if(e[bn[t]])return!0;return!1}(e)){var l={adBlock:!!Se("enableAdBlock"),signin:!!Se("enableSigninReminder"),paidPromo:!!Se("enablePaidPromotionOverlay"),hideEndScreens:!!Se("enableHideEndScreenCards"),youThere:!!Se("enableYouThereRenderer"),shorts:!!Se("enableShorts"),sortSubscriptions:!!Se("sortSubscriptionsByAlphabet"),preferredCodec:Se("videoPreferredCodec"),blockPlayerTracking:!1!==Se("blockPlayerAdTracking"),removeLiveVideos:!!Se("removeLiveVideos"),removeTopLiveGames:!!Se("removeTopLiveGames"),removeMostRelevant:!!Se("removeMostRelevant"),sponsorManualSkips:Se("sponsorBlockManualSkips"),sponsorHighlight:!!Se("enableSponsorBlockHighlight")},c=function(e){if("string"!=typeof e)return!0;for(var t=0;t<yn.length;t++)if(-1!==e.indexOf(yn[t]))return!0;return!1}(t),h=l.adBlock&&c;h&&Fn("topLevelAds",function(){return function(e){e.adPlacements&&(e.adPlacements=[]),e.playerAds&&(e.playerAds=!1),e.adSlots&&(e.adSlots=[]),!Array.isArray(e)&&e.entries&&(e.entries=e.entries.filter(function(e){return!(e&&e.command&&e.command.reelWatchEndpoint&&e.command.reelWatchEndpoint.adClientParams&&e.command.reelWatchEndpoint.adClientParams.isAd)}))}(e)}),c&&l.blockPlayerTracking&&Fn("playerTracking",function(){return function(e){var t=In(e);return e.playerResponse&&"object"===T(e.playerResponse)&&(t+=In(e.playerResponse)),t&&Cn("playerTrackingRemoved",t),t}(e)}),Fn("streamFormats",function(){return function(e,t){if(e&&e.streamingData&&e.streamingData.adaptiveFormats&&t&&"any"!==t){var n=e.streamingData.adaptiveFormats;n.find(function(e){return e.mimeType&&e.mimeType.includes(t)})&&(e.streamingData.adaptiveFormats=n.filter(function(e){return!(!e.mimeType||!e.mimeType.startsWith("audio/"))||e.mimeType&&e.mimeType.includes(t)}))}}(e,l.preferredCodec)}),Fn("playerNotices",function(){return function(e,t){e.paidContentOverlay&&!t.paidPromo&&(e.paidContentOverlay=null),e.endscreen&&t.hideEndScreens&&(e.endscreen=null),e.messages&&Array.isArray(e.messages)&&!t.youThere&&(e.messages=e.messages.filter(function(e){return!(e&&e.youThereRenderer)}))}(e,l)});var d,p,f,m,g,v,y=null==e||null===(n=e.contents)||void 0===n||null===(n=n.tvBrowseRenderer)||void 0===n||null===(n=n.content)||void 0===n||null===(n=n.tvSurfaceContentRenderer)||void 0===n||null===(n=n.content)||void 0===n?void 0:n.sectionListRenderer;null!=y&&y.contents&&Fn("browse",function(){y.contents=ui(y.contents,"feedNudgeRenderer",l),h&&(y.contents=y.contents.filter(function(e){return!Sn(e)})),ni(y.contents,vi(l,h,!0))}),null!=e&&null!==(i=e.title)&&void 0!==i&&i.runs&&(d=e,v=function(e,t,n){var i={settingCategoryCollectionRenderer:{items:t,categoryId:e,focused:!1,trackingParams:"null"}};return n&&(i.settingCategoryCollectionRenderer.title={runs:[{text:n}]}),i}("axotube_category",[(p=Lt("settings.ttSettings.title"),f="axotube_open_action",m={customAction:{action:"AXO_SETTINGS_SHOW",parameters:[]}},g=Lt("settings.ttSettings.summary"),{settingActionRenderer:{title:{runs:[{text:p}]},serviceEndpoint:m,summary:{runs:[{text:g}]},trackingParams:"null",actionLabel:{runs:[{text:p}]},itemId:f,thumbnail:{thumbnails:[{url:"https://www.gstatic.com/ytlr/img/parent_code.png"}]}}})]),d.items&&Array.isArray(d.items)||(d.items=[]),d.items.unshift(v)),null!=e&&null!==(r=e.contents)&&void 0!==r&&null!==(r=r.sectionListRenderer)&&void 0!==r&&r.contents&&Fn("sectionList",function(){return ni(e.contents.sectionListRenderer.contents,vi(l,h,!0))}),null!=e&&null!==(a=e.continuationContents)&&void 0!==a&&null!==(a=a.sectionListContinuation)&&void 0!==a&&a.contents&&Fn("sectionContinuation",function(){return ni(e.continuationContents.sectionListContinuation.contents,vi(l,h,!0))}),null!=e&&null!==(o=e.continuationContents)&&void 0!==o&&null!==(o=o.horizontalListContinuation)&&void 0!==o&&o.items&&Fn("horizontalContinuation",function(){var t=e.continuationContents.horizontalListContinuation;t.items=ti(t.items,!1)});var b=null==e||null===(s=e.contents)||void 0===s||null===(s=s.tvBrowseRenderer)||void 0===s||null===(s=s.content)||void 0===s||null===(s=s.tvSecondaryNavRenderer)||void 0===s?void 0:s.sections;b&&Fn("secondaryNav",function(){for(var e=0;e<b.length;e++){var t=b[e].tvSecondaryNavSectionRenderer;if(t&&t.tabs){l.sortSubscriptions&&yi(t.tabs);for(var n=0;n<t.tabs.length;n++){var i,r,a=null===(i=t.tabs[n].tabRenderer.content)||void 0===i||null===(i=i.tvSurfaceContentRenderer)||void 0===i?void 0:i.content;null!=a&&null!==(r=a.sectionListRenderer)&&void 0!==r&&r.contents&&ni(a.sectionListRenderer.contents,vi(l,h,!0))}}}});var x=null==e||null===(u=e.contents)||void 0===u||null===(u=u.singleColumnWatchNextResults)||void 0===u||null===(u=u.pivot)||void 0===u?void 0:u.sectionListRenderer;x&&Fn("watchNext",function(){x.contents=ui(x.contents,"alertWithActionsRenderer",l),ni(x.contents,vi(l,h,!1)),function(e){if(window.queuedVideos.videos.length){var t=window.queuedVideos.videos.slice();t.unshift({tileRenderer:{contentType:"TILE_CONTENT_TYPE_VIDEO",metadata:{tileMetadataRenderer:{title:{simpleText:"Clear Queue"}}},onSelectCommand:{customAction:{action:"CLEAR_QUEUE"}},style:"TILE_STYLE_YTLR_DEFAULT"}});var n=t.findIndex(function(e){return e.contentId===window.queuedVideos.lastVideoId});e.unshift(function(e,t){return{shelfRenderer:{shelfHeaderRenderer:{title:{simpleText:e}},tvhtml5ShelfRendererType:"TVHTML5_SHELF_RENDERER_TYPE_GRID",content:{horizontalListRenderer:{items:t,selectedIndex:arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,visibleItemCount:3}}}}}("Queued Videos",t,-1!==n?n:0))}}(x.contents)}),Fn("sponsorBlock",function(){return ci(e,l)}),h&&"string"==typeof t&&t.length>=1e4&&Fn("fallback",function(){var t=function(e,t){for(var n=!(!t||!t.player),i=0,r=0,a=!1,o=[{node:e,depth:0}],s=0;s<o.length;){var u=o[s++],l=u.node;if(l&&"object"===T(l)){if(++r>2e3){a=!0;break}if(Array.isArray(l)){for(var c=l.length-1;c>=0;c--){var h=l[c];h&&"object"===T(h)&&si(h)&&(l.splice(c,1),i++)}if(u.depth<8)for(var d=0;d<l.length;d++)o.push({node:l[d],depth:u.depth+1})}else{for(var p=0;p<ri.length;p++){var f=ri[p];Array.isArray(l[f])&&l[f].length&&(l[f]=[],i++)}for(var m=0;m<ai.length;m++){var g=ai[m];l[g]&&(l[g]=!1,i++)}if(n)for(var v=0;v<oi.length;v++)xn(l,oi[v])&&(delete l[oi[v]],i++);if(u.depth<8)for(var y in l)xn(l,y)&&l[y]&&"object"===T(l[y])&&o.push({node:l[y],depth:u.depth+1})}}}return a&&Tn("fallback search hit node cap",2e3),{removed:i,nodes:r,truncated:a}}(e,{player:l.blockPlayerTracking});t.removed&&(Cn("knownPathMiss",t.removed),Cn("fallbackRemoved",t.removed),Tn("fallback removed",t.removed,"entries from",t.nodes,"nodes"))})}},function(e){if(Array.isArray(e.items)){var t=Se("disabledSidebarContents"),n=Se("disableChannelsOnSidebar");if(null!=t&&t.length||n)for(var i=0;i<e.items.length;i++){var r=e.items[i]&&e.items[i].guideSectionRenderer;if(r&&Array.isArray(r.items))for(var a=0;a<r.items.length;a++){var o,s=r.items[a]&&r.items[a].guideEntryRenderer;s&&((null!=t&&t.length&&t.includes(null===(o=s.icon)||void 0===o?void 0:o.iconType)||n&&null!=s&&s.thumbnail)&&(r.items.splice(a,1),a--))}}}}]),fi=JSON.stringify,JSON.stringify=function(e,t,n){var i,r=null==e||null===(i=e.playbackContext)||void 0===i?void 0:i.contentPlaybackContext;if(r&&!r.isInlinePlaybackNoAd){var a=Object.prototype.hasOwnProperty.call(r,"isInlinePlaybackNoAd"),o=r.isInlinePlaybackNoAd;try{return r.isInlinePlaybackNoAd=!0,fi.apply(this,arguments)}finally{a?r.isInlinePlaybackNoAd=o:delete r.isInlinePlaybackNoAd}}return fi.apply(this,arguments)},window.JSON.stringify=JSON.stringify;var bi={enablePremiumHbrSupport:!0,abortPendingPageRequests:!0,enableWebGlobalConfigHotConfig:!1,enablePremiumLiteUpsellLr:!1,enablePremiumPageDeeplink:!1,premiumLiteUpsellMaxTimesSeen:Number.MAX_SAFE_INTEGER,premiumLiteUpsellSeenRecentlyDays:9999,premiumLiteUpsellSerializedParams:"",enableIfaReporting:!1,enableIfaEncryption:!1,enableAdsClientLogging:!1,enableNetworkMonitoringUnified:!1,enableHiddenVisibilityLogging:!1,enableCobaltMetrics:!1,enableCobaltRequestHistograms:!1,enableCobaltHttpCache:!1,enableCobaltHttpCacheLogging:!1,reportAuthCredentialIntervalSeconds:0,oneClickSeek:"on",enableSkipPreviousButton5sThreshold:!0,enableCaptionsPersistence:!0,enableKabukiCaptionPersistence:!0,enableGridWatchNext:!0,enableNavLoadOnRightArrow:!0,enableRenderSingleSearchBar:!0,lazyLoadingAlgorithm:0,enableNewAudioSettingsMenu:!0,enableDirectEntryToShortsClient:!0,enableYtlrKeyboardForSearch:!0,enablePostPlayMode:!0,enablePaidTosViewer:!0,useReduxForPlayerStyles:!0};function xi(){try{return!("undefined"==typeof window||!window.tectonicConfig||"object"!==T(window.tectonicConfig.featureSwitches))&&(window.tectonicConfig.disallowUnifiedFlagAccess=!1,Object.assign(window.tectonicConfig.featureSwitches,bi),!0)}catch(e){return!1}}var Si=0;function Ei(e){if("off"!==Be()&&e&&!1!==e.isConnected){var t="",n=!1;if("IMG"===e.tagName&&e.src)t=e.src;else if(e.style&&e.style.backgroundImage){var i=e.style.backgroundImage.match(/url\(['"]?(.*?)['"]?\)/);i&&i[1]&&(t=i[1],n=!0)}if(t&&t.includes("i.ytimg.com/vi/")){var r=_n(t);if(r&&e.getAttribute("data-hq-upgraded")!==r){var a=t.match(/\/(maxresdefault|sddefault|hqdefault|mqdefault|default)\.jpg/),o=a?a[1]:"default",s=Nn.get(r);if(s&&o+".jpg"===s)e.setAttribute("data-hq-upgraded",r);else{e.setAttribute("data-hq-upgraded",r);var u=function(t){if(e&&!1!==e.isConnected){var i="https://i.ytimg.com/vi/"+r+"/"+t;n?e.style.backgroundImage='url("'+i+'")':(e.removeAttribute("srcset"),e.src=i)}};s?u(s):function(e,t){if(e&&"function"==typeof t){var n=Nn.get(e);if(n)t(n);else if(Mn.has(e))Mn.get(e).push(t);else{Mn.set(e,[t]);var i=function(t){var n=Mn.get(e)||[];Mn.delete(e),Nn.set(e,t),n.forEach(function(e){try{e(t)}catch(e){}})},r=function(t,n){var r=new Image;r.onload=function(){120===this.naturalWidth&&90===this.naturalHeight?n():i(t)},r.onerror=n,r.src="https://i.ytimg.com/vi/".concat(e,"/").concat(t)};r("maxresdefault.jpg",function(){r("sddefault.jpg",function(){return i("hqdefault.jpg")})})}}}(r,function(e){u(e)})}}}}}function ki(){var e={subtree:!0,childList:!0,attributes:!0,attributeFilter:["class","src","srcset","style"]},t=function(e){if(e){var t=e.shadowRoot||e,n=t.querySelector?t.querySelector("img"):null;!n&&t!==e&&e.querySelector&&(n=e.querySelector("img")),n&&Ei(n);var i=[];t.querySelectorAll?i=t.querySelectorAll('[style*="background-image"]'):e.querySelectorAll&&(i=e.querySelectorAll('[style*="background-image"]'));for(var r=0;r<i.length;r++)Ei(i[r]);e.style&&e.style.backgroundImage&&Ei(e)}},n=function(e){for(var t=e;t;){if(t.classList&&t.classList.contains("zylon-focus"))return t;if(t.closest){var n=t.closest(".zylon-focus");if(n)return n}var i=t.parentElement;if(!i&&t.getRootNode){var r=t.getRootNode();i=r&&r.host||null}t=i}return null},i=null,r=null,a=null,o=function(){if(!i){var o=document.getElementById("container")||document.body;o&&(i=new MutationObserver(function(e){r=r?r.concat(e):e,a||(a=requestAnimationFrame(function(){a=null;var e=r||[];r=null,function(e){try{for(var i=null,r=0;r<e.length;r++){var a=e[r],o=a.target;if("attributes"!==a.type||"class"!==a.attributeName)if("attributes"!==a.type){if("childList"===a.type){i||(i=document.querySelector(".zylon-focus"));for(var s=!1,u=0;u<a.addedNodes.length;u++){var l=a.addedNodes[u];if(1===l.nodeType)if(i&&(i===l||i.contains(l)||l.contains(i)))s||(t(i),s=!0);else if(!i&&l.querySelectorAll)for(var c=l.querySelectorAll(".zylon-focus"),h=0;h<c.length;h++)t(c[h])}}}else{if("src"===a.attributeName||"srcset"===a.attributeName){if("IMG"!==o.tagName)continue;var d="src"===a.attributeName?o.getAttribute("src"):o.getAttribute("srcset");if(!d||-1===d.indexOf("i.ytimg.com/vi/"))continue}else{if("style"!==a.attributeName)continue;var p=o.style&&o.style.backgroundImage;if(!p||-1===p.indexOf("i.ytimg.com/vi/"))continue}if(n(o)){var f=o.getAttribute("data-hq-upgraded"),m="";if("IMG"===o.tagName)m=o.src;else if(o.style&&o.style.backgroundImage){var g=o.style.backgroundImage.match(/url\(['"]?(.*?)['"]?\)/);m=g?g[1]:""}var v=m?_n(m):null;if(f&&f===v)continue;o.removeAttribute("data-hq-upgraded"),Ei(o)}}else o.classList&&o.classList.contains("zylon-focus")&&t(o)}}catch(e){console.error("[AxoTube:hqThumbnailsFocusObserver] Focus handling failed:",e)}}(e)}))}),i.observe(o,e))}},s=function(){"off"!==Be()?o():(i&&(i.disconnect(),i=null),a&&(cancelAnimationFrame(a),a=null),r=null)},u=["enableHqThumbnails","enablePerformanceMode","enableReducedMotion","enableLowMemoryMode"];ke.addEventListener("configChange",function(e){e.detail&&-1!==u.indexOf(e.detail.key)&&s()}),s()}!function e(){xi()||(Si+=1)>=50||setTimeout(e,200)}(),ke.addEventListener("configChange",function(){xi()}),"loading"===document.readyState?document.addEventListener("DOMContentLoaded",function(){setTimeout(ki,1e3)}):setTimeout(ki,1e3);var wi=function e(t){function n(e,t){return e>>>t|e<<32-t}for(var i,r,a=Math.pow,o=a(2,32),s="length",u="",l=[],c=8*t[s],h=e.h=e.h||[],d=e.k=e.k||[],p=d[s],f={},m=2;p<64;m++)if(!f[m]){for(i=0;i<313;i+=m)f[i]=m;h[p]=a(m,.5)*o|0,d[p++]=a(m,1/3)*o|0}for(t+="";t[s]%64-56;)t+="\0";for(i=0;i<t[s];i++){if((r=t.charCodeAt(i))>>8)return;l[i>>2]|=r<<(3-i)%4*8}for(l[l[s]]=c/o|0,l[l[s]]=c,r=0;r<l[s];){var g=l.slice(r,r+=16),v=h;for(h=h.slice(0,8),i=0;i<64;i++){var y=g[i-15],b=g[i-2],x=h[0],S=h[4],E=h[7]+(n(S,6)^n(S,11)^n(S,25))+(S&h[5]^~S&h[6])+d[i]+(g[i]=i<16?g[i]:g[i-16]+(n(y,7)^n(y,18)^y>>>3)+g[i-7]+(n(b,17)^n(b,19)^b>>>10)|0);(h=[E+((n(x,2)^n(x,13)^n(x,22))+(x&h[1]^x&h[2]^h[1]&h[2]))|0].concat(h))[4]=h[4]+E|0}for(i=0;i<8;i++)h[i]=h[i]+v[i]|0}for(i=0;i<8;i++)for(r=3;r+1;r--){var k=h[i]>>8*r&255;u+=(k<16?0:"")+k.toString(16)}return u},Di={player:[],video:[],videoId:[]},Ai=null,Ci=null,Ti=null,Pi=null,Fi=!1;function Bi(){return document.querySelector(".html5-video-player")}function Ii(){return document.querySelector("video")}function Li(e){try{var t=e&&"function"==typeof e.getVideoData&&e.getVideoData();if(t&&t.video_id)return t.video_id}catch(e){}var n=/[?&]v=([^&]+)/.exec(window.location.hash||"");return n?n[1]:null}function Oi(e,t,n){Di[e].slice().forEach(function(e){try{e(t,n)}catch(e){console.warn("[AxoTube:playerLifecycle] Listener failed:",e)}})}function Ri(){var e=Bi(),t=Ii(),n=Li(e),i=Ai,r=Ci,a=Ti;Ai=e,Ci=t,Ti=n,e!==i&&Oi("player",e,i),t!==r&&Oi("video",t,r),n!==a&&Oi("videoId",n,a)}function Ni(e,t){if("function"!=typeof t)throw new TypeError("A lifecycle listener must be a function");Fi||(Fi=!0,window.addEventListener("hashchange",Ri),document.addEventListener("DOMContentLoaded",Ri),Pi=setInterval(Ri,2e3),Ri()),Ri(),Di[e].push(t);var n="player"===e?Ai:"video"===e?Ci:Ti;try{t(n,null)}catch(e){console.warn("[AxoTube:playerLifecycle] Listener failed:",e)}return function(){var n=Di[e].indexOf(t);-1!==n&&Di[e].splice(n,1),Di.player.length||Di.video.length||Di.videoId.length||Fi&&(Fi=!1,clearInterval(Pi),Pi=null,window.removeEventListener("hashchange",Ri),document.removeEventListener("DOMContentLoaded",Ri),Ai=null,Ci=null,Ti=null)}}function Mi(e){return Ni("player",e)}function _i(e){return Ni("video",e)}function Ui(e){return Ni("videoId",e)}var ji=.05,Hi=0,zi={sponsor:{color:"#00d400",name:Lt("sponsorblock.segments.sponsor")||"sponsored segment"},intro:{color:"#00ffff",name:Lt("sponsorblock.segments.intro")||"intro"},outro:{color:"#0202ed",name:Lt("sponsorblock.segments.outro")||"outro"},interaction:{color:"#cc00ff",name:Lt("sponsorblock.segments.interaction")||"interaction reminder"},selfpromo:{color:"#ffff00",name:Lt("sponsorblock.segments.selfpromo")||"self-promotion"},preview:{color:"#008fd6",name:Lt("sponsorblock.segments.preview")||"recap or preview"},filler:{color:"#7300FF",name:Lt("sponsorblock.segments.filler")||"tangents"},music_offtopic:{color:"#ff9900",name:Lt("sponsorblock.segments.music_offtopic")||"non-music part"},poi_highlight:{color:"#9b044c",name:Lt("sponsorblock.segments.poi_highlight")||"highlight"}},Vi=Ln(20),Ki="axotube-sponsorblock-segments",Gi='ytlr-progress-bar [idomkey="slider"]',Wi="".concat(Gi,"::after, ").concat('ytlr-multi-markers-player-bar-renderer [idomkey^="chapter-"]',"::after { content: ''; position: absolute; inset: 0; pointer-events: none; opacity: 0.7; }");function Ji(e){var t=document.getElementById(Ki);e?(t||((t=document.createElement("style")).id=Ki,(document.head||document.documentElement).appendChild(t)),t.textContent!==e&&(t.textContent=e)):t&&(t.textContent="")}function Xi(e,t,n){for(var i=[],r=0;r<e.length;r++){var a=e[r];if(!(a.end<=t||a.start>=n)){var o=Math.max(0,(a.start-t)/(n-t)*100),s=Math.min(100,(a.end-t)/(n-t)*100);i.push("linear-gradient(to right, transparent ".concat(o,"%, ").concat(a.color," ").concat(o,"%, ").concat(a.color," ").concat(s,"%, transparent ").concat(s,"%)"))}}return i.length?i.join(", "):"none"}var qi=function(){return p(function e(t){var n=this;u(this,e),m(this,"video",null),m(this,"active",!0),m(this,"configGen",-1),m(this,"pendingSeekTimer",null),m(this,"fetchTimer",null),m(this,"request",null),m(this,"barRetryTimer",null),m(this,"barRetries",0),m(this,"barCss",""),m(this,"wakeTimer",null),m(this,"scheduleSkipHandler",null),m(this,"durationChangeHandler",null),m(this,"seekedHandler",null),m(this,"segments",null),m(this,"skippableCategories",[]),m(this,"manualSkippableCategories",[]),m(this,"handled",new Map),m(this,"ownSeekTarget",null),m(this,"notSkippingToasted",new Set),m(this,"lastSkipAt",0),m(this,"lastSkipUUID",null),m(this,"lastSkipTarget",null),m(this,"ownSeekPending",!1),m(this,"lastSkipSegment",null),m(this,"landingRetries",0),m(this,"undoUsed",!1),m(this,"undone",new Set),m(this,"rearms",new Map),this.videoID=t,this.scheduleSkipHandler=function(){return n.scheduleSkip()},this.seekedHandler=function(){return n.onSeeked()},this.durationChangeHandler=function(){return n.renderSegmentBar()}},[{key:"refreshConfig",value:function(){if(this.configGen!==Hi){var e=Se("sponsorBlockManualSkips");this.manualSkippableCategories=Array.isArray(e)?e:[],this.skippableCategories=this.getSkippableCategories(),this.configGen=Hi}}},{key:"init",value:function(){var e=this;this.fetchTimer=setTimeout(function(){e.fetchTimer=null,e.fetchSegments()},1e3)}},{key:"fetchSegments",value:function(){var e=this;if(this.active){var t=Vi.get(this.videoID);if(t)this.applySegments(t);else{var n,i,r,a=wi(this.videoID).substring(0,4),o=(n="".concat("https://sponsor.ajay.app/api","/skipSegments/").concat(a,"?categories=").concat(encodeURIComponent(JSON.stringify(["sponsor","intro","outro","interaction","selfpromo","preview","filler","music_offtopic","poi_highlight"]))),i=5e3,r=null,{promise:new Promise(function(e,t){(r=new XMLHttpRequest).open("GET",n,!0),r.timeout=i,r.onload=function(){if(404===r.status)return e(null);if(r.status<200||r.status>=300)return t(new Error("HTTP ".concat(r.status," for ").concat(n)));try{e(JSON.parse(r.responseText))}catch(e){t(e)}},r.onerror=function(){t(new Error("network error for ".concat(n)))},r.ontimeout=function(){t(new Error("timed out after ".concat(i,"ms for ").concat(n)))},r.onabort=function(){t(new Error("aborted"))},r.send()}),abort:function(){r&&4!==r.readyState&&r.abort()}});this.request=o,o.promise.then(function(t){if(e.request===o&&(e.request=null),e.active){var n=function(e,t){if(!Array.isArray(e))return[];var n=e.find(function(e){return e.videoID===t});return n&&Array.isArray(n.segments)?n.segments.filter(function(e){if(!e.segment||e.segment.length<2)return!1;var t=D(e.segment,2),n=t[0],i=t[1];return"number"==typeof n&&"number"==typeof i&&n<i&&n>=0}):[]}(t,e.videoID);Vi.set(e.videoID,n),e.applySegments(n)}}).catch(function(t){e.request===o&&(e.request=null),e.active&&console.error("[AxoTube:sponsorblock] SponsorBlock init error:",t)})}}}},{key:"applySegments",value:function(e){this.active&&0!==e.length&&(this.segments=e,this.refreshConfig(),this.attachVideo())}},{key:"getSkippableCategories",value:function(){var e=[];return Se("enableSponsorBlockSponsor")&&e.push("sponsor"),Se("enableSponsorBlockIntro")&&e.push("intro"),Se("enableSponsorBlockOutro")&&e.push("outro"),Se("enableSponsorBlockInteraction")&&e.push("interaction"),Se("enableSponsorBlockSelfPromo")&&e.push("selfpromo"),Se("enableSponsorBlockPreview")&&e.push("preview"),Se("enableSponsorBlockFiller")&&e.push("filler"),Se("enableSponsorBlockMusicOfftopic")&&e.push("music_offtopic"),e}},{key:"isAutoSkippable",value:function(e){return this.skippableCategories.includes(e)&&!this.manualSkippableCategories.includes(e)}},{key:"detachVideo",value:function(){if(this.stopWake(),this.stopBarRetry(),this.video)try{this.video.removeEventListener("ratechange",this.scheduleSkipHandler),this.video.removeEventListener("play",this.scheduleSkipHandler),this.video.removeEventListener("pause",this.scheduleSkipHandler),this.video.removeEventListener("timeupdate",this.scheduleSkipHandler),this.video.removeEventListener("seeked",this.seekedHandler),this.video.removeEventListener("durationchange",this.durationChangeHandler)}catch(e){}}},{key:"pruneHandled",value:function(e){var t,n=f(this.handled);try{for(n.s();!(t=n.n()).done;){var i=D(t.value,2),r=i[0];e<i[1].start&&this.handled.delete(r)}}catch(e){n.e(e)}finally{n.f()}}},{key:"attachVideo",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Ii();this.active&&Qi()===this.videoID&&(e!==this.video&&(this.detachVideo(),this.video=e,this.notSkippingToasted.clear(),this.ownSeekTarget=null,this.barRetries=0,this.undone.clear(),this.undoUsed=!1,this.lastSkipSegment=null,e&&(this.pruneHandled(e.currentTime),e.addEventListener("ratechange",this.scheduleSkipHandler),e.addEventListener("play",this.scheduleSkipHandler),e.addEventListener("pause",this.scheduleSkipHandler),e.addEventListener("timeupdate",this.scheduleSkipHandler),e.addEventListener("seeked",this.seekedHandler),e.addEventListener("durationchange",this.durationChangeHandler))),e?(this.renderSegmentBar(),this.scheduleBarRetry(),this.scheduleSkip()):this.stopWake())}},{key:"scheduleBarRetry",value:function(){var e=this;null!==this.barRetryTimer||this.barRetries>=4||(this.barRetries+=1,this.barRetryTimer=setTimeout(function(){e.barRetryTimer=null,e.renderSegmentBar(),e.scheduleBarRetry()},1e3))}},{key:"stopBarRetry",value:function(){null!==this.barRetryTimer&&clearTimeout(this.barRetryTimer),this.barRetryTimer=null}},{key:"renderSegmentBar",value:function(){if(this.active&&this.segments){var e=this.video||Ii(),t=e?e.duration:0,n=function(e,t,n){if(!(e&&0!==e.length&&t>0))return"";var i=e.map(function(e){return{start:e.segment[0],end:e.segment[1],color:zi[e.category]?zi[e.category].color:"blue"}}).sort(function(e,t){return e.end-e.start-(t.end-t.start)}),r="".concat(Wi," ").concat(Gi,"::after { background: ").concat(Xi(i,0,t),"; }");if(n)for(var a=0;a<n.length;a++){var o=String(n[a].key).replace(/["\\]/g,"\\$&");r+=' ytlr-multi-markers-player-bar-renderer [idomkey="'.concat(o,'"]::after { background: ').concat(Xi(i,n[a].from,n[a].to),"; }")}return r}(this.segments,t,function(e){var t=document.querySelectorAll('ytlr-multi-markers-player-bar-renderer [idomkey="progress-bar"] > [idomkey^="chapter-"]');if(!(t&&0!==t.length&&e>0))return null;for(var n=0,i=0;i<t.length;i++)n+=parseFloat(t[i].style.width);if(!(n>0))return null;for(var r=[],a=0,o=0;o<t.length;o++){var s=parseFloat(t[o].style.width);r.push({key:t[o].getAttribute("idomkey"),from:a/n*e,to:(a+s)/n*e}),a+=s}return r}(t));n!==this.barCss&&(this.barCss=n,Ji(n))}}},{key:"scheduleSkip",value:function(){if(this.active&&Se("enableSponsorBlock")&&this.segments&&Qi()===this.videoID){var e=Ii();if(e&&e!==this.video)this.attachVideo();else if(this.video&&!this.video.paused){this.refreshConfig();var t,n=this.video.currentTime,i=f(this.segments);try{for(i.s();!(t=i.n()).done;){var r=t.value,a=D(r.segment,2),o=a[0],s=a[1];if(!(s<=n+ji)&&(!(o>n+.5)&&this.isAutoSkippable(r.category))){if(!this.handled.has(r.UUID))return void this.performSkip(r,s);this.maybeToastRevert(r,n)}}}catch(e){i.e(e)}finally{i.f()}this.scheduleWake(n)}else this.stopWake()}}},{key:"scheduleWake",value:function(e){var t=this;this.stopWake();var n,i=1/0,r=f(this.segments);try{for(r.s();!(n=r.n()).done;){var a=n.value,o=D(a.segment,2),s=o[0];o[1]<=e+ji||s<=e+.5||this.isAutoSkippable(a.category)&&!this.handled.has(a.UUID)&&s<i&&(i=s)}}catch(e){r.e(e)}finally{r.f()}if(i!==1/0){var u=Math.max(this.video.playbackRate||1,.25),l=Math.max(50,(i-.5-e)/u*1e3);this.wakeTimer=setTimeout(function(){t.wakeTimer=null,t.scheduleSkip()},l)}}},{key:"stopWake",value:function(){null!==this.wakeTimer&&clearTimeout(this.wakeTimer),this.wakeTimer=null}},{key:"maybeToastRevert",value:function(e,t){var n=D(e.segment,2),i=n[0],r=n[1];if(e.UUID===this.lastSkipUUID&&!(Date.now()-this.lastSkipAt>=1e3)&&!(t<i||t>=r)&&!(null===this.ownSeekTarget&&Math.abs(t-this.lastSkipTarget)<=1.5)&&!this.notSkippingToasted.has(e.UUID)&&(this.notSkippingToasted.add(e.UUID),Se("enableSponsorBlockToasts"))){var a,o=(null===(a=zi[e.category])||void 0===a?void 0:a.name)||e.category;nn(Lt("app.name"),Lt("sponsorblock.toasts.notSkipping",{segment:o,count:2}))}}},{key:"performSkip",value:function(e,t){var n;if(this.active&&this.video)if(Ii()===this.video&&Qi()===this.videoID){if(!this.video.paused&&(this.refreshConfig(),this.isAutoSkippable(e.category)&&!this.handled.has(e.UUID))){var i=D(e.segment,1)[0];this.handled.set(e.UUID,{start:i,end:t});var r=(null===(n=zi[e.category])||void 0===n?void 0:n.name)||e.category;Se("enableSponsorBlockToasts")&&nn(Lt("app.name"),Lt("sponsorblock.toasts.skipping",{segment:r})),this.lastSkipSegment={start:i,end:t,UUID:e.UUID,category:e.category},this.undoUsed=!1,e.UUID!==this.lastSkipUUID&&(this.landingRetries=0),this.lastSkipUUID=e.UUID,this.lastSkipAt=Date.now(),this.seekToSegmentEnd(t),this.scheduleSkip()}}else this.attachVideo()}},{key:"seekRaw",value:function(e){var t=this;this.ownSeekTarget=e,this.ownSeekPending=!0,null!==this.pendingSeekTimer&&clearTimeout(this.pendingSeekTimer),this.pendingSeekTimer=setTimeout(function(){t.pendingSeekTimer=null,t.ownSeekPending=!1},1500),this.video.currentTime=e}},{key:"tryUndoLastSkip",value:function(){var e=this.lastSkipSegment;if(!this.active||!this.video||!e||this.undoUsed)return!1;var t=this.video.currentTime-this.lastSkipTarget;if(t<0||t>10)return!1;if(this.undoUsed=!0,this.lastSkipSegment=null,this.lastSkipUUID=null,this.undone.add(e.UUID),this.seekRaw(e.start),this.scheduleSkip(),Se("enableSponsorBlockToasts")){var n,i=(null===(n=zi[e.category])||void 0===n?void 0:n.name)||e.category;nn(Lt("app.name"),Lt("sponsorblock.toasts.undone",{segment:i}))}return!0}},{key:"seekToSegmentEnd",value:function(e){var t=this,n=this.video.duration-e<1?Math.max(e-1,0):e;this.ownSeekTarget=n,this.lastSkipTarget=n,this.ownSeekPending=!0,null!==this.pendingSeekTimer&&clearTimeout(this.pendingSeekTimer),this.pendingSeekTimer=setTimeout(function(){t.pendingSeekTimer=null,t.ownSeekPending=!1},1500),this.video.currentTime=n}},{key:"onSeeked",value:function(){if(this.video){var e=this.video.currentTime;if(this.ownSeekPending){this.ownSeekPending=!1,this.ownSeekTarget=null,null!==this.pendingSeekTimer&&clearTimeout(this.pendingSeekTimer),this.pendingSeekTimer=null;var t=this.lastSkipSegment;t&&e>=t.start&&e<this.lastSkipTarget-1.5&&this.landingRetries<2&&(this.landingRetries+=1,this.seekToSegmentEnd(t.end))}else{this.lastSkipSegment=null;var n,i=f(this.handled);try{for(i.s();!(n=i.n()).done;){var r=D(n.value,2),a=r[0];if(!(e>=r[1].end-ji)&&!this.undone.has(a)){var o=this.rearms.get(a)||0;o>=3||(this.rearms.set(a,o+1),this.handled.delete(a),this.notSkippingToasted.delete(a))}}}catch(e){i.e(e)}finally{i.f()}this.scheduleSkip()}}}},{key:"destroy",value:function(){if(this.active=!1,this.stopWake(),this.stopBarRetry(),null!==this.pendingSeekTimer&&clearTimeout(this.pendingSeekTimer),this.pendingSeekTimer=null,null!==this.fetchTimer&&(clearTimeout(this.fetchTimer),this.fetchTimer=null),this.request){var e=this.request;this.request=null,e.abort()}this.detachVideo(),this.video=null,this.segments=null,this.barCss="",Ji(""),this.handled.clear(),this.rearms.clear(),this.notSkippingToasted.clear()}}])}();window.sponsorblock=null;var Yi=!1;function Qi(){var e=/[?&]v=([^&]+)/.exec(location.hash);return e?e[1]:null}function Zi(){var e=Qi(),t=!!Se("enableSponsorBlock");if(e&&t){if(window.sponsorblock&&window.sponsorblock.videoID===e)return window.sponsorblock.refreshConfig(),void window.sponsorblock.scheduleSkip();if(window.sponsorblock)try{window.sponsorblock.destroy()}catch(e){}window.sponsorblock=new qi(e),window.sponsorblock.init()}else if(window.sponsorblock){try{window.sponsorblock.destroy()}catch(e){}window.sponsorblock=null}}window.addEventListener("keydown",function(e){if(10009===e.keyCode){var t=window.sponsorblock;t&&t.tryUndoLastSkip()&&(Yi=!0,e.preventDefault(),e.stopPropagation(),e.stopImmediatePropagation())}},!0),window.addEventListener("keyup",function(e){10009===e.keyCode&&Yi&&(Yi=!1,e.preventDefault(),e.stopPropagation(),e.stopImmediatePropagation())},!0),window.addEventListener("hashchange",Zi,!1),_i(function(e){var t=window.sponsorblock;t&&e&&t.segments&&t.attachVideo(e)}),ke.addEventListener("configChange",function(e){var t,n=(null===(t=e.detail)||void 0===t?void 0:t.key)||"";"enableSponsorBlock"!==n&&"sponsorBlockManualSkips"!==n&&0!==n.indexOf("enableSponsorBlock")||(Hi+=1,Zi())}),"loading"===document.readyState?document.addEventListener("DOMContentLoaded",Zi):Zi();var $i=["timeupdate","durationchange","ratechange","seeked","play","pause"],er=null,tr=null,nr=null,ir=!1;function rr(e){return e<10?"0".concat(e):String(e)}function ar(e){var t=Math.floor(e/3600),n=Math.floor(e%3600/60),i=e%60;return t>0?"".concat(t,":").concat(rr(n),":").concat(rr(i)):"".concat(n,":").concat(rr(i))}function or(e,t,n){try{var i=e&&"function"==typeof e[t]?e[t]():n;return void 0===i?n:i}catch(e){return n}}function sr(){var e=!!Se("enableRemainingTime");if(e||ir){var t;tr&&tr.parentNode||(t=function(){var e=document.querySelector('[idomkey="time-label"] > [idomkey="elapsedTime"]');return e?e.parentElement:null}(),t!==tr&&(nr&&nr.disconnect(),nr=null,ir=!1,(tr=t)&&(nr=new MutationObserver(function(){return sr()})).observe(tr,{characterData:!0,childList:!0,subtree:!0})));var n=function(){var e=tr?tr.querySelector('[idomkey="elapsedTime"]'):null,t=e?e.firstChild:null;return t&&t.nodeType===Node.TEXT_NODE?t:null}();if(n){var i=Bi(),r=e&&!!i&&/#\/watch/.test(location.hash||"")&&!function(e){var t=or(e,"getVideoData",null);return!(!t||!t.isLive)}(i);if(r){var a=Math.floor(or(i,"getDuration",0)),o=Math.floor(or(i,"getCurrentTime",0)),s=or(i,"getPlaybackRate",1)||1,u=Math.round(Math.max(0,(a-o)/s)),l="-".concat(ar(u));ir=!0,n.data!==l&&(n.data=l)}else{if(ir){var c=Math.floor(or(i,"getCurrentTime",0));n.data=ar(c)}ir=!1}}}}_i(function(e){return function(e){e!==er&&(er&&$i.forEach(function(e){return er.removeEventListener(e,sr)}),(er=e)&&$i.forEach(function(e){return er.addEventListener(e,sr)}),sr())}(e)}),ke.addEventListener("configChange",function(e){var t;"enableRemainingTime"===(null===(t=e.detail)||void 0===t?void 0:t.key)&&sr()});var ur=["AXO_SETTINGS_SHOW","AXO_SPEED_SETTINGS_SHOW","SETTINGS_OPEN"];function lr(e){return null!==function(e){if(!e||"object"!==T(e))return null;var t=e.openPopupAction;if(t)return"TOAST"===t.popupType?null:"popup";var n=e.showEngagementPanelEndpoint;return n?n.customAction?null:"reading":e.customAction&&-1!==ur.indexOf(e.customAction.action)?"popup":null}(e)}function cr(){var e=Bi();if(e&&"function"==typeof e.pauseVideo)try{return void e.pauseVideo()}catch(e){}var t=Ii();t&&!t.paused&&t.pause()}window.addEventListener("visibilitychange",function(e){Se("enablePauseOnBlur")&&document.hidden&&(e.stopImmediatePropagation(),cr())},!0);var hr=["ytlr-player-page","ytlr-player-actions-container","ytlr-progress-bar"],dr=[10,30,60],pr={},fr={},mr={},gr=0,vr=0,yr=-1/0,br=null;function xr(e){for(var t=e;t&&t!==document;t=t.parentNode){if(t.getAttribute&&"true"===t.getAttribute("aria-hidden"))return!0;if(t.classList&&t.classList.contains("zylon-hidden"))return!0;var n=window.getComputedStyle(t);if("none"===n.display||"hidden"===n.visibility)return!0}return!1}function Sr(e,t){var n=Bi();try{if(n&&"function"==typeof n.setPlaybackRate)return void n.setPlaybackRate(t)}catch(e){}e.playbackRate=t}function Er(e,t){var n=e.duration;return n>0?Math.max(0,Math.min(n,t)):null}function kr(e){e.preventDefault(),e.stopPropagation(),e.stopImmediatePropagation()}function wr(e,t){var n=fr[e];if(n)if(n.timer=null,39===e){if(t.paused)return;n.rateBefore=t.playbackRate||1,Sr(t,2)}else 37===e&&(n.ticker=setInterval(function(){var e=Ii();e&&(br=null,function(e,t){var n=Er(e,t);null!==n&&(e.currentTime=n)}(e,e.currentTime-10))},300))}window.addEventListener("keydown",function(e){var t=e.keyCode;if((13===t||37===t||39===t)&&Se("enableOnePressMode")&&function(){if(!/[?&]v=[^&]+/.test(window.location.hash||""))return!1;var e=document.querySelector("ytlr-shorts-page");return!(e&&e.classList&&e.classList.contains("zylon-focus"))}()&&!(function(e){var t=e&&e.closest?e.closest("ytlr-tile-renderer"):null;return!!t&&!xr(t)}(e.target)||function(){for(var e=document.querySelectorAll(".zylon-focus"),t=0;t<e.length;t++){var n=e[t];if(!(xr(n)||n.closest&&n.closest("ytlr-player-page, ytlr-player-actions-container, ytlr-progress-bar")))return!0}return!1}()||function(){for(var e=0;e<hr.length;e++){var t=document.querySelector(hr[e]);if(t&&!xr(t)){var n=window.getComputedStyle(t);if("hidden"!==n.visibility&&parseFloat(n.opacity)>0&&t.getClientRects().length>0)return!0}}return!1}())){var n=Ii();if(n)if(fr[t])kr(e);else{var i=Date.now();if(void 0!==mr[t]&&i-mr[t]<100)kr(e);else{if(mr[t]=i,13===t)!function(e){var t=Bi(),n=!e.paused;try{var i=t&&t.getPlayerStateObject&&t.getPlayerStateObject();i&&"boolean"==typeof i.isPlaying&&(n=i.isPlaying)}catch(e){}try{if(t&&"function"==typeof(n?t.pauseVideo:t.playVideo))return void(n?t.pauseVideo():t.playVideo())}catch(e){}n?e.pause():e.play()}(n),fr[t]={timer:null};else{var r=37===t?-1:1,a=function(e,t){var n=e===gr&&t-yr<=1e3;return vr=n?vr+1:0,gr=e,n||(br=null),dr[Math.min(vr,dr.length-1)]}(r,i)*r,o=Er(n,(vr>0&&null!==br?br:n.currentTime)+a);null!==o&&(br=o,n.currentTime=o),fr[t]={timer:setTimeout(function(){return wr(t,Ii())},1e3)}}pr[t]=!0,kr(e)}}}},!0),window.addEventListener("keyup",function(e){var t=e.keyCode;if(pr[t]){delete pr[t],kr(e);var n=fr[t];if(delete fr[t],n){if(n.timer&&clearTimeout(n.timer),n.ticker&&clearInterval(n.ticker),void 0!==n.rateBefore){var i=Ii();i&&Sr(i,n.rateBefore)}13!==t&&(yr=Date.now())}}},!0);var Dr=0;function Ar(e,t,n){var i=e.filter(function(e){return e&&(n=e.languageCode,String(n||"").toLowerCase().split("-")[0]===t);var n}),r=i.find(function(e){return"asr"!==e.kind});return r||(n&&i.find(function(e){return"asr"===e.kind})||null)}function Cr(){var e=++Dr,t=0,n=function(){if(e===Dr&&Se("enableAutoSubtitles")){var i=function(e,t,n){if(!e||"function"!=typeof e.getOptions||"function"!=typeof e.getOption)return"retry";if(-1===(e.getOptions()||[]).indexOf("captions"))return"retry";if("function"==typeof e.loadModule)try{e.loadModule("captions")}catch(e){}var i=e.getOption("captions","track");if(i&&i.languageCode)return"done";var r=e.getOption("captions","tracklist")||[];if(!r.length)return"retry";var a=Ar(r,t,n);return a&&"function"==typeof e.setOption&&e.setOption("captions","track",a),"done"}(Bi(),Se("autoSubtitleLanguage")||"en",!!Se("autoSubtitleAllowAuto"));t+=1,"retry"===i&&t<8&&setTimeout(n,1e3)}};n()}Ui(function(e){e&&Cr()});var Tr='/* Fixes transparency effect for the video player */\n\n.ytLrWatchDefaultShadow,\ndiv[idomkey="shadow"] {\n background-image: linear-gradient(to bottom, rgba(0, 0, 0, 0) 0, rgba(0, 0, 0, 0.8) 90%) !important;\n background-color: rgba(0, 0, 0, 0.3) !important;\n display: block !important;\n height: 100% !important;\n pointer-events: none !important;\n position: absolute !important;\n width: 100% !important;\n}\n\n/* https://github.com/webosbrew/youtube-webos/commit/4fbe38a18df31ddd62b6cf15f141dd58e1d1a71d */\n.ytLrWatchDefault2025Shadow {\n background-color: rgba(11, 11, 11, 0.5) !important;\n}\n\n/* Fixes shorts having a black background */\n\n.ytLrTileHeaderRendererShorts {\n background-image: none !important;\n}\n\n/* Multiline support for strings in the UI */\n\n.ytLrOverlayPanelHeaderRendererSubtitle {\n white-space: pre-wrap !important;\n}\n\n/* Fixes SponsorBlock segments overlapping with the playhead */\n\n.ytLrProgressBarPlayhead {\n z-index: 1 !important;\n}\n\n.ytLrProgressBarPlayed {\n z-index: 1 !important;\n}\n\n.ytLrSearchBarSearchVoice {\n display: block;\n position: absolute;\n left: 0;\n top: 0;\n pointer-events: auto\n}\n\n.ytLrSearchVoiceHost {\n font-size: 3rem;\n}\n\n.ytLrSearchVoiceMicButtonHost {\n color: rgba(255, 255, 255, 0.7);\n}\n\n.ytLrSearchVoiceMicButtonHost {\n background-color: rgba(255, 255, 255, 0.1);\n border-radius: 50%;\n color: #f1f1f1;\n display: block;\n text-align: center;\n width: 1em;\n height: 1em;\n}\n\n.ytLrSearchVoiceMicButtonIcon {\n display: inline-block;\n font-size: .5em;\n height: .5em;\n width: .5em;\n height: 1em;\n width: 1em;\n margin-top: .5em;\n vertical-align: top !important;\n}\n\n.ytContribIconHost {\n display: inline-block;\n vertical-align: middle;\n}\n\n.ytContribIconTvArrowLeft::before {\n content: "\\e822";\n}\n\n.ytContribIconHost::before {\n font-family: "YouTube Icons Outlined";\n}\n\n/* Make toasts match the YouTube TV look and font */\n\nytlr-toast,\npaper-toast {\n font-family: "YouTube Sans", Roboto, "Noto Sans", Arial, sans-serif !important;\n font-size: 1.4rem !important;\n line-height: 1.4 !important;\n border-radius: 4px !important;\n background-color: rgba(0, 0, 0, 0.85) !important;\n color: rgba(255, 255, 255, 0.95) !important;\n}\n\nytlr-toast .title,\nytlr-toast .subtitle,\nytlr-toast #text,\nytlr-toast iron-p {\n font-family: "YouTube Sans", Roboto, "Noto Sans", Arial, sans-serif !important;\n}\n\nytlr-toast .subtitle,\nytlr-toast iron-p {\n color: rgba(255, 255, 255, 0.75) !important;\n}\n\nytlr-toast img,\nytlr-toast iron-image,\nytlr-toast .thumbnail {\n border-radius: 4px !important;\n}\n\n/* Hide promo shelves (also stripped at the response level in adblock.js) */\n\nytlr-promo-shelf-renderer {\n display: none !important;\n}\n\n/* Reduced motion mode: disable all animations/transitions for performance */\n\nbody.axotube-reduced-motion,\nbody.axotube-reduced-motion *,\nbody.axotube-reduced-motion *::before,\nbody.axotube-reduced-motion *::after {\n animation: none !important;\n animation-delay: 0s !important;\n animation-duration: 0s !important;\n transition: none !important;\n transition-delay: 0s !important;\n transition-duration: 0s !important;\n scroll-behavior: auto !important;\n will-change: auto !important;\n backdrop-filter: none !important;\n}\n\nbody.axotube-reduced-motion ytlr-swipeable-overlay,\nbody.axotube-reduced-motion .ytLrWatchDefaultShadow,\nbody.axotube-reduced-motion div[idomkey="shadow"] {\n opacity: 1 !important;\n}\n\nbody.axotube-reduced-motion ytlr-player,\nbody.axotube-reduced-motion .html5-video-player {\n will-change: auto !important;\n}\n',Pr="/* ytaf-theme-start */",Fr="/* ytaf-theme-end */",Br=document.createElement("style"),Ir="",Lr={default:null,white:["#ffffff","#e0e0e0","#c0c0c0"],gray:["#d0d0d0","#9a9a9a","#7f7f7f"],red:["#ff7a7a","#e06a6a","#c25b5b"],blue:["#8ab4ff","#6f96e8","#5a79c9"],green:["#81c995","#68a87a","#538c64"],purple:["#d7aefb","#b28fd8","#8f70b5"],yellow:["#fdd663","#d9b34d","#b5913c"]};function Or(e){var t=/rgba?\(\s*(\d+),\s*(\d+),\s*(\d+)/.exec(e);return t?(.2126*Number(t[1])+.7152*Number(t[2])+.0722*Number(t[3]))/255:null}function Rr(e){var t=String(e.className||"").split(/\s+/).filter(function(e){return e&&/^[A-Za-z0-9_-]+$/.test(e)});return t.length&&e.tagName?e.tagName.toLowerCase()+t.map(function(e){return"."+e}).join(""):""}function Nr(){var e,t=function(e){var t=String(e||"").trim();if(!t)return"";try{var n=new URL(t);return"http:"!==n.protocol&&"https:"!==n.protocol?"":t.replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/[\r\n]/g,"")}catch(e){return""}}(Se("routeBackgroundUrl")),n=t?'\n background-image: url("'.concat(t,'") !important;\n background-size: cover !important;\n background-position: center !important;\n background-repeat: no-repeat !important;'):"\n background-color: ".concat((e=Se("routeColor"),/^#[0-9a-f]{6}$/i.test(String(e||""))?e:"#0f0f0f")," !important;"),i=t?"\n ytlr-guide-response {\n background-image: none !important;\n background-color: rgba(15, 15, 15, 0.35) !important;\n }\n ytlr-guide-response > div {\n background-image: none !important;\n background-color: transparent !important;\n }\n ytlr-guide-response .zylon-ve {\n background-image: none !important;\n background-color: transparent !important;\n }":"",r=function(e){var t=Lr[e],n=document.getElementById("container");if(!t||!n)return"";for(var i=[[],[],[]],r={},a=n.querySelectorAll("*"),o=0;o<a.length;o++){var s=Or(getComputedStyle(a[o]).color);if(!(null===s||s<.3)){var u=s>.8?0:s>.55?1:2,l=Rr(a[o]);l&&!r[l]&&(r[l]=!0,i[u].push(l))}}for(var c="",h=0;h<3;h++)i[h].length&&(c+=i[h].join(",\n")+" {\n color: "+t[h]+" !important;\n }\n");return c}(Se("textTheme"));Ir="\n ".concat(Pr,"\n #container {\n ").concat(n,"\n }\n ").concat(i,"\n ").concat(r,"\n ").concat(Fr,"\n");var a=document.querySelector("style[nonce]");if(a){var o=a.textContent||"",s=o.indexOf(Pr),u=o.indexOf(Fr);-1!==s&&-1!==u&&(o=o.slice(0,s)+o.slice(u+20)),a.textContent=o+Ir}else Br.textContent=Ir,!Br.parentNode&&document.head&&document.head.appendChild(Br)}document.head&&document.head.appendChild(Br),Nr(),setTimeout(Nr,1500);var Mr=null;window.addEventListener&&window.addEventListener("hashchange",function(){Mr&&clearTimeout(Mr),Mr=setTimeout(Nr,150)});var _r="1.44.0";function Ur(e,t,n){if("arrayValue"===t){var i=Se(e),r=Array.isArray(i)?i.slice():[];return r.includes(n)?r.splice(r.indexOf(n),1):r.push(n),Ee(e,r)}if("themePreset"===e){var a="string"==typeof n&&Object.prototype.hasOwnProperty.call(ce.themePresetColors,n)?ce.themePresetColors[n]:null;return!("string"!=typeof a||!/^#[0-9a-f]{6}$/i.test(a))&&(Ee("routeColor",a),Ee("themePreset",n))}return Ee(e,n)}var jr,Hr={};var zr=(jr||(jr=1,Hr.qrcode=function(){var e=function(e,t){var n=e,i=c[t],r=null,a=0,o=null,s=new Array,u={},l=function(e,t){r=function(e){for(var t=new Array(e),n=0;n<e;n+=1){t[n]=new Array(e);for(var i=0;i<e;i+=1)t[n][i]=null}return t}(a=4*n+17),h(0,0),h(a-7,0),h(0,a-7),p(),d(),m(e,t),n>=7&&f(e),null==o&&(o=v(n,i,s)),g(o,t)},h=function(e,t){for(var n=-1;n<=7;n+=1)if(!(e+n<=-1||a<=e+n))for(var i=-1;i<=7;i+=1)t+i<=-1||a<=t+i||(r[e+n][t+i]=0<=n&&n<=6&&(0==i||6==i)||0<=i&&i<=6&&(0==n||6==n)||2<=n&&n<=4&&2<=i&&i<=4)},d=function(){for(var e=8;e<a-8;e+=1)null==r[e][6]&&(r[e][6]=e%2==0);for(var t=8;t<a-8;t+=1)null==r[6][t]&&(r[6][t]=t%2==0)},p=function(){for(var e=b.getPatternPosition(n),t=0;t<e.length;t+=1)for(var i=0;i<e.length;i+=1){var a=e[t],o=e[i];if(null==r[a][o])for(var s=-2;s<=2;s+=1)for(var u=-2;u<=2;u+=1)r[a+s][o+u]=-2==s||2==s||-2==u||2==u||0==s&&0==u}},f=function(e){for(var t=b.getBCHTypeNumber(n),i=0;i<18;i+=1){var o=!e&&1==(t>>i&1);r[Math.floor(i/3)][i%3+a-8-3]=o}for(i=0;i<18;i+=1)o=!e&&1==(t>>i&1),r[i%3+a-8-3][Math.floor(i/3)]=o},m=function(e,t){for(var n=i<<3|t,o=b.getBCHTypeInfo(n),s=0;s<15;s+=1){var u=!e&&1==(o>>s&1);s<6?r[s][8]=u:s<8?r[s+1][8]=u:r[a-15+s][8]=u}for(s=0;s<15;s+=1)u=!e&&1==(o>>s&1),s<8?r[8][a-s-1]=u:s<9?r[8][15-s-1+1]=u:r[8][15-s-1]=u;r[a-8][8]=!e},g=function(e,t){for(var n=-1,i=a-1,o=7,s=0,u=b.getMaskFunction(t),l=a-1;l>0;l-=2)for(6==l&&(l-=1);;){for(var c=0;c<2;c+=1)if(null==r[i][l-c]){var h=!1;s<e.length&&(h=1==(e[s]>>>o&1)),u(i,l-c)&&(h=!h),r[i][l-c]=h,-1==(o-=1)&&(s+=1,o=7)}if((i+=n)<0||a<=i){i-=n,n=-n;break}}},v=function(e,t,n){for(var i=E.getRSBlocks(e,t),r=k(),a=0;a<n.length;a+=1){var o=n[a];r.put(o.getMode(),4),r.put(o.getLength(),b.getLengthInBits(o.getMode(),e)),o.write(r)}var s=0;for(a=0;a<i.length;a+=1)s+=i[a].dataCount;if(r.getLengthInBits()>8*s)throw new Error("code length overflow. ("+r.getLengthInBits()+">"+8*s+")");for(r.getLengthInBits()+4<=8*s&&r.put(0,4);r.getLengthInBits()%8!=0;)r.putBit(!1);for(;!(r.getLengthInBits()>=8*s||(r.put(236,8),r.getLengthInBits()>=8*s));)r.put(17,8);return function(e,t){for(var n=0,i=0,r=0,a=new Array(t.length),o=new Array(t.length),s=0;s<t.length;s+=1){var u=t[s].dataCount,l=t[s].totalCount-u;i=Math.max(i,u),r=Math.max(r,l),a[s]=new Array(u);for(var c=0;c<a[s].length;c+=1)a[s][c]=255&e.getBuffer()[c+n];n+=u;var h=b.getErrorCorrectPolynomial(l),d=S(a[s],h.getLength()-1).mod(h);for(o[s]=new Array(h.getLength()-1),c=0;c<o[s].length;c+=1){var p=c+d.getLength()-o[s].length;o[s][c]=p>=0?d.get(p):0}}var f=0;for(c=0;c<t.length;c+=1)f+=t[c].totalCount;var m=new Array(f),g=0;for(c=0;c<i;c+=1)for(s=0;s<t.length;s+=1)c<a[s].length&&(m[g]=a[s][c],g+=1);for(c=0;c<r;c+=1)for(s=0;s<t.length;s+=1)c<o[s].length&&(m[g]=o[s][c],g+=1);return m}(r,i)};return u.addData=function(e){var t=w(e);s.push(t),o=null},u.isDark=function(e,t){if(e<0||a<=e||t<0||a<=t)throw new Error(e+","+t);return r[e][t]},u.getModuleCount=function(){return a},u.make=function(){l(!1,function(){for(var e=0,t=0,n=0;n<8;n+=1){l(!0,n);var i=b.getLostPoint(u);(0==n||e>i)&&(e=i,t=n)}return t}())},u.createTableTag=function(e,t){e=e||2;var n="";n+='<table style="',n+=" border-width: 0px; border-style: none;",n+=" border-collapse: collapse;",n+=" padding: 0px; margin: "+(t=void 0===t?4*e:t)+"px;",n+='">',n+="<tbody>";for(var i=0;i<u.getModuleCount();i+=1){n+="<tr>";for(var r=0;r<u.getModuleCount();r+=1)n+='<td style="',n+=" border-width: 0px; border-style: none;",n+=" border-collapse: collapse;",n+=" padding: 0px; margin: 0px;",n+=" width: "+e+"px;",n+=" height: "+e+"px;",n+=" background-color: ",n+=u.isDark(i,r)?"#000000":"#ffffff",n+=";",n+='"/>';n+="</tr>"}return n+="</tbody>",n+="</table>"},u.createImgTag=function(e,t){e=e||2,t=void 0===t?4*e:t;var n=u.getModuleCount()*e+2*t,i=t,r=n-t;return T(n,n,function(t,n){if(i<=t&&t<r&&i<=n&&n<r){var a=Math.floor((t-i)/e),o=Math.floor((n-i)/e);return u.isDark(o,a)?0:1}return 1})},u};e.stringToBytes=function(e){for(var t=new Array,n=0;n<e.length;n+=1){var i=e.charCodeAt(n);t.push(255&i)}return t},e.createStringToBytes=function(e,t){var n=function(){for(var n=A(e),i=function(){var e=n.read();if(-1==e)throw new Error;return e},r=0,a={};;){var o=n.read();if(-1==o)break;var s=i(),u=i()<<8|i();a[String.fromCharCode(o<<8|s)]=u,r+=1}if(r!=t)throw new Error(r+" != "+t);return a}(),i="?".charCodeAt(0);return function(e){for(var t=new Array,r=0;r<e.length;r+=1){var a=e.charCodeAt(r);if(a<128)t.push(a);else{var o=n[e.charAt(r)];"number"==typeof o?(255&o)==o?t.push(o):(t.push(o>>>8),t.push(255&o)):t.push(i)}}return t}};var t,n,i,r,a,o=1,s=2,u=4,l=8,c={L:1,M:0,Q:3,H:2},h=0,d=1,p=2,f=3,m=4,g=5,v=6,y=7,b=(t=[[],[6,18],[6,22],[6,26],[6,30],[6,34],[6,22,38],[6,24,42],[6,26,46],[6,28,50],[6,30,54],[6,32,58],[6,34,62],[6,26,46,66],[6,26,48,70],[6,26,50,74],[6,30,54,78],[6,30,56,82],[6,30,58,86],[6,34,62,90],[6,28,50,72,94],[6,26,50,74,98],[6,30,54,78,102],[6,28,54,80,106],[6,32,58,84,110],[6,30,58,86,114],[6,34,62,90,118],[6,26,50,74,98,122],[6,30,54,78,102,126],[6,26,52,78,104,130],[6,30,56,82,108,134],[6,34,60,86,112,138],[6,30,58,86,114,142],[6,34,62,90,118,146],[6,30,54,78,102,126,150],[6,24,50,76,102,128,154],[6,28,54,80,106,132,158],[6,32,58,84,110,136,162],[6,26,54,82,110,138,166],[6,30,58,86,114,142,170]],n=1335,i=7973,a=function(e){for(var t=0;0!=e;)t+=1,e>>>=1;return t},(r={}).getBCHTypeInfo=function(e){for(var t=e<<10;a(t)-a(n)>=0;)t^=n<<a(t)-a(n);return 21522^(e<<10|t)},r.getBCHTypeNumber=function(e){for(var t=e<<12;a(t)-a(i)>=0;)t^=i<<a(t)-a(i);return e<<12|t},r.getPatternPosition=function(e){return t[e-1]},r.getMaskFunction=function(e){switch(e){case h:return function(e,t){return(e+t)%2==0};case d:return function(e,t){return e%2==0};case p:return function(e,t){return t%3==0};case f:return function(e,t){return(e+t)%3==0};case m:return function(e,t){return(Math.floor(e/2)+Math.floor(t/3))%2==0};case g:return function(e,t){return e*t%2+e*t%3==0};case v:return function(e,t){return(e*t%2+e*t%3)%2==0};case y:return function(e,t){return(e*t%3+(e+t)%2)%2==0};default:throw new Error("bad maskPattern:"+e)}},r.getErrorCorrectPolynomial=function(e){for(var t=S([1],0),n=0;n<e;n+=1)t=t.multiply(S([1,x.gexp(n)],0));return t},r.getLengthInBits=function(e,t){if(1<=t&&t<10)switch(e){case o:return 10;case s:return 9;case u:case l:return 8;default:throw new Error("mode:"+e)}else if(t<27)switch(e){case o:return 12;case s:return 11;case u:return 16;case l:return 10;default:throw new Error("mode:"+e)}else{if(!(t<41))throw new Error("type:"+t);switch(e){case o:return 14;case s:return 13;case u:return 16;case l:return 12;default:throw new Error("mode:"+e)}}},r.getLostPoint=function(e){for(var t=e.getModuleCount(),n=0,i=0;i<t;i+=1)for(var r=0;r<t;r+=1){for(var a=0,o=e.isDark(i,r),s=-1;s<=1;s+=1)if(!(i+s<0||t<=i+s))for(var u=-1;u<=1;u+=1)r+u<0||t<=r+u||0==s&&0==u||o==e.isDark(i+s,r+u)&&(a+=1);a>5&&(n+=3+a-5)}for(i=0;i<t-1;i+=1)for(r=0;r<t-1;r+=1){var l=0;e.isDark(i,r)&&(l+=1),e.isDark(i+1,r)&&(l+=1),e.isDark(i,r+1)&&(l+=1),e.isDark(i+1,r+1)&&(l+=1),0!=l&&4!=l||(n+=3)}for(i=0;i<t;i+=1)for(r=0;r<t-6;r+=1)e.isDark(i,r)&&!e.isDark(i,r+1)&&e.isDark(i,r+2)&&e.isDark(i,r+3)&&e.isDark(i,r+4)&&!e.isDark(i,r+5)&&e.isDark(i,r+6)&&(n+=40);for(r=0;r<t;r+=1)for(i=0;i<t-6;i+=1)e.isDark(i,r)&&!e.isDark(i+1,r)&&e.isDark(i+2,r)&&e.isDark(i+3,r)&&e.isDark(i+4,r)&&!e.isDark(i+5,r)&&e.isDark(i+6,r)&&(n+=40);var c=0;for(r=0;r<t;r+=1)for(i=0;i<t;i+=1)e.isDark(i,r)&&(c+=1);return n+=Math.abs(100*c/t/t-50)/5*10},r),x=function(){for(var e=new Array(256),t=new Array(256),n=0;n<8;n+=1)e[n]=1<<n;for(n=8;n<256;n+=1)e[n]=e[n-4]^e[n-5]^e[n-6]^e[n-8];for(n=0;n<255;n+=1)t[e[n]]=n;var i={glog:function(e){if(e<1)throw new Error("glog("+e+")");return t[e]},gexp:function(t){for(;t<0;)t+=255;for(;t>=256;)t-=255;return e[t]}};return i}();function S(e,t){if(void 0===e.length)throw new Error(e.length+"/"+t);var n=function(){for(var n=0;n<e.length&&0==e[n];)n+=1;for(var i=new Array(e.length-n+t),r=0;r<e.length-n;r+=1)i[r]=e[r+n];return i}(),i={get:function(e){return n[e]},getLength:function(){return n.length},multiply:function(e){for(var t=new Array(i.getLength()+e.getLength()-1),n=0;n<i.getLength();n+=1)for(var r=0;r<e.getLength();r+=1)t[n+r]^=x.gexp(x.glog(i.get(n))+x.glog(e.get(r)));return S(t,0)},mod:function(e){if(i.getLength()-e.getLength()<0)return i;for(var t=x.glog(i.get(0))-x.glog(e.get(0)),n=new Array(i.getLength()),r=0;r<i.getLength();r+=1)n[r]=i.get(r);for(r=0;r<e.getLength();r+=1)n[r]^=x.gexp(x.glog(e.get(r))+t);return S(n,0).mod(e)}};return i}var E=function(){var e=[[1,26,19],[1,26,16],[1,26,13],[1,26,9],[1,44,34],[1,44,28],[1,44,22],[1,44,16],[1,70,55],[1,70,44],[2,35,17],[2,35,13],[1,100,80],[2,50,32],[2,50,24],[4,25,9],[1,134,108],[2,67,43],[2,33,15,2,34,16],[2,33,11,2,34,12],[2,86,68],[4,43,27],[4,43,19],[4,43,15],[2,98,78],[4,49,31],[2,32,14,4,33,15],[4,39,13,1,40,14],[2,121,97],[2,60,38,2,61,39],[4,40,18,2,41,19],[4,40,14,2,41,15],[2,146,116],[3,58,36,2,59,37],[4,36,16,4,37,17],[4,36,12,4,37,13],[2,86,68,2,87,69],[4,69,43,1,70,44],[6,43,19,2,44,20],[6,43,15,2,44,16]],t=function(e,t){var n={};return n.totalCount=e,n.dataCount=t,n},n={getRSBlocks:function(n,i){var r=function(t,n){switch(n){case c.L:return e[4*(t-1)+0];case c.M:return e[4*(t-1)+1];case c.Q:return e[4*(t-1)+2];case c.H:return e[4*(t-1)+3];default:return}}(n,i);if(void 0===r)throw new Error("bad rs block @ typeNumber:"+n+"/errorCorrectLevel:"+i);for(var a=r.length/3,o=new Array,s=0;s<a;s+=1)for(var u=r[3*s+0],l=r[3*s+1],h=r[3*s+2],d=0;d<u;d+=1)o.push(t(l,h));return o}};return n}(),k=function(){var e=new Array,t=0,n={getBuffer:function(){return e},get:function(t){var n=Math.floor(t/8);return 1==(e[n]>>>7-t%8&1)},put:function(e,t){for(var i=0;i<t;i+=1)n.putBit(1==(e>>>t-i-1&1))},getLengthInBits:function(){return t},putBit:function(n){var i=Math.floor(t/8);e.length<=i&&e.push(0),n&&(e[i]|=128>>>t%8),t+=1}};return n},w=function(t){var n=u,i=e.stringToBytes(t),r={getMode:function(){return n},getLength:function(e){return i.length},write:function(e){for(var t=0;t<i.length;t+=1)e.put(i[t],8)}};return r},D=function(){var e=new Array,t={writeByte:function(t){e.push(255&t)},writeShort:function(e){t.writeByte(e),t.writeByte(e>>>8)},writeBytes:function(e,n,i){n=n||0,i=i||e.length;for(var r=0;r<i;r+=1)t.writeByte(e[r+n])},writeString:function(e){for(var n=0;n<e.length;n+=1)t.writeByte(e.charCodeAt(n))},toByteArray:function(){return e},toString:function(){var t="";t+="[";for(var n=0;n<e.length;n+=1)n>0&&(t+=","),t+=e[n];return t+="]"}};return t},A=function(e){var t=e,n=0,i=0,r=0,a={read:function(){for(;r<8;){if(n>=t.length){if(0==r)return-1;throw new Error("unexpected end of file./"+r)}var e=t.charAt(n);if(n+=1,"="==e)return r=0,-1;e.match(/^\s$/)||(i=i<<6|o(e.charCodeAt(0)),r+=6)}var a=i>>>r-8&255;return r-=8,a}},o=function(e){if(65<=e&&e<=90)return e-65;if(97<=e&&e<=122)return e-97+26;if(48<=e&&e<=57)return e-48+52;if(43==e)return 62;if(47==e)return 63;throw new Error("c:"+e)};return a},C=function(e,t){var n=e,i=t,r=new Array(e*t),a={setPixel:function(e,t,i){r[t*n+e]=i},write:function(e){e.writeString("GIF87a"),e.writeShort(n),e.writeShort(i),e.writeByte(128),e.writeByte(0),e.writeByte(0),e.writeByte(0),e.writeByte(0),e.writeByte(0),e.writeByte(255),e.writeByte(255),e.writeByte(255),e.writeString(","),e.writeShort(0),e.writeShort(0),e.writeShort(n),e.writeShort(i),e.writeByte(0);var t=o(2);e.writeByte(2);for(var r=0;t.length-r>255;)e.writeByte(255),e.writeBytes(t,r,255),r+=255;e.writeByte(t.length-r),e.writeBytes(t,r,t.length-r),e.writeByte(0),e.writeString(";")}},o=function(e){for(var t=1<<e,n=1+(1<<e),i=e+1,a=s(),o=0;o<t;o+=1)a.add(String.fromCharCode(o));a.add(String.fromCharCode(t)),a.add(String.fromCharCode(n));var u=D(),l=function(e){var t=e,n=0,i=0,r={write:function(e,r){if(e>>>r!=0)throw new Error("length over");for(;n+r>=8;)t.writeByte(255&(e<<n|i)),r-=8-n,e>>>=8-n,i=0,n=0;i|=e<<n,n+=r},flush:function(){n>0&&t.writeByte(i)}};return r}(u);l.write(t,i);var c=0,h=String.fromCharCode(r[c]);for(c+=1;c<r.length;){var d=String.fromCharCode(r[c]);c+=1,a.contains(h+d)?h+=d:(l.write(a.indexOf(h),i),a.size()<4095&&(a.size()==1<<i&&(i+=1),a.add(h+d)),h=d)}return l.write(a.indexOf(h),i),l.write(n,i),l.flush(),u.toByteArray()},s=function(){var e={},t=0,n={add:function(i){if(n.contains(i))throw new Error("dup key:"+i);e[i]=t,t+=1},size:function(){return t},indexOf:function(t){return e[t]},contains:function(t){return void 0!==e[t]}};return n};return a},T=function(e,t,n,i){for(var r=C(e,t),a=0;a<t;a+=1)for(var o=0;o<e;o+=1)r.setPixel(o,a,n(o,a));var s=D();r.write(s);for(var u=function(){var e=0,t=0,n=0,i="",r={},a=function(e){i+=String.fromCharCode(o(63&e))},o=function(e){if(e<0);else{if(e<26)return 65+e;if(e<52)return e-26+97;if(e<62)return e-52+48;if(62==e)return 43;if(63==e)return 47}throw new Error("n:"+e)};return r.writeByte=function(i){for(e=e<<8|255&i,t+=8,n+=1;t>=6;)a(e>>>t-6),t-=6},r.flush=function(){if(t>0&&(a(e<<6-t),e=0,t=0),n%3!=0)for(var r=3-n%3,o=0;o<r;o+=1)i+="="},r.toString=function(){return i},r}(),l=s.toByteArray(),c=0;c<l.length;c+=1)u.writeByte(l[c]);u.flush();var h="";return h+="<img",h+=' src="',h+="data:image/gif;base64,",h+=u,h+='"',h+=' width="',h+=e,h+='"',h+=' height="',h+=t,h+='"',i&&(h+=' alt="',h+=i,h+='"'),h+="/>"};return e}()),Hr),Vr=e(zr),Kr=Ln(50);function Gr(e){if(Kr.has(e))return Kr.get(e);try{var t,n=Vr.qrcode(6,"H");n.addData(e),n.make();var i=null===(t=n.createImgTag(8,8).match(/src="([^"]+)"/))||void 0===t?void 0:t[1];if(i)return Kr.set(e,i),i}catch(e){console.error("[AxoTube:qrCode] QR code generation failed:",e)}return null}var Wr=/^\d{6}$/,Jr=/^https?:\/\/[^\s/?#]+$/,Xr=null,qr=0;function Yr(e){if(qr=Date.now(),e&&"string"==typeof e.code&&Wr.test(e.code)){var t=Array.isArray(e.urls)?e.urls.filter(function(e){return"string"==typeof e&&Jr.test(e)}).slice(0,4):[];Xr={code:e.code,urls:t}}else Xr=null}function Qr(){return Xr}var Zr="http://127.0.0.1:8090",$r={checked:!1,service:null,proxy:null};function ea(e,t){return Kn(e,t).then(function(e){return e&&e.ok?e.json():null}).catch(function(){return null})}function ta(e){Promise.all([ea("".concat(Zr,"/api/diagnostics")),ea("".concat("http://127.0.0.1:8081","/axotube/health")),ea("".concat(Zr,"/api/pairing-code"))]).then(function(t){var n,i=(n=t[0])&&n.service?{version:n.service.version,launchDebugger:!(!n.launch||!n.launch.debugger),bundle:n.bundle||null}:null,r=t[1]&&t[1].ok?{version:t[1].version}:null;$r={checked:!0,service:i,proxy:r},Yr(i?t[2]:null),e&&e()})}function na(){return $r}var ia=[{type:"sponsor",key:"enableSponsorBlockSponsor",icon:"MONEY_HEART"},{type:"intro",key:"enableSponsorBlockIntro",icon:"PLAY_CIRCLE"},{type:"outro",key:"enableSponsorBlockOutro",icon:"PAUSE"},{type:"interaction",key:"enableSponsorBlockInteraction",icon:"SUBSCRIBE"},{type:"selfpromo",key:"enableSponsorBlockSelfPromo",icon:"BROADCAST"},{type:"preview",key:"enableSponsorBlockPreview",icon:"PLAY_ARROW_CIRCLE"},{type:"filler",key:"enableSponsorBlockFiller",icon:"TIMER"},{type:"music_offtopic",key:"enableSponsorBlockMusicOfftopic",icon:"MUSIC"}],ra={skip:"show",show:"off",off:"skip"},aa=["default","black","darkGray","charcoal","navy","darkRed","darkGreen","darkPurple"],oa=["default","white","gray","red","blue","green","purple","yellow"],sa=["auto","2160p","1440p","1080p","720p","480p","360p","240p","144p"],ua=["any","vp9","av01","avc1"],la=["en","hi","es","fr","de","pt","ja","ko","ru"],ca=["1440p","2160p"],ha=[.05,.1,.15,.2,.25,.3,.35,.4,.45,.5],da=[0,.5,1,1.5,2,2.5,3,3.5,4,4.5,5],pa=[0,10,20,30,40,50,60,70,80,90,100],fa=[10,20,30,60,120,180,240,300],ma=[.1,.2,.3,.4,.5,.6,.7,.8,.9,1],ga=[{name:"Search",icon:"SEARCH"},{name:"Home",icon:"WHAT_TO_WATCH"},{name:"Sports",icon:"TROPHY"},{name:"News",icon:"NEWS"},{name:"Music",icon:"YOUTUBE_MUSIC"},{name:"Podcasts",icon:"BROADCAST"},{name:"Movies & TV",icon:"CLAPPERBOARD"},{name:"Live",icon:"LIVE"},{name:"Gaming",icon:"GAMING"},{name:"Subscriptions",icon:"SUBSCRIPTIONS"},{name:"Library",icon:"TAB_LIBRARY"},{name:"More",icon:"TAB_MORE"}];function va(e){return JSON.stringify({browseEndpoint:{browseId:e}})}var ya=[{name:"Search",icon:"SEARCH",value:JSON.stringify({searchEndpoint:{query:""}})},{name:"Home",icon:"WHAT_TO_WATCH",value:va("FEtopics")},{name:"Sports",icon:"TROPHY",value:va("FEtopics_sports")},{name:"News",icon:"NEWS",value:va("FEtopics_news")},{name:"Music",icon:"YOUTUBE_MUSIC",value:va("FEtopics_music")},{name:"Podcasts",icon:"BROADCAST",value:va("FEtopics_podcasts")},{name:"Movies & TV",icon:"CLAPPERBOARD",value:va("FEtopics_movies")},{name:"Gaming",icon:"GAMING",value:va("FEtopics_gaming")},{name:"Live",icon:"LIVE",value:va("FEtopics_live")},{name:"Subscriptions",icon:"SUBSCRIPTIONS",value:va("FEsubscriptions")},{name:"Library",icon:"TAB_LIBRARY",value:va("FElibrary")},{name:"More",icon:"TAB_MORE",value:va("FEtopics_more")}];function ba(e){var t=xa(e);return t&&Se(t.key)?-1!==(Se("sponsorBlockManualSkips")||[]).indexOf(e)?"show":"skip":"off"}function xa(e){for(var t=0;t<ia.length;t++)if(ia[t].type===e)return ia[t];return null}function Sa(e,t,n,i){return{name:e,icon:n,value:t,hint:i}}function Ea(e,t,n,i){return{name:e,key:t,value:n,also:i}}function ka(e,t,n,i,r){return{name:e,icon:t,value:null,menuHeader:i,options:n,refresh:r}}function wa(e,t){return{title:e,subtitle:t}}function Da(e,t,n,i,r,a,o){return{name:e,icon:t,value:null,options:{title:n,subtitle:i,content:r,links:o},refresh:a}}function Aa(e,t){return e.hint=t,e}function Ca(e,t,n){return{name:e,icon:t,launchDebugger:n}}function Ta(){var e=Qr(),t=e&&e.urls.filter(function(e){return!!e})[0];return e&&t?[Lt("settings.phoneSync.qrHint"),{qrLink:"".concat(t,"/?code=").concat(e.code)}]:[Lt("settings.phoneSync.noQr")]}function Pa(){var e=na();return e.checked?e.service?[Lt("settings.webConfig.online")].concat(function(){var e=Qr();if(!e)return[Lt("settings.phoneSync.waiting")];var t=[Lt("settings.phoneSync.intro")],n=e.urls.filter(function(e){return!!e})[0];return n&&t.push(Lt("settings.phoneSync.address",{url:n})),t.push(Lt("settings.phoneSync.code",{code:e.code})),t}()):[Lt("settings.webConfig.offline")]:[Lt("settings.status.checking")]}function Fa(){var e=na(),t=[Lt("settings.about.userscript",{version:_r})];return e.checked?(t.push(e.service?Lt("settings.about.serviceOnline",{version:e.service.version}):Lt("settings.about.serviceOffline")),t.push(e.proxy?Lt("settings.about.proxyOnline",{version:e.proxy.version}):Lt("settings.about.proxyOffline")),t.push(function(e){var t=e.service&&e.service.bundle;return t&&t.current?t.available&&t.latest?Lt("settings.about.bundleUpdate",{current:t.current,latest:t.latest}):Lt("settings.about.bundleCurrent",{version:t.current}):Lt("settings.about.bundleUnknown")}(e)),t.push(function(e){if(!e.service)return Lt("settings.about.launchUnknown");var t=e.service.launchDebugger?Lt("settings.advanced.launch.debuggerShort"):Lt("settings.advanced.launch.proxyShort");return Lt("settings.about.launchMode",{mode:t})}(e)),t):(t.push(Lt("settings.status.checking")),t)}function Ba(){var e,t,n;return[ka(Lt("settings.playback.title"),"PLAY_CIRCLE",[ka(Lt("settings.playback.quality.title"),"VIDEO_QUALITY",sa.map(function(e){return Ea("auto"===e?Lt("settings.common.auto"):e,"preferredVideoQuality",e)}),wa(Lt("settings.playback.quality.title"),Lt("settings.playback.quality.subtitle"))),ka(Lt("settings.playback.codec.title"),"VIDEO_QUALITY",ua.map(function(e){return Ea("any"===e?Lt("settings.common.any"):e.toUpperCase(),"videoPreferredCodec",e)}),wa(Lt("settings.playback.codec.title"),Lt("settings.playback.codec.subtitle"))),ka(Lt("settings.playback.speedStep.title"),"SLOW_MOTION_VIDEO",ha.map(function(e){return Ea("".concat(e,"x"),"speedSettingsIncrement",e)}),wa(Lt("settings.playback.speedStep.title"),Lt("settings.playback.speedStep.subtitle"))),(n=se(),n&&n.SetFrameRate?ka(Lt("settings.playback.frameRate.title"),"SYNC",[Sa(Lt("settings.playback.frameRate.match"),"autoFrameRate","SCREEN_SWITCH"),ka(Lt("settings.playback.frameRate.pause.title"),"TIMER",da.map(function(e){return Ea(_a(e),"autoFrameRatePauseVideoFor",1e3*e)}),wa(Lt("settings.playback.frameRate.pause.title"),Lt("settings.playback.frameRate.pause.subtitle")))],wa(Lt("settings.playback.frameRate.title"),Lt("settings.playback.frameRate.subtitle"))):null),ka(Lt("settings.playback.captions.title"),"CAPTIONS",[Sa(Lt("settings.playback.captions.onByDefault"),"enableAutoSubtitles","CLOSED_CAPTION_SELECTED"),ka(Lt("settings.playback.captions.language.title"),"TRANSLATE",la.map(function(e){return Ea(Lt("settings.playback.languages.".concat(e)),"autoSubtitleLanguage",e)}),wa(Lt("settings.playback.captions.language.title"),Lt("settings.playback.captions.language.subtitle"))),Sa(Lt("settings.playback.captions.allowAuto"),"autoSubtitleAllowAuto","SPARKLE"),Sa(Lt("settings.playback.captions.myLanguage"),"enableShowUserLanguage","LANGUAGE"),Sa(Lt("settings.playback.captions.otherLanguages"),"enableShowOtherLanguages","TRANSLATE")],wa(Lt("settings.playback.captions.title"),Lt("settings.playback.captions.subtitle"))),ka(Lt("settings.playback.panelShrink.title"),"COMMENT",[Sa(Lt("settings.playback.panelShrink.on"),"enablePanelShrink","COMMENT"),ka(Lt("settings.playback.panelShrink.size.title"),"VIDEO_QUALITY",[Ea("50%","panelShrinkPercent","50"),Ea("60%","panelShrinkPercent","60"),Ea("70%","panelShrinkPercent","70")],wa(Lt("settings.playback.panelShrink.size.title"),Lt("settings.playback.panelShrink.size.subtitle")))],wa(Lt("settings.playback.panelShrink.title"),Lt("settings.playback.panelShrink.subtitle"))),Sa(Lt("settings.playback.pauseInBackground"),"enablePauseOnBlur","PAUSE"),Sa(Lt("settings.playback.remainingTime"),"enableRemainingTime","TIMER")],wa(Lt("settings.playback.title"),Lt("settings.playback.subtitle"))),ka(Lt("settings.playerControls.title"),"SETTINGS_REMOTE",[Sa(Lt("settings.playerControls.customize"),"enablePatchingVideoPlayer","EDIT",Lt("settings.playerControls.hints.customize")),Sa(Lt("settings.playerControls.previousNext"),"enablePreviousNextButtons","SKIP_NEXT",Lt("settings.playerControls.hints.previousNext")),Sa(Lt("settings.playerControls.speed"),"enableSpeedControlsButton","SLOW_MOTION_VIDEO",Lt("settings.playerControls.hints.speed")),Sa(Lt("settings.playerControls.superThanks"),"enableSuperThanksButton","HANDS_HEART",Lt("settings.playerControls.hints.superThanks")),Sa(Lt("settings.playerControls.miniPlayer"),"enableMPButton","MULTIVIEW",Lt("settings.playerControls.hints.miniPlayer")),Sa(Lt("settings.playerControls.pipInsteadOfMini"),"enableSwapMPWithPIP","SCREEN_SWITCH",Lt("settings.playerControls.hints.pipInsteadOfMini")),Sa(Lt("settings.ads.paidPromotion"),"enablePaidPromotionOverlay","PAID",Lt("settings.playerControls.hints.paidPromotion")),Sa(Lt("settings.playerControls.onePress"),"enableOnePressMode","SPACE_BAR",Lt("settings.playerControls.hints.onePress"))],wa(Lt("settings.playerControls.title"),Lt("settings.playerControls.subtitle"))),ka(Lt("settings.ads.title"),"SLASH_CIRCLE_LEFT",[Sa(Lt("settings.ads.blockAds"),"enableAdBlock","HEALTH_AND_SAFETY"),Sa(Lt("settings.ads.playerTracking"),"blockPlayerAdTracking","HEALTH_AND_SAFETY"),Sa(Lt("settings.ads.adTelemetry"),"blockAdTelemetry","HEALTH_AND_SAFETY"),Sa(Lt("settings.ads.viewStats"),"blockViewStatsTelemetry","HEALTH_AND_SAFETY"),Sa(Lt("settings.ads.liveVideos"),"removeLiveVideos","VISIBILITY_OFF"),Sa(Lt("settings.ads.topLiveGames"),"removeTopLiveGames","VISIBILITY_OFF"),Sa(Lt("settings.ads.mostRelevant"),"removeMostRelevant","VISIBILITY_OFF"),Sa(Lt("settings.ads.sponsorBlock"),"enableSponsorBlock","SPONSORSHIP_STAR"),ka(Lt("settings.ads.segmentTypes.title"),"SETTINGS",ia.map(function(e){return{name:Lt("settings.ads.segments.".concat(e.type)),icon:e.icon,segment:e.type}}),wa(Lt("settings.ads.segmentTypes.title"),Lt("settings.ads.segmentTypes.subtitle"))),Sa(Lt("settings.ads.highlightButton"),"enableSponsorBlockHighlight","STAR"),Sa(Lt("settings.ads.notices"),"enableSponsorBlockToasts","INFO")],wa(Lt("settings.ads.title"),Lt("settings.ads.subtitle"))),ka(Lt("settings.browsing.title"),"EXPLORE",[ka(Lt("settings.browsing.thumbnails.title"),"EYE",[Sa(Lt("settings.browsing.hqThumbnails"),"enableHqThumbnails","VIDEO_QUALITY"),Sa(Lt("settings.browsing.deArrowTitles"),"enableDeArrowTitles","TEXT_BOX"),Sa(Lt("settings.browsing.deArrowThumbnails"),"enableDeArrowThumbnails","EYE"),Sa(Lt("settings.browsing.deArrowPeek"),"enableDeArrowPeek","VISIBILITY")],wa(Lt("settings.browsing.thumbnails.title"),Lt("settings.browsing.thumbnails.subtitle"))),ka(Lt("settings.browsing.previews.title"),"PLAY_CIRCLE",[Sa(Lt("settings.browsing.previews.on"),"enablePreviews","PLAY_ARROW_CIRCLE"),{name:Lt("settings.browsing.previews.length"),icon:"TIMER",value:"previewLengthSeconds",stepper:5}],wa(Lt("settings.browsing.previews.title"),Lt("settings.browsing.previews.subtitle"))),ka(Lt("settings.browsing.hideWatched.title"),"VISIBILITY_OFF",[Sa(Lt("settings.browsing.hideWatched.on"),"enableHideWatchedVideos","VISIBILITY_OFF"),ka(Lt("settings.browsing.hideWatched.threshold.title"),"TIMER",pa.map(function(e){return Ea("".concat(e,"%"),"hideWatchedVideosThreshold",e)}),wa(Lt("settings.browsing.hideWatched.threshold.title"),Lt("settings.browsing.hideWatched.threshold.subtitle"))),{name:Lt("settings.browsing.hideWatched.pages.title"),value:null,arrayToEdit:"hideWatchedVideosPages",menuHeader:wa(Lt("settings.browsing.hideWatched.pages.title"),Lt("settings.browsing.hideWatched.pages.subtitle")),options:[{name:"Search Results",icon:"SEARCH",value:"search"},{name:"Home",icon:"WHAT_TO_WATCH",value:"home"},{name:"Music",icon:"YOUTUBE_MUSIC",value:"music"},{name:"Gaming",icon:"GAMING",value:"gaming"},{name:"Subscriptions",icon:"SUBSCRIPTIONS",value:"subscriptions"},{name:"Library",icon:"TAB_LIBRARY",value:"library"},{name:"More",icon:"TAB_MORE",value:"more"}]}],wa(Lt("settings.browsing.hideWatched.title"),Lt("settings.browsing.hideWatched.subtitle"))),Sa(Lt("settings.browsing.shorts"),"enableShorts","YOUTUBE_SHORTS_FILL_24"),Sa(Lt("settings.browsing.endScreens"),"enableHideEndScreenCards","VISIBILITY_OFF"),Sa(Lt("settings.browsing.longPress"),"enableLongPress","ADD_TO_PLAYLIST"),Sa(Lt("settings.browsing.stillWatching"),"enableYouThereRenderer","PERSON")],wa(Lt("settings.browsing.title"),Lt("settings.browsing.subtitle"))),ka(Lt("settings.home.title"),"HOME",[ka(Lt("settings.home.startup.title"),"TV",ya.map(function(e){return{name:e.name,icon:e.icon,key:"launchToOnStartup",value:e.value}}),wa(Lt("settings.home.startup.title"),Lt("settings.home.startup.subtitle"))),Sa(Lt("settings.home.reloadHome"),"reloadHomeOnStartup","ARROW_CIRCLE"),{name:Lt("settings.home.sidebarItems.title"),icon:"LIST",value:null,arrayToEdit:"disabledSidebarContents",menuHeader:wa(Lt("settings.home.sidebarItems.title"),Lt("settings.home.sidebarItems.subtitle")),options:ga.map(function(e){return{name:e.name,icon:e.icon,value:e.icon}})},Sa(Lt("settings.home.hideChannels"),"disableChannelsOnSidebar","PERSON_MINUS"),Sa(Lt("settings.home.sortSubscriptions"),"sortSubscriptionsByAlphabet","SORT")],wa(Lt("settings.home.title"),Lt("settings.home.subtitle"))),ka(Lt("settings.appearance.title"),"AUTO_AWESOME",[ka(Lt("settings.appearance.theme.title"),"LENS_BLUE",[ka(Lt("settings.appearance.theme.presets.title"),"LENS_MAGENTA",aa.map(function(e){return Ea(Lt("settings.appearance.colors.".concat(e)),"themePreset",e)}),wa(Lt("settings.appearance.theme.presets.title"),Lt("settings.appearance.theme.presets.subtitle"))),ka(Lt("settings.appearance.theme.background.title"),"LENS_BLACK",aa.map(function(e){return Ea(Lt("settings.appearance.colors.".concat(e)),"routeColor",ce.themePresetColors[e])}),wa(Lt("settings.appearance.theme.background.title"),Lt("settings.appearance.theme.background.subtitle"))),ka(Lt("settings.appearance.theme.text.title"),"TEXT_BOX",oa.map(function(e){return Ea(Lt("settings.appearance.textColors.".concat(e)),"textTheme",e)}),wa(Lt("settings.appearance.theme.text.title"),Lt("settings.appearance.theme.text.subtitle")))],wa(Lt("settings.appearance.theme.title"),Lt("settings.appearance.theme.subtitle"))),ka(Lt("settings.appearance.dimming.title"),"EYE_OFF",[Sa(Lt("settings.appearance.dimming.on"),"enableScreenDimming","EYE_OFF"),ka(Lt("settings.appearance.dimming.timeout.title"),"TIMER",fa.map(function(e){return Ea(function(e){return e>=60?Lt("settings.minutes",{count:e/60}):_a(e)}(e),"dimmingTimeout",e)}),wa(Lt("settings.appearance.dimming.timeout.title"),Lt("settings.appearance.dimming.timeout.subtitle"))),ka(Lt("settings.appearance.dimming.opacity.title"),"LENS_BLUE",ma.map(function(e){return Ea("".concat(Math.round(100*e),"%"),"dimmingOpacity",e)}),wa(Lt("settings.appearance.dimming.opacity.title"),Lt("settings.appearance.dimming.opacity.subtitle")))],wa(Lt("settings.appearance.dimming.title"),Lt("settings.appearance.dimming.subtitle"))),Sa(Lt("settings.appearance.performance"),"enablePerformanceMode","SPEED_RUN"),ka(Lt("settings.appearance.clock.title"),"SCHEDULE",[ka(Lt("settings.appearance.clock.show.title"),"VISIBILITY",[Ea(Lt("settings.appearance.clock.show.off"),"clockMode","off"),Ea(Lt("settings.appearance.clock.show.always"),"clockMode","always"),Ea(Lt("settings.appearance.clock.show.notPlaying"),"clockMode","notPlaying")],wa(Lt("settings.appearance.clock.show.title"),Lt("settings.appearance.clock.show.subtitle"))),ka(Lt("settings.appearance.clock.format.title"),"TEXT_BOX",[Ea(Lt("settings.appearance.clock.format.h24"),"clockFormat","24h"),Ea(Lt("settings.appearance.clock.format.h12"),"clockFormat","12h"),Ea(Lt("settings.appearance.clock.format.h12NoAmPm"),"clockFormat","12hNoAmPm")],wa(Lt("settings.appearance.clock.format.title"),Lt("settings.appearance.clock.format.subtitle"))),ka(Lt("settings.appearance.clock.position.title"),"LOCATION_POINT",[Ea(Lt("settings.appearance.clock.position.topLeft"),"clockPosition","topLeft"),Ea(Lt("settings.appearance.clock.position.topRight"),"clockPosition","topRight"),Ea(Lt("settings.appearance.clock.position.bottomLeft"),"clockPosition","bottomLeft"),Ea(Lt("settings.appearance.clock.position.bottomRight"),"clockPosition","bottomRight")],wa(Lt("settings.appearance.clock.position.title"),Lt("settings.appearance.clock.position.subtitle"))),Sa(Lt("settings.appearance.clock.seconds"),"clockShowSeconds","TIMER")],wa(Lt("settings.appearance.clock.title"),Lt("settings.appearance.clock.subtitle"))),Sa(Lt("settings.appearance.fullAnimations"),"enableFixedUI","PROGRESS_ACTIVITY")],wa(Lt("settings.appearance.title"),Lt("settings.appearance.subtitle"))),ka(Lt("settings.axotube.title"),"SPARK",[Aa(Da(Lt("settings.webConfig.title"),"PHONELINK",Lt("settings.webConfig.title"),Lt("settings.webConfig.subtitle"),Pa,ta,[{name:Lt("settings.webConfig.qrTitle"),icon:"SMARTPHONE",value:null,options:{title:Lt("settings.webConfig.qrTitle"),subtitle:Lt("settings.webConfig.qrSubtitle"),content:Ta}}]),Lt("settings.webConfig.rowHint")),ka(Lt("settings.system.whosWatching.title"),"ACCOUNT_CIRCLE",[Sa(Lt("settings.system.whosWatching.on"),"enableWhoIsWatchingMenu","PEOPLE"),Sa(Lt("settings.system.whosWatching.always"),"permanentlyEnableWhoIsWatchingMenu","PERSON"),Sa(Lt("settings.system.whosWatching.onExit"),"enableWhosWatchingMenuOnAppExit","EXIT_APP")],wa(Lt("settings.system.whosWatching.title"),Lt("settings.system.whosWatching.subtitle"))),Sa(Lt("settings.system.signInReminder"),"enableSigninReminder","SIGN_IN"),Sa(Lt("settings.system.welcome"),"showWelcomeToast","SPARKLE"),ka(Lt("settings.system.updates.title"),"SYSTEM_UPDATE",[{name:Lt("settings.system.updates.checkNow"),icon:"SYSTEM_UPDATE",action:"CHECK_FOR_UPDATES"},Sa(Lt("settings.system.updates.onStartup"),"enableUpdater","SYSTEM_UPDATE")],wa(Lt("settings.system.updates.title"),Lt("settings.system.updates.subtitle",{version:_r}))),{name:Lt("settings.system.restartCast"),icon:"CAST_ICON",action:"AXO_CAST_RESTART"},{name:Lt("settings.system.reload"),icon:"REPLAY",action:"AXO_RELOAD_PAGE"}],wa(Lt("settings.axotube.title"),Lt("settings.axotube.subtitle"))),ka(Lt("settings.advanced.title"),"SETTINGS",[{name:Lt("settings.advanced.diagnostics.title"),icon:"BUG_REPORT",action:"SETTINGS_OPEN_DIAGNOSTICS"},ka(Lt("settings.advanced.userAgent.title"),"LANGUAGE",[Ea(Lt("settings.advanced.userAgent.samsung"),"userAgentProfile","samsung",["auto"]),Ea(Lt("settings.advanced.userAgent.android"),"userAgentProfile","android")],wa(Lt("settings.advanced.userAgent.title"),Lt("settings.advanced.userAgent.subtitle"))),ka(Lt("settings.advanced.launch.title"),"CAST_MOBILE",[Ca(Lt("settings.advanced.launch.proxy"),"TV",!1),Ca(Lt("settings.advanced.launch.debugger"),"SETTINGS_REMOTE",!0)],wa(Lt("settings.advanced.launch.title"),Lt("settings.advanced.launch.subtitle")),ta),ka(Lt("settings.playback.experimental.title"),"VIDEO_QUALITY_4K",[Sa(Lt("settings.playback.experimental.unlock"),"enableExperimentalResolution","VIDEO_QUALITY_8K"),ka(Lt("settings.playback.experimental.max.title"),"VIDEO_QUALITY",ca.map(function(e){return Ea(e,"experimentalMaxResolution",e)}),wa(Lt("settings.playback.experimental.max.title"),Lt("settings.playback.experimental.max.subtitle")))],wa(Lt("settings.playback.experimental.title"),Lt("settings.playback.experimental.subtitle")))],wa(Lt("settings.advanced.title"),Lt("settings.advanced.subtitle"))),Da(Lt("settings.about.title"),"INFO",Lt("settings.about.title"),Lt("settings.about.subtitle"),Fa,ta,[(e={name:"GitHub",icon:"PRIVACY_PUBLIC",value:null,options:{title:"GitHub",subtitle:Lt("settings.about.socials.githubHint"),content:[Lt("settings.about.scanMessage",{name:"GitHub"}),{qrLink:"https://github.com/TizenDroid/axotube"}]}},t={name:"Discord",icon:"COMMENT",value:null,options:{title:"Discord",subtitle:Lt("settings.about.socials.discordHint"),content:[Lt("settings.about.scanMessage",{name:"Discord"}),{qrLink:"https://discord.gg/UDb8nak5YD"}]}},ka(Lt("settings.about.socials.title"),"PEOPLE",[e,t],wa(Lt("settings.about.socials.title"),Lt("settings.about.socials.subtitle"))))]),{text:Lt("settings.moreOnWeb.text")}]}var Ia="root",La="axo-settings",Oa=new Map,Ra=null;function Na(e,t){for(var n=0;n<e.length;n++){var i=e[n];if(i){var r="".concat(t,".").concat(n);Oa.set(r,i),Array.isArray(i.options)&&Na(i.options,r),i.options&&Array.isArray(i.options.links)&&Na(i.options.links,"".concat(r,".links"))}}}function Ma(e,t){return[{customAction:{action:e,parameters:t}}]}function _a(e){return Lt("settings.seconds",{count:e})}function Ua(e,t,n,i){if(void 0!==e.text)return hn(e.text);if(e.action)return on({title:e.name},{icon:e.icon},[{customAction:{action:e.action}}]);if(void 0!==e.segment){var r=ba(e.segment);return on({title:e.name,subtitle:Lt("settings.segmentModes.".concat(r))},{icon:e.icon},Ma("SETTINGS_SEGMENT",{category:e.segment,panel:i,index:ja(t)}))}if(void 0!==n){var a=-1!==(Se(n)||[]).indexOf(e.value);return on({title:e.name},{icon:e.icon,secondaryIcon:a?"CHECK_BOX":"CHECK_BOX_OUTLINE_BLANK"},Ma("SETTINGS_SET",{key:n,valName:"arrayValue",value:e.value,panel:i,index:ja(t)}))}if(void 0!==e.launchDebugger){var o=na(),s=o.service?o.service.launchDebugger:null;return on({title:e.name},{icon:e.icon,secondaryIcon:s===e.launchDebugger?"RADIO_BUTTON_CHECKED":"RADIO_BUTTON_UNCHECKED"},Ma("SETTINGS_LAUNCH",{debugger:e.launchDebugger,panel:i,index:ja(t)}))}if(void 0!==e.key){var u=Se(e.key),l=u===e.value||!!e.also&&-1!==e.also.indexOf(u);return on({title:e.name},{icon:e.icon,secondaryIcon:l?"RADIO_BUTTON_CHECKED":"RADIO_BUTTON_UNCHECKED"},Ma("SETTINGS_SET",{key:e.key,valName:"stringValue",value:e.value,panel:i,index:ja(t)}))}return void 0!==e.stepper?on({title:e.name,subtitle:_a(Se(e.value))},{icon:e.icon},Ma("SETTINGS_OPEN",{id:t})):void 0!==e.arrayToEdit||e.options&&"object"===T(e.options)?on({title:e.name,subtitle:e.hint},{icon:e.icon},Ma("SETTINGS_OPEN",{id:t})):"string"==typeof e.value?on({title:e.name,subtitle:e.hint},{icon:e.icon,secondaryIcon:Se(e.value)?"CHECK_BOX":"CHECK_BOX_OUTLINE_BLANK"},Ma("SETTINGS_TOGGLE",{key:e.value,panel:i,index:ja(t)})):null}function ja(e){var t=e.lastIndexOf(".");return Number(e.slice(t+1))}function Ha(e,t,n){for(var i=[],r=0;r<e.length;r++){var a=e[r];if(a){var o=Ua(a,"".concat(t,".").concat(r),n,t);o&&i.push(o)}}return i}function za(e){var t,n=[],i=f(e);try{for(i.s();!(t=i.n()).done;){var r=t.value;if("string"==typeof r)n.push(hn(r));else if(r&&r.qrLink){var a=Gr(r.qrLink);a&&n.push(dn(a))}}}catch(e){i.e(e)}finally{i.f()}return n}function Va(e,t){for(var n=[],i=e.options&&e.options.links||[],r=0;r<i.length;r++)if(i[r]){var a=Ua(i[r],"".concat(t,".links.").concat(r),void 0,t);a&&n.push(a)}return n}function Ka(e,t,n){var i,r=function(e){if(e===Ia||!Oa.has(e))return{header:{title:Lt("settings.ttSettings.title"),subtitle:Lt("settings.ttSettings.madeByText")},rows:Ha(Ra,Ia)};var t=Oa.get(e);if(void 0!==t.stepper){var n=Se(t.value),i=t.stepper;return{header:{title:t.name},rows:[on({title:"−".concat(_a(i))},null,Ma("SETTINGS_STEP",{key:t.value,step:-i,panel:e})),hn(_a(n)),on({title:"+".concat(_a(i))},null,Ma("SETTINGS_STEP",{key:t.value,step:i,panel:e}))]}}if(void 0!==t.arrayToEdit)return{header:t.menuHeader||{title:t.name},rows:Ha(t.options,e,t.arrayToEdit)};if(t.options&&"object"===T(t.options)&&!Array.isArray(t.options)){var r="function"==typeof t.options.content?t.options.content():t.options.content||[];if(r.some(function(e){return e&&e.qrLink})){var a=r.filter(function(e){return"string"==typeof e});return{header:{title:t.options.title,subtitle:a.length?a.join(" "):t.options.subtitle},rows:za(r.filter(function(e){return e&&e.qrLink}))}}return{header:{title:t.options.title,subtitle:t.options.subtitle},rows:za(r).concat(Va(t,e))}}return{header:t.menuHeader||{title:t.name},rows:Ha(t.options||[],e)}}(e);rn(r.header,an(r.rows,n||0),e===Ia?La:(i=e,"".concat(La,":").concat(i)),t)}function Ga(e,t,n){e(),t&&Ka(t,!0,n)}function Wa(e,t){var n,i,r=t||{};switch(e){case"SETTINGS_OPEN":var a=Oa.get(r.id);return Ka(r.id,!1),void(a&&a.refresh&&a.refresh(function(){return Ka(r.id,!0)}));case"SETTINGS_OPEN_DIAGNOSTICS":return void(location.href="http://127.0.0.1:8081/axotube/diagnostics");case"SETTINGS_LAUNCH":return n=r.debugger,i=function(e){nn(Lt("app.name"),Lt(e?"settings.advanced.launch.saved":"settings.advanced.launch.failed")),Ka(r.panel,!0,r.index)},void Kn("".concat(Zr,"/api/launch"),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({debugger:!!n})}).then(function(e){return!(!e||!e.ok)}).catch(function(){return!1}).then(function(e){ta(function(){i&&i(e)})});case"SETTINGS_TOGGLE":return void Ga(function(){return Ur(r.key,"boolValue",!Se(r.key))},r.panel,r.index);case"SETTINGS_SET":return void Ga(function(){return Ur(r.key,r.valName,r.value)},r.panel,r.index);case"SETTINGS_SEGMENT":return void Ga(function(){return function(e,t){var n=xa(e);if(n){var i="off"!==t;!!Se(n.key)!==i&&Ur(n.key,"boolValue",i),-1!==(Se("sponsorBlockManualSkips")||[]).indexOf(e)!=("show"===t)&&Ur("sponsorBlockManualSkips","arrayValue",e)}}(r.category,ra[ba(r.category)])},r.panel,r.index);case"SETTINGS_STEP":var o=ce.ranges&&ce.ranges[r.key],s=(Number(Se(r.key))||0)+r.step;return o&&(s=Math.min(o[1],Math.max(o[0],s))),void Ga(function(){return Ur(r.key,"intValue",s)},r.panel,1);default:return}}function Ja(){Ra=Ba(),Oa=new Map,Na(Ra,Ia),Ka(Ia,!1)}window.isPipPlaying=!1;var Xa=null,qa=null,Ya=0,Qa=null,Za=null,$a=[],eo={length:0,classes:[]},to={length:0,classes:[]};function no(){qa||Ya>=120||(qa=setTimeout(function(){qa=null,io()},250))}function io(){Ya+=1;try{var e=window._yttv?Object.values(window._yttv).find(function(e){return e&&e.mappings instanceof Map}):null;if(!e)return no(),!1;var t=e.get("PlayerService"),n=e.get("PlaybackPreviewService");if(!t||!n)return no(),!1;if(Xa=t,!n.__axotubePipPatched){var i=n.start,r=n.stop;"function"==typeof i&&(n.start=function(){if(!window.isPipPlaying){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return i.apply(this,t)}}),"function"==typeof r&&(n.stop=function(){if(!window.isPipPlaying){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return r.apply(this,t)}}),n.__axotubePipPatched=!0}return!0}catch(e){return console.warn("[AxoTube:pictureInPicture] PiP service loading failed:",e),no(),!1}}function ro(e,t){var n=setTimeout(function(){var t=$a.indexOf(n);-1!==t&&$a.splice(t,1),e()},t);return $a.push(n),n}function ao(e,t,n){if(e&&e.classList&&t)if(0===n.length&&(n.length=e.classList.length),n.length!==e.classList.length&&n.classes.length){var i,r=f(n.classes);try{for(r.s();!(i=r.n()).done;){var a=i.value;t.classList.add(a)}}catch(e){r.e(e)}finally{r.f()}}else for(var o=0;o<e.classList.length;o++){var s=e.classList[o];n.classes.includes(s)||n.classes.push(s),t.classList.add(s)}}function oo(){if(window.isPipPlaying)try{var e=document.querySelector("ytlr-search-bar");if(!e||document.querySelector("#axo-pip-button"))return;var t=e.querySelector("ytlr-search-voice");if(!t||!t.children[0]||!t.children[0].children[0])return;var n=window._yttv?Object.values(window._yttv).find(function(e){return e instanceof Map&&e.has("CLEAR_COOKIES")}):null;if(!n)return;var i=n.get("MICROPHONE_ON"),r=n.get("CLEAR_COOKIES"),a=document.createElement("ytlr-search-voice");ao(t,a,eo),a.style.left="10.25em",a.id="axo-pip-button";var o=document.createElement("ytlr-search-voice-mic-button");ao(t.children[0],o,to);for(var s=document.createElement("yt-icon"),u=0;u<t.children[0].children[0].classList.length;u++)s.classList.add(t.children[0].children[0].classList[u]);i&&s.classList.remove(i),r&&s.classList.add(r),o.appendChild(s),a.appendChild(o),e.appendChild(a)}catch(e){console.warn("[AxoTube:pictureInPicture] PiP button creation failed:",e)}}"complete"===document.readyState?io():window.addEventListener("load",io);var so=null;function uo(){Qa&&(Qa.disconnect(),Qa=null),null!==so&&(cancelAnimationFrame(so),so=null);var e=document.querySelector("#axo-pip-button");e&&e.parentNode&&e.parentNode.removeChild(e)}function lo(){!function(){for(;$a.length;)clearTimeout($a.pop())}(),Za&&(Za.disconnect(),Za=null),uo();var e=document.querySelector("video");e&&["width","height","top","left","inset"].forEach(function(t){return e.style.removeProperty(t)});var t=document.querySelector("ytlr-player");t&&(t.style.removeProperty("display"),t.style.removeProperty("background-color"));var n=document.querySelector("ytlr-player-container");n&&n.style.removeProperty("z-index")}function co(){if(Xa||io())try{if(!Jt())return;var e=document.querySelector("video"),t=document.querySelector("ytlr-player"),n=document.querySelector("ytlr-player-container");if(!e||!t||!n)return;lo();var i=Math.floor(e.currentTime);Za=new MutationObserver(function(r){var a,o=f(r);try{var s,u=function(){if("class"!==a.value.attributeName)return 0;if(t.classList.contains("ytLrPlayerEnabled"))return 0;function r(){t.isConnected&&n.isConnected&&(n.style.zIndex="10",t.style.display="block",t.style.backgroundColor="rgba(0,0,0,0)")}return r(),ro(r,500),e.addEventListener("play",function e(){var t=document.querySelector("video");t&&(t.style.removeProperty("inset"),t.style.width="".concat(window.innerWidth/3.5,"px"),t.style.height="".concat(window.innerHeight/3.5,"px"),t.style.top="68vh",t.style.left="68vw",window.isPipPlaying=!0,!Qa&&window.isPipPlaying&&document.body&&((Qa=new MutationObserver(function(){null===so&&(so=requestAnimationFrame(function(){so=null,window.isPipPlaying?oo():uo()}))})).observe(document.body,{childList:!0,subtree:!0}),oo()),t.removeEventListener("play",e))}),Za&&(Za.disconnect(),Za=null),ro(function(){try{if(Xa&&Xa.loadedPlaybackConfig){var e=Xa.loadedPlaybackConfig,t=Object.assign({},e);e.watchEndpoint&&(t.watchEndpoint=Object.assign({},e.watchEndpoint,{startTimeSeconds:i})),Xa.loadVideo(t)}}catch(e){console.warn("[AxoTube:pictureInPicture] PiP video load failed:",e)}},1e3),1};for(o.s();!(a=o.n()).done&&(0===(s=u())||1!==s););}catch(e){o.e(e)}finally{o.f()}}),Za.observe(t,{attributes:!0,attributeFilter:["class"]});try{Xt({signalAction:{signal:"HISTORY_BACK"}}).dispatched||lo()}catch(e){throw lo(),e}}catch(e){console.error("[AxoTube:pictureInPicture] Enable PiP failed:",e)}else{var r=0,a=function(){r+=1,Xa||io()?co():r<20&&ro(a,200)};ro(a,200)}}function ho(e){if(Se("enableDeArrowPeek")){var t=e&&e.showMenuCommand;if(t&&t.contentId){var n,i=(n=t.contentId,Wn.get(n)||null),r=function(e){var t=Gn.get(e);return t&&t.data?t.data:null}(t.contentId);if(i&&r){if(t.title){var a=!!Se("enableDeArrowTitles")?i.title:Jn(r);a&&(t.title={simpleText:a})}if(t.thumbnail){var o=!!Se("enableDeArrowThumbnails")?i.thumbnails:Xn(t.contentId,r);o&&(t.thumbnail={thumbnails:o})}}}}}function po(e,t){Kn("".concat("http://127.0.0.1:8090","/api/cast/restart"),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({reason:e})}).then(function(e){return e.ok?e.json():Promise.reject(new Error("HTTP ".concat(e.status)))}).then(function(e){t&&t(null,e)}).catch(function(e){t&&t(e,null)})}document.addEventListener("visibilitychange",function(){document.hidden||po("focus")});var fo=null,mo=!1;function go(e){if(e)try{e.playbackRate=Se("videoSpeed")}catch(e){console.warn("[AxoTube:speedUI] Speed apply failed:",e)}}function vo(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Ii();if(e&&e!==fo){if(fo)try{fo.removeEventListener("canplay",yo)}catch(e){}fo=e;try{fo.addEventListener("canplay",yo)}catch(e){console.warn("[AxoTube:speedUI] Speed initialization failed:",e)}go(fo)}}function yo(){Ii()!==fo&&vo(),go(fo)}function bo(){!function(){if(!mo){mo=!0;var e=function(e){if(406==e.keyCode||191==e.keyCode)return e.preventDefault(),e.stopPropagation(),"keydown"!==e.type||(xo(),!1)};document.addEventListener("keydown",e,!0),document.addEventListener("keypress",e,!0),document.addEventListener("keyup",e,!0)}}(),_i(vo)}function xo(){for(var e=Se("videoSpeed"),t=0,n=Number(Se("speedSettingsIncrement")),i=Number.isFinite(n)&&n>0?n:.25,r=Math.max(i,.05),a=[],o=r;o<=5&&a.length<100;o+=r){var s=Math.round(100*o)/100;a.push(on({title:"".concat(s,"x")},null,[{signalAction:{signal:"POPUP_BACK"}},{setClientSettingEndpoint:{settingDatas:[{clientSettingEnum:{item:"videoSpeed"},intValue:s.toString()}]}},{customAction:{action:"SET_PLAYER_SPEED",parameters:s.toString()}}])),e===s&&(t=a.length-1)}1.0001===e&&(t=a.length),a.push(on({title:"Fix stuttering (1.0001x)"},null,[{signalAction:{signal:"POPUP_BACK"}},{setClientSettingEndpoint:{settingDatas:[{clientSettingEnum:{item:"videoSpeed"},intValue:"1.0001"}]}},{customAction:{action:"SET_PLAYER_SPEED",parameters:"1.0001"}}]));try{rn("Playback Speed",an(a,t),"axo-speed")}catch(e){console.error("[AxoTube:speedUI] Speed settings modal failed:",e)}}"loading"===document.readyState?document.addEventListener("DOMContentLoaded",bo):bo(),ke.addEventListener("configChange",function(e){var t;"videoSpeed"===(null===(t=e.detail)||void 0===t?void 0:t.key)&&(vo(),go(fo))});function So(e){return"string"==typeof window.__axotubeProxyUrl?window.__axotubeProxyUrl+e:(window.location&&window.location.origin?window.location.origin:"http://localhost:8081")+e}function Eo(e){fetch(So("/axotube/update/check"),{method:"POST",cache:"no-store"}).then(function(e){if(!e.ok)throw new Error("update check HTTP "+e.status);return e.json()}).then(function(t){if(t.error)throw new Error(t.error);t.available?function(e){var t=Math.floor(Date.now()/1e3);rn({title:Lt("updater.modalTitle"),subtitle:Lt("updater.modalBodyNew",{latest:e.latest,current:e.current})},an([on({title:Lt("updater.updateNow"),subtitle:Lt("updater.updateNowSubtitle")},{icon:"DOWN_ARROW"},[{customAction:{action:"AXO_UPDATE_APPLY",parameters:e.latest}},{signalAction:{signal:"POPUP_BACK"}}]),on({title:Lt("updater.remindLater"),subtitle:Lt("updater.remindLaterSubtitle")},{icon:"SEARCH_HISTORY"},[{customAction:{action:"UPDATE_REMIND_LATER",parameters:t+86400}},{signalAction:{signal:"POPUP_BACK"}}])]),"axo-update-modal",!1)}(t):e&&nn(Lt("app.name"),Lt("toasts.upToDate",{version:t.current}),null)}).catch(function(t){console.info("[AxoTube:updater] update check skipped:",t&&t.message),e&&nn(Lt("app.name"),Lt("toasts.updateCheckFailed"),null)})}function ko(){nn(Lt("app.name"),Lt("updater.applying"),null),fetch(So("/axotube/update/apply"),{method:"POST"}).then(function(e){if(!e.ok)throw new Error("apply HTTP "+e.status);return e.json()}).then(function(e){if(e.error)throw new Error(e.error);!function(){var e=document.querySelector("video");if(!e||e.paused||e.ended)window.location.reload();else{nn(Lt("app.name"),Lt("updater.reloadWhenPaused"),null);var t=function(){e.removeEventListener("pause",t),e.removeEventListener("ended",t),window.location.reload()};e.addEventListener("pause",t),e.addEventListener("ended",t)}}()}).catch(function(e){console.error("[AxoTube:updater] apply failed:",e&&e.message),nn(Lt("app.name"),Lt("toasts.updateApplyFailed"),null)})}try{Se("enableUpdater")&&Se("dontCheckUpdateUntil")<=Math.floor(Date.now()/1e3)&&setTimeout(function(){return Eo(!1)},3e3)}catch(e){console.error("[AxoTube:updater] init failed, continuing without it",e)}function wo(e,t){return qt(e,t)}function Do(){return jt=Ao,Qt()}function Ao(e){var t=e.resolveCommand;if(t.__axotubePatched)return!0;var n=function(e,n){var i,r,a,o,s,u;if(!e||"object"!==T(e))return t.call(this,e,n);if(ho(e),function(e){Se("enablePauseOnBlur")&&lr(e)&&cr()}(e),e.setClientSettingEndpoint){if(!Array.isArray(e.setClientSettingEndpoint.settingDatas))return t.call(this,e,n);var l,c=f(e.setClientSettingEndpoint.settingDatas);try{for(c.s();!(l=c.n()).done;){var h,d=l.value,p=null==d||null===(h=d.clientSettingEnum)||void 0===h?void 0:h.item;if("string"==typeof p)if(p.includes("_")){if("I18N_LANGUAGE"===p){var m=d.stringValue;if("string"!=typeof m||!m)continue;var g=new Date;return g.setFullYear(g.getFullYear()+10),document.cookie="PREF=hl=".concat(m,"; expires=").concat(g.toUTCString(),";"),wo({signalAction:{signal:"RELOAD_PAGE"}}),!0}}else{var v=Object.keys(d).find(function(e){return e.includes("Value")});if(!v)continue;Ur(p,v,"intValue"===v?Number(d[v]):d[v])}}}catch(e){c.e(e)}finally{c.f()}}else{if(e.customAction)return Co(e.customAction.action,e.customAction.parameters),!0;if(null!=e&&null!==(i=e.signalAction)&&void 0!==i&&i.customAction)return Co(e.signalAction.customAction.action,e.signalAction.customAction.parameters),!0;if(null!=e&&null!==(r=e.showEngagementPanelEndpoint)&&void 0!==r&&r.customAction)return Co(e.showEngagementPanelEndpoint.customAction.action,e.showEngagementPanelEndpoint.customAction.parameters),!0;if(null!=e&&null!==(a=e.playlistEditEndpoint)&&void 0!==a&&a.customAction)return Co(e.playlistEditEndpoint.customAction.action,e.playlistEditEndpoint.customAction.parameters),!0;if("playback-settings"===(null==e||null===(o=e.openPopupAction)||void 0===o?void 0:o.uniqueId))try{var y,b=e.openPopupAction.popup.overlaySectionRenderer.overlay.overlayTwoPanelRenderer.actionPanel.overlayPanelRenderer.content.overlayPanelItemListRenderer.items;if(!Array.isArray(b))return t.call(this,e,n);var x,S=f(b);try{for(S.s();!(x=S.n()).done;){var E,k=x.value;"SLOW_MOTION_VIDEO"===(null==k||null===(E=k.compactLinkRenderer)||void 0===E||null===(E=E.icon)||void 0===E?void 0:E.iconType)&&(k.compactLinkRenderer.subtitle&&(k.compactLinkRenderer.subtitle.simpleText=Lt("player.withAxotube")),k.compactLinkRenderer.serviceEndpoint={clickTrackingParams:"null",signalAction:{customAction:{action:"AXO_SPEED_SETTINGS_SHOW",parameters:[]}}})}}catch(e){S.e(e)}finally{S.f()}b.splice(2,0,on({title:Lt("player.miniPlayer")},{icon:"CLEAR_COOKIES"},[{customAction:{action:"ENTER_MP"}}])),se()&&null!==(y=se())&&void 0!==y&&y.HasSystemFeature("android.software.picture_in_picture")&&b.splice(3,0,on({title:Lt("player.pictureInPicture")},{icon:"PIP"},[{customAction:{action:"ENTER_PIP"}},{signalAction:{signal:"POPUP_BACK"}}]))}catch(e){console.warn("[AxoTube:resolveCommand] Playback settings patch failed:",e)}else null!=e&&null!==(s=e.watchEndpoint)&&void 0!==s&&s.videoId&&(window.isPipPlaying=!1,lo())}if(e.commandExecutorCommand&&Array.isArray(e.commandExecutorCommand.commands)){var w,D=f(e.commandExecutorCommand.commands);try{for(D.s();!(w=D.n()).done;){var A,C,P,F=w.value;F&&"object"===T(F)&&(F.customAction?Co(F.customAction.action,F.customAction.parameters):null!==(A=F.signalAction)&&void 0!==A&&A.customAction?Co(F.signalAction.customAction.action,F.signalAction.customAction.parameters):null!==(C=F.showEngagementPanelEndpoint)&&void 0!==C&&C.customAction?Co(F.showEngagementPanelEndpoint.customAction.action,F.showEngagementPanelEndpoint.customAction.parameters):null!==(P=F.playlistEditEndpoint)&&void 0!==P&&P.customAction?Co(F.playlistEditEndpoint.customAction.action,F.playlistEditEndpoint.customAction.parameters):t.call(this,F,n))}}catch(e){D.e(e)}finally{D.f()}return!0}return null!=e&&e.requestAccountSelectorCommand&&"ACCOUNT_EVENT_TRIGGER_ON_EXIT"===(null===(u=e.requestAccountSelectorCommand)||void 0===u||null===(u=u.identityActionContext)||void 0===u?void 0:u.eventTrigger)&&!Se("enableWhosWatchingMenuOnAppExit")?(t.call(this,{signalAction:{signal:"EXIT_APP"}}),!1):t.call(this,e,n)};n.__axotubePatched=!0;try{return e.resolveCommand=n,e.resolveCommand===n}catch(e){return!1}}function Co(e,t){switch(e){case"SKIP":var n=document.createEvent("Event");n.initEvent("keydown",!0,!0),n.keyCode=27,n.which=27,document.dispatchEvent(n);var i=document.querySelector("video"),r=Number(null==t?void 0:t.time);i&&Number.isFinite(r)&&(i.currentTime=r);break;case"AXO_SETTINGS_SHOW":Ja();break;case"SETTINGS_OPEN":case"SETTINGS_SET":case"SETTINGS_TOGGLE":case"SETTINGS_STEP":case"SETTINGS_SEGMENT":case"SETTINGS_OPEN_DIAGNOSTICS":case"SETTINGS_LAUNCH":Wa(e,t);break;case"AXO_SPEED_SETTINGS_SHOW":xo();break;case"UPDATE_REMIND_LATER":Ee("dontCheckUpdateUntil",t);break;case"AXO_UPDATE_APPLY":ko();break;case"SET_PLAYER_SPEED":var a=Number(t),o=document.querySelector("video");o&&Number.isFinite(a)&&a>0&&(o.playbackRate=a);break;case"ENTER_MP":co();break;case"ENTER_PIP":se()&&se().EnterPIP&&se().EnterPIP();break;case"SHOW_TOAST":nn(Lt("app.name"),t);break;case"ADD_TO_QUEUE":t?(window.queuedVideos.videos.push(t),nn(Lt("app.name"),Lt("toasts.queueAdded"))):nn(Lt("app.name"),Lt("toasts.queueAddFailed"));break;case"CLEAR_QUEUE":window.queuedVideos.videos=[],window.queuedVideos.currentIndex=-1,window.queuedVideos.lastVideoId=null,nn(Lt("app.name"),Lt("toasts.queueCleared"));break;case"CHECK_FOR_UPDATES":Eo(!0);break;case"AXO_CAST_RESTART":po("manual",function(e,t){!e&&t&&t.ok?t.restarted?nn(Lt("app.name"),Lt("toasts.castRestarted")):"too-soon"===t.reason?nn(Lt("app.name"),Lt("toasts.castRestartWait")):"discovery-not-running"===t.reason?nn(Lt("app.name"),Lt("toasts.castRestartNotRunning")):"in-progress"===t.reason?nn(Lt("app.name"),Lt("toasts.castRestarting")):nn(Lt("app.name"),Lt("toasts.castRestartFailed")):nn(Lt("app.name"),Lt("toasts.castRestartFailed"))});break;case"AXO_RELOAD_PAGE":window.location.reload()}}var To=!1,Po=null,Fo=!1;function Bo(){try{var e;if(null===(e=window.tectonicConfig)||void 0===e||!e.featureSwitches)return;var t=window.tectonicConfig.featureSwitches,n=Te();t.enableAnimations=!n,t.enableOnScrollLinearAnimation=!n,t.enableListAnimations=!n,t.horizontalListDurationMs=n?0:200,t.verticalListDurationMs=n?0:300,t.listAnimationCurve=n?"linear":"",t.enableSkipButtonSlideInAnimation=!n,t.enableLikeButtonAnimation=!n}catch(e){console.warn("[AxoTube:ui] Reduced motion flags apply failed:",e)}}function Io(){try{if(!document.body)return;document.body.classList.toggle("axotube-reduced-motion",Te())}catch(e){console.warn("[AxoTube:ui] Reduced motion apply failed:",e)}}function Lo(){if(Fo){var e=document.getElementById("container");e&&e.style.setProperty("opacity","1","important"),Fo=!1}}function Oo(){Po&&(clearTimeout(Po),Po=null),Lo()}function Ro(){Oo(),Se("enableScreenDimming")&&(Po=setTimeout(function(){var e;if(Po=null,Se("enableScreenDimming")){var t=document.querySelector(".html5-video-player");if(t){var n=null===(e=t.getPlayerStateObject)||void 0===e?void 0:e.call(t);if(null==n||!n.isPlaying){var i=document.getElementById("container");i&&(i.style.setProperty("opacity",(1-Se("dimmingOpacity")).toString(),"important"),Fo=!0)}}}else Lo()},1e3*Se("dimmingTimeout")))}function No(){if(!To&&document.body&&window._yttv){To=!0,Io();var e=document.querySelector("style[nonce]");if(e)e.textContent+=Tr;else if(document.head){var t=document.createElement("style");t.textContent=Tr,document.head.appendChild(t)}if("function"==typeof window.__releaseBootLoader&&window.__releaseBootLoader(),Se("enableFixedUI")&&!Pe()&&!Te())try{window.tectonicConfig&&(window.tectonicConfig.clientData.legacyApplicationQuality="full-animation",window.tectonicConfig.featureSwitches.enableAnimations=!0,window.tectonicConfig.featureSwitches.enableOnScrollLinearAnimation=!0,window.tectonicConfig.featureSwitches.enableListAnimations=!0)}catch(e){console.warn("[AxoTube:ui] Could not apply UI fixes:",e)}Bo();var n=function(e){if(Se("enableScreenDimming")&&Ro(),404==e.keyCode&&"keydown"===e.type){try{Do()}catch(e){console.warn("[AxoTube:ui] Settings command patch refresh failed:",e)}try{Ja()}catch(e){console.error("[AxoTube:ui] Settings open failed:",e)}}else if(39==e.keyCode&&"keydown"===e.type&&document.querySelector("ytlr-search-text-box > .zylon-focus")&&window.isPipPlaying)try{var t=document.querySelector("ytlr-player");t&&t.style.setProperty("background-color","rgb(0, 0, 0)"),function(){try{if(!Xa||!Xa.loadedPlaybackConfig)return;var e=document.querySelector("video"),t=Xa.loadedPlaybackConfig,n=t.clickTrackingParams,i=t.commandMetadata,r=t.watchEndpoint;if(!Xt({clickTrackingParams:n,commandMetadata:i,watchEndpoint:e&&r?Object.assign({},r,{startTimeSeconds:Math.floor(e.currentTime)}):r}).dispatched)return;window.isPipPlaying=!1,lo()}catch(e){console.error("[AxoTube:pictureInPicture] PiP to fullscreen failed:",e)}}()}catch(e){console.warn("[AxoTube:ui] PiP exit failed:",e)}return!0};document.addEventListener("keydown",n,!0),document.addEventListener("keypress",n,!0),document.addEventListener("keyup",n,!0),setTimeout(function(){Se("showWelcomeToast")&&nn(Lt("welcomeMsg.title"),"".concat(Lt("welcomeMsg.subtitle")," · v").concat(_r))},1e3);var i=Se("launchToOnStartup");if(i)try{wo(JSON.parse(i))}catch(e){console.warn("[AxoTube:ui] Launch command failed:",e)}else if(Se("reloadHomeOnStartup"))try{location.hash&&"/"!==location.hash.substring(1)&&(location.hash="/")}catch(e){console.warn("[AxoTube:ui] Reload home on startup failed:",e)}try{var r=gn();r&&r.executeFunction(new r.commandFunction("reloadGuideAction"))}catch(e){console.warn("[AxoTube:ui] Guide reload failed:",e)}if(Se("enableFixedUI")&&!Pe()&&!Te())try{new MutationObserver(function(){var e=document.body;null!=e&&e.classList.contains("app-quality-root")&&e.classList.remove("app-quality-root")}).observe(document.body,{attributes:!0,attributeFilter:["class"]})}catch(e){console.warn("[AxoTube:ui] UI quality observer failed:",e)}!function(){try{Do(),Ht||(Ht=!0,window.addEventListener("hashchange",$t,!1))}catch(e){console.warn("[AxoTube:ui] unable to install native command patch:",e)}}()}}function Mo(){To||"complete"!==document.readyState&&"interactive"!==document.readyState||window._yttv&&No()}"loading"===document.readyState&&document.addEventListener("DOMContentLoaded",Mo);var _o=0,Uo=setInterval(function(){_o+=1,Mo(),(To||_o>=100)&&clearInterval(Uo)},100),jo={routeColor:!0,routeBackgroundUrl:!0,themePreset:!0,textTheme:!0};ke.addEventListener("configChange",function(e){var t,n=null===(t=e.detail)||void 0===t?void 0:t.key;jo[n]&&Nr(),"enableReducedMotion"!==n&&"enablePerformanceMode"!==n&&"enableLowMemoryMode"!==n||(Io(),Bo()),"enableScreenDimming"===n&&(Se("enableScreenDimming")?Ro():Oo())});var Ho=null;function zo(){Ho&&(clearInterval(Ho),Ho=null)}function Vo(e){e||zo();var t=localStorage["yt.leanback.default::recurring_actions"];if(t){var n;try{n=JSON.parse(t)}catch(e){return}var i=Se("permanentlyEnableWhoIsWatchingMenu"),r=n.data&&n.data.data;if(r){var a=r["startup-screen-account-selector-with-guest"],o=r.whos_watching_fullscreen_zero_accounts,s=r["startup-screen-signed-out-welcome-back"];if(!e){zo();var u=new Date;return u.setDate(u.getDate()+7),void d(u.getTime())}var l=Date.now(),c=a&&a.lastFired;if(!(c&&l-c>0&&l-c<72e5)||i)if(zo(),i){var h=function(){var e=new Date;e.setDate(e.getDate()-7),d(e.getTime())};h(),Ho=setInterval(h,6e4)}else d(Date.now())}}function d(e){a&&(a.lastFired=e),o&&(o.lastFired=e),s&&(s.lastFired=e),localStorage["yt.leanback.default::recurring_actions"]=JSON.stringify(n)}}ke.addEventListener("configChange",function(e){var t=e.detail,n=t.key,i=t.value;"enableWhoIsWatchingMenu"===n?Vo(i):"permanentlyEnableWhoIsWatchingMenu"===n&&Vo(Se("enableWhoIsWatchingMenu"))}),Vo(Se("enableWhoIsWatchingMenu"));var Ko={language:{standard:{long:{aa:"Afar",ab:"Abkhazian",ace:"Acehnese",ach:"Acoli",ada:"Adangme",ady:"Adyghe",ae:"Avestan",aeb:"Tunisian Arabic",af:"Afrikaans",afh:"Afrihili",agq:"Aghem",ain:"Ainu",ak:"Akan",akk:"Akkadian",akz:"Alabama",ale:"Aleut",aln:"Gheg Albanian",alt:"Southern Altai",am:"Amharic",an:"Aragonese",ang:"Old English",ann:"Obolo",anp:"Angika",ar:"Arabic","ar-001":"Arabic (world)",arc:"Aramaic",arn:"Mapuche",aro:"Araona",arp:"Arapaho",arq:"Algerian Arabic",ars:"Najdi Arabic",arw:"Arawak",ary:"Moroccan Arabic",arz:"Egyptian Arabic",as:"Assamese",asa:"Asu",ase:"American Sign Language",ast:"Asturian",atj:"Atikamekw",av:"Avaric",avk:"Kotava",awa:"Awadhi",ay:"Aymara",az:"Azerbaijani",ba:"Bashkir",bal:"Baluchi",ban:"Balinese",bar:"Bavarian",bas:"Basaa",bax:"Bamun",bbc:"Batak Toba",bbj:"Ghomala",be:"Belarusian",bej:"Beja",bem:"Bemba",bew:"Betawi",bez:"Bena",bfd:"Bafut",bfq:"Badaga",bg:"Bulgarian",bgc:"Haryanvi",bgn:"Western Balochi",bho:"Bhojpuri",bi:"Bislama",bik:"Bikol",bin:"Bini",bjn:"Banjar",bkm:"Kom",bla:"Siksiká",blo:"Anii",blt:"Tai Dam",bm:"Bambara",bn:"Bangla",bo:"Tibetan",bpy:"Bishnupriya",bqi:"Bakhtiari",br:"Breton",bra:"Braj",brh:"Brahui",brx:"Bodo",bs:"Bosnian",bss:"Akoose",bua:"Buriat",bug:"Buginese",bum:"Bulu",byn:"Blin",byv:"Medumba",ca:"Catalan",cad:"Caddo",car:"Carib",cay:"Cayuga",cch:"Atsam",ccp:"Chakma",ce:"Chechen",ceb:"Cebuano",cgg:"Chiga",ch:"Chamorro",chb:"Chibcha",chg:"Chagatai",chk:"Chuukese",chm:"Mari",chn:"Chinook Jargon",cho:"Choctaw",chp:"Chipewyan",chr:"Cherokee",chy:"Cheyenne",cic:"Chickasaw",ckb:"Central Kurdish",clc:"Chilcotin",co:"Corsican",cop:"Coptic",cps:"Capiznon",cr:"Cree",crg:"Michif",crh:"Crimean Tatar",crj:"Southern East Cree",crk:"Plains Cree",crl:"Northern East Cree",crm:"Moose Cree",crr:"Carolina Algonquian",crs:"Seselwa Creole French",cs:"Czech",csb:"Kashubian",csw:"Swampy Cree",cu:"Church Slavic",cv:"Chuvash",cwd:"Woods Cree",cy:"Welsh",da:"Danish",dak:"Dakota",dar:"Dargwa",dav:"Taita",de:"German","de-AT":"German (Austria)","de-CH":"German (Switzerland)",del:"Delaware",den:"Slave",dgr:"Dogrib",din:"Dinka",dje:"Zarma",doi:"Dogri",dsb:"Lower Sorbian",dtp:"Central Dusun",dua:"Duala",dum:"Middle Dutch",dv:"Divehi",dyo:"Jola-Fonyi",dyu:"Dyula",dz:"Dzongkha",dzg:"Dazaga",ebu:"Embu",ee:"Ewe",efi:"Efik",egl:"Emilian",egy:"Ancient Egyptian",eka:"Ekajuk",el:"Greek",elx:"Elamite",en:"English","en-AU":"English (Australia)","en-CA":"English (Canada)","en-GB":"English (United Kingdom)","en-US":"English (United States)",enm:"Middle English",eo:"Esperanto",es:"Spanish","es-419":"Spanish (Latin America)","es-ES":"Spanish (Spain)","es-MX":"Spanish (Mexico)",esu:"Central Yupik",et:"Estonian",eu:"Basque",ewo:"Ewondo",ext:"Extremaduran",fa:"Persian","fa-AF":"Persian (Afghanistan)",fan:"Fang",fat:"Fanti",ff:"Fula",fi:"Finnish",fil:"Filipino",fit:"Tornedalen Finnish",fj:"Fijian",fo:"Faroese",fon:"Fon",fr:"French","fr-CA":"French (Canada)","fr-CH":"French (Switzerland)",frc:"Cajun French",frm:"Middle French",fro:"Old French",frp:"Arpitan",frr:"Northern Frisian",frs:"Eastern Frisian",fur:"Friulian",fy:"Western Frisian",ga:"Irish",gaa:"Ga",gag:"Gagauz",gan:"Gan Chinese",gay:"Gayo",gba:"Gbaya",gbz:"Zoroastrian Dari",gd:"Scottish Gaelic",gez:"Geez",gil:"Gilbertese",gl:"Galician",glk:"Gilaki",gmh:"Middle High German",gn:"Guarani",goh:"Old High German",gon:"Gondi",gor:"Gorontalo",got:"Gothic",grb:"Grebo",grc:"Ancient Greek",gsw:"Swiss German",gu:"Gujarati",guc:"Wayuu",gur:"Frafra",guz:"Gusii",gv:"Manx",gwi:"Gwichʼin",ha:"Hausa",hai:"Haida",hak:"Hakka Chinese",haw:"Hawaiian",hax:"Southern Haida",hdn:"Northern Haida",he:"Hebrew",hi:"Hindi","hi-Latn":"Hindi (Latin)",hif:"Fiji Hindi",hil:"Hiligaynon",hit:"Hittite",hmn:"Hmong",hnj:"Hmong Njua",ho:"Hiri Motu",hr:"Croatian",hsb:"Upper Sorbian",hsn:"Xiang Chinese",ht:"Haitian Creole",hu:"Hungarian",hup:"Hupa",hur:"Halkomelem",hy:"Armenian",hz:"Herero",ia:"Interlingua",iba:"Iban",ibb:"Ibibio",id:"Indonesian",ie:"Interlingue",ig:"Igbo",ii:"Sichuan Yi",ik:"Inupiaq",ike:"Eastern Canadian Inuktitut",ikt:"Western Canadian Inuktitut",ilo:"Iloko",inh:"Ingush",io:"Ido",is:"Icelandic",it:"Italian",iu:"Inuktitut",izh:"Ingrian",ja:"Japanese",jam:"Jamaican Creole English",jbo:"Lojban",jgo:"Ngomba",jmc:"Machame",jpr:"Judeo-Persian",jrb:"Judeo-Arabic",jut:"Jutish",jv:"Javanese",ka:"Georgian",kaa:"Kara-Kalpak",kab:"Kabyle",kac:"Kachin",kaj:"Jju",kam:"Kamba",kaw:"Kawi",kbd:"Kabardian",kbl:"Kanembu",kcg:"Tyap",kde:"Makonde",kea:"Kabuverdianu",ken:"Kenyang",kfo:"Koro",kg:"Kongo",kgp:"Kaingang",kha:"Khasi",kho:"Khotanese",khq:"Koyra Chiini",khw:"Khowar",ki:"Kikuyu",kiu:"Kirmanjki",kj:"Kuanyama",kk:"Kazakh",kkj:"Kako",kl:"Kalaallisut",kln:"Kalenjin",km:"Khmer",kmb:"Kimbundu",kn:"Kannada",ko:"Korean",koi:"Komi-Permyak",kok:"Konkani",kos:"Kosraean",kpe:"Kpelle",kr:"Kanuri",krc:"Karachay-Balkar",kri:"Krio",krj:"Kinaray-a",krl:"Karelian",kru:"Kurukh",ks:"Kashmiri",ksb:"Shambala",ksf:"Bafia",ksh:"Colognian",ku:"Kurdish",kum:"Kumyk",kut:"Kutenai",kv:"Komi",kw:"Cornish",kwk:"Kwakʼwala",kxv:"Kuvi",ky:"Kyrgyz",la:"Latin",lad:"Ladino",lag:"Langi",lah:"Western Panjabi",lam:"Lamba",lb:"Luxembourgish",lez:"Lezghian",lfn:"Lingua Franca Nova",lg:"Ganda",li:"Limburgish",lij:"Ligurian",lil:"Lillooet",liv:"Livonian",lkt:"Lakota",lmo:"Lombard",ln:"Lingala",lo:"Lao",lol:"Mongo",lou:"Louisiana Creole",loz:"Lozi",lrc:"Northern Luri",lsm:"Saamia",lt:"Lithuanian",ltg:"Latgalian",lu:"Luba-Katanga",lua:"Luba-Lulua",lui:"Luiseno",lun:"Lunda",luo:"Luo",lus:"Mizo",luy:"Luyia",lv:"Latvian",lzh:"Literary Chinese",lzz:"Laz",mad:"Madurese",maf:"Mafa",mag:"Magahi",mai:"Maithili",mak:"Makasar",man:"Mandingo",mas:"Masai",mde:"Maba",mdf:"Moksha",mdr:"Mandar",men:"Mende",mer:"Meru",mfe:"Morisyen",mg:"Malagasy",mga:"Middle Irish",mgh:"Makhuwa-Meetto",mgo:"Metaʼ",mh:"Marshallese",mi:"Māori",mic:"Mi'kmaw",min:"Minangkabau",mk:"Macedonian",ml:"Malayalam",mn:"Mongolian",mnc:"Manchu",mni:"Manipuri",moe:"Innu-aimun",moh:"Mohawk",mos:"Mossi",mr:"Marathi",mrj:"Western Mari",ms:"Malay",mt:"Maltese",mua:"Mundang",mul:"Multiple languages",mus:"Muscogee",mwl:"Mirandese",mwr:"Marwari",mwv:"Mentawai",my:"Burmese",mye:"Myene",myv:"Erzya",mzn:"Mazanderani",na:"Nauru",nan:"Min Nan Chinese",nap:"Neapolitan",naq:"Nama",nb:"Norwegian Bokmål",nd:"North Ndebele",nds:"Low German","nds-NL":"Low German (Netherlands)",ne:"Nepali",new:"Newari",ng:"Ndonga",nia:"Nias",niu:"Niuean",njo:"Ao Naga",nl:"Dutch","nl-BE":"Dutch (Belgium)",nmg:"Kwasio",nn:"Norwegian Nynorsk",nnh:"Ngiemboon",no:"Norwegian",nog:"Nogai",non:"Old Norse",nov:"Novial",nqo:"N’Ko",nr:"South Ndebele",nso:"Northern Sotho",nus:"Nuer",nv:"Navajo",nwc:"Classical Newari",ny:"Nyanja",nym:"Nyamwezi",nyn:"Nyankole",nyo:"Nyoro",nzi:"Nzima",oc:"Occitan",oj:"Ojibwa",ojb:"Northwestern Ojibwa",ojc:"Central Ojibwa",ojg:"Eastern Ojibwa",ojs:"Oji-Cree",ojw:"Western Ojibwa",oka:"Okanagan",om:"Oromo",or:"Odia",os:"Ossetic",osa:"Osage",ota:"Ottoman Turkish",pa:"Punjabi",pag:"Pangasinan",pal:"Pahlavi",pam:"Pampanga",pap:"Papiamento",pau:"Palauan",pcd:"Picard",pcm:"Nigerian Pidgin",pdc:"Pennsylvania German",pdt:"Plautdietsch",peo:"Old Persian",pfl:"Palatine German",phn:"Phoenician",pi:"Pali",pis:"Pijin",pl:"Polish",pms:"Piedmontese",pnt:"Pontic",pon:"Pohnpeian",pqm:"Maliseet-Passamaquoddy",prg:"Prussian",pro:"Old Provençal",ps:"Pashto",pt:"Portuguese","pt-BR":"Portuguese (Brazil)","pt-PT":"Portuguese (Portugal)",qu:"Quechua",quc:"Kʼicheʼ",qug:"Chimborazo Highland Quichua",raj:"Rajasthani",rap:"Rapanui",rar:"Rarotongan",rgn:"Romagnol",rhg:"Rohingya",rif:"Riffian",rm:"Romansh",rn:"Rundi",ro:"Romanian","ro-MD":"Romanian (Moldova)",rof:"Rombo",rom:"Romany",rtm:"Rotuman",ru:"Russian",rue:"Rusyn",rug:"Roviana",rup:"Aromanian",rw:"Kinyarwanda",rwk:"Rwa",sa:"Sanskrit",sad:"Sandawe",sah:"Yakut",sam:"Samaritan Aramaic",saq:"Samburu",sas:"Sasak",sat:"Santali",saz:"Saurashtra",sba:"Ngambay",sbp:"Sangu",sc:"Sardinian",scn:"Sicilian",sco:"Scots",sd:"Sindhi",sdc:"Sassarese Sardinian",sdh:"Southern Kurdish",se:"Northern Sami",see:"Seneca",seh:"Sena",sei:"Seri",sel:"Selkup",ses:"Koyraboro Senni",sg:"Sango",sga:"Old Irish",sgs:"Samogitian",sh:"Serbo-Croatian",shi:"Tachelhit",shn:"Shan",shu:"Chadian Arabic",si:"Sinhala",sid:"Sidamo",sk:"Slovak",sl:"Slovenian",slh:"Southern Lushootseed",sli:"Lower Silesian",sly:"Selayar",sm:"Samoan",sma:"Southern Sami",smj:"Lule Sami",smn:"Inari Sami",sms:"Skolt Sami",sn:"Shona",snk:"Soninke",so:"Somali",sog:"Sogdien",sq:"Albanian",sr:"Serbian","sr-ME":"Serbian (Montenegro)",srn:"Sranan Tongo",srr:"Serer",ss:"Swati",ssy:"Saho",st:"Southern Sotho",stq:"Saterland Frisian",str:"Straits Salish",su:"Sundanese",suk:"Sukuma",sus:"Susu",sux:"Sumerian",sv:"Swedish",sw:"Swahili","sw-CD":"Swahili (Congo - Kinshasa)",swb:"Comorian",syc:"Classical Syriac",syr:"Syriac",szl:"Silesian",ta:"Tamil",tce:"Southern Tutchone",tcy:"Tulu",te:"Telugu",tem:"Timne",teo:"Teso",ter:"Tereno",tet:"Tetum",tg:"Tajik",tgx:"Tagish",th:"Thai",tht:"Tahltan",ti:"Tigrinya",tig:"Tigre",tiv:"Tiv",tk:"Turkmen",tkl:"Tokelau",tkr:"Tsakhur",tl:"Tagalog",tlh:"Klingon",tli:"Tlingit",tly:"Talysh",tmh:"Tamashek",tn:"Tswana",to:"Tongan",tog:"Nyasa Tonga",tok:"Toki Pona",tpi:"Tok Pisin",tr:"Turkish",tru:"Turoyo",trv:"Taroko",trw:"Torwali",ts:"Tsonga",tsd:"Tsakonian",tsi:"Tsimshian",tt:"Tatar",ttm:"Northern Tutchone",ttt:"Muslim Tat",tum:"Tumbuka",tvl:"Tuvalu",tw:"Twi",twq:"Tasawaq",ty:"Tahitian",tyv:"Tuvinian",tzm:"Central Atlas Tamazight",udm:"Udmurt",ug:"Uyghur",uga:"Ugaritic",uk:"Ukrainian",umb:"Umbundu",und:"Unknown language",ur:"Urdu",uz:"Uzbek",vai:"Vai",ve:"Venda",vec:"Venetian",vep:"Veps",vi:"Vietnamese",vls:"West Flemish",vmf:"Main-Franconian",vmw:"Makhuwa",vo:"Volapük",vot:"Votic",vro:"Võro",vun:"Vunjo",wa:"Walloon",wae:"Walser",wal:"Wolaytta",war:"Waray",was:"Washo",wbp:"Warlpiri",wo:"Wolof",wuu:"Wu Chinese",xal:"Kalmyk",xh:"Xhosa",xmf:"Mingrelian",xnr:"Kangri",xog:"Soga",yao:"Yao",yap:"Yapese",yav:"Yangben",ybb:"Yemba",yi:"Yiddish",yo:"Yoruba",yrl:"Nheengatu",yue:"Cantonese",za:"Zhuang",zap:"Zapotec",zbl:"Blissymbols",zea:"Zeelandic",zen:"Zenaga",zgh:"Standard Moroccan Tamazight",zh:"Chinese","zh-Hans":"Simplified Chinese","zh-Hant":"Traditional Chinese",zu:"Zulu",zun:"Zuni",zxx:"No linguistic content",zza:"Zaza"}}},region:{long:m(m(m(m(m(m(m(m({"001":"world","002":"Africa","003":"North America","005":"South America","009":"Oceania","011":"Western Africa","013":"Central America","014":"Eastern Africa","015":"Northern Africa","017":"Middle Africa","018":"Southern Africa","019":"Americas","021":"Northern America","029":"Caribbean","030":"Eastern Asia","034":"Southern Asia","035":"Southeast Asia","039":"Southern Europe","053":"Australasia","054":"Melanesia","057":"Micronesian Region","061":"Polynesia",142:"Asia",143:"Central Asia",145:"Western Asia",150:"Europe",151:"Eastern Europe",154:"Northern Europe",155:"Western Europe",202:"Sub-Saharan Africa",419:"Latin America",AC:"Ascension Island",AD:"Andorra",AE:"United Arab Emirates",AF:"Afghanistan",AG:"Antigua & Barbuda",AI:"Anguilla",AL:"Albania",AM:"Armenia",AO:"Angola",AQ:"Antarctica",AR:"Argentina",AS:"American Samoa",AT:"Austria",AU:"Australia",AW:"Aruba",AX:"Åland Islands",AZ:"Azerbaijan",BA:"Bosnia & Herzegovina",BB:"Barbados",BD:"Bangladesh",BE:"Belgium",BF:"Burkina Faso",BG:"Bulgaria",BH:"Bahrain",BI:"Burundi",BJ:"Benin",BL:"St. Barthélemy",BM:"Bermuda",BN:"Brunei",BO:"Bolivia",BQ:"Caribbean Netherlands",BR:"Brazil",BS:"Bahamas",BT:"Bhutan",BV:"Bouvet Island",BW:"Botswana",BY:"Belarus",BZ:"Belize",CA:"Canada",CC:"Cocos (Keeling) Islands",CD:"Congo - Kinshasa",CF:"Central African Republic",CG:"Congo - Brazzaville",CH:"Switzerland",CI:"Côte d’Ivoire",CK:"Cook Islands",CL:"Chile",CM:"Cameroon",CN:"China",CO:"Colombia",CP:"Clipperton Island",CQ:"Sark",CR:"Costa Rica",CU:"Cuba",CV:"Cape Verde",CW:"Curaçao",CX:"Christmas Island",CY:"Cyprus",CZ:"Czechia",DE:"Germany",DG:"Diego Garcia",DJ:"Djibouti",DK:"Denmark",DM:"Dominica",DO:"Dominican Republic",DZ:"Algeria",EA:"Ceuta & Melilla",EC:"Ecuador",EE:"Estonia",EG:"Egypt",EH:"Western Sahara",ER:"Eritrea",ES:"Spain",ET:"Ethiopia",EU:"European Union",EZ:"Eurozone",FI:"Finland",FJ:"Fiji",FK:"Falkland Islands",FM:"Micronesia",FO:"Faroe Islands",FR:"France",GA:"Gabon",GB:"United Kingdom",GD:"Grenada",GE:"Georgia",GF:"French Guiana",GG:"Guernsey",GH:"Ghana",GI:"Gibraltar",GL:"Greenland",GM:"Gambia",GN:"Guinea",GP:"Guadeloupe",GQ:"Equatorial Guinea",GR:"Greece",GS:"South Georgia & South Sandwich Islands",GT:"Guatemala",GU:"Guam",GW:"Guinea-Bissau",GY:"Guyana",HK:"Hong Kong SAR China",HM:"Heard & McDonald Islands",HN:"Honduras",HR:"Croatia",HT:"Haiti",HU:"Hungary",IC:"Canary Islands",ID:"Indonesia",IE:"Ireland",IL:"Israel",IM:"Isle of Man",IN:"India",IO:"British Indian Ocean Territory",IQ:"Iraq",IR:"Iran",IS:"Iceland",IT:"Italy",JE:"Jersey",JM:"Jamaica",JO:"Jordan",JP:"Japan",KE:"Kenya",KG:"Kyrgyzstan",KH:"Cambodia",KI:"Kiribati",KM:"Comoros",KN:"St. Kitts & Nevis",KP:"North Korea",KR:"South Korea",KW:"Kuwait",KY:"Cayman Islands",KZ:"Kazakhstan",LA:"Laos",LB:"Lebanon",LC:"St. Lucia",LI:"Liechtenstein",LK:"Sri Lanka",LR:"Liberia",LS:"Lesotho",LT:"Lithuania",LU:"Luxembourg",LV:"Latvia",LY:"Libya",MA:"Morocco",MC:"Monaco",MD:"Moldova",ME:"Montenegro",MF:"St. Martin",MG:"Madagascar",MH:"Marshall Islands",MK:"North Macedonia",ML:"Mali",MM:"Myanmar (Burma)",MN:"Mongolia",MO:"Macao SAR China",MP:"Northern Mariana Islands",MQ:"Martinique",MR:"Mauritania",MS:"Montserrat",MT:"Malta",MU:"Mauritius",MV:"Maldives",MW:"Malawi",MX:"Mexico",MY:"Malaysia",MZ:"Mozambique",NA:"Namibia",NC:"New Caledonia",NE:"Niger",NF:"Norfolk Island",NG:"Nigeria",NI:"Nicaragua",NL:"Netherlands",NO:"Norway",NP:"Nepal",NR:"Nauru",NU:"Niue",NZ:"New Zealand",OM:"Oman",PA:"Panama",PE:"Peru",PF:"French Polynesia",PG:"Papua New Guinea",PH:"Philippines",PK:"Pakistan",PL:"Poland",PM:"St. Pierre & Miquelon",PN:"Pitcairn Islands",PR:"Puerto Rico",PS:"Palestinian Territories",PT:"Portugal",PW:"Palau",PY:"Paraguay",QA:"Qatar",QO:"Outlying Oceania",RE:"Réunion",RO:"Romania",RS:"Serbia",RU:"Russia",RW:"Rwanda",SA:"Saudi Arabia",SB:"Solomon Islands",SC:"Seychelles",SD:"Sudan",SE:"Sweden",SG:"Singapore",SH:"St. Helena",SI:"Slovenia",SJ:"Svalbard & Jan Mayen",SK:"Slovakia",SL:"Sierra Leone",SM:"San Marino",SN:"Senegal",SO:"Somalia",SR:"Suriname",SS:"South Sudan",ST:"São Tomé & Príncipe",SV:"El Salvador",SX:"Sint Maarten",SY:"Syria",SZ:"Eswatini",TA:"Tristan da Cunha",TC:"Turks & Caicos Islands",TD:"Chad",TF:"French Southern Territories",TG:"Togo",TH:"Thailand",TJ:"Tajikistan",TK:"Tokelau",TL:"Timor-Leste",TM:"Turkmenistan",TN:"Tunisia",TO:"Tonga",TR:"Türkiye",TT:"Trinidad & Tobago",TV:"Tuvalu",TW:"Taiwan",TZ:"Tanzania",UA:"Ukraine",UG:"Uganda",UM:"U.S. Outlying Islands",UN:"United Nations",US:"United States",UY:"Uruguay",UZ:"Uzbekistan",VA:"Vatican City",VC:"St. Vincent & Grenadines",VE:"Venezuela",VG:"British Virgin Islands",VI:"U.S. Virgin Islands",VN:"Vietnam",VU:"Vanuatu",WF:"Wallis & Futuna",WS:"Samoa",XA:"Pseudo-Accents",XB:"Pseudo-Bidi",XK:"Kosovo",YE:"Yemen",YT:"Mayotte",ZA:"South Africa",ZM:"Zambia",ZW:"Zimbabwe",ZZ:"Unknown Region"},"BA","Bosnia"),"GB","UK"),"HK","Hong Kong"),"MM","Myanmar"),"MO","Macao"),"PS","Palestine"),"UN","UN"),"US","US")}},Go=["af","sq","am","ar","hy","as","az","eu","be","bn","bs","bg","my","ca","zh-CN","zh-TW","zh-HK","hr","cs","da","nl","en","et","fil","fi","fr","gl","ka","de","el","gu","he","hi","hu","is","id","ga","it","ja","kn","kk","km","ko","ky","lo","lv","lt","mk","ms","ml","mt","mr","mn","ne","no","or","fa","pl","pt","pa","ro","ru","sr","si","sk","sl","es","sw","sv","ta","te","th","tr","uk","ur","uz","vi","cy","yi","yo","zu"];var Wo=!1;function Jo(e,t){return{compactLinkRenderer:{title:{simpleText:t},serviceEndpoint:{commandExecutorCommand:{commands:[{selectSubtitlesTrackCommand:{translationLanguage:{languageCode:e,languageName:t}}},{openClientOverlayAction:{type:"CLIENT_OVERLAY_TYPE_CAPTIONS_LANGUAGE",updateAction:!0}},{signalAction:{signal:"POPUP_BACK"}}]}},secondaryIcon:{iconType:"RADIO_BUTTON_UNCHECKED"}}}}function Xo(){if(Wo)return!0;if(!document.querySelector(".html5-video-player")||!window._yttv)return!1;var e=Object.values(window._yttv).find(function(e){return e&&e.instance&&"function"==typeof e.instance.resolveCommand});if(!e)return!1;if(e.instance.resolveCommand.isPatchedBySubtitleLocalization)return Wo=!0,!0;var t=e.instance.resolveCommand;return e.instance.resolveCommand=function(e,n){var i;if("CLIENT_OVERLAY_TYPE_CAPTIONS_AUTO_TRANSLATE"===(null==e||null===(i=e.openPopupAction)||void 0===i?void 0:i.uniqueId)){var r,a=Se("enableShowUserLanguage"),o=Se("enableShowOtherLanguages");if(!a&&!o)return t.apply(this,arguments);var s=null===(r=e.openPopupAction)||void 0===r||null===(r=r.popup)||void 0===r||null===(r=r.overlaySectionRenderer)||void 0===r||null===(r=r.overlay)||void 0===r||null===(r=r.overlayTwoPanelRenderer)||void 0===r||null===(r=r.actionPanel)||void 0===r||null===(r=r.overlayPanelRenderer)||void 0===r||null===(r=r.content)||void 0===r||null===(r=r.overlayPanelItemListRenderer)||void 0===r?void 0:r.items;if(!Array.isArray(s))return t.apply(this,arguments);var u=function(e){var t=new Set;return e.forEach(function(e){var n,i,r=null===(n=e.compactLinkRenderer)||void 0===n||null===(n=n.serviceEndpoint)||void 0===n||null===(n=n.commandExecutorCommand)||void 0===n?void 0:n.commands,a=null==r||null===(i=r[0])||void 0===i||null===(i=i.selectSubtitlesTrackCommand)||void 0===i?void 0:i.translationLanguage;a&&(t.add(a.languageCode),t.add(a.languageName))}),t}(s);if(a){var l=function(e){if(!e)return null;try{var t=String(e).toUpperCase(),n={CN:"zh-CN",TW:"zh-TW",HK:"zh-HK",SG:"zh-CN"};if(n[t]){var i=n[t];return{code:i,name:Ko.language.standard.long[i]||i}}var r=new Intl.Locale("und",{region:t}),a=(r.maximize?r.maximize():r).language||"en";return{code:a,name:Ko.language.standard.long[a]||a}}catch(t){return console.warn("[AxoTube:moreSubtitles] Could not infer language for country",e,t),null}}(function(){try{return window.yt&&window.yt.config_&&window.yt.config_.GL?window.yt.config_.GL:(console.warn("[AxoTube:moreSubtitles] Could not determine user country code"),null)}catch(e){return console.error("[AxoTube:moreSubtitles] Error getting country code:",e),null}}());if(l&&!function(e,t,n){return e.some(function(e){var i,r,a=null===(i=e.compactLinkRenderer)||void 0===i||null===(i=i.serviceEndpoint)||void 0===i||null===(i=i.commandExecutorCommand)||void 0===i?void 0:i.commands,o=null==a||null===(r=a[0])||void 0===r||null===(r=r.selectSubtitlesTrackCommand)||void 0===r?void 0:r.translationLanguage;return!(!o||o.languageCode!==t&&o.languageName!==n)})}(s,l.code,l.name)){var c=Jo(l.code,l.name),h=s.findIndex(function(e){var t;return"Recommended languages"===(null===(t=e.overlayMessageRenderer)||void 0===t||null===(t=t.subtitle)||void 0===t?void 0:t.simpleText)});if(h>-1)s.splice(h+1,0,c);else{var d=s.findIndex(function(e){var t;return"Other languages"===(null===(t=e.overlayMessageRenderer)||void 0===t||null===(t=t.subtitle)||void 0===t?void 0:t.simpleText)});d>-1?s.splice(d,0,c):s.unshift(c)}u.add(l.code),u.add(l.name)}}if(o){var p=Object.entries(function(){try{var e={};return Go.forEach(function(t){if(t.includes("-")){var n=D(t.split("-"),2),i=n[0],r=n[1],a=Ko.language.standard.long[i]||t,o=Ko.region.long[r]||r;e[t]="".concat(a," (").concat(o,")")}else e[t]=Ko.language.standard.long[t]||t}),e}catch(e){var t={};return Go.forEach(function(e){return t[e]=e}),t}}()).filter(function(e){var t=D(e,2),n=t[0],i=t[1];return!u.has(n)&&!u.has(i)}).sort(function(e,t){var n=D(e,2)[1],i=D(t,2)[1];return n.localeCompare(i)});p.length>0&&(s.push({overlayMessageRenderer:{title:{simpleText:""},subtitle:{simpleText:"Other Languages"},style:"OVERLAY_MESSAGE_STYLE_SUBSECTION_TITLE"}}),p.forEach(function(e){var t=D(e,2),n=t[0],i=t[1];return s.push(Jo(n,i))}))}}return t.apply(this,arguments)},e.instance.resolveCommand.isPatchedBySubtitleLocalization=!0,Wo=!0,!0}var qo=0;function Yo(){Wo||(qo+=1,Xo()||(qo>=30?console.warn("[AxoTube:moreSubtitles] resolveCommand did not become ready in time."):setTimeout(Yo,500)))}"loading"===document.readyState?document.addEventListener("DOMContentLoaded",Yo):Yo();var Qo=!1,Zo=null;function $o(){var e=document.querySelector("video");return e&&isFinite(e.currentTime)?Math.max(0,Math.floor(e.currentTime)):0}function es(){var e,t;Qo||(Qo=!0,nn(Lt("app.name"),Lt("playback.retryPrompt",{time:(e=$o(),t=e%60,Math.floor(e/60)+":"+(t<10?"0"+t:String(t)))}),null))}function ts(){var e;Zo=null,(e=document.querySelector(".ytp-error"))&&e.offsetWidth>0&&e.offsetHeight>0?es():Qo=!1}function ns(){null===Zo&&(Zo=setTimeout(ts,500))}document.addEventListener("error",function(e){e.target&&"VIDEO"===e.target.tagName&&es()},!0),window.addEventListener("keydown",function(e){406===e.keyCode&&Qo&&(e.stopPropagation(),function(){Qo=!1;var e=function(e,t){var n=e.indexOf("?");if(-1===n||!/\/watch$/.test(e.slice(0,n)))return null;var i=e.slice(n+1).split("&").filter(function(e){return e&&"t"!==e.split("=")[0]});return i.push("t="+t),e.slice(0,n+1)+i.join("&")}(location.hash,$o());e&&(location.hash=e),window.location.reload()}())},!0),function e(){document.body?new MutationObserver(ns).observe(document.body,{childList:!0,subtree:!0}):setTimeout(e,200)}();var is;is||(is=1,window.addEventListener("keydown",function(e){if(403===e.keyCode){var t=window.__axotubeProxyUrl?window.__axotubeProxyUrl:"8081"===location.port?location.protocol+"//"+location.hostname+":8081":null;t&&(e.stopPropagation(),location.href=t+"/axotube/diagnostics")}},!0));var rs="onStateChange",as="configChange",os="preferredVideoQuality",ss=new WeakMap,us=new WeakMap,ls=new WeakMap,cs=new WeakMap,hs=new WeakMap,ds=new WeakSet,ps=new WeakMap,fs=p(function e(){var t,n,i=this;u(this,e),s(t=this,n=ds),n.add(t),c(this,ss,null),c(this,us,null),c(this,ls,0),c(this,cs,null),c(this,hs,!1),c(this,ps,function(){try{var e,t,n,r,o,s,u=null===(e=l(ss,i))||void 0===e||null===(t=e.getPlayerStateObject)||void 0===t?void 0:t.call(e),c=null===(n=l(ss,i))||void 0===n||null===(r=n.getVideoData)||void 0===r?void 0:r.call(n),d=null==c?void 0:c.video_id;d!==l(cs,i)&&(h(cs,i,d),a(ds,i,gs).call(i));var p=Object.values((null===(o=l(ss,i))||void 0===o||null===(s=o.getVideoStats)||void 0===s?void 0:s.call(o))||{}).find(function(e){return e&&"shortspage"===e});null==u||!u.isPlaying||l(hs,i)||p||(h(hs,i,a(ds,i,xs).call(i)),l(hs,i)||a(ds,i,bs).call(i))}catch(e){console.warn("[AxoTube:preferredVideoQuality] State change handler failed:",e)}}),a(ds,this,ys).call(this),Mi(function(e){return a(ds,i,vs).call(i,e)}),Ui(function(e){e!==l(cs,i)&&(h(cs,i,e),a(ds,i,gs).call(i),l(ps,i).call(i))})});function ms(){l(us,this)&&(clearTimeout(l(us,this)),h(us,this,null))}function gs(){a(ds,this,ms).call(this),h(ls,this,0),h(hs,this,!1)}function vs(e){if(!e){if(l(ss,this))try{l(ss,this).removeEventListener(rs,l(ps,this))}catch(e){}return h(ss,this,null),h(cs,this,null),void a(ds,this,gs).call(this)}if(e!==l(ss,this)){if(l(ss,this))try{l(ss,this).removeEventListener(rs,l(ps,this))}catch(e){}h(ss,this,e),h(cs,this,null),a(ds,this,gs).call(this);try{l(ss,this).addEventListener(rs,l(ps,this))}catch(e){console.warn("[AxoTube:preferredVideoQuality] Could not attach state change listener:",e)}l(ps,this).call(this)}}function ys(){var e=this;ke.addEventListener(as,function(t){var n;(null===(n=t.detail)||void 0===n?void 0:n.key)===os&&(a(ds,e,gs).call(e),h(hs,e,a(ds,e,xs).call(e)),l(hs,e)||a(ds,e,bs).call(e))})}function bs(){var e=this;l(us,this)||l(hs,this)||l(ls,this)>=10||(h(ls,this,l(ls,this)+1),h(us,this,setTimeout(function(){h(us,e,null);try{var t,n,i=null===(t=l(ss,e))||void 0===t||null===(n=t.getPlayerStateObject)||void 0===n?void 0:n.call(t);if(null==i||!i.isPlaying||l(ss,e)!==Bi())return;h(hs,e,a(ds,e,xs).call(e)),l(hs,e)||a(ds,e,bs).call(e)}catch(e){console.warn("[AxoTube:preferredVideoQuality] Retry failed:",e)}},500)))}function xs(){if(!l(ss,this)||"function"!=typeof l(ss,this).setPlaybackQualityRange)return!1;var e=Se(os);try{if(!e||"auto"===e)return l(ss,this).setPlaybackQualityRange("auto","auto"),!0;var t=a(ds,this,Ss).call(this,e);return!!t&&(l(ss,this).setPlaybackQualityRange(t,t),!0)}catch(e){return console.warn("[AxoTube:preferredVideoQuality] Failed to apply quality:",e),!1}}function Ss(e){try{var t,n,i,r=null===(t=(n=l(ss,this)).getAvailableQualityData)||void 0===t?void 0:t.call(n);if(!Array.isArray(r)||0===r.length)return null;var a=function(e){return parseInt(e,10)||0},o=a(e),s=r.find(function(e){return a(e.qualityLabel)===o});return s?s.quality:(null===(i=r.slice().sort(function(e,t){var n=a(e.qualityLabel),i=a(t.qualityLabel),r=n>o?1:0,s=i>o?1:0;return r!==s?r-s:Math.abs(n-o)-Math.abs(i-o)})[0])||void 0===i?void 0:i.quality)||null}catch(e){return console.warn("[AxoTube:preferredVideoQuality] Quality determination failed:",e),null}}try{window.preferredVideoQualityHandler=new fs}catch(e){console.error("[AxoTube:preferredVideoQuality] PreferredQualityHandler initialization failed:",e)}function Es(e){return e&&e.tileRenderer&&e.tileRenderer.contentId}function ks(e){var t=window.queuedVideos.videos[e],n=t&&t.tileRenderer&&t.tileRenderer.onSelectCommand;return!!n&&(window.queuedVideos.currentIndex=e,window.queuedVideos.lastVideoId=Es(t)||null,setTimeout(function(){return wo(n)},500),!0)}function ws(){window.queuedVideos.currentIndex=-1,window.queuedVideos.lastVideoId=null,wo({customAction:{action:"CLEAR_QUEUE"}})}window.queuedVideos={videos:[],lastVideoId:null,currentIndex:-1};var Ds=null;Mi(function(e){if(Ds&&(Ds.player.removeEventListener("onStateChange",Ds.listener),Ds=null),e&&"function"==typeof e.addEventListener){var t=function(){return function(e){var t=e.getPlayerStateObject(),n=e.getVideoData(),i=window.queuedVideos;if(0===i.videos.length)return i.currentIndex=-1,void(i.lastVideoId=null);if(t.isEnded){var r=i.currentIndex;if((r<0||r>=i.videos.length)&&(r=i.videos.findIndex(function(e){return Es(e)===n.video_id})),-1!==r){var a=r+1;if(a<i.videos.length&&ks(a))return;return void ws()}if(i.currentIndex+1<i.videos.length&&ks(i.currentIndex+1))return;if(ks(0))return;ws()}else if(t.isPlaying){var o=document.getElementById("container");if(o&&o.style.setProperty("opacity","1","important"),Es(i.videos[i.currentIndex])===n.video_id)return void(i.lastVideoId=n.video_id);var s=i.videos.findIndex(function(e){return Es(e)===n.video_id});-1!==s&&(i.currentIndex=s,i.lastVideoId=n.video_id)}}(e)};e.addEventListener("onStateChange",t),Ds={player:e,listener:t}}});var As=null,Cs=0;function Ts(){Cs>=20||(Cs+=1,As=setTimeout(function(){return Ps(!1)},500))}function Ps(){if(arguments.length>0&&void 0!==arguments[0]&&arguments[0]&&(Cs=0),As&&(clearTimeout(As),As=null),window._yttv){var e=null;try{e=Object.values(window._yttv).find(function(e){return e instanceof Map&&e.has("ENABLE_PREVIEWS_WITH_SOUND")})}catch(t){e=null}e?(Cs=0,e.set("ENABLE_PREVIEWS_WITH_SOUND",Fe())):Ts()}else Ts()}ke.addEventListener("configChange",function(){Ps(!0)}),"complete"===document.readyState?Ps(!0):window.addEventListener("load",function(){return Ps(!0)});var Fs="http://127.0.0.1:8090",Bs=-1,Is=!1,Ls=!1,Os=!1,Rs=null,Ns=new Set,Ms=!1,_s="",Us=null,js=!1,Hs=!1,zs=null,Vs=!1;function Ks(){return"undefined"!=typeof window&&("string"==typeof window.__axotubeServiceUrl||!!se()||void 0!==window.tizen)}var Gs=Jt,Ws=Yt;function Js(){return Kn("".concat(Fs,"/api/pairing-code")).then(function(e){if(!e.ok)throw new Error("pairing code HTTP ".concat(e.status));return e.json()}).then(function(e){return Yr(e),e}).catch(function(){return Yr(null),null})}function Xs(){!Hs&&Gs()&&Js().then(function(e){if(e&&e.code&&!Hs){Hs=!0;try{var t=Array.isArray(e.urls)&&e.urls.length?e.urls[0]:null;nn(Lt("app.name"),t?Lt("toasts.pairingWithUrl",{url:t,code:e.code}):Lt("toasts.pairingCodeOnly",{code:e.code}))}catch(e){}}})}function qs(e,t){if(e===t)return!0;try{return me(e)===me(t)}catch(e){return!1}}function Ys(e){if(!Rs)return!1;var t=Object.keys(e),n=Object.keys(Rs);return t.length!==n.length||t.some(function(t){return!Object.prototype.hasOwnProperty.call(Rs,t)||!qs(e[t],Rs[t])})}function Qs(){if(!(!Ks()||Is||Bs<0)&&Rs){var e=we();Ys(e)?(Is=!0,Kn("".concat(Fs,"/api/config/push"),{method:"POST",headers:{"Content-Type":"application/json"},body:me({revision:Bs,config:e})}).then(function(e){if(409===e.status)return{conflict:!0};if(!e.ok)throw new Error("config push HTTP ".concat(e.status));return e.json()}).then(function(t){if(null!=t&&t.conflict)return"conflict";if(!t||!t.applied||!Number.isSafeInteger(t.revision))throw new Error("Config push was not acknowledged");Bs=t.revision,Rs=e;var n,i=we(),r=f(Ns);try{for(r.s();!(n=r.n()).done;){var a=n.value;qs(i[a],e[a])&&Ns.delete(a)}}catch(e){r.e(e)}finally{r.f()}return"accepted"}).catch(function(){return"failed"}).then(function(e){Is=!1,"conflict"===e?$s():"accepted"===e&&Ys(we())&&Zs()})):Ns.clear()}}function Zs(){Ks()&&(clearTimeout(Us),Us=setTimeout(Qs,250))}function $s(){Ks()&&!Is&&(Is=!0,Kn("".concat(Fs,"/api/config")).then(function(e){if(!e.ok)throw new Error("config pull HTTP ".concat(e.status));return e.json()}).then(function(e){if(e&&Number.isSafeInteger(e.revision)&&!(e.revision<0)&&e.config&&"object"===T(e.config)&&!Array.isArray(e.config)){!function(){if(!js&&Ks()&&Gs())try{nn(Lt("app.name"),Lt("toasts.serviceConnected")),js=!0,setTimeout(Xs,1200)}catch(e){}}(),nu=0;var t=e.config;Ms=!0;var n=!0;try{Object.keys(t).forEach(function(e){if(!Ns.has(e)&&void 0!==t[e])try{qs(Se(e),t[e])||Ee(e,t[e])||(n=!1)}catch(e){n=!1}})}finally{Ms=!1}var i=we();Object.keys(i).forEach(function(e){Object.prototype.hasOwnProperty.call(t,e)?qs(i[e],t[e])&&Ns.delete(e):Ns.add(e)}),Rs=t,n&&(Bs=e.revision)}}).catch(function(){nu+=1}).then(function(){Is=!1,Qs()}))}function eu(e){return function(e){return e?Kn("".concat(Fs,"/api/command/ack"),{method:"POST",headers:{"Content-Type":"application/json"},body:me({id:e})}).then(function(e){if(!e.ok)throw new Error("command ACK HTTP ".concat(e.status));return!0}).catch(function(){return!1}):Promise.resolve(!1)}(e).then(function(t){if(!t||zs!==e)return t;var n=Vs;if(zs=null,Vs=!1,n)try{window.location.reload()}catch(e){}return!0})}function tu(){Ks()&&!Ls&&(Ls=!0,Kn("".concat(Fs,"/api/command")).then(function(e){if(!e.ok)throw new Error("command poll HTTP ".concat(e.status));return e.json()}).then(function(e){if(e&&e.command&&e.id){var t=e.id;if(e.id===zs)return eu(t);if("toast"===e.command.action){zs=t,Vs=!1;try{nn(Lt("app.name"),String(e.command.text||"").slice(0,200))}catch(e){}return eu(t)}if("reload"===e.command.action)return zs=t,Vs=!0,eu(t);var n=function(e){if(!e||"object"!==T(e))return null;if("play"===e.action&&e.videoId){var t={videoId:e.videoId};return e.playlistId&&(t.playlistId=e.playlistId),{watchEndpoint:t}}return"search"===e.action&&e.query?{searchEndpoint:{query:e.query}}:"browse"===e.action&&e.browseId?{browseEndpoint:{browseId:e.browseId}}:null}(e.command);if(n)return Ws(n).then(function(e){if(e){zs=t,Vs=!1;try{nn(Lt("app.name"),Lt("toasts.commandReceived"))}catch(e){}return eu(t)}})}}).catch(function(){}).then(function(){Ls=!1}))}ke.addEventListener("configChange",function(e){var t;Ms||("string"==typeof(null==e||null===(t=e.detail)||void 0===t?void 0:t.key)&&Ns.add(e.detail.key),Zs())});var nu=0;setTimeout(function e(){$s(),tu(),function(){if(Ks()&&!Os){var e=null;try{var t=document.querySelector("video");if(t&&t.currentSrc){var n,i=location.hash.match(/[?&]v=([^&]+)/);e={videoId:i?i[1]:null,title:(null===(n=document.querySelector("ytlr-player-header-title"))||void 0===n?void 0:n.textContent)||document.title,state:t.paused?"paused":"playing",progress:t.currentTime,duration:t.duration}}}catch(e){return}var r=e?me(e):"none";r!==_s&&(_s=r,Os=!0,Kn("".concat(Fs,"/api/nowplaying"),{method:"POST",headers:{"Content-Type":"application/json"},body:"none"===r?"{}":r}).then(function(e){if(!e.ok)throw new Error("now playing HTTP ".concat(e.status))}).catch(function(){_s=""}).then(function(){Os=!1}))}}(),Ks()&&(qr?Date.now()-qr:1/0)>6e4&&Js(),setTimeout(e,function(){if(0===nu)return 5e3;var e=5e3*Math.pow(2,Math.min(nu,3));return Math.min(e,3e4)}())},3e3);try{Yt(function(e){if(!e||"object"!==T(e))return null;if(e.v){var t={videoId:e.v};return e.list&&(t.playlistId=e.list),{watchEndpoint:t}}if(e.list)return{playlistEndpoint:{playlistId:e.list}};var n=e.search_query||e.q;return n?{searchEndpoint:{query:n}}:e.browseId?{browseEndpoint:{browseId:e.browseId}}:null}(function(e){if(!e||e.length<=1)return{};for(var t={},n=e.substring(1).split("&"),i=0;i<n.length;i+=1){var r=n[i];if(r){var a=r.indexOf("=");if(-1!==a){var o=decodeURIComponent(r.substring(0,a).replace(/\+/g," ")),s=decodeURIComponent(r.substring(a+1).replace(/\+/g," "));t[o]=s}else t[decodeURIComponent(r.replace(/\+/g," "))]=""}}return t}(location.search)))}catch(e){}function iu(e){return e<10?"0"+e:String(e)}var ru="axo-clock",au="axo-clock-style",ou={topLeft:"axo-clock-top-left",topRight:"axo-clock-top-right",bottomLeft:"axo-clock-bottom-left",bottomRight:"axo-clock-bottom-right"},su="\n#".concat(ru,' {\n position: fixed;\n z-index: 9000;\n pointer-events: none;\n padding: 3vh 3vw;\n font-family: "YouTube Sans", Roboto, "Noto Sans", Arial, sans-serif;\n font-size: 4vh;\n line-height: 1;\n font-variant-numeric: tabular-nums;\n color: rgba(255, 255, 255, 0.92);\n text-shadow: 0 1px 4px rgba(0, 0, 0, 0.85);\n}\n#').concat(ru,".axo-clock-top-left { top: 0; left: 0; }\n#").concat(ru,".axo-clock-top-right { top: 0; right: 0; }\n#").concat(ru,".axo-clock-bottom-left { bottom: 0; left: 0; }\n#").concat(ru,".axo-clock-bottom-right { bottom: 0; right: 0; }\n"),uu=null,lu=null;function cu(){var e=Se("clockMode");return"always"===e||"notPlaying"===e&&!function(){var e=Ii();return!(!e||e.paused||e.ended)}()}function hu(){null!==lu&&clearInterval(lu),lu=null,uu&&uu.parentNode&&uu.parentNode.removeChild(uu),uu=null}function du(){uu||((uu=document.createElement("div")).id=ru,document.body.appendChild(uu));var e=ou[Se("clockPosition")]||ou.topRight;uu.className!==e&&(uu.className=e);var t=function(e,t,n){var i=iu(e.getMinutes()),r=n?":"+iu(e.getSeconds()):"",a=e.getHours();if("24h"===t)return iu(a)+":"+i+r;var o=String(a%12==0?12:a%12)+":"+i+r;return"12hNoAmPm"===t?o:o+(a<12?" AM":" PM")}(new Date,Se("clockFormat"),!!Se("clockShowSeconds"));uu.textContent!==t&&(uu.textContent=t)}function pu(){document.body&&(cu()?(!function(){if(!document.getElementById(au)){var e=document.createElement("style");e.id=au,e.textContent=su,(document.head||document.documentElement).appendChild(e)}}(),du(),null===lu&&(lu=setInterval(du,1e3))):hu())}["play","playing","pause","ended","emptied"].forEach(function(e){document.addEventListener(e,pu,!0)}),ke.addEventListener("configChange",function(e){var t=e.detail&&e.detail.key;"clockMode"!==t&&"clockFormat"!==t&&"clockPosition"!==t&&"clockShowSeconds"!==t||pu()}),function e(){document.body?pu():setTimeout(e,250)}();var fu="axo-panel-shrink",mu="axo-panel-shrink-style",gu="\nbody.".concat(fu," ytlr-player-container {\n transform: scale(var(--axo-panel-scale, 0.6));\n transform-origin: 0 0;\n transition: transform 0.25s ease;\n}\n");var vu=null,yu=null,bu=null,xu=null;function Su(){if(xu=null,document.body){var e=document.querySelector("ytlr-engagement-panel-section-list-renderer");!function(e){if(e===bu)return;yu&&yu.disconnect();if(yu=null,bu=e,!e||"undefined"==typeof MutationObserver)return;(yu=new MutationObserver(Eu)).observe(e,{subtree:!0,attributes:!0,attributeFilter:["class"]})}(e),function(){if(!document.getElementById(mu)){var e=document.createElement("style");e.id=mu,e.textContent=gu,(document.head||document.documentElement).appendChild(e)}}();var t=!!Se("enablePanelShrink")&&/#\/watch/.test(location.hash||"")&&function(e){if(!e)return!1;var t=e.querySelector("ytlr-animated-overlay");return!t||!t.classList.contains("frHKed")}(e);document.body.classList.contains(fu)!==t&&document.body.classList.toggle(fu,t);var n=String(Number(Se("panelShrinkPercent"))/100);n!==vu&&(vu=n,document.documentElement.style.setProperty("--axo-panel-scale",n))}}function Eu(){null===xu&&(xu=requestAnimationFrame(Su))}!function e(){if(document.body){var t=document.getElementById("container")||document.body;"undefined"!=typeof MutationObserver&&new MutationObserver(Eu).observe(t,{childList:!0,subtree:!0}),window.addEventListener("hashchange",Eu),ke.addEventListener("configChange",function(e){var t=e.detail&&e.detail.key;"enablePanelShrink"!==t&&"panelShrinkPercent"!==t||Eu()}),Su()}else setTimeout(e,250)}();var ku,wu={exports:{}};var Du,Au,Cu=(ku||(ku=1,Du=function(){return function(e){var t={};function n(i){if(t[i])return t[i].exports;var r=t[i]={exports:{},id:i,loaded:!1};return e[i].call(r.exports,r,r.exports,n),r.loaded=!0,r.exports}return n.m=e,n.c=t,n.p="",n(0)}([function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var i=n(1),r=n(3),a=n(8),o=n(15);function s(e,t,n){var o=null,s=function(e,t){n&&n(e,t),o&&o.visit(e,t)},u="function"==typeof n?s:null,l=!1;if(t){l="boolean"==typeof t.comment&&t.comment;var c="boolean"==typeof t.attachComment&&t.attachComment;(l||c)&&((o=new i.CommentHandler).attach=c,t.comment=!0,u=s)}var h,d=!1;t&&"string"==typeof t.sourceType&&(d="module"===t.sourceType),h=t&&"boolean"==typeof t.jsx&&t.jsx?new r.JSXParser(e,t,u):new a.Parser(e,t,u);var p=d?h.parseModule():h.parseScript();return l&&o&&(p.comments=o.comments),h.config.tokens&&(p.tokens=h.tokens),h.config.tolerant&&(p.errors=h.errorHandler.errors),p}t.parse=s,t.parseModule=function(e,t,n){var i=t||{};return i.sourceType="module",s(e,i,n)},t.parseScript=function(e,t,n){var i=t||{};return i.sourceType="script",s(e,i,n)},t.tokenize=function(e,t,n){var i,r=new o.Tokenizer(e,t);i=[];try{for(;;){var a=r.getNextToken();if(!a)break;n&&(a=n(a)),i.push(a)}}catch(e){r.errorHandler.tolerate(e)}return r.errorHandler.tolerant&&(i.errors=r.errors()),i};var u=n(2);t.Syntax=u.Syntax,t.version="4.0.1"},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var i=n(2),r=function(){function e(){this.attach=!1,this.comments=[],this.stack=[],this.leading=[],this.trailing=[]}return e.prototype.insertInnerComments=function(e,t){if(e.type===i.Syntax.BlockStatement&&0===e.body.length){for(var n=[],r=this.leading.length-1;r>=0;--r){var a=this.leading[r];t.end.offset>=a.start&&(n.unshift(a.comment),this.leading.splice(r,1),this.trailing.splice(r,1))}n.length&&(e.innerComments=n)}},e.prototype.findTrailingComments=function(e){var t=[];if(this.trailing.length>0){for(var n=this.trailing.length-1;n>=0;--n){var i=this.trailing[n];i.start>=e.end.offset&&t.unshift(i.comment)}return this.trailing.length=0,t}var r=this.stack[this.stack.length-1];if(r&&r.node.trailingComments){var a=r.node.trailingComments[0];a&&a.range[0]>=e.end.offset&&(t=r.node.trailingComments,delete r.node.trailingComments)}return t},e.prototype.findLeadingComments=function(e){for(var t,n=[];this.stack.length>0&&(a=this.stack[this.stack.length-1])&&a.start>=e.start.offset;)t=a.node,this.stack.pop();if(t){for(var i=(t.leadingComments?t.leadingComments.length:0)-1;i>=0;--i){var r=t.leadingComments[i];r.range[1]<=e.start.offset&&(n.unshift(r),t.leadingComments.splice(i,1))}return t.leadingComments&&0===t.leadingComments.length&&delete t.leadingComments,n}for(i=this.leading.length-1;i>=0;--i){var a;(a=this.leading[i]).start<=e.start.offset&&(n.unshift(a.comment),this.leading.splice(i,1))}return n},e.prototype.visitNode=function(e,t){if(!(e.type===i.Syntax.Program&&e.body.length>0)){this.insertInnerComments(e,t);var n=this.findTrailingComments(t),r=this.findLeadingComments(t);r.length>0&&(e.leadingComments=r),n.length>0&&(e.trailingComments=n),this.stack.push({node:e,start:t.start.offset})}},e.prototype.visitComment=function(e,t){var n="L"===e.type[0]?"Line":"Block",i={type:n,value:e.value};if(e.range&&(i.range=e.range),e.loc&&(i.loc=e.loc),this.comments.push(i),this.attach){var r={comment:{type:n,value:e.value,range:[t.start.offset,t.end.offset]},start:t.start.offset};e.loc&&(r.comment.loc=e.loc),e.type=n,this.leading.push(r),this.trailing.push(r)}},e.prototype.visit=function(e,t){"LineComment"===e.type||"BlockComment"===e.type?this.visitComment(e,t):this.attach&&this.visitNode(e,t)},e}();t.CommentHandler=r},function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.Syntax={AssignmentExpression:"AssignmentExpression",AssignmentPattern:"AssignmentPattern",ArrayExpression:"ArrayExpression",ArrayPattern:"ArrayPattern",ArrowFunctionExpression:"ArrowFunctionExpression",AwaitExpression:"AwaitExpression",BlockStatement:"BlockStatement",BinaryExpression:"BinaryExpression",BreakStatement:"BreakStatement",CallExpression:"CallExpression",CatchClause:"CatchClause",ClassBody:"ClassBody",ClassDeclaration:"ClassDeclaration",ClassExpression:"ClassExpression",ConditionalExpression:"ConditionalExpression",ContinueStatement:"ContinueStatement",DoWhileStatement:"DoWhileStatement",DebuggerStatement:"DebuggerStatement",EmptyStatement:"EmptyStatement",ExportAllDeclaration:"ExportAllDeclaration",ExportDefaultDeclaration:"ExportDefaultDeclaration",ExportNamedDeclaration:"ExportNamedDeclaration",ExportSpecifier:"ExportSpecifier",ExpressionStatement:"ExpressionStatement",ForStatement:"ForStatement",ForOfStatement:"ForOfStatement",ForInStatement:"ForInStatement",FunctionDeclaration:"FunctionDeclaration",FunctionExpression:"FunctionExpression",Identifier:"Identifier",IfStatement:"IfStatement",ImportDeclaration:"ImportDeclaration",ImportDefaultSpecifier:"ImportDefaultSpecifier",ImportNamespaceSpecifier:"ImportNamespaceSpecifier",ImportSpecifier:"ImportSpecifier",Literal:"Literal",LabeledStatement:"LabeledStatement",LogicalExpression:"LogicalExpression",MemberExpression:"MemberExpression",MetaProperty:"MetaProperty",MethodDefinition:"MethodDefinition",NewExpression:"NewExpression",ObjectExpression:"ObjectExpression",ObjectPattern:"ObjectPattern",Program:"Program",Property:"Property",RestElement:"RestElement",ReturnStatement:"ReturnStatement",SequenceExpression:"SequenceExpression",SpreadElement:"SpreadElement",Super:"Super",SwitchCase:"SwitchCase",SwitchStatement:"SwitchStatement",TaggedTemplateExpression:"TaggedTemplateExpression",TemplateElement:"TemplateElement",TemplateLiteral:"TemplateLiteral",ThisExpression:"ThisExpression",ThrowStatement:"ThrowStatement",TryStatement:"TryStatement",UnaryExpression:"UnaryExpression",UpdateExpression:"UpdateExpression",VariableDeclaration:"VariableDeclaration",VariableDeclarator:"VariableDeclarator",WhileStatement:"WhileStatement",WithStatement:"WithStatement",YieldExpression:"YieldExpression"}},function(e,t,n){var i,r=this&&this.__extends||(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},function(e,t){function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var a=n(4),o=n(5),s=n(6),u=n(7),l=n(8),c=n(13),h=n(14);function d(e){var t;switch(e.type){case s.JSXSyntax.JSXIdentifier:t=e.name;break;case s.JSXSyntax.JSXNamespacedName:var n=e;t=d(n.namespace)+":"+d(n.name);break;case s.JSXSyntax.JSXMemberExpression:var i=e;t=d(i.object)+"."+d(i.property)}return t}c.TokenName[100]="JSXIdentifier",c.TokenName[101]="JSXText";var p=function(e){function t(t,n,i){return e.call(this,t,n,i)||this}return r(t,e),t.prototype.parsePrimaryExpression=function(){return this.match("<")?this.parseJSXRoot():e.prototype.parsePrimaryExpression.call(this)},t.prototype.startJSX=function(){this.scanner.index=this.startMarker.index,this.scanner.lineNumber=this.startMarker.line,this.scanner.lineStart=this.startMarker.index-this.startMarker.column},t.prototype.finishJSX=function(){this.nextToken()},t.prototype.reenterJSX=function(){this.startJSX(),this.expectJSX("}"),this.config.tokens&&this.tokens.pop()},t.prototype.createJSXNode=function(){return this.collectComments(),{index:this.scanner.index,line:this.scanner.lineNumber,column:this.scanner.index-this.scanner.lineStart}},t.prototype.createJSXChildNode=function(){return{index:this.scanner.index,line:this.scanner.lineNumber,column:this.scanner.index-this.scanner.lineStart}},t.prototype.scanXHTMLEntity=function(e){for(var t="&",n=!0,i=!1,r=!1,o=!1;!this.scanner.eof()&&n&&!i;){var s=this.scanner.source[this.scanner.index];if(s===e)break;if(i=";"===s,t+=s,++this.scanner.index,!i)switch(t.length){case 2:r="#"===s;break;case 3:r&&(n=(o="x"===s)||a.Character.isDecimalDigit(s.charCodeAt(0)),r=r&&!o);break;default:n=(n=n&&!(r&&!a.Character.isDecimalDigit(s.charCodeAt(0))))&&!(o&&!a.Character.isHexDigit(s.charCodeAt(0)))}}if(n&&i&&t.length>2){var u=t.substr(1,t.length-2);r&&u.length>1?t=String.fromCharCode(parseInt(u.substr(1),10)):o&&u.length>2?t=String.fromCharCode(parseInt("0"+u.substr(1),16)):r||o||!h.XHTMLEntities[u]||(t=h.XHTMLEntities[u])}return t},t.prototype.lexJSX=function(){var e=this.scanner.source.charCodeAt(this.scanner.index);if(60===e||62===e||47===e||58===e||61===e||123===e||125===e)return{type:7,value:s=this.scanner.source[this.scanner.index++],lineNumber:this.scanner.lineNumber,lineStart:this.scanner.lineStart,start:this.scanner.index-1,end:this.scanner.index};if(34===e||39===e){for(var t=this.scanner.index,n=this.scanner.source[this.scanner.index++],i="";!this.scanner.eof()&&(u=this.scanner.source[this.scanner.index++])!==n;)i+="&"===u?this.scanXHTMLEntity(n):u;return{type:8,value:i,lineNumber:this.scanner.lineNumber,lineStart:this.scanner.lineStart,start:t,end:this.scanner.index}}if(46===e){var r=this.scanner.source.charCodeAt(this.scanner.index+1),o=this.scanner.source.charCodeAt(this.scanner.index+2),s=46===r&&46===o?"...":".";return t=this.scanner.index,this.scanner.index+=s.length,{type:7,value:s,lineNumber:this.scanner.lineNumber,lineStart:this.scanner.lineStart,start:t,end:this.scanner.index}}if(96===e)return{type:10,value:"",lineNumber:this.scanner.lineNumber,lineStart:this.scanner.lineStart,start:this.scanner.index,end:this.scanner.index};if(a.Character.isIdentifierStart(e)&&92!==e){for(t=this.scanner.index,++this.scanner.index;!this.scanner.eof();){var u=this.scanner.source.charCodeAt(this.scanner.index);if(a.Character.isIdentifierPart(u)&&92!==u)++this.scanner.index;else{if(45!==u)break;++this.scanner.index}}return{type:100,value:this.scanner.source.slice(t,this.scanner.index),lineNumber:this.scanner.lineNumber,lineStart:this.scanner.lineStart,start:t,end:this.scanner.index}}return this.scanner.lex()},t.prototype.nextJSXToken=function(){this.collectComments(),this.startMarker.index=this.scanner.index,this.startMarker.line=this.scanner.lineNumber,this.startMarker.column=this.scanner.index-this.scanner.lineStart;var e=this.lexJSX();return this.lastMarker.index=this.scanner.index,this.lastMarker.line=this.scanner.lineNumber,this.lastMarker.column=this.scanner.index-this.scanner.lineStart,this.config.tokens&&this.tokens.push(this.convertToken(e)),e},t.prototype.nextJSXText=function(){this.startMarker.index=this.scanner.index,this.startMarker.line=this.scanner.lineNumber,this.startMarker.column=this.scanner.index-this.scanner.lineStart;for(var e=this.scanner.index,t="";!this.scanner.eof();){var n=this.scanner.source[this.scanner.index];if("{"===n||"<"===n)break;++this.scanner.index,t+=n,a.Character.isLineTerminator(n.charCodeAt(0))&&(++this.scanner.lineNumber,"\r"===n&&"\n"===this.scanner.source[this.scanner.index]&&++this.scanner.index,this.scanner.lineStart=this.scanner.index)}this.lastMarker.index=this.scanner.index,this.lastMarker.line=this.scanner.lineNumber,this.lastMarker.column=this.scanner.index-this.scanner.lineStart;var i={type:101,value:t,lineNumber:this.scanner.lineNumber,lineStart:this.scanner.lineStart,start:e,end:this.scanner.index};return t.length>0&&this.config.tokens&&this.tokens.push(this.convertToken(i)),i},t.prototype.peekJSXToken=function(){var e=this.scanner.saveState();this.scanner.scanComments();var t=this.lexJSX();return this.scanner.restoreState(e),t},t.prototype.expectJSX=function(e){var t=this.nextJSXToken();7===t.type&&t.value===e||this.throwUnexpectedToken(t)},t.prototype.matchJSX=function(e){var t=this.peekJSXToken();return 7===t.type&&t.value===e},t.prototype.parseJSXIdentifier=function(){var e=this.createJSXNode(),t=this.nextJSXToken();return 100!==t.type&&this.throwUnexpectedToken(t),this.finalize(e,new o.JSXIdentifier(t.value))},t.prototype.parseJSXElementName=function(){var e=this.createJSXNode(),t=this.parseJSXIdentifier();if(this.matchJSX(":")){var n=t;this.expectJSX(":");var i=this.parseJSXIdentifier();t=this.finalize(e,new o.JSXNamespacedName(n,i))}else if(this.matchJSX("."))for(;this.matchJSX(".");){var r=t;this.expectJSX(".");var a=this.parseJSXIdentifier();t=this.finalize(e,new o.JSXMemberExpression(r,a))}return t},t.prototype.parseJSXAttributeName=function(){var e,t=this.createJSXNode(),n=this.parseJSXIdentifier();if(this.matchJSX(":")){var i=n;this.expectJSX(":");var r=this.parseJSXIdentifier();e=this.finalize(t,new o.JSXNamespacedName(i,r))}else e=n;return e},t.prototype.parseJSXStringLiteralAttribute=function(){var e=this.createJSXNode(),t=this.nextJSXToken();8!==t.type&&this.throwUnexpectedToken(t);var n=this.getTokenRaw(t);return this.finalize(e,new u.Literal(t.value,n))},t.prototype.parseJSXExpressionAttribute=function(){var e=this.createJSXNode();this.expectJSX("{"),this.finishJSX(),this.match("}")&&this.tolerateError("JSX attributes must only be assigned a non-empty expression");var t=this.parseAssignmentExpression();return this.reenterJSX(),this.finalize(e,new o.JSXExpressionContainer(t))},t.prototype.parseJSXAttributeValue=function(){return this.matchJSX("{")?this.parseJSXExpressionAttribute():this.matchJSX("<")?this.parseJSXElement():this.parseJSXStringLiteralAttribute()},t.prototype.parseJSXNameValueAttribute=function(){var e=this.createJSXNode(),t=this.parseJSXAttributeName(),n=null;return this.matchJSX("=")&&(this.expectJSX("="),n=this.parseJSXAttributeValue()),this.finalize(e,new o.JSXAttribute(t,n))},t.prototype.parseJSXSpreadAttribute=function(){var e=this.createJSXNode();this.expectJSX("{"),this.expectJSX("..."),this.finishJSX();var t=this.parseAssignmentExpression();return this.reenterJSX(),this.finalize(e,new o.JSXSpreadAttribute(t))},t.prototype.parseJSXAttributes=function(){for(var e=[];!this.matchJSX("/")&&!this.matchJSX(">");){var t=this.matchJSX("{")?this.parseJSXSpreadAttribute():this.parseJSXNameValueAttribute();e.push(t)}return e},t.prototype.parseJSXOpeningElement=function(){var e=this.createJSXNode();this.expectJSX("<");var t=this.parseJSXElementName(),n=this.parseJSXAttributes(),i=this.matchJSX("/");return i&&this.expectJSX("/"),this.expectJSX(">"),this.finalize(e,new o.JSXOpeningElement(t,i,n))},t.prototype.parseJSXBoundaryElement=function(){var e=this.createJSXNode();if(this.expectJSX("<"),this.matchJSX("/")){this.expectJSX("/");var t=this.parseJSXElementName();return this.expectJSX(">"),this.finalize(e,new o.JSXClosingElement(t))}var n=this.parseJSXElementName(),i=this.parseJSXAttributes(),r=this.matchJSX("/");return r&&this.expectJSX("/"),this.expectJSX(">"),this.finalize(e,new o.JSXOpeningElement(n,r,i))},t.prototype.parseJSXEmptyExpression=function(){var e=this.createJSXChildNode();return this.collectComments(),this.lastMarker.index=this.scanner.index,this.lastMarker.line=this.scanner.lineNumber,this.lastMarker.column=this.scanner.index-this.scanner.lineStart,this.finalize(e,new o.JSXEmptyExpression)},t.prototype.parseJSXExpressionContainer=function(){var e,t=this.createJSXNode();return this.expectJSX("{"),this.matchJSX("}")?(e=this.parseJSXEmptyExpression(),this.expectJSX("}")):(this.finishJSX(),e=this.parseAssignmentExpression(),this.reenterJSX()),this.finalize(t,new o.JSXExpressionContainer(e))},t.prototype.parseJSXChildren=function(){for(var e=[];!this.scanner.eof();){var t=this.createJSXChildNode(),n=this.nextJSXText();if(n.start<n.end){var i=this.getTokenRaw(n),r=this.finalize(t,new o.JSXText(n.value,i));e.push(r)}if("{"!==this.scanner.source[this.scanner.index])break;var a=this.parseJSXExpressionContainer();e.push(a)}return e},t.prototype.parseComplexJSXElement=function(e){for(var t=[];!this.scanner.eof();){e.children=e.children.concat(this.parseJSXChildren());var n=this.createJSXChildNode(),i=this.parseJSXBoundaryElement();if(i.type===s.JSXSyntax.JSXOpeningElement){var r=i;if(r.selfClosing){var a=this.finalize(n,new o.JSXElement(r,[],null));e.children.push(a)}else t.push(e),e={node:n,opening:r,closing:null,children:[]}}if(i.type===s.JSXSyntax.JSXClosingElement){e.closing=i;var u=d(e.opening.name);if(u!==d(e.closing.name)&&this.tolerateError("Expected corresponding JSX closing tag for %0",u),!(t.length>0))break;a=this.finalize(e.node,new o.JSXElement(e.opening,e.children,e.closing)),(e=t[t.length-1]).children.push(a),t.pop()}}return e},t.prototype.parseJSXElement=function(){var e=this.createJSXNode(),t=this.parseJSXOpeningElement(),n=[],i=null;if(!t.selfClosing){var r=this.parseComplexJSXElement({node:e,opening:t,closing:i,children:n});n=r.children,i=r.closing}return this.finalize(e,new o.JSXElement(t,n,i))},t.prototype.parseJSXRoot=function(){this.config.tokens&&this.tokens.pop(),this.startJSX();var e=this.parseJSXElement();return this.finishJSX(),e},t.prototype.isStartOfExpression=function(){return e.prototype.isStartOfExpression.call(this)||this.match("<")},t}(l.Parser);t.JSXParser=p},function(e,t){Object.defineProperty(t,"__esModule",{value:!0});var n={NonAsciiIdentifierStart:/[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0-\u08B4\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309B-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FD5\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AD\uA7B0-\uA7B7\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF30-\uDF4A\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC03-\uDC37\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE2B\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDF00-\uDF19]|\uD806[\uDCA0-\uDCDF\uDCFF\uDEC0-\uDEF8]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50\uDF93-\uDF9F]|\uD82C[\uDC00\uDC01]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD83A[\uDC00-\uDCC4]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1]|\uD87E[\uDC00-\uDE1D]/,NonAsciiIdentifierPart:/[\xAA\xB5\xB7\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05F0-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u0800-\u082D\u0840-\u085B\u08A0-\u08B4\u08E3-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0AF9\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B6F\u0B71\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BEF\u0C00-\u0C03\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58-\u0C5A\u0C60-\u0C63\u0C66-\u0C6F\u0C81-\u0C83\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1\u0CF2\u0D01-\u0D03\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D57\u0D5F-\u0D63\u0D66-\u0D6F\u0D7A-\u0D7F\u0D82\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E4E\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB9\u0EBB-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECD\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u135F\u1369-\u1371\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u1820-\u1877\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19DA\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ABD\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1CD0-\u1CD2\u1CD4-\u1CF6\u1CF8\u1CF9\u1D00-\u1DF5\u1DFC-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u200C\u200D\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FD5\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AD\uA7B0-\uA7B7\uA7F7-\uA827\uA840-\uA873\uA880-\uA8C4\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA8FD\uA900-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uA9E0-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF3F\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDDFD\uDE80-\uDE9C\uDEA0-\uDED0\uDEE0\uDF00-\uDF1F\uDF30-\uDF4A\uDF50-\uDF7A\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCA0-\uDCA9\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00-\uDE03\uDE05\uDE06\uDE0C-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE38-\uDE3A\uDE3F\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE6\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC00-\uDC46\uDC66-\uDC6F\uDC7F-\uDCBA\uDCD0-\uDCE8\uDCF0-\uDCF9\uDD00-\uDD34\uDD36-\uDD3F\uDD50-\uDD73\uDD76\uDD80-\uDDC4\uDDCA-\uDDCC\uDDD0-\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE37\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEEA\uDEF0-\uDEF9\uDF00-\uDF03\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3C-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF50\uDF57\uDF5D-\uDF63\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC80-\uDCC5\uDCC7\uDCD0-\uDCD9\uDD80-\uDDB5\uDDB8-\uDDC0\uDDD8-\uDDDD\uDE00-\uDE40\uDE44\uDE50-\uDE59\uDE80-\uDEB7\uDEC0-\uDEC9\uDF00-\uDF19\uDF1D-\uDF2B\uDF30-\uDF39]|\uD806[\uDCA0-\uDCE9\uDCFF\uDEC0-\uDEF8]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE60-\uDE69\uDED0-\uDEED\uDEF0-\uDEF4\uDF00-\uDF36\uDF40-\uDF43\uDF50-\uDF59\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50-\uDF7E\uDF8F-\uDF9F]|\uD82C[\uDC00\uDC01]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99\uDC9D\uDC9E]|\uD834[\uDD65-\uDD69\uDD6D-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB\uDFCE-\uDFFF]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE9B-\uDE9F\uDEA1-\uDEAF]|\uD83A[\uDC00-\uDCC4\uDCD0-\uDCD6]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1]|\uD87E[\uDC00-\uDE1D]|\uDB40[\uDD00-\uDDEF]/};t.Character={fromCodePoint:function(e){return e<65536?String.fromCharCode(e):String.fromCharCode(55296+(e-65536>>10))+String.fromCharCode(56320+(e-65536&1023))},isWhiteSpace:function(e){return 32===e||9===e||11===e||12===e||160===e||e>=5760&&[5760,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8239,8287,12288,65279].indexOf(e)>=0},isLineTerminator:function(e){return 10===e||13===e||8232===e||8233===e},isIdentifierStart:function(e){return 36===e||95===e||e>=65&&e<=90||e>=97&&e<=122||92===e||e>=128&&n.NonAsciiIdentifierStart.test(t.Character.fromCodePoint(e))},isIdentifierPart:function(e){return 36===e||95===e||e>=65&&e<=90||e>=97&&e<=122||e>=48&&e<=57||92===e||e>=128&&n.NonAsciiIdentifierPart.test(t.Character.fromCodePoint(e))},isDecimalDigit:function(e){return e>=48&&e<=57},isHexDigit:function(e){return e>=48&&e<=57||e>=65&&e<=70||e>=97&&e<=102},isOctalDigit:function(e){return e>=48&&e<=55}}},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var i=n(6),r=function(e){this.type=i.JSXSyntax.JSXClosingElement,this.name=e};t.JSXClosingElement=r;var a=function(e,t,n){this.type=i.JSXSyntax.JSXElement,this.openingElement=e,this.children=t,this.closingElement=n};t.JSXElement=a;var o=function(){this.type=i.JSXSyntax.JSXEmptyExpression};t.JSXEmptyExpression=o;var s=function(e){this.type=i.JSXSyntax.JSXExpressionContainer,this.expression=e};t.JSXExpressionContainer=s;var u=function(e){this.type=i.JSXSyntax.JSXIdentifier,this.name=e};t.JSXIdentifier=u;var l=function(e,t){this.type=i.JSXSyntax.JSXMemberExpression,this.object=e,this.property=t};t.JSXMemberExpression=l;var c=function(e,t){this.type=i.JSXSyntax.JSXAttribute,this.name=e,this.value=t};t.JSXAttribute=c;var h=function(e,t){this.type=i.JSXSyntax.JSXNamespacedName,this.namespace=e,this.name=t};t.JSXNamespacedName=h;var d=function(e,t,n){this.type=i.JSXSyntax.JSXOpeningElement,this.name=e,this.selfClosing=t,this.attributes=n};t.JSXOpeningElement=d;var p=function(e){this.type=i.JSXSyntax.JSXSpreadAttribute,this.argument=e};t.JSXSpreadAttribute=p;var f=function(e,t){this.type=i.JSXSyntax.JSXText,this.value=e,this.raw=t};t.JSXText=f},function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.JSXSyntax={JSXAttribute:"JSXAttribute",JSXClosingElement:"JSXClosingElement",JSXElement:"JSXElement",JSXEmptyExpression:"JSXEmptyExpression",JSXExpressionContainer:"JSXExpressionContainer",JSXIdentifier:"JSXIdentifier",JSXMemberExpression:"JSXMemberExpression",JSXNamespacedName:"JSXNamespacedName",JSXOpeningElement:"JSXOpeningElement",JSXSpreadAttribute:"JSXSpreadAttribute",JSXText:"JSXText"}},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var i=n(2),r=function(e){this.type=i.Syntax.ArrayExpression,this.elements=e};t.ArrayExpression=r;var a=function(e){this.type=i.Syntax.ArrayPattern,this.elements=e};t.ArrayPattern=a;var o=function(e,t,n){this.type=i.Syntax.ArrowFunctionExpression,this.id=null,this.params=e,this.body=t,this.generator=!1,this.expression=n,this.async=!1};t.ArrowFunctionExpression=o;var s=function(e,t,n){this.type=i.Syntax.AssignmentExpression,this.operator=e,this.left=t,this.right=n};t.AssignmentExpression=s;var u=function(e,t){this.type=i.Syntax.AssignmentPattern,this.left=e,this.right=t};t.AssignmentPattern=u;var l=function(e,t,n){this.type=i.Syntax.ArrowFunctionExpression,this.id=null,this.params=e,this.body=t,this.generator=!1,this.expression=n,this.async=!0};t.AsyncArrowFunctionExpression=l;var c=function(e,t,n){this.type=i.Syntax.FunctionDeclaration,this.id=e,this.params=t,this.body=n,this.generator=!1,this.expression=!1,this.async=!0};t.AsyncFunctionDeclaration=c;var h=function(e,t,n){this.type=i.Syntax.FunctionExpression,this.id=e,this.params=t,this.body=n,this.generator=!1,this.expression=!1,this.async=!0};t.AsyncFunctionExpression=h;var d=function(e){this.type=i.Syntax.AwaitExpression,this.argument=e};t.AwaitExpression=d;var p=function(e,t,n){var r="||"===e||"&&"===e;this.type=r?i.Syntax.LogicalExpression:i.Syntax.BinaryExpression,this.operator=e,this.left=t,this.right=n};t.BinaryExpression=p;var f=function(e){this.type=i.Syntax.BlockStatement,this.body=e};t.BlockStatement=f;var m=function(e){this.type=i.Syntax.BreakStatement,this.label=e};t.BreakStatement=m;var g=function(e,t){this.type=i.Syntax.CallExpression,this.callee=e,this.arguments=t};t.CallExpression=g;var v=function(e,t){this.type=i.Syntax.CatchClause,this.param=e,this.body=t};t.CatchClause=v;var y=function(e){this.type=i.Syntax.ClassBody,this.body=e};t.ClassBody=y;var b=function(e,t,n){this.type=i.Syntax.ClassDeclaration,this.id=e,this.superClass=t,this.body=n};t.ClassDeclaration=b;var x=function(e,t,n){this.type=i.Syntax.ClassExpression,this.id=e,this.superClass=t,this.body=n};t.ClassExpression=x;var S=function(e,t){this.type=i.Syntax.MemberExpression,this.computed=!0,this.object=e,this.property=t};t.ComputedMemberExpression=S;var E=function(e,t,n){this.type=i.Syntax.ConditionalExpression,this.test=e,this.consequent=t,this.alternate=n};t.ConditionalExpression=E;var k=function(e){this.type=i.Syntax.ContinueStatement,this.label=e};t.ContinueStatement=k;var w=function(){this.type=i.Syntax.DebuggerStatement};t.DebuggerStatement=w;var D=function(e,t){this.type=i.Syntax.ExpressionStatement,this.expression=e,this.directive=t};t.Directive=D;var A=function(e,t){this.type=i.Syntax.DoWhileStatement,this.body=e,this.test=t};t.DoWhileStatement=A;var C=function(){this.type=i.Syntax.EmptyStatement};t.EmptyStatement=C;var T=function(e){this.type=i.Syntax.ExportAllDeclaration,this.source=e};t.ExportAllDeclaration=T;var P=function(e){this.type=i.Syntax.ExportDefaultDeclaration,this.declaration=e};t.ExportDefaultDeclaration=P;var F=function(e,t,n){this.type=i.Syntax.ExportNamedDeclaration,this.declaration=e,this.specifiers=t,this.source=n};t.ExportNamedDeclaration=F;var B=function(e,t){this.type=i.Syntax.ExportSpecifier,this.exported=t,this.local=e};t.ExportSpecifier=B;var I=function(e){this.type=i.Syntax.ExpressionStatement,this.expression=e};t.ExpressionStatement=I;var L=function(e,t,n){this.type=i.Syntax.ForInStatement,this.left=e,this.right=t,this.body=n,this.each=!1};t.ForInStatement=L;var O=function(e,t,n){this.type=i.Syntax.ForOfStatement,this.left=e,this.right=t,this.body=n};t.ForOfStatement=O;var R=function(e,t,n,r){this.type=i.Syntax.ForStatement,this.init=e,this.test=t,this.update=n,this.body=r};t.ForStatement=R;var N=function(e,t,n,r){this.type=i.Syntax.FunctionDeclaration,this.id=e,this.params=t,this.body=n,this.generator=r,this.expression=!1,this.async=!1};t.FunctionDeclaration=N;var M=function(e,t,n,r){this.type=i.Syntax.FunctionExpression,this.id=e,this.params=t,this.body=n,this.generator=r,this.expression=!1,this.async=!1};t.FunctionExpression=M;var _=function(e){this.type=i.Syntax.Identifier,this.name=e};t.Identifier=_;var U=function(e,t,n){this.type=i.Syntax.IfStatement,this.test=e,this.consequent=t,this.alternate=n};t.IfStatement=U;var j=function(e,t){this.type=i.Syntax.ImportDeclaration,this.specifiers=e,this.source=t};t.ImportDeclaration=j;var H=function(e){this.type=i.Syntax.ImportDefaultSpecifier,this.local=e};t.ImportDefaultSpecifier=H;var z=function(e){this.type=i.Syntax.ImportNamespaceSpecifier,this.local=e};t.ImportNamespaceSpecifier=z;var V=function(e,t){this.type=i.Syntax.ImportSpecifier,this.local=e,this.imported=t};t.ImportSpecifier=V;var K=function(e,t){this.type=i.Syntax.LabeledStatement,this.label=e,this.body=t};t.LabeledStatement=K;var G=function(e,t){this.type=i.Syntax.Literal,this.value=e,this.raw=t};t.Literal=G;var W=function(e,t){this.type=i.Syntax.MetaProperty,this.meta=e,this.property=t};t.MetaProperty=W;var J=function(e,t,n,r,a){this.type=i.Syntax.MethodDefinition,this.key=e,this.computed=t,this.value=n,this.kind=r,this.static=a};t.MethodDefinition=J;var X=function(e){this.type=i.Syntax.Program,this.body=e,this.sourceType="module"};t.Module=X;var q=function(e,t){this.type=i.Syntax.NewExpression,this.callee=e,this.arguments=t};t.NewExpression=q;var Y=function(e){this.type=i.Syntax.ObjectExpression,this.properties=e};t.ObjectExpression=Y;var Q=function(e){this.type=i.Syntax.ObjectPattern,this.properties=e};t.ObjectPattern=Q;var Z=function(e,t,n,r,a,o){this.type=i.Syntax.Property,this.key=t,this.computed=n,this.value=r,this.kind=e,this.method=a,this.shorthand=o};t.Property=Z;var $=function(e,t,n,r){this.type=i.Syntax.Literal,this.value=e,this.raw=t,this.regex={pattern:n,flags:r}};t.RegexLiteral=$;var ee=function(e){this.type=i.Syntax.RestElement,this.argument=e};t.RestElement=ee;var te=function(e){this.type=i.Syntax.ReturnStatement,this.argument=e};t.ReturnStatement=te;var ne=function(e){this.type=i.Syntax.Program,this.body=e,this.sourceType="script"};t.Script=ne;var ie=function(e){this.type=i.Syntax.SequenceExpression,this.expressions=e};t.SequenceExpression=ie;var re=function(e){this.type=i.Syntax.SpreadElement,this.argument=e};t.SpreadElement=re;var ae=function(e,t){this.type=i.Syntax.MemberExpression,this.computed=!1,this.object=e,this.property=t};t.StaticMemberExpression=ae;var oe=function(){this.type=i.Syntax.Super};t.Super=oe;var se=function(e,t){this.type=i.Syntax.SwitchCase,this.test=e,this.consequent=t};t.SwitchCase=se;var ue=function(e,t){this.type=i.Syntax.SwitchStatement,this.discriminant=e,this.cases=t};t.SwitchStatement=ue;var le=function(e,t){this.type=i.Syntax.TaggedTemplateExpression,this.tag=e,this.quasi=t};t.TaggedTemplateExpression=le;var ce=function(e,t){this.type=i.Syntax.TemplateElement,this.value=e,this.tail=t};t.TemplateElement=ce;var he=function(e,t){this.type=i.Syntax.TemplateLiteral,this.quasis=e,this.expressions=t};t.TemplateLiteral=he;var de=function(){this.type=i.Syntax.ThisExpression};t.ThisExpression=de;var pe=function(e){this.type=i.Syntax.ThrowStatement,this.argument=e};t.ThrowStatement=pe;var fe=function(e,t,n){this.type=i.Syntax.TryStatement,this.block=e,this.handler=t,this.finalizer=n};t.TryStatement=fe;var me=function(e,t){this.type=i.Syntax.UnaryExpression,this.operator=e,this.argument=t,this.prefix=!0};t.UnaryExpression=me;var ge=function(e,t,n){this.type=i.Syntax.UpdateExpression,this.operator=e,this.argument=t,this.prefix=n};t.UpdateExpression=ge;var ve=function(e,t){this.type=i.Syntax.VariableDeclaration,this.declarations=e,this.kind=t};t.VariableDeclaration=ve;var ye=function(e,t){this.type=i.Syntax.VariableDeclarator,this.id=e,this.init=t};t.VariableDeclarator=ye;var be=function(e,t){this.type=i.Syntax.WhileStatement,this.test=e,this.body=t};t.WhileStatement=be;var xe=function(e,t){this.type=i.Syntax.WithStatement,this.object=e,this.body=t};t.WithStatement=xe;var Se=function(e,t){this.type=i.Syntax.YieldExpression,this.argument=e,this.delegate=t};t.YieldExpression=Se},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var i=n(9),r=n(10),a=n(11),o=n(7),s=n(12),u=n(2),l=n(13),c="ArrowParameterPlaceHolder",h=function(){function e(e,t,n){void 0===t&&(t={}),this.config={range:"boolean"==typeof t.range&&t.range,loc:"boolean"==typeof t.loc&&t.loc,source:null,tokens:"boolean"==typeof t.tokens&&t.tokens,comment:"boolean"==typeof t.comment&&t.comment,tolerant:"boolean"==typeof t.tolerant&&t.tolerant},this.config.loc&&t.source&&null!==t.source&&(this.config.source=String(t.source)),this.delegate=n,this.errorHandler=new r.ErrorHandler,this.errorHandler.tolerant=this.config.tolerant,this.scanner=new s.Scanner(e,this.errorHandler),this.scanner.trackComment=this.config.comment,this.operatorPrecedence={")":0,";":0,",":0,"=":0,"]":0,"||":1,"&&":2,"|":3,"^":4,"&":5,"==":6,"!=":6,"===":6,"!==":6,"<":7,">":7,"<=":7,">=":7,"<<":8,">>":8,">>>":8,"+":9,"-":9,"*":11,"/":11,"%":11},this.lookahead={type:2,value:"",lineNumber:this.scanner.lineNumber,lineStart:0,start:0,end:0},this.hasLineTerminator=!1,this.context={isModule:!1,await:!1,allowIn:!0,allowStrictDirective:!0,allowYield:!0,firstCoverInitializedNameError:null,isAssignmentTarget:!1,isBindingElement:!1,inFunctionBody:!1,inIteration:!1,inSwitch:!1,labelSet:{},strict:!1},this.tokens=[],this.startMarker={index:0,line:this.scanner.lineNumber,column:0},this.lastMarker={index:0,line:this.scanner.lineNumber,column:0},this.nextToken(),this.lastMarker={index:this.scanner.index,line:this.scanner.lineNumber,column:this.scanner.index-this.scanner.lineStart}}return e.prototype.throwError=function(e){var t=Array.prototype.slice.call(arguments,1),n=e.replace(/%(\d)/g,function(e,n){return i.assert(n<t.length,"Message reference must be in range"),t[n]}),r=this.lastMarker.index,a=this.lastMarker.line,o=this.lastMarker.column+1;throw this.errorHandler.createError(r,a,o,n)},e.prototype.tolerateError=function(e){var t=Array.prototype.slice.call(arguments,1),n=e.replace(/%(\d)/g,function(e,n){return i.assert(n<t.length,"Message reference must be in range"),t[n]}),r=this.lastMarker.index,a=this.scanner.lineNumber,o=this.lastMarker.column+1;this.errorHandler.tolerateError(r,a,o,n)},e.prototype.unexpectedTokenError=function(e,t){var n,i=t||a.Messages.UnexpectedToken;if(e?(t||(i=2===e.type?a.Messages.UnexpectedEOS:3===e.type?a.Messages.UnexpectedIdentifier:6===e.type?a.Messages.UnexpectedNumber:8===e.type?a.Messages.UnexpectedString:10===e.type?a.Messages.UnexpectedTemplate:a.Messages.UnexpectedToken,4===e.type&&(this.scanner.isFutureReservedWord(e.value)?i=a.Messages.UnexpectedReserved:this.context.strict&&this.scanner.isStrictModeReservedWord(e.value)&&(i=a.Messages.StrictReservedWord))),n=e.value):n="ILLEGAL",i=i.replace("%0",n),e&&"number"==typeof e.lineNumber){var r=e.start,o=e.lineNumber,s=this.lastMarker.index-this.lastMarker.column,u=e.start-s+1;return this.errorHandler.createError(r,o,u,i)}return r=this.lastMarker.index,o=this.lastMarker.line,u=this.lastMarker.column+1,this.errorHandler.createError(r,o,u,i)},e.prototype.throwUnexpectedToken=function(e,t){throw this.unexpectedTokenError(e,t)},e.prototype.tolerateUnexpectedToken=function(e,t){this.errorHandler.tolerate(this.unexpectedTokenError(e,t))},e.prototype.collectComments=function(){if(this.config.comment){var e=this.scanner.scanComments();if(e.length>0&&this.delegate)for(var t=0;t<e.length;++t){var n=e[t],i=void 0;i={type:n.multiLine?"BlockComment":"LineComment",value:this.scanner.source.slice(n.slice[0],n.slice[1])},this.config.range&&(i.range=n.range),this.config.loc&&(i.loc=n.loc);var r={start:{line:n.loc.start.line,column:n.loc.start.column,offset:n.range[0]},end:{line:n.loc.end.line,column:n.loc.end.column,offset:n.range[1]}};this.delegate(i,r)}}else this.scanner.scanComments()},e.prototype.getTokenRaw=function(e){return this.scanner.source.slice(e.start,e.end)},e.prototype.convertToken=function(e){var t={type:l.TokenName[e.type],value:this.getTokenRaw(e)};if(this.config.range&&(t.range=[e.start,e.end]),this.config.loc&&(t.loc={start:{line:this.startMarker.line,column:this.startMarker.column},end:{line:this.scanner.lineNumber,column:this.scanner.index-this.scanner.lineStart}}),9===e.type){var n=e.pattern,i=e.flags;t.regex={pattern:n,flags:i}}return t},e.prototype.nextToken=function(){var e=this.lookahead;this.lastMarker.index=this.scanner.index,this.lastMarker.line=this.scanner.lineNumber,this.lastMarker.column=this.scanner.index-this.scanner.lineStart,this.collectComments(),this.scanner.index!==this.startMarker.index&&(this.startMarker.index=this.scanner.index,this.startMarker.line=this.scanner.lineNumber,this.startMarker.column=this.scanner.index-this.scanner.lineStart);var t=this.scanner.lex();return this.hasLineTerminator=e.lineNumber!==t.lineNumber,t&&this.context.strict&&3===t.type&&this.scanner.isStrictModeReservedWord(t.value)&&(t.type=4),this.lookahead=t,this.config.tokens&&2!==t.type&&this.tokens.push(this.convertToken(t)),e},e.prototype.nextRegexToken=function(){this.collectComments();var e=this.scanner.scanRegExp();return this.config.tokens&&(this.tokens.pop(),this.tokens.push(this.convertToken(e))),this.lookahead=e,this.nextToken(),e},e.prototype.createNode=function(){return{index:this.startMarker.index,line:this.startMarker.line,column:this.startMarker.column}},e.prototype.startNode=function(e,t){void 0===t&&(t=0);var n=e.start-e.lineStart,i=e.lineNumber;return n<0&&(n+=t,i--),{index:e.start,line:i,column:n}},e.prototype.finalize=function(e,t){if(this.config.range&&(t.range=[e.index,this.lastMarker.index]),this.config.loc&&(t.loc={start:{line:e.line,column:e.column},end:{line:this.lastMarker.line,column:this.lastMarker.column}},this.config.source&&(t.loc.source=this.config.source)),this.delegate){var n={start:{line:e.line,column:e.column,offset:e.index},end:{line:this.lastMarker.line,column:this.lastMarker.column,offset:this.lastMarker.index}};this.delegate(t,n)}return t},e.prototype.expect=function(e){var t=this.nextToken();7===t.type&&t.value===e||this.throwUnexpectedToken(t)},e.prototype.expectCommaSeparator=function(){if(this.config.tolerant){var e=this.lookahead;7===e.type&&","===e.value?this.nextToken():7===e.type&&";"===e.value?(this.nextToken(),this.tolerateUnexpectedToken(e)):this.tolerateUnexpectedToken(e,a.Messages.UnexpectedToken)}else this.expect(",")},e.prototype.expectKeyword=function(e){var t=this.nextToken();4===t.type&&t.value===e||this.throwUnexpectedToken(t)},e.prototype.match=function(e){return 7===this.lookahead.type&&this.lookahead.value===e},e.prototype.matchKeyword=function(e){return 4===this.lookahead.type&&this.lookahead.value===e},e.prototype.matchContextualKeyword=function(e){return 3===this.lookahead.type&&this.lookahead.value===e},e.prototype.matchAssign=function(){if(7!==this.lookahead.type)return!1;var e=this.lookahead.value;return"="===e||"*="===e||"**="===e||"/="===e||"%="===e||"+="===e||"-="===e||"<<="===e||">>="===e||">>>="===e||"&="===e||"^="===e||"|="===e},e.prototype.isolateCoverGrammar=function(e){var t=this.context.isBindingElement,n=this.context.isAssignmentTarget,i=this.context.firstCoverInitializedNameError;this.context.isBindingElement=!0,this.context.isAssignmentTarget=!0,this.context.firstCoverInitializedNameError=null;var r=e.call(this);return null!==this.context.firstCoverInitializedNameError&&this.throwUnexpectedToken(this.context.firstCoverInitializedNameError),this.context.isBindingElement=t,this.context.isAssignmentTarget=n,this.context.firstCoverInitializedNameError=i,r},e.prototype.inheritCoverGrammar=function(e){var t=this.context.isBindingElement,n=this.context.isAssignmentTarget,i=this.context.firstCoverInitializedNameError;this.context.isBindingElement=!0,this.context.isAssignmentTarget=!0,this.context.firstCoverInitializedNameError=null;var r=e.call(this);return this.context.isBindingElement=this.context.isBindingElement&&t,this.context.isAssignmentTarget=this.context.isAssignmentTarget&&n,this.context.firstCoverInitializedNameError=i||this.context.firstCoverInitializedNameError,r},e.prototype.consumeSemicolon=function(){this.match(";")?this.nextToken():this.hasLineTerminator||(2===this.lookahead.type||this.match("}")||this.throwUnexpectedToken(this.lookahead),this.lastMarker.index=this.startMarker.index,this.lastMarker.line=this.startMarker.line,this.lastMarker.column=this.startMarker.column)},e.prototype.parsePrimaryExpression=function(){var e,t,n,i=this.createNode();switch(this.lookahead.type){case 3:(this.context.isModule||this.context.await)&&"await"===this.lookahead.value&&this.tolerateUnexpectedToken(this.lookahead),e=this.matchAsyncFunction()?this.parseFunctionExpression():this.finalize(i,new o.Identifier(this.nextToken().value));break;case 6:case 8:this.context.strict&&this.lookahead.octal&&this.tolerateUnexpectedToken(this.lookahead,a.Messages.StrictOctalLiteral),this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1,t=this.nextToken(),n=this.getTokenRaw(t),e=this.finalize(i,new o.Literal(t.value,n));break;case 1:this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1,t=this.nextToken(),n=this.getTokenRaw(t),e=this.finalize(i,new o.Literal("true"===t.value,n));break;case 5:this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1,t=this.nextToken(),n=this.getTokenRaw(t),e=this.finalize(i,new o.Literal(null,n));break;case 10:e=this.parseTemplateLiteral();break;case 7:switch(this.lookahead.value){case"(":this.context.isBindingElement=!1,e=this.inheritCoverGrammar(this.parseGroupExpression);break;case"[":e=this.inheritCoverGrammar(this.parseArrayInitializer);break;case"{":e=this.inheritCoverGrammar(this.parseObjectInitializer);break;case"/":case"/=":this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1,this.scanner.index=this.startMarker.index,t=this.nextRegexToken(),n=this.getTokenRaw(t),e=this.finalize(i,new o.RegexLiteral(t.regex,n,t.pattern,t.flags));break;default:e=this.throwUnexpectedToken(this.nextToken())}break;case 4:!this.context.strict&&this.context.allowYield&&this.matchKeyword("yield")?e=this.parseIdentifierName():!this.context.strict&&this.matchKeyword("let")?e=this.finalize(i,new o.Identifier(this.nextToken().value)):(this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1,this.matchKeyword("function")?e=this.parseFunctionExpression():this.matchKeyword("this")?(this.nextToken(),e=this.finalize(i,new o.ThisExpression)):e=this.matchKeyword("class")?this.parseClassExpression():this.throwUnexpectedToken(this.nextToken()));break;default:e=this.throwUnexpectedToken(this.nextToken())}return e},e.prototype.parseSpreadElement=function(){var e=this.createNode();this.expect("...");var t=this.inheritCoverGrammar(this.parseAssignmentExpression);return this.finalize(e,new o.SpreadElement(t))},e.prototype.parseArrayInitializer=function(){var e=this.createNode(),t=[];for(this.expect("[");!this.match("]");)if(this.match(","))this.nextToken(),t.push(null);else if(this.match("...")){var n=this.parseSpreadElement();this.match("]")||(this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1,this.expect(",")),t.push(n)}else t.push(this.inheritCoverGrammar(this.parseAssignmentExpression)),this.match("]")||this.expect(",");return this.expect("]"),this.finalize(e,new o.ArrayExpression(t))},e.prototype.parsePropertyMethod=function(e){this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1;var t=this.context.strict,n=this.context.allowStrictDirective;this.context.allowStrictDirective=e.simple;var i=this.isolateCoverGrammar(this.parseFunctionSourceElements);return this.context.strict&&e.firstRestricted&&this.tolerateUnexpectedToken(e.firstRestricted,e.message),this.context.strict&&e.stricted&&this.tolerateUnexpectedToken(e.stricted,e.message),this.context.strict=t,this.context.allowStrictDirective=n,i},e.prototype.parsePropertyMethodFunction=function(){var e=this.createNode(),t=this.context.allowYield;this.context.allowYield=!0;var n=this.parseFormalParameters(),i=this.parsePropertyMethod(n);return this.context.allowYield=t,this.finalize(e,new o.FunctionExpression(null,n.params,i,!1))},e.prototype.parsePropertyMethodAsyncFunction=function(){var e=this.createNode(),t=this.context.allowYield,n=this.context.await;this.context.allowYield=!1,this.context.await=!0;var i=this.parseFormalParameters(),r=this.parsePropertyMethod(i);return this.context.allowYield=t,this.context.await=n,this.finalize(e,new o.AsyncFunctionExpression(null,i.params,r))},e.prototype.parseObjectPropertyKey=function(){var e,t=this.createNode(),n=this.nextToken();switch(n.type){case 8:case 6:this.context.strict&&n.octal&&this.tolerateUnexpectedToken(n,a.Messages.StrictOctalLiteral);var i=this.getTokenRaw(n);e=this.finalize(t,new o.Literal(n.value,i));break;case 3:case 1:case 5:case 4:e=this.finalize(t,new o.Identifier(n.value));break;case 7:"["===n.value?(e=this.isolateCoverGrammar(this.parseAssignmentExpression),this.expect("]")):e=this.throwUnexpectedToken(n);break;default:e=this.throwUnexpectedToken(n)}return e},e.prototype.isPropertyKey=function(e,t){return e.type===u.Syntax.Identifier&&e.name===t||e.type===u.Syntax.Literal&&e.value===t},e.prototype.parseObjectProperty=function(e){var t,n=this.createNode(),i=this.lookahead,r=null,s=null,u=!1,l=!1,c=!1,h=!1;if(3===i.type){var d=i.value;this.nextToken(),u=this.match("["),r=(h=!(this.hasLineTerminator||"async"!==d||this.match(":")||this.match("(")||this.match("*")||this.match(",")))?this.parseObjectPropertyKey():this.finalize(n,new o.Identifier(d))}else this.match("*")?this.nextToken():(u=this.match("["),r=this.parseObjectPropertyKey());var p=this.qualifiedPropertyName(this.lookahead);if(3===i.type&&!h&&"get"===i.value&&p)t="get",u=this.match("["),r=this.parseObjectPropertyKey(),this.context.allowYield=!1,s=this.parseGetterMethod();else if(3===i.type&&!h&&"set"===i.value&&p)t="set",u=this.match("["),r=this.parseObjectPropertyKey(),s=this.parseSetterMethod();else if(7===i.type&&"*"===i.value&&p)t="init",u=this.match("["),r=this.parseObjectPropertyKey(),s=this.parseGeneratorMethod(),l=!0;else if(r||this.throwUnexpectedToken(this.lookahead),t="init",this.match(":")&&!h)!u&&this.isPropertyKey(r,"__proto__")&&(e.value&&this.tolerateError(a.Messages.DuplicateProtoProperty),e.value=!0),this.nextToken(),s=this.inheritCoverGrammar(this.parseAssignmentExpression);else if(this.match("("))s=h?this.parsePropertyMethodAsyncFunction():this.parsePropertyMethodFunction(),l=!0;else if(3===i.type)if(d=this.finalize(n,new o.Identifier(i.value)),this.match("=")){this.context.firstCoverInitializedNameError=this.lookahead,this.nextToken(),c=!0;var f=this.isolateCoverGrammar(this.parseAssignmentExpression);s=this.finalize(n,new o.AssignmentPattern(d,f))}else c=!0,s=d;else this.throwUnexpectedToken(this.nextToken());return this.finalize(n,new o.Property(t,r,u,s,l,c))},e.prototype.parseObjectInitializer=function(){var e=this.createNode();this.expect("{");for(var t=[],n={value:!1};!this.match("}");)t.push(this.parseObjectProperty(n)),this.match("}")||this.expectCommaSeparator();return this.expect("}"),this.finalize(e,new o.ObjectExpression(t))},e.prototype.parseTemplateHead=function(){i.assert(this.lookahead.head,"Template literal must start with a template head");var e=this.createNode(),t=this.nextToken(),n=t.value,r=t.cooked;return this.finalize(e,new o.TemplateElement({raw:n,cooked:r},t.tail))},e.prototype.parseTemplateElement=function(){10!==this.lookahead.type&&this.throwUnexpectedToken();var e=this.createNode(),t=this.nextToken(),n=t.value,i=t.cooked;return this.finalize(e,new o.TemplateElement({raw:n,cooked:i},t.tail))},e.prototype.parseTemplateLiteral=function(){var e=this.createNode(),t=[],n=[],i=this.parseTemplateHead();for(n.push(i);!i.tail;)t.push(this.parseExpression()),i=this.parseTemplateElement(),n.push(i);return this.finalize(e,new o.TemplateLiteral(n,t))},e.prototype.reinterpretExpressionAsPattern=function(e){switch(e.type){case u.Syntax.Identifier:case u.Syntax.MemberExpression:case u.Syntax.RestElement:case u.Syntax.AssignmentPattern:break;case u.Syntax.SpreadElement:e.type=u.Syntax.RestElement,this.reinterpretExpressionAsPattern(e.argument);break;case u.Syntax.ArrayExpression:e.type=u.Syntax.ArrayPattern;for(var t=0;t<e.elements.length;t++)null!==e.elements[t]&&this.reinterpretExpressionAsPattern(e.elements[t]);break;case u.Syntax.ObjectExpression:for(e.type=u.Syntax.ObjectPattern,t=0;t<e.properties.length;t++)this.reinterpretExpressionAsPattern(e.properties[t].value);break;case u.Syntax.AssignmentExpression:e.type=u.Syntax.AssignmentPattern,delete e.operator,this.reinterpretExpressionAsPattern(e.left)}},e.prototype.parseGroupExpression=function(){var e;if(this.expect("("),this.match(")"))this.nextToken(),this.match("=>")||this.expect("=>"),e={type:c,params:[],async:!1};else{var t=this.lookahead,n=[];if(this.match("..."))e=this.parseRestElement(n),this.expect(")"),this.match("=>")||this.expect("=>"),e={type:c,params:[e],async:!1};else{var i=!1;if(this.context.isBindingElement=!0,e=this.inheritCoverGrammar(this.parseAssignmentExpression),this.match(",")){var r=[];for(this.context.isAssignmentTarget=!1,r.push(e);2!==this.lookahead.type&&this.match(",");){if(this.nextToken(),this.match(")")){this.nextToken();for(var a=0;a<r.length;a++)this.reinterpretExpressionAsPattern(r[a]);i=!0,e={type:c,params:r,async:!1}}else if(this.match("...")){for(this.context.isBindingElement||this.throwUnexpectedToken(this.lookahead),r.push(this.parseRestElement(n)),this.expect(")"),this.match("=>")||this.expect("=>"),this.context.isBindingElement=!1,a=0;a<r.length;a++)this.reinterpretExpressionAsPattern(r[a]);i=!0,e={type:c,params:r,async:!1}}else r.push(this.inheritCoverGrammar(this.parseAssignmentExpression));if(i)break}i||(e=this.finalize(this.startNode(t),new o.SequenceExpression(r)))}if(!i){if(this.expect(")"),this.match("=>")&&(e.type===u.Syntax.Identifier&&"yield"===e.name&&(i=!0,e={type:c,params:[e],async:!1}),!i)){if(this.context.isBindingElement||this.throwUnexpectedToken(this.lookahead),e.type===u.Syntax.SequenceExpression)for(a=0;a<e.expressions.length;a++)this.reinterpretExpressionAsPattern(e.expressions[a]);else this.reinterpretExpressionAsPattern(e);var s=e.type===u.Syntax.SequenceExpression?e.expressions:[e];e={type:c,params:s,async:!1}}this.context.isBindingElement=!1}}}return e},e.prototype.parseArguments=function(){this.expect("(");var e=[];if(!this.match(")"))for(;;){var t=this.match("...")?this.parseSpreadElement():this.isolateCoverGrammar(this.parseAssignmentExpression);if(e.push(t),this.match(")"))break;if(this.expectCommaSeparator(),this.match(")"))break}return this.expect(")"),e},e.prototype.isIdentifierName=function(e){return 3===e.type||4===e.type||1===e.type||5===e.type},e.prototype.parseIdentifierName=function(){var e=this.createNode(),t=this.nextToken();return this.isIdentifierName(t)||this.throwUnexpectedToken(t),this.finalize(e,new o.Identifier(t.value))},e.prototype.parseNewExpression=function(){var e,t=this.createNode(),n=this.parseIdentifierName();if(i.assert("new"===n.name,"New expression must start with `new`"),this.match("."))if(this.nextToken(),3===this.lookahead.type&&this.context.inFunctionBody&&"target"===this.lookahead.value){var r=this.parseIdentifierName();e=new o.MetaProperty(n,r)}else this.throwUnexpectedToken(this.lookahead);else{var a=this.isolateCoverGrammar(this.parseLeftHandSideExpression),s=this.match("(")?this.parseArguments():[];e=new o.NewExpression(a,s),this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1}return this.finalize(t,e)},e.prototype.parseAsyncArgument=function(){var e=this.parseAssignmentExpression();return this.context.firstCoverInitializedNameError=null,e},e.prototype.parseAsyncArguments=function(){this.expect("(");var e=[];if(!this.match(")"))for(;;){var t=this.match("...")?this.parseSpreadElement():this.isolateCoverGrammar(this.parseAsyncArgument);if(e.push(t),this.match(")"))break;if(this.expectCommaSeparator(),this.match(")"))break}return this.expect(")"),e},e.prototype.parseLeftHandSideExpressionAllowCall=function(){var e,t=this.lookahead,n=this.matchContextualKeyword("async"),i=this.context.allowIn;for(this.context.allowIn=!0,this.matchKeyword("super")&&this.context.inFunctionBody?(e=this.createNode(),this.nextToken(),e=this.finalize(e,new o.Super),this.match("(")||this.match(".")||this.match("[")||this.throwUnexpectedToken(this.lookahead)):e=this.inheritCoverGrammar(this.matchKeyword("new")?this.parseNewExpression:this.parsePrimaryExpression);;)if(this.match(".")){this.context.isBindingElement=!1,this.context.isAssignmentTarget=!0,this.expect(".");var r=this.parseIdentifierName();e=this.finalize(this.startNode(t),new o.StaticMemberExpression(e,r))}else if(this.match("(")){var a=n&&t.lineNumber===this.lookahead.lineNumber;this.context.isBindingElement=!1,this.context.isAssignmentTarget=!1;var s=a?this.parseAsyncArguments():this.parseArguments();if(e=this.finalize(this.startNode(t),new o.CallExpression(e,s)),a&&this.match("=>")){for(var u=0;u<s.length;++u)this.reinterpretExpressionAsPattern(s[u]);e={type:c,params:s,async:!0}}}else if(this.match("["))this.context.isBindingElement=!1,this.context.isAssignmentTarget=!0,this.expect("["),r=this.isolateCoverGrammar(this.parseExpression),this.expect("]"),e=this.finalize(this.startNode(t),new o.ComputedMemberExpression(e,r));else{if(10!==this.lookahead.type||!this.lookahead.head)break;var l=this.parseTemplateLiteral();e=this.finalize(this.startNode(t),new o.TaggedTemplateExpression(e,l))}return this.context.allowIn=i,e},e.prototype.parseSuper=function(){var e=this.createNode();return this.expectKeyword("super"),this.match("[")||this.match(".")||this.throwUnexpectedToken(this.lookahead),this.finalize(e,new o.Super)},e.prototype.parseLeftHandSideExpression=function(){i.assert(this.context.allowIn,"callee of new expression always allow in keyword.");for(var e=this.startNode(this.lookahead),t=this.matchKeyword("super")&&this.context.inFunctionBody?this.parseSuper():this.inheritCoverGrammar(this.matchKeyword("new")?this.parseNewExpression:this.parsePrimaryExpression);;)if(this.match("[")){this.context.isBindingElement=!1,this.context.isAssignmentTarget=!0,this.expect("[");var n=this.isolateCoverGrammar(this.parseExpression);this.expect("]"),t=this.finalize(e,new o.ComputedMemberExpression(t,n))}else if(this.match("."))this.context.isBindingElement=!1,this.context.isAssignmentTarget=!0,this.expect("."),n=this.parseIdentifierName(),t=this.finalize(e,new o.StaticMemberExpression(t,n));else{if(10!==this.lookahead.type||!this.lookahead.head)break;var r=this.parseTemplateLiteral();t=this.finalize(e,new o.TaggedTemplateExpression(t,r))}return t},e.prototype.parseUpdateExpression=function(){var e,t=this.lookahead;if(this.match("++")||this.match("--")){var n=this.startNode(t),i=this.nextToken();e=this.inheritCoverGrammar(this.parseUnaryExpression),this.context.strict&&e.type===u.Syntax.Identifier&&this.scanner.isRestrictedWord(e.name)&&this.tolerateError(a.Messages.StrictLHSPrefix),this.context.isAssignmentTarget||this.tolerateError(a.Messages.InvalidLHSInAssignment);var r=!0;e=this.finalize(n,new o.UpdateExpression(i.value,e,r)),this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1}else if(e=this.inheritCoverGrammar(this.parseLeftHandSideExpressionAllowCall),!this.hasLineTerminator&&7===this.lookahead.type&&(this.match("++")||this.match("--"))){this.context.strict&&e.type===u.Syntax.Identifier&&this.scanner.isRestrictedWord(e.name)&&this.tolerateError(a.Messages.StrictLHSPostfix),this.context.isAssignmentTarget||this.tolerateError(a.Messages.InvalidLHSInAssignment),this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1;var s=this.nextToken().value;r=!1,e=this.finalize(this.startNode(t),new o.UpdateExpression(s,e,r))}return e},e.prototype.parseAwaitExpression=function(){var e=this.createNode();this.nextToken();var t=this.parseUnaryExpression();return this.finalize(e,new o.AwaitExpression(t))},e.prototype.parseUnaryExpression=function(){var e;if(this.match("+")||this.match("-")||this.match("~")||this.match("!")||this.matchKeyword("delete")||this.matchKeyword("void")||this.matchKeyword("typeof")){var t=this.startNode(this.lookahead),n=this.nextToken();e=this.inheritCoverGrammar(this.parseUnaryExpression),e=this.finalize(t,new o.UnaryExpression(n.value,e)),this.context.strict&&"delete"===e.operator&&e.argument.type===u.Syntax.Identifier&&this.tolerateError(a.Messages.StrictDelete),this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1}else e=this.context.await&&this.matchContextualKeyword("await")?this.parseAwaitExpression():this.parseUpdateExpression();return e},e.prototype.parseExponentiationExpression=function(){var e=this.lookahead,t=this.inheritCoverGrammar(this.parseUnaryExpression);if(t.type!==u.Syntax.UnaryExpression&&this.match("**")){this.nextToken(),this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1;var n=t,i=this.isolateCoverGrammar(this.parseExponentiationExpression);t=this.finalize(this.startNode(e),new o.BinaryExpression("**",n,i))}return t},e.prototype.binaryPrecedence=function(e){var t=e.value;return 7===e.type?this.operatorPrecedence[t]||0:4===e.type&&("instanceof"===t||this.context.allowIn&&"in"===t)?7:0},e.prototype.parseBinaryExpression=function(){var e=this.lookahead,t=this.inheritCoverGrammar(this.parseExponentiationExpression),n=this.lookahead,i=this.binaryPrecedence(n);if(i>0){this.nextToken(),this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1;for(var r=[e,this.lookahead],a=t,s=this.isolateCoverGrammar(this.parseExponentiationExpression),u=[a,n.value,s],l=[i];!((i=this.binaryPrecedence(this.lookahead))<=0);){for(;u.length>2&&i<=l[l.length-1];){s=u.pop();var c=u.pop();l.pop(),a=u.pop(),r.pop();var h=this.startNode(r[r.length-1]);u.push(this.finalize(h,new o.BinaryExpression(c,a,s)))}u.push(this.nextToken().value),l.push(i),r.push(this.lookahead),u.push(this.isolateCoverGrammar(this.parseExponentiationExpression))}var d=u.length-1;t=u[d];for(var p=r.pop();d>1;){var f=r.pop(),m=p&&p.lineStart;h=this.startNode(f,m),c=u[d-1],t=this.finalize(h,new o.BinaryExpression(c,u[d-2],t)),d-=2,p=f}}return t},e.prototype.parseConditionalExpression=function(){var e=this.lookahead,t=this.inheritCoverGrammar(this.parseBinaryExpression);if(this.match("?")){this.nextToken();var n=this.context.allowIn;this.context.allowIn=!0;var i=this.isolateCoverGrammar(this.parseAssignmentExpression);this.context.allowIn=n,this.expect(":");var r=this.isolateCoverGrammar(this.parseAssignmentExpression);t=this.finalize(this.startNode(e),new o.ConditionalExpression(t,i,r)),this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1}return t},e.prototype.checkPatternParam=function(e,t){switch(t.type){case u.Syntax.Identifier:this.validateParam(e,t,t.name);break;case u.Syntax.RestElement:this.checkPatternParam(e,t.argument);break;case u.Syntax.AssignmentPattern:this.checkPatternParam(e,t.left);break;case u.Syntax.ArrayPattern:for(var n=0;n<t.elements.length;n++)null!==t.elements[n]&&this.checkPatternParam(e,t.elements[n]);break;case u.Syntax.ObjectPattern:for(n=0;n<t.properties.length;n++)this.checkPatternParam(e,t.properties[n].value)}e.simple=e.simple&&t instanceof o.Identifier},e.prototype.reinterpretAsCoverFormalsList=function(e){var t,n=[e],i=!1;switch(e.type){case u.Syntax.Identifier:break;case c:n=e.params,i=e.async;break;default:return null}t={simple:!0,paramSet:{}};for(var r=0;r<n.length;++r)(o=n[r]).type===u.Syntax.AssignmentPattern?o.right.type===u.Syntax.YieldExpression&&(o.right.argument&&this.throwUnexpectedToken(this.lookahead),o.right.type=u.Syntax.Identifier,o.right.name="yield",delete o.right.argument,delete o.right.delegate):i&&o.type===u.Syntax.Identifier&&"await"===o.name&&this.throwUnexpectedToken(this.lookahead),this.checkPatternParam(t,o),n[r]=o;if(this.context.strict||!this.context.allowYield)for(r=0;r<n.length;++r){var o;(o=n[r]).type===u.Syntax.YieldExpression&&this.throwUnexpectedToken(this.lookahead)}if(t.message===a.Messages.StrictParamDupe){var s=this.context.strict?t.stricted:t.firstRestricted;this.throwUnexpectedToken(s,t.message)}return{simple:t.simple,params:n,stricted:t.stricted,firstRestricted:t.firstRestricted,message:t.message}},e.prototype.parseAssignmentExpression=function(){var e;if(!this.context.allowYield&&this.matchKeyword("yield"))e=this.parseYieldExpression();else{var t=this.lookahead,n=t;if(e=this.parseConditionalExpression(),3===n.type&&n.lineNumber===this.lookahead.lineNumber&&"async"===n.value&&(3===this.lookahead.type||this.matchKeyword("yield"))){var i=this.parsePrimaryExpression();this.reinterpretExpressionAsPattern(i),e={type:c,params:[i],async:!0}}if(e.type===c||this.match("=>")){this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1;var r=e.async,s=this.reinterpretAsCoverFormalsList(e);if(s){this.hasLineTerminator&&this.tolerateUnexpectedToken(this.lookahead),this.context.firstCoverInitializedNameError=null;var l=this.context.strict,h=this.context.allowStrictDirective;this.context.allowStrictDirective=s.simple;var d=this.context.allowYield,p=this.context.await;this.context.allowYield=!0,this.context.await=r;var f=this.startNode(t);this.expect("=>");var m=void 0;if(this.match("{")){var g=this.context.allowIn;this.context.allowIn=!0,m=this.parseFunctionSourceElements(),this.context.allowIn=g}else m=this.isolateCoverGrammar(this.parseAssignmentExpression);var v=m.type!==u.Syntax.BlockStatement;this.context.strict&&s.firstRestricted&&this.throwUnexpectedToken(s.firstRestricted,s.message),this.context.strict&&s.stricted&&this.tolerateUnexpectedToken(s.stricted,s.message),e=r?this.finalize(f,new o.AsyncArrowFunctionExpression(s.params,m,v)):this.finalize(f,new o.ArrowFunctionExpression(s.params,m,v)),this.context.strict=l,this.context.allowStrictDirective=h,this.context.allowYield=d,this.context.await=p}}else if(this.matchAssign()){if(this.context.isAssignmentTarget||this.tolerateError(a.Messages.InvalidLHSInAssignment),this.context.strict&&e.type===u.Syntax.Identifier){var y=e;this.scanner.isRestrictedWord(y.name)&&this.tolerateUnexpectedToken(n,a.Messages.StrictLHSAssignment),this.scanner.isStrictModeReservedWord(y.name)&&this.tolerateUnexpectedToken(n,a.Messages.StrictReservedWord)}this.match("=")?this.reinterpretExpressionAsPattern(e):(this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1);var b=(n=this.nextToken()).value,x=this.isolateCoverGrammar(this.parseAssignmentExpression);e=this.finalize(this.startNode(t),new o.AssignmentExpression(b,e,x)),this.context.firstCoverInitializedNameError=null}}return e},e.prototype.parseExpression=function(){var e=this.lookahead,t=this.isolateCoverGrammar(this.parseAssignmentExpression);if(this.match(",")){var n=[];for(n.push(t);2!==this.lookahead.type&&this.match(",");)this.nextToken(),n.push(this.isolateCoverGrammar(this.parseAssignmentExpression));t=this.finalize(this.startNode(e),new o.SequenceExpression(n))}return t},e.prototype.parseStatementListItem=function(){var e;if(this.context.isAssignmentTarget=!0,this.context.isBindingElement=!0,4===this.lookahead.type)switch(this.lookahead.value){case"export":this.context.isModule||this.tolerateUnexpectedToken(this.lookahead,a.Messages.IllegalExportDeclaration),e=this.parseExportDeclaration();break;case"import":this.context.isModule||this.tolerateUnexpectedToken(this.lookahead,a.Messages.IllegalImportDeclaration),e=this.parseImportDeclaration();break;case"const":e=this.parseLexicalDeclaration({inFor:!1});break;case"function":e=this.parseFunctionDeclaration();break;case"class":e=this.parseClassDeclaration();break;case"let":e=this.isLexicalDeclaration()?this.parseLexicalDeclaration({inFor:!1}):this.parseStatement();break;default:e=this.parseStatement()}else e=this.parseStatement();return e},e.prototype.parseBlock=function(){var e=this.createNode();this.expect("{");for(var t=[];!this.match("}");)t.push(this.parseStatementListItem());return this.expect("}"),this.finalize(e,new o.BlockStatement(t))},e.prototype.parseLexicalBinding=function(e,t){var n=this.createNode(),i=this.parsePattern([],e);this.context.strict&&i.type===u.Syntax.Identifier&&this.scanner.isRestrictedWord(i.name)&&this.tolerateError(a.Messages.StrictVarName);var r=null;return"const"===e?this.matchKeyword("in")||this.matchContextualKeyword("of")||(this.match("=")?(this.nextToken(),r=this.isolateCoverGrammar(this.parseAssignmentExpression)):this.throwError(a.Messages.DeclarationMissingInitializer,"const")):(!t.inFor&&i.type!==u.Syntax.Identifier||this.match("="))&&(this.expect("="),r=this.isolateCoverGrammar(this.parseAssignmentExpression)),this.finalize(n,new o.VariableDeclarator(i,r))},e.prototype.parseBindingList=function(e,t){for(var n=[this.parseLexicalBinding(e,t)];this.match(",");)this.nextToken(),n.push(this.parseLexicalBinding(e,t));return n},e.prototype.isLexicalDeclaration=function(){var e=this.scanner.saveState();this.scanner.scanComments();var t=this.scanner.lex();return this.scanner.restoreState(e),3===t.type||7===t.type&&"["===t.value||7===t.type&&"{"===t.value||4===t.type&&"let"===t.value||4===t.type&&"yield"===t.value},e.prototype.parseLexicalDeclaration=function(e){var t=this.createNode(),n=this.nextToken().value;i.assert("let"===n||"const"===n,"Lexical declaration must be either let or const");var r=this.parseBindingList(n,e);return this.consumeSemicolon(),this.finalize(t,new o.VariableDeclaration(r,n))},e.prototype.parseBindingRestElement=function(e,t){var n=this.createNode();this.expect("...");var i=this.parsePattern(e,t);return this.finalize(n,new o.RestElement(i))},e.prototype.parseArrayPattern=function(e,t){var n=this.createNode();this.expect("[");for(var i=[];!this.match("]");)if(this.match(","))this.nextToken(),i.push(null);else{if(this.match("...")){i.push(this.parseBindingRestElement(e,t));break}i.push(this.parsePatternWithDefault(e,t)),this.match("]")||this.expect(",")}return this.expect("]"),this.finalize(n,new o.ArrayPattern(i))},e.prototype.parsePropertyPattern=function(e,t){var n,i,r=this.createNode(),a=!1,s=!1;if(3===this.lookahead.type){var u=this.lookahead;n=this.parseVariableIdentifier();var l=this.finalize(r,new o.Identifier(u.value));if(this.match("=")){e.push(u),s=!0,this.nextToken();var c=this.parseAssignmentExpression();i=this.finalize(this.startNode(u),new o.AssignmentPattern(l,c))}else this.match(":")?(this.expect(":"),i=this.parsePatternWithDefault(e,t)):(e.push(u),s=!0,i=l)}else a=this.match("["),n=this.parseObjectPropertyKey(),this.expect(":"),i=this.parsePatternWithDefault(e,t);return this.finalize(r,new o.Property("init",n,a,i,!1,s))},e.prototype.parseObjectPattern=function(e,t){var n=this.createNode(),i=[];for(this.expect("{");!this.match("}");)i.push(this.parsePropertyPattern(e,t)),this.match("}")||this.expect(",");return this.expect("}"),this.finalize(n,new o.ObjectPattern(i))},e.prototype.parsePattern=function(e,t){var n;return this.match("[")?n=this.parseArrayPattern(e,t):this.match("{")?n=this.parseObjectPattern(e,t):(!this.matchKeyword("let")||"const"!==t&&"let"!==t||this.tolerateUnexpectedToken(this.lookahead,a.Messages.LetInLexicalBinding),e.push(this.lookahead),n=this.parseVariableIdentifier(t)),n},e.prototype.parsePatternWithDefault=function(e,t){var n=this.lookahead,i=this.parsePattern(e,t);if(this.match("=")){this.nextToken();var r=this.context.allowYield;this.context.allowYield=!0;var a=this.isolateCoverGrammar(this.parseAssignmentExpression);this.context.allowYield=r,i=this.finalize(this.startNode(n),new o.AssignmentPattern(i,a))}return i},e.prototype.parseVariableIdentifier=function(e){var t=this.createNode(),n=this.nextToken();return 4===n.type&&"yield"===n.value?this.context.strict?this.tolerateUnexpectedToken(n,a.Messages.StrictReservedWord):this.context.allowYield||this.throwUnexpectedToken(n):3!==n.type?this.context.strict&&4===n.type&&this.scanner.isStrictModeReservedWord(n.value)?this.tolerateUnexpectedToken(n,a.Messages.StrictReservedWord):(this.context.strict||"let"!==n.value||"var"!==e)&&this.throwUnexpectedToken(n):(this.context.isModule||this.context.await)&&3===n.type&&"await"===n.value&&this.tolerateUnexpectedToken(n),this.finalize(t,new o.Identifier(n.value))},e.prototype.parseVariableDeclaration=function(e){var t=this.createNode(),n=this.parsePattern([],"var");this.context.strict&&n.type===u.Syntax.Identifier&&this.scanner.isRestrictedWord(n.name)&&this.tolerateError(a.Messages.StrictVarName);var i=null;return this.match("=")?(this.nextToken(),i=this.isolateCoverGrammar(this.parseAssignmentExpression)):n.type===u.Syntax.Identifier||e.inFor||this.expect("="),this.finalize(t,new o.VariableDeclarator(n,i))},e.prototype.parseVariableDeclarationList=function(e){var t={inFor:e.inFor},n=[];for(n.push(this.parseVariableDeclaration(t));this.match(",");)this.nextToken(),n.push(this.parseVariableDeclaration(t));return n},e.prototype.parseVariableStatement=function(){var e=this.createNode();this.expectKeyword("var");var t=this.parseVariableDeclarationList({inFor:!1});return this.consumeSemicolon(),this.finalize(e,new o.VariableDeclaration(t,"var"))},e.prototype.parseEmptyStatement=function(){var e=this.createNode();return this.expect(";"),this.finalize(e,new o.EmptyStatement)},e.prototype.parseExpressionStatement=function(){var e=this.createNode(),t=this.parseExpression();return this.consumeSemicolon(),this.finalize(e,new o.ExpressionStatement(t))},e.prototype.parseIfClause=function(){return this.context.strict&&this.matchKeyword("function")&&this.tolerateError(a.Messages.StrictFunction),this.parseStatement()},e.prototype.parseIfStatement=function(){var e,t=this.createNode(),n=null;this.expectKeyword("if"),this.expect("(");var i=this.parseExpression();return!this.match(")")&&this.config.tolerant?(this.tolerateUnexpectedToken(this.nextToken()),e=this.finalize(this.createNode(),new o.EmptyStatement)):(this.expect(")"),e=this.parseIfClause(),this.matchKeyword("else")&&(this.nextToken(),n=this.parseIfClause())),this.finalize(t,new o.IfStatement(i,e,n))},e.prototype.parseDoWhileStatement=function(){var e=this.createNode();this.expectKeyword("do");var t=this.context.inIteration;this.context.inIteration=!0;var n=this.parseStatement();this.context.inIteration=t,this.expectKeyword("while"),this.expect("(");var i=this.parseExpression();return!this.match(")")&&this.config.tolerant?this.tolerateUnexpectedToken(this.nextToken()):(this.expect(")"),this.match(";")&&this.nextToken()),this.finalize(e,new o.DoWhileStatement(n,i))},e.prototype.parseWhileStatement=function(){var e,t=this.createNode();this.expectKeyword("while"),this.expect("(");var n=this.parseExpression();if(!this.match(")")&&this.config.tolerant)this.tolerateUnexpectedToken(this.nextToken()),e=this.finalize(this.createNode(),new o.EmptyStatement);else{this.expect(")");var i=this.context.inIteration;this.context.inIteration=!0,e=this.parseStatement(),this.context.inIteration=i}return this.finalize(t,new o.WhileStatement(n,e))},e.prototype.parseForStatement=function(){var e,t,n,i=null,r=null,s=null,l=!0,c=this.createNode();if(this.expectKeyword("for"),this.expect("("),this.match(";"))this.nextToken();else if(this.matchKeyword("var")){i=this.createNode(),this.nextToken();var h=this.context.allowIn;this.context.allowIn=!1;var d=this.parseVariableDeclarationList({inFor:!0});if(this.context.allowIn=h,1===d.length&&this.matchKeyword("in")){var p=d[0];p.init&&(p.id.type===u.Syntax.ArrayPattern||p.id.type===u.Syntax.ObjectPattern||this.context.strict)&&this.tolerateError(a.Messages.ForInOfLoopInitializer,"for-in"),i=this.finalize(i,new o.VariableDeclaration(d,"var")),this.nextToken(),e=i,t=this.parseExpression(),i=null}else 1===d.length&&null===d[0].init&&this.matchContextualKeyword("of")?(i=this.finalize(i,new o.VariableDeclaration(d,"var")),this.nextToken(),e=i,t=this.parseAssignmentExpression(),i=null,l=!1):(i=this.finalize(i,new o.VariableDeclaration(d,"var")),this.expect(";"))}else if(this.matchKeyword("const")||this.matchKeyword("let")){i=this.createNode();var f=this.nextToken().value;this.context.strict||"in"!==this.lookahead.value?(h=this.context.allowIn,this.context.allowIn=!1,d=this.parseBindingList(f,{inFor:!0}),this.context.allowIn=h,1===d.length&&null===d[0].init&&this.matchKeyword("in")?(i=this.finalize(i,new o.VariableDeclaration(d,f)),this.nextToken(),e=i,t=this.parseExpression(),i=null):1===d.length&&null===d[0].init&&this.matchContextualKeyword("of")?(i=this.finalize(i,new o.VariableDeclaration(d,f)),this.nextToken(),e=i,t=this.parseAssignmentExpression(),i=null,l=!1):(this.consumeSemicolon(),i=this.finalize(i,new o.VariableDeclaration(d,f)))):(i=this.finalize(i,new o.Identifier(f)),this.nextToken(),e=i,t=this.parseExpression(),i=null)}else{var m=this.lookahead;if(h=this.context.allowIn,this.context.allowIn=!1,i=this.inheritCoverGrammar(this.parseAssignmentExpression),this.context.allowIn=h,this.matchKeyword("in"))this.context.isAssignmentTarget&&i.type!==u.Syntax.AssignmentExpression||this.tolerateError(a.Messages.InvalidLHSInForIn),this.nextToken(),this.reinterpretExpressionAsPattern(i),e=i,t=this.parseExpression(),i=null;else if(this.matchContextualKeyword("of"))this.context.isAssignmentTarget&&i.type!==u.Syntax.AssignmentExpression||this.tolerateError(a.Messages.InvalidLHSInForLoop),this.nextToken(),this.reinterpretExpressionAsPattern(i),e=i,t=this.parseAssignmentExpression(),i=null,l=!1;else{if(this.match(",")){for(var g=[i];this.match(",");)this.nextToken(),g.push(this.isolateCoverGrammar(this.parseAssignmentExpression));i=this.finalize(this.startNode(m),new o.SequenceExpression(g))}this.expect(";")}}if(void 0===e&&(this.match(";")||(r=this.parseExpression()),this.expect(";"),this.match(")")||(s=this.parseExpression())),!this.match(")")&&this.config.tolerant)this.tolerateUnexpectedToken(this.nextToken()),n=this.finalize(this.createNode(),new o.EmptyStatement);else{this.expect(")");var v=this.context.inIteration;this.context.inIteration=!0,n=this.isolateCoverGrammar(this.parseStatement),this.context.inIteration=v}return void 0===e?this.finalize(c,new o.ForStatement(i,r,s,n)):l?this.finalize(c,new o.ForInStatement(e,t,n)):this.finalize(c,new o.ForOfStatement(e,t,n))},e.prototype.parseContinueStatement=function(){var e=this.createNode();this.expectKeyword("continue");var t=null;if(3===this.lookahead.type&&!this.hasLineTerminator){var n=this.parseVariableIdentifier();t=n;var i="$"+n.name;Object.prototype.hasOwnProperty.call(this.context.labelSet,i)||this.throwError(a.Messages.UnknownLabel,n.name)}return this.consumeSemicolon(),null!==t||this.context.inIteration||this.throwError(a.Messages.IllegalContinue),this.finalize(e,new o.ContinueStatement(t))},e.prototype.parseBreakStatement=function(){var e=this.createNode();this.expectKeyword("break");var t=null;if(3===this.lookahead.type&&!this.hasLineTerminator){var n=this.parseVariableIdentifier(),i="$"+n.name;Object.prototype.hasOwnProperty.call(this.context.labelSet,i)||this.throwError(a.Messages.UnknownLabel,n.name),t=n}return this.consumeSemicolon(),null!==t||this.context.inIteration||this.context.inSwitch||this.throwError(a.Messages.IllegalBreak),this.finalize(e,new o.BreakStatement(t))},e.prototype.parseReturnStatement=function(){this.context.inFunctionBody||this.tolerateError(a.Messages.IllegalReturn);var e=this.createNode();this.expectKeyword("return");var t=(this.match(";")||this.match("}")||this.hasLineTerminator||2===this.lookahead.type)&&8!==this.lookahead.type&&10!==this.lookahead.type?null:this.parseExpression();return this.consumeSemicolon(),this.finalize(e,new o.ReturnStatement(t))},e.prototype.parseWithStatement=function(){this.context.strict&&this.tolerateError(a.Messages.StrictModeWith);var e,t=this.createNode();this.expectKeyword("with"),this.expect("(");var n=this.parseExpression();return!this.match(")")&&this.config.tolerant?(this.tolerateUnexpectedToken(this.nextToken()),e=this.finalize(this.createNode(),new o.EmptyStatement)):(this.expect(")"),e=this.parseStatement()),this.finalize(t,new o.WithStatement(n,e))},e.prototype.parseSwitchCase=function(){var e,t=this.createNode();this.matchKeyword("default")?(this.nextToken(),e=null):(this.expectKeyword("case"),e=this.parseExpression()),this.expect(":");for(var n=[];!(this.match("}")||this.matchKeyword("default")||this.matchKeyword("case"));)n.push(this.parseStatementListItem());return this.finalize(t,new o.SwitchCase(e,n))},e.prototype.parseSwitchStatement=function(){var e=this.createNode();this.expectKeyword("switch"),this.expect("(");var t=this.parseExpression();this.expect(")");var n=this.context.inSwitch;this.context.inSwitch=!0;var i=[],r=!1;for(this.expect("{");!this.match("}");){var s=this.parseSwitchCase();null===s.test&&(r&&this.throwError(a.Messages.MultipleDefaultsInSwitch),r=!0),i.push(s)}return this.expect("}"),this.context.inSwitch=n,this.finalize(e,new o.SwitchStatement(t,i))},e.prototype.parseLabelledStatement=function(){var e,t=this.createNode(),n=this.parseExpression();if(n.type===u.Syntax.Identifier&&this.match(":")){this.nextToken();var i=n,r="$"+i.name;Object.prototype.hasOwnProperty.call(this.context.labelSet,r)&&this.throwError(a.Messages.Redeclaration,"Label",i.name),this.context.labelSet[r]=!0;var s=void 0;if(this.matchKeyword("class"))this.tolerateUnexpectedToken(this.lookahead),s=this.parseClassDeclaration();else if(this.matchKeyword("function")){var l=this.lookahead,c=this.parseFunctionDeclaration();this.context.strict?this.tolerateUnexpectedToken(l,a.Messages.StrictFunction):c.generator&&this.tolerateUnexpectedToken(l,a.Messages.GeneratorInLegacyContext),s=c}else s=this.parseStatement();delete this.context.labelSet[r],e=new o.LabeledStatement(i,s)}else this.consumeSemicolon(),e=new o.ExpressionStatement(n);return this.finalize(t,e)},e.prototype.parseThrowStatement=function(){var e=this.createNode();this.expectKeyword("throw"),this.hasLineTerminator&&this.throwError(a.Messages.NewlineAfterThrow);var t=this.parseExpression();return this.consumeSemicolon(),this.finalize(e,new o.ThrowStatement(t))},e.prototype.parseCatchClause=function(){var e=this.createNode();this.expectKeyword("catch"),this.expect("("),this.match(")")&&this.throwUnexpectedToken(this.lookahead);for(var t=[],n=this.parsePattern(t),i={},r=0;r<t.length;r++){var s="$"+t[r].value;Object.prototype.hasOwnProperty.call(i,s)&&this.tolerateError(a.Messages.DuplicateBinding,t[r].value),i[s]=!0}this.context.strict&&n.type===u.Syntax.Identifier&&this.scanner.isRestrictedWord(n.name)&&this.tolerateError(a.Messages.StrictCatchVariable),this.expect(")");var l=this.parseBlock();return this.finalize(e,new o.CatchClause(n,l))},e.prototype.parseFinallyClause=function(){return this.expectKeyword("finally"),this.parseBlock()},e.prototype.parseTryStatement=function(){var e=this.createNode();this.expectKeyword("try");var t=this.parseBlock(),n=this.matchKeyword("catch")?this.parseCatchClause():null,i=this.matchKeyword("finally")?this.parseFinallyClause():null;return n||i||this.throwError(a.Messages.NoCatchOrFinally),this.finalize(e,new o.TryStatement(t,n,i))},e.prototype.parseDebuggerStatement=function(){var e=this.createNode();return this.expectKeyword("debugger"),this.consumeSemicolon(),this.finalize(e,new o.DebuggerStatement)},e.prototype.parseStatement=function(){var e;switch(this.lookahead.type){case 1:case 5:case 6:case 8:case 10:case 9:e=this.parseExpressionStatement();break;case 7:var t=this.lookahead.value;e="{"===t?this.parseBlock():"("===t?this.parseExpressionStatement():";"===t?this.parseEmptyStatement():this.parseExpressionStatement();break;case 3:e=this.matchAsyncFunction()?this.parseFunctionDeclaration():this.parseLabelledStatement();break;case 4:switch(this.lookahead.value){case"break":e=this.parseBreakStatement();break;case"continue":e=this.parseContinueStatement();break;case"debugger":e=this.parseDebuggerStatement();break;case"do":e=this.parseDoWhileStatement();break;case"for":e=this.parseForStatement();break;case"function":e=this.parseFunctionDeclaration();break;case"if":e=this.parseIfStatement();break;case"return":e=this.parseReturnStatement();break;case"switch":e=this.parseSwitchStatement();break;case"throw":e=this.parseThrowStatement();break;case"try":e=this.parseTryStatement();break;case"var":e=this.parseVariableStatement();break;case"while":e=this.parseWhileStatement();break;case"with":e=this.parseWithStatement();break;default:e=this.parseExpressionStatement()}break;default:e=this.throwUnexpectedToken(this.lookahead)}return e},e.prototype.parseFunctionSourceElements=function(){var e=this.createNode();this.expect("{");var t=this.parseDirectivePrologues(),n=this.context.labelSet,i=this.context.inIteration,r=this.context.inSwitch,a=this.context.inFunctionBody;for(this.context.labelSet={},this.context.inIteration=!1,this.context.inSwitch=!1,this.context.inFunctionBody=!0;2!==this.lookahead.type&&!this.match("}");)t.push(this.parseStatementListItem());return this.expect("}"),this.context.labelSet=n,this.context.inIteration=i,this.context.inSwitch=r,this.context.inFunctionBody=a,this.finalize(e,new o.BlockStatement(t))},e.prototype.validateParam=function(e,t,n){var i="$"+n;this.context.strict?(this.scanner.isRestrictedWord(n)&&(e.stricted=t,e.message=a.Messages.StrictParamName),Object.prototype.hasOwnProperty.call(e.paramSet,i)&&(e.stricted=t,e.message=a.Messages.StrictParamDupe)):e.firstRestricted||(this.scanner.isRestrictedWord(n)?(e.firstRestricted=t,e.message=a.Messages.StrictParamName):this.scanner.isStrictModeReservedWord(n)?(e.firstRestricted=t,e.message=a.Messages.StrictReservedWord):Object.prototype.hasOwnProperty.call(e.paramSet,i)&&(e.stricted=t,e.message=a.Messages.StrictParamDupe)),"function"==typeof Object.defineProperty?Object.defineProperty(e.paramSet,i,{value:!0,enumerable:!0,writable:!0,configurable:!0}):e.paramSet[i]=!0},e.prototype.parseRestElement=function(e){var t=this.createNode();this.expect("...");var n=this.parsePattern(e);return this.match("=")&&this.throwError(a.Messages.DefaultRestParameter),this.match(")")||this.throwError(a.Messages.ParameterAfterRestParameter),this.finalize(t,new o.RestElement(n))},e.prototype.parseFormalParameter=function(e){for(var t=[],n=this.match("...")?this.parseRestElement(t):this.parsePatternWithDefault(t),i=0;i<t.length;i++)this.validateParam(e,t[i],t[i].value);e.simple=e.simple&&n instanceof o.Identifier,e.params.push(n)},e.prototype.parseFormalParameters=function(e){var t;if(t={simple:!0,params:[],firstRestricted:e},this.expect("("),!this.match(")"))for(t.paramSet={};2!==this.lookahead.type&&(this.parseFormalParameter(t),!this.match(")"))&&(this.expect(","),!this.match(")")););return this.expect(")"),{simple:t.simple,params:t.params,stricted:t.stricted,firstRestricted:t.firstRestricted,message:t.message}},e.prototype.matchAsyncFunction=function(){var e=this.matchContextualKeyword("async");if(e){var t=this.scanner.saveState();this.scanner.scanComments();var n=this.scanner.lex();this.scanner.restoreState(t),e=t.lineNumber===n.lineNumber&&4===n.type&&"function"===n.value}return e},e.prototype.parseFunctionDeclaration=function(e){var t=this.createNode(),n=this.matchContextualKeyword("async");n&&this.nextToken(),this.expectKeyword("function");var i,r=!n&&this.match("*");r&&this.nextToken();var s=null,u=null;if(!e||!this.match("(")){var l=this.lookahead;s=this.parseVariableIdentifier(),this.context.strict?this.scanner.isRestrictedWord(l.value)&&this.tolerateUnexpectedToken(l,a.Messages.StrictFunctionName):this.scanner.isRestrictedWord(l.value)?(u=l,i=a.Messages.StrictFunctionName):this.scanner.isStrictModeReservedWord(l.value)&&(u=l,i=a.Messages.StrictReservedWord)}var c=this.context.await,h=this.context.allowYield;this.context.await=n,this.context.allowYield=!r;var d=this.parseFormalParameters(u),p=d.params,f=d.stricted;u=d.firstRestricted,d.message&&(i=d.message);var m=this.context.strict,g=this.context.allowStrictDirective;this.context.allowStrictDirective=d.simple;var v=this.parseFunctionSourceElements();return this.context.strict&&u&&this.throwUnexpectedToken(u,i),this.context.strict&&f&&this.tolerateUnexpectedToken(f,i),this.context.strict=m,this.context.allowStrictDirective=g,this.context.await=c,this.context.allowYield=h,n?this.finalize(t,new o.AsyncFunctionDeclaration(s,p,v)):this.finalize(t,new o.FunctionDeclaration(s,p,v,r))},e.prototype.parseFunctionExpression=function(){var e=this.createNode(),t=this.matchContextualKeyword("async");t&&this.nextToken(),this.expectKeyword("function");var n,i=!t&&this.match("*");i&&this.nextToken();var r,s=null,u=this.context.await,l=this.context.allowYield;if(this.context.await=t,this.context.allowYield=!i,!this.match("(")){var c=this.lookahead;s=this.context.strict||i||!this.matchKeyword("yield")?this.parseVariableIdentifier():this.parseIdentifierName(),this.context.strict?this.scanner.isRestrictedWord(c.value)&&this.tolerateUnexpectedToken(c,a.Messages.StrictFunctionName):this.scanner.isRestrictedWord(c.value)?(r=c,n=a.Messages.StrictFunctionName):this.scanner.isStrictModeReservedWord(c.value)&&(r=c,n=a.Messages.StrictReservedWord)}var h=this.parseFormalParameters(r),d=h.params,p=h.stricted;r=h.firstRestricted,h.message&&(n=h.message);var f=this.context.strict,m=this.context.allowStrictDirective;this.context.allowStrictDirective=h.simple;var g=this.parseFunctionSourceElements();return this.context.strict&&r&&this.throwUnexpectedToken(r,n),this.context.strict&&p&&this.tolerateUnexpectedToken(p,n),this.context.strict=f,this.context.allowStrictDirective=m,this.context.await=u,this.context.allowYield=l,t?this.finalize(e,new o.AsyncFunctionExpression(s,d,g)):this.finalize(e,new o.FunctionExpression(s,d,g,i))},e.prototype.parseDirective=function(){var e=this.lookahead,t=this.createNode(),n=this.parseExpression(),i=n.type===u.Syntax.Literal?this.getTokenRaw(e).slice(1,-1):null;return this.consumeSemicolon(),this.finalize(t,i?new o.Directive(n,i):new o.ExpressionStatement(n))},e.prototype.parseDirectivePrologues=function(){for(var e=null,t=[];;){var n=this.lookahead;if(8!==n.type)break;var i=this.parseDirective();t.push(i);var r=i.directive;if("string"!=typeof r)break;"use strict"===r?(this.context.strict=!0,e&&this.tolerateUnexpectedToken(e,a.Messages.StrictOctalLiteral),this.context.allowStrictDirective||this.tolerateUnexpectedToken(n,a.Messages.IllegalLanguageModeDirective)):!e&&n.octal&&(e=n)}return t},e.prototype.qualifiedPropertyName=function(e){switch(e.type){case 3:case 8:case 1:case 5:case 6:case 4:return!0;case 7:return"["===e.value}return!1},e.prototype.parseGetterMethod=function(){var e=this.createNode(),t=!1,n=this.context.allowYield;this.context.allowYield=!0;var i=this.parseFormalParameters();i.params.length>0&&this.tolerateError(a.Messages.BadGetterArity);var r=this.parsePropertyMethod(i);return this.context.allowYield=n,this.finalize(e,new o.FunctionExpression(null,i.params,r,t))},e.prototype.parseSetterMethod=function(){var e=this.createNode(),t=!1,n=this.context.allowYield;this.context.allowYield=!0;var i=this.parseFormalParameters();1!==i.params.length?this.tolerateError(a.Messages.BadSetterArity):i.params[0]instanceof o.RestElement&&this.tolerateError(a.Messages.BadSetterRestParameter);var r=this.parsePropertyMethod(i);return this.context.allowYield=n,this.finalize(e,new o.FunctionExpression(null,i.params,r,t))},e.prototype.parseGeneratorMethod=function(){var e=this.createNode(),t=this.context.allowYield;this.context.allowYield=!0;var n=this.parseFormalParameters();this.context.allowYield=!1;var i=this.parsePropertyMethod(n);return this.context.allowYield=t,this.finalize(e,new o.FunctionExpression(null,n.params,i,!0))},e.prototype.isStartOfExpression=function(){var e=!0,t=this.lookahead.value;switch(this.lookahead.type){case 7:e="["===t||"("===t||"{"===t||"+"===t||"-"===t||"!"===t||"~"===t||"++"===t||"--"===t||"/"===t||"/="===t;break;case 4:e="class"===t||"delete"===t||"function"===t||"let"===t||"new"===t||"super"===t||"this"===t||"typeof"===t||"void"===t||"yield"===t}return e},e.prototype.parseYieldExpression=function(){var e=this.createNode();this.expectKeyword("yield");var t=null,n=!1;if(!this.hasLineTerminator){var i=this.context.allowYield;this.context.allowYield=!1,(n=this.match("*"))?(this.nextToken(),t=this.parseAssignmentExpression()):this.isStartOfExpression()&&(t=this.parseAssignmentExpression()),this.context.allowYield=i}return this.finalize(e,new o.YieldExpression(t,n))},e.prototype.parseClassElement=function(e){var t=this.lookahead,n=this.createNode(),i="",r=null,s=null,u=!1,l=!1,c=!1,h=!1;if(this.match("*"))this.nextToken();else if(u=this.match("["),"static"===(r=this.parseObjectPropertyKey()).name&&(this.qualifiedPropertyName(this.lookahead)||this.match("*"))&&(t=this.lookahead,c=!0,u=this.match("["),this.match("*")?this.nextToken():r=this.parseObjectPropertyKey()),3===t.type&&!this.hasLineTerminator&&"async"===t.value){var d=this.lookahead.value;":"!==d&&"("!==d&&"*"!==d&&(h=!0,t=this.lookahead,r=this.parseObjectPropertyKey(),3===t.type&&"constructor"===t.value&&this.tolerateUnexpectedToken(t,a.Messages.ConstructorIsAsync))}var p=this.qualifiedPropertyName(this.lookahead);return 3===t.type?"get"===t.value&&p?(i="get",u=this.match("["),r=this.parseObjectPropertyKey(),this.context.allowYield=!1,s=this.parseGetterMethod()):"set"===t.value&&p&&(i="set",u=this.match("["),r=this.parseObjectPropertyKey(),s=this.parseSetterMethod()):7===t.type&&"*"===t.value&&p&&(i="init",u=this.match("["),r=this.parseObjectPropertyKey(),s=this.parseGeneratorMethod(),l=!0),!i&&r&&this.match("(")&&(i="init",s=h?this.parsePropertyMethodAsyncFunction():this.parsePropertyMethodFunction(),l=!0),i||this.throwUnexpectedToken(this.lookahead),"init"===i&&(i="method"),u||(c&&this.isPropertyKey(r,"prototype")&&this.throwUnexpectedToken(t,a.Messages.StaticPrototype),!c&&this.isPropertyKey(r,"constructor")&&(("method"!==i||!l||s&&s.generator)&&this.throwUnexpectedToken(t,a.Messages.ConstructorSpecialMethod),e.value?this.throwUnexpectedToken(t,a.Messages.DuplicateConstructor):e.value=!0,i="constructor")),this.finalize(n,new o.MethodDefinition(r,u,s,i,c))},e.prototype.parseClassElementList=function(){var e=[],t={value:!1};for(this.expect("{");!this.match("}");)this.match(";")?this.nextToken():e.push(this.parseClassElement(t));return this.expect("}"),e},e.prototype.parseClassBody=function(){var e=this.createNode(),t=this.parseClassElementList();return this.finalize(e,new o.ClassBody(t))},e.prototype.parseClassDeclaration=function(e){var t=this.createNode(),n=this.context.strict;this.context.strict=!0,this.expectKeyword("class");var i=e&&3!==this.lookahead.type?null:this.parseVariableIdentifier(),r=null;this.matchKeyword("extends")&&(this.nextToken(),r=this.isolateCoverGrammar(this.parseLeftHandSideExpressionAllowCall));var a=this.parseClassBody();return this.context.strict=n,this.finalize(t,new o.ClassDeclaration(i,r,a))},e.prototype.parseClassExpression=function(){var e=this.createNode(),t=this.context.strict;this.context.strict=!0,this.expectKeyword("class");var n=3===this.lookahead.type?this.parseVariableIdentifier():null,i=null;this.matchKeyword("extends")&&(this.nextToken(),i=this.isolateCoverGrammar(this.parseLeftHandSideExpressionAllowCall));var r=this.parseClassBody();return this.context.strict=t,this.finalize(e,new o.ClassExpression(n,i,r))},e.prototype.parseModule=function(){this.context.strict=!0,this.context.isModule=!0,this.scanner.isModule=!0;for(var e=this.createNode(),t=this.parseDirectivePrologues();2!==this.lookahead.type;)t.push(this.parseStatementListItem());return this.finalize(e,new o.Module(t))},e.prototype.parseScript=function(){for(var e=this.createNode(),t=this.parseDirectivePrologues();2!==this.lookahead.type;)t.push(this.parseStatementListItem());return this.finalize(e,new o.Script(t))},e.prototype.parseModuleSpecifier=function(){var e=this.createNode();8!==this.lookahead.type&&this.throwError(a.Messages.InvalidModuleSpecifier);var t=this.nextToken(),n=this.getTokenRaw(t);return this.finalize(e,new o.Literal(t.value,n))},e.prototype.parseImportSpecifier=function(){var e,t,n=this.createNode();return 3===this.lookahead.type?(t=e=this.parseVariableIdentifier(),this.matchContextualKeyword("as")&&(this.nextToken(),t=this.parseVariableIdentifier())):(t=e=this.parseIdentifierName(),this.matchContextualKeyword("as")?(this.nextToken(),t=this.parseVariableIdentifier()):this.throwUnexpectedToken(this.nextToken())),this.finalize(n,new o.ImportSpecifier(t,e))},e.prototype.parseNamedImports=function(){this.expect("{");for(var e=[];!this.match("}");)e.push(this.parseImportSpecifier()),this.match("}")||this.expect(",");return this.expect("}"),e},e.prototype.parseImportDefaultSpecifier=function(){var e=this.createNode(),t=this.parseIdentifierName();return this.finalize(e,new o.ImportDefaultSpecifier(t))},e.prototype.parseImportNamespaceSpecifier=function(){var e=this.createNode();this.expect("*"),this.matchContextualKeyword("as")||this.throwError(a.Messages.NoAsAfterImportNamespace),this.nextToken();var t=this.parseIdentifierName();return this.finalize(e,new o.ImportNamespaceSpecifier(t))},e.prototype.parseImportDeclaration=function(){this.context.inFunctionBody&&this.throwError(a.Messages.IllegalImportDeclaration);var e,t=this.createNode();this.expectKeyword("import");var n=[];if(8===this.lookahead.type)e=this.parseModuleSpecifier();else{if(this.match("{")?n=n.concat(this.parseNamedImports()):this.match("*")?n.push(this.parseImportNamespaceSpecifier()):this.isIdentifierName(this.lookahead)&&!this.matchKeyword("default")?(n.push(this.parseImportDefaultSpecifier()),this.match(",")&&(this.nextToken(),this.match("*")?n.push(this.parseImportNamespaceSpecifier()):this.match("{")?n=n.concat(this.parseNamedImports()):this.throwUnexpectedToken(this.lookahead))):this.throwUnexpectedToken(this.nextToken()),!this.matchContextualKeyword("from")){var i=this.lookahead.value?a.Messages.UnexpectedToken:a.Messages.MissingFromClause;this.throwError(i,this.lookahead.value)}this.nextToken(),e=this.parseModuleSpecifier()}return this.consumeSemicolon(),this.finalize(t,new o.ImportDeclaration(n,e))},e.prototype.parseExportSpecifier=function(){var e=this.createNode(),t=this.parseIdentifierName(),n=t;return this.matchContextualKeyword("as")&&(this.nextToken(),n=this.parseIdentifierName()),this.finalize(e,new o.ExportSpecifier(t,n))},e.prototype.parseExportDeclaration=function(){this.context.inFunctionBody&&this.throwError(a.Messages.IllegalExportDeclaration);var e,t=this.createNode();if(this.expectKeyword("export"),this.matchKeyword("default"))if(this.nextToken(),this.matchKeyword("function")){var n=this.parseFunctionDeclaration(!0);e=this.finalize(t,new o.ExportDefaultDeclaration(n))}else this.matchKeyword("class")?(n=this.parseClassDeclaration(!0),e=this.finalize(t,new o.ExportDefaultDeclaration(n))):this.matchContextualKeyword("async")?(n=this.matchAsyncFunction()?this.parseFunctionDeclaration(!0):this.parseAssignmentExpression(),e=this.finalize(t,new o.ExportDefaultDeclaration(n))):(this.matchContextualKeyword("from")&&this.throwError(a.Messages.UnexpectedToken,this.lookahead.value),n=this.match("{")?this.parseObjectInitializer():this.match("[")?this.parseArrayInitializer():this.parseAssignmentExpression(),this.consumeSemicolon(),e=this.finalize(t,new o.ExportDefaultDeclaration(n)));else if(this.match("*")){if(this.nextToken(),!this.matchContextualKeyword("from")){var i=this.lookahead.value?a.Messages.UnexpectedToken:a.Messages.MissingFromClause;this.throwError(i,this.lookahead.value)}this.nextToken();var r=this.parseModuleSpecifier();this.consumeSemicolon(),e=this.finalize(t,new o.ExportAllDeclaration(r))}else if(4===this.lookahead.type){switch(n=void 0,this.lookahead.value){case"let":case"const":n=this.parseLexicalDeclaration({inFor:!1});break;case"var":case"class":case"function":n=this.parseStatementListItem();break;default:this.throwUnexpectedToken(this.lookahead)}e=this.finalize(t,new o.ExportNamedDeclaration(n,[],null))}else if(this.matchAsyncFunction())n=this.parseFunctionDeclaration(),e=this.finalize(t,new o.ExportNamedDeclaration(n,[],null));else{var s=[],u=null,l=!1;for(this.expect("{");!this.match("}");)l=l||this.matchKeyword("default"),s.push(this.parseExportSpecifier()),this.match("}")||this.expect(",");this.expect("}"),this.matchContextualKeyword("from")?(this.nextToken(),u=this.parseModuleSpecifier(),this.consumeSemicolon()):l?(i=this.lookahead.value?a.Messages.UnexpectedToken:a.Messages.MissingFromClause,this.throwError(i,this.lookahead.value)):this.consumeSemicolon(),e=this.finalize(t,new o.ExportNamedDeclaration(null,s,u))}return e},e}();t.Parser=h},function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.assert=function(e,t){if(!e)throw new Error("ASSERT: "+t)}},function(e,t){Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(){this.errors=[],this.tolerant=!1}return e.prototype.recordError=function(e){this.errors.push(e)},e.prototype.tolerate=function(e){if(!this.tolerant)throw e;this.recordError(e)},e.prototype.constructError=function(e,t){var n=new Error(e);try{throw n}catch(e){Object.create&&Object.defineProperty&&(n=Object.create(e),Object.defineProperty(n,"column",{value:t}))}return n},e.prototype.createError=function(e,t,n,i){var r="Line "+t+": "+i,a=this.constructError(r,n);return a.index=e,a.lineNumber=t,a.description=i,a},e.prototype.throwError=function(e,t,n,i){throw this.createError(e,t,n,i)},e.prototype.tolerateError=function(e,t,n,i){var r=this.createError(e,t,n,i);if(!this.tolerant)throw r;this.recordError(r)},e}();t.ErrorHandler=n},function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.Messages={BadGetterArity:"Getter must not have any formal parameters",BadSetterArity:"Setter must have exactly one formal parameter",BadSetterRestParameter:"Setter function argument must not be a rest parameter",ConstructorIsAsync:"Class constructor may not be an async method",ConstructorSpecialMethod:"Class constructor may not be an accessor",DeclarationMissingInitializer:"Missing initializer in %0 declaration",DefaultRestParameter:"Unexpected token =",DuplicateBinding:"Duplicate binding %0",DuplicateConstructor:"A class may only have one constructor",DuplicateProtoProperty:"Duplicate __proto__ fields are not allowed in object literals",ForInOfLoopInitializer:"%0 loop variable declaration may not have an initializer",GeneratorInLegacyContext:"Generator declarations are not allowed in legacy contexts",IllegalBreak:"Illegal break statement",IllegalContinue:"Illegal continue statement",IllegalExportDeclaration:"Unexpected token",IllegalImportDeclaration:"Unexpected token",IllegalLanguageModeDirective:"Illegal 'use strict' directive in function with non-simple parameter list",IllegalReturn:"Illegal return statement",InvalidEscapedReservedWord:"Keyword must not contain escaped characters",InvalidHexEscapeSequence:"Invalid hexadecimal escape sequence",InvalidLHSInAssignment:"Invalid left-hand side in assignment",InvalidLHSInForIn:"Invalid left-hand side in for-in",InvalidLHSInForLoop:"Invalid left-hand side in for-loop",InvalidModuleSpecifier:"Unexpected token",InvalidRegExp:"Invalid regular expression",LetInLexicalBinding:"let is disallowed as a lexically bound name",MissingFromClause:"Unexpected token",MultipleDefaultsInSwitch:"More than one default clause in switch statement",NewlineAfterThrow:"Illegal newline after throw",NoAsAfterImportNamespace:"Unexpected token",NoCatchOrFinally:"Missing catch or finally after try",ParameterAfterRestParameter:"Rest parameter must be last formal parameter",Redeclaration:"%0 '%1' has already been declared",StaticPrototype:"Classes may not have static property named prototype",StrictCatchVariable:"Catch variable may not be eval or arguments in strict mode",StrictDelete:"Delete of an unqualified identifier in strict mode.",StrictFunction:"In strict mode code, functions can only be declared at top level or inside a block",StrictFunctionName:"Function name may not be eval or arguments in strict mode",StrictLHSAssignment:"Assignment to eval or arguments is not allowed in strict mode",StrictLHSPostfix:"Postfix increment/decrement may not have eval or arguments operand in strict mode",StrictLHSPrefix:"Prefix increment/decrement may not have eval or arguments operand in strict mode",StrictModeWith:"Strict mode code may not include a with statement",StrictOctalLiteral:"Octal literals are not allowed in strict mode.",StrictParamDupe:"Strict mode function may not have duplicate parameter names",StrictParamName:"Parameter name eval or arguments is not allowed in strict mode",StrictReservedWord:"Use of future reserved word in strict mode",StrictVarName:"Variable name may not be eval or arguments in strict mode",TemplateOctalLiteral:"Octal literals are not allowed in template strings.",UnexpectedEOS:"Unexpected end of input",UnexpectedIdentifier:"Unexpected identifier",UnexpectedNumber:"Unexpected number",UnexpectedReserved:"Unexpected reserved word",UnexpectedString:"Unexpected string",UnexpectedTemplate:"Unexpected quasi %0",UnexpectedToken:"Unexpected token %0",UnexpectedTokenIllegal:"Unexpected token ILLEGAL",UnknownLabel:"Undefined label '%0'",UnterminatedRegExp:"Invalid regular expression: missing /"}},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var i=n(9),r=n(4),a=n(11);function o(e){return"0123456789abcdef".indexOf(e.toLowerCase())}function s(e){return"01234567".indexOf(e)}var u=function(){function e(e,t){this.source=e,this.errorHandler=t,this.trackComment=!1,this.isModule=!1,this.length=e.length,this.index=0,this.lineNumber=e.length>0?1:0,this.lineStart=0,this.curlyStack=[]}return e.prototype.saveState=function(){return{index:this.index,lineNumber:this.lineNumber,lineStart:this.lineStart}},e.prototype.restoreState=function(e){this.index=e.index,this.lineNumber=e.lineNumber,this.lineStart=e.lineStart},e.prototype.eof=function(){return this.index>=this.length},e.prototype.throwUnexpectedToken=function(e){return void 0===e&&(e=a.Messages.UnexpectedTokenIllegal),this.errorHandler.throwError(this.index,this.lineNumber,this.index-this.lineStart+1,e)},e.prototype.tolerateUnexpectedToken=function(e){void 0===e&&(e=a.Messages.UnexpectedTokenIllegal),this.errorHandler.tolerateError(this.index,this.lineNumber,this.index-this.lineStart+1,e)},e.prototype.skipSingleLineComment=function(e){var t,n,i=[];for(this.trackComment&&(i=[],t=this.index-e,n={start:{line:this.lineNumber,column:this.index-this.lineStart-e},end:{}});!this.eof();){var a=this.source.charCodeAt(this.index);if(++this.index,r.Character.isLineTerminator(a)){if(this.trackComment){n.end={line:this.lineNumber,column:this.index-this.lineStart-1};var o={multiLine:!1,slice:[t+e,this.index-1],range:[t,this.index-1],loc:n};i.push(o)}return 13===a&&10===this.source.charCodeAt(this.index)&&++this.index,++this.lineNumber,this.lineStart=this.index,i}}return this.trackComment&&(n.end={line:this.lineNumber,column:this.index-this.lineStart},o={multiLine:!1,slice:[t+e,this.index],range:[t,this.index],loc:n},i.push(o)),i},e.prototype.skipMultiLineComment=function(){var e,t,n=[];for(this.trackComment&&(n=[],e=this.index-2,t={start:{line:this.lineNumber,column:this.index-this.lineStart-2},end:{}});!this.eof();){var i=this.source.charCodeAt(this.index);if(r.Character.isLineTerminator(i))13===i&&10===this.source.charCodeAt(this.index+1)&&++this.index,++this.lineNumber,++this.index,this.lineStart=this.index;else if(42===i){if(47===this.source.charCodeAt(this.index+1)){if(this.index+=2,this.trackComment){t.end={line:this.lineNumber,column:this.index-this.lineStart};var a={multiLine:!0,slice:[e+2,this.index-2],range:[e,this.index],loc:t};n.push(a)}return n}++this.index}else++this.index}return this.trackComment&&(t.end={line:this.lineNumber,column:this.index-this.lineStart},a={multiLine:!0,slice:[e+2,this.index],range:[e,this.index],loc:t},n.push(a)),this.tolerateUnexpectedToken(),n},e.prototype.scanComments=function(){var e;this.trackComment&&(e=[]);for(var t=0===this.index;!this.eof();){var n=this.source.charCodeAt(this.index);if(r.Character.isWhiteSpace(n))++this.index;else if(r.Character.isLineTerminator(n))++this.index,13===n&&10===this.source.charCodeAt(this.index)&&++this.index,++this.lineNumber,this.lineStart=this.index,t=!0;else if(47===n)if(47===(n=this.source.charCodeAt(this.index+1))){this.index+=2;var i=this.skipSingleLineComment(2);this.trackComment&&(e=e.concat(i)),t=!0}else{if(42!==n)break;this.index+=2,i=this.skipMultiLineComment(),this.trackComment&&(e=e.concat(i))}else if(t&&45===n){if(45!==this.source.charCodeAt(this.index+1)||62!==this.source.charCodeAt(this.index+2))break;this.index+=3,i=this.skipSingleLineComment(3),this.trackComment&&(e=e.concat(i))}else{if(60!==n||this.isModule)break;if("!--"!==this.source.slice(this.index+1,this.index+4))break;this.index+=4,i=this.skipSingleLineComment(4),this.trackComment&&(e=e.concat(i))}}return e},e.prototype.isFutureReservedWord=function(e){switch(e){case"enum":case"export":case"import":case"super":return!0;default:return!1}},e.prototype.isStrictModeReservedWord=function(e){switch(e){case"implements":case"interface":case"package":case"private":case"protected":case"public":case"static":case"yield":case"let":return!0;default:return!1}},e.prototype.isRestrictedWord=function(e){return"eval"===e||"arguments"===e},e.prototype.isKeyword=function(e){switch(e.length){case 2:return"if"===e||"in"===e||"do"===e;case 3:return"var"===e||"for"===e||"new"===e||"try"===e||"let"===e;case 4:return"this"===e||"else"===e||"case"===e||"void"===e||"with"===e||"enum"===e;case 5:return"while"===e||"break"===e||"catch"===e||"throw"===e||"const"===e||"yield"===e||"class"===e||"super"===e;case 6:return"return"===e||"typeof"===e||"delete"===e||"switch"===e||"export"===e||"import"===e;case 7:return"default"===e||"finally"===e||"extends"===e;case 8:return"function"===e||"continue"===e||"debugger"===e;case 10:return"instanceof"===e;default:return!1}},e.prototype.codePointAt=function(e){var t=this.source.charCodeAt(e);if(t>=55296&&t<=56319){var n=this.source.charCodeAt(e+1);n>=56320&&n<=57343&&(t=1024*(t-55296)+n-56320+65536)}return t},e.prototype.scanHexEscape=function(e){for(var t="u"===e?4:2,n=0,i=0;i<t;++i){if(this.eof()||!r.Character.isHexDigit(this.source.charCodeAt(this.index)))return null;n=16*n+o(this.source[this.index++])}return String.fromCharCode(n)},e.prototype.scanUnicodeCodePointEscape=function(){var e=this.source[this.index],t=0;for("}"===e&&this.throwUnexpectedToken();!this.eof()&&(e=this.source[this.index++],r.Character.isHexDigit(e.charCodeAt(0)));)t=16*t+o(e);return(t>1114111||"}"!==e)&&this.throwUnexpectedToken(),r.Character.fromCodePoint(t)},e.prototype.getIdentifier=function(){for(var e=this.index++;!this.eof();){var t=this.source.charCodeAt(this.index);if(92===t)return this.index=e,this.getComplexIdentifier();if(t>=55296&&t<57343)return this.index=e,this.getComplexIdentifier();if(!r.Character.isIdentifierPart(t))break;++this.index}return this.source.slice(e,this.index)},e.prototype.getComplexIdentifier=function(){var e,t=this.codePointAt(this.index),n=r.Character.fromCodePoint(t);for(this.index+=n.length,92===t&&(117!==this.source.charCodeAt(this.index)&&this.throwUnexpectedToken(),++this.index,"{"===this.source[this.index]?(++this.index,e=this.scanUnicodeCodePointEscape()):null!==(e=this.scanHexEscape("u"))&&"\\"!==e&&r.Character.isIdentifierStart(e.charCodeAt(0))||this.throwUnexpectedToken(),n=e);!this.eof()&&(t=this.codePointAt(this.index),r.Character.isIdentifierPart(t));)n+=e=r.Character.fromCodePoint(t),this.index+=e.length,92===t&&(n=n.substr(0,n.length-1),117!==this.source.charCodeAt(this.index)&&this.throwUnexpectedToken(),++this.index,"{"===this.source[this.index]?(++this.index,e=this.scanUnicodeCodePointEscape()):null!==(e=this.scanHexEscape("u"))&&"\\"!==e&&r.Character.isIdentifierPart(e.charCodeAt(0))||this.throwUnexpectedToken(),n+=e);return n},e.prototype.octalToDecimal=function(e){var t="0"!==e,n=s(e);return!this.eof()&&r.Character.isOctalDigit(this.source.charCodeAt(this.index))&&(t=!0,n=8*n+s(this.source[this.index++]),"0123".indexOf(e)>=0&&!this.eof()&&r.Character.isOctalDigit(this.source.charCodeAt(this.index))&&(n=8*n+s(this.source[this.index++]))),{code:n,octal:t}},e.prototype.scanIdentifier=function(){var e,t=this.index,n=92===this.source.charCodeAt(t)?this.getComplexIdentifier():this.getIdentifier();if(3!=(e=1===n.length?3:this.isKeyword(n)?4:"null"===n?5:"true"===n||"false"===n?1:3)&&t+n.length!==this.index){var i=this.index;this.index=t,this.tolerateUnexpectedToken(a.Messages.InvalidEscapedReservedWord),this.index=i}return{type:e,value:n,lineNumber:this.lineNumber,lineStart:this.lineStart,start:t,end:this.index}},e.prototype.scanPunctuator=function(){var e=this.index,t=this.source[this.index];switch(t){case"(":case"{":"{"===t&&this.curlyStack.push("{"),++this.index;break;case".":++this.index,"."===this.source[this.index]&&"."===this.source[this.index+1]&&(this.index+=2,t="...");break;case"}":++this.index,this.curlyStack.pop();break;case")":case";":case",":case"[":case"]":case":":case"?":case"~":++this.index;break;default:">>>="===(t=this.source.substr(this.index,4))?this.index+=4:"==="===(t=t.substr(0,3))||"!=="===t||">>>"===t||"<<="===t||">>="===t||"**="===t?this.index+=3:"&&"===(t=t.substr(0,2))||"||"===t||"=="===t||"!="===t||"+="===t||"-="===t||"*="===t||"/="===t||"++"===t||"--"===t||"<<"===t||">>"===t||"&="===t||"|="===t||"^="===t||"%="===t||"<="===t||">="===t||"=>"===t||"**"===t?this.index+=2:(t=this.source[this.index],"<>=!+-*%&|^/".indexOf(t)>=0&&++this.index)}return this.index===e&&this.throwUnexpectedToken(),{type:7,value:t,lineNumber:this.lineNumber,lineStart:this.lineStart,start:e,end:this.index}},e.prototype.scanHexLiteral=function(e){for(var t="";!this.eof()&&r.Character.isHexDigit(this.source.charCodeAt(this.index));)t+=this.source[this.index++];return 0===t.length&&this.throwUnexpectedToken(),r.Character.isIdentifierStart(this.source.charCodeAt(this.index))&&this.throwUnexpectedToken(),{type:6,value:parseInt("0x"+t,16),lineNumber:this.lineNumber,lineStart:this.lineStart,start:e,end:this.index}},e.prototype.scanBinaryLiteral=function(e){for(var t,n="";!this.eof()&&("0"===(t=this.source[this.index])||"1"===t);)n+=this.source[this.index++];return 0===n.length&&this.throwUnexpectedToken(),this.eof()||(t=this.source.charCodeAt(this.index),(r.Character.isIdentifierStart(t)||r.Character.isDecimalDigit(t))&&this.throwUnexpectedToken()),{type:6,value:parseInt(n,2),lineNumber:this.lineNumber,lineStart:this.lineStart,start:e,end:this.index}},e.prototype.scanOctalLiteral=function(e,t){var n="",i=!1;for(r.Character.isOctalDigit(e.charCodeAt(0))?(i=!0,n="0"+this.source[this.index++]):++this.index;!this.eof()&&r.Character.isOctalDigit(this.source.charCodeAt(this.index));)n+=this.source[this.index++];return i||0!==n.length||this.throwUnexpectedToken(),(r.Character.isIdentifierStart(this.source.charCodeAt(this.index))||r.Character.isDecimalDigit(this.source.charCodeAt(this.index)))&&this.throwUnexpectedToken(),{type:6,value:parseInt(n,8),octal:i,lineNumber:this.lineNumber,lineStart:this.lineStart,start:t,end:this.index}},e.prototype.isImplicitOctalLiteral=function(){for(var e=this.index+1;e<this.length;++e){var t=this.source[e];if("8"===t||"9"===t)return!1;if(!r.Character.isOctalDigit(t.charCodeAt(0)))return!0}return!0},e.prototype.scanNumericLiteral=function(){var e=this.index,t=this.source[e];i.assert(r.Character.isDecimalDigit(t.charCodeAt(0))||"."===t,"Numeric literal must start with a decimal digit or a decimal point");var n="";if("."!==t){if(n=this.source[this.index++],t=this.source[this.index],"0"===n){if("x"===t||"X"===t)return++this.index,this.scanHexLiteral(e);if("b"===t||"B"===t)return++this.index,this.scanBinaryLiteral(e);if("o"===t||"O"===t)return this.scanOctalLiteral(t,e);if(t&&r.Character.isOctalDigit(t.charCodeAt(0))&&this.isImplicitOctalLiteral())return this.scanOctalLiteral(t,e)}for(;r.Character.isDecimalDigit(this.source.charCodeAt(this.index));)n+=this.source[this.index++];t=this.source[this.index]}if("."===t){for(n+=this.source[this.index++];r.Character.isDecimalDigit(this.source.charCodeAt(this.index));)n+=this.source[this.index++];t=this.source[this.index]}if("e"===t||"E"===t)if(n+=this.source[this.index++],"+"!==(t=this.source[this.index])&&"-"!==t||(n+=this.source[this.index++]),r.Character.isDecimalDigit(this.source.charCodeAt(this.index)))for(;r.Character.isDecimalDigit(this.source.charCodeAt(this.index));)n+=this.source[this.index++];else this.throwUnexpectedToken();return r.Character.isIdentifierStart(this.source.charCodeAt(this.index))&&this.throwUnexpectedToken(),{type:6,value:parseFloat(n),lineNumber:this.lineNumber,lineStart:this.lineStart,start:e,end:this.index}},e.prototype.scanStringLiteral=function(){var e=this.index,t=this.source[e];i.assert("'"===t||'"'===t,"String literal must starts with a quote"),++this.index;for(var n=!1,o="";!this.eof();){var s=this.source[this.index++];if(s===t){t="";break}if("\\"===s)if((s=this.source[this.index++])&&r.Character.isLineTerminator(s.charCodeAt(0)))++this.lineNumber,"\r"===s&&"\n"===this.source[this.index]&&++this.index,this.lineStart=this.index;else switch(s){case"u":if("{"===this.source[this.index])++this.index,o+=this.scanUnicodeCodePointEscape();else{var u=this.scanHexEscape(s);null===u&&this.throwUnexpectedToken(),o+=u}break;case"x":var l=this.scanHexEscape(s);null===l&&this.throwUnexpectedToken(a.Messages.InvalidHexEscapeSequence),o+=l;break;case"n":o+="\n";break;case"r":o+="\r";break;case"t":o+="\t";break;case"b":o+="\b";break;case"f":o+="\f";break;case"v":o+="\v";break;case"8":case"9":o+=s,this.tolerateUnexpectedToken();break;default:if(s&&r.Character.isOctalDigit(s.charCodeAt(0))){var c=this.octalToDecimal(s);n=c.octal||n,o+=String.fromCharCode(c.code)}else o+=s}else{if(r.Character.isLineTerminator(s.charCodeAt(0)))break;o+=s}}return""!==t&&(this.index=e,this.throwUnexpectedToken()),{type:8,value:o,octal:n,lineNumber:this.lineNumber,lineStart:this.lineStart,start:e,end:this.index}},e.prototype.scanTemplate=function(){var e="",t=!1,n=this.index,i="`"===this.source[n],o=!1,s=2;for(++this.index;!this.eof();){var u=this.source[this.index++];if("`"===u){s=1,o=!0,t=!0;break}if("$"===u){if("{"===this.source[this.index]){this.curlyStack.push("${"),++this.index,t=!0;break}e+=u}else if("\\"===u)if(u=this.source[this.index++],r.Character.isLineTerminator(u.charCodeAt(0)))++this.lineNumber,"\r"===u&&"\n"===this.source[this.index]&&++this.index,this.lineStart=this.index;else switch(u){case"n":e+="\n";break;case"r":e+="\r";break;case"t":e+="\t";break;case"u":if("{"===this.source[this.index])++this.index,e+=this.scanUnicodeCodePointEscape();else{var l=this.index,c=this.scanHexEscape(u);null!==c?e+=c:(this.index=l,e+=u)}break;case"x":var h=this.scanHexEscape(u);null===h&&this.throwUnexpectedToken(a.Messages.InvalidHexEscapeSequence),e+=h;break;case"b":e+="\b";break;case"f":e+="\f";break;case"v":e+="\v";break;default:"0"===u?(r.Character.isDecimalDigit(this.source.charCodeAt(this.index))&&this.throwUnexpectedToken(a.Messages.TemplateOctalLiteral),e+="\0"):r.Character.isOctalDigit(u.charCodeAt(0))?this.throwUnexpectedToken(a.Messages.TemplateOctalLiteral):e+=u}else r.Character.isLineTerminator(u.charCodeAt(0))?(++this.lineNumber,"\r"===u&&"\n"===this.source[this.index]&&++this.index,this.lineStart=this.index,e+="\n"):e+=u}return t||this.throwUnexpectedToken(),i||this.curlyStack.pop(),{type:10,value:this.source.slice(n+1,this.index-s),cooked:e,head:i,tail:o,lineNumber:this.lineNumber,lineStart:this.lineStart,start:n,end:this.index}},e.prototype.testRegExp=function(e,t){var n=e,i=this;t.indexOf("u")>=0&&(n=n.replace(/\\u\{([0-9a-fA-F]+)\}|\\u([a-fA-F0-9]{4})/g,function(e,t,n){var r=parseInt(t||n,16);return r>1114111&&i.throwUnexpectedToken(a.Messages.InvalidRegExp),r<=65535?String.fromCharCode(r):"\ufffd"}).replace(/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,"\ufffd"));try{RegExp(n)}catch(e){this.throwUnexpectedToken(a.Messages.InvalidRegExp)}try{return new RegExp(e,t)}catch(e){return null}},e.prototype.scanRegExpBody=function(){var e=this.source[this.index];i.assert("/"===e,"Regular expression literal must start with a slash");for(var t=this.source[this.index++],n=!1,o=!1;!this.eof();)if(t+=e=this.source[this.index++],"\\"===e)e=this.source[this.index++],r.Character.isLineTerminator(e.charCodeAt(0))&&this.throwUnexpectedToken(a.Messages.UnterminatedRegExp),t+=e;else if(r.Character.isLineTerminator(e.charCodeAt(0)))this.throwUnexpectedToken(a.Messages.UnterminatedRegExp);else if(n)"]"===e&&(n=!1);else{if("/"===e){o=!0;break}"["===e&&(n=!0)}return o||this.throwUnexpectedToken(a.Messages.UnterminatedRegExp),t.substr(1,t.length-2)},e.prototype.scanRegExpFlags=function(){for(var e="";!this.eof();){var t=this.source[this.index];if(!r.Character.isIdentifierPart(t.charCodeAt(0)))break;if(++this.index,"\\"!==t||this.eof())e+=t;else if("u"===(t=this.source[this.index])){++this.index;var n=this.index,i=this.scanHexEscape("u");if(null!==i)for(e+=i;n<this.index;++n)this.source[n];else this.index=n,e+="u";this.tolerateUnexpectedToken()}else this.tolerateUnexpectedToken()}return e},e.prototype.scanRegExp=function(){var e=this.index,t=this.scanRegExpBody(),n=this.scanRegExpFlags();return{type:9,value:"",pattern:t,flags:n,regex:this.testRegExp(t,n),lineNumber:this.lineNumber,lineStart:this.lineStart,start:e,end:this.index}},e.prototype.lex=function(){if(this.eof())return{type:2,value:"",lineNumber:this.lineNumber,lineStart:this.lineStart,start:this.index,end:this.index};var e=this.source.charCodeAt(this.index);return r.Character.isIdentifierStart(e)?this.scanIdentifier():40===e||41===e||59===e?this.scanPunctuator():39===e||34===e?this.scanStringLiteral():46===e?r.Character.isDecimalDigit(this.source.charCodeAt(this.index+1))?this.scanNumericLiteral():this.scanPunctuator():r.Character.isDecimalDigit(e)?this.scanNumericLiteral():96===e||125===e&&"${"===this.curlyStack[this.curlyStack.length-1]?this.scanTemplate():e>=55296&&e<57343&&r.Character.isIdentifierStart(this.codePointAt(this.index))?this.scanIdentifier():this.scanPunctuator()},e}();t.Scanner=u},function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.TokenName={},t.TokenName[1]="Boolean",t.TokenName[2]="<end>",t.TokenName[3]="Identifier",t.TokenName[4]="Keyword",t.TokenName[5]="Null",t.TokenName[6]="Numeric",t.TokenName[7]="Punctuator",t.TokenName[8]="String",t.TokenName[9]="RegularExpression",t.TokenName[10]="Template"},function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.XHTMLEntities={quot:'"',amp:"&",apos:"'",gt:">",nbsp:" ",iexcl:"¡",cent:"¢",pound:"£",curren:"¤",yen:"¥",brvbar:"¦",sect:"§",uml:"¨",copy:"©",ordf:"ª",laquo:"«",not:"¬",shy:"",reg:"®",macr:"¯",deg:"°",plusmn:"±",sup2:"²",sup3:"³",acute:"´",micro:"µ",para:"¶",middot:"·",cedil:"¸",sup1:"¹",ordm:"º",raquo:"»",frac14:"¼",frac12:"½",frac34:"¾",iquest:"¿",Agrave:"À",Aacute:"Á",Acirc:"Â",Atilde:"Ã",Auml:"Ä",Aring:"Å",AElig:"Æ",Ccedil:"Ç",Egrave:"È",Eacute:"É",Ecirc:"Ê",Euml:"Ë",Igrave:"Ì",Iacute:"Í",Icirc:"Î",Iuml:"Ï",ETH:"Ð",Ntilde:"Ñ",Ograve:"Ò",Oacute:"Ó",Ocirc:"Ô",Otilde:"Õ",Ouml:"Ö",times:"×",Oslash:"Ø",Ugrave:"Ù",Uacute:"Ú",Ucirc:"Û",Uuml:"Ü",Yacute:"Ý",THORN:"Þ",szlig:"ß",agrave:"à",aacute:"á",acirc:"â",atilde:"ã",auml:"ä",aring:"å",aelig:"æ",ccedil:"ç",egrave:"è",eacute:"é",ecirc:"ê",euml:"ë",igrave:"ì",iacute:"í",icirc:"î",iuml:"ï",eth:"ð",ntilde:"ñ",ograve:"ò",oacute:"ó",ocirc:"ô",otilde:"õ",ouml:"ö",divide:"÷",oslash:"ø",ugrave:"ù",uacute:"ú",ucirc:"û",uuml:"ü",yacute:"ý",thorn:"þ",yuml:"ÿ",OElig:"Œ",oelig:"œ",Scaron:"Š",scaron:"š",Yuml:"Ÿ",fnof:"ƒ",circ:"ˆ",tilde:"˜",Alpha:"Α",Beta:"Β",Gamma:"Γ",Delta:"Δ",Epsilon:"Ε",Zeta:"Ζ",Eta:"Η",Theta:"Θ",Iota:"Ι",Kappa:"Κ",Lambda:"Λ",Mu:"Μ",Nu:"Ν",Xi:"Ξ",Omicron:"Ο",Pi:"Π",Rho:"Ρ",Sigma:"Σ",Tau:"Τ",Upsilon:"Υ",Phi:"Φ",Chi:"Χ",Psi:"Ψ",Omega:"Ω",alpha:"α",beta:"β",gamma:"γ",delta:"δ",epsilon:"ε",zeta:"ζ",eta:"η",theta:"θ",iota:"ι",kappa:"κ",lambda:"λ",mu:"μ",nu:"ν",xi:"ξ",omicron:"ο",pi:"π",rho:"ρ",sigmaf:"ς",sigma:"σ",tau:"τ",upsilon:"υ",phi:"φ",chi:"χ",psi:"ψ",omega:"ω",thetasym:"ϑ",upsih:"ϒ",piv:"ϖ",ensp:" ",emsp:" ",thinsp:" ",zwnj:"",zwj:"",lrm:"",rlm:"",ndash:"–",mdash:"—",lsquo:"‘",rsquo:"’",sbquo:"‚",ldquo:"“",rdquo:"”",bdquo:"„",dagger:"†",Dagger:"‡",bull:"•",hellip:"…",permil:"‰",prime:"′",Prime:"″",lsaquo:"‹",rsaquo:"›",oline:"‾",frasl:"⁄",euro:"€",image:"ℑ",weierp:"℘",real:"ℜ",trade:"™",alefsym:"ℵ",larr:"←",uarr:"↑",rarr:"→",darr:"↓",harr:"↔",crarr:"↵",lArr:"⇐",uArr:"⇑",rArr:"⇒",dArr:"⇓",hArr:"⇔",forall:"∀",part:"∂",exist:"∃",empty:"∅",nabla:"∇",isin:"∈",notin:"∉",ni:"∋",prod:"∏",sum:"∑",minus:"−",lowast:"∗",radic:"√",prop:"∝",infin:"∞",ang:"∠",and:"∧",or:"∨",cap:"∩",cup:"∪",int:"∫",there4:"∴",sim:"∼",cong:"≅",asymp:"≈",ne:"≠",equiv:"≡",le:"≤",ge:"≥",sub:"⊂",sup:"⊃",nsub:"⊄",sube:"⊆",supe:"⊇",oplus:"⊕",otimes:"⊗",perp:"⊥",sdot:"⋅",lceil:"⌈",rceil:"⌉",lfloor:"⌊",rfloor:"⌋",loz:"◊",spades:"♠",clubs:"♣",hearts:"♥",diams:"♦",lang:"⟨",rang:"⟩"}},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var i=n(10),r=n(12),a=n(13),o=function(){function e(){this.values=[],this.curly=this.paren=-1}return e.prototype.beforeFunctionExpression=function(e){return["(","{","[","in","typeof","instanceof","new","return","case","delete","throw","void","=","+=","-=","*=","**=","/=","%=","<<=",">>=",">>>=","&=","|=","^=",",","+","-","*","**","/","%","++","--","<<",">>",">>>","&","|","^","!","~","&&","||","?",":","===","==",">=","<=","<",">","!=","!=="].indexOf(e)>=0},e.prototype.isRegexStart=function(){var e=this.values[this.values.length-1],t=null!==e;switch(e){case"this":case"]":t=!1;break;case")":var n=this.values[this.paren-1];t="if"===n||"while"===n||"for"===n||"with"===n;break;case"}":if(t=!1,"function"===this.values[this.curly-3])t=!!(i=this.values[this.curly-4])&&!this.beforeFunctionExpression(i);else if("function"===this.values[this.curly-4]){var i;t=!(i=this.values[this.curly-5])||!this.beforeFunctionExpression(i)}}return t},e.prototype.push=function(e){7===e.type||4===e.type?("{"===e.value?this.curly=this.values.length:"("===e.value&&(this.paren=this.values.length),this.values.push(e.value)):this.values.push(null)},e}(),s=function(){function e(e,t){this.errorHandler=new i.ErrorHandler,this.errorHandler.tolerant=!!t&&"boolean"==typeof t.tolerant&&t.tolerant,this.scanner=new r.Scanner(e,this.errorHandler),this.scanner.trackComment=!!t&&"boolean"==typeof t.comment&&t.comment,this.trackRange=!!t&&"boolean"==typeof t.range&&t.range,this.trackLoc=!!t&&"boolean"==typeof t.loc&&t.loc,this.buffer=[],this.reader=new o}return e.prototype.errors=function(){return this.errorHandler.errors},e.prototype.getNextToken=function(){if(0===this.buffer.length){var e=this.scanner.scanComments();if(this.scanner.trackComment)for(var t=0;t<e.length;++t){var n=e[t],i=this.scanner.source.slice(n.slice[0],n.slice[1]),r={type:n.multiLine?"BlockComment":"LineComment",value:i};this.trackRange&&(r.range=n.range),this.trackLoc&&(r.loc=n.loc),this.buffer.push(r)}if(!this.scanner.eof()){var o=void 0;this.trackLoc&&(o={start:{line:this.scanner.lineNumber,column:this.scanner.index-this.scanner.lineStart},end:{}});var s="/"===this.scanner.source[this.scanner.index]&&this.reader.isRegexStart()?this.scanner.scanRegExp():this.scanner.lex();this.reader.push(s);var u={type:a.TokenName[s.type],value:this.scanner.source.slice(s.start,s.end)};if(this.trackRange&&(u.range=[s.start,s.end]),this.trackLoc&&(o.end={line:this.scanner.lineNumber,column:this.scanner.index-this.scanner.lineStart},u.loc=o),9===s.type){var l=s.pattern,c=s.flags;u.regex={pattern:l,flags:c}}this.buffer.push(u)}}return this.buffer.shift()},e}();t.Tokenizer=s}])},wu.exports=Du()),wu.exports),Tu=e(Cu),Pu={};var Fu=(Au||(Au=1,function e(t){var n,i,r,a,o,s;function u(e){var t,n,i={};for(t in e)e.hasOwnProperty(t)&&("object"===T(n=e[t])&&null!==n?i[t]=u(n):i[t]=n);return i}function l(e,t){this.parent=e,this.key=t}function c(e,t,n,i){this.node=e,this.path=t,this.wrap=n,this.ref=i}function h(){}function d(e){return null!=e&&"object"===T(e)&&"string"==typeof e.type}function p(e,t){return(e===n.ObjectExpression||e===n.ObjectPattern)&&"properties"===t}function f(e,t){for(var n=e.length-1;n>=0;--n)if(e[n].node===t)return!0;return!1}function m(e,t){return(new h).traverse(e,t)}function g(e,t){var n;return n=function(e,t){var n,i,r,a;for(i=e.length,r=0;i;)t(e[a=r+(n=i>>>1)])?i=n:(r=a+1,i-=n+1);return r}(t,function(t){return t.range[0]>e.range[0]}),e.extendedRange=[e.range[0],e.range[1]],n!==t.length&&(e.extendedRange[1]=t[n].range[0]),(n-=1)>=0&&(e.extendedRange[0]=t[n].range[1]),e}return n={AssignmentExpression:"AssignmentExpression",AssignmentPattern:"AssignmentPattern",ArrayExpression:"ArrayExpression",ArrayPattern:"ArrayPattern",ArrowFunctionExpression:"ArrowFunctionExpression",AwaitExpression:"AwaitExpression",BlockStatement:"BlockStatement",BinaryExpression:"BinaryExpression",BreakStatement:"BreakStatement",CallExpression:"CallExpression",CatchClause:"CatchClause",ChainExpression:"ChainExpression",ClassBody:"ClassBody",ClassDeclaration:"ClassDeclaration",ClassExpression:"ClassExpression",ComprehensionBlock:"ComprehensionBlock",ComprehensionExpression:"ComprehensionExpression",ConditionalExpression:"ConditionalExpression",ContinueStatement:"ContinueStatement",DebuggerStatement:"DebuggerStatement",DirectiveStatement:"DirectiveStatement",DoWhileStatement:"DoWhileStatement",EmptyStatement:"EmptyStatement",ExportAllDeclaration:"ExportAllDeclaration",ExportDefaultDeclaration:"ExportDefaultDeclaration",ExportNamedDeclaration:"ExportNamedDeclaration",ExportSpecifier:"ExportSpecifier",ExpressionStatement:"ExpressionStatement",ForStatement:"ForStatement",ForInStatement:"ForInStatement",ForOfStatement:"ForOfStatement",FunctionDeclaration:"FunctionDeclaration",FunctionExpression:"FunctionExpression",GeneratorExpression:"GeneratorExpression",Identifier:"Identifier",IfStatement:"IfStatement",ImportExpression:"ImportExpression",ImportDeclaration:"ImportDeclaration",ImportDefaultSpecifier:"ImportDefaultSpecifier",ImportNamespaceSpecifier:"ImportNamespaceSpecifier",ImportSpecifier:"ImportSpecifier",Literal:"Literal",LabeledStatement:"LabeledStatement",LogicalExpression:"LogicalExpression",MemberExpression:"MemberExpression",MetaProperty:"MetaProperty",MethodDefinition:"MethodDefinition",ModuleSpecifier:"ModuleSpecifier",NewExpression:"NewExpression",ObjectExpression:"ObjectExpression",ObjectPattern:"ObjectPattern",PrivateIdentifier:"PrivateIdentifier",Program:"Program",Property:"Property",PropertyDefinition:"PropertyDefinition",RestElement:"RestElement",ReturnStatement:"ReturnStatement",SequenceExpression:"SequenceExpression",SpreadElement:"SpreadElement",Super:"Super",SwitchStatement:"SwitchStatement",SwitchCase:"SwitchCase",TaggedTemplateExpression:"TaggedTemplateExpression",TemplateElement:"TemplateElement",TemplateLiteral:"TemplateLiteral",ThisExpression:"ThisExpression",ThrowStatement:"ThrowStatement",TryStatement:"TryStatement",UnaryExpression:"UnaryExpression",UpdateExpression:"UpdateExpression",VariableDeclaration:"VariableDeclaration",VariableDeclarator:"VariableDeclarator",WhileStatement:"WhileStatement",WithStatement:"WithStatement",YieldExpression:"YieldExpression"},r={AssignmentExpression:["left","right"],AssignmentPattern:["left","right"],ArrayExpression:["elements"],ArrayPattern:["elements"],ArrowFunctionExpression:["params","body"],AwaitExpression:["argument"],BlockStatement:["body"],BinaryExpression:["left","right"],BreakStatement:["label"],CallExpression:["callee","arguments"],CatchClause:["param","body"],ChainExpression:["expression"],ClassBody:["body"],ClassDeclaration:["id","superClass","body"],ClassExpression:["id","superClass","body"],ComprehensionBlock:["left","right"],ComprehensionExpression:["blocks","filter","body"],ConditionalExpression:["test","consequent","alternate"],ContinueStatement:["label"],DebuggerStatement:[],DirectiveStatement:[],DoWhileStatement:["body","test"],EmptyStatement:[],ExportAllDeclaration:["source"],ExportDefaultDeclaration:["declaration"],ExportNamedDeclaration:["declaration","specifiers","source"],ExportSpecifier:["exported","local"],ExpressionStatement:["expression"],ForStatement:["init","test","update","body"],ForInStatement:["left","right","body"],ForOfStatement:["left","right","body"],FunctionDeclaration:["id","params","body"],FunctionExpression:["id","params","body"],GeneratorExpression:["blocks","filter","body"],Identifier:[],IfStatement:["test","consequent","alternate"],ImportExpression:["source"],ImportDeclaration:["specifiers","source"],ImportDefaultSpecifier:["local"],ImportNamespaceSpecifier:["local"],ImportSpecifier:["imported","local"],Literal:[],LabeledStatement:["label","body"],LogicalExpression:["left","right"],MemberExpression:["object","property"],MetaProperty:["meta","property"],MethodDefinition:["key","value"],ModuleSpecifier:[],NewExpression:["callee","arguments"],ObjectExpression:["properties"],ObjectPattern:["properties"],PrivateIdentifier:[],Program:["body"],Property:["key","value"],PropertyDefinition:["key","value"],RestElement:["argument"],ReturnStatement:["argument"],SequenceExpression:["expressions"],SpreadElement:["argument"],Super:[],SwitchStatement:["discriminant","cases"],SwitchCase:["test","consequent"],TaggedTemplateExpression:["tag","quasi"],TemplateElement:[],TemplateLiteral:["quasis","expressions"],ThisExpression:[],ThrowStatement:["argument"],TryStatement:["block","handler","finalizer"],UnaryExpression:["argument"],UpdateExpression:["argument"],VariableDeclaration:["declarations"],VariableDeclarator:["id","init"],WhileStatement:["test","body"],WithStatement:["object","body"],YieldExpression:["argument"]},i={Break:a={},Skip:o={},Remove:s={}},l.prototype.replace=function(e){this.parent[this.key]=e},l.prototype.remove=function(){return Array.isArray(this.parent)?(this.parent.splice(this.key,1),!0):(this.replace(null),!1)},h.prototype.path=function(){var e,t,n,i,r;function a(e,t){if(Array.isArray(t))for(n=0,i=t.length;n<i;++n)e.push(t[n]);else e.push(t)}if(!this.__current.path)return null;for(r=[],e=2,t=this.__leavelist.length;e<t;++e)a(r,this.__leavelist[e].path);return a(r,this.__current.path),r},h.prototype.type=function(){return this.current().type||this.__current.wrap},h.prototype.parents=function(){var e,t,n;for(n=[],e=1,t=this.__leavelist.length;e<t;++e)n.push(this.__leavelist[e].node);return n},h.prototype.current=function(){return this.__current.node},h.prototype.__execute=function(e,t){var n,i;return i=void 0,n=this.__current,this.__current=t,this.__state=null,e&&(i=e.call(this,t.node,this.__leavelist[this.__leavelist.length-1].node)),this.__current=n,i},h.prototype.notify=function(e){this.__state=e},h.prototype.skip=function(){this.notify(o)},h.prototype.break=function(){this.notify(a)},h.prototype.remove=function(){this.notify(s)},h.prototype.__initialize=function(e,t){this.visitor=t,this.root=e,this.__worklist=[],this.__leavelist=[],this.__current=null,this.__state=null,this.__fallback=null,"iteration"===t.fallback?this.__fallback=Object.keys:"function"==typeof t.fallback&&(this.__fallback=t.fallback),this.__keys=r,t.keys&&(this.__keys=Object.assign(Object.create(this.__keys),t.keys))},h.prototype.traverse=function(e,t){var n,i,r,s,u,l,h,m,g,v,y,b;for(this.__initialize(e,t),b={},n=this.__worklist,i=this.__leavelist,n.push(new c(e,null,null,null)),i.push(new c(null,null,null,null));n.length;)if((r=n.pop())!==b){if(r.node){if(l=this.__execute(t.enter,r),this.__state===a||l===a)return;if(n.push(b),i.push(r),this.__state===o||l===o)continue;if(u=(s=r.node).type||r.wrap,!(v=this.__keys[u])){if(!this.__fallback)throw new Error("Unknown node type "+u+".");v=this.__fallback(s)}for(m=v.length;(m-=1)>=0;)if(y=s[h=v[m]])if(Array.isArray(y)){for(g=y.length;(g-=1)>=0;)if(y[g]&&!f(i,y[g])){if(p(u,v[m]))r=new c(y[g],[h,g],"Property",null);else{if(!d(y[g]))continue;r=new c(y[g],[h,g],null,null)}n.push(r)}}else if(d(y)){if(f(i,y))continue;n.push(new c(y,h,null,null))}}}else if(r=i.pop(),l=this.__execute(t.leave,r),this.__state===a||l===a)return},h.prototype.replace=function(e,t){var n,i,r,u,h,f,m,g,v,y,b,x,S;function E(e){var t,i,r,a;if(e.ref.remove())for(i=e.ref.key,a=e.ref.parent,t=n.length;t--;)if((r=n[t]).ref&&r.ref.parent===a){if(r.ref.key<i)break;--r.ref.key}}for(this.__initialize(e,t),b={},n=this.__worklist,i=this.__leavelist,f=new c(e,null,null,new l(x={root:e},"root")),n.push(f),i.push(f);n.length;)if((f=n.pop())!==b){if(void 0!==(h=this.__execute(t.enter,f))&&h!==a&&h!==o&&h!==s&&(f.ref.replace(h),f.node=h),this.__state!==s&&h!==s||(E(f),f.node=null),this.__state===a||h===a)return x.root;if((r=f.node)&&(n.push(b),i.push(f),this.__state!==o&&h!==o)){if(u=r.type||f.wrap,!(v=this.__keys[u])){if(!this.__fallback)throw new Error("Unknown node type "+u+".");v=this.__fallback(r)}for(m=v.length;(m-=1)>=0;)if(y=r[S=v[m]])if(Array.isArray(y)){for(g=y.length;(g-=1)>=0;)if(y[g]){if(p(u,v[m]))f=new c(y[g],[S,g],"Property",new l(y,g));else{if(!d(y[g]))continue;f=new c(y[g],[S,g],null,new l(y,g))}n.push(f)}}else d(y)&&n.push(new c(y,S,null,new l(r,S)))}}else if(f=i.pop(),void 0!==(h=this.__execute(t.leave,f))&&h!==a&&h!==o&&h!==s&&f.ref.replace(h),this.__state!==s&&h!==s||E(f),this.__state===a||h===a)return x.root;return x.root},t.Syntax=n,t.traverse=m,t.replace=function(e,t){return(new h).replace(e,t)},t.attachComments=function(e,t,n){var r,a,o,s,l=[];if(!e.range)throw new Error("attachComments needs range information");if(!n.length){if(t.length){for(o=0,a=t.length;o<a;o+=1)(r=u(t[o])).extendedRange=[0,e.range[0]],l.push(r);e.leadingComments=l}return e}for(o=0,a=t.length;o<a;o+=1)l.push(g(u(t[o]),n));return s=0,m(e,{enter:function(e){for(var t;s<l.length&&!((t=l[s]).extendedRange[1]>e.range[0]);)t.extendedRange[1]===e.range[0]?(e.leadingComments||(e.leadingComments=[]),e.leadingComments.push(t),l.splice(s,1)):s+=1;return s===l.length?i.Break:l[s].extendedRange[0]>e.range[1]?i.Skip:void 0}}),s=0,m(e,{leave:function(e){for(var t;s<l.length&&(t=l[s],!(e.range[1]<t.extendedRange[0]));)e.range[1]===t.extendedRange[0]?(e.trailingComments||(e.trailingComments=[]),e.trailingComments.push(t),l.splice(s,1)):s+=1;return s===l.length?i.Break:l[s].extendedRange[0]>e.range[1]?i.Skip:void 0}}),e},t.VisitorKeys=r,t.VisitorOption=i,t.Controller=h,t.cloneEnvironment=function(){return e({})},t}(Pu)),Pu),Bu=e(Fu);var Iu=new WeakMap,Lu=!1,Ou=null,Ru=null,Nu=0;function Mu(e,t){try{return{ok:!0,value:e[t]}}catch(e){return{ok:!1,value:void 0}}}function _u(e,t){try{return e[t]()}catch(e){return null}}function Uu(e,t){var n="YtlrPlayerActionsContainer",i=0,r=new WeakSet;return function a(o,s,u,l,c){if(!o||s>8||i>e)return null;if("object"===T(o)||"function"==typeof o){if(r.has(o))return null;r.add(o)}if("function"==typeof o){if(function(r){if(i>e||"function"!=typeof r)return!1;i+=1;var a=Iu.get(r);if(void 0===a){a=0;try{var o=r.toString();o.includes("TRANSPORT_CONTROLS_BUTTON_TYPE_FEATURED_ACTION")&&(a|=1),o.includes(n)&&(a|=2)}catch(e){}Iu.set(r,a)}return!(!(1&a)||t&&!(2&a))}(o)){var h=(m=l,g=o,v=c,(p=u)&&void 0!==m&&"function"==typeof g?{host:p,key:m,fn:g,write:function(e){try{return v?(p.set(m,e),p.get(m)===e):(p[m]=e,p[m]===e)}catch(e){return!1}}}:null);if(h)return h}var d=o.prototype;return d&&"object"===T(d)?a(d,s+1,null,void 0,!1):null}var p,m,g,v;if("object"!==T(o))return null;if(o instanceof Map){var y=_u(o,"entries");if(y){var b,x=f(y);try{for(x.s();!(b=x.n()).done;){var S=D(b.value,2),E=S[0],k=S[1];if(i>e)return null;var w=a(k,s+1,o,E,!0);if(w)return w}}catch(e){x.e(e)}finally{x.f()}}return null}if(o instanceof Set){var A=_u(o,"values");if(A){var C,P=f(A);try{for(P.s();!(C=P.n()).done;){var F=C.value;if(i>e)return null;var B=a(F,s+1,null,void 0,!1);if(B)return B}}catch(e){P.e(e)}finally{P.f()}}return null}var I=Mu(o,n);if(I.ok&&void 0!==I.value){var L=a(I.value,s+1,o,n,!1);if(L)return L}for(var O=0,R=Object.keys(o);O<R.length;O++){var N=R[O];if(i>e)return null;if(N!==n){var M=Mu(o,N);if(M.ok){var _=a(M.value,s+1,o,N,!1);if(_)return _}}}return null}(window._yttv,0,null,void 0,!1)}function ju(){if(Lu||!Se("enablePatchingVideoPlayer"))return!1;if(!window._yttv||!document.querySelector(".html5-video-player")&&!document.querySelector("ytlr-player"))return!1;var e=Ou&&"function"==typeof Ou.fn?Ou:Ou=Uu(2e4,!0)||Uu(2e4,!1);if(!e||"function"!=typeof e.write)return!1;try{var t=function(){var e=Array.prototype.slice.call(arguments);null===i&&(i=n.toString(),r=/^class\s/.test(i));var o,s=r;function u(e,i){return"undefined"!=typeof Reflect&&"function"==typeof Reflect.construct?Reflect.construct(e,i,t):function(e,t,n){if(y())return Reflect.construct.apply(null,arguments);var i=[null];i.push.apply(i,t);var r=new(e.bind.apply(e,i));return n&&w(r,n.prototype),r}(n,A(i))}if(!(this instanceof t))return s?u(n,e):n.apply(this,e);s?o=u(n,e):(n.apply(this,e),o=this);try{var l,c,h,d,p=a||(a=function(e){var t,n=e,i=0;try{t=Tu.parse(e,{range:!0,tolerant:!0,sourceType:"script"})}catch(n){try{var r="("+e+")";t=Tu.parse(r,{range:!0,tolerant:!0,sourceType:"script"}),i=1}catch(r){try{t=Tu.parse(e,{range:!0,tolerant:!0,sourceType:"module"})}catch(r){try{var a="("+e+")";t=Tu.parse(a,{range:!0,tolerant:!0,sourceType:"module"}),i=1}catch(e){throw n}}}}var o=[];return Bu.traverse(t,{enter:function(e){if("AssignmentExpression"===e.type){var t=e.right;if(t&&t.range){var r=n.slice(t.range[0]-i,t.range[1]-i),a=null;if("CallExpression"===t.type&&t.callee&&"FunctionExpression"===t.callee.type&&t.callee.body)for(var s=t.callee.body.body||[],u=0;u<s.length;u++){var l=s[u];if("ReturnStatement"===l.type&&l.argument&&l.argument.range){a=n.slice(l.argument.range[0]-i,l.argument.range[1]-i);break}}else"FunctionExpression"!==t.type&&"ArrowFunctionExpression"!==t.type||(a=r);o.push({left:e.left&&e.left.range?n.slice(e.left.range[0]-i,e.left.range[1]-i):null,rhs:r,returned:a})}}}}),o}(i)),f={type:"TRANSPORT_CONTROLS_BUTTON_TYPE_PIP",button:{buttonRenderer:pn(!1,Se("enableSwapMPWithPIP")?Lt("player.pictureInPicture"):Lt("player.miniPlayer"),"CLEAR_COOKIES",{customAction:{action:Se("enableSwapMPWithPIP")?"ENTER_PIP":"ENTER_MP"}})}},m=null===(l=p.find(function(e){return e.rhs.includes("TRANSPORT_CONTROLS_BUTTON_TYPE_PLAYBACK_SETTINGS")}))||void 0===l||null===(l=l.left)||void 0===l?void 0:l.split(".")[1];if(m&&Se("enableMPButton")){var g=o[m];"function"==typeof g&&(o[m]=function(){var e=g.apply(this,arguments);if(Array.isArray(e)&&!e.find(function(e){return"TRANSPORT_CONTROLS_BUTTON_TYPE_PIP"===e.type})){var t=e.findIndex(function(e){return"TRANSPORT_CONTROLS_BUTTON_TYPE_PLAYBACK_SETTINGS"===e.type});-1!==t&&e.splice(t,0,f)}return e})}var v=null===(c=p.find(function(e){return!!e.rhs.includes("skipNextButton")&&e.rhs.indexOf("skipPreviousButton")>e.rhs.indexOf("skipNextButton")}))||void 0===c||null===(c=c.left)||void 0===c?void 0:c.split(".")[1],b=null===(h=p.find(function(e){return!!e.rhs.includes("skipPreviousButton")&&e.rhs.indexOf("skipNextButton")>e.rhs.indexOf("skipPreviousButton")}))||void 0===h||null===(h=h.left)||void 0===h?void 0:h.split(".")[1],x=null===(d=p.find(function(e){return e.rhs.includes("props.data.engagementActions")}))||void 0===d||null===(d=d.left)||void 0===d?void 0:d.split(".")[1];if(x&&Se("enableSpeedControlsButton")){var S=o[x];"function"==typeof S&&(o[x]=function(){var e=S.apply(this,arguments);return Array.isArray(e)&&!e.find(function(e){return"TRANSPORT_CONTROLS_BUTTON_TYPE_SPEED"===e.type})&&e.push({type:"TRANSPORT_CONTROLS_BUTTON_TYPE_SPEED",button:{buttonRenderer:pn(!1,Lt("player.speedControls"),"SLOW_MOTION_VIDEO",{customAction:{action:"AXO_SPEED_SETTINGS_SHOW"}})}}),e})}if(!Se("enableSuperThanksButton")&&x){var E=o[x];"function"==typeof E&&(o[x]=function(){var e=E.apply(this,arguments);return Array.isArray(e)?e.filter(function(e){return"TRANSPORT_CONTROLS_BUTTON_TYPE_SUPER_THANKS"!==e.type&&"TRANSPORT_CONTROLS_BUTTON_TYPE_SHOPPING"!==e.type}):e})}Se("enablePreviousNextButtons")&&v&&b&&(o[v]=function(){return pn(!1,Lt("player.previous"),"SKIP_PREVIOUS",{signalAction:{signal:"PLAYER_PLAY_PREVIOUS"}})},o[b]=function(){return pn(!1,Lt("player.next"),"SKIP_NEXT",{signalAction:{signal:"PLAYER_PLAY_NEXT"}})})}catch(e){console.warn("[AxoTube:customUI] Custom UI patching failed:",e)}return o},n=e.fn,i=null,r=!1,a=null;return t.prototype=n.prototype,e.write(t)?(e.fn=t,Lu=!0,!0):(Ou=null,!1)}catch(e){return console.error("[AxoTube:customUI] Custom UI apply failed:",e),Ou=null,!1}}function Hu(e){!Lu&&Se("enablePatchingVideoPlayer")&&(e&&(Nu=0),Ru||(Ru=setTimeout(function(){Ru=null,Nu+=1,ju()||Nu<10&&Hu(!1)},500)))}function zu(){ju()||Hu(!0)}"complete"===document.readyState||"interactive"===document.readyState?zu():window.addEventListener("DOMContentLoaded",zu),ke.addEventListener("configChange",function(e){var t;"enablePatchingVideoPlayer"===(null===(t=e.detail)||void 0===t?void 0:t.key)&&e.detail.value&&(Ou=null,Hu(!0))});var Vu=null,Ku=null,Gu=!1,Wu=null,Ju=null;function Xu(){return-1!==window.location.href.indexOf("watch")}function qu(){return se()&&se().SetFrameRate}function Yu(){if(Gu){var e=qu();if(e)try{e.call(se(),0),Gu=!1}catch(e){console.warn("[AxoTube:autoFrameRate] Failed to reset auto frame rate:",e)}}}function Qu(){null!==Wu&&clearTimeout(Wu),Wu=null,Ju&&(Ju.video.removeEventListener("play",Qu),Ju=null)}function Zu(){if(Qu(),Ku&&(clearTimeout(Ku),Ku=null),Vu){try{Vu.removeEventListener("onPlaybackStartExternal",$u)}catch(e){}Vu=null}}function $u(){try{if(!Xu()||!Vu||Vu!==Bi()||!Se("autoFrameRate"))return;var e=Vu.getStatsForNerds(),t=e&&e.resolution?e.resolution.match(/(\d+)x(\d+)@([\d.]+)/):null,n=qu();if(!t||!n)return;var i=Ii(),r=Se("autoFrameRatePauseVideoFor"),a=r>0&&i&&!i.paused&&!Ju;a&&i.pause();try{n.call(se(),parseFloat(t[3])),Gu=!0}finally{a&&i.paused&&function(e,t,n){var i=window.location.hash,r=Li(t),a=e.currentSrc||e.src;Ju={video:e,player:t,hash:i,videoId:r,source:a},e.addEventListener("play",Qu),Wu=setTimeout(function(){var n=Ju,o=n&&n.video===e&&n.player===Vu&&Bi()===t&&Ii()===e&&Xu()&&Se("autoFrameRate")&&window.location.hash===i&&Li(t)===r&&(e.currentSrc||e.src)===a&&e.paused&&!e.ended&&!e.seeking;if(Qu(),o)try{var s=e.play();s&&"function"==typeof s.catch&&s.catch(function(){})}catch(e){console.warn("[AxoTube:autoFrameRate] Failed to resume after frame rate switch:",e)}},n)}(i,Vu,r)}}catch(e){console.error("[AxoTube:autoFrameRate] Error in auto frame rate handling:",e)}}function el(){if(Ku&&(clearTimeout(Ku),Ku=null),!Se("autoFrameRate"))return Zu(),void Yu();var e=Bi();if(e){if(e!==Vu){if(Qu(),Vu)try{Vu.removeEventListener("onPlaybackStartExternal",$u)}catch(e){}(Vu=e).addEventListener("onPlaybackStartExternal",$u)}}else Ku=setTimeout(el,500)}window.addEventListener("hashchange",function(){Qu(),Xu()||Yu(),setTimeout(el,0)}),Mi(function(e){e!==Vu&&el()}),_i(function(e,t){t&&e!==t&&Qu()}),Ui(function(e,t){t&&e!==t&&Qu()}),document.addEventListener("keydown",Qu,!0),document.addEventListener("mousedown",Qu,!0),document.addEventListener("touchstart",Qu,!0),ke.addEventListener("configChange",function(e){var t,n;"autoFrameRate"===(null===(t=e.detail)||void 0===t?void 0:t.key)?e.detail.value?el():(Zu(),Yu()):"autoFrameRatePauseVideoFor"===(null===(n=e.detail)||void 0===n?void 0:n.key)&&Qu()}),el()}();
|
|
1
|
+
!function(){"use strict";function e(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var t;t||(t=1,function(){if("undefined"==typeof globalThis)try{Object.defineProperty(Object.prototype,"__globalThis__",{get:function(){return this},configurable:!0}),__globalThis__.globalThis=__globalThis__,delete Object.prototype.__globalThis__}catch(e){"undefined"!=typeof window?window.globalThis=window:"undefined"!=typeof self&&(self.globalThis=self)}}(),window.NodeList&&!NodeList.prototype.forEach&&(NodeList.prototype.forEach=Array.prototype.forEach),window.HTMLCollection&&!HTMLCollection.prototype.forEach&&(HTMLCollection.prototype.forEach=Array.prototype.forEach),function(){var e=window.EventTarget;if(void 0!==e)try{return void new e}catch(e){}window.EventTarget=function(){var e={};return{addEventListener:function(t,n){"function"==typeof n&&(e[t]||(e[t]=[]),-1===e[t].indexOf(n)&&e[t].push(n))},removeEventListener:function(t,n){var i=e[t];if(i){var r=i.indexOf(n);-1!==r&&i.splice(r,1)}},dispatchEvent:function(t){var n=e[t&&t.type];if(n)for(var i=n.slice(),r=0;r<i.length;r++)try{i[r].call(this,t)}catch(e){console.error(e)}return!(t&&t.defaultPrevented)}}},e&&(window.EventTarget.prototype=e.prototype)}(),function(){function e(){this.aborted=!1,this._cbs=[]}function t(){this.signal=new e}"undefined"==typeof AbortController&&(e.prototype.addEventListener=function(e,t){"abort"===e&&"function"==typeof t&&this._cbs.push(t)},e.prototype.removeEventListener=function(e,t){if("abort"===e){var n=this._cbs.indexOf(t);-1!==n&&this._cbs.splice(n,1)}},e.prototype.dispatchEvent=function(e){if(e&&"abort"===e.type)for(var t=this._cbs.slice(),n=0;n<t.length;n++)t[n](e)},t.prototype.abort=function(){this.signal.aborted||(this.signal.aborted=!0,this.signal.dispatchEvent({type:"abort",bubbles:!1,cancelable:!1}))},window.AbortSignal=e,window.AbortController=t)}(),function(){function e(e,t){var n,i=!!(t=t||{}).bubbles,r=!!t.cancelable,a=void 0!==t.detail?t.detail:null;try{(n=document.createEvent("CustomEvent")).initCustomEvent(e,i,r,a)}catch(t){(n=document.createEvent("Event")).initEvent(e,i,r),n.detail=a}return n}"function"!=typeof CustomEvent&&(window.Event&&window.Event.prototype&&(e.prototype=window.Event.prototype),window.CustomEvent=e)}(),"undefined"!=typeof Promise&&"function"!=typeof Promise.prototype.finally&&(Promise.prototype.finally=function(e){var t=this.constructor||Promise;return this.then(function(n){return t.resolve(e()).then(function(){return n})},function(n){return t.resolve(e()).then(function(){throw n})})}),"undefined"!=typeof Promise&&"function"!=typeof Promise.allSettled&&(Promise.allSettled=function(e){return Promise.all(Array.prototype.map.call(e,function(e){return Promise.resolve(e).then(function(e){return{status:"fulfilled",value:e}},function(e){return{status:"rejected",reason:e}})}))}),function(){function e(t,n,i){for(var r=0;r<t.length;r++)n>0&&Array.isArray(t[r])?e(t[r],n-1,i):i.push(t[r]);return i}"function"!=typeof Array.prototype.flat&&(Array.prototype.flat=function(t){return e(this,(t=void 0===t?1:Math.floor(t))<0?0:t,[])})}(),"function"!=typeof Array.prototype.flatMap&&(Array.prototype.flatMap=function(e,t){return Array.prototype.map.call(this,e,t).flat(1)}),"function"!=typeof String.prototype.replaceAll&&(String.prototype.replaceAll=function(e,t){return"string"!=typeof e?this.replace(e,t):this.split(e).join("function"==typeof t?t(e,0,String(this)):String(t))}),"function"==typeof Object.values&&"function"==typeof Object.entries||(Object.values=Object.values||function(e){for(var t=Object.keys(e),n=[],i=0;i<t.length;i++)n.push(e[t[i]]);return n},Object.entries=Object.entries||function(e){for(var t=Object.keys(e),n=[],i=0;i<t.length;i++)n.push([t[i],e[t[i]]]);return n}),"function"!=typeof Object.fromEntries&&(Object.fromEntries=function(e){var t=Object.create(null);if("function"==typeof e.forEach)e.forEach(function(e){t[e[0]]=e[1]});else for(var n=Array.isArray(e)?e:Array.prototype.slice.call(e),i=0;i<n.length;i++)t[n[i][0]]=n[i][1];return t}),"function"!=typeof queueMicrotask&&(window.queueMicrotask=function(e){Promise.resolve().then(e).catch(function(e){setTimeout(function(){throw e},0)})}),window.Element&&"function"!=typeof Element.prototype.closest&&(Element.prototype.closest=function(e){for(var t=this;t&&1===t.nodeType;){if(t.matches?t.matches(e):t.msMatchesSelector?t.msMatchesSelector(e):t.webkitMatchesSelector&&t.webkitMatchesSelector(e))return t;t=t.parentElement||t.parentNode}return null}),function(){if(window.Element){var e=Element.prototype;"function"!=typeof e.matches&&(e.matches=e.msMatchesSelector||e.webkitMatchesSelector||function(e){for(var t=(this.document||this.ownerDocument).querySelectorAll(e),n=t.length;--n>=0&&t.item(n)!==this;);return n>-1})}}(),function(){if("undefined"!=typeof Intl&&"function"!=typeof Intl.Locale){var e={US:"en",GB:"en",AU:"en",CA:"en",IN:"hi",IE:"en",NZ:"en",FR:"fr",DE:"de",ES:"es",IT:"it",PT:"pt",BR:"pt",MX:"es",AR:"es",CO:"es",CL:"es",RU:"ru",UA:"uk",PL:"pl",NL:"nl",BE:"nl",SE:"sv",NO:"no",DK:"da",FI:"fi",TR:"tr",GR:"el",CZ:"cs",SK:"sk",HU:"hu",RO:"ro",BG:"bg",HR:"hr",RS:"sr",JP:"ja",KR:"ko",VN:"vi",TH:"th",ID:"id",MY:"ms",PH:"tl",SA:"ar",AE:"ar",EG:"ar",IL:"he",IR:"fa",PK:"ur",BD:"bn",LK:"si"};t.prototype.maximize=function(){return this},Intl.Locale=t}function t(t,n){n=n||{},this.language=e[n.region]||"en"}}());var n;function i(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=Array(t);n<t;n++)i[n]=e[n];return i}function r(e){if(Array.isArray(e))return e}function a(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}function o(e,t,n){return t=g(t),w(e,y()?Reflect.construct(t,n||[],g(e).constructor):t.apply(e,n))}function s(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function u(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function l(e,t){return e.get(a(e,t))}function c(e,t,n){s(e,t),t.set(e,n)}function h(e,t,n){return e.set(a(e,t),n),n}function d(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,C(i.key),i)}}function p(e,t,n){return t&&d(e.prototype,t),n&&d(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function f(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=P(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var i=0,r=function(){};return{s:r,n:function(){return i>=e.length?{done:!0}:{done:!1,value:e[i++]}},e:function(e){throw e},f:r}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,o=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return o=e.done,e},e:function(e){s=!0,a=e},f:function(){try{o||null==n.return||n.return()}finally{if(s)throw a}}}}function m(e,t,n){return(t=C(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function g(e){return g=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},g(e)}function v(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&k(e,t)}function y(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(y=function(){return!!e})()}function b(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function x(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function S(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,i)}return n}function E(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?S(Object(n),!0).forEach(function(t){m(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):S(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function w(e,t){if(t&&("object"==typeof t||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function k(e,t){return k=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},k(e,t)}function D(e,t){return r(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var i,r,a,o,s=[],u=!0,l=!1;try{if(a=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;u=!1}else for(;!(u=(i=a.call(n)).done)&&(s.push(i.value),s.length!==t);u=!0);}catch(e){l=!0,r=e}finally{try{if(!u&&null!=n.return&&(o=n.return(),Object(o)!==o))return}finally{if(l)throw r}}return s}}(e,t)||P(e,t)||x()}function A(e){return function(e){if(Array.isArray(e))return i(e)}(e)||b(e)||P(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function C(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var i=n.call(e,t||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}function T(e){return T="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},T(e)}function P(e,t){if(e){if("string"==typeof e)return i(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?i(e,t):void 0}}n||(n=1,function(){var e=!1;try{var t=0,n=[];e="xbx"!=="aba".replaceAll("a",function(e,i){return t+=1,n.push(i),"x"})||2!==t||0!==n[0]||2!==n[1]}catch(t){e=!0}e&&(String.prototype.replaceAll=function(e,t){var n=String(this);if(e instanceof RegExp){if(!e.global)throw new TypeError("replaceAll requires a global RegExp");return n.replace(e,t)}var i=new RegExp(String(e).replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),"g");return n.replace(i,t)})}(),function(){var e=!1;try{var t=Object.fromEntries([["a",1]]);e=Object.getPrototypeOf(t)!==Object.prototype}catch(t){e=!0}e&&(Object.fromEntries=function(e){var t={};function n(e){if(e)try{Object.defineProperty(t,e[0],{value:e[1],enumerable:!0,configurable:!0,writable:!0})}catch(n){t[e[0]]=e[1]}}if(e&&"function"==typeof e.forEach)e.forEach(n);else for(var i=Array.isArray(e)?e:Array.prototype.slice.call(e||[]),r=0;r<i.length;r++)n(i[r]);return t})}());var F="undefined"!=typeof globalThis&&globalThis||"undefined"!=typeof self&&self||"undefined"!=typeof global&&global||{},B="URLSearchParams"in F,I="Symbol"in F&&"iterator"in Symbol,L="FileReader"in F&&"Blob"in F&&function(){try{return new Blob,!0}catch(e){return!1}}(),O="FormData"in F,N="ArrayBuffer"in F;if(N)var R=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],M=ArrayBuffer.isView||function(e){return e&&R.indexOf(Object.prototype.toString.call(e))>-1};function _(e){if("string"!=typeof e&&(e=String(e)),/[^a-z0-9\-#$%&'*+.^_`|~!]/i.test(e)||""===e)throw new TypeError('Invalid character in header field name: "'+e+'"');return e.toLowerCase()}function U(e){return"string"!=typeof e&&(e=String(e)),e}function j(e){var t={next:function(){var t=e.shift();return{done:void 0===t,value:t}}};return I&&(t[Symbol.iterator]=function(){return t}),t}function H(e){this.map={},e instanceof H?e.forEach(function(e,t){this.append(t,e)},this):Array.isArray(e)?e.forEach(function(e){if(2!=e.length)throw new TypeError("Headers constructor: expected name/value pair to be length 2, found"+e.length);this.append(e[0],e[1])},this):e&&Object.getOwnPropertyNames(e).forEach(function(t){this.append(t,e[t])},this)}function z(e){if(!e._noBody)return e.bodyUsed?Promise.reject(new TypeError("Already read")):void(e.bodyUsed=!0)}function V(e){return new Promise(function(t,n){e.onload=function(){t(e.result)},e.onerror=function(){n(e.error)}})}function K(e){var t=new FileReader,n=V(t);return t.readAsArrayBuffer(e),n}function G(e){if(e.slice)return e.slice(0);var t=new Uint8Array(e.byteLength);return t.set(new Uint8Array(e)),t.buffer}function J(){return this.bodyUsed=!1,this._initBody=function(e){var t;this.bodyUsed=this.bodyUsed,this._bodyInit=e,e?"string"==typeof e?this._bodyText=e:L&&Blob.prototype.isPrototypeOf(e)?this._bodyBlob=e:O&&FormData.prototype.isPrototypeOf(e)?this._bodyFormData=e:B&&URLSearchParams.prototype.isPrototypeOf(e)?this._bodyText=e.toString():N&&L&&((t=e)&&DataView.prototype.isPrototypeOf(t))?(this._bodyArrayBuffer=G(e.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):N&&(ArrayBuffer.prototype.isPrototypeOf(e)||M(e))?this._bodyArrayBuffer=G(e):this._bodyText=e=Object.prototype.toString.call(e):(this._noBody=!0,this._bodyText=""),this.headers.get("content-type")||("string"==typeof e?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):B&&URLSearchParams.prototype.isPrototypeOf(e)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},L&&(this.blob=function(){var e=z(this);if(e)return e;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))}),this.arrayBuffer=function(){if(this._bodyArrayBuffer){var e=z(this);return e||(ArrayBuffer.isView(this._bodyArrayBuffer)?Promise.resolve(this._bodyArrayBuffer.buffer.slice(this._bodyArrayBuffer.byteOffset,this._bodyArrayBuffer.byteOffset+this._bodyArrayBuffer.byteLength)):Promise.resolve(this._bodyArrayBuffer))}if(L)return this.blob().then(K);throw new Error("could not read as ArrayBuffer")},this.text=function(){var e,t,n,i,r,a=z(this);if(a)return a;if(this._bodyBlob)return e=this._bodyBlob,t=new FileReader,n=V(t),i=/charset=([A-Za-z0-9_-]+)/.exec(e.type),r=i?i[1]:"utf-8",t.readAsText(e,r),n;if(this._bodyArrayBuffer)return Promise.resolve(function(e){for(var t=new Uint8Array(e),n=new Array(t.length),i=0;i<t.length;i++)n[i]=String.fromCharCode(t[i]);return n.join("")}(this._bodyArrayBuffer));if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)},O&&(this.formData=function(){return this.text().then(q)}),this.json=function(){return this.text().then(JSON.parse)},this}H.prototype.append=function(e,t){e=_(e),t=U(t);var n=this.map[e];this.map[e]=n?n+", "+t:t},H.prototype.delete=function(e){delete this.map[_(e)]},H.prototype.get=function(e){return e=_(e),this.has(e)?this.map[e]:null},H.prototype.has=function(e){return this.map.hasOwnProperty(_(e))},H.prototype.set=function(e,t){this.map[_(e)]=U(t)},H.prototype.forEach=function(e,t){for(var n in this.map)this.map.hasOwnProperty(n)&&e.call(t,this.map[n],n,this)},H.prototype.keys=function(){var e=[];return this.forEach(function(t,n){e.push(n)}),j(e)},H.prototype.values=function(){var e=[];return this.forEach(function(t){e.push(t)}),j(e)},H.prototype.entries=function(){var e=[];return this.forEach(function(t,n){e.push([n,t])}),j(e)},I&&(H.prototype[Symbol.iterator]=H.prototype.entries);var X=["CONNECT","DELETE","GET","HEAD","OPTIONS","PATCH","POST","PUT","TRACE"];function W(e,t){if(!(this instanceof W))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');var n,i,r=(t=t||{}).body;if(e instanceof W){if(e.bodyUsed)throw new TypeError("Already read");this.url=e.url,this.credentials=e.credentials,t.headers||(this.headers=new H(e.headers)),this.method=e.method,this.mode=e.mode,this.signal=e.signal,r||null==e._bodyInit||(r=e._bodyInit,e.bodyUsed=!0)}else this.url=String(e);if(this.credentials=t.credentials||this.credentials||"same-origin",!t.headers&&this.headers||(this.headers=new H(t.headers)),this.method=(n=t.method||this.method||"GET",i=n.toUpperCase(),X.indexOf(i)>-1?i:n),this.mode=t.mode||this.mode||null,this.signal=t.signal||this.signal||function(){if("AbortController"in F)return(new AbortController).signal}(),this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&r)throw new TypeError("Body not allowed for GET or HEAD requests");if(this._initBody(r),!("GET"!==this.method&&"HEAD"!==this.method||"no-store"!==t.cache&&"no-cache"!==t.cache)){var a=/([?&])_=[^&]*/;if(a.test(this.url))this.url=this.url.replace(a,"$1_="+(new Date).getTime());else{this.url+=(/\?/.test(this.url)?"&":"?")+"_="+(new Date).getTime()}}}function q(e){var t=new FormData;return e.trim().split("&").forEach(function(e){if(e){var n=e.split("="),i=n.shift().replace(/\+/g," "),r=n.join("=").replace(/\+/g," ");t.append(decodeURIComponent(i),decodeURIComponent(r))}}),t}function Y(e,t){if(!(this instanceof Y))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');if(t||(t={}),this.type="default",this.status=void 0===t.status?200:t.status,this.status<200||this.status>599)throw new RangeError("Failed to construct 'Response': The status provided (0) is outside the range [200, 599].");this.ok=this.status>=200&&this.status<300,this.statusText=void 0===t.statusText?"":""+t.statusText,this.headers=new H(t.headers),this.url=t.url||"",this._initBody(e)}W.prototype.clone=function(){return new W(this,{body:this._bodyInit})},J.call(W.prototype),J.call(Y.prototype),Y.prototype.clone=function(){return new Y(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new H(this.headers),url:this.url})},Y.error=function(){var e=new Y(null,{status:200,statusText:""});return e.ok=!1,e.status=0,e.type="error",e};var Q=[301,302,303,307,308];Y.redirect=function(e,t){if(-1===Q.indexOf(t))throw new RangeError("Invalid status code");return new Y(null,{status:t,headers:{location:e}})};var Z=F.DOMException;try{new Z}catch(e){(Z=function(e,t){this.message=e,this.name=t;var n=Error(e);this.stack=n.stack}).prototype=Object.create(Error.prototype),Z.prototype.constructor=Z}function $(e,t){return new Promise(function(n,i){var r=new W(e,t);if(r.signal&&r.signal.aborted)return i(new Z("Aborted","AbortError"));var a=new XMLHttpRequest;function o(){a.abort()}if(a.onload=function(){var e,t,i={statusText:a.statusText,headers:(e=a.getAllResponseHeaders()||"",t=new H,e.replace(/\r?\n[\t ]+/g," ").split("\r").map(function(e){return 0===e.indexOf("\n")?e.substr(1,e.length):e}).forEach(function(e){var n=e.split(":"),i=n.shift().trim();if(i){var r=n.join(":").trim();try{t.append(i,r)}catch(e){console.warn("Response "+e.message)}}}),t)};0===r.url.indexOf("file://")&&(a.status<200||a.status>599)?i.status=200:i.status=a.status,i.url="responseURL"in a?a.responseURL:i.headers.get("X-Request-URL");var o="response"in a?a.response:a.responseText;setTimeout(function(){n(new Y(o,i))},0)},a.onerror=function(){setTimeout(function(){i(new TypeError("Network request failed"))},0)},a.ontimeout=function(){setTimeout(function(){i(new TypeError("Network request timed out"))},0)},a.onabort=function(){setTimeout(function(){i(new Z("Aborted","AbortError"))},0)},a.open(r.method,function(e){try{return""===e&&F.location.href?F.location.href:e}catch(t){return e}}(r.url),!0),"include"===r.credentials?a.withCredentials=!0:"omit"===r.credentials&&(a.withCredentials=!1),"responseType"in a&&(L?a.responseType="blob":N&&(a.responseType="arraybuffer")),t&&"object"===T(t.headers)&&!(t.headers instanceof H||F.Headers&&t.headers instanceof F.Headers)){var s=[];Object.getOwnPropertyNames(t.headers).forEach(function(e){s.push(_(e)),a.setRequestHeader(e,U(t.headers[e]))}),r.headers.forEach(function(e,t){-1===s.indexOf(t)&&a.setRequestHeader(t,e)})}else r.headers.forEach(function(e,t){a.setRequestHeader(t,e)});r.signal&&(r.signal.addEventListener("abort",o),a.onreadystatechange=function(){4===a.readyState&&r.signal.removeEventListener("abort",o)}),a.send(void 0===r._bodyInit?null:r._bodyInit)})}$.polyfill=!0,F.fetch||(F.fetch=$,F.Headers=H,F.Request=W,F.Response=Y);var ee=!1,te=null,ne=!1,ie=null;function re(){if(ee){if(ee=!1,ie){try{ie.disconnect()}catch(e){}ie=null}te&&te.parentNode&&te.parentNode.removeChild(te),te=null}}function ae(){if(!ee&&!ne&&document.getElementById){var e=document.getElementById("loader");if(e){var t;try{t=window.getComputedStyle(e)}catch(e){t=null}(te=document.createElement("div")).id="ytaf-boot-overlay";var n=t&&t.backgroundColor||"rgb(40, 40, 40)",i=t&&t.backgroundImage||"none";te.style.cssText="position:fixed;top:0;left:0;width:100%;height:100%;z-index:2147483647;background-color:"+n+";background-image:"+i+";background-position:"+(t&&t.backgroundPosition||"center center")+";background-repeat:"+(t&&t.backgroundRepeat||"no-repeat")+";background-size:"+(t&&t.backgroundSize||"60%")+";",(document.body||document.documentElement).appendChild(te),ee=!0,ne=!0}}}function oe(){if(!ne&&document.documentElement){try{(ie=new MutationObserver(function(){ae(),ne&&ie&&ie.disconnect()})).observe(document.documentElement,{childList:!0,subtree:!0})}catch(e){}ae(),setTimeout(ae,50),setTimeout(ae,200),setTimeout(ae,800),setTimeout(ae,2e3)}}function se(){return"undefined"!=typeof window&&window.h5vcc&&window.h5vcc.tizentube||null}window.__releaseBootLoader=re,setTimeout(function(){if(ie){try{ie.disconnect()}catch(e){}ie=null}re()},1e4),document.documentElement?oe():document.addEventListener("DOMContentLoaded",oe);var ue,le,ce={defaults:{enableAdBlock:!0,blockPlayerAdTracking:!0,blockAdTelemetry:!0,blockViewStatsTelemetry:!1,removeLiveVideos:!1,removeTopLiveGames:!1,removeMostRelevant:!1,enableSponsorBlock:!0,enableSponsorBlockToasts:!0,sponsorBlockManualSkips:["intro","outro","filler"],enableSponsorBlockSponsor:!0,enableSponsorBlockIntro:!0,enableSponsorBlockOutro:!0,enableSponsorBlockInteraction:!0,enableSponsorBlockSelfPromo:!0,enableSponsorBlockPreview:!0,enableSponsorBlockMusicOfftopic:!0,enableSponsorBlockFiller:!1,enableSponsorBlockHighlight:!0,videoSpeed:1,preferredVideoQuality:"auto",enableDeArrowTitles:!0,enableDeArrowThumbnails:!0,routeColor:"#0f0f0f",routeBackgroundUrl:"",themePreset:"default",textTheme:"default",userAgentProfile:"auto",enableFixedUI:!1,enableHqThumbnails:!0,enableLongPress:!0,enableShorts:!0,dontCheckUpdateUntil:0,enableWhoIsWatchingMenu:!1,permanentlyEnableWhoIsWatchingMenu:!1,enableWhosWatchingMenuOnAppExit:!1,enableShowUserLanguage:!0,enableShowOtherLanguages:!1,showWelcomeToast:!0,enablePreviousNextButtons:!0,enableSuperThanksButton:!1,enableSpeedControlsButton:!0,enablePatchingVideoPlayer:!0,enableMPButton:!0,enableSwapMPWithPIP:!1,enablePreviews:!0,previewLengthSeconds:40,enableRemainingTime:!1,enablePauseOnBlur:!1,enableLowMemoryMode:!1,enableHideWatchedVideos:!1,hideWatchedVideosThreshold:80,hideWatchedVideosPages:[],enableHideEndScreenCards:!1,enableYouThereRenderer:!0,enableScreenDimming:!1,dimmingTimeout:60,dimmingOpacity:.5,enablePaidPromotionOverlay:!0,speedSettingsIncrement:.25,videoPreferredCodec:"any",enableAutoSubtitles:!0,autoSubtitleLanguage:"en",autoSubtitleAllowAuto:!0,launchToOnStartup:null,reloadHomeOnStartup:!0,disabledSidebarContents:[],disableChannelsOnSidebar:!1,enableUpdater:!0,autoFrameRate:!1,autoFrameRatePauseVideoFor:0,enableSigninReminder:!1,sortSubscriptionsByAlphabet:!1,enableReducedMotion:!1,enablePerformanceMode:!1,enablePanelShrink:!0,enableDeArrowPeek:!0,panelShrinkPercent:"60",clockMode:"off",clockFormat:"24h",clockPosition:"topRight",clockShowSeconds:!1,enableOnePressMode:!1,enableExperimentalResolution:!1,experimentalMaxResolution:"1440p"},ranges:{videoSpeed:[.05,5],hideWatchedVideosThreshold:[0,100],dimmingTimeout:[1,3600],dimmingOpacity:[0,1],speedSettingsIncrement:[.01,1],autoFrameRatePauseVideoFor:[0,1e4],previewLengthSeconds:[5,120],dontCheckUpdateUntil:[0,9007199254740991]},enums:{preferredVideoQuality:["auto","2160p","1440p","1080p","720p","480p","360p","240p","144p"],videoPreferredCodec:["any","vp9","av01","avc1"],themePreset:["default","black","darkGray","charcoal","navy","darkRed","darkGreen","darkPurple"],textTheme:["default","white","gray","red","blue","green","purple","yellow"],userAgentProfile:["auto","samsung","android"],experimentalMaxResolution:["1440p","2160p"],autoSubtitleLanguage:["en","hi","es","fr","de","pt","ja","ko","ru"],panelShrinkPercent:["50","60","70"],clockMode:["off","always","notPlaying"],clockFormat:["24h","12h","12hNoAmPm"],clockPosition:["topLeft","topRight","bottomLeft","bottomRight"]},themePresetColors:{default:"#0f0f0f",black:"#000000",darkGray:"#1c1a1a",charcoal:"#121212",navy:"#0d1b2a",darkRed:"#3b0505",darkGreen:"#052e1b",darkPurple:"#1a1025"}};var he=function(){if(le)return ue;le=1;var e=ce;return ue={validateConfigValue:function(t,n){var i=e.defaults;if(!Object.prototype.hasOwnProperty.call(i,t))return!1;var r=i[t];if(null===r)return null===n||"string"==typeof n;if(Array.isArray(r))return Array.isArray(n)&&n.every(function(e){return"string"==typeof e});if("number"==typeof r){if("number"!=typeof n||!isFinite(n))return!1;var a=e.ranges[t];return!a||n>=a[0]&&n<=a[1]}if(T(n)!==T(r))return!1;var o=e.enums[t];return(!o||-1!==o.indexOf(n))&&(!("routeColor"===t&&!/^#[0-9a-f]{6}$/i.test(n))&&!("routeBackgroundUrl"===t&&n&&!/^https?:\/\/\S+$/i.test(n)))}},ue}(),de=e(he),pe="ytaf-configuration",fe=JSON.parse,me=JSON.stringify,ge=function(e){return fe(me(e))},ve=ge,ye=ge(ce.defaults);ye.enableFixedUI=!se()||ce.defaults.enableFixedUI;var be,xe=de.validateConfigValue;function Se(e){if(Object.prototype.hasOwnProperty.call(ye,e))return void 0===be[e]&&(be[e]=ge(ye[e])),be[e];console.warn("[AxoTube:config] Unknown config key",e)}function Ee(e,t){if(!xe(e,t))return console.warn("[AxoTube:config] Rejected invalid config value",e,t),!1;be[e]=ge(t);var n=function(){try{return!!window.localStorage&&(window.localStorage[pe]=me(be),!0)}catch(e){if("QuotaExceededError"===e.name){console.warn("[AxoTube:config] localStorage quota exceeded; replacing axotube config only");try{return"function"==typeof window.localStorage.removeItem?window.localStorage.removeItem(pe):delete window.localStorage[pe],window.localStorage[pe]=me(be),!0}catch(e){return console.error("[AxoTube:config] Failed to persist axotube config:",e),!1}}return console.error("[AxoTube:config] Failed to persist config:",e),!1}}();return we.dispatchEvent(new CustomEvent("configChange",{detail:{key:e,value:ge(t)}})),n}!function(){be=ge(ye);try{if(!window.localStorage||!window.localStorage[pe])return;var e=fe(window.localStorage[pe]);if(!e||"object"!==T(e)||Array.isArray(e))return;Object.keys(e).forEach(function(t){xe(t,e[t])&&(be[t]=ge(e[t]))})}catch(e){console.warn("[AxoTube:config] Config read failed; using defaults:",e)}}();var we=new EventTarget;function ke(){return ge(be)}var De,Ae="axotube-user-agent-applied";function Ce(){return!!Se("enablePerformanceMode")}function Te(){return Ce()||!!Se("enableReducedMotion")}function Pe(){return Ce()||!!Se("enableLowMemoryMode")}function Fe(){return!!Se("enablePreviews")&&!Ce()}function Be(){return Se("enableHqThumbnails")?Te()||Pe()?"hover":"eager":"off"}function Ie(e){e&&"object"===T(e)&&Pe()&&(e.feature_switches&&"object"===T(e.feature_switches)||(e.feature_switches={}),e.feature_switches.enable_memory_saving_mode=!0)}!function(){var e="android"===Se("userAgentProfile")?{ua:"Mozilla/5.0 (Linux; Android 13; Pixel 7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Mobile Safari/537.36",marker:"Pixel 7"}:{ua:"Mozilla/5.0 (SMART-TV; LINUX; Tizen 4.0) AppleWebKit/537.3 (KHTML, like Gecko) SamsungBrowser/2.1 TV Safari/537.3",marker:"SamsungBrowser/2.1"};if((!navigator.userAgent||-1===navigator.userAgent.indexOf(e.marker))&&function(e){try{if(window.tizen&&window.tizen.websetting&&"function"==typeof window.tizen.websetting.setUserAgentString)return window.tizen.websetting.setUserAgentString(e),!0}catch(e){console.warn("[AxoTube:userAgentSpoofing] setUserAgentString failed:",e)}return!1}(e.ua))try{sessionStorage.getItem(Ae)!==e.ua&&(sessionStorage.setItem(Ae,e.ua),location.reload())}catch(e){}}(),we.addEventListener("configChange",function(e){var t;"enablePerformanceMode"===(null===(t=e.detail)||void 0===t?void 0:t.key)&&(Se("enablePerformanceMode")||(Ee("enableReducedMotion",!1),Ee("enableLowMemoryMode",!1)))});try{var Le=window.environment;Object.defineProperty(window,"environment",{configurable:!0,get:function(){return De},set:function(e){Ie(e),De=e}}),De=Le,Ie(Le)}catch(e){console.warn("[AxoTube:lowMemoryMode] low memory mode unavailable:",e)}var Oe={"1440p":"2560x1440","2160p":"3840x2160"},Ne={width:function(e){return Number(e)>0&&Number(e)<=7680},height:function(e){return Number(e)>0&&Number(e)<=4320},framerate:function(e){return Number(e)>0&&Number(e)<=60},bitrate:function(e){return Number(e)>0&&Number(e)<=2e8},eotf:function(e){return"bt709"===e||("smpte2084"===e||"arib-std-b67"===e)&&Re()},channels:function(e){return Number(e)>0&&Number(e)<=8},cryptoblockformat:function(e){return"subsample"===e},"decode-to-texture":function(e){return"true"===e||"false"===e}};function Re(){return!(!window.matchMedia||!window.matchMedia("(dynamic-range: high)").matches)}function Me(e){var t=e.split("."),n="vp09"===t[0]?t[6]:"av01"===t[0]?t[7]:void 0;return"16"===n||"18"===n}var _e="__axotubeResolutionOwner";if(!window[_e]){if(window[_e]=!0,Se("enableExperimentalResolution"))try{window.h5vcc=window.h5vcc||{},window.h5vcc.system=window.h5vcc.system||{},window.h5vcc.system.getVideoContainerSizeOverride=function(){var e=Se("experimentalMaxResolution");return Oe[e]||Oe["1440p"]},function(){if(window.MediaSource&&"function"==typeof MediaSource.isTypeSupported){var e=MediaSource.isTypeSupported.bind(MediaSource);MediaSource.isTypeSupported=function(t){for(var n=String(t).split(";"),i=[n[0].trim()],r=1;r<n.length;r++){var a=n[r].trim(),o=a.indexOf("="),s=(-1===o?a:a.slice(0,o)).trim().toLowerCase(),u=(-1===o?"":a.slice(o+1)).trim().replace(/^"|"$/g,"");if("codecs"===s){for(var l=u.split(","),c=0;c<l.length;c++)if(Me(l[c].trim())&&!Re())return!1;i.push(a)}else if(Ne[s]){if(!Ne[s](u))return!1}else i.push(a)}return e(i.join("; "))}}}()}catch(e){console.warn("[AxoTube:experimentalResolution] Could not install overrides:",e)}we.addEventListener("configChange",function(e){var t,n=(null===(t=e.detail)||void 0===t?void 0:t.key)||"";("enableExperimentalResolution"===n||"experimentalMaxResolution"===n&&Se("enableExperimentalResolution"))&&setTimeout(function(){return location.reload()},300)})}var Ue={avc1:["avc1"],vp9:["vp09","vp9"],av01:["av01"]};var je="__axotubeCodecOwner";if(!window[je]){window[je]=!0;try{!function(e){if(window.MediaSource&&"function"==typeof MediaSource.isTypeSupported){var t=function(e){if(!Ue[e])return[];var t=[];return Object.keys(Ue).forEach(function(n){n!==e&&(t=t.concat(Ue[n]))}),t}(e);if(0!==t.length){var n=MediaSource.isTypeSupported.bind(MediaSource);MediaSource.isTypeSupported=function(e){var i=String(e).toLowerCase();if(-1!==i.indexOf("codecs"))for(var r=0;r<t.length;r++)if(-1!==i.indexOf(t[r]))return!1;return n(e)}}}}(Se("videoPreferredCodec"))}catch(e){console.warn("[AxoTube:codecPreference] Could not install codec preference:",e)}we.addEventListener("configChange",function(e){var t;"videoPreferredCodec"===((null===(t=e.detail)||void 0===t?void 0:t.key)||"")&&setTimeout(function(){return location.reload()},300)})}var He=function(e){return"string"==typeof e},ze=function(){var e,t,n=new Promise(function(n,i){e=n,t=i});return n.resolve=e,n.reject=t,n},Ve=function(e){return null==e?"":""+e},Ke=/###/g,Ge=function(e){return e&&e.indexOf("###")>-1?e.replace(Ke,"."):e},Je=function(e){return!e||He(e)},Xe=function(e,t,n){for(var i=He(t)?t.split("."):t,r=0;r<i.length-1;){if(Je(e))return{};var a=Ge(i[r]);!e[a]&&n&&(e[a]=new n),e=Object.prototype.hasOwnProperty.call(e,a)?e[a]:{},++r}return Je(e)?{}:{obj:e,k:Ge(i[r])}},We=function(e,t,n){var i=Xe(e,t,Object),r=i.obj,a=i.k;if(void 0===r&&1!==t.length){for(var o=t[t.length-1],s=t.slice(0,t.length-1),u=Xe(e,s,Object);void 0===u.obj&&s.length;){var l;o="".concat(s[s.length-1],".").concat(o),s=s.slice(0,s.length-1),null!==(l=u=Xe(e,s,Object))&&void 0!==l&&l.obj&&void 0!==u.obj["".concat(u.k,".").concat(o)]&&(u.obj=void 0)}u.obj["".concat(u.k,".").concat(o)]=n}else r[a]=n},qe=function(e,t){var n=Xe(e,t),i=n.obj,r=n.k;if(i&&Object.prototype.hasOwnProperty.call(i,r))return i[r]},Ye=function(e,t,n){for(var i in t)"__proto__"!==i&&"constructor"!==i&&(i in e?He(e[i])||e[i]instanceof String||He(t[i])||t[i]instanceof String?n&&(e[i]=t[i]):Ye(e[i],t[i],n):e[i]=t[i]);return e},Qe=function(e){return e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")},Ze={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"},$e=function(e){return He(e)?e.replace(/[&<>"'\/]/g,function(e){return Ze[e]}):e},et=[" ",",","?","!",";"],tt=new(function(){return p(function e(t){u(this,e),this.capacity=t,this.regExpMap=new Map,this.regExpQueue=[]},[{key:"getRegExp",value:function(e){var t=this.regExpMap.get(e);if(void 0!==t)return t;var n=new RegExp(e);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(e,n),this.regExpQueue.push(e),n}}])}())(20),nt=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:".";if(e){if(e[t]){if(!Object.prototype.hasOwnProperty.call(e,t))return;return e[t]}for(var i=t.split(n),r=e,a=0;a<i.length;){if(!r||"object"!==T(r))return;for(var o=void 0,s="",u=a;u<i.length;++u)if(u!==a&&(s+=n),void 0!==(o=r[s+=i[u]])){if(["string","number","boolean"].indexOf(T(o))>-1&&u<i.length-1)continue;a+=u-a+1;break}r=o}return r}},it=function(e){return null==e?void 0:e.replace(/_/g,"-")},rt={type:"logger",log:function(e){this.output("log",e)},warn:function(e){this.output("warn",e)},error:function(e){this.output("error",e)},output:function(e,t){var n,i;null===(n=console)||void 0===n||null===(n=n[e])||void 0===n||null===(i=n.apply)||void 0===i||i.call(n,console,t)}},at=function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};u(this,e),this.init(t,n)}return p(e,[{key:"init",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.prefix=t.prefix||"i18next:",this.logger=e||rt,this.options=t,this.debug=t.debug}},{key:"log",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return this.forward(t,"log","",!0)}},{key:"warn",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return this.forward(t,"warn","",!0)}},{key:"error",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return this.forward(t,"error","")}},{key:"deprecate",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return this.forward(t,"warn","WARNING DEPRECATED: ",!0)}},{key:"forward",value:function(e,t,n,i){return i&&!this.debug?null:(He(e[0])&&(e[0]="".concat(n).concat(this.prefix," ").concat(e[0])),this.logger[t](e))}},{key:"create",value:function(t){return new e(this.logger,E(E({},{prefix:"".concat(this.prefix,":").concat(t,":")}),this.options))}},{key:"clone",value:function(t){return(t=t||this.options).prefix=t.prefix||this.prefix,new e(this.logger,t)}}])}(),ot=new at,st=function(){return p(function e(){u(this,e),this.observers={}},[{key:"on",value:function(e,t){var n=this;return e.split(" ").forEach(function(e){n.observers[e]||(n.observers[e]=new Map);var i=n.observers[e].get(t)||0;n.observers[e].set(t,i+1)}),this}},{key:"off",value:function(e,t){this.observers[e]&&(t?this.observers[e].delete(t):delete this.observers[e])}},{key:"emit",value:function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),i=1;i<t;i++)n[i-1]=arguments[i];this.observers[e]&&Array.from(this.observers[e].entries()).forEach(function(e){for(var t=D(e,2),i=t[0],r=t[1],a=0;a<r;a++)i.apply(void 0,n)});this.observers["*"]&&Array.from(this.observers["*"].entries()).forEach(function(t){for(var i=D(t,2),r=i[0],a=i[1],o=0;o<a;o++)r.apply(r,[e].concat(n))})}}])}(),ut=function(e){function t(e){var n,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{ns:["translation"],defaultNS:"translation"};return u(this,t),(n=o(this,t)).data=e||{},n.options=i,void 0===n.options.keySeparator&&(n.options.keySeparator="."),void 0===n.options.ignoreJSONStructure&&(n.options.ignoreJSONStructure=!0),n}return v(t,e),p(t,[{key:"addNamespaces",value:function(e){this.options.ns.indexOf(e)<0&&this.options.ns.push(e)}},{key:"removeNamespaces",value:function(e){var t=this.options.ns.indexOf(e);t>-1&&this.options.ns.splice(t,1)}},{key:"getResource",value:function(e,t,n){var i,r,a,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},s=void 0!==o.keySeparator?o.keySeparator:this.options.keySeparator,u=void 0!==o.ignoreJSONStructure?o.ignoreJSONStructure:this.options.ignoreJSONStructure;if(e.indexOf(".")>-1)r=e.split(".");else if(r=[e,t],n)if(Array.isArray(n))(a=r).push.apply(a,A(n));else if(He(n)&&s){var l;(l=r).push.apply(l,A(n.split(s)))}else r.push(n);var c=qe(this.data,r);return!c&&!t&&!n&&e.indexOf(".")>-1&&(e=r[0],t=r[1],n=r.slice(2).join(".")),!c&&u&&He(n)?nt(null===(i=this.data)||void 0===i||null===(i=i[e])||void 0===i?void 0:i[t],n,s):c}},{key:"addResource",value:function(e,t,n,i){var r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{silent:!1},a=void 0!==r.keySeparator?r.keySeparator:this.options.keySeparator,o=[e,t];n&&(o=o.concat(a?n.split(a):n)),e.indexOf(".")>-1&&(i=t,t=(o=e.split("."))[1]),this.addNamespaces(t),We(this.data,o,i),r.silent||this.emit("added",e,t,n,i)}},{key:"addResources",value:function(e,t,n){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{silent:!1};for(var r in n)(He(n[r])||Array.isArray(n[r]))&&this.addResource(e,t,r,n[r],{silent:!0});i.silent||this.emit("added",e,t,n)}},{key:"addResourceBundle",value:function(e,t,n,i,r){var a=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{silent:!1,skipCopy:!1},o=[e,t];e.indexOf(".")>-1&&(i=n,n=t,t=(o=e.split("."))[1]),this.addNamespaces(t);var s=qe(this.data,o)||{};a.skipCopy||(n=JSON.parse(JSON.stringify(n))),i?Ye(s,n,r):s=E(E({},s),n),We(this.data,o,s),a.silent||this.emit("added",e,t,n)}},{key:"removeResourceBundle",value:function(e,t){this.hasResourceBundle(e,t)&&delete this.data[e][t],this.removeNamespaces(t),this.emit("removed",e,t)}},{key:"hasResourceBundle",value:function(e,t){return void 0!==this.getResource(e,t)}},{key:"getResourceBundle",value:function(e,t){return t||(t=this.options.defaultNS),this.getResource(e,t)}},{key:"getDataByLanguage",value:function(e){return this.data[e]}},{key:"hasLanguageSomeTranslations",value:function(e){var t=this.getDataByLanguage(e);return!!(t&&Object.keys(t)||[]).find(function(e){return t[e]&&Object.keys(t[e]).length>0})}},{key:"toJSON",value:function(){return this.data}}])}(st),lt={processors:{},addPostProcessor:function(e){this.processors[e.name]=e},handle:function(e,t,n,i,r){var a=this;return e.forEach(function(e){var o,s;t=null!==(o=null===(s=a.processors[e])||void 0===s?void 0:s.process(t,n,i,r))&&void 0!==o?o:t}),t}},ct=Symbol("i18next/PATH_KEY");function ht(e,t){var n,i,r=e(function(){var e,t=[],n=Object.create(null);return n.get=function(i,r){var a,o;return null===(a=e)||void 0===a||null===(o=a.revoke)||void 0===o||o.call(a),r===ct?t:(t.push(r),(e=Proxy.revocable(i,n)).proxy)},Proxy.revocable(Object.create(null),n).proxy}()),a=r[ct],o=null!==(n=null==t?void 0:t.keySeparator)&&void 0!==n?n:".",s=null!==(i=null==t?void 0:t.nsSeparator)&&void 0!==i?i:":";if(a.length>1&&s){var u=null==t?void 0:t.ns;if((u?Array.isArray(u)?u:[u]:[]).includes(a[0]))return"".concat(a[0]).concat(s).concat(a.slice(1).join(o))}return a.join(o)}var dt={},pt=function(e){return!He(e)&&"boolean"!=typeof e&&"number"!=typeof e},ft=function(e){function t(e){var n,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return u(this,t),function(e,t,n){e.forEach(function(e){t[e]&&(n[e]=t[e])})}(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],e,n=o(this,t)),n.options=i,void 0===n.options.keySeparator&&(n.options.keySeparator="."),n.logger=ot.create("translator"),n}return v(t,e),p(t,[{key:"changeLanguage",value:function(e){e&&(this.language=e)}},{key:"exists",value:function(e){var t=E({},arguments.length>1&&void 0!==arguments[1]?arguments[1]:{interpolation:{}});if(null==e)return!1;var n=this.resolve(e,t);if(void 0===(null==n?void 0:n.res))return!1;var i=pt(n.res);return!1!==t.returnObjects||!i}},{key:"extractFromKey",value:function(e,t){var n=void 0!==t.nsSeparator?t.nsSeparator:this.options.nsSeparator;void 0===n&&(n=":");var i=void 0!==t.keySeparator?t.keySeparator:this.options.keySeparator,r=t.ns||this.options.defaultNS||[],a=n&&e.indexOf(n)>-1,o=!(this.options.userDefinedKeySeparator||t.keySeparator||this.options.userDefinedNsSeparator||t.nsSeparator||function(e,t,n){t=t||"",n=n||"";var i=et.filter(function(e){return t.indexOf(e)<0&&n.indexOf(e)<0});if(0===i.length)return!0;var r=tt.getRegExp("(".concat(i.map(function(e){return"?"===e?"\\?":e}).join("|"),")")),a=!r.test(e);if(!a){var o=e.indexOf(n);o>0&&!r.test(e.substring(0,o))&&(a=!0)}return a}(e,n,i));if(a&&!o){var s=e.match(this.interpolator.nestingRegexp);if(s&&s.length>0)return{key:e,namespaces:He(r)?[r]:r};var u=e.split(n);(n!==i||n===i&&this.options.ns.indexOf(u[0])>-1)&&(r=u.shift()),e=u.join(i)}return{key:e,namespaces:He(r)?[r]:r}}},{key:"translate",value:function(e,n,i){var r=this,a="object"===T(n)?E({},n):n;if("object"!==T(a)&&this.options.overloadTranslationOptionHandler&&(a=this.options.overloadTranslationOptionHandler(arguments)),"object"===T(a)&&(a=E({},a)),a||(a={}),null==e)return"";"function"==typeof e&&(e=ht(e,E(E({},this.options),a))),Array.isArray(e)||(e=[String(e)]),e=e.map(function(e){return"function"==typeof e?ht(e,E(E({},r.options),a)):String(e)});var o=void 0!==a.returnDetails?a.returnDetails:this.options.returnDetails,s=void 0!==a.keySeparator?a.keySeparator:this.options.keySeparator,u=this.extractFromKey(e[e.length-1],a),l=u.key,c=u.namespaces,h=c[c.length-1],d=void 0!==a.nsSeparator?a.nsSeparator:this.options.nsSeparator;void 0===d&&(d=":");var p=a.lng||this.language,f=a.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if("cimode"===(null==p?void 0:p.toLowerCase()))return f?o?{res:"".concat(h).concat(d).concat(l),usedKey:l,exactUsedKey:l,usedLng:p,usedNS:h,usedParams:this.getUsedParamsDetails(a)}:"".concat(h).concat(d).concat(l):o?{res:l,usedKey:l,exactUsedKey:l,usedLng:p,usedNS:h,usedParams:this.getUsedParamsDetails(a)}:l;var m=this.resolve(e,a),g=null==m?void 0:m.res,v=(null==m?void 0:m.usedKey)||l,y=(null==m?void 0:m.exactUsedKey)||l,b=void 0!==a.joinArrays?a.joinArrays:this.options.joinArrays,x=!this.i18nFormat||this.i18nFormat.handleAsObject,S=void 0!==a.count&&!He(a.count),w=t.hasDefaultValue(a),k=S?this.pluralResolver.getSuffix(p,a.count,a):"",D=a.ordinal&&S?this.pluralResolver.getSuffix(p,a.count,{ordinal:!1}):"",A=S&&!a.ordinal&&0===a.count,C=A&&a["defaultValue".concat(this.options.pluralSeparator,"zero")]||a["defaultValue".concat(k)]||a["defaultValue".concat(D)]||a.defaultValue,P=g;x&&!g&&w&&(P=C);var F=pt(P),B=Object.prototype.toString.apply(P);if(!(x&&P&&F&&["[object Number]","[object Function]","[object RegExp]"].indexOf(B)<0)||He(b)&&Array.isArray(P))if(x&&He(b)&&Array.isArray(g))(g=g.join(b))&&(g=this.extendTranslation(g,e,a,i));else{var I=!1,L=!1;!this.isValidLookup(g)&&w&&(I=!0,g=C),this.isValidLookup(g)||(L=!0,g=l);var O=(a.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&L?void 0:g,N=w&&C!==g&&this.options.updateMissing;if(L||I||N){if(this.logger.log(N?"updateKey":"missingKey",p,h,l,N?C:g),s){var R=this.resolve(l,E(E({},a),{},{keySeparator:!1}));R&&R.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}var M=[],_=this.languageUtils.getFallbackCodes(this.options.fallbackLng,a.lng||this.language);if("fallback"===this.options.saveMissingTo&&_&&_[0])for(var U=0;U<_.length;U++)M.push(_[U]);else"all"===this.options.saveMissingTo?M=this.languageUtils.toResolveHierarchy(a.lng||this.language):M.push(a.lng||this.language);var j=function(e,t,n){var i,o=w&&n!==g?n:O;r.options.missingKeyHandler?r.options.missingKeyHandler(e,h,t,o,N,a):null!==(i=r.backendConnector)&&void 0!==i&&i.saveMissing&&r.backendConnector.saveMissing(e,h,t,o,N,a),r.emit("missingKey",e,h,t,g)};this.options.saveMissing&&(this.options.saveMissingPlurals&&S?M.forEach(function(e){var t=r.pluralResolver.getSuffixes(e,a);A&&a["defaultValue".concat(r.options.pluralSeparator,"zero")]&&t.indexOf("".concat(r.options.pluralSeparator,"zero"))<0&&t.push("".concat(r.options.pluralSeparator,"zero")),t.forEach(function(t){j([e],l+t,a["defaultValue".concat(t)]||C)})}):j(M,l,C))}g=this.extendTranslation(g,e,a,m,i),L&&g===l&&this.options.appendNamespaceToMissingKey&&(g="".concat(h).concat(d).concat(l)),(L||I)&&this.options.parseMissingKeyHandler&&(g=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?"".concat(h).concat(d).concat(l):l,I?g:void 0,a))}else{if(!a.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");var H=this.options.returnedObjectHandler?this.options.returnedObjectHandler(v,P,E(E({},a),{},{ns:c})):"key '".concat(l," (").concat(this.language,")' returned an object instead of string.");return o?(m.res=H,m.usedParams=this.getUsedParamsDetails(a),m):H}if(s){var z=Array.isArray(P),V=z?[]:{},K=z?y:v;for(var G in P)if(Object.prototype.hasOwnProperty.call(P,G)){var J="".concat(K).concat(s).concat(G);V[G]=w&&!g?this.translate(J,E(E({},a),{},{defaultValue:pt(C)?C[G]:void 0},{joinArrays:!1,ns:c})):this.translate(J,E(E({},a),{joinArrays:!1,ns:c})),V[G]===J&&(V[G]=P[G])}g=V}}return o?(m.res=g,m.usedParams=this.getUsedParamsDetails(a),m):g}},{key:"extendTranslation",value:function(e,t,n,i,r){var a,o=this;if(null!==(a=this.i18nFormat)&&void 0!==a&&a.parse)e=this.i18nFormat.parse(e,E(E({},this.options.interpolation.defaultVariables),n),n.lng||this.language||i.usedLng,i.usedNS,i.usedKey,{resolved:i});else if(!n.skipInterpolation){var s;n.interpolation&&this.interpolator.init(E(E({},n),{interpolation:E(E({},this.options.interpolation),n.interpolation)}));var u,l=He(e)&&(void 0!==(null==n||null===(s=n.interpolation)||void 0===s?void 0:s.skipOnVariables)?n.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);if(l){var c=e.match(this.interpolator.nestingRegexp);u=c&&c.length}var h=n.replace&&!He(n.replace)?n.replace:n;if(this.options.interpolation.defaultVariables&&(h=E(E({},this.options.interpolation.defaultVariables),h)),e=this.interpolator.interpolate(e,h,n.lng||this.language||i.usedLng,n),l){var d=e.match(this.interpolator.nestingRegexp);u<(d&&d.length)&&(n.nest=!1)}!n.lng&&i&&i.res&&(n.lng=this.language||i.usedLng),!1!==n.nest&&(e=this.interpolator.nest(e,function(){for(var e=arguments.length,i=new Array(e),a=0;a<e;a++)i[a]=arguments[a];return(null==r?void 0:r[0])!==i[0]||n.context?o.translate.apply(o,i.concat([t])):(o.logger.warn("It seems you are nesting recursively key: ".concat(i[0]," in key: ").concat(t[0])),null)},n)),n.interpolation&&this.interpolator.reset()}var p=n.postProcess||this.options.postProcess,f=He(p)?[p]:p;return null!=e&&null!=f&&f.length&&!1!==n.applyPostProcessor&&(e=lt.handle(f,e,t,this.options&&this.options.postProcessPassResolved?E({i18nResolved:E(E({},i),{},{usedParams:this.getUsedParamsDetails(n)})},n):n,this)),e}},{key:"resolve",value:function(e){var t,n,i,r,a,o=this,s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return He(e)&&(e=[e]),Array.isArray(e)&&(e=e.map(function(e){return"function"==typeof e?ht(e,E(E({},o.options),s)):e})),e.forEach(function(e){if(!o.isValidLookup(t)){var u=o.extractFromKey(e,s),l=u.key;n=l;var c=u.namespaces;o.options.fallbackNS&&(c=c.concat(o.options.fallbackNS));var h=void 0!==s.count&&!He(s.count),d=h&&!s.ordinal&&0===s.count,p=void 0!==s.context&&(He(s.context)||"number"==typeof s.context)&&""!==s.context,f=s.lngs?s.lngs:o.languageUtils.toResolveHierarchy(s.lng||o.language,s.fallbackLng);c.forEach(function(e){var u,c;o.isValidLookup(t)||(a=e,dt["".concat(f[0],"-").concat(e)]||null===(u=o.utils)||void 0===u||!u.hasLoadedNamespace||null!==(c=o.utils)&&void 0!==c&&c.hasLoadedNamespace(a)||(dt["".concat(f[0],"-").concat(e)]=!0,o.logger.warn('key "'.concat(n,'" for languages "').concat(f.join(", "),'" won\'t get resolved as namespace "').concat(a,'" was not yet loaded'),"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),f.forEach(function(n){var a;if(!o.isValidLookup(t)){r=n;var u,c=[l];if(null!==(a=o.i18nFormat)&&void 0!==a&&a.addLookupKeys)o.i18nFormat.addLookupKeys(c,l,n,e,s);else{var f;h&&(f=o.pluralResolver.getSuffix(n,s.count,s));var m="".concat(o.options.pluralSeparator,"zero"),g="".concat(o.options.pluralSeparator,"ordinal").concat(o.options.pluralSeparator);if(h&&(s.ordinal&&0===f.indexOf(g)&&c.push(l+f.replace(g,o.options.pluralSeparator)),c.push(l+f),d&&c.push(l+m)),p){var v="".concat(l).concat(o.options.contextSeparator||"_").concat(s.context);c.push(v),h&&(s.ordinal&&0===f.indexOf(g)&&c.push(v+f.replace(g,o.options.pluralSeparator)),c.push(v+f),d&&c.push(v+m))}}for(;u=c.pop();)o.isValidLookup(t)||(i=u,t=o.getResource(n,e,u,s))}}))})}}),{res:t,usedKey:n,exactUsedKey:i,usedLng:r,usedNS:a}}},{key:"isValidLookup",value:function(e){return!(void 0===e||!this.options.returnNull&&null===e||!this.options.returnEmptyString&&""===e)}},{key:"getResource",value:function(e,t,n){var i,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return null!==(i=this.i18nFormat)&&void 0!==i&&i.getResource?this.i18nFormat.getResource(e,t,n,r):this.resourceStore.getResource(e,t,n,r)}},{key:"getUsedParamsDetails",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.replace&&!He(e.replace),n=t?e.replace:e;if(t&&void 0!==e.count&&(n.count=e.count),this.options.interpolation.defaultVariables&&(n=E(E({},this.options.interpolation.defaultVariables),n)),!t){n=E({},n);var i,r=f(["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"]);try{for(r.s();!(i=r.n()).done;){delete n[i.value]}}catch(e){r.e(e)}finally{r.f()}}return n}}],[{key:"hasDefaultValue",value:function(e){var t="defaultValue";for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t===n.substring(0,12)&&void 0!==e[n])return!0;return!1}}])}(st),mt=function(){return p(function e(t){u(this,e),this.options=t,this.supportedLngs=this.options.supportedLngs||!1,this.logger=ot.create("languageUtils")},[{key:"getScriptPartFromCode",value:function(e){if(!(e=it(e))||e.indexOf("-")<0)return null;var t=e.split("-");return 2===t.length?null:(t.pop(),"x"===t[t.length-1].toLowerCase()?null:this.formatLanguageCode(t.join("-")))}},{key:"getLanguagePartFromCode",value:function(e){if(!(e=it(e))||e.indexOf("-")<0)return e;var t=e.split("-");return this.formatLanguageCode(t[0])}},{key:"formatLanguageCode",value:function(e){if(He(e)&&e.indexOf("-")>-1){var t;try{t=Intl.getCanonicalLocales(e)[0]}catch(e){}return t&&this.options.lowerCaseLng&&(t=t.toLowerCase()),t||(this.options.lowerCaseLng?e.toLowerCase():e)}return this.options.cleanCode||this.options.lowerCaseLng?e.toLowerCase():e}},{key:"isSupportedCode",value:function(e){return("languageOnly"===this.options.load||this.options.nonExplicitSupportedLngs)&&(e=this.getLanguagePartFromCode(e)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(e)>-1}},{key:"getBestMatchFromCodes",value:function(e){var t,n=this;return e?(e.forEach(function(e){if(!t){var i=n.formatLanguageCode(e);n.options.supportedLngs&&!n.isSupportedCode(i)||(t=i)}}),!t&&this.options.supportedLngs&&e.forEach(function(e){if(!t){var i=n.getScriptPartFromCode(e);if(n.isSupportedCode(i))return t=i;var r=n.getLanguagePartFromCode(e);if(n.isSupportedCode(r))return t=r;t=n.options.supportedLngs.find(function(e){return e===r?e:e.indexOf("-")<0&&r.indexOf("-")<0?void 0:e.indexOf("-")>0&&r.indexOf("-")<0&&e.substring(0,e.indexOf("-"))===r||0===e.indexOf(r)&&r.length>1?e:void 0})}}),t||(t=this.getFallbackCodes(this.options.fallbackLng)[0]),t):null}},{key:"getFallbackCodes",value:function(e,t){if(!e)return[];if("function"==typeof e&&(e=e(t)),He(e)&&(e=[e]),Array.isArray(e))return e;if(!t)return e.default||[];var n=e[t];return n||(n=e[this.getScriptPartFromCode(t)]),n||(n=e[this.formatLanguageCode(t)]),n||(n=e[this.getLanguagePartFromCode(t)]),n||(n=e.default),n||[]}},{key:"toResolveHierarchy",value:function(e,t){var n=this,i=this.getFallbackCodes((!1===t?[]:t)||this.options.fallbackLng||[],e),r=[],a=function(e){e&&(n.isSupportedCode(e)?r.push(e):n.logger.warn("rejecting language code not found in supportedLngs: ".concat(e)))};return He(e)&&(e.indexOf("-")>-1||e.indexOf("_")>-1)?("languageOnly"!==this.options.load&&a(this.formatLanguageCode(e)),"languageOnly"!==this.options.load&&"currentOnly"!==this.options.load&&a(this.getScriptPartFromCode(e)),"currentOnly"!==this.options.load&&a(this.getLanguagePartFromCode(e))):He(e)&&a(this.formatLanguageCode(e)),i.forEach(function(e){r.indexOf(e)<0&&a(n.formatLanguageCode(e))}),r}}])}(),gt={zero:0,one:1,two:2,few:3,many:4,other:5},vt={select:function(e){return 1===e?"one":"other"},resolvedOptions:function(){return{pluralCategories:["one","other"]}}},yt=function(){return p(function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};u(this,e),this.languageUtils=t,this.options=n,this.logger=ot.create("pluralResolver"),this.pluralRulesCache={}},[{key:"clearCache",value:function(){this.pluralRulesCache={}}},{key:"getRule",value:function(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=it("dev"===e?"en":e),r=n.ordinal?"ordinal":"cardinal",a=JSON.stringify({cleanedCode:i,type:r});if(a in this.pluralRulesCache)return this.pluralRulesCache[a];try{t=new Intl.PluralRules(i,{type:r})}catch(i){if("undefined"==typeof Intl)return this.logger.error("No Intl support, please use an Intl polyfill!"),vt;if(!e.match(/-|_/))return vt;var o=this.languageUtils.getLanguagePartFromCode(e);t=this.getRule(o,n)}return this.pluralRulesCache[a]=t,t}},{key:"needsPlural",value:function(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=this.getRule(e,n);return i||(i=this.getRule("dev",n)),(null===(t=i)||void 0===t?void 0:t.resolvedOptions().pluralCategories.length)>1}},{key:"getPluralFormsOfKey",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return this.getSuffixes(e,n).map(function(e){return"".concat(t).concat(e)})}},{key:"getSuffixes",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=this.getRule(e,n);return i||(i=this.getRule("dev",n)),i?i.resolvedOptions().pluralCategories.sort(function(e,t){return gt[e]-gt[t]}).map(function(e){return"".concat(t.options.prepend).concat(n.ordinal?"ordinal".concat(t.options.prepend):"").concat(e)}):[]}},{key:"getSuffix",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=this.getRule(e,n);return i?"".concat(this.options.prepend).concat(n.ordinal?"ordinal".concat(this.options.prepend):"").concat(i.select(t)):(this.logger.warn("no plural rule found for: ".concat(e)),this.getSuffix("dev",t,n))}}])}(),bt=function(e,t,n){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:".",r=!(arguments.length>4&&void 0!==arguments[4])||arguments[4],a=function(e,t,n){var i=qe(e,n);return void 0!==i?i:qe(t,n)}(e,t,n);return!a&&r&&He(n)&&void 0===(a=nt(e,n,i))&&(a=nt(t,n,i)),a},xt=function(e){return e.replace(/\$/g,"$$$$")},St=function(){return p(function e(){var t,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};u(this,e),this.logger=ot.create("interpolator"),this.options=n,this.format=(null==n||null===(t=n.interpolation)||void 0===t?void 0:t.format)||function(e){return e},this.init(n)},[{key:"init",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};e.interpolation||(e.interpolation={escapeValue:!0});var t=e.interpolation,n=t.escape,i=t.escapeValue,r=t.useRawValueToEscape,a=t.prefix,o=t.prefixEscaped,s=t.suffix,u=t.suffixEscaped,l=t.formatSeparator,c=t.unescapeSuffix,h=t.unescapePrefix,d=t.nestingPrefix,p=t.nestingPrefixEscaped,f=t.nestingSuffix,m=t.nestingSuffixEscaped,g=t.nestingOptionsSeparator,v=t.maxReplaces,y=t.alwaysFormat;this.escape=void 0!==n?n:$e,this.escapeValue=void 0===i||i,this.useRawValueToEscape=void 0!==r&&r,this.prefix=a?Qe(a):o||"{{",this.suffix=s?Qe(s):u||"}}",this.formatSeparator=l||",",this.unescapePrefix=c?"":h||"-",this.unescapeSuffix=this.unescapePrefix?"":c||"",this.nestingPrefix=d?Qe(d):p||Qe("$t("),this.nestingSuffix=f?Qe(f):m||Qe(")"),this.nestingOptionsSeparator=g||",",this.maxReplaces=v||1e3,this.alwaysFormat=void 0!==y&&y,this.resetRegExp()}},{key:"reset",value:function(){this.options&&this.init(this.options)}},{key:"resetRegExp",value:function(){var e=function(e,t){return(null==e?void 0:e.source)===t?(e.lastIndex=0,e):new RegExp(t,"g")};this.regexp=e(this.regexp,"".concat(this.prefix,"(.+?)").concat(this.suffix)),this.regexpUnescape=e(this.regexpUnescape,"".concat(this.prefix).concat(this.unescapePrefix,"(.+?)").concat(this.unescapeSuffix).concat(this.suffix)),this.nestingRegexp=e(this.nestingRegexp,"".concat(this.nestingPrefix,"((?:[^()\"']+|\"[^\"]*\"|'[^']*'|\\((?:[^()]|\"[^\"]*\"|'[^']*')*\\))*?)").concat(this.nestingSuffix))}},{key:"interpolate",value:function(e,t,n,i){var r,a,o,s,u=this,l=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},c=function(e){if(e.indexOf(u.formatSeparator)<0){var r=bt(t,l,e,u.options.keySeparator,u.options.ignoreJSONStructure);return u.alwaysFormat?u.format(r,void 0,n,E(E(E({},i),t),{},{interpolationkey:e})):r}var a=e.split(u.formatSeparator),o=a.shift().trim(),s=a.join(u.formatSeparator).trim();return u.format(bt(t,l,o,u.options.keySeparator,u.options.ignoreJSONStructure),s,n,E(E(E({},i),t),{},{interpolationkey:o}))};this.resetRegExp();var h=(null==i?void 0:i.missingInterpolationHandler)||this.options.missingInterpolationHandler,d=void 0!==(null==i||null===(r=i.interpolation)||void 0===r?void 0:r.skipOnVariables)?i.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:function(e){return xt(e)}},{regex:this.regexp,safeValue:function(e){return u.escapeValue?xt(u.escape(e)):xt(e)}}].forEach(function(t){for(s=0;a=t.regex.exec(e);){var n=a[1].trim();if(void 0===(o=c(n)))if("function"==typeof h){var r=h(e,a,i);o=He(r)?r:""}else if(i&&Object.prototype.hasOwnProperty.call(i,n))o="";else{if(d){o=a[0];continue}u.logger.warn("missed to pass in variable ".concat(n," for interpolating ").concat(e)),o=""}else He(o)||u.useRawValueToEscape||(o=Ve(o));var l=t.safeValue(o);if(e=e.replace(a[0],l),d?(t.regex.lastIndex+=o.length,t.regex.lastIndex-=a[0].length):t.regex.lastIndex=0,++s>=u.maxReplaces)break}}),e}},{key:"nest",value:function(e,t){for(var n,i,r,a=this,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},s=function(e,t){var n,i,o=a.nestingOptionsSeparator;if(e.indexOf(o)<0)return e;var s=e.split(new RegExp("".concat(Qe(o),"[ ]*{"))),u="{".concat(s[1]);e=s[0];var l=(u=a.interpolate(u,r)).match(/'/g),c=u.match(/"/g);((null!==(n=null==l?void 0:l.length)&&void 0!==n?n:0)%2==0&&!c||(null!==(i=null==c?void 0:c.length)&&void 0!==i?i:0)%2!=0)&&(u=u.replace(/'/g,'"'));try{r=JSON.parse(u),t&&(r=E(E({},t),r))}catch(t){return a.logger.warn("failed parsing options string in nesting for key ".concat(e),t),"".concat(e).concat(o).concat(u)}return r.defaultValue&&r.defaultValue.indexOf(a.prefix)>-1&&delete r.defaultValue,e};n=this.nestingRegexp.exec(e);){var u=[];(r=(r=E({},o)).replace&&!He(r.replace)?r.replace:r).applyPostProcessor=!1,delete r.defaultValue;var l=/{.*}/.test(n[1])?n[1].lastIndexOf("}")+1:n[1].indexOf(this.formatSeparator);if(-1!==l&&(u=n[1].slice(l).split(this.formatSeparator).map(function(e){return e.trim()}).filter(Boolean),n[1]=n[1].slice(0,l)),(i=t(s.call(this,n[1].trim(),r),r))&&n[0]===e&&!He(i))return i;He(i)||(i=Ve(i)),i||(this.logger.warn("missed to resolve ".concat(n[1]," for nesting ").concat(e)),i=""),u.length&&(i=u.reduce(function(e,t){return a.format(e,t,o.lng,E(E({},o),{},{interpolationkey:n[1].trim()}))},i.trim())),e=e.replace(n[0],i),this.regexp.lastIndex=0}return e}}])}(),Et=function(e){var t=e.toLowerCase().trim(),n={};if(e.indexOf("(")>-1){var i=e.split("(");t=i[0].toLowerCase().trim();var a=i[1].substring(0,i[1].length-1);if("currency"===t&&a.indexOf(":")<0)n.currency||(n.currency=a.trim());else if("relativetime"===t&&a.indexOf(":")<0)n.range||(n.range=a.trim());else{a.split(";").forEach(function(e){if(e){var t=e.split(":"),i=r(u=t)||b(u)||P(u)||x(),a=i[0],o=i.slice(1).join(":").trim().replace(/^'+|'+$/g,""),s=a.trim();n[s]||(n[s]=o),"false"===o&&(n[s]=!1),"true"===o&&(n[s]=!0),isNaN(o)||(n[s]=parseInt(o,10))}var u})}}return{formatName:t,formatOptions:n}},wt=function(e){var t={};return function(n,i,r){var a=r;r&&r.interpolationkey&&r.formatParams&&r.formatParams[r.interpolationkey]&&r[r.interpolationkey]&&(a=E(E({},a),{},m({},r.interpolationkey,void 0)));var o=i+JSON.stringify(a),s=t[o];return s||(s=e(it(i),r),t[o]=s),s(n)}},kt=function(e){return function(t,n,i){return e(it(n),i)(t)}},Dt=function(){return p(function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};u(this,e),this.logger=ot.create("formatter"),this.options=t,this.init(t)},[{key:"init",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{interpolation:{}};this.formatSeparator=t.interpolation.formatSeparator||",";var n=t.cacheInBuiltFormats?wt:kt;this.formats={number:n(function(e,t){var n=new Intl.NumberFormat(e,E({},t));return function(e){return n.format(e)}}),currency:n(function(e,t){var n=new Intl.NumberFormat(e,E(E({},t),{},{style:"currency"}));return function(e){return n.format(e)}}),datetime:n(function(e,t){var n=new Intl.DateTimeFormat(e,E({},t));return function(e){return n.format(e)}}),relativetime:n(function(e,t){var n=new Intl.RelativeTimeFormat(e,E({},t));return function(e){return n.format(e,t.range||"day")}}),list:n(function(e,t){var n=new Intl.ListFormat(e,E({},t));return function(e){return n.format(e)}})}}},{key:"add",value:function(e,t){this.formats[e.toLowerCase().trim()]=t}},{key:"addCached",value:function(e,t){this.formats[e.toLowerCase().trim()]=wt(t)}},{key:"format",value:function(e,t,n){var i=this,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},a=t.split(this.formatSeparator);if(a.length>1&&a[0].indexOf("(")>1&&a[0].indexOf(")")<0&&a.find(function(e){return e.indexOf(")")>-1})){var o=a.findIndex(function(e){return e.indexOf(")")>-1});a[0]=[a[0]].concat(A(a.splice(1,o))).join(this.formatSeparator)}return a.reduce(function(e,t){var a=Et(t),o=a.formatName,s=a.formatOptions;if(i.formats[o]){var u=e;try{var l,c=(null==r||null===(l=r.formatParams)||void 0===l?void 0:l[r.interpolationkey])||{},h=c.locale||c.lng||r.locale||r.lng||n;u=i.formats[o](e,h,E(E(E({},s),r),c))}catch(e){i.logger.warn(e)}return u}return i.logger.warn("there was no format function for ".concat(o)),e},e)}}])}(),At=function(e){function t(e,n,i){var r,a,s,l=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return u(this,t),(s=o(this,t)).backend=e,s.store=n,s.services=i,s.languageUtils=i.languageUtils,s.options=l,s.logger=ot.create("backendConnector"),s.waitingReads=[],s.maxParallelReads=l.maxParallelReads||10,s.readingCalls=0,s.maxRetries=l.maxRetries>=0?l.maxRetries:5,s.retryTimeout=l.retryTimeout>=1?l.retryTimeout:350,s.state={},s.queue=[],null===(r=s.backend)||void 0===r||null===(a=r.init)||void 0===a||a.call(r,i,l.backend,l),s}return v(t,e),p(t,[{key:"queueLoad",value:function(e,t,n,i){var r=this,a={},o={},s={},u={};return e.forEach(function(e){var i=!0;t.forEach(function(t){var s="".concat(e,"|").concat(t);!n.reload&&r.store.hasResourceBundle(e,t)?r.state[s]=2:r.state[s]<0||(1===r.state[s]?void 0===o[s]&&(o[s]=!0):(r.state[s]=1,i=!1,void 0===o[s]&&(o[s]=!0),void 0===a[s]&&(a[s]=!0),void 0===u[t]&&(u[t]=!0)))}),i||(s[e]=!0)}),(Object.keys(a).length||Object.keys(o).length)&&this.queue.push({pending:o,pendingCount:Object.keys(o).length,loaded:{},errors:[],callback:i}),{toLoad:Object.keys(a),pending:Object.keys(o),toLoadLanguages:Object.keys(s),toLoadNamespaces:Object.keys(u)}}},{key:"loaded",value:function(e,t,n){var i=e.split("|"),r=i[0],a=i[1];t&&this.emit("failedLoading",r,a,t),!t&&n&&this.store.addResourceBundle(r,a,n,void 0,void 0,{skipCopy:!0}),this.state[e]=t?-1:2,t&&n&&(this.state[e]=0);var o={};this.queue.forEach(function(n){var i,s,u,l,c;i=n.loaded,s=a,u=Xe(i,[r],Object),l=u.obj,c=u.k,l[c]=l[c]||[],l[c].push(s),function(e,t){void 0!==e.pending[t]&&(delete e.pending[t],e.pendingCount--)}(n,e),t&&n.errors.push(t),0!==n.pendingCount||n.done||(Object.keys(n.loaded).forEach(function(e){o[e]||(o[e]={});var t=n.loaded[e];t.length&&t.forEach(function(t){void 0===o[e][t]&&(o[e][t]=!0)})}),n.done=!0,n.errors.length?n.callback(n.errors):n.callback())}),this.emit("loaded",o),this.queue=this.queue.filter(function(e){return!e.done})}},{key:"read",value:function(e,t,n){var i=this,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,a=arguments.length>4&&void 0!==arguments[4]?arguments[4]:this.retryTimeout,o=arguments.length>5?arguments[5]:void 0;if(!e.length)return o(null,{});if(this.readingCalls>=this.maxParallelReads)this.waitingReads.push({lng:e,ns:t,fcName:n,tried:r,wait:a,callback:o});else{this.readingCalls++;var s=function(s,u){if(i.readingCalls--,i.waitingReads.length>0){var l=i.waitingReads.shift();i.read(l.lng,l.ns,l.fcName,l.tried,l.wait,l.callback)}s&&u&&r<i.maxRetries?setTimeout(function(){i.read.call(i,e,t,n,r+1,2*a,o)},a):o(s,u)},u=this.backend[n].bind(this.backend);if(2!==u.length)return u(e,t,s);try{var l=u(e,t);l&&"function"==typeof l.then?l.then(function(e){return s(null,e)}).catch(s):s(null,l)}catch(e){s(e)}}}},{key:"prepareLoading",value:function(e,t){var n=this,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=arguments.length>3?arguments[3]:void 0;if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),r&&r();He(e)&&(e=this.languageUtils.toResolveHierarchy(e)),He(t)&&(t=[t]);var a=this.queueLoad(e,t,i,r);if(!a.toLoad.length)return a.pending.length||r(),null;a.toLoad.forEach(function(e){n.loadOne(e)})}},{key:"load",value:function(e,t,n){this.prepareLoading(e,t,{},n)}},{key:"reload",value:function(e,t,n){this.prepareLoading(e,t,{reload:!0},n)}},{key:"loadOne",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",i=e.split("|"),r=i[0],a=i[1];this.read(r,a,"read",void 0,void 0,function(i,o){i&&t.logger.warn("".concat(n,"loading namespace ").concat(a," for language ").concat(r," failed"),i),!i&&o&&t.logger.log("".concat(n,"loaded namespace ").concat(a," for language ").concat(r),o),t.loaded(e,i,o)})}},{key:"saveMissing",value:function(e,t,n,i,r){var a,o,s,u=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{},l=arguments.length>6&&void 0!==arguments[6]?arguments[6]:function(){};if(null===(a=this.services)||void 0===a||null===(a=a.utils)||void 0===a||!a.hasLoadedNamespace||null!==(o=this.services)&&void 0!==o&&null!==(o=o.utils)&&void 0!==o&&o.hasLoadedNamespace(t)){if(null!=n&&""!==n){if(null!==(s=this.backend)&&void 0!==s&&s.create){var c=E(E({},u),{},{isUpdate:r}),h=this.backend.create.bind(this.backend);if(h.length<6)try{var d;(d=5===h.length?h(e,t,n,i,c):h(e,t,n,i))&&"function"==typeof d.then?d.then(function(e){return l(null,e)}).catch(l):l(null,d)}catch(e){l(e)}else h(e,t,n,i,l,c)}e&&e[0]&&this.store.addResource(e[0],t,n,i)}}else this.logger.warn('did not save key "'.concat(n,'" as the namespace "').concat(t,'" was not yet loaded'),"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")}}])}(st),Ct=function(){return{debug:!1,initAsync:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!1,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:function(e){var t={};if("object"===T(e[1])&&(t=e[1]),He(e[1])&&(t.defaultValue=e[1]),He(e[2])&&(t.tDescription=e[2]),"object"===T(e[2])||"object"===T(e[3])){var n=e[3]||e[2];Object.keys(n).forEach(function(e){t[e]=n[e]})}return t},interpolation:{escapeValue:!0,format:function(e){return e},prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0},cacheInBuiltFormats:!0}},Tt=function(e){var t,n;return He(e.ns)&&(e.ns=[e.ns]),He(e.fallbackLng)&&(e.fallbackLng=[e.fallbackLng]),He(e.fallbackNS)&&(e.fallbackNS=[e.fallbackNS]),(null===(t=e.supportedLngs)||void 0===t||null===(n=t.indexOf)||void 0===n?void 0:n.call(t,"cimode"))<0&&(e.supportedLngs=e.supportedLngs.concat(["cimode"])),"boolean"==typeof e.initImmediate&&(e.initAsync=e.initImmediate),e},Pt=function(){},Ft="__i18next_supportNoticeShown",Bt=function(e){function t(){var e,n,i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=arguments.length>1?arguments[1]:void 0;if(u(this,t),(e=o(this,t)).options=Tt(i),e.services={},e.logger=ot,e.modules={external:[]},n=e,Object.getOwnPropertyNames(Object.getPrototypeOf(n)).forEach(function(e){"function"==typeof n[e]&&(n[e]=n[e].bind(n))}),r&&!e.isInitialized&&!i.isClone){if(!e.options.initAsync)return e.init(i,r),w(e,e);setTimeout(function(){e.init(i,r)},0)}return e}return v(t,e),p(t,[{key:"init",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;this.isInitializing=!0,"function"==typeof t&&(n=t,t={}),null==t.defaultNS&&t.ns&&(He(t.ns)?t.defaultNS=t.ns:t.ns.indexOf("translation")<0&&(t.defaultNS=t.ns[0]));var i,r,a,o,s,u,l=Ct();this.options=E(E(E({},l),this.options),Tt(t)),this.options.interpolation=E(E({},l.interpolation),this.options.interpolation),void 0!==t.keySeparator&&(this.options.userDefinedKeySeparator=t.keySeparator),void 0!==t.nsSeparator&&(this.options.userDefinedNsSeparator=t.nsSeparator),"function"!=typeof this.options.overloadTranslationOptionHandler&&(this.options.overloadTranslationOptionHandler=l.overloadTranslationOptionHandler),!1===this.options.showSupportNotice||((null==(i=this)||null===(r=i.modules)||void 0===r||null===(r=r.backend)||void 0===r||null===(r=r.name)||void 0===r?void 0:r.indexOf("Locize"))>0||(null==i||null===(a=i.modules)||void 0===a||null===(a=a.backend)||void 0===a||null===(a=a.constructor)||void 0===a||null===(a=a.name)||void 0===a?void 0:a.indexOf("Locize"))>0||null!=i&&null!==(o=i.options)&&void 0!==o&&null!==(o=o.backend)&&void 0!==o&&o.backends&&i.options.backend.backends.some(function(e){var t,n;return(null==e||null===(t=e.name)||void 0===t?void 0:t.indexOf("Locize"))>0||(null==e||null===(n=e.constructor)||void 0===n||null===(n=n.name)||void 0===n?void 0:n.indexOf("Locize"))>0})||null!=i&&null!==(s=i.options)&&void 0!==s&&null!==(s=s.backend)&&void 0!==s&&s.projectId||null!=i&&null!==(u=i.options)&&void 0!==u&&null!==(u=u.backend)&&void 0!==u&&u.backendOptions&&i.options.backend.backendOptions.some(function(e){return null==e?void 0:e.projectId}))||"undefined"!=typeof globalThis&&globalThis[Ft]||("undefined"!=typeof console&&void 0!==console.info&&console.info("🌐 i18next is made possible by our own product, Locize — consider powering your project with managed localization (AI, CDN, integrations): https://locize.com 💙"),"undefined"!=typeof globalThis&&(globalThis[Ft]=!0));var c=function(e){return e?"function"==typeof e?new e:e:null};if(!this.options.isClone){var h;this.modules.logger?ot.init(c(this.modules.logger),this.options):ot.init(null,this.options),h=this.modules.formatter?this.modules.formatter:Dt;var d=new mt(this.options);this.store=new ut(this.options.resources,this.options);var p=this.services;p.logger=ot,p.resourceStore=this.store,p.languageUtils=d,p.pluralResolver=new yt(d,{prepend:this.options.pluralSeparator,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),this.options.interpolation.format&&this.options.interpolation.format!==l.interpolation.format&&this.logger.deprecate("init: you are still using the legacy format function, please use the new approach: https://www.i18next.com/translation-function/formatting"),!h||this.options.interpolation.format&&this.options.interpolation.format!==l.interpolation.format||(p.formatter=c(h),p.formatter.init&&p.formatter.init(p,this.options),this.options.interpolation.format=p.formatter.format.bind(p.formatter)),p.interpolator=new St(this.options),p.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},p.backendConnector=new At(c(this.modules.backend),p.resourceStore,p,this.options),p.backendConnector.on("*",function(t){for(var n=arguments.length,i=new Array(n>1?n-1:0),r=1;r<n;r++)i[r-1]=arguments[r];e.emit.apply(e,[t].concat(i))}),this.modules.languageDetector&&(p.languageDetector=c(this.modules.languageDetector),p.languageDetector.init&&p.languageDetector.init(p,this.options.detection,this.options)),this.modules.i18nFormat&&(p.i18nFormat=c(this.modules.i18nFormat),p.i18nFormat.init&&p.i18nFormat.init(this)),this.translator=new ft(this.services,this.options),this.translator.on("*",function(t){for(var n=arguments.length,i=new Array(n>1?n-1:0),r=1;r<n;r++)i[r-1]=arguments[r];e.emit.apply(e,[t].concat(i))}),this.modules.external.forEach(function(t){t.init&&t.init(e)})}if(this.format=this.options.interpolation.format,n||(n=Pt),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){var f=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);f.length>0&&"dev"!==f[0]&&(this.options.lng=f[0])}this.services.languageDetector||this.options.lng||this.logger.warn("init: no languageDetector is used and no lng is defined");["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"].forEach(function(t){e[t]=function(){var n;return(n=e.store)[t].apply(n,arguments)}});["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(function(t){e[t]=function(){var n;return(n=e.store)[t].apply(n,arguments),e}});var m=ze(),g=function(){var t=function(t,i){e.isInitializing=!1,e.isInitialized&&!e.initializedStoreOnce&&e.logger.warn("init: i18next is already initialized. You should call init just once!"),e.isInitialized=!0,e.options.isClone||e.logger.log("initialized",e.options),e.emit("initialized",e.options),m.resolve(i),n(t,i)};if(e.languages&&!e.isInitialized)return t(null,e.t.bind(e));e.changeLanguage(e.options.lng,t)};return this.options.resources||!this.options.initAsync?g():setTimeout(g,0),m}},{key:"loadResources",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Pt,i=He(e)?e:this.language;if("function"==typeof e&&(n=e),!this.options.resources||this.options.partialBundledLanguages){var r,a;if("cimode"===(null==i?void 0:i.toLowerCase())&&(!this.options.preload||0===this.options.preload.length))return n();var o=[],s=function(e){e&&("cimode"!==e&&t.services.languageUtils.toResolveHierarchy(e).forEach(function(e){"cimode"!==e&&o.indexOf(e)<0&&o.push(e)}))};if(i)s(i);else this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(function(e){return s(e)});null===(r=this.options.preload)||void 0===r||null===(a=r.forEach)||void 0===a||a.call(r,function(e){return s(e)}),this.services.backendConnector.load(o,this.options.ns,function(e){e||t.resolvedLanguage||!t.language||t.setResolvedLanguage(t.language),n(e)})}else n(null)}},{key:"reloadResources",value:function(e,t,n){var i=ze();return"function"==typeof e&&(n=e,e=void 0),"function"==typeof t&&(n=t,t=void 0),e||(e=this.languages),t||(t=this.options.ns),n||(n=Pt),this.services.backendConnector.reload(e,t,function(e){i.resolve(),n(e)}),i}},{key:"use",value:function(e){if(!e)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!e.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return"backend"===e.type&&(this.modules.backend=e),("logger"===e.type||e.log&&e.warn&&e.error)&&(this.modules.logger=e),"languageDetector"===e.type&&(this.modules.languageDetector=e),"i18nFormat"===e.type&&(this.modules.i18nFormat=e),"postProcessor"===e.type&<.addPostProcessor(e),"formatter"===e.type&&(this.modules.formatter=e),"3rdParty"===e.type&&this.modules.external.push(e),this}},{key:"setResolvedLanguage",value:function(e){if(e&&this.languages&&!(["cimode","dev"].indexOf(e)>-1)){for(var t=0;t<this.languages.length;t++){var n=this.languages[t];if(!(["cimode","dev"].indexOf(n)>-1)&&this.store.hasLanguageSomeTranslations(n)){this.resolvedLanguage=n;break}}!this.resolvedLanguage&&this.languages.indexOf(e)<0&&this.store.hasLanguageSomeTranslations(e)&&(this.resolvedLanguage=e,this.languages.unshift(e))}}},{key:"changeLanguage",value:function(e,t){var n=this;this.isLanguageChangingTo=e;var i=ze();this.emit("languageChanging",e);var r=function(e){n.language=e,n.languages=n.services.languageUtils.toResolveHierarchy(e),n.resolvedLanguage=void 0,n.setResolvedLanguage(e)},a=function(a){e||a||!n.services.languageDetector||(a=[]);var o,s,u=He(a)?a:a&&a[0],l=n.store.hasLanguageSomeTranslations(u)?u:n.services.languageUtils.getBestMatchFromCodes(He(a)?[a]:a);l&&(n.language||r(l),n.translator.language||n.translator.changeLanguage(l),null===(o=n.services.languageDetector)||void 0===o||null===(s=o.cacheUserLanguage)||void 0===s||s.call(o,l));n.loadResources(l,function(a){!function(a,o){o?n.isLanguageChangingTo===e&&(r(o),n.translator.changeLanguage(o),n.isLanguageChangingTo=void 0,n.emit("languageChanged",o),n.logger.log("languageChanged",o)):n.isLanguageChangingTo=void 0,i.resolve(function(){return n.t.apply(n,arguments)}),t&&t(a,function(){return n.t.apply(n,arguments)})}(a,l)})};return e||!this.services.languageDetector||this.services.languageDetector.async?!e&&this.services.languageDetector&&this.services.languageDetector.async?0===this.services.languageDetector.detect.length?this.services.languageDetector.detect().then(a):this.services.languageDetector.detect(a):a(e):a(this.services.languageDetector.detect()),i}},{key:"getFixedT",value:function(e,t,n){var i=this,r=function(e,t){var a;if("object"!==T(t)){for(var o=arguments.length,s=new Array(o>2?o-2:0),u=2;u<o;u++)s[u-2]=arguments[u];a=i.options.overloadTranslationOptionHandler([e,t].concat(s))}else a=E({},t);a.lng=a.lng||r.lng,a.lngs=a.lngs||r.lngs,a.ns=a.ns||r.ns,""!==a.keyPrefix&&(a.keyPrefix=a.keyPrefix||n||r.keyPrefix);var l,c=i.options.keySeparator||".";return a.keyPrefix&&Array.isArray(e)?l=e.map(function(e){return"function"==typeof e&&(e=ht(e,E(E({},i.options),t))),"".concat(a.keyPrefix).concat(c).concat(e)}):("function"==typeof e&&(e=ht(e,E(E({},i.options),t))),l=a.keyPrefix?"".concat(a.keyPrefix).concat(c).concat(e):e),i.t(l,a)};return He(e)?r.lng=e:r.lngs=e,r.ns=t,r.keyPrefix=n,r}},{key:"t",value:function(){for(var e,t=arguments.length,n=new Array(t),i=0;i<t;i++)n[i]=arguments[i];return null===(e=this.translator)||void 0===e?void 0:e.translate.apply(e,n)}},{key:"exists",value:function(){for(var e,t=arguments.length,n=new Array(t),i=0;i<t;i++)n[i]=arguments[i];return null===(e=this.translator)||void 0===e?void 0:e.exists.apply(e,n)}},{key:"setDefaultNamespace",value:function(e){this.options.defaultNS=e}},{key:"hasLoadedNamespace",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;var i=n.lng||this.resolvedLanguage||this.languages[0],r=!!this.options&&this.options.fallbackLng,a=this.languages[this.languages.length-1];if("cimode"===i.toLowerCase())return!0;var o=function(e,n){var i=t.services.backendConnector.state["".concat(e,"|").concat(n)];return-1===i||0===i||2===i};if(n.precheck){var s=n.precheck(this,o);if(void 0!==s)return s}return!!this.hasResourceBundle(i,e)||(!(this.services.backendConnector.backend&&(!this.options.resources||this.options.partialBundledLanguages))||!(!o(i,e)||r&&!o(a,e)))}},{key:"loadNamespaces",value:function(e,t){var n=this,i=ze();return this.options.ns?(He(e)&&(e=[e]),e.forEach(function(e){n.options.ns.indexOf(e)<0&&n.options.ns.push(e)}),this.loadResources(function(e){i.resolve(),t&&t(e)}),i):(t&&t(),Promise.resolve())}},{key:"loadLanguages",value:function(e,t){var n=this,i=ze();He(e)&&(e=[e]);var r=this.options.preload||[],a=e.filter(function(e){return r.indexOf(e)<0&&n.services.languageUtils.isSupportedCode(e)});return a.length?(this.options.preload=r.concat(a),this.loadResources(function(e){i.resolve(),t&&t(e)}),i):(t&&t(),Promise.resolve())}},{key:"dir",value:function(e){var t,n;if(e||(e=this.resolvedLanguage||((null===(t=this.languages)||void 0===t?void 0:t.length)>0?this.languages[0]:this.language)),!e)return"rtl";try{var i=new Intl.Locale(e);if(i&&i.getTextInfo){var r=i.getTextInfo();if(r&&r.direction)return r.direction}}catch(e){}var a=(null===(n=this.services)||void 0===n?void 0:n.languageUtils)||new mt(Ct());return e.toLowerCase().indexOf("-latn")>1?"ltr":["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam","ckb"].indexOf(a.getLanguagePartFromCode(e))>-1||e.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}},{key:"cloneInstance",value:function(){var e=this,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Pt,r=n.forkResourceStore;r&&delete n.forkResourceStore;var a=E(E(E({},this.options),n),{isClone:!0}),o=new t(a);void 0===n.debug&&void 0===n.prefix||(o.logger=o.logger.clone(n));if(["store","services","language"].forEach(function(t){o[t]=e[t]}),o.services=E({},this.services),o.services.utils={hasLoadedNamespace:o.hasLoadedNamespace.bind(o)},r){var s=Object.keys(this.store.data).reduce(function(t,n){return t[n]=E({},e.store.data[n]),t[n]=Object.keys(t[n]).reduce(function(e,i){return e[i]=E({},t[n][i]),e},t[n]),t},{});o.store=new ut(s,a),o.services.resourceStore=o.store}if(n.interpolation){var u=E(E(E({},Ct().interpolation),this.options.interpolation),n.interpolation),l=E(E({},a),{},{interpolation:u});o.services.interpolator=new St(l)}return o.translator=new ft(o.services,a),o.translator.on("*",function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),i=1;i<t;i++)n[i-1]=arguments[i];o.emit.apply(o,[e].concat(n))}),o.init(a,i),o.translator.options=a,o.translator.backendConnector.services.utils={hasLoadedNamespace:o.hasLoadedNamespace.bind(o)},o}},{key:"toJSON",value:function(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}],[{key:"createInstance",value:function(){var e=new t(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},arguments.length>1?arguments[1]:void 0);return e.createInstance=t.createInstance,e}}])}(st),It=Bt.createInstance();It.createInstance,It.dir,It.init,It.loadResources,It.reloadResources,It.use,It.changeLanguage,It.getFixedT;var Lt=It.t;It.exists,It.setDefaultNamespace,It.hasLoadedNamespace,It.loadNamespaces,It.loadLanguages;var Ot={en:{translation:{settings:{phoneSync:{title:"Phone sync",subtitle:"Pair a phone to change settings from it",intro:"Scan the code with your phone's camera to pair it. No typing needed.",address:"Or open {{url}} on your phone and enter the code.",code:"Pairing code: {{code}}",waiting:"Phone sync needs AxoTube's TV service. On a Samsung TV, open this panel again in a few seconds. On other devices, phone sync is not available.",qrHint:"Scan this with your phone's camera. The code is in the QR, so there is nothing to type.",noQr:"No phone address found. Check that the TV is on the same Wi-Fi as your phone, then open this again."},ttSettings:{title:"AxoTube Settings",summary:"Open AxoTube Settings",madeByText:"Made by Aayush with ❤️"},seconds:"{{count}} s",minutes:"{{count}} min",hintBack:"◀ Back",hintClose:"◀ Close",common:{auto:"Auto",any:"Any"},segmentModes:{skip:"Skip automatically",show:"Show skip button",off:"Off"},ads:{title:"Ads & sponsors",subtitle:"Ad blocking and SponsorBlock",blockAds:"Block ads",paidPromotion:"Show paid promotion notices",sponsorBlock:"Enable SponsorBlock",playerTracking:"Block player ad tracking",adTelemetry:"Block ad telemetry",viewStats:"Block view statistics",liveVideos:"Hide Live shelf",topLiveGames:"Hide Top Live Games shelf",mostRelevant:"Hide Most Relevant shelf",segmentTypes:{title:"Segment types",subtitle:"Press OK to change a type. It cycles through: skip automatically, show a skip button, off."},segments:{sponsor:"Sponsors",intro:"Intros",outro:"Outros",interaction:"Interaction reminders",selfpromo:"Self-promotion",preview:"Previews and recaps",filler:"Tangents and jokes",music_offtopic:"Off-topic music"},highlightButton:"Show highlight button",notices:"Show SponsorBlock notices"},playback:{title:"Playback",subtitle:"Quality, speed and captions",quality:{title:"Video quality",subtitle:"Quality used when a video starts. The closest available one is used if needed."},codec:{title:"Video codec",subtitle:"Preferred codec. Any lets YouTube choose."},speedStep:{title:"Speed step",subtitle:"How much each speed button press changes the playback speed."},frameRate:{title:"Frame rate",subtitle:"Switch the TV's refresh rate to match the video.",match:"Match video frame rate",pause:{title:"Pause during switch",subtitle:"Playback pauses for this long while the TV changes its refresh rate."}},pauseInBackground:"Out-of-focus pause (also when menus or panels open)",remainingTime:"Show time remaining",captions:{title:"Captions",subtitle:"Turn captions on by default, and choose the language they use.",onByDefault:"Subtitles on by default",language:{title:"Subtitle language",subtitle:"Preferred language for automatic captions."},allowAuto:"Allow auto-generated captions",myLanguage:"Show captions in my language",otherLanguages:"Show other languages"},languages:{en:"English",hi:"Hindi",es:"Spanish",fr:"French",de:"German",pt:"Portuguese",ja:"Japanese",ko:"Korean",ru:"Russian"},experimental:{title:"Higher resolutions (experimental)",subtitle:"Lets YouTube offer resolutions above the TV screen size. Can stutter on limited TVs. Restarts the app when changed.",unlock:"Unlock 1440p and 4K",max:{title:"Maximum resolution",subtitle:"Highest resolution YouTube may offer while the unlock is on."}},panelShrink:{title:"Video size while reading",subtitle:"Shrinks the video when the description or comments are open.",on:"Shrink video for description and comments",size:{title:"Video size",subtitle:"How large the video stays while a panel is open."}}},playerControls:{title:"Player controls",subtitle:"Extra buttons in the player. Turn on the first option to use the others.",customize:"Extra player buttons",previousNext:"Previous and next",speed:"Speed button",superThanks:"Super Thanks button",miniPlayer:"Mini player button",pipInsteadOfMini:"Use picture-in-picture instead of mini player",onePress:"One-press remote mode (OK plays or pauses, left and right skip 10 s)",hints:{customize:"Master switch for the extra buttons below. Off shows YouTube's own player buttons only.",previousNext:"Adds previous and next buttons to the player. Needs the switch above.",speed:"Shows a button that changes the playback speed.",superThanks:"Shows or hides the Super Thanks button.",miniPlayer:"Adds a button that shrinks the video into a mini player.",pipInsteadOfMini:"That button opens picture-in-picture instead of the mini player.",paidPromotion:"Shows a notice on videos with paid promotion.",onePress:"Remote-friendly controls: OK plays or pauses, left and right skip 10 seconds."}},browsing:{title:"Browsing",subtitle:"Thumbnails, previews and what appears on screen",thumbnails:{title:"Thumbnails and titles",subtitle:"DeArrow shows community titles and thumbnails in place of clickbait. Service: dearrow.ajay.app"},hqThumbnails:"High-quality thumbnails",deArrowTitles:"DeArrow titles",deArrowThumbnails:"DeArrow thumbnails",previews:{title:"Video previews",subtitle:"Plays a short preview when a video is focused.",on:"Show video previews",length:"Preview length"},hideWatched:{title:"Hide watched videos",subtitle:"Hides videos you have mostly watched.",on:"Hide watched videos",threshold:{title:"Watched threshold",subtitle:"Videos watched past this percentage are hidden."},pages:{title:"Hide on these pages",subtitle:"Pages where watched videos are hidden."}},shorts:"Show Shorts",endScreens:"Hide end screen cards",longPress:"Long press OK to add to queue",stillWatching:'Show "Are you still watching?" prompts',deArrowPeek:"Long press shows the other title and thumbnail"},home:{title:"Home & sidebar",subtitle:"Startup page and sidebar items",startup:{title:"Startup page",subtitle:"The page AxoTube opens at launch."},reloadHome:"Reload home on startup",sidebarItems:{title:"Hide sidebar items",subtitle:"Selected items are hidden from the sidebar."},hideChannels:"Hide channels from the sidebar",sortSubscriptions:"Sort subscriptions A to Z"},appearance:{title:"Appearance",subtitle:"Colours, clock, dimming and performance",theme:{title:"Theme",subtitle:"Colours used across the interface.",presets:{title:"Preset",subtitle:"A ready-made colour set."},background:{title:"Background colour",subtitle:"Colour behind the main content."},text:{title:"Text colour",subtitle:"Colour of the text in the interface."}},colors:{default:"Default (dark)",black:"Black",darkGray:"Dark gray",charcoal:"Charcoal",navy:"Navy blue",darkRed:"Dark red",darkGreen:"Dark green",darkPurple:"Dark purple"},textColors:{default:"Default",white:"White",gray:"Gray",red:"Red",blue:"Blue",green:"Green",purple:"Purple",yellow:"Yellow"},dimming:{title:"Screen dimming",subtitle:"Dims the screen when you stop interacting.",on:"Dim the screen when idle",timeout:{title:"Dim after",subtitle:"How long to wait before the screen dims."},opacity:{title:"Dimming strength",subtitle:"How dark the screen gets."}},fullAnimations:"Full-quality animations",performance:"Performance mode (memory part applies after reload)",clock:{title:"Clock",subtitle:"Show the time on screen.",show:{title:"When to show",subtitle:"Always, or only while no video is playing.",off:"Off",always:"Always",notPlaying:"When no video is playing"},format:{title:"Time format",subtitle:"24-hour, or 12-hour with or without AM and PM.",h24:"24-hour (14:05)",h12:"12-hour with AM/PM (2:05 PM)",h12NoAmPm:"12-hour, no AM/PM (2:05)"},position:{title:"Position",subtitle:"Corner of the screen for the clock.",topLeft:"Top left",topRight:"Top right",bottomLeft:"Bottom left",bottomRight:"Bottom right"},seconds:"Show seconds"}},system:{title:"System",subtitle:"Memory, accounts and updates",whosWatching:{title:"Who's watching menu",subtitle:"Choose a profile when the app starts.",on:"Show who's watching menu",always:"Always show it",onExit:"Show when leaving the app"},signInReminder:"Sign-in reminder for guests",welcome:"Welcome message",updates:{title:"Updates",subtitle:"Version {{version}}. Checks for new releases.",checkNow:"Check for updates now",onStartup:"Check for updates on startup"},reload:"Reload AxoTube",restartCast:"Restart cast receiver"},about:{title:"About AxoTube",version:"Version {{version}}",scanMessage:"Scan the QR code to open {{name}}.",subtitle:"Versions and status",userscript:"✅ Userscript {{version}}, running",serviceOnline:"✅ Service {{version}}, online on port 8090",serviceOffline:"⚠️ Service not reachable on port 8090",proxyOnline:"✅ Proxy {{version}}, online on port 8081",proxyOffline:"⚠️ Proxy not reachable on port 8081",bundleCurrent:"📦 App bundle {{version}}",bundleUpdate:"📦 App bundle {{current}}, update {{latest}} ready",bundleUnknown:"📦 App bundle not checked yet",launchMode:"🚀 Launch mode: {{mode}}",launchUnknown:"🚀 Launch mode unknown while the service is not running",socials:{title:"🔗 Socials",subtitle:"Pick one to show its QR code.",githubHint:"Source code, releases and issues",discordHint:"Community chat"}},webConfig:{title:"Web config",subtitle:"Pairing code, phone address and service status",online:"AxoTube service: online",offline:"AxoTube service is not running, so the web config page is not available.",qrTitle:"📱 Pair with your phone",qrSubtitle:"Show a code for your phone to scan",rowHint:"Also on your phone: background image and more"},status:{checking:"Checking the services…"},advanced:{title:"Advanced",subtitle:"Diagnostics, user agent and launch mode",diagnostics:{title:"Diagnostics page",subtitle:"Launch log, versions and what the app last did"},userAgent:{title:"User agent",subtitle:"The browser identity YouTube sees. Takes effect after AxoTube reloads. The phone agent is experimental on TV.",samsung:"Samsung TV (default)",android:"Android phone (experimental)"},launch:{title:"Launch mode",subtitle:"Applies the next time AxoTube starts. SDB needs developer mode on the TV.",proxy:"Proxy (recommended)",debugger:"SDB debugger launch",proxyShort:"proxy",debuggerShort:"SDB debugger",saved:"Launch mode saved. It applies the next time AxoTube starts.",failed:"Could not save the launch mode. Is AxoTube running?"}},moreOnWeb:{text:"More settings, like a background image, are on the web config page."},axotube:{title:"AxoTube",subtitle:"Web config, updates, who’s watching and startup behaviour of AxoTube"}},welcomeMsg:{title:"Welcome to AxoTube",subtitle:"Go to settings and click on AxoTube Settings for settings."},sponsorblock:{segments:{sponsor:"sponsored segment",intro:"intro",outro:"outro",interaction:"interaction reminder",selfpromo:"self-promotion",preview:"recap or preview",filler:"tangents",music_offtopic:"non-music part",poi_highlight:"highlight"},toasts:{skipping:"Skipping {{segment}}",notSkipping:"Not skipping {{segment}} (was skipped {{count}} times)",skip:"Skip {{segment}}",skipToHighlight:"Skip to highlight",undone:"Skip undone: {{segment}}"}},app:{name:"axotube"},menu:{play:"Play",saveWatchLater:"Save to Watch Later",saveToPlaylist:"Save to Playlist",addToQueue:"Add to Queue"},player:{miniPlayer:"Mini Player",pictureInPicture:"Picture in Picture",speedControls:"Speed Controls",previous:"Previous",next:"Next",withAxotube:"with axotube"},toasts:{queueAdded:"Video added to queue.",queueAddFailed:"Nothing to add to the queue.",queueCleared:"Video queue cleared.",updateDownloading:"Downloading update, please wait...",upToDate:"You are on the latest version ({{version}}).",updateNoApk:"Version {{version}} is available, but no compatible APK was found in the release.",updateCheckFailed:"Could not check for updates.",serviceConnected:"Service connected",commandReceived:"Command received",pairingWithUrl:"Open {{url}} on your phone · code {{code}}",pairingCodeOnly:"Phone pairing code: {{code}}",updateApplyFailed:"The update could not be applied. Try again later.",castRestarted:"Cast receiver restarted. Phones should see the TV again shortly.",castRestarting:"Restarting cast receiver…",castRestartWait:"Cast receiver was just restarted. Try again in a few seconds.",castRestartFailed:"Could not restart the cast receiver.",castRestartNotRunning:"Cast discovery is not running. Restart the app to bring it back.",castRestartUnsupported:"Restarting cast is not available on this device."},playback:{retryPrompt:"Playback stopped at {{time}}. Press blue to retry from there."},updater:{reloadWhenPaused:"Update installed. It takes effect when playback pauses or the video ends.",modalTitle:"Update Available",modalBody:"A new version of axotube is available: {{latest}}\nCurrent version: {{current}}\nRelease date: {{date}}\nRelease notes:",unknownDate:"Unknown",updateNow:"Update Now",updateNowSubtitle:"Click to download the latest version.",remindLater:"Remind Me Later",remindLaterSubtitle:"Check for updates later.",modalBodyNew:"Version {{latest}} is available. You are on {{current}}. Update now and the page will reload.",applying:"Updating…"}}}};It.init({lng:"en",fallbackLng:"en",resources:Ot,debug:!1,interpolation:{escapeValue:!1}});var Nt;Nt||(Nt=1,function(){function e(e){return void 0===e?0:Number(e)}function t(e,t){return e!==t&&!(isNaN(e)&&isNaN(t))}self.DOMRect=function(n,i,r,a){var o,s,u,l,c,h,d,p;o=e(n),s=e(i),u=e(r),l=e(a),Object.defineProperties(this,{x:{get:function(){return o},set:function(e){t(o,e)&&(o=e,c=h=void 0)},enumerable:!0},y:{get:function(){return s},set:function(e){t(s,e)&&(s=e,d=p=void 0)},enumerable:!0},width:{get:function(){return u},set:function(e){t(u,e)&&(u=e,c=h=void 0)},enumerable:!0},height:{get:function(){return l},set:function(e){t(l,e)&&(l=e,d=p=void 0)},enumerable:!0},left:{get:function(){return void 0===c&&(c=o+Math.min(0,u)),c},enumerable:!0},right:{get:function(){return void 0===h&&(h=o+Math.max(0,u)),h},enumerable:!0},top:{get:function(){return void 0===d&&(d=s+Math.min(0,l)),d},enumerable:!0},bottom:{get:function(){return void 0===p&&(p=s+Math.max(0,l)),p},enumerable:!0}})}}());var Rt=null,Mt=null,_t=null,Ut=null,jt=null,Ht=!1,zt=[];function Vt(){try{return"undefined"==typeof window?null:window._yttv||null}catch(e){return null}}function Kt(e,t){try{var n=e[t],i=n&&n.instance;if(i&&"function"==typeof i.resolveCommand)return{root:n,instance:i}}catch(e){}return null}function Gt(e){if(jt)try{jt(e)}catch(e){}}function Jt(){var e=Vt();if(e){if(e===Rt&&null!==_t){var t=Kt(e,Mt);if(t&&t.root===_t&&t.instance===Ut)return Gt(t.instance),t.instance}Rt=e,_t=null,Ut=null,Mt=null;try{for(var n in e){var i=Kt(e,n);if(i)return Mt=n,_t=i.root,Ut=i.instance,Gt(i.instance),i.instance}}catch(e){}}try{if("undefined"!=typeof window&&"function"==typeof window._yttv_resolveCommand)return{resolveCommand:function(e,t){return window._yttv_resolveCommand(e,t)}}}catch(e){}return null}function Xt(){return!!Jt()}function Wt(e,t){var n=Jt();return n?{dispatched:!0,result:n.resolveCommand(e,t)}:{dispatched:!1}}function qt(e,t){return Wt(e,t).result}function Yt(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!e)return Promise.resolve(!1);var n=void 0===t.maxAttempts?50:t.maxAttempts,i=void 0===t.retryDelayMs?200:t.retryDelayMs;return new Promise(function(t){var r=0;!function a(){var o=Jt();if(o)try{o.resolveCommand(e),t(!0)}catch(e){try{console.warn("[AxoTube:nativeCommand] native command threw after dispatch attempt; not retrying",e)}catch(e){}t(!0)}else r>=n?t(!1):(r+=1,setTimeout(a,i))}()})}function Qt(){var e=Vt();if(!e)return!1;var t=!1;try{for(var n in e){var i=Kt(e,n);i&&(t=!0,Gt(i.instance))}}catch(e){}return t}var Zt=[250,1e3,3e3];function $t(){Qt();var e,t=f(zt);try{for(t.s();!(e=t.n()).done;){var n=e.value;clearTimeout(n)}}catch(e){t.e(e)}finally{t.f()}zt=Zt.map(function(e){return setTimeout(Qt,e)})}function en(e){return ln(Lt("menu.addToQueue"),{clickTrackingParams:null,playlistEditEndpoint:{customAction:{action:"ADD_TO_QUEUE",parameters:e}}})}function tn(e,t){return qt(e,t)}function nn(e,t,n){var i={title:{simpleText:e},subtitle:{simpleText:t},accessibilityData:{accessibilityData:{label:t?"".concat(e," - ").concat(t):e}},trackingParams:"CAEQlYkGGhMI"};n&&n.length>0&&(i.image={thumbnails:n}),tn({openPopupAction:{popupType:"TOAST",popup:{overlayToastRenderer:i}}})}function rn(e,t,n,i){var r=function(e,t,n,i){var r="string"==typeof e?{title:e,subtitle:""}:e||{title:"",subtitle:""},a={openPopupAction:{popupType:"MODAL",popup:{overlaySectionRenderer:{overlay:{overlayTwoPanelRenderer:{actionPanel:{overlayPanelRenderer:{header:{overlayPanelHeaderRenderer:r.overlayPanelHeaderRenderer||{title:{simpleText:r.title}}},content:t}},backButton:{buttonRenderer:{accessibilityData:{accessibilityData:{label:"Back"}},command:{signalAction:{signal:"POPUP_BACK"}}}}}},dismissalCommand:{signalAction:{signal:"POPUP_BACK"}}}},uniqueId:n}};return r.subtitle&&(a.openPopupAction.popup.overlaySectionRenderer.overlay.overlayTwoPanelRenderer.actionPanel.overlayPanelRenderer.header.overlayPanelHeaderRenderer.subtitle={simpleText:r.subtitle}),i&&(a.openPopupAction.shouldMatchUniqueId=!0,a.openPopupAction.updateAction=!0),a}(e,t,n,i);tn(r)}function an(e,t){return{overlayPanelItemListRenderer:{items:e,selectedIndex:t}}}function on(e,t,n){var i={compactLinkRenderer:{serviceEndpoint:{commandExecutorCommand:{commands:n}}}};return e&&(i.compactLinkRenderer.title={simpleText:e.title}),e&&e.subtitle&&(i.compactLinkRenderer.subtitle={simpleText:e.subtitle}),t&&(i.compactLinkRenderer.icon={iconType:t.icon}),t&&t.secondaryIcon&&(i.compactLinkRenderer.secondaryIcon={iconType:t.secondaryIcon}),i}function sn(e,t,n,i,r){return{timelyActionRenderer:{actionButtons:[{buttonRenderer:{isDisabled:!1,text:{runs:[{text:e}]},icon:{iconType:t},trackingParams:null,command:n}}],triggerTimeMs:i,timeoutMs:r,type:""}}}function un(e){return{clickTrackingParams:null,showMenuCommand:{contentId:e.videoId,thumbnail:{thumbnails:e.thumbnails},title:{simpleText:e.title},subtitle:{simpleText:e.subtitle},menu:{menuRenderer:{items:[cn(Lt("menu.play"),{clickTrackingParams:null,watchEndpoint:e.watchEndpointData}),ln(Lt("menu.saveWatchLater"),{clickTrackingParams:null,playlistEditEndpoint:{playlistId:"WL",actions:[{addedVideoId:e.videoId,action:"ACTION_ADD_VIDEO"}]}}),cn(Lt("menu.saveToPlaylist"),{clickTrackingParams:null,addToPlaylistEndpoint:{videoId:e.videoId}}),en(e.item)],trackingParams:null,accessibility:{accessibilityData:{label:"Video options"}}}}}}}function ln(e,t){return{menuServiceItemRenderer:{text:{runs:[{text:e}]},serviceEndpoint:t,trackingParams:null}}}function cn(e,t){return{menuNavigationItemRenderer:{text:{runs:[{text:e}]},navigationEndpoint:t,trackingParams:null}}}function hn(e){return{overlayMessageRenderer:{title:{simpleText:e}}}}function dn(e){return{qrCodeRenderer:{qrCodeImage:{thumbnails:[{url:e}]},style:"QR_CODE_RENDERER_STYLE_ATA_SIDESHEET",trackingParams:null}}}function pn(e,t,n,i){return{isDisabled:e,text:{runs:[{text:t}]},icon:{iconType:n},command:i,trackingParams:null}}function fn(e){try{return e&&"function"==typeof e.getInstance&&e.getInstance()||null}catch(e){return null}}function mn(e){if(!e)return null;try{var t=Object.getPrototypeOf(e);if(!t)return null;var n,i=f(Object.getOwnPropertyNames(t));try{for(i.s();!(n=i.n()).done;){var r=n.value,a=void 0;try{a=e[r]}catch(e){continue}if("function"==typeof a)try{if(a.toString().includes("ytlrActionRouter"))return a}catch(e){}}}catch(e){i.e(e)}finally{i.f()}}catch(e){}return null}function gn(){if(window._yttv){var e=null,t=null;try{for(var n in window._yttv){var i=void 0;try{i=window._yttv[n]}catch(e){continue}if(i&&"function"==typeof i.getInstance){var r=fn(i);if(r){try{if(i.toString().includes("ytlrActionRouter")){t=mn(e=r);break}}catch(e){}var a=mn(r);if(a){e=r,t=a;break}}}}}catch(e){return}if(e&&t){var o=null;try{for(var s in window._yttv){var u=void 0;try{u=window._yttv[s]}catch(e){continue}if("function"==typeof u)try{if(u.toString().includes("this.actionName")){o=u;break}}catch(e){}}}catch(e){}if(o)return{executeFunction:t.bind(e),commandFunction:o}}}}we.addEventListener("configChange",function(e){if("disabledSidebarContents"===e.detail.key||"disableChannelsOnSidebar"===e.detail.key)try{var t=gn();t&&t.executeFunction(new t.commandFunction("reloadGuideAction"))}catch(e){console.warn("[AxoTube:customGuideAction] Guide reload failed:",e)}});var vn=null;var yn=["adSlot","adPlacements","playerAds","promo","Promo","hideLogo","tvMasthead","attestation","adBreak","adClientParams"],bn=["adPlacements","playerAds","adSlots","paidContentOverlay","streamingData","contents","endscreen","messages","entries","title","continuationContents","playerOverlays","transportControls","attestation","adBreakHeartbeatParams","playerResponse"];function xn(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function Sn(e){return!(!e||!e.adSlotRenderer)}function En(e){return!!(e&&e.tileRenderer&&("TVHTML5_TILE_RENDERER_TYPE_SHORTS"===e.tileRenderer.tvhtml5ShelfRendererType||e.tileRenderer.onSelectCommand&&e.tileRenderer.onSelectCommand.reelWatchEndpoint))}function wn(e){if(!e||"object"!==T(e))return!1;for(var t=Object.keys(e),n=0;n<t.length;n++)if(-1!==t[n].toLowerCase().indexOf("promo"))return!0;return!!(e.shelfRenderer&&e.shelfRenderer.tvhtml5Metadata&&e.shelfRenderer.tvhtml5Metadata.hideLogo)}function kn(e){return!(!e||"object"!==T(e)||!e.tvMastheadRenderer)}function Dn(e){if(!e)return"";var t=e.title||e.headerRenderer&&e.headerRenderer.tvHeaderRenderer&&e.headerRenderer.tvHeaderRenderer.title;return t?"string"==typeof t.simpleText?t.simpleText:t.runs&&t.runs[0]&&"string"==typeof t.runs[0].text?t.runs[0].text:"":""}function An(e){return e?/recommend/i.test(e)?null:/top\s+live\s+games?/i.test(e)?"topLiveGames":/most\s+relevant/i.test(e)?"mostRelevant":/^live(\s+now)?$/i.test(e.trim())?"live":null:null}function Cn(e,t){try{if("undefined"==typeof window)return;var n=window.__axotubeAdblockStats||(window.__axotubeAdblockStats={});n[e]=(n[e]||0)+(void 0===t?1:t)}catch(e){}}function Tn(){try{if("undefined"==typeof window||!0!==window.__axotubeAdblockDebug)return;if("undefined"==typeof console)return;var e=["[AxoTube:adblock]"].concat(Array.prototype.slice.call(arguments));console.log.apply(console,e)}catch(e){}}var Pn={};function Fn(e,t){var n=Pn[e];if(n||(n=Pn[e]={errors:0,open:!1}),!n.open)try{return t()}catch(t){return n.errors++,Cn("error:"+e),Tn("filter error",e,t),void(n.errors>=5&&(n.open=!0,"undefined"!=typeof console&&console.warn&&console.warn("[AxoTube:adblock] '"+e+"' disabled after 5 errors this session")))}}var Bn=["attestation","adBreakHeartbeatParams"];function In(e){for(var t=0,n=0;n<Bn.length;n++)xn(e,Bn[n])&&(delete e[Bn[n]],t++);return t}function Ln(e){var t=new Map;return{get:function(e){return t.get(e)},has:function(e){return t.has(e)},set:function(n,i){for(t.set(n,i);t.size>e;)t.delete(t.keys().next().value);return i},delete:function(e){return t.delete(e)},clear:function(){t.clear()}}}var On=["maxresdefault.jpg","sddefault.jpg","hqdefault.jpg","mqdefault.jpg","default.jpg"],Nn={"maxresdefault.jpg":{width:1280,height:720},"sddefault.jpg":{width:640,height:480},"hqdefault.jpg":{width:480,height:360},"mqdefault.jpg":{width:320,height:180},"default.jpg":{width:120,height:90}},Rn=Ln(256),Mn=new Map;function _n(e){if(!e||!e.includes("i.ytimg.com/vi/"))return null;var t=e.match(/\/vi\/([a-zA-Z0-9_-]+)\//);return t?t[1]:null}function Un(e){return Array.isArray(e)&&e.length>0&&e[0].width&&e[0].width>100}var jn=Ln(256);function Hn(e){var t,n=[],i=f(On);try{for(i.s();!(t=i.n()).done;){var r=t.value,a=Nn[r];n.push({url:"https://i.ytimg.com/vi/".concat(e,"/").concat(r),width:a.width,height:a.height})}}catch(e){i.e(e)}finally{i.f()}return n}function zn(e,t){if(e&&"object"===T(e))for(var n in e)"thumbnails"===n&&Un(e[n])?e[n]=t:"object"===T(e[n])&&zn(e[n],t)}var Vn,Kn=(Vn=5e3,function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=null;try{"function"==typeof AbortController&&(n=new AbortController)}catch(e){}var i=n?E(E({},t),{},{signal:n.signal}):t,r=null,a=new Promise(function(e,t){r=setTimeout(function(){try{n&&n.abort()}catch(e){}t(new Error("Fetch timed out after ".concat(Vn,"ms")))},Vn)});return Promise.race([fetch(e,i),a]).finally(function(){null!==r&&clearTimeout(r)})}),Gn=Ln(256),Jn=Ln(256);function Xn(e){return e&&e.titles&&0!==e.titles.length?e.titles.reduce(function(e,t){return e.votes>t.votes?e:t}).title:null}function Wn(e,t){if(!t||!t.thumbnails||0===t.thumbnails.length)return null;var n=t.thumbnails.reduce(function(e,t){return e.votes>t.votes?e:t});return void 0===n.timestamp||null===n.timestamp?null:Number.isFinite(Number(n.timestamp))?[{url:"https://dearrow-thumb.ajay.app/api/v1/getThumbnail?videoID=".concat(e,"&time=").concat(n.timestamp),width:1280,height:640}]:null}function qn(e,t,n,i,r){try{if(i&&n.titles&&n.titles.length>0){var a,o=Xn(n);null!==(a=e.tileRenderer)&&void 0!==a&&null!==(a=a.metadata)&&void 0!==a&&null!==(a=a.tileMetadataRenderer)&&void 0!==a&&a.title&&(e.tileRenderer.metadata.tileMetadataRenderer.title.simpleText=o)}if(r){var s,u=Wn(t,n);u&&null!==(s=e.tileRenderer)&&void 0!==s&&null!==(s=s.header)&&void 0!==s&&null!==(s=s.tileHeaderRenderer)&&void 0!==s&&s.thumbnail&&(e.tileRenderer.header.tileHeaderRenderer.thumbnail.thumbnails=u)}}catch(e){console.warn("[AxoTube:deArrow] Error processing DeArrow data:",e)}}function Yn(e){var t=Se("enableDeArrowTitles"),n=Se("enableDeArrowThumbnails"),i=Se("enableDeArrowPeek");if(t||n||i)for(var r=function(){var i=e[a];if(i.adSlotRenderer)return e.splice(a,1),0;if(!i.tileRenderer)return 0;var r=i.tileRenderer.contentId;if(!r)return 0;!function(e,t){var n,i,r,a;if(!Jn.get(t)){var o=e.tileRenderer;Jn.set(t,{title:null!==(n=null==o||null===(i=o.metadata)||void 0===i||null===(i=i.tileMetadataRenderer)||void 0===i||null===(i=i.title)||void 0===i?void 0:i.simpleText)&&void 0!==n?n:null,thumbnails:null!==(r=null==o||null===(a=o.header)||void 0===a||null===(a=a.tileHeaderRenderer)||void 0===a||null===(a=a.thumbnail)||void 0===a?void 0:a.thumbnails)&&void 0!==r?r:null})}}(i,r);var o={item:i,titlesEnabled:t,thumbnailsEnabled:n},s=Gn.get(r);if(s)return s.data?qn(i,r,s.data,t,n):Array.isArray(s.waiters)&&s.waiters.push(o),0;var u={data:null,waiters:[o]};Gn.set(r,u),Kn("https://sponsor.ajay.app/api/branding?videoID=".concat(r)).then(function(e){if(!e.ok)throw new Error("DeArrow HTTP ".concat(e.status));return e.json()}).then(function(e){u.data=e;var t=u.waiters.slice();u.waiters.length=0;var n,i=f(t);try{for(i.s();!(n=i.n()).done;){var a=n.value;qn(a.item,r,e,a.titlesEnabled,a.thumbnailsEnabled)}}catch(e){i.e(e)}finally{i.f()}}).catch(function(){Gn.get(r)===u&&Gn.delete(r)})},a=e.length-1;a>=0;a--)r()}function Qn(e){var t=e.tileRenderer,n={};return void 0!==t.contentType&&(n.contentType=t.contentType),void 0!==t.style&&(n.style=t.style),void 0!==t.contentId&&(n.contentId=t.contentId),void 0!==t.trackingParams&&(n.trackingParams=t.trackingParams),void 0!==t.metadata&&(n.metadata=ve(t.metadata)),void 0!==t.header&&(n.header=ve(t.header)),void 0!==t.onSelectCommand&&(n.onSelectCommand=ve(t.onSelectCommand)),{tileRenderer:n}}function Zn(e){return e.some(function(e){var t;return"ADD_TO_QUEUE"===(null==e||null===(t=e.menuServiceItemRenderer)||void 0===t||null===(t=t.serviceEndpoint)||void 0===t||null===(t=t.playlistEditEndpoint)||void 0===t||null===(t=t.customAction)||void 0===t?void 0:t.action)})}function $n(e){if(Fe()&&!/#\/watch/.test(location.hash||"")){var t,n=1e3*Se("previewLengthSeconds"),i=f(e);try{for(i.s();!(t=i.n()).done;){var r,a,o,s=t.value;if(s.tileRenderer){var u=null===(r=s.tileRenderer.onSelectCommand)||void 0===r?void 0:r.watchEndpoint;if(u&&!(null!==(a=s.tileRenderer)&&void 0!==a&&null!==(a=a.onFocusCommand)&&void 0!==a&&a.playbackEndpoint||null!==(o=s.tileRenderer)&&void 0!==o&&null!==(o=o.onFocusCommand)&&void 0!==o&&o.commandExecutorCommand)){var l=ve({watchEndpoint:u});s.tileRenderer.onFocusCommand={startInlinePlaybackCommand:{blockAdoption:!0,caption:!1,delayMs:3e3,durationMs:n,muted:!1,restartPlaybackBeforeSeconds:10,resumeVideo:!0,playbackEndpoint:l}}}}}}catch(e){i.e(e)}finally{i.f()}}}function ei(e){if(!Se("enableHideWatchedVideos"))return e;var t=Se("hideWatchedVideosPages");if(!t||!t.length)return e;var n=Se("hideWatchedVideosThreshold"),i=location.hash.substring(1),r=function(e){var t={},n=e.indexOf("?");if(-1===n)return t;for(var i=e.slice(n+1).split("&"),r=0;r<i.length;r++)if(i[r]){var a=i[r].indexOf("="),o=-1===a?i[r]:i[r].slice(0,a),s=-1===a?"":i[r].slice(a+1);try{t[decodeURIComponent(o)]=decodeURIComponent(s)}catch(e){t[o]=s}}return t}(i),a=r.browseId||r.browse_id||"",o="/"===i?"home":i.startsWith("/search")?"search":a.replace("FE","").replace("topics_","");return t.includes(o)?e.filter(function(e){var t;if(!e.tileRenderer)return!0;var i=null===(t=e.tileRenderer.header)||void 0===t||null===(t=t.tileHeaderRenderer)||void 0===t||null===(t=t.thumbnailOverlays)||void 0===t||null===(t=t.find(function(e){return e.thumbnailOverlayResumePlaybackRenderer}))||void 0===t?void 0:t.thumbnailOverlayResumePlaybackRenderer;return!i||(i.percentDurationWatched||0)<=n}):e}function ti(e,t){return function(e){if("eager"===Be()){var t,n=f(e);try{for(n.s();!(t=n.n()).done;){var i=t.value;if(i.tileRenderer)try{var r,a,o,s,u=null===(r=i.tileRenderer.onSelectCommand)||void 0===r||null===(r=r.watchEndpoint)||void 0===r?void 0:r.videoId;if(!u)continue;if((null===(a=i.tileRenderer.header)||void 0===a||null===(a=a.tileHeaderRenderer)||void 0===a||null===(a=a.thumbnail)||void 0===a?void 0:a.thumbnails)===jn.get(u))continue;var l=jn.get(u);l||(l=jn.set(u,Hn(u))),null!==(o=i.tileRenderer.header)&&void 0!==o&&null!==(o=o.tileHeaderRenderer)&&void 0!==o&&null!==(o=o.thumbnail)&&void 0!==o&&o.thumbnails&&(i.tileRenderer.header.tileHeaderRenderer.thumbnail.thumbnails=l),null!==(s=i.tileRenderer.onFocusCommand)&&void 0!==s&&null!==(s=s.startInlinePlaybackCommand)&&void 0!==s&&null!==(s=s.playbackEndpoint)&&void 0!==s&&null!==(s=s.startPlaylistItemEndpoint)&&void 0!==s&&null!==(s=s.playlistItemData)&&void 0!==s&&null!==(s=s.thumbnail)&&void 0!==s&&s.thumbnails&&(i.tileRenderer.onFocusCommand.startInlinePlaybackCommand.playbackEndpoint.startPlaylistItemEndpoint.playlistItemData.thumbnail.thumbnails=l),i.tileRenderer.onFocusCommand&&zn(i.tileRenderer.onFocusCommand,l)}catch(e){console.warn("[AxoTube:hqThumbnails] Error processing thumbnail:",e)}}}catch(e){n.e(e)}finally{n.f()}}}(e),Yn(e),function(e){if(Se("enableLongPress")){var t,n=f(e);try{for(n.s();!(t=n.n()).done;){var i,r,a,o,s,u,l=t.value;if(l.tileRenderer&&"TILE_STYLE_YTLR_DEFAULT"===l.tileRenderer.style&&l.tileRenderer.contentId&&null!==(i=l.tileRenderer.onSelectCommand)&&void 0!==i&&i.watchEndpoint)if(l.tileRenderer.onLongPressCommand){var c,h=null===(c=l.tileRenderer.onLongPressCommand)||void 0===c||null===(c=c.showMenuCommand)||void 0===c||null===(c=c.menu)||void 0===c||null===(c=c.menuRenderer)||void 0===c?void 0:c.items;Array.isArray(h)&&!Zn(h)&&h.push(en(Qn(l)))}else{var d=null===(r=l.tileRenderer.metadata)||void 0===r?void 0:r.tileMetadataRenderer;if(d&&null!==(a=l.tileRenderer.header)&&void 0!==a&&null!==(a=a.tileHeaderRenderer)&&void 0!==a&&null!==(a=a.thumbnail)&&void 0!==a&&a.thumbnails){var p=null===(o=d.lines)||void 0===o||null===(o=o[0])||void 0===o||null===(o=o.lineRenderer)||void 0===o||null===(o=o.items)||void 0===o||null===(o=o[0])||void 0===o||null===(o=o.lineItemRenderer)||void 0===o?void 0:o.text;if(p){var m=(null===(s=p.runs)||void 0===s||null===(s=s[0])||void 0===s?void 0:s.text)||p.simpleText||"",g=Qn(l),v=un({videoId:g.tileRenderer.contentId,thumbnails:g.tileRenderer.header.tileHeaderRenderer.thumbnail.thumbnails,title:(null===(u=d.title)||void 0===u?void 0:u.simpleText)||"",subtitle:m,watchEndpointData:g.tileRenderer.onSelectCommand.watchEndpoint,item:g});l.tileRenderer.onLongPressCommand=v}}}}}catch(e){n.e(e)}finally{n.f()}}}(e),t&&$n(e),ei(e)}function ni(e,t){for(var n=t||{},i=n.optional||{},r=e.length-1;r>=0;r--){var a=e[r];if(a&&"object"===T(a))if(n.removeAds&&(wn(a)||kn(a)))Cn(kn(a)?"bannerRemoved":"shelfRemoved"),e.splice(r,1);else if(a.shelfRenderer){var o=a.shelfRenderer,s=An(Dn(o));if(s&&i[s])Cn("optionalShelfRemoved"),e.splice(r,1);else{var u=o.content&&o.content.horizontalListRenderer;if(u&&u.items)if(n.removeShorts&&"TVHTML5_SHELF_RENDERER_TYPE_SHORTS"===o.tvhtml5ShelfRendererType)e.splice(r,1);else{var l=u.items,c=0;if(n.removeAds||n.removeShorts)(c=l.length-(l=l.filter(function(e){return!(n.removeAds&&Sn(e)||n.removeShorts&&En(e))})).length)&&(u.items=l,Cn("itemRemoved",c));c>0&&0===l.length?(Cn("emptyShelfRemoved"),e.splice(r,1)):u.items=ti(l,!1!==n.addPreviews)}}}}}var ii=["adSlotRenderer","promoShelfRenderer","tvMastheadRenderer"],ri=["adPlacements","adSlots"],ai=["playerAds"],oi=["attestation","adBreakHeartbeatParams"];function si(e){for(var t=0;t<ii.length;t++)if(xn(e,ii[t]))return!0;return!1}function ui(e,t,n){return n.signin?e:function(e,t){return e.filter(function(e){return!(e&&e[t])})}(e,t)}function li(e,t){var n=(Array.isArray(e.timelyActionRenderers)?e.timelyActionRenderers:[]).filter(function(e){return!function(e){var t=e&&e.timelyActionRenderer&&e.timelyActionRenderer.actionButtons;return!!Array.isArray(t)&&t.some(function(e){return e&&e.buttonRenderer&&e.buttonRenderer.command&&e.buttonRenderer.command.showEngagementPanelEndpoint&&e.buttonRenderer.command.showEngagementPanelEndpoint.customAction&&"SKIP"===e.buttonRenderer.command.showEngagementPanelEndpoint.customAction.action})}(e)});e.timelyActionRenderers=n.concat(t)}function ci(e,t){var n,i,r,a=null==e||null===(n=e.playerOverlays)||void 0===n?void 0:n.playerOverlayRenderer;a&&li(a,function(e){var t,n=[],i=e.sponsorManualSkips;if(!Array.isArray(i)||0===i.length||null===(t=window)||void 0===t||null===(t=t.sponsorblock)||void 0===t||!t.segments)return n;var r,a=f(window.sponsorblock.segments);try{for(a.s();!(r=a.n()).done;){var o=r.value;i.includes(o.category)&&n.push(sn(Lt("sponsorblock.toasts.skip",{segment:Lt("sponsorblock.segments.".concat(o.category))}),"SKIP_NEXT",{clickTrackingParams:null,showEngagementPanelEndpoint:{customAction:{action:"SKIP",parameters:{time:o.segment[1]}}}},1e3*o.segment[0],1e3*o.segment[1]-1e3*o.segment[0]))}}catch(e){a.e(e)}finally{a.f()}return n}(t));var o=null==e||null===(i=e.transportControls)||void 0===i||null===(i=i.transportControlsRenderer)||void 0===i?void 0:i.promotedActions;if(o&&t.sponsorHighlight&&null!==(r=window)&&void 0!==r&&null!==(r=r.sponsorblock)&&void 0!==r&&r.segments){var s=window.sponsorblock.segments.find(function(e){return"poi_highlight"===e.category});s&&o.push({type:"TRANSPORT_CONTROLS_BUTTON_TYPE_SPONSORBLOCK_HIGHLIGHT",button:{buttonRenderer:pn(!1,Lt("sponsorblock.toasts.skipToHighlight"),"SKIP_NEXT",{clickTrackingParams:null,customAction:{action:"SKIP",parameters:{time:s.segment[0]}}})}})}}var hi=["/pagead/","/ptracking","/eligibility_check"],di=["/api/stats/watchtime","/api/stats/playback","/api/stats/qoe","/api/stats/atr"];function pi(e,t){for(var n=0;n<t.length;n++)if(-1!==e.indexOf(t[n]))return!0;return!1}var fi,mi="data:application/json,{}";function gi(e){return function(e,t){return!!("string"==typeof e&&e&&(t.ads&&pi(e,hi)||t.viewStats&&pi(e,di)))}(e,{ads:!1!==Se("blockAdTelemetry"),viewStats:!!Se("blockViewStatsTelemetry")})}function vi(e,t,n){return{removeAds:t,removeShorts:!e.shorts,addPreviews:n,optional:{live:e.removeLiveVideos,topLiveGames:e.removeTopLiveGames,mostRelevant:e.removeMostRelevant}}}function yi(e){e.sort(function(e,t){var n,i,r,a,o,s,u=null==e||null===(n=e.tabRenderer)||void 0===n?void 0:n.title,l=null==t||null===(i=t.tabRenderer)||void 0===i?void 0:i.title;return null===(r=e.tabRenderer)||void 0===r||!r.selected||null!==(a=t.tabRenderer)&&void 0!==a&&a.selected?null!==(o=e.tabRenderer)&&void 0!==o&&o.selected||null===(s=t.tabRenderer)||void 0===s||!s.selected?u&&l?u.localeCompare(l):0:1:-1})}!function(e){if(e&&!e.__axotubeTelemetryHooks){e.__axotubeTelemetryHooks=!0;var t=e.XMLHttpRequest;if(t&&t.prototype&&"function"==typeof t.prototype.open){var n=t.prototype.open;t.prototype.open=function(e,t){var i=Array.prototype.slice.call(arguments);try{gi(t)&&(Cn("telemetryBlocked"),Tn("blocked XHR",t),i[0]="GET",i[1]=mi)}catch(e){Tn("telemetry XHR hook error",e)}return n.apply(this,i)}}if("function"==typeof e.fetch){var i=e.fetch;e.fetch=function(t){try{var n="string"==typeof t?t:t&&t.url;if(gi(n))return Cn("telemetryBlocked"),Tn("blocked fetch",n),"function"==typeof e.Response&&"function"==typeof Promise?Promise.resolve(new e.Response("{}",{status:200,headers:{"Content-Type":"application/json"}})):i.call(this,mi)}catch(e){Tn("telemetry fetch hook error",e)}return i.apply(this,arguments)}}var r=e.navigator;if(r&&"function"==typeof r.sendBeacon){var a=r.sendBeacon;r.sendBeacon=function(e){try{if(gi(e))return Cn("telemetryBlocked"),Tn("blocked beacon",e),!0}catch(e){Tn("telemetry beacon hook error",e)}return a.apply(this,arguments)}}}}("undefined"!=typeof window?window:null),function(e){if(vn)return vn;var t=JSON.parse,n=[];function i(i,r){var a=t.apply(this,arguments);if(!a||"object"!==T(a)||Array.isArray(a))return a;for(var o=0;o<e.length;o++)try{e[o](a,i)}catch(e){n[o]||(n[o]=!0,console.error("[AxoTube:responsePipeline] AxoTube JSON response filter failed:",e))}return a}function r(){var e=!1;try{if("undefined"==typeof window||!window._yttv)return!1;var t=window._yttv;for(var n in t)try{var r=t[n]&&t[n].JSON;r&&"function"==typeof r.parse&&(e=!0,r.parse!==i&&(r.parse=i))}catch(e){}}catch(e){}return e}JSON.parse=i,vn=i;var a=r();if("undefined"!=typeof window&&"function"==typeof setTimeout){var o=function(){a=r()||a,++s>=32||setTimeout(o,!a&&s<20?250:5e3)},s=0;setTimeout(o,a?5e3:250)}}([function(e,t){var n,i,r,a,o,s,u;if(function(e){for(var t=0;t<bn.length;t++)if(e[bn[t]])return!0;return!1}(e)){var l={adBlock:!!Se("enableAdBlock"),signin:!!Se("enableSigninReminder"),paidPromo:!!Se("enablePaidPromotionOverlay"),hideEndScreens:!!Se("enableHideEndScreenCards"),youThere:!!Se("enableYouThereRenderer"),shorts:!!Se("enableShorts"),sortSubscriptions:!!Se("sortSubscriptionsByAlphabet"),preferredCodec:Se("videoPreferredCodec"),blockPlayerTracking:!1!==Se("blockPlayerAdTracking"),removeLiveVideos:!!Se("removeLiveVideos"),removeTopLiveGames:!!Se("removeTopLiveGames"),removeMostRelevant:!!Se("removeMostRelevant"),sponsorManualSkips:Se("sponsorBlockManualSkips"),sponsorHighlight:!!Se("enableSponsorBlockHighlight")},c=function(e){if("string"!=typeof e)return!0;for(var t=0;t<yn.length;t++)if(-1!==e.indexOf(yn[t]))return!0;return!1}(t),h=l.adBlock&&c;h&&Fn("topLevelAds",function(){return function(e){e.adPlacements&&(e.adPlacements=[]),e.playerAds&&(e.playerAds=!1),e.adSlots&&(e.adSlots=[]),!Array.isArray(e)&&e.entries&&(e.entries=e.entries.filter(function(e){return!(e&&e.command&&e.command.reelWatchEndpoint&&e.command.reelWatchEndpoint.adClientParams&&e.command.reelWatchEndpoint.adClientParams.isAd)}))}(e)}),c&&l.blockPlayerTracking&&Fn("playerTracking",function(){return function(e){var t=In(e);return e.playerResponse&&"object"===T(e.playerResponse)&&(t+=In(e.playerResponse)),t&&Cn("playerTrackingRemoved",t),t}(e)}),Fn("streamFormats",function(){return function(e,t){if(e&&e.streamingData&&e.streamingData.adaptiveFormats&&t&&"any"!==t){var n=e.streamingData.adaptiveFormats;n.find(function(e){return e.mimeType&&e.mimeType.includes(t)})&&(e.streamingData.adaptiveFormats=n.filter(function(e){return!(!e.mimeType||!e.mimeType.startsWith("audio/"))||e.mimeType&&e.mimeType.includes(t)}))}}(e,l.preferredCodec)}),Fn("playerNotices",function(){return function(e,t){e.paidContentOverlay&&!t.paidPromo&&(e.paidContentOverlay=null),e.endscreen&&t.hideEndScreens&&(e.endscreen=null),e.messages&&Array.isArray(e.messages)&&!t.youThere&&(e.messages=e.messages.filter(function(e){return!(e&&e.youThereRenderer)}))}(e,l)});var d,p,f,m,g,v,y=null==e||null===(n=e.contents)||void 0===n||null===(n=n.tvBrowseRenderer)||void 0===n||null===(n=n.content)||void 0===n||null===(n=n.tvSurfaceContentRenderer)||void 0===n||null===(n=n.content)||void 0===n?void 0:n.sectionListRenderer;null!=y&&y.contents&&Fn("browse",function(){y.contents=ui(y.contents,"feedNudgeRenderer",l),h&&(y.contents=y.contents.filter(function(e){return!Sn(e)})),ni(y.contents,vi(l,h,!0))}),null!=e&&null!==(i=e.title)&&void 0!==i&&i.runs&&(d=e,v=function(e,t,n){var i={settingCategoryCollectionRenderer:{items:t,categoryId:e,focused:!1,trackingParams:"null"}};return n&&(i.settingCategoryCollectionRenderer.title={runs:[{text:n}]}),i}("axotube_category",[(p=Lt("settings.ttSettings.title"),f="axotube_open_action",m={customAction:{action:"AXO_SETTINGS_SHOW",parameters:[]}},g=Lt("settings.ttSettings.summary"),{settingActionRenderer:{title:{runs:[{text:p}]},serviceEndpoint:m,summary:{runs:[{text:g}]},trackingParams:"null",actionLabel:{runs:[{text:p}]},itemId:f,thumbnail:{thumbnails:[{url:"https://www.gstatic.com/ytlr/img/parent_code.png"}]}}})]),d.items&&Array.isArray(d.items)||(d.items=[]),d.items.unshift(v)),null!=e&&null!==(r=e.contents)&&void 0!==r&&null!==(r=r.sectionListRenderer)&&void 0!==r&&r.contents&&Fn("sectionList",function(){return ni(e.contents.sectionListRenderer.contents,vi(l,h,!0))}),null!=e&&null!==(a=e.continuationContents)&&void 0!==a&&null!==(a=a.sectionListContinuation)&&void 0!==a&&a.contents&&Fn("sectionContinuation",function(){return ni(e.continuationContents.sectionListContinuation.contents,vi(l,h,!0))}),null!=e&&null!==(o=e.continuationContents)&&void 0!==o&&null!==(o=o.horizontalListContinuation)&&void 0!==o&&o.items&&Fn("horizontalContinuation",function(){var t=e.continuationContents.horizontalListContinuation;t.items=ti(t.items,!1)});var b=null==e||null===(s=e.contents)||void 0===s||null===(s=s.tvBrowseRenderer)||void 0===s||null===(s=s.content)||void 0===s||null===(s=s.tvSecondaryNavRenderer)||void 0===s?void 0:s.sections;b&&Fn("secondaryNav",function(){for(var e=0;e<b.length;e++){var t=b[e].tvSecondaryNavSectionRenderer;if(t&&t.tabs){l.sortSubscriptions&&yi(t.tabs);for(var n=0;n<t.tabs.length;n++){var i,r,a=null===(i=t.tabs[n].tabRenderer.content)||void 0===i||null===(i=i.tvSurfaceContentRenderer)||void 0===i?void 0:i.content;null!=a&&null!==(r=a.sectionListRenderer)&&void 0!==r&&r.contents&&ni(a.sectionListRenderer.contents,vi(l,h,!0))}}}});var x=null==e||null===(u=e.contents)||void 0===u||null===(u=u.singleColumnWatchNextResults)||void 0===u||null===(u=u.pivot)||void 0===u?void 0:u.sectionListRenderer;x&&Fn("watchNext",function(){x.contents=ui(x.contents,"alertWithActionsRenderer",l),ni(x.contents,vi(l,h,!1)),function(e){if(window.queuedVideos.videos.length){var t=window.queuedVideos.videos.slice();t.unshift({tileRenderer:{contentType:"TILE_CONTENT_TYPE_VIDEO",metadata:{tileMetadataRenderer:{title:{simpleText:"Clear Queue"}}},onSelectCommand:{customAction:{action:"CLEAR_QUEUE"}},style:"TILE_STYLE_YTLR_DEFAULT"}});var n=t.findIndex(function(e){return e.contentId===window.queuedVideos.lastVideoId});e.unshift(function(e,t){return{shelfRenderer:{shelfHeaderRenderer:{title:{simpleText:e}},tvhtml5ShelfRendererType:"TVHTML5_SHELF_RENDERER_TYPE_GRID",content:{horizontalListRenderer:{items:t,selectedIndex:arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,visibleItemCount:3}}}}}("Queued Videos",t,-1!==n?n:0))}}(x.contents)}),Fn("sponsorBlock",function(){return ci(e,l)}),h&&"string"==typeof t&&t.length>=1e4&&Fn("fallback",function(){var t=function(e,t){for(var n=!(!t||!t.player),i=0,r=0,a=!1,o=[{node:e,depth:0}],s=0;s<o.length;){var u=o[s++],l=u.node;if(l&&"object"===T(l)){if(++r>2e3){a=!0;break}if(Array.isArray(l)){for(var c=l.length-1;c>=0;c--){var h=l[c];h&&"object"===T(h)&&si(h)&&(l.splice(c,1),i++)}if(u.depth<8)for(var d=0;d<l.length;d++)o.push({node:l[d],depth:u.depth+1})}else{for(var p=0;p<ri.length;p++){var f=ri[p];Array.isArray(l[f])&&l[f].length&&(l[f]=[],i++)}for(var m=0;m<ai.length;m++){var g=ai[m];l[g]&&(l[g]=!1,i++)}if(n)for(var v=0;v<oi.length;v++)xn(l,oi[v])&&(delete l[oi[v]],i++);if(u.depth<8)for(var y in l)xn(l,y)&&l[y]&&"object"===T(l[y])&&o.push({node:l[y],depth:u.depth+1})}}}return a&&Tn("fallback search hit node cap",2e3),{removed:i,nodes:r,truncated:a}}(e,{player:l.blockPlayerTracking});t.removed&&(Cn("knownPathMiss",t.removed),Cn("fallbackRemoved",t.removed),Tn("fallback removed",t.removed,"entries from",t.nodes,"nodes"))})}},function(e){if(Array.isArray(e.items)){var t=Se("disabledSidebarContents"),n=Se("disableChannelsOnSidebar");if(null!=t&&t.length||n)for(var i=0;i<e.items.length;i++){var r=e.items[i]&&e.items[i].guideSectionRenderer;if(r&&Array.isArray(r.items))for(var a=0;a<r.items.length;a++){var o,s=r.items[a]&&r.items[a].guideEntryRenderer;s&&((null!=t&&t.length&&t.includes(null===(o=s.icon)||void 0===o?void 0:o.iconType)||n&&null!=s&&s.thumbnail)&&(r.items.splice(a,1),a--))}}}}]),fi=JSON.stringify,JSON.stringify=function(e,t,n){var i,r=null==e||null===(i=e.playbackContext)||void 0===i?void 0:i.contentPlaybackContext;if(r&&!r.isInlinePlaybackNoAd){var a=Object.prototype.hasOwnProperty.call(r,"isInlinePlaybackNoAd"),o=r.isInlinePlaybackNoAd;try{return r.isInlinePlaybackNoAd=!0,fi.apply(this,arguments)}finally{a?r.isInlinePlaybackNoAd=o:delete r.isInlinePlaybackNoAd}}return fi.apply(this,arguments)},window.JSON.stringify=JSON.stringify;var bi={enablePremiumHbrSupport:!0,abortPendingPageRequests:!0,enableWebGlobalConfigHotConfig:!1,enablePremiumLiteUpsellLr:!1,enablePremiumPageDeeplink:!1,premiumLiteUpsellMaxTimesSeen:Number.MAX_SAFE_INTEGER,premiumLiteUpsellSeenRecentlyDays:9999,premiumLiteUpsellSerializedParams:"",enableIfaReporting:!1,enableIfaEncryption:!1,enableAdsClientLogging:!1,enableNetworkMonitoringUnified:!1,enableHiddenVisibilityLogging:!1,enableCobaltMetrics:!1,enableCobaltRequestHistograms:!1,enableCobaltHttpCache:!1,enableCobaltHttpCacheLogging:!1,reportAuthCredentialIntervalSeconds:0,oneClickSeek:"on",enableSkipPreviousButton5sThreshold:!0,enableCaptionsPersistence:!0,enableKabukiCaptionPersistence:!0,enableGridWatchNext:!0,enableNavLoadOnRightArrow:!0,enableRenderSingleSearchBar:!0,lazyLoadingAlgorithm:0,enableNewAudioSettingsMenu:!0,enableDirectEntryToShortsClient:!0,enableYtlrKeyboardForSearch:!0,enablePostPlayMode:!0,enablePaidTosViewer:!0,useReduxForPlayerStyles:!0};function xi(){try{return!("undefined"==typeof window||!window.tectonicConfig||"object"!==T(window.tectonicConfig.featureSwitches))&&(window.tectonicConfig.disallowUnifiedFlagAccess=!1,Object.assign(window.tectonicConfig.featureSwitches,bi),!0)}catch(e){return!1}}var Si=0;function Ei(e){if("off"!==Be()&&e&&!1!==e.isConnected){var t="",n=!1;if("IMG"===e.tagName&&e.src)t=e.src;else if(e.style&&e.style.backgroundImage){var i=e.style.backgroundImage.match(/url\(['"]?(.*?)['"]?\)/);i&&i[1]&&(t=i[1],n=!0)}if(t&&t.includes("i.ytimg.com/vi/")){var r=_n(t);if(r&&e.getAttribute("data-hq-upgraded")!==r){var a=t.match(/\/(maxresdefault|sddefault|hqdefault|mqdefault|default)\.jpg/),o=a?a[1]:"default",s=Rn.get(r);if(s&&o+".jpg"===s)e.setAttribute("data-hq-upgraded",r);else{e.setAttribute("data-hq-upgraded",r);var u=function(t){if(e&&!1!==e.isConnected){var i="https://i.ytimg.com/vi/"+r+"/"+t;n?e.style.backgroundImage='url("'+i+'")':(e.removeAttribute("srcset"),e.src=i)}};s?u(s):function(e,t){if(e&&"function"==typeof t){var n=Rn.get(e);if(n)t(n);else if(Mn.has(e))Mn.get(e).push(t);else{Mn.set(e,[t]);var i=function(t){var n=Mn.get(e)||[];Mn.delete(e),Rn.set(e,t),n.forEach(function(e){try{e(t)}catch(e){}})},r=function(t,n){var r=new Image;r.onload=function(){120===this.naturalWidth&&90===this.naturalHeight?n():i(t)},r.onerror=n,r.src="https://i.ytimg.com/vi/".concat(e,"/").concat(t)};r("maxresdefault.jpg",function(){r("sddefault.jpg",function(){return i("hqdefault.jpg")})})}}}(r,function(e){u(e)})}}}}}function wi(){var e={subtree:!0,childList:!0,attributes:!0,attributeFilter:["class","src","srcset","style"]},t=function(e){if(e){var t=e.shadowRoot||e,n=t.querySelector?t.querySelector("img"):null;!n&&t!==e&&e.querySelector&&(n=e.querySelector("img")),n&&Ei(n);var i=[];t.querySelectorAll?i=t.querySelectorAll('[style*="background-image"]'):e.querySelectorAll&&(i=e.querySelectorAll('[style*="background-image"]'));for(var r=0;r<i.length;r++)Ei(i[r]);e.style&&e.style.backgroundImage&&Ei(e)}},n=function(e){for(var t=e;t;){if(t.classList&&t.classList.contains("zylon-focus"))return t;if(t.closest){var n=t.closest(".zylon-focus");if(n)return n}var i=t.parentElement;if(!i&&t.getRootNode){var r=t.getRootNode();i=r&&r.host||null}t=i}return null},i=null,r=null,a=null,o=function(){if(!i){var o=document.getElementById("container")||document.body;o&&(i=new MutationObserver(function(e){r=r?r.concat(e):e,a||(a=requestAnimationFrame(function(){a=null;var e=r||[];r=null,function(e){try{for(var i=null,r=0;r<e.length;r++){var a=e[r],o=a.target;if("attributes"!==a.type||"class"!==a.attributeName)if("attributes"!==a.type){if("childList"===a.type){i||(i=document.querySelector(".zylon-focus"));for(var s=!1,u=0;u<a.addedNodes.length;u++){var l=a.addedNodes[u];if(1===l.nodeType)if(i&&(i===l||i.contains(l)||l.contains(i)))s||(t(i),s=!0);else if(!i&&l.querySelectorAll)for(var c=l.querySelectorAll(".zylon-focus"),h=0;h<c.length;h++)t(c[h])}}}else{if("src"===a.attributeName||"srcset"===a.attributeName){if("IMG"!==o.tagName)continue;var d="src"===a.attributeName?o.getAttribute("src"):o.getAttribute("srcset");if(!d||-1===d.indexOf("i.ytimg.com/vi/"))continue}else{if("style"!==a.attributeName)continue;var p=o.style&&o.style.backgroundImage;if(!p||-1===p.indexOf("i.ytimg.com/vi/"))continue}if(n(o)){var f=o.getAttribute("data-hq-upgraded"),m="";if("IMG"===o.tagName)m=o.src;else if(o.style&&o.style.backgroundImage){var g=o.style.backgroundImage.match(/url\(['"]?(.*?)['"]?\)/);m=g?g[1]:""}var v=m?_n(m):null;if(f&&f===v)continue;o.removeAttribute("data-hq-upgraded"),Ei(o)}}else o.classList&&o.classList.contains("zylon-focus")&&t(o)}}catch(e){console.error("[AxoTube:hqThumbnailsFocusObserver] Focus handling failed:",e)}}(e)}))}),i.observe(o,e))}},s=function(){"off"!==Be()?o():(i&&(i.disconnect(),i=null),a&&(cancelAnimationFrame(a),a=null),r=null)},u=["enableHqThumbnails","enablePerformanceMode","enableReducedMotion","enableLowMemoryMode"];we.addEventListener("configChange",function(e){e.detail&&-1!==u.indexOf(e.detail.key)&&s()}),s()}!function e(){xi()||(Si+=1)>=50||setTimeout(e,200)}(),we.addEventListener("configChange",function(){xi()}),"loading"===document.readyState?document.addEventListener("DOMContentLoaded",function(){setTimeout(wi,1e3)}):setTimeout(wi,1e3);var ki={player:[],video:[],videoId:[]},Di=null,Ai=null,Ci=null,Ti=null,Pi=!1;function Fi(){return document.querySelector(".html5-video-player")}function Bi(){return document.querySelector("video")}function Ii(e){try{var t=e&&"function"==typeof e.getVideoData&&e.getVideoData();if(t&&t.video_id)return t.video_id}catch(e){}var n=/[?&]v=([^&]+)/.exec(window.location.hash||"");return n?n[1]:null}function Li(e,t,n){ki[e].slice().forEach(function(e){try{e(t,n)}catch(e){console.warn("[AxoTube:playerLifecycle] Listener failed:",e)}})}function Oi(){var e=Fi(),t=Bi(),n=Ii(e),i=Di,r=Ai,a=Ci;Di=e,Ai=t,Ci=n,e!==i&&Li("player",e,i),t!==r&&Li("video",t,r),n!==a&&Li("videoId",n,a)}function Ni(e,t){if("function"!=typeof t)throw new TypeError("A lifecycle listener must be a function");Pi||(Pi=!0,window.addEventListener("hashchange",Oi),document.addEventListener("DOMContentLoaded",Oi),Ti=setInterval(Oi,2e3),Oi()),Oi(),ki[e].push(t);var n="player"===e?Di:"video"===e?Ai:Ci;try{t(n,null)}catch(e){console.warn("[AxoTube:playerLifecycle] Listener failed:",e)}return function(){var n=ki[e].indexOf(t);-1!==n&&ki[e].splice(n,1),ki.player.length||ki.video.length||ki.videoId.length||Pi&&(Pi=!1,clearInterval(Ti),Ti=null,window.removeEventListener("hashchange",Oi),document.removeEventListener("DOMContentLoaded",Oi),Di=null,Ai=null,Ci=null)}}function Ri(e){return Ni("player",e)}function Mi(e){return Ni("video",e)}function _i(e){return Ni("videoId",e)}function Ui(e,t){var n=null;return{promise:new Promise(function(i,r){(n=new XMLHttpRequest).open("GET",e,!0),n.timeout=t,n.onload=function(){if(404===n.status)return i(null);if(n.status<200||n.status>=300)return r(new Error("HTTP ".concat(n.status," for ").concat(e)));try{i(JSON.parse(n.responseText))}catch(e){r(e)}},n.onerror=function(){r(new Error("network error for ".concat(e)))},n.ontimeout=function(){r(new Error("timed out after ".concat(t,"ms for ").concat(e)))},n.onabort=function(){r(new Error("aborted"))},n.send()}),abort:function(){n&&4!==n.readyState&&n.abort()}}}var ji=["https://sponsor.ajay.app/api","https://sponsorblock.inf.re/api"],Hi=["sponsor","intro","outro","interaction","selfpromo","preview","filler","music_offtopic","poi_highlight"],zi={sponsor:"enableSponsorBlockSponsor",intro:"enableSponsorBlockIntro",outro:"enableSponsorBlockOutro",interaction:"enableSponsorBlockInteraction",selfpromo:"enableSponsorBlockSelfPromo",preview:"enableSponsorBlockPreview",filler:"enableSponsorBlockFiller",music_offtopic:"enableSponsorBlockMusicOfftopic"},Vi={sponsor:"#00d400",intro:"#00ffff",outro:"#0202ed",interaction:"#cc00ff",selfpromo:"#ffff00",preview:"#008fd6",filler:"#7300FF",music_offtopic:"#ff9900",poi_highlight:"#9b044c"},Ki=Ln(20),Gi="axotube-sponsorblock-segments",Ji='ytlr-progress-bar [idomkey="slider"]',Xi="".concat(Ji,"::after, ").concat('ytlr-multi-markers-player-bar-renderer [idomkey^="chapter-"]',"::after { content: ''; position: absolute; inset: 0; pointer-events: none; opacity: 0.7; }");function Wi(e){return Vi[e]||"blue"}function qi(e){return Lt("sponsorblock.segments.".concat(e))||e}function Yi(e){for(var t=[],n=0;n<e.length;n++)-1===t.indexOf(e[n])&&t.push(e[n]);return t.join(", ")}function Qi(e,t){if("poi_highlight"===e)return Se("enableSponsorBlockHighlight")?"highlight":"off";var n=zi[e];return n&&Se(n)?-1!==t.indexOf(e)?"show":"skip":"off"}function Zi(e){var t=document.getElementById(Gi);e?(t||((t=document.createElement("style")).id=Gi,(document.head||document.documentElement).appendChild(t)),t.textContent!==e&&(t.textContent=e)):t&&(t.textContent="")}function $i(e,t,n){for(var i=[],r=0;r<e.length;r++){var a=e[r];if(!(a.end<=t||a.start>=n)){var o=Math.max(0,(a.start-t)/(n-t)*100),s=Math.min(100,(a.end-t)/(n-t)*100);i.push("linear-gradient(to right, transparent ".concat(o,"%, ").concat(a.color," ").concat(o,"%, ").concat(a.color," ").concat(s,"%, transparent ").concat(s,"%)"))}}return i.length?i.join(", "):"none"}var er=function(){return p(function e(t){var n=this;u(this,e),this.videoID=t,this.destroyed=!1,this.segments=[],this.active=[],this.drawn=[],this.done={},this.lastSkip=null,this.landing=null,this.suppressRearm=!1,this.lastT=0,this.videoDuration=0,this.video=null,this.listeners=null,this.request=null,this.frameId=null,this.seekIssuedAt=0,this.barAt=0,this.onTick=function(){return n.tick()},this.onSeeked=function(){return n.handleSeeked()},this.onDuration=function(){n.redrawBar(),n.tick()},this.frame=function(){n.frameId=null,n.tick()},this.refresh()},[{key:"load",value:function(){var e=this,t=Ki.get(this.videoID);if(t)this.apply(t);else{var n,i,r,a,o,s=(n=this.videoID,i=[],r=!1,a=function(){for(var e=0;e<i.length;e++)i[e].abort()},o="videoID=".concat(encodeURIComponent(n),"&service=YouTube&categories=").concat(encodeURIComponent(JSON.stringify(Hi))),{promise:new Promise(function(e){for(var t=0,n=function(t){r||(r=!0,a(),e(t))},s=function(){(t+=1)===ji.length&&n(null)},u=0;u<ji.length;u++){var l=Ui("".concat(ji[u],"/skipSegments?").concat(o),4e3);i.push(l),l.promise.then(function(e){null===e?n([]):Array.isArray(e)?n(e):s()},s)}}),abort:function(){r=!0,a()}});this.request=s,s.promise.then(function(t){if(e.request===s&&(e.request=null,!e.destroyed&&t)){var n=function(e){for(var t=[],n=0,i=0;i<e.length;i++){var r=e[i];if(r&&"string"==typeof r.category&&Array.isArray(r.segment)){var a=r.segment[0],o=r.segment[1];"number"==typeof a&&"number"==typeof o&&a>=0&&o>a&&(r.actionType&&"skip"!==r.actionType||"number"==typeof r.votes&&r.votes<0||("number"==typeof r.videoDuration&&r.videoDuration>n&&(n=r.videoDuration),t.push({key:String(r.UUID||"".concat(r.category,":").concat(a,":").concat(o)),category:r.category,segment:[a,o],start:a,end:o,mode:"off"})))}}return t.sort(function(e,t){return e.start-t.start||t.end-e.end}),t.videoDuration=n,t}(t);Ki.set(e.videoID,n),e.apply(n)}},function(){e.request===s&&(e.request=null)})}}},{key:"apply",value:function(e){this.destroyed||(this.segments=e,this.videoDuration=e.videoDuration||0,this.refresh(),this.tick())}},{key:"refresh",value:function(){for(var e=Se("sponsorBlockManualSkips"),t=Array.isArray(e)?e:[],n=[],i=[],r=0;r<this.segments.length;r++){var a=this.segments[r];a.mode=Qi(a.category,t),"skip"!==a.mode&&"show"!==a.mode||n.push(a),"off"!==a.mode&&i.push(a)}this.active=n,this.drawn=i,this.redrawBar()}},{key:"attach",value:function(e){if(!this.destroyed&&e!==this.video&&(this.detach(),e)){this.video=e,this.lastT=e.currentTime||0,this.listeners=[["timeupdate",this.onTick],["play",this.onTick],["playing",this.onTick],["ratechange",this.onTick],["seeked",this.onSeeked],["durationchange",this.onDuration],["loadedmetadata",this.onDuration]];for(var t=0;t<this.listeners.length;t++)e.addEventListener(this.listeners[t][0],this.listeners[t][1]);this.redrawBar(),this.tick()}}},{key:"detach",value:function(){if(this.video&&this.listeners)for(var e=0;e<this.listeners.length;e++)this.video.removeEventListener(this.listeners[e][0],this.listeners[e][1]);this.listeners=null,this.video=null,null!==this.frameId&&(cancelAnimationFrame(this.frameId),this.frameId=null)}},{key:"tick",value:function(){var e=this.video;if(!this.destroyed&&e&&(this.refreshBar(),!(e.paused||e.seeking&&Date.now()-this.seekIssuedAt<2e3))){var t=e.currentTime;if(t>=0&&!(this.videoDuration>0&&isFinite(e.duration)&&Math.abs(e.duration-this.videoDuration)>3)){t<this.lastT-1&&this.rearm(t),this.lastT=t;var n=this.dueIndex(t);-1!==n&&this.skipAt(n,t),this.video&&null===this.frameId&&this.nearNext(this.video.currentTime)&&(this.frameId=requestAnimationFrame(this.frame))}}}},{key:"dueIndex",value:function(e){if(this.inManual(e))return-1;for(var t=0;t<this.active.length;t++){var n=this.active[t];if(n.start-.1>e)break;if(!("skip"!==n.mode||n.end<=e||this.done[n.key]))return t}return-1}},{key:"inManual",value:function(e){for(var t=0;t<this.active.length;t++){var n=this.active[t];if(n.start>e)break;if("show"===n.mode&&n.end>e)return!0}return!1}},{key:"jumpTarget",value:function(e,t){for(var n=this.active[e],i=n.end,r=!1,a=[n],o=e+1;o<this.active.length;o++){var s=this.active[o];if(s.start>i+.25)break;if("show"===s.mode){s.start>t&&s.start<i&&s.start>n.start&&(i=s.start,r=!0);break}a.push(s),s.end>i&&(i=s.end)}var u=this.video?this.video.duration:NaN;u>0&&i>=u-.5&&(i=Math.max(0,u-.5));for(var l=[],c=[],h=0;h<a.length;h++){var d=a[h];d.start>=i||(c.push(qi(d.category)),(!r||d.end<=i)&&l.push(d.key))}return{to:i,keys:l,names:c}}},{key:"skipAt",value:function(e,t){for(var n=this.active[e],i=this.jumpTarget(e,t),r=0;r<i.keys.length;r++)this.done[i.keys[r]]=!0;i.to<=t+.25||(this.lastSkip={from:n.start,to:i.to,names:i.names},this.landing={to:i.to,retries:0,at:Date.now()},this.seekTo(i.to),Se("enableSponsorBlockToasts")&&nn(Lt("app.name"),Lt("sponsorblock.toasts.skipping",{segment:Yi(i.names)})))}},{key:"seekTo",value:function(e){this.seekIssuedAt=Date.now(),this.video.currentTime=e}},{key:"handleSeeked",value:function(){var e=this.video;if(!this.destroyed&&e){var t=e.currentTime,n=this.landing;if(this.landing=null,n&&Date.now()-n.at<2e3&&t<n.to-1.5&&n.retries<2)return this.landing={to:n.to,retries:n.retries+1,at:Date.now()},void this.seekTo(n.to);n||(this.suppressRearm?this.suppressRearm=!1:(this.rearm(t),this.lastSkip=null)),this.lastT=t,this.redrawBar(),this.tick()}}},{key:"rearm",value:function(e){for(var t=0;t<this.active.length;t++){var n=this.active[t];n.start>e+1&&delete this.done[n.key]}}},{key:"nearNext",value:function(e){for(var t=0;t<this.active.length;t++){var n=this.active[t];if(!("skip"!==n.mode||n.end<=e||this.done[n.key]))return n.start-e<1.5}return!1}},{key:"tryUndoLastSkip",value:function(){var e=this.lastSkip;if(this.destroyed||!this.video||!e)return!1;var t=this.video.currentTime-e.to;return!(t<0||t>10)&&(this.lastSkip=null,this.landing=null,this.suppressRearm=!0,this.seekTo(e.from),Se("enableSponsorBlockToasts")&&nn(Lt("app.name"),Lt("sponsorblock.toasts.undone",{segment:Yi(e.names)})),!0)}},{key:"refreshBar",value:function(){var e=Date.now();e-this.barAt<1e3||(this.barAt=e,this.redrawBar())}},{key:"redrawBar",value:function(){if(!this.destroyed){for(var e=this.video||Bi(),t=e?e.duration:0,n=[],i=0;i<this.drawn.length;i++){var r=this.drawn[i];n.push({start:r.start,end:r.end,color:Wi(r.category)})}Zi(function(e,t,n){if(!(e&&0!==e.length&&t>0))return"";var i=e.slice().sort(function(e,t){return e.end-e.start-(t.end-t.start)}),r="".concat(Xi," ").concat(Ji,"::after { background: ").concat($i(i,0,t),"; }");if(n)for(var a=0;a<n.length;a++){var o=String(n[a].key).replace(/["\\]/g,"\\$&");r+=' ytlr-multi-markers-player-bar-renderer [idomkey="'.concat(o,'"]::after { background: ').concat($i(i,n[a].from,n[a].to),"; }")}return r}(n,t,function(e){var t=document.querySelectorAll('ytlr-multi-markers-player-bar-renderer [idomkey="progress-bar"] > [idomkey^="chapter-"]');if(!(t&&0!==t.length&&e>0))return null;for(var n=0,i=0;i<t.length;i++)n+=parseFloat(t[i].style.width);if(!(n>0))return null;for(var r=[],a=0,o=0;o<t.length;o++){var s=parseFloat(t[o].style.width);r.push({key:t[o].getAttribute("idomkey"),from:a/n*e,to:(a+s)/n*e}),a+=s}return r}(t)))}}},{key:"destroy",value:function(){if(!this.destroyed){this.destroyed=!0;var e=this.request;this.request=null,e&&e.abort(),this.detach(),Zi(""),this.done={},this.lastSkip=null,this.landing=null}}}])}();window.sponsorblock=null;var tr=!1;function nr(){var e=window.sponsorblock;if(e){window.sponsorblock=null;try{e.destroy()}catch(e){}}}function ir(){var e,t=(e=/[?&]v=([^&]+)/.exec(location.hash))?e[1]:null;if(t&&Se("enableSponsorBlock")){if(!window.sponsorblock||window.sponsorblock.videoID!==t){nr();var n=new er(t);window.sponsorblock=n,n.load(),n.attach(Bi())}}else nr()}window.addEventListener("keydown",function(e){if(10009===e.keyCode){var t=window.sponsorblock;t&&t.tryUndoLastSkip()&&(tr=!0,e.preventDefault(),e.stopPropagation(),e.stopImmediatePropagation())}},!0),window.addEventListener("keyup",function(e){10009===e.keyCode&&tr&&(tr=!1,e.preventDefault(),e.stopPropagation(),e.stopImmediatePropagation())},!0),window.addEventListener("hashchange",ir,!1),Mi(function(e){var t=window.sponsorblock;t&&t.attach(e)}),we.addEventListener("configChange",function(e){var t=e.detail&&e.detail.key||"";if(0===t.indexOf("enableSponsorBlock")||"sponsorBlockManualSkips"===t){var n=window.sponsorblock;n&&"enableSponsorBlock"!==t?(n.refresh(),n.tick()):ir()}}),"loading"===document.readyState?document.addEventListener("DOMContentLoaded",ir):ir();var rr=["timeupdate","durationchange","ratechange","seeked","play","pause"],ar=null,or=null,sr=null,ur=!1;function lr(e){return e<10?"0".concat(e):String(e)}function cr(e){var t=Math.floor(e/3600),n=Math.floor(e%3600/60),i=e%60;return t>0?"".concat(t,":").concat(lr(n),":").concat(lr(i)):"".concat(n,":").concat(lr(i))}function hr(e,t,n){try{var i=e&&"function"==typeof e[t]?e[t]():n;return void 0===i?n:i}catch(e){return n}}function dr(){var e=!!Se("enableRemainingTime");if(e||ur){var t;or&&or.parentNode||(t=function(){var e=document.querySelector('[idomkey="time-label"] > [idomkey="elapsedTime"]');return e?e.parentElement:null}(),t!==or&&(sr&&sr.disconnect(),sr=null,ur=!1,(or=t)&&(sr=new MutationObserver(function(){return dr()})).observe(or,{characterData:!0,childList:!0,subtree:!0})));var n=function(){var e=or?or.querySelector('[idomkey="elapsedTime"]'):null,t=e?e.firstChild:null;return t&&t.nodeType===Node.TEXT_NODE?t:null}();if(n){var i=Fi(),r=e&&!!i&&/#\/watch/.test(location.hash||"")&&!function(e){var t=hr(e,"getVideoData",null);return!(!t||!t.isLive)}(i);if(r){var a=Math.floor(hr(i,"getDuration",0)),o=Math.floor(hr(i,"getCurrentTime",0)),s=hr(i,"getPlaybackRate",1)||1,u=Math.round(Math.max(0,(a-o)/s)),l="-".concat(cr(u));ur=!0,n.data!==l&&(n.data=l)}else{if(ur){var c=Math.floor(hr(i,"getCurrentTime",0));n.data=cr(c)}ur=!1}}}}Mi(function(e){return function(e){e!==ar&&(ar&&rr.forEach(function(e){return ar.removeEventListener(e,dr)}),(ar=e)&&rr.forEach(function(e){return ar.addEventListener(e,dr)}),dr())}(e)}),we.addEventListener("configChange",function(e){var t;"enableRemainingTime"===(null===(t=e.detail)||void 0===t?void 0:t.key)&&dr()});var pr=["AXO_SETTINGS_SHOW","AXO_SPEED_SETTINGS_SHOW","SETTINGS_OPEN"];function fr(e){return null!==function(e){if(!e||"object"!==T(e))return null;var t=e.openPopupAction;if(t)return"TOAST"===t.popupType?null:"popup";var n=e.showEngagementPanelEndpoint;return n?n.customAction?null:"reading":e.customAction&&-1!==pr.indexOf(e.customAction.action)?"popup":null}(e)}function mr(){var e=Fi();if(e&&"function"==typeof e.pauseVideo)try{return void e.pauseVideo()}catch(e){}var t=Bi();t&&!t.paused&&t.pause()}window.addEventListener("visibilitychange",function(e){Se("enablePauseOnBlur")&&document.hidden&&(e.stopImmediatePropagation(),mr())},!0);var gr=["ytlr-player-page","ytlr-player-actions-container","ytlr-progress-bar"],vr=[10,30,60],yr={},br={},xr={},Sr=0,Er=0,wr=-1/0,kr=null;function Dr(e){for(var t=e;t&&t!==document;t=t.parentNode){if(t.getAttribute&&"true"===t.getAttribute("aria-hidden"))return!0;if(t.classList&&t.classList.contains("zylon-hidden"))return!0;var n=window.getComputedStyle(t);if("none"===n.display||"hidden"===n.visibility)return!0}return!1}function Ar(e,t){var n=Fi();try{if(n&&"function"==typeof n.setPlaybackRate)return void n.setPlaybackRate(t)}catch(e){}e.playbackRate=t}function Cr(e,t){var n=e.duration;return n>0?Math.max(0,Math.min(n,t)):null}function Tr(e){e.preventDefault(),e.stopPropagation(),e.stopImmediatePropagation()}function Pr(e,t){var n=br[e];if(n)if(n.timer=null,39===e){if(t.paused)return;n.rateBefore=t.playbackRate||1,Ar(t,2)}else 37===e&&(n.ticker=setInterval(function(){var e=Bi();e&&(kr=null,function(e,t){var n=Cr(e,t);null!==n&&(e.currentTime=n)}(e,e.currentTime-10))},300))}window.addEventListener("keydown",function(e){var t=e.keyCode;if((13===t||37===t||39===t)&&Se("enableOnePressMode")&&function(){if(!/[?&]v=[^&]+/.test(window.location.hash||""))return!1;var e=document.querySelector("ytlr-shorts-page");return!(e&&e.classList&&e.classList.contains("zylon-focus"))}()&&!(function(e){var t=e&&e.closest?e.closest("ytlr-tile-renderer"):null;return!!t&&!Dr(t)}(e.target)||function(){for(var e=document.querySelectorAll(".zylon-focus"),t=0;t<e.length;t++){var n=e[t];if(!(Dr(n)||n.closest&&n.closest("ytlr-player-page, ytlr-player-actions-container, ytlr-progress-bar")))return!0}return!1}()||function(){for(var e=0;e<gr.length;e++){var t=document.querySelector(gr[e]);if(t&&!Dr(t)){var n=window.getComputedStyle(t);if("hidden"!==n.visibility&&parseFloat(n.opacity)>0&&t.getClientRects().length>0)return!0}}return!1}())){var n=Bi();if(n)if(br[t])Tr(e);else{var i=Date.now();if(void 0!==xr[t]&&i-xr[t]<100)Tr(e);else{if(xr[t]=i,13===t)!function(e){var t=Fi(),n=!e.paused;try{var i=t&&t.getPlayerStateObject&&t.getPlayerStateObject();i&&"boolean"==typeof i.isPlaying&&(n=i.isPlaying)}catch(e){}try{if(t&&"function"==typeof(n?t.pauseVideo:t.playVideo))return void(n?t.pauseVideo():t.playVideo())}catch(e){}n?e.pause():e.play()}(n),br[t]={timer:null};else{var r=37===t?-1:1,a=function(e,t){var n=e===Sr&&t-wr<=1e3;return Er=n?Er+1:0,Sr=e,n||(kr=null),vr[Math.min(Er,vr.length-1)]}(r,i)*r,o=Cr(n,(Er>0&&null!==kr?kr:n.currentTime)+a);null!==o&&(kr=o,n.currentTime=o),br[t]={timer:setTimeout(function(){return Pr(t,Bi())},1e3)}}yr[t]=!0,Tr(e)}}}},!0),window.addEventListener("keyup",function(e){var t=e.keyCode;if(yr[t]){delete yr[t],Tr(e);var n=br[t];if(delete br[t],n){if(n.timer&&clearTimeout(n.timer),n.ticker&&clearInterval(n.ticker),void 0!==n.rateBefore){var i=Bi();i&&Ar(i,n.rateBefore)}13!==t&&(wr=Date.now())}}},!0);var Fr=0;function Br(e,t,n){var i=e.filter(function(e){return e&&(n=e.languageCode,String(n||"").toLowerCase().split("-")[0]===t);var n}),r=i.find(function(e){return"asr"!==e.kind});return r||(n&&i.find(function(e){return"asr"===e.kind})||null)}function Ir(){var e=++Fr,t=0,n=function(){if(e===Fr&&Se("enableAutoSubtitles")){var i=function(e,t,n){if(!e||"function"!=typeof e.getOptions||"function"!=typeof e.getOption)return"retry";if(-1===(e.getOptions()||[]).indexOf("captions"))return"retry";if("function"==typeof e.loadModule)try{e.loadModule("captions")}catch(e){}var i=e.getOption("captions","track");if(i&&i.languageCode)return"done";var r=e.getOption("captions","tracklist")||[];if(!r.length)return"retry";var a=Br(r,t,n);return a&&"function"==typeof e.setOption&&e.setOption("captions","track",a),"done"}(Fi(),Se("autoSubtitleLanguage")||"en",!!Se("autoSubtitleAllowAuto"));t+=1,"retry"===i&&t<8&&setTimeout(n,1e3)}};n()}_i(function(e){e&&Ir()});var Lr='/* Fixes transparency effect for the video player */\n\n.ytLrWatchDefaultShadow,\ndiv[idomkey="shadow"] {\n background-image: linear-gradient(to bottom, rgba(0, 0, 0, 0) 0, rgba(0, 0, 0, 0.8) 90%) !important;\n background-color: rgba(0, 0, 0, 0.3) !important;\n display: block !important;\n height: 100% !important;\n pointer-events: none !important;\n position: absolute !important;\n width: 100% !important;\n}\n\n/* https://github.com/webosbrew/youtube-webos/commit/4fbe38a18df31ddd62b6cf15f141dd58e1d1a71d */\n.ytLrWatchDefault2025Shadow {\n background-color: rgba(11, 11, 11, 0.5) !important;\n}\n\n/* Fixes shorts having a black background */\n\n.ytLrTileHeaderRendererShorts {\n background-image: none !important;\n}\n\n/* Multiline support for strings in the UI */\n\n.ytLrOverlayPanelHeaderRendererSubtitle {\n white-space: pre-wrap !important;\n}\n\n/* Fixes SponsorBlock segments overlapping with the playhead */\n\n.ytLrProgressBarPlayhead {\n z-index: 1 !important;\n}\n\n.ytLrProgressBarPlayed {\n z-index: 1 !important;\n}\n\n.ytLrSearchBarSearchVoice {\n display: block;\n position: absolute;\n left: 0;\n top: 0;\n pointer-events: auto\n}\n\n.ytLrSearchVoiceHost {\n font-size: 3rem;\n}\n\n.ytLrSearchVoiceMicButtonHost {\n color: rgba(255, 255, 255, 0.7);\n}\n\n.ytLrSearchVoiceMicButtonHost {\n background-color: rgba(255, 255, 255, 0.1);\n border-radius: 50%;\n color: #f1f1f1;\n display: block;\n text-align: center;\n width: 1em;\n height: 1em;\n}\n\n.ytLrSearchVoiceMicButtonIcon {\n display: inline-block;\n font-size: .5em;\n height: .5em;\n width: .5em;\n height: 1em;\n width: 1em;\n margin-top: .5em;\n vertical-align: top !important;\n}\n\n.ytContribIconHost {\n display: inline-block;\n vertical-align: middle;\n}\n\n.ytContribIconTvArrowLeft::before {\n content: "\\e822";\n}\n\n.ytContribIconHost::before {\n font-family: "YouTube Icons Outlined";\n}\n\n/* Make toasts match the YouTube TV look and font */\n\nytlr-toast,\npaper-toast {\n font-family: "YouTube Sans", Roboto, "Noto Sans", Arial, sans-serif !important;\n font-size: 1.4rem !important;\n line-height: 1.4 !important;\n border-radius: 4px !important;\n background-color: rgba(0, 0, 0, 0.85) !important;\n color: rgba(255, 255, 255, 0.95) !important;\n}\n\nytlr-toast .title,\nytlr-toast .subtitle,\nytlr-toast #text,\nytlr-toast iron-p {\n font-family: "YouTube Sans", Roboto, "Noto Sans", Arial, sans-serif !important;\n}\n\nytlr-toast .subtitle,\nytlr-toast iron-p {\n color: rgba(255, 255, 255, 0.75) !important;\n}\n\nytlr-toast img,\nytlr-toast iron-image,\nytlr-toast .thumbnail {\n border-radius: 4px !important;\n}\n\n/* Hide promo shelves (also stripped at the response level in adblock.js) */\n\nytlr-promo-shelf-renderer {\n display: none !important;\n}\n\n/* Reduced motion mode: disable all animations/transitions for performance */\n\nbody.axotube-reduced-motion,\nbody.axotube-reduced-motion *,\nbody.axotube-reduced-motion *::before,\nbody.axotube-reduced-motion *::after {\n animation: none !important;\n animation-delay: 0s !important;\n animation-duration: 0s !important;\n transition: none !important;\n transition-delay: 0s !important;\n transition-duration: 0s !important;\n scroll-behavior: auto !important;\n will-change: auto !important;\n backdrop-filter: none !important;\n}\n\nbody.axotube-reduced-motion ytlr-swipeable-overlay,\nbody.axotube-reduced-motion .ytLrWatchDefaultShadow,\nbody.axotube-reduced-motion div[idomkey="shadow"] {\n opacity: 1 !important;\n}\n\nbody.axotube-reduced-motion ytlr-player,\nbody.axotube-reduced-motion .html5-video-player {\n will-change: auto !important;\n}\n',Or="/* ytaf-theme-start */",Nr="/* ytaf-theme-end */",Rr=document.createElement("style"),Mr="",_r={default:null,white:["#ffffff","#e0e0e0","#c0c0c0"],gray:["#d0d0d0","#9a9a9a","#7f7f7f"],red:["#ff7a7a","#e06a6a","#c25b5b"],blue:["#8ab4ff","#6f96e8","#5a79c9"],green:["#81c995","#68a87a","#538c64"],purple:["#d7aefb","#b28fd8","#8f70b5"],yellow:["#fdd663","#d9b34d","#b5913c"]};function Ur(e){var t=/rgba?\(\s*(\d+),\s*(\d+),\s*(\d+)/.exec(e);return t?(.2126*Number(t[1])+.7152*Number(t[2])+.0722*Number(t[3]))/255:null}function jr(e){var t=String(e.className||"").split(/\s+/).filter(function(e){return e&&/^[A-Za-z0-9_-]+$/.test(e)});return t.length&&e.tagName?e.tagName.toLowerCase()+t.map(function(e){return"."+e}).join(""):""}function Hr(){var e,t=function(e){var t=String(e||"").trim();if(!t)return"";try{var n=new URL(t);return"http:"!==n.protocol&&"https:"!==n.protocol?"":t.replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/[\r\n]/g,"")}catch(e){return""}}(Se("routeBackgroundUrl")),n=t?'\n background-image: url("'.concat(t,'") !important;\n background-size: cover !important;\n background-position: center !important;\n background-repeat: no-repeat !important;'):"\n background-color: ".concat((e=Se("routeColor"),/^#[0-9a-f]{6}$/i.test(String(e||""))?e:"#0f0f0f")," !important;"),i=t?"\n ytlr-guide-response {\n background-image: none !important;\n background-color: rgba(15, 15, 15, 0.35) !important;\n }\n ytlr-guide-response > div {\n background-image: none !important;\n background-color: transparent !important;\n }\n ytlr-guide-response .zylon-ve {\n background-image: none !important;\n background-color: transparent !important;\n }":"",r=function(e){var t=_r[e],n=document.getElementById("container");if(!t||!n)return"";for(var i=[[],[],[]],r={},a=n.querySelectorAll("*"),o=0;o<a.length;o++){var s=Ur(getComputedStyle(a[o]).color);if(!(null===s||s<.3)){var u=s>.8?0:s>.55?1:2,l=jr(a[o]);l&&!r[l]&&(r[l]=!0,i[u].push(l))}}for(var c="",h=0;h<3;h++)i[h].length&&(c+=i[h].join(",\n")+" {\n color: "+t[h]+" !important;\n }\n");return c}(Se("textTheme"));Mr="\n ".concat(Or,"\n #container {\n ").concat(n,"\n }\n ").concat(i,"\n ").concat(r,"\n ").concat(Nr,"\n");var a=document.querySelector("style[nonce]");if(a){var o=a.textContent||"",s=o.indexOf(Or),u=o.indexOf(Nr);-1!==s&&-1!==u&&(o=o.slice(0,s)+o.slice(u+20)),a.textContent=o+Mr}else Rr.textContent=Mr,!Rr.parentNode&&document.head&&document.head.appendChild(Rr)}document.head&&document.head.appendChild(Rr),Hr(),setTimeout(Hr,1500);var zr=null;window.addEventListener&&window.addEventListener("hashchange",function(){zr&&clearTimeout(zr),zr=setTimeout(Hr,150)});var Vr="1.45.0";function Kr(e,t,n){if("arrayValue"===t){var i=Se(e),r=Array.isArray(i)?i.slice():[];return r.includes(n)?r.splice(r.indexOf(n),1):r.push(n),Ee(e,r)}if("themePreset"===e){var a="string"==typeof n&&Object.prototype.hasOwnProperty.call(ce.themePresetColors,n)?ce.themePresetColors[n]:null;return!("string"!=typeof a||!/^#[0-9a-f]{6}$/i.test(a))&&(Ee("routeColor",a),Ee("themePreset",n))}return Ee(e,n)}var Gr,Jr={};var Xr=(Gr||(Gr=1,Jr.qrcode=function(){var e=function(e,t){var n=e,i=c[t],r=null,a=0,o=null,s=new Array,u={},l=function(e,t){r=function(e){for(var t=new Array(e),n=0;n<e;n+=1){t[n]=new Array(e);for(var i=0;i<e;i+=1)t[n][i]=null}return t}(a=4*n+17),h(0,0),h(a-7,0),h(0,a-7),p(),d(),m(e,t),n>=7&&f(e),null==o&&(o=v(n,i,s)),g(o,t)},h=function(e,t){for(var n=-1;n<=7;n+=1)if(!(e+n<=-1||a<=e+n))for(var i=-1;i<=7;i+=1)t+i<=-1||a<=t+i||(r[e+n][t+i]=0<=n&&n<=6&&(0==i||6==i)||0<=i&&i<=6&&(0==n||6==n)||2<=n&&n<=4&&2<=i&&i<=4)},d=function(){for(var e=8;e<a-8;e+=1)null==r[e][6]&&(r[e][6]=e%2==0);for(var t=8;t<a-8;t+=1)null==r[6][t]&&(r[6][t]=t%2==0)},p=function(){for(var e=b.getPatternPosition(n),t=0;t<e.length;t+=1)for(var i=0;i<e.length;i+=1){var a=e[t],o=e[i];if(null==r[a][o])for(var s=-2;s<=2;s+=1)for(var u=-2;u<=2;u+=1)r[a+s][o+u]=-2==s||2==s||-2==u||2==u||0==s&&0==u}},f=function(e){for(var t=b.getBCHTypeNumber(n),i=0;i<18;i+=1){var o=!e&&1==(t>>i&1);r[Math.floor(i/3)][i%3+a-8-3]=o}for(i=0;i<18;i+=1)o=!e&&1==(t>>i&1),r[i%3+a-8-3][Math.floor(i/3)]=o},m=function(e,t){for(var n=i<<3|t,o=b.getBCHTypeInfo(n),s=0;s<15;s+=1){var u=!e&&1==(o>>s&1);s<6?r[s][8]=u:s<8?r[s+1][8]=u:r[a-15+s][8]=u}for(s=0;s<15;s+=1)u=!e&&1==(o>>s&1),s<8?r[8][a-s-1]=u:s<9?r[8][15-s-1+1]=u:r[8][15-s-1]=u;r[a-8][8]=!e},g=function(e,t){for(var n=-1,i=a-1,o=7,s=0,u=b.getMaskFunction(t),l=a-1;l>0;l-=2)for(6==l&&(l-=1);;){for(var c=0;c<2;c+=1)if(null==r[i][l-c]){var h=!1;s<e.length&&(h=1==(e[s]>>>o&1)),u(i,l-c)&&(h=!h),r[i][l-c]=h,-1==(o-=1)&&(s+=1,o=7)}if((i+=n)<0||a<=i){i-=n,n=-n;break}}},v=function(e,t,n){for(var i=E.getRSBlocks(e,t),r=w(),a=0;a<n.length;a+=1){var o=n[a];r.put(o.getMode(),4),r.put(o.getLength(),b.getLengthInBits(o.getMode(),e)),o.write(r)}var s=0;for(a=0;a<i.length;a+=1)s+=i[a].dataCount;if(r.getLengthInBits()>8*s)throw new Error("code length overflow. ("+r.getLengthInBits()+">"+8*s+")");for(r.getLengthInBits()+4<=8*s&&r.put(0,4);r.getLengthInBits()%8!=0;)r.putBit(!1);for(;!(r.getLengthInBits()>=8*s||(r.put(236,8),r.getLengthInBits()>=8*s));)r.put(17,8);return function(e,t){for(var n=0,i=0,r=0,a=new Array(t.length),o=new Array(t.length),s=0;s<t.length;s+=1){var u=t[s].dataCount,l=t[s].totalCount-u;i=Math.max(i,u),r=Math.max(r,l),a[s]=new Array(u);for(var c=0;c<a[s].length;c+=1)a[s][c]=255&e.getBuffer()[c+n];n+=u;var h=b.getErrorCorrectPolynomial(l),d=S(a[s],h.getLength()-1).mod(h);for(o[s]=new Array(h.getLength()-1),c=0;c<o[s].length;c+=1){var p=c+d.getLength()-o[s].length;o[s][c]=p>=0?d.get(p):0}}var f=0;for(c=0;c<t.length;c+=1)f+=t[c].totalCount;var m=new Array(f),g=0;for(c=0;c<i;c+=1)for(s=0;s<t.length;s+=1)c<a[s].length&&(m[g]=a[s][c],g+=1);for(c=0;c<r;c+=1)for(s=0;s<t.length;s+=1)c<o[s].length&&(m[g]=o[s][c],g+=1);return m}(r,i)};return u.addData=function(e){var t=k(e);s.push(t),o=null},u.isDark=function(e,t){if(e<0||a<=e||t<0||a<=t)throw new Error(e+","+t);return r[e][t]},u.getModuleCount=function(){return a},u.make=function(){l(!1,function(){for(var e=0,t=0,n=0;n<8;n+=1){l(!0,n);var i=b.getLostPoint(u);(0==n||e>i)&&(e=i,t=n)}return t}())},u.createTableTag=function(e,t){e=e||2;var n="";n+='<table style="',n+=" border-width: 0px; border-style: none;",n+=" border-collapse: collapse;",n+=" padding: 0px; margin: "+(t=void 0===t?4*e:t)+"px;",n+='">',n+="<tbody>";for(var i=0;i<u.getModuleCount();i+=1){n+="<tr>";for(var r=0;r<u.getModuleCount();r+=1)n+='<td style="',n+=" border-width: 0px; border-style: none;",n+=" border-collapse: collapse;",n+=" padding: 0px; margin: 0px;",n+=" width: "+e+"px;",n+=" height: "+e+"px;",n+=" background-color: ",n+=u.isDark(i,r)?"#000000":"#ffffff",n+=";",n+='"/>';n+="</tr>"}return n+="</tbody>",n+="</table>"},u.createImgTag=function(e,t){e=e||2,t=void 0===t?4*e:t;var n=u.getModuleCount()*e+2*t,i=t,r=n-t;return T(n,n,function(t,n){if(i<=t&&t<r&&i<=n&&n<r){var a=Math.floor((t-i)/e),o=Math.floor((n-i)/e);return u.isDark(o,a)?0:1}return 1})},u};e.stringToBytes=function(e){for(var t=new Array,n=0;n<e.length;n+=1){var i=e.charCodeAt(n);t.push(255&i)}return t},e.createStringToBytes=function(e,t){var n=function(){for(var n=A(e),i=function(){var e=n.read();if(-1==e)throw new Error;return e},r=0,a={};;){var o=n.read();if(-1==o)break;var s=i(),u=i()<<8|i();a[String.fromCharCode(o<<8|s)]=u,r+=1}if(r!=t)throw new Error(r+" != "+t);return a}(),i="?".charCodeAt(0);return function(e){for(var t=new Array,r=0;r<e.length;r+=1){var a=e.charCodeAt(r);if(a<128)t.push(a);else{var o=n[e.charAt(r)];"number"==typeof o?(255&o)==o?t.push(o):(t.push(o>>>8),t.push(255&o)):t.push(i)}}return t}};var t,n,i,r,a,o=1,s=2,u=4,l=8,c={L:1,M:0,Q:3,H:2},h=0,d=1,p=2,f=3,m=4,g=5,v=6,y=7,b=(t=[[],[6,18],[6,22],[6,26],[6,30],[6,34],[6,22,38],[6,24,42],[6,26,46],[6,28,50],[6,30,54],[6,32,58],[6,34,62],[6,26,46,66],[6,26,48,70],[6,26,50,74],[6,30,54,78],[6,30,56,82],[6,30,58,86],[6,34,62,90],[6,28,50,72,94],[6,26,50,74,98],[6,30,54,78,102],[6,28,54,80,106],[6,32,58,84,110],[6,30,58,86,114],[6,34,62,90,118],[6,26,50,74,98,122],[6,30,54,78,102,126],[6,26,52,78,104,130],[6,30,56,82,108,134],[6,34,60,86,112,138],[6,30,58,86,114,142],[6,34,62,90,118,146],[6,30,54,78,102,126,150],[6,24,50,76,102,128,154],[6,28,54,80,106,132,158],[6,32,58,84,110,136,162],[6,26,54,82,110,138,166],[6,30,58,86,114,142,170]],n=1335,i=7973,a=function(e){for(var t=0;0!=e;)t+=1,e>>>=1;return t},(r={}).getBCHTypeInfo=function(e){for(var t=e<<10;a(t)-a(n)>=0;)t^=n<<a(t)-a(n);return 21522^(e<<10|t)},r.getBCHTypeNumber=function(e){for(var t=e<<12;a(t)-a(i)>=0;)t^=i<<a(t)-a(i);return e<<12|t},r.getPatternPosition=function(e){return t[e-1]},r.getMaskFunction=function(e){switch(e){case h:return function(e,t){return(e+t)%2==0};case d:return function(e,t){return e%2==0};case p:return function(e,t){return t%3==0};case f:return function(e,t){return(e+t)%3==0};case m:return function(e,t){return(Math.floor(e/2)+Math.floor(t/3))%2==0};case g:return function(e,t){return e*t%2+e*t%3==0};case v:return function(e,t){return(e*t%2+e*t%3)%2==0};case y:return function(e,t){return(e*t%3+(e+t)%2)%2==0};default:throw new Error("bad maskPattern:"+e)}},r.getErrorCorrectPolynomial=function(e){for(var t=S([1],0),n=0;n<e;n+=1)t=t.multiply(S([1,x.gexp(n)],0));return t},r.getLengthInBits=function(e,t){if(1<=t&&t<10)switch(e){case o:return 10;case s:return 9;case u:case l:return 8;default:throw new Error("mode:"+e)}else if(t<27)switch(e){case o:return 12;case s:return 11;case u:return 16;case l:return 10;default:throw new Error("mode:"+e)}else{if(!(t<41))throw new Error("type:"+t);switch(e){case o:return 14;case s:return 13;case u:return 16;case l:return 12;default:throw new Error("mode:"+e)}}},r.getLostPoint=function(e){for(var t=e.getModuleCount(),n=0,i=0;i<t;i+=1)for(var r=0;r<t;r+=1){for(var a=0,o=e.isDark(i,r),s=-1;s<=1;s+=1)if(!(i+s<0||t<=i+s))for(var u=-1;u<=1;u+=1)r+u<0||t<=r+u||0==s&&0==u||o==e.isDark(i+s,r+u)&&(a+=1);a>5&&(n+=3+a-5)}for(i=0;i<t-1;i+=1)for(r=0;r<t-1;r+=1){var l=0;e.isDark(i,r)&&(l+=1),e.isDark(i+1,r)&&(l+=1),e.isDark(i,r+1)&&(l+=1),e.isDark(i+1,r+1)&&(l+=1),0!=l&&4!=l||(n+=3)}for(i=0;i<t;i+=1)for(r=0;r<t-6;r+=1)e.isDark(i,r)&&!e.isDark(i,r+1)&&e.isDark(i,r+2)&&e.isDark(i,r+3)&&e.isDark(i,r+4)&&!e.isDark(i,r+5)&&e.isDark(i,r+6)&&(n+=40);for(r=0;r<t;r+=1)for(i=0;i<t-6;i+=1)e.isDark(i,r)&&!e.isDark(i+1,r)&&e.isDark(i+2,r)&&e.isDark(i+3,r)&&e.isDark(i+4,r)&&!e.isDark(i+5,r)&&e.isDark(i+6,r)&&(n+=40);var c=0;for(r=0;r<t;r+=1)for(i=0;i<t;i+=1)e.isDark(i,r)&&(c+=1);return n+=Math.abs(100*c/t/t-50)/5*10},r),x=function(){for(var e=new Array(256),t=new Array(256),n=0;n<8;n+=1)e[n]=1<<n;for(n=8;n<256;n+=1)e[n]=e[n-4]^e[n-5]^e[n-6]^e[n-8];for(n=0;n<255;n+=1)t[e[n]]=n;var i={glog:function(e){if(e<1)throw new Error("glog("+e+")");return t[e]},gexp:function(t){for(;t<0;)t+=255;for(;t>=256;)t-=255;return e[t]}};return i}();function S(e,t){if(void 0===e.length)throw new Error(e.length+"/"+t);var n=function(){for(var n=0;n<e.length&&0==e[n];)n+=1;for(var i=new Array(e.length-n+t),r=0;r<e.length-n;r+=1)i[r]=e[r+n];return i}(),i={get:function(e){return n[e]},getLength:function(){return n.length},multiply:function(e){for(var t=new Array(i.getLength()+e.getLength()-1),n=0;n<i.getLength();n+=1)for(var r=0;r<e.getLength();r+=1)t[n+r]^=x.gexp(x.glog(i.get(n))+x.glog(e.get(r)));return S(t,0)},mod:function(e){if(i.getLength()-e.getLength()<0)return i;for(var t=x.glog(i.get(0))-x.glog(e.get(0)),n=new Array(i.getLength()),r=0;r<i.getLength();r+=1)n[r]=i.get(r);for(r=0;r<e.getLength();r+=1)n[r]^=x.gexp(x.glog(e.get(r))+t);return S(n,0).mod(e)}};return i}var E=function(){var e=[[1,26,19],[1,26,16],[1,26,13],[1,26,9],[1,44,34],[1,44,28],[1,44,22],[1,44,16],[1,70,55],[1,70,44],[2,35,17],[2,35,13],[1,100,80],[2,50,32],[2,50,24],[4,25,9],[1,134,108],[2,67,43],[2,33,15,2,34,16],[2,33,11,2,34,12],[2,86,68],[4,43,27],[4,43,19],[4,43,15],[2,98,78],[4,49,31],[2,32,14,4,33,15],[4,39,13,1,40,14],[2,121,97],[2,60,38,2,61,39],[4,40,18,2,41,19],[4,40,14,2,41,15],[2,146,116],[3,58,36,2,59,37],[4,36,16,4,37,17],[4,36,12,4,37,13],[2,86,68,2,87,69],[4,69,43,1,70,44],[6,43,19,2,44,20],[6,43,15,2,44,16]],t=function(e,t){var n={};return n.totalCount=e,n.dataCount=t,n},n={getRSBlocks:function(n,i){var r=function(t,n){switch(n){case c.L:return e[4*(t-1)+0];case c.M:return e[4*(t-1)+1];case c.Q:return e[4*(t-1)+2];case c.H:return e[4*(t-1)+3];default:return}}(n,i);if(void 0===r)throw new Error("bad rs block @ typeNumber:"+n+"/errorCorrectLevel:"+i);for(var a=r.length/3,o=new Array,s=0;s<a;s+=1)for(var u=r[3*s+0],l=r[3*s+1],h=r[3*s+2],d=0;d<u;d+=1)o.push(t(l,h));return o}};return n}(),w=function(){var e=new Array,t=0,n={getBuffer:function(){return e},get:function(t){var n=Math.floor(t/8);return 1==(e[n]>>>7-t%8&1)},put:function(e,t){for(var i=0;i<t;i+=1)n.putBit(1==(e>>>t-i-1&1))},getLengthInBits:function(){return t},putBit:function(n){var i=Math.floor(t/8);e.length<=i&&e.push(0),n&&(e[i]|=128>>>t%8),t+=1}};return n},k=function(t){var n=u,i=e.stringToBytes(t),r={getMode:function(){return n},getLength:function(e){return i.length},write:function(e){for(var t=0;t<i.length;t+=1)e.put(i[t],8)}};return r},D=function(){var e=new Array,t={writeByte:function(t){e.push(255&t)},writeShort:function(e){t.writeByte(e),t.writeByte(e>>>8)},writeBytes:function(e,n,i){n=n||0,i=i||e.length;for(var r=0;r<i;r+=1)t.writeByte(e[r+n])},writeString:function(e){for(var n=0;n<e.length;n+=1)t.writeByte(e.charCodeAt(n))},toByteArray:function(){return e},toString:function(){var t="";t+="[";for(var n=0;n<e.length;n+=1)n>0&&(t+=","),t+=e[n];return t+="]"}};return t},A=function(e){var t=e,n=0,i=0,r=0,a={read:function(){for(;r<8;){if(n>=t.length){if(0==r)return-1;throw new Error("unexpected end of file./"+r)}var e=t.charAt(n);if(n+=1,"="==e)return r=0,-1;e.match(/^\s$/)||(i=i<<6|o(e.charCodeAt(0)),r+=6)}var a=i>>>r-8&255;return r-=8,a}},o=function(e){if(65<=e&&e<=90)return e-65;if(97<=e&&e<=122)return e-97+26;if(48<=e&&e<=57)return e-48+52;if(43==e)return 62;if(47==e)return 63;throw new Error("c:"+e)};return a},C=function(e,t){var n=e,i=t,r=new Array(e*t),a={setPixel:function(e,t,i){r[t*n+e]=i},write:function(e){e.writeString("GIF87a"),e.writeShort(n),e.writeShort(i),e.writeByte(128),e.writeByte(0),e.writeByte(0),e.writeByte(0),e.writeByte(0),e.writeByte(0),e.writeByte(255),e.writeByte(255),e.writeByte(255),e.writeString(","),e.writeShort(0),e.writeShort(0),e.writeShort(n),e.writeShort(i),e.writeByte(0);var t=o(2);e.writeByte(2);for(var r=0;t.length-r>255;)e.writeByte(255),e.writeBytes(t,r,255),r+=255;e.writeByte(t.length-r),e.writeBytes(t,r,t.length-r),e.writeByte(0),e.writeString(";")}},o=function(e){for(var t=1<<e,n=1+(1<<e),i=e+1,a=s(),o=0;o<t;o+=1)a.add(String.fromCharCode(o));a.add(String.fromCharCode(t)),a.add(String.fromCharCode(n));var u=D(),l=function(e){var t=e,n=0,i=0,r={write:function(e,r){if(e>>>r!=0)throw new Error("length over");for(;n+r>=8;)t.writeByte(255&(e<<n|i)),r-=8-n,e>>>=8-n,i=0,n=0;i|=e<<n,n+=r},flush:function(){n>0&&t.writeByte(i)}};return r}(u);l.write(t,i);var c=0,h=String.fromCharCode(r[c]);for(c+=1;c<r.length;){var d=String.fromCharCode(r[c]);c+=1,a.contains(h+d)?h+=d:(l.write(a.indexOf(h),i),a.size()<4095&&(a.size()==1<<i&&(i+=1),a.add(h+d)),h=d)}return l.write(a.indexOf(h),i),l.write(n,i),l.flush(),u.toByteArray()},s=function(){var e={},t=0,n={add:function(i){if(n.contains(i))throw new Error("dup key:"+i);e[i]=t,t+=1},size:function(){return t},indexOf:function(t){return e[t]},contains:function(t){return void 0!==e[t]}};return n};return a},T=function(e,t,n,i){for(var r=C(e,t),a=0;a<t;a+=1)for(var o=0;o<e;o+=1)r.setPixel(o,a,n(o,a));var s=D();r.write(s);for(var u=function(){var e=0,t=0,n=0,i="",r={},a=function(e){i+=String.fromCharCode(o(63&e))},o=function(e){if(e<0);else{if(e<26)return 65+e;if(e<52)return e-26+97;if(e<62)return e-52+48;if(62==e)return 43;if(63==e)return 47}throw new Error("n:"+e)};return r.writeByte=function(i){for(e=e<<8|255&i,t+=8,n+=1;t>=6;)a(e>>>t-6),t-=6},r.flush=function(){if(t>0&&(a(e<<6-t),e=0,t=0),n%3!=0)for(var r=3-n%3,o=0;o<r;o+=1)i+="="},r.toString=function(){return i},r}(),l=s.toByteArray(),c=0;c<l.length;c+=1)u.writeByte(l[c]);u.flush();var h="";return h+="<img",h+=' src="',h+="data:image/gif;base64,",h+=u,h+='"',h+=' width="',h+=e,h+='"',h+=' height="',h+=t,h+='"',i&&(h+=' alt="',h+=i,h+='"'),h+="/>"};return e}()),Jr),Wr=e(Xr),qr=Ln(50);function Yr(e){if(qr.has(e))return qr.get(e);try{var t,n=Wr.qrcode(6,"H");n.addData(e),n.make();var i=null===(t=n.createImgTag(8,8).match(/src="([^"]+)"/))||void 0===t?void 0:t[1];if(i)return qr.set(e,i),i}catch(e){console.error("[AxoTube:qrCode] QR code generation failed:",e)}return null}var Qr=/^\d{6}$/,Zr=/^https?:\/\/[^\s/?#]+$/,$r=null,ea=0;function ta(e){if(ea=Date.now(),e&&"string"==typeof e.code&&Qr.test(e.code)){var t=Array.isArray(e.urls)?e.urls.filter(function(e){return"string"==typeof e&&Zr.test(e)}).slice(0,4):[];$r={code:e.code,urls:t}}else $r=null}function na(){return $r}var ia="http://127.0.0.1:8090",ra={checked:!1,service:null,proxy:null};function aa(e,t){return Kn(e,t).then(function(e){return e&&e.ok?e.json():null}).catch(function(){return null})}function oa(e){Promise.all([aa("".concat(ia,"/api/diagnostics")),aa("".concat("http://127.0.0.1:8081","/axotube/health")),aa("".concat(ia,"/api/pairing-code"))]).then(function(t){var n,i=(n=t[0])&&n.service?{version:n.service.version,launchDebugger:!(!n.launch||!n.launch.debugger),bundle:n.bundle||null}:null,r=t[1]&&t[1].ok?{version:t[1].version}:null;ra={checked:!0,service:i,proxy:r},ta(i?t[2]:null),e&&e()})}function sa(){return ra}var ua=[{type:"sponsor",key:"enableSponsorBlockSponsor",icon:"MONEY_HEART"},{type:"intro",key:"enableSponsorBlockIntro",icon:"PLAY_CIRCLE"},{type:"outro",key:"enableSponsorBlockOutro",icon:"PAUSE"},{type:"interaction",key:"enableSponsorBlockInteraction",icon:"SUBSCRIBE"},{type:"selfpromo",key:"enableSponsorBlockSelfPromo",icon:"BROADCAST"},{type:"preview",key:"enableSponsorBlockPreview",icon:"PLAY_ARROW_CIRCLE"},{type:"filler",key:"enableSponsorBlockFiller",icon:"TIMER"},{type:"music_offtopic",key:"enableSponsorBlockMusicOfftopic",icon:"MUSIC"}],la={skip:"show",show:"off",off:"skip"},ca=["default","black","darkGray","charcoal","navy","darkRed","darkGreen","darkPurple"],ha=["default","white","gray","red","blue","green","purple","yellow"],da=["auto","2160p","1440p","1080p","720p","480p","360p","240p","144p"],pa=["any","vp9","av01","avc1"],fa=["en","hi","es","fr","de","pt","ja","ko","ru"],ma=["1440p","2160p"],ga=[.05,.1,.15,.2,.25,.3,.35,.4,.45,.5],va=[0,.5,1,1.5,2,2.5,3,3.5,4,4.5,5],ya=[0,10,20,30,40,50,60,70,80,90,100],ba=[10,20,30,60,120,180,240,300],xa=[.1,.2,.3,.4,.5,.6,.7,.8,.9,1],Sa=[{name:"Search",icon:"SEARCH"},{name:"Home",icon:"WHAT_TO_WATCH"},{name:"Sports",icon:"TROPHY"},{name:"News",icon:"NEWS"},{name:"Music",icon:"YOUTUBE_MUSIC"},{name:"Podcasts",icon:"BROADCAST"},{name:"Movies & TV",icon:"CLAPPERBOARD"},{name:"Live",icon:"LIVE"},{name:"Gaming",icon:"GAMING"},{name:"Subscriptions",icon:"SUBSCRIPTIONS"},{name:"Library",icon:"TAB_LIBRARY"},{name:"More",icon:"TAB_MORE"}];function Ea(e){return JSON.stringify({browseEndpoint:{browseId:e}})}var wa=[{name:"Search",icon:"SEARCH",value:JSON.stringify({searchEndpoint:{query:""}})},{name:"Home",icon:"WHAT_TO_WATCH",value:Ea("FEtopics")},{name:"Sports",icon:"TROPHY",value:Ea("FEtopics_sports")},{name:"News",icon:"NEWS",value:Ea("FEtopics_news")},{name:"Music",icon:"YOUTUBE_MUSIC",value:Ea("FEtopics_music")},{name:"Podcasts",icon:"BROADCAST",value:Ea("FEtopics_podcasts")},{name:"Movies & TV",icon:"CLAPPERBOARD",value:Ea("FEtopics_movies")},{name:"Gaming",icon:"GAMING",value:Ea("FEtopics_gaming")},{name:"Live",icon:"LIVE",value:Ea("FEtopics_live")},{name:"Subscriptions",icon:"SUBSCRIPTIONS",value:Ea("FEsubscriptions")},{name:"Library",icon:"TAB_LIBRARY",value:Ea("FElibrary")},{name:"More",icon:"TAB_MORE",value:Ea("FEtopics_more")}];function ka(e){var t=Da(e);return t&&Se(t.key)?-1!==(Se("sponsorBlockManualSkips")||[]).indexOf(e)?"show":"skip":"off"}function Da(e){for(var t=0;t<ua.length;t++)if(ua[t].type===e)return ua[t];return null}function Aa(e,t,n,i){return{name:e,icon:n,value:t,hint:i}}function Ca(e,t,n,i){return{name:e,key:t,value:n,also:i}}function Ta(e,t,n,i,r){return{name:e,icon:t,value:null,menuHeader:i,options:n,refresh:r}}function Pa(e,t){return{title:e,subtitle:t}}function Fa(e,t,n,i,r,a,o){return{name:e,icon:t,value:null,options:{title:n,subtitle:i,content:r,links:o},refresh:a}}function Ba(e,t){return e.hint=t,e}function Ia(e,t,n){return{name:e,icon:t,launchDebugger:n}}function La(){var e=na(),t=e&&e.urls.filter(function(e){return!!e})[0];return e&&t?[Lt("settings.phoneSync.qrHint"),{qrLink:"".concat(t,"/?code=").concat(e.code)}]:[Lt("settings.phoneSync.noQr")]}function Oa(){var e=sa();return e.checked?e.service?[Lt("settings.webConfig.online")].concat(function(){var e=na();if(!e)return[Lt("settings.phoneSync.waiting")];var t=[Lt("settings.phoneSync.intro")],n=e.urls.filter(function(e){return!!e})[0];return n&&t.push(Lt("settings.phoneSync.address",{url:n})),t.push(Lt("settings.phoneSync.code",{code:e.code})),t}()):[Lt("settings.webConfig.offline")]:[Lt("settings.status.checking")]}function Na(){var e=sa(),t=[Lt("settings.about.userscript",{version:Vr})];return e.checked?(t.push(e.service?Lt("settings.about.serviceOnline",{version:e.service.version}):Lt("settings.about.serviceOffline")),t.push(e.proxy?Lt("settings.about.proxyOnline",{version:e.proxy.version}):Lt("settings.about.proxyOffline")),t.push(function(e){var t=e.service&&e.service.bundle;return t&&t.current?t.available&&t.latest?Lt("settings.about.bundleUpdate",{current:t.current,latest:t.latest}):Lt("settings.about.bundleCurrent",{version:t.current}):Lt("settings.about.bundleUnknown")}(e)),t.push(function(e){if(!e.service)return Lt("settings.about.launchUnknown");var t=e.service.launchDebugger?Lt("settings.advanced.launch.debuggerShort"):Lt("settings.advanced.launch.proxyShort");return Lt("settings.about.launchMode",{mode:t})}(e)),t):(t.push(Lt("settings.status.checking")),t)}function Ra(){var e,t,n;return[Ta(Lt("settings.playback.title"),"PLAY_CIRCLE",[Ta(Lt("settings.playback.quality.title"),"VIDEO_QUALITY",da.map(function(e){return Ca("auto"===e?Lt("settings.common.auto"):e,"preferredVideoQuality",e)}),Pa(Lt("settings.playback.quality.title"),Lt("settings.playback.quality.subtitle"))),Ta(Lt("settings.playback.codec.title"),"VIDEO_QUALITY",pa.map(function(e){return Ca("any"===e?Lt("settings.common.any"):e.toUpperCase(),"videoPreferredCodec",e)}),Pa(Lt("settings.playback.codec.title"),Lt("settings.playback.codec.subtitle"))),Ta(Lt("settings.playback.speedStep.title"),"SLOW_MOTION_VIDEO",ga.map(function(e){return Ca("".concat(e,"x"),"speedSettingsIncrement",e)}),Pa(Lt("settings.playback.speedStep.title"),Lt("settings.playback.speedStep.subtitle"))),(n=se(),n&&n.SetFrameRate?Ta(Lt("settings.playback.frameRate.title"),"SYNC",[Aa(Lt("settings.playback.frameRate.match"),"autoFrameRate","SCREEN_SWITCH"),Ta(Lt("settings.playback.frameRate.pause.title"),"TIMER",va.map(function(e){return Ca(Va(e),"autoFrameRatePauseVideoFor",1e3*e)}),Pa(Lt("settings.playback.frameRate.pause.title"),Lt("settings.playback.frameRate.pause.subtitle")))],Pa(Lt("settings.playback.frameRate.title"),Lt("settings.playback.frameRate.subtitle"))):null),Ta(Lt("settings.playback.captions.title"),"CAPTIONS",[Aa(Lt("settings.playback.captions.onByDefault"),"enableAutoSubtitles","CLOSED_CAPTION_SELECTED"),Ta(Lt("settings.playback.captions.language.title"),"TRANSLATE",fa.map(function(e){return Ca(Lt("settings.playback.languages.".concat(e)),"autoSubtitleLanguage",e)}),Pa(Lt("settings.playback.captions.language.title"),Lt("settings.playback.captions.language.subtitle"))),Aa(Lt("settings.playback.captions.allowAuto"),"autoSubtitleAllowAuto","SPARKLE"),Aa(Lt("settings.playback.captions.myLanguage"),"enableShowUserLanguage","LANGUAGE"),Aa(Lt("settings.playback.captions.otherLanguages"),"enableShowOtherLanguages","TRANSLATE")],Pa(Lt("settings.playback.captions.title"),Lt("settings.playback.captions.subtitle"))),Ta(Lt("settings.playback.panelShrink.title"),"COMMENT",[Aa(Lt("settings.playback.panelShrink.on"),"enablePanelShrink","COMMENT"),Ta(Lt("settings.playback.panelShrink.size.title"),"VIDEO_QUALITY",[Ca("50%","panelShrinkPercent","50"),Ca("60%","panelShrinkPercent","60"),Ca("70%","panelShrinkPercent","70")],Pa(Lt("settings.playback.panelShrink.size.title"),Lt("settings.playback.panelShrink.size.subtitle")))],Pa(Lt("settings.playback.panelShrink.title"),Lt("settings.playback.panelShrink.subtitle"))),Aa(Lt("settings.playback.pauseInBackground"),"enablePauseOnBlur","PAUSE"),Aa(Lt("settings.playback.remainingTime"),"enableRemainingTime","TIMER")],Pa(Lt("settings.playback.title"),Lt("settings.playback.subtitle"))),Ta(Lt("settings.playerControls.title"),"SETTINGS_REMOTE",[Aa(Lt("settings.playerControls.customize"),"enablePatchingVideoPlayer","EDIT",Lt("settings.playerControls.hints.customize")),Aa(Lt("settings.playerControls.previousNext"),"enablePreviousNextButtons","SKIP_NEXT",Lt("settings.playerControls.hints.previousNext")),Aa(Lt("settings.playerControls.speed"),"enableSpeedControlsButton","SLOW_MOTION_VIDEO",Lt("settings.playerControls.hints.speed")),Aa(Lt("settings.playerControls.superThanks"),"enableSuperThanksButton","HANDS_HEART",Lt("settings.playerControls.hints.superThanks")),Aa(Lt("settings.playerControls.miniPlayer"),"enableMPButton","MULTIVIEW",Lt("settings.playerControls.hints.miniPlayer")),Aa(Lt("settings.playerControls.pipInsteadOfMini"),"enableSwapMPWithPIP","SCREEN_SWITCH",Lt("settings.playerControls.hints.pipInsteadOfMini")),Aa(Lt("settings.ads.paidPromotion"),"enablePaidPromotionOverlay","PAID",Lt("settings.playerControls.hints.paidPromotion")),Aa(Lt("settings.playerControls.onePress"),"enableOnePressMode","SPACE_BAR",Lt("settings.playerControls.hints.onePress"))],Pa(Lt("settings.playerControls.title"),Lt("settings.playerControls.subtitle"))),Ta(Lt("settings.ads.title"),"SLASH_CIRCLE_LEFT",[Aa(Lt("settings.ads.blockAds"),"enableAdBlock","HEALTH_AND_SAFETY"),Aa(Lt("settings.ads.playerTracking"),"blockPlayerAdTracking","HEALTH_AND_SAFETY"),Aa(Lt("settings.ads.adTelemetry"),"blockAdTelemetry","HEALTH_AND_SAFETY"),Aa(Lt("settings.ads.viewStats"),"blockViewStatsTelemetry","HEALTH_AND_SAFETY"),Aa(Lt("settings.ads.liveVideos"),"removeLiveVideos","VISIBILITY_OFF"),Aa(Lt("settings.ads.topLiveGames"),"removeTopLiveGames","VISIBILITY_OFF"),Aa(Lt("settings.ads.mostRelevant"),"removeMostRelevant","VISIBILITY_OFF"),Aa(Lt("settings.ads.sponsorBlock"),"enableSponsorBlock","SPONSORSHIP_STAR"),Ta(Lt("settings.ads.segmentTypes.title"),"SETTINGS",ua.map(function(e){return{name:Lt("settings.ads.segments.".concat(e.type)),icon:e.icon,segment:e.type}}),Pa(Lt("settings.ads.segmentTypes.title"),Lt("settings.ads.segmentTypes.subtitle"))),Aa(Lt("settings.ads.highlightButton"),"enableSponsorBlockHighlight","STAR"),Aa(Lt("settings.ads.notices"),"enableSponsorBlockToasts","INFO")],Pa(Lt("settings.ads.title"),Lt("settings.ads.subtitle"))),Ta(Lt("settings.browsing.title"),"EXPLORE",[Ta(Lt("settings.browsing.thumbnails.title"),"EYE",[Aa(Lt("settings.browsing.hqThumbnails"),"enableHqThumbnails","VIDEO_QUALITY"),Aa(Lt("settings.browsing.deArrowTitles"),"enableDeArrowTitles","TEXT_BOX"),Aa(Lt("settings.browsing.deArrowThumbnails"),"enableDeArrowThumbnails","EYE"),Aa(Lt("settings.browsing.deArrowPeek"),"enableDeArrowPeek","VISIBILITY")],Pa(Lt("settings.browsing.thumbnails.title"),Lt("settings.browsing.thumbnails.subtitle"))),Ta(Lt("settings.browsing.previews.title"),"PLAY_CIRCLE",[Aa(Lt("settings.browsing.previews.on"),"enablePreviews","PLAY_ARROW_CIRCLE"),{name:Lt("settings.browsing.previews.length"),icon:"TIMER",value:"previewLengthSeconds",stepper:5}],Pa(Lt("settings.browsing.previews.title"),Lt("settings.browsing.previews.subtitle"))),Ta(Lt("settings.browsing.hideWatched.title"),"VISIBILITY_OFF",[Aa(Lt("settings.browsing.hideWatched.on"),"enableHideWatchedVideos","VISIBILITY_OFF"),Ta(Lt("settings.browsing.hideWatched.threshold.title"),"TIMER",ya.map(function(e){return Ca("".concat(e,"%"),"hideWatchedVideosThreshold",e)}),Pa(Lt("settings.browsing.hideWatched.threshold.title"),Lt("settings.browsing.hideWatched.threshold.subtitle"))),{name:Lt("settings.browsing.hideWatched.pages.title"),value:null,arrayToEdit:"hideWatchedVideosPages",menuHeader:Pa(Lt("settings.browsing.hideWatched.pages.title"),Lt("settings.browsing.hideWatched.pages.subtitle")),options:[{name:"Search Results",icon:"SEARCH",value:"search"},{name:"Home",icon:"WHAT_TO_WATCH",value:"home"},{name:"Music",icon:"YOUTUBE_MUSIC",value:"music"},{name:"Gaming",icon:"GAMING",value:"gaming"},{name:"Subscriptions",icon:"SUBSCRIPTIONS",value:"subscriptions"},{name:"Library",icon:"TAB_LIBRARY",value:"library"},{name:"More",icon:"TAB_MORE",value:"more"}]}],Pa(Lt("settings.browsing.hideWatched.title"),Lt("settings.browsing.hideWatched.subtitle"))),Aa(Lt("settings.browsing.shorts"),"enableShorts","YOUTUBE_SHORTS_FILL_24"),Aa(Lt("settings.browsing.endScreens"),"enableHideEndScreenCards","VISIBILITY_OFF"),Aa(Lt("settings.browsing.longPress"),"enableLongPress","ADD_TO_PLAYLIST"),Aa(Lt("settings.browsing.stillWatching"),"enableYouThereRenderer","PERSON")],Pa(Lt("settings.browsing.title"),Lt("settings.browsing.subtitle"))),Ta(Lt("settings.home.title"),"HOME",[Ta(Lt("settings.home.startup.title"),"TV",wa.map(function(e){return{name:e.name,icon:e.icon,key:"launchToOnStartup",value:e.value}}),Pa(Lt("settings.home.startup.title"),Lt("settings.home.startup.subtitle"))),Aa(Lt("settings.home.reloadHome"),"reloadHomeOnStartup","ARROW_CIRCLE"),{name:Lt("settings.home.sidebarItems.title"),icon:"LIST",value:null,arrayToEdit:"disabledSidebarContents",menuHeader:Pa(Lt("settings.home.sidebarItems.title"),Lt("settings.home.sidebarItems.subtitle")),options:Sa.map(function(e){return{name:e.name,icon:e.icon,value:e.icon}})},Aa(Lt("settings.home.hideChannels"),"disableChannelsOnSidebar","PERSON_MINUS"),Aa(Lt("settings.home.sortSubscriptions"),"sortSubscriptionsByAlphabet","SORT")],Pa(Lt("settings.home.title"),Lt("settings.home.subtitle"))),Ta(Lt("settings.appearance.title"),"AUTO_AWESOME",[Ta(Lt("settings.appearance.theme.title"),"LENS_BLUE",[Ta(Lt("settings.appearance.theme.presets.title"),"LENS_MAGENTA",ca.map(function(e){return Ca(Lt("settings.appearance.colors.".concat(e)),"themePreset",e)}),Pa(Lt("settings.appearance.theme.presets.title"),Lt("settings.appearance.theme.presets.subtitle"))),Ta(Lt("settings.appearance.theme.background.title"),"LENS_BLACK",ca.map(function(e){return Ca(Lt("settings.appearance.colors.".concat(e)),"routeColor",ce.themePresetColors[e])}),Pa(Lt("settings.appearance.theme.background.title"),Lt("settings.appearance.theme.background.subtitle"))),Ta(Lt("settings.appearance.theme.text.title"),"TEXT_BOX",ha.map(function(e){return Ca(Lt("settings.appearance.textColors.".concat(e)),"textTheme",e)}),Pa(Lt("settings.appearance.theme.text.title"),Lt("settings.appearance.theme.text.subtitle")))],Pa(Lt("settings.appearance.theme.title"),Lt("settings.appearance.theme.subtitle"))),Ta(Lt("settings.appearance.dimming.title"),"EYE_OFF",[Aa(Lt("settings.appearance.dimming.on"),"enableScreenDimming","EYE_OFF"),Ta(Lt("settings.appearance.dimming.timeout.title"),"TIMER",ba.map(function(e){return Ca(function(e){return e>=60?Lt("settings.minutes",{count:e/60}):Va(e)}(e),"dimmingTimeout",e)}),Pa(Lt("settings.appearance.dimming.timeout.title"),Lt("settings.appearance.dimming.timeout.subtitle"))),Ta(Lt("settings.appearance.dimming.opacity.title"),"LENS_BLUE",xa.map(function(e){return Ca("".concat(Math.round(100*e),"%"),"dimmingOpacity",e)}),Pa(Lt("settings.appearance.dimming.opacity.title"),Lt("settings.appearance.dimming.opacity.subtitle")))],Pa(Lt("settings.appearance.dimming.title"),Lt("settings.appearance.dimming.subtitle"))),Aa(Lt("settings.appearance.performance"),"enablePerformanceMode","SPEED_RUN"),Ta(Lt("settings.appearance.clock.title"),"SCHEDULE",[Ta(Lt("settings.appearance.clock.show.title"),"VISIBILITY",[Ca(Lt("settings.appearance.clock.show.off"),"clockMode","off"),Ca(Lt("settings.appearance.clock.show.always"),"clockMode","always"),Ca(Lt("settings.appearance.clock.show.notPlaying"),"clockMode","notPlaying")],Pa(Lt("settings.appearance.clock.show.title"),Lt("settings.appearance.clock.show.subtitle"))),Ta(Lt("settings.appearance.clock.format.title"),"TEXT_BOX",[Ca(Lt("settings.appearance.clock.format.h24"),"clockFormat","24h"),Ca(Lt("settings.appearance.clock.format.h12"),"clockFormat","12h"),Ca(Lt("settings.appearance.clock.format.h12NoAmPm"),"clockFormat","12hNoAmPm")],Pa(Lt("settings.appearance.clock.format.title"),Lt("settings.appearance.clock.format.subtitle"))),Ta(Lt("settings.appearance.clock.position.title"),"LOCATION_POINT",[Ca(Lt("settings.appearance.clock.position.topLeft"),"clockPosition","topLeft"),Ca(Lt("settings.appearance.clock.position.topRight"),"clockPosition","topRight"),Ca(Lt("settings.appearance.clock.position.bottomLeft"),"clockPosition","bottomLeft"),Ca(Lt("settings.appearance.clock.position.bottomRight"),"clockPosition","bottomRight")],Pa(Lt("settings.appearance.clock.position.title"),Lt("settings.appearance.clock.position.subtitle"))),Aa(Lt("settings.appearance.clock.seconds"),"clockShowSeconds","TIMER")],Pa(Lt("settings.appearance.clock.title"),Lt("settings.appearance.clock.subtitle"))),Aa(Lt("settings.appearance.fullAnimations"),"enableFixedUI","PROGRESS_ACTIVITY")],Pa(Lt("settings.appearance.title"),Lt("settings.appearance.subtitle"))),Ta(Lt("settings.axotube.title"),"SPARK",[Ba(Fa(Lt("settings.webConfig.title"),"PHONELINK",Lt("settings.webConfig.title"),Lt("settings.webConfig.subtitle"),Oa,oa,[{name:Lt("settings.webConfig.qrTitle"),icon:"SMARTPHONE",value:null,options:{title:Lt("settings.webConfig.qrTitle"),subtitle:Lt("settings.webConfig.qrSubtitle"),content:La}}]),Lt("settings.webConfig.rowHint")),Ta(Lt("settings.system.whosWatching.title"),"ACCOUNT_CIRCLE",[Aa(Lt("settings.system.whosWatching.on"),"enableWhoIsWatchingMenu","PEOPLE"),Aa(Lt("settings.system.whosWatching.always"),"permanentlyEnableWhoIsWatchingMenu","PERSON"),Aa(Lt("settings.system.whosWatching.onExit"),"enableWhosWatchingMenuOnAppExit","EXIT_APP")],Pa(Lt("settings.system.whosWatching.title"),Lt("settings.system.whosWatching.subtitle"))),Aa(Lt("settings.system.signInReminder"),"enableSigninReminder","SIGN_IN"),Aa(Lt("settings.system.welcome"),"showWelcomeToast","SPARKLE"),Ta(Lt("settings.system.updates.title"),"SYSTEM_UPDATE",[{name:Lt("settings.system.updates.checkNow"),icon:"SYSTEM_UPDATE",action:"CHECK_FOR_UPDATES"},Aa(Lt("settings.system.updates.onStartup"),"enableUpdater","SYSTEM_UPDATE")],Pa(Lt("settings.system.updates.title"),Lt("settings.system.updates.subtitle",{version:Vr}))),{name:Lt("settings.system.restartCast"),icon:"CAST_ICON",action:"AXO_CAST_RESTART"},{name:Lt("settings.system.reload"),icon:"REPLAY",action:"AXO_RELOAD_PAGE"}],Pa(Lt("settings.axotube.title"),Lt("settings.axotube.subtitle"))),Ta(Lt("settings.advanced.title"),"SETTINGS",[{name:Lt("settings.advanced.diagnostics.title"),icon:"BUG_REPORT",action:"SETTINGS_OPEN_DIAGNOSTICS"},Ta(Lt("settings.advanced.userAgent.title"),"LANGUAGE",[Ca(Lt("settings.advanced.userAgent.samsung"),"userAgentProfile","samsung",["auto"]),Ca(Lt("settings.advanced.userAgent.android"),"userAgentProfile","android")],Pa(Lt("settings.advanced.userAgent.title"),Lt("settings.advanced.userAgent.subtitle"))),Ta(Lt("settings.advanced.launch.title"),"CAST_MOBILE",[Ia(Lt("settings.advanced.launch.proxy"),"TV",!1),Ia(Lt("settings.advanced.launch.debugger"),"SETTINGS_REMOTE",!0)],Pa(Lt("settings.advanced.launch.title"),Lt("settings.advanced.launch.subtitle")),oa),Ta(Lt("settings.playback.experimental.title"),"VIDEO_QUALITY_4K",[Aa(Lt("settings.playback.experimental.unlock"),"enableExperimentalResolution","VIDEO_QUALITY_8K"),Ta(Lt("settings.playback.experimental.max.title"),"VIDEO_QUALITY",ma.map(function(e){return Ca(e,"experimentalMaxResolution",e)}),Pa(Lt("settings.playback.experimental.max.title"),Lt("settings.playback.experimental.max.subtitle")))],Pa(Lt("settings.playback.experimental.title"),Lt("settings.playback.experimental.subtitle")))],Pa(Lt("settings.advanced.title"),Lt("settings.advanced.subtitle"))),Fa(Lt("settings.about.title"),"INFO",Lt("settings.about.title"),Lt("settings.about.subtitle"),Na,oa,[(e={name:"GitHub",icon:"PRIVACY_PUBLIC",value:null,options:{title:"GitHub",subtitle:Lt("settings.about.socials.githubHint"),content:[Lt("settings.about.scanMessage",{name:"GitHub"}),{qrLink:"https://github.com/TizenDroid/axotube"}]}},t={name:"Discord",icon:"COMMENT",value:null,options:{title:"Discord",subtitle:Lt("settings.about.socials.discordHint"),content:[Lt("settings.about.scanMessage",{name:"Discord"}),{qrLink:"https://discord.gg/UDb8nak5YD"}]}},Ta(Lt("settings.about.socials.title"),"PEOPLE",[e,t],Pa(Lt("settings.about.socials.title"),Lt("settings.about.socials.subtitle"))))]),{text:Lt("settings.moreOnWeb.text")}]}var Ma="root",_a="axo-settings",Ua=new Map,ja=null;function Ha(e,t){for(var n=0;n<e.length;n++){var i=e[n];if(i){var r="".concat(t,".").concat(n);Ua.set(r,i),Array.isArray(i.options)&&Ha(i.options,r),i.options&&Array.isArray(i.options.links)&&Ha(i.options.links,"".concat(r,".links"))}}}function za(e,t){return[{customAction:{action:e,parameters:t}}]}function Va(e){return Lt("settings.seconds",{count:e})}function Ka(e,t,n,i){if(void 0!==e.text)return hn(e.text);if(e.action)return on({title:e.name},{icon:e.icon},[{customAction:{action:e.action}}]);if(void 0!==e.segment){var r=ka(e.segment);return on({title:e.name,subtitle:Lt("settings.segmentModes.".concat(r))},{icon:e.icon},za("SETTINGS_SEGMENT",{category:e.segment,panel:i,index:Ga(t)}))}if(void 0!==n){var a=-1!==(Se(n)||[]).indexOf(e.value);return on({title:e.name},{icon:e.icon,secondaryIcon:a?"CHECK_BOX":"CHECK_BOX_OUTLINE_BLANK"},za("SETTINGS_SET",{key:n,valName:"arrayValue",value:e.value,panel:i,index:Ga(t)}))}if(void 0!==e.launchDebugger){var o=sa(),s=o.service?o.service.launchDebugger:null;return on({title:e.name},{icon:e.icon,secondaryIcon:s===e.launchDebugger?"RADIO_BUTTON_CHECKED":"RADIO_BUTTON_UNCHECKED"},za("SETTINGS_LAUNCH",{debugger:e.launchDebugger,panel:i,index:Ga(t)}))}if(void 0!==e.key){var u=Se(e.key),l=u===e.value||!!e.also&&-1!==e.also.indexOf(u);return on({title:e.name},{icon:e.icon,secondaryIcon:l?"RADIO_BUTTON_CHECKED":"RADIO_BUTTON_UNCHECKED"},za("SETTINGS_SET",{key:e.key,valName:"stringValue",value:e.value,panel:i,index:Ga(t)}))}return void 0!==e.stepper?on({title:e.name,subtitle:Va(Se(e.value))},{icon:e.icon},za("SETTINGS_OPEN",{id:t})):void 0!==e.arrayToEdit||e.options&&"object"===T(e.options)?on({title:e.name,subtitle:e.hint},{icon:e.icon},za("SETTINGS_OPEN",{id:t})):"string"==typeof e.value?on({title:e.name,subtitle:e.hint},{icon:e.icon,secondaryIcon:Se(e.value)?"CHECK_BOX":"CHECK_BOX_OUTLINE_BLANK"},za("SETTINGS_TOGGLE",{key:e.value,panel:i,index:Ga(t)})):null}function Ga(e){var t=e.lastIndexOf(".");return Number(e.slice(t+1))}function Ja(e,t,n){for(var i=[],r=0;r<e.length;r++){var a=e[r];if(a){var o=Ka(a,"".concat(t,".").concat(r),n,t);o&&i.push(o)}}return i}function Xa(e){var t,n=[],i=f(e);try{for(i.s();!(t=i.n()).done;){var r=t.value;if("string"==typeof r)n.push(hn(r));else if(r&&r.qrLink){var a=Yr(r.qrLink);a&&n.push(dn(a))}}}catch(e){i.e(e)}finally{i.f()}return n}function Wa(e,t){for(var n=[],i=e.options&&e.options.links||[],r=0;r<i.length;r++)if(i[r]){var a=Ka(i[r],"".concat(t,".links.").concat(r),void 0,t);a&&n.push(a)}return n}function qa(e,t,n){var i,r=function(e){if(e===Ma||!Ua.has(e))return{header:{title:Lt("settings.ttSettings.title"),subtitle:Lt("settings.ttSettings.madeByText")},rows:Ja(ja,Ma)};var t=Ua.get(e);if(void 0!==t.stepper){var n=Se(t.value),i=t.stepper;return{header:{title:t.name},rows:[on({title:"−".concat(Va(i))},null,za("SETTINGS_STEP",{key:t.value,step:-i,panel:e})),hn(Va(n)),on({title:"+".concat(Va(i))},null,za("SETTINGS_STEP",{key:t.value,step:i,panel:e}))]}}if(void 0!==t.arrayToEdit)return{header:t.menuHeader||{title:t.name},rows:Ja(t.options,e,t.arrayToEdit)};if(t.options&&"object"===T(t.options)&&!Array.isArray(t.options)){var r="function"==typeof t.options.content?t.options.content():t.options.content||[];if(r.some(function(e){return e&&e.qrLink})){var a=r.filter(function(e){return"string"==typeof e});return{header:{title:t.options.title,subtitle:a.length?a.join(" "):t.options.subtitle},rows:Xa(r.filter(function(e){return e&&e.qrLink}))}}return{header:{title:t.options.title,subtitle:t.options.subtitle},rows:Xa(r).concat(Wa(t,e))}}return{header:t.menuHeader||{title:t.name},rows:Ja(t.options||[],e)}}(e);rn(r.header,an(r.rows,n||0),e===Ma?_a:(i=e,"".concat(_a,":").concat(i)),t)}function Ya(e,t,n){e(),t&&qa(t,!0,n)}function Qa(e,t){var n,i,r=t||{};switch(e){case"SETTINGS_OPEN":var a=Ua.get(r.id);return qa(r.id,!1),void(a&&a.refresh&&a.refresh(function(){return qa(r.id,!0)}));case"SETTINGS_OPEN_DIAGNOSTICS":return void(location.href="http://127.0.0.1:8081/axotube/diagnostics");case"SETTINGS_LAUNCH":return n=r.debugger,i=function(e){nn(Lt("app.name"),Lt(e?"settings.advanced.launch.saved":"settings.advanced.launch.failed")),qa(r.panel,!0,r.index)},void Kn("".concat(ia,"/api/launch"),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({debugger:!!n})}).then(function(e){return!(!e||!e.ok)}).catch(function(){return!1}).then(function(e){oa(function(){i&&i(e)})});case"SETTINGS_TOGGLE":return void Ya(function(){return Kr(r.key,"boolValue",!Se(r.key))},r.panel,r.index);case"SETTINGS_SET":return void Ya(function(){return Kr(r.key,r.valName,r.value)},r.panel,r.index);case"SETTINGS_SEGMENT":return void Ya(function(){return function(e,t){var n=Da(e);if(n){var i="off"!==t;!!Se(n.key)!==i&&Kr(n.key,"boolValue",i),-1!==(Se("sponsorBlockManualSkips")||[]).indexOf(e)!=("show"===t)&&Kr("sponsorBlockManualSkips","arrayValue",e)}}(r.category,la[ka(r.category)])},r.panel,r.index);case"SETTINGS_STEP":var o=ce.ranges&&ce.ranges[r.key],s=(Number(Se(r.key))||0)+r.step;return o&&(s=Math.min(o[1],Math.max(o[0],s))),void Ya(function(){return Kr(r.key,"intValue",s)},r.panel,1);default:return}}function Za(){ja=Ra(),Ua=new Map,Ha(ja,Ma),qa(Ma,!1)}window.isPipPlaying=!1;var $a=null,eo=null,to=0,no=null,io=null,ro=[],ao={length:0,classes:[]},oo={length:0,classes:[]};function so(){eo||to>=120||(eo=setTimeout(function(){eo=null,uo()},250))}function uo(){to+=1;try{var e=window._yttv?Object.values(window._yttv).find(function(e){return e&&e.mappings instanceof Map}):null;if(!e)return so(),!1;var t=e.get("PlayerService"),n=e.get("PlaybackPreviewService");if(!t||!n)return so(),!1;if($a=t,!n.__axotubePipPatched){var i=n.start,r=n.stop;"function"==typeof i&&(n.start=function(){if(!window.isPipPlaying){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return i.apply(this,t)}}),"function"==typeof r&&(n.stop=function(){if(!window.isPipPlaying){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return r.apply(this,t)}}),n.__axotubePipPatched=!0}return!0}catch(e){return console.warn("[AxoTube:pictureInPicture] PiP service loading failed:",e),so(),!1}}function lo(e,t){var n=setTimeout(function(){var t=ro.indexOf(n);-1!==t&&ro.splice(t,1),e()},t);return ro.push(n),n}function co(e,t,n){if(e&&e.classList&&t)if(0===n.length&&(n.length=e.classList.length),n.length!==e.classList.length&&n.classes.length){var i,r=f(n.classes);try{for(r.s();!(i=r.n()).done;){var a=i.value;t.classList.add(a)}}catch(e){r.e(e)}finally{r.f()}}else for(var o=0;o<e.classList.length;o++){var s=e.classList[o];n.classes.includes(s)||n.classes.push(s),t.classList.add(s)}}function ho(){if(window.isPipPlaying)try{var e=document.querySelector("ytlr-search-bar");if(!e||document.querySelector("#axo-pip-button"))return;var t=e.querySelector("ytlr-search-voice");if(!t||!t.children[0]||!t.children[0].children[0])return;var n=window._yttv?Object.values(window._yttv).find(function(e){return e instanceof Map&&e.has("CLEAR_COOKIES")}):null;if(!n)return;var i=n.get("MICROPHONE_ON"),r=n.get("CLEAR_COOKIES"),a=document.createElement("ytlr-search-voice");co(t,a,ao),a.style.left="10.25em",a.id="axo-pip-button";var o=document.createElement("ytlr-search-voice-mic-button");co(t.children[0],o,oo);for(var s=document.createElement("yt-icon"),u=0;u<t.children[0].children[0].classList.length;u++)s.classList.add(t.children[0].children[0].classList[u]);i&&s.classList.remove(i),r&&s.classList.add(r),o.appendChild(s),a.appendChild(o),e.appendChild(a)}catch(e){console.warn("[AxoTube:pictureInPicture] PiP button creation failed:",e)}}"complete"===document.readyState?uo():window.addEventListener("load",uo);var po=null;function fo(){no&&(no.disconnect(),no=null),null!==po&&(cancelAnimationFrame(po),po=null);var e=document.querySelector("#axo-pip-button");e&&e.parentNode&&e.parentNode.removeChild(e)}function mo(){!function(){for(;ro.length;)clearTimeout(ro.pop())}(),io&&(io.disconnect(),io=null),fo();var e=document.querySelector("video");e&&["width","height","top","left","inset"].forEach(function(t){return e.style.removeProperty(t)});var t=document.querySelector("ytlr-player");t&&(t.style.removeProperty("display"),t.style.removeProperty("background-color"));var n=document.querySelector("ytlr-player-container");n&&n.style.removeProperty("z-index")}function go(){if($a||uo())try{if(!Xt())return;var e=document.querySelector("video"),t=document.querySelector("ytlr-player"),n=document.querySelector("ytlr-player-container");if(!e||!t||!n)return;mo();var i=Math.floor(e.currentTime);io=new MutationObserver(function(r){var a,o=f(r);try{var s,u=function(){if("class"!==a.value.attributeName)return 0;if(t.classList.contains("ytLrPlayerEnabled"))return 0;function r(){t.isConnected&&n.isConnected&&(n.style.zIndex="10",t.style.display="block",t.style.backgroundColor="rgba(0,0,0,0)")}return r(),lo(r,500),e.addEventListener("play",function e(){var t=document.querySelector("video");t&&(t.style.removeProperty("inset"),t.style.width="".concat(window.innerWidth/3.5,"px"),t.style.height="".concat(window.innerHeight/3.5,"px"),t.style.top="68vh",t.style.left="68vw",window.isPipPlaying=!0,!no&&window.isPipPlaying&&document.body&&((no=new MutationObserver(function(){null===po&&(po=requestAnimationFrame(function(){po=null,window.isPipPlaying?ho():fo()}))})).observe(document.body,{childList:!0,subtree:!0}),ho()),t.removeEventListener("play",e))}),io&&(io.disconnect(),io=null),lo(function(){try{if($a&&$a.loadedPlaybackConfig){var e=$a.loadedPlaybackConfig,t=Object.assign({},e);e.watchEndpoint&&(t.watchEndpoint=Object.assign({},e.watchEndpoint,{startTimeSeconds:i})),$a.loadVideo(t)}}catch(e){console.warn("[AxoTube:pictureInPicture] PiP video load failed:",e)}},1e3),1};for(o.s();!(a=o.n()).done&&(0===(s=u())||1!==s););}catch(e){o.e(e)}finally{o.f()}}),io.observe(t,{attributes:!0,attributeFilter:["class"]});try{Wt({signalAction:{signal:"HISTORY_BACK"}}).dispatched||mo()}catch(e){throw mo(),e}}catch(e){console.error("[AxoTube:pictureInPicture] Enable PiP failed:",e)}else{var r=0,a=function(){r+=1,$a||uo()?go():r<20&&lo(a,200)};lo(a,200)}}function vo(e){if(Se("enableDeArrowPeek")){var t=e&&e.showMenuCommand;if(t&&t.contentId){var n,i=(n=t.contentId,Jn.get(n)||null),r=function(e){var t=Gn.get(e);return t&&t.data?t.data:null}(t.contentId);if(i&&r){if(t.title){var a=!!Se("enableDeArrowTitles")?i.title:Xn(r);a&&(t.title={simpleText:a})}if(t.thumbnail){var o=!!Se("enableDeArrowThumbnails")?i.thumbnails:Wn(t.contentId,r);o&&(t.thumbnail={thumbnails:o})}}}}}function yo(e,t){Kn("".concat("http://127.0.0.1:8090","/api/cast/restart"),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({reason:e})}).then(function(e){return e.ok?e.json():Promise.reject(new Error("HTTP ".concat(e.status)))}).then(function(e){t&&t(null,e)}).catch(function(e){t&&t(e,null)})}document.addEventListener("visibilitychange",function(){document.hidden||yo("focus")});var bo=null,xo=!1;function So(e){if(e)try{e.playbackRate=Se("videoSpeed")}catch(e){console.warn("[AxoTube:speedUI] Speed apply failed:",e)}}function Eo(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Bi();if(e&&e!==bo){if(bo)try{bo.removeEventListener("canplay",wo)}catch(e){}bo=e;try{bo.addEventListener("canplay",wo)}catch(e){console.warn("[AxoTube:speedUI] Speed initialization failed:",e)}So(bo)}}function wo(){Bi()!==bo&&Eo(),So(bo)}function ko(){!function(){if(!xo){xo=!0;var e=function(e){if(406==e.keyCode||191==e.keyCode)return e.preventDefault(),e.stopPropagation(),"keydown"!==e.type||(Do(),!1)};document.addEventListener("keydown",e,!0),document.addEventListener("keypress",e,!0),document.addEventListener("keyup",e,!0)}}(),Mi(Eo)}function Do(){for(var e=Se("videoSpeed"),t=0,n=Number(Se("speedSettingsIncrement")),i=Number.isFinite(n)&&n>0?n:.25,r=Math.max(i,.05),a=[],o=r;o<=5&&a.length<100;o+=r){var s=Math.round(100*o)/100;a.push(on({title:"".concat(s,"x")},null,[{signalAction:{signal:"POPUP_BACK"}},{setClientSettingEndpoint:{settingDatas:[{clientSettingEnum:{item:"videoSpeed"},intValue:s.toString()}]}},{customAction:{action:"SET_PLAYER_SPEED",parameters:s.toString()}}])),e===s&&(t=a.length-1)}1.0001===e&&(t=a.length),a.push(on({title:"Fix stuttering (1.0001x)"},null,[{signalAction:{signal:"POPUP_BACK"}},{setClientSettingEndpoint:{settingDatas:[{clientSettingEnum:{item:"videoSpeed"},intValue:"1.0001"}]}},{customAction:{action:"SET_PLAYER_SPEED",parameters:"1.0001"}}]));try{rn("Playback Speed",an(a,t),"axo-speed")}catch(e){console.error("[AxoTube:speedUI] Speed settings modal failed:",e)}}"loading"===document.readyState?document.addEventListener("DOMContentLoaded",ko):ko(),we.addEventListener("configChange",function(e){var t;"videoSpeed"===(null===(t=e.detail)||void 0===t?void 0:t.key)&&(Eo(),So(bo))});function Ao(e){return"string"==typeof window.__axotubeProxyUrl?window.__axotubeProxyUrl+e:(window.location&&window.location.origin?window.location.origin:"http://localhost:8081")+e}function Co(e){fetch(Ao("/axotube/update/check"),{method:"POST",cache:"no-store"}).then(function(e){if(!e.ok)throw new Error("update check HTTP "+e.status);return e.json()}).then(function(t){if(t.error)throw new Error(t.error);t.available?function(e){var t=Math.floor(Date.now()/1e3);rn({title:Lt("updater.modalTitle"),subtitle:Lt("updater.modalBodyNew",{latest:e.latest,current:e.current})},an([on({title:Lt("updater.updateNow"),subtitle:Lt("updater.updateNowSubtitle")},{icon:"DOWN_ARROW"},[{customAction:{action:"AXO_UPDATE_APPLY",parameters:e.latest}},{signalAction:{signal:"POPUP_BACK"}}]),on({title:Lt("updater.remindLater"),subtitle:Lt("updater.remindLaterSubtitle")},{icon:"SEARCH_HISTORY"},[{customAction:{action:"UPDATE_REMIND_LATER",parameters:t+86400}},{signalAction:{signal:"POPUP_BACK"}}])]),"axo-update-modal",!1)}(t):e&&nn(Lt("app.name"),Lt("toasts.upToDate",{version:t.current}),null)}).catch(function(t){console.info("[AxoTube:updater] update check skipped:",t&&t.message),e&&nn(Lt("app.name"),Lt("toasts.updateCheckFailed"),null)})}function To(){nn(Lt("app.name"),Lt("updater.applying"),null),fetch(Ao("/axotube/update/apply"),{method:"POST"}).then(function(e){if(!e.ok)throw new Error("apply HTTP "+e.status);return e.json()}).then(function(e){if(e.error)throw new Error(e.error);!function(){var e=document.querySelector("video");if(!e||e.paused||e.ended)window.location.reload();else{nn(Lt("app.name"),Lt("updater.reloadWhenPaused"),null);var t=function(){e.removeEventListener("pause",t),e.removeEventListener("ended",t),window.location.reload()};e.addEventListener("pause",t),e.addEventListener("ended",t)}}()}).catch(function(e){console.error("[AxoTube:updater] apply failed:",e&&e.message),nn(Lt("app.name"),Lt("toasts.updateApplyFailed"),null)})}try{Se("enableUpdater")&&Se("dontCheckUpdateUntil")<=Math.floor(Date.now()/1e3)&&setTimeout(function(){return Co(!1)},3e3)}catch(e){console.error("[AxoTube:updater] init failed, continuing without it",e)}function Po(e,t){return qt(e,t)}function Fo(){return jt=Bo,Qt()}function Bo(e){var t=e.resolveCommand;if(t.__axotubePatched)return!0;var n=function(e,n){var i,r,a,o,s,u;if(!e||"object"!==T(e))return t.call(this,e,n);if(vo(e),function(e){Se("enablePauseOnBlur")&&fr(e)&&mr()}(e),e.setClientSettingEndpoint){if(!Array.isArray(e.setClientSettingEndpoint.settingDatas))return t.call(this,e,n);var l,c=f(e.setClientSettingEndpoint.settingDatas);try{for(c.s();!(l=c.n()).done;){var h,d=l.value,p=null==d||null===(h=d.clientSettingEnum)||void 0===h?void 0:h.item;if("string"==typeof p)if(p.includes("_")){if("I18N_LANGUAGE"===p){var m=d.stringValue;if("string"!=typeof m||!m)continue;var g=new Date;return g.setFullYear(g.getFullYear()+10),document.cookie="PREF=hl=".concat(m,"; expires=").concat(g.toUTCString(),";"),Po({signalAction:{signal:"RELOAD_PAGE"}}),!0}}else{var v=Object.keys(d).find(function(e){return e.includes("Value")});if(!v)continue;Kr(p,v,"intValue"===v?Number(d[v]):d[v])}}}catch(e){c.e(e)}finally{c.f()}}else{if(e.customAction)return Io(e.customAction.action,e.customAction.parameters),!0;if(null!=e&&null!==(i=e.signalAction)&&void 0!==i&&i.customAction)return Io(e.signalAction.customAction.action,e.signalAction.customAction.parameters),!0;if(null!=e&&null!==(r=e.showEngagementPanelEndpoint)&&void 0!==r&&r.customAction)return Io(e.showEngagementPanelEndpoint.customAction.action,e.showEngagementPanelEndpoint.customAction.parameters),!0;if(null!=e&&null!==(a=e.playlistEditEndpoint)&&void 0!==a&&a.customAction)return Io(e.playlistEditEndpoint.customAction.action,e.playlistEditEndpoint.customAction.parameters),!0;if("playback-settings"===(null==e||null===(o=e.openPopupAction)||void 0===o?void 0:o.uniqueId))try{var y,b=e.openPopupAction.popup.overlaySectionRenderer.overlay.overlayTwoPanelRenderer.actionPanel.overlayPanelRenderer.content.overlayPanelItemListRenderer.items;if(!Array.isArray(b))return t.call(this,e,n);var x,S=f(b);try{for(S.s();!(x=S.n()).done;){var E,w=x.value;"SLOW_MOTION_VIDEO"===(null==w||null===(E=w.compactLinkRenderer)||void 0===E||null===(E=E.icon)||void 0===E?void 0:E.iconType)&&(w.compactLinkRenderer.subtitle&&(w.compactLinkRenderer.subtitle.simpleText=Lt("player.withAxotube")),w.compactLinkRenderer.serviceEndpoint={clickTrackingParams:"null",signalAction:{customAction:{action:"AXO_SPEED_SETTINGS_SHOW",parameters:[]}}})}}catch(e){S.e(e)}finally{S.f()}b.splice(2,0,on({title:Lt("player.miniPlayer")},{icon:"CLEAR_COOKIES"},[{customAction:{action:"ENTER_MP"}}])),se()&&null!==(y=se())&&void 0!==y&&y.HasSystemFeature("android.software.picture_in_picture")&&b.splice(3,0,on({title:Lt("player.pictureInPicture")},{icon:"PIP"},[{customAction:{action:"ENTER_PIP"}},{signalAction:{signal:"POPUP_BACK"}}]))}catch(e){console.warn("[AxoTube:resolveCommand] Playback settings patch failed:",e)}else null!=e&&null!==(s=e.watchEndpoint)&&void 0!==s&&s.videoId&&(window.isPipPlaying=!1,mo())}if(e.commandExecutorCommand&&Array.isArray(e.commandExecutorCommand.commands)){var k,D=f(e.commandExecutorCommand.commands);try{for(D.s();!(k=D.n()).done;){var A,C,P,F=k.value;F&&"object"===T(F)&&(F.customAction?Io(F.customAction.action,F.customAction.parameters):null!==(A=F.signalAction)&&void 0!==A&&A.customAction?Io(F.signalAction.customAction.action,F.signalAction.customAction.parameters):null!==(C=F.showEngagementPanelEndpoint)&&void 0!==C&&C.customAction?Io(F.showEngagementPanelEndpoint.customAction.action,F.showEngagementPanelEndpoint.customAction.parameters):null!==(P=F.playlistEditEndpoint)&&void 0!==P&&P.customAction?Io(F.playlistEditEndpoint.customAction.action,F.playlistEditEndpoint.customAction.parameters):t.call(this,F,n))}}catch(e){D.e(e)}finally{D.f()}return!0}return null!=e&&e.requestAccountSelectorCommand&&"ACCOUNT_EVENT_TRIGGER_ON_EXIT"===(null===(u=e.requestAccountSelectorCommand)||void 0===u||null===(u=u.identityActionContext)||void 0===u?void 0:u.eventTrigger)&&!Se("enableWhosWatchingMenuOnAppExit")?(t.call(this,{signalAction:{signal:"EXIT_APP"}}),!1):t.call(this,e,n)};n.__axotubePatched=!0;try{return e.resolveCommand=n,e.resolveCommand===n}catch(e){return!1}}function Io(e,t){switch(e){case"SKIP":var n=document.createEvent("Event");n.initEvent("keydown",!0,!0),n.keyCode=27,n.which=27,document.dispatchEvent(n);var i=document.querySelector("video"),r=Number(null==t?void 0:t.time);i&&Number.isFinite(r)&&(i.currentTime=r);break;case"AXO_SETTINGS_SHOW":Za();break;case"SETTINGS_OPEN":case"SETTINGS_SET":case"SETTINGS_TOGGLE":case"SETTINGS_STEP":case"SETTINGS_SEGMENT":case"SETTINGS_OPEN_DIAGNOSTICS":case"SETTINGS_LAUNCH":Qa(e,t);break;case"AXO_SPEED_SETTINGS_SHOW":Do();break;case"UPDATE_REMIND_LATER":Ee("dontCheckUpdateUntil",t);break;case"AXO_UPDATE_APPLY":To();break;case"SET_PLAYER_SPEED":var a=Number(t),o=document.querySelector("video");o&&Number.isFinite(a)&&a>0&&(o.playbackRate=a);break;case"ENTER_MP":go();break;case"ENTER_PIP":se()&&se().EnterPIP&&se().EnterPIP();break;case"SHOW_TOAST":nn(Lt("app.name"),t);break;case"ADD_TO_QUEUE":t?(window.queuedVideos.videos.push(t),nn(Lt("app.name"),Lt("toasts.queueAdded"))):nn(Lt("app.name"),Lt("toasts.queueAddFailed"));break;case"CLEAR_QUEUE":window.queuedVideos.videos=[],window.queuedVideos.currentIndex=-1,window.queuedVideos.lastVideoId=null,nn(Lt("app.name"),Lt("toasts.queueCleared"));break;case"CHECK_FOR_UPDATES":Co(!0);break;case"AXO_CAST_RESTART":yo("manual",function(e,t){!e&&t&&t.ok?t.restarted?nn(Lt("app.name"),Lt("toasts.castRestarted")):"too-soon"===t.reason?nn(Lt("app.name"),Lt("toasts.castRestartWait")):"discovery-not-running"===t.reason?nn(Lt("app.name"),Lt("toasts.castRestartNotRunning")):"in-progress"===t.reason?nn(Lt("app.name"),Lt("toasts.castRestarting")):nn(Lt("app.name"),Lt("toasts.castRestartFailed")):nn(Lt("app.name"),Lt("toasts.castRestartFailed"))});break;case"AXO_RELOAD_PAGE":window.location.reload()}}var Lo=!1,Oo=null,No=!1;function Ro(){try{var e;if(null===(e=window.tectonicConfig)||void 0===e||!e.featureSwitches)return;var t=window.tectonicConfig.featureSwitches,n=Te();t.enableAnimations=!n,t.enableOnScrollLinearAnimation=!n,t.enableListAnimations=!n,t.horizontalListDurationMs=n?0:200,t.verticalListDurationMs=n?0:300,t.listAnimationCurve=n?"linear":"",t.enableSkipButtonSlideInAnimation=!n,t.enableLikeButtonAnimation=!n}catch(e){console.warn("[AxoTube:ui] Reduced motion flags apply failed:",e)}}function Mo(){try{if(!document.body)return;document.body.classList.toggle("axotube-reduced-motion",Te())}catch(e){console.warn("[AxoTube:ui] Reduced motion apply failed:",e)}}function _o(){if(No){var e=document.getElementById("container");e&&e.style.setProperty("opacity","1","important"),No=!1}}function Uo(){Oo&&(clearTimeout(Oo),Oo=null),_o()}function jo(){Uo(),Se("enableScreenDimming")&&(Oo=setTimeout(function(){var e;if(Oo=null,Se("enableScreenDimming")){var t=document.querySelector(".html5-video-player");if(t){var n=null===(e=t.getPlayerStateObject)||void 0===e?void 0:e.call(t);if(null==n||!n.isPlaying){var i=document.getElementById("container");i&&(i.style.setProperty("opacity",(1-Se("dimmingOpacity")).toString(),"important"),No=!0)}}}else _o()},1e3*Se("dimmingTimeout")))}function Ho(){if(!Lo&&document.body&&window._yttv){Lo=!0,Mo();var e=document.querySelector("style[nonce]");if(e)e.textContent+=Lr;else if(document.head){var t=document.createElement("style");t.textContent=Lr,document.head.appendChild(t)}if("function"==typeof window.__releaseBootLoader&&window.__releaseBootLoader(),Se("enableFixedUI")&&!Pe()&&!Te())try{window.tectonicConfig&&(window.tectonicConfig.clientData.legacyApplicationQuality="full-animation",window.tectonicConfig.featureSwitches.enableAnimations=!0,window.tectonicConfig.featureSwitches.enableOnScrollLinearAnimation=!0,window.tectonicConfig.featureSwitches.enableListAnimations=!0)}catch(e){console.warn("[AxoTube:ui] Could not apply UI fixes:",e)}Ro();var n=function(e){if(Se("enableScreenDimming")&&jo(),404==e.keyCode&&"keydown"===e.type){try{Fo()}catch(e){console.warn("[AxoTube:ui] Settings command patch refresh failed:",e)}try{Za()}catch(e){console.error("[AxoTube:ui] Settings open failed:",e)}}else if(39==e.keyCode&&"keydown"===e.type&&document.querySelector("ytlr-search-text-box > .zylon-focus")&&window.isPipPlaying)try{var t=document.querySelector("ytlr-player");t&&t.style.setProperty("background-color","rgb(0, 0, 0)"),function(){try{if(!$a||!$a.loadedPlaybackConfig)return;var e=document.querySelector("video"),t=$a.loadedPlaybackConfig,n=t.clickTrackingParams,i=t.commandMetadata,r=t.watchEndpoint;if(!Wt({clickTrackingParams:n,commandMetadata:i,watchEndpoint:e&&r?Object.assign({},r,{startTimeSeconds:Math.floor(e.currentTime)}):r}).dispatched)return;window.isPipPlaying=!1,mo()}catch(e){console.error("[AxoTube:pictureInPicture] PiP to fullscreen failed:",e)}}()}catch(e){console.warn("[AxoTube:ui] PiP exit failed:",e)}return!0};document.addEventListener("keydown",n,!0),document.addEventListener("keypress",n,!0),document.addEventListener("keyup",n,!0),setTimeout(function(){Se("showWelcomeToast")&&nn(Lt("welcomeMsg.title"),"".concat(Lt("welcomeMsg.subtitle")," · v").concat(Vr))},1e3);var i=Se("launchToOnStartup");if(i)try{Po(JSON.parse(i))}catch(e){console.warn("[AxoTube:ui] Launch command failed:",e)}else if(Se("reloadHomeOnStartup"))try{location.hash&&"/"!==location.hash.substring(1)&&(location.hash="/")}catch(e){console.warn("[AxoTube:ui] Reload home on startup failed:",e)}try{var r=gn();r&&r.executeFunction(new r.commandFunction("reloadGuideAction"))}catch(e){console.warn("[AxoTube:ui] Guide reload failed:",e)}if(Se("enableFixedUI")&&!Pe()&&!Te())try{new MutationObserver(function(){var e=document.body;null!=e&&e.classList.contains("app-quality-root")&&e.classList.remove("app-quality-root")}).observe(document.body,{attributes:!0,attributeFilter:["class"]})}catch(e){console.warn("[AxoTube:ui] UI quality observer failed:",e)}!function(){try{Fo(),Ht||(Ht=!0,window.addEventListener("hashchange",$t,!1))}catch(e){console.warn("[AxoTube:ui] unable to install native command patch:",e)}}()}}function zo(){Lo||"complete"!==document.readyState&&"interactive"!==document.readyState||window._yttv&&Ho()}"loading"===document.readyState&&document.addEventListener("DOMContentLoaded",zo);var Vo=0,Ko=setInterval(function(){Vo+=1,zo(),(Lo||Vo>=100)&&clearInterval(Ko)},100),Go={routeColor:!0,routeBackgroundUrl:!0,themePreset:!0,textTheme:!0};we.addEventListener("configChange",function(e){var t,n=null===(t=e.detail)||void 0===t?void 0:t.key;Go[n]&&Hr(),"enableReducedMotion"!==n&&"enablePerformanceMode"!==n&&"enableLowMemoryMode"!==n||(Mo(),Ro()),"enableScreenDimming"===n&&(Se("enableScreenDimming")?jo():Uo())});var Jo=null;function Xo(){Jo&&(clearInterval(Jo),Jo=null)}function Wo(e){e||Xo();var t=localStorage["yt.leanback.default::recurring_actions"];if(t){var n;try{n=JSON.parse(t)}catch(e){return}var i=Se("permanentlyEnableWhoIsWatchingMenu"),r=n.data&&n.data.data;if(r){var a=r["startup-screen-account-selector-with-guest"],o=r.whos_watching_fullscreen_zero_accounts,s=r["startup-screen-signed-out-welcome-back"];if(!e){Xo();var u=new Date;return u.setDate(u.getDate()+7),void d(u.getTime())}var l=Date.now(),c=a&&a.lastFired;if(!(c&&l-c>0&&l-c<72e5)||i)if(Xo(),i){var h=function(){var e=new Date;e.setDate(e.getDate()-7),d(e.getTime())};h(),Jo=setInterval(h,6e4)}else d(Date.now())}}function d(e){a&&(a.lastFired=e),o&&(o.lastFired=e),s&&(s.lastFired=e),localStorage["yt.leanback.default::recurring_actions"]=JSON.stringify(n)}}we.addEventListener("configChange",function(e){var t=e.detail,n=t.key,i=t.value;"enableWhoIsWatchingMenu"===n?Wo(i):"permanentlyEnableWhoIsWatchingMenu"===n&&Wo(Se("enableWhoIsWatchingMenu"))}),Wo(Se("enableWhoIsWatchingMenu"));var qo={language:{standard:{long:{aa:"Afar",ab:"Abkhazian",ace:"Acehnese",ach:"Acoli",ada:"Adangme",ady:"Adyghe",ae:"Avestan",aeb:"Tunisian Arabic",af:"Afrikaans",afh:"Afrihili",agq:"Aghem",ain:"Ainu",ak:"Akan",akk:"Akkadian",akz:"Alabama",ale:"Aleut",aln:"Gheg Albanian",alt:"Southern Altai",am:"Amharic",an:"Aragonese",ang:"Old English",ann:"Obolo",anp:"Angika",ar:"Arabic","ar-001":"Arabic (world)",arc:"Aramaic",arn:"Mapuche",aro:"Araona",arp:"Arapaho",arq:"Algerian Arabic",ars:"Najdi Arabic",arw:"Arawak",ary:"Moroccan Arabic",arz:"Egyptian Arabic",as:"Assamese",asa:"Asu",ase:"American Sign Language",ast:"Asturian",atj:"Atikamekw",av:"Avaric",avk:"Kotava",awa:"Awadhi",ay:"Aymara",az:"Azerbaijani",ba:"Bashkir",bal:"Baluchi",ban:"Balinese",bar:"Bavarian",bas:"Basaa",bax:"Bamun",bbc:"Batak Toba",bbj:"Ghomala",be:"Belarusian",bej:"Beja",bem:"Bemba",bew:"Betawi",bez:"Bena",bfd:"Bafut",bfq:"Badaga",bg:"Bulgarian",bgc:"Haryanvi",bgn:"Western Balochi",bho:"Bhojpuri",bi:"Bislama",bik:"Bikol",bin:"Bini",bjn:"Banjar",bkm:"Kom",bla:"Siksiká",blo:"Anii",blt:"Tai Dam",bm:"Bambara",bn:"Bangla",bo:"Tibetan",bpy:"Bishnupriya",bqi:"Bakhtiari",br:"Breton",bra:"Braj",brh:"Brahui",brx:"Bodo",bs:"Bosnian",bss:"Akoose",bua:"Buriat",bug:"Buginese",bum:"Bulu",byn:"Blin",byv:"Medumba",ca:"Catalan",cad:"Caddo",car:"Carib",cay:"Cayuga",cch:"Atsam",ccp:"Chakma",ce:"Chechen",ceb:"Cebuano",cgg:"Chiga",ch:"Chamorro",chb:"Chibcha",chg:"Chagatai",chk:"Chuukese",chm:"Mari",chn:"Chinook Jargon",cho:"Choctaw",chp:"Chipewyan",chr:"Cherokee",chy:"Cheyenne",cic:"Chickasaw",ckb:"Central Kurdish",clc:"Chilcotin",co:"Corsican",cop:"Coptic",cps:"Capiznon",cr:"Cree",crg:"Michif",crh:"Crimean Tatar",crj:"Southern East Cree",crk:"Plains Cree",crl:"Northern East Cree",crm:"Moose Cree",crr:"Carolina Algonquian",crs:"Seselwa Creole French",cs:"Czech",csb:"Kashubian",csw:"Swampy Cree",cu:"Church Slavic",cv:"Chuvash",cwd:"Woods Cree",cy:"Welsh",da:"Danish",dak:"Dakota",dar:"Dargwa",dav:"Taita",de:"German","de-AT":"German (Austria)","de-CH":"German (Switzerland)",del:"Delaware",den:"Slave",dgr:"Dogrib",din:"Dinka",dje:"Zarma",doi:"Dogri",dsb:"Lower Sorbian",dtp:"Central Dusun",dua:"Duala",dum:"Middle Dutch",dv:"Divehi",dyo:"Jola-Fonyi",dyu:"Dyula",dz:"Dzongkha",dzg:"Dazaga",ebu:"Embu",ee:"Ewe",efi:"Efik",egl:"Emilian",egy:"Ancient Egyptian",eka:"Ekajuk",el:"Greek",elx:"Elamite",en:"English","en-AU":"English (Australia)","en-CA":"English (Canada)","en-GB":"English (United Kingdom)","en-US":"English (United States)",enm:"Middle English",eo:"Esperanto",es:"Spanish","es-419":"Spanish (Latin America)","es-ES":"Spanish (Spain)","es-MX":"Spanish (Mexico)",esu:"Central Yupik",et:"Estonian",eu:"Basque",ewo:"Ewondo",ext:"Extremaduran",fa:"Persian","fa-AF":"Persian (Afghanistan)",fan:"Fang",fat:"Fanti",ff:"Fula",fi:"Finnish",fil:"Filipino",fit:"Tornedalen Finnish",fj:"Fijian",fo:"Faroese",fon:"Fon",fr:"French","fr-CA":"French (Canada)","fr-CH":"French (Switzerland)",frc:"Cajun French",frm:"Middle French",fro:"Old French",frp:"Arpitan",frr:"Northern Frisian",frs:"Eastern Frisian",fur:"Friulian",fy:"Western Frisian",ga:"Irish",gaa:"Ga",gag:"Gagauz",gan:"Gan Chinese",gay:"Gayo",gba:"Gbaya",gbz:"Zoroastrian Dari",gd:"Scottish Gaelic",gez:"Geez",gil:"Gilbertese",gl:"Galician",glk:"Gilaki",gmh:"Middle High German",gn:"Guarani",goh:"Old High German",gon:"Gondi",gor:"Gorontalo",got:"Gothic",grb:"Grebo",grc:"Ancient Greek",gsw:"Swiss German",gu:"Gujarati",guc:"Wayuu",gur:"Frafra",guz:"Gusii",gv:"Manx",gwi:"Gwichʼin",ha:"Hausa",hai:"Haida",hak:"Hakka Chinese",haw:"Hawaiian",hax:"Southern Haida",hdn:"Northern Haida",he:"Hebrew",hi:"Hindi","hi-Latn":"Hindi (Latin)",hif:"Fiji Hindi",hil:"Hiligaynon",hit:"Hittite",hmn:"Hmong",hnj:"Hmong Njua",ho:"Hiri Motu",hr:"Croatian",hsb:"Upper Sorbian",hsn:"Xiang Chinese",ht:"Haitian Creole",hu:"Hungarian",hup:"Hupa",hur:"Halkomelem",hy:"Armenian",hz:"Herero",ia:"Interlingua",iba:"Iban",ibb:"Ibibio",id:"Indonesian",ie:"Interlingue",ig:"Igbo",ii:"Sichuan Yi",ik:"Inupiaq",ike:"Eastern Canadian Inuktitut",ikt:"Western Canadian Inuktitut",ilo:"Iloko",inh:"Ingush",io:"Ido",is:"Icelandic",it:"Italian",iu:"Inuktitut",izh:"Ingrian",ja:"Japanese",jam:"Jamaican Creole English",jbo:"Lojban",jgo:"Ngomba",jmc:"Machame",jpr:"Judeo-Persian",jrb:"Judeo-Arabic",jut:"Jutish",jv:"Javanese",ka:"Georgian",kaa:"Kara-Kalpak",kab:"Kabyle",kac:"Kachin",kaj:"Jju",kam:"Kamba",kaw:"Kawi",kbd:"Kabardian",kbl:"Kanembu",kcg:"Tyap",kde:"Makonde",kea:"Kabuverdianu",ken:"Kenyang",kfo:"Koro",kg:"Kongo",kgp:"Kaingang",kha:"Khasi",kho:"Khotanese",khq:"Koyra Chiini",khw:"Khowar",ki:"Kikuyu",kiu:"Kirmanjki",kj:"Kuanyama",kk:"Kazakh",kkj:"Kako",kl:"Kalaallisut",kln:"Kalenjin",km:"Khmer",kmb:"Kimbundu",kn:"Kannada",ko:"Korean",koi:"Komi-Permyak",kok:"Konkani",kos:"Kosraean",kpe:"Kpelle",kr:"Kanuri",krc:"Karachay-Balkar",kri:"Krio",krj:"Kinaray-a",krl:"Karelian",kru:"Kurukh",ks:"Kashmiri",ksb:"Shambala",ksf:"Bafia",ksh:"Colognian",ku:"Kurdish",kum:"Kumyk",kut:"Kutenai",kv:"Komi",kw:"Cornish",kwk:"Kwakʼwala",kxv:"Kuvi",ky:"Kyrgyz",la:"Latin",lad:"Ladino",lag:"Langi",lah:"Western Panjabi",lam:"Lamba",lb:"Luxembourgish",lez:"Lezghian",lfn:"Lingua Franca Nova",lg:"Ganda",li:"Limburgish",lij:"Ligurian",lil:"Lillooet",liv:"Livonian",lkt:"Lakota",lmo:"Lombard",ln:"Lingala",lo:"Lao",lol:"Mongo",lou:"Louisiana Creole",loz:"Lozi",lrc:"Northern Luri",lsm:"Saamia",lt:"Lithuanian",ltg:"Latgalian",lu:"Luba-Katanga",lua:"Luba-Lulua",lui:"Luiseno",lun:"Lunda",luo:"Luo",lus:"Mizo",luy:"Luyia",lv:"Latvian",lzh:"Literary Chinese",lzz:"Laz",mad:"Madurese",maf:"Mafa",mag:"Magahi",mai:"Maithili",mak:"Makasar",man:"Mandingo",mas:"Masai",mde:"Maba",mdf:"Moksha",mdr:"Mandar",men:"Mende",mer:"Meru",mfe:"Morisyen",mg:"Malagasy",mga:"Middle Irish",mgh:"Makhuwa-Meetto",mgo:"Metaʼ",mh:"Marshallese",mi:"Māori",mic:"Mi'kmaw",min:"Minangkabau",mk:"Macedonian",ml:"Malayalam",mn:"Mongolian",mnc:"Manchu",mni:"Manipuri",moe:"Innu-aimun",moh:"Mohawk",mos:"Mossi",mr:"Marathi",mrj:"Western Mari",ms:"Malay",mt:"Maltese",mua:"Mundang",mul:"Multiple languages",mus:"Muscogee",mwl:"Mirandese",mwr:"Marwari",mwv:"Mentawai",my:"Burmese",mye:"Myene",myv:"Erzya",mzn:"Mazanderani",na:"Nauru",nan:"Min Nan Chinese",nap:"Neapolitan",naq:"Nama",nb:"Norwegian Bokmål",nd:"North Ndebele",nds:"Low German","nds-NL":"Low German (Netherlands)",ne:"Nepali",new:"Newari",ng:"Ndonga",nia:"Nias",niu:"Niuean",njo:"Ao Naga",nl:"Dutch","nl-BE":"Dutch (Belgium)",nmg:"Kwasio",nn:"Norwegian Nynorsk",nnh:"Ngiemboon",no:"Norwegian",nog:"Nogai",non:"Old Norse",nov:"Novial",nqo:"N’Ko",nr:"South Ndebele",nso:"Northern Sotho",nus:"Nuer",nv:"Navajo",nwc:"Classical Newari",ny:"Nyanja",nym:"Nyamwezi",nyn:"Nyankole",nyo:"Nyoro",nzi:"Nzima",oc:"Occitan",oj:"Ojibwa",ojb:"Northwestern Ojibwa",ojc:"Central Ojibwa",ojg:"Eastern Ojibwa",ojs:"Oji-Cree",ojw:"Western Ojibwa",oka:"Okanagan",om:"Oromo",or:"Odia",os:"Ossetic",osa:"Osage",ota:"Ottoman Turkish",pa:"Punjabi",pag:"Pangasinan",pal:"Pahlavi",pam:"Pampanga",pap:"Papiamento",pau:"Palauan",pcd:"Picard",pcm:"Nigerian Pidgin",pdc:"Pennsylvania German",pdt:"Plautdietsch",peo:"Old Persian",pfl:"Palatine German",phn:"Phoenician",pi:"Pali",pis:"Pijin",pl:"Polish",pms:"Piedmontese",pnt:"Pontic",pon:"Pohnpeian",pqm:"Maliseet-Passamaquoddy",prg:"Prussian",pro:"Old Provençal",ps:"Pashto",pt:"Portuguese","pt-BR":"Portuguese (Brazil)","pt-PT":"Portuguese (Portugal)",qu:"Quechua",quc:"Kʼicheʼ",qug:"Chimborazo Highland Quichua",raj:"Rajasthani",rap:"Rapanui",rar:"Rarotongan",rgn:"Romagnol",rhg:"Rohingya",rif:"Riffian",rm:"Romansh",rn:"Rundi",ro:"Romanian","ro-MD":"Romanian (Moldova)",rof:"Rombo",rom:"Romany",rtm:"Rotuman",ru:"Russian",rue:"Rusyn",rug:"Roviana",rup:"Aromanian",rw:"Kinyarwanda",rwk:"Rwa",sa:"Sanskrit",sad:"Sandawe",sah:"Yakut",sam:"Samaritan Aramaic",saq:"Samburu",sas:"Sasak",sat:"Santali",saz:"Saurashtra",sba:"Ngambay",sbp:"Sangu",sc:"Sardinian",scn:"Sicilian",sco:"Scots",sd:"Sindhi",sdc:"Sassarese Sardinian",sdh:"Southern Kurdish",se:"Northern Sami",see:"Seneca",seh:"Sena",sei:"Seri",sel:"Selkup",ses:"Koyraboro Senni",sg:"Sango",sga:"Old Irish",sgs:"Samogitian",sh:"Serbo-Croatian",shi:"Tachelhit",shn:"Shan",shu:"Chadian Arabic",si:"Sinhala",sid:"Sidamo",sk:"Slovak",sl:"Slovenian",slh:"Southern Lushootseed",sli:"Lower Silesian",sly:"Selayar",sm:"Samoan",sma:"Southern Sami",smj:"Lule Sami",smn:"Inari Sami",sms:"Skolt Sami",sn:"Shona",snk:"Soninke",so:"Somali",sog:"Sogdien",sq:"Albanian",sr:"Serbian","sr-ME":"Serbian (Montenegro)",srn:"Sranan Tongo",srr:"Serer",ss:"Swati",ssy:"Saho",st:"Southern Sotho",stq:"Saterland Frisian",str:"Straits Salish",su:"Sundanese",suk:"Sukuma",sus:"Susu",sux:"Sumerian",sv:"Swedish",sw:"Swahili","sw-CD":"Swahili (Congo - Kinshasa)",swb:"Comorian",syc:"Classical Syriac",syr:"Syriac",szl:"Silesian",ta:"Tamil",tce:"Southern Tutchone",tcy:"Tulu",te:"Telugu",tem:"Timne",teo:"Teso",ter:"Tereno",tet:"Tetum",tg:"Tajik",tgx:"Tagish",th:"Thai",tht:"Tahltan",ti:"Tigrinya",tig:"Tigre",tiv:"Tiv",tk:"Turkmen",tkl:"Tokelau",tkr:"Tsakhur",tl:"Tagalog",tlh:"Klingon",tli:"Tlingit",tly:"Talysh",tmh:"Tamashek",tn:"Tswana",to:"Tongan",tog:"Nyasa Tonga",tok:"Toki Pona",tpi:"Tok Pisin",tr:"Turkish",tru:"Turoyo",trv:"Taroko",trw:"Torwali",ts:"Tsonga",tsd:"Tsakonian",tsi:"Tsimshian",tt:"Tatar",ttm:"Northern Tutchone",ttt:"Muslim Tat",tum:"Tumbuka",tvl:"Tuvalu",tw:"Twi",twq:"Tasawaq",ty:"Tahitian",tyv:"Tuvinian",tzm:"Central Atlas Tamazight",udm:"Udmurt",ug:"Uyghur",uga:"Ugaritic",uk:"Ukrainian",umb:"Umbundu",und:"Unknown language",ur:"Urdu",uz:"Uzbek",vai:"Vai",ve:"Venda",vec:"Venetian",vep:"Veps",vi:"Vietnamese",vls:"West Flemish",vmf:"Main-Franconian",vmw:"Makhuwa",vo:"Volapük",vot:"Votic",vro:"Võro",vun:"Vunjo",wa:"Walloon",wae:"Walser",wal:"Wolaytta",war:"Waray",was:"Washo",wbp:"Warlpiri",wo:"Wolof",wuu:"Wu Chinese",xal:"Kalmyk",xh:"Xhosa",xmf:"Mingrelian",xnr:"Kangri",xog:"Soga",yao:"Yao",yap:"Yapese",yav:"Yangben",ybb:"Yemba",yi:"Yiddish",yo:"Yoruba",yrl:"Nheengatu",yue:"Cantonese",za:"Zhuang",zap:"Zapotec",zbl:"Blissymbols",zea:"Zeelandic",zen:"Zenaga",zgh:"Standard Moroccan Tamazight",zh:"Chinese","zh-Hans":"Simplified Chinese","zh-Hant":"Traditional Chinese",zu:"Zulu",zun:"Zuni",zxx:"No linguistic content",zza:"Zaza"}}},region:{long:m(m(m(m(m(m(m(m({"001":"world","002":"Africa","003":"North America","005":"South America","009":"Oceania","011":"Western Africa","013":"Central America","014":"Eastern Africa","015":"Northern Africa","017":"Middle Africa","018":"Southern Africa","019":"Americas","021":"Northern America","029":"Caribbean","030":"Eastern Asia","034":"Southern Asia","035":"Southeast Asia","039":"Southern Europe","053":"Australasia","054":"Melanesia","057":"Micronesian Region","061":"Polynesia",142:"Asia",143:"Central Asia",145:"Western Asia",150:"Europe",151:"Eastern Europe",154:"Northern Europe",155:"Western Europe",202:"Sub-Saharan Africa",419:"Latin America",AC:"Ascension Island",AD:"Andorra",AE:"United Arab Emirates",AF:"Afghanistan",AG:"Antigua & Barbuda",AI:"Anguilla",AL:"Albania",AM:"Armenia",AO:"Angola",AQ:"Antarctica",AR:"Argentina",AS:"American Samoa",AT:"Austria",AU:"Australia",AW:"Aruba",AX:"Åland Islands",AZ:"Azerbaijan",BA:"Bosnia & Herzegovina",BB:"Barbados",BD:"Bangladesh",BE:"Belgium",BF:"Burkina Faso",BG:"Bulgaria",BH:"Bahrain",BI:"Burundi",BJ:"Benin",BL:"St. Barthélemy",BM:"Bermuda",BN:"Brunei",BO:"Bolivia",BQ:"Caribbean Netherlands",BR:"Brazil",BS:"Bahamas",BT:"Bhutan",BV:"Bouvet Island",BW:"Botswana",BY:"Belarus",BZ:"Belize",CA:"Canada",CC:"Cocos (Keeling) Islands",CD:"Congo - Kinshasa",CF:"Central African Republic",CG:"Congo - Brazzaville",CH:"Switzerland",CI:"Côte d’Ivoire",CK:"Cook Islands",CL:"Chile",CM:"Cameroon",CN:"China",CO:"Colombia",CP:"Clipperton Island",CQ:"Sark",CR:"Costa Rica",CU:"Cuba",CV:"Cape Verde",CW:"Curaçao",CX:"Christmas Island",CY:"Cyprus",CZ:"Czechia",DE:"Germany",DG:"Diego Garcia",DJ:"Djibouti",DK:"Denmark",DM:"Dominica",DO:"Dominican Republic",DZ:"Algeria",EA:"Ceuta & Melilla",EC:"Ecuador",EE:"Estonia",EG:"Egypt",EH:"Western Sahara",ER:"Eritrea",ES:"Spain",ET:"Ethiopia",EU:"European Union",EZ:"Eurozone",FI:"Finland",FJ:"Fiji",FK:"Falkland Islands",FM:"Micronesia",FO:"Faroe Islands",FR:"France",GA:"Gabon",GB:"United Kingdom",GD:"Grenada",GE:"Georgia",GF:"French Guiana",GG:"Guernsey",GH:"Ghana",GI:"Gibraltar",GL:"Greenland",GM:"Gambia",GN:"Guinea",GP:"Guadeloupe",GQ:"Equatorial Guinea",GR:"Greece",GS:"South Georgia & South Sandwich Islands",GT:"Guatemala",GU:"Guam",GW:"Guinea-Bissau",GY:"Guyana",HK:"Hong Kong SAR China",HM:"Heard & McDonald Islands",HN:"Honduras",HR:"Croatia",HT:"Haiti",HU:"Hungary",IC:"Canary Islands",ID:"Indonesia",IE:"Ireland",IL:"Israel",IM:"Isle of Man",IN:"India",IO:"British Indian Ocean Territory",IQ:"Iraq",IR:"Iran",IS:"Iceland",IT:"Italy",JE:"Jersey",JM:"Jamaica",JO:"Jordan",JP:"Japan",KE:"Kenya",KG:"Kyrgyzstan",KH:"Cambodia",KI:"Kiribati",KM:"Comoros",KN:"St. Kitts & Nevis",KP:"North Korea",KR:"South Korea",KW:"Kuwait",KY:"Cayman Islands",KZ:"Kazakhstan",LA:"Laos",LB:"Lebanon",LC:"St. Lucia",LI:"Liechtenstein",LK:"Sri Lanka",LR:"Liberia",LS:"Lesotho",LT:"Lithuania",LU:"Luxembourg",LV:"Latvia",LY:"Libya",MA:"Morocco",MC:"Monaco",MD:"Moldova",ME:"Montenegro",MF:"St. Martin",MG:"Madagascar",MH:"Marshall Islands",MK:"North Macedonia",ML:"Mali",MM:"Myanmar (Burma)",MN:"Mongolia",MO:"Macao SAR China",MP:"Northern Mariana Islands",MQ:"Martinique",MR:"Mauritania",MS:"Montserrat",MT:"Malta",MU:"Mauritius",MV:"Maldives",MW:"Malawi",MX:"Mexico",MY:"Malaysia",MZ:"Mozambique",NA:"Namibia",NC:"New Caledonia",NE:"Niger",NF:"Norfolk Island",NG:"Nigeria",NI:"Nicaragua",NL:"Netherlands",NO:"Norway",NP:"Nepal",NR:"Nauru",NU:"Niue",NZ:"New Zealand",OM:"Oman",PA:"Panama",PE:"Peru",PF:"French Polynesia",PG:"Papua New Guinea",PH:"Philippines",PK:"Pakistan",PL:"Poland",PM:"St. Pierre & Miquelon",PN:"Pitcairn Islands",PR:"Puerto Rico",PS:"Palestinian Territories",PT:"Portugal",PW:"Palau",PY:"Paraguay",QA:"Qatar",QO:"Outlying Oceania",RE:"Réunion",RO:"Romania",RS:"Serbia",RU:"Russia",RW:"Rwanda",SA:"Saudi Arabia",SB:"Solomon Islands",SC:"Seychelles",SD:"Sudan",SE:"Sweden",SG:"Singapore",SH:"St. Helena",SI:"Slovenia",SJ:"Svalbard & Jan Mayen",SK:"Slovakia",SL:"Sierra Leone",SM:"San Marino",SN:"Senegal",SO:"Somalia",SR:"Suriname",SS:"South Sudan",ST:"São Tomé & Príncipe",SV:"El Salvador",SX:"Sint Maarten",SY:"Syria",SZ:"Eswatini",TA:"Tristan da Cunha",TC:"Turks & Caicos Islands",TD:"Chad",TF:"French Southern Territories",TG:"Togo",TH:"Thailand",TJ:"Tajikistan",TK:"Tokelau",TL:"Timor-Leste",TM:"Turkmenistan",TN:"Tunisia",TO:"Tonga",TR:"Türkiye",TT:"Trinidad & Tobago",TV:"Tuvalu",TW:"Taiwan",TZ:"Tanzania",UA:"Ukraine",UG:"Uganda",UM:"U.S. Outlying Islands",UN:"United Nations",US:"United States",UY:"Uruguay",UZ:"Uzbekistan",VA:"Vatican City",VC:"St. Vincent & Grenadines",VE:"Venezuela",VG:"British Virgin Islands",VI:"U.S. Virgin Islands",VN:"Vietnam",VU:"Vanuatu",WF:"Wallis & Futuna",WS:"Samoa",XA:"Pseudo-Accents",XB:"Pseudo-Bidi",XK:"Kosovo",YE:"Yemen",YT:"Mayotte",ZA:"South Africa",ZM:"Zambia",ZW:"Zimbabwe",ZZ:"Unknown Region"},"BA","Bosnia"),"GB","UK"),"HK","Hong Kong"),"MM","Myanmar"),"MO","Macao"),"PS","Palestine"),"UN","UN"),"US","US")}},Yo=["af","sq","am","ar","hy","as","az","eu","be","bn","bs","bg","my","ca","zh-CN","zh-TW","zh-HK","hr","cs","da","nl","en","et","fil","fi","fr","gl","ka","de","el","gu","he","hi","hu","is","id","ga","it","ja","kn","kk","km","ko","ky","lo","lv","lt","mk","ms","ml","mt","mr","mn","ne","no","or","fa","pl","pt","pa","ro","ru","sr","si","sk","sl","es","sw","sv","ta","te","th","tr","uk","ur","uz","vi","cy","yi","yo","zu"];var Qo=!1;function Zo(e,t){return{compactLinkRenderer:{title:{simpleText:t},serviceEndpoint:{commandExecutorCommand:{commands:[{selectSubtitlesTrackCommand:{translationLanguage:{languageCode:e,languageName:t}}},{openClientOverlayAction:{type:"CLIENT_OVERLAY_TYPE_CAPTIONS_LANGUAGE",updateAction:!0}},{signalAction:{signal:"POPUP_BACK"}}]}},secondaryIcon:{iconType:"RADIO_BUTTON_UNCHECKED"}}}}function $o(){if(Qo)return!0;if(!document.querySelector(".html5-video-player")||!window._yttv)return!1;var e=Object.values(window._yttv).find(function(e){return e&&e.instance&&"function"==typeof e.instance.resolveCommand});if(!e)return!1;if(e.instance.resolveCommand.isPatchedBySubtitleLocalization)return Qo=!0,!0;var t=e.instance.resolveCommand;return e.instance.resolveCommand=function(e,n){var i;if("CLIENT_OVERLAY_TYPE_CAPTIONS_AUTO_TRANSLATE"===(null==e||null===(i=e.openPopupAction)||void 0===i?void 0:i.uniqueId)){var r,a=Se("enableShowUserLanguage"),o=Se("enableShowOtherLanguages");if(!a&&!o)return t.apply(this,arguments);var s=null===(r=e.openPopupAction)||void 0===r||null===(r=r.popup)||void 0===r||null===(r=r.overlaySectionRenderer)||void 0===r||null===(r=r.overlay)||void 0===r||null===(r=r.overlayTwoPanelRenderer)||void 0===r||null===(r=r.actionPanel)||void 0===r||null===(r=r.overlayPanelRenderer)||void 0===r||null===(r=r.content)||void 0===r||null===(r=r.overlayPanelItemListRenderer)||void 0===r?void 0:r.items;if(!Array.isArray(s))return t.apply(this,arguments);var u=function(e){var t=new Set;return e.forEach(function(e){var n,i,r=null===(n=e.compactLinkRenderer)||void 0===n||null===(n=n.serviceEndpoint)||void 0===n||null===(n=n.commandExecutorCommand)||void 0===n?void 0:n.commands,a=null==r||null===(i=r[0])||void 0===i||null===(i=i.selectSubtitlesTrackCommand)||void 0===i?void 0:i.translationLanguage;a&&(t.add(a.languageCode),t.add(a.languageName))}),t}(s);if(a){var l=function(e){if(!e)return null;try{var t=String(e).toUpperCase(),n={CN:"zh-CN",TW:"zh-TW",HK:"zh-HK",SG:"zh-CN"};if(n[t]){var i=n[t];return{code:i,name:qo.language.standard.long[i]||i}}var r=new Intl.Locale("und",{region:t}),a=(r.maximize?r.maximize():r).language||"en";return{code:a,name:qo.language.standard.long[a]||a}}catch(t){return console.warn("[AxoTube:moreSubtitles] Could not infer language for country",e,t),null}}(function(){try{return window.yt&&window.yt.config_&&window.yt.config_.GL?window.yt.config_.GL:(console.warn("[AxoTube:moreSubtitles] Could not determine user country code"),null)}catch(e){return console.error("[AxoTube:moreSubtitles] Error getting country code:",e),null}}());if(l&&!function(e,t,n){return e.some(function(e){var i,r,a=null===(i=e.compactLinkRenderer)||void 0===i||null===(i=i.serviceEndpoint)||void 0===i||null===(i=i.commandExecutorCommand)||void 0===i?void 0:i.commands,o=null==a||null===(r=a[0])||void 0===r||null===(r=r.selectSubtitlesTrackCommand)||void 0===r?void 0:r.translationLanguage;return!(!o||o.languageCode!==t&&o.languageName!==n)})}(s,l.code,l.name)){var c=Zo(l.code,l.name),h=s.findIndex(function(e){var t;return"Recommended languages"===(null===(t=e.overlayMessageRenderer)||void 0===t||null===(t=t.subtitle)||void 0===t?void 0:t.simpleText)});if(h>-1)s.splice(h+1,0,c);else{var d=s.findIndex(function(e){var t;return"Other languages"===(null===(t=e.overlayMessageRenderer)||void 0===t||null===(t=t.subtitle)||void 0===t?void 0:t.simpleText)});d>-1?s.splice(d,0,c):s.unshift(c)}u.add(l.code),u.add(l.name)}}if(o){var p=Object.entries(function(){try{var e={};return Yo.forEach(function(t){if(t.includes("-")){var n=D(t.split("-"),2),i=n[0],r=n[1],a=qo.language.standard.long[i]||t,o=qo.region.long[r]||r;e[t]="".concat(a," (").concat(o,")")}else e[t]=qo.language.standard.long[t]||t}),e}catch(e){var t={};return Yo.forEach(function(e){return t[e]=e}),t}}()).filter(function(e){var t=D(e,2),n=t[0],i=t[1];return!u.has(n)&&!u.has(i)}).sort(function(e,t){var n=D(e,2)[1],i=D(t,2)[1];return n.localeCompare(i)});p.length>0&&(s.push({overlayMessageRenderer:{title:{simpleText:""},subtitle:{simpleText:"Other Languages"},style:"OVERLAY_MESSAGE_STYLE_SUBSECTION_TITLE"}}),p.forEach(function(e){var t=D(e,2),n=t[0],i=t[1];return s.push(Zo(n,i))}))}}return t.apply(this,arguments)},e.instance.resolveCommand.isPatchedBySubtitleLocalization=!0,Qo=!0,!0}var es=0;function ts(){Qo||(es+=1,$o()||(es>=30?console.warn("[AxoTube:moreSubtitles] resolveCommand did not become ready in time."):setTimeout(ts,500)))}"loading"===document.readyState?document.addEventListener("DOMContentLoaded",ts):ts();var ns=!1,is=null;function rs(){var e=document.querySelector("video");return e&&isFinite(e.currentTime)?Math.max(0,Math.floor(e.currentTime)):0}function as(){var e,t;ns||(ns=!0,nn(Lt("app.name"),Lt("playback.retryPrompt",{time:(e=rs(),t=e%60,Math.floor(e/60)+":"+(t<10?"0"+t:String(t)))}),null))}function os(){var e;is=null,(e=document.querySelector(".ytp-error"))&&e.offsetWidth>0&&e.offsetHeight>0?as():ns=!1}function ss(){null===is&&(is=setTimeout(os,500))}document.addEventListener("error",function(e){e.target&&"VIDEO"===e.target.tagName&&as()},!0),window.addEventListener("keydown",function(e){406===e.keyCode&&ns&&(e.stopPropagation(),function(){ns=!1;var e=function(e,t){var n=e.indexOf("?");if(-1===n||!/\/watch$/.test(e.slice(0,n)))return null;var i=e.slice(n+1).split("&").filter(function(e){return e&&"t"!==e.split("=")[0]});return i.push("t="+t),e.slice(0,n+1)+i.join("&")}(location.hash,rs());e&&(location.hash=e),window.location.reload()}())},!0),function e(){document.body?new MutationObserver(ss).observe(document.body,{childList:!0,subtree:!0}):setTimeout(e,200)}();var us;us||(us=1,window.addEventListener("keydown",function(e){if(403===e.keyCode){var t=window.__axotubeProxyUrl?window.__axotubeProxyUrl:"8081"===location.port?location.protocol+"//"+location.hostname+":8081":null;t&&(e.stopPropagation(),location.href=t+"/axotube/diagnostics")}},!0));var ls="onStateChange",cs="configChange",hs="preferredVideoQuality",ds=new WeakMap,ps=new WeakMap,fs=new WeakMap,ms=new WeakMap,gs=new WeakMap,vs=new WeakSet,ys=new WeakMap,bs=p(function e(){var t,n,i=this;u(this,e),s(t=this,n=vs),n.add(t),c(this,ds,null),c(this,ps,null),c(this,fs,0),c(this,ms,null),c(this,gs,!1),c(this,ys,function(){try{var e,t,n,r,o,s,u=null===(e=l(ds,i))||void 0===e||null===(t=e.getPlayerStateObject)||void 0===t?void 0:t.call(e),c=null===(n=l(ds,i))||void 0===n||null===(r=n.getVideoData)||void 0===r?void 0:r.call(n),d=null==c?void 0:c.video_id;d!==l(ms,i)&&(h(ms,i,d),a(vs,i,Ss).call(i));var p=Object.values((null===(o=l(ds,i))||void 0===o||null===(s=o.getVideoStats)||void 0===s?void 0:s.call(o))||{}).find(function(e){return e&&"shortspage"===e});null==u||!u.isPlaying||l(gs,i)||p||(h(gs,i,a(vs,i,Ds).call(i)),l(gs,i)||a(vs,i,ks).call(i))}catch(e){console.warn("[AxoTube:preferredVideoQuality] State change handler failed:",e)}}),a(vs,this,ws).call(this),Ri(function(e){return a(vs,i,Es).call(i,e)}),_i(function(e){e!==l(ms,i)&&(h(ms,i,e),a(vs,i,Ss).call(i),l(ys,i).call(i))})});function xs(){l(ps,this)&&(clearTimeout(l(ps,this)),h(ps,this,null))}function Ss(){a(vs,this,xs).call(this),h(fs,this,0),h(gs,this,!1)}function Es(e){if(!e){if(l(ds,this))try{l(ds,this).removeEventListener(ls,l(ys,this))}catch(e){}return h(ds,this,null),h(ms,this,null),void a(vs,this,Ss).call(this)}if(e!==l(ds,this)){if(l(ds,this))try{l(ds,this).removeEventListener(ls,l(ys,this))}catch(e){}h(ds,this,e),h(ms,this,null),a(vs,this,Ss).call(this);try{l(ds,this).addEventListener(ls,l(ys,this))}catch(e){console.warn("[AxoTube:preferredVideoQuality] Could not attach state change listener:",e)}l(ys,this).call(this)}}function ws(){var e=this;we.addEventListener(cs,function(t){var n;(null===(n=t.detail)||void 0===n?void 0:n.key)===hs&&(a(vs,e,Ss).call(e),h(gs,e,a(vs,e,Ds).call(e)),l(gs,e)||a(vs,e,ks).call(e))})}function ks(){var e=this;l(ps,this)||l(gs,this)||l(fs,this)>=10||(h(fs,this,l(fs,this)+1),h(ps,this,setTimeout(function(){h(ps,e,null);try{var t,n,i=null===(t=l(ds,e))||void 0===t||null===(n=t.getPlayerStateObject)||void 0===n?void 0:n.call(t);if(null==i||!i.isPlaying||l(ds,e)!==Fi())return;h(gs,e,a(vs,e,Ds).call(e)),l(gs,e)||a(vs,e,ks).call(e)}catch(e){console.warn("[AxoTube:preferredVideoQuality] Retry failed:",e)}},500)))}function Ds(){if(!l(ds,this)||"function"!=typeof l(ds,this).setPlaybackQualityRange)return!1;var e=Se(hs);try{if(!e||"auto"===e)return l(ds,this).setPlaybackQualityRange("auto","auto"),!0;var t=a(vs,this,As).call(this,e);return!!t&&(l(ds,this).setPlaybackQualityRange(t,t),!0)}catch(e){return console.warn("[AxoTube:preferredVideoQuality] Failed to apply quality:",e),!1}}function As(e){try{var t,n,i,r=null===(t=(n=l(ds,this)).getAvailableQualityData)||void 0===t?void 0:t.call(n);if(!Array.isArray(r)||0===r.length)return null;var a=function(e){return parseInt(e,10)||0},o=a(e),s=r.find(function(e){return a(e.qualityLabel)===o});return s?s.quality:(null===(i=r.slice().sort(function(e,t){var n=a(e.qualityLabel),i=a(t.qualityLabel),r=n>o?1:0,s=i>o?1:0;return r!==s?r-s:Math.abs(n-o)-Math.abs(i-o)})[0])||void 0===i?void 0:i.quality)||null}catch(e){return console.warn("[AxoTube:preferredVideoQuality] Quality determination failed:",e),null}}try{window.preferredVideoQualityHandler=new bs}catch(e){console.error("[AxoTube:preferredVideoQuality] PreferredQualityHandler initialization failed:",e)}function Cs(e){return e&&e.tileRenderer&&e.tileRenderer.contentId}function Ts(e){var t=window.queuedVideos.videos[e],n=t&&t.tileRenderer&&t.tileRenderer.onSelectCommand;return!!n&&(window.queuedVideos.currentIndex=e,window.queuedVideos.lastVideoId=Cs(t)||null,setTimeout(function(){return Po(n)},500),!0)}function Ps(){window.queuedVideos.currentIndex=-1,window.queuedVideos.lastVideoId=null,Po({customAction:{action:"CLEAR_QUEUE"}})}window.queuedVideos={videos:[],lastVideoId:null,currentIndex:-1};var Fs=null;Ri(function(e){if(Fs&&(Fs.player.removeEventListener("onStateChange",Fs.listener),Fs=null),e&&"function"==typeof e.addEventListener){var t=function(){return function(e){var t=e.getPlayerStateObject(),n=e.getVideoData(),i=window.queuedVideos;if(0===i.videos.length)return i.currentIndex=-1,void(i.lastVideoId=null);if(t.isEnded){var r=i.currentIndex;if((r<0||r>=i.videos.length)&&(r=i.videos.findIndex(function(e){return Cs(e)===n.video_id})),-1!==r){var a=r+1;if(a<i.videos.length&&Ts(a))return;return void Ps()}if(i.currentIndex+1<i.videos.length&&Ts(i.currentIndex+1))return;if(Ts(0))return;Ps()}else if(t.isPlaying){var o=document.getElementById("container");if(o&&o.style.setProperty("opacity","1","important"),Cs(i.videos[i.currentIndex])===n.video_id)return void(i.lastVideoId=n.video_id);var s=i.videos.findIndex(function(e){return Cs(e)===n.video_id});-1!==s&&(i.currentIndex=s,i.lastVideoId=n.video_id)}}(e)};e.addEventListener("onStateChange",t),Fs={player:e,listener:t}}});var Bs=null,Is=0;function Ls(){Is>=20||(Is+=1,Bs=setTimeout(function(){return Os(!1)},500))}function Os(){if(arguments.length>0&&void 0!==arguments[0]&&arguments[0]&&(Is=0),Bs&&(clearTimeout(Bs),Bs=null),window._yttv){var e=null;try{e=Object.values(window._yttv).find(function(e){return e instanceof Map&&e.has("ENABLE_PREVIEWS_WITH_SOUND")})}catch(t){e=null}e?(Is=0,e.set("ENABLE_PREVIEWS_WITH_SOUND",Fe())):Ls()}else Ls()}we.addEventListener("configChange",function(){Os(!0)}),"complete"===document.readyState?Os(!0):window.addEventListener("load",function(){return Os(!0)});var Ns="http://127.0.0.1:8090",Rs=-1,Ms=!1,_s=!1,Us=!1,js=null,Hs=new Set,zs=!1,Vs="",Ks=null,Gs=!1,Js=!1,Xs=null,Ws=!1;function qs(){return"undefined"!=typeof window&&("string"==typeof window.__axotubeServiceUrl||!!se()||void 0!==window.tizen)}var Ys=Xt,Qs=Yt;function Zs(){return Kn("".concat(Ns,"/api/pairing-code")).then(function(e){if(!e.ok)throw new Error("pairing code HTTP ".concat(e.status));return e.json()}).then(function(e){return ta(e),e}).catch(function(){return ta(null),null})}function $s(){!Js&&Ys()&&Zs().then(function(e){if(e&&e.code&&!Js){Js=!0;try{var t=Array.isArray(e.urls)&&e.urls.length?e.urls[0]:null;nn(Lt("app.name"),t?Lt("toasts.pairingWithUrl",{url:t,code:e.code}):Lt("toasts.pairingCodeOnly",{code:e.code}))}catch(e){}}})}function eu(e,t){if(e===t)return!0;try{return me(e)===me(t)}catch(e){return!1}}function tu(e){if(!js)return!1;var t=Object.keys(e),n=Object.keys(js);return t.length!==n.length||t.some(function(t){return!Object.prototype.hasOwnProperty.call(js,t)||!eu(e[t],js[t])})}function nu(){if(!(!qs()||Ms||Rs<0)&&js){var e=ke();tu(e)?(Ms=!0,Kn("".concat(Ns,"/api/config/push"),{method:"POST",headers:{"Content-Type":"application/json"},body:me({revision:Rs,config:e})}).then(function(e){if(409===e.status)return{conflict:!0};if(!e.ok)throw new Error("config push HTTP ".concat(e.status));return e.json()}).then(function(t){if(null!=t&&t.conflict)return"conflict";if(!t||!t.applied||!Number.isSafeInteger(t.revision))throw new Error("Config push was not acknowledged");Rs=t.revision,js=e;var n,i=ke(),r=f(Hs);try{for(r.s();!(n=r.n()).done;){var a=n.value;eu(i[a],e[a])&&Hs.delete(a)}}catch(e){r.e(e)}finally{r.f()}return"accepted"}).catch(function(){return"failed"}).then(function(e){Ms=!1,"conflict"===e?ru():"accepted"===e&&tu(ke())&&iu()})):Hs.clear()}}function iu(){qs()&&(clearTimeout(Ks),Ks=setTimeout(nu,250))}function ru(){qs()&&!Ms&&(Ms=!0,Kn("".concat(Ns,"/api/config")).then(function(e){if(!e.ok)throw new Error("config pull HTTP ".concat(e.status));return e.json()}).then(function(e){if(e&&Number.isSafeInteger(e.revision)&&!(e.revision<0)&&e.config&&"object"===T(e.config)&&!Array.isArray(e.config)){!function(){if(!Gs&&qs()&&Ys())try{nn(Lt("app.name"),Lt("toasts.serviceConnected")),Gs=!0,setTimeout($s,1200)}catch(e){}}(),su=0;var t=e.config;zs=!0;var n=!0;try{Object.keys(t).forEach(function(e){if(!Hs.has(e)&&void 0!==t[e])try{eu(Se(e),t[e])||Ee(e,t[e])||(n=!1)}catch(e){n=!1}})}finally{zs=!1}var i=ke();Object.keys(i).forEach(function(e){Object.prototype.hasOwnProperty.call(t,e)?eu(i[e],t[e])&&Hs.delete(e):Hs.add(e)}),js=t,n&&(Rs=e.revision)}}).catch(function(){su+=1}).then(function(){Ms=!1,nu()}))}function au(e){return function(e){return e?Kn("".concat(Ns,"/api/command/ack"),{method:"POST",headers:{"Content-Type":"application/json"},body:me({id:e})}).then(function(e){if(!e.ok)throw new Error("command ACK HTTP ".concat(e.status));return!0}).catch(function(){return!1}):Promise.resolve(!1)}(e).then(function(t){if(!t||Xs!==e)return t;var n=Ws;if(Xs=null,Ws=!1,n)try{window.location.reload()}catch(e){}return!0})}function ou(){qs()&&!_s&&(_s=!0,Kn("".concat(Ns,"/api/command")).then(function(e){if(!e.ok)throw new Error("command poll HTTP ".concat(e.status));return e.json()}).then(function(e){if(e&&e.command&&e.id){var t=e.id;if(e.id===Xs)return au(t);if("toast"===e.command.action){Xs=t,Ws=!1;try{nn(Lt("app.name"),String(e.command.text||"").slice(0,200))}catch(e){}return au(t)}if("reload"===e.command.action)return Xs=t,Ws=!0,au(t);var n=function(e){if(!e||"object"!==T(e))return null;if("play"===e.action&&e.videoId){var t={videoId:e.videoId};return e.playlistId&&(t.playlistId=e.playlistId),{watchEndpoint:t}}return"search"===e.action&&e.query?{searchEndpoint:{query:e.query}}:"browse"===e.action&&e.browseId?{browseEndpoint:{browseId:e.browseId}}:null}(e.command);if(n)return Qs(n).then(function(e){if(e){Xs=t,Ws=!1;try{nn(Lt("app.name"),Lt("toasts.commandReceived"))}catch(e){}return au(t)}})}}).catch(function(){}).then(function(){_s=!1}))}we.addEventListener("configChange",function(e){var t;zs||("string"==typeof(null==e||null===(t=e.detail)||void 0===t?void 0:t.key)&&Hs.add(e.detail.key),iu())});var su=0;setTimeout(function e(){ru(),ou(),function(){if(qs()&&!Us){var e=null;try{var t=document.querySelector("video");if(t&&t.currentSrc){var n,i=location.hash.match(/[?&]v=([^&]+)/);e={videoId:i?i[1]:null,title:(null===(n=document.querySelector("ytlr-player-header-title"))||void 0===n?void 0:n.textContent)||document.title,state:t.paused?"paused":"playing",progress:t.currentTime,duration:t.duration}}}catch(e){return}var r=e?me(e):"none";r!==Vs&&(Vs=r,Us=!0,Kn("".concat(Ns,"/api/nowplaying"),{method:"POST",headers:{"Content-Type":"application/json"},body:"none"===r?"{}":r}).then(function(e){if(!e.ok)throw new Error("now playing HTTP ".concat(e.status))}).catch(function(){Vs=""}).then(function(){Us=!1}))}}(),qs()&&(ea?Date.now()-ea:1/0)>6e4&&Zs(),setTimeout(e,function(){if(0===su)return 5e3;var e=5e3*Math.pow(2,Math.min(su,3));return Math.min(e,3e4)}())},3e3);try{Yt(function(e){if(!e||"object"!==T(e))return null;if(e.v){var t={videoId:e.v};return e.list&&(t.playlistId=e.list),{watchEndpoint:t}}if(e.list)return{playlistEndpoint:{playlistId:e.list}};var n=e.search_query||e.q;return n?{searchEndpoint:{query:n}}:e.browseId?{browseEndpoint:{browseId:e.browseId}}:null}(function(e){if(!e||e.length<=1)return{};for(var t={},n=e.substring(1).split("&"),i=0;i<n.length;i+=1){var r=n[i];if(r){var a=r.indexOf("=");if(-1!==a){var o=decodeURIComponent(r.substring(0,a).replace(/\+/g," ")),s=decodeURIComponent(r.substring(a+1).replace(/\+/g," "));t[o]=s}else t[decodeURIComponent(r.replace(/\+/g," "))]=""}}return t}(location.search)))}catch(e){}function uu(e){return e<10?"0"+e:String(e)}var lu="axo-clock",cu="axo-clock-style",hu={topLeft:"axo-clock-top-left",topRight:"axo-clock-top-right",bottomLeft:"axo-clock-bottom-left",bottomRight:"axo-clock-bottom-right"},du="\n#".concat(lu,' {\n position: fixed;\n z-index: 9000;\n pointer-events: none;\n padding: 3vh 3vw;\n font-family: "YouTube Sans", Roboto, "Noto Sans", Arial, sans-serif;\n font-size: 4vh;\n line-height: 1;\n font-variant-numeric: tabular-nums;\n color: rgba(255, 255, 255, 0.92);\n text-shadow: 0 1px 4px rgba(0, 0, 0, 0.85);\n}\n#').concat(lu,".axo-clock-top-left { top: 0; left: 0; }\n#").concat(lu,".axo-clock-top-right { top: 0; right: 0; }\n#").concat(lu,".axo-clock-bottom-left { bottom: 0; left: 0; }\n#").concat(lu,".axo-clock-bottom-right { bottom: 0; right: 0; }\n"),pu=null,fu=null;function mu(){var e=Se("clockMode");return"always"===e||"notPlaying"===e&&!function(){var e=Bi();return!(!e||e.paused||e.ended)}()}function gu(){null!==fu&&clearInterval(fu),fu=null,pu&&pu.parentNode&&pu.parentNode.removeChild(pu),pu=null}function vu(){pu||((pu=document.createElement("div")).id=lu,document.body.appendChild(pu));var e=hu[Se("clockPosition")]||hu.topRight;pu.className!==e&&(pu.className=e);var t=function(e,t,n){var i=uu(e.getMinutes()),r=n?":"+uu(e.getSeconds()):"",a=e.getHours();if("24h"===t)return uu(a)+":"+i+r;var o=String(a%12==0?12:a%12)+":"+i+r;return"12hNoAmPm"===t?o:o+(a<12?" AM":" PM")}(new Date,Se("clockFormat"),!!Se("clockShowSeconds"));pu.textContent!==t&&(pu.textContent=t)}function yu(){document.body&&(mu()?(!function(){if(!document.getElementById(cu)){var e=document.createElement("style");e.id=cu,e.textContent=du,(document.head||document.documentElement).appendChild(e)}}(),vu(),null===fu&&(fu=setInterval(vu,1e3))):gu())}["play","playing","pause","ended","emptied"].forEach(function(e){document.addEventListener(e,yu,!0)}),we.addEventListener("configChange",function(e){var t=e.detail&&e.detail.key;"clockMode"!==t&&"clockFormat"!==t&&"clockPosition"!==t&&"clockShowSeconds"!==t||yu()}),function e(){document.body?yu():setTimeout(e,250)}();var bu="axo-panel-shrink",xu="axo-panel-shrink-style",Su="\nbody.".concat(bu," ytlr-player-container {\n transform: scale(var(--axo-panel-scale, 0.6));\n transform-origin: 0 0;\n transition: transform 0.25s ease;\n}\n");var Eu=null,wu=null,ku=null,Du=null;function Au(){if(Du=null,document.body){var e=document.querySelector("ytlr-engagement-panel-section-list-renderer");!function(e){if(e===ku)return;wu&&wu.disconnect();if(wu=null,ku=e,!e||"undefined"==typeof MutationObserver)return;(wu=new MutationObserver(Cu)).observe(e,{subtree:!0,attributes:!0,attributeFilter:["class"]})}(e),function(){if(!document.getElementById(xu)){var e=document.createElement("style");e.id=xu,e.textContent=Su,(document.head||document.documentElement).appendChild(e)}}();var t=!!Se("enablePanelShrink")&&/#\/watch/.test(location.hash||"")&&function(e){if(!e)return!1;var t=e.querySelector("ytlr-animated-overlay");return!t||!t.classList.contains("frHKed")}(e);document.body.classList.contains(bu)!==t&&document.body.classList.toggle(bu,t);var n=String(Number(Se("panelShrinkPercent"))/100);n!==Eu&&(Eu=n,document.documentElement.style.setProperty("--axo-panel-scale",n))}}function Cu(){null===Du&&(Du=requestAnimationFrame(Au))}!function e(){if(document.body){var t=document.getElementById("container")||document.body;"undefined"!=typeof MutationObserver&&new MutationObserver(Cu).observe(t,{childList:!0,subtree:!0}),window.addEventListener("hashchange",Cu),we.addEventListener("configChange",function(e){var t=e.detail&&e.detail.key;"enablePanelShrink"!==t&&"panelShrinkPercent"!==t||Cu()}),Au()}else setTimeout(e,250)}();var Tu,Pu={exports:{}};var Fu,Bu,Iu=(Tu||(Tu=1,Fu=function(){return function(e){var t={};function n(i){if(t[i])return t[i].exports;var r=t[i]={exports:{},id:i,loaded:!1};return e[i].call(r.exports,r,r.exports,n),r.loaded=!0,r.exports}return n.m=e,n.c=t,n.p="",n(0)}([function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var i=n(1),r=n(3),a=n(8),o=n(15);function s(e,t,n){var o=null,s=function(e,t){n&&n(e,t),o&&o.visit(e,t)},u="function"==typeof n?s:null,l=!1;if(t){l="boolean"==typeof t.comment&&t.comment;var c="boolean"==typeof t.attachComment&&t.attachComment;(l||c)&&((o=new i.CommentHandler).attach=c,t.comment=!0,u=s)}var h,d=!1;t&&"string"==typeof t.sourceType&&(d="module"===t.sourceType),h=t&&"boolean"==typeof t.jsx&&t.jsx?new r.JSXParser(e,t,u):new a.Parser(e,t,u);var p=d?h.parseModule():h.parseScript();return l&&o&&(p.comments=o.comments),h.config.tokens&&(p.tokens=h.tokens),h.config.tolerant&&(p.errors=h.errorHandler.errors),p}t.parse=s,t.parseModule=function(e,t,n){var i=t||{};return i.sourceType="module",s(e,i,n)},t.parseScript=function(e,t,n){var i=t||{};return i.sourceType="script",s(e,i,n)},t.tokenize=function(e,t,n){var i,r=new o.Tokenizer(e,t);i=[];try{for(;;){var a=r.getNextToken();if(!a)break;n&&(a=n(a)),i.push(a)}}catch(e){r.errorHandler.tolerate(e)}return r.errorHandler.tolerant&&(i.errors=r.errors()),i};var u=n(2);t.Syntax=u.Syntax,t.version="4.0.1"},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var i=n(2),r=function(){function e(){this.attach=!1,this.comments=[],this.stack=[],this.leading=[],this.trailing=[]}return e.prototype.insertInnerComments=function(e,t){if(e.type===i.Syntax.BlockStatement&&0===e.body.length){for(var n=[],r=this.leading.length-1;r>=0;--r){var a=this.leading[r];t.end.offset>=a.start&&(n.unshift(a.comment),this.leading.splice(r,1),this.trailing.splice(r,1))}n.length&&(e.innerComments=n)}},e.prototype.findTrailingComments=function(e){var t=[];if(this.trailing.length>0){for(var n=this.trailing.length-1;n>=0;--n){var i=this.trailing[n];i.start>=e.end.offset&&t.unshift(i.comment)}return this.trailing.length=0,t}var r=this.stack[this.stack.length-1];if(r&&r.node.trailingComments){var a=r.node.trailingComments[0];a&&a.range[0]>=e.end.offset&&(t=r.node.trailingComments,delete r.node.trailingComments)}return t},e.prototype.findLeadingComments=function(e){for(var t,n=[];this.stack.length>0&&(a=this.stack[this.stack.length-1])&&a.start>=e.start.offset;)t=a.node,this.stack.pop();if(t){for(var i=(t.leadingComments?t.leadingComments.length:0)-1;i>=0;--i){var r=t.leadingComments[i];r.range[1]<=e.start.offset&&(n.unshift(r),t.leadingComments.splice(i,1))}return t.leadingComments&&0===t.leadingComments.length&&delete t.leadingComments,n}for(i=this.leading.length-1;i>=0;--i){var a;(a=this.leading[i]).start<=e.start.offset&&(n.unshift(a.comment),this.leading.splice(i,1))}return n},e.prototype.visitNode=function(e,t){if(!(e.type===i.Syntax.Program&&e.body.length>0)){this.insertInnerComments(e,t);var n=this.findTrailingComments(t),r=this.findLeadingComments(t);r.length>0&&(e.leadingComments=r),n.length>0&&(e.trailingComments=n),this.stack.push({node:e,start:t.start.offset})}},e.prototype.visitComment=function(e,t){var n="L"===e.type[0]?"Line":"Block",i={type:n,value:e.value};if(e.range&&(i.range=e.range),e.loc&&(i.loc=e.loc),this.comments.push(i),this.attach){var r={comment:{type:n,value:e.value,range:[t.start.offset,t.end.offset]},start:t.start.offset};e.loc&&(r.comment.loc=e.loc),e.type=n,this.leading.push(r),this.trailing.push(r)}},e.prototype.visit=function(e,t){"LineComment"===e.type||"BlockComment"===e.type?this.visitComment(e,t):this.attach&&this.visitNode(e,t)},e}();t.CommentHandler=r},function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.Syntax={AssignmentExpression:"AssignmentExpression",AssignmentPattern:"AssignmentPattern",ArrayExpression:"ArrayExpression",ArrayPattern:"ArrayPattern",ArrowFunctionExpression:"ArrowFunctionExpression",AwaitExpression:"AwaitExpression",BlockStatement:"BlockStatement",BinaryExpression:"BinaryExpression",BreakStatement:"BreakStatement",CallExpression:"CallExpression",CatchClause:"CatchClause",ClassBody:"ClassBody",ClassDeclaration:"ClassDeclaration",ClassExpression:"ClassExpression",ConditionalExpression:"ConditionalExpression",ContinueStatement:"ContinueStatement",DoWhileStatement:"DoWhileStatement",DebuggerStatement:"DebuggerStatement",EmptyStatement:"EmptyStatement",ExportAllDeclaration:"ExportAllDeclaration",ExportDefaultDeclaration:"ExportDefaultDeclaration",ExportNamedDeclaration:"ExportNamedDeclaration",ExportSpecifier:"ExportSpecifier",ExpressionStatement:"ExpressionStatement",ForStatement:"ForStatement",ForOfStatement:"ForOfStatement",ForInStatement:"ForInStatement",FunctionDeclaration:"FunctionDeclaration",FunctionExpression:"FunctionExpression",Identifier:"Identifier",IfStatement:"IfStatement",ImportDeclaration:"ImportDeclaration",ImportDefaultSpecifier:"ImportDefaultSpecifier",ImportNamespaceSpecifier:"ImportNamespaceSpecifier",ImportSpecifier:"ImportSpecifier",Literal:"Literal",LabeledStatement:"LabeledStatement",LogicalExpression:"LogicalExpression",MemberExpression:"MemberExpression",MetaProperty:"MetaProperty",MethodDefinition:"MethodDefinition",NewExpression:"NewExpression",ObjectExpression:"ObjectExpression",ObjectPattern:"ObjectPattern",Program:"Program",Property:"Property",RestElement:"RestElement",ReturnStatement:"ReturnStatement",SequenceExpression:"SequenceExpression",SpreadElement:"SpreadElement",Super:"Super",SwitchCase:"SwitchCase",SwitchStatement:"SwitchStatement",TaggedTemplateExpression:"TaggedTemplateExpression",TemplateElement:"TemplateElement",TemplateLiteral:"TemplateLiteral",ThisExpression:"ThisExpression",ThrowStatement:"ThrowStatement",TryStatement:"TryStatement",UnaryExpression:"UnaryExpression",UpdateExpression:"UpdateExpression",VariableDeclaration:"VariableDeclaration",VariableDeclarator:"VariableDeclarator",WhileStatement:"WhileStatement",WithStatement:"WithStatement",YieldExpression:"YieldExpression"}},function(e,t,n){var i,r=this&&this.__extends||(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},function(e,t){function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var a=n(4),o=n(5),s=n(6),u=n(7),l=n(8),c=n(13),h=n(14);function d(e){var t;switch(e.type){case s.JSXSyntax.JSXIdentifier:t=e.name;break;case s.JSXSyntax.JSXNamespacedName:var n=e;t=d(n.namespace)+":"+d(n.name);break;case s.JSXSyntax.JSXMemberExpression:var i=e;t=d(i.object)+"."+d(i.property)}return t}c.TokenName[100]="JSXIdentifier",c.TokenName[101]="JSXText";var p=function(e){function t(t,n,i){return e.call(this,t,n,i)||this}return r(t,e),t.prototype.parsePrimaryExpression=function(){return this.match("<")?this.parseJSXRoot():e.prototype.parsePrimaryExpression.call(this)},t.prototype.startJSX=function(){this.scanner.index=this.startMarker.index,this.scanner.lineNumber=this.startMarker.line,this.scanner.lineStart=this.startMarker.index-this.startMarker.column},t.prototype.finishJSX=function(){this.nextToken()},t.prototype.reenterJSX=function(){this.startJSX(),this.expectJSX("}"),this.config.tokens&&this.tokens.pop()},t.prototype.createJSXNode=function(){return this.collectComments(),{index:this.scanner.index,line:this.scanner.lineNumber,column:this.scanner.index-this.scanner.lineStart}},t.prototype.createJSXChildNode=function(){return{index:this.scanner.index,line:this.scanner.lineNumber,column:this.scanner.index-this.scanner.lineStart}},t.prototype.scanXHTMLEntity=function(e){for(var t="&",n=!0,i=!1,r=!1,o=!1;!this.scanner.eof()&&n&&!i;){var s=this.scanner.source[this.scanner.index];if(s===e)break;if(i=";"===s,t+=s,++this.scanner.index,!i)switch(t.length){case 2:r="#"===s;break;case 3:r&&(n=(o="x"===s)||a.Character.isDecimalDigit(s.charCodeAt(0)),r=r&&!o);break;default:n=(n=n&&!(r&&!a.Character.isDecimalDigit(s.charCodeAt(0))))&&!(o&&!a.Character.isHexDigit(s.charCodeAt(0)))}}if(n&&i&&t.length>2){var u=t.substr(1,t.length-2);r&&u.length>1?t=String.fromCharCode(parseInt(u.substr(1),10)):o&&u.length>2?t=String.fromCharCode(parseInt("0"+u.substr(1),16)):r||o||!h.XHTMLEntities[u]||(t=h.XHTMLEntities[u])}return t},t.prototype.lexJSX=function(){var e=this.scanner.source.charCodeAt(this.scanner.index);if(60===e||62===e||47===e||58===e||61===e||123===e||125===e)return{type:7,value:s=this.scanner.source[this.scanner.index++],lineNumber:this.scanner.lineNumber,lineStart:this.scanner.lineStart,start:this.scanner.index-1,end:this.scanner.index};if(34===e||39===e){for(var t=this.scanner.index,n=this.scanner.source[this.scanner.index++],i="";!this.scanner.eof()&&(u=this.scanner.source[this.scanner.index++])!==n;)i+="&"===u?this.scanXHTMLEntity(n):u;return{type:8,value:i,lineNumber:this.scanner.lineNumber,lineStart:this.scanner.lineStart,start:t,end:this.scanner.index}}if(46===e){var r=this.scanner.source.charCodeAt(this.scanner.index+1),o=this.scanner.source.charCodeAt(this.scanner.index+2),s=46===r&&46===o?"...":".";return t=this.scanner.index,this.scanner.index+=s.length,{type:7,value:s,lineNumber:this.scanner.lineNumber,lineStart:this.scanner.lineStart,start:t,end:this.scanner.index}}if(96===e)return{type:10,value:"",lineNumber:this.scanner.lineNumber,lineStart:this.scanner.lineStart,start:this.scanner.index,end:this.scanner.index};if(a.Character.isIdentifierStart(e)&&92!==e){for(t=this.scanner.index,++this.scanner.index;!this.scanner.eof();){var u=this.scanner.source.charCodeAt(this.scanner.index);if(a.Character.isIdentifierPart(u)&&92!==u)++this.scanner.index;else{if(45!==u)break;++this.scanner.index}}return{type:100,value:this.scanner.source.slice(t,this.scanner.index),lineNumber:this.scanner.lineNumber,lineStart:this.scanner.lineStart,start:t,end:this.scanner.index}}return this.scanner.lex()},t.prototype.nextJSXToken=function(){this.collectComments(),this.startMarker.index=this.scanner.index,this.startMarker.line=this.scanner.lineNumber,this.startMarker.column=this.scanner.index-this.scanner.lineStart;var e=this.lexJSX();return this.lastMarker.index=this.scanner.index,this.lastMarker.line=this.scanner.lineNumber,this.lastMarker.column=this.scanner.index-this.scanner.lineStart,this.config.tokens&&this.tokens.push(this.convertToken(e)),e},t.prototype.nextJSXText=function(){this.startMarker.index=this.scanner.index,this.startMarker.line=this.scanner.lineNumber,this.startMarker.column=this.scanner.index-this.scanner.lineStart;for(var e=this.scanner.index,t="";!this.scanner.eof();){var n=this.scanner.source[this.scanner.index];if("{"===n||"<"===n)break;++this.scanner.index,t+=n,a.Character.isLineTerminator(n.charCodeAt(0))&&(++this.scanner.lineNumber,"\r"===n&&"\n"===this.scanner.source[this.scanner.index]&&++this.scanner.index,this.scanner.lineStart=this.scanner.index)}this.lastMarker.index=this.scanner.index,this.lastMarker.line=this.scanner.lineNumber,this.lastMarker.column=this.scanner.index-this.scanner.lineStart;var i={type:101,value:t,lineNumber:this.scanner.lineNumber,lineStart:this.scanner.lineStart,start:e,end:this.scanner.index};return t.length>0&&this.config.tokens&&this.tokens.push(this.convertToken(i)),i},t.prototype.peekJSXToken=function(){var e=this.scanner.saveState();this.scanner.scanComments();var t=this.lexJSX();return this.scanner.restoreState(e),t},t.prototype.expectJSX=function(e){var t=this.nextJSXToken();7===t.type&&t.value===e||this.throwUnexpectedToken(t)},t.prototype.matchJSX=function(e){var t=this.peekJSXToken();return 7===t.type&&t.value===e},t.prototype.parseJSXIdentifier=function(){var e=this.createJSXNode(),t=this.nextJSXToken();return 100!==t.type&&this.throwUnexpectedToken(t),this.finalize(e,new o.JSXIdentifier(t.value))},t.prototype.parseJSXElementName=function(){var e=this.createJSXNode(),t=this.parseJSXIdentifier();if(this.matchJSX(":")){var n=t;this.expectJSX(":");var i=this.parseJSXIdentifier();t=this.finalize(e,new o.JSXNamespacedName(n,i))}else if(this.matchJSX("."))for(;this.matchJSX(".");){var r=t;this.expectJSX(".");var a=this.parseJSXIdentifier();t=this.finalize(e,new o.JSXMemberExpression(r,a))}return t},t.prototype.parseJSXAttributeName=function(){var e,t=this.createJSXNode(),n=this.parseJSXIdentifier();if(this.matchJSX(":")){var i=n;this.expectJSX(":");var r=this.parseJSXIdentifier();e=this.finalize(t,new o.JSXNamespacedName(i,r))}else e=n;return e},t.prototype.parseJSXStringLiteralAttribute=function(){var e=this.createJSXNode(),t=this.nextJSXToken();8!==t.type&&this.throwUnexpectedToken(t);var n=this.getTokenRaw(t);return this.finalize(e,new u.Literal(t.value,n))},t.prototype.parseJSXExpressionAttribute=function(){var e=this.createJSXNode();this.expectJSX("{"),this.finishJSX(),this.match("}")&&this.tolerateError("JSX attributes must only be assigned a non-empty expression");var t=this.parseAssignmentExpression();return this.reenterJSX(),this.finalize(e,new o.JSXExpressionContainer(t))},t.prototype.parseJSXAttributeValue=function(){return this.matchJSX("{")?this.parseJSXExpressionAttribute():this.matchJSX("<")?this.parseJSXElement():this.parseJSXStringLiteralAttribute()},t.prototype.parseJSXNameValueAttribute=function(){var e=this.createJSXNode(),t=this.parseJSXAttributeName(),n=null;return this.matchJSX("=")&&(this.expectJSX("="),n=this.parseJSXAttributeValue()),this.finalize(e,new o.JSXAttribute(t,n))},t.prototype.parseJSXSpreadAttribute=function(){var e=this.createJSXNode();this.expectJSX("{"),this.expectJSX("..."),this.finishJSX();var t=this.parseAssignmentExpression();return this.reenterJSX(),this.finalize(e,new o.JSXSpreadAttribute(t))},t.prototype.parseJSXAttributes=function(){for(var e=[];!this.matchJSX("/")&&!this.matchJSX(">");){var t=this.matchJSX("{")?this.parseJSXSpreadAttribute():this.parseJSXNameValueAttribute();e.push(t)}return e},t.prototype.parseJSXOpeningElement=function(){var e=this.createJSXNode();this.expectJSX("<");var t=this.parseJSXElementName(),n=this.parseJSXAttributes(),i=this.matchJSX("/");return i&&this.expectJSX("/"),this.expectJSX(">"),this.finalize(e,new o.JSXOpeningElement(t,i,n))},t.prototype.parseJSXBoundaryElement=function(){var e=this.createJSXNode();if(this.expectJSX("<"),this.matchJSX("/")){this.expectJSX("/");var t=this.parseJSXElementName();return this.expectJSX(">"),this.finalize(e,new o.JSXClosingElement(t))}var n=this.parseJSXElementName(),i=this.parseJSXAttributes(),r=this.matchJSX("/");return r&&this.expectJSX("/"),this.expectJSX(">"),this.finalize(e,new o.JSXOpeningElement(n,r,i))},t.prototype.parseJSXEmptyExpression=function(){var e=this.createJSXChildNode();return this.collectComments(),this.lastMarker.index=this.scanner.index,this.lastMarker.line=this.scanner.lineNumber,this.lastMarker.column=this.scanner.index-this.scanner.lineStart,this.finalize(e,new o.JSXEmptyExpression)},t.prototype.parseJSXExpressionContainer=function(){var e,t=this.createJSXNode();return this.expectJSX("{"),this.matchJSX("}")?(e=this.parseJSXEmptyExpression(),this.expectJSX("}")):(this.finishJSX(),e=this.parseAssignmentExpression(),this.reenterJSX()),this.finalize(t,new o.JSXExpressionContainer(e))},t.prototype.parseJSXChildren=function(){for(var e=[];!this.scanner.eof();){var t=this.createJSXChildNode(),n=this.nextJSXText();if(n.start<n.end){var i=this.getTokenRaw(n),r=this.finalize(t,new o.JSXText(n.value,i));e.push(r)}if("{"!==this.scanner.source[this.scanner.index])break;var a=this.parseJSXExpressionContainer();e.push(a)}return e},t.prototype.parseComplexJSXElement=function(e){for(var t=[];!this.scanner.eof();){e.children=e.children.concat(this.parseJSXChildren());var n=this.createJSXChildNode(),i=this.parseJSXBoundaryElement();if(i.type===s.JSXSyntax.JSXOpeningElement){var r=i;if(r.selfClosing){var a=this.finalize(n,new o.JSXElement(r,[],null));e.children.push(a)}else t.push(e),e={node:n,opening:r,closing:null,children:[]}}if(i.type===s.JSXSyntax.JSXClosingElement){e.closing=i;var u=d(e.opening.name);if(u!==d(e.closing.name)&&this.tolerateError("Expected corresponding JSX closing tag for %0",u),!(t.length>0))break;a=this.finalize(e.node,new o.JSXElement(e.opening,e.children,e.closing)),(e=t[t.length-1]).children.push(a),t.pop()}}return e},t.prototype.parseJSXElement=function(){var e=this.createJSXNode(),t=this.parseJSXOpeningElement(),n=[],i=null;if(!t.selfClosing){var r=this.parseComplexJSXElement({node:e,opening:t,closing:i,children:n});n=r.children,i=r.closing}return this.finalize(e,new o.JSXElement(t,n,i))},t.prototype.parseJSXRoot=function(){this.config.tokens&&this.tokens.pop(),this.startJSX();var e=this.parseJSXElement();return this.finishJSX(),e},t.prototype.isStartOfExpression=function(){return e.prototype.isStartOfExpression.call(this)||this.match("<")},t}(l.Parser);t.JSXParser=p},function(e,t){Object.defineProperty(t,"__esModule",{value:!0});var n={NonAsciiIdentifierStart:/[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0-\u08B4\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309B-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FD5\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AD\uA7B0-\uA7B7\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF30-\uDF4A\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC03-\uDC37\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE2B\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDF00-\uDF19]|\uD806[\uDCA0-\uDCDF\uDCFF\uDEC0-\uDEF8]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50\uDF93-\uDF9F]|\uD82C[\uDC00\uDC01]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD83A[\uDC00-\uDCC4]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1]|\uD87E[\uDC00-\uDE1D]/,NonAsciiIdentifierPart:/[\xAA\xB5\xB7\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05F0-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u0800-\u082D\u0840-\u085B\u08A0-\u08B4\u08E3-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0AF9\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B6F\u0B71\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BEF\u0C00-\u0C03\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58-\u0C5A\u0C60-\u0C63\u0C66-\u0C6F\u0C81-\u0C83\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1\u0CF2\u0D01-\u0D03\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D57\u0D5F-\u0D63\u0D66-\u0D6F\u0D7A-\u0D7F\u0D82\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E4E\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB9\u0EBB-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECD\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u135F\u1369-\u1371\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u1820-\u1877\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19DA\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ABD\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1CD0-\u1CD2\u1CD4-\u1CF6\u1CF8\u1CF9\u1D00-\u1DF5\u1DFC-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u200C\u200D\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FD5\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AD\uA7B0-\uA7B7\uA7F7-\uA827\uA840-\uA873\uA880-\uA8C4\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA8FD\uA900-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uA9E0-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF3F\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDDFD\uDE80-\uDE9C\uDEA0-\uDED0\uDEE0\uDF00-\uDF1F\uDF30-\uDF4A\uDF50-\uDF7A\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCA0-\uDCA9\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00-\uDE03\uDE05\uDE06\uDE0C-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE38-\uDE3A\uDE3F\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE6\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC00-\uDC46\uDC66-\uDC6F\uDC7F-\uDCBA\uDCD0-\uDCE8\uDCF0-\uDCF9\uDD00-\uDD34\uDD36-\uDD3F\uDD50-\uDD73\uDD76\uDD80-\uDDC4\uDDCA-\uDDCC\uDDD0-\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE37\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEEA\uDEF0-\uDEF9\uDF00-\uDF03\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3C-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF50\uDF57\uDF5D-\uDF63\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC80-\uDCC5\uDCC7\uDCD0-\uDCD9\uDD80-\uDDB5\uDDB8-\uDDC0\uDDD8-\uDDDD\uDE00-\uDE40\uDE44\uDE50-\uDE59\uDE80-\uDEB7\uDEC0-\uDEC9\uDF00-\uDF19\uDF1D-\uDF2B\uDF30-\uDF39]|\uD806[\uDCA0-\uDCE9\uDCFF\uDEC0-\uDEF8]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE60-\uDE69\uDED0-\uDEED\uDEF0-\uDEF4\uDF00-\uDF36\uDF40-\uDF43\uDF50-\uDF59\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50-\uDF7E\uDF8F-\uDF9F]|\uD82C[\uDC00\uDC01]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99\uDC9D\uDC9E]|\uD834[\uDD65-\uDD69\uDD6D-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB\uDFCE-\uDFFF]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE9B-\uDE9F\uDEA1-\uDEAF]|\uD83A[\uDC00-\uDCC4\uDCD0-\uDCD6]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1]|\uD87E[\uDC00-\uDE1D]|\uDB40[\uDD00-\uDDEF]/};t.Character={fromCodePoint:function(e){return e<65536?String.fromCharCode(e):String.fromCharCode(55296+(e-65536>>10))+String.fromCharCode(56320+(e-65536&1023))},isWhiteSpace:function(e){return 32===e||9===e||11===e||12===e||160===e||e>=5760&&[5760,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8239,8287,12288,65279].indexOf(e)>=0},isLineTerminator:function(e){return 10===e||13===e||8232===e||8233===e},isIdentifierStart:function(e){return 36===e||95===e||e>=65&&e<=90||e>=97&&e<=122||92===e||e>=128&&n.NonAsciiIdentifierStart.test(t.Character.fromCodePoint(e))},isIdentifierPart:function(e){return 36===e||95===e||e>=65&&e<=90||e>=97&&e<=122||e>=48&&e<=57||92===e||e>=128&&n.NonAsciiIdentifierPart.test(t.Character.fromCodePoint(e))},isDecimalDigit:function(e){return e>=48&&e<=57},isHexDigit:function(e){return e>=48&&e<=57||e>=65&&e<=70||e>=97&&e<=102},isOctalDigit:function(e){return e>=48&&e<=55}}},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var i=n(6),r=function(e){this.type=i.JSXSyntax.JSXClosingElement,this.name=e};t.JSXClosingElement=r;var a=function(e,t,n){this.type=i.JSXSyntax.JSXElement,this.openingElement=e,this.children=t,this.closingElement=n};t.JSXElement=a;var o=function(){this.type=i.JSXSyntax.JSXEmptyExpression};t.JSXEmptyExpression=o;var s=function(e){this.type=i.JSXSyntax.JSXExpressionContainer,this.expression=e};t.JSXExpressionContainer=s;var u=function(e){this.type=i.JSXSyntax.JSXIdentifier,this.name=e};t.JSXIdentifier=u;var l=function(e,t){this.type=i.JSXSyntax.JSXMemberExpression,this.object=e,this.property=t};t.JSXMemberExpression=l;var c=function(e,t){this.type=i.JSXSyntax.JSXAttribute,this.name=e,this.value=t};t.JSXAttribute=c;var h=function(e,t){this.type=i.JSXSyntax.JSXNamespacedName,this.namespace=e,this.name=t};t.JSXNamespacedName=h;var d=function(e,t,n){this.type=i.JSXSyntax.JSXOpeningElement,this.name=e,this.selfClosing=t,this.attributes=n};t.JSXOpeningElement=d;var p=function(e){this.type=i.JSXSyntax.JSXSpreadAttribute,this.argument=e};t.JSXSpreadAttribute=p;var f=function(e,t){this.type=i.JSXSyntax.JSXText,this.value=e,this.raw=t};t.JSXText=f},function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.JSXSyntax={JSXAttribute:"JSXAttribute",JSXClosingElement:"JSXClosingElement",JSXElement:"JSXElement",JSXEmptyExpression:"JSXEmptyExpression",JSXExpressionContainer:"JSXExpressionContainer",JSXIdentifier:"JSXIdentifier",JSXMemberExpression:"JSXMemberExpression",JSXNamespacedName:"JSXNamespacedName",JSXOpeningElement:"JSXOpeningElement",JSXSpreadAttribute:"JSXSpreadAttribute",JSXText:"JSXText"}},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var i=n(2),r=function(e){this.type=i.Syntax.ArrayExpression,this.elements=e};t.ArrayExpression=r;var a=function(e){this.type=i.Syntax.ArrayPattern,this.elements=e};t.ArrayPattern=a;var o=function(e,t,n){this.type=i.Syntax.ArrowFunctionExpression,this.id=null,this.params=e,this.body=t,this.generator=!1,this.expression=n,this.async=!1};t.ArrowFunctionExpression=o;var s=function(e,t,n){this.type=i.Syntax.AssignmentExpression,this.operator=e,this.left=t,this.right=n};t.AssignmentExpression=s;var u=function(e,t){this.type=i.Syntax.AssignmentPattern,this.left=e,this.right=t};t.AssignmentPattern=u;var l=function(e,t,n){this.type=i.Syntax.ArrowFunctionExpression,this.id=null,this.params=e,this.body=t,this.generator=!1,this.expression=n,this.async=!0};t.AsyncArrowFunctionExpression=l;var c=function(e,t,n){this.type=i.Syntax.FunctionDeclaration,this.id=e,this.params=t,this.body=n,this.generator=!1,this.expression=!1,this.async=!0};t.AsyncFunctionDeclaration=c;var h=function(e,t,n){this.type=i.Syntax.FunctionExpression,this.id=e,this.params=t,this.body=n,this.generator=!1,this.expression=!1,this.async=!0};t.AsyncFunctionExpression=h;var d=function(e){this.type=i.Syntax.AwaitExpression,this.argument=e};t.AwaitExpression=d;var p=function(e,t,n){var r="||"===e||"&&"===e;this.type=r?i.Syntax.LogicalExpression:i.Syntax.BinaryExpression,this.operator=e,this.left=t,this.right=n};t.BinaryExpression=p;var f=function(e){this.type=i.Syntax.BlockStatement,this.body=e};t.BlockStatement=f;var m=function(e){this.type=i.Syntax.BreakStatement,this.label=e};t.BreakStatement=m;var g=function(e,t){this.type=i.Syntax.CallExpression,this.callee=e,this.arguments=t};t.CallExpression=g;var v=function(e,t){this.type=i.Syntax.CatchClause,this.param=e,this.body=t};t.CatchClause=v;var y=function(e){this.type=i.Syntax.ClassBody,this.body=e};t.ClassBody=y;var b=function(e,t,n){this.type=i.Syntax.ClassDeclaration,this.id=e,this.superClass=t,this.body=n};t.ClassDeclaration=b;var x=function(e,t,n){this.type=i.Syntax.ClassExpression,this.id=e,this.superClass=t,this.body=n};t.ClassExpression=x;var S=function(e,t){this.type=i.Syntax.MemberExpression,this.computed=!0,this.object=e,this.property=t};t.ComputedMemberExpression=S;var E=function(e,t,n){this.type=i.Syntax.ConditionalExpression,this.test=e,this.consequent=t,this.alternate=n};t.ConditionalExpression=E;var w=function(e){this.type=i.Syntax.ContinueStatement,this.label=e};t.ContinueStatement=w;var k=function(){this.type=i.Syntax.DebuggerStatement};t.DebuggerStatement=k;var D=function(e,t){this.type=i.Syntax.ExpressionStatement,this.expression=e,this.directive=t};t.Directive=D;var A=function(e,t){this.type=i.Syntax.DoWhileStatement,this.body=e,this.test=t};t.DoWhileStatement=A;var C=function(){this.type=i.Syntax.EmptyStatement};t.EmptyStatement=C;var T=function(e){this.type=i.Syntax.ExportAllDeclaration,this.source=e};t.ExportAllDeclaration=T;var P=function(e){this.type=i.Syntax.ExportDefaultDeclaration,this.declaration=e};t.ExportDefaultDeclaration=P;var F=function(e,t,n){this.type=i.Syntax.ExportNamedDeclaration,this.declaration=e,this.specifiers=t,this.source=n};t.ExportNamedDeclaration=F;var B=function(e,t){this.type=i.Syntax.ExportSpecifier,this.exported=t,this.local=e};t.ExportSpecifier=B;var I=function(e){this.type=i.Syntax.ExpressionStatement,this.expression=e};t.ExpressionStatement=I;var L=function(e,t,n){this.type=i.Syntax.ForInStatement,this.left=e,this.right=t,this.body=n,this.each=!1};t.ForInStatement=L;var O=function(e,t,n){this.type=i.Syntax.ForOfStatement,this.left=e,this.right=t,this.body=n};t.ForOfStatement=O;var N=function(e,t,n,r){this.type=i.Syntax.ForStatement,this.init=e,this.test=t,this.update=n,this.body=r};t.ForStatement=N;var R=function(e,t,n,r){this.type=i.Syntax.FunctionDeclaration,this.id=e,this.params=t,this.body=n,this.generator=r,this.expression=!1,this.async=!1};t.FunctionDeclaration=R;var M=function(e,t,n,r){this.type=i.Syntax.FunctionExpression,this.id=e,this.params=t,this.body=n,this.generator=r,this.expression=!1,this.async=!1};t.FunctionExpression=M;var _=function(e){this.type=i.Syntax.Identifier,this.name=e};t.Identifier=_;var U=function(e,t,n){this.type=i.Syntax.IfStatement,this.test=e,this.consequent=t,this.alternate=n};t.IfStatement=U;var j=function(e,t){this.type=i.Syntax.ImportDeclaration,this.specifiers=e,this.source=t};t.ImportDeclaration=j;var H=function(e){this.type=i.Syntax.ImportDefaultSpecifier,this.local=e};t.ImportDefaultSpecifier=H;var z=function(e){this.type=i.Syntax.ImportNamespaceSpecifier,this.local=e};t.ImportNamespaceSpecifier=z;var V=function(e,t){this.type=i.Syntax.ImportSpecifier,this.local=e,this.imported=t};t.ImportSpecifier=V;var K=function(e,t){this.type=i.Syntax.LabeledStatement,this.label=e,this.body=t};t.LabeledStatement=K;var G=function(e,t){this.type=i.Syntax.Literal,this.value=e,this.raw=t};t.Literal=G;var J=function(e,t){this.type=i.Syntax.MetaProperty,this.meta=e,this.property=t};t.MetaProperty=J;var X=function(e,t,n,r,a){this.type=i.Syntax.MethodDefinition,this.key=e,this.computed=t,this.value=n,this.kind=r,this.static=a};t.MethodDefinition=X;var W=function(e){this.type=i.Syntax.Program,this.body=e,this.sourceType="module"};t.Module=W;var q=function(e,t){this.type=i.Syntax.NewExpression,this.callee=e,this.arguments=t};t.NewExpression=q;var Y=function(e){this.type=i.Syntax.ObjectExpression,this.properties=e};t.ObjectExpression=Y;var Q=function(e){this.type=i.Syntax.ObjectPattern,this.properties=e};t.ObjectPattern=Q;var Z=function(e,t,n,r,a,o){this.type=i.Syntax.Property,this.key=t,this.computed=n,this.value=r,this.kind=e,this.method=a,this.shorthand=o};t.Property=Z;var $=function(e,t,n,r){this.type=i.Syntax.Literal,this.value=e,this.raw=t,this.regex={pattern:n,flags:r}};t.RegexLiteral=$;var ee=function(e){this.type=i.Syntax.RestElement,this.argument=e};t.RestElement=ee;var te=function(e){this.type=i.Syntax.ReturnStatement,this.argument=e};t.ReturnStatement=te;var ne=function(e){this.type=i.Syntax.Program,this.body=e,this.sourceType="script"};t.Script=ne;var ie=function(e){this.type=i.Syntax.SequenceExpression,this.expressions=e};t.SequenceExpression=ie;var re=function(e){this.type=i.Syntax.SpreadElement,this.argument=e};t.SpreadElement=re;var ae=function(e,t){this.type=i.Syntax.MemberExpression,this.computed=!1,this.object=e,this.property=t};t.StaticMemberExpression=ae;var oe=function(){this.type=i.Syntax.Super};t.Super=oe;var se=function(e,t){this.type=i.Syntax.SwitchCase,this.test=e,this.consequent=t};t.SwitchCase=se;var ue=function(e,t){this.type=i.Syntax.SwitchStatement,this.discriminant=e,this.cases=t};t.SwitchStatement=ue;var le=function(e,t){this.type=i.Syntax.TaggedTemplateExpression,this.tag=e,this.quasi=t};t.TaggedTemplateExpression=le;var ce=function(e,t){this.type=i.Syntax.TemplateElement,this.value=e,this.tail=t};t.TemplateElement=ce;var he=function(e,t){this.type=i.Syntax.TemplateLiteral,this.quasis=e,this.expressions=t};t.TemplateLiteral=he;var de=function(){this.type=i.Syntax.ThisExpression};t.ThisExpression=de;var pe=function(e){this.type=i.Syntax.ThrowStatement,this.argument=e};t.ThrowStatement=pe;var fe=function(e,t,n){this.type=i.Syntax.TryStatement,this.block=e,this.handler=t,this.finalizer=n};t.TryStatement=fe;var me=function(e,t){this.type=i.Syntax.UnaryExpression,this.operator=e,this.argument=t,this.prefix=!0};t.UnaryExpression=me;var ge=function(e,t,n){this.type=i.Syntax.UpdateExpression,this.operator=e,this.argument=t,this.prefix=n};t.UpdateExpression=ge;var ve=function(e,t){this.type=i.Syntax.VariableDeclaration,this.declarations=e,this.kind=t};t.VariableDeclaration=ve;var ye=function(e,t){this.type=i.Syntax.VariableDeclarator,this.id=e,this.init=t};t.VariableDeclarator=ye;var be=function(e,t){this.type=i.Syntax.WhileStatement,this.test=e,this.body=t};t.WhileStatement=be;var xe=function(e,t){this.type=i.Syntax.WithStatement,this.object=e,this.body=t};t.WithStatement=xe;var Se=function(e,t){this.type=i.Syntax.YieldExpression,this.argument=e,this.delegate=t};t.YieldExpression=Se},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var i=n(9),r=n(10),a=n(11),o=n(7),s=n(12),u=n(2),l=n(13),c="ArrowParameterPlaceHolder",h=function(){function e(e,t,n){void 0===t&&(t={}),this.config={range:"boolean"==typeof t.range&&t.range,loc:"boolean"==typeof t.loc&&t.loc,source:null,tokens:"boolean"==typeof t.tokens&&t.tokens,comment:"boolean"==typeof t.comment&&t.comment,tolerant:"boolean"==typeof t.tolerant&&t.tolerant},this.config.loc&&t.source&&null!==t.source&&(this.config.source=String(t.source)),this.delegate=n,this.errorHandler=new r.ErrorHandler,this.errorHandler.tolerant=this.config.tolerant,this.scanner=new s.Scanner(e,this.errorHandler),this.scanner.trackComment=this.config.comment,this.operatorPrecedence={")":0,";":0,",":0,"=":0,"]":0,"||":1,"&&":2,"|":3,"^":4,"&":5,"==":6,"!=":6,"===":6,"!==":6,"<":7,">":7,"<=":7,">=":7,"<<":8,">>":8,">>>":8,"+":9,"-":9,"*":11,"/":11,"%":11},this.lookahead={type:2,value:"",lineNumber:this.scanner.lineNumber,lineStart:0,start:0,end:0},this.hasLineTerminator=!1,this.context={isModule:!1,await:!1,allowIn:!0,allowStrictDirective:!0,allowYield:!0,firstCoverInitializedNameError:null,isAssignmentTarget:!1,isBindingElement:!1,inFunctionBody:!1,inIteration:!1,inSwitch:!1,labelSet:{},strict:!1},this.tokens=[],this.startMarker={index:0,line:this.scanner.lineNumber,column:0},this.lastMarker={index:0,line:this.scanner.lineNumber,column:0},this.nextToken(),this.lastMarker={index:this.scanner.index,line:this.scanner.lineNumber,column:this.scanner.index-this.scanner.lineStart}}return e.prototype.throwError=function(e){var t=Array.prototype.slice.call(arguments,1),n=e.replace(/%(\d)/g,function(e,n){return i.assert(n<t.length,"Message reference must be in range"),t[n]}),r=this.lastMarker.index,a=this.lastMarker.line,o=this.lastMarker.column+1;throw this.errorHandler.createError(r,a,o,n)},e.prototype.tolerateError=function(e){var t=Array.prototype.slice.call(arguments,1),n=e.replace(/%(\d)/g,function(e,n){return i.assert(n<t.length,"Message reference must be in range"),t[n]}),r=this.lastMarker.index,a=this.scanner.lineNumber,o=this.lastMarker.column+1;this.errorHandler.tolerateError(r,a,o,n)},e.prototype.unexpectedTokenError=function(e,t){var n,i=t||a.Messages.UnexpectedToken;if(e?(t||(i=2===e.type?a.Messages.UnexpectedEOS:3===e.type?a.Messages.UnexpectedIdentifier:6===e.type?a.Messages.UnexpectedNumber:8===e.type?a.Messages.UnexpectedString:10===e.type?a.Messages.UnexpectedTemplate:a.Messages.UnexpectedToken,4===e.type&&(this.scanner.isFutureReservedWord(e.value)?i=a.Messages.UnexpectedReserved:this.context.strict&&this.scanner.isStrictModeReservedWord(e.value)&&(i=a.Messages.StrictReservedWord))),n=e.value):n="ILLEGAL",i=i.replace("%0",n),e&&"number"==typeof e.lineNumber){var r=e.start,o=e.lineNumber,s=this.lastMarker.index-this.lastMarker.column,u=e.start-s+1;return this.errorHandler.createError(r,o,u,i)}return r=this.lastMarker.index,o=this.lastMarker.line,u=this.lastMarker.column+1,this.errorHandler.createError(r,o,u,i)},e.prototype.throwUnexpectedToken=function(e,t){throw this.unexpectedTokenError(e,t)},e.prototype.tolerateUnexpectedToken=function(e,t){this.errorHandler.tolerate(this.unexpectedTokenError(e,t))},e.prototype.collectComments=function(){if(this.config.comment){var e=this.scanner.scanComments();if(e.length>0&&this.delegate)for(var t=0;t<e.length;++t){var n=e[t],i=void 0;i={type:n.multiLine?"BlockComment":"LineComment",value:this.scanner.source.slice(n.slice[0],n.slice[1])},this.config.range&&(i.range=n.range),this.config.loc&&(i.loc=n.loc);var r={start:{line:n.loc.start.line,column:n.loc.start.column,offset:n.range[0]},end:{line:n.loc.end.line,column:n.loc.end.column,offset:n.range[1]}};this.delegate(i,r)}}else this.scanner.scanComments()},e.prototype.getTokenRaw=function(e){return this.scanner.source.slice(e.start,e.end)},e.prototype.convertToken=function(e){var t={type:l.TokenName[e.type],value:this.getTokenRaw(e)};if(this.config.range&&(t.range=[e.start,e.end]),this.config.loc&&(t.loc={start:{line:this.startMarker.line,column:this.startMarker.column},end:{line:this.scanner.lineNumber,column:this.scanner.index-this.scanner.lineStart}}),9===e.type){var n=e.pattern,i=e.flags;t.regex={pattern:n,flags:i}}return t},e.prototype.nextToken=function(){var e=this.lookahead;this.lastMarker.index=this.scanner.index,this.lastMarker.line=this.scanner.lineNumber,this.lastMarker.column=this.scanner.index-this.scanner.lineStart,this.collectComments(),this.scanner.index!==this.startMarker.index&&(this.startMarker.index=this.scanner.index,this.startMarker.line=this.scanner.lineNumber,this.startMarker.column=this.scanner.index-this.scanner.lineStart);var t=this.scanner.lex();return this.hasLineTerminator=e.lineNumber!==t.lineNumber,t&&this.context.strict&&3===t.type&&this.scanner.isStrictModeReservedWord(t.value)&&(t.type=4),this.lookahead=t,this.config.tokens&&2!==t.type&&this.tokens.push(this.convertToken(t)),e},e.prototype.nextRegexToken=function(){this.collectComments();var e=this.scanner.scanRegExp();return this.config.tokens&&(this.tokens.pop(),this.tokens.push(this.convertToken(e))),this.lookahead=e,this.nextToken(),e},e.prototype.createNode=function(){return{index:this.startMarker.index,line:this.startMarker.line,column:this.startMarker.column}},e.prototype.startNode=function(e,t){void 0===t&&(t=0);var n=e.start-e.lineStart,i=e.lineNumber;return n<0&&(n+=t,i--),{index:e.start,line:i,column:n}},e.prototype.finalize=function(e,t){if(this.config.range&&(t.range=[e.index,this.lastMarker.index]),this.config.loc&&(t.loc={start:{line:e.line,column:e.column},end:{line:this.lastMarker.line,column:this.lastMarker.column}},this.config.source&&(t.loc.source=this.config.source)),this.delegate){var n={start:{line:e.line,column:e.column,offset:e.index},end:{line:this.lastMarker.line,column:this.lastMarker.column,offset:this.lastMarker.index}};this.delegate(t,n)}return t},e.prototype.expect=function(e){var t=this.nextToken();7===t.type&&t.value===e||this.throwUnexpectedToken(t)},e.prototype.expectCommaSeparator=function(){if(this.config.tolerant){var e=this.lookahead;7===e.type&&","===e.value?this.nextToken():7===e.type&&";"===e.value?(this.nextToken(),this.tolerateUnexpectedToken(e)):this.tolerateUnexpectedToken(e,a.Messages.UnexpectedToken)}else this.expect(",")},e.prototype.expectKeyword=function(e){var t=this.nextToken();4===t.type&&t.value===e||this.throwUnexpectedToken(t)},e.prototype.match=function(e){return 7===this.lookahead.type&&this.lookahead.value===e},e.prototype.matchKeyword=function(e){return 4===this.lookahead.type&&this.lookahead.value===e},e.prototype.matchContextualKeyword=function(e){return 3===this.lookahead.type&&this.lookahead.value===e},e.prototype.matchAssign=function(){if(7!==this.lookahead.type)return!1;var e=this.lookahead.value;return"="===e||"*="===e||"**="===e||"/="===e||"%="===e||"+="===e||"-="===e||"<<="===e||">>="===e||">>>="===e||"&="===e||"^="===e||"|="===e},e.prototype.isolateCoverGrammar=function(e){var t=this.context.isBindingElement,n=this.context.isAssignmentTarget,i=this.context.firstCoverInitializedNameError;this.context.isBindingElement=!0,this.context.isAssignmentTarget=!0,this.context.firstCoverInitializedNameError=null;var r=e.call(this);return null!==this.context.firstCoverInitializedNameError&&this.throwUnexpectedToken(this.context.firstCoverInitializedNameError),this.context.isBindingElement=t,this.context.isAssignmentTarget=n,this.context.firstCoverInitializedNameError=i,r},e.prototype.inheritCoverGrammar=function(e){var t=this.context.isBindingElement,n=this.context.isAssignmentTarget,i=this.context.firstCoverInitializedNameError;this.context.isBindingElement=!0,this.context.isAssignmentTarget=!0,this.context.firstCoverInitializedNameError=null;var r=e.call(this);return this.context.isBindingElement=this.context.isBindingElement&&t,this.context.isAssignmentTarget=this.context.isAssignmentTarget&&n,this.context.firstCoverInitializedNameError=i||this.context.firstCoverInitializedNameError,r},e.prototype.consumeSemicolon=function(){this.match(";")?this.nextToken():this.hasLineTerminator||(2===this.lookahead.type||this.match("}")||this.throwUnexpectedToken(this.lookahead),this.lastMarker.index=this.startMarker.index,this.lastMarker.line=this.startMarker.line,this.lastMarker.column=this.startMarker.column)},e.prototype.parsePrimaryExpression=function(){var e,t,n,i=this.createNode();switch(this.lookahead.type){case 3:(this.context.isModule||this.context.await)&&"await"===this.lookahead.value&&this.tolerateUnexpectedToken(this.lookahead),e=this.matchAsyncFunction()?this.parseFunctionExpression():this.finalize(i,new o.Identifier(this.nextToken().value));break;case 6:case 8:this.context.strict&&this.lookahead.octal&&this.tolerateUnexpectedToken(this.lookahead,a.Messages.StrictOctalLiteral),this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1,t=this.nextToken(),n=this.getTokenRaw(t),e=this.finalize(i,new o.Literal(t.value,n));break;case 1:this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1,t=this.nextToken(),n=this.getTokenRaw(t),e=this.finalize(i,new o.Literal("true"===t.value,n));break;case 5:this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1,t=this.nextToken(),n=this.getTokenRaw(t),e=this.finalize(i,new o.Literal(null,n));break;case 10:e=this.parseTemplateLiteral();break;case 7:switch(this.lookahead.value){case"(":this.context.isBindingElement=!1,e=this.inheritCoverGrammar(this.parseGroupExpression);break;case"[":e=this.inheritCoverGrammar(this.parseArrayInitializer);break;case"{":e=this.inheritCoverGrammar(this.parseObjectInitializer);break;case"/":case"/=":this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1,this.scanner.index=this.startMarker.index,t=this.nextRegexToken(),n=this.getTokenRaw(t),e=this.finalize(i,new o.RegexLiteral(t.regex,n,t.pattern,t.flags));break;default:e=this.throwUnexpectedToken(this.nextToken())}break;case 4:!this.context.strict&&this.context.allowYield&&this.matchKeyword("yield")?e=this.parseIdentifierName():!this.context.strict&&this.matchKeyword("let")?e=this.finalize(i,new o.Identifier(this.nextToken().value)):(this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1,this.matchKeyword("function")?e=this.parseFunctionExpression():this.matchKeyword("this")?(this.nextToken(),e=this.finalize(i,new o.ThisExpression)):e=this.matchKeyword("class")?this.parseClassExpression():this.throwUnexpectedToken(this.nextToken()));break;default:e=this.throwUnexpectedToken(this.nextToken())}return e},e.prototype.parseSpreadElement=function(){var e=this.createNode();this.expect("...");var t=this.inheritCoverGrammar(this.parseAssignmentExpression);return this.finalize(e,new o.SpreadElement(t))},e.prototype.parseArrayInitializer=function(){var e=this.createNode(),t=[];for(this.expect("[");!this.match("]");)if(this.match(","))this.nextToken(),t.push(null);else if(this.match("...")){var n=this.parseSpreadElement();this.match("]")||(this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1,this.expect(",")),t.push(n)}else t.push(this.inheritCoverGrammar(this.parseAssignmentExpression)),this.match("]")||this.expect(",");return this.expect("]"),this.finalize(e,new o.ArrayExpression(t))},e.prototype.parsePropertyMethod=function(e){this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1;var t=this.context.strict,n=this.context.allowStrictDirective;this.context.allowStrictDirective=e.simple;var i=this.isolateCoverGrammar(this.parseFunctionSourceElements);return this.context.strict&&e.firstRestricted&&this.tolerateUnexpectedToken(e.firstRestricted,e.message),this.context.strict&&e.stricted&&this.tolerateUnexpectedToken(e.stricted,e.message),this.context.strict=t,this.context.allowStrictDirective=n,i},e.prototype.parsePropertyMethodFunction=function(){var e=this.createNode(),t=this.context.allowYield;this.context.allowYield=!0;var n=this.parseFormalParameters(),i=this.parsePropertyMethod(n);return this.context.allowYield=t,this.finalize(e,new o.FunctionExpression(null,n.params,i,!1))},e.prototype.parsePropertyMethodAsyncFunction=function(){var e=this.createNode(),t=this.context.allowYield,n=this.context.await;this.context.allowYield=!1,this.context.await=!0;var i=this.parseFormalParameters(),r=this.parsePropertyMethod(i);return this.context.allowYield=t,this.context.await=n,this.finalize(e,new o.AsyncFunctionExpression(null,i.params,r))},e.prototype.parseObjectPropertyKey=function(){var e,t=this.createNode(),n=this.nextToken();switch(n.type){case 8:case 6:this.context.strict&&n.octal&&this.tolerateUnexpectedToken(n,a.Messages.StrictOctalLiteral);var i=this.getTokenRaw(n);e=this.finalize(t,new o.Literal(n.value,i));break;case 3:case 1:case 5:case 4:e=this.finalize(t,new o.Identifier(n.value));break;case 7:"["===n.value?(e=this.isolateCoverGrammar(this.parseAssignmentExpression),this.expect("]")):e=this.throwUnexpectedToken(n);break;default:e=this.throwUnexpectedToken(n)}return e},e.prototype.isPropertyKey=function(e,t){return e.type===u.Syntax.Identifier&&e.name===t||e.type===u.Syntax.Literal&&e.value===t},e.prototype.parseObjectProperty=function(e){var t,n=this.createNode(),i=this.lookahead,r=null,s=null,u=!1,l=!1,c=!1,h=!1;if(3===i.type){var d=i.value;this.nextToken(),u=this.match("["),r=(h=!(this.hasLineTerminator||"async"!==d||this.match(":")||this.match("(")||this.match("*")||this.match(",")))?this.parseObjectPropertyKey():this.finalize(n,new o.Identifier(d))}else this.match("*")?this.nextToken():(u=this.match("["),r=this.parseObjectPropertyKey());var p=this.qualifiedPropertyName(this.lookahead);if(3===i.type&&!h&&"get"===i.value&&p)t="get",u=this.match("["),r=this.parseObjectPropertyKey(),this.context.allowYield=!1,s=this.parseGetterMethod();else if(3===i.type&&!h&&"set"===i.value&&p)t="set",u=this.match("["),r=this.parseObjectPropertyKey(),s=this.parseSetterMethod();else if(7===i.type&&"*"===i.value&&p)t="init",u=this.match("["),r=this.parseObjectPropertyKey(),s=this.parseGeneratorMethod(),l=!0;else if(r||this.throwUnexpectedToken(this.lookahead),t="init",this.match(":")&&!h)!u&&this.isPropertyKey(r,"__proto__")&&(e.value&&this.tolerateError(a.Messages.DuplicateProtoProperty),e.value=!0),this.nextToken(),s=this.inheritCoverGrammar(this.parseAssignmentExpression);else if(this.match("("))s=h?this.parsePropertyMethodAsyncFunction():this.parsePropertyMethodFunction(),l=!0;else if(3===i.type)if(d=this.finalize(n,new o.Identifier(i.value)),this.match("=")){this.context.firstCoverInitializedNameError=this.lookahead,this.nextToken(),c=!0;var f=this.isolateCoverGrammar(this.parseAssignmentExpression);s=this.finalize(n,new o.AssignmentPattern(d,f))}else c=!0,s=d;else this.throwUnexpectedToken(this.nextToken());return this.finalize(n,new o.Property(t,r,u,s,l,c))},e.prototype.parseObjectInitializer=function(){var e=this.createNode();this.expect("{");for(var t=[],n={value:!1};!this.match("}");)t.push(this.parseObjectProperty(n)),this.match("}")||this.expectCommaSeparator();return this.expect("}"),this.finalize(e,new o.ObjectExpression(t))},e.prototype.parseTemplateHead=function(){i.assert(this.lookahead.head,"Template literal must start with a template head");var e=this.createNode(),t=this.nextToken(),n=t.value,r=t.cooked;return this.finalize(e,new o.TemplateElement({raw:n,cooked:r},t.tail))},e.prototype.parseTemplateElement=function(){10!==this.lookahead.type&&this.throwUnexpectedToken();var e=this.createNode(),t=this.nextToken(),n=t.value,i=t.cooked;return this.finalize(e,new o.TemplateElement({raw:n,cooked:i},t.tail))},e.prototype.parseTemplateLiteral=function(){var e=this.createNode(),t=[],n=[],i=this.parseTemplateHead();for(n.push(i);!i.tail;)t.push(this.parseExpression()),i=this.parseTemplateElement(),n.push(i);return this.finalize(e,new o.TemplateLiteral(n,t))},e.prototype.reinterpretExpressionAsPattern=function(e){switch(e.type){case u.Syntax.Identifier:case u.Syntax.MemberExpression:case u.Syntax.RestElement:case u.Syntax.AssignmentPattern:break;case u.Syntax.SpreadElement:e.type=u.Syntax.RestElement,this.reinterpretExpressionAsPattern(e.argument);break;case u.Syntax.ArrayExpression:e.type=u.Syntax.ArrayPattern;for(var t=0;t<e.elements.length;t++)null!==e.elements[t]&&this.reinterpretExpressionAsPattern(e.elements[t]);break;case u.Syntax.ObjectExpression:for(e.type=u.Syntax.ObjectPattern,t=0;t<e.properties.length;t++)this.reinterpretExpressionAsPattern(e.properties[t].value);break;case u.Syntax.AssignmentExpression:e.type=u.Syntax.AssignmentPattern,delete e.operator,this.reinterpretExpressionAsPattern(e.left)}},e.prototype.parseGroupExpression=function(){var e;if(this.expect("("),this.match(")"))this.nextToken(),this.match("=>")||this.expect("=>"),e={type:c,params:[],async:!1};else{var t=this.lookahead,n=[];if(this.match("..."))e=this.parseRestElement(n),this.expect(")"),this.match("=>")||this.expect("=>"),e={type:c,params:[e],async:!1};else{var i=!1;if(this.context.isBindingElement=!0,e=this.inheritCoverGrammar(this.parseAssignmentExpression),this.match(",")){var r=[];for(this.context.isAssignmentTarget=!1,r.push(e);2!==this.lookahead.type&&this.match(",");){if(this.nextToken(),this.match(")")){this.nextToken();for(var a=0;a<r.length;a++)this.reinterpretExpressionAsPattern(r[a]);i=!0,e={type:c,params:r,async:!1}}else if(this.match("...")){for(this.context.isBindingElement||this.throwUnexpectedToken(this.lookahead),r.push(this.parseRestElement(n)),this.expect(")"),this.match("=>")||this.expect("=>"),this.context.isBindingElement=!1,a=0;a<r.length;a++)this.reinterpretExpressionAsPattern(r[a]);i=!0,e={type:c,params:r,async:!1}}else r.push(this.inheritCoverGrammar(this.parseAssignmentExpression));if(i)break}i||(e=this.finalize(this.startNode(t),new o.SequenceExpression(r)))}if(!i){if(this.expect(")"),this.match("=>")&&(e.type===u.Syntax.Identifier&&"yield"===e.name&&(i=!0,e={type:c,params:[e],async:!1}),!i)){if(this.context.isBindingElement||this.throwUnexpectedToken(this.lookahead),e.type===u.Syntax.SequenceExpression)for(a=0;a<e.expressions.length;a++)this.reinterpretExpressionAsPattern(e.expressions[a]);else this.reinterpretExpressionAsPattern(e);var s=e.type===u.Syntax.SequenceExpression?e.expressions:[e];e={type:c,params:s,async:!1}}this.context.isBindingElement=!1}}}return e},e.prototype.parseArguments=function(){this.expect("(");var e=[];if(!this.match(")"))for(;;){var t=this.match("...")?this.parseSpreadElement():this.isolateCoverGrammar(this.parseAssignmentExpression);if(e.push(t),this.match(")"))break;if(this.expectCommaSeparator(),this.match(")"))break}return this.expect(")"),e},e.prototype.isIdentifierName=function(e){return 3===e.type||4===e.type||1===e.type||5===e.type},e.prototype.parseIdentifierName=function(){var e=this.createNode(),t=this.nextToken();return this.isIdentifierName(t)||this.throwUnexpectedToken(t),this.finalize(e,new o.Identifier(t.value))},e.prototype.parseNewExpression=function(){var e,t=this.createNode(),n=this.parseIdentifierName();if(i.assert("new"===n.name,"New expression must start with `new`"),this.match("."))if(this.nextToken(),3===this.lookahead.type&&this.context.inFunctionBody&&"target"===this.lookahead.value){var r=this.parseIdentifierName();e=new o.MetaProperty(n,r)}else this.throwUnexpectedToken(this.lookahead);else{var a=this.isolateCoverGrammar(this.parseLeftHandSideExpression),s=this.match("(")?this.parseArguments():[];e=new o.NewExpression(a,s),this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1}return this.finalize(t,e)},e.prototype.parseAsyncArgument=function(){var e=this.parseAssignmentExpression();return this.context.firstCoverInitializedNameError=null,e},e.prototype.parseAsyncArguments=function(){this.expect("(");var e=[];if(!this.match(")"))for(;;){var t=this.match("...")?this.parseSpreadElement():this.isolateCoverGrammar(this.parseAsyncArgument);if(e.push(t),this.match(")"))break;if(this.expectCommaSeparator(),this.match(")"))break}return this.expect(")"),e},e.prototype.parseLeftHandSideExpressionAllowCall=function(){var e,t=this.lookahead,n=this.matchContextualKeyword("async"),i=this.context.allowIn;for(this.context.allowIn=!0,this.matchKeyword("super")&&this.context.inFunctionBody?(e=this.createNode(),this.nextToken(),e=this.finalize(e,new o.Super),this.match("(")||this.match(".")||this.match("[")||this.throwUnexpectedToken(this.lookahead)):e=this.inheritCoverGrammar(this.matchKeyword("new")?this.parseNewExpression:this.parsePrimaryExpression);;)if(this.match(".")){this.context.isBindingElement=!1,this.context.isAssignmentTarget=!0,this.expect(".");var r=this.parseIdentifierName();e=this.finalize(this.startNode(t),new o.StaticMemberExpression(e,r))}else if(this.match("(")){var a=n&&t.lineNumber===this.lookahead.lineNumber;this.context.isBindingElement=!1,this.context.isAssignmentTarget=!1;var s=a?this.parseAsyncArguments():this.parseArguments();if(e=this.finalize(this.startNode(t),new o.CallExpression(e,s)),a&&this.match("=>")){for(var u=0;u<s.length;++u)this.reinterpretExpressionAsPattern(s[u]);e={type:c,params:s,async:!0}}}else if(this.match("["))this.context.isBindingElement=!1,this.context.isAssignmentTarget=!0,this.expect("["),r=this.isolateCoverGrammar(this.parseExpression),this.expect("]"),e=this.finalize(this.startNode(t),new o.ComputedMemberExpression(e,r));else{if(10!==this.lookahead.type||!this.lookahead.head)break;var l=this.parseTemplateLiteral();e=this.finalize(this.startNode(t),new o.TaggedTemplateExpression(e,l))}return this.context.allowIn=i,e},e.prototype.parseSuper=function(){var e=this.createNode();return this.expectKeyword("super"),this.match("[")||this.match(".")||this.throwUnexpectedToken(this.lookahead),this.finalize(e,new o.Super)},e.prototype.parseLeftHandSideExpression=function(){i.assert(this.context.allowIn,"callee of new expression always allow in keyword.");for(var e=this.startNode(this.lookahead),t=this.matchKeyword("super")&&this.context.inFunctionBody?this.parseSuper():this.inheritCoverGrammar(this.matchKeyword("new")?this.parseNewExpression:this.parsePrimaryExpression);;)if(this.match("[")){this.context.isBindingElement=!1,this.context.isAssignmentTarget=!0,this.expect("[");var n=this.isolateCoverGrammar(this.parseExpression);this.expect("]"),t=this.finalize(e,new o.ComputedMemberExpression(t,n))}else if(this.match("."))this.context.isBindingElement=!1,this.context.isAssignmentTarget=!0,this.expect("."),n=this.parseIdentifierName(),t=this.finalize(e,new o.StaticMemberExpression(t,n));else{if(10!==this.lookahead.type||!this.lookahead.head)break;var r=this.parseTemplateLiteral();t=this.finalize(e,new o.TaggedTemplateExpression(t,r))}return t},e.prototype.parseUpdateExpression=function(){var e,t=this.lookahead;if(this.match("++")||this.match("--")){var n=this.startNode(t),i=this.nextToken();e=this.inheritCoverGrammar(this.parseUnaryExpression),this.context.strict&&e.type===u.Syntax.Identifier&&this.scanner.isRestrictedWord(e.name)&&this.tolerateError(a.Messages.StrictLHSPrefix),this.context.isAssignmentTarget||this.tolerateError(a.Messages.InvalidLHSInAssignment);var r=!0;e=this.finalize(n,new o.UpdateExpression(i.value,e,r)),this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1}else if(e=this.inheritCoverGrammar(this.parseLeftHandSideExpressionAllowCall),!this.hasLineTerminator&&7===this.lookahead.type&&(this.match("++")||this.match("--"))){this.context.strict&&e.type===u.Syntax.Identifier&&this.scanner.isRestrictedWord(e.name)&&this.tolerateError(a.Messages.StrictLHSPostfix),this.context.isAssignmentTarget||this.tolerateError(a.Messages.InvalidLHSInAssignment),this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1;var s=this.nextToken().value;r=!1,e=this.finalize(this.startNode(t),new o.UpdateExpression(s,e,r))}return e},e.prototype.parseAwaitExpression=function(){var e=this.createNode();this.nextToken();var t=this.parseUnaryExpression();return this.finalize(e,new o.AwaitExpression(t))},e.prototype.parseUnaryExpression=function(){var e;if(this.match("+")||this.match("-")||this.match("~")||this.match("!")||this.matchKeyword("delete")||this.matchKeyword("void")||this.matchKeyword("typeof")){var t=this.startNode(this.lookahead),n=this.nextToken();e=this.inheritCoverGrammar(this.parseUnaryExpression),e=this.finalize(t,new o.UnaryExpression(n.value,e)),this.context.strict&&"delete"===e.operator&&e.argument.type===u.Syntax.Identifier&&this.tolerateError(a.Messages.StrictDelete),this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1}else e=this.context.await&&this.matchContextualKeyword("await")?this.parseAwaitExpression():this.parseUpdateExpression();return e},e.prototype.parseExponentiationExpression=function(){var e=this.lookahead,t=this.inheritCoverGrammar(this.parseUnaryExpression);if(t.type!==u.Syntax.UnaryExpression&&this.match("**")){this.nextToken(),this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1;var n=t,i=this.isolateCoverGrammar(this.parseExponentiationExpression);t=this.finalize(this.startNode(e),new o.BinaryExpression("**",n,i))}return t},e.prototype.binaryPrecedence=function(e){var t=e.value;return 7===e.type?this.operatorPrecedence[t]||0:4===e.type&&("instanceof"===t||this.context.allowIn&&"in"===t)?7:0},e.prototype.parseBinaryExpression=function(){var e=this.lookahead,t=this.inheritCoverGrammar(this.parseExponentiationExpression),n=this.lookahead,i=this.binaryPrecedence(n);if(i>0){this.nextToken(),this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1;for(var r=[e,this.lookahead],a=t,s=this.isolateCoverGrammar(this.parseExponentiationExpression),u=[a,n.value,s],l=[i];!((i=this.binaryPrecedence(this.lookahead))<=0);){for(;u.length>2&&i<=l[l.length-1];){s=u.pop();var c=u.pop();l.pop(),a=u.pop(),r.pop();var h=this.startNode(r[r.length-1]);u.push(this.finalize(h,new o.BinaryExpression(c,a,s)))}u.push(this.nextToken().value),l.push(i),r.push(this.lookahead),u.push(this.isolateCoverGrammar(this.parseExponentiationExpression))}var d=u.length-1;t=u[d];for(var p=r.pop();d>1;){var f=r.pop(),m=p&&p.lineStart;h=this.startNode(f,m),c=u[d-1],t=this.finalize(h,new o.BinaryExpression(c,u[d-2],t)),d-=2,p=f}}return t},e.prototype.parseConditionalExpression=function(){var e=this.lookahead,t=this.inheritCoverGrammar(this.parseBinaryExpression);if(this.match("?")){this.nextToken();var n=this.context.allowIn;this.context.allowIn=!0;var i=this.isolateCoverGrammar(this.parseAssignmentExpression);this.context.allowIn=n,this.expect(":");var r=this.isolateCoverGrammar(this.parseAssignmentExpression);t=this.finalize(this.startNode(e),new o.ConditionalExpression(t,i,r)),this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1}return t},e.prototype.checkPatternParam=function(e,t){switch(t.type){case u.Syntax.Identifier:this.validateParam(e,t,t.name);break;case u.Syntax.RestElement:this.checkPatternParam(e,t.argument);break;case u.Syntax.AssignmentPattern:this.checkPatternParam(e,t.left);break;case u.Syntax.ArrayPattern:for(var n=0;n<t.elements.length;n++)null!==t.elements[n]&&this.checkPatternParam(e,t.elements[n]);break;case u.Syntax.ObjectPattern:for(n=0;n<t.properties.length;n++)this.checkPatternParam(e,t.properties[n].value)}e.simple=e.simple&&t instanceof o.Identifier},e.prototype.reinterpretAsCoverFormalsList=function(e){var t,n=[e],i=!1;switch(e.type){case u.Syntax.Identifier:break;case c:n=e.params,i=e.async;break;default:return null}t={simple:!0,paramSet:{}};for(var r=0;r<n.length;++r)(o=n[r]).type===u.Syntax.AssignmentPattern?o.right.type===u.Syntax.YieldExpression&&(o.right.argument&&this.throwUnexpectedToken(this.lookahead),o.right.type=u.Syntax.Identifier,o.right.name="yield",delete o.right.argument,delete o.right.delegate):i&&o.type===u.Syntax.Identifier&&"await"===o.name&&this.throwUnexpectedToken(this.lookahead),this.checkPatternParam(t,o),n[r]=o;if(this.context.strict||!this.context.allowYield)for(r=0;r<n.length;++r){var o;(o=n[r]).type===u.Syntax.YieldExpression&&this.throwUnexpectedToken(this.lookahead)}if(t.message===a.Messages.StrictParamDupe){var s=this.context.strict?t.stricted:t.firstRestricted;this.throwUnexpectedToken(s,t.message)}return{simple:t.simple,params:n,stricted:t.stricted,firstRestricted:t.firstRestricted,message:t.message}},e.prototype.parseAssignmentExpression=function(){var e;if(!this.context.allowYield&&this.matchKeyword("yield"))e=this.parseYieldExpression();else{var t=this.lookahead,n=t;if(e=this.parseConditionalExpression(),3===n.type&&n.lineNumber===this.lookahead.lineNumber&&"async"===n.value&&(3===this.lookahead.type||this.matchKeyword("yield"))){var i=this.parsePrimaryExpression();this.reinterpretExpressionAsPattern(i),e={type:c,params:[i],async:!0}}if(e.type===c||this.match("=>")){this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1;var r=e.async,s=this.reinterpretAsCoverFormalsList(e);if(s){this.hasLineTerminator&&this.tolerateUnexpectedToken(this.lookahead),this.context.firstCoverInitializedNameError=null;var l=this.context.strict,h=this.context.allowStrictDirective;this.context.allowStrictDirective=s.simple;var d=this.context.allowYield,p=this.context.await;this.context.allowYield=!0,this.context.await=r;var f=this.startNode(t);this.expect("=>");var m=void 0;if(this.match("{")){var g=this.context.allowIn;this.context.allowIn=!0,m=this.parseFunctionSourceElements(),this.context.allowIn=g}else m=this.isolateCoverGrammar(this.parseAssignmentExpression);var v=m.type!==u.Syntax.BlockStatement;this.context.strict&&s.firstRestricted&&this.throwUnexpectedToken(s.firstRestricted,s.message),this.context.strict&&s.stricted&&this.tolerateUnexpectedToken(s.stricted,s.message),e=r?this.finalize(f,new o.AsyncArrowFunctionExpression(s.params,m,v)):this.finalize(f,new o.ArrowFunctionExpression(s.params,m,v)),this.context.strict=l,this.context.allowStrictDirective=h,this.context.allowYield=d,this.context.await=p}}else if(this.matchAssign()){if(this.context.isAssignmentTarget||this.tolerateError(a.Messages.InvalidLHSInAssignment),this.context.strict&&e.type===u.Syntax.Identifier){var y=e;this.scanner.isRestrictedWord(y.name)&&this.tolerateUnexpectedToken(n,a.Messages.StrictLHSAssignment),this.scanner.isStrictModeReservedWord(y.name)&&this.tolerateUnexpectedToken(n,a.Messages.StrictReservedWord)}this.match("=")?this.reinterpretExpressionAsPattern(e):(this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1);var b=(n=this.nextToken()).value,x=this.isolateCoverGrammar(this.parseAssignmentExpression);e=this.finalize(this.startNode(t),new o.AssignmentExpression(b,e,x)),this.context.firstCoverInitializedNameError=null}}return e},e.prototype.parseExpression=function(){var e=this.lookahead,t=this.isolateCoverGrammar(this.parseAssignmentExpression);if(this.match(",")){var n=[];for(n.push(t);2!==this.lookahead.type&&this.match(",");)this.nextToken(),n.push(this.isolateCoverGrammar(this.parseAssignmentExpression));t=this.finalize(this.startNode(e),new o.SequenceExpression(n))}return t},e.prototype.parseStatementListItem=function(){var e;if(this.context.isAssignmentTarget=!0,this.context.isBindingElement=!0,4===this.lookahead.type)switch(this.lookahead.value){case"export":this.context.isModule||this.tolerateUnexpectedToken(this.lookahead,a.Messages.IllegalExportDeclaration),e=this.parseExportDeclaration();break;case"import":this.context.isModule||this.tolerateUnexpectedToken(this.lookahead,a.Messages.IllegalImportDeclaration),e=this.parseImportDeclaration();break;case"const":e=this.parseLexicalDeclaration({inFor:!1});break;case"function":e=this.parseFunctionDeclaration();break;case"class":e=this.parseClassDeclaration();break;case"let":e=this.isLexicalDeclaration()?this.parseLexicalDeclaration({inFor:!1}):this.parseStatement();break;default:e=this.parseStatement()}else e=this.parseStatement();return e},e.prototype.parseBlock=function(){var e=this.createNode();this.expect("{");for(var t=[];!this.match("}");)t.push(this.parseStatementListItem());return this.expect("}"),this.finalize(e,new o.BlockStatement(t))},e.prototype.parseLexicalBinding=function(e,t){var n=this.createNode(),i=this.parsePattern([],e);this.context.strict&&i.type===u.Syntax.Identifier&&this.scanner.isRestrictedWord(i.name)&&this.tolerateError(a.Messages.StrictVarName);var r=null;return"const"===e?this.matchKeyword("in")||this.matchContextualKeyword("of")||(this.match("=")?(this.nextToken(),r=this.isolateCoverGrammar(this.parseAssignmentExpression)):this.throwError(a.Messages.DeclarationMissingInitializer,"const")):(!t.inFor&&i.type!==u.Syntax.Identifier||this.match("="))&&(this.expect("="),r=this.isolateCoverGrammar(this.parseAssignmentExpression)),this.finalize(n,new o.VariableDeclarator(i,r))},e.prototype.parseBindingList=function(e,t){for(var n=[this.parseLexicalBinding(e,t)];this.match(",");)this.nextToken(),n.push(this.parseLexicalBinding(e,t));return n},e.prototype.isLexicalDeclaration=function(){var e=this.scanner.saveState();this.scanner.scanComments();var t=this.scanner.lex();return this.scanner.restoreState(e),3===t.type||7===t.type&&"["===t.value||7===t.type&&"{"===t.value||4===t.type&&"let"===t.value||4===t.type&&"yield"===t.value},e.prototype.parseLexicalDeclaration=function(e){var t=this.createNode(),n=this.nextToken().value;i.assert("let"===n||"const"===n,"Lexical declaration must be either let or const");var r=this.parseBindingList(n,e);return this.consumeSemicolon(),this.finalize(t,new o.VariableDeclaration(r,n))},e.prototype.parseBindingRestElement=function(e,t){var n=this.createNode();this.expect("...");var i=this.parsePattern(e,t);return this.finalize(n,new o.RestElement(i))},e.prototype.parseArrayPattern=function(e,t){var n=this.createNode();this.expect("[");for(var i=[];!this.match("]");)if(this.match(","))this.nextToken(),i.push(null);else{if(this.match("...")){i.push(this.parseBindingRestElement(e,t));break}i.push(this.parsePatternWithDefault(e,t)),this.match("]")||this.expect(",")}return this.expect("]"),this.finalize(n,new o.ArrayPattern(i))},e.prototype.parsePropertyPattern=function(e,t){var n,i,r=this.createNode(),a=!1,s=!1;if(3===this.lookahead.type){var u=this.lookahead;n=this.parseVariableIdentifier();var l=this.finalize(r,new o.Identifier(u.value));if(this.match("=")){e.push(u),s=!0,this.nextToken();var c=this.parseAssignmentExpression();i=this.finalize(this.startNode(u),new o.AssignmentPattern(l,c))}else this.match(":")?(this.expect(":"),i=this.parsePatternWithDefault(e,t)):(e.push(u),s=!0,i=l)}else a=this.match("["),n=this.parseObjectPropertyKey(),this.expect(":"),i=this.parsePatternWithDefault(e,t);return this.finalize(r,new o.Property("init",n,a,i,!1,s))},e.prototype.parseObjectPattern=function(e,t){var n=this.createNode(),i=[];for(this.expect("{");!this.match("}");)i.push(this.parsePropertyPattern(e,t)),this.match("}")||this.expect(",");return this.expect("}"),this.finalize(n,new o.ObjectPattern(i))},e.prototype.parsePattern=function(e,t){var n;return this.match("[")?n=this.parseArrayPattern(e,t):this.match("{")?n=this.parseObjectPattern(e,t):(!this.matchKeyword("let")||"const"!==t&&"let"!==t||this.tolerateUnexpectedToken(this.lookahead,a.Messages.LetInLexicalBinding),e.push(this.lookahead),n=this.parseVariableIdentifier(t)),n},e.prototype.parsePatternWithDefault=function(e,t){var n=this.lookahead,i=this.parsePattern(e,t);if(this.match("=")){this.nextToken();var r=this.context.allowYield;this.context.allowYield=!0;var a=this.isolateCoverGrammar(this.parseAssignmentExpression);this.context.allowYield=r,i=this.finalize(this.startNode(n),new o.AssignmentPattern(i,a))}return i},e.prototype.parseVariableIdentifier=function(e){var t=this.createNode(),n=this.nextToken();return 4===n.type&&"yield"===n.value?this.context.strict?this.tolerateUnexpectedToken(n,a.Messages.StrictReservedWord):this.context.allowYield||this.throwUnexpectedToken(n):3!==n.type?this.context.strict&&4===n.type&&this.scanner.isStrictModeReservedWord(n.value)?this.tolerateUnexpectedToken(n,a.Messages.StrictReservedWord):(this.context.strict||"let"!==n.value||"var"!==e)&&this.throwUnexpectedToken(n):(this.context.isModule||this.context.await)&&3===n.type&&"await"===n.value&&this.tolerateUnexpectedToken(n),this.finalize(t,new o.Identifier(n.value))},e.prototype.parseVariableDeclaration=function(e){var t=this.createNode(),n=this.parsePattern([],"var");this.context.strict&&n.type===u.Syntax.Identifier&&this.scanner.isRestrictedWord(n.name)&&this.tolerateError(a.Messages.StrictVarName);var i=null;return this.match("=")?(this.nextToken(),i=this.isolateCoverGrammar(this.parseAssignmentExpression)):n.type===u.Syntax.Identifier||e.inFor||this.expect("="),this.finalize(t,new o.VariableDeclarator(n,i))},e.prototype.parseVariableDeclarationList=function(e){var t={inFor:e.inFor},n=[];for(n.push(this.parseVariableDeclaration(t));this.match(",");)this.nextToken(),n.push(this.parseVariableDeclaration(t));return n},e.prototype.parseVariableStatement=function(){var e=this.createNode();this.expectKeyword("var");var t=this.parseVariableDeclarationList({inFor:!1});return this.consumeSemicolon(),this.finalize(e,new o.VariableDeclaration(t,"var"))},e.prototype.parseEmptyStatement=function(){var e=this.createNode();return this.expect(";"),this.finalize(e,new o.EmptyStatement)},e.prototype.parseExpressionStatement=function(){var e=this.createNode(),t=this.parseExpression();return this.consumeSemicolon(),this.finalize(e,new o.ExpressionStatement(t))},e.prototype.parseIfClause=function(){return this.context.strict&&this.matchKeyword("function")&&this.tolerateError(a.Messages.StrictFunction),this.parseStatement()},e.prototype.parseIfStatement=function(){var e,t=this.createNode(),n=null;this.expectKeyword("if"),this.expect("(");var i=this.parseExpression();return!this.match(")")&&this.config.tolerant?(this.tolerateUnexpectedToken(this.nextToken()),e=this.finalize(this.createNode(),new o.EmptyStatement)):(this.expect(")"),e=this.parseIfClause(),this.matchKeyword("else")&&(this.nextToken(),n=this.parseIfClause())),this.finalize(t,new o.IfStatement(i,e,n))},e.prototype.parseDoWhileStatement=function(){var e=this.createNode();this.expectKeyword("do");var t=this.context.inIteration;this.context.inIteration=!0;var n=this.parseStatement();this.context.inIteration=t,this.expectKeyword("while"),this.expect("(");var i=this.parseExpression();return!this.match(")")&&this.config.tolerant?this.tolerateUnexpectedToken(this.nextToken()):(this.expect(")"),this.match(";")&&this.nextToken()),this.finalize(e,new o.DoWhileStatement(n,i))},e.prototype.parseWhileStatement=function(){var e,t=this.createNode();this.expectKeyword("while"),this.expect("(");var n=this.parseExpression();if(!this.match(")")&&this.config.tolerant)this.tolerateUnexpectedToken(this.nextToken()),e=this.finalize(this.createNode(),new o.EmptyStatement);else{this.expect(")");var i=this.context.inIteration;this.context.inIteration=!0,e=this.parseStatement(),this.context.inIteration=i}return this.finalize(t,new o.WhileStatement(n,e))},e.prototype.parseForStatement=function(){var e,t,n,i=null,r=null,s=null,l=!0,c=this.createNode();if(this.expectKeyword("for"),this.expect("("),this.match(";"))this.nextToken();else if(this.matchKeyword("var")){i=this.createNode(),this.nextToken();var h=this.context.allowIn;this.context.allowIn=!1;var d=this.parseVariableDeclarationList({inFor:!0});if(this.context.allowIn=h,1===d.length&&this.matchKeyword("in")){var p=d[0];p.init&&(p.id.type===u.Syntax.ArrayPattern||p.id.type===u.Syntax.ObjectPattern||this.context.strict)&&this.tolerateError(a.Messages.ForInOfLoopInitializer,"for-in"),i=this.finalize(i,new o.VariableDeclaration(d,"var")),this.nextToken(),e=i,t=this.parseExpression(),i=null}else 1===d.length&&null===d[0].init&&this.matchContextualKeyword("of")?(i=this.finalize(i,new o.VariableDeclaration(d,"var")),this.nextToken(),e=i,t=this.parseAssignmentExpression(),i=null,l=!1):(i=this.finalize(i,new o.VariableDeclaration(d,"var")),this.expect(";"))}else if(this.matchKeyword("const")||this.matchKeyword("let")){i=this.createNode();var f=this.nextToken().value;this.context.strict||"in"!==this.lookahead.value?(h=this.context.allowIn,this.context.allowIn=!1,d=this.parseBindingList(f,{inFor:!0}),this.context.allowIn=h,1===d.length&&null===d[0].init&&this.matchKeyword("in")?(i=this.finalize(i,new o.VariableDeclaration(d,f)),this.nextToken(),e=i,t=this.parseExpression(),i=null):1===d.length&&null===d[0].init&&this.matchContextualKeyword("of")?(i=this.finalize(i,new o.VariableDeclaration(d,f)),this.nextToken(),e=i,t=this.parseAssignmentExpression(),i=null,l=!1):(this.consumeSemicolon(),i=this.finalize(i,new o.VariableDeclaration(d,f)))):(i=this.finalize(i,new o.Identifier(f)),this.nextToken(),e=i,t=this.parseExpression(),i=null)}else{var m=this.lookahead;if(h=this.context.allowIn,this.context.allowIn=!1,i=this.inheritCoverGrammar(this.parseAssignmentExpression),this.context.allowIn=h,this.matchKeyword("in"))this.context.isAssignmentTarget&&i.type!==u.Syntax.AssignmentExpression||this.tolerateError(a.Messages.InvalidLHSInForIn),this.nextToken(),this.reinterpretExpressionAsPattern(i),e=i,t=this.parseExpression(),i=null;else if(this.matchContextualKeyword("of"))this.context.isAssignmentTarget&&i.type!==u.Syntax.AssignmentExpression||this.tolerateError(a.Messages.InvalidLHSInForLoop),this.nextToken(),this.reinterpretExpressionAsPattern(i),e=i,t=this.parseAssignmentExpression(),i=null,l=!1;else{if(this.match(",")){for(var g=[i];this.match(",");)this.nextToken(),g.push(this.isolateCoverGrammar(this.parseAssignmentExpression));i=this.finalize(this.startNode(m),new o.SequenceExpression(g))}this.expect(";")}}if(void 0===e&&(this.match(";")||(r=this.parseExpression()),this.expect(";"),this.match(")")||(s=this.parseExpression())),!this.match(")")&&this.config.tolerant)this.tolerateUnexpectedToken(this.nextToken()),n=this.finalize(this.createNode(),new o.EmptyStatement);else{this.expect(")");var v=this.context.inIteration;this.context.inIteration=!0,n=this.isolateCoverGrammar(this.parseStatement),this.context.inIteration=v}return void 0===e?this.finalize(c,new o.ForStatement(i,r,s,n)):l?this.finalize(c,new o.ForInStatement(e,t,n)):this.finalize(c,new o.ForOfStatement(e,t,n))},e.prototype.parseContinueStatement=function(){var e=this.createNode();this.expectKeyword("continue");var t=null;if(3===this.lookahead.type&&!this.hasLineTerminator){var n=this.parseVariableIdentifier();t=n;var i="$"+n.name;Object.prototype.hasOwnProperty.call(this.context.labelSet,i)||this.throwError(a.Messages.UnknownLabel,n.name)}return this.consumeSemicolon(),null!==t||this.context.inIteration||this.throwError(a.Messages.IllegalContinue),this.finalize(e,new o.ContinueStatement(t))},e.prototype.parseBreakStatement=function(){var e=this.createNode();this.expectKeyword("break");var t=null;if(3===this.lookahead.type&&!this.hasLineTerminator){var n=this.parseVariableIdentifier(),i="$"+n.name;Object.prototype.hasOwnProperty.call(this.context.labelSet,i)||this.throwError(a.Messages.UnknownLabel,n.name),t=n}return this.consumeSemicolon(),null!==t||this.context.inIteration||this.context.inSwitch||this.throwError(a.Messages.IllegalBreak),this.finalize(e,new o.BreakStatement(t))},e.prototype.parseReturnStatement=function(){this.context.inFunctionBody||this.tolerateError(a.Messages.IllegalReturn);var e=this.createNode();this.expectKeyword("return");var t=(this.match(";")||this.match("}")||this.hasLineTerminator||2===this.lookahead.type)&&8!==this.lookahead.type&&10!==this.lookahead.type?null:this.parseExpression();return this.consumeSemicolon(),this.finalize(e,new o.ReturnStatement(t))},e.prototype.parseWithStatement=function(){this.context.strict&&this.tolerateError(a.Messages.StrictModeWith);var e,t=this.createNode();this.expectKeyword("with"),this.expect("(");var n=this.parseExpression();return!this.match(")")&&this.config.tolerant?(this.tolerateUnexpectedToken(this.nextToken()),e=this.finalize(this.createNode(),new o.EmptyStatement)):(this.expect(")"),e=this.parseStatement()),this.finalize(t,new o.WithStatement(n,e))},e.prototype.parseSwitchCase=function(){var e,t=this.createNode();this.matchKeyword("default")?(this.nextToken(),e=null):(this.expectKeyword("case"),e=this.parseExpression()),this.expect(":");for(var n=[];!(this.match("}")||this.matchKeyword("default")||this.matchKeyword("case"));)n.push(this.parseStatementListItem());return this.finalize(t,new o.SwitchCase(e,n))},e.prototype.parseSwitchStatement=function(){var e=this.createNode();this.expectKeyword("switch"),this.expect("(");var t=this.parseExpression();this.expect(")");var n=this.context.inSwitch;this.context.inSwitch=!0;var i=[],r=!1;for(this.expect("{");!this.match("}");){var s=this.parseSwitchCase();null===s.test&&(r&&this.throwError(a.Messages.MultipleDefaultsInSwitch),r=!0),i.push(s)}return this.expect("}"),this.context.inSwitch=n,this.finalize(e,new o.SwitchStatement(t,i))},e.prototype.parseLabelledStatement=function(){var e,t=this.createNode(),n=this.parseExpression();if(n.type===u.Syntax.Identifier&&this.match(":")){this.nextToken();var i=n,r="$"+i.name;Object.prototype.hasOwnProperty.call(this.context.labelSet,r)&&this.throwError(a.Messages.Redeclaration,"Label",i.name),this.context.labelSet[r]=!0;var s=void 0;if(this.matchKeyword("class"))this.tolerateUnexpectedToken(this.lookahead),s=this.parseClassDeclaration();else if(this.matchKeyword("function")){var l=this.lookahead,c=this.parseFunctionDeclaration();this.context.strict?this.tolerateUnexpectedToken(l,a.Messages.StrictFunction):c.generator&&this.tolerateUnexpectedToken(l,a.Messages.GeneratorInLegacyContext),s=c}else s=this.parseStatement();delete this.context.labelSet[r],e=new o.LabeledStatement(i,s)}else this.consumeSemicolon(),e=new o.ExpressionStatement(n);return this.finalize(t,e)},e.prototype.parseThrowStatement=function(){var e=this.createNode();this.expectKeyword("throw"),this.hasLineTerminator&&this.throwError(a.Messages.NewlineAfterThrow);var t=this.parseExpression();return this.consumeSemicolon(),this.finalize(e,new o.ThrowStatement(t))},e.prototype.parseCatchClause=function(){var e=this.createNode();this.expectKeyword("catch"),this.expect("("),this.match(")")&&this.throwUnexpectedToken(this.lookahead);for(var t=[],n=this.parsePattern(t),i={},r=0;r<t.length;r++){var s="$"+t[r].value;Object.prototype.hasOwnProperty.call(i,s)&&this.tolerateError(a.Messages.DuplicateBinding,t[r].value),i[s]=!0}this.context.strict&&n.type===u.Syntax.Identifier&&this.scanner.isRestrictedWord(n.name)&&this.tolerateError(a.Messages.StrictCatchVariable),this.expect(")");var l=this.parseBlock();return this.finalize(e,new o.CatchClause(n,l))},e.prototype.parseFinallyClause=function(){return this.expectKeyword("finally"),this.parseBlock()},e.prototype.parseTryStatement=function(){var e=this.createNode();this.expectKeyword("try");var t=this.parseBlock(),n=this.matchKeyword("catch")?this.parseCatchClause():null,i=this.matchKeyword("finally")?this.parseFinallyClause():null;return n||i||this.throwError(a.Messages.NoCatchOrFinally),this.finalize(e,new o.TryStatement(t,n,i))},e.prototype.parseDebuggerStatement=function(){var e=this.createNode();return this.expectKeyword("debugger"),this.consumeSemicolon(),this.finalize(e,new o.DebuggerStatement)},e.prototype.parseStatement=function(){var e;switch(this.lookahead.type){case 1:case 5:case 6:case 8:case 10:case 9:e=this.parseExpressionStatement();break;case 7:var t=this.lookahead.value;e="{"===t?this.parseBlock():"("===t?this.parseExpressionStatement():";"===t?this.parseEmptyStatement():this.parseExpressionStatement();break;case 3:e=this.matchAsyncFunction()?this.parseFunctionDeclaration():this.parseLabelledStatement();break;case 4:switch(this.lookahead.value){case"break":e=this.parseBreakStatement();break;case"continue":e=this.parseContinueStatement();break;case"debugger":e=this.parseDebuggerStatement();break;case"do":e=this.parseDoWhileStatement();break;case"for":e=this.parseForStatement();break;case"function":e=this.parseFunctionDeclaration();break;case"if":e=this.parseIfStatement();break;case"return":e=this.parseReturnStatement();break;case"switch":e=this.parseSwitchStatement();break;case"throw":e=this.parseThrowStatement();break;case"try":e=this.parseTryStatement();break;case"var":e=this.parseVariableStatement();break;case"while":e=this.parseWhileStatement();break;case"with":e=this.parseWithStatement();break;default:e=this.parseExpressionStatement()}break;default:e=this.throwUnexpectedToken(this.lookahead)}return e},e.prototype.parseFunctionSourceElements=function(){var e=this.createNode();this.expect("{");var t=this.parseDirectivePrologues(),n=this.context.labelSet,i=this.context.inIteration,r=this.context.inSwitch,a=this.context.inFunctionBody;for(this.context.labelSet={},this.context.inIteration=!1,this.context.inSwitch=!1,this.context.inFunctionBody=!0;2!==this.lookahead.type&&!this.match("}");)t.push(this.parseStatementListItem());return this.expect("}"),this.context.labelSet=n,this.context.inIteration=i,this.context.inSwitch=r,this.context.inFunctionBody=a,this.finalize(e,new o.BlockStatement(t))},e.prototype.validateParam=function(e,t,n){var i="$"+n;this.context.strict?(this.scanner.isRestrictedWord(n)&&(e.stricted=t,e.message=a.Messages.StrictParamName),Object.prototype.hasOwnProperty.call(e.paramSet,i)&&(e.stricted=t,e.message=a.Messages.StrictParamDupe)):e.firstRestricted||(this.scanner.isRestrictedWord(n)?(e.firstRestricted=t,e.message=a.Messages.StrictParamName):this.scanner.isStrictModeReservedWord(n)?(e.firstRestricted=t,e.message=a.Messages.StrictReservedWord):Object.prototype.hasOwnProperty.call(e.paramSet,i)&&(e.stricted=t,e.message=a.Messages.StrictParamDupe)),"function"==typeof Object.defineProperty?Object.defineProperty(e.paramSet,i,{value:!0,enumerable:!0,writable:!0,configurable:!0}):e.paramSet[i]=!0},e.prototype.parseRestElement=function(e){var t=this.createNode();this.expect("...");var n=this.parsePattern(e);return this.match("=")&&this.throwError(a.Messages.DefaultRestParameter),this.match(")")||this.throwError(a.Messages.ParameterAfterRestParameter),this.finalize(t,new o.RestElement(n))},e.prototype.parseFormalParameter=function(e){for(var t=[],n=this.match("...")?this.parseRestElement(t):this.parsePatternWithDefault(t),i=0;i<t.length;i++)this.validateParam(e,t[i],t[i].value);e.simple=e.simple&&n instanceof o.Identifier,e.params.push(n)},e.prototype.parseFormalParameters=function(e){var t;if(t={simple:!0,params:[],firstRestricted:e},this.expect("("),!this.match(")"))for(t.paramSet={};2!==this.lookahead.type&&(this.parseFormalParameter(t),!this.match(")"))&&(this.expect(","),!this.match(")")););return this.expect(")"),{simple:t.simple,params:t.params,stricted:t.stricted,firstRestricted:t.firstRestricted,message:t.message}},e.prototype.matchAsyncFunction=function(){var e=this.matchContextualKeyword("async");if(e){var t=this.scanner.saveState();this.scanner.scanComments();var n=this.scanner.lex();this.scanner.restoreState(t),e=t.lineNumber===n.lineNumber&&4===n.type&&"function"===n.value}return e},e.prototype.parseFunctionDeclaration=function(e){var t=this.createNode(),n=this.matchContextualKeyword("async");n&&this.nextToken(),this.expectKeyword("function");var i,r=!n&&this.match("*");r&&this.nextToken();var s=null,u=null;if(!e||!this.match("(")){var l=this.lookahead;s=this.parseVariableIdentifier(),this.context.strict?this.scanner.isRestrictedWord(l.value)&&this.tolerateUnexpectedToken(l,a.Messages.StrictFunctionName):this.scanner.isRestrictedWord(l.value)?(u=l,i=a.Messages.StrictFunctionName):this.scanner.isStrictModeReservedWord(l.value)&&(u=l,i=a.Messages.StrictReservedWord)}var c=this.context.await,h=this.context.allowYield;this.context.await=n,this.context.allowYield=!r;var d=this.parseFormalParameters(u),p=d.params,f=d.stricted;u=d.firstRestricted,d.message&&(i=d.message);var m=this.context.strict,g=this.context.allowStrictDirective;this.context.allowStrictDirective=d.simple;var v=this.parseFunctionSourceElements();return this.context.strict&&u&&this.throwUnexpectedToken(u,i),this.context.strict&&f&&this.tolerateUnexpectedToken(f,i),this.context.strict=m,this.context.allowStrictDirective=g,this.context.await=c,this.context.allowYield=h,n?this.finalize(t,new o.AsyncFunctionDeclaration(s,p,v)):this.finalize(t,new o.FunctionDeclaration(s,p,v,r))},e.prototype.parseFunctionExpression=function(){var e=this.createNode(),t=this.matchContextualKeyword("async");t&&this.nextToken(),this.expectKeyword("function");var n,i=!t&&this.match("*");i&&this.nextToken();var r,s=null,u=this.context.await,l=this.context.allowYield;if(this.context.await=t,this.context.allowYield=!i,!this.match("(")){var c=this.lookahead;s=this.context.strict||i||!this.matchKeyword("yield")?this.parseVariableIdentifier():this.parseIdentifierName(),this.context.strict?this.scanner.isRestrictedWord(c.value)&&this.tolerateUnexpectedToken(c,a.Messages.StrictFunctionName):this.scanner.isRestrictedWord(c.value)?(r=c,n=a.Messages.StrictFunctionName):this.scanner.isStrictModeReservedWord(c.value)&&(r=c,n=a.Messages.StrictReservedWord)}var h=this.parseFormalParameters(r),d=h.params,p=h.stricted;r=h.firstRestricted,h.message&&(n=h.message);var f=this.context.strict,m=this.context.allowStrictDirective;this.context.allowStrictDirective=h.simple;var g=this.parseFunctionSourceElements();return this.context.strict&&r&&this.throwUnexpectedToken(r,n),this.context.strict&&p&&this.tolerateUnexpectedToken(p,n),this.context.strict=f,this.context.allowStrictDirective=m,this.context.await=u,this.context.allowYield=l,t?this.finalize(e,new o.AsyncFunctionExpression(s,d,g)):this.finalize(e,new o.FunctionExpression(s,d,g,i))},e.prototype.parseDirective=function(){var e=this.lookahead,t=this.createNode(),n=this.parseExpression(),i=n.type===u.Syntax.Literal?this.getTokenRaw(e).slice(1,-1):null;return this.consumeSemicolon(),this.finalize(t,i?new o.Directive(n,i):new o.ExpressionStatement(n))},e.prototype.parseDirectivePrologues=function(){for(var e=null,t=[];;){var n=this.lookahead;if(8!==n.type)break;var i=this.parseDirective();t.push(i);var r=i.directive;if("string"!=typeof r)break;"use strict"===r?(this.context.strict=!0,e&&this.tolerateUnexpectedToken(e,a.Messages.StrictOctalLiteral),this.context.allowStrictDirective||this.tolerateUnexpectedToken(n,a.Messages.IllegalLanguageModeDirective)):!e&&n.octal&&(e=n)}return t},e.prototype.qualifiedPropertyName=function(e){switch(e.type){case 3:case 8:case 1:case 5:case 6:case 4:return!0;case 7:return"["===e.value}return!1},e.prototype.parseGetterMethod=function(){var e=this.createNode(),t=!1,n=this.context.allowYield;this.context.allowYield=!0;var i=this.parseFormalParameters();i.params.length>0&&this.tolerateError(a.Messages.BadGetterArity);var r=this.parsePropertyMethod(i);return this.context.allowYield=n,this.finalize(e,new o.FunctionExpression(null,i.params,r,t))},e.prototype.parseSetterMethod=function(){var e=this.createNode(),t=!1,n=this.context.allowYield;this.context.allowYield=!0;var i=this.parseFormalParameters();1!==i.params.length?this.tolerateError(a.Messages.BadSetterArity):i.params[0]instanceof o.RestElement&&this.tolerateError(a.Messages.BadSetterRestParameter);var r=this.parsePropertyMethod(i);return this.context.allowYield=n,this.finalize(e,new o.FunctionExpression(null,i.params,r,t))},e.prototype.parseGeneratorMethod=function(){var e=this.createNode(),t=this.context.allowYield;this.context.allowYield=!0;var n=this.parseFormalParameters();this.context.allowYield=!1;var i=this.parsePropertyMethod(n);return this.context.allowYield=t,this.finalize(e,new o.FunctionExpression(null,n.params,i,!0))},e.prototype.isStartOfExpression=function(){var e=!0,t=this.lookahead.value;switch(this.lookahead.type){case 7:e="["===t||"("===t||"{"===t||"+"===t||"-"===t||"!"===t||"~"===t||"++"===t||"--"===t||"/"===t||"/="===t;break;case 4:e="class"===t||"delete"===t||"function"===t||"let"===t||"new"===t||"super"===t||"this"===t||"typeof"===t||"void"===t||"yield"===t}return e},e.prototype.parseYieldExpression=function(){var e=this.createNode();this.expectKeyword("yield");var t=null,n=!1;if(!this.hasLineTerminator){var i=this.context.allowYield;this.context.allowYield=!1,(n=this.match("*"))?(this.nextToken(),t=this.parseAssignmentExpression()):this.isStartOfExpression()&&(t=this.parseAssignmentExpression()),this.context.allowYield=i}return this.finalize(e,new o.YieldExpression(t,n))},e.prototype.parseClassElement=function(e){var t=this.lookahead,n=this.createNode(),i="",r=null,s=null,u=!1,l=!1,c=!1,h=!1;if(this.match("*"))this.nextToken();else if(u=this.match("["),"static"===(r=this.parseObjectPropertyKey()).name&&(this.qualifiedPropertyName(this.lookahead)||this.match("*"))&&(t=this.lookahead,c=!0,u=this.match("["),this.match("*")?this.nextToken():r=this.parseObjectPropertyKey()),3===t.type&&!this.hasLineTerminator&&"async"===t.value){var d=this.lookahead.value;":"!==d&&"("!==d&&"*"!==d&&(h=!0,t=this.lookahead,r=this.parseObjectPropertyKey(),3===t.type&&"constructor"===t.value&&this.tolerateUnexpectedToken(t,a.Messages.ConstructorIsAsync))}var p=this.qualifiedPropertyName(this.lookahead);return 3===t.type?"get"===t.value&&p?(i="get",u=this.match("["),r=this.parseObjectPropertyKey(),this.context.allowYield=!1,s=this.parseGetterMethod()):"set"===t.value&&p&&(i="set",u=this.match("["),r=this.parseObjectPropertyKey(),s=this.parseSetterMethod()):7===t.type&&"*"===t.value&&p&&(i="init",u=this.match("["),r=this.parseObjectPropertyKey(),s=this.parseGeneratorMethod(),l=!0),!i&&r&&this.match("(")&&(i="init",s=h?this.parsePropertyMethodAsyncFunction():this.parsePropertyMethodFunction(),l=!0),i||this.throwUnexpectedToken(this.lookahead),"init"===i&&(i="method"),u||(c&&this.isPropertyKey(r,"prototype")&&this.throwUnexpectedToken(t,a.Messages.StaticPrototype),!c&&this.isPropertyKey(r,"constructor")&&(("method"!==i||!l||s&&s.generator)&&this.throwUnexpectedToken(t,a.Messages.ConstructorSpecialMethod),e.value?this.throwUnexpectedToken(t,a.Messages.DuplicateConstructor):e.value=!0,i="constructor")),this.finalize(n,new o.MethodDefinition(r,u,s,i,c))},e.prototype.parseClassElementList=function(){var e=[],t={value:!1};for(this.expect("{");!this.match("}");)this.match(";")?this.nextToken():e.push(this.parseClassElement(t));return this.expect("}"),e},e.prototype.parseClassBody=function(){var e=this.createNode(),t=this.parseClassElementList();return this.finalize(e,new o.ClassBody(t))},e.prototype.parseClassDeclaration=function(e){var t=this.createNode(),n=this.context.strict;this.context.strict=!0,this.expectKeyword("class");var i=e&&3!==this.lookahead.type?null:this.parseVariableIdentifier(),r=null;this.matchKeyword("extends")&&(this.nextToken(),r=this.isolateCoverGrammar(this.parseLeftHandSideExpressionAllowCall));var a=this.parseClassBody();return this.context.strict=n,this.finalize(t,new o.ClassDeclaration(i,r,a))},e.prototype.parseClassExpression=function(){var e=this.createNode(),t=this.context.strict;this.context.strict=!0,this.expectKeyword("class");var n=3===this.lookahead.type?this.parseVariableIdentifier():null,i=null;this.matchKeyword("extends")&&(this.nextToken(),i=this.isolateCoverGrammar(this.parseLeftHandSideExpressionAllowCall));var r=this.parseClassBody();return this.context.strict=t,this.finalize(e,new o.ClassExpression(n,i,r))},e.prototype.parseModule=function(){this.context.strict=!0,this.context.isModule=!0,this.scanner.isModule=!0;for(var e=this.createNode(),t=this.parseDirectivePrologues();2!==this.lookahead.type;)t.push(this.parseStatementListItem());return this.finalize(e,new o.Module(t))},e.prototype.parseScript=function(){for(var e=this.createNode(),t=this.parseDirectivePrologues();2!==this.lookahead.type;)t.push(this.parseStatementListItem());return this.finalize(e,new o.Script(t))},e.prototype.parseModuleSpecifier=function(){var e=this.createNode();8!==this.lookahead.type&&this.throwError(a.Messages.InvalidModuleSpecifier);var t=this.nextToken(),n=this.getTokenRaw(t);return this.finalize(e,new o.Literal(t.value,n))},e.prototype.parseImportSpecifier=function(){var e,t,n=this.createNode();return 3===this.lookahead.type?(t=e=this.parseVariableIdentifier(),this.matchContextualKeyword("as")&&(this.nextToken(),t=this.parseVariableIdentifier())):(t=e=this.parseIdentifierName(),this.matchContextualKeyword("as")?(this.nextToken(),t=this.parseVariableIdentifier()):this.throwUnexpectedToken(this.nextToken())),this.finalize(n,new o.ImportSpecifier(t,e))},e.prototype.parseNamedImports=function(){this.expect("{");for(var e=[];!this.match("}");)e.push(this.parseImportSpecifier()),this.match("}")||this.expect(",");return this.expect("}"),e},e.prototype.parseImportDefaultSpecifier=function(){var e=this.createNode(),t=this.parseIdentifierName();return this.finalize(e,new o.ImportDefaultSpecifier(t))},e.prototype.parseImportNamespaceSpecifier=function(){var e=this.createNode();this.expect("*"),this.matchContextualKeyword("as")||this.throwError(a.Messages.NoAsAfterImportNamespace),this.nextToken();var t=this.parseIdentifierName();return this.finalize(e,new o.ImportNamespaceSpecifier(t))},e.prototype.parseImportDeclaration=function(){this.context.inFunctionBody&&this.throwError(a.Messages.IllegalImportDeclaration);var e,t=this.createNode();this.expectKeyword("import");var n=[];if(8===this.lookahead.type)e=this.parseModuleSpecifier();else{if(this.match("{")?n=n.concat(this.parseNamedImports()):this.match("*")?n.push(this.parseImportNamespaceSpecifier()):this.isIdentifierName(this.lookahead)&&!this.matchKeyword("default")?(n.push(this.parseImportDefaultSpecifier()),this.match(",")&&(this.nextToken(),this.match("*")?n.push(this.parseImportNamespaceSpecifier()):this.match("{")?n=n.concat(this.parseNamedImports()):this.throwUnexpectedToken(this.lookahead))):this.throwUnexpectedToken(this.nextToken()),!this.matchContextualKeyword("from")){var i=this.lookahead.value?a.Messages.UnexpectedToken:a.Messages.MissingFromClause;this.throwError(i,this.lookahead.value)}this.nextToken(),e=this.parseModuleSpecifier()}return this.consumeSemicolon(),this.finalize(t,new o.ImportDeclaration(n,e))},e.prototype.parseExportSpecifier=function(){var e=this.createNode(),t=this.parseIdentifierName(),n=t;return this.matchContextualKeyword("as")&&(this.nextToken(),n=this.parseIdentifierName()),this.finalize(e,new o.ExportSpecifier(t,n))},e.prototype.parseExportDeclaration=function(){this.context.inFunctionBody&&this.throwError(a.Messages.IllegalExportDeclaration);var e,t=this.createNode();if(this.expectKeyword("export"),this.matchKeyword("default"))if(this.nextToken(),this.matchKeyword("function")){var n=this.parseFunctionDeclaration(!0);e=this.finalize(t,new o.ExportDefaultDeclaration(n))}else this.matchKeyword("class")?(n=this.parseClassDeclaration(!0),e=this.finalize(t,new o.ExportDefaultDeclaration(n))):this.matchContextualKeyword("async")?(n=this.matchAsyncFunction()?this.parseFunctionDeclaration(!0):this.parseAssignmentExpression(),e=this.finalize(t,new o.ExportDefaultDeclaration(n))):(this.matchContextualKeyword("from")&&this.throwError(a.Messages.UnexpectedToken,this.lookahead.value),n=this.match("{")?this.parseObjectInitializer():this.match("[")?this.parseArrayInitializer():this.parseAssignmentExpression(),this.consumeSemicolon(),e=this.finalize(t,new o.ExportDefaultDeclaration(n)));else if(this.match("*")){if(this.nextToken(),!this.matchContextualKeyword("from")){var i=this.lookahead.value?a.Messages.UnexpectedToken:a.Messages.MissingFromClause;this.throwError(i,this.lookahead.value)}this.nextToken();var r=this.parseModuleSpecifier();this.consumeSemicolon(),e=this.finalize(t,new o.ExportAllDeclaration(r))}else if(4===this.lookahead.type){switch(n=void 0,this.lookahead.value){case"let":case"const":n=this.parseLexicalDeclaration({inFor:!1});break;case"var":case"class":case"function":n=this.parseStatementListItem();break;default:this.throwUnexpectedToken(this.lookahead)}e=this.finalize(t,new o.ExportNamedDeclaration(n,[],null))}else if(this.matchAsyncFunction())n=this.parseFunctionDeclaration(),e=this.finalize(t,new o.ExportNamedDeclaration(n,[],null));else{var s=[],u=null,l=!1;for(this.expect("{");!this.match("}");)l=l||this.matchKeyword("default"),s.push(this.parseExportSpecifier()),this.match("}")||this.expect(",");this.expect("}"),this.matchContextualKeyword("from")?(this.nextToken(),u=this.parseModuleSpecifier(),this.consumeSemicolon()):l?(i=this.lookahead.value?a.Messages.UnexpectedToken:a.Messages.MissingFromClause,this.throwError(i,this.lookahead.value)):this.consumeSemicolon(),e=this.finalize(t,new o.ExportNamedDeclaration(null,s,u))}return e},e}();t.Parser=h},function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.assert=function(e,t){if(!e)throw new Error("ASSERT: "+t)}},function(e,t){Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(){this.errors=[],this.tolerant=!1}return e.prototype.recordError=function(e){this.errors.push(e)},e.prototype.tolerate=function(e){if(!this.tolerant)throw e;this.recordError(e)},e.prototype.constructError=function(e,t){var n=new Error(e);try{throw n}catch(e){Object.create&&Object.defineProperty&&(n=Object.create(e),Object.defineProperty(n,"column",{value:t}))}return n},e.prototype.createError=function(e,t,n,i){var r="Line "+t+": "+i,a=this.constructError(r,n);return a.index=e,a.lineNumber=t,a.description=i,a},e.prototype.throwError=function(e,t,n,i){throw this.createError(e,t,n,i)},e.prototype.tolerateError=function(e,t,n,i){var r=this.createError(e,t,n,i);if(!this.tolerant)throw r;this.recordError(r)},e}();t.ErrorHandler=n},function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.Messages={BadGetterArity:"Getter must not have any formal parameters",BadSetterArity:"Setter must have exactly one formal parameter",BadSetterRestParameter:"Setter function argument must not be a rest parameter",ConstructorIsAsync:"Class constructor may not be an async method",ConstructorSpecialMethod:"Class constructor may not be an accessor",DeclarationMissingInitializer:"Missing initializer in %0 declaration",DefaultRestParameter:"Unexpected token =",DuplicateBinding:"Duplicate binding %0",DuplicateConstructor:"A class may only have one constructor",DuplicateProtoProperty:"Duplicate __proto__ fields are not allowed in object literals",ForInOfLoopInitializer:"%0 loop variable declaration may not have an initializer",GeneratorInLegacyContext:"Generator declarations are not allowed in legacy contexts",IllegalBreak:"Illegal break statement",IllegalContinue:"Illegal continue statement",IllegalExportDeclaration:"Unexpected token",IllegalImportDeclaration:"Unexpected token",IllegalLanguageModeDirective:"Illegal 'use strict' directive in function with non-simple parameter list",IllegalReturn:"Illegal return statement",InvalidEscapedReservedWord:"Keyword must not contain escaped characters",InvalidHexEscapeSequence:"Invalid hexadecimal escape sequence",InvalidLHSInAssignment:"Invalid left-hand side in assignment",InvalidLHSInForIn:"Invalid left-hand side in for-in",InvalidLHSInForLoop:"Invalid left-hand side in for-loop",InvalidModuleSpecifier:"Unexpected token",InvalidRegExp:"Invalid regular expression",LetInLexicalBinding:"let is disallowed as a lexically bound name",MissingFromClause:"Unexpected token",MultipleDefaultsInSwitch:"More than one default clause in switch statement",NewlineAfterThrow:"Illegal newline after throw",NoAsAfterImportNamespace:"Unexpected token",NoCatchOrFinally:"Missing catch or finally after try",ParameterAfterRestParameter:"Rest parameter must be last formal parameter",Redeclaration:"%0 '%1' has already been declared",StaticPrototype:"Classes may not have static property named prototype",StrictCatchVariable:"Catch variable may not be eval or arguments in strict mode",StrictDelete:"Delete of an unqualified identifier in strict mode.",StrictFunction:"In strict mode code, functions can only be declared at top level or inside a block",StrictFunctionName:"Function name may not be eval or arguments in strict mode",StrictLHSAssignment:"Assignment to eval or arguments is not allowed in strict mode",StrictLHSPostfix:"Postfix increment/decrement may not have eval or arguments operand in strict mode",StrictLHSPrefix:"Prefix increment/decrement may not have eval or arguments operand in strict mode",StrictModeWith:"Strict mode code may not include a with statement",StrictOctalLiteral:"Octal literals are not allowed in strict mode.",StrictParamDupe:"Strict mode function may not have duplicate parameter names",StrictParamName:"Parameter name eval or arguments is not allowed in strict mode",StrictReservedWord:"Use of future reserved word in strict mode",StrictVarName:"Variable name may not be eval or arguments in strict mode",TemplateOctalLiteral:"Octal literals are not allowed in template strings.",UnexpectedEOS:"Unexpected end of input",UnexpectedIdentifier:"Unexpected identifier",UnexpectedNumber:"Unexpected number",UnexpectedReserved:"Unexpected reserved word",UnexpectedString:"Unexpected string",UnexpectedTemplate:"Unexpected quasi %0",UnexpectedToken:"Unexpected token %0",UnexpectedTokenIllegal:"Unexpected token ILLEGAL",UnknownLabel:"Undefined label '%0'",UnterminatedRegExp:"Invalid regular expression: missing /"}},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var i=n(9),r=n(4),a=n(11);function o(e){return"0123456789abcdef".indexOf(e.toLowerCase())}function s(e){return"01234567".indexOf(e)}var u=function(){function e(e,t){this.source=e,this.errorHandler=t,this.trackComment=!1,this.isModule=!1,this.length=e.length,this.index=0,this.lineNumber=e.length>0?1:0,this.lineStart=0,this.curlyStack=[]}return e.prototype.saveState=function(){return{index:this.index,lineNumber:this.lineNumber,lineStart:this.lineStart}},e.prototype.restoreState=function(e){this.index=e.index,this.lineNumber=e.lineNumber,this.lineStart=e.lineStart},e.prototype.eof=function(){return this.index>=this.length},e.prototype.throwUnexpectedToken=function(e){return void 0===e&&(e=a.Messages.UnexpectedTokenIllegal),this.errorHandler.throwError(this.index,this.lineNumber,this.index-this.lineStart+1,e)},e.prototype.tolerateUnexpectedToken=function(e){void 0===e&&(e=a.Messages.UnexpectedTokenIllegal),this.errorHandler.tolerateError(this.index,this.lineNumber,this.index-this.lineStart+1,e)},e.prototype.skipSingleLineComment=function(e){var t,n,i=[];for(this.trackComment&&(i=[],t=this.index-e,n={start:{line:this.lineNumber,column:this.index-this.lineStart-e},end:{}});!this.eof();){var a=this.source.charCodeAt(this.index);if(++this.index,r.Character.isLineTerminator(a)){if(this.trackComment){n.end={line:this.lineNumber,column:this.index-this.lineStart-1};var o={multiLine:!1,slice:[t+e,this.index-1],range:[t,this.index-1],loc:n};i.push(o)}return 13===a&&10===this.source.charCodeAt(this.index)&&++this.index,++this.lineNumber,this.lineStart=this.index,i}}return this.trackComment&&(n.end={line:this.lineNumber,column:this.index-this.lineStart},o={multiLine:!1,slice:[t+e,this.index],range:[t,this.index],loc:n},i.push(o)),i},e.prototype.skipMultiLineComment=function(){var e,t,n=[];for(this.trackComment&&(n=[],e=this.index-2,t={start:{line:this.lineNumber,column:this.index-this.lineStart-2},end:{}});!this.eof();){var i=this.source.charCodeAt(this.index);if(r.Character.isLineTerminator(i))13===i&&10===this.source.charCodeAt(this.index+1)&&++this.index,++this.lineNumber,++this.index,this.lineStart=this.index;else if(42===i){if(47===this.source.charCodeAt(this.index+1)){if(this.index+=2,this.trackComment){t.end={line:this.lineNumber,column:this.index-this.lineStart};var a={multiLine:!0,slice:[e+2,this.index-2],range:[e,this.index],loc:t};n.push(a)}return n}++this.index}else++this.index}return this.trackComment&&(t.end={line:this.lineNumber,column:this.index-this.lineStart},a={multiLine:!0,slice:[e+2,this.index],range:[e,this.index],loc:t},n.push(a)),this.tolerateUnexpectedToken(),n},e.prototype.scanComments=function(){var e;this.trackComment&&(e=[]);for(var t=0===this.index;!this.eof();){var n=this.source.charCodeAt(this.index);if(r.Character.isWhiteSpace(n))++this.index;else if(r.Character.isLineTerminator(n))++this.index,13===n&&10===this.source.charCodeAt(this.index)&&++this.index,++this.lineNumber,this.lineStart=this.index,t=!0;else if(47===n)if(47===(n=this.source.charCodeAt(this.index+1))){this.index+=2;var i=this.skipSingleLineComment(2);this.trackComment&&(e=e.concat(i)),t=!0}else{if(42!==n)break;this.index+=2,i=this.skipMultiLineComment(),this.trackComment&&(e=e.concat(i))}else if(t&&45===n){if(45!==this.source.charCodeAt(this.index+1)||62!==this.source.charCodeAt(this.index+2))break;this.index+=3,i=this.skipSingleLineComment(3),this.trackComment&&(e=e.concat(i))}else{if(60!==n||this.isModule)break;if("!--"!==this.source.slice(this.index+1,this.index+4))break;this.index+=4,i=this.skipSingleLineComment(4),this.trackComment&&(e=e.concat(i))}}return e},e.prototype.isFutureReservedWord=function(e){switch(e){case"enum":case"export":case"import":case"super":return!0;default:return!1}},e.prototype.isStrictModeReservedWord=function(e){switch(e){case"implements":case"interface":case"package":case"private":case"protected":case"public":case"static":case"yield":case"let":return!0;default:return!1}},e.prototype.isRestrictedWord=function(e){return"eval"===e||"arguments"===e},e.prototype.isKeyword=function(e){switch(e.length){case 2:return"if"===e||"in"===e||"do"===e;case 3:return"var"===e||"for"===e||"new"===e||"try"===e||"let"===e;case 4:return"this"===e||"else"===e||"case"===e||"void"===e||"with"===e||"enum"===e;case 5:return"while"===e||"break"===e||"catch"===e||"throw"===e||"const"===e||"yield"===e||"class"===e||"super"===e;case 6:return"return"===e||"typeof"===e||"delete"===e||"switch"===e||"export"===e||"import"===e;case 7:return"default"===e||"finally"===e||"extends"===e;case 8:return"function"===e||"continue"===e||"debugger"===e;case 10:return"instanceof"===e;default:return!1}},e.prototype.codePointAt=function(e){var t=this.source.charCodeAt(e);if(t>=55296&&t<=56319){var n=this.source.charCodeAt(e+1);n>=56320&&n<=57343&&(t=1024*(t-55296)+n-56320+65536)}return t},e.prototype.scanHexEscape=function(e){for(var t="u"===e?4:2,n=0,i=0;i<t;++i){if(this.eof()||!r.Character.isHexDigit(this.source.charCodeAt(this.index)))return null;n=16*n+o(this.source[this.index++])}return String.fromCharCode(n)},e.prototype.scanUnicodeCodePointEscape=function(){var e=this.source[this.index],t=0;for("}"===e&&this.throwUnexpectedToken();!this.eof()&&(e=this.source[this.index++],r.Character.isHexDigit(e.charCodeAt(0)));)t=16*t+o(e);return(t>1114111||"}"!==e)&&this.throwUnexpectedToken(),r.Character.fromCodePoint(t)},e.prototype.getIdentifier=function(){for(var e=this.index++;!this.eof();){var t=this.source.charCodeAt(this.index);if(92===t)return this.index=e,this.getComplexIdentifier();if(t>=55296&&t<57343)return this.index=e,this.getComplexIdentifier();if(!r.Character.isIdentifierPart(t))break;++this.index}return this.source.slice(e,this.index)},e.prototype.getComplexIdentifier=function(){var e,t=this.codePointAt(this.index),n=r.Character.fromCodePoint(t);for(this.index+=n.length,92===t&&(117!==this.source.charCodeAt(this.index)&&this.throwUnexpectedToken(),++this.index,"{"===this.source[this.index]?(++this.index,e=this.scanUnicodeCodePointEscape()):null!==(e=this.scanHexEscape("u"))&&"\\"!==e&&r.Character.isIdentifierStart(e.charCodeAt(0))||this.throwUnexpectedToken(),n=e);!this.eof()&&(t=this.codePointAt(this.index),r.Character.isIdentifierPart(t));)n+=e=r.Character.fromCodePoint(t),this.index+=e.length,92===t&&(n=n.substr(0,n.length-1),117!==this.source.charCodeAt(this.index)&&this.throwUnexpectedToken(),++this.index,"{"===this.source[this.index]?(++this.index,e=this.scanUnicodeCodePointEscape()):null!==(e=this.scanHexEscape("u"))&&"\\"!==e&&r.Character.isIdentifierPart(e.charCodeAt(0))||this.throwUnexpectedToken(),n+=e);return n},e.prototype.octalToDecimal=function(e){var t="0"!==e,n=s(e);return!this.eof()&&r.Character.isOctalDigit(this.source.charCodeAt(this.index))&&(t=!0,n=8*n+s(this.source[this.index++]),"0123".indexOf(e)>=0&&!this.eof()&&r.Character.isOctalDigit(this.source.charCodeAt(this.index))&&(n=8*n+s(this.source[this.index++]))),{code:n,octal:t}},e.prototype.scanIdentifier=function(){var e,t=this.index,n=92===this.source.charCodeAt(t)?this.getComplexIdentifier():this.getIdentifier();if(3!=(e=1===n.length?3:this.isKeyword(n)?4:"null"===n?5:"true"===n||"false"===n?1:3)&&t+n.length!==this.index){var i=this.index;this.index=t,this.tolerateUnexpectedToken(a.Messages.InvalidEscapedReservedWord),this.index=i}return{type:e,value:n,lineNumber:this.lineNumber,lineStart:this.lineStart,start:t,end:this.index}},e.prototype.scanPunctuator=function(){var e=this.index,t=this.source[this.index];switch(t){case"(":case"{":"{"===t&&this.curlyStack.push("{"),++this.index;break;case".":++this.index,"."===this.source[this.index]&&"."===this.source[this.index+1]&&(this.index+=2,t="...");break;case"}":++this.index,this.curlyStack.pop();break;case")":case";":case",":case"[":case"]":case":":case"?":case"~":++this.index;break;default:">>>="===(t=this.source.substr(this.index,4))?this.index+=4:"==="===(t=t.substr(0,3))||"!=="===t||">>>"===t||"<<="===t||">>="===t||"**="===t?this.index+=3:"&&"===(t=t.substr(0,2))||"||"===t||"=="===t||"!="===t||"+="===t||"-="===t||"*="===t||"/="===t||"++"===t||"--"===t||"<<"===t||">>"===t||"&="===t||"|="===t||"^="===t||"%="===t||"<="===t||">="===t||"=>"===t||"**"===t?this.index+=2:(t=this.source[this.index],"<>=!+-*%&|^/".indexOf(t)>=0&&++this.index)}return this.index===e&&this.throwUnexpectedToken(),{type:7,value:t,lineNumber:this.lineNumber,lineStart:this.lineStart,start:e,end:this.index}},e.prototype.scanHexLiteral=function(e){for(var t="";!this.eof()&&r.Character.isHexDigit(this.source.charCodeAt(this.index));)t+=this.source[this.index++];return 0===t.length&&this.throwUnexpectedToken(),r.Character.isIdentifierStart(this.source.charCodeAt(this.index))&&this.throwUnexpectedToken(),{type:6,value:parseInt("0x"+t,16),lineNumber:this.lineNumber,lineStart:this.lineStart,start:e,end:this.index}},e.prototype.scanBinaryLiteral=function(e){for(var t,n="";!this.eof()&&("0"===(t=this.source[this.index])||"1"===t);)n+=this.source[this.index++];return 0===n.length&&this.throwUnexpectedToken(),this.eof()||(t=this.source.charCodeAt(this.index),(r.Character.isIdentifierStart(t)||r.Character.isDecimalDigit(t))&&this.throwUnexpectedToken()),{type:6,value:parseInt(n,2),lineNumber:this.lineNumber,lineStart:this.lineStart,start:e,end:this.index}},e.prototype.scanOctalLiteral=function(e,t){var n="",i=!1;for(r.Character.isOctalDigit(e.charCodeAt(0))?(i=!0,n="0"+this.source[this.index++]):++this.index;!this.eof()&&r.Character.isOctalDigit(this.source.charCodeAt(this.index));)n+=this.source[this.index++];return i||0!==n.length||this.throwUnexpectedToken(),(r.Character.isIdentifierStart(this.source.charCodeAt(this.index))||r.Character.isDecimalDigit(this.source.charCodeAt(this.index)))&&this.throwUnexpectedToken(),{type:6,value:parseInt(n,8),octal:i,lineNumber:this.lineNumber,lineStart:this.lineStart,start:t,end:this.index}},e.prototype.isImplicitOctalLiteral=function(){for(var e=this.index+1;e<this.length;++e){var t=this.source[e];if("8"===t||"9"===t)return!1;if(!r.Character.isOctalDigit(t.charCodeAt(0)))return!0}return!0},e.prototype.scanNumericLiteral=function(){var e=this.index,t=this.source[e];i.assert(r.Character.isDecimalDigit(t.charCodeAt(0))||"."===t,"Numeric literal must start with a decimal digit or a decimal point");var n="";if("."!==t){if(n=this.source[this.index++],t=this.source[this.index],"0"===n){if("x"===t||"X"===t)return++this.index,this.scanHexLiteral(e);if("b"===t||"B"===t)return++this.index,this.scanBinaryLiteral(e);if("o"===t||"O"===t)return this.scanOctalLiteral(t,e);if(t&&r.Character.isOctalDigit(t.charCodeAt(0))&&this.isImplicitOctalLiteral())return this.scanOctalLiteral(t,e)}for(;r.Character.isDecimalDigit(this.source.charCodeAt(this.index));)n+=this.source[this.index++];t=this.source[this.index]}if("."===t){for(n+=this.source[this.index++];r.Character.isDecimalDigit(this.source.charCodeAt(this.index));)n+=this.source[this.index++];t=this.source[this.index]}if("e"===t||"E"===t)if(n+=this.source[this.index++],"+"!==(t=this.source[this.index])&&"-"!==t||(n+=this.source[this.index++]),r.Character.isDecimalDigit(this.source.charCodeAt(this.index)))for(;r.Character.isDecimalDigit(this.source.charCodeAt(this.index));)n+=this.source[this.index++];else this.throwUnexpectedToken();return r.Character.isIdentifierStart(this.source.charCodeAt(this.index))&&this.throwUnexpectedToken(),{type:6,value:parseFloat(n),lineNumber:this.lineNumber,lineStart:this.lineStart,start:e,end:this.index}},e.prototype.scanStringLiteral=function(){var e=this.index,t=this.source[e];i.assert("'"===t||'"'===t,"String literal must starts with a quote"),++this.index;for(var n=!1,o="";!this.eof();){var s=this.source[this.index++];if(s===t){t="";break}if("\\"===s)if((s=this.source[this.index++])&&r.Character.isLineTerminator(s.charCodeAt(0)))++this.lineNumber,"\r"===s&&"\n"===this.source[this.index]&&++this.index,this.lineStart=this.index;else switch(s){case"u":if("{"===this.source[this.index])++this.index,o+=this.scanUnicodeCodePointEscape();else{var u=this.scanHexEscape(s);null===u&&this.throwUnexpectedToken(),o+=u}break;case"x":var l=this.scanHexEscape(s);null===l&&this.throwUnexpectedToken(a.Messages.InvalidHexEscapeSequence),o+=l;break;case"n":o+="\n";break;case"r":o+="\r";break;case"t":o+="\t";break;case"b":o+="\b";break;case"f":o+="\f";break;case"v":o+="\v";break;case"8":case"9":o+=s,this.tolerateUnexpectedToken();break;default:if(s&&r.Character.isOctalDigit(s.charCodeAt(0))){var c=this.octalToDecimal(s);n=c.octal||n,o+=String.fromCharCode(c.code)}else o+=s}else{if(r.Character.isLineTerminator(s.charCodeAt(0)))break;o+=s}}return""!==t&&(this.index=e,this.throwUnexpectedToken()),{type:8,value:o,octal:n,lineNumber:this.lineNumber,lineStart:this.lineStart,start:e,end:this.index}},e.prototype.scanTemplate=function(){var e="",t=!1,n=this.index,i="`"===this.source[n],o=!1,s=2;for(++this.index;!this.eof();){var u=this.source[this.index++];if("`"===u){s=1,o=!0,t=!0;break}if("$"===u){if("{"===this.source[this.index]){this.curlyStack.push("${"),++this.index,t=!0;break}e+=u}else if("\\"===u)if(u=this.source[this.index++],r.Character.isLineTerminator(u.charCodeAt(0)))++this.lineNumber,"\r"===u&&"\n"===this.source[this.index]&&++this.index,this.lineStart=this.index;else switch(u){case"n":e+="\n";break;case"r":e+="\r";break;case"t":e+="\t";break;case"u":if("{"===this.source[this.index])++this.index,e+=this.scanUnicodeCodePointEscape();else{var l=this.index,c=this.scanHexEscape(u);null!==c?e+=c:(this.index=l,e+=u)}break;case"x":var h=this.scanHexEscape(u);null===h&&this.throwUnexpectedToken(a.Messages.InvalidHexEscapeSequence),e+=h;break;case"b":e+="\b";break;case"f":e+="\f";break;case"v":e+="\v";break;default:"0"===u?(r.Character.isDecimalDigit(this.source.charCodeAt(this.index))&&this.throwUnexpectedToken(a.Messages.TemplateOctalLiteral),e+="\0"):r.Character.isOctalDigit(u.charCodeAt(0))?this.throwUnexpectedToken(a.Messages.TemplateOctalLiteral):e+=u}else r.Character.isLineTerminator(u.charCodeAt(0))?(++this.lineNumber,"\r"===u&&"\n"===this.source[this.index]&&++this.index,this.lineStart=this.index,e+="\n"):e+=u}return t||this.throwUnexpectedToken(),i||this.curlyStack.pop(),{type:10,value:this.source.slice(n+1,this.index-s),cooked:e,head:i,tail:o,lineNumber:this.lineNumber,lineStart:this.lineStart,start:n,end:this.index}},e.prototype.testRegExp=function(e,t){var n=e,i=this;t.indexOf("u")>=0&&(n=n.replace(/\\u\{([0-9a-fA-F]+)\}|\\u([a-fA-F0-9]{4})/g,function(e,t,n){var r=parseInt(t||n,16);return r>1114111&&i.throwUnexpectedToken(a.Messages.InvalidRegExp),r<=65535?String.fromCharCode(r):"\ufffd"}).replace(/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,"\ufffd"));try{RegExp(n)}catch(e){this.throwUnexpectedToken(a.Messages.InvalidRegExp)}try{return new RegExp(e,t)}catch(e){return null}},e.prototype.scanRegExpBody=function(){var e=this.source[this.index];i.assert("/"===e,"Regular expression literal must start with a slash");for(var t=this.source[this.index++],n=!1,o=!1;!this.eof();)if(t+=e=this.source[this.index++],"\\"===e)e=this.source[this.index++],r.Character.isLineTerminator(e.charCodeAt(0))&&this.throwUnexpectedToken(a.Messages.UnterminatedRegExp),t+=e;else if(r.Character.isLineTerminator(e.charCodeAt(0)))this.throwUnexpectedToken(a.Messages.UnterminatedRegExp);else if(n)"]"===e&&(n=!1);else{if("/"===e){o=!0;break}"["===e&&(n=!0)}return o||this.throwUnexpectedToken(a.Messages.UnterminatedRegExp),t.substr(1,t.length-2)},e.prototype.scanRegExpFlags=function(){for(var e="";!this.eof();){var t=this.source[this.index];if(!r.Character.isIdentifierPart(t.charCodeAt(0)))break;if(++this.index,"\\"!==t||this.eof())e+=t;else if("u"===(t=this.source[this.index])){++this.index;var n=this.index,i=this.scanHexEscape("u");if(null!==i)for(e+=i;n<this.index;++n)this.source[n];else this.index=n,e+="u";this.tolerateUnexpectedToken()}else this.tolerateUnexpectedToken()}return e},e.prototype.scanRegExp=function(){var e=this.index,t=this.scanRegExpBody(),n=this.scanRegExpFlags();return{type:9,value:"",pattern:t,flags:n,regex:this.testRegExp(t,n),lineNumber:this.lineNumber,lineStart:this.lineStart,start:e,end:this.index}},e.prototype.lex=function(){if(this.eof())return{type:2,value:"",lineNumber:this.lineNumber,lineStart:this.lineStart,start:this.index,end:this.index};var e=this.source.charCodeAt(this.index);return r.Character.isIdentifierStart(e)?this.scanIdentifier():40===e||41===e||59===e?this.scanPunctuator():39===e||34===e?this.scanStringLiteral():46===e?r.Character.isDecimalDigit(this.source.charCodeAt(this.index+1))?this.scanNumericLiteral():this.scanPunctuator():r.Character.isDecimalDigit(e)?this.scanNumericLiteral():96===e||125===e&&"${"===this.curlyStack[this.curlyStack.length-1]?this.scanTemplate():e>=55296&&e<57343&&r.Character.isIdentifierStart(this.codePointAt(this.index))?this.scanIdentifier():this.scanPunctuator()},e}();t.Scanner=u},function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.TokenName={},t.TokenName[1]="Boolean",t.TokenName[2]="<end>",t.TokenName[3]="Identifier",t.TokenName[4]="Keyword",t.TokenName[5]="Null",t.TokenName[6]="Numeric",t.TokenName[7]="Punctuator",t.TokenName[8]="String",t.TokenName[9]="RegularExpression",t.TokenName[10]="Template"},function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.XHTMLEntities={quot:'"',amp:"&",apos:"'",gt:">",nbsp:" ",iexcl:"¡",cent:"¢",pound:"£",curren:"¤",yen:"¥",brvbar:"¦",sect:"§",uml:"¨",copy:"©",ordf:"ª",laquo:"«",not:"¬",shy:"",reg:"®",macr:"¯",deg:"°",plusmn:"±",sup2:"²",sup3:"³",acute:"´",micro:"µ",para:"¶",middot:"·",cedil:"¸",sup1:"¹",ordm:"º",raquo:"»",frac14:"¼",frac12:"½",frac34:"¾",iquest:"¿",Agrave:"À",Aacute:"Á",Acirc:"Â",Atilde:"Ã",Auml:"Ä",Aring:"Å",AElig:"Æ",Ccedil:"Ç",Egrave:"È",Eacute:"É",Ecirc:"Ê",Euml:"Ë",Igrave:"Ì",Iacute:"Í",Icirc:"Î",Iuml:"Ï",ETH:"Ð",Ntilde:"Ñ",Ograve:"Ò",Oacute:"Ó",Ocirc:"Ô",Otilde:"Õ",Ouml:"Ö",times:"×",Oslash:"Ø",Ugrave:"Ù",Uacute:"Ú",Ucirc:"Û",Uuml:"Ü",Yacute:"Ý",THORN:"Þ",szlig:"ß",agrave:"à",aacute:"á",acirc:"â",atilde:"ã",auml:"ä",aring:"å",aelig:"æ",ccedil:"ç",egrave:"è",eacute:"é",ecirc:"ê",euml:"ë",igrave:"ì",iacute:"í",icirc:"î",iuml:"ï",eth:"ð",ntilde:"ñ",ograve:"ò",oacute:"ó",ocirc:"ô",otilde:"õ",ouml:"ö",divide:"÷",oslash:"ø",ugrave:"ù",uacute:"ú",ucirc:"û",uuml:"ü",yacute:"ý",thorn:"þ",yuml:"ÿ",OElig:"Œ",oelig:"œ",Scaron:"Š",scaron:"š",Yuml:"Ÿ",fnof:"ƒ",circ:"ˆ",tilde:"˜",Alpha:"Α",Beta:"Β",Gamma:"Γ",Delta:"Δ",Epsilon:"Ε",Zeta:"Ζ",Eta:"Η",Theta:"Θ",Iota:"Ι",Kappa:"Κ",Lambda:"Λ",Mu:"Μ",Nu:"Ν",Xi:"Ξ",Omicron:"Ο",Pi:"Π",Rho:"Ρ",Sigma:"Σ",Tau:"Τ",Upsilon:"Υ",Phi:"Φ",Chi:"Χ",Psi:"Ψ",Omega:"Ω",alpha:"α",beta:"β",gamma:"γ",delta:"δ",epsilon:"ε",zeta:"ζ",eta:"η",theta:"θ",iota:"ι",kappa:"κ",lambda:"λ",mu:"μ",nu:"ν",xi:"ξ",omicron:"ο",pi:"π",rho:"ρ",sigmaf:"ς",sigma:"σ",tau:"τ",upsilon:"υ",phi:"φ",chi:"χ",psi:"ψ",omega:"ω",thetasym:"ϑ",upsih:"ϒ",piv:"ϖ",ensp:" ",emsp:" ",thinsp:" ",zwnj:"",zwj:"",lrm:"",rlm:"",ndash:"–",mdash:"—",lsquo:"‘",rsquo:"’",sbquo:"‚",ldquo:"“",rdquo:"”",bdquo:"„",dagger:"†",Dagger:"‡",bull:"•",hellip:"…",permil:"‰",prime:"′",Prime:"″",lsaquo:"‹",rsaquo:"›",oline:"‾",frasl:"⁄",euro:"€",image:"ℑ",weierp:"℘",real:"ℜ",trade:"™",alefsym:"ℵ",larr:"←",uarr:"↑",rarr:"→",darr:"↓",harr:"↔",crarr:"↵",lArr:"⇐",uArr:"⇑",rArr:"⇒",dArr:"⇓",hArr:"⇔",forall:"∀",part:"∂",exist:"∃",empty:"∅",nabla:"∇",isin:"∈",notin:"∉",ni:"∋",prod:"∏",sum:"∑",minus:"−",lowast:"∗",radic:"√",prop:"∝",infin:"∞",ang:"∠",and:"∧",or:"∨",cap:"∩",cup:"∪",int:"∫",there4:"∴",sim:"∼",cong:"≅",asymp:"≈",ne:"≠",equiv:"≡",le:"≤",ge:"≥",sub:"⊂",sup:"⊃",nsub:"⊄",sube:"⊆",supe:"⊇",oplus:"⊕",otimes:"⊗",perp:"⊥",sdot:"⋅",lceil:"⌈",rceil:"⌉",lfloor:"⌊",rfloor:"⌋",loz:"◊",spades:"♠",clubs:"♣",hearts:"♥",diams:"♦",lang:"⟨",rang:"⟩"}},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var i=n(10),r=n(12),a=n(13),o=function(){function e(){this.values=[],this.curly=this.paren=-1}return e.prototype.beforeFunctionExpression=function(e){return["(","{","[","in","typeof","instanceof","new","return","case","delete","throw","void","=","+=","-=","*=","**=","/=","%=","<<=",">>=",">>>=","&=","|=","^=",",","+","-","*","**","/","%","++","--","<<",">>",">>>","&","|","^","!","~","&&","||","?",":","===","==",">=","<=","<",">","!=","!=="].indexOf(e)>=0},e.prototype.isRegexStart=function(){var e=this.values[this.values.length-1],t=null!==e;switch(e){case"this":case"]":t=!1;break;case")":var n=this.values[this.paren-1];t="if"===n||"while"===n||"for"===n||"with"===n;break;case"}":if(t=!1,"function"===this.values[this.curly-3])t=!!(i=this.values[this.curly-4])&&!this.beforeFunctionExpression(i);else if("function"===this.values[this.curly-4]){var i;t=!(i=this.values[this.curly-5])||!this.beforeFunctionExpression(i)}}return t},e.prototype.push=function(e){7===e.type||4===e.type?("{"===e.value?this.curly=this.values.length:"("===e.value&&(this.paren=this.values.length),this.values.push(e.value)):this.values.push(null)},e}(),s=function(){function e(e,t){this.errorHandler=new i.ErrorHandler,this.errorHandler.tolerant=!!t&&"boolean"==typeof t.tolerant&&t.tolerant,this.scanner=new r.Scanner(e,this.errorHandler),this.scanner.trackComment=!!t&&"boolean"==typeof t.comment&&t.comment,this.trackRange=!!t&&"boolean"==typeof t.range&&t.range,this.trackLoc=!!t&&"boolean"==typeof t.loc&&t.loc,this.buffer=[],this.reader=new o}return e.prototype.errors=function(){return this.errorHandler.errors},e.prototype.getNextToken=function(){if(0===this.buffer.length){var e=this.scanner.scanComments();if(this.scanner.trackComment)for(var t=0;t<e.length;++t){var n=e[t],i=this.scanner.source.slice(n.slice[0],n.slice[1]),r={type:n.multiLine?"BlockComment":"LineComment",value:i};this.trackRange&&(r.range=n.range),this.trackLoc&&(r.loc=n.loc),this.buffer.push(r)}if(!this.scanner.eof()){var o=void 0;this.trackLoc&&(o={start:{line:this.scanner.lineNumber,column:this.scanner.index-this.scanner.lineStart},end:{}});var s="/"===this.scanner.source[this.scanner.index]&&this.reader.isRegexStart()?this.scanner.scanRegExp():this.scanner.lex();this.reader.push(s);var u={type:a.TokenName[s.type],value:this.scanner.source.slice(s.start,s.end)};if(this.trackRange&&(u.range=[s.start,s.end]),this.trackLoc&&(o.end={line:this.scanner.lineNumber,column:this.scanner.index-this.scanner.lineStart},u.loc=o),9===s.type){var l=s.pattern,c=s.flags;u.regex={pattern:l,flags:c}}this.buffer.push(u)}}return this.buffer.shift()},e}();t.Tokenizer=s}])},Pu.exports=Fu()),Pu.exports),Lu=e(Iu),Ou={};var Nu=(Bu||(Bu=1,function e(t){var n,i,r,a,o,s;function u(e){var t,n,i={};for(t in e)e.hasOwnProperty(t)&&("object"===T(n=e[t])&&null!==n?i[t]=u(n):i[t]=n);return i}function l(e,t){this.parent=e,this.key=t}function c(e,t,n,i){this.node=e,this.path=t,this.wrap=n,this.ref=i}function h(){}function d(e){return null!=e&&"object"===T(e)&&"string"==typeof e.type}function p(e,t){return(e===n.ObjectExpression||e===n.ObjectPattern)&&"properties"===t}function f(e,t){for(var n=e.length-1;n>=0;--n)if(e[n].node===t)return!0;return!1}function m(e,t){return(new h).traverse(e,t)}function g(e,t){var n;return n=function(e,t){var n,i,r,a;for(i=e.length,r=0;i;)t(e[a=r+(n=i>>>1)])?i=n:(r=a+1,i-=n+1);return r}(t,function(t){return t.range[0]>e.range[0]}),e.extendedRange=[e.range[0],e.range[1]],n!==t.length&&(e.extendedRange[1]=t[n].range[0]),(n-=1)>=0&&(e.extendedRange[0]=t[n].range[1]),e}return n={AssignmentExpression:"AssignmentExpression",AssignmentPattern:"AssignmentPattern",ArrayExpression:"ArrayExpression",ArrayPattern:"ArrayPattern",ArrowFunctionExpression:"ArrowFunctionExpression",AwaitExpression:"AwaitExpression",BlockStatement:"BlockStatement",BinaryExpression:"BinaryExpression",BreakStatement:"BreakStatement",CallExpression:"CallExpression",CatchClause:"CatchClause",ChainExpression:"ChainExpression",ClassBody:"ClassBody",ClassDeclaration:"ClassDeclaration",ClassExpression:"ClassExpression",ComprehensionBlock:"ComprehensionBlock",ComprehensionExpression:"ComprehensionExpression",ConditionalExpression:"ConditionalExpression",ContinueStatement:"ContinueStatement",DebuggerStatement:"DebuggerStatement",DirectiveStatement:"DirectiveStatement",DoWhileStatement:"DoWhileStatement",EmptyStatement:"EmptyStatement",ExportAllDeclaration:"ExportAllDeclaration",ExportDefaultDeclaration:"ExportDefaultDeclaration",ExportNamedDeclaration:"ExportNamedDeclaration",ExportSpecifier:"ExportSpecifier",ExpressionStatement:"ExpressionStatement",ForStatement:"ForStatement",ForInStatement:"ForInStatement",ForOfStatement:"ForOfStatement",FunctionDeclaration:"FunctionDeclaration",FunctionExpression:"FunctionExpression",GeneratorExpression:"GeneratorExpression",Identifier:"Identifier",IfStatement:"IfStatement",ImportExpression:"ImportExpression",ImportDeclaration:"ImportDeclaration",ImportDefaultSpecifier:"ImportDefaultSpecifier",ImportNamespaceSpecifier:"ImportNamespaceSpecifier",ImportSpecifier:"ImportSpecifier",Literal:"Literal",LabeledStatement:"LabeledStatement",LogicalExpression:"LogicalExpression",MemberExpression:"MemberExpression",MetaProperty:"MetaProperty",MethodDefinition:"MethodDefinition",ModuleSpecifier:"ModuleSpecifier",NewExpression:"NewExpression",ObjectExpression:"ObjectExpression",ObjectPattern:"ObjectPattern",PrivateIdentifier:"PrivateIdentifier",Program:"Program",Property:"Property",PropertyDefinition:"PropertyDefinition",RestElement:"RestElement",ReturnStatement:"ReturnStatement",SequenceExpression:"SequenceExpression",SpreadElement:"SpreadElement",Super:"Super",SwitchStatement:"SwitchStatement",SwitchCase:"SwitchCase",TaggedTemplateExpression:"TaggedTemplateExpression",TemplateElement:"TemplateElement",TemplateLiteral:"TemplateLiteral",ThisExpression:"ThisExpression",ThrowStatement:"ThrowStatement",TryStatement:"TryStatement",UnaryExpression:"UnaryExpression",UpdateExpression:"UpdateExpression",VariableDeclaration:"VariableDeclaration",VariableDeclarator:"VariableDeclarator",WhileStatement:"WhileStatement",WithStatement:"WithStatement",YieldExpression:"YieldExpression"},r={AssignmentExpression:["left","right"],AssignmentPattern:["left","right"],ArrayExpression:["elements"],ArrayPattern:["elements"],ArrowFunctionExpression:["params","body"],AwaitExpression:["argument"],BlockStatement:["body"],BinaryExpression:["left","right"],BreakStatement:["label"],CallExpression:["callee","arguments"],CatchClause:["param","body"],ChainExpression:["expression"],ClassBody:["body"],ClassDeclaration:["id","superClass","body"],ClassExpression:["id","superClass","body"],ComprehensionBlock:["left","right"],ComprehensionExpression:["blocks","filter","body"],ConditionalExpression:["test","consequent","alternate"],ContinueStatement:["label"],DebuggerStatement:[],DirectiveStatement:[],DoWhileStatement:["body","test"],EmptyStatement:[],ExportAllDeclaration:["source"],ExportDefaultDeclaration:["declaration"],ExportNamedDeclaration:["declaration","specifiers","source"],ExportSpecifier:["exported","local"],ExpressionStatement:["expression"],ForStatement:["init","test","update","body"],ForInStatement:["left","right","body"],ForOfStatement:["left","right","body"],FunctionDeclaration:["id","params","body"],FunctionExpression:["id","params","body"],GeneratorExpression:["blocks","filter","body"],Identifier:[],IfStatement:["test","consequent","alternate"],ImportExpression:["source"],ImportDeclaration:["specifiers","source"],ImportDefaultSpecifier:["local"],ImportNamespaceSpecifier:["local"],ImportSpecifier:["imported","local"],Literal:[],LabeledStatement:["label","body"],LogicalExpression:["left","right"],MemberExpression:["object","property"],MetaProperty:["meta","property"],MethodDefinition:["key","value"],ModuleSpecifier:[],NewExpression:["callee","arguments"],ObjectExpression:["properties"],ObjectPattern:["properties"],PrivateIdentifier:[],Program:["body"],Property:["key","value"],PropertyDefinition:["key","value"],RestElement:["argument"],ReturnStatement:["argument"],SequenceExpression:["expressions"],SpreadElement:["argument"],Super:[],SwitchStatement:["discriminant","cases"],SwitchCase:["test","consequent"],TaggedTemplateExpression:["tag","quasi"],TemplateElement:[],TemplateLiteral:["quasis","expressions"],ThisExpression:[],ThrowStatement:["argument"],TryStatement:["block","handler","finalizer"],UnaryExpression:["argument"],UpdateExpression:["argument"],VariableDeclaration:["declarations"],VariableDeclarator:["id","init"],WhileStatement:["test","body"],WithStatement:["object","body"],YieldExpression:["argument"]},i={Break:a={},Skip:o={},Remove:s={}},l.prototype.replace=function(e){this.parent[this.key]=e},l.prototype.remove=function(){return Array.isArray(this.parent)?(this.parent.splice(this.key,1),!0):(this.replace(null),!1)},h.prototype.path=function(){var e,t,n,i,r;function a(e,t){if(Array.isArray(t))for(n=0,i=t.length;n<i;++n)e.push(t[n]);else e.push(t)}if(!this.__current.path)return null;for(r=[],e=2,t=this.__leavelist.length;e<t;++e)a(r,this.__leavelist[e].path);return a(r,this.__current.path),r},h.prototype.type=function(){return this.current().type||this.__current.wrap},h.prototype.parents=function(){var e,t,n;for(n=[],e=1,t=this.__leavelist.length;e<t;++e)n.push(this.__leavelist[e].node);return n},h.prototype.current=function(){return this.__current.node},h.prototype.__execute=function(e,t){var n,i;return i=void 0,n=this.__current,this.__current=t,this.__state=null,e&&(i=e.call(this,t.node,this.__leavelist[this.__leavelist.length-1].node)),this.__current=n,i},h.prototype.notify=function(e){this.__state=e},h.prototype.skip=function(){this.notify(o)},h.prototype.break=function(){this.notify(a)},h.prototype.remove=function(){this.notify(s)},h.prototype.__initialize=function(e,t){this.visitor=t,this.root=e,this.__worklist=[],this.__leavelist=[],this.__current=null,this.__state=null,this.__fallback=null,"iteration"===t.fallback?this.__fallback=Object.keys:"function"==typeof t.fallback&&(this.__fallback=t.fallback),this.__keys=r,t.keys&&(this.__keys=Object.assign(Object.create(this.__keys),t.keys))},h.prototype.traverse=function(e,t){var n,i,r,s,u,l,h,m,g,v,y,b;for(this.__initialize(e,t),b={},n=this.__worklist,i=this.__leavelist,n.push(new c(e,null,null,null)),i.push(new c(null,null,null,null));n.length;)if((r=n.pop())!==b){if(r.node){if(l=this.__execute(t.enter,r),this.__state===a||l===a)return;if(n.push(b),i.push(r),this.__state===o||l===o)continue;if(u=(s=r.node).type||r.wrap,!(v=this.__keys[u])){if(!this.__fallback)throw new Error("Unknown node type "+u+".");v=this.__fallback(s)}for(m=v.length;(m-=1)>=0;)if(y=s[h=v[m]])if(Array.isArray(y)){for(g=y.length;(g-=1)>=0;)if(y[g]&&!f(i,y[g])){if(p(u,v[m]))r=new c(y[g],[h,g],"Property",null);else{if(!d(y[g]))continue;r=new c(y[g],[h,g],null,null)}n.push(r)}}else if(d(y)){if(f(i,y))continue;n.push(new c(y,h,null,null))}}}else if(r=i.pop(),l=this.__execute(t.leave,r),this.__state===a||l===a)return},h.prototype.replace=function(e,t){var n,i,r,u,h,f,m,g,v,y,b,x,S;function E(e){var t,i,r,a;if(e.ref.remove())for(i=e.ref.key,a=e.ref.parent,t=n.length;t--;)if((r=n[t]).ref&&r.ref.parent===a){if(r.ref.key<i)break;--r.ref.key}}for(this.__initialize(e,t),b={},n=this.__worklist,i=this.__leavelist,f=new c(e,null,null,new l(x={root:e},"root")),n.push(f),i.push(f);n.length;)if((f=n.pop())!==b){if(void 0!==(h=this.__execute(t.enter,f))&&h!==a&&h!==o&&h!==s&&(f.ref.replace(h),f.node=h),this.__state!==s&&h!==s||(E(f),f.node=null),this.__state===a||h===a)return x.root;if((r=f.node)&&(n.push(b),i.push(f),this.__state!==o&&h!==o)){if(u=r.type||f.wrap,!(v=this.__keys[u])){if(!this.__fallback)throw new Error("Unknown node type "+u+".");v=this.__fallback(r)}for(m=v.length;(m-=1)>=0;)if(y=r[S=v[m]])if(Array.isArray(y)){for(g=y.length;(g-=1)>=0;)if(y[g]){if(p(u,v[m]))f=new c(y[g],[S,g],"Property",new l(y,g));else{if(!d(y[g]))continue;f=new c(y[g],[S,g],null,new l(y,g))}n.push(f)}}else d(y)&&n.push(new c(y,S,null,new l(r,S)))}}else if(f=i.pop(),void 0!==(h=this.__execute(t.leave,f))&&h!==a&&h!==o&&h!==s&&f.ref.replace(h),this.__state!==s&&h!==s||E(f),this.__state===a||h===a)return x.root;return x.root},t.Syntax=n,t.traverse=m,t.replace=function(e,t){return(new h).replace(e,t)},t.attachComments=function(e,t,n){var r,a,o,s,l=[];if(!e.range)throw new Error("attachComments needs range information");if(!n.length){if(t.length){for(o=0,a=t.length;o<a;o+=1)(r=u(t[o])).extendedRange=[0,e.range[0]],l.push(r);e.leadingComments=l}return e}for(o=0,a=t.length;o<a;o+=1)l.push(g(u(t[o]),n));return s=0,m(e,{enter:function(e){for(var t;s<l.length&&!((t=l[s]).extendedRange[1]>e.range[0]);)t.extendedRange[1]===e.range[0]?(e.leadingComments||(e.leadingComments=[]),e.leadingComments.push(t),l.splice(s,1)):s+=1;return s===l.length?i.Break:l[s].extendedRange[0]>e.range[1]?i.Skip:void 0}}),s=0,m(e,{leave:function(e){for(var t;s<l.length&&(t=l[s],!(e.range[1]<t.extendedRange[0]));)e.range[1]===t.extendedRange[0]?(e.trailingComments||(e.trailingComments=[]),e.trailingComments.push(t),l.splice(s,1)):s+=1;return s===l.length?i.Break:l[s].extendedRange[0]>e.range[1]?i.Skip:void 0}}),e},t.VisitorKeys=r,t.VisitorOption=i,t.Controller=h,t.cloneEnvironment=function(){return e({})},t}(Ou)),Ou),Ru=e(Nu);var Mu=new WeakMap,_u=!1,Uu=null,ju=null,Hu=0;function zu(e,t){try{return{ok:!0,value:e[t]}}catch(e){return{ok:!1,value:void 0}}}function Vu(e,t){try{return e[t]()}catch(e){return null}}function Ku(e,t){var n="YtlrPlayerActionsContainer",i=0,r=new WeakSet;return function a(o,s,u,l,c){if(!o||s>8||i>e)return null;if("object"===T(o)||"function"==typeof o){if(r.has(o))return null;r.add(o)}if("function"==typeof o){if(function(r){if(i>e||"function"!=typeof r)return!1;i+=1;var a=Mu.get(r);if(void 0===a){a=0;try{var o=r.toString();o.includes("TRANSPORT_CONTROLS_BUTTON_TYPE_FEATURED_ACTION")&&(a|=1),o.includes(n)&&(a|=2)}catch(e){}Mu.set(r,a)}return!(!(1&a)||t&&!(2&a))}(o)){var h=(m=l,g=o,v=c,(p=u)&&void 0!==m&&"function"==typeof g?{host:p,key:m,fn:g,write:function(e){try{return v?(p.set(m,e),p.get(m)===e):(p[m]=e,p[m]===e)}catch(e){return!1}}}:null);if(h)return h}var d=o.prototype;return d&&"object"===T(d)?a(d,s+1,null,void 0,!1):null}var p,m,g,v;if("object"!==T(o))return null;if(o instanceof Map){var y=Vu(o,"entries");if(y){var b,x=f(y);try{for(x.s();!(b=x.n()).done;){var S=D(b.value,2),E=S[0],w=S[1];if(i>e)return null;var k=a(w,s+1,o,E,!0);if(k)return k}}catch(e){x.e(e)}finally{x.f()}}return null}if(o instanceof Set){var A=Vu(o,"values");if(A){var C,P=f(A);try{for(P.s();!(C=P.n()).done;){var F=C.value;if(i>e)return null;var B=a(F,s+1,null,void 0,!1);if(B)return B}}catch(e){P.e(e)}finally{P.f()}}return null}var I=zu(o,n);if(I.ok&&void 0!==I.value){var L=a(I.value,s+1,o,n,!1);if(L)return L}for(var O=0,N=Object.keys(o);O<N.length;O++){var R=N[O];if(i>e)return null;if(R!==n){var M=zu(o,R);if(M.ok){var _=a(M.value,s+1,o,R,!1);if(_)return _}}}return null}(window._yttv,0,null,void 0,!1)}function Gu(){if(_u||!Se("enablePatchingVideoPlayer"))return!1;if(!window._yttv||!document.querySelector(".html5-video-player")&&!document.querySelector("ytlr-player"))return!1;var e=Uu&&"function"==typeof Uu.fn?Uu:Uu=Ku(2e4,!0)||Ku(2e4,!1);if(!e||"function"!=typeof e.write)return!1;try{var t=function(){var e=Array.prototype.slice.call(arguments);null===i&&(i=n.toString(),r=/^class\s/.test(i));var o,s=r;function u(e,i){return"undefined"!=typeof Reflect&&"function"==typeof Reflect.construct?Reflect.construct(e,i,t):function(e,t,n){if(y())return Reflect.construct.apply(null,arguments);var i=[null];i.push.apply(i,t);var r=new(e.bind.apply(e,i));return n&&k(r,n.prototype),r}(n,A(i))}if(!(this instanceof t))return s?u(n,e):n.apply(this,e);s?o=u(n,e):(n.apply(this,e),o=this);try{var l,c,h,d,p=a||(a=function(e){var t,n=e,i=0;try{t=Lu.parse(e,{range:!0,tolerant:!0,sourceType:"script"})}catch(n){try{var r="("+e+")";t=Lu.parse(r,{range:!0,tolerant:!0,sourceType:"script"}),i=1}catch(r){try{t=Lu.parse(e,{range:!0,tolerant:!0,sourceType:"module"})}catch(r){try{var a="("+e+")";t=Lu.parse(a,{range:!0,tolerant:!0,sourceType:"module"}),i=1}catch(e){throw n}}}}var o=[];return Ru.traverse(t,{enter:function(e){if("AssignmentExpression"===e.type){var t=e.right;if(t&&t.range){var r=n.slice(t.range[0]-i,t.range[1]-i),a=null;if("CallExpression"===t.type&&t.callee&&"FunctionExpression"===t.callee.type&&t.callee.body)for(var s=t.callee.body.body||[],u=0;u<s.length;u++){var l=s[u];if("ReturnStatement"===l.type&&l.argument&&l.argument.range){a=n.slice(l.argument.range[0]-i,l.argument.range[1]-i);break}}else"FunctionExpression"!==t.type&&"ArrowFunctionExpression"!==t.type||(a=r);o.push({left:e.left&&e.left.range?n.slice(e.left.range[0]-i,e.left.range[1]-i):null,rhs:r,returned:a})}}}}),o}(i)),f={type:"TRANSPORT_CONTROLS_BUTTON_TYPE_PIP",button:{buttonRenderer:pn(!1,Se("enableSwapMPWithPIP")?Lt("player.pictureInPicture"):Lt("player.miniPlayer"),"CLEAR_COOKIES",{customAction:{action:Se("enableSwapMPWithPIP")?"ENTER_PIP":"ENTER_MP"}})}},m=null===(l=p.find(function(e){return e.rhs.includes("TRANSPORT_CONTROLS_BUTTON_TYPE_PLAYBACK_SETTINGS")}))||void 0===l||null===(l=l.left)||void 0===l?void 0:l.split(".")[1];if(m&&Se("enableMPButton")){var g=o[m];"function"==typeof g&&(o[m]=function(){var e=g.apply(this,arguments);if(Array.isArray(e)&&!e.find(function(e){return"TRANSPORT_CONTROLS_BUTTON_TYPE_PIP"===e.type})){var t=e.findIndex(function(e){return"TRANSPORT_CONTROLS_BUTTON_TYPE_PLAYBACK_SETTINGS"===e.type});-1!==t&&e.splice(t,0,f)}return e})}var v=null===(c=p.find(function(e){return!!e.rhs.includes("skipNextButton")&&e.rhs.indexOf("skipPreviousButton")>e.rhs.indexOf("skipNextButton")}))||void 0===c||null===(c=c.left)||void 0===c?void 0:c.split(".")[1],b=null===(h=p.find(function(e){return!!e.rhs.includes("skipPreviousButton")&&e.rhs.indexOf("skipNextButton")>e.rhs.indexOf("skipPreviousButton")}))||void 0===h||null===(h=h.left)||void 0===h?void 0:h.split(".")[1],x=null===(d=p.find(function(e){return e.rhs.includes("props.data.engagementActions")}))||void 0===d||null===(d=d.left)||void 0===d?void 0:d.split(".")[1];if(x&&Se("enableSpeedControlsButton")){var S=o[x];"function"==typeof S&&(o[x]=function(){var e=S.apply(this,arguments);return Array.isArray(e)&&!e.find(function(e){return"TRANSPORT_CONTROLS_BUTTON_TYPE_SPEED"===e.type})&&e.push({type:"TRANSPORT_CONTROLS_BUTTON_TYPE_SPEED",button:{buttonRenderer:pn(!1,Lt("player.speedControls"),"SLOW_MOTION_VIDEO",{customAction:{action:"AXO_SPEED_SETTINGS_SHOW"}})}}),e})}if(!Se("enableSuperThanksButton")&&x){var E=o[x];"function"==typeof E&&(o[x]=function(){var e=E.apply(this,arguments);return Array.isArray(e)?e.filter(function(e){return"TRANSPORT_CONTROLS_BUTTON_TYPE_SUPER_THANKS"!==e.type&&"TRANSPORT_CONTROLS_BUTTON_TYPE_SHOPPING"!==e.type}):e})}Se("enablePreviousNextButtons")&&v&&b&&(o[v]=function(){return pn(!1,Lt("player.previous"),"SKIP_PREVIOUS",{signalAction:{signal:"PLAYER_PLAY_PREVIOUS"}})},o[b]=function(){return pn(!1,Lt("player.next"),"SKIP_NEXT",{signalAction:{signal:"PLAYER_PLAY_NEXT"}})})}catch(e){console.warn("[AxoTube:customUI] Custom UI patching failed:",e)}return o},n=e.fn,i=null,r=!1,a=null;return t.prototype=n.prototype,e.write(t)?(e.fn=t,_u=!0,!0):(Uu=null,!1)}catch(e){return console.error("[AxoTube:customUI] Custom UI apply failed:",e),Uu=null,!1}}function Ju(e){!_u&&Se("enablePatchingVideoPlayer")&&(e&&(Hu=0),ju||(ju=setTimeout(function(){ju=null,Hu+=1,Gu()||Hu<10&&Ju(!1)},500)))}function Xu(){Gu()||Ju(!0)}"complete"===document.readyState||"interactive"===document.readyState?Xu():window.addEventListener("DOMContentLoaded",Xu),we.addEventListener("configChange",function(e){var t;"enablePatchingVideoPlayer"===(null===(t=e.detail)||void 0===t?void 0:t.key)&&e.detail.value&&(Uu=null,Ju(!0))});var Wu=null,qu=null,Yu=!1,Qu=null,Zu=null;function $u(){return-1!==window.location.href.indexOf("watch")}function el(){return se()&&se().SetFrameRate}function tl(){if(Yu){var e=el();if(e)try{e.call(se(),0),Yu=!1}catch(e){console.warn("[AxoTube:autoFrameRate] Failed to reset auto frame rate:",e)}}}function nl(){null!==Qu&&clearTimeout(Qu),Qu=null,Zu&&(Zu.video.removeEventListener("play",nl),Zu=null)}function il(){if(nl(),qu&&(clearTimeout(qu),qu=null),Wu){try{Wu.removeEventListener("onPlaybackStartExternal",rl)}catch(e){}Wu=null}}function rl(){try{if(!$u()||!Wu||Wu!==Fi()||!Se("autoFrameRate"))return;var e=Wu.getStatsForNerds(),t=e&&e.resolution?e.resolution.match(/(\d+)x(\d+)@([\d.]+)/):null,n=el();if(!t||!n)return;var i=Bi(),r=Se("autoFrameRatePauseVideoFor"),a=r>0&&i&&!i.paused&&!Zu;a&&i.pause();try{n.call(se(),parseFloat(t[3])),Yu=!0}finally{a&&i.paused&&function(e,t,n){var i=window.location.hash,r=Ii(t),a=e.currentSrc||e.src;Zu={video:e,player:t,hash:i,videoId:r,source:a},e.addEventListener("play",nl),Qu=setTimeout(function(){var n=Zu,o=n&&n.video===e&&n.player===Wu&&Fi()===t&&Bi()===e&&$u()&&Se("autoFrameRate")&&window.location.hash===i&&Ii(t)===r&&(e.currentSrc||e.src)===a&&e.paused&&!e.ended&&!e.seeking;if(nl(),o)try{var s=e.play();s&&"function"==typeof s.catch&&s.catch(function(){})}catch(e){console.warn("[AxoTube:autoFrameRate] Failed to resume after frame rate switch:",e)}},n)}(i,Wu,r)}}catch(e){console.error("[AxoTube:autoFrameRate] Error in auto frame rate handling:",e)}}function al(){if(qu&&(clearTimeout(qu),qu=null),!Se("autoFrameRate"))return il(),void tl();var e=Fi();if(e){if(e!==Wu){if(nl(),Wu)try{Wu.removeEventListener("onPlaybackStartExternal",rl)}catch(e){}(Wu=e).addEventListener("onPlaybackStartExternal",rl)}}else qu=setTimeout(al,500)}window.addEventListener("hashchange",function(){nl(),$u()||tl(),setTimeout(al,0)}),Ri(function(e){e!==Wu&&al()}),Mi(function(e,t){t&&e!==t&&nl()}),_i(function(e,t){t&&e!==t&&nl()}),document.addEventListener("keydown",nl,!0),document.addEventListener("mousedown",nl,!0),document.addEventListener("touchstart",nl,!0),we.addEventListener("configChange",function(e){var t,n;"autoFrameRate"===(null===(t=e.detail)||void 0===t?void 0:t.key)?e.detail.value?al():(il(),tl()):"autoFrameRatePauseVideoFor"===(null===(n=e.detail)||void 0===n?void 0:n.key)&&nl()}),al()}();
|