import{c as e}from"./preact.module-CNakwbc9.js";import{p as t}from"./compat.module-C8KToj4y.js";var n=(e,t,n,r)=>{let i=[n,{code:t,...r||{}}];if(e?.services?.logger?.forward)return e.services.logger.forward(i,`warn`,`react-i18next::`,!0);l(i[0])&&(i[0]=`react-i18next:: ${i[0]}`),e?.services?.logger?.warn?e.services.logger.warn(...i):console?.warn&&console.warn(...i)},r={},i=(e,t,i,a)=>{l(i)&&r[i]||(l(i)&&(r[i]=new Date),n(e,t,i,a))},a=(e,t)=>()=>{if(e.isInitialized)t();else{let n=()=>{setTimeout(()=>{e.off(`initialized`,n)},0),t()};e.on(`initialized`,n)}},o=(e,t,n)=>{e.loadNamespaces(t,a(e,n))},s=(e,t,n,r)=>{if(l(n)&&(n=[n]),e.options.preload&&e.options.preload.indexOf(t)>-1)return o(e,n,r);n.forEach(t=>{e.options.ns.indexOf(t)<0&&e.options.ns.push(t)}),e.loadLanguages(t,a(e,r))},c=(e,t,n={})=>!t.languages||!t.languages.length?(i(t,`NO_LANGUAGES`,`i18n.languages were undefined or empty`,{languages:t.languages}),!0):t.hasLoadedNamespace(e,{lng:n.lng,precheck:(t,r)=>{if(n.bindI18n&&n.bindI18n.indexOf(`languageChanging`)>-1&&t.services.backendConnector.backend&&t.isLanguageChangingTo&&!r(t.isLanguageChangingTo,e))return!1}}),l=e=>typeof e==`string`,u=e=>typeof e==`object`&&!!e;t();var d=e(),f=class{constructor(){this.usedNamespaces={}}addUsedNamespaces(e){e.forEach(e=>{this.usedNamespaces[e]||(this.usedNamespaces[e]=!0)})}getUsedNamespaces(){return Object.keys(this.usedNamespaces)}};export{l as a,n as c,u as i,i as l,f as n,s as o,c as r,o as s,d as t};