|
|
(function(n,t){typeof exports=="object"&&typeof module!="undefined"?module.exports=t():typeof define=="function"&&define.amd?define(t):n.i18next=t()})(this,function(){"use strict";function p(n){return n==null?"":""+n}function et(n,t,i){n.forEach(function(n){t[n]&&(i[n]=t[n])})}function l(n,t,i){function f(n){return n&&n.indexOf("###")>-1?n.replace(/###/g,"."):n}for(var u=typeof t!="string"?[].concat(t):t.split("."),r;u.length>1;){if(!n)return{};r=f(u.shift());!n[r]&&i&&(n[r]=new i);n=n[r]}return n?{obj:n,k:f(u.shift())}:{}}function w(n,t,i){var r=l(n,t,Object),u=r.obj,f=r.k;u[f]=i}function ot(n,t,i,r){var e=l(n,t,Object),u=e.obj,f=e.k;u[f]=u[f]||[];r&&(u[f]=u[f].concat(i));r||u[f].push(i)}function u(n,t){var i=l(n,t),r=i.obj,u=i.k;return r?r[u]:undefined}function b(n,t,i){for(var r in t)r in n?typeof n[r]=="string"||n[r]instanceof String||typeof t[r]=="string"||t[r]instanceof String?i&&(n[r]=t[r]):b(n[r],t[r],i):n[r]=t[r];return n}function r(n){return n.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")}function k(n){return typeof n=="string"?n.replace(/[&<>"'\/]/g,function(n){return st[n]}):n}function a(n){return n.interpolation={unescapeSuffix:"HTML"},n.interpolation.prefix=n.interpolationPrefix||"__",n.interpolation.suffix=n.interpolationSuffix||"__",n.interpolation.escapeValue=n.escapeInterpolation||!1,n.interpolation.nestingPrefix=n.reusePrefix||"$t(",n.interpolation.nestingSuffix=n.reuseSuffix||")",n}function ct(n){return n.resStore&&(n.resources=n.resStore),n.ns&&n.ns.defaultNs?(n.defaultNS=n.ns.defaultNs,n.ns=n.ns.namespaces):n.defaultNS=n.ns||"translation",n.fallbackToDefaultNS&&n.defaultNS&&(n.fallbackNS=n.defaultNS),n.saveMissing=n.sendMissing,n.saveMissingTo=n.sendMissingTo||"current",n.returnNull=n.fallbackOnNull?!1:!0,n.returnEmptyString=n.fallbackOnEmpty?!1:!0,n.returnObjects=n.returnObjectTrees,n.joinArrays="\n",n.returnedObjectHandler=n.objectTreeKeyHandler,n.parseMissingKeyHandler=n.parseMissingKey,n.appendNamespaceToMissingKey=!0,n.nsSeparator=n.nsseparator,n.keySeparator=n.keyseparator,n.shortcutFunction==="sprintf"&&(n.overloadTranslationOptionHandler=function(n){for(var i=[],t=1;t<n.length;t++)i.push(n[t]);return{postProcess:"sprintf",sprintf:i}}),n.whitelist=n.lngWhitelist,n.preload=n.preload,n.load==="current"&&(n.load="currentOnly"),n.load==="unspecific"&&(n.load="languageOnly"),n.backend=n.backend||{},n.backend.loadPath=n.resGetPath||"locales/__lng__/__ns__.json",n.backend.addPath=n.resPostPath||"locales/add/__lng__/__ns__",n.backend.allowMultiLoading=n.dynamicLoad,n.cache=n.cache||{},n.cache.prefix="res_",n.cache.expirationTime=6048e5,n.cache.enabled=n.useLocalStorage?!0:!1,n=a(n),n.defaultVariables&&(n.interpolation.defaultVariables=n.defaultVariables),n}function lt(n){return n=a(n),n.joinArrays="\n",n}function g(n){return(n.interpolationPrefix||n.interpolationSuffix||n.escapeInterpolation)&&(n=a(n)),n.nsSeparator=n.nsseparator,n.keySeparator=n.keyseparator,n.returnObjects=n.returnObjectTrees,n}function at(n){n.lng=function(){return t.deprecate("i18next.lng() can be replaced by i18next.language for detected language or i18next.languages for languages ordered by translation lookup."),n.services.languageUtils.toResolveHierarchy(n.language)[0]};n.preload=function(i,r){t.deprecate("i18next.preload() can be replaced with i18next.loadLanguages()");n.loadLanguages(i,r)};n.setLng=function(i,r,u){if(t.deprecate("i18next.setLng() can be replaced with i18next.changeLanguage() or i18next.getFixedT() to get a translation function with fixed language or namespace."),typeof r=="function"&&(u=r,r={}),r||(r={}),r.fixLng===!0&&u)return u(null,n.getFixedT(i));n.changeLanguage(i,u)};n.addPostProcessor=function(i,r){t.deprecate("i18next.addPostProcessor() can be replaced by i18next.use({ type: 'postProcessor', name: 'name', process: fc })");n.use({type:"postProcessor",name:i,process:r})}}function v(n){return n.charAt(0).toUpperCase()+n.slice(1)}function wt(){var n={};return yt.forEach(function(t){t.lngs.forEach(function(i){return n[i]={numbers:t.nr,plurals:pt[t.fc]}})}),n}function dt(n,t){for(var i=n.indexOf(t
|