1(()=>{var e={4098:function(e,t,i){var n="undefined"!=typeof globalThis&&globalThis||"undefined"!=typeof self&&self||void 0!==i.g&&i.g,r=function(){function e(){this.fetch=!1,this.DOMException=n.DOMException}return e.prototype=n,new e}();(function(e){var t=void 0!==r&&r||"undefined"!=typeof self&&self||void 0!==t&&t,i={searchParams:"URLSearchParams"in t,iterable:"Symbol"in t&&"iterator"in Symbol,blob:"FileReader"in t&&"Blob"in t&&function(){try{return new Blob,!0}catch(e){return!1}}(),formData:"FormData"in t,arrayBuffer:"ArrayBuffer"in t};if(i.arrayBuffer)var n=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],o=ArrayBuffer.isView||function(e){return e&&n.indexOf(Object.prototype.toString.call(e))>-1};function s(e){if("string"!=typeof e&&(e=String(e)),/[^a-z0-9\-#$%&'*+.^_`|~!]/i.test(e)||""===e)throw TypeError('Invalid character in header field name: "'+e+'"');return e.toLowerCase()}function a(e){return"string"!=typeof e&&(e=String(e)),e}function l(e){var t={next:function(){var t=e.shift();return{done:void 0===t,value:t}}};return i.iterable&&(t[Symbol.iterator]=function(){return t}),t}function u(e){this.map={},e instanceof u?e.forEach(function(e,t){this.append(t,e)},this):Array.isArray(e)?e.forEach(function(e){this.append(e[0],e[1])},this):e&&Object.getOwnPropertyNames(e).forEach(function(t){this.append(t,e[t])},this)}function c(e){if(e.bodyUsed)return Promise.reject(TypeError("Already read"));e.bodyUsed=!0}function d(e){return new Promise(function(t,i){e.onload=function(){t(e.result)},e.onerror=function(){i(e.error)}})}function h(e){var t=new FileReader,i=d(t);return t.readAsArrayBuffer(e),i}function p(e){if(e.slice)return e.slice(0);var t=new Uint8Array(e.byteLength);return t.set(new Uint8Array(e)),t.buffer}function f(){return this.bodyUsed=!1,this._initBody=function(e){if(this.bodyUsed=this.bodyUsed,this._bodyInit=e,e)if("string"==typeof e)this._bodyText=e;else if(i.blob&&Blob.prototype.isPrototypeOf(e))this._bodyBlob=e;else if(i.formData&&FormData.prototype.isPrototypeOf(e))this._bodyFormData=e;else if(i.searchParams&&URLSearchParams.prototype.isPrototypeOf(e))this._bodyText=e.toString();else{var t;i.arrayBuffer&&i.blob&&(t=e)&&DataView.prototype.isPrototypeOf(t)?(this._bodyArrayBuffer=p(e.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):i.arrayBuffer&&(ArrayBuffer.prototype.isPrototypeOf(e)||o(e))?this._bodyArrayBuffer=p(e):this._bodyText=e=Object.prototype.toString.call(e)}else 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):i.searchParams&&URLSearchParams.prototype.isPrototypeOf(e)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},i.blob&&(this.blob=function(){var e=c(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)return Promise.resolve(new Blob([this._bodyText]));throw Error("could not read FormData body as blob")},this.arrayBuffer=function(){if(!this._bodyArrayBuffer)return this.blob().then(h);var e=c(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))}),this.text=function(){var e,t,i,n=c(this);if(n)return n;if(this._bodyBlob)return e=this._bodyBlob,i=d(t=new FileReader),t.readAsText(e),i;if(this._bodyArrayBuffer)return Promise.resolve(function(e){for(var t=new Uint8Array(e),i=Array(t.length),n=0;n<t.length;n++)i[n]=String.fromCharCode(t[n]);return i.join("")}(this._bodyArrayBuffer));if(!this._bodyFormData)return Promise.resolve(this._bodyText);throw Error("could not read FormData body as text")},i.formData&&(this.formData=function(){return this.text().then(y)}),this.json=function(){return this.text().then(JSON.parse)},this}u.prototype.append=function(e,t){e=s(e),t=a(t);var i=this.map[e];this.map[e]=i?i+", "+t:t},u.prototype.delete=function(e){delete this.map[s(e)]},u.prototype.get=function(e){return e=s(e),this.has(e)?this.map[e]:null},u.prototype.has=function(e){return this.map.hasOwnProperty(s(e))},u.prototype.set=function(e,t){this.map[s(e)]=a(t)},u.prototype.forEach=function(e,t){for(var i in this.map)this.map.hasOwnProperty(i)&&e.call(t,this.map[i],i,this)},u.prototype.keys=function(){var e=[];return this.forEach(function(t,i){e.push(i)}),l(e)},u.prototype.values=function(){var e=[];return this.forEach(function(t){e.push(t)}),l(e)},u.prototype.entries=function(){var e=[];return this.forEach(function(t,i){e.push([i,t])}),l(e)},i.iterable&&(u.prototype[Symbol.iterator]=u.prototype.entries);var g=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];function m(e,t){if(!(this instanceof m))throw TypeError('Please use the "new" operator, this DOM object c
1onstructor cannot be called as a function.');var i,n,r=(t=t||{}).body;if(e instanceof m){if(e.bodyUsed)throw TypeError("Already read");this.url=e.url,this.credentials=e.credentials,t.headers||(this.headers=new u(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 u(t.headers)),this.method=(n=(i=t.method||this.method||"GET").toUpperCase(),g.indexOf(n)>-1?n:i),this.mode=t.mode||this.mode||null,this.signal=t.signal||this.signal,this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&r)throw 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 o=/([?&])_=[^&]*/;o.test(this.url)?this.url=this.url.replace(o,"$1_="+new Date().getTime()):this.url+=(/\?/.test(this.url)?"&":"?")+"_="+new Date().getTime()}}function y(e){var t=new FormData;return e.trim().split("&").forEach(function(e){if(e){var i=e.split("="),n=i.shift().replace(/\+/g," "),r=i.join("=").replace(/\+/g," ");t.append(decodeURIComponent(n),decodeURIComponent(r))}}),t}function b(e,t){if(!(this instanceof b))throw TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');t||(t={}),this.type="default",this.status=void 0===t.status?200:t.status,this.ok=this.status>=200&&this.status<300,this.statusText=void 0===t.statusText?"":""+t.statusText,this.headers=new u(t.headers),this.url=t.url||"",this._initBody(e)}m.prototype.clone=function(){return new m(this,{body:this._bodyInit})},f.call(m.prototype),f.call(b.prototype),b.prototype.clone=function(){return new b(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new u(this.headers),url:this.url})},b.error=function(){var e=new b(null,{status:0,statusText:""});return e.type="error",e};var v=[301,302,303,307,308];b.redirect=function(e,t){if(-1===v.indexOf(t))throw RangeError("Invalid status code");return new b(null,{status:t,headers:{location:e}})},e.DOMException=t.DOMException;try{new e.DOMException}catch(t){e.DOMException=function(e,t){this.message=e,this.name=t;var i=Error(e);this.stack=i.stack},e.DOMException.prototype=Object.create(Error.prototype),e.DOMException.prototype.constructor=e.DOMException}function w(n,r){return new Promise(function(o,s){var l=new m(n,r);if(l.signal&&l.signal.aborted)return s(new e.DOMException("Aborted","AbortError"));var c=new XMLHttpRequest;function d(){c.abort()}c.onload=function(){var e,t,i={status:c.status,statusText:c.statusText,headers:(e=c.getAllResponseHeaders()||"",t=new u,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 i=e.split(":"),n=i.shift().trim();if(n){var r=i.join(":").trim();t.append(n,r)}}),t)};i.url="responseURL"in c?c.responseURL:i.headers.get("X-Request-URL");var n="response"in c?c.response:c.responseText;setTimeout(function(){o(new b(n,i))},0)},c.onerror=function(){setTimeout(function(){s(TypeError("Network request failed"))},0)},c.ontimeout=function(){setTimeout(function(){s(TypeError("Network request failed"))},0)},c.onabort=function(){setTimeout(function(){s(new e.DOMException("Aborted","AbortError"))},0)},c.open(l.method,function(e){try{return""===e&&t.location.href?t.location.href:e}catch(t){return e}}(l.url),!0),"include"===l.credentials?c.withCredentials=!0:"omit"===l.credentials&&(c.withCredentials=!1),"responseType"in c&&(i.blob?c.responseType="blob":i.arrayBuffer&&l.headers.get("Content-Type")&&-1!==l.headers.get("Content-Type").indexOf("application/octet-stream")&&(c.responseType="arraybuffer")),!r||"object"!=typeof r.headers||r.headers instanceof u?l.headers.forEach(function(e,t){c.setRequestHeader(t,e)}):Object.getOwnPropertyNames(r.headers).forEach(function(e){c.setRequestHeader(e,a(r.headers[e]))}),l.signal&&(l.signal.addEventListener("abort",d),c.onreadystatechange=function(){4===c.readyState&&l.signal.removeEventListener("abort",d)}),c.send(void 0===l._bodyInit?null:l._bodyInit)})}w.polyfill=!0,t.fetch||(t.fetch=w,t.Headers=u,t.Request=m,t.Response=b),e.Headers=u,e.Request=m,e.Re
1sponse=b,e.fetch=w})({}),r.fetch.ponyfill=!0,delete r.fetch.polyfill;var o=n.fetch?n:r;(t=o.fetch).default=o.fetch,t.fetch=o.fetch,t.Headers=o.Headers,t.Request=o.Request,t.Response=o.Response,e.exports=t},8686:function(e,t,i){var n,r=1/0,o=/[&<>"'`]/g,s=RegExp(o.source),a="object"==typeof i.g&&i.g&&i.g.Object===Object&&i.g,l="object"==typeof self&&self&&self.Object===Object&&self,u=a||l||Function("return this")(),c=(n={"&":"&","<":"<",">":">",'"':""","'":"'","`":"`"},function(e){return null==n?void 0:n[e]}),d=Object.prototype.toString,h=u.Symbol,p=h?h.prototype:void 0,f=p?p.toString:void 0;e.exports=function(e){var t;return(e=null==(t=e)?"":function(e){if("string"==typeof e)return e;if(function(e){return"symbol"==typeof e||!!e&&"object"==typeof e&&"[object Symbol]"==d.call(e)}(e))return f?f.call(e):"";var t=e+"";return"0"==t&&1/e==-r?"-0":t}(t))&&s.test(e)?e.replace(o,c):e}},307:function(){new class{setup(){window.go_auth=e=>{let t=encodeURIComponent(location.pathname+location.search);return"f"===e?location.href="/facebookauth.php?redir="+t+"&keep=1":"g"===e?location.href="/gglplusauth.php?redir="+t+"&keep=1":"mixi"===e?location.href="/mixiauth.php?redir="+t+"&keep=1":"i"===e?location.href="/authinstagram.php?redir="+t+"&keep=1":"c"===e?location.href="/indexcaslogin.php?redir="+t+"&keep=1":location.href="/?goauth=1&b="+t+"&keep=1",!1}}}().setup()},6283:function(){new function(){window.addEventListener("DOMContentLoaded",function(){document.querySelectorAll(".tw-remove-supporter-button").forEach(function(e){var t=e.dataset.targetUserId,i=e.dataset.attentText,n=e.dataset.csrfToken;e.addEventListener("click",function(){confirm(i)&&function(e,t){let i=new URLSearchParams;i.append("cs_session_id",t),i.append("c","removebacker"),i.append("u",e),fetch("/userajax.php?",{method:"POST",body:i,credentials:"same-origin"}).then(e=>{if(e.ok)return e.json().then(e=>{e&&setTimeout(function(){location.reload()},1e3)})})}(t,n),event.preventDefault()})})})}},9260:function(e,t,i){var n;if("function"==typeof fetch&&(n=void 0!==i.g&&i.g.fetch?i.g.fetch:"undefined"!=typeof window&&window.fetch?window.fetch:fetch),"undefined"==typeof window||void 0===window.document){var r=n||i(4098);r.default&&(r=r.default),t.default=r,e.exports=t.default}}},t={};function i(n){var r=t[n];if(void 0!==r)return r.exports;var o=t[n]={exports:{}};return e[n](o,o.exports,i),o.exports}i.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return i.d(t,{a:t}),t},(()=>{var e,t=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__;i.t=function(n,r){if(1&r&&(n=this(n)),8&r||"object"==typeof n&&n&&(4&r&&n.__esModule||16&r&&"function"==typeof n.then))return n;var o=Object.create(null);i.r(o);var s={};e=e||[null,t({}),t([]),t(t)];for(var a=2&r&&n;"object"==typeof a&&!~e.indexOf(a);a=t(a))Object.getOwnPropertyNames(a).forEach(e=>{s[e]=()=>n[e]});return s.default=()=>n,i.d(o,s),o}})(),i.d=(e,t)=>{for(var n in t)i.o(t,n)&&!i.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},i.g=(()=>{if("object"==typeof globalThis)return globalThis;try{return this||Function("return this")()}catch(e){if("object"==typeof window)return window}})(),i.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),i.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},i.rv=()=>"1.4.9",i.ruid="[email protected]",(()=>{"use strict";let e,t;class n{deleteCookie(e,t,i){let n=new Date;n.setTime(n.getTime()-1),document.cookie=e+"=0;expires="+n.toUTCString()+(null===t?"":";path="+t)+(null===i?"":";domain="+i)}addCookie(e,t,i,n,r=31536e7){let o=new Date;o.setTime(o.getTime()+r),document.cookie=e+"="+t+";expires="+o.toUTCString()+(null===i?"":";path="+i)+(null===n?"":";domain="+n)}static hasCookie(e){return RegExp("(?:^|;\\s*)"+escape(e).replace(/[-.+*]/g,"\\$&")+"\\s*\\=").test(document.cookie)}static getCookie(e){return e&&this.hasCookie(e)?unescape(document.cookie.replace(RegExp("(?:^|.*;\\s*)"+escape(e).replace(/[-.+*]/g,"\\$&")+"\\s*\\=\\s*((?:[^;](?!;))*[^;]?).*"),"$1")):null}}function r(e,t,i,n,r,o,s){try{var a=e[o](s),l=a.value}catch(e){i(e);return}a.done?t(l):Promise.resolve(l).then(n,r)}function o(e){return function(){var t=this,i=arguments;return new Promise(function(n,o){var s=e.apply(t,i);function a(e){r(s,n,o,a,l,"next",e)}function l(e){r(s,n,o,a,l,"throw",e)}a(void 0)})}}function s(e,t,i){return t in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}class a{static calculateDirection(e,t){let i=window.innerWidth,n=window.innerHeight;return[e.left+t.width<i?"right":"left",e.top+t.height<n?"bottom":"top"]}
1static isInSafeArea(e,t,i,n){if(!n||0===n.width&&0===n.height)return this.isInArea([[i.left-3,i.top-3],[i.left-3,i.top+i.height+3],[i.left+i.width+3,i.top+i.height+3],[i.left+i.width+3,i.top-3]],e,t);var r=i.top<n.top?[[i.left-3,i.top-3],[n.left-3,n.top-3],[n.left-3,n.top+n.height+3],[n.left+n.width+3,n.top+n.height+3],[n.left+n.width+3,n.top-3],[i.left+i.width+3,i.top-3]]:[[i.left-3,i.top+i.height+3],[n.left-3,n.top+n.height+3],[n.left-3,n.top-3],[n.left+n.width+3,n.top-3],[n.left+n.width+3,n.top+n.height+3],[i.left+i.width+3,i.top+i.height+3]];return this.isInArea(r,e,t)}static isInArea(e,t,i){for(var n=0,r=0;r<e.length-1;r++){var o,s=e[r],a=e[r+1];s[1]<=i&&a[1]>i?(o=(i-s[1])/(a[1]-s[1]),t<s[0]+o*(a[0]-s[0])&&++n):s[1]>i&&a[1]<=i&&(o=(i-s[1])/(a[1]-s[1]),t<s[0]+o*(a[0]-s[0])&&--n)}return 0!==n}}function l(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{},n=Object.keys(i);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(i).filter(function(e){return Object.getOwnPropertyDescriptor(i,e).enumerable}))),n.forEach(function(t){s(e,t,i[t])})}return e}let u={backdrop:!0,keyboard:!0,restoreFocus:!0};class c{show(e=document.activeElement){this._isShown||(this._isShown=!0,this.lastFocusElement=e,this.setKeyEvent(),this.bindCloseEvent(),this.backdrop||(this.backdrop=this.createBackdrop(this.options.backdropClassName)),document.body.classList.add("modal-open"),document.body.appendChild(this.backdrop),this.element.classList.add("in"),this.element.classList.remove("hide"),this.element.setAttribute("aria-hidden","false"),window.setTimeout(()=>{this.element.focus()},0))}hide(){if(this._isShown){var e,t;this._isShown=!1,this.options.keyboard&&this.setKeyEvent(),document.body.classList.remove("modal-open"),document.body.removeChild(this.backdrop),this.element.classList.remove("in"),this.element.classList.add("hide"),this.element.setAttribute("aria-hidden","true"),this.options.restoreFocus&&(null==(t=this.lastFocusElement)||t.focus()),null==(e=this.onHideCallback)||e.call(this)}}toggle(){this._isShown?this.hide():this.show()}addEventListener(e,t){this.onHideCallback=t}get isShown(){return this._isShown}bindCloseEvent(){document.querySelectorAll('[data-dismiss="modal"]').forEach(e=>{e.addEventListener("click",()=>{this.hide()},{once:!0})})}setKeyEvent(){this.options.keyboard&&(this._isShown?document.addEventListener("keyup",this.onEscKeyUp):document.removeEventListener("keyup",this.onEscKeyUp)),document.addEventListener("keydown",e=>{if("Tab"===e.key){let t=function(e,t){let i=e.querySelectorAll("button:not(:disabled), [href], input:not(:disabled), select:not(:disabled), textarea:not(:disabled), [tabindex]"),n=i[0],r=i[i.length-1]||e;return 0===i.length?e:t&&document.activeElement===n?r:t||document.activeElement!==r?null:n}(this.element,e.shiftKey);t&&(e.preventDefault(),t.focus())}})}createBackdrop(e){let t=document.createElement("div");return t.classList.add("modal-backdrop"),(null==e?void 0:e.trim())&&e.trim().split(/\s+/).forEach(e=>{t.classList.add(e)}),"static"!==this.options.backdrop&&t.addEventListener("click",()=>{this.hide()}),t}constructor(e,t={}){s(this,"element",void 0),s(this,"options",void 0),s(this,"_isShown",void 0),s(this,"backdrop",void 0),s(this,"onHideCallback",void 0),s(this,"lastFocusElement",void 0),s(this,"onEscKeyUp",void 0),this.element=e,this._isShown=!1,this.lastFocusElement=null,this.onEscKeyUp=e=>{let t=!1;"key"in e&&(t="Escape"===e.key||"Esc"===e.key),t&&this.hide()},this.options=l({},u,t),this.element.setAttribute("aria-modal","true")}}var d,h,p,f=i(8686),g=i.n(f);let m=/&/g,y=/</g,b=/>/g,v=/'/g,w=/'/g,S=/"/g,k=/(&)|(<)|(>)|(')|(')|(")/;class x{static b64ToUtf8(e){return decodeURIComponent(window.atob(e).split("").map(e=>"%"+("00"+e.charCodeAt(0).toString(16)).slice(-2)).join(""))}static escapeHtml(e){return g()(e)}static unescapeHtml(e){return k.test(e)?e.replace(m,"&").replace(y,"<").replace(b,">").replace(v,"'").replace(w,"'").replace(S,'"'):e}static padLeft(e,t,i){if(e.toString().length>t)return e;let n="";for(let e=0;e<t-1;e++)n+=i;return(n+e).slice(-t)}}class E{createWrapper(e,t,i="",n="modal"){let r=document.createElement("div"),o=x.escapeHtml(t),s=x.escapeHtml(n||"modal"),a=e?`aria-labelledby="${o}-title" aria-describedby="${o}-body"`:`aria-labelledby="${o}-body"`;return r.innerHTML=`<div id="${o}" data-type="${i}" class="${s} hide" tabindex="-1" role="dialog" data-backdrop="static" aria-modal="true" ${a}><div>`,r.firstElementChild}createTitle(e,t,i=!0){let n=x.escapeHtml(t),r=document.createElement("div");if(r.innerHTML=`<div class="modal-header" ><h4 class="modal-title" id="${n}-title"></h4></div>`,r.querySelector("h4").textContent=null!=e?e:null,i){let e=document.createElement("div");e.innerHTML=`<button type="button" class="close" data-dismiss="modal">\xd7</button>`,r.firstElementChild.appendChild(e.firstElementChild)}return r.firstElementChild}createBody(e,t,i=!1){let n=document.createElement("div");return n.innerHTML=`<div class="modal-body" id="${e}-body"></div>`,i?n.firstElementChild.innerHTML=t:n.firstElementChild.textContent=null!=t?t:null,n.firstElementChild}createDialogFooter(e){let t=document.createElement("div");return t.innerHTML='<div class="modal-footer"></div>',e.map(e=>{t.firstElementChild.appendChild(this.createButton(e.label,e.className?e.className:this.buttonTypeToClassName(e.type),e.onClick))}),t.firstElementChild}createButton(e,t="tw-button-primary",i){let n=document.createElement("div");return n.innerHTML=`<button type="button" class=${t} data-dismiss="modal">${e}</button>`,i&&n.firstChild.addEventListener("click",e=>{i()}),n.firstElementChild}buttonTypeToClassName(e){switch(e){case"primary":default:return"tw-button-primary";case"secondary":return"tw-button-secondary";case"borderless":return"tw-button-borderless";case"danger":return"tw-button-danger"}}}function O(e){switch(e){case"ja":case"en":case"ko":case"zh":return!0;default:return!1}}let L={type:"logger",log(e){this.output("log",e)},warn(e){this.output("warn",e)},error(e){this.output("error",e)},output(e,t){console&&console[e]&&console[e].apply(console,t)}};class C{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.init(e,t)}init(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.prefix=t.prefix||"i18next:",this.logger=e||L,this.options=t,this.debug=t.debug}log(){for(var e=arguments.length,t=Array(e),i=0;i<e;i++)t[i]=arguments[i];return this.forward(t,"log","",!0)}warn(){for(var e=arguments.length,t=Array(e),i=0;i<e;i++)t[i]=arguments[i];return this.forward(t,"warn","",!0)}error(){for(var e=arguments.length,t=Array(e),i=0;i<e;i++)t[i]=arguments[i];return this.forward(t,"error","")}deprecate(){for(var e=arguments.length,t=Array(e),i=0;i<e;i++)t[i]=arguments[i];return this.forward(t,"warn","WARNING DEPRECATED: ",!0)}forward(e,t,i,n){return n&&!this.debug?null:("string"==typeof e[0]&&(e[0]=`${i}${this.prefix} ${e[0]}`),this.logger[t](e))}create(e){return new C(this.logger,{...{prefix:`${this.prefix}:${e}:`},...this.options})}clone(e){return(e=e||this.options).prefix=e.prefix||this.prefix,new C(this.logger,e)}}var T=new C;class P{constructor(){this.observers={}}
1on(e,t){return e.split(" ").forEach(e=>{this.observers[e]||(this.observers[e]=new Map);let i=this.observers[e].get(t)||0;this.observers[e].set(t,i+1)}),this}off(e,t){if(this.observers[e]){if(!t)return void delete this.observers[e];this.observers[e].delete(t)}}emit(e){for(var t=arguments.length,i=Array(t>1?t-1:0),n=1;n<t;n++)i[n-1]=arguments[n];this.observers[e]&&Array.from(this.observers[e].entries()).forEach(e=>{let[t,n]=e;for(let e=0;e<n;e++)t(...i)}),this.observers["*"]&&Array.from(this.observers["*"].entries()).forEach(t=>{let[n,r]=t;for(let t=0;t<r;t++)n.apply(n,[e,...i])})}}function R(){let e,t,i=new Promise((i,n)=>{e=i,t=n});return i.resolve=e,i.reject=t,i}function j(e){return null==e?"":""+e}let A=/###/g;function N(e,t,i){function n(e){return e&&e.indexOf("###")>-1?e.replace(A,"."):e}function r(){return!e||"string"==typeof e}let o="string"!=typeof t?t:t.split("."),s=0;for(;s<o.length-1;){if(r())return{};let t=n(o[s]);!e[t]&&i&&(e[t]=new i),e=Object.prototype.hasOwnProperty.call(e,t)?e[t]:{},++s}return r()?{}:{obj:e,k:n(o[s])}}function I(e,t,i){let{obj:n,k:r}=N(e,t,Object);if(void 0!==n||1===t.length){n[r]=i;return}let o=t[t.length-1],s=t.slice(0,t.length-1),a=N(e,s,Object);for(;void 0===a.obj&&s.length;)o=`${s[s.length-1]}.${o}`,(a=N(e,s=s.slice(0,s.length-1),Object))&&a.obj&&void 0!==a.obj[`${a.k}.${o}`]&&(a.obj=void 0);a.obj[`${a.k}.${o}`]=i}function $(e,t){let{obj:i,k:n}=N(e,t);if(i)return i[n]}function D(e){return e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")}var M={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};function _(e){return"string"==typeof e?e.replace(/[&<>"'\/]/g,e=>M[e]):e}let F=[" ",",","?","!",";"],H=new class{constructor(e){this.capacity=e,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(e){let t=this.regExpMap.get(e);if(void 0!==t)return t;let i=new RegExp(e);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(e,i),this.regExpQueue.push(e),i}}(20);function U(e,t){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:".";if(!e)return;if(e[t])return e[t];let n=t.split(i),r=e;for(let e=0;e<n.length;){let t;if(!r||"object"!=typeof r)return;let o="";for(let s=e;s<n.length;++s)if(s!==e&&(o+=i),o+=n[s],void 0!==(t=r[o])){if(["string","number","boolean"].indexOf(typeof t)>-1&&s<n.length-1)continue;e+=s-e+1;break}r=t}return r}function q(e){return e&&e.indexOf("_")>0?e.replace("_","-"):e}class B extends P{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{ns:["translation"],defaultNS:"translation"};super(),this.data=e||{},this.options=t,void 0===this.options.keySeparator&&(this.options.keySeparator="."),void 0===this.options.ignoreJSONStructure&&(this.options.ignoreJSONStructure=!0)}addNamespaces(e){0>this.options.ns.indexOf(e)&&this.options.ns.push(e)}removeNamespaces(e){let t=this.options.ns.indexOf(e);t>-1&&this.options.ns.splice(t,1)}getResource(e,t,i){let n,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},o=void 0!==r.keySeparator?r.keySeparator:this.options.keySeparator,s=void 0!==r.ignoreJSONStructure?r.ignoreJSONStructure:this.options.ignoreJSONStructure;e.indexOf(".")>-1?n=e.split("."):(n=[e,t],i&&(Array.isArray(i)?n.push(...i):"string"==typeof i&&o?n.push(...i.split(o)):n.push(i)));let a=$(this.data,n);return(!a&&!t&&!i&&e.indexOf(".")>-1&&(e=n[0],t=n[1],i=n.slice(2).join(".")),a||!s||"string"!=typeof i)?a:U(this.data&&this.data[e]&&this.data[e][t],i,o)}addResource(e,t,i,n){let r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{silent:!1},o=void 0!==r.keySeparator?r.keySeparator:this.options.keySeparator,s=[e,t];i&&(s=s.concat(o?i.split(o):i)),e.indexOf(".")>-1&&(s=e.split("."),n=t,t=s[1]),this.addNamespaces(t),I(this.data,s,n),r.silent||this.emit("added",e,t,i,n)}addResources(e,t,i){let n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{silent:!1};for(let n in i)("string"==typeof i[n]||"[object Array]"===Object.prototype.toString.apply(i[n]))&&this.addResource(e,t,n,i[n],{silent:!0});n.silent||this.emit("added",e,t,i)}addResourceBundle(e,t,i,n,r){let o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{silent:!1},s=[e,t];e.indexOf(".")>-1&&(s=e.split("."),n=i,i=t,t=s[1]),this.addNamespaces(t);let a=$(this.data,s)||{};n?function e(t,i,n){for(let r in i)"__proto__"!==r&&"constructor"!==r&&(r in t?"string"==typeof t[r]||t[r]instanceof String||"string"==typeof i[r]||i[r]instanceof String?n&&(t[r]=i[r]):e(t[r],i[r],n):t[r]=i[r]);return t}(a,i,r):a={...a,...i}
1,I(this.data,s,a),o.silent||this.emit("added",e,t,i)}removeResourceBundle(e,t){this.hasResourceBundle(e,t)&&delete this.data[e][t],this.removeNamespaces(t),this.emit("removed",e,t)}hasResourceBundle(e,t){return void 0!==this.getResource(e,t)}getResourceBundle(e,t){return(t||(t=this.options.defaultNS),"v1"===this.options.compatibilityAPI)?{...this.getResource(e,t)}:this.getResource(e,t)}getDataByLanguage(e){return this.data[e]}hasLanguageSomeTranslations(e){let t=this.getDataByLanguage(e);return!!(t&&Object.keys(t)||[]).find(e=>t[e]&&Object.keys(t[e]).length>0)}toJSON(){return this.data}}var V={processors:{},addPostProcessor(e){this.processors[e.name]=e},handle(e,t,i,n,r){return e.forEach(e=>{this.processors[e]&&(t=this.processors[e].process(t,i,n,r))}),t}};let K={};class z extends P{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};super(),function(e,t,i){e.forEach(e=>{t[e]&&(i[e]=t[e])})}(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],e,this),this.options=t,void 0===this.options.keySeparator&&(this.options.keySeparator="."),this.logger=T.create("translator")}changeLanguage(e){e&&(this.language=e)}exists(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{interpolation:{}};if(null==e)return!1;let i=this.resolve(e,t);return i&&void 0!==i.res}extractFromKey(e,t){let i=void 0!==t.nsSeparator?t.nsSeparator:this.options.nsSeparator;void 0===i&&(i=":");let n=void 0!==t.keySeparator?t.keySeparator:this.options.keySeparator,r=t.ns||this.options.defaultNS||[],o=i&&e.indexOf(i)>-1,s=!this.options.userDefinedKeySeparator&&!t.keySeparator&&!this.options.userDefinedNsSeparator&&!t.nsSeparator&&!function(e,t,i){t=t||"",i=i||"";let n=F.filter(e=>0>t.indexOf(e)&&0>i.indexOf(e));if(0===n.length)return!0;let r=H.getRegExp(`(${n.map(e=>"?"===e?"\\?":e).join("|")})`),o=!r.test(e);
1if(!o){let t=e.indexOf(i);t>0&&!r.test(e.substring(0,t))&&(o=!0)}return o}(e,i,n);if(o&&!s){let t=e.match(this.interpolator.nestingRegexp);if(t&&t.length>0)return{key:e,namespaces:r};let o=e.split(i);(i!==n||i===n&&this.options.ns.indexOf(o[0])>-1)&&(r=o.shift()),e=o.join(n)}return"string"==typeof r&&(r=[r]),{key:e,namespaces:r}}translate(e,t,i){if("object"!=typeof t&&this.options.overloadTranslationOptionHandler&&(t=this.options.overloadTranslationOptionHandler(arguments)),"object"==typeof t&&(t={...t}),t||(t={}),null==e)return"";Array.isArray(e)||(e=[String(e)]);let n=void 0!==t.returnDetails?t.returnDetails:this.options.returnDetails,r=void 0!==t.keySeparator?t.keySeparator:this.options.keySeparator,{key:o,namespaces:s}=this.extractFromKey(e[e.length-1],t),a=s[s.length-1],l=t.lng||this.language,u=t.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(l&&"cimode"===l.toLowerCase()){if(u){let e=t.nsSeparator||this.options.nsSeparator;return n?{res:`${a}${e}${o}`,usedKey:o,exactUsedKey:o,usedLng:l,usedNS:a,usedParams:this.getUsedParamsDetails(t)}:`${a}${e}${o}`}return n?{res:o,usedKey:o,exactUsedKey:o,usedLng:l,usedNS:a,usedParams:this.getUsedParamsDetails(t)}:o}let c=this.resolve(e,t),d=c&&c.res,h=c&&c.usedKey||o,p=c&&c.exactUsedKey||o,f=Object.prototype.toString.apply(d),g=void 0!==t.joinArrays?t.joinArrays:this.options.joinArrays,m=!this.i18nFormat||this.i18nFormat.handleAsObject,y="string"!=typeof d&&"boolean"!=typeof d&&"number"!=typeof d;if(m&&d&&y&&0>["[object Number]","[object Function]","[object RegExp]"].indexOf(f)&&("string"!=typeof g||"[object Array]"!==f)){if(!t.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");let e=this.options.returnedObjectHandler?this.options.returnedObjectHandler(h,d,{...t,ns:s}):`key '${o} (${this.language})' returned an object instead of string.`;return n?(c.res=e,c.usedParams=this.getUsedParamsDetails(t),c):e}if(r){let e="[object Array]"===f,i=e?[]:{},n=e?p:h;for(let e in d)if(Object.prototype.hasOwnProperty.call(d,e)){let o=`${n}${r}${e}`;i[e]=this.translate(o,{...t,joinArrays:!1,ns:s}),i[e]===o&&(i[e]=d[e])}d=i}}else if(m&&"string"==typeof g&&"[object Array]"===f)(d=d.join(g))&&(d=this.extendTranslation(d,e,t,i));else{let n=!1,s=!1,u=void 0!==t.count&&"string"!=typeof t.count,h=z.hasDefaultValue(t),p=u?this.pluralResolver.getSuffix(l,t.count,t):"",f=t.ordinal&&u?this.pluralResolver.getSuffix(l,t.count,{ordinal:!1}):"",g=u&&!t.ordinal&&0===t.count&&this.pluralResolver.shouldUseIntlApi(),m=g&&t[`defaultValue${this.options.pluralSeparator}zero`]||t[`defaultValue${p}`]||t[`defaultValue${f}`]||t.defaultValue;!this.isValidLookup(d)&&h&&(n=!0,d=m),this.isValidLookup(d)||(s=!0,d=o);let y=(t.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&s?void 0:d,b=h&&m!==d&&this.options.updateMissing;if(s||n||b){if(this.logger.log(b?"updateKey":"missingKey",l,a,o,b?m:d),r){let e=this.resolve(o,{...t,keySeparator:!1});e&&e.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.")}let e=[],i=this.languageUtils.getFallbackCodes(this.options.fallbackLng,t.lng||this.language);if("fallback"===this.options.saveMissingTo&&i&&i[0])for(let t=0;t<i.length;t++)e.push(i[t]);else"all"===this.options.saveMissingTo?e=this.languageUtils.toResolveHierarchy(t.lng||this.language):e.push(t.lng||this.language);let n=(e,i,n)=>{let r=h&&n!==d?n:y;this.options.missingKeyHandler?this.options.missingKeyHandler(e,a,i,r,b,t):this.backendConnector&&this.backendConnector.saveMissing&&this.backendConnector.saveMissing(e,a,i,r,b,t),this.emit("missingKey",e,a,i,d)};this.options.saveMissing&&(this.options.saveMissingPlurals&&u?e.forEach(e=>{let i=this.pluralResolver.getSuffixes(e,t);g&&t[`defaultValue${this.options.pluralSeparator}zero`]&&0>i.indexOf(`${this.options.pluralSeparator}zero`)&&i.push(`${this.options.pluralSeparator}
1zero`),i.forEach(i=>{n([e],o+i,t[`defaultValue${i}`]||m)})}):n(e,o,m))}d=this.extendTranslation(d,e,t,c,i),s&&d===o&&this.options.appendNamespaceToMissingKey&&(d=`${a}:${o}`),(s||n)&&this.options.parseMissingKeyHandler&&(d="v1"!==this.options.compatibilityAPI?this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${a}:${o}`:o,n?d:void 0):this.options.parseMissingKeyHandler(d))}return n?(c.res=d,c.usedParams=this.getUsedParamsDetails(t),c):d}extendTranslation(e,t,i,n,r){var o=this;if(this.i18nFormat&&this.i18nFormat.parse)e=this.i18nFormat.parse(e,{...this.options.interpolation.defaultVariables,...i},i.lng||this.language||n.usedLng,n.usedNS,n.usedKey,{resolved:n});else if(!i.skipInterpolation){let s;i.interpolation&&this.interpolator.init({...i,...{interpolation:{...this.options.interpolation,...i.interpolation}}});let a="string"==typeof e&&(i&&i.interpolation&&void 0!==i.interpolation.skipOnVariables?i.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);if(a){let t=e.match(this.interpolator.nestingRegexp);s=t&&t.length}let l=i.replace&&"string"!=typeof i.replace?i.replace:i;if(this.options.interpolation.defaultVariables&&(l={...this.options.interpolation.defaultVariables,...l}),e=this.interpolator.interpolate(e,l,i.lng||this.language,i),a){let t=e.match(this.interpolator.nestingRegexp);s<(t&&t.length)&&(i.nest=!1)}!i.lng&&"v1"!==this.options.compatibilityAPI&&n&&n.res&&(i.lng=n.usedLng),!1!==i.nest&&(e=this.interpolator.nest(e,function(){for(var e=arguments.length,n=Array(e),s=0;s<e;s++)n[s]=arguments[s];return r&&r[0]===n[0]&&!i.context?(o.logger.warn(`It seems you are nesting recursively key: ${n[0]} in key: ${t[0]}`),null):o.translate(...n,t)},i)),i.interpolation&&this.interpolator.reset()}let s=i.postProcess||this.options.postProcess,a="string"==typeof s?[s]:s;return null!=e&&a&&a.length&&!1!==i.applyPostProcessor&&(e=V.handle(a,e,t,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...n,usedParams:this.getUsedParamsDetails(i)},...i}:i,this)),e}resolve(e){let t,i,n,r,o,s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return"string"==typeof e&&(e=[e]),e.forEach(e=>{if(this.isValidLookup(t))return;let a=this.extractFromKey(e,s),l=a.key;i=l;let u=a.namespaces;this.options.fallbackNS&&(u=u.concat(this.options.fallbackNS));let c=void 0!==s.count&&"string"!=typeof s.count,d=c&&!s.ordinal&&0===s.count&&this.pluralResolver.shouldUseIntlApi(),h=void 0!==s.context&&("string"==typeof s.context||"number"==typeof s.context)&&""!==s.context,p=s.lngs?s.lngs:this.languageUtils.toResolveHierarchy(s.lng||this.language,s.fallbackLng);u.forEach(e=>{this.isValidLookup(t)||(o=e,!K[`${p[0]}-${e}`]&&this.utils&&this.utils.hasLoadedNamespace&&!this.utils.hasLoadedNamespace(o)&&(K[`${p[0]}-${e}`]=!0,this.logger.warn(`key "${i}" for languages "${p.join(", ")}" won't get resolved as namespace "${o}" 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!!!")),p.forEach(i=>{let o;if(this.isValidLookup(t))return;r=i;let a=[l];if(this.i18nFormat&&this.i18nFormat.addLookupKeys)this.i18nFormat.addLookupKeys(a,l,i,e,s);else{let e;c&&(e=this.pluralResolver.getSuffix(i,s.count,s));let t=`${this.options.pluralSeparator}zero`,n=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(c&&(a.push(l+e),s.ordinal&&0===e.indexOf(n)&&a.push(l+e.replace(n,this.options.pluralSeparator)),d&&a.push(l+t)),h){let i=`${l}${this.options.contextSeparator}
1${s.context}`;a.push(i),c&&(a.push(i+e),s.ordinal&&0===e.indexOf(n)&&a.push(i+e.replace(n,this.options.pluralSeparator)),d&&a.push(i+t))}}for(;o=a.pop();)this.isValidLookup(t)||(n=o,t=this.getResource(i,e,o,s))}))})}),{res:t,usedKey:i,exactUsedKey:n,usedLng:r,usedNS:o}}isValidLookup(e){return void 0!==e&&!(!this.options.returnNull&&null===e)&&!(!this.options.returnEmptyString&&""===e)}getResource(e,t,i){let n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return this.i18nFormat&&this.i18nFormat.getResource?this.i18nFormat.getResource(e,t,i,n):this.resourceStore.getResource(e,t,i,n)}getUsedParamsDetails(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.replace&&"string"!=typeof e.replace,i=t?e.replace:e;if(t&&void 0!==e.count&&(i.count=e.count),this.options.interpolation.defaultVariables&&(i={...this.options.interpolation.defaultVariables,...i}),!t)for(let e of(i={...i},["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"]))delete i[e];return i}static hasDefaultValue(e){let t="defaultValue";for(let i in e)if(Object.prototype.hasOwnProperty.call(e,i)&&t===i.substring(0,t.length)&&void 0!==e[i])return!0;return!1}}function J(e){return e.charAt(0).toUpperCase()+e.slice(1)}class W{constructor(e){this.options=e,this.supportedLngs=this.options.supportedLngs||!1,this.logger=T.create("languageUtils")}getScriptPartFromCode(e){if(!(e=q(e))||0>e.indexOf("-"))return null;let t=e.split("-");return 2===t.length||(t.pop(),"x"===t[t.length-1].toLowerCase())?null:this.formatLanguageCode(t.join("-"))}getLanguagePartFromCode(e){if(!(e=q(e))||0>e.indexOf("-"))return e;let t=e.split("-");return this.formatLanguageCode(t[0])}formatLanguageCode(e){if("string"==typeof e&&e.indexOf("-")>-1){let t=["hans","hant","latn","cyrl","cans","mong","arab"],i=e.split("-");return this.options.lowerCaseLng?i=i.map(e=>e.toLowerCase()):2===i.length?(i[0]=i[0].toLowerCase(),i[1]=i[1].toUpperCase(),t.indexOf(i[1].toLowerCase())>-1&&(i[1]=J(i[1].toLowerCase()))):3===i.length&&(i[0]=i[0].toLowerCase(),2===i[1].length&&(i[1]=i[1].toUpperCase()),"sgn"!==i[0]&&2===i[2].length&&(i[2]=i[2].toUpperCase()),t.indexOf(i[1].toLowerCase())>-1&&(i[1]=J(i[1].toLowerCase())),t.indexOf(i[2].toLowerCase())>-1&&(i[2]=J(i[2].toLowerCase()))),i.join("-")}return this.options.cleanCode||this.options.lowerCaseLng?e.toLowerCase():e}isSupportedCode(e){return("languageOnly"===this.options.load||this.options.nonExplicitSupportedLngs)&&(e=this.getLanguagePartFromCode(e)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(e)>-1}getBestMatchFromCodes(e){let t;return e?(e.forEach(e=>{if(t)return;let i=this.formatLanguageCode(e);(!this.options.supportedLngs||this.isSupportedCode(i))&&(t=i)}),!t&&this.options.supportedLngs&&e.forEach(e=>{if(t)return;let i=this.getLanguagePartFromCode(e);if(this.isSupportedCode(i))return t=i;t=this.options.supportedLngs.find(e=>{if(e===i||!(0>e.indexOf("-")&&0>i.indexOf("-"))&&0===e.indexOf(i))return e})}),t||(t=this.getFallbackCodes(this.options.fallbackLng)[0]),t):null}getFallbackCodes(e,t){if(!e)return[];if("function"==typeof e&&(e=e(t)),"string"==typeof e&&(e=[e]),"[object Array]"===Object.prototype.toString.apply(e))return e;if(!t)return e.default||[];let i=e[t];return i||(i=e[this.getScriptPartFromCode(t)]),i||(i=e[this.formatLanguageCode(t)]),i||(i=e[this.getLanguagePartFromCode(t)]),i||(i=e.default),i||[]}toResolveHierarchy(e,t){let i=this.getFallbackCodes(t||this.options.fallbackLng||[],e),n=[],r=e=>{e&&(this.isSupportedCode(e)?n.push(e):this.logger.warn(`rejecting language code not found in supportedLngs: ${e}`))};return"string"==typeof e&&(e.indexOf("-")>-1||e.indexOf("_")>-1)?("languageOnly"!==this.options.load&&r(this.formatLanguageCode(e)),"languageOnly"!==this.options.load&&"currentOnly"!==this.options.load&&r(this.getScriptPartFromCode(e)),"currentOnly"!==this.options.load&&r(this.getLanguagePartFromCode(e))):"string"==typeof e&&r(this.formatLanguageCode(e)),i.forEach(e
1=>{0>n.indexOf(e)&&r(this.formatLanguageCode(e))}),n}}let X=[{lngs:["ach","ak","am","arn","br","fil","gun","ln","mfe","mg","mi","oc","pt","pt-BR","tg","tl","ti","tr","uz","wa"],nr:[1,2],fc:1},{lngs:["af","an","ast","az","bg","bn","ca","da","de","dev","el","en","eo","es","et","eu","fi","fo","fur","fy","gl","gu","ha","hi","hu","hy","ia","it","kk","kn","ku","lb","mai","ml","mn","mr","nah","nap","nb","ne","nl","nn","no","nso","pa","pap","pms","ps","pt-PT","rm","sco","se","si","so","son","sq","sv","sw","ta","te","tk","ur","yo"],nr:[1,2],fc:2},{lngs:["ay","bo","cgg","fa","ht","id","ja","jbo","ka","km","ko","ky","lo","ms","sah","su","th","tt","ug","vi","wo","zh"],nr:[1],fc:3},{lngs:["be","bs","cnr","dz","hr","ru","sr","uk"],nr:[1,2,5],fc:4},{lngs:["ar"],nr:[0,1,2,3,11,100],fc:5},{lngs:["cs","sk"],nr:[1,2,5],fc:6},{lngs:["csb","pl"],nr:[1,2,5],fc:7},{lngs:["cy"],nr:[1,2,3,8],fc:8},{lngs:["fr"],nr:[1,2],fc:9},{lngs:["ga"],nr:[1,2,3,7,11],fc:10},{lngs:["gd"],nr:[1,2,3,20],fc:11},{lngs:["is"],nr:[1,2],fc:12},{lngs:["jv"],nr:[0,1],fc:13},{lngs:["kw"],nr:[1,2,3,4],fc:14},{lngs:["lt"],nr:[1,2,10],fc:15},{lngs:["lv"],nr:[1,2,0],fc:16},{lngs:["mk"],nr:[1,2],fc:17},{lngs:["mnk"],nr:[0,1,2],fc:18},{lngs:["mt"],nr:[1,2,11,20],fc:19},{lngs:["or"],nr:[2,1],fc:2},{lngs:["ro"],nr:[1,2,20],fc:20},{lngs:["sl"],nr:[5,1,2,3],fc:21},{lngs:["he","iw"],nr:[1,2,20,21],fc:22}],G={1:function(e){return Number(e>1)},2:function(e){return Number(1!=e)},3:function(e){return 0},4:function(e){return Number(e%10==1&&e%100!=11?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2)},5:function(e){return Number(0==e?0:1==e?1:2==e?2:e%100>=3&&e%100<=10?3:e%100>=11?4:5)},6:function(e){return Number(1==e?0:e>=2&&e<=4?1:2)},7:function(e){return Number(1==e?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2)},8:function(e){return Number(1==e?0:2==e?1:8!=e&&11!=e?2:3)},9:function(e){return Number(e>=2)},10:function(e){return Number(1==e?0:2==e?1:e<7?2:e<11?3:4)},11:function(e){return Number(1==e||11==e?0:2==e||12==e?1:e>2&&e<20?2:3)},12:function(e){return Number(e%10!=1||e%100==11)},13:function(e){return Number(0!==e)},14:function(e){return Number(1==e?0:2==e?1:3==e?2:3)},15:function(e){return Number(e%10==1&&e%100!=11?0:e%10>=2&&(e%100<10||e%100>=20)?1:2)},16:function(e){return Number(e%10==1&&e%100!=11?0:0!==e?1:2)},17:function(e){return Number(+(1!=e&&(e%10!=1||e%100==11)))},18:function(e){return Number(0==e?0:1==e?1:2)},19:function(e){return Number(1==e?0:0==e||e%100>1&&e%100<11?1:e%100>10&&e%100<20?2:3)},20:function(e){return Number(1==e?0:0==e||e%100>0&&e%100<20?1:2)},21:function(e){return Number(e%100==1?1:e%100==2?2:3*(e%100==3||e%100==4))},22:function(e){return Number(1==e?0:2==e?1:(e<0||e>10)&&e%10==0?2:3)}},Y=["v1","v2","v3"],Q=["v4"],Z={zero:0,one:1,two:2,few:3,many:4,other:5};class ee{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.languageUtils=e,this.options=t,this.logger=T.create("pluralResolver"),(!this.options.compatibilityJSON||Q.includes(this.options.compatibilityJSON))&&("undefined"==typeof Intl||!Intl.PluralRules)&&(this.options.compatibilityJSON="v3",this.logger.error("Your environment seems not to be Intl API compatible, use an Intl.PluralRules polyfill. Will fallback to the compatibilityJSON v3 format handling.")),this.rules=function(){let e={};return X.forEach(t=>{t.lngs.forEach(i=>{e[i]={numbers:t.nr,plurals:G[t.fc]}})}),e}()}addRule(e,t){this.rules[e]=t}getRule(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(this.shouldUseIntlApi())try{return new Intl.PluralRules(q("dev"===e?"en":e),{type:t.ordinal?"ordinal":"cardinal"})}catch(e){return}return this.rules[e]||this.rules[this.languageUtils.getLanguagePartFromCode(e)]}needsPlural(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=this.getRule(e,t);return this.shouldUseIntlApi()?i&&i.resolvedOptions().pluralCategories.length>1:i&&i.numbers.length>1}getPluralFormsOfKey(e,t){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return this.getSuffixes(e,i).map(e=>`${t}${e}`)}getSuffixes(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=this.getRule(e,t);return i?this.shouldUseIntlApi()?i.resolvedOptions().pluralCategories.sort((e,t)=>
1Z[e]-Z[t]).map(e=>`${this.options.prepend}${t.ordinal?`ordinal${this.options.prepend}`:""}${e}`):i.numbers.map(i=>this.getSuffix(e,i,t)):[]}getSuffix(e,t){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=this.getRule(e,i);return n?this.shouldUseIntlApi()?`${this.options.prepend}${i.ordinal?`ordinal${this.options.prepend}`:""}${n.select(t)}`:this.getSuffixRetroCompatible(n,t):(this.logger.warn(`no plural rule found for: ${e}`),"")}getSuffixRetroCompatible(e,t){let i=e.noAbs?e.plurals(t):e.plurals(Math.abs(t)),n=e.numbers[i];this.options.simplifyPluralSuffix&&2===e.numbers.length&&1===e.numbers[0]&&(2===n?n="plural":1===n&&(n=""));let r=()=>this.options.prepend&&n.toString()?this.options.prepend+n.toString():n.toString();return"v1"===this.options.compatibilityJSON?1===n?"":"number"==typeof n?`_plural_${n.toString()}`:r():"v2"===this.options.compatibilityJSON||this.options.simplifyPluralSuffix&&2===e.numbers.length&&1===e.numbers[0]?r():this.options.prepend&&i.toString()?this.options.prepend+i.toString():i.toString()}
1shouldUseIntlApi(){return!Y.includes(this.options.compatibilityJSON)}}function et(e,t,i){let n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:".",r=!(arguments.length>4)||void 0===arguments[4]||arguments[4],o=function(e,t,i){let n=$(e,i);return void 0!==n?n:$(t,i)}(e,t,i);return!o&&r&&"string"==typeof i&&void 0===(o=U(e,i,n))&&(o=U(t,i,n)),o}class ei{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.logger=T.create("interpolator"),this.options=e,this.format=e.interpolation&&e.interpolation.format||(e=>e),this.init(e)}init(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};e.interpolation||(e.interpolation={escapeValue:!0});let t=e.interpolation;this.escape=void 0!==t.escape?t.escape:_,this.escapeValue=void 0===t.escapeValue||t.escapeValue,this.useRawValueToEscape=void 0!==t.useRawValueToEscape&&t.useRawValueToEscape,this.prefix=t.prefix?D(t.prefix):t.prefixEscaped||"{{",this.suffix=t.suffix?D(t.suffix):t.suffixEscaped||"}}",this.formatSeparator=t.formatSeparator?t.formatSeparator:t.formatSeparator||",",this.unescapePrefix=t.unescapeSuffix?"":t.unescapePrefix||"-",this.unescapeSuffix=this.unescapePrefix?"":t.unescapeSuffix||"",this.nestingPrefix=t.nestingPrefix?D(t.nestingPrefix):t.nestingPrefixEscaped||D("$t("),this.nestingSuffix=t.nestingSuffix?D(t.nestingSuffix):t.nestingSuffixEscaped||D(")"),this.nestingOptionsSeparator=t.nestingOptionsSeparator?t.nestingOptionsSeparator:t.nestingOptionsSeparator||",",this.maxReplaces=t.maxReplaces?t.maxReplaces:1e3,this.alwaysFormat=void 0!==t.alwaysFormat&&t.alwaysFormat,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){let e=(e,t)=>e&&e.source===t?(e.lastIndex=0,e):RegExp(t,"g");this.regexp=e(this.regexp,`${this.prefix}(.+?)${this.suffix}`),this.regexpUnescape=e(this.regexpUnescape,`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`),this.nestingRegexp=e(this.nestingRegexp,`${this.nestingPrefix}(.+?)${this.nestingSuffix}`)}interpolate(e,t,i,n){let r,o,s,a=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{};function l(e){return e.replace(/\$/g,"$$$$")}let u=e=>{if(0>e.indexOf(this.formatSeparator)){let r=et(t,a,e,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(r,void 0,i,{...n,...t,interpolationkey:e}):r}let r=e.split(this.formatSeparator),o=r.shift().trim(),s=r.join(this.formatSeparator).trim();return this.format(et(t,a,o,this.options.keySeparator,this.options.ignoreJSONStructure),s,i,{...n,...t,interpolationkey:o})};this.resetRegExp();let c=n&&n.missingInterpolationHandler||this.options.missingInterpolationHandler,d=n&&n.interpolation&&void 0!==n.interpolation.skipOnVariables?n.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:e=>l(e)},{regex:this.regexp,safeValue:e=>this.escapeValue?l(this.escape(e)):l(e)}].forEach(t=>{for(s=0;r=t.regex.exec(e);){let i=r[1].trim();if(void 0===(o=u(i)))if("function"==typeof c){let t=c(e,r,n);o="string"==typeof t?t:""}else if(n&&Object.prototype.hasOwnProperty.call(n,i))o="";else if(d){o=r[0];continue}else this.logger.warn(`missed to pass in variable ${i} for interpolating ${e}`),o="";else"string"==typeof o||this.useRawValueToEscape||(o=j(o));let a=t.safeValue(o);if(e=e.replace(r[0],a),d?(t.regex.lastIndex+=o.length,t.regex.lastIndex-=r[0].length):t.regex.lastIndex=0,++s>=this.maxReplaces)break}}),e}nest(e,t){let i,n,r,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};function s(e,t){let i=this.nestingOptionsSeparator;if(0>e.indexOf(i))return e;let n=e.split(RegExp(`${i}[ ]*{`)),o=`{${n[1]}`;e=n[0];let s=(o=this.interpolate(o,r)).match(/'/g),a=o.match(/"/g);(s&&s.length%2==0&&!a||a.length%2!=0)&&(o=o.replace(/'/g,'"'));try{r=JSON.parse(o),t&&(r={...t,...r})}catch(t){return this.logger.warn(`failed parsing options string in nesting for key ${e}`,t),`${e}${i}${o}`}return delete r.defaultValue,e}for(;i=this.nestingRegexp.exec(e);){let a=[];(r=(r={...o}).replace&&"string"!=typeof r.replace?r.replace:r).applyPostProcessor=!1,delete r.defaultValue;let l=!1;if(-1!==i[0].indexOf(this.formatSeparator)&&!/{.*}/.test(i[1])){let e=i[1].split(this.formatSeparator).map(e=>e.trim());i[1]=e.shift(),a=e,l=!0}if((n=t(s.call(this,i[1].trim(),r),r))&&i[0]===e&&"string"!=typeof n)return n;"string"!=typeof n&&(n=j(n)),n||(this.logger.warn(`missed to resolve ${i[1]} for nesting ${e}`),n=""),l&&(n=a.reduce((e,t)=>
1this.format(e,t,o.lng,{...o,interpolationkey:i[1].trim()}),n.trim())),e=e.replace(i[0],n),this.regexp.lastIndex=0}return e}}function en(e){let t={};return function(i,n,r){let o=n+JSON.stringify(r),s=t[o];return s||(s=e(q(n),r),t[o]=s),s(i)}}class er{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.logger=T.create("formatter"),this.options=e,this.formats={number:en((e,t)=>{let i=new Intl.NumberFormat(e,{...t});return e=>i.format(e)}),currency:en((e,t)=>{let i=new Intl.NumberFormat(e,{...t,style:"currency"});return e=>i.format(e)}),datetime:en((e,t)=>{let i=new Intl.DateTimeFormat(e,{...t});return e=>i.format(e)}),relativetime:en((e,t)=>{let i=new Intl.RelativeTimeFormat(e,{...t});return e=>i.format(e,t.range||"day")}),list:en((e,t)=>{let i=new Intl.ListFormat(e,{...t});return e=>i.format(e)})},this.init(e)}init(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{interpolation:{}},i=t.interpolation;this.formatSeparator=i.formatSeparator?i.formatSeparator:i.formatSeparator||","}add(e,t){this.formats[e.toLowerCase().trim()]=t}addCached(e,t){this.formats[e.toLowerCase().trim()]=en(t)}format(e,t,i){let n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return t.split(this.formatSeparator).reduce((e,t)=>{let{formatName:r,formatOptions:o}=function(e){let t=e.toLowerCase().trim(),i={};if(e.indexOf("(")>-1){let n=e.split("(");t=n[0].toLowerCase().trim();let r=n[1].substring(0,n[1].length-1);"currency"===t&&0>r.indexOf(":")?i.currency||(i.currency=r.trim()):"relativetime"===t&&0>r.indexOf(":")?i.range||(i.range=r.trim()):r.split(";").forEach(e=>{if(!e)return;let[t,...n]=e.split(":"),r=n.join(":").trim().replace(/^'+|'+$/g,"");i[t.trim()]||(i[t.trim()]=r),"false"===r&&(i[t.trim()]=!1),"true"===r&&(i[t.trim()]=!0),isNaN(r)||(i[t.trim()]=parseInt(r,10))})}return{formatName:t,formatOptions:i}}(t);if(this.formats[r]){let t=e;try{let s=n&&n.formatParams&&n.formatParams[n.interpolationkey]||{},a=s.locale||s.lng||n.locale||n.lng||i;t=this.formats[r](e,a,{...o,...n,...s})}catch(e){this.logger.warn(e)}return t}return this.logger.warn(`there was no format function for ${r}`),e},e)}}class eo extends P{constructor(e,t,i){let n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};super(),this.backend=e,this.store=t,this.services=i,this.languageUtils=i.languageUtils,this.options=n,this.logger=T.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=n.maxParallelReads||10,this.readingCalls=0,this.maxRetries=n.maxRetries>=0?n.maxRetries:5,this.retryTimeout=n.retryTimeout>=1?n.retryTimeout:350,this.state={},this.queue=[],this.backend&&this.backend.init&&this.backend.init(i,n.backend,n)}queueLoad(e,t,i,n){let r={},o={},s={},a={};return e.forEach(e=>{let n=!0;t.forEach(t=>{let s=`${e}|${t}`;!i.reload&&this.store.hasResourceBundle(e,t)?this.state[s]=2:this.state[s]<0||(1===this.state[s]?void 0===o[s]&&(o[s]=!0):(this.state[s]=1,n=!1,void 0===o[s]&&(o[s]=!0),void 0===r[s]&&(r[s]=!0),void 0===a[t]&&(a[t]=!0)))}),n||(s[e]=!0)}),(Object.keys(r).length||Object.keys(o).length)&&this.queue.push({pending:o,pendingCount:Object.keys(o).length,loaded:{},errors:[],callback:n}),{toLoad:Object.keys(r),pending:Object.keys(o),toLoadLanguages:Object.keys(s),toLoadNamespaces:Object.keys(a)}}loaded(e,t,i){let n=e.split("|"),r=n[0],o=n[1];t&&this.emit("failedLoading",r,o,t),i&&this.store.addResourceBundle(r,o,i),this.state[e]=t?-1:2;let s={};this.queue.forEach(i=>{!function(e,t,i,n){let{obj:r,k:o}=N(e,t,Object);r[o]=r[o]||[],r[o].push(i)}(i.loaded,[r],o),void 0!==i.pending[e]&&(delete i.pending[e],i.pendingCount--),t&&i.errors.push(t),0!==i.pendingCount||i.done||(Object.keys(i.loaded).forEach(e=>{s[e]||(s[e]={});let t=i.loaded[e];t.length&&t.forEach(t=>{void 0===s[e][t]&&(s[e][t]=!0)})}),i.done=!0,i.errors.length?i.callback(i.errors):i.callback())}),this.emit("loaded",s),this.queue=this.queue.filter(e=>!e.done)}read(e,t,i){let n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,r=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)return void this.waitingReads.push({lng:e,ns:t,fcName:i,tried:n,wait:r,callback:o});this.readingCalls++;let s=(s,a)=>
1{if(this.readingCalls--,this.waitingReads.length>0){let e=this.waitingReads.shift();this.read(e.lng,e.ns,e.fcName,e.tried,e.wait,e.callback)}if(s&&a&&n<this.maxRetries)return void setTimeout(()=>{this.read.call(this,e,t,i,n+1,2*r,o)},r);o(s,a)},a=this.backend[i].bind(this.backend);if(2===a.length){try{let i=a(e,t);i&&"function"==typeof i.then?i.then(e=>s(null,e)).catch(s):s(null,i)}catch(e){s(e)}return}return a(e,t,s)}prepareLoading(e,t){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=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."),n&&n();"string"==typeof e&&(e=this.languageUtils.toResolveHierarchy(e)),"string"==typeof t&&(t=[t]);let r=this.queueLoad(e,t,i,n);if(!r.toLoad.length)return r.pending.length||n(),null;r.toLoad.forEach(e=>{this.loadOne(e)})}load(e,t,i){this.prepareLoading(e,t,{},i)}reload(e,t,i){this.prepareLoading(e,t,{reload:!0},i)}loadOne(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",i=e.split("|"),n=i[0],r=i[1];this.read(n,r,"read",void 0,void 0,(i,o)=>{i&&this.logger.warn(`${t}loading namespace ${r} for language ${n} failed`,i),!i&&o&&this.logger.log(`${t}loaded namespace ${r} for language ${n}`,o),this.loaded(e,i,o)})}saveMissing(e,t,i,n,r){let o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{},s=arguments.length>6&&void 0!==arguments[6]?arguments[6]:()=>{};if(this.services.utils&&this.services.utils.hasLoadedNamespace&&!this.services.utils.hasLoadedNamespace(t))return void this.logger.warn(`did not save key "${i}" as the namespace "${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!!!");if(null!=i&&""!==i){if(this.backend&&this.backend.create){let a={...o,isUpdate:r},l=this.backend.create.bind(this.backend);if(l.length<6)try{let r;(r=5===l.length?l(e,t,i,n,a):l(e,t,i,n))&&"function"==typeof r.then?r.then(e=>s(null,e)).catch(s):s(null,r)}catch(e){s(e)}else l(e,t,i,n,s,a)}e&&e[0]&&this.store.addResource(e[0],t,i,n)}}}function es(){return{debug:!1,initImmediate:!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){let t={};if("object"==typeof e[1]&&(t=e[1]),"string"==typeof e[1]&&(t.defaultValue=e[1]),"string"==typeof e[2]&&(t.tDescription=e[2]),"object"==typeof e[2]||"object"==typeof e[3]){let i=e[3]||e[2];
1Object.keys(i).forEach(e=>{t[e]=i[e]})}return t},interpolation:{escapeValue:!0,format:e=>e,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0}}}function ea(e){return"string"==typeof e.ns&&(e.ns=[e.ns]),"string"==typeof e.fallbackLng&&(e.fallbackLng=[e.fallbackLng]),"string"==typeof e.fallbackNS&&(e.fallbackNS=[e.fallbackNS]),e.supportedLngs&&0>e.supportedLngs.indexOf("cimode")&&(e.supportedLngs=e.supportedLngs.concat(["cimode"])),e}function el(){}class eu extends P{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;if(super(),this.options=ea(e),this.services={},this.logger=T,this.modules={external:[]},!function(e){Object.getOwnPropertyNames(Object.getPrototypeOf(e)).forEach(t=>{"function"==typeof e[t]&&(e[t]=e[t].bind(e))})}(this),t&&!this.isInitialized&&!e.isClone){if(!this.options.initImmediate)return this.init(e,t),this;setTimeout(()=>{this.init(e,t)},0)}}init(){var e=this;let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},i=arguments.length>1?arguments[1]:void 0;"function"==typeof t&&(i=t,t={}),!t.defaultNS&&!1!==t.defaultNS&&t.ns&&("string"==typeof t.ns?t.defaultNS=t.ns:0>t.ns.indexOf("translation")&&(t.defaultNS=t.ns[0]));let n=es();function r(e){return e?"function"==typeof e?new e:e:null}if(this.options={...n,...this.options,...ea(t)},"v1"!==this.options.compatibilityAPI&&(this.options.interpolation={...n.interpolation,...this.options.interpolation}),void 0!==t.keySeparator&&(this.options.userDefinedKeySeparator=t.keySeparator),void 0!==t.nsSeparator&&(this.options.userDefinedNsSeparator=t.nsSeparator),!this.options.isClone){let t;this.modules.logger?T.init(r(this.modules.logger),this.options):T.init(null,this.options),this.modules.formatter?t=this.modules.formatter:"undefined"!=typeof Intl&&(t=er);let i=new W(this.options);this.store=new B(this.options.resources,this.options);let o=this.services;o.logger=T,o.resourceStore=this.store,o.languageUtils=i,o.pluralResolver=new ee(i,{prepend:this.options.pluralSeparator,compatibilityJSON:this.options.compatibilityJSON,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),t&&(!this.options.interpolation.format||this.options.interpolation.format===n.interpolation.format)&&(o.formatter=r(t),o.formatter.init(o,this.options),this.options.interpolation.format=o.formatter.format.bind(o.formatter)),o.interpolator=new ei(this.options),o.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},o.backendConnector=new eo(r(this.modules.backend),o.resourceStore,o,this.options),o.backendConnector.on("*",function(t){for(var i=arguments.length,n=Array(i>1?i-1:0),r=1;r<i;r++)n[r-1]=arguments[r];e.emit(t,...n)}),this.modules.languageDetector&&(o.languageDetector=r(this.modules.languageDetector),o.languageDetector.init&&o.languageDetector.init(o,this.options.detection,this.options)),this.modules.i18nFormat&&(o.i18nFormat=r(this.modules.i18nFormat),o.i18nFormat.init&&o.i18nFormat.init(this)),this.translator=new z(this.services,this.options),this.translator.on("*",function(t){for(var i=arguments.length,n=Array(i>1?i-1:0),r=1;r<i;r++)n[r-1]=arguments[r];e.emit(t,...n)}),this.modules.external.forEach(e=>{e.init&&e.init(this)})}if(this.format=this.options.interpolation.format,i||(i=el),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){let e=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);e.length>0&&"dev"!==e[0]&&(this.options.lng=e[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(t=>{this[t]=function(){return e.store[t](...arguments)}}),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(t=>{this[t]=function(){return e.store[t](...arguments),e}});let o=R(),s=()=>{let e=(e,t)=>{this.isInitialized&&!this.initializedStoreOnce&&this.logger.warn("init: i18next is already initialized. You should call init just once!"),this.isInitialized=!0,this.options.isClone||this.logger.log("initialized",this.options),this.emit
1("initialized",this.options),o.resolve(t),i(e,t)};if(this.languages&&"v1"!==this.options.compatibilityAPI&&!this.isInitialized)return e(null,this.t.bind(this));this.changeLanguage(this.options.lng,e)};return this.options.resources||!this.options.initImmediate?s():setTimeout(s,0),o}loadResources(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:el,i=t,n="string"==typeof e?e:this.language;if("function"==typeof e&&(i=e),!this.options.resources||this.options.partialBundledLanguages){if(n&&"cimode"===n.toLowerCase()&&(!this.options.preload||0===this.options.preload.length))return i();let e=[],t=t=>{t&&"cimode"!==t&&this.services.languageUtils.toResolveHierarchy(t).forEach(t=>{"cimode"!==t&&0>e.indexOf(t)&&e.push(t)})};n?t(n):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(e=>t(e)),this.options.preload&&this.options.preload.forEach(e=>t(e)),this.services.backendConnector.load(e,this.options.ns,e=>{e||this.resolvedLanguage||!this.language||this.setResolvedLanguage(this.language),i(e)})}else i(null)}reloadResources(e,t,i){let n=R();return e||(e=this.languages),t||(t=this.options.ns),i||(i=el),this.services.backendConnector.reload(e,t,e=>{n.resolve(),i(e)}),n}use(e){if(!e)throw Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!e.type)throw 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&&V.addPostProcessor(e),"formatter"===e.type&&(this.modules.formatter=e),"3rdParty"===e.type&&this.modules.external.push(e),this}setResolvedLanguage(e){if(e&&this.languages&&!(["cimode","dev"].indexOf(e)>-1))for(let e=0;e<this.languages.length;e++){let t=this.languages[e];if(!(["cimode","dev"].indexOf(t)>-1)&&this.store.hasLanguageSomeTranslations(t)){this.resolvedLanguage=t;break}}}changeLanguage(e,t){var i=this;this.isLanguageChangingTo=e;let n=R();this.emit("languageChanging",e);let r=e=>{this.language=e,this.languages=this.services.languageUtils.toResolveHierarchy(e),this.resolvedLanguage=void 0,this.setResolvedLanguage(e)},o=(e,o)=>{o?(r(o),this.translator.changeLanguage(o),this.isLanguageChangingTo=void 0,this.emit("languageChanged",o),this.logger.log("languageChanged",o)):this.isLanguageChangingTo=void 0,n.resolve(function(){return i.t(...arguments)}),t&&t(e,function(){return i.t(...arguments)})},s=t=>{e||t||!this.services.languageDetector||(t=[]);let i="string"==typeof t?t:this.services.languageUtils.getBestMatchFromCodes(t);i&&(this.language||r(i),this.translator.language||this.translator.changeLanguage(i),this.services.languageDetector&&this.services.languageDetector.cacheUserLanguage&&this.services.languageDetector.cacheUserLanguage(i)),this.loadResources(i,e=>{o(e,i)})};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(s):this.services.languageDetector.detect(s):s(e):s(this.services.languageDetector.detect()),n}getFixedT(e,t,i){var n=this;let r=function(e,t){let o,s;if("object"!=typeof t){for(var a=arguments.length,l=Array(a>2?a-2:0),u=2;u<a;u++)l[u-2]=arguments[u];o=n.options.overloadTranslationOptionHandler([e,t].concat(l))}else o={...t};o.lng=o.lng||r.lng,o.lngs=o.lngs||r.lngs,o.ns=o.ns||r.ns,o.keyPrefix=o.keyPrefix||i||r.keyPrefix;let c=n.options.keySeparator||".";return s=o.keyPrefix&&Array.isArray(e)?e.map(e=>`${o.keyPrefix}${c}${e}`):o.keyPrefix?`${o.keyPrefix}${c}${e}`:e,n.t(s,o)};return"string"==typeof e?r.lng=e:r.lngs=e,r.ns=t,r.keyPrefix=i,r}t(){return this.translator&&this.translator.translate(...arguments)}exists(){return this.translator&&this.translator.exists(...arguments)}setDefaultNamespace(e){this.options.defaultNS=e}hasLoadedNamespace(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;
1if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;let i=t.lng||this.resolvedLanguage||this.languages[0],n=!!this.options&&this.options.fallbackLng,r=this.languages[this.languages.length-1];if("cimode"===i.toLowerCase())return!0;let o=(e,t)=>{let i=this.services.backendConnector.state[`${e}|${t}`];return -1===i||2===i};if(t.precheck){let e=t.precheck(this,o);if(void 0!==e)return e}return!!(this.hasResourceBundle(i,e)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||o(i,e)&&(!n||o(r,e)))}loadNamespaces(e,t){let i=R();return this.options.ns?("string"==typeof e&&(e=[e]),e.forEach(e=>{0>this.options.ns.indexOf(e)&&this.options.ns.push(e)}),this.loadResources(e=>{i.resolve(),t&&t(e)}),i):(t&&t(),Promise.resolve())}loadLanguages(e,t){let i=R();"string"==typeof e&&(e=[e]);let n=this.options.preload||[],r=e.filter(e=>0>n.indexOf(e));return r.length?(this.options.preload=n.concat(r),this.loadResources(e=>{i.resolve(),t&&t(e)}),i):(t&&t(),Promise.resolve())}dir(e){return(e||(e=this.resolvedLanguage||(this.languages&&this.languages.length>0?this.languages[0]:this.language)),e)?["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((this.services&&this.services.languageUtils||new W(es())).getLanguagePartFromCode(e))>-1||e.toLowerCase().indexOf("-arab")>1?"rtl":"ltr":"rtl"}static createInstance(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;return new eu(e,t)}cloneInstance(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:el,i=e.forkResourceStore;i&&delete e.forkResourceStore;let n={...this.options,...e,isClone:!0},r=new eu(n);return(void 0!==e.debug||void 0!==e.prefix)&&(r.logger=r.logger.clone(e)),["store","services","language"].forEach(e=>{r[e]=this[e]}),r.services={...this.services},r.services.utils={hasLoadedNamespace:r.hasLoadedNamespace.bind(r)},i&&(r.store=new B(this.store.data,n),r.services.resourceStore=r.store),r.translator=new z(r.services,n),r.translator.on("*",function(e){for(var t=arguments.length,i=Array(t>1?t-1:0),n=1;n<t;n++)i[n-1]=arguments[n];r.emit(e,...i)}),r.init(n,t),r.translator.options=n,r.translator.backendConnector.services.utils={hasLoadedNamespace:r.hasLoadedNamespace.bind(r)},r}toJSON(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}let ec=eu.createInstance();function ed(e){return(ed="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})(e)}ec.createInstance=eu.createInstance,ec.createInstance,ec.dir,ec.init,ec.loadResources,ec.reloadResources,ec.use,ec.changeLanguage,ec.getFixedT,ec.t,ec.exists,ec.setDefaultNamespace,ec.hasLoadedNamespace,ec.loadNamespaces,ec.loadLanguages;var eh=[],ep=eh.forEach,ef=eh.slice;function eg(e){return ep.call(ef.call(arguments,1),function(t){if(t)for(var i in t)void 0===e[i]&&(e[i]=t[i])}),e}function em(){return"function"==typeof XMLHttpRequest||("undefined"==typeof XMLHttpRequest?"undefined":ed(XMLHttpRequest))==="object"}var ey=i(9260),eb=i.t(ey,2);function ev(e){return(ev="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})(e)}"function"==typeof fetch&&(d="undefined"!=typeof global&&global.fetch?global.fetch:"undefined"!=typeof window&&window.fetch?window.fetch:fetch),em()&&("undefined"!=typeof global&&global.XMLHttpRequest?h=global.XMLHttpRequest:"undefined"!=typeof window&&window.XMLHttpRequest&&(h=window.XMLHttpRequest)),"function"==typeof ActiveXObject&&("undefined"!=typeof global&&global.ActiveXObject?p=global.ActiveXObject:"undefined"!=typeof window&&window.ActiveXObject&&(p=window.ActiveXObject)),d||!eb||h||p||(d=ey||eb),"function"!=typeof d&&(d=void 0);
1var ew=function(e,t){if(t&&"object"===ev(t)){var i="";for(var n in t)i+="&"+encodeURIComponent(n)+"="+encodeURIComponent(t[n]);if(!i)return e;e=e+(-1!==e.indexOf("?")?"&":"?")+i.slice(1)}return e},eS=function(e,t,i){var n=function(e){if(!e.ok)return i(e.statusText||"Error",{status:e.status});e.text().then(function(t){i(null,{status:e.status,data:t})}).catch(i)};"function"==typeof fetch?fetch(e,t).then(n).catch(i):d(e,t).then(n).catch(i)},ek=!1,ex=function(e,t,i,n){e.queryStringParams&&(t=ew(t,e.queryStringParams));var r=eg({},"function"==typeof e.customHeaders?e.customHeaders():e.customHeaders);"undefined"==typeof window&&"undefined"!=typeof global&&void 0!==global.process&&global.process.versions&&global.process.versions.node&&(r["User-Agent"]="i18next-http-backend (node/".concat(global.process.version,"; ").concat(global.process.platform," ").concat(global.process.arch,")")),i&&(r["Content-Type"]="application/json");var o="function"==typeof e.requestOptions?e.requestOptions(i):e.requestOptions,s=eg({method:i?"POST":"GET",body:i?e.stringify(i):void 0,headers:r},ek?{}:o);try{eS(t,s,n)}catch(e){if(!o||0===Object.keys(o).length||!e.message||0>e.message.indexOf("not implemented"))return n(e);try{Object.keys(o).forEach(function(e){delete s[e]}),eS(t,s,n),ek=!0}catch(e){n(e)}}},eE=function(e,t,i,n){i&&"object"===ev(i)&&(i=ew("",i).slice(1)),e.queryStringParams&&(t=ew(t,e.queryStringParams));try{(r=h?new h:new p("MSXML2.XMLHTTP.3.0")).open(i?"POST":"GET",t,1),e.crossDomain||r.setRequestHeader("X-Requested-With","XMLHttpRequest"),r.withCredentials=!!e.withCredentials,i&&r.setRequestHeader("Content-Type","application/x-www-form-urlencoded"),r.overrideMimeType&&r.overrideMimeType("application/json");var r,o=e.customHeaders;if(o="function"==typeof o?o():o)for(var s in o)r.setRequestHeader(s,o[s]);r.onreadystatechange=function(){r.readyState>3&&n(r.status>=400?r.statusText:null,{status:r.status,data:r.responseText})},r.send(i)}catch(e){console&&console.log(e)}};let eO=function(e,t,i,n){return("function"==typeof i&&(n=i,i=void 0),n=n||function(){},d&&0!==t.indexOf("file:"))?ex(e,t,i,n):em()||"function"==typeof ActiveXObject?eE(e,t,i,n):void n(Error("No fetch and no xhr implementation found!"))};function eL(e){return(eL="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})(e)}function eC(e){var t=function(e,t){if("object"!==eL(e)||null===e)return e;var i=e[Symbol.toPrimitive];if(void 0!==i){var n=i.call(e,t||"default");if("object"!==eL(n))return n;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===eL(t)?t:String(t)}var eT=function(){var e;function t(e){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(!(this instanceof t))throw TypeError("Cannot call a class as a function");this.services=e,this.options=i,this.allOptions=n,this.type="backend",this.init(e,i,n)}return e=[{key:"init",value:function(e){var t=this,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};this.services=e,this.options=eg(i,this.options||{},{loadPath:"/locales/{{lng}}/{{ns}}.json",addPath:"/locales/add/{{lng}}/{{ns}}",parse:function(e){return JSON.parse(e)},stringify:JSON.stringify,parsePayload:function(e,t,i){var n,r,o;return n={},r=t,o=i||"",(r=eC(r))in n?Object.defineProperty(n,r,{value:o,enumerable:!0,configurable:!0,writable:!0}):n[r]=o,n},parseLoadPayload:function(e,t){},request:eO,reloadInterval:"undefined"==typeof window&&36e5,customHeaders:{},queryStringParams:{},crossDomain:!1,withCredentials:!1,overrideMimeType:!1,requestOptions:{mode:"cors",credentials:"same-origin",cache:"default"}}),this.allOptions=n,this.services&&this.options.reloadInterval&&setInterval(function(){return t.reload()},this.options.reloadInterval)}},{key:"readMulti",value:function(e,t,i){this._readAny(e,e,t,t,i)}},{key:"read",value:function(e,t,i){this._readAny([e],e,[t],t,i)}},{key:"_readAny",value:function(e,t,i,n,r){var o,s,a=this,l=this.options.loadPath;"function"==typeof this.options.loadPath&&(l=this.options.loadPath(e,i)),(l=(s=o=l)&&"function"==typeof s.then?o:Promise.resolve(o)).then(function(o){if
1(!o)return r(null,{});var s=a.services.interpolator.interpolate(o,{lng:e.join("+"),ns:i.join("+")});a.loadUrl(s,r,t,n)})}},{key:"loadUrl",value:function(e,t,i,n){var r=this,o=this.options.parseLoadPayload("string"==typeof i?[i]:i,"string"==typeof n?[n]:n);this.options.request(this.options,e,o,function(o,s){var a,l;if(s&&(s.status>=500&&s.status<600||!s.status))return t("failed loading "+e+"; status code: "+s.status,!0);if(s&&s.status>=400&&s.status<500)return t("failed loading "+e+"; status code: "+s.status,!1);if(!s&&o&&o.message&&o.message.indexOf("Failed to fetch")>-1)return t("failed loading "+e+": "+o.message,!0);if(o)return t(o,!1);try{a="string"==typeof s.data?r.options.parse(s.data,i,n):s.data}catch(t){l="failed parsing "+e+" to json"}if(l)return t(l,!1);t(null,a)})}},{key:"create",value:function(e,t,i,n,r){var o=this;if(this.options.addPath){"string"==typeof e&&(e=[e]);var s=this.options.parsePayload(t,i,n),a=0,l=[],u=[];e.forEach(function(i){var n=o.options.addPath;"function"==typeof o.options.addPath&&(n=o.options.addPath(i,t));var c=o.services.interpolator.interpolate(n,{lng:i,ns:t});o.options.request(o.options,c,s,function(t,i){a+=1,l.push(t),u.push(i),a===e.length&&"function"==typeof r&&r(l,u)})})}}},{key:"reload",value:function(){var e=this,t=this.services,i=t.backendConnector,n=t.languageUtils,r=t.logger,o=i.language;if(!o||"cimode"!==o.toLowerCase()){var s=[],a=function(e){n.toResolveHierarchy(e).forEach(function(e){0>s.indexOf(e)&&s.push(e)})};a(o),this.allOptions.preload&&this.allOptions.preload.forEach(function(e){return a(e)}),s.forEach(function(t){e.allOptions.ns.forEach(function(e){i.read(t,e,"read",null,null,function(n,o){n&&r.warn("loading namespace ".concat(e," for language ").concat(t," failed"),n),!n&&o&&r.log("loaded namespace ".concat(e," for language ").concat(t),o),i.loaded("".concat(t,"|").concat(e),n,o)})})})}}}],function(e,t){for(var i=0;i<t.length;i++){var n=t[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,eC(n.key),n)}}(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t}();function eP(e,t="",i="",n=1){return o(function*(){var r=e,o=t,s=i,a=n;return Math.random()>a?void 0:fetch("/web_client_log.php",{method:"POST",body:JSON.stringify({type:"info",eventId:r,movieId:o,detail:s}),credentials:"include"}).catch(e=>{console.error(e)})})()}eT.type="backend";class eR{translate(e,t){return function(e,t,i={}){var n,r,o;let[s,a]=t.split(".",2);return e(a,(r=l({},null!=(n=i.values)?n:{}),o=o={ns:s},Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(o)):(function(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);i.push.apply(i,n)}return i})(Object(o)).forEach(function(e){Object.defineProperty(r,e,Object.getOwnPropertyDescriptor(o,e))}),r))}(this.tFunc,e,t)}hasNamespace(e){return ec.hasLoadedNamespace(e)}changeLanguage(e){return o(function*(){return ec.changeLanguage(e).then(t=>new eR(e,t))})()}constructor(e,t){s(this,"lang",void 0),s(this,"tFunc",void 0),s(this,"t",void 0),this.lang=e,this.tFunc=t,this.t=this.translate.bind(this)}}let ej="frontend_i18n_missing_key";function eA(i,r=function(){if(e)return e;let t=function(){var e,t,i;let n=null!=(i=null==(t=document)||null==(e=t.documentElement)?void 0:e.lang)?i:"";return""===n?null:O(n)?n:"en"}();return e=t?t:function(){var e,t;let i=null!=(t=null==(e=n.getCookie("hl"))?void 0:e.trim())?t:"";return O(i)?i:"ja"}()}()){let s=null!=i?i:[];return s.includes("common")||s.push("common"),o(function*(){!t&&(ec.use(eT),t=(window.__i18nFileHashCache||(window.__i18nFileHashCache=new Promise((e,t)=>{let i=n=>{fetch("/js/v1/locales/i18n-files.json",{cache:"no-store"}).then(t=>o(function*(){if(!t.ok)throw Error("Network response was not ok");e((yield t.json()))})()).catch(e=>{n>0?i(n-1):(window.__i18nFileHashCache=void 0,t(e))})};i(3)})),window.__i18nFileHashCache).then(e=>(function(e,t,i={},n){return ec.init({lng:e,ns:t,defaultNS:"common",resources:void 0,load:"languageOnly",fallbackLng:!1,interpolation:{escapeValue:!1},returnEmptyString:!1,parseMissingKeyHandler:()=>"",missingInterpolationHandler:(...e)=>((function(...e){console.error(ej,...e),eP(ej,"",JSON.stringify(e),.1)})("[interpolation]",...e),""),backend:{loadPath:(e,t)=>{var n;let r=`${e}/${t}.json`,o=null!=(n=i[r])?n:Date.now();return`/js/v1/locales/${r}?v=${o}`}},react:{useSuspense:!1}})})(r,s,e).then(e=>new eR(r,e))));let e=t;return e.then(e=>{let t=s.filter(t=>!e.hasNamespace(t));return ec.loadNamespaces(t)}).then(()=>e)}
1)()}class eN{}s(eN,"showWindow",e=>{eI.getInstance().show(e)}),s(eN,"bindPopup",(e,t)=>{eN.notSupport()||e$.getInstance().bind(e,t)}),s(eN,"unbindPopup",e=>{eN.notSupport()||e$.getInstance().unbind(e)}),s(eN,"setPopupEnable",e=>{eN.notSupport()||e$.getInstance().setEnable(e)}),s(eN,"setPopupScroller",e=>{eN.notSupport()||e$.getInstance().setScroller(e)}),s(eN,"notSupport",()=>!("fetch"in window));class eI{static getInstance(){return null===eI.instance&&(eI.instance=new eI),eI.instance}show(e){return o(function*(){this.i18n||(this.i18n=yield eA(["common"]));let t=new E,i="tw-user-inspector-modal",n=document.getElementById(i);if(!n){let e=this.i18n.t("common.PROFILE"),r=t.createWrapper(e,i,"","tw-user-inspector-modal"),o=t.createTitle(e,i),s=t.createBody(i,"");r.appendChild(o),r.appendChild(s),document.body.append(r),n=r}let r=n.querySelector(".modal-body");if(r){r.innerHTML="";let{iframe:t,dispose:i}=this.createIframe(e);r.appendChild(t);let o=new c(n);o.addEventListener("hide",i),o.show()}}).call(this)}bindLinks(){document.body.addEventListener("click",e=>{let t=e.target,i=null==t?void 0:t.closest('a[data-show-inspector="true"]');if(i&&i.href){let t=new URL(i.href),n=t.pathname.split("/")[1];n&&(eI.isAccessFromWebView()?(t.hash="open_inspector",window.open(t.toString(),"_self")):this.show(n),e.preventDefault())}})}createIframe(e){let t=document.createElement("iframe");t.classList.add("tw-user-inspector-iframe"),t.frameBorder="0",t.scrolling="no",t.dataset.loading="true",t.addEventListener("load",()=>{t.dataset.loading="false"});let i=()=>{var e;t.style.height=(null==(e=t.contentWindow)?void 0:e.document.body.scrollHeight)+"px"};t.addEventListener("load",i);let n=e=>{e.source===t.contentWindow&&e.origin===window.location.origin&&"inspector-dom-ready"===e.data&&(t.dataset.loading="false",i())};return window.addEventListener("message",n),t.src=`/userinspector.php?user_id=${encodeURIComponent(e)}`,{iframe:t,dispose:()=>{window.removeEventListener("message",n),t.removeEventListener("load",i)}}}static isAccessFromWebView(){return n.getCookie("fromdevice")&&n.getCookie("app")||n.getCookie("appid")&&n.getCookie("version")}constructor(){s(this,"i18n",void 0)}}s(eI,"instance",null);class e${static getInstance(){return null===e$.instance&&(e$.instance=new e$),e$.instance}setScroller(e){this.scroller=e,this.scroller.addEventListener("scroll",()=>{this.shown&&requestAnimationFrame(()=>{this.scrolledAfterMouseEnter()&&this.hide()})},{passive:!0})}show(e){if(!this.enable||this.scrolledAfterMouseEnter())return void this.hide();window.clearTimeout(this.delayTimer),this.userId=e,this.shown=!0,this.popup=this.createPopup(),this.popup.style.visibility="hidden",this.apiClient.get(e).then(e=>{let t=this.createTemplate(e.user);t&&(this.popup.appendChild(t),this.container.appendChild(this.popup),this.setPosition(this.popup),this.container.style.visibility="visible",this.popup.style.visibility="visible")})}hide(){window.removeEventListener("mousemove",this.onMouseMove),window.clearTimeout(this.delayTimer),this.scrollPositionOnMouseEnter=null,this.container.innerHTML="",this.container.style.visibility="hidden",this.shown=!1,this.invoker=null,this.initialInvokerRect=null,this.userId=null}setPosition(e){var t;let i=null==(t=this.invoker)?void 0:t.getBoundingClientRect();if(!i)return;let n=e.getBoundingClientRect(),[r,o]=a.calculateDirection(i,n);"right"===r?e.style.left=i.left+"px":e.style.right=window.innerWidth-i.left-i.width-16+"px","bottom"===o?e.style.top=i.top+i.height+16+"px":e.style.bottom=window.innerHeight-(i.top-16)+"px"}createPopup(){let e=document.createElement("div");return e.innerHTML='<div class="tw-user-inspector-popup"></div>',e.firstChild}createTemplate(e){var t,i;let n=document.querySelector(".tw-user-inspector");if(!n)return null;let r=n.cloneNode(!0);r.style.display="",r.querySelector(".tw-user-inspector-icon").href=e.url,r.querySelector(".tw-user-inspector-name").href=e.url,r.querySelector(".tw-user-inspector-screen-name").href=e.url,r.querySelector(".tw-user-inspector-icon-image").src=e.image,r.querySelector(".tw-user-inspector-name-body").textContent=e.name,r.querySelector(".tw-user-inspector-screen-name").textContent="@"+e.screenName,r.querySelector(".tw-user-inspector-stat-level").textContent=e.level,r.querySelector(".tw-user-inspector-stat-backers").textContent=e.backerCount,r.querySelector(".tw-user-inspector-desc").textContent=e.description;let o=r.querySelector(".tw-user-inspector-mark-icon");e.mark?o.src=e.mark:null==(t=o.parentNode)||t.removeChild(o);let s=r.querySelector(".tw-user-inspector-badge-image");return e.badge?s.src=e.badge:null==(i=s.parentNode)||i.removeChild(s),r}scrolledAfterMouseEnter(){return Math.abs((this.scrollPositionOnMouseEnter||0)-this.getScrollTop(this.scroller))>64}getScrollTop(e){return e===window?window.pageYOffset:e.scrollTop}constructor(){s(this,"eventMap",new Map),s(this,"container",void 0),s(this,"scroller",void 0),s(this,"enable",!0),s(this,"shown",!1),s(this,"popup",this.createPopup()),s(this,"apiClient",void 0),s(this,"inSafeArea",void 0),s(this,"scrollPositionOnMouseEnter",null),s(this,"delayTimer",void 0),s(this,"invoker",null),s(this,"initialInvokerRect",null),s(this,"userId",null),s(this,"bind",(e,t)=>{let i=()=>{var i;this.shown||(this.hide(),this.invoker=t,this.initialInvokerRect=t.getBoundingClientRect(),this.scrollPositionOnMouseEnter=null!=(i=this.scrollPositionOnMouseEnter)?i:this.getScrollTop(this.scroller),this.delayTimer=window.setTimeout(()=>{this.show(e)},600),window.addEventListener("mousemove",this.onMouseMove))};this.eventMap.set(t,i),t.addEventListener("mouseenter",this.eventMap.get(t))}),s(this,"unbind",e=>{e.removeEventListener("mouseenter",this.eventMap.get(e)),this.eventMap.delete(e)}),s(this,"setEnable",e=>{this.enable=e}),s(this,"onMouseMove",e=>{this.inSafeArea=!!this.initialInvokerRect&&a.isInSafeArea(e.clientX,e.clientY,this.initialInvokerRect,null),this.inSafeArea||this.hide()}),this.container=document.querySelector(".tw-user-inspectors"),this.apiClient=new eD(this.container.dataset.baseUrl),this.setScroller(window)}}s(e$,"instance",null);class eD{get(e){return fetch(this.baseUrl+"/users/"+e+"?detail=true",{method:"GET",credentials:"include",headers:{"Content-Type":"application/json"}}).then(e=>e.ok?e.json():Promise.reject())}constructor(e){s(this,"baseUrl",void 0),this.baseUrl=e}}window.addEventListener("DOMContentLoaded",()=>{window.show_follow_option=e=>{eN.showWindow(e)},eI.getInstance().bindLinks()}),i(6283);class eM{static getInstance(){return null===eM.instance&&(eM.instance=new eM),eM.instance}alert(e){return new Promise(t=>{let i=this.counter++,n="string"==typeof e?{message:e}:e;this.dialogs.push({id:i,type:"alert",title:n.title,message:n.message,unsafeHtml:n.unsafeHtml,buttons:n.button?{primary:n.button}:void 0,onHide:()=>{this.remove(i),t()},backdrop:n.backdrop}),this.render()})}confirm(e){return new Promise(t=>{let i=this.counter++,n="string"==typeof e?{message:e}:e;this.dialogs.push({id:i,type:"confirm",title:n.title,message:n.message,buttons:n.buttons,unsafeHtml:n.unsafeHtml,onHide:e=>{this.remove(i),t(e)},backdrop:n.backdrop}),this.render()})}remove(e){this.dialogs=this.dialogs.filter(t=>t.id!==e),this.render()}render(){return o(function*(){this.renderer.render(this.dialogs)}).call(this)}constructor(){s(this,"renderer",new e_),s(this,"counter",0),s(this,"dialogs",[])}}s(eM,"instance",null);class e_{render(e){return o(function*(){if(this.initialized||(this.i18n=yield eA(["common"]),this.initialized=!0,this.wrapper=this.createDialogsWrapper(),document.body.appendChild(this.wrapper)),0===e.length){var t;document.body.style.cssText="",null==(t=this.lastFocusElement)||t.focu
1s(),this.previousDialogCount=e.length;return}document.body.style.cssText="overflow:hidden",0===this.previousDialogCount&&1===e.length&&(this.lastFocusElement=document.activeElement);let i=e[0];if(i.id!==this.processed){let e=this.createDialog(i);this.wrapper.appendChild(e);let t=new c(e,{backdrop:"close"===i.backdrop?void 0:"static",backdropClassName:"tw-dialogs-backdrop",restoreFocus:!1});t.show(),t.addEventListener("hide",()=>{var t;let n="true"===e.getAttribute("data-result");null==(t=i.onHide)||t.call(i,n)}),this.processed=i.id}this.previousDialogCount=e.length}).call(this)}createDialog(e){var t,i,n,r,o,s,a,l,u,c,d,h,p,f,g,m;let y=`tw-dialog-${e.id}`,b=this.modalHtmlBuilder.createWrapper(e.title||"",y,"dialog");if(e.title){let t=this.modalHtmlBuilder.createTitle(e.title,y,!1);b.appendChild(t)}let v=this.modalHtmlBuilder.createBody(y,e.unsafeHtml||e.message||"",!!e.unsafeHtml),w=[],S=()=>{b.dataset.result="true"};if("alert"===e.type){let s=(null==(i=e.buttons)||null==(t=i.primary)?void 0:t.label)||(null==(n=this.i18n)?void 0:n.t("common.CONFIRM_OK"))||"OK",a=null==(o=e.buttons)||null==(r=o.primary)?void 0:r.className;w.push({label:s,type:"primary",className:a,onClick:S})}else{let t=(null==(a=e.buttons)||null==(s=a.primary)?void 0:s.label)||(null==(l=this.i18n)?void 0:l.t("common.CONFIRM_OK"))||"OK",i=(null==(c=e.buttons)||null==(u=c.secondary)?void 0:u.label)||(null==(d=this.i18n)?void 0:d.t("common.CANCEL"))||"Cancel",n=null==(p=e.buttons)||null==(h=p.primary)?void 0:h.className,r=null==(g=e.buttons)||null==(f=g.secondary)?void 0:f.className;(null==(m=e.buttons)?void 0:m.order)==="reversed"?(w.push({label:t,type:"primary",className:n,onClick:S}),w.push({label:i,type:"borderless",className:r})):(w.push({label:i,type:"borderless",className:r}),w.push({label:t,type:"primary",className:n,onClick:S}))}let k=this.modalHtmlBuilder.createDialogFooter(w);return null==b||b.appendChild(v),null==b||b.appendChild(k),b}createDialogsWrapper(){let e=document.createElement("div");return e.innerHTML='<div class="tw-dialogs"></div>',e.firstElementChild}constructor(){s(this,"wrapper",null),s(this,"initialized",!1),s(this,"i18n",void 0),s(this,"processed",-1),s(this,"lastFocusElement",null),s(this,"previousDialogCount",0),s(this,"modalHtmlBuilder",new E)}}new function(){var e={},t=[];function i(e,t,i,n,r,o){e.dataset.loading=!0;let s=new FormData;s.append("cs_session_id",o),s.append("m",+!!i),s.append("u",t),fetch("/userajax.php?c=backuser",{method:"POST",body:s,credentials:"same-origin"}).then(e=>{if(e.ok)return e.json().then(e=>{e&&n&&setTimeout(function(){location.reload()},1e3)})})}function n(t,i){e[t].forEach(function(e){e.dataset.status=i})}function r(){var i=Object.keys(e).map(function(t){return e[t][0].dataset.status}).every(function(e){return"supporting"===e});t.forEach(function(e){e.dataset.supportingAll=i?"true":"false"})}window.addEventListener("DOMContentLoaded",function(){var s=document.querySelectorAll(".tw-support-button"),a=document.querySelectorAll(".tw-support-all-button");s.forEach(function(s){var a="1"===s.dataset.toReload,l=s.dataset.targetUserId,u=s.dataset.dropoutText,c=s.dataset.csrfToken;e[l]?e[l].push(s):e[l]=[s],s.addEventListener("click",function(e){return o(function*(){e.preventDefault();var o=s.dataset.status;"supporting"===o?((yield eM.getInstance().confirm(u))&&(i(s,l,!1,a,u,c),n(l,"not supporting")),e.preventDefault()):"not supporting"===o&&(i(s,l,!0,a,u,c),n(l,"supporting"),e.preventDefault()),t.length>0&&r()})()})}),a.forEach(function(e){var o=e.dataset.dropoutText,a=e.dataset.csrfToken;t.push(e),e.addEventListener("click",function(){var t="false"===e.dataset.supportingAll,l=t?"supporting":"not supporting";s.forEach(function(e){var r=e.dataset.targetUserId;i(e,r,t,!1,o,a),n(r,l)}),r()})})})};class eF{update(e){document.querySelectorAll(".tw-membership-button").forEach(t=>{t.dataset.join=e.toString()})}static bind(){document.querySelectorAll(".tw-membership-button").forEach(e=>{e.querySelectorAll("a").forEach(e=>{e.addEventListener("click",function(t){t.preventDefault(),window.TwScripts.Main.WindowOpener.open(e.href,"membership_window",540,800)})})})}}window.addEventListener("DOMContentLoaded",()=>{eF.bind(),window.onMembershipRegistered||(window.onMembershipRegistered=()=>{new eF().update(!0)})});var eH=function(){var e=[];this.add=function(t){null!==t&&(e.push(t),t.addShowCallback(function(){e.forEach(function(e){e!==t&&e.close()})}))}},eU=function(){this.create=function(e,t,i){var n,r="string"==typeof e?document.querySelector(e):e,o="str
1ing"==typeof t?document.querySelector(t):t;return r&&o?(r&&o&&((null==i?void 0:i.trigger)==="click"||(null==i?void 0:i.trigger)==="right-click")&&(null==(n=r.contains)?void 0:n.call(r,o))&&console.error("Popup must not be child of invoker",r,o,i),new eq(r,o,i)):null}},eq=function(e,t,i){var n,r=this,o=!0,s=(null==i?void 0:i.onPopupShow)?[i.onPopupShow]:[],l=!1;e.setAttribute("aria-haspopup","true");let u=null!=(n=null==i?void 0:i.trigger)?n:"click",c=Array.isArray(u)?u:[u];function d(){r.open()}function h(i){e.contains(i.relatedTarget)||t.contains(i.relatedTarget)||null===i.relatedTarget&&t.contains(i.target)||r.close()}function p(i){a.isInSafeArea(i.clientX,i.clientY,e.getBoundingClientRect(),t.getBoundingClientRect())||(window.removeEventListener("mousemove",p),r.close())}function f(e){e.preventDefault(),l=!l,y()}function g(e){e.preventDefault()}function m(){r.open(),window.addEventListener("mousemove",p)}function y(){var n,a=!l;t.setAttribute("aria-hidden",a),!0===o&&!1===a?(s.length>0&&s.forEach(function(e){e()}),e.setAttribute("aria-expanded",!0),window.setTimeout(function(){window.addEventListener("click",function(i){t.contains(i.target)||e.contains(i.target)||r.close()})},10)):((null==i?void 0:i.onPopupClose)&&(null==i||null==(n=i.onPopupClose)||n.call(i)),e.setAttribute("aria-expanded",!1)),o=a}c.forEach(i=>{switch(i){case"click":case"right-click":e.addEventListener("click"===i?"click":"contextmenu",f),e.querySelectorAll("a").forEach(function(e){e.addEventListener("click",g)});break;case"hover":e.addEventListener("mouseenter",m),e.addEventListener("focusin",d),e.addEventListener("focusout",h),t.addEventListener("focusout",h)}}),this.open=function(){l=!0,y()},this.close=function(){l=!1,y()},this.addShowCallback=function(e){s.push(e)},this.dispose=function(){c.forEach(i=>{switch(i){case"click":case"right-click":e.removeEventListener("click"===i?"click":"contextmenu",f),e.querySelectorAll("a").forEach(function(e){e.removeEventListener("click",g)});break;case"hover":e.removeEventListener("mouseenter",m),e.removeEventListener("focusin",d),e.removeEventListener("focusout",h),t.removeEventListener("focusout",h)}})}};window.PopupManager=eH,window.PopupFactory=eU,window.Popup=eq,new function(){this.load=()=>{window.addEventListener("DOMContentLoaded",()=>{document.querySelectorAll(".tw-popup-menu-invoker").forEach(e=>{var t=document.getElementById(e.getAttribute("aria-controls"));new eU().create(e,t,{trigger:"click"})})})}}().load();class eB{static formatHoursMinutes(e){let t=Math.max(0,Math.floor(e)),i=Math.floor(t/3600),n=t-3600*i,r=Math.floor(n/60),o=i>0?`${i}:`:"",s=`${r.toString().padStart(2,"0")}:${(n%60).toString().padStart(2,"0")}`;return`${o}${s}`}static formatRelativeTime(e,t="ja",i){let n=new Intl.RelativeTimeFormat(t,{numeric:"always"}),r=i||new Date,o=Math.round((e.getTime()-r.getTime())/1e3),s="second";for(let e of[{amount:60,unit:"second"},{amount:60,unit:"minute"},{amount:24,unit:"hour"},{amount:7,unit:"day"},{amount:4.34524,unit:"week"},{amount:12,unit:"month"},{amount:1/0,unit:"year"}]){if(Math.abs(o)<e.amount){s=e.unit;break}o/=e.amount}return n.format(Math.trunc(o),s)}}let eV={Absolute:"absolute",Relative:"relative",Calendar:"calendar"};class eK{convertAll(){Array.prototype.slice.call(document.querySelectorAll("time[data-kind]")).forEach(e=>{this.convert(e)})}convert(e){let t=this.parseAttribute(e);if(t.kind===eV.Absolute&&(e.innerText=new ez().convert(t.date,t.locale,t.options)),t.kind===eV.Relative&&(e.innerText=new eJ().convert(t.date,t.locale,t.options)),t.kind===eV.Relative||t.kind===eV.Calendar){let i=new ez().convert(t.date,t.locale,t.options);t.options.toggle&&this.bindTooltip(e,i)}}bindTooltip(e,t){e.textContent&&e.textContent.trim()!==t&&(e.setAttribute("aria-label",t),e.tabIndex=0)}parseAttribute(e){var t,i,n;let r,o=null!=(t=e.getAttribute("datetime"))?t:"";return e.dataset.duration&&(r="false"!==e.dataset.duration&&parseInt(e.dataset.duration)),{kind:null!=(i=e.dataset.kind)?i:eV.Absolute,date:new Date(Date.parse(o)),locale:null!=(n=e.dataset.locale)?n:"ja",options:{short:"true"===e.dataset.short,toggle:"true"===e.dataset.toggle,duration:r}}}}class ez{convert(e,t,i){let n="";try{let r=e.toLocaleDateString(null!=t?t:[],i&&i.short?ez.ShortDateFormat:ez.LongDateFormat),o=e.toLocaleTimeString(null!=t?t:[],ez.TimeFormat);n=r+" "+o}catch(t){n=e.toString()}return n}}s(ez,"LongDateFormat",{year:"numeric",month:"2-digit",day:"2-digit"}),s(ez,"ShortDateFormat",{month:"2-digit",day:"2-digit"}),s(ez,"TimeFormat",{hour:"2-digit",hour12:!1,minute:"2-digit"});class eJ{convert(e,t,i,n){return this.isRelativeTarget(e,null==i?void 0:i.duration,n)?eB.formatRelativeTime(e,t,n):new ez().convert(e,t,i)}isRelativeTarget(e,t,i){return!1===t||Math.trunc(((i||new Date).getTime()-e.getTime())/864e5)<(t||eJ.TARGET_DURATION)}}s(eJ,"TARGET_DURATION",7),window.addEventListener("DOMContentLoaded",function(){new eK().convertAll()});let eW={short:3e3,long:6e3}
1,eX=window.visualViewport;class eG{static getInstance(){return null===eG.instance&&(eG.instance=new eG),eG.instance}showSnackbar(e,t="success"){if(""===e)return;let i=l({},{status:"success",duration:"short"},"string"==typeof t?{status:t}:t),n=this._createMessage(e,i.status,i.button),r=this.hideTimeout||this.showTimeout;clearTimeout(this.hideTimeout),clearTimeout(this.showTimeout),this.hideTimeout=0,this.showTimeout=0;let o=()=>{this._renderMessage(n),this.changeVisibility(!0),this.hideTimeout=setTimeout(()=>this.hideSnackbar(),eW[i.duration])};r?(this.changeVisibility(!1),this.showTimeout=setTimeout(()=>{this.showTimeout=0,o()},500)):o()}hideSnackbar(){clearTimeout(this.showTimeout),clearTimeout(this.hideTimeout),this.showTimeout=0,this.hideTimeout=0,this.changeVisibility(!1)}changeVisibility(e){eX&&(eX.removeEventListener("resize",this.handleViewportChange),e&&(eX.addEventListener("resize",this.handleViewportChange),this.handleViewportChange())),this.snackbar.setAttribute("data-is-shown",String(e))}_renderMessage(e){this.snackbar.textContent="";let t=document.createElement("span");if(t.className="tw-snackbar_message",t.innerText=e.message,this.snackbar.appendChild(t),e.button){let t=document.createElement("button");t.type="button",t.className="tw-snackbar_button",t.innerText=e.button.label,t.addEventListener("click",()=>e.button.callback()),this.snackbar.appendChild(t)}this.snackbar.setAttribute("data-status",e.status)}_createMessage(e,t,i){return new eY(e,t,i)}constructor(){s(this,"handleViewportChange",()=>{if(eX&&this.snackbar){let e=window.innerHeight-(eX.offsetTop+eX.height)+50;this.snackbar.style.bottom=`${e}px`}}),this.hideTimeout=0,this.showTimeout=0;let e=document.querySelector("body");if(!e)return;this.snackbar=document.createElement("div"),this.snackbar.className="tw-snackbar",this.snackbar.setAttribute("aria-live","assertive"),this.snackbar.setAttribute("aria-atomic","true"),e.appendChild(this.snackbar)}}s(eG,"instance",null);class eY{constructor(e,t,i){this.message=e,this.status=t,this.button=i}}class eQ{init(){window.addEventListener("DOMContentLoaded",()=>{this.element=document.querySelector(".tw-user-header"),this.element&&"true"===this.element.dataset.liveCheck&&(this.pollingTimer=new eZ(this.element.dataset.userId,3e4,e=>{this.updateLiveTab(e)}),this.pollingTimer.start()),document.querySelector(".tw-user-banner")&&(this.resizeBanner(),window.addEventListener("resize",()=>{this.resizeBanner()})),new eU().create(".tw-user-nav-config-button",".tw-user-nav-config-locator",{trigger:"click"})})}updateLiveTab(e){if(e){if("live"===e.type)this.element.dataset.live=!0;else if("live_approaching"===e.type){let t=1e3*e.time;if(t-Date.now()<864e5){this.element.dataset.liveApproaching=!0;let e=this.element.querySelector(".tw-user-nav-list-item"),i=this.element.querySelector(".tw-user-nav2-icon"),n=e||i;n&&(n.dataset.liveApproachingLabel=new eJ().convert(new Date(t),n.dataset.lang,{duration:!1}))}this.pollingTimer.changeInterval(3e5)}}else this.element.dataset.live=!1,this.element.dataset.liveApproaching=!1}resizeBanner(){let e=document.querySelector(".tw-user-banner-image");if(e){let t=document.querySelector(".tw-user-banner-message"),i=document.querySelector(".tw-user-banner-message-inner"),n=e.getBoundingClientRect().width/960;i.style.transform=`scale(${n})`,i.style.transformOrigin="0 0",i.style.width=`${100/n}%`,t.style.display="block"}}}class eZ{start(){this.timer=this._createTimer(this.interval),this.checkIsLive(this.userId)}changeInterval(e){clearInterval(this.timer),this.timer=this._createTimer(e)}_createTimer(e){return setInterval(()=>{this.checkIsLive(this.userId)},e)}checkIsLive(e){fetch("/userajax.php?c=islive&u="+e,{credentials:"same-origin"}).then(e=>{if(e.ok)return e.json().then(e=>{this.callback(e)})})}constructor(e,t,i){this.userId=e,this.interval=t,this.callback=i}}new eQ().init();let e0=new class{start(e,t){let i=document.querySelector(e);i.textContent=this.getTimeString(t);let n=new Date,r=setInterval(()=>{var e=t-(parseInt(new Date/1e3,10)-parseInt(n/1e3,10));e<0&&(e=0),i.textContent=this.getTimeString(e)},1e3);return()=>{clearInterval(r)}}zeropad(e,t){let i=""+e;for(;i.length<t;)i="0"+i;return i}getTimeString(e){var t="";return e>3600&&(t=""+parseInt(e/3600)+":",e-=3600*parseInt(e/3600)),t+=this.zeropad(parseInt(e/60),2)+":"+this.zeropad(e%60,2)}};class e1{static open(e,t,i,n,r=""){let o=(window.innerHeight-n)/2+window.screenTop,s=(window.innerWidth-i)/2+window.screenLeft,a=r+`top=${o},left=${s},width=${i},height=${n}`;return window.open(e,t,a)}}class e2{setTargetVisible(e,t,i){i?(e.setAttribute("aria-expanded","true"),t.setAttribute("aria-hidden","false"),t.style.display=""):(e.setAttribute("aria-expanded","fal
1se"),t.setAttribute("aria-hidden","true"),t.style.display="none")}static bind(){document.querySelectorAll(".tw-expand-invoker").forEach(function(e){new e2(e)})}constructor(e){if(s(this,"invoker",void 0),this.invoker=e,e.dataset.expandSelector){let t=document.querySelectorAll(e.dataset.expandSelector);t.forEach(t=>{this.setTargetVisible(e,t,"true"!==t.getAttribute("aria-hidden"))}),e.addEventListener("click",i=>{i.preventDefault(),t.forEach(t=>{this.setTargetVisible(e,t,"true"===t.getAttribute("aria-hidden"))})})}}}window.addEventListener("DOMContentLoaded",function(){e2.bind()}),window.pointCharge=function(e){let t=e1.open(`/${e}/pointcharge`,`pointcharge:${Date.now()}`,600,780);t&&t.focus()},window.paidItemPurchase=function(e){let t=e1.open(`userpointselect.php?item=${e}`,`chargewindow:${Date.now()}`,600,780);t&&t.focus()},i(307),new class{setup(){window.TwitCastingLiveLoginEventReceived=e=>{eP("TwitCastingLiveLoginEventReceived","","",.1),e&&location.reload()}}}().setup(),o(function*(){yield eA(["common"])})(),function(e,t,n){let r=e.split(".").map(e=>e.trim()).filter(e=>e.length>0);if(0===r.length)throw Error();let o=function(){if("undefined"!=typeof self)return self;if("undefined"!=typeof window)return window;if(void 0!==i.g)return i.g;throw Error("unable to locate global object")}();r.reduce((e,i,n)=>n===r.length-1?(e[i]=t,t):(i in e||(e[i]={}),e[i]),o)}
1("TwScripts.Main",{Cookie:n,UserInspector:eN,MembershipButton:eF,PopupManager:eH,PopupFactory:eU,Popup:eq,LocalTimeConverter:eK,TabSwitcher:class{select(e){var t,i;e&&(this.selectedIndex=this.tabs.indexOf(e),this.tabs.forEach(t=>{let i=t===e;t.setAttribute("aria-selected",String(i));let n=this.getTabContent(t);n&&n.setAttribute("data-active",String(i))}),null==(t=(i=this.options).onTabChange)||t.call(i,e,this.selectedIndex))}selectIndex(e){this.selectedIndex!==e&&this.select(this.tabs[e])}getTabContent(e){var t;let i=e.dataset.targetContent;return i&&null!=(t=document.querySelector(i))?t:null}constructor(e,t={}){s(this,"options",void 0),s(this,"tabs",void 0),s(this,"selectedIndex",void 0),this.options=t,this.selectedIndex=0,this.tabs=Array.prototype.slice.call(document.querySelectorAll(e)),this.tabs.forEach(e=>{var i;null==(i=this.getTabContent(e))||i.classList.add("tw-tab-content"),t.selectedId?e.id===t.selectedId&&this.select(e):"true"===e.getAttribute("aria-selected")&&this.select(e),e.addEventListener("click",t=>{t.preventDefault(),this.select(e)})})}},SnackbarManager:eG,UserNavigation:eQ,CountDownTimer:e0,Dialog:eM,Modal:c,WebViewCloser:class{close(){"undefined"!=typeof infodialog?infodialog.close():location.href="about:close";try{window.close()}catch(e){}}},WindowOpener:e1,Expander:e2})})()})();
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.