axotube 1.30.2 → 1.30.3

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.
@@ -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),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,A(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=F(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=A(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)||F(e,t)||x()}function C(e){return function(e){if(Array.isArray(e))return i(e)}(e)||b(e)||F(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 A(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 F(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 P="undefined"!=typeof globalThis&&globalThis||"undefined"!=typeof self&&self||"undefined"!=typeof global&&global||{},B="URLSearchParams"in P,I="Symbol"in P&&"iterator"in Symbol,R="FileReader"in P&&"Blob"in P&&function(){try{return new Blob,!0}catch(e){return!1}}(),L="FormData"in P,O="ArrayBuffer"in P;if(O)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 z(e){this.map={},e instanceof z?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 H(e){if(!e._noBody)return e.bodyUsed?Promise.reject(new TypeError("Already read")):void(e.bodyUsed=!0)}function K(e){return new Promise(function(t,n){e.onload=function(){t(e.result)},e.onerror=function(){n(e.error)}})}function V(e){var t=new FileReader,n=K(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:R&&Blob.prototype.isPrototypeOf(e)?this._bodyBlob=e:L&&FormData.prototype.isPrototypeOf(e)?this._bodyFormData=e:B&&URLSearchParams.prototype.isPrototypeOf(e)?this._bodyText=e.toString():O&&R&&((t=e)&&DataView.prototype.isPrototypeOf(t))?(this._bodyArrayBuffer=G(e.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):O&&(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"))},R&&(this.blob=function(){var e=H(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=H(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(R)return this.blob().then(V);throw new Error("could not read as ArrayBuffer")},this.text=function(){var e,t,n,i,r,a=H(this);if(a)return a;if(this._bodyBlob)return e=this._bodyBlob,t=new FileReader,n=K(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)},L&&(this.formData=function(){return this.text().then(q)}),this.json=function(){return this.text().then(JSON.parse)},this}z.prototype.append=function(e,t){e=_(e),t=U(t);var n=this.map[e];this.map[e]=n?n+", "+t:t},z.prototype.delete=function(e){delete this.map[_(e)]},z.prototype.get=function(e){return e=_(e),this.has(e)?this.map[e]:null},z.prototype.has=function(e){return this.map.hasOwnProperty(_(e))},z.prototype.set=function(e,t){this.map[_(e)]=U(t)},z.prototype.forEach=function(e,t){for(var n in this.map)this.map.hasOwnProperty(n)&&e.call(t,this.map[n],n,this)},z.prototype.keys=function(){var e=[];return this.forEach(function(t,n){e.push(n)}),j(e)},z.prototype.values=function(){var e=[];return this.forEach(function(t){e.push(t)}),j(e)},z.prototype.entries=function(){var e=[];return this.forEach(function(t,n){e.push([n,t])}),j(e)},I&&(z.prototype[Symbol.iterator]=z.prototype.entries);var W=["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 z(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 z(t.headers)),this.method=(n=t.method||this.method||"GET",i=n.toUpperCase(),W.indexOf(i)>-1?i:n),this.mode=t.mode||this.mode||null,this.signal=t.signal||this.signal||function(){if("AbortController"in P)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 z(t.headers),this.url=t.url||"",this._initBody(e)}X.prototype.clone=function(){return new X(this,{body:this._bodyInit})},J.call(X.prototype),J.call(Y.prototype),Y.prototype.clone=function(){return new Y(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new z(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=P.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 z,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&&P.location.href?P.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&&(R?a.responseType="blob":O&&(a.responseType="arraybuffer")),t&&"object"===T(t.headers)&&!(t.headers instanceof z||P.Headers&&t.headers instanceof P.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,P.fetch||(P.fetch=$,P.Headers=z,P.Request=X,P.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)}}window.__releaseBootLoader=re,setTimeout(function(){if(ie){try{ie.disconnect()}catch(e){}ie=null}re()},1e4),document.documentElement?oe():document.addEventListener("DOMContentLoaded",oe);var se,ue={};function le(){return"undefined"!=typeof window&&window.h5vcc&&window.h5vcc.tizentube||null}!function(){if(se)return ue;se=1;var e="Mozilla/5.0 (SMART-TV; LINUX; Tizen 4.0) AppleWebKit/537.3 (KHTML, like Gecko) SamsungBrowser/2.1 TV Safari/537.3",t="axotube-user-agent-applied";(function(){if((!navigator.userAgent||-1===navigator.userAgent.indexOf("SamsungBrowser/2.1"))&&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))try{sessionStorage.getItem(t)!==e&&(sessionStorage.setItem(t,e),location.reload())}catch(e){}})()}();var ce,he,de={defaults:{enableAdBlock:!0,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",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"],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 pe=function(){if(he)return ce;he=1;var e=de;return ce={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||!Number.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];if(o&&!o.includes(n))return!1;if("routeColor"===t&&!/^#[0-9a-f]{6}$/i.test(n))return!1;if("routeBackgroundUrl"===t&&n)try{var s=new URL(n);if("http:"!==s.protocol&&"https:"!==s.protocol)return!1}catch(e){return!1}return!0}},ce}(),fe=e(pe),me="ytaf-configuration",ge=JSON.parse,ve=JSON.stringify,ye=function(e){return ge(ve(e))},be=ye,xe=ye(de.defaults);xe.enableFixedUI=!le()||de.defaults.enableFixedUI;var Se,Ee=fe.validateConfigValue;function we(e){if(Object.prototype.hasOwnProperty.call(xe,e))return void 0===Se[e]&&(Se[e]=ye(xe[e])),Se[e];console.warn("[AxoTube:config] Unknown config key",e)}function ke(e,t){if(!Ee(e,t))return console.warn("[AxoTube:config] Rejected invalid config value",e,t),!1;Se[e]=ye(t);var n=function(){try{return!!window.localStorage&&(window.localStorage[me]=ve(Se),!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(me):delete window.localStorage[me],window.localStorage[me]=ve(Se),!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 Ce.dispatchEvent(new CustomEvent("configChange",{detail:{key:e,value:ye(t)}})),n}!function(){Se=ye(xe);try{if(!window.localStorage||!window.localStorage[me])return;var e=ge(window.localStorage[me]);if(!e||"object"!==T(e)||Array.isArray(e))return;Object.keys(e).forEach(function(t){Ee(t,e[t])&&(Se[t]=ye(e[t]))})}catch(e){console.warn("[AxoTube:config] Config read failed; using defaults:",e)}}();var De,Ce=new EventTarget;function Ae(){return ye(Se)}function Te(){return!!we("enablePerformanceMode")}function Fe(){return Te()||!!we("enableReducedMotion")}function Pe(){return Te()||!!we("enableLowMemoryMode")}function Be(){return!!we("enablePreviews")&&!Te()}function Ie(){return we("enableHqThumbnails")?Fe()||Pe()?"hover":"eager":"off"}function Re(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)}Ce.addEventListener("configChange",function(e){var t;"enablePerformanceMode"===(null===(t=e.detail)||void 0===t?void 0:t.key)&&(we("enablePerformanceMode")||(ke("enableReducedMotion",!1),ke("enableLowMemoryMode",!1)))});try{var Le=window.environment;Object.defineProperty(window,"environment",{configurable:!0,get:function(){return De},set:function(e){Re(e),De=e}}),De=Le,Re(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)&&Me()},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 Me(){return!(!window.matchMedia||!window.matchMedia("(dynamic-range: high)").matches)}function _e(e){var t=e.split("."),n="vp09"===t[0]?t[6]:"av01"===t[0]?t[7]:void 0;return"16"===n||"18"===n}var Ue="__axotubeResolutionOwner";if(!window[Ue]){if(window[Ue]=!0,we("enableExperimentalResolution"))try{window.h5vcc=window.h5vcc||{},window.h5vcc.system=window.h5vcc.system||{},window.h5vcc.system.getVideoContainerSizeOverride=function(){var e=we("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(_e(l[c].trim())&&!Me())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)}Ce.addEventListener("configChange",function(e){var t,n=(null===(t=e.detail)||void 0===t?void 0:t.key)||"";("enableExperimentalResolution"===n||"experimentalMaxResolution"===n&&we("enableExperimentalResolution"))&&setTimeout(function(){return location.reload()},300)})}var je={avc1:["avc1"],vp9:["vp09","vp9"],av01:["av01"]};var ze="__axotubeCodecOwner";if(!window[ze]){window[ze]=!0;try{!function(e){if(window.MediaSource&&"function"==typeof MediaSource.isTypeSupported){var t=function(e){if(!je[e])return[];var t=[];return Object.keys(je).forEach(function(n){n!==e&&(t=t.concat(je[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)}}}}(we("videoPreferredCodec"))}catch(e){console.warn("[AxoTube:codecPreference] Could not install codec preference:",e)}Ce.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},Ke=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},Ge=/###/g,Je=function(e){return e&&e.indexOf("###")>-1?e.replace(Ge,"."):e},We=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(We(e))return{};var a=Je(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:Je(i[r])}},qe=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},Ye=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]},Qe=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]):Qe(e[i],t[i],n):e[i]=t[i]);return e},Ze=function(e){return e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")},$e={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#x2F;"},et=function(e){return He(e)?e.replace(/[&<>"'\/]/g,function(e){return $e[e]}):e},tt=[" ",",","?","!",";"],nt=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),it=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}},rt=function(e){return null==e?void 0:e.replace(/_/g,"-")},at={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)}},ot=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||at,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)}}])}(),st=new ot,ut=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))})}}])}(),lt=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,C(n));else if(He(n)&&s){var l;(l=r).push.apply(l,C(n.split(s)))}else r.push(n);var c=Ye(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)?it(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),qe(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=Ye(this.data,o)||{};a.skipCopy||(n=JSON.parse(JSON.stringify(n))),i?Qe(s,n,r):s=E(E({},s),n),qe(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}}])}(ut),ct={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}},ht=Symbol("i18next/PATH_KEY");function dt(e,t){var n,i,r,a,o,s=e((a=[],(o=Object.create(null)).get=function(e,t){var n,i;return null===(n=r)||void 0===n||null===(i=n.revoke)||void 0===i||i.call(n),t===ht?a:(a.push(t),(r=Proxy.revocable(e,o)).proxy)},Proxy.revocable(Object.create(null),o).proxy))[ht],u=null!==(n=null==t?void 0:t.keySeparator)&&void 0!==n?n:".",l=null!==(i=null==t?void 0:t.nsSeparator)&&void 0!==i?i:":";if(s.length>1&&l){var c=null==t?void 0:t.ns;if((c?Array.isArray(c)?c:[c]:[]).includes(s[0]))return"".concat(s[0]).concat(l).concat(s.slice(1).join(u))}return s.join(u)}var pt={},ft=function(e){return!He(e)&&"boolean"!=typeof e&&"number"!=typeof e},mt=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=st.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=ft(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=tt.filter(function(e){return t.indexOf(e)<0&&n.indexOf(e)<0});if(0===i.length)return!0;var r=nt.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=dt(e,E(E({},this.options),a))),Array.isArray(e)||(e=[String(e)]),e=e.map(function(e){return"function"==typeof e?dt(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}):"",C=S&&!a.ordinal&&0===a.count,A=C&&a["defaultValue".concat(this.options.pluralSeparator,"zero")]||a["defaultValue".concat(k)]||a["defaultValue".concat(D)]||a.defaultValue,F=g;x&&!g&&w&&(F=A);var P=ft(F),B=Object.prototype.toString.apply(F);if(!(x&&F&&P&&["[object Number]","[object Function]","[object RegExp]"].indexOf(B)<0)||He(b)&&Array.isArray(F))if(x&&He(b)&&Array.isArray(g))(g=g.join(b))&&(g=this.extendTranslation(g,e,a,i));else{var I=!1,R=!1;!this.isValidLookup(g)&&w&&(I=!0,g=A),this.isValidLookup(g)||(R=!0,g=l);var L=(a.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&R?void 0:g,O=w&&A!==g&&this.options.updateMissing;if(R||I||O){if(this.logger.log(O?"updateKey":"missingKey",p,h,l,O?A: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=w&&n!==g?n:L;r.options.missingKeyHandler?r.options.missingKeyHandler(e,h,t,o,O,a):null!==(i=r.backendConnector)&&void 0!==i&&i.saveMissing&&r.backendConnector.saveMissing(e,h,t,o,O,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);C&&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)]||A)})}):j(M,l,A))}g=this.extendTranslation(g,e,a,m,i),R&&g===l&&this.options.appendNamespaceToMissingKey&&(g="".concat(h).concat(d).concat(l)),(R||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 z=this.options.returnedObjectHandler?this.options.returnedObjectHandler(v,F,E(E({},a),{},{ns:c})):"key '".concat(l," (").concat(this.language,")' returned an object instead of string.");return o?(m.res=z,m.usedParams=this.getUsedParamsDetails(a),m):z}if(s){var H=Array.isArray(F),K=H?[]:{},V=H?y:v;for(var G in F)if(Object.prototype.hasOwnProperty.call(F,G)){var J="".concat(V).concat(s).concat(G);K[G]=w&&!g?this.translate(J,E(E({},a),{},{defaultValue:ft(A)?A[G]:void 0},{joinArrays:!1,ns:c})):this.translate(J,E(E({},a),{joinArrays:!1,ns:c})),K[G]===J&&(K[G]=F[G])}g=K}}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=ct.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?dt(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,pt["".concat(f[0],"-").concat(e)]||null===(u=o.utils)||void 0===u||!u.hasLoadedNamespace||null!==(c=o.utils)&&void 0!==c&&c.hasLoadedNamespace(a)||(pt["".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}}])}(ut),gt=function(){return p(function e(t){u(this,e),this.options=t,this.supportedLngs=this.options.supportedLngs||!1,this.logger=st.create("languageUtils")},[{key:"getScriptPartFromCode",value:function(e){if(!(e=rt(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=rt(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}}])}(),vt={zero:0,one:1,two:2,few:3,many:4,other:5},yt={select:function(e){return 1===e?"one":"other"},resolvedOptions:function(){return{pluralCategories:["one","other"]}}},bt=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=st.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=rt("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!"),yt;if(!e.match(/-|_/))return yt;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 vt[e]-vt[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))}}])}(),xt=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=Ye(e,n);return void 0!==i?i:Ye(t,n)}(e,t,n);return!a&&r&&He(n)&&void 0===(a=it(e,n,i))&&(a=it(t,n,i)),a},St=function(e){return e.replace(/\$/g,"$$$$")},Et=function(){return p(function e(){var t,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};u(this,e),this.logger=st.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:et,this.escapeValue=void 0===i||i,this.useRawValueToEscape=void 0!==r&&r,this.prefix=a?Ze(a):o||"{{",this.suffix=s?Ze(s):u||"}}",this.formatSeparator=l||",",this.unescapePrefix=c?"":h||"-",this.unescapeSuffix=this.unescapePrefix?"":c||"",this.nestingPrefix=d?Ze(d):p||Ze("$t("),this.nestingSuffix=f?Ze(f):m||Ze(")"),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=xt(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(xt(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 St(e)}},{regex:this.regexp,safeValue:function(e){return u.escapeValue?St(u.escape(e)):St(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(Ze(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}}])}(),wt=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)||F(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(rt(i),r),t[o]=s),s(n)}},Dt=function(e){return function(t,n,i){return e(rt(n),i)(t)}},Ct=function(){return p(function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};u(this,e),this.logger=st.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:Dt;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(C(a.splice(1,o))).join(this.formatSeparator)}return a.reduce(function(e,t){var a=wt(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=st.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!!!")}}])}(ut),Tt=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}},Ft=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(){},Bt="__i18next_supportNoticeShown",It=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=Ft(i),e.services={},e.logger=st,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=Tt();this.options=E(E(E({},l),this.options),Ft(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[Bt]||("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[Bt]=!0));var c=function(e){return e?"function"==typeof e?new e:e:null};if(!this.options.isClone){var h;this.modules.logger?st.init(c(this.modules.logger),this.options):st.init(null,this.options),h=this.modules.formatter?this.modules.formatter:Ct;var d=new gt(this.options);this.store=new lt(this.options.resources,this.options);var p=this.services;p.logger=st,p.resourceStore=this.store,p.languageUtils=d,p.pluralResolver=new bt(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 Et(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 mt(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=Ke(),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=Ke();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&&ct.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=Ke();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=dt(e,E(E({},i.options),t))),"".concat(a.keyPrefix).concat(c).concat(e)}):("function"==typeof e&&(e=dt(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=Ke();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=Ke();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 gt(Tt());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 lt(s,a),o.services.resourceStore=o.store}if(n.interpolation){var u=E(E(E({},Tt().interpolation),this.options.interpolation),n.interpolation),l=E(E({},a),{},{interpolation:u});o.services.interpolator=new Et(l)}return o.translator=new mt(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}}])}(ut),Rt=It.createInstance();Rt.createInstance,Rt.dir,Rt.init,Rt.loadResources,Rt.reloadResources,Rt.use,Rt.changeLanguage,Rt.getFixedT;var Lt=Rt.t;Rt.exists,Rt.setDefaultNamespace,Rt.hasLoadedNamespace,Rt.loadNamespaces,Rt.loadLanguages;var Ot={en:{translation:{settings:{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",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:"Customize 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)"},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}}."}},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."},updater:{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…"}}}};Rt.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 Mt=null,_t=null,Ut=null,jt=null,zt=null,Ht=!1,Kt=[];function Vt(){try{return"undefined"==typeof window?null:window._yttv||null}catch(e){return null}}function Gt(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 Jt(e){if(zt)try{zt(e)}catch(e){}}function Wt(){var e=Vt();if(e){if(e===Mt&&null!==Ut){var t=Gt(e,_t);if(t&&t.root===Ut&&t.instance===jt)return Jt(t.instance),t.instance}Mt=e,Ut=null,jt=null,_t=null;try{for(var n in e){var i=Gt(e,n);if(i)return _t=n,Ut=i.root,jt=i.instance,Jt(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!!Wt()}function qt(e,t){var n=Wt();return n?{dispatched:!0,result:n.resolveCommand(e,t)}:{dispatched:!1}}function Yt(e,t){return qt(e,t).result}function Qt(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 Zt(){var e=Vt();if(!e)return!1;var t=!1;try{for(var n in e){var i=Gt(e,n);i&&(t=!0,Jt(i.instance))}}catch(e){}return t}var $t=[250,1e3,3e3];function en(){Zt();var e,t=f(Kt);try{for(t.s();!(e=t.n()).done;){var n=e.value;clearTimeout(n)}}catch(e){t.e(e)}finally{t.f()}Kt=$t.map(function(e){return setTimeout(Zt,e)})}function tn(e){return cn(Lt("menu.addToQueue"),{clickTrackingParams:null,playlistEditEndpoint:{customAction:{action:"ADD_TO_QUEUE",parameters:e}}})}function nn(e,t){return Yt(e,t)}function rn(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}),nn({openPopupAction:{popupType:"TOAST",popup:{overlayToastRenderer:i}}})}function an(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);nn(r)}function on(e,t){return{overlayPanelItemListRenderer:{items:e,selectedIndex:t}}}function sn(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 un(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 ln(e){return{clickTrackingParams:null,showMenuCommand:{contentId:e.videoId,thumbnail:{thumbnails:e.thumbnails},title:{simpleText:e.title},subtitle:{simpleText:e.subtitle},menu:{menuRenderer:{items:[hn(Lt("menu.play"),{clickTrackingParams:null,watchEndpoint:e.watchEndpointData}),cn(Lt("menu.saveWatchLater"),{clickTrackingParams:null,playlistEditEndpoint:{playlistId:"WL",actions:[{addedVideoId:e.videoId,action:"ACTION_ADD_VIDEO"}]}}),hn(Lt("menu.saveToPlaylist"),{clickTrackingParams:null,addToPlaylistEndpoint:{videoId:e.videoId}}),tn(e.item)],trackingParams:null,accessibility:{accessibilityData:{label:"Video options"}}}}}}}function cn(e,t){return{menuServiceItemRenderer:{text:{runs:[{text:e}]},serviceEndpoint:t,trackingParams:null}}}function hn(e,t){return{menuNavigationItemRenderer:{text:{runs:[{text:e}]},navigationEndpoint:t,trackingParams:null}}}function dn(e){return{overlayMessageRenderer:{title:{simpleText:e}}}}function pn(e){return{qrCodeRenderer:{qrCodeImage:{thumbnails:[{url:e}]},style:"QR_CODE_RENDERER_STYLE_ATA_SIDESHEET",trackingParams:null}}}function fn(e,t,n,i){return{isDisabled:e,text:{runs:[{text:t}]},icon:{iconType:n},command:i,trackingParams:null}}var mn,gn=(mn=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(mn,"ms")))},mn)});return Promise.race([fetch(e,i),a]).finally(function(){null!==r&&clearTimeout(r)})});function vn(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 yn=vn(256),bn=vn(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 Sn(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 En(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=Sn(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 wn(e){var t=we("enableDeArrowTitles"),n=we("enableDeArrowThumbnails"),i=we("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(!bn.get(t)){var o=e.tileRenderer;bn.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=yn.get(r);if(s)return s.data?En(i,r,s.data,t,n):Array.isArray(s.waiters)&&s.waiters.push(o),0;var u={data:null,waiters:[o]};yn.set(r,u),gn("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;En(a.item,r,e,a.titlesEnabled,a.thumbnailsEnabled)}}catch(e){i.e(e)}finally{i.f()}}).catch(function(){yn.get(r)===u&&yn.delete(r)})},a=e.length-1;a>=0;a--)r()}var kn=["maxresdefault.jpg","sddefault.jpg","hqdefault.jpg","mqdefault.jpg","default.jpg"],Dn={"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}},Cn=vn(256),An=new Map;function Tn(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 Fn(e){return Array.isArray(e)&&e.length>0&&e[0].width&&e[0].width>100}var Pn=vn(256);function Bn(e){var t,n=[],i=f(kn);try{for(i.s();!(t=i.n()).done;){var r=t.value,a=Dn[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 In(e,t){if(e&&"object"===T(e))for(var n in e)"thumbnails"===n&&Fn(e[n])?e[n]=t:"object"===T(e[n])&&In(e[n],t)}function Rn(e){if("eager"===Ie()){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)===Pn.get(u))continue;var l=Pn.get(u);l||(l=Pn.set(u,Bn(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&&In(i.tileRenderer.onFocusCommand,l)}catch(e){console.warn("[AxoTube:hqThumbnails] Error processing thumbnail:",e)}}}catch(e){n.e(e)}finally{n.f()}}}function Ln(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=be(t.metadata)),void 0!==t.header&&(n.header=be(t.header)),void 0!==t.onSelectCommand&&(n.onSelectCommand=be(t.onSelectCommand)),{tileRenderer:n}}function On(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 Nn(e){if(we("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)&&!On(h)&&h.push(tn(Ln(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=Ln(l),v=ln({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()}}}function Mn(e){if(Be()&&!/#\/watch/.test(location.hash||"")){var t,n=1e3*we("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=be({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 _n(e){if(!we("enableHideWatchedVideos"))return e;var t=we("hideWatchedVideosPages");if(!t||!t.length)return e;var n=we("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 Un(e){try{return e&&"function"==typeof e.getInstance&&e.getInstance()||null}catch(e){return null}}function jn(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 zn(){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=Un(i);if(r){try{if(i.toString().includes("ytlrActionRouter")){t=jn(e=r);break}}catch(e){}var a=jn(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}}}}Ce.addEventListener("configChange",function(e){if("disabledSidebarContents"===e.detail.key||"disableChannelsOnSidebar"===e.detail.key)try{var t=zn();t&&t.executeFunction(new t.commandFunction("reloadGuideAction"))}catch(e){console.warn("[AxoTube:customGuideAction] Guide reload failed:",e)}});var Hn=null;function Kn(e,t){var n=(Array.isArray(e.timelyActionRenderers)?e.timelyActionRenderers:[]).filter(function(e){return!function(e){var t,n=null==e||null===(t=e.timelyActionRenderer)||void 0===t?void 0:t.actionButtons;return!!Array.isArray(n)&&n.some(function(e){var t;return"SKIP"===(null==e||null===(t=e.buttonRenderer)||void 0===t||null===(t=t.command)||void 0===t||null===(t=t.showEngagementPanelEndpoint)||void 0===t||null===(t=t.customAction)||void 0===t?void 0:t.action)})}(e)});e.timelyActionRenderers=n.concat(t)}!function(e){if(Hn)return Hn;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)}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,Hn=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){var t,n,i,r,a,o,s,u,l,c;if(e.adPlacements||e.playerAds||e.adSlots||e.paidContentOverlay||e.streamingData||e.contents||e.endscreen||e.messages||e.entries||e.title||e.continuationContents||e.playerOverlays||e.transportControls){var h,d,p,m,g,v,y,b=we("enableAdBlock"),x=we("enableSigninReminder");if(e.adPlacements&&b&&(e.adPlacements=[]),e.playerAds&&b&&(e.playerAds=!1),e.adSlots&&b&&(e.adSlots=[]),e.paidContentOverlay&&!we("enablePaidPromotionOverlay")&&(e.paidContentOverlay=null),null!=e&&null!==(t=e.streamingData)&&void 0!==t&&t.adaptiveFormats&&"any"!==we("videoPreferredCodec")){var S=we("videoPreferredCodec");e.streamingData.adaptiveFormats.find(function(e){return e.mimeType&&e.mimeType.includes(S)})&&(e.streamingData.adaptiveFormats=e.streamingData.adaptiveFormats.filter(function(e){return!(!e.mimeType||!e.mimeType.startsWith("audio/"))||e.mimeType&&e.mimeType.includes(S)}))}if(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&&null!==(n=n.sectionListRenderer)&&void 0!==n&&n.contents){if(x||(e.contents.tvBrowseRenderer.content.tvSurfaceContentRenderer.content.sectionListRenderer.contents=e.contents.tvBrowseRenderer.content.tvSurfaceContentRenderer.content.sectionListRenderer.contents.filter(function(e){return!e.feedNudgeRenderer})),b){e.contents.tvBrowseRenderer.content.tvSurfaceContentRenderer.content.sectionListRenderer.contents=e.contents.tvBrowseRenderer.content.tvSurfaceContentRenderer.content.sectionListRenderer.contents.filter(function(e){return!e.adSlotRenderer});var E,w=f(e.contents.tvBrowseRenderer.content.tvSurfaceContentRenderer.content.sectionListRenderer.contents);try{for(w.s();!(E=w.n()).done;){var k,D=E.value;D.shelfRenderer&&null!==(k=D.shelfRenderer.content)&&void 0!==k&&null!==(k=k.horizontalListRenderer)&&void 0!==k&&k.items&&(D.shelfRenderer.content.horizontalListRenderer.items=D.shelfRenderer.content.horizontalListRenderer.items.filter(function(e){return!e.adSlotRenderer}))}}catch(e){w.e(e)}finally{w.f()}}Xn(e.contents.tvBrowseRenderer.content.tvSurfaceContentRenderer.content.sectionListRenderer.contents)}if(e.endscreen&&we("enableHideEndScreenCards")&&(e.endscreen=null),e.messages&&Array.isArray(e.messages)&&!we("enableYouThereRenderer")&&(e.messages=e.messages.filter(function(e){return!(null!=e&&e.youThereRenderer)})),!Array.isArray(e)&&null!=e&&e.entries&&b)e.entries=null===(h=e.entries)||void 0===h?void 0:h.filter(function(e){var t;return!(null!=e&&null!==(t=e.command)&&void 0!==t&&null!==(t=t.reelWatchEndpoint)&&void 0!==t&&null!==(t=t.adClientParams)&&void 0!==t&&t.isAd)});if(null!=e&&null!==(i=e.title)&&void 0!==i&&i.runs&&(d=e,y=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"),m="axotube_open_action",g={customAction:{action:"AXO_SETTINGS_SHOW",parameters:[]}},v=Lt("settings.ttSettings.summary"),{settingActionRenderer:{title:{runs:[{text:p}]},serviceEndpoint:g,summary:{runs:[{text:v}]},trackingParams:"null",actionLabel:{runs:[{text:p}]},itemId:m,thumbnail:{thumbnails:[{url:"https://www.gstatic.com/ytlr/img/parent_code.png"}]}}})]),d.items&&Array.isArray(d.items)||(d.items=[]),d.items.unshift(y)),null!=e&&null!==(r=e.contents)&&void 0!==r&&null!==(r=r.sectionListRenderer)&&void 0!==r&&r.contents&&Xn(e.contents.sectionListRenderer.contents),null!=e&&null!==(a=e.continuationContents)&&void 0!==a&&null!==(a=a.sectionListContinuation)&&void 0!==a&&a.contents&&Xn(e.continuationContents.sectionListContinuation.contents),null!=e&&null!==(o=e.continuationContents)&&void 0!==o&&null!==(o=o.horizontalListContinuation)&&void 0!==o&&o.items){var C=e.continuationContents.horizontalListContinuation.items;Rn(C),wn(C),Nn(C),e.continuationContents.horizontalListContinuation.items=_n(C)}if(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&&s.sections)for(var A=0;A<e.contents.tvBrowseRenderer.content.tvSecondaryNavRenderer.sections.length;A++){var T=e.contents.tvBrowseRenderer.content.tvSecondaryNavRenderer.sections[A].tvSecondaryNavSectionRenderer;if(T&&T.tabs){we("sortSubscriptionsByAlphabet")&&T.tabs.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});for(var F=0;F<T.tabs.length;F++){var P,B=T.tabs[F];if(null!==(P=B.tabRenderer.content)&&void 0!==P&&null!==(P=P.tvSurfaceContentRenderer)&&void 0!==P&&null!==(P=P.content)&&void 0!==P&&null!==(P=P.sectionListRenderer)&&void 0!==P&&P.contents){var I=T.tabs.indexOf(B),R=B.tabRenderer.content.tvSurfaceContentRenderer.content.sectionListRenderer.contents;Xn(R),T.tabs[I].tabRenderer.content.tvSurfaceContentRenderer.content.sectionListRenderer.contents=R}}}}if(null!=e&&null!==(u=e.contents)&&void 0!==u&&null!==(u=u.singleColumnWatchNextResults)&&void 0!==u&&null!==(u=u.pivot)&&void 0!==u&&u.sectionListRenderer&&(x||(e.contents.singleColumnWatchNextResults.pivot.sectionListRenderer.contents=e.contents.singleColumnWatchNextResults.pivot.sectionListRenderer.contents.filter(function(e){return!e.alertWithActionsRenderer})),Xn(e.contents.singleColumnWatchNextResults.pivot.sectionListRenderer.contents,!1),window.queuedVideos.videos.length>0)){var L=window.queuedVideos.videos.slice();L.unshift({tileRenderer:{contentType:"TILE_CONTENT_TYPE_VIDEO",metadata:{tileMetadataRenderer:{title:{simpleText:"Clear Queue"}}},onSelectCommand:{customAction:{action:"CLEAR_QUEUE"}},style:"TILE_STYLE_YTLR_DEFAULT"}}),e.contents.singleColumnWatchNextResults.pivot.sectionListRenderer.contents.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",L,-1!==L.findIndex(function(e){return e.contentId===window.queuedVideos.lastVideoId})?L.findIndex(function(e){return e.contentId===window.queuedVideos.lastVideoId}):0))}var O,N=null==e||null===(l=e.playerOverlays)||void 0===l?void 0:l.playerOverlayRenderer;if(N){var M,_=we("sponsorBlockManualSkips"),U=[];if(Array.isArray(_)&&_.length>0&&null!==(M=window)&&void 0!==M&&null!==(M=M.sponsorblock)&&void 0!==M&&M.segments){var j,z=f(window.sponsorblock.segments);try{for(z.s();!(j=z.n()).done;){var H=j.value;_.includes(H.category)&&U.push(un(Lt("sponsorblock.toasts.skip",{segment:Lt("sponsorblock.segments.".concat(H.category))}),"SKIP_NEXT",{clickTrackingParams:null,showEngagementPanelEndpoint:{customAction:{action:"SKIP",parameters:{time:H.segment[1]}}}},1e3*H.segment[0],1e3*H.segment[1]-1e3*H.segment[0]))}}catch(e){z.e(e)}finally{z.f()}}Kn(N,U)}if(null!=e&&null!==(c=e.transportControls)&&void 0!==c&&null!==(c=c.transportControlsRenderer)&&void 0!==c&&c.promotedActions&&we("enableSponsorBlockHighlight"))if(null!==(O=window)&&void 0!==O&&null!==(O=O.sponsorblock)&&void 0!==O&&O.segments){var K=window.sponsorblock.segments.find(function(e){return"poi_highlight"===e.category});K&&e.transportControls.transportControlsRenderer.promotedActions.push({type:"TRANSPORT_CONTROLS_BUTTON_TYPE_SPONSORBLOCK_HIGHLIGHT",button:{buttonRenderer:fn(!1,Lt("sponsorblock.toasts.skipToHighlight"),"SKIP_NEXT",{clickTrackingParams:null,customAction:{action:"SKIP",parameters:{time:K.segment[0]}}})}})}}},function(e){if(Array.isArray(e.items)){var t=we("disabledSidebarContents"),n=we("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--))}}}}]);var Vn=JSON.stringify;function Gn(e){return!(!e||!e.adSlotRenderer)}function Jn(e){var t;return!!(e&&e.tileRenderer&&("TVHTML5_TILE_RENDERER_TYPE_SHORTS"===e.tileRenderer.tvhtml5ShelfRendererType||null!==(t=e.tileRenderer.onSelectCommand)&&void 0!==t&&t.reelWatchEndpoint))}function Wn(e){var t;return!(!e||"object"!==T(e))&&(!!Object.keys(e).some(function(e){return-1!==e.toLowerCase().indexOf("promo")})||!(null===(t=e.shelfRenderer)||void 0===t||null===(t=t.tvhtml5Metadata)||void 0===t||!t.hideLogo))}function Xn(e){for(var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=!we("enableShorts"),i=!!we("enableAdBlock"),r=e.length-1;r>=0;r--){var a,o=e[r];if(o&&"object"===T(o))if(i&&Wn(o))e.splice(r,1);else if(o.shelfRenderer){var s=null===(a=o.shelfRenderer.content)||void 0===a?void 0:a.horizontalListRenderer;if(s&&s.items)if(n&&"TVHTML5_SHELF_RENDERER_TYPE_SHORTS"===o.shelfRenderer.tvhtml5ShelfRendererType)e.splice(r,1);else{var u=s.items;(i||n)&&(u=u.filter(function(e){return!(i&&Gn(e)||n&&Jn(e))}),s.items=u),Rn(u),wn(u),Nn(u),t&&Mn(u),s.items=_n(u)}}}}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,Vn.apply(this,arguments)}finally{a?r.isInlinePlaybackNoAd=o:delete r.isInlinePlaybackNoAd}}return Vn.apply(this,arguments)},window.JSON.stringify=JSON.stringify;var qn={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 Yn(){try{return!("undefined"==typeof window||!window.tectonicConfig||"object"!==T(window.tectonicConfig.featureSwitches))&&(window.tectonicConfig.disallowUnifiedFlagAccess=!1,Object.assign(window.tectonicConfig.featureSwitches,qn),!0)}catch(e){return!1}}var Qn=0;function Zn(e){if("off"!==Ie()&&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=Tn(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=Cn.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=Cn.get(e);if(n)t(n);else if(An.has(e))An.get(e).push(t);else{An.set(e,[t]);var i=function(t){var n=An.get(e)||[];An.delete(e),Cn.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 $n(){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&&Zn(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++)Zn(i[r]);e.style&&e.style.backgroundImage&&Zn(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?Tn(m):null;if(f&&f===v)continue;o.removeAttribute("data-hq-upgraded"),Zn(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"!==Ie()?o():(i&&(i.disconnect(),i=null),a&&(cancelAnimationFrame(a),a=null),r=null)},u=["enableHqThumbnails","enablePerformanceMode","enableReducedMotion","enableLowMemoryMode"];Ce.addEventListener("configChange",function(e){e.detail&&-1!==u.indexOf(e.detail.key)&&s()}),s()}!function e(){Yn()||(Qn+=1)>=50||setTimeout(e,200)}(),Ce.addEventListener("configChange",function(){Yn()}),"loading"===document.readyState?document.addEventListener("DOMContentLoaded",function(){setTimeout($n,1e3)}):setTimeout($n,1e3);var ei=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 w=h[i]>>8*r&255;u+=(w<16?0:"")+w.toString(16)}return u},ti={player:[],video:[],videoId:[]},ni=null,ii=null,ri=null,ai=null,oi=!1;function si(){return document.querySelector(".html5-video-player")}function ui(){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 ci(e,t,n){ti[e].slice().forEach(function(e){try{e(t,n)}catch(e){console.warn("[AxoTube:playerLifecycle] Listener failed:",e)}})}function hi(){var e=si(),t=ui(),n=li(e),i=ni,r=ii,a=ri;ni=e,ii=t,ri=n,e!==i&&ci("player",e,i),t!==r&&ci("video",t,r),n!==a&&ci("videoId",n,a)}function di(e,t){if("function"!=typeof t)throw new TypeError("A lifecycle listener must be a function");oi||(oi=!0,window.addEventListener("hashchange",hi),document.addEventListener("DOMContentLoaded",hi),ai=setInterval(hi,2e3),hi()),hi(),ti[e].push(t);var n="player"===e?ni:"video"===e?ii:ri;try{t(n,null)}catch(e){console.warn("[AxoTube:playerLifecycle] Listener failed:",e)}return function(){var n=ti[e].indexOf(t);-1!==n&&ti[e].splice(n,1),ti.player.length||ti.video.length||ti.videoId.length||oi&&(oi=!1,clearInterval(ai),ai=null,window.removeEventListener("hashchange",hi),document.removeEventListener("DOMContentLoaded",hi),ni=null,ii=null,ri=null)}}function pi(e){return di("player",e)}function fi(e){return di("video",e)}function mi(e){return di("videoId",e)}var gi=.05,vi=0,yi={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"}},bi=vn(20),xi="axotube-sponsorblock-segments",Si='ytlr-progress-bar [idomkey="slider"]',Ei="".concat(Si,"::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){var t=document.getElementById(xi);e?(t||((t=document.createElement("style")).id=xi,(document.head||document.documentElement).appendChild(t)),t.textContent!==e&&(t.textContent=e)):t&&(t.textContent="")}function ki(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 Di=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!==vi){var e=we("sponsorBlockManualSkips");this.manualSkippableCategories=Array.isArray(e)?e:[],this.skippableCategories=this.getSkippableCategories(),this.configGen=vi}}},{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=bi.get(this.videoID);if(t)this.applySegments(t);else{var n,i,r,a=ei(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);bi.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 we("enableSponsorBlockSponsor")&&e.push("sponsor"),we("enableSponsorBlockIntro")&&e.push("intro"),we("enableSponsorBlockOutro")&&e.push("outro"),we("enableSponsorBlockInteraction")&&e.push("interaction"),we("enableSponsorBlockSelfPromo")&&e.push("selfpromo"),we("enableSponsorBlockPreview")&&e.push("preview"),we("enableSponsorBlockFiller")&&e.push("filler"),we("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]:ui();this.active&&Ai()===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||ui(),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:yi[e.category]?yi[e.category].color:"blue"}}).sort(function(e,t){return e.end-e.start-(t.end-t.start)}),r="".concat(Ei," ").concat(Si,"::after { background: ").concat(ki(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(ki(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,wi(n))}}},{key:"scheduleSkip",value:function(){if(this.active&&we("enableSponsorBlock")&&this.segments&&Ai()===this.videoID){var e=ui();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+gi)&&(!(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+gi||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),we("enableSponsorBlockToasts"))){var a,o=(null===(a=yi[e.category])||void 0===a?void 0:a.name)||e.category;rn(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(ui()===this.video&&Ai()===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=yi[e.category])||void 0===n?void 0:n.name)||e.category;we("enableSponsorBlockToasts")&&rn(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(),we("enableSponsorBlockToasts")){var n,i=(null===(n=yi[e.category])||void 0===n?void 0:n.name)||e.category;rn(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-gi)&&!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="",wi(""),this.handled.clear(),this.rearms.clear(),this.notSkippingToasted.clear()}}])}();window.sponsorblock=null;var Ci=!1;function Ai(){var e=/[?&]v=([^&]+)/.exec(location.hash);return e?e[1]:null}function Ti(){var e=Ai(),t=!!we("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 Di(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()&&(Ci=!0,e.preventDefault(),e.stopPropagation(),e.stopImmediatePropagation())}},!0),window.addEventListener("keyup",function(e){10009===e.keyCode&&Ci&&(Ci=!1,e.preventDefault(),e.stopPropagation(),e.stopImmediatePropagation())},!0),window.addEventListener("hashchange",Ti,!1),fi(function(e){var t=window.sponsorblock;t&&e&&t.segments&&t.attachVideo(e)}),Ce.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")||(vi+=1,Ti())}),"loading"===document.readyState?document.addEventListener("DOMContentLoaded",Ti):Ti();var Fi=["timeupdate","durationchange","ratechange","seeked","play","pause"],Pi=null,Bi=null,Ii=null,Ri=!1;function Li(e){return e<10?"0".concat(e):String(e)}function Oi(e){var t=Math.floor(e/3600),n=Math.floor(e%3600/60),i=e%60;return t>0?"".concat(t,":").concat(Li(n),":").concat(Li(i)):"".concat(n,":").concat(Li(i))}function Ni(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 Mi(){var e=!!we("enableRemainingTime");if(e||Ri){var t;Bi&&Bi.parentNode||(t=function(){var e=document.querySelector('[idomkey="time-label"] > [idomkey="elapsedTime"]');return e?e.parentElement:null}(),t!==Bi&&(Ii&&Ii.disconnect(),Ii=null,Ri=!1,(Bi=t)&&(Ii=new MutationObserver(function(){return Mi()})).observe(Bi,{characterData:!0,childList:!0,subtree:!0})));var n=function(){var e=Bi?Bi.querySelector('[idomkey="elapsedTime"]'):null,t=e?e.firstChild:null;return t&&t.nodeType===Node.TEXT_NODE?t:null}();if(n){var i=si(),r=e&&!!i&&/#\/watch/.test(location.hash||"")&&!function(e){var t=Ni(e,"getVideoData",null);return!(!t||!t.isLive)}(i);if(r){var a=Math.floor(Ni(i,"getDuration",0)),o=Math.floor(Ni(i,"getCurrentTime",0)),s=Ni(i,"getPlaybackRate",1)||1,u=Math.round(Math.max(0,(a-o)/s)),l="-".concat(Oi(u));Ri=!0,n.data!==l&&(n.data=l)}else{if(Ri){var c=Math.floor(Ni(i,"getCurrentTime",0));n.data=Oi(c)}Ri=!1}}}}fi(function(e){return function(e){e!==Pi&&(Pi&&Fi.forEach(function(e){return Pi.removeEventListener(e,Mi)}),(Pi=e)&&Fi.forEach(function(e){return Pi.addEventListener(e,Mi)}),Mi())}(e)}),Ce.addEventListener("configChange",function(e){var t;"enableRemainingTime"===(null===(t=e.detail)||void 0===t?void 0:t.key)&&Mi()});var _i=["AXO_SETTINGS_SHOW","AXO_SPEED_SETTINGS_SHOW","SETTINGS_OPEN"];function Ui(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!==_i.indexOf(e.customAction.action)?"popup":null}(e)}function ji(){var e=si();if(e&&"function"==typeof e.pauseVideo)try{return void e.pauseVideo()}catch(e){}var t=ui();t&&!t.paused&&t.pause()}window.addEventListener("visibilitychange",function(e){we("enablePauseOnBlur")&&document.hidden&&(e.stopImmediatePropagation(),ji())},!0);var zi=["ytlr-player-page","ytlr-player-actions-container","ytlr-progress-bar"],Hi=[10,30,60],Ki={},Vi={},Gi={},Ji=0,Wi=0,Xi=-1/0,qi=null;function Yi(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 Qi(e,t){var n=si();try{if(n&&"function"==typeof n.setPlaybackRate)return void n.setPlaybackRate(t)}catch(e){}e.playbackRate=t}function Zi(e,t){var n=e.duration;return n>0?Math.max(0,Math.min(n,t)):null}function $i(e){e.preventDefault(),e.stopPropagation(),e.stopImmediatePropagation()}function er(e,t){var n=Vi[e];if(n)if(n.timer=null,39===e){if(t.paused)return;n.rateBefore=t.playbackRate||1,Qi(t,2)}else 37===e&&(n.ticker=setInterval(function(){var e=ui();e&&(qi=null,function(e,t){var n=Zi(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)&&we("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&&!Yi(t)}(e.target)||function(){for(var e=document.querySelectorAll(".zylon-focus"),t=0;t<e.length;t++){var n=e[t];if(!(Yi(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<zi.length;e++){var t=document.querySelector(zi[e]);if(t&&!Yi(t)){var n=window.getComputedStyle(t);if("hidden"!==n.visibility&&parseFloat(n.opacity)>0&&t.getClientRects().length>0)return!0}}return!1}())){var n=ui();if(n)if(Vi[t])$i(e);else{var i=Date.now();if(void 0!==Gi[t]&&i-Gi[t]<100)$i(e);else{if(Gi[t]=i,13===t)!function(e){var t=si(),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),Vi[t]={timer:null};else{var r=37===t?-1:1,a=function(e,t){var n=e===Ji&&t-Xi<=1e3;return Wi=n?Wi+1:0,Ji=e,n||(qi=null),Hi[Math.min(Wi,Hi.length-1)]}(r,i)*r,o=Zi(n,(Wi>0&&null!==qi?qi:n.currentTime)+a);null!==o&&(qi=o,n.currentTime=o),Vi[t]={timer:setTimeout(function(){return er(t,ui())},1e3)}}Ki[t]=!0,$i(e)}}}},!0),window.addEventListener("keyup",function(e){var t=e.keyCode;if(Ki[t]){delete Ki[t],$i(e);var n=Vi[t];if(delete Vi[t],n){if(n.timer&&clearTimeout(n.timer),n.ticker&&clearInterval(n.ticker),void 0!==n.rateBefore){var i=ui();i&&Qi(i,n.rateBefore)}13!==t&&(Xi=Date.now())}}},!0);var tr=0;function nr(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=++tr,t=0,n=function(){if(e===tr&&we("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=nr(r,t,n);return a&&"function"==typeof e.setOption&&e.setOption("captions","track",a),"done"}(si(),we("autoSubtitleLanguage")||"en",!!we("autoSubtitleAllowAuto"));t+=1,"retry"===i&&t<8&&setTimeout(n,1e3)}};n()}mi(function(e){e&&ir()});var rr='/* 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',ar="/* ytaf-theme-start */",or="/* ytaf-theme-end */",sr=document.createElement("style"),ur="",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 cr(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 hr(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 dr(){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""}}(we("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=we("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=cr(getComputedStyle(a[o]).color);if(!(null===s||s<.3)){var u=s>.8?0:s>.55?1:2,l=hr(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}(we("textTheme"));ur="\n ".concat(ar,"\n #container {\n ").concat(n,"\n }\n ").concat(i,"\n ").concat(r,"\n ").concat(or,"\n");var a=document.querySelector("style[nonce]");if(a){var o=a.textContent||"",s=o.indexOf(ar),u=o.indexOf(or);-1!==s&&-1!==u&&(o=o.slice(0,s)+o.slice(u+20)),a.textContent=o+ur}else sr.textContent=ur,!sr.parentNode&&document.head&&document.head.appendChild(sr)}document.head&&document.head.appendChild(sr),dr(),setTimeout(dr,1500);var pr=null;window.addEventListener&&window.addEventListener("hashchange",function(){pr&&clearTimeout(pr),pr=setTimeout(dr,150)});var fr="1.30.2";function mr(e,t,n){if("arrayValue"===t){var i=we(e),r=Array.isArray(i)?i.slice():[];return r.includes(n)?r.splice(r.indexOf(n),1):r.push(n),ke(e,r)}if("themePreset"===e){var a="string"==typeof n&&Object.prototype.hasOwnProperty.call(de.themePresetColors,n)?de.themePresetColors[n]:null;return!("string"!=typeof a||!/^#[0-9a-f]{6}$/i.test(a))&&(ke("routeColor",a),ke("themePreset",n))}return ke(e,n)}var gr,vr={};var yr=(gr||(gr=1,vr.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=C(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},C=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},A=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=A(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}()),vr),br=e(yr),xr=vn(50);function Sr(e){if(xr.has(e))return xr.get(e);try{var t,n=br.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 xr.set(e,i),i}catch(e){console.error("[AxoTube:qrCode] QR code generation failed:",e)}return null}var Er=[{type:"sponsor",key:"enableSponsorBlockSponsor",icon:"MONEY_HEART"},{type:"intro",key:"enableSponsorBlockIntro",icon:"PLAY_CIRCLE"},{type:"outro",key:"enableSponsorBlockOutro",icon:"STOP_CIRCLE"},{type:"interaction",key:"enableSponsorBlockInteraction",icon:"TOUCH_APP"},{type:"selfpromo",key:"enableSponsorBlockSelfPromo",icon:"PROMOTION"},{type:"preview",key:"enableSponsorBlockPreview",icon:"PREVIEW"},{type:"filler",key:"enableSponsorBlockFiller",icon:"PADDING"},{type:"music_offtopic",key:"enableSponsorBlockMusicOfftopic",icon:"MUSIC_NOTE"}],wr={skip:"show",show:"off",off:"skip"},kr=["default","black","darkGray","charcoal","navy","darkRed","darkGreen","darkPurple"],Dr=["default","white","gray","red","blue","green","purple","yellow"],Cr=["auto","2160p","1440p","1080p","720p","480p","360p","240p","144p"],Ar=["any","vp9","av01","avc1"],Tr=["en","hi","es","fr","de","pt","ja","ko","ru"],Fr=["1440p","2160p"],Pr=[.05,.1,.15,.2,.25,.3,.35,.4,.45,.5],Br=[0,.5,1,1.5,2,2.5,3,3.5,4,4.5,5],Ir=[0,10,20,30,40,50,60,70,80,90,100],Rr=[10,20,30,60,120,180,240,300],Lr=[.1,.2,.3,.4,.5,.6,.7,.8,.9,1],Or=[{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 Nr(e){return JSON.stringify({browseEndpoint:{browseId:e}})}var Mr=[{name:"Search",icon:"SEARCH",value:JSON.stringify({searchEndpoint:{query:""}})},{name:"Home",icon:"WHAT_TO_WATCH",value:Nr("FEtopics")},{name:"Sports",icon:"TROPHY",value:Nr("FEtopics_sports")},{name:"News",icon:"NEWS",value:Nr("FEtopics_news")},{name:"Music",icon:"YOUTUBE_MUSIC",value:Nr("FEtopics_music")},{name:"Podcasts",icon:"BROADCAST",value:Nr("FEtopics_podcasts")},{name:"Movies & TV",icon:"CLAPPERBOARD",value:Nr("FEtopics_movies")},{name:"Gaming",icon:"GAMING",value:Nr("FEtopics_gaming")},{name:"Live",icon:"LIVE",value:Nr("FEtopics_live")},{name:"Subscriptions",icon:"SUBSCRIPTIONS",value:Nr("FEsubscriptions")},{name:"Library",icon:"TAB_LIBRARY",value:Nr("FElibrary")},{name:"More",icon:"TAB_MORE",value:Nr("FEtopics_more")}];function _r(e){var t=Ur(e);return t&&we(t.key)?-1!==(we("sponsorBlockManualSkips")||[]).indexOf(e)?"show":"skip":"off"}function Ur(e){for(var t=0;t<Er.length;t++)if(Er[t].type===e)return Er[t];return null}function jr(e,t,n){return{name:e,icon:n,value:t}}function zr(e,t,n){return{name:e,key:t,value:n}}function Hr(e,t,n,i){return{name:e,icon:t,value:null,menuHeader:i,options:n}}function Kr(e,t){return{title:e,subtitle:t}}function Vr(e,t){return{name:e,icon:"OPEN_IN_NEW",value:null,options:{title:e,subtitle:t,content:[Lt("settings.about.scanMessage",{name:e}),{qrLink:t}]}}}function Gr(){var e;return[Hr(Lt("settings.ads.title"),"SLASH_CIRCLE_LEFT",[jr(Lt("settings.ads.blockAds"),"enableAdBlock","HEALTH_AND_SAFETY"),jr(Lt("settings.ads.paidPromotion"),"enablePaidPromotionOverlay","PAID"),jr(Lt("settings.ads.sponsorBlock"),"enableSponsorBlock","SPONSORSHIP_STAR"),Hr(Lt("settings.ads.segmentTypes.title"),"SETTINGS",Er.map(function(e){return{name:Lt("settings.ads.segments.".concat(e.type)),icon:e.icon,segment:e.type}}),Kr(Lt("settings.ads.segmentTypes.title"),Lt("settings.ads.segmentTypes.subtitle"))),jr(Lt("settings.ads.highlightButton"),"enableSponsorBlockHighlight","STAR"),jr(Lt("settings.ads.notices"),"enableSponsorBlockToasts","INFO")],Kr(Lt("settings.ads.title"),Lt("settings.ads.subtitle"))),Hr(Lt("settings.playback.title"),"PLAY_CIRCLE",[Hr(Lt("settings.playback.quality.title"),"VIDEO_QUALITY",Cr.map(function(e){return zr("auto"===e?Lt("settings.common.auto"):e,"preferredVideoQuality",e)}),Kr(Lt("settings.playback.quality.title"),Lt("settings.playback.quality.subtitle"))),Hr(Lt("settings.playback.codec.title"),"VIDEO_QUALITY",Ar.map(function(e){return zr("any"===e?Lt("settings.common.any"):e.toUpperCase(),"videoPreferredCodec",e)}),Kr(Lt("settings.playback.codec.title"),Lt("settings.playback.codec.subtitle"))),Hr(Lt("settings.playback.speedStep.title"),"SLOW_MOTION_VIDEO",Pr.map(function(e){return zr("".concat(e,"x"),"speedSettingsIncrement",e)}),Kr(Lt("settings.playback.speedStep.title"),Lt("settings.playback.speedStep.subtitle"))),(e=le(),e&&e.SetFrameRate?Hr(Lt("settings.playback.frameRate.title"),"SYNC",[jr(Lt("settings.playback.frameRate.match"),"autoFrameRate","SCREEN_SWITCH"),Hr(Lt("settings.playback.frameRate.pause.title"),"TIMER",Br.map(function(e){return zr(Zr(e),"autoFrameRatePauseVideoFor",1e3*e)}),Kr(Lt("settings.playback.frameRate.pause.title"),Lt("settings.playback.frameRate.pause.subtitle")))],Kr(Lt("settings.playback.frameRate.title"),Lt("settings.playback.frameRate.subtitle"))):null),Hr(Lt("settings.playback.captions.title"),"CAPTIONS",[jr(Lt("settings.playback.captions.onByDefault"),"enableAutoSubtitles","CLOSED_CAPTION_SELECTED"),Hr(Lt("settings.playback.captions.language.title"),"TRANSLATE",Tr.map(function(e){return zr(Lt("settings.playback.languages.".concat(e)),"autoSubtitleLanguage",e)}),Kr(Lt("settings.playback.captions.language.title"),Lt("settings.playback.captions.language.subtitle"))),jr(Lt("settings.playback.captions.allowAuto"),"autoSubtitleAllowAuto","SPARKLE"),jr(Lt("settings.playback.captions.myLanguage"),"enableShowUserLanguage","LANGUAGE"),jr(Lt("settings.playback.captions.otherLanguages"),"enableShowOtherLanguages","TRANSLATE")],Kr(Lt("settings.playback.captions.title"),Lt("settings.playback.captions.subtitle"))),Hr(Lt("settings.playback.experimental.title"),"VIDEO_QUALITY_4K",[jr(Lt("settings.playback.experimental.unlock"),"enableExperimentalResolution","VIDEO_QUALITY_8K"),Hr(Lt("settings.playback.experimental.max.title"),"VIDEO_QUALITY",Fr.map(function(e){return zr(e,"experimentalMaxResolution",e)}),Kr(Lt("settings.playback.experimental.max.title"),Lt("settings.playback.experimental.max.subtitle")))],Kr(Lt("settings.playback.experimental.title"),Lt("settings.playback.experimental.subtitle"))),Hr(Lt("settings.playback.panelShrink.title"),"COMMENT",[jr(Lt("settings.playback.panelShrink.on"),"enablePanelShrink","COMMENT"),Hr(Lt("settings.playback.panelShrink.size.title"),"VIDEO_QUALITY",[zr("50%","panelShrinkPercent","50"),zr("60%","panelShrinkPercent","60"),zr("70%","panelShrinkPercent","70")],Kr(Lt("settings.playback.panelShrink.size.title"),Lt("settings.playback.panelShrink.size.subtitle")))],Kr(Lt("settings.playback.panelShrink.title"),Lt("settings.playback.panelShrink.subtitle"))),jr(Lt("settings.playback.pauseInBackground"),"enablePauseOnBlur","PAUSE"),jr(Lt("settings.playback.remainingTime"),"enableRemainingTime","TIMER")],Kr(Lt("settings.playback.title"),Lt("settings.playback.subtitle"))),Hr(Lt("settings.playerControls.title"),"SETTINGS_REMOTE",[jr(Lt("settings.playerControls.customize"),"enablePatchingVideoPlayer","EDIT"),jr(Lt("settings.playerControls.previousNext"),"enablePreviousNextButtons","SKIP_NEXT"),jr(Lt("settings.playerControls.speed"),"enableSpeedControlsButton","SLOW_MOTION_VIDEO"),jr(Lt("settings.playerControls.superThanks"),"enableSuperThanksButton","HANDS_HEART"),jr(Lt("settings.playerControls.miniPlayer"),"enableMPButton","MULTIVIEW"),jr(Lt("settings.playerControls.pipInsteadOfMini"),"enableSwapMPWithPIP","PICTURE_IN_PICTURE"),jr(Lt("settings.playerControls.onePress"),"enableOnePressMode","SPACE_BAR")],Kr(Lt("settings.playerControls.title"),Lt("settings.playerControls.subtitle"))),Hr(Lt("settings.browsing.title"),"EXPLORE",[Hr(Lt("settings.browsing.thumbnails.title"),"EYE",[jr(Lt("settings.browsing.hqThumbnails"),"enableHqThumbnails","VIDEO_QUALITY"),jr(Lt("settings.browsing.deArrowTitles"),"enableDeArrowTitles","TEXT_BOX"),jr(Lt("settings.browsing.deArrowThumbnails"),"enableDeArrowThumbnails","EYE"),jr(Lt("settings.browsing.deArrowPeek"),"enableDeArrowPeek","TOUCH_APP")],Kr(Lt("settings.browsing.thumbnails.title"),Lt("settings.browsing.thumbnails.subtitle"))),Hr(Lt("settings.browsing.previews.title"),"PREVIEW",[jr(Lt("settings.browsing.previews.on"),"enablePreviews","PLAY_ARROW_CIRCLE"),{name:Lt("settings.browsing.previews.length"),icon:"TIMER",value:"previewLengthSeconds",stepper:5}],Kr(Lt("settings.browsing.previews.title"),Lt("settings.browsing.previews.subtitle"))),Hr(Lt("settings.browsing.hideWatched.title"),"VISIBILITY_OFF",[jr(Lt("settings.browsing.hideWatched.on"),"enableHideWatchedVideos","VISIBILITY_OFF"),Hr(Lt("settings.browsing.hideWatched.threshold.title"),"TIMER",Ir.map(function(e){return zr("".concat(e,"%"),"hideWatchedVideosThreshold",e)}),Kr(Lt("settings.browsing.hideWatched.threshold.title"),Lt("settings.browsing.hideWatched.threshold.subtitle"))),{name:Lt("settings.browsing.hideWatched.pages.title"),value:null,arrayToEdit:"hideWatchedVideosPages",menuHeader:Kr(Lt("settings.browsing.hideWatched.pages.title"),Lt("settings.browsing.hideWatched.pages.subtitle")),options:[{name:"Search Results",value:"search"},{name:"Home",value:"home"},{name:"Music",value:"music"},{name:"Gaming",value:"gaming"},{name:"Subscriptions",value:"subscriptions"},{name:"Library",value:"library"},{name:"More",value:"more"}]}],Kr(Lt("settings.browsing.hideWatched.title"),Lt("settings.browsing.hideWatched.subtitle"))),jr(Lt("settings.browsing.shorts"),"enableShorts","YOUTUBE_SHORTS_FILL_24"),jr(Lt("settings.browsing.endScreens"),"enableHideEndScreenCards","VISIBILITY_OFF"),jr(Lt("settings.browsing.longPress"),"enableLongPress","TOUCH_APP"),jr(Lt("settings.browsing.stillWatching"),"enableYouThereRenderer","PERSON")],Kr(Lt("settings.browsing.title"),Lt("settings.browsing.subtitle"))),Hr(Lt("settings.home.title"),"HOME",[Hr(Lt("settings.home.startup.title"),"TV",Mr.map(function(e){return{name:e.name,icon:e.icon,key:"launchToOnStartup",value:e.value}}),Kr(Lt("settings.home.startup.title"),Lt("settings.home.startup.subtitle"))),jr(Lt("settings.home.reloadHome"),"reloadHomeOnStartup","REFRESH"),{name:Lt("settings.home.sidebarItems.title"),icon:"MENU",value:null,arrayToEdit:"disabledSidebarContents",menuHeader:Kr(Lt("settings.home.sidebarItems.title"),Lt("settings.home.sidebarItems.subtitle")),options:Or.map(function(e){return{name:e.name,icon:e.icon,value:e.icon}})},jr(Lt("settings.home.hideChannels"),"disableChannelsOnSidebar","PERSON_MINUS"),jr(Lt("settings.home.sortSubscriptions"),"sortSubscriptionsByAlphabet","SORT")],Kr(Lt("settings.home.title"),Lt("settings.home.subtitle"))),Hr(Lt("settings.appearance.title"),"STYLE",[Hr(Lt("settings.appearance.theme.title"),"COLOR_LENS",[Hr(Lt("settings.appearance.theme.presets.title"),"COLOR_LENS",kr.map(function(e){return zr(Lt("settings.appearance.colors.".concat(e)),"themePreset",e)}),Kr(Lt("settings.appearance.theme.presets.title"),Lt("settings.appearance.theme.presets.subtitle"))),Hr(Lt("settings.appearance.theme.background.title"),"COLOR_LENS",kr.map(function(e){return zr(Lt("settings.appearance.colors.".concat(e)),"routeColor",de.themePresetColors[e])}),Kr(Lt("settings.appearance.theme.background.title"),Lt("settings.appearance.theme.background.subtitle"))),Hr(Lt("settings.appearance.theme.text.title"),"COLOR_LENS",Dr.map(function(e){return zr(Lt("settings.appearance.textColors.".concat(e)),"textTheme",e)}),Kr(Lt("settings.appearance.theme.text.title"),Lt("settings.appearance.theme.text.subtitle")))],Kr(Lt("settings.appearance.theme.title"),Lt("settings.appearance.theme.subtitle"))),Hr(Lt("settings.appearance.dimming.title"),"EYE_OFF",[jr(Lt("settings.appearance.dimming.on"),"enableScreenDimming","EYE_OFF"),Hr(Lt("settings.appearance.dimming.timeout.title"),"TIMER",Rr.map(function(e){return zr(function(e){return e>=60?Lt("settings.minutes",{count:e/60}):Zr(e)}(e),"dimmingTimeout",e)}),Kr(Lt("settings.appearance.dimming.timeout.title"),Lt("settings.appearance.dimming.timeout.subtitle"))),Hr(Lt("settings.appearance.dimming.opacity.title"),"LENS_BLUE",Lr.map(function(e){return zr("".concat(Math.round(100*e),"%"),"dimmingOpacity",e)}),Kr(Lt("settings.appearance.dimming.opacity.title"),Lt("settings.appearance.dimming.opacity.subtitle")))],Kr(Lt("settings.appearance.dimming.title"),Lt("settings.appearance.dimming.subtitle"))),jr(Lt("settings.appearance.performance"),"enablePerformanceMode","SPEED_RUN"),Hr(Lt("settings.appearance.clock.title"),"SCHEDULE",[Hr(Lt("settings.appearance.clock.show.title"),"VISIBILITY",[zr(Lt("settings.appearance.clock.show.off"),"clockMode","off"),zr(Lt("settings.appearance.clock.show.always"),"clockMode","always"),zr(Lt("settings.appearance.clock.show.notPlaying"),"clockMode","notPlaying")],Kr(Lt("settings.appearance.clock.show.title"),Lt("settings.appearance.clock.show.subtitle"))),Hr(Lt("settings.appearance.clock.format.title"),"TEXT_BOX",[zr(Lt("settings.appearance.clock.format.h24"),"clockFormat","24h"),zr(Lt("settings.appearance.clock.format.h12"),"clockFormat","12h"),zr(Lt("settings.appearance.clock.format.h12NoAmPm"),"clockFormat","12hNoAmPm")],Kr(Lt("settings.appearance.clock.format.title"),Lt("settings.appearance.clock.format.subtitle"))),Hr(Lt("settings.appearance.clock.position.title"),"LOCATION_POINT",[zr(Lt("settings.appearance.clock.position.topLeft"),"clockPosition","topLeft"),zr(Lt("settings.appearance.clock.position.topRight"),"clockPosition","topRight"),zr(Lt("settings.appearance.clock.position.bottomLeft"),"clockPosition","bottomLeft"),zr(Lt("settings.appearance.clock.position.bottomRight"),"clockPosition","bottomRight")],Kr(Lt("settings.appearance.clock.position.title"),Lt("settings.appearance.clock.position.subtitle"))),jr(Lt("settings.appearance.clock.seconds"),"clockShowSeconds","TIMER")],Kr(Lt("settings.appearance.clock.title"),Lt("settings.appearance.clock.subtitle"))),jr(Lt("settings.appearance.fullAnimations"),"enableFixedUI","PROGRESS_ACTIVITY")],Kr(Lt("settings.appearance.title"),Lt("settings.appearance.subtitle"))),Hr(Lt("settings.system.title"),"SETTINGS",[Hr(Lt("settings.system.whosWatching.title"),"ACCOUNT_CIRCLE",[jr(Lt("settings.system.whosWatching.on"),"enableWhoIsWatchingMenu","PEOPLE"),jr(Lt("settings.system.whosWatching.always"),"permanentlyEnableWhoIsWatchingMenu","PERSON"),jr(Lt("settings.system.whosWatching.onExit"),"enableWhosWatchingMenuOnAppExit","EXIT_APP")],Kr(Lt("settings.system.whosWatching.title"),Lt("settings.system.whosWatching.subtitle"))),jr(Lt("settings.system.signInReminder"),"enableSigninReminder","SIGN_IN"),jr(Lt("settings.system.welcome"),"showWelcomeToast","SPARKLE"),Hr(Lt("settings.system.updates.title"),"SYSTEM_UPDATE",[{name:Lt("settings.system.updates.checkNow"),icon:"SYSTEM_UPDATE",action:"CHECK_FOR_UPDATES"},jr(Lt("settings.system.updates.onStartup"),"enableUpdater","SYSTEM_UPDATE")],Kr(Lt("settings.system.updates.title"),Lt("settings.system.updates.subtitle",{version:fr}))),{name:Lt("settings.system.restartCast"),icon:"CAST_ICON",action:"AXO_CAST_RESTART"},{name:Lt("settings.system.reload"),icon:"REFRESH",action:"AXO_RELOAD_PAGE"}],Kr(Lt("settings.system.title"),Lt("settings.system.subtitle"))),Hr(Lt("settings.about.title"),"HELP",[Vr("GitHub","https://github.com/TizenDroid/axotube"),Vr("Discord","https://discord.gg/UDb8nak5YD")],Kr(Lt("settings.about.title"),Lt("settings.about.version",{version:fr})))]}var Jr="root",Wr="axo-settings",Xr=new Map,qr=null;function Yr(e,t){for(var n=0;n<e.length;n++){var i=e[n];if(i){var r="".concat(t,".").concat(n);Xr.set(r,i),Array.isArray(i.options)&&Yr(i.options,r)}}}function Qr(e,t){return[{customAction:{action:e,parameters:t}}]}function Zr(e){return Lt("settings.seconds",{count:e})}function $r(e,t,n,i){if(e.action)return sn({title:e.name},{icon:e.icon},[{customAction:{action:e.action}}]);if(void 0!==e.segment){var r=_r(e.segment);return sn({title:e.name,subtitle:Lt("settings.segmentModes.".concat(r))},{icon:e.icon},Qr("SETTINGS_SEGMENT",{category:e.segment,panel:i,index:ea(t)}))}if(void 0!==n){var a=-1!==(we(n)||[]).indexOf(e.value);return sn({title:e.name},{icon:e.icon,secondaryIcon:a?"CHECK_BOX":"CHECK_BOX_OUTLINE_BLANK"},Qr("SETTINGS_SET",{key:n,valName:"arrayValue",value:e.value,panel:i,index:ea(t)}))}if(void 0!==e.key){var o=we(e.key)===e.value;return sn({title:e.name},{icon:e.icon,secondaryIcon:o?"RADIO_BUTTON_CHECKED":"RADIO_BUTTON_UNCHECKED"},Qr("SETTINGS_SET",{key:e.key,valName:"stringValue",value:e.value,panel:i,index:ea(t)}))}return void 0!==e.stepper?sn({title:e.name,subtitle:Zr(we(e.value))},{icon:e.icon},Qr("SETTINGS_OPEN",{id:t})):void 0!==e.arrayToEdit||e.options&&"object"===T(e.options)?sn({title:e.name},{icon:e.icon},Qr("SETTINGS_OPEN",{id:t})):"string"==typeof e.value?sn({title:e.name},{icon:e.icon,secondaryIcon:we(e.value)?"CHECK_BOX":"CHECK_BOX_OUTLINE_BLANK"},Qr("SETTINGS_TOGGLE",{key:e.value,panel:i,index:ea(t)})):null}function ea(e){var t=e.lastIndexOf(".");return Number(e.slice(t+1))}function ta(e,t,n){for(var i=[],r=0;r<e.length;r++){var a=e[r];if(a){var o=$r(a,"".concat(t,".").concat(r),n,t);o&&i.push(o)}}return i}function na(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(dn(r));else if(r&&r.qrLink){var a=Sr(r.qrLink);a&&n.push(pn(a))}}}catch(e){i.e(e)}finally{i.f()}return n}function ia(e,t,n){var i,r=function(e){if(e===Jr||!Xr.has(e))return{header:{title:Lt("settings.ttSettings.title"),subtitle:Lt("settings.ttSettings.madeByText")},rows:ta(qr,Jr)};var t=Xr.get(e);if(void 0!==t.stepper){var n=we(t.value),i=t.stepper;return{header:{title:t.name},rows:[sn({title:"−".concat(Zr(i))},null,Qr("SETTINGS_STEP",{key:t.value,step:-i,panel:e})),dn(Zr(n)),sn({title:"+".concat(Zr(i))},null,Qr("SETTINGS_STEP",{key:t.value,step:i,panel:e}))]}}return void 0!==t.arrayToEdit?{header:t.menuHeader||{title:t.name},rows:ta(t.options,e,t.arrayToEdit)}:t.options&&"object"===T(t.options)&&!Array.isArray(t.options)?{header:{title:t.options.title,subtitle:t.options.subtitle},rows:na(t.options.content||[])}:{header:t.menuHeader||{title:t.name},rows:ta(t.options||[],e)}}(e);an(r.header,on(r.rows,n||0),e===Jr?Wr:(i=e,"".concat(Wr,":").concat(i)),t)}function ra(e,t,n){e(),t&&ia(t,!0,n)}function aa(e,t){var n=t||{};switch(e){case"SETTINGS_OPEN":return void ia(n.id,!1);case"SETTINGS_TOGGLE":return void ra(function(){return mr(n.key,"boolValue",!we(n.key))},n.panel,n.index);case"SETTINGS_SET":return void ra(function(){return mr(n.key,n.valName,n.value)},n.panel,n.index);case"SETTINGS_SEGMENT":return void ra(function(){return function(e,t){var n=Ur(e);if(n){var i="off"!==t;!!we(n.key)!==i&&mr(n.key,"boolValue",i),-1!==(we("sponsorBlockManualSkips")||[]).indexOf(e)!=("show"===t)&&mr("sponsorBlockManualSkips","arrayValue",e)}}(n.category,wr[_r(n.category)])},n.panel,n.index);case"SETTINGS_STEP":var i=de.ranges&&de.ranges[n.key],r=(Number(we(n.key))||0)+n.step;return i&&(r=Math.min(i[1],Math.max(i[0],r))),void ra(function(){return mr(n.key,"intValue",r)},n.panel,1);default:return}}function oa(){qr=Gr(),Xr=new Map,Yr(qr,Jr),ia(Jr,!1)}window.isPipPlaying=!1;var sa=null,ua=null,la=0,ca=null,ha=null,da=[],pa={length:0,classes:[]},fa={length:0,classes:[]};function ma(){ua||la>=120||(ua=setTimeout(function(){ua=null,ga()},250))}function ga(){la+=1;try{var e=window._yttv?Object.values(window._yttv).find(function(e){return e&&e.mappings instanceof Map}):null;if(!e)return ma(),!1;var t=e.get("PlayerService"),n=e.get("PlaybackPreviewService");if(!t||!n)return ma(),!1;if(sa=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),ma(),!1}}function va(e,t){var n=setTimeout(function(){var t=da.indexOf(n);-1!==t&&da.splice(t,1),e()},t);return da.push(n),n}function ya(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 ba(){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");ya(t,a,pa),a.style.left="10.25em",a.id="axo-pip-button";var o=document.createElement("ytlr-search-voice-mic-button");ya(t.children[0],o,fa);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?ga():window.addEventListener("load",ga);var xa=null;function Sa(){ca&&(ca.disconnect(),ca=null),null!==xa&&(cancelAnimationFrame(xa),xa=null);var e=document.querySelector("#axo-pip-button");e&&e.parentNode&&e.parentNode.removeChild(e)}function Ea(){!function(){for(;da.length;)clearTimeout(da.pop())}(),ha&&(ha.disconnect(),ha=null),Sa();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 wa(){if(sa||ga())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;Ea();var i=Math.floor(e.currentTime);ha=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(),va(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,!ca&&window.isPipPlaying&&document.body&&((ca=new MutationObserver(function(){null===xa&&(xa=requestAnimationFrame(function(){xa=null,window.isPipPlaying?ba():Sa()}))})).observe(document.body,{childList:!0,subtree:!0}),ba()),t.removeEventListener("play",e))}),ha&&(ha.disconnect(),ha=null),va(function(){try{if(sa&&sa.loadedPlaybackConfig){var e=sa.loadedPlaybackConfig,t=Object.assign({},e);e.watchEndpoint&&(t.watchEndpoint=Object.assign({},e.watchEndpoint,{startTimeSeconds:i})),sa.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()}}),ha.observe(t,{attributes:!0,attributeFilter:["class"]});try{qt({signalAction:{signal:"HISTORY_BACK"}}).dispatched||Ea()}catch(e){throw Ea(),e}}catch(e){console.error("[AxoTube:pictureInPicture] Enable PiP failed:",e)}else{var r=0,a=function(){r+=1,sa||ga()?wa():r<20&&va(a,200)};va(a,200)}}function ka(e){if(we("enableDeArrowPeek")){var t=e&&e.showMenuCommand;if(t&&t.contentId){var n,i=(n=t.contentId,bn.get(n)||null),r=function(e){var t=yn.get(e);return t&&t.data?t.data:null}(t.contentId);if(i&&r){if(t.title){var a=!!we("enableDeArrowTitles")?i.title:xn(r);a&&(t.title={simpleText:a})}if(t.thumbnail){var o=!!we("enableDeArrowThumbnails")?i.thumbnails:Sn(t.contentId,r);o&&(t.thumbnail={thumbnails:o})}}}}}function Da(e,t){gn("".concat("http://127.0.0.1:8085","/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||Da("focus")});var Ca=null,Aa=!1;function Ta(e){if(e)try{e.playbackRate=we("videoSpeed")}catch(e){console.warn("[AxoTube:speedUI] Speed apply failed:",e)}}function Fa(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:ui();if(e&&e!==Ca){if(Ca)try{Ca.removeEventListener("canplay",Pa)}catch(e){}Ca=e;try{Ca.addEventListener("canplay",Pa)}catch(e){console.warn("[AxoTube:speedUI] Speed initialization failed:",e)}Ta(Ca)}}function Pa(){ui()!==Ca&&Fa(),Ta(Ca)}function Ba(){!function(){if(!Aa){Aa=!0;var e=function(e){if(406==e.keyCode||191==e.keyCode)return e.preventDefault(),e.stopPropagation(),"keydown"!==e.type||(Ia(),!1)};document.addEventListener("keydown",e,!0),document.addEventListener("keypress",e,!0),document.addEventListener("keyup",e,!0)}}(),fi(Fa)}function Ia(){for(var e=we("videoSpeed"),t=0,n=Number(we("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(sn({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(sn({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{an("Playback Speed",on(a,t),"axo-speed")}catch(e){console.error("[AxoTube:speedUI] Speed settings modal failed:",e)}}"loading"===document.readyState?document.addEventListener("DOMContentLoaded",Ba):Ba(),Ce.addEventListener("configChange",function(e){var t;"videoSpeed"===(null===(t=e.detail)||void 0===t?void 0:t.key)&&(Fa(),Ta(Ca))});function Ra(e){return(window.location&&window.location.origin?window.location.origin:"http://localhost:8099")+e}function La(e){fetch(Ra("/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);an({title:Lt("updater.modalTitle"),subtitle:Lt("updater.modalBodyNew",{latest:e.latest,current:e.current})},on([sn({title:Lt("updater.updateNow"),subtitle:Lt("updater.updateNowSubtitle")},{icon:"DOWN_ARROW"},[{customAction:{action:"AXO_UPDATE_APPLY",parameters:e.latest}},{signalAction:{signal:"POPUP_BACK"}}]),sn({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&&rn(Lt("app.name"),Lt("toasts.upToDate",{version:t.current}),null)}).catch(function(t){console.info("[AxoTube:updater] update check skipped:",t&&t.message),e&&rn(Lt("app.name"),Lt("toasts.updateCheckFailed"),null)})}try{we("enableUpdater")&&we("dontCheckUpdateUntil")<=Math.floor(Date.now()/1e3)&&setTimeout(function(){return La(!1)},3e3)}catch(e){console.error("[AxoTube:updater] init failed, continuing without it",e)}function Oa(e,t){return Yt(e,t)}function Na(){return zt=Ma,Zt()}function Ma(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(ka(e),function(e){we("enablePauseOnBlur")&&Ui(e)&&ji()}(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(),";"),Oa({signalAction:{signal:"RELOAD_PAGE"}}),!0}}else{var v=Object.keys(d).find(function(e){return e.includes("Value")});if(!v)continue;mr(p,v,"intValue"===v?Number(d[v]):d[v])}}}catch(e){c.e(e)}finally{c.f()}}else{if(e.customAction)return _a(e.customAction.action,e.customAction.parameters),!0;if(null!=e&&null!==(i=e.signalAction)&&void 0!==i&&i.customAction)return _a(e.signalAction.customAction.action,e.signalAction.customAction.parameters),!0;if(null!=e&&null!==(r=e.showEngagementPanelEndpoint)&&void 0!==r&&r.customAction)return _a(e.showEngagementPanelEndpoint.customAction.action,e.showEngagementPanelEndpoint.customAction.parameters),!0;if(null!=e&&null!==(a=e.playlistEditEndpoint)&&void 0!==a&&a.customAction)return _a(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,sn({title:Lt("player.miniPlayer")},{icon:"CLEAR_COOKIES"},[{customAction:{action:"ENTER_MP"}}])),le()&&null!==(y=le())&&void 0!==y&&y.HasSystemFeature("android.software.picture_in_picture")&&b.splice(3,0,sn({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,Ea())}if(e.commandExecutorCommand&&Array.isArray(e.commandExecutorCommand.commands)){var k,D=f(e.commandExecutorCommand.commands);try{for(D.s();!(k=D.n()).done;){var C,A,F,P=k.value;P&&"object"===T(P)&&(P.customAction?_a(P.customAction.action,P.customAction.parameters):null!==(C=P.signalAction)&&void 0!==C&&C.customAction?_a(P.signalAction.customAction.action,P.signalAction.customAction.parameters):null!==(A=P.showEngagementPanelEndpoint)&&void 0!==A&&A.customAction?_a(P.showEngagementPanelEndpoint.customAction.action,P.showEngagementPanelEndpoint.customAction.parameters):null!==(F=P.playlistEditEndpoint)&&void 0!==F&&F.customAction?_a(P.playlistEditEndpoint.customAction.action,P.playlistEditEndpoint.customAction.parameters):t.call(this,P,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)&&!we("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 _a(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":oa();break;case"SETTINGS_OPEN":case"SETTINGS_SET":case"SETTINGS_TOGGLE":case"SETTINGS_STEP":case"SETTINGS_SEGMENT":aa(e,t);break;case"AXO_SPEED_SETTINGS_SHOW":Ia();break;case"UPDATE_REMIND_LATER":ke("dontCheckUpdateUntil",t);break;case"AXO_UPDATE_APPLY":rn(Lt("app.name"),Lt("updater.applying"),null),fetch(Ra("/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);window.location.reload()}).catch(function(e){console.error("[AxoTube:updater] apply failed:",e&&e.message),rn(Lt("app.name"),Lt("toasts.updateApplyFailed"),null)});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":wa();break;case"ENTER_PIP":le()&&le().EnterPIP&&le().EnterPIP();break;case"SHOW_TOAST":rn(Lt("app.name"),t);break;case"ADD_TO_QUEUE":t?(window.queuedVideos.videos.push(t),rn(Lt("app.name"),Lt("toasts.queueAdded"))):rn(Lt("app.name"),Lt("toasts.queueAddFailed"));break;case"CLEAR_QUEUE":window.queuedVideos.videos=[],window.queuedVideos.currentIndex=-1,window.queuedVideos.lastVideoId=null,rn(Lt("app.name"),Lt("toasts.queueCleared"));break;case"CHECK_FOR_UPDATES":La(!0);break;case"AXO_CAST_RESTART":Da("manual",function(e,t){!e&&t&&t.ok?t.restarted?rn(Lt("app.name"),Lt("toasts.castRestarted")):"too-soon"===t.reason?rn(Lt("app.name"),Lt("toasts.castRestartWait")):"discovery-not-running"===t.reason?rn(Lt("app.name"),Lt("toasts.castRestartNotRunning")):"in-progress"===t.reason?rn(Lt("app.name"),Lt("toasts.castRestarting")):rn(Lt("app.name"),Lt("toasts.castRestartFailed")):rn(Lt("app.name"),Lt("toasts.castRestartFailed"))});break;case"AXO_RELOAD_PAGE":window.location.reload()}}var Ua=!1,ja=null,za=!1;function Ha(){try{var e;if(null===(e=window.tectonicConfig)||void 0===e||!e.featureSwitches)return;var t=window.tectonicConfig.featureSwitches,n=Fe();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 Ka(){try{if(!document.body)return;document.body.classList.toggle("axotube-reduced-motion",Fe())}catch(e){console.warn("[AxoTube:ui] Reduced motion apply failed:",e)}}function Va(){if(za){var e=document.getElementById("container");e&&e.style.setProperty("opacity","1","important"),za=!1}}function Ga(){ja&&(clearTimeout(ja),ja=null),Va()}function Ja(){Ga(),we("enableScreenDimming")&&(ja=setTimeout(function(){var e;if(ja=null,we("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-we("dimmingOpacity")).toString(),"important"),za=!0)}}}else Va()},1e3*we("dimmingTimeout")))}function Wa(){if(!Ua&&document.body&&window._yttv){Ua=!0,Ka();var e=document.querySelector("style[nonce]");if(e)e.textContent+=rr;else if(document.head){var t=document.createElement("style");t.textContent=rr,document.head.appendChild(t)}if("function"==typeof window.__releaseBootLoader&&window.__releaseBootLoader(),we("enableFixedUI")&&!Pe()&&!Fe())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)}Ha();var n=function(e){if(we("enableScreenDimming")&&Ja(),404==e.keyCode&&"keydown"===e.type){try{Na()}catch(e){console.warn("[AxoTube:ui] Settings command patch refresh failed:",e)}try{oa()}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(!sa||!sa.loadedPlaybackConfig)return;var e=document.querySelector("video"),t=sa.loadedPlaybackConfig,n=t.clickTrackingParams,i=t.commandMetadata,r=t.watchEndpoint;if(!qt({clickTrackingParams:n,commandMetadata:i,watchEndpoint:e&&r?Object.assign({},r,{startTimeSeconds:Math.floor(e.currentTime)}):r}).dispatched)return;window.isPipPlaying=!1,Ea()}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(){we("showWelcomeToast")&&rn(Lt("welcomeMsg.title"),"".concat(Lt("welcomeMsg.subtitle")," · v").concat(fr))},1e3);var i=we("launchToOnStartup");if(i)try{Oa(JSON.parse(i))}catch(e){console.warn("[AxoTube:ui] Launch command failed:",e)}else if(we("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=zn();r&&r.executeFunction(new r.commandFunction("reloadGuideAction"))}catch(e){console.warn("[AxoTube:ui] Guide reload failed:",e)}if(we("enableFixedUI")&&!Pe()&&!Fe())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{Na(),Ht||(Ht=!0,window.addEventListener("hashchange",en,!1))}catch(e){console.warn("[AxoTube:ui] unable to install native command patch:",e)}}()}}function Xa(){Ua||"complete"!==document.readyState&&"interactive"!==document.readyState||window._yttv&&Wa()}"loading"===document.readyState&&document.addEventListener("DOMContentLoaded",Xa);var qa=0,Ya=setInterval(function(){qa+=1,Xa(),(Ua||qa>=100)&&clearInterval(Ya)},100),Qa={routeColor:!0,routeBackgroundUrl:!0,themePreset:!0,textTheme:!0};Ce.addEventListener("configChange",function(e){var t,n=null===(t=e.detail)||void 0===t?void 0:t.key;Qa[n]&&dr(),"enableReducedMotion"!==n&&"enablePerformanceMode"!==n&&"enableLowMemoryMode"!==n||(Ka(),Ha()),"enableScreenDimming"===n&&(we("enableScreenDimming")?Ja():Ga())});var Za=null;function $a(){Za&&(clearInterval(Za),Za=null)}function eo(e){e||$a();var t=localStorage["yt.leanback.default::recurring_actions"];if(t){var n;try{n=JSON.parse(t)}catch(e){return}var i=we("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){$a();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($a(),i){var h=function(){var e=new Date;e.setDate(e.getDate()-7),d(e.getTime())};h(),Za=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)}}Ce.addEventListener("configChange",function(e){var t=e.detail,n=t.key,i=t.value;"enableWhoIsWatchingMenu"===n?eo(i):"permanentlyEnableWhoIsWatchingMenu"===n&&eo(we("enableWhoIsWatchingMenu"))}),eo(we("enableWhoIsWatchingMenu"));var to={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")}},no=["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 io=!1;function ro(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 ao(){if(io)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 io=!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=we("enableShowUserLanguage"),o=we("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:to.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:to.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=ro(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 no.forEach(function(t){if(t.includes("-")){var n=D(t.split("-"),2),i=n[0],r=n[1],a=to.language.standard.long[i]||t,o=to.region.long[r]||r;e[t]="".concat(a," (").concat(o,")")}else e[t]=to.language.standard.long[t]||t}),e}catch(e){var t={};return no.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(ro(n,i))}))}}return t.apply(this,arguments)},e.instance.resolveCommand.isPatchedBySubtitleLocalization=!0,io=!0,!0}var oo=0;function so(){io||(oo+=1,ao()||(oo>=30?console.warn("[AxoTube:moreSubtitles] resolveCommand did not become ready in time."):setTimeout(so,500)))}"loading"===document.readyState?document.addEventListener("DOMContentLoaded",so):so();var uo="onStateChange",lo="configChange",co="preferredVideoQuality",ho=new WeakMap,po=new WeakMap,fo=new WeakMap,mo=new WeakMap,go=new WeakMap,vo=new WeakSet,yo=new WeakMap,bo=p(function e(){var t,n,i=this;u(this,e),s(t=this,n=vo),n.add(t),c(this,ho,null),c(this,po,null),c(this,fo,0),c(this,mo,null),c(this,go,!1),c(this,yo,function(){try{var e,t,n,r,o,s,u=null===(e=l(ho,i))||void 0===e||null===(t=e.getPlayerStateObject)||void 0===t?void 0:t.call(e),c=null===(n=l(ho,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(mo,i)&&(h(mo,i,d),a(vo,i,So).call(i));var p=Object.values((null===(o=l(ho,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(go,i)||p||(h(go,i,a(vo,i,Do).call(i)),l(go,i)||a(vo,i,ko).call(i))}catch(e){console.warn("[AxoTube:preferredVideoQuality] State change handler failed:",e)}}),a(vo,this,wo).call(this),pi(function(e){return a(vo,i,Eo).call(i,e)}),mi(function(e){e!==l(mo,i)&&(h(mo,i,e),a(vo,i,So).call(i),l(yo,i).call(i))})});function xo(){l(po,this)&&(clearTimeout(l(po,this)),h(po,this,null))}function So(){a(vo,this,xo).call(this),h(fo,this,0),h(go,this,!1)}function Eo(e){if(!e){if(l(ho,this))try{l(ho,this).removeEventListener(uo,l(yo,this))}catch(e){}return h(ho,this,null),h(mo,this,null),void a(vo,this,So).call(this)}if(e!==l(ho,this)){if(l(ho,this))try{l(ho,this).removeEventListener(uo,l(yo,this))}catch(e){}h(ho,this,e),h(mo,this,null),a(vo,this,So).call(this);try{l(ho,this).addEventListener(uo,l(yo,this))}catch(e){console.warn("[AxoTube:preferredVideoQuality] Could not attach state change listener:",e)}l(yo,this).call(this)}}function wo(){var e=this;Ce.addEventListener(lo,function(t){var n;(null===(n=t.detail)||void 0===n?void 0:n.key)===co&&(a(vo,e,So).call(e),h(go,e,a(vo,e,Do).call(e)),l(go,e)||a(vo,e,ko).call(e))})}function ko(){var e=this;l(po,this)||l(go,this)||l(fo,this)>=10||(h(fo,this,l(fo,this)+1),h(po,this,setTimeout(function(){h(po,e,null);try{var t,n,i=null===(t=l(ho,e))||void 0===t||null===(n=t.getPlayerStateObject)||void 0===n?void 0:n.call(t);if(null==i||!i.isPlaying||l(ho,e)!==si())return;h(go,e,a(vo,e,Do).call(e)),l(go,e)||a(vo,e,ko).call(e)}catch(e){console.warn("[AxoTube:preferredVideoQuality] Retry failed:",e)}},500)))}function Do(){if(!l(ho,this)||"function"!=typeof l(ho,this).setPlaybackQualityRange)return!1;var e=we(co);try{if(!e||"auto"===e)return l(ho,this).setPlaybackQualityRange("auto","auto"),!0;var t=a(vo,this,Co).call(this,e);return!!t&&(l(ho,this).setPlaybackQualityRange(t,t),!0)}catch(e){return console.warn("[AxoTube:preferredVideoQuality] Failed to apply quality:",e),!1}}function Co(e){try{var t,n,i,r=null===(t=(n=l(ho,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 bo}catch(e){console.error("[AxoTube:preferredVideoQuality] PreferredQualityHandler initialization failed:",e)}function Ao(e){return e&&e.tileRenderer&&e.tileRenderer.contentId}function To(e){var t=window.queuedVideos.videos[e],n=t&&t.tileRenderer&&t.tileRenderer.onSelectCommand;return!!n&&(window.queuedVideos.currentIndex=e,window.queuedVideos.lastVideoId=Ao(t)||null,setTimeout(function(){return Oa(n)},500),!0)}function Fo(){window.queuedVideos.currentIndex=-1,window.queuedVideos.lastVideoId=null,Oa({customAction:{action:"CLEAR_QUEUE"}})}window.queuedVideos={videos:[],lastVideoId:null,currentIndex:-1};var Po=null;pi(function(e){if(Po&&(Po.player.removeEventListener("onStateChange",Po.listener),Po=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 Ao(e)===n.video_id})),-1!==r){var a=r+1;if(a<i.videos.length&&To(a))return;return void Fo()}if(i.currentIndex+1<i.videos.length&&To(i.currentIndex+1))return;if(To(0))return;Fo()}else if(t.isPlaying){var o=document.getElementById("container");if(o&&o.style.setProperty("opacity","1","important"),Ao(i.videos[i.currentIndex])===n.video_id)return void(i.lastVideoId=n.video_id);var s=i.videos.findIndex(function(e){return Ao(e)===n.video_id});-1!==s&&(i.currentIndex=s,i.lastVideoId=n.video_id)}}(e)};e.addEventListener("onStateChange",t),Po={player:e,listener:t}}});var Bo=null,Io=0;function Ro(){Io>=20||(Io+=1,Bo=setTimeout(function(){return Lo(!1)},500))}function Lo(){if(arguments.length>0&&void 0!==arguments[0]&&arguments[0]&&(Io=0),Bo&&(clearTimeout(Bo),Bo=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?(Io=0,e.set("ENABLE_PREVIEWS_WITH_SOUND",Be())):Ro()}else Ro()}Ce.addEventListener("configChange",function(){Lo(!0)}),"complete"===document.readyState?Lo(!0):window.addEventListener("load",function(){return Lo(!0)});var Oo="http://127.0.0.1:8085",No=-1,Mo=!1,_o=!1,Uo=!1,jo=null,zo=new Set,Ho=!1,Ko="",Vo=null,Go=!1,Jo=!1,Wo=null,Xo=!1;function qo(){return"undefined"!=typeof window&&(!!le()||void 0!==window.tizen)}var Yo=Xt,Qo=Qt;function Zo(){!Jo&&Yo()&&gn("".concat(Oo,"/api/pairing-code")).then(function(e){if(!e.ok)throw new Error("pairing code HTTP ".concat(e.status));return e.json()}).then(function(e){if(e&&e.code&&!Jo){Jo=!0;try{var t=Array.isArray(e.urls)&&e.urls.length?e.urls[0]:null;rn(Lt("app.name"),t?Lt("toasts.pairingWithUrl",{url:t,code:e.code}):Lt("toasts.pairingCodeOnly",{code:e.code}))}catch(e){}}}).catch(function(){})}function $o(e,t){if(e===t)return!0;try{return ve(e)===ve(t)}catch(e){return!1}}function es(e){if(!jo)return!1;var t=Object.keys(e),n=Object.keys(jo);return t.length!==n.length||t.some(function(t){return!Object.prototype.hasOwnProperty.call(jo,t)||!$o(e[t],jo[t])})}function ts(){if(!(!qo()||Mo||No<0)&&jo){var e=Ae();es(e)?(Mo=!0,gn("".concat(Oo,"/api/config/push"),{method:"POST",headers:{"Content-Type":"application/json"},body:ve({revision:No,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");No=t.revision,jo=e;var n,i=Ae(),r=f(zo);try{for(r.s();!(n=r.n()).done;){var a=n.value;$o(i[a],e[a])&&zo.delete(a)}}catch(e){r.e(e)}finally{r.f()}return"accepted"}).catch(function(){return"failed"}).then(function(e){Mo=!1,"conflict"===e?is():"accepted"===e&&es(Ae())&&ns()})):zo.clear()}}function ns(){qo()&&(clearTimeout(Vo),Vo=setTimeout(ts,250))}function is(){qo()&&!Mo&&(Mo=!0,gn("".concat(Oo,"/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(!Go&&qo()&&Yo())try{rn(Lt("app.name"),Lt("toasts.serviceConnected")),Go=!0,setTimeout(Zo,1200)}catch(e){}}(),os=0;var t=e.config;Ho=!0;var n=!0;try{Object.keys(t).forEach(function(e){if(!zo.has(e)&&void 0!==t[e])try{$o(we(e),t[e])||ke(e,t[e])||(n=!1)}catch(e){n=!1}})}finally{Ho=!1}var i=Ae();Object.keys(i).forEach(function(e){Object.prototype.hasOwnProperty.call(t,e)?$o(i[e],t[e])&&zo.delete(e):zo.add(e)}),jo=t,n&&(No=e.revision)}}).catch(function(){os+=1}).then(function(){Mo=!1,ts()}))}function rs(e){return function(e){return e?gn("".concat(Oo,"/api/command/ack"),{method:"POST",headers:{"Content-Type":"application/json"},body:ve({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||Wo!==e)return t;var n=Xo;if(Wo=null,Xo=!1,n)try{window.location.reload()}catch(e){}return!0})}function as(){qo()&&!_o&&(_o=!0,gn("".concat(Oo,"/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===Wo)return rs(t);if("toast"===e.command.action){Wo=t,Xo=!1;try{rn(Lt("app.name"),String(e.command.text||"").slice(0,200))}catch(e){}return rs(t)}if("reload"===e.command.action)return Wo=t,Xo=!0,rs(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 Qo(n).then(function(e){if(e){Wo=t,Xo=!1;try{rn(Lt("app.name"),Lt("toasts.commandReceived"))}catch(e){}return rs(t)}})}}).catch(function(){}).then(function(){_o=!1}))}Ce.addEventListener("configChange",function(e){var t;Ho||("string"==typeof(null==e||null===(t=e.detail)||void 0===t?void 0:t.key)&&zo.add(e.detail.key),ns())});var os=0;setTimeout(function e(){is(),as(),function(){if(qo()&&!Uo){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?ve(e):"none";r!==Ko&&(Ko=r,Uo=!0,gn("".concat(Oo,"/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(){Ko=""}).then(function(){Uo=!1}))}}(),setTimeout(e,function(){if(0===os)return 5e3;var e=5e3*Math.pow(2,Math.min(os,3));return Math.min(e,3e4)}())},3e3);try{Qt(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 ss(e){return e<10?"0"+e:String(e)}var us="axo-clock",ls="axo-clock-style",cs={topLeft:"axo-clock-top-left",topRight:"axo-clock-top-right",bottomLeft:"axo-clock-bottom-left",bottomRight:"axo-clock-bottom-right"},hs="\n#".concat(us,' {\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(us,".axo-clock-top-left { top: 0; left: 0; }\n#").concat(us,".axo-clock-top-right { top: 0; right: 0; }\n#").concat(us,".axo-clock-bottom-left { bottom: 0; left: 0; }\n#").concat(us,".axo-clock-bottom-right { bottom: 0; right: 0; }\n"),ds=null,ps=null;function fs(){var e=we("clockMode");return"always"===e||"notPlaying"===e&&!function(){var e=ui();return!(!e||e.paused||e.ended)}()}function ms(){null!==ps&&clearInterval(ps),ps=null,ds&&ds.parentNode&&ds.parentNode.removeChild(ds),ds=null}function gs(){ds||((ds=document.createElement("div")).id=us,document.body.appendChild(ds));var e=cs[we("clockPosition")]||cs.topRight;ds.className!==e&&(ds.className=e);var t=function(e,t,n){var i=ss(e.getMinutes()),r=n?":"+ss(e.getSeconds()):"",a=e.getHours();if("24h"===t)return ss(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,we("clockFormat"),!!we("clockShowSeconds"));ds.textContent!==t&&(ds.textContent=t)}function vs(){document.body&&(fs()?(!function(){if(!document.getElementById(ls)){var e=document.createElement("style");e.id=ls,e.textContent=hs,(document.head||document.documentElement).appendChild(e)}}(),gs(),null===ps&&(ps=setInterval(gs,1e3))):ms())}["play","playing","pause","ended","emptied"].forEach(function(e){document.addEventListener(e,vs,!0)}),Ce.addEventListener("configChange",function(e){var t=e.detail&&e.detail.key;"clockMode"!==t&&"clockFormat"!==t&&"clockPosition"!==t&&"clockShowSeconds"!==t||vs()}),function e(){document.body?vs():setTimeout(e,250)}();var ys="axo-panel-shrink",bs="axo-panel-shrink-style",xs="\nbody.".concat(ys," 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 Ss=null,Es=null,ws=null,ks=null;function Ds(){if(ks=null,document.body){var e=document.querySelector("ytlr-engagement-panel-section-list-renderer");!function(e){if(e===ws)return;Es&&Es.disconnect();if(Es=null,ws=e,!e||"undefined"==typeof MutationObserver)return;(Es=new MutationObserver(Cs)).observe(e,{subtree:!0,attributes:!0,attributeFilter:["class"]})}(e),function(){if(!document.getElementById(bs)){var e=document.createElement("style");e.id=bs,e.textContent=xs,(document.head||document.documentElement).appendChild(e)}}();var t=!!we("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(ys)!==t&&document.body.classList.toggle(ys,t);var n=String(Number(we("panelShrinkPercent"))/100);n!==Ss&&(Ss=n,document.documentElement.style.setProperty("--axo-panel-scale",n))}}function Cs(){null===ks&&(ks=requestAnimationFrame(Ds))}!function e(){if(document.body){var t=document.getElementById("container")||document.body;"undefined"!=typeof MutationObserver&&new MutationObserver(Cs).observe(t,{childList:!0,subtree:!0}),window.addEventListener("hashchange",Cs),Ce.addEventListener("configChange",function(e){var t=e.detail&&e.detail.key;"enablePanelShrink"!==t&&"panelShrinkPercent"!==t||Cs()}),Ds()}else setTimeout(e,250)}();var As,Ts={exports:{}};var Fs,Ps,Bs=(As||(As=1,Fs=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 C=function(e,t){this.type=i.Syntax.DoWhileStatement,this.body=e,this.test=t};t.DoWhileStatement=C;var A=function(){this.type=i.Syntax.EmptyStatement};t.EmptyStatement=A;var T=function(e){this.type=i.Syntax.ExportAllDeclaration,this.source=e};t.ExportAllDeclaration=T;var F=function(e){this.type=i.Syntax.ExportDefaultDeclaration,this.declaration=e};t.ExportDefaultDeclaration=F;var P=function(e,t,n){this.type=i.Syntax.ExportNamedDeclaration,this.declaration=e,this.specifiers=t,this.source=n};t.ExportNamedDeclaration=P;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 R=function(e,t,n){this.type=i.Syntax.ForInStatement,this.left=e,this.right=t,this.body=n,this.each=!1};t.ForInStatement=R;var L=function(e,t,n){this.type=i.Syntax.ForOfStatement,this.left=e,this.right=t,this.body=n};t.ForOfStatement=L;var O=function(e,t,n,r){this.type=i.Syntax.ForStatement,this.init=e,this.test=t,this.update=n,this.body=r};t.ForStatement=O;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 z=function(e){this.type=i.Syntax.ImportDefaultSpecifier,this.local=e};t.ImportDefaultSpecifier=z;var H=function(e){this.type=i.Syntax.ImportNamespaceSpecifier,this.local=e};t.ImportNamespaceSpecifier=H;var K=function(e,t){this.type=i.Syntax.ImportSpecifier,this.local=e,this.imported=t};t.ImportSpecifier=K;var V=function(e,t){this.type=i.Syntax.LabeledStatement,this.label=e,this.body=t};t.LabeledStatement=V;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 W=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=W;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}])},Ts.exports=Fs()),Ts.exports),Is=e(Bs),Rs={};var Ls=(Ps||(Ps=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}(Rs)),Rs),Os=e(Ls);var Ns=new WeakMap,Ms=!1,_s=null,Us=null,js=0;function zs(e,t){try{return{ok:!0,value:e[t]}}catch(e){return{ok:!1,value:void 0}}}function Hs(e,t){try{return e[t]()}catch(e){return null}}function Ks(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=Ns.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){}Ns.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=Hs(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 C=Hs(o,"values");if(C){var A,F=f(C);try{for(F.s();!(A=F.n()).done;){var P=A.value;if(i>e)return null;var B=a(P,s+1,null,void 0,!1);if(B)return B}}catch(e){F.e(e)}finally{F.f()}}return null}var I=zs(o,n);if(I.ok&&void 0!==I.value){var R=a(I.value,s+1,o,n,!1);if(R)return R}for(var L=0,O=Object.keys(o);L<O.length;L++){var N=O[L];if(i>e)return null;if(N!==n){var M=zs(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 Vs(){if(Ms||!we("enablePatchingVideoPlayer"))return!1;if(!window._yttv||!document.querySelector(".html5-video-player")&&!document.querySelector("ytlr-player"))return!1;var e=_s&&"function"==typeof _s.fn?_s:_s=Ks(2e4,!0)||Ks(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,C(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=Is.parse(e,{range:!0,tolerant:!0,sourceType:"script"})}catch(n){try{var r="("+e+")";t=Is.parse(r,{range:!0,tolerant:!0,sourceType:"script"}),i=1}catch(r){try{t=Is.parse(e,{range:!0,tolerant:!0,sourceType:"module"})}catch(r){try{var a="("+e+")";t=Is.parse(a,{range:!0,tolerant:!0,sourceType:"module"}),i=1}catch(e){throw n}}}}var o=[];return Os.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:fn(!1,we("enableSwapMPWithPIP")?Lt("player.pictureInPicture"):Lt("player.miniPlayer"),"CLEAR_COOKIES",{customAction:{action:we("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&&we("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&&we("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:fn(!1,Lt("player.speedControls"),"SLOW_MOTION_VIDEO",{customAction:{action:"AXO_SPEED_SETTINGS_SHOW"}})}}),e})}if(!we("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})}we("enablePreviousNextButtons")&&v&&b&&(o[v]=function(){return fn(!1,Lt("player.previous"),"SKIP_PREVIOUS",{signalAction:{signal:"PLAYER_PLAY_PREVIOUS"}})},o[b]=function(){return fn(!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,Ms=!0,!0):(_s=null,!1)}catch(e){return console.error("[AxoTube:customUI] Custom UI apply failed:",e),_s=null,!1}}function Gs(e){!Ms&&we("enablePatchingVideoPlayer")&&(e&&(js=0),Us||(Us=setTimeout(function(){Us=null,js+=1,Vs()||js<10&&Gs(!1)},500)))}function Js(){Vs()||Gs(!0)}"complete"===document.readyState||"interactive"===document.readyState?Js():window.addEventListener("DOMContentLoaded",Js),Ce.addEventListener("configChange",function(e){var t;"enablePatchingVideoPlayer"===(null===(t=e.detail)||void 0===t?void 0:t.key)&&e.detail.value&&(_s=null,Gs(!0))});var Ws=null,Xs=null,qs=!1,Ys=null,Qs=null;function Zs(){return-1!==window.location.href.indexOf("watch")}function $s(){return le()&&le().SetFrameRate}function eu(){if(qs){var e=$s();if(e)try{e.call(le(),0),qs=!1}catch(e){console.warn("[AxoTube:autoFrameRate] Failed to reset auto frame rate:",e)}}}function tu(){null!==Ys&&clearTimeout(Ys),Ys=null,Qs&&(Qs.video.removeEventListener("play",tu),Qs=null)}function nu(){if(tu(),Xs&&(clearTimeout(Xs),Xs=null),Ws){try{Ws.removeEventListener("onPlaybackStartExternal",iu)}catch(e){}Ws=null}}function iu(){try{if(!Zs()||!Ws||Ws!==si()||!we("autoFrameRate"))return;var e=Ws.getStatsForNerds(),t=e&&e.resolution?e.resolution.match(/(\d+)x(\d+)@([\d.]+)/):null,n=$s();if(!t||!n)return;var i=ui(),r=we("autoFrameRatePauseVideoFor"),a=r>0&&i&&!i.paused&&!Qs;a&&i.pause();try{n.call(le(),parseFloat(t[3])),qs=!0}finally{a&&i.paused&&function(e,t,n){var i=window.location.hash,r=li(t),a=e.currentSrc||e.src;Qs={video:e,player:t,hash:i,videoId:r,source:a},e.addEventListener("play",tu),Ys=setTimeout(function(){var n=Qs,o=n&&n.video===e&&n.player===Ws&&si()===t&&ui()===e&&Zs()&&we("autoFrameRate")&&window.location.hash===i&&li(t)===r&&(e.currentSrc||e.src)===a&&e.paused&&!e.ended&&!e.seeking;if(tu(),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,Ws,r)}}catch(e){console.error("[AxoTube:autoFrameRate] Error in auto frame rate handling:",e)}}function ru(){if(Xs&&(clearTimeout(Xs),Xs=null),!we("autoFrameRate"))return nu(),void eu();var e=si();if(e){if(e!==Ws){if(tu(),Ws)try{Ws.removeEventListener("onPlaybackStartExternal",iu)}catch(e){}(Ws=e).addEventListener("onPlaybackStartExternal",iu)}}else Xs=setTimeout(ru,500)}window.addEventListener("hashchange",function(){tu(),Zs()||eu(),setTimeout(ru,0)}),pi(function(e){e!==Ws&&ru()}),fi(function(e,t){t&&e!==t&&tu()}),mi(function(e,t){t&&e!==t&&tu()}),document.addEventListener("keydown",tu,!0),document.addEventListener("mousedown",tu,!0),document.addEventListener("touchstart",tu,!0),Ce.addEventListener("configChange",function(e){var t,n;"autoFrameRate"===(null===(t=e.detail)||void 0===t?void 0:t.key)?e.detail.value?ru():(nu(),eu()):"autoFrameRatePauseVideoFor"===(null===(n=e.detail)||void 0===n?void 0:n.key)&&tu()}),ru()}();
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,A(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=F(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=A(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)||F(e,t)||x()}function C(e){return function(e){if(Array.isArray(e))return i(e)}(e)||b(e)||F(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 A(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 F(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 P="undefined"!=typeof globalThis&&globalThis||"undefined"!=typeof self&&self||"undefined"!=typeof global&&global||{},B="URLSearchParams"in P,I="Symbol"in P&&"iterator"in Symbol,R="FileReader"in P&&"Blob"in P&&function(){try{return new Blob,!0}catch(e){return!1}}(),L="FormData"in P,O="ArrayBuffer"in P;if(O)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 z(e){this.map={},e instanceof z?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 H(e){if(!e._noBody)return e.bodyUsed?Promise.reject(new TypeError("Already read")):void(e.bodyUsed=!0)}function K(e){return new Promise(function(t,n){e.onload=function(){t(e.result)},e.onerror=function(){n(e.error)}})}function V(e){var t=new FileReader,n=K(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:R&&Blob.prototype.isPrototypeOf(e)?this._bodyBlob=e:L&&FormData.prototype.isPrototypeOf(e)?this._bodyFormData=e:B&&URLSearchParams.prototype.isPrototypeOf(e)?this._bodyText=e.toString():O&&R&&((t=e)&&DataView.prototype.isPrototypeOf(t))?(this._bodyArrayBuffer=G(e.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):O&&(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"))},R&&(this.blob=function(){var e=H(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=H(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(R)return this.blob().then(V);throw new Error("could not read as ArrayBuffer")},this.text=function(){var e,t,n,i,r,a=H(this);if(a)return a;if(this._bodyBlob)return e=this._bodyBlob,t=new FileReader,n=K(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)},L&&(this.formData=function(){return this.text().then(q)}),this.json=function(){return this.text().then(JSON.parse)},this}z.prototype.append=function(e,t){e=_(e),t=U(t);var n=this.map[e];this.map[e]=n?n+", "+t:t},z.prototype.delete=function(e){delete this.map[_(e)]},z.prototype.get=function(e){return e=_(e),this.has(e)?this.map[e]:null},z.prototype.has=function(e){return this.map.hasOwnProperty(_(e))},z.prototype.set=function(e,t){this.map[_(e)]=U(t)},z.prototype.forEach=function(e,t){for(var n in this.map)this.map.hasOwnProperty(n)&&e.call(t,this.map[n],n,this)},z.prototype.keys=function(){var e=[];return this.forEach(function(t,n){e.push(n)}),j(e)},z.prototype.values=function(){var e=[];return this.forEach(function(t){e.push(t)}),j(e)},z.prototype.entries=function(){var e=[];return this.forEach(function(t,n){e.push([n,t])}),j(e)},I&&(z.prototype[Symbol.iterator]=z.prototype.entries);var W=["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 z(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 z(t.headers)),this.method=(n=t.method||this.method||"GET",i=n.toUpperCase(),W.indexOf(i)>-1?i:n),this.mode=t.mode||this.mode||null,this.signal=t.signal||this.signal||function(){if("AbortController"in P)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 z(t.headers),this.url=t.url||"",this._initBody(e)}X.prototype.clone=function(){return new X(this,{body:this._bodyInit})},J.call(X.prototype),J.call(Y.prototype),Y.prototype.clone=function(){return new Y(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new z(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=P.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 z,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&&P.location.href?P.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&&(R?a.responseType="blob":O&&(a.responseType="arraybuffer")),t&&"object"===T(t.headers)&&!(t.headers instanceof z||P.Headers&&t.headers instanceof P.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,P.fetch||(P.fetch=$,P.Headers=z,P.Request=X,P.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)}}window.__releaseBootLoader=re,setTimeout(function(){if(ie){try{ie.disconnect()}catch(e){}ie=null}re()},1e4),document.documentElement?oe():document.addEventListener("DOMContentLoaded",oe);var se,ue={};function le(){return"undefined"!=typeof window&&window.h5vcc&&window.h5vcc.tizentube||null}!function(){if(se)return ue;se=1;var e="Mozilla/5.0 (SMART-TV; LINUX; Tizen 4.0) AppleWebKit/537.3 (KHTML, like Gecko) SamsungBrowser/2.1 TV Safari/537.3",t="axotube-user-agent-applied";(function(){if((!navigator.userAgent||-1===navigator.userAgent.indexOf("SamsungBrowser/2.1"))&&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))try{sessionStorage.getItem(t)!==e&&(sessionStorage.setItem(t,e),location.reload())}catch(e){}})()}();var ce,he,de={defaults:{enableAdBlock:!0,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",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"],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 pe=function(){if(he)return ce;he=1;var e=de;return ce={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||!Number.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];if(o&&!o.includes(n))return!1;if("routeColor"===t&&!/^#[0-9a-f]{6}$/i.test(n))return!1;if("routeBackgroundUrl"===t&&n)try{var s=new URL(n);if("http:"!==s.protocol&&"https:"!==s.protocol)return!1}catch(e){return!1}return!0}},ce}(),fe=e(pe),me="ytaf-configuration",ge=JSON.parse,ve=JSON.stringify,ye=function(e){return ge(ve(e))},be=ye,xe=ye(de.defaults);xe.enableFixedUI=!le()||de.defaults.enableFixedUI;var Se,Ee=fe.validateConfigValue;function we(e){if(Object.prototype.hasOwnProperty.call(xe,e))return void 0===Se[e]&&(Se[e]=ye(xe[e])),Se[e];console.warn("[AxoTube:config] Unknown config key",e)}function ke(e,t){if(!Ee(e,t))return console.warn("[AxoTube:config] Rejected invalid config value",e,t),!1;Se[e]=ye(t);var n=function(){try{return!!window.localStorage&&(window.localStorage[me]=ve(Se),!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(me):delete window.localStorage[me],window.localStorage[me]=ve(Se),!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 Ce.dispatchEvent(new CustomEvent("configChange",{detail:{key:e,value:ye(t)}})),n}!function(){Se=ye(xe);try{if(!window.localStorage||!window.localStorage[me])return;var e=ge(window.localStorage[me]);if(!e||"object"!==T(e)||Array.isArray(e))return;Object.keys(e).forEach(function(t){Ee(t,e[t])&&(Se[t]=ye(e[t]))})}catch(e){console.warn("[AxoTube:config] Config read failed; using defaults:",e)}}();var De,Ce=new EventTarget;function Ae(){return ye(Se)}function Te(){return!!we("enablePerformanceMode")}function Fe(){return Te()||!!we("enableReducedMotion")}function Pe(){return Te()||!!we("enableLowMemoryMode")}function Be(){return!!we("enablePreviews")&&!Te()}function Ie(){return we("enableHqThumbnails")?Fe()||Pe()?"hover":"eager":"off"}function Re(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)}Ce.addEventListener("configChange",function(e){var t;"enablePerformanceMode"===(null===(t=e.detail)||void 0===t?void 0:t.key)&&(we("enablePerformanceMode")||(ke("enableReducedMotion",!1),ke("enableLowMemoryMode",!1)))});try{var Le=window.environment;Object.defineProperty(window,"environment",{configurable:!0,get:function(){return De},set:function(e){Re(e),De=e}}),De=Le,Re(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)&&Me()},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 Me(){return!(!window.matchMedia||!window.matchMedia("(dynamic-range: high)").matches)}function _e(e){var t=e.split("."),n="vp09"===t[0]?t[6]:"av01"===t[0]?t[7]:void 0;return"16"===n||"18"===n}var Ue="__axotubeResolutionOwner";if(!window[Ue]){if(window[Ue]=!0,we("enableExperimentalResolution"))try{window.h5vcc=window.h5vcc||{},window.h5vcc.system=window.h5vcc.system||{},window.h5vcc.system.getVideoContainerSizeOverride=function(){var e=we("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(_e(l[c].trim())&&!Me())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)}Ce.addEventListener("configChange",function(e){var t,n=(null===(t=e.detail)||void 0===t?void 0:t.key)||"";("enableExperimentalResolution"===n||"experimentalMaxResolution"===n&&we("enableExperimentalResolution"))&&setTimeout(function(){return location.reload()},300)})}var je={avc1:["avc1"],vp9:["vp09","vp9"],av01:["av01"]};var ze="__axotubeCodecOwner";if(!window[ze]){window[ze]=!0;try{!function(e){if(window.MediaSource&&"function"==typeof MediaSource.isTypeSupported){var t=function(e){if(!je[e])return[];var t=[];return Object.keys(je).forEach(function(n){n!==e&&(t=t.concat(je[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)}}}}(we("videoPreferredCodec"))}catch(e){console.warn("[AxoTube:codecPreference] Could not install codec preference:",e)}Ce.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},Ke=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},Ge=/###/g,Je=function(e){return e&&e.indexOf("###")>-1?e.replace(Ge,"."):e},We=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(We(e))return{};var a=Je(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:Je(i[r])}},qe=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},Ye=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]},Qe=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]):Qe(e[i],t[i],n):e[i]=t[i]);return e},Ze=function(e){return e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")},$e={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#x2F;"},et=function(e){return He(e)?e.replace(/[&<>"'\/]/g,function(e){return $e[e]}):e},tt=[" ",",","?","!",";"],nt=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),it=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}},rt=function(e){return null==e?void 0:e.replace(/_/g,"-")},at={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)}},ot=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||at,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)}}])}(),st=new ot,ut=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))})}}])}(),lt=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,C(n));else if(He(n)&&s){var l;(l=r).push.apply(l,C(n.split(s)))}else r.push(n);var c=Ye(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)?it(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),qe(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=Ye(this.data,o)||{};a.skipCopy||(n=JSON.parse(JSON.stringify(n))),i?Qe(s,n,r):s=E(E({},s),n),qe(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}}])}(ut),ct={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}},ht=Symbol("i18next/PATH_KEY");function dt(e,t){var n,i,r,a,o,s=e((a=[],(o=Object.create(null)).get=function(e,t){var n,i;return null===(n=r)||void 0===n||null===(i=n.revoke)||void 0===i||i.call(n),t===ht?a:(a.push(t),(r=Proxy.revocable(e,o)).proxy)},Proxy.revocable(Object.create(null),o).proxy))[ht],u=null!==(n=null==t?void 0:t.keySeparator)&&void 0!==n?n:".",l=null!==(i=null==t?void 0:t.nsSeparator)&&void 0!==i?i:":";if(s.length>1&&l){var c=null==t?void 0:t.ns;if((c?Array.isArray(c)?c:[c]:[]).includes(s[0]))return"".concat(s[0]).concat(l).concat(s.slice(1).join(u))}return s.join(u)}var pt={},ft=function(e){return!He(e)&&"boolean"!=typeof e&&"number"!=typeof e},mt=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=st.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=ft(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=tt.filter(function(e){return t.indexOf(e)<0&&n.indexOf(e)<0});if(0===i.length)return!0;var r=nt.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=dt(e,E(E({},this.options),a))),Array.isArray(e)||(e=[String(e)]),e=e.map(function(e){return"function"==typeof e?dt(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}):"",C=S&&!a.ordinal&&0===a.count,A=C&&a["defaultValue".concat(this.options.pluralSeparator,"zero")]||a["defaultValue".concat(k)]||a["defaultValue".concat(D)]||a.defaultValue,F=g;x&&!g&&w&&(F=A);var P=ft(F),B=Object.prototype.toString.apply(F);if(!(x&&F&&P&&["[object Number]","[object Function]","[object RegExp]"].indexOf(B)<0)||He(b)&&Array.isArray(F))if(x&&He(b)&&Array.isArray(g))(g=g.join(b))&&(g=this.extendTranslation(g,e,a,i));else{var I=!1,R=!1;!this.isValidLookup(g)&&w&&(I=!0,g=A),this.isValidLookup(g)||(R=!0,g=l);var L=(a.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&R?void 0:g,O=w&&A!==g&&this.options.updateMissing;if(R||I||O){if(this.logger.log(O?"updateKey":"missingKey",p,h,l,O?A: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=w&&n!==g?n:L;r.options.missingKeyHandler?r.options.missingKeyHandler(e,h,t,o,O,a):null!==(i=r.backendConnector)&&void 0!==i&&i.saveMissing&&r.backendConnector.saveMissing(e,h,t,o,O,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);C&&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)]||A)})}):j(M,l,A))}g=this.extendTranslation(g,e,a,m,i),R&&g===l&&this.options.appendNamespaceToMissingKey&&(g="".concat(h).concat(d).concat(l)),(R||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 z=this.options.returnedObjectHandler?this.options.returnedObjectHandler(v,F,E(E({},a),{},{ns:c})):"key '".concat(l," (").concat(this.language,")' returned an object instead of string.");return o?(m.res=z,m.usedParams=this.getUsedParamsDetails(a),m):z}if(s){var H=Array.isArray(F),K=H?[]:{},V=H?y:v;for(var G in F)if(Object.prototype.hasOwnProperty.call(F,G)){var J="".concat(V).concat(s).concat(G);K[G]=w&&!g?this.translate(J,E(E({},a),{},{defaultValue:ft(A)?A[G]:void 0},{joinArrays:!1,ns:c})):this.translate(J,E(E({},a),{joinArrays:!1,ns:c})),K[G]===J&&(K[G]=F[G])}g=K}}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=ct.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?dt(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,pt["".concat(f[0],"-").concat(e)]||null===(u=o.utils)||void 0===u||!u.hasLoadedNamespace||null!==(c=o.utils)&&void 0!==c&&c.hasLoadedNamespace(a)||(pt["".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}}])}(ut),gt=function(){return p(function e(t){u(this,e),this.options=t,this.supportedLngs=this.options.supportedLngs||!1,this.logger=st.create("languageUtils")},[{key:"getScriptPartFromCode",value:function(e){if(!(e=rt(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=rt(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}}])}(),vt={zero:0,one:1,two:2,few:3,many:4,other:5},yt={select:function(e){return 1===e?"one":"other"},resolvedOptions:function(){return{pluralCategories:["one","other"]}}},bt=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=st.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=rt("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!"),yt;if(!e.match(/-|_/))return yt;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 vt[e]-vt[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))}}])}(),xt=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=Ye(e,n);return void 0!==i?i:Ye(t,n)}(e,t,n);return!a&&r&&He(n)&&void 0===(a=it(e,n,i))&&(a=it(t,n,i)),a},St=function(e){return e.replace(/\$/g,"$$$$")},Et=function(){return p(function e(){var t,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};u(this,e),this.logger=st.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:et,this.escapeValue=void 0===i||i,this.useRawValueToEscape=void 0!==r&&r,this.prefix=a?Ze(a):o||"{{",this.suffix=s?Ze(s):u||"}}",this.formatSeparator=l||",",this.unescapePrefix=c?"":h||"-",this.unescapeSuffix=this.unescapePrefix?"":c||"",this.nestingPrefix=d?Ze(d):p||Ze("$t("),this.nestingSuffix=f?Ze(f):m||Ze(")"),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=xt(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(xt(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 St(e)}},{regex:this.regexp,safeValue:function(e){return u.escapeValue?St(u.escape(e)):St(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(Ze(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}}])}(),wt=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)||F(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(rt(i),r),t[o]=s),s(n)}},Dt=function(e){return function(t,n,i){return e(rt(n),i)(t)}},Ct=function(){return p(function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};u(this,e),this.logger=st.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:Dt;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(C(a.splice(1,o))).join(this.formatSeparator)}return a.reduce(function(e,t){var a=wt(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=st.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!!!")}}])}(ut),Tt=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}},Ft=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(){},Bt="__i18next_supportNoticeShown",It=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=Ft(i),e.services={},e.logger=st,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=Tt();this.options=E(E(E({},l),this.options),Ft(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[Bt]||("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[Bt]=!0));var c=function(e){return e?"function"==typeof e?new e:e:null};if(!this.options.isClone){var h;this.modules.logger?st.init(c(this.modules.logger),this.options):st.init(null,this.options),h=this.modules.formatter?this.modules.formatter:Ct;var d=new gt(this.options);this.store=new lt(this.options.resources,this.options);var p=this.services;p.logger=st,p.resourceStore=this.store,p.languageUtils=d,p.pluralResolver=new bt(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 Et(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 mt(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=Ke(),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=Ke();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&&ct.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=Ke();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=dt(e,E(E({},i.options),t))),"".concat(a.keyPrefix).concat(c).concat(e)}):("function"==typeof e&&(e=dt(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=Ke();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=Ke();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 gt(Tt());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 lt(s,a),o.services.resourceStore=o.store}if(n.interpolation){var u=E(E(E({},Tt().interpolation),this.options.interpolation),n.interpolation),l=E(E({},a),{},{interpolation:u});o.services.interpolator=new Et(l)}return o.translator=new mt(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}}])}(ut),Rt=It.createInstance();Rt.createInstance,Rt.dir,Rt.init,Rt.loadResources,Rt.reloadResources,Rt.use,Rt.changeLanguage,Rt.getFixedT;var Lt=Rt.t;Rt.exists,Rt.setDefaultNamespace,Rt.hasLoadedNamespace,Rt.loadNamespaces,Rt.loadLanguages;var Ot={en:{translation:{settings:{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",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:"Customize 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)"},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}}."}},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."},updater:{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…"}}}};Rt.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 Mt=null,_t=null,Ut=null,jt=null,zt=null,Ht=!1,Kt=[];function Vt(){try{return"undefined"==typeof window?null:window._yttv||null}catch(e){return null}}function Gt(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 Jt(e){if(zt)try{zt(e)}catch(e){}}function Wt(){var e=Vt();if(e){if(e===Mt&&null!==Ut){var t=Gt(e,_t);if(t&&t.root===Ut&&t.instance===jt)return Jt(t.instance),t.instance}Mt=e,Ut=null,jt=null,_t=null;try{for(var n in e){var i=Gt(e,n);if(i)return _t=n,Ut=i.root,jt=i.instance,Jt(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!!Wt()}function qt(e,t){var n=Wt();return n?{dispatched:!0,result:n.resolveCommand(e,t)}:{dispatched:!1}}function Yt(e,t){return qt(e,t).result}function Qt(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 Zt(){var e=Vt();if(!e)return!1;var t=!1;try{for(var n in e){var i=Gt(e,n);i&&(t=!0,Jt(i.instance))}}catch(e){}return t}var $t=[250,1e3,3e3];function en(){Zt();var e,t=f(Kt);try{for(t.s();!(e=t.n()).done;){var n=e.value;clearTimeout(n)}}catch(e){t.e(e)}finally{t.f()}Kt=$t.map(function(e){return setTimeout(Zt,e)})}function tn(e){return cn(Lt("menu.addToQueue"),{clickTrackingParams:null,playlistEditEndpoint:{customAction:{action:"ADD_TO_QUEUE",parameters:e}}})}function nn(e,t){return Yt(e,t)}function rn(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}),nn({openPopupAction:{popupType:"TOAST",popup:{overlayToastRenderer:i}}})}function an(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);nn(r)}function on(e,t){return{overlayPanelItemListRenderer:{items:e,selectedIndex:t}}}function sn(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 un(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 ln(e){return{clickTrackingParams:null,showMenuCommand:{contentId:e.videoId,thumbnail:{thumbnails:e.thumbnails},title:{simpleText:e.title},subtitle:{simpleText:e.subtitle},menu:{menuRenderer:{items:[hn(Lt("menu.play"),{clickTrackingParams:null,watchEndpoint:e.watchEndpointData}),cn(Lt("menu.saveWatchLater"),{clickTrackingParams:null,playlistEditEndpoint:{playlistId:"WL",actions:[{addedVideoId:e.videoId,action:"ACTION_ADD_VIDEO"}]}}),hn(Lt("menu.saveToPlaylist"),{clickTrackingParams:null,addToPlaylistEndpoint:{videoId:e.videoId}}),tn(e.item)],trackingParams:null,accessibility:{accessibilityData:{label:"Video options"}}}}}}}function cn(e,t){return{menuServiceItemRenderer:{text:{runs:[{text:e}]},serviceEndpoint:t,trackingParams:null}}}function hn(e,t){return{menuNavigationItemRenderer:{text:{runs:[{text:e}]},navigationEndpoint:t,trackingParams:null}}}function dn(e){return{overlayMessageRenderer:{title:{simpleText:e}}}}function pn(e){return{qrCodeRenderer:{qrCodeImage:{thumbnails:[{url:e}]},style:"QR_CODE_RENDERER_STYLE_ATA_SIDESHEET",trackingParams:null}}}function fn(e,t,n,i){return{isDisabled:e,text:{runs:[{text:t}]},icon:{iconType:n},command:i,trackingParams:null}}var mn,gn=(mn=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(mn,"ms")))},mn)});return Promise.race([fetch(e,i),a]).finally(function(){null!==r&&clearTimeout(r)})});function vn(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 yn=vn(256),bn=vn(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 Sn(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 En(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=Sn(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 wn(e){var t=we("enableDeArrowTitles"),n=we("enableDeArrowThumbnails"),i=we("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(!bn.get(t)){var o=e.tileRenderer;bn.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=yn.get(r);if(s)return s.data?En(i,r,s.data,t,n):Array.isArray(s.waiters)&&s.waiters.push(o),0;var u={data:null,waiters:[o]};yn.set(r,u),gn("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;En(a.item,r,e,a.titlesEnabled,a.thumbnailsEnabled)}}catch(e){i.e(e)}finally{i.f()}}).catch(function(){yn.get(r)===u&&yn.delete(r)})},a=e.length-1;a>=0;a--)r()}var kn=["maxresdefault.jpg","sddefault.jpg","hqdefault.jpg","mqdefault.jpg","default.jpg"],Dn={"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}},Cn=vn(256),An=new Map;function Tn(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 Fn(e){return Array.isArray(e)&&e.length>0&&e[0].width&&e[0].width>100}var Pn=vn(256);function Bn(e){var t,n=[],i=f(kn);try{for(i.s();!(t=i.n()).done;){var r=t.value,a=Dn[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 In(e,t){if(e&&"object"===T(e))for(var n in e)"thumbnails"===n&&Fn(e[n])?e[n]=t:"object"===T(e[n])&&In(e[n],t)}function Rn(e){if("eager"===Ie()){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)===Pn.get(u))continue;var l=Pn.get(u);l||(l=Pn.set(u,Bn(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&&In(i.tileRenderer.onFocusCommand,l)}catch(e){console.warn("[AxoTube:hqThumbnails] Error processing thumbnail:",e)}}}catch(e){n.e(e)}finally{n.f()}}}function Ln(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=be(t.metadata)),void 0!==t.header&&(n.header=be(t.header)),void 0!==t.onSelectCommand&&(n.onSelectCommand=be(t.onSelectCommand)),{tileRenderer:n}}function On(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 Nn(e){if(we("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)&&!On(h)&&h.push(tn(Ln(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=Ln(l),v=ln({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()}}}function Mn(e){if(Be()&&!/#\/watch/.test(location.hash||"")){var t,n=1e3*we("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=be({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 _n(e){if(!we("enableHideWatchedVideos"))return e;var t=we("hideWatchedVideosPages");if(!t||!t.length)return e;var n=we("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 Un(e){try{return e&&"function"==typeof e.getInstance&&e.getInstance()||null}catch(e){return null}}function jn(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 zn(){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=Un(i);if(r){try{if(i.toString().includes("ytlrActionRouter")){t=jn(e=r);break}}catch(e){}var a=jn(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}}}}Ce.addEventListener("configChange",function(e){if("disabledSidebarContents"===e.detail.key||"disableChannelsOnSidebar"===e.detail.key)try{var t=zn();t&&t.executeFunction(new t.commandFunction("reloadGuideAction"))}catch(e){console.warn("[AxoTube:customGuideAction] Guide reload failed:",e)}});var Hn=null;function Kn(e,t){var n=(Array.isArray(e.timelyActionRenderers)?e.timelyActionRenderers:[]).filter(function(e){return!function(e){var t,n=null==e||null===(t=e.timelyActionRenderer)||void 0===t?void 0:t.actionButtons;return!!Array.isArray(n)&&n.some(function(e){var t;return"SKIP"===(null==e||null===(t=e.buttonRenderer)||void 0===t||null===(t=t.command)||void 0===t||null===(t=t.showEngagementPanelEndpoint)||void 0===t||null===(t=t.customAction)||void 0===t?void 0:t.action)})}(e)});e.timelyActionRenderers=n.concat(t)}!function(e){if(Hn)return Hn;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)}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,Hn=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){var t,n,i,r,a,o,s,u,l,c;if(e.adPlacements||e.playerAds||e.adSlots||e.paidContentOverlay||e.streamingData||e.contents||e.endscreen||e.messages||e.entries||e.title||e.continuationContents||e.playerOverlays||e.transportControls){var h,d,p,m,g,v,y,b=we("enableAdBlock"),x=we("enableSigninReminder");if(e.adPlacements&&b&&(e.adPlacements=[]),e.playerAds&&b&&(e.playerAds=!1),e.adSlots&&b&&(e.adSlots=[]),e.paidContentOverlay&&!we("enablePaidPromotionOverlay")&&(e.paidContentOverlay=null),null!=e&&null!==(t=e.streamingData)&&void 0!==t&&t.adaptiveFormats&&"any"!==we("videoPreferredCodec")){var S=we("videoPreferredCodec");e.streamingData.adaptiveFormats.find(function(e){return e.mimeType&&e.mimeType.includes(S)})&&(e.streamingData.adaptiveFormats=e.streamingData.adaptiveFormats.filter(function(e){return!(!e.mimeType||!e.mimeType.startsWith("audio/"))||e.mimeType&&e.mimeType.includes(S)}))}if(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&&null!==(n=n.sectionListRenderer)&&void 0!==n&&n.contents){if(x||(e.contents.tvBrowseRenderer.content.tvSurfaceContentRenderer.content.sectionListRenderer.contents=e.contents.tvBrowseRenderer.content.tvSurfaceContentRenderer.content.sectionListRenderer.contents.filter(function(e){return!e.feedNudgeRenderer})),b){e.contents.tvBrowseRenderer.content.tvSurfaceContentRenderer.content.sectionListRenderer.contents=e.contents.tvBrowseRenderer.content.tvSurfaceContentRenderer.content.sectionListRenderer.contents.filter(function(e){return!e.adSlotRenderer});var E,w=f(e.contents.tvBrowseRenderer.content.tvSurfaceContentRenderer.content.sectionListRenderer.contents);try{for(w.s();!(E=w.n()).done;){var k,D=E.value;D.shelfRenderer&&null!==(k=D.shelfRenderer.content)&&void 0!==k&&null!==(k=k.horizontalListRenderer)&&void 0!==k&&k.items&&(D.shelfRenderer.content.horizontalListRenderer.items=D.shelfRenderer.content.horizontalListRenderer.items.filter(function(e){return!e.adSlotRenderer}))}}catch(e){w.e(e)}finally{w.f()}}Xn(e.contents.tvBrowseRenderer.content.tvSurfaceContentRenderer.content.sectionListRenderer.contents)}if(e.endscreen&&we("enableHideEndScreenCards")&&(e.endscreen=null),e.messages&&Array.isArray(e.messages)&&!we("enableYouThereRenderer")&&(e.messages=e.messages.filter(function(e){return!(null!=e&&e.youThereRenderer)})),!Array.isArray(e)&&null!=e&&e.entries&&b)e.entries=null===(h=e.entries)||void 0===h?void 0:h.filter(function(e){var t;return!(null!=e&&null!==(t=e.command)&&void 0!==t&&null!==(t=t.reelWatchEndpoint)&&void 0!==t&&null!==(t=t.adClientParams)&&void 0!==t&&t.isAd)});if(null!=e&&null!==(i=e.title)&&void 0!==i&&i.runs&&(d=e,y=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"),m="axotube_open_action",g={customAction:{action:"AXO_SETTINGS_SHOW",parameters:[]}},v=Lt("settings.ttSettings.summary"),{settingActionRenderer:{title:{runs:[{text:p}]},serviceEndpoint:g,summary:{runs:[{text:v}]},trackingParams:"null",actionLabel:{runs:[{text:p}]},itemId:m,thumbnail:{thumbnails:[{url:"https://www.gstatic.com/ytlr/img/parent_code.png"}]}}})]),d.items&&Array.isArray(d.items)||(d.items=[]),d.items.unshift(y)),null!=e&&null!==(r=e.contents)&&void 0!==r&&null!==(r=r.sectionListRenderer)&&void 0!==r&&r.contents&&Xn(e.contents.sectionListRenderer.contents),null!=e&&null!==(a=e.continuationContents)&&void 0!==a&&null!==(a=a.sectionListContinuation)&&void 0!==a&&a.contents&&Xn(e.continuationContents.sectionListContinuation.contents),null!=e&&null!==(o=e.continuationContents)&&void 0!==o&&null!==(o=o.horizontalListContinuation)&&void 0!==o&&o.items){var C=e.continuationContents.horizontalListContinuation.items;Rn(C),wn(C),Nn(C),e.continuationContents.horizontalListContinuation.items=_n(C)}if(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&&s.sections)for(var A=0;A<e.contents.tvBrowseRenderer.content.tvSecondaryNavRenderer.sections.length;A++){var T=e.contents.tvBrowseRenderer.content.tvSecondaryNavRenderer.sections[A].tvSecondaryNavSectionRenderer;if(T&&T.tabs){we("sortSubscriptionsByAlphabet")&&T.tabs.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});for(var F=0;F<T.tabs.length;F++){var P,B=T.tabs[F];if(null!==(P=B.tabRenderer.content)&&void 0!==P&&null!==(P=P.tvSurfaceContentRenderer)&&void 0!==P&&null!==(P=P.content)&&void 0!==P&&null!==(P=P.sectionListRenderer)&&void 0!==P&&P.contents){var I=T.tabs.indexOf(B),R=B.tabRenderer.content.tvSurfaceContentRenderer.content.sectionListRenderer.contents;Xn(R),T.tabs[I].tabRenderer.content.tvSurfaceContentRenderer.content.sectionListRenderer.contents=R}}}}if(null!=e&&null!==(u=e.contents)&&void 0!==u&&null!==(u=u.singleColumnWatchNextResults)&&void 0!==u&&null!==(u=u.pivot)&&void 0!==u&&u.sectionListRenderer&&(x||(e.contents.singleColumnWatchNextResults.pivot.sectionListRenderer.contents=e.contents.singleColumnWatchNextResults.pivot.sectionListRenderer.contents.filter(function(e){return!e.alertWithActionsRenderer})),Xn(e.contents.singleColumnWatchNextResults.pivot.sectionListRenderer.contents,!1),window.queuedVideos.videos.length>0)){var L=window.queuedVideos.videos.slice();L.unshift({tileRenderer:{contentType:"TILE_CONTENT_TYPE_VIDEO",metadata:{tileMetadataRenderer:{title:{simpleText:"Clear Queue"}}},onSelectCommand:{customAction:{action:"CLEAR_QUEUE"}},style:"TILE_STYLE_YTLR_DEFAULT"}}),e.contents.singleColumnWatchNextResults.pivot.sectionListRenderer.contents.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",L,-1!==L.findIndex(function(e){return e.contentId===window.queuedVideos.lastVideoId})?L.findIndex(function(e){return e.contentId===window.queuedVideos.lastVideoId}):0))}var O,N=null==e||null===(l=e.playerOverlays)||void 0===l?void 0:l.playerOverlayRenderer;if(N){var M,_=we("sponsorBlockManualSkips"),U=[];if(Array.isArray(_)&&_.length>0&&null!==(M=window)&&void 0!==M&&null!==(M=M.sponsorblock)&&void 0!==M&&M.segments){var j,z=f(window.sponsorblock.segments);try{for(z.s();!(j=z.n()).done;){var H=j.value;_.includes(H.category)&&U.push(un(Lt("sponsorblock.toasts.skip",{segment:Lt("sponsorblock.segments.".concat(H.category))}),"SKIP_NEXT",{clickTrackingParams:null,showEngagementPanelEndpoint:{customAction:{action:"SKIP",parameters:{time:H.segment[1]}}}},1e3*H.segment[0],1e3*H.segment[1]-1e3*H.segment[0]))}}catch(e){z.e(e)}finally{z.f()}}Kn(N,U)}if(null!=e&&null!==(c=e.transportControls)&&void 0!==c&&null!==(c=c.transportControlsRenderer)&&void 0!==c&&c.promotedActions&&we("enableSponsorBlockHighlight"))if(null!==(O=window)&&void 0!==O&&null!==(O=O.sponsorblock)&&void 0!==O&&O.segments){var K=window.sponsorblock.segments.find(function(e){return"poi_highlight"===e.category});K&&e.transportControls.transportControlsRenderer.promotedActions.push({type:"TRANSPORT_CONTROLS_BUTTON_TYPE_SPONSORBLOCK_HIGHLIGHT",button:{buttonRenderer:fn(!1,Lt("sponsorblock.toasts.skipToHighlight"),"SKIP_NEXT",{clickTrackingParams:null,customAction:{action:"SKIP",parameters:{time:K.segment[0]}}})}})}}},function(e){if(Array.isArray(e.items)){var t=we("disabledSidebarContents"),n=we("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--))}}}}]);var Vn=JSON.stringify;function Gn(e){return!(!e||!e.adSlotRenderer)}function Jn(e){var t;return!!(e&&e.tileRenderer&&("TVHTML5_TILE_RENDERER_TYPE_SHORTS"===e.tileRenderer.tvhtml5ShelfRendererType||null!==(t=e.tileRenderer.onSelectCommand)&&void 0!==t&&t.reelWatchEndpoint))}function Wn(e){var t;return!(!e||"object"!==T(e))&&(!!Object.keys(e).some(function(e){return-1!==e.toLowerCase().indexOf("promo")})||!(null===(t=e.shelfRenderer)||void 0===t||null===(t=t.tvhtml5Metadata)||void 0===t||!t.hideLogo))}function Xn(e){for(var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=!we("enableShorts"),i=!!we("enableAdBlock"),r=e.length-1;r>=0;r--){var a,o=e[r];if(o&&"object"===T(o))if(i&&Wn(o))e.splice(r,1);else if(o.shelfRenderer){var s=null===(a=o.shelfRenderer.content)||void 0===a?void 0:a.horizontalListRenderer;if(s&&s.items)if(n&&"TVHTML5_SHELF_RENDERER_TYPE_SHORTS"===o.shelfRenderer.tvhtml5ShelfRendererType)e.splice(r,1);else{var u=s.items;(i||n)&&(u=u.filter(function(e){return!(i&&Gn(e)||n&&Jn(e))}),s.items=u),Rn(u),wn(u),Nn(u),t&&Mn(u),s.items=_n(u)}}}}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,Vn.apply(this,arguments)}finally{a?r.isInlinePlaybackNoAd=o:delete r.isInlinePlaybackNoAd}}return Vn.apply(this,arguments)},window.JSON.stringify=JSON.stringify;var qn={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 Yn(){try{return!("undefined"==typeof window||!window.tectonicConfig||"object"!==T(window.tectonicConfig.featureSwitches))&&(window.tectonicConfig.disallowUnifiedFlagAccess=!1,Object.assign(window.tectonicConfig.featureSwitches,qn),!0)}catch(e){return!1}}var Qn=0;function Zn(e){if("off"!==Ie()&&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=Tn(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=Cn.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=Cn.get(e);if(n)t(n);else if(An.has(e))An.get(e).push(t);else{An.set(e,[t]);var i=function(t){var n=An.get(e)||[];An.delete(e),Cn.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 $n(){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&&Zn(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++)Zn(i[r]);e.style&&e.style.backgroundImage&&Zn(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?Tn(m):null;if(f&&f===v)continue;o.removeAttribute("data-hq-upgraded"),Zn(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"!==Ie()?o():(i&&(i.disconnect(),i=null),a&&(cancelAnimationFrame(a),a=null),r=null)},u=["enableHqThumbnails","enablePerformanceMode","enableReducedMotion","enableLowMemoryMode"];Ce.addEventListener("configChange",function(e){e.detail&&-1!==u.indexOf(e.detail.key)&&s()}),s()}!function e(){Yn()||(Qn+=1)>=50||setTimeout(e,200)}(),Ce.addEventListener("configChange",function(){Yn()}),"loading"===document.readyState?document.addEventListener("DOMContentLoaded",function(){setTimeout($n,1e3)}):setTimeout($n,1e3);var ei=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 w=h[i]>>8*r&255;u+=(w<16?0:"")+w.toString(16)}return u},ti={player:[],video:[],videoId:[]},ni=null,ii=null,ri=null,ai=null,oi=!1;function si(){return document.querySelector(".html5-video-player")}function ui(){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 ci(e,t,n){ti[e].slice().forEach(function(e){try{e(t,n)}catch(e){console.warn("[AxoTube:playerLifecycle] Listener failed:",e)}})}function hi(){var e=si(),t=ui(),n=li(e),i=ni,r=ii,a=ri;ni=e,ii=t,ri=n,e!==i&&ci("player",e,i),t!==r&&ci("video",t,r),n!==a&&ci("videoId",n,a)}function di(e,t){if("function"!=typeof t)throw new TypeError("A lifecycle listener must be a function");oi||(oi=!0,window.addEventListener("hashchange",hi),document.addEventListener("DOMContentLoaded",hi),ai=setInterval(hi,2e3),hi()),hi(),ti[e].push(t);var n="player"===e?ni:"video"===e?ii:ri;try{t(n,null)}catch(e){console.warn("[AxoTube:playerLifecycle] Listener failed:",e)}return function(){var n=ti[e].indexOf(t);-1!==n&&ti[e].splice(n,1),ti.player.length||ti.video.length||ti.videoId.length||oi&&(oi=!1,clearInterval(ai),ai=null,window.removeEventListener("hashchange",hi),document.removeEventListener("DOMContentLoaded",hi),ni=null,ii=null,ri=null)}}function pi(e){return di("player",e)}function fi(e){return di("video",e)}function mi(e){return di("videoId",e)}var gi=.05,vi=0,yi={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"}},bi=vn(20),xi="axotube-sponsorblock-segments",Si='ytlr-progress-bar [idomkey="slider"]',Ei="".concat(Si,"::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){var t=document.getElementById(xi);e?(t||((t=document.createElement("style")).id=xi,(document.head||document.documentElement).appendChild(t)),t.textContent!==e&&(t.textContent=e)):t&&(t.textContent="")}function ki(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 Di=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!==vi){var e=we("sponsorBlockManualSkips");this.manualSkippableCategories=Array.isArray(e)?e:[],this.skippableCategories=this.getSkippableCategories(),this.configGen=vi}}},{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=bi.get(this.videoID);if(t)this.applySegments(t);else{var n,i,r,a=ei(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);bi.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 we("enableSponsorBlockSponsor")&&e.push("sponsor"),we("enableSponsorBlockIntro")&&e.push("intro"),we("enableSponsorBlockOutro")&&e.push("outro"),we("enableSponsorBlockInteraction")&&e.push("interaction"),we("enableSponsorBlockSelfPromo")&&e.push("selfpromo"),we("enableSponsorBlockPreview")&&e.push("preview"),we("enableSponsorBlockFiller")&&e.push("filler"),we("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]:ui();this.active&&Ai()===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||ui(),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:yi[e.category]?yi[e.category].color:"blue"}}).sort(function(e,t){return e.end-e.start-(t.end-t.start)}),r="".concat(Ei," ").concat(Si,"::after { background: ").concat(ki(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(ki(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,wi(n))}}},{key:"scheduleSkip",value:function(){if(this.active&&we("enableSponsorBlock")&&this.segments&&Ai()===this.videoID){var e=ui();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+gi)&&(!(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+gi||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),we("enableSponsorBlockToasts"))){var a,o=(null===(a=yi[e.category])||void 0===a?void 0:a.name)||e.category;rn(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(ui()===this.video&&Ai()===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=yi[e.category])||void 0===n?void 0:n.name)||e.category;we("enableSponsorBlockToasts")&&rn(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(),we("enableSponsorBlockToasts")){var n,i=(null===(n=yi[e.category])||void 0===n?void 0:n.name)||e.category;rn(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-gi)&&!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="",wi(""),this.handled.clear(),this.rearms.clear(),this.notSkippingToasted.clear()}}])}();window.sponsorblock=null;var Ci=!1;function Ai(){var e=/[?&]v=([^&]+)/.exec(location.hash);return e?e[1]:null}function Ti(){var e=Ai(),t=!!we("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 Di(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()&&(Ci=!0,e.preventDefault(),e.stopPropagation(),e.stopImmediatePropagation())}},!0),window.addEventListener("keyup",function(e){10009===e.keyCode&&Ci&&(Ci=!1,e.preventDefault(),e.stopPropagation(),e.stopImmediatePropagation())},!0),window.addEventListener("hashchange",Ti,!1),fi(function(e){var t=window.sponsorblock;t&&e&&t.segments&&t.attachVideo(e)}),Ce.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")||(vi+=1,Ti())}),"loading"===document.readyState?document.addEventListener("DOMContentLoaded",Ti):Ti();var Fi=["timeupdate","durationchange","ratechange","seeked","play","pause"],Pi=null,Bi=null,Ii=null,Ri=!1;function Li(e){return e<10?"0".concat(e):String(e)}function Oi(e){var t=Math.floor(e/3600),n=Math.floor(e%3600/60),i=e%60;return t>0?"".concat(t,":").concat(Li(n),":").concat(Li(i)):"".concat(n,":").concat(Li(i))}function Ni(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 Mi(){var e=!!we("enableRemainingTime");if(e||Ri){var t;Bi&&Bi.parentNode||(t=function(){var e=document.querySelector('[idomkey="time-label"] > [idomkey="elapsedTime"]');return e?e.parentElement:null}(),t!==Bi&&(Ii&&Ii.disconnect(),Ii=null,Ri=!1,(Bi=t)&&(Ii=new MutationObserver(function(){return Mi()})).observe(Bi,{characterData:!0,childList:!0,subtree:!0})));var n=function(){var e=Bi?Bi.querySelector('[idomkey="elapsedTime"]'):null,t=e?e.firstChild:null;return t&&t.nodeType===Node.TEXT_NODE?t:null}();if(n){var i=si(),r=e&&!!i&&/#\/watch/.test(location.hash||"")&&!function(e){var t=Ni(e,"getVideoData",null);return!(!t||!t.isLive)}(i);if(r){var a=Math.floor(Ni(i,"getDuration",0)),o=Math.floor(Ni(i,"getCurrentTime",0)),s=Ni(i,"getPlaybackRate",1)||1,u=Math.round(Math.max(0,(a-o)/s)),l="-".concat(Oi(u));Ri=!0,n.data!==l&&(n.data=l)}else{if(Ri){var c=Math.floor(Ni(i,"getCurrentTime",0));n.data=Oi(c)}Ri=!1}}}}fi(function(e){return function(e){e!==Pi&&(Pi&&Fi.forEach(function(e){return Pi.removeEventListener(e,Mi)}),(Pi=e)&&Fi.forEach(function(e){return Pi.addEventListener(e,Mi)}),Mi())}(e)}),Ce.addEventListener("configChange",function(e){var t;"enableRemainingTime"===(null===(t=e.detail)||void 0===t?void 0:t.key)&&Mi()});var _i=["AXO_SETTINGS_SHOW","AXO_SPEED_SETTINGS_SHOW","SETTINGS_OPEN"];function Ui(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!==_i.indexOf(e.customAction.action)?"popup":null}(e)}function ji(){var e=si();if(e&&"function"==typeof e.pauseVideo)try{return void e.pauseVideo()}catch(e){}var t=ui();t&&!t.paused&&t.pause()}window.addEventListener("visibilitychange",function(e){we("enablePauseOnBlur")&&document.hidden&&(e.stopImmediatePropagation(),ji())},!0);var zi=["ytlr-player-page","ytlr-player-actions-container","ytlr-progress-bar"],Hi=[10,30,60],Ki={},Vi={},Gi={},Ji=0,Wi=0,Xi=-1/0,qi=null;function Yi(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 Qi(e,t){var n=si();try{if(n&&"function"==typeof n.setPlaybackRate)return void n.setPlaybackRate(t)}catch(e){}e.playbackRate=t}function Zi(e,t){var n=e.duration;return n>0?Math.max(0,Math.min(n,t)):null}function $i(e){e.preventDefault(),e.stopPropagation(),e.stopImmediatePropagation()}function er(e,t){var n=Vi[e];if(n)if(n.timer=null,39===e){if(t.paused)return;n.rateBefore=t.playbackRate||1,Qi(t,2)}else 37===e&&(n.ticker=setInterval(function(){var e=ui();e&&(qi=null,function(e,t){var n=Zi(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)&&we("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&&!Yi(t)}(e.target)||function(){for(var e=document.querySelectorAll(".zylon-focus"),t=0;t<e.length;t++){var n=e[t];if(!(Yi(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<zi.length;e++){var t=document.querySelector(zi[e]);if(t&&!Yi(t)){var n=window.getComputedStyle(t);if("hidden"!==n.visibility&&parseFloat(n.opacity)>0&&t.getClientRects().length>0)return!0}}return!1}())){var n=ui();if(n)if(Vi[t])$i(e);else{var i=Date.now();if(void 0!==Gi[t]&&i-Gi[t]<100)$i(e);else{if(Gi[t]=i,13===t)!function(e){var t=si(),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),Vi[t]={timer:null};else{var r=37===t?-1:1,a=function(e,t){var n=e===Ji&&t-Xi<=1e3;return Wi=n?Wi+1:0,Ji=e,n||(qi=null),Hi[Math.min(Wi,Hi.length-1)]}(r,i)*r,o=Zi(n,(Wi>0&&null!==qi?qi:n.currentTime)+a);null!==o&&(qi=o,n.currentTime=o),Vi[t]={timer:setTimeout(function(){return er(t,ui())},1e3)}}Ki[t]=!0,$i(e)}}}},!0),window.addEventListener("keyup",function(e){var t=e.keyCode;if(Ki[t]){delete Ki[t],$i(e);var n=Vi[t];if(delete Vi[t],n){if(n.timer&&clearTimeout(n.timer),n.ticker&&clearInterval(n.ticker),void 0!==n.rateBefore){var i=ui();i&&Qi(i,n.rateBefore)}13!==t&&(Xi=Date.now())}}},!0);var tr=0;function nr(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=++tr,t=0,n=function(){if(e===tr&&we("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=nr(r,t,n);return a&&"function"==typeof e.setOption&&e.setOption("captions","track",a),"done"}(si(),we("autoSubtitleLanguage")||"en",!!we("autoSubtitleAllowAuto"));t+=1,"retry"===i&&t<8&&setTimeout(n,1e3)}};n()}mi(function(e){e&&ir()});var rr='/* 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',ar="/* ytaf-theme-start */",or="/* ytaf-theme-end */",sr=document.createElement("style"),ur="",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 cr(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 hr(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 dr(){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""}}(we("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=we("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=cr(getComputedStyle(a[o]).color);if(!(null===s||s<.3)){var u=s>.8?0:s>.55?1:2,l=hr(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}(we("textTheme"));ur="\n ".concat(ar,"\n #container {\n ").concat(n,"\n }\n ").concat(i,"\n ").concat(r,"\n ").concat(or,"\n");var a=document.querySelector("style[nonce]");if(a){var o=a.textContent||"",s=o.indexOf(ar),u=o.indexOf(or);-1!==s&&-1!==u&&(o=o.slice(0,s)+o.slice(u+20)),a.textContent=o+ur}else sr.textContent=ur,!sr.parentNode&&document.head&&document.head.appendChild(sr)}document.head&&document.head.appendChild(sr),dr(),setTimeout(dr,1500);var pr=null;window.addEventListener&&window.addEventListener("hashchange",function(){pr&&clearTimeout(pr),pr=setTimeout(dr,150)});var fr="1.30.3";function mr(e,t,n){if("arrayValue"===t){var i=we(e),r=Array.isArray(i)?i.slice():[];return r.includes(n)?r.splice(r.indexOf(n),1):r.push(n),ke(e,r)}if("themePreset"===e){var a="string"==typeof n&&Object.prototype.hasOwnProperty.call(de.themePresetColors,n)?de.themePresetColors[n]:null;return!("string"!=typeof a||!/^#[0-9a-f]{6}$/i.test(a))&&(ke("routeColor",a),ke("themePreset",n))}return ke(e,n)}var gr,vr={};var yr=(gr||(gr=1,vr.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=C(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},C=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},A=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=A(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}()),vr),br=e(yr),xr=vn(50);function Sr(e){if(xr.has(e))return xr.get(e);try{var t,n=br.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 xr.set(e,i),i}catch(e){console.error("[AxoTube:qrCode] QR code generation failed:",e)}return null}var Er=[{type:"sponsor",key:"enableSponsorBlockSponsor",icon:"MONEY_HEART"},{type:"intro",key:"enableSponsorBlockIntro",icon:"PLAY_CIRCLE"},{type:"outro",key:"enableSponsorBlockOutro",icon:"STOP_CIRCLE"},{type:"interaction",key:"enableSponsorBlockInteraction",icon:"TOUCH_APP"},{type:"selfpromo",key:"enableSponsorBlockSelfPromo",icon:"PROMOTION"},{type:"preview",key:"enableSponsorBlockPreview",icon:"PREVIEW"},{type:"filler",key:"enableSponsorBlockFiller",icon:"PADDING"},{type:"music_offtopic",key:"enableSponsorBlockMusicOfftopic",icon:"MUSIC_NOTE"}],wr={skip:"show",show:"off",off:"skip"},kr=["default","black","darkGray","charcoal","navy","darkRed","darkGreen","darkPurple"],Dr=["default","white","gray","red","blue","green","purple","yellow"],Cr=["auto","2160p","1440p","1080p","720p","480p","360p","240p","144p"],Ar=["any","vp9","av01","avc1"],Tr=["en","hi","es","fr","de","pt","ja","ko","ru"],Fr=["1440p","2160p"],Pr=[.05,.1,.15,.2,.25,.3,.35,.4,.45,.5],Br=[0,.5,1,1.5,2,2.5,3,3.5,4,4.5,5],Ir=[0,10,20,30,40,50,60,70,80,90,100],Rr=[10,20,30,60,120,180,240,300],Lr=[.1,.2,.3,.4,.5,.6,.7,.8,.9,1],Or=[{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 Nr(e){return JSON.stringify({browseEndpoint:{browseId:e}})}var Mr=[{name:"Search",icon:"SEARCH",value:JSON.stringify({searchEndpoint:{query:""}})},{name:"Home",icon:"WHAT_TO_WATCH",value:Nr("FEtopics")},{name:"Sports",icon:"TROPHY",value:Nr("FEtopics_sports")},{name:"News",icon:"NEWS",value:Nr("FEtopics_news")},{name:"Music",icon:"YOUTUBE_MUSIC",value:Nr("FEtopics_music")},{name:"Podcasts",icon:"BROADCAST",value:Nr("FEtopics_podcasts")},{name:"Movies & TV",icon:"CLAPPERBOARD",value:Nr("FEtopics_movies")},{name:"Gaming",icon:"GAMING",value:Nr("FEtopics_gaming")},{name:"Live",icon:"LIVE",value:Nr("FEtopics_live")},{name:"Subscriptions",icon:"SUBSCRIPTIONS",value:Nr("FEsubscriptions")},{name:"Library",icon:"TAB_LIBRARY",value:Nr("FElibrary")},{name:"More",icon:"TAB_MORE",value:Nr("FEtopics_more")}];function _r(e){var t=Ur(e);return t&&we(t.key)?-1!==(we("sponsorBlockManualSkips")||[]).indexOf(e)?"show":"skip":"off"}function Ur(e){for(var t=0;t<Er.length;t++)if(Er[t].type===e)return Er[t];return null}function jr(e,t,n){return{name:e,icon:n,value:t}}function zr(e,t,n){return{name:e,key:t,value:n}}function Hr(e,t,n,i){return{name:e,icon:t,value:null,menuHeader:i,options:n}}function Kr(e,t){return{title:e,subtitle:t}}function Vr(e,t){return{name:e,icon:"OPEN_IN_NEW",value:null,options:{title:e,subtitle:t,content:[Lt("settings.about.scanMessage",{name:e}),{qrLink:t}]}}}function Gr(){var e;return[Hr(Lt("settings.ads.title"),"SLASH_CIRCLE_LEFT",[jr(Lt("settings.ads.blockAds"),"enableAdBlock","HEALTH_AND_SAFETY"),jr(Lt("settings.ads.paidPromotion"),"enablePaidPromotionOverlay","PAID"),jr(Lt("settings.ads.sponsorBlock"),"enableSponsorBlock","SPONSORSHIP_STAR"),Hr(Lt("settings.ads.segmentTypes.title"),"SETTINGS",Er.map(function(e){return{name:Lt("settings.ads.segments.".concat(e.type)),icon:e.icon,segment:e.type}}),Kr(Lt("settings.ads.segmentTypes.title"),Lt("settings.ads.segmentTypes.subtitle"))),jr(Lt("settings.ads.highlightButton"),"enableSponsorBlockHighlight","STAR"),jr(Lt("settings.ads.notices"),"enableSponsorBlockToasts","INFO")],Kr(Lt("settings.ads.title"),Lt("settings.ads.subtitle"))),Hr(Lt("settings.playback.title"),"PLAY_CIRCLE",[Hr(Lt("settings.playback.quality.title"),"VIDEO_QUALITY",Cr.map(function(e){return zr("auto"===e?Lt("settings.common.auto"):e,"preferredVideoQuality",e)}),Kr(Lt("settings.playback.quality.title"),Lt("settings.playback.quality.subtitle"))),Hr(Lt("settings.playback.codec.title"),"VIDEO_QUALITY",Ar.map(function(e){return zr("any"===e?Lt("settings.common.any"):e.toUpperCase(),"videoPreferredCodec",e)}),Kr(Lt("settings.playback.codec.title"),Lt("settings.playback.codec.subtitle"))),Hr(Lt("settings.playback.speedStep.title"),"SLOW_MOTION_VIDEO",Pr.map(function(e){return zr("".concat(e,"x"),"speedSettingsIncrement",e)}),Kr(Lt("settings.playback.speedStep.title"),Lt("settings.playback.speedStep.subtitle"))),(e=le(),e&&e.SetFrameRate?Hr(Lt("settings.playback.frameRate.title"),"SYNC",[jr(Lt("settings.playback.frameRate.match"),"autoFrameRate","SCREEN_SWITCH"),Hr(Lt("settings.playback.frameRate.pause.title"),"TIMER",Br.map(function(e){return zr(Zr(e),"autoFrameRatePauseVideoFor",1e3*e)}),Kr(Lt("settings.playback.frameRate.pause.title"),Lt("settings.playback.frameRate.pause.subtitle")))],Kr(Lt("settings.playback.frameRate.title"),Lt("settings.playback.frameRate.subtitle"))):null),Hr(Lt("settings.playback.captions.title"),"CAPTIONS",[jr(Lt("settings.playback.captions.onByDefault"),"enableAutoSubtitles","CLOSED_CAPTION_SELECTED"),Hr(Lt("settings.playback.captions.language.title"),"TRANSLATE",Tr.map(function(e){return zr(Lt("settings.playback.languages.".concat(e)),"autoSubtitleLanguage",e)}),Kr(Lt("settings.playback.captions.language.title"),Lt("settings.playback.captions.language.subtitle"))),jr(Lt("settings.playback.captions.allowAuto"),"autoSubtitleAllowAuto","SPARKLE"),jr(Lt("settings.playback.captions.myLanguage"),"enableShowUserLanguage","LANGUAGE"),jr(Lt("settings.playback.captions.otherLanguages"),"enableShowOtherLanguages","TRANSLATE")],Kr(Lt("settings.playback.captions.title"),Lt("settings.playback.captions.subtitle"))),Hr(Lt("settings.playback.experimental.title"),"VIDEO_QUALITY_4K",[jr(Lt("settings.playback.experimental.unlock"),"enableExperimentalResolution","VIDEO_QUALITY_8K"),Hr(Lt("settings.playback.experimental.max.title"),"VIDEO_QUALITY",Fr.map(function(e){return zr(e,"experimentalMaxResolution",e)}),Kr(Lt("settings.playback.experimental.max.title"),Lt("settings.playback.experimental.max.subtitle")))],Kr(Lt("settings.playback.experimental.title"),Lt("settings.playback.experimental.subtitle"))),Hr(Lt("settings.playback.panelShrink.title"),"COMMENT",[jr(Lt("settings.playback.panelShrink.on"),"enablePanelShrink","COMMENT"),Hr(Lt("settings.playback.panelShrink.size.title"),"VIDEO_QUALITY",[zr("50%","panelShrinkPercent","50"),zr("60%","panelShrinkPercent","60"),zr("70%","panelShrinkPercent","70")],Kr(Lt("settings.playback.panelShrink.size.title"),Lt("settings.playback.panelShrink.size.subtitle")))],Kr(Lt("settings.playback.panelShrink.title"),Lt("settings.playback.panelShrink.subtitle"))),jr(Lt("settings.playback.pauseInBackground"),"enablePauseOnBlur","PAUSE"),jr(Lt("settings.playback.remainingTime"),"enableRemainingTime","TIMER")],Kr(Lt("settings.playback.title"),Lt("settings.playback.subtitle"))),Hr(Lt("settings.playerControls.title"),"SETTINGS_REMOTE",[jr(Lt("settings.playerControls.customize"),"enablePatchingVideoPlayer","EDIT"),jr(Lt("settings.playerControls.previousNext"),"enablePreviousNextButtons","SKIP_NEXT"),jr(Lt("settings.playerControls.speed"),"enableSpeedControlsButton","SLOW_MOTION_VIDEO"),jr(Lt("settings.playerControls.superThanks"),"enableSuperThanksButton","HANDS_HEART"),jr(Lt("settings.playerControls.miniPlayer"),"enableMPButton","MULTIVIEW"),jr(Lt("settings.playerControls.pipInsteadOfMini"),"enableSwapMPWithPIP","PICTURE_IN_PICTURE"),jr(Lt("settings.playerControls.onePress"),"enableOnePressMode","SPACE_BAR")],Kr(Lt("settings.playerControls.title"),Lt("settings.playerControls.subtitle"))),Hr(Lt("settings.browsing.title"),"EXPLORE",[Hr(Lt("settings.browsing.thumbnails.title"),"EYE",[jr(Lt("settings.browsing.hqThumbnails"),"enableHqThumbnails","VIDEO_QUALITY"),jr(Lt("settings.browsing.deArrowTitles"),"enableDeArrowTitles","TEXT_BOX"),jr(Lt("settings.browsing.deArrowThumbnails"),"enableDeArrowThumbnails","EYE"),jr(Lt("settings.browsing.deArrowPeek"),"enableDeArrowPeek","TOUCH_APP")],Kr(Lt("settings.browsing.thumbnails.title"),Lt("settings.browsing.thumbnails.subtitle"))),Hr(Lt("settings.browsing.previews.title"),"PREVIEW",[jr(Lt("settings.browsing.previews.on"),"enablePreviews","PLAY_ARROW_CIRCLE"),{name:Lt("settings.browsing.previews.length"),icon:"TIMER",value:"previewLengthSeconds",stepper:5}],Kr(Lt("settings.browsing.previews.title"),Lt("settings.browsing.previews.subtitle"))),Hr(Lt("settings.browsing.hideWatched.title"),"VISIBILITY_OFF",[jr(Lt("settings.browsing.hideWatched.on"),"enableHideWatchedVideos","VISIBILITY_OFF"),Hr(Lt("settings.browsing.hideWatched.threshold.title"),"TIMER",Ir.map(function(e){return zr("".concat(e,"%"),"hideWatchedVideosThreshold",e)}),Kr(Lt("settings.browsing.hideWatched.threshold.title"),Lt("settings.browsing.hideWatched.threshold.subtitle"))),{name:Lt("settings.browsing.hideWatched.pages.title"),value:null,arrayToEdit:"hideWatchedVideosPages",menuHeader:Kr(Lt("settings.browsing.hideWatched.pages.title"),Lt("settings.browsing.hideWatched.pages.subtitle")),options:[{name:"Search Results",value:"search"},{name:"Home",value:"home"},{name:"Music",value:"music"},{name:"Gaming",value:"gaming"},{name:"Subscriptions",value:"subscriptions"},{name:"Library",value:"library"},{name:"More",value:"more"}]}],Kr(Lt("settings.browsing.hideWatched.title"),Lt("settings.browsing.hideWatched.subtitle"))),jr(Lt("settings.browsing.shorts"),"enableShorts","YOUTUBE_SHORTS_FILL_24"),jr(Lt("settings.browsing.endScreens"),"enableHideEndScreenCards","VISIBILITY_OFF"),jr(Lt("settings.browsing.longPress"),"enableLongPress","TOUCH_APP"),jr(Lt("settings.browsing.stillWatching"),"enableYouThereRenderer","PERSON")],Kr(Lt("settings.browsing.title"),Lt("settings.browsing.subtitle"))),Hr(Lt("settings.home.title"),"HOME",[Hr(Lt("settings.home.startup.title"),"TV",Mr.map(function(e){return{name:e.name,icon:e.icon,key:"launchToOnStartup",value:e.value}}),Kr(Lt("settings.home.startup.title"),Lt("settings.home.startup.subtitle"))),jr(Lt("settings.home.reloadHome"),"reloadHomeOnStartup","REFRESH"),{name:Lt("settings.home.sidebarItems.title"),icon:"MENU",value:null,arrayToEdit:"disabledSidebarContents",menuHeader:Kr(Lt("settings.home.sidebarItems.title"),Lt("settings.home.sidebarItems.subtitle")),options:Or.map(function(e){return{name:e.name,icon:e.icon,value:e.icon}})},jr(Lt("settings.home.hideChannels"),"disableChannelsOnSidebar","PERSON_MINUS"),jr(Lt("settings.home.sortSubscriptions"),"sortSubscriptionsByAlphabet","SORT")],Kr(Lt("settings.home.title"),Lt("settings.home.subtitle"))),Hr(Lt("settings.appearance.title"),"STYLE",[Hr(Lt("settings.appearance.theme.title"),"COLOR_LENS",[Hr(Lt("settings.appearance.theme.presets.title"),"COLOR_LENS",kr.map(function(e){return zr(Lt("settings.appearance.colors.".concat(e)),"themePreset",e)}),Kr(Lt("settings.appearance.theme.presets.title"),Lt("settings.appearance.theme.presets.subtitle"))),Hr(Lt("settings.appearance.theme.background.title"),"COLOR_LENS",kr.map(function(e){return zr(Lt("settings.appearance.colors.".concat(e)),"routeColor",de.themePresetColors[e])}),Kr(Lt("settings.appearance.theme.background.title"),Lt("settings.appearance.theme.background.subtitle"))),Hr(Lt("settings.appearance.theme.text.title"),"COLOR_LENS",Dr.map(function(e){return zr(Lt("settings.appearance.textColors.".concat(e)),"textTheme",e)}),Kr(Lt("settings.appearance.theme.text.title"),Lt("settings.appearance.theme.text.subtitle")))],Kr(Lt("settings.appearance.theme.title"),Lt("settings.appearance.theme.subtitle"))),Hr(Lt("settings.appearance.dimming.title"),"EYE_OFF",[jr(Lt("settings.appearance.dimming.on"),"enableScreenDimming","EYE_OFF"),Hr(Lt("settings.appearance.dimming.timeout.title"),"TIMER",Rr.map(function(e){return zr(function(e){return e>=60?Lt("settings.minutes",{count:e/60}):Zr(e)}(e),"dimmingTimeout",e)}),Kr(Lt("settings.appearance.dimming.timeout.title"),Lt("settings.appearance.dimming.timeout.subtitle"))),Hr(Lt("settings.appearance.dimming.opacity.title"),"LENS_BLUE",Lr.map(function(e){return zr("".concat(Math.round(100*e),"%"),"dimmingOpacity",e)}),Kr(Lt("settings.appearance.dimming.opacity.title"),Lt("settings.appearance.dimming.opacity.subtitle")))],Kr(Lt("settings.appearance.dimming.title"),Lt("settings.appearance.dimming.subtitle"))),jr(Lt("settings.appearance.performance"),"enablePerformanceMode","SPEED_RUN"),Hr(Lt("settings.appearance.clock.title"),"SCHEDULE",[Hr(Lt("settings.appearance.clock.show.title"),"VISIBILITY",[zr(Lt("settings.appearance.clock.show.off"),"clockMode","off"),zr(Lt("settings.appearance.clock.show.always"),"clockMode","always"),zr(Lt("settings.appearance.clock.show.notPlaying"),"clockMode","notPlaying")],Kr(Lt("settings.appearance.clock.show.title"),Lt("settings.appearance.clock.show.subtitle"))),Hr(Lt("settings.appearance.clock.format.title"),"TEXT_BOX",[zr(Lt("settings.appearance.clock.format.h24"),"clockFormat","24h"),zr(Lt("settings.appearance.clock.format.h12"),"clockFormat","12h"),zr(Lt("settings.appearance.clock.format.h12NoAmPm"),"clockFormat","12hNoAmPm")],Kr(Lt("settings.appearance.clock.format.title"),Lt("settings.appearance.clock.format.subtitle"))),Hr(Lt("settings.appearance.clock.position.title"),"LOCATION_POINT",[zr(Lt("settings.appearance.clock.position.topLeft"),"clockPosition","topLeft"),zr(Lt("settings.appearance.clock.position.topRight"),"clockPosition","topRight"),zr(Lt("settings.appearance.clock.position.bottomLeft"),"clockPosition","bottomLeft"),zr(Lt("settings.appearance.clock.position.bottomRight"),"clockPosition","bottomRight")],Kr(Lt("settings.appearance.clock.position.title"),Lt("settings.appearance.clock.position.subtitle"))),jr(Lt("settings.appearance.clock.seconds"),"clockShowSeconds","TIMER")],Kr(Lt("settings.appearance.clock.title"),Lt("settings.appearance.clock.subtitle"))),jr(Lt("settings.appearance.fullAnimations"),"enableFixedUI","PROGRESS_ACTIVITY")],Kr(Lt("settings.appearance.title"),Lt("settings.appearance.subtitle"))),Hr(Lt("settings.system.title"),"SETTINGS",[Hr(Lt("settings.system.whosWatching.title"),"ACCOUNT_CIRCLE",[jr(Lt("settings.system.whosWatching.on"),"enableWhoIsWatchingMenu","PEOPLE"),jr(Lt("settings.system.whosWatching.always"),"permanentlyEnableWhoIsWatchingMenu","PERSON"),jr(Lt("settings.system.whosWatching.onExit"),"enableWhosWatchingMenuOnAppExit","EXIT_APP")],Kr(Lt("settings.system.whosWatching.title"),Lt("settings.system.whosWatching.subtitle"))),jr(Lt("settings.system.signInReminder"),"enableSigninReminder","SIGN_IN"),jr(Lt("settings.system.welcome"),"showWelcomeToast","SPARKLE"),Hr(Lt("settings.system.updates.title"),"SYSTEM_UPDATE",[{name:Lt("settings.system.updates.checkNow"),icon:"SYSTEM_UPDATE",action:"CHECK_FOR_UPDATES"},jr(Lt("settings.system.updates.onStartup"),"enableUpdater","SYSTEM_UPDATE")],Kr(Lt("settings.system.updates.title"),Lt("settings.system.updates.subtitle",{version:fr}))),{name:Lt("settings.system.restartCast"),icon:"CAST_ICON",action:"AXO_CAST_RESTART"},{name:Lt("settings.system.reload"),icon:"REFRESH",action:"AXO_RELOAD_PAGE"}],Kr(Lt("settings.system.title"),Lt("settings.system.subtitle"))),Hr(Lt("settings.about.title"),"HELP",[Vr("GitHub","https://github.com/TizenDroid/axotube"),Vr("Discord","https://discord.gg/UDb8nak5YD")],Kr(Lt("settings.about.title"),Lt("settings.about.version",{version:fr})))]}var Jr="root",Wr="axo-settings",Xr=new Map,qr=null;function Yr(e,t){for(var n=0;n<e.length;n++){var i=e[n];if(i){var r="".concat(t,".").concat(n);Xr.set(r,i),Array.isArray(i.options)&&Yr(i.options,r)}}}function Qr(e,t){return[{customAction:{action:e,parameters:t}}]}function Zr(e){return Lt("settings.seconds",{count:e})}function $r(e,t,n,i){if(e.action)return sn({title:e.name},{icon:e.icon},[{customAction:{action:e.action}}]);if(void 0!==e.segment){var r=_r(e.segment);return sn({title:e.name,subtitle:Lt("settings.segmentModes.".concat(r))},{icon:e.icon},Qr("SETTINGS_SEGMENT",{category:e.segment,panel:i,index:ea(t)}))}if(void 0!==n){var a=-1!==(we(n)||[]).indexOf(e.value);return sn({title:e.name},{icon:e.icon,secondaryIcon:a?"CHECK_BOX":"CHECK_BOX_OUTLINE_BLANK"},Qr("SETTINGS_SET",{key:n,valName:"arrayValue",value:e.value,panel:i,index:ea(t)}))}if(void 0!==e.key){var o=we(e.key)===e.value;return sn({title:e.name},{icon:e.icon,secondaryIcon:o?"RADIO_BUTTON_CHECKED":"RADIO_BUTTON_UNCHECKED"},Qr("SETTINGS_SET",{key:e.key,valName:"stringValue",value:e.value,panel:i,index:ea(t)}))}return void 0!==e.stepper?sn({title:e.name,subtitle:Zr(we(e.value))},{icon:e.icon},Qr("SETTINGS_OPEN",{id:t})):void 0!==e.arrayToEdit||e.options&&"object"===T(e.options)?sn({title:e.name},{icon:e.icon},Qr("SETTINGS_OPEN",{id:t})):"string"==typeof e.value?sn({title:e.name},{icon:e.icon,secondaryIcon:we(e.value)?"CHECK_BOX":"CHECK_BOX_OUTLINE_BLANK"},Qr("SETTINGS_TOGGLE",{key:e.value,panel:i,index:ea(t)})):null}function ea(e){var t=e.lastIndexOf(".");return Number(e.slice(t+1))}function ta(e,t,n){for(var i=[],r=0;r<e.length;r++){var a=e[r];if(a){var o=$r(a,"".concat(t,".").concat(r),n,t);o&&i.push(o)}}return i}function na(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(dn(r));else if(r&&r.qrLink){var a=Sr(r.qrLink);a&&n.push(pn(a))}}}catch(e){i.e(e)}finally{i.f()}return n}function ia(e,t,n){var i,r=function(e){if(e===Jr||!Xr.has(e))return{header:{title:Lt("settings.ttSettings.title"),subtitle:Lt("settings.ttSettings.madeByText")},rows:ta(qr,Jr)};var t=Xr.get(e);if(void 0!==t.stepper){var n=we(t.value),i=t.stepper;return{header:{title:t.name},rows:[sn({title:"−".concat(Zr(i))},null,Qr("SETTINGS_STEP",{key:t.value,step:-i,panel:e})),dn(Zr(n)),sn({title:"+".concat(Zr(i))},null,Qr("SETTINGS_STEP",{key:t.value,step:i,panel:e}))]}}return void 0!==t.arrayToEdit?{header:t.menuHeader||{title:t.name},rows:ta(t.options,e,t.arrayToEdit)}:t.options&&"object"===T(t.options)&&!Array.isArray(t.options)?{header:{title:t.options.title,subtitle:t.options.subtitle},rows:na(t.options.content||[])}:{header:t.menuHeader||{title:t.name},rows:ta(t.options||[],e)}}(e);an(r.header,on(r.rows,n||0),e===Jr?Wr:(i=e,"".concat(Wr,":").concat(i)),t)}function ra(e,t,n){e(),t&&ia(t,!0,n)}function aa(e,t){var n=t||{};switch(e){case"SETTINGS_OPEN":return void ia(n.id,!1);case"SETTINGS_TOGGLE":return void ra(function(){return mr(n.key,"boolValue",!we(n.key))},n.panel,n.index);case"SETTINGS_SET":return void ra(function(){return mr(n.key,n.valName,n.value)},n.panel,n.index);case"SETTINGS_SEGMENT":return void ra(function(){return function(e,t){var n=Ur(e);if(n){var i="off"!==t;!!we(n.key)!==i&&mr(n.key,"boolValue",i),-1!==(we("sponsorBlockManualSkips")||[]).indexOf(e)!=("show"===t)&&mr("sponsorBlockManualSkips","arrayValue",e)}}(n.category,wr[_r(n.category)])},n.panel,n.index);case"SETTINGS_STEP":var i=de.ranges&&de.ranges[n.key],r=(Number(we(n.key))||0)+n.step;return i&&(r=Math.min(i[1],Math.max(i[0],r))),void ra(function(){return mr(n.key,"intValue",r)},n.panel,1);default:return}}function oa(){qr=Gr(),Xr=new Map,Yr(qr,Jr),ia(Jr,!1)}window.isPipPlaying=!1;var sa=null,ua=null,la=0,ca=null,ha=null,da=[],pa={length:0,classes:[]},fa={length:0,classes:[]};function ma(){ua||la>=120||(ua=setTimeout(function(){ua=null,ga()},250))}function ga(){la+=1;try{var e=window._yttv?Object.values(window._yttv).find(function(e){return e&&e.mappings instanceof Map}):null;if(!e)return ma(),!1;var t=e.get("PlayerService"),n=e.get("PlaybackPreviewService");if(!t||!n)return ma(),!1;if(sa=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),ma(),!1}}function va(e,t){var n=setTimeout(function(){var t=da.indexOf(n);-1!==t&&da.splice(t,1),e()},t);return da.push(n),n}function ya(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 ba(){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");ya(t,a,pa),a.style.left="10.25em",a.id="axo-pip-button";var o=document.createElement("ytlr-search-voice-mic-button");ya(t.children[0],o,fa);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?ga():window.addEventListener("load",ga);var xa=null;function Sa(){ca&&(ca.disconnect(),ca=null),null!==xa&&(cancelAnimationFrame(xa),xa=null);var e=document.querySelector("#axo-pip-button");e&&e.parentNode&&e.parentNode.removeChild(e)}function Ea(){!function(){for(;da.length;)clearTimeout(da.pop())}(),ha&&(ha.disconnect(),ha=null),Sa();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 wa(){if(sa||ga())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;Ea();var i=Math.floor(e.currentTime);ha=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(),va(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,!ca&&window.isPipPlaying&&document.body&&((ca=new MutationObserver(function(){null===xa&&(xa=requestAnimationFrame(function(){xa=null,window.isPipPlaying?ba():Sa()}))})).observe(document.body,{childList:!0,subtree:!0}),ba()),t.removeEventListener("play",e))}),ha&&(ha.disconnect(),ha=null),va(function(){try{if(sa&&sa.loadedPlaybackConfig){var e=sa.loadedPlaybackConfig,t=Object.assign({},e);e.watchEndpoint&&(t.watchEndpoint=Object.assign({},e.watchEndpoint,{startTimeSeconds:i})),sa.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()}}),ha.observe(t,{attributes:!0,attributeFilter:["class"]});try{qt({signalAction:{signal:"HISTORY_BACK"}}).dispatched||Ea()}catch(e){throw Ea(),e}}catch(e){console.error("[AxoTube:pictureInPicture] Enable PiP failed:",e)}else{var r=0,a=function(){r+=1,sa||ga()?wa():r<20&&va(a,200)};va(a,200)}}function ka(e){if(we("enableDeArrowPeek")){var t=e&&e.showMenuCommand;if(t&&t.contentId){var n,i=(n=t.contentId,bn.get(n)||null),r=function(e){var t=yn.get(e);return t&&t.data?t.data:null}(t.contentId);if(i&&r){if(t.title){var a=!!we("enableDeArrowTitles")?i.title:xn(r);a&&(t.title={simpleText:a})}if(t.thumbnail){var o=!!we("enableDeArrowThumbnails")?i.thumbnails:Sn(t.contentId,r);o&&(t.thumbnail={thumbnails:o})}}}}}function Da(e,t){gn("".concat("http://127.0.0.1:8085","/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||Da("focus")});var Ca=null,Aa=!1;function Ta(e){if(e)try{e.playbackRate=we("videoSpeed")}catch(e){console.warn("[AxoTube:speedUI] Speed apply failed:",e)}}function Fa(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:ui();if(e&&e!==Ca){if(Ca)try{Ca.removeEventListener("canplay",Pa)}catch(e){}Ca=e;try{Ca.addEventListener("canplay",Pa)}catch(e){console.warn("[AxoTube:speedUI] Speed initialization failed:",e)}Ta(Ca)}}function Pa(){ui()!==Ca&&Fa(),Ta(Ca)}function Ba(){!function(){if(!Aa){Aa=!0;var e=function(e){if(406==e.keyCode||191==e.keyCode)return e.preventDefault(),e.stopPropagation(),"keydown"!==e.type||(Ia(),!1)};document.addEventListener("keydown",e,!0),document.addEventListener("keypress",e,!0),document.addEventListener("keyup",e,!0)}}(),fi(Fa)}function Ia(){for(var e=we("videoSpeed"),t=0,n=Number(we("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(sn({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(sn({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{an("Playback Speed",on(a,t),"axo-speed")}catch(e){console.error("[AxoTube:speedUI] Speed settings modal failed:",e)}}"loading"===document.readyState?document.addEventListener("DOMContentLoaded",Ba):Ba(),Ce.addEventListener("configChange",function(e){var t;"videoSpeed"===(null===(t=e.detail)||void 0===t?void 0:t.key)&&(Fa(),Ta(Ca))});function Ra(e){return(window.location&&window.location.origin?window.location.origin:"http://localhost:8099")+e}function La(e){fetch(Ra("/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);an({title:Lt("updater.modalTitle"),subtitle:Lt("updater.modalBodyNew",{latest:e.latest,current:e.current})},on([sn({title:Lt("updater.updateNow"),subtitle:Lt("updater.updateNowSubtitle")},{icon:"DOWN_ARROW"},[{customAction:{action:"AXO_UPDATE_APPLY",parameters:e.latest}},{signalAction:{signal:"POPUP_BACK"}}]),sn({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&&rn(Lt("app.name"),Lt("toasts.upToDate",{version:t.current}),null)}).catch(function(t){console.info("[AxoTube:updater] update check skipped:",t&&t.message),e&&rn(Lt("app.name"),Lt("toasts.updateCheckFailed"),null)})}try{we("enableUpdater")&&we("dontCheckUpdateUntil")<=Math.floor(Date.now()/1e3)&&setTimeout(function(){return La(!1)},3e3)}catch(e){console.error("[AxoTube:updater] init failed, continuing without it",e)}function Oa(e,t){return Yt(e,t)}function Na(){return zt=Ma,Zt()}function Ma(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(ka(e),function(e){we("enablePauseOnBlur")&&Ui(e)&&ji()}(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(),";"),Oa({signalAction:{signal:"RELOAD_PAGE"}}),!0}}else{var v=Object.keys(d).find(function(e){return e.includes("Value")});if(!v)continue;mr(p,v,"intValue"===v?Number(d[v]):d[v])}}}catch(e){c.e(e)}finally{c.f()}}else{if(e.customAction)return _a(e.customAction.action,e.customAction.parameters),!0;if(null!=e&&null!==(i=e.signalAction)&&void 0!==i&&i.customAction)return _a(e.signalAction.customAction.action,e.signalAction.customAction.parameters),!0;if(null!=e&&null!==(r=e.showEngagementPanelEndpoint)&&void 0!==r&&r.customAction)return _a(e.showEngagementPanelEndpoint.customAction.action,e.showEngagementPanelEndpoint.customAction.parameters),!0;if(null!=e&&null!==(a=e.playlistEditEndpoint)&&void 0!==a&&a.customAction)return _a(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,sn({title:Lt("player.miniPlayer")},{icon:"CLEAR_COOKIES"},[{customAction:{action:"ENTER_MP"}}])),le()&&null!==(y=le())&&void 0!==y&&y.HasSystemFeature("android.software.picture_in_picture")&&b.splice(3,0,sn({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,Ea())}if(e.commandExecutorCommand&&Array.isArray(e.commandExecutorCommand.commands)){var k,D=f(e.commandExecutorCommand.commands);try{for(D.s();!(k=D.n()).done;){var C,A,F,P=k.value;P&&"object"===T(P)&&(P.customAction?_a(P.customAction.action,P.customAction.parameters):null!==(C=P.signalAction)&&void 0!==C&&C.customAction?_a(P.signalAction.customAction.action,P.signalAction.customAction.parameters):null!==(A=P.showEngagementPanelEndpoint)&&void 0!==A&&A.customAction?_a(P.showEngagementPanelEndpoint.customAction.action,P.showEngagementPanelEndpoint.customAction.parameters):null!==(F=P.playlistEditEndpoint)&&void 0!==F&&F.customAction?_a(P.playlistEditEndpoint.customAction.action,P.playlistEditEndpoint.customAction.parameters):t.call(this,P,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)&&!we("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 _a(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":oa();break;case"SETTINGS_OPEN":case"SETTINGS_SET":case"SETTINGS_TOGGLE":case"SETTINGS_STEP":case"SETTINGS_SEGMENT":aa(e,t);break;case"AXO_SPEED_SETTINGS_SHOW":Ia();break;case"UPDATE_REMIND_LATER":ke("dontCheckUpdateUntil",t);break;case"AXO_UPDATE_APPLY":rn(Lt("app.name"),Lt("updater.applying"),null),fetch(Ra("/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);window.location.reload()}).catch(function(e){console.error("[AxoTube:updater] apply failed:",e&&e.message),rn(Lt("app.name"),Lt("toasts.updateApplyFailed"),null)});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":wa();break;case"ENTER_PIP":le()&&le().EnterPIP&&le().EnterPIP();break;case"SHOW_TOAST":rn(Lt("app.name"),t);break;case"ADD_TO_QUEUE":t?(window.queuedVideos.videos.push(t),rn(Lt("app.name"),Lt("toasts.queueAdded"))):rn(Lt("app.name"),Lt("toasts.queueAddFailed"));break;case"CLEAR_QUEUE":window.queuedVideos.videos=[],window.queuedVideos.currentIndex=-1,window.queuedVideos.lastVideoId=null,rn(Lt("app.name"),Lt("toasts.queueCleared"));break;case"CHECK_FOR_UPDATES":La(!0);break;case"AXO_CAST_RESTART":Da("manual",function(e,t){!e&&t&&t.ok?t.restarted?rn(Lt("app.name"),Lt("toasts.castRestarted")):"too-soon"===t.reason?rn(Lt("app.name"),Lt("toasts.castRestartWait")):"discovery-not-running"===t.reason?rn(Lt("app.name"),Lt("toasts.castRestartNotRunning")):"in-progress"===t.reason?rn(Lt("app.name"),Lt("toasts.castRestarting")):rn(Lt("app.name"),Lt("toasts.castRestartFailed")):rn(Lt("app.name"),Lt("toasts.castRestartFailed"))});break;case"AXO_RELOAD_PAGE":window.location.reload()}}var Ua=!1,ja=null,za=!1;function Ha(){try{var e;if(null===(e=window.tectonicConfig)||void 0===e||!e.featureSwitches)return;var t=window.tectonicConfig.featureSwitches,n=Fe();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 Ka(){try{if(!document.body)return;document.body.classList.toggle("axotube-reduced-motion",Fe())}catch(e){console.warn("[AxoTube:ui] Reduced motion apply failed:",e)}}function Va(){if(za){var e=document.getElementById("container");e&&e.style.setProperty("opacity","1","important"),za=!1}}function Ga(){ja&&(clearTimeout(ja),ja=null),Va()}function Ja(){Ga(),we("enableScreenDimming")&&(ja=setTimeout(function(){var e;if(ja=null,we("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-we("dimmingOpacity")).toString(),"important"),za=!0)}}}else Va()},1e3*we("dimmingTimeout")))}function Wa(){if(!Ua&&document.body&&window._yttv){Ua=!0,Ka();var e=document.querySelector("style[nonce]");if(e)e.textContent+=rr;else if(document.head){var t=document.createElement("style");t.textContent=rr,document.head.appendChild(t)}if("function"==typeof window.__releaseBootLoader&&window.__releaseBootLoader(),we("enableFixedUI")&&!Pe()&&!Fe())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)}Ha();var n=function(e){if(we("enableScreenDimming")&&Ja(),404==e.keyCode&&"keydown"===e.type){try{Na()}catch(e){console.warn("[AxoTube:ui] Settings command patch refresh failed:",e)}try{oa()}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(!sa||!sa.loadedPlaybackConfig)return;var e=document.querySelector("video"),t=sa.loadedPlaybackConfig,n=t.clickTrackingParams,i=t.commandMetadata,r=t.watchEndpoint;if(!qt({clickTrackingParams:n,commandMetadata:i,watchEndpoint:e&&r?Object.assign({},r,{startTimeSeconds:Math.floor(e.currentTime)}):r}).dispatched)return;window.isPipPlaying=!1,Ea()}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(){we("showWelcomeToast")&&rn(Lt("welcomeMsg.title"),"".concat(Lt("welcomeMsg.subtitle")," · v").concat(fr))},1e3);var i=we("launchToOnStartup");if(i)try{Oa(JSON.parse(i))}catch(e){console.warn("[AxoTube:ui] Launch command failed:",e)}else if(we("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=zn();r&&r.executeFunction(new r.commandFunction("reloadGuideAction"))}catch(e){console.warn("[AxoTube:ui] Guide reload failed:",e)}if(we("enableFixedUI")&&!Pe()&&!Fe())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{Na(),Ht||(Ht=!0,window.addEventListener("hashchange",en,!1))}catch(e){console.warn("[AxoTube:ui] unable to install native command patch:",e)}}()}}function Xa(){Ua||"complete"!==document.readyState&&"interactive"!==document.readyState||window._yttv&&Wa()}"loading"===document.readyState&&document.addEventListener("DOMContentLoaded",Xa);var qa=0,Ya=setInterval(function(){qa+=1,Xa(),(Ua||qa>=100)&&clearInterval(Ya)},100),Qa={routeColor:!0,routeBackgroundUrl:!0,themePreset:!0,textTheme:!0};Ce.addEventListener("configChange",function(e){var t,n=null===(t=e.detail)||void 0===t?void 0:t.key;Qa[n]&&dr(),"enableReducedMotion"!==n&&"enablePerformanceMode"!==n&&"enableLowMemoryMode"!==n||(Ka(),Ha()),"enableScreenDimming"===n&&(we("enableScreenDimming")?Ja():Ga())});var Za=null;function $a(){Za&&(clearInterval(Za),Za=null)}function eo(e){e||$a();var t=localStorage["yt.leanback.default::recurring_actions"];if(t){var n;try{n=JSON.parse(t)}catch(e){return}var i=we("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){$a();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($a(),i){var h=function(){var e=new Date;e.setDate(e.getDate()-7),d(e.getTime())};h(),Za=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)}}Ce.addEventListener("configChange",function(e){var t=e.detail,n=t.key,i=t.value;"enableWhoIsWatchingMenu"===n?eo(i):"permanentlyEnableWhoIsWatchingMenu"===n&&eo(we("enableWhoIsWatchingMenu"))}),eo(we("enableWhoIsWatchingMenu"));var to={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")}},no=["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 io=!1;function ro(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 ao(){if(io)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 io=!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=we("enableShowUserLanguage"),o=we("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:to.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:to.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=ro(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 no.forEach(function(t){if(t.includes("-")){var n=D(t.split("-"),2),i=n[0],r=n[1],a=to.language.standard.long[i]||t,o=to.region.long[r]||r;e[t]="".concat(a," (").concat(o,")")}else e[t]=to.language.standard.long[t]||t}),e}catch(e){var t={};return no.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(ro(n,i))}))}}return t.apply(this,arguments)},e.instance.resolveCommand.isPatchedBySubtitleLocalization=!0,io=!0,!0}var oo=0;function so(){io||(oo+=1,ao()||(oo>=30?console.warn("[AxoTube:moreSubtitles] resolveCommand did not become ready in time."):setTimeout(so,500)))}"loading"===document.readyState?document.addEventListener("DOMContentLoaded",so):so();var uo="onStateChange",lo="configChange",co="preferredVideoQuality",ho=new WeakMap,po=new WeakMap,fo=new WeakMap,mo=new WeakMap,go=new WeakMap,vo=new WeakSet,yo=new WeakMap,bo=p(function e(){var t,n,i=this;u(this,e),s(t=this,n=vo),n.add(t),c(this,ho,null),c(this,po,null),c(this,fo,0),c(this,mo,null),c(this,go,!1),c(this,yo,function(){try{var e,t,n,r,o,s,u=null===(e=l(ho,i))||void 0===e||null===(t=e.getPlayerStateObject)||void 0===t?void 0:t.call(e),c=null===(n=l(ho,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(mo,i)&&(h(mo,i,d),a(vo,i,So).call(i));var p=Object.values((null===(o=l(ho,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(go,i)||p||(h(go,i,a(vo,i,Do).call(i)),l(go,i)||a(vo,i,ko).call(i))}catch(e){console.warn("[AxoTube:preferredVideoQuality] State change handler failed:",e)}}),a(vo,this,wo).call(this),pi(function(e){return a(vo,i,Eo).call(i,e)}),mi(function(e){e!==l(mo,i)&&(h(mo,i,e),a(vo,i,So).call(i),l(yo,i).call(i))})});function xo(){l(po,this)&&(clearTimeout(l(po,this)),h(po,this,null))}function So(){a(vo,this,xo).call(this),h(fo,this,0),h(go,this,!1)}function Eo(e){if(!e){if(l(ho,this))try{l(ho,this).removeEventListener(uo,l(yo,this))}catch(e){}return h(ho,this,null),h(mo,this,null),void a(vo,this,So).call(this)}if(e!==l(ho,this)){if(l(ho,this))try{l(ho,this).removeEventListener(uo,l(yo,this))}catch(e){}h(ho,this,e),h(mo,this,null),a(vo,this,So).call(this);try{l(ho,this).addEventListener(uo,l(yo,this))}catch(e){console.warn("[AxoTube:preferredVideoQuality] Could not attach state change listener:",e)}l(yo,this).call(this)}}function wo(){var e=this;Ce.addEventListener(lo,function(t){var n;(null===(n=t.detail)||void 0===n?void 0:n.key)===co&&(a(vo,e,So).call(e),h(go,e,a(vo,e,Do).call(e)),l(go,e)||a(vo,e,ko).call(e))})}function ko(){var e=this;l(po,this)||l(go,this)||l(fo,this)>=10||(h(fo,this,l(fo,this)+1),h(po,this,setTimeout(function(){h(po,e,null);try{var t,n,i=null===(t=l(ho,e))||void 0===t||null===(n=t.getPlayerStateObject)||void 0===n?void 0:n.call(t);if(null==i||!i.isPlaying||l(ho,e)!==si())return;h(go,e,a(vo,e,Do).call(e)),l(go,e)||a(vo,e,ko).call(e)}catch(e){console.warn("[AxoTube:preferredVideoQuality] Retry failed:",e)}},500)))}function Do(){if(!l(ho,this)||"function"!=typeof l(ho,this).setPlaybackQualityRange)return!1;var e=we(co);try{if(!e||"auto"===e)return l(ho,this).setPlaybackQualityRange("auto","auto"),!0;var t=a(vo,this,Co).call(this,e);return!!t&&(l(ho,this).setPlaybackQualityRange(t,t),!0)}catch(e){return console.warn("[AxoTube:preferredVideoQuality] Failed to apply quality:",e),!1}}function Co(e){try{var t,n,i,r=null===(t=(n=l(ho,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 bo}catch(e){console.error("[AxoTube:preferredVideoQuality] PreferredQualityHandler initialization failed:",e)}function Ao(e){return e&&e.tileRenderer&&e.tileRenderer.contentId}function To(e){var t=window.queuedVideos.videos[e],n=t&&t.tileRenderer&&t.tileRenderer.onSelectCommand;return!!n&&(window.queuedVideos.currentIndex=e,window.queuedVideos.lastVideoId=Ao(t)||null,setTimeout(function(){return Oa(n)},500),!0)}function Fo(){window.queuedVideos.currentIndex=-1,window.queuedVideos.lastVideoId=null,Oa({customAction:{action:"CLEAR_QUEUE"}})}window.queuedVideos={videos:[],lastVideoId:null,currentIndex:-1};var Po=null;pi(function(e){if(Po&&(Po.player.removeEventListener("onStateChange",Po.listener),Po=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 Ao(e)===n.video_id})),-1!==r){var a=r+1;if(a<i.videos.length&&To(a))return;return void Fo()}if(i.currentIndex+1<i.videos.length&&To(i.currentIndex+1))return;if(To(0))return;Fo()}else if(t.isPlaying){var o=document.getElementById("container");if(o&&o.style.setProperty("opacity","1","important"),Ao(i.videos[i.currentIndex])===n.video_id)return void(i.lastVideoId=n.video_id);var s=i.videos.findIndex(function(e){return Ao(e)===n.video_id});-1!==s&&(i.currentIndex=s,i.lastVideoId=n.video_id)}}(e)};e.addEventListener("onStateChange",t),Po={player:e,listener:t}}});var Bo=null,Io=0;function Ro(){Io>=20||(Io+=1,Bo=setTimeout(function(){return Lo(!1)},500))}function Lo(){if(arguments.length>0&&void 0!==arguments[0]&&arguments[0]&&(Io=0),Bo&&(clearTimeout(Bo),Bo=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?(Io=0,e.set("ENABLE_PREVIEWS_WITH_SOUND",Be())):Ro()}else Ro()}Ce.addEventListener("configChange",function(){Lo(!0)}),"complete"===document.readyState?Lo(!0):window.addEventListener("load",function(){return Lo(!0)});var Oo="http://127.0.0.1:8085",No=-1,Mo=!1,_o=!1,Uo=!1,jo=null,zo=new Set,Ho=!1,Ko="",Vo=null,Go=!1,Jo=!1,Wo=null,Xo=!1;function qo(){return"undefined"!=typeof window&&(!!le()||void 0!==window.tizen)}var Yo=Xt,Qo=Qt;function Zo(){!Jo&&Yo()&&gn("".concat(Oo,"/api/pairing-code")).then(function(e){if(!e.ok)throw new Error("pairing code HTTP ".concat(e.status));return e.json()}).then(function(e){if(e&&e.code&&!Jo){Jo=!0;try{var t=Array.isArray(e.urls)&&e.urls.length?e.urls[0]:null;rn(Lt("app.name"),t?Lt("toasts.pairingWithUrl",{url:t,code:e.code}):Lt("toasts.pairingCodeOnly",{code:e.code}))}catch(e){}}}).catch(function(){})}function $o(e,t){if(e===t)return!0;try{return ve(e)===ve(t)}catch(e){return!1}}function es(e){if(!jo)return!1;var t=Object.keys(e),n=Object.keys(jo);return t.length!==n.length||t.some(function(t){return!Object.prototype.hasOwnProperty.call(jo,t)||!$o(e[t],jo[t])})}function ts(){if(!(!qo()||Mo||No<0)&&jo){var e=Ae();es(e)?(Mo=!0,gn("".concat(Oo,"/api/config/push"),{method:"POST",headers:{"Content-Type":"application/json"},body:ve({revision:No,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");No=t.revision,jo=e;var n,i=Ae(),r=f(zo);try{for(r.s();!(n=r.n()).done;){var a=n.value;$o(i[a],e[a])&&zo.delete(a)}}catch(e){r.e(e)}finally{r.f()}return"accepted"}).catch(function(){return"failed"}).then(function(e){Mo=!1,"conflict"===e?is():"accepted"===e&&es(Ae())&&ns()})):zo.clear()}}function ns(){qo()&&(clearTimeout(Vo),Vo=setTimeout(ts,250))}function is(){qo()&&!Mo&&(Mo=!0,gn("".concat(Oo,"/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(!Go&&qo()&&Yo())try{rn(Lt("app.name"),Lt("toasts.serviceConnected")),Go=!0,setTimeout(Zo,1200)}catch(e){}}(),os=0;var t=e.config;Ho=!0;var n=!0;try{Object.keys(t).forEach(function(e){if(!zo.has(e)&&void 0!==t[e])try{$o(we(e),t[e])||ke(e,t[e])||(n=!1)}catch(e){n=!1}})}finally{Ho=!1}var i=Ae();Object.keys(i).forEach(function(e){Object.prototype.hasOwnProperty.call(t,e)?$o(i[e],t[e])&&zo.delete(e):zo.add(e)}),jo=t,n&&(No=e.revision)}}).catch(function(){os+=1}).then(function(){Mo=!1,ts()}))}function rs(e){return function(e){return e?gn("".concat(Oo,"/api/command/ack"),{method:"POST",headers:{"Content-Type":"application/json"},body:ve({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||Wo!==e)return t;var n=Xo;if(Wo=null,Xo=!1,n)try{window.location.reload()}catch(e){}return!0})}function as(){qo()&&!_o&&(_o=!0,gn("".concat(Oo,"/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===Wo)return rs(t);if("toast"===e.command.action){Wo=t,Xo=!1;try{rn(Lt("app.name"),String(e.command.text||"").slice(0,200))}catch(e){}return rs(t)}if("reload"===e.command.action)return Wo=t,Xo=!0,rs(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 Qo(n).then(function(e){if(e){Wo=t,Xo=!1;try{rn(Lt("app.name"),Lt("toasts.commandReceived"))}catch(e){}return rs(t)}})}}).catch(function(){}).then(function(){_o=!1}))}Ce.addEventListener("configChange",function(e){var t;Ho||("string"==typeof(null==e||null===(t=e.detail)||void 0===t?void 0:t.key)&&zo.add(e.detail.key),ns())});var os=0;setTimeout(function e(){is(),as(),function(){if(qo()&&!Uo){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?ve(e):"none";r!==Ko&&(Ko=r,Uo=!0,gn("".concat(Oo,"/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(){Ko=""}).then(function(){Uo=!1}))}}(),setTimeout(e,function(){if(0===os)return 5e3;var e=5e3*Math.pow(2,Math.min(os,3));return Math.min(e,3e4)}())},3e3);try{Qt(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 ss(e){return e<10?"0"+e:String(e)}var us="axo-clock",ls="axo-clock-style",cs={topLeft:"axo-clock-top-left",topRight:"axo-clock-top-right",bottomLeft:"axo-clock-bottom-left",bottomRight:"axo-clock-bottom-right"},hs="\n#".concat(us,' {\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(us,".axo-clock-top-left { top: 0; left: 0; }\n#").concat(us,".axo-clock-top-right { top: 0; right: 0; }\n#").concat(us,".axo-clock-bottom-left { bottom: 0; left: 0; }\n#").concat(us,".axo-clock-bottom-right { bottom: 0; right: 0; }\n"),ds=null,ps=null;function fs(){var e=we("clockMode");return"always"===e||"notPlaying"===e&&!function(){var e=ui();return!(!e||e.paused||e.ended)}()}function ms(){null!==ps&&clearInterval(ps),ps=null,ds&&ds.parentNode&&ds.parentNode.removeChild(ds),ds=null}function gs(){ds||((ds=document.createElement("div")).id=us,document.body.appendChild(ds));var e=cs[we("clockPosition")]||cs.topRight;ds.className!==e&&(ds.className=e);var t=function(e,t,n){var i=ss(e.getMinutes()),r=n?":"+ss(e.getSeconds()):"",a=e.getHours();if("24h"===t)return ss(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,we("clockFormat"),!!we("clockShowSeconds"));ds.textContent!==t&&(ds.textContent=t)}function vs(){document.body&&(fs()?(!function(){if(!document.getElementById(ls)){var e=document.createElement("style");e.id=ls,e.textContent=hs,(document.head||document.documentElement).appendChild(e)}}(),gs(),null===ps&&(ps=setInterval(gs,1e3))):ms())}["play","playing","pause","ended","emptied"].forEach(function(e){document.addEventListener(e,vs,!0)}),Ce.addEventListener("configChange",function(e){var t=e.detail&&e.detail.key;"clockMode"!==t&&"clockFormat"!==t&&"clockPosition"!==t&&"clockShowSeconds"!==t||vs()}),function e(){document.body?vs():setTimeout(e,250)}();var ys="axo-panel-shrink",bs="axo-panel-shrink-style",xs="\nbody.".concat(ys," 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 Ss=null,Es=null,ws=null,ks=null;function Ds(){if(ks=null,document.body){var e=document.querySelector("ytlr-engagement-panel-section-list-renderer");!function(e){if(e===ws)return;Es&&Es.disconnect();if(Es=null,ws=e,!e||"undefined"==typeof MutationObserver)return;(Es=new MutationObserver(Cs)).observe(e,{subtree:!0,attributes:!0,attributeFilter:["class"]})}(e),function(){if(!document.getElementById(bs)){var e=document.createElement("style");e.id=bs,e.textContent=xs,(document.head||document.documentElement).appendChild(e)}}();var t=!!we("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(ys)!==t&&document.body.classList.toggle(ys,t);var n=String(Number(we("panelShrinkPercent"))/100);n!==Ss&&(Ss=n,document.documentElement.style.setProperty("--axo-panel-scale",n))}}function Cs(){null===ks&&(ks=requestAnimationFrame(Ds))}!function e(){if(document.body){var t=document.getElementById("container")||document.body;"undefined"!=typeof MutationObserver&&new MutationObserver(Cs).observe(t,{childList:!0,subtree:!0}),window.addEventListener("hashchange",Cs),Ce.addEventListener("configChange",function(e){var t=e.detail&&e.detail.key;"enablePanelShrink"!==t&&"panelShrinkPercent"!==t||Cs()}),Ds()}else setTimeout(e,250)}();var As,Ts={exports:{}};var Fs,Ps,Bs=(As||(As=1,Fs=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 C=function(e,t){this.type=i.Syntax.DoWhileStatement,this.body=e,this.test=t};t.DoWhileStatement=C;var A=function(){this.type=i.Syntax.EmptyStatement};t.EmptyStatement=A;var T=function(e){this.type=i.Syntax.ExportAllDeclaration,this.source=e};t.ExportAllDeclaration=T;var F=function(e){this.type=i.Syntax.ExportDefaultDeclaration,this.declaration=e};t.ExportDefaultDeclaration=F;var P=function(e,t,n){this.type=i.Syntax.ExportNamedDeclaration,this.declaration=e,this.specifiers=t,this.source=n};t.ExportNamedDeclaration=P;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 R=function(e,t,n){this.type=i.Syntax.ForInStatement,this.left=e,this.right=t,this.body=n,this.each=!1};t.ForInStatement=R;var L=function(e,t,n){this.type=i.Syntax.ForOfStatement,this.left=e,this.right=t,this.body=n};t.ForOfStatement=L;var O=function(e,t,n,r){this.type=i.Syntax.ForStatement,this.init=e,this.test=t,this.update=n,this.body=r};t.ForStatement=O;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 z=function(e){this.type=i.Syntax.ImportDefaultSpecifier,this.local=e};t.ImportDefaultSpecifier=z;var H=function(e){this.type=i.Syntax.ImportNamespaceSpecifier,this.local=e};t.ImportNamespaceSpecifier=H;var K=function(e,t){this.type=i.Syntax.ImportSpecifier,this.local=e,this.imported=t};t.ImportSpecifier=K;var V=function(e,t){this.type=i.Syntax.LabeledStatement,this.label=e,this.body=t};t.LabeledStatement=V;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 W=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=W;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}])},Ts.exports=Fs()),Ts.exports),Is=e(Bs),Rs={};var Ls=(Ps||(Ps=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}(Rs)),Rs),Os=e(Ls);var Ns=new WeakMap,Ms=!1,_s=null,Us=null,js=0;function zs(e,t){try{return{ok:!0,value:e[t]}}catch(e){return{ok:!1,value:void 0}}}function Hs(e,t){try{return e[t]()}catch(e){return null}}function Ks(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=Ns.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){}Ns.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=Hs(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 C=Hs(o,"values");if(C){var A,F=f(C);try{for(F.s();!(A=F.n()).done;){var P=A.value;if(i>e)return null;var B=a(P,s+1,null,void 0,!1);if(B)return B}}catch(e){F.e(e)}finally{F.f()}}return null}var I=zs(o,n);if(I.ok&&void 0!==I.value){var R=a(I.value,s+1,o,n,!1);if(R)return R}for(var L=0,O=Object.keys(o);L<O.length;L++){var N=O[L];if(i>e)return null;if(N!==n){var M=zs(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 Vs(){if(Ms||!we("enablePatchingVideoPlayer"))return!1;if(!window._yttv||!document.querySelector(".html5-video-player")&&!document.querySelector("ytlr-player"))return!1;var e=_s&&"function"==typeof _s.fn?_s:_s=Ks(2e4,!0)||Ks(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,C(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=Is.parse(e,{range:!0,tolerant:!0,sourceType:"script"})}catch(n){try{var r="("+e+")";t=Is.parse(r,{range:!0,tolerant:!0,sourceType:"script"}),i=1}catch(r){try{t=Is.parse(e,{range:!0,tolerant:!0,sourceType:"module"})}catch(r){try{var a="("+e+")";t=Is.parse(a,{range:!0,tolerant:!0,sourceType:"module"}),i=1}catch(e){throw n}}}}var o=[];return Os.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:fn(!1,we("enableSwapMPWithPIP")?Lt("player.pictureInPicture"):Lt("player.miniPlayer"),"CLEAR_COOKIES",{customAction:{action:we("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&&we("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&&we("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:fn(!1,Lt("player.speedControls"),"SLOW_MOTION_VIDEO",{customAction:{action:"AXO_SPEED_SETTINGS_SHOW"}})}}),e})}if(!we("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})}we("enablePreviousNextButtons")&&v&&b&&(o[v]=function(){return fn(!1,Lt("player.previous"),"SKIP_PREVIOUS",{signalAction:{signal:"PLAYER_PLAY_PREVIOUS"}})},o[b]=function(){return fn(!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,Ms=!0,!0):(_s=null,!1)}catch(e){return console.error("[AxoTube:customUI] Custom UI apply failed:",e),_s=null,!1}}function Gs(e){!Ms&&we("enablePatchingVideoPlayer")&&(e&&(js=0),Us||(Us=setTimeout(function(){Us=null,js+=1,Vs()||js<10&&Gs(!1)},500)))}function Js(){Vs()||Gs(!0)}"complete"===document.readyState||"interactive"===document.readyState?Js():window.addEventListener("DOMContentLoaded",Js),Ce.addEventListener("configChange",function(e){var t;"enablePatchingVideoPlayer"===(null===(t=e.detail)||void 0===t?void 0:t.key)&&e.detail.value&&(_s=null,Gs(!0))});var Ws=null,Xs=null,qs=!1,Ys=null,Qs=null;function Zs(){return-1!==window.location.href.indexOf("watch")}function $s(){return le()&&le().SetFrameRate}function eu(){if(qs){var e=$s();if(e)try{e.call(le(),0),qs=!1}catch(e){console.warn("[AxoTube:autoFrameRate] Failed to reset auto frame rate:",e)}}}function tu(){null!==Ys&&clearTimeout(Ys),Ys=null,Qs&&(Qs.video.removeEventListener("play",tu),Qs=null)}function nu(){if(tu(),Xs&&(clearTimeout(Xs),Xs=null),Ws){try{Ws.removeEventListener("onPlaybackStartExternal",iu)}catch(e){}Ws=null}}function iu(){try{if(!Zs()||!Ws||Ws!==si()||!we("autoFrameRate"))return;var e=Ws.getStatsForNerds(),t=e&&e.resolution?e.resolution.match(/(\d+)x(\d+)@([\d.]+)/):null,n=$s();if(!t||!n)return;var i=ui(),r=we("autoFrameRatePauseVideoFor"),a=r>0&&i&&!i.paused&&!Qs;a&&i.pause();try{n.call(le(),parseFloat(t[3])),qs=!0}finally{a&&i.paused&&function(e,t,n){var i=window.location.hash,r=li(t),a=e.currentSrc||e.src;Qs={video:e,player:t,hash:i,videoId:r,source:a},e.addEventListener("play",tu),Ys=setTimeout(function(){var n=Qs,o=n&&n.video===e&&n.player===Ws&&si()===t&&ui()===e&&Zs()&&we("autoFrameRate")&&window.location.hash===i&&li(t)===r&&(e.currentSrc||e.src)===a&&e.paused&&!e.ended&&!e.seeking;if(tu(),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,Ws,r)}}catch(e){console.error("[AxoTube:autoFrameRate] Error in auto frame rate handling:",e)}}function ru(){if(Xs&&(clearTimeout(Xs),Xs=null),!we("autoFrameRate"))return nu(),void eu();var e=si();if(e){if(e!==Ws){if(tu(),Ws)try{Ws.removeEventListener("onPlaybackStartExternal",iu)}catch(e){}(Ws=e).addEventListener("onPlaybackStartExternal",iu)}}else Xs=setTimeout(ru,500)}window.addEventListener("hashchange",function(){tu(),Zs()||eu(),setTimeout(ru,0)}),pi(function(e){e!==Ws&&ru()}),fi(function(e,t){t&&e!==t&&tu()}),mi(function(e,t){t&&e!==t&&tu()}),document.addEventListener("keydown",tu,!0),document.addEventListener("mousedown",tu,!0),document.addEventListener("touchstart",tu,!0),Ce.addEventListener("configChange",function(e){var t,n;"autoFrameRate"===(null===(t=e.detail)||void 0===t?void 0:t.key)?e.detail.value?ru():(nu(),eu()):"autoFrameRatePauseVideoFor"===(null===(n=e.detail)||void 0===n?void 0:n.key)&&tu()}),ru()}();