Socket
Socket
Sign inDemoInstall

react-i18next

Package Overview
Dependencies
8
Maintainers
2
Versions
309
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 11.18.1 to 11.18.2

4

CHANGELOG.md

@@ -0,1 +1,5 @@

### 11.18.2
- more html entities to unescape by default [1538](https://github.com/i18next/react-i18next/pull/1538)
### 11.18.1

@@ -2,0 +6,0 @@

@@ -317,3 +317,3 @@ define(['exports', 'react'], function (exports, react) { 'use strict';

var matchHtmlEntity = /&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34);/g;
var matchHtmlEntity = /&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230);/g;
var htmlEntities = {

@@ -329,3 +329,11 @@ '&': '&',

'"': '"',
'"': '"'
'"': '"',
' ': ' ',
' ': ' ',
'©': '©',
'©': '©',
'®': '®',
'®': '®',
'…': '…',
'…': '…'
};

@@ -332,0 +340,0 @@

2

dist/amd/react-i18next.min.js

@@ -1,1 +0,1 @@

define(["exports","react"],(function(e,n){"use strict";function t(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function r(e){for(var n=1;n<arguments.length;n++){var r=null!=arguments[n]?arguments[n]:{};n%2?t(Object(r),!0).forEach((function(n){o(e,n,r[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):t(Object(r)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))}))}return e}function a(e){return(a="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 i(e,n){for(var t=0;t<n.length;t++){var r=n[t];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function o(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function c(e,n){if(null==e)return{};var t,r,a=function(e,n){if(null==e)return{};var t,r,a={},i=Object.keys(e);for(r=0;r<i.length;r++)t=i[r],n.indexOf(t)>=0||(a[t]=e[t]);return a}(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)t=i[r],n.indexOf(t)>=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(a[t]=e[t])}return a}function s(e,n){return function(e){if(Array.isArray(e))return e}(e)||function(e,n){var t=e&&("undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"]);if(null==t)return;var r,a,i=[],o=!0,c=!1;try{for(t=t.call(e);!(o=(r=t.next()).done)&&(i.push(r.value),!n||i.length!==n);o=!0);}catch(e){c=!0,a=e}finally{try{o||null==t.return||t.return()}finally{if(c)throw a}}return i}(e,n)||function(e,n){if(!e)return;if("string"==typeof e)return u(e,n);var t=Object.prototype.toString.call(e).slice(8,-1);"Object"===t&&e.constructor&&(t=e.constructor.name);if("Map"===t||"Set"===t)return Array.from(e);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return u(e,n)}(e,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function u(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=new Array(n);t<n;t++)r[t]=e[t];return r}var l={area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0},f=/\s([^'"/\s><]+?)[\s/>]|([^\s=]+)=\s?(".*?"|'.*?')/g;function p(e){var n={type:"tag",name:"",voidElement:!1,attrs:{},children:[]},t=e.match(/<\/?([^\s]+?)[/\s>]/);if(t&&(n.name=t[1],(l[t[1]]||"/"===e.charAt(e.length-2))&&(n.voidElement=!0),n.name.startsWith("!--"))){var r=e.indexOf("--\x3e");return{type:"comment",comment:-1!==r?e.slice(4,r):""}}for(var a=new RegExp(f),i=null;null!==(i=a.exec(e));)if(i[0].trim())if(i[1]){var o=i[1].trim(),c=[o,""];o.indexOf("=")>-1&&(c=o.split("=")),n.attrs[c[0]]=c[1],a.lastIndex--}else i[2]&&(n.attrs[i[2]]=i[3].trim().substring(1,i[3].length-1));return n}var d=/<[a-zA-Z0-9\-\!\/](?:"[^"]*"|'[^']*'|[^'">])*>/g,g=/^\s*$/,m=Object.create(null);var h,v=function(e,n){n||(n={}),n.components||(n.components=m);var t,r=[],a=[],i=-1,o=!1;if(0!==e.indexOf("<")){var c=e.indexOf("<");r.push({type:"text",content:-1===c?e:e.substring(0,c)})}return e.replace(d,(function(c,s){if(o){if(c!=="</"+t.name+">")return;o=!1}var u,l="/"!==c.charAt(1),f=c.startsWith("\x3c!--"),d=s+c.length,m=e.charAt(d);if(f){var h=p(c);return i<0?(r.push(h),r):((u=a[i]).children.push(h),r)}if(l&&(i++,"tag"===(t=p(c)).type&&n.components[t.name]&&(t.type="component",o=!0),t.voidElement||o||!m||"<"===m||t.children.push({type:"text",content:e.slice(d,e.indexOf("<",d))}),0===i&&r.push(t),(u=a[i-1])&&u.children.push(t),a[i]=t),(!l||t.voidElement)&&(i>-1&&(t.voidElement||t.name===c.slice(2,-1))&&(i--,t=-1===i?r:a[i]),!o&&"<"!==m&&m)){u=-1===i?r:a[i].children;var v=e.indexOf("<",d),y=e.slice(d,-1===v?void 0:v);g.test(y)&&(y=" "),(v>-1&&i+u.length>=0||" "!==y)&&u.push({type:"text",content:y})}})),r},y=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34);/g,b={"&amp;":"&","&#38;":"&","&lt;":"<","&#60;":"<","&gt;":">","&#62;":">","&apos;":"'","&#39;":"'","&quot;":'"',"&#34;":'"'},O=function(e){return b[e]},x={bindI18n:"languageChanged",bindI18nStore:"",transEmptyNodeValue:"",transSupportBasicHtmlNodes:!0,transWrapTextNodes:"",transKeepBasicHtmlNodesFor:["br","strong","i","p"],useSuspense:!0,unescape:function(e){return e.replace(y,O)}},w=n.createContext();function E(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};x=r(r({},x),e)}function S(){return x}var j=function(){function e(){!function(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}(this,e),this.usedNamespaces={}}var n,t,r;return n=e,(t=[{key:"addUsedNamespaces",value:function(e){var n=this;e.forEach((function(e){n.usedNamespaces[e]||(n.usedNamespaces[e]=!0)}))}},{key:"getUsedNamespaces",value:function(){return Object.keys(this.usedNamespaces)}}])&&i(n.prototype,t),r&&i(n,r),e}();function N(e){h=e}function k(){return h}var I={type:"3rdParty",init:function(e){E(e.options.react),N(e)}};function P(e){return function(n){return new Promise((function(t){var a=C();e.getInitialProps?e.getInitialProps(n).then((function(e){t(r(r({},e),a))})):t(a)}))}}function C(){var e=k(),n=e.reportNamespaces?e.reportNamespaces.getUsedNamespaces():[],t={},r={};return e.languages.forEach((function(t){r[t]={},n.forEach((function(n){r[t][n]=e.getResourceBundle(t,n)||{}}))})),t.initialI18nStore=r,t.initialLanguage=e.language,t}function R(){if(console&&console.warn){for(var e,n=arguments.length,t=new Array(n),r=0;r<n;r++)t[r]=arguments[r];"string"==typeof t[0]&&(t[0]="react-i18next:: ".concat(t[0])),(e=console).warn.apply(e,t)}}var T={};function A(){for(var e=arguments.length,n=new Array(e),t=0;t<e;t++)n[t]=arguments[t];"string"==typeof n[0]&&T[n[0]]||("string"==typeof n[0]&&(T[n[0]]=new Date),R.apply(void 0,n))}function L(e,n,t){e.loadNamespaces(n,(function(){if(e.isInitialized)t();else{e.on("initialized",(function n(){setTimeout((function(){e.off("initialized",n)}),0),t()}))}}))}function z(e,n){var t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=n.languages[0],a=!!n.options&&n.options.fallbackLng,i=n.languages[n.languages.length-1];if("cimode"===r.toLowerCase())return!0;var o=function(e,t){var r=n.services.backendConnector.state["".concat(e,"|").concat(t)];return-1===r||2===r};return!(t.bindI18n&&t.bindI18n.indexOf("languageChanging")>-1&&n.services.backendConnector.backend&&n.isLanguageChangingTo&&!o(n.isLanguageChangingTo,e))&&(!!n.hasResourceBundle(r,e)||(!(n.services.backendConnector.backend&&(!n.options.resources||n.options.partialBundledLanguages))||!(!o(r,e)||a&&!o(i,e))))}function B(e,n){var t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(!n.languages||!n.languages.length)return A("i18n.languages were undefined or empty",n.languages),!0;var r=void 0!==n.options.ignoreJSONStructure;return r?n.hasLoadedNamespace(e,{precheck:function(n,r){if(t.bindI18n&&t.bindI18n.indexOf("languageChanging")>-1&&n.services.backendConnector.backend&&n.isLanguageChangingTo&&!r(n.isLanguageChangingTo,e))return!1}}):z(e,n,t)}function U(e){return e.displayName||e.name||("string"==typeof e&&e.length>0?e:"Unknown")}var D=["format"],H=["children","count","parent","i18nKey","context","tOptions","values","defaults","components","ns","i18n","t","shouldUnescape"];function K(e,n){if(!e)return!1;var t=e.props?e.props.children:e.children;return n?t.length>0:!!t}function V(e){return e?e&&e.children?e.children:e.props&&e.props.children:[]}function F(e){return Array.isArray(e)?e:[e]}function W(e,t,i,o,c,s){if(""===t)return[];var u=o.transKeepBasicHtmlNodesFor||[],l=t&&new RegExp(u.join("|")).test(t);if(!e&&!l)return[t];var f={};!function e(t){F(t).forEach((function(t){"string"!=typeof t&&(K(t)?e(V(t)):"object"!==a(t)||n.isValidElement(t)||Object.assign(f,t))}))}(e);var p=v("<0>".concat(t,"</0>")),d=r(r({},f),c);function g(e,t,r){var a=V(e),i=h(a,t.children,r);return function(e){return"[object Array]"===Object.prototype.toString.call(e)&&e.every((function(e){return n.isValidElement(e)}))}(a)&&0===i.length?a:i}function m(e,t,a,i,o){e.dummy&&(e.children=t),a.push(n.cloneElement(e,r(r({},e.props),{},{key:i}),o?void 0:t))}function h(t,c,f){var p=F(t);return F(c).reduce((function(t,c,v){var y,b,O,x=c.children&&c.children[0]&&c.children[0].content&&i.services.interpolator.interpolate(c.children[0].content,d,i.language);if("tag"===c.type){var w=p[parseInt(c.name,10)];!w&&1===f.length&&f[0][c.name]&&(w=f[0][c.name]),w||(w={});var E=0!==Object.keys(c.attrs).length?(y={props:c.attrs},(O=r({},b=w)).props=Object.assign(y.props,b.props),O):w,S=n.isValidElement(E),j=S&&K(c,!0)&&!c.voidElement,N=l&&"object"===a(E)&&E.dummy&&!S,k="object"===a(e)&&null!==e&&Object.hasOwnProperty.call(e,c.name);if("string"==typeof E){var I=i.services.interpolator.interpolate(E,d,i.language);t.push(I)}else if(K(E)||j){m(E,g(E,c,f),t,v)}else if(N){var P=h(p,c.children,f);t.push(n.cloneElement(E,r(r({},E.props),{},{key:v}),P))}else if(Number.isNaN(parseFloat(c.name))){if(k)m(E,g(E,c,f),t,v,c.voidElement);else if(o.transSupportBasicHtmlNodes&&u.indexOf(c.name)>-1)if(c.voidElement)t.push(n.createElement(c.name,{key:"".concat(c.name,"-").concat(v)}));else{var C=h(p,c.children,f);t.push(n.createElement(c.name,{key:"".concat(c.name,"-").concat(v)},C))}else if(c.voidElement)t.push("<".concat(c.name," />"));else{var R=h(p,c.children,f);t.push("<".concat(c.name,">").concat(R,"</").concat(c.name,">"))}}else if("object"!==a(E)||S)1===c.children.length&&x?t.push(n.cloneElement(E,r(r({},E.props),{},{key:v}),x)):t.push(n.cloneElement(E,r(r({},E.props),{},{key:v})));else{var T=c.children[0]?x:null;T&&t.push(T)}}else if("text"===c.type){var A=o.transWrapTextNodes,L=s?o.unescape(i.services.interpolator.interpolate(c.content,d,i.language)):i.services.interpolator.interpolate(c.content,d,i.language);A?t.push(n.createElement(A,{key:"".concat(c.name,"-").concat(v)},L)):t.push(L)}return t}),[])}return V(h([{dummy:!0,children:e||[]}],p,F(e||[]))[0])}var M=function(e,t){var r=n.useRef();return n.useEffect((function(){r.current=t?r.current:e}),[e,t]),r.current};function $(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},a=t.i18n,i=n.useContext(w)||{},o=i.i18n,c=i.defaultNS,u=a||o||k();if(u&&!u.reportNamespaces&&(u.reportNamespaces=new j),!u){A("You will need to pass in an i18next instance by using initReactI18next");var l=function(e){return Array.isArray(e)?e[e.length-1]:e},f=[l,{},!1];return f.t=l,f.i18n={},f.ready=!1,f}u.options.react&&void 0!==u.options.react.wait&&A("It seems you are still using the old wait option, you may migrate to the new useSuspense behaviour.");var p=r(r(r({},S()),u.options.react),t),d=p.useSuspense,g=p.keyPrefix,m=e||c||u.options&&u.options.defaultNS;m="string"==typeof m?[m]:m||["translation"],u.reportNamespaces.addUsedNamespaces&&u.reportNamespaces.addUsedNamespaces(m);var h=(u.isInitialized||u.initializedStoreOnce)&&m.every((function(e){return B(e,u,p)}));function v(){return u.getFixedT(null,"fallback"===p.nsMode?m:m[0],g)}var y=n.useState(v),b=s(y,2),O=b[0],x=b[1],E=m.join(),N=M(E),I=n.useRef(!0);n.useEffect((function(){var e=p.bindI18n,n=p.bindI18nStore;function t(){I.current&&x(v)}return I.current=!0,h||d||L(u,m,(function(){I.current&&x(v)})),h&&N&&N!==E&&I.current&&x(v),e&&u&&u.on(e,t),n&&u&&u.store.on(n,t),function(){I.current=!1,e&&u&&e.split(" ").forEach((function(e){return u.off(e,t)})),n&&u&&n.split(" ").forEach((function(e){return u.store.off(e,t)}))}}),[u,E]);var P=n.useRef(!0);n.useEffect((function(){I.current&&!P.current&&x(v),P.current=!1}),[u]);var C=[O,u,h];if(C.t=O,C.i18n=u,C.ready=h,h)return C;if(!h&&!d)return C;throw new Promise((function(e){L(u,m,(function(){e()}))}))}var q=["forwardedRef"];var Y=["ns","children"];function _(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},a=r.i18n,i=n.useContext(w)||{},o=i.i18n,c=a||o||k();c.options&&c.options.isClone||(e&&!c.initializedStoreOnce&&(c.services.resourceStore.data=e,c.options.ns=Object.values(e).reduce((function(e,n){return Object.keys(n).forEach((function(n){e.indexOf(n)<0&&e.push(n)})),e}),c.options.ns),c.initializedStoreOnce=!0,c.isInitialized=!0),t&&!c.initializedLanguageOnce&&(c.changeLanguage(t),c.initializedLanguageOnce=!0))}var J=["initialI18nStore","initialLanguage"];e.I18nContext=w,e.I18nextProvider=function(e){var t=e.i18n,r=e.defaultNS,a=e.children,i=n.useMemo((function(){return{i18n:t,defaultNS:r}}),[t,r]);return n.createElement(w.Provider,{value:i},a)},e.Trans=function(e){var t=e.children,i=e.count,o=e.parent,s=e.i18nKey,u=e.context,l=e.tOptions,f=void 0===l?{}:l,p=e.values,d=e.defaults,g=e.components,m=e.ns,h=e.i18n,v=e.t,y=e.shouldUnescape,b=c(e,H),O=n.useContext(w)||{},x=O.i18n,E=O.defaultNS,j=h||x||k();if(!j)return A("You will need to pass in an i18next instance by using i18nextReactModule"),t;var N=v||j.t.bind(j)||function(e){return e};u&&(f.context=u);var I=r(r({},S()),j.options&&j.options.react),P=m||N.ns||E||j.options&&j.options.defaultNS;P="string"==typeof P?[P]:P||["translation"];var C=d||function e(t,r){if(!t)return"";var i="",o=F(t),s=r.transSupportBasicHtmlNodes&&r.transKeepBasicHtmlNodesFor?r.transKeepBasicHtmlNodesFor:[];return o.forEach((function(t,o){if("string"==typeof t)i+="".concat(t);else if(n.isValidElement(t)){var u=Object.keys(t.props).length,l=s.indexOf(t.type)>-1,f=t.props.children;if(!f&&l&&0===u)i+="<".concat(t.type,"/>");else if(f||l&&0===u)if(t.props.i18nIsDynamicList)i+="<".concat(o,"></").concat(o,">");else if(l&&1===u&&"string"==typeof f)i+="<".concat(t.type,">").concat(f,"</").concat(t.type,">");else{var p=e(f,r);i+="<".concat(o,">").concat(p,"</").concat(o,">")}else i+="<".concat(o,"></").concat(o,">")}else if(null===t)R("Trans: the passed in value is invalid - seems you passed in a null child.");else if("object"===a(t)){var d=t.format,g=c(t,D),m=Object.keys(g);if(1===m.length){var h=d?"".concat(m[0],", ").concat(d):m[0];i+="{{".concat(h,"}}")}else R("react-i18next: the passed in object contained more than one variable - the object should look like {{ value, format }} where format is optional.",t)}else R("Trans: the passed in value is invalid - seems you passed in a variable like {number} - please pass in variables for interpolation as full objects like {{number}}.",t)})),i}(t,I)||I.transEmptyNodeValue||s,T=I.hashTransKey,L=s||(T?T(C):C),z=p?f.interpolation:{interpolation:r(r({},f.interpolation),{},{prefix:"#$?",suffix:"?$#"})},B=r(r(r(r({},f),{},{count:i},p),z),{},{defaultValue:C,ns:P}),U=W(g||t,L?N(L,B):C,j,I,B,y),K=void 0!==o?o:I.defaultTransParent;return K?n.createElement(K,b,U):U},e.Translation=function(e){var n=e.ns,t=e.children,r=s($(n,c(e,Y)),3),a=r[0],i=r[1],o=r[2];return t(a,{i18n:i,lng:i.language},o)},e.composeInitialProps=P,e.date=function(){return""},e.getDefaults=S,e.getI18n=k,e.getInitialProps=C,e.initReactI18next=I,e.number=function(){return""},e.plural=function(){return""},e.select=function(){return""},e.selectOrdinal=function(){return""},e.setDefaults=E,e.setI18n=N,e.time=function(){return""},e.useSSR=_,e.useTranslation=$,e.withSSR=function(){return function(e){function t(t){var a=t.initialI18nStore,i=t.initialLanguage,o=c(t,J);return _(a,i),n.createElement(e,r({},o))}return t.getInitialProps=P(e),t.displayName="withI18nextSSR(".concat(U(e),")"),t.WrappedComponent=e,t}},e.withTranslation=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return function(a){function i(i){var o=i.forwardedRef,u=c(i,q),l=s($(e,r(r({},u),{},{keyPrefix:t.keyPrefix})),3),f=l[0],p=l[1],d=l[2],g=r(r({},u),{},{t:f,i18n:p,tReady:d});return t.withRef&&o?g.ref=o:!t.withRef&&o&&(g.forwardedRef=o),n.createElement(a,g)}i.displayName="withI18nextTranslation(".concat(U(a),")"),i.WrappedComponent=a;return t.withRef?n.forwardRef((function(e,t){return n.createElement(i,Object.assign({},e,{forwardedRef:t}))})):i}},Object.defineProperty(e,"__esModule",{value:!0})}));
define(["exports","react"],(function(e,n){"use strict";function t(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function r(e){for(var n=1;n<arguments.length;n++){var r=null!=arguments[n]?arguments[n]:{};n%2?t(Object(r),!0).forEach((function(n){o(e,n,r[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):t(Object(r)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))}))}return e}function a(e){return(a="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 i(e,n){for(var t=0;t<n.length;t++){var r=n[t];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function o(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function c(e,n){if(null==e)return{};var t,r,a=function(e,n){if(null==e)return{};var t,r,a={},i=Object.keys(e);for(r=0;r<i.length;r++)t=i[r],n.indexOf(t)>=0||(a[t]=e[t]);return a}(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)t=i[r],n.indexOf(t)>=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(a[t]=e[t])}return a}function s(e,n){return function(e){if(Array.isArray(e))return e}(e)||function(e,n){var t=e&&("undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"]);if(null==t)return;var r,a,i=[],o=!0,c=!1;try{for(t=t.call(e);!(o=(r=t.next()).done)&&(i.push(r.value),!n||i.length!==n);o=!0);}catch(e){c=!0,a=e}finally{try{o||null==t.return||t.return()}finally{if(c)throw a}}return i}(e,n)||function(e,n){if(!e)return;if("string"==typeof e)return u(e,n);var t=Object.prototype.toString.call(e).slice(8,-1);"Object"===t&&e.constructor&&(t=e.constructor.name);if("Map"===t||"Set"===t)return Array.from(e);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return u(e,n)}(e,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function u(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=new Array(n);t<n;t++)r[t]=e[t];return r}var l={area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0},f=/\s([^'"/\s><]+?)[\s/>]|([^\s=]+)=\s?(".*?"|'.*?')/g;function p(e){var n={type:"tag",name:"",voidElement:!1,attrs:{},children:[]},t=e.match(/<\/?([^\s]+?)[/\s>]/);if(t&&(n.name=t[1],(l[t[1]]||"/"===e.charAt(e.length-2))&&(n.voidElement=!0),n.name.startsWith("!--"))){var r=e.indexOf("--\x3e");return{type:"comment",comment:-1!==r?e.slice(4,r):""}}for(var a=new RegExp(f),i=null;null!==(i=a.exec(e));)if(i[0].trim())if(i[1]){var o=i[1].trim(),c=[o,""];o.indexOf("=")>-1&&(c=o.split("=")),n.attrs[c[0]]=c[1],a.lastIndex--}else i[2]&&(n.attrs[i[2]]=i[3].trim().substring(1,i[3].length-1));return n}var d=/<[a-zA-Z0-9\-\!\/](?:"[^"]*"|'[^']*'|[^'">])*>/g,g=/^\s*$/,m=Object.create(null);var h,v=function(e,n){n||(n={}),n.components||(n.components=m);var t,r=[],a=[],i=-1,o=!1;if(0!==e.indexOf("<")){var c=e.indexOf("<");r.push({type:"text",content:-1===c?e:e.substring(0,c)})}return e.replace(d,(function(c,s){if(o){if(c!=="</"+t.name+">")return;o=!1}var u,l="/"!==c.charAt(1),f=c.startsWith("\x3c!--"),d=s+c.length,m=e.charAt(d);if(f){var h=p(c);return i<0?(r.push(h),r):((u=a[i]).children.push(h),r)}if(l&&(i++,"tag"===(t=p(c)).type&&n.components[t.name]&&(t.type="component",o=!0),t.voidElement||o||!m||"<"===m||t.children.push({type:"text",content:e.slice(d,e.indexOf("<",d))}),0===i&&r.push(t),(u=a[i-1])&&u.children.push(t),a[i]=t),(!l||t.voidElement)&&(i>-1&&(t.voidElement||t.name===c.slice(2,-1))&&(i--,t=-1===i?r:a[i]),!o&&"<"!==m&&m)){u=-1===i?r:a[i].children;var v=e.indexOf("<",d),y=e.slice(d,-1===v?void 0:v);g.test(y)&&(y=" "),(v>-1&&i+u.length>=0||" "!==y)&&u.push({type:"text",content:y})}})),r},y=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230);/g,b={"&amp;":"&","&#38;":"&","&lt;":"<","&#60;":"<","&gt;":">","&#62;":">","&apos;":"'","&#39;":"'","&quot;":'"',"&#34;":'"',"&nbsp;":" ","&#160;":" ","&copy;":"©","&#169;":"©","&reg;":"®","&#174;":"®","&hellip;":"…","&#8230;":"…"},O=function(e){return b[e]},x={bindI18n:"languageChanged",bindI18nStore:"",transEmptyNodeValue:"",transSupportBasicHtmlNodes:!0,transWrapTextNodes:"",transKeepBasicHtmlNodesFor:["br","strong","i","p"],useSuspense:!0,unescape:function(e){return e.replace(y,O)}},w=n.createContext();function E(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};x=r(r({},x),e)}function S(){return x}var j=function(){function e(){!function(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}(this,e),this.usedNamespaces={}}var n,t,r;return n=e,(t=[{key:"addUsedNamespaces",value:function(e){var n=this;e.forEach((function(e){n.usedNamespaces[e]||(n.usedNamespaces[e]=!0)}))}},{key:"getUsedNamespaces",value:function(){return Object.keys(this.usedNamespaces)}}])&&i(n.prototype,t),r&&i(n,r),e}();function N(e){h=e}function k(){return h}var I={type:"3rdParty",init:function(e){E(e.options.react),N(e)}};function P(e){return function(n){return new Promise((function(t){var a=C();e.getInitialProps?e.getInitialProps(n).then((function(e){t(r(r({},e),a))})):t(a)}))}}function C(){var e=k(),n=e.reportNamespaces?e.reportNamespaces.getUsedNamespaces():[],t={},r={};return e.languages.forEach((function(t){r[t]={},n.forEach((function(n){r[t][n]=e.getResourceBundle(t,n)||{}}))})),t.initialI18nStore=r,t.initialLanguage=e.language,t}function R(){if(console&&console.warn){for(var e,n=arguments.length,t=new Array(n),r=0;r<n;r++)t[r]=arguments[r];"string"==typeof t[0]&&(t[0]="react-i18next:: ".concat(t[0])),(e=console).warn.apply(e,t)}}var T={};function A(){for(var e=arguments.length,n=new Array(e),t=0;t<e;t++)n[t]=arguments[t];"string"==typeof n[0]&&T[n[0]]||("string"==typeof n[0]&&(T[n[0]]=new Date),R.apply(void 0,n))}function L(e,n,t){e.loadNamespaces(n,(function(){if(e.isInitialized)t();else{e.on("initialized",(function n(){setTimeout((function(){e.off("initialized",n)}),0),t()}))}}))}function z(e,n){var t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=n.languages[0],a=!!n.options&&n.options.fallbackLng,i=n.languages[n.languages.length-1];if("cimode"===r.toLowerCase())return!0;var o=function(e,t){var r=n.services.backendConnector.state["".concat(e,"|").concat(t)];return-1===r||2===r};return!(t.bindI18n&&t.bindI18n.indexOf("languageChanging")>-1&&n.services.backendConnector.backend&&n.isLanguageChangingTo&&!o(n.isLanguageChangingTo,e))&&(!!n.hasResourceBundle(r,e)||(!(n.services.backendConnector.backend&&(!n.options.resources||n.options.partialBundledLanguages))||!(!o(r,e)||a&&!o(i,e))))}function B(e,n){var t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(!n.languages||!n.languages.length)return A("i18n.languages were undefined or empty",n.languages),!0;var r=void 0!==n.options.ignoreJSONStructure;return r?n.hasLoadedNamespace(e,{precheck:function(n,r){if(t.bindI18n&&t.bindI18n.indexOf("languageChanging")>-1&&n.services.backendConnector.backend&&n.isLanguageChangingTo&&!r(n.isLanguageChangingTo,e))return!1}}):z(e,n,t)}function U(e){return e.displayName||e.name||("string"==typeof e&&e.length>0?e:"Unknown")}var D=["format"],H=["children","count","parent","i18nKey","context","tOptions","values","defaults","components","ns","i18n","t","shouldUnescape"];function K(e,n){if(!e)return!1;var t=e.props?e.props.children:e.children;return n?t.length>0:!!t}function V(e){return e?e&&e.children?e.children:e.props&&e.props.children:[]}function F(e){return Array.isArray(e)?e:[e]}function W(e,t,i,o,c,s){if(""===t)return[];var u=o.transKeepBasicHtmlNodesFor||[],l=t&&new RegExp(u.join("|")).test(t);if(!e&&!l)return[t];var f={};!function e(t){F(t).forEach((function(t){"string"!=typeof t&&(K(t)?e(V(t)):"object"!==a(t)||n.isValidElement(t)||Object.assign(f,t))}))}(e);var p=v("<0>".concat(t,"</0>")),d=r(r({},f),c);function g(e,t,r){var a=V(e),i=h(a,t.children,r);return function(e){return"[object Array]"===Object.prototype.toString.call(e)&&e.every((function(e){return n.isValidElement(e)}))}(a)&&0===i.length?a:i}function m(e,t,a,i,o){e.dummy&&(e.children=t),a.push(n.cloneElement(e,r(r({},e.props),{},{key:i}),o?void 0:t))}function h(t,c,f){var p=F(t);return F(c).reduce((function(t,c,v){var y,b,O,x=c.children&&c.children[0]&&c.children[0].content&&i.services.interpolator.interpolate(c.children[0].content,d,i.language);if("tag"===c.type){var w=p[parseInt(c.name,10)];!w&&1===f.length&&f[0][c.name]&&(w=f[0][c.name]),w||(w={});var E=0!==Object.keys(c.attrs).length?(y={props:c.attrs},(O=r({},b=w)).props=Object.assign(y.props,b.props),O):w,S=n.isValidElement(E),j=S&&K(c,!0)&&!c.voidElement,N=l&&"object"===a(E)&&E.dummy&&!S,k="object"===a(e)&&null!==e&&Object.hasOwnProperty.call(e,c.name);if("string"==typeof E){var I=i.services.interpolator.interpolate(E,d,i.language);t.push(I)}else if(K(E)||j){m(E,g(E,c,f),t,v)}else if(N){var P=h(p,c.children,f);t.push(n.cloneElement(E,r(r({},E.props),{},{key:v}),P))}else if(Number.isNaN(parseFloat(c.name))){if(k)m(E,g(E,c,f),t,v,c.voidElement);else if(o.transSupportBasicHtmlNodes&&u.indexOf(c.name)>-1)if(c.voidElement)t.push(n.createElement(c.name,{key:"".concat(c.name,"-").concat(v)}));else{var C=h(p,c.children,f);t.push(n.createElement(c.name,{key:"".concat(c.name,"-").concat(v)},C))}else if(c.voidElement)t.push("<".concat(c.name," />"));else{var R=h(p,c.children,f);t.push("<".concat(c.name,">").concat(R,"</").concat(c.name,">"))}}else if("object"!==a(E)||S)1===c.children.length&&x?t.push(n.cloneElement(E,r(r({},E.props),{},{key:v}),x)):t.push(n.cloneElement(E,r(r({},E.props),{},{key:v})));else{var T=c.children[0]?x:null;T&&t.push(T)}}else if("text"===c.type){var A=o.transWrapTextNodes,L=s?o.unescape(i.services.interpolator.interpolate(c.content,d,i.language)):i.services.interpolator.interpolate(c.content,d,i.language);A?t.push(n.createElement(A,{key:"".concat(c.name,"-").concat(v)},L)):t.push(L)}return t}),[])}return V(h([{dummy:!0,children:e||[]}],p,F(e||[]))[0])}var M=function(e,t){var r=n.useRef();return n.useEffect((function(){r.current=t?r.current:e}),[e,t]),r.current};function $(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},a=t.i18n,i=n.useContext(w)||{},o=i.i18n,c=i.defaultNS,u=a||o||k();if(u&&!u.reportNamespaces&&(u.reportNamespaces=new j),!u){A("You will need to pass in an i18next instance by using initReactI18next");var l=function(e){return Array.isArray(e)?e[e.length-1]:e},f=[l,{},!1];return f.t=l,f.i18n={},f.ready=!1,f}u.options.react&&void 0!==u.options.react.wait&&A("It seems you are still using the old wait option, you may migrate to the new useSuspense behaviour.");var p=r(r(r({},S()),u.options.react),t),d=p.useSuspense,g=p.keyPrefix,m=e||c||u.options&&u.options.defaultNS;m="string"==typeof m?[m]:m||["translation"],u.reportNamespaces.addUsedNamespaces&&u.reportNamespaces.addUsedNamespaces(m);var h=(u.isInitialized||u.initializedStoreOnce)&&m.every((function(e){return B(e,u,p)}));function v(){return u.getFixedT(null,"fallback"===p.nsMode?m:m[0],g)}var y=n.useState(v),b=s(y,2),O=b[0],x=b[1],E=m.join(),N=M(E),I=n.useRef(!0);n.useEffect((function(){var e=p.bindI18n,n=p.bindI18nStore;function t(){I.current&&x(v)}return I.current=!0,h||d||L(u,m,(function(){I.current&&x(v)})),h&&N&&N!==E&&I.current&&x(v),e&&u&&u.on(e,t),n&&u&&u.store.on(n,t),function(){I.current=!1,e&&u&&e.split(" ").forEach((function(e){return u.off(e,t)})),n&&u&&n.split(" ").forEach((function(e){return u.store.off(e,t)}))}}),[u,E]);var P=n.useRef(!0);n.useEffect((function(){I.current&&!P.current&&x(v),P.current=!1}),[u]);var C=[O,u,h];if(C.t=O,C.i18n=u,C.ready=h,h)return C;if(!h&&!d)return C;throw new Promise((function(e){L(u,m,(function(){e()}))}))}var q=["forwardedRef"];var Y=["ns","children"];function _(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},a=r.i18n,i=n.useContext(w)||{},o=i.i18n,c=a||o||k();c.options&&c.options.isClone||(e&&!c.initializedStoreOnce&&(c.services.resourceStore.data=e,c.options.ns=Object.values(e).reduce((function(e,n){return Object.keys(n).forEach((function(n){e.indexOf(n)<0&&e.push(n)})),e}),c.options.ns),c.initializedStoreOnce=!0,c.isInitialized=!0),t&&!c.initializedLanguageOnce&&(c.changeLanguage(t),c.initializedLanguageOnce=!0))}var J=["initialI18nStore","initialLanguage"];e.I18nContext=w,e.I18nextProvider=function(e){var t=e.i18n,r=e.defaultNS,a=e.children,i=n.useMemo((function(){return{i18n:t,defaultNS:r}}),[t,r]);return n.createElement(w.Provider,{value:i},a)},e.Trans=function(e){var t=e.children,i=e.count,o=e.parent,s=e.i18nKey,u=e.context,l=e.tOptions,f=void 0===l?{}:l,p=e.values,d=e.defaults,g=e.components,m=e.ns,h=e.i18n,v=e.t,y=e.shouldUnescape,b=c(e,H),O=n.useContext(w)||{},x=O.i18n,E=O.defaultNS,j=h||x||k();if(!j)return A("You will need to pass in an i18next instance by using i18nextReactModule"),t;var N=v||j.t.bind(j)||function(e){return e};u&&(f.context=u);var I=r(r({},S()),j.options&&j.options.react),P=m||N.ns||E||j.options&&j.options.defaultNS;P="string"==typeof P?[P]:P||["translation"];var C=d||function e(t,r){if(!t)return"";var i="",o=F(t),s=r.transSupportBasicHtmlNodes&&r.transKeepBasicHtmlNodesFor?r.transKeepBasicHtmlNodesFor:[];return o.forEach((function(t,o){if("string"==typeof t)i+="".concat(t);else if(n.isValidElement(t)){var u=Object.keys(t.props).length,l=s.indexOf(t.type)>-1,f=t.props.children;if(!f&&l&&0===u)i+="<".concat(t.type,"/>");else if(f||l&&0===u)if(t.props.i18nIsDynamicList)i+="<".concat(o,"></").concat(o,">");else if(l&&1===u&&"string"==typeof f)i+="<".concat(t.type,">").concat(f,"</").concat(t.type,">");else{var p=e(f,r);i+="<".concat(o,">").concat(p,"</").concat(o,">")}else i+="<".concat(o,"></").concat(o,">")}else if(null===t)R("Trans: the passed in value is invalid - seems you passed in a null child.");else if("object"===a(t)){var d=t.format,g=c(t,D),m=Object.keys(g);if(1===m.length){var h=d?"".concat(m[0],", ").concat(d):m[0];i+="{{".concat(h,"}}")}else R("react-i18next: the passed in object contained more than one variable - the object should look like {{ value, format }} where format is optional.",t)}else R("Trans: the passed in value is invalid - seems you passed in a variable like {number} - please pass in variables for interpolation as full objects like {{number}}.",t)})),i}(t,I)||I.transEmptyNodeValue||s,T=I.hashTransKey,L=s||(T?T(C):C),z=p?f.interpolation:{interpolation:r(r({},f.interpolation),{},{prefix:"#$?",suffix:"?$#"})},B=r(r(r(r({},f),{},{count:i},p),z),{},{defaultValue:C,ns:P}),U=W(g||t,L?N(L,B):C,j,I,B,y),K=void 0!==o?o:I.defaultTransParent;return K?n.createElement(K,b,U):U},e.Translation=function(e){var n=e.ns,t=e.children,r=s($(n,c(e,Y)),3),a=r[0],i=r[1],o=r[2];return t(a,{i18n:i,lng:i.language},o)},e.composeInitialProps=P,e.date=function(){return""},e.getDefaults=S,e.getI18n=k,e.getInitialProps=C,e.initReactI18next=I,e.number=function(){return""},e.plural=function(){return""},e.select=function(){return""},e.selectOrdinal=function(){return""},e.setDefaults=E,e.setI18n=N,e.time=function(){return""},e.useSSR=_,e.useTranslation=$,e.withSSR=function(){return function(e){function t(t){var a=t.initialI18nStore,i=t.initialLanguage,o=c(t,J);return _(a,i),n.createElement(e,r({},o))}return t.getInitialProps=P(e),t.displayName="withI18nextSSR(".concat(U(e),")"),t.WrappedComponent=e,t}},e.withTranslation=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return function(a){function i(i){var o=i.forwardedRef,u=c(i,q),l=s($(e,r(r({},u),{},{keyPrefix:t.keyPrefix})),3),f=l[0],p=l[1],d=l[2],g=r(r({},u),{},{t:f,i18n:p,tReady:d});return t.withRef&&o?g.ref=o:!t.withRef&&o&&(g.forwardedRef=o),n.createElement(a,g)}i.displayName="withI18nextTranslation(".concat(U(a),")"),i.WrappedComponent=a;return t.withRef?n.forwardRef((function(e,t){return n.createElement(i,Object.assign({},e,{forwardedRef:t}))})):i}},Object.defineProperty(e,"__esModule",{value:!0})}));

@@ -7,3 +7,3 @@ "use strict";

exports.unescape = void 0;
var matchHtmlEntity = /&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34);/g;
var matchHtmlEntity = /&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230);/g;
var htmlEntities = {

@@ -19,3 +19,11 @@ '&amp;': '&',

'&quot;': '"',
'&#34;': '"'
'&#34;': '"',
'&nbsp;': ' ',
'&#160;': ' ',
'&copy;': '©',
'&#169;': '©',
'&reg;': '®',
'&#174;': '®',
'&hellip;': '…',
'&#8230;': '…'
};

@@ -22,0 +30,0 @@

@@ -1,2 +0,2 @@

var matchHtmlEntity = /&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34);/g;
var matchHtmlEntity = /&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230);/g;
var htmlEntities = {

@@ -12,3 +12,11 @@ '&amp;': '&',

'&quot;': '"',
'&#34;': '"'
'&#34;': '"',
'&nbsp;': ' ',
'&#160;': ' ',
'&copy;': '©',
'&#169;': '©',
'&reg;': '®',
'&#174;': '®',
'&hellip;': '…',
'&#8230;': '…'
};

@@ -15,0 +23,0 @@

@@ -321,3 +321,3 @@ (function (global, factory) {

var matchHtmlEntity = /&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34);/g;
var matchHtmlEntity = /&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230);/g;
var htmlEntities = {

@@ -333,3 +333,11 @@ '&amp;': '&',

'&quot;': '"',
'&#34;': '"'
'&#34;': '"',
'&nbsp;': ' ',
'&#160;': ' ',
'&copy;': '©',
'&#169;': '©',
'&reg;': '®',
'&#174;': '®',
'&hellip;': '…',
'&#8230;': '…'
};

@@ -336,0 +344,0 @@

@@ -1,1 +0,1 @@

!function(e,n){"object"==typeof exports&&"undefined"!=typeof module?n(exports,require("react")):"function"==typeof define&&define.amd?define(["exports","react"],n):n((e=e||self).ReactI18next={},e.React)}(this,(function(e,n){"use strict";function t(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function r(e){for(var n=1;n<arguments.length;n++){var r=null!=arguments[n]?arguments[n]:{};n%2?t(Object(r),!0).forEach((function(n){o(e,n,r[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):t(Object(r)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))}))}return e}function a(e){return(a="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 i(e,n){for(var t=0;t<n.length;t++){var r=n[t];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function o(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function c(e,n){if(null==e)return{};var t,r,a=function(e,n){if(null==e)return{};var t,r,a={},i=Object.keys(e);for(r=0;r<i.length;r++)t=i[r],n.indexOf(t)>=0||(a[t]=e[t]);return a}(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)t=i[r],n.indexOf(t)>=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(a[t]=e[t])}return a}function s(e,n){return function(e){if(Array.isArray(e))return e}(e)||function(e,n){var t=e&&("undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"]);if(null==t)return;var r,a,i=[],o=!0,c=!1;try{for(t=t.call(e);!(o=(r=t.next()).done)&&(i.push(r.value),!n||i.length!==n);o=!0);}catch(e){c=!0,a=e}finally{try{o||null==t.return||t.return()}finally{if(c)throw a}}return i}(e,n)||function(e,n){if(!e)return;if("string"==typeof e)return u(e,n);var t=Object.prototype.toString.call(e).slice(8,-1);"Object"===t&&e.constructor&&(t=e.constructor.name);if("Map"===t||"Set"===t)return Array.from(e);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return u(e,n)}(e,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function u(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=new Array(n);t<n;t++)r[t]=e[t];return r}var l={area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0},f=/\s([^'"/\s><]+?)[\s/>]|([^\s=]+)=\s?(".*?"|'.*?')/g;function p(e){var n={type:"tag",name:"",voidElement:!1,attrs:{},children:[]},t=e.match(/<\/?([^\s]+?)[/\s>]/);if(t&&(n.name=t[1],(l[t[1]]||"/"===e.charAt(e.length-2))&&(n.voidElement=!0),n.name.startsWith("!--"))){var r=e.indexOf("--\x3e");return{type:"comment",comment:-1!==r?e.slice(4,r):""}}for(var a=new RegExp(f),i=null;null!==(i=a.exec(e));)if(i[0].trim())if(i[1]){var o=i[1].trim(),c=[o,""];o.indexOf("=")>-1&&(c=o.split("=")),n.attrs[c[0]]=c[1],a.lastIndex--}else i[2]&&(n.attrs[i[2]]=i[3].trim().substring(1,i[3].length-1));return n}var d=/<[a-zA-Z0-9\-\!\/](?:"[^"]*"|'[^']*'|[^'">])*>/g,g=/^\s*$/,m=Object.create(null);var h,v=function(e,n){n||(n={}),n.components||(n.components=m);var t,r=[],a=[],i=-1,o=!1;if(0!==e.indexOf("<")){var c=e.indexOf("<");r.push({type:"text",content:-1===c?e:e.substring(0,c)})}return e.replace(d,(function(c,s){if(o){if(c!=="</"+t.name+">")return;o=!1}var u,l="/"!==c.charAt(1),f=c.startsWith("\x3c!--"),d=s+c.length,m=e.charAt(d);if(f){var h=p(c);return i<0?(r.push(h),r):((u=a[i]).children.push(h),r)}if(l&&(i++,"tag"===(t=p(c)).type&&n.components[t.name]&&(t.type="component",o=!0),t.voidElement||o||!m||"<"===m||t.children.push({type:"text",content:e.slice(d,e.indexOf("<",d))}),0===i&&r.push(t),(u=a[i-1])&&u.children.push(t),a[i]=t),(!l||t.voidElement)&&(i>-1&&(t.voidElement||t.name===c.slice(2,-1))&&(i--,t=-1===i?r:a[i]),!o&&"<"!==m&&m)){u=-1===i?r:a[i].children;var v=e.indexOf("<",d),y=e.slice(d,-1===v?void 0:v);g.test(y)&&(y=" "),(v>-1&&i+u.length>=0||" "!==y)&&u.push({type:"text",content:y})}})),r},y=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34);/g,b={"&amp;":"&","&#38;":"&","&lt;":"<","&#60;":"<","&gt;":">","&#62;":">","&apos;":"'","&#39;":"'","&quot;":'"',"&#34;":'"'},O=function(e){return b[e]},x={bindI18n:"languageChanged",bindI18nStore:"",transEmptyNodeValue:"",transSupportBasicHtmlNodes:!0,transWrapTextNodes:"",transKeepBasicHtmlNodesFor:["br","strong","i","p"],useSuspense:!0,unescape:function(e){return e.replace(y,O)}},w=n.createContext();function j(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};x=r(r({},x),e)}function E(){return x}var S=function(){function e(){!function(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}(this,e),this.usedNamespaces={}}var n,t,r;return n=e,(t=[{key:"addUsedNamespaces",value:function(e){var n=this;e.forEach((function(e){n.usedNamespaces[e]||(n.usedNamespaces[e]=!0)}))}},{key:"getUsedNamespaces",value:function(){return Object.keys(this.usedNamespaces)}}])&&i(n.prototype,t),r&&i(n,r),e}();function N(e){h=e}function k(){return h}var I={type:"3rdParty",init:function(e){j(e.options.react),N(e)}};function P(e){return function(n){return new Promise((function(t){var a=R();e.getInitialProps?e.getInitialProps(n).then((function(e){t(r(r({},e),a))})):t(a)}))}}function R(){var e=k(),n=e.reportNamespaces?e.reportNamespaces.getUsedNamespaces():[],t={},r={};return e.languages.forEach((function(t){r[t]={},n.forEach((function(n){r[t][n]=e.getResourceBundle(t,n)||{}}))})),t.initialI18nStore=r,t.initialLanguage=e.language,t}function C(){if(console&&console.warn){for(var e,n=arguments.length,t=new Array(n),r=0;r<n;r++)t[r]=arguments[r];"string"==typeof t[0]&&(t[0]="react-i18next:: ".concat(t[0])),(e=console).warn.apply(e,t)}}var T={};function A(){for(var e=arguments.length,n=new Array(e),t=0;t<e;t++)n[t]=arguments[t];"string"==typeof n[0]&&T[n[0]]||("string"==typeof n[0]&&(T[n[0]]=new Date),C.apply(void 0,n))}function L(e,n,t){e.loadNamespaces(n,(function(){if(e.isInitialized)t();else{e.on("initialized",(function n(){setTimeout((function(){e.off("initialized",n)}),0),t()}))}}))}function z(e,n){var t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=n.languages[0],a=!!n.options&&n.options.fallbackLng,i=n.languages[n.languages.length-1];if("cimode"===r.toLowerCase())return!0;var o=function(e,t){var r=n.services.backendConnector.state["".concat(e,"|").concat(t)];return-1===r||2===r};return!(t.bindI18n&&t.bindI18n.indexOf("languageChanging")>-1&&n.services.backendConnector.backend&&n.isLanguageChangingTo&&!o(n.isLanguageChangingTo,e))&&(!!n.hasResourceBundle(r,e)||(!(n.services.backendConnector.backend&&(!n.options.resources||n.options.partialBundledLanguages))||!(!o(r,e)||a&&!o(i,e))))}function B(e,n){var t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(!n.languages||!n.languages.length)return A("i18n.languages were undefined or empty",n.languages),!0;var r=void 0!==n.options.ignoreJSONStructure;return r?n.hasLoadedNamespace(e,{precheck:function(n,r){if(t.bindI18n&&t.bindI18n.indexOf("languageChanging")>-1&&n.services.backendConnector.backend&&n.isLanguageChangingTo&&!r(n.isLanguageChangingTo,e))return!1}}):z(e,n,t)}function U(e){return e.displayName||e.name||("string"==typeof e&&e.length>0?e:"Unknown")}var D=["format"],H=["children","count","parent","i18nKey","context","tOptions","values","defaults","components","ns","i18n","t","shouldUnescape"];function K(e,n){if(!e)return!1;var t=e.props?e.props.children:e.children;return n?t.length>0:!!t}function V(e){return e?e&&e.children?e.children:e.props&&e.props.children:[]}function F(e){return Array.isArray(e)?e:[e]}function W(e,t,i,o,c,s){if(""===t)return[];var u=o.transKeepBasicHtmlNodesFor||[],l=t&&new RegExp(u.join("|")).test(t);if(!e&&!l)return[t];var f={};!function e(t){F(t).forEach((function(t){"string"!=typeof t&&(K(t)?e(V(t)):"object"!==a(t)||n.isValidElement(t)||Object.assign(f,t))}))}(e);var p=v("<0>".concat(t,"</0>")),d=r(r({},f),c);function g(e,t,r){var a=V(e),i=h(a,t.children,r);return function(e){return"[object Array]"===Object.prototype.toString.call(e)&&e.every((function(e){return n.isValidElement(e)}))}(a)&&0===i.length?a:i}function m(e,t,a,i,o){e.dummy&&(e.children=t),a.push(n.cloneElement(e,r(r({},e.props),{},{key:i}),o?void 0:t))}function h(t,c,f){var p=F(t);return F(c).reduce((function(t,c,v){var y,b,O,x=c.children&&c.children[0]&&c.children[0].content&&i.services.interpolator.interpolate(c.children[0].content,d,i.language);if("tag"===c.type){var w=p[parseInt(c.name,10)];!w&&1===f.length&&f[0][c.name]&&(w=f[0][c.name]),w||(w={});var j=0!==Object.keys(c.attrs).length?(y={props:c.attrs},(O=r({},b=w)).props=Object.assign(y.props,b.props),O):w,E=n.isValidElement(j),S=E&&K(c,!0)&&!c.voidElement,N=l&&"object"===a(j)&&j.dummy&&!E,k="object"===a(e)&&null!==e&&Object.hasOwnProperty.call(e,c.name);if("string"==typeof j){var I=i.services.interpolator.interpolate(j,d,i.language);t.push(I)}else if(K(j)||S){m(j,g(j,c,f),t,v)}else if(N){var P=h(p,c.children,f);t.push(n.cloneElement(j,r(r({},j.props),{},{key:v}),P))}else if(Number.isNaN(parseFloat(c.name))){if(k)m(j,g(j,c,f),t,v,c.voidElement);else if(o.transSupportBasicHtmlNodes&&u.indexOf(c.name)>-1)if(c.voidElement)t.push(n.createElement(c.name,{key:"".concat(c.name,"-").concat(v)}));else{var R=h(p,c.children,f);t.push(n.createElement(c.name,{key:"".concat(c.name,"-").concat(v)},R))}else if(c.voidElement)t.push("<".concat(c.name," />"));else{var C=h(p,c.children,f);t.push("<".concat(c.name,">").concat(C,"</").concat(c.name,">"))}}else if("object"!==a(j)||E)1===c.children.length&&x?t.push(n.cloneElement(j,r(r({},j.props),{},{key:v}),x)):t.push(n.cloneElement(j,r(r({},j.props),{},{key:v})));else{var T=c.children[0]?x:null;T&&t.push(T)}}else if("text"===c.type){var A=o.transWrapTextNodes,L=s?o.unescape(i.services.interpolator.interpolate(c.content,d,i.language)):i.services.interpolator.interpolate(c.content,d,i.language);A?t.push(n.createElement(A,{key:"".concat(c.name,"-").concat(v)},L)):t.push(L)}return t}),[])}return V(h([{dummy:!0,children:e||[]}],p,F(e||[]))[0])}var M=function(e,t){var r=n.useRef();return n.useEffect((function(){r.current=t?r.current:e}),[e,t]),r.current};function $(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},a=t.i18n,i=n.useContext(w)||{},o=i.i18n,c=i.defaultNS,u=a||o||k();if(u&&!u.reportNamespaces&&(u.reportNamespaces=new S),!u){A("You will need to pass in an i18next instance by using initReactI18next");var l=function(e){return Array.isArray(e)?e[e.length-1]:e},f=[l,{},!1];return f.t=l,f.i18n={},f.ready=!1,f}u.options.react&&void 0!==u.options.react.wait&&A("It seems you are still using the old wait option, you may migrate to the new useSuspense behaviour.");var p=r(r(r({},E()),u.options.react),t),d=p.useSuspense,g=p.keyPrefix,m=e||c||u.options&&u.options.defaultNS;m="string"==typeof m?[m]:m||["translation"],u.reportNamespaces.addUsedNamespaces&&u.reportNamespaces.addUsedNamespaces(m);var h=(u.isInitialized||u.initializedStoreOnce)&&m.every((function(e){return B(e,u,p)}));function v(){return u.getFixedT(null,"fallback"===p.nsMode?m:m[0],g)}var y=n.useState(v),b=s(y,2),O=b[0],x=b[1],j=m.join(),N=M(j),I=n.useRef(!0);n.useEffect((function(){var e=p.bindI18n,n=p.bindI18nStore;function t(){I.current&&x(v)}return I.current=!0,h||d||L(u,m,(function(){I.current&&x(v)})),h&&N&&N!==j&&I.current&&x(v),e&&u&&u.on(e,t),n&&u&&u.store.on(n,t),function(){I.current=!1,e&&u&&e.split(" ").forEach((function(e){return u.off(e,t)})),n&&u&&n.split(" ").forEach((function(e){return u.store.off(e,t)}))}}),[u,j]);var P=n.useRef(!0);n.useEffect((function(){I.current&&!P.current&&x(v),P.current=!1}),[u]);var R=[O,u,h];if(R.t=O,R.i18n=u,R.ready=h,h)return R;if(!h&&!d)return R;throw new Promise((function(e){L(u,m,(function(){e()}))}))}var q=["forwardedRef"];var Y=["ns","children"];function _(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},a=r.i18n,i=n.useContext(w)||{},o=i.i18n,c=a||o||k();c.options&&c.options.isClone||(e&&!c.initializedStoreOnce&&(c.services.resourceStore.data=e,c.options.ns=Object.values(e).reduce((function(e,n){return Object.keys(n).forEach((function(n){e.indexOf(n)<0&&e.push(n)})),e}),c.options.ns),c.initializedStoreOnce=!0,c.isInitialized=!0),t&&!c.initializedLanguageOnce&&(c.changeLanguage(t),c.initializedLanguageOnce=!0))}var J=["initialI18nStore","initialLanguage"];e.I18nContext=w,e.I18nextProvider=function(e){var t=e.i18n,r=e.defaultNS,a=e.children,i=n.useMemo((function(){return{i18n:t,defaultNS:r}}),[t,r]);return n.createElement(w.Provider,{value:i},a)},e.Trans=function(e){var t=e.children,i=e.count,o=e.parent,s=e.i18nKey,u=e.context,l=e.tOptions,f=void 0===l?{}:l,p=e.values,d=e.defaults,g=e.components,m=e.ns,h=e.i18n,v=e.t,y=e.shouldUnescape,b=c(e,H),O=n.useContext(w)||{},x=O.i18n,j=O.defaultNS,S=h||x||k();if(!S)return A("You will need to pass in an i18next instance by using i18nextReactModule"),t;var N=v||S.t.bind(S)||function(e){return e};u&&(f.context=u);var I=r(r({},E()),S.options&&S.options.react),P=m||N.ns||j||S.options&&S.options.defaultNS;P="string"==typeof P?[P]:P||["translation"];var R=d||function e(t,r){if(!t)return"";var i="",o=F(t),s=r.transSupportBasicHtmlNodes&&r.transKeepBasicHtmlNodesFor?r.transKeepBasicHtmlNodesFor:[];return o.forEach((function(t,o){if("string"==typeof t)i+="".concat(t);else if(n.isValidElement(t)){var u=Object.keys(t.props).length,l=s.indexOf(t.type)>-1,f=t.props.children;if(!f&&l&&0===u)i+="<".concat(t.type,"/>");else if(f||l&&0===u)if(t.props.i18nIsDynamicList)i+="<".concat(o,"></").concat(o,">");else if(l&&1===u&&"string"==typeof f)i+="<".concat(t.type,">").concat(f,"</").concat(t.type,">");else{var p=e(f,r);i+="<".concat(o,">").concat(p,"</").concat(o,">")}else i+="<".concat(o,"></").concat(o,">")}else if(null===t)C("Trans: the passed in value is invalid - seems you passed in a null child.");else if("object"===a(t)){var d=t.format,g=c(t,D),m=Object.keys(g);if(1===m.length){var h=d?"".concat(m[0],", ").concat(d):m[0];i+="{{".concat(h,"}}")}else C("react-i18next: the passed in object contained more than one variable - the object should look like {{ value, format }} where format is optional.",t)}else C("Trans: the passed in value is invalid - seems you passed in a variable like {number} - please pass in variables for interpolation as full objects like {{number}}.",t)})),i}(t,I)||I.transEmptyNodeValue||s,T=I.hashTransKey,L=s||(T?T(R):R),z=p?f.interpolation:{interpolation:r(r({},f.interpolation),{},{prefix:"#$?",suffix:"?$#"})},B=r(r(r(r({},f),{},{count:i},p),z),{},{defaultValue:R,ns:P}),U=W(g||t,L?N(L,B):R,S,I,B,y),K=void 0!==o?o:I.defaultTransParent;return K?n.createElement(K,b,U):U},e.Translation=function(e){var n=e.ns,t=e.children,r=s($(n,c(e,Y)),3),a=r[0],i=r[1],o=r[2];return t(a,{i18n:i,lng:i.language},o)},e.composeInitialProps=P,e.date=function(){return""},e.getDefaults=E,e.getI18n=k,e.getInitialProps=R,e.initReactI18next=I,e.number=function(){return""},e.plural=function(){return""},e.select=function(){return""},e.selectOrdinal=function(){return""},e.setDefaults=j,e.setI18n=N,e.time=function(){return""},e.useSSR=_,e.useTranslation=$,e.withSSR=function(){return function(e){function t(t){var a=t.initialI18nStore,i=t.initialLanguage,o=c(t,J);return _(a,i),n.createElement(e,r({},o))}return t.getInitialProps=P(e),t.displayName="withI18nextSSR(".concat(U(e),")"),t.WrappedComponent=e,t}},e.withTranslation=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return function(a){function i(i){var o=i.forwardedRef,u=c(i,q),l=s($(e,r(r({},u),{},{keyPrefix:t.keyPrefix})),3),f=l[0],p=l[1],d=l[2],g=r(r({},u),{},{t:f,i18n:p,tReady:d});return t.withRef&&o?g.ref=o:!t.withRef&&o&&(g.forwardedRef=o),n.createElement(a,g)}i.displayName="withI18nextTranslation(".concat(U(a),")"),i.WrappedComponent=a;return t.withRef?n.forwardRef((function(e,t){return n.createElement(i,Object.assign({},e,{forwardedRef:t}))})):i}},Object.defineProperty(e,"__esModule",{value:!0})}));
!function(e,n){"object"==typeof exports&&"undefined"!=typeof module?n(exports,require("react")):"function"==typeof define&&define.amd?define(["exports","react"],n):n((e=e||self).ReactI18next={},e.React)}(this,(function(e,n){"use strict";function t(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function r(e){for(var n=1;n<arguments.length;n++){var r=null!=arguments[n]?arguments[n]:{};n%2?t(Object(r),!0).forEach((function(n){o(e,n,r[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):t(Object(r)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))}))}return e}function a(e){return(a="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 i(e,n){for(var t=0;t<n.length;t++){var r=n[t];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function o(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function c(e,n){if(null==e)return{};var t,r,a=function(e,n){if(null==e)return{};var t,r,a={},i=Object.keys(e);for(r=0;r<i.length;r++)t=i[r],n.indexOf(t)>=0||(a[t]=e[t]);return a}(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)t=i[r],n.indexOf(t)>=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(a[t]=e[t])}return a}function s(e,n){return function(e){if(Array.isArray(e))return e}(e)||function(e,n){var t=e&&("undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"]);if(null==t)return;var r,a,i=[],o=!0,c=!1;try{for(t=t.call(e);!(o=(r=t.next()).done)&&(i.push(r.value),!n||i.length!==n);o=!0);}catch(e){c=!0,a=e}finally{try{o||null==t.return||t.return()}finally{if(c)throw a}}return i}(e,n)||function(e,n){if(!e)return;if("string"==typeof e)return u(e,n);var t=Object.prototype.toString.call(e).slice(8,-1);"Object"===t&&e.constructor&&(t=e.constructor.name);if("Map"===t||"Set"===t)return Array.from(e);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return u(e,n)}(e,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function u(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=new Array(n);t<n;t++)r[t]=e[t];return r}var l={area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0},f=/\s([^'"/\s><]+?)[\s/>]|([^\s=]+)=\s?(".*?"|'.*?')/g;function p(e){var n={type:"tag",name:"",voidElement:!1,attrs:{},children:[]},t=e.match(/<\/?([^\s]+?)[/\s>]/);if(t&&(n.name=t[1],(l[t[1]]||"/"===e.charAt(e.length-2))&&(n.voidElement=!0),n.name.startsWith("!--"))){var r=e.indexOf("--\x3e");return{type:"comment",comment:-1!==r?e.slice(4,r):""}}for(var a=new RegExp(f),i=null;null!==(i=a.exec(e));)if(i[0].trim())if(i[1]){var o=i[1].trim(),c=[o,""];o.indexOf("=")>-1&&(c=o.split("=")),n.attrs[c[0]]=c[1],a.lastIndex--}else i[2]&&(n.attrs[i[2]]=i[3].trim().substring(1,i[3].length-1));return n}var d=/<[a-zA-Z0-9\-\!\/](?:"[^"]*"|'[^']*'|[^'">])*>/g,g=/^\s*$/,m=Object.create(null);var h,v=function(e,n){n||(n={}),n.components||(n.components=m);var t,r=[],a=[],i=-1,o=!1;if(0!==e.indexOf("<")){var c=e.indexOf("<");r.push({type:"text",content:-1===c?e:e.substring(0,c)})}return e.replace(d,(function(c,s){if(o){if(c!=="</"+t.name+">")return;o=!1}var u,l="/"!==c.charAt(1),f=c.startsWith("\x3c!--"),d=s+c.length,m=e.charAt(d);if(f){var h=p(c);return i<0?(r.push(h),r):((u=a[i]).children.push(h),r)}if(l&&(i++,"tag"===(t=p(c)).type&&n.components[t.name]&&(t.type="component",o=!0),t.voidElement||o||!m||"<"===m||t.children.push({type:"text",content:e.slice(d,e.indexOf("<",d))}),0===i&&r.push(t),(u=a[i-1])&&u.children.push(t),a[i]=t),(!l||t.voidElement)&&(i>-1&&(t.voidElement||t.name===c.slice(2,-1))&&(i--,t=-1===i?r:a[i]),!o&&"<"!==m&&m)){u=-1===i?r:a[i].children;var v=e.indexOf("<",d),y=e.slice(d,-1===v?void 0:v);g.test(y)&&(y=" "),(v>-1&&i+u.length>=0||" "!==y)&&u.push({type:"text",content:y})}})),r},y=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230);/g,b={"&amp;":"&","&#38;":"&","&lt;":"<","&#60;":"<","&gt;":">","&#62;":">","&apos;":"'","&#39;":"'","&quot;":'"',"&#34;":'"',"&nbsp;":" ","&#160;":" ","&copy;":"©","&#169;":"©","&reg;":"®","&#174;":"®","&hellip;":"…","&#8230;":"…"},O=function(e){return b[e]},x={bindI18n:"languageChanged",bindI18nStore:"",transEmptyNodeValue:"",transSupportBasicHtmlNodes:!0,transWrapTextNodes:"",transKeepBasicHtmlNodesFor:["br","strong","i","p"],useSuspense:!0,unescape:function(e){return e.replace(y,O)}},w=n.createContext();function j(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};x=r(r({},x),e)}function E(){return x}var S=function(){function e(){!function(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}(this,e),this.usedNamespaces={}}var n,t,r;return n=e,(t=[{key:"addUsedNamespaces",value:function(e){var n=this;e.forEach((function(e){n.usedNamespaces[e]||(n.usedNamespaces[e]=!0)}))}},{key:"getUsedNamespaces",value:function(){return Object.keys(this.usedNamespaces)}}])&&i(n.prototype,t),r&&i(n,r),e}();function N(e){h=e}function k(){return h}var I={type:"3rdParty",init:function(e){j(e.options.react),N(e)}};function P(e){return function(n){return new Promise((function(t){var a=R();e.getInitialProps?e.getInitialProps(n).then((function(e){t(r(r({},e),a))})):t(a)}))}}function R(){var e=k(),n=e.reportNamespaces?e.reportNamespaces.getUsedNamespaces():[],t={},r={};return e.languages.forEach((function(t){r[t]={},n.forEach((function(n){r[t][n]=e.getResourceBundle(t,n)||{}}))})),t.initialI18nStore=r,t.initialLanguage=e.language,t}function C(){if(console&&console.warn){for(var e,n=arguments.length,t=new Array(n),r=0;r<n;r++)t[r]=arguments[r];"string"==typeof t[0]&&(t[0]="react-i18next:: ".concat(t[0])),(e=console).warn.apply(e,t)}}var T={};function A(){for(var e=arguments.length,n=new Array(e),t=0;t<e;t++)n[t]=arguments[t];"string"==typeof n[0]&&T[n[0]]||("string"==typeof n[0]&&(T[n[0]]=new Date),C.apply(void 0,n))}function L(e,n,t){e.loadNamespaces(n,(function(){if(e.isInitialized)t();else{e.on("initialized",(function n(){setTimeout((function(){e.off("initialized",n)}),0),t()}))}}))}function z(e,n){var t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=n.languages[0],a=!!n.options&&n.options.fallbackLng,i=n.languages[n.languages.length-1];if("cimode"===r.toLowerCase())return!0;var o=function(e,t){var r=n.services.backendConnector.state["".concat(e,"|").concat(t)];return-1===r||2===r};return!(t.bindI18n&&t.bindI18n.indexOf("languageChanging")>-1&&n.services.backendConnector.backend&&n.isLanguageChangingTo&&!o(n.isLanguageChangingTo,e))&&(!!n.hasResourceBundle(r,e)||(!(n.services.backendConnector.backend&&(!n.options.resources||n.options.partialBundledLanguages))||!(!o(r,e)||a&&!o(i,e))))}function B(e,n){var t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(!n.languages||!n.languages.length)return A("i18n.languages were undefined or empty",n.languages),!0;var r=void 0!==n.options.ignoreJSONStructure;return r?n.hasLoadedNamespace(e,{precheck:function(n,r){if(t.bindI18n&&t.bindI18n.indexOf("languageChanging")>-1&&n.services.backendConnector.backend&&n.isLanguageChangingTo&&!r(n.isLanguageChangingTo,e))return!1}}):z(e,n,t)}function U(e){return e.displayName||e.name||("string"==typeof e&&e.length>0?e:"Unknown")}var D=["format"],H=["children","count","parent","i18nKey","context","tOptions","values","defaults","components","ns","i18n","t","shouldUnescape"];function K(e,n){if(!e)return!1;var t=e.props?e.props.children:e.children;return n?t.length>0:!!t}function V(e){return e?e&&e.children?e.children:e.props&&e.props.children:[]}function F(e){return Array.isArray(e)?e:[e]}function W(e,t,i,o,c,s){if(""===t)return[];var u=o.transKeepBasicHtmlNodesFor||[],l=t&&new RegExp(u.join("|")).test(t);if(!e&&!l)return[t];var f={};!function e(t){F(t).forEach((function(t){"string"!=typeof t&&(K(t)?e(V(t)):"object"!==a(t)||n.isValidElement(t)||Object.assign(f,t))}))}(e);var p=v("<0>".concat(t,"</0>")),d=r(r({},f),c);function g(e,t,r){var a=V(e),i=h(a,t.children,r);return function(e){return"[object Array]"===Object.prototype.toString.call(e)&&e.every((function(e){return n.isValidElement(e)}))}(a)&&0===i.length?a:i}function m(e,t,a,i,o){e.dummy&&(e.children=t),a.push(n.cloneElement(e,r(r({},e.props),{},{key:i}),o?void 0:t))}function h(t,c,f){var p=F(t);return F(c).reduce((function(t,c,v){var y,b,O,x=c.children&&c.children[0]&&c.children[0].content&&i.services.interpolator.interpolate(c.children[0].content,d,i.language);if("tag"===c.type){var w=p[parseInt(c.name,10)];!w&&1===f.length&&f[0][c.name]&&(w=f[0][c.name]),w||(w={});var j=0!==Object.keys(c.attrs).length?(y={props:c.attrs},(O=r({},b=w)).props=Object.assign(y.props,b.props),O):w,E=n.isValidElement(j),S=E&&K(c,!0)&&!c.voidElement,N=l&&"object"===a(j)&&j.dummy&&!E,k="object"===a(e)&&null!==e&&Object.hasOwnProperty.call(e,c.name);if("string"==typeof j){var I=i.services.interpolator.interpolate(j,d,i.language);t.push(I)}else if(K(j)||S){m(j,g(j,c,f),t,v)}else if(N){var P=h(p,c.children,f);t.push(n.cloneElement(j,r(r({},j.props),{},{key:v}),P))}else if(Number.isNaN(parseFloat(c.name))){if(k)m(j,g(j,c,f),t,v,c.voidElement);else if(o.transSupportBasicHtmlNodes&&u.indexOf(c.name)>-1)if(c.voidElement)t.push(n.createElement(c.name,{key:"".concat(c.name,"-").concat(v)}));else{var R=h(p,c.children,f);t.push(n.createElement(c.name,{key:"".concat(c.name,"-").concat(v)},R))}else if(c.voidElement)t.push("<".concat(c.name," />"));else{var C=h(p,c.children,f);t.push("<".concat(c.name,">").concat(C,"</").concat(c.name,">"))}}else if("object"!==a(j)||E)1===c.children.length&&x?t.push(n.cloneElement(j,r(r({},j.props),{},{key:v}),x)):t.push(n.cloneElement(j,r(r({},j.props),{},{key:v})));else{var T=c.children[0]?x:null;T&&t.push(T)}}else if("text"===c.type){var A=o.transWrapTextNodes,L=s?o.unescape(i.services.interpolator.interpolate(c.content,d,i.language)):i.services.interpolator.interpolate(c.content,d,i.language);A?t.push(n.createElement(A,{key:"".concat(c.name,"-").concat(v)},L)):t.push(L)}return t}),[])}return V(h([{dummy:!0,children:e||[]}],p,F(e||[]))[0])}var M=function(e,t){var r=n.useRef();return n.useEffect((function(){r.current=t?r.current:e}),[e,t]),r.current};function $(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},a=t.i18n,i=n.useContext(w)||{},o=i.i18n,c=i.defaultNS,u=a||o||k();if(u&&!u.reportNamespaces&&(u.reportNamespaces=new S),!u){A("You will need to pass in an i18next instance by using initReactI18next");var l=function(e){return Array.isArray(e)?e[e.length-1]:e},f=[l,{},!1];return f.t=l,f.i18n={},f.ready=!1,f}u.options.react&&void 0!==u.options.react.wait&&A("It seems you are still using the old wait option, you may migrate to the new useSuspense behaviour.");var p=r(r(r({},E()),u.options.react),t),d=p.useSuspense,g=p.keyPrefix,m=e||c||u.options&&u.options.defaultNS;m="string"==typeof m?[m]:m||["translation"],u.reportNamespaces.addUsedNamespaces&&u.reportNamespaces.addUsedNamespaces(m);var h=(u.isInitialized||u.initializedStoreOnce)&&m.every((function(e){return B(e,u,p)}));function v(){return u.getFixedT(null,"fallback"===p.nsMode?m:m[0],g)}var y=n.useState(v),b=s(y,2),O=b[0],x=b[1],j=m.join(),N=M(j),I=n.useRef(!0);n.useEffect((function(){var e=p.bindI18n,n=p.bindI18nStore;function t(){I.current&&x(v)}return I.current=!0,h||d||L(u,m,(function(){I.current&&x(v)})),h&&N&&N!==j&&I.current&&x(v),e&&u&&u.on(e,t),n&&u&&u.store.on(n,t),function(){I.current=!1,e&&u&&e.split(" ").forEach((function(e){return u.off(e,t)})),n&&u&&n.split(" ").forEach((function(e){return u.store.off(e,t)}))}}),[u,j]);var P=n.useRef(!0);n.useEffect((function(){I.current&&!P.current&&x(v),P.current=!1}),[u]);var R=[O,u,h];if(R.t=O,R.i18n=u,R.ready=h,h)return R;if(!h&&!d)return R;throw new Promise((function(e){L(u,m,(function(){e()}))}))}var q=["forwardedRef"];var Y=["ns","children"];function _(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},a=r.i18n,i=n.useContext(w)||{},o=i.i18n,c=a||o||k();c.options&&c.options.isClone||(e&&!c.initializedStoreOnce&&(c.services.resourceStore.data=e,c.options.ns=Object.values(e).reduce((function(e,n){return Object.keys(n).forEach((function(n){e.indexOf(n)<0&&e.push(n)})),e}),c.options.ns),c.initializedStoreOnce=!0,c.isInitialized=!0),t&&!c.initializedLanguageOnce&&(c.changeLanguage(t),c.initializedLanguageOnce=!0))}var J=["initialI18nStore","initialLanguage"];e.I18nContext=w,e.I18nextProvider=function(e){var t=e.i18n,r=e.defaultNS,a=e.children,i=n.useMemo((function(){return{i18n:t,defaultNS:r}}),[t,r]);return n.createElement(w.Provider,{value:i},a)},e.Trans=function(e){var t=e.children,i=e.count,o=e.parent,s=e.i18nKey,u=e.context,l=e.tOptions,f=void 0===l?{}:l,p=e.values,d=e.defaults,g=e.components,m=e.ns,h=e.i18n,v=e.t,y=e.shouldUnescape,b=c(e,H),O=n.useContext(w)||{},x=O.i18n,j=O.defaultNS,S=h||x||k();if(!S)return A("You will need to pass in an i18next instance by using i18nextReactModule"),t;var N=v||S.t.bind(S)||function(e){return e};u&&(f.context=u);var I=r(r({},E()),S.options&&S.options.react),P=m||N.ns||j||S.options&&S.options.defaultNS;P="string"==typeof P?[P]:P||["translation"];var R=d||function e(t,r){if(!t)return"";var i="",o=F(t),s=r.transSupportBasicHtmlNodes&&r.transKeepBasicHtmlNodesFor?r.transKeepBasicHtmlNodesFor:[];return o.forEach((function(t,o){if("string"==typeof t)i+="".concat(t);else if(n.isValidElement(t)){var u=Object.keys(t.props).length,l=s.indexOf(t.type)>-1,f=t.props.children;if(!f&&l&&0===u)i+="<".concat(t.type,"/>");else if(f||l&&0===u)if(t.props.i18nIsDynamicList)i+="<".concat(o,"></").concat(o,">");else if(l&&1===u&&"string"==typeof f)i+="<".concat(t.type,">").concat(f,"</").concat(t.type,">");else{var p=e(f,r);i+="<".concat(o,">").concat(p,"</").concat(o,">")}else i+="<".concat(o,"></").concat(o,">")}else if(null===t)C("Trans: the passed in value is invalid - seems you passed in a null child.");else if("object"===a(t)){var d=t.format,g=c(t,D),m=Object.keys(g);if(1===m.length){var h=d?"".concat(m[0],", ").concat(d):m[0];i+="{{".concat(h,"}}")}else C("react-i18next: the passed in object contained more than one variable - the object should look like {{ value, format }} where format is optional.",t)}else C("Trans: the passed in value is invalid - seems you passed in a variable like {number} - please pass in variables for interpolation as full objects like {{number}}.",t)})),i}(t,I)||I.transEmptyNodeValue||s,T=I.hashTransKey,L=s||(T?T(R):R),z=p?f.interpolation:{interpolation:r(r({},f.interpolation),{},{prefix:"#$?",suffix:"?$#"})},B=r(r(r(r({},f),{},{count:i},p),z),{},{defaultValue:R,ns:P}),U=W(g||t,L?N(L,B):R,S,I,B,y),K=void 0!==o?o:I.defaultTransParent;return K?n.createElement(K,b,U):U},e.Translation=function(e){var n=e.ns,t=e.children,r=s($(n,c(e,Y)),3),a=r[0],i=r[1],o=r[2];return t(a,{i18n:i,lng:i.language},o)},e.composeInitialProps=P,e.date=function(){return""},e.getDefaults=E,e.getI18n=k,e.getInitialProps=R,e.initReactI18next=I,e.number=function(){return""},e.plural=function(){return""},e.select=function(){return""},e.selectOrdinal=function(){return""},e.setDefaults=j,e.setI18n=N,e.time=function(){return""},e.useSSR=_,e.useTranslation=$,e.withSSR=function(){return function(e){function t(t){var a=t.initialI18nStore,i=t.initialLanguage,o=c(t,J);return _(a,i),n.createElement(e,r({},o))}return t.getInitialProps=P(e),t.displayName="withI18nextSSR(".concat(U(e),")"),t.WrappedComponent=e,t}},e.withTranslation=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return function(a){function i(i){var o=i.forwardedRef,u=c(i,q),l=s($(e,r(r({},u),{},{keyPrefix:t.keyPrefix})),3),f=l[0],p=l[1],d=l[2],g=r(r({},u),{},{t:f,i18n:p,tReady:d});return t.withRef&&o?g.ref=o:!t.withRef&&o&&(g.forwardedRef=o),n.createElement(a,g)}i.displayName="withI18nextTranslation(".concat(U(a),")"),i.WrappedComponent=a;return t.withRef?n.forwardRef((function(e,t){return n.createElement(i,Object.assign({},e,{forwardedRef:t}))})):i}},Object.defineProperty(e,"__esModule",{value:!0})}));
{
"name": "react-i18next",
"version": "11.18.1",
"version": "11.18.2",
"description": "Internationalization for react done right. Using the i18next i18n ecosystem.",

@@ -5,0 +5,0 @@ "main": "dist/commonjs/index.js",

@@ -321,3 +321,3 @@ (function (global, factory) {

var matchHtmlEntity = /&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34);/g;
var matchHtmlEntity = /&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230);/g;
var htmlEntities = {

@@ -333,3 +333,11 @@ '&amp;': '&',

'&quot;': '"',
'&#34;': '"'
'&#34;': '"',
'&nbsp;': ' ',
'&#160;': ' ',
'&copy;': '©',
'&#169;': '©',
'&reg;': '®',
'&#174;': '®',
'&hellip;': '…',
'&#8230;': '…'
};

@@ -336,0 +344,0 @@

@@ -1,1 +0,1 @@

!function(e,n){"object"==typeof exports&&"undefined"!=typeof module?n(exports,require("react")):"function"==typeof define&&define.amd?define(["exports","react"],n):n((e=e||self).ReactI18next={},e.React)}(this,(function(e,n){"use strict";function t(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function r(e){for(var n=1;n<arguments.length;n++){var r=null!=arguments[n]?arguments[n]:{};n%2?t(Object(r),!0).forEach((function(n){o(e,n,r[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):t(Object(r)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))}))}return e}function a(e){return(a="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 i(e,n){for(var t=0;t<n.length;t++){var r=n[t];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function o(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function c(e,n){if(null==e)return{};var t,r,a=function(e,n){if(null==e)return{};var t,r,a={},i=Object.keys(e);for(r=0;r<i.length;r++)t=i[r],n.indexOf(t)>=0||(a[t]=e[t]);return a}(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)t=i[r],n.indexOf(t)>=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(a[t]=e[t])}return a}function s(e,n){return function(e){if(Array.isArray(e))return e}(e)||function(e,n){var t=e&&("undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"]);if(null==t)return;var r,a,i=[],o=!0,c=!1;try{for(t=t.call(e);!(o=(r=t.next()).done)&&(i.push(r.value),!n||i.length!==n);o=!0);}catch(e){c=!0,a=e}finally{try{o||null==t.return||t.return()}finally{if(c)throw a}}return i}(e,n)||function(e,n){if(!e)return;if("string"==typeof e)return u(e,n);var t=Object.prototype.toString.call(e).slice(8,-1);"Object"===t&&e.constructor&&(t=e.constructor.name);if("Map"===t||"Set"===t)return Array.from(e);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return u(e,n)}(e,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function u(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=new Array(n);t<n;t++)r[t]=e[t];return r}var l={area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0},f=/\s([^'"/\s><]+?)[\s/>]|([^\s=]+)=\s?(".*?"|'.*?')/g;function p(e){var n={type:"tag",name:"",voidElement:!1,attrs:{},children:[]},t=e.match(/<\/?([^\s]+?)[/\s>]/);if(t&&(n.name=t[1],(l[t[1]]||"/"===e.charAt(e.length-2))&&(n.voidElement=!0),n.name.startsWith("!--"))){var r=e.indexOf("--\x3e");return{type:"comment",comment:-1!==r?e.slice(4,r):""}}for(var a=new RegExp(f),i=null;null!==(i=a.exec(e));)if(i[0].trim())if(i[1]){var o=i[1].trim(),c=[o,""];o.indexOf("=")>-1&&(c=o.split("=")),n.attrs[c[0]]=c[1],a.lastIndex--}else i[2]&&(n.attrs[i[2]]=i[3].trim().substring(1,i[3].length-1));return n}var d=/<[a-zA-Z0-9\-\!\/](?:"[^"]*"|'[^']*'|[^'">])*>/g,g=/^\s*$/,m=Object.create(null);var h,v=function(e,n){n||(n={}),n.components||(n.components=m);var t,r=[],a=[],i=-1,o=!1;if(0!==e.indexOf("<")){var c=e.indexOf("<");r.push({type:"text",content:-1===c?e:e.substring(0,c)})}return e.replace(d,(function(c,s){if(o){if(c!=="</"+t.name+">")return;o=!1}var u,l="/"!==c.charAt(1),f=c.startsWith("\x3c!--"),d=s+c.length,m=e.charAt(d);if(f){var h=p(c);return i<0?(r.push(h),r):((u=a[i]).children.push(h),r)}if(l&&(i++,"tag"===(t=p(c)).type&&n.components[t.name]&&(t.type="component",o=!0),t.voidElement||o||!m||"<"===m||t.children.push({type:"text",content:e.slice(d,e.indexOf("<",d))}),0===i&&r.push(t),(u=a[i-1])&&u.children.push(t),a[i]=t),(!l||t.voidElement)&&(i>-1&&(t.voidElement||t.name===c.slice(2,-1))&&(i--,t=-1===i?r:a[i]),!o&&"<"!==m&&m)){u=-1===i?r:a[i].children;var v=e.indexOf("<",d),y=e.slice(d,-1===v?void 0:v);g.test(y)&&(y=" "),(v>-1&&i+u.length>=0||" "!==y)&&u.push({type:"text",content:y})}})),r},y=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34);/g,b={"&amp;":"&","&#38;":"&","&lt;":"<","&#60;":"<","&gt;":">","&#62;":">","&apos;":"'","&#39;":"'","&quot;":'"',"&#34;":'"'},O=function(e){return b[e]},x={bindI18n:"languageChanged",bindI18nStore:"",transEmptyNodeValue:"",transSupportBasicHtmlNodes:!0,transWrapTextNodes:"",transKeepBasicHtmlNodesFor:["br","strong","i","p"],useSuspense:!0,unescape:function(e){return e.replace(y,O)}},w=n.createContext();function j(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};x=r(r({},x),e)}function E(){return x}var S=function(){function e(){!function(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}(this,e),this.usedNamespaces={}}var n,t,r;return n=e,(t=[{key:"addUsedNamespaces",value:function(e){var n=this;e.forEach((function(e){n.usedNamespaces[e]||(n.usedNamespaces[e]=!0)}))}},{key:"getUsedNamespaces",value:function(){return Object.keys(this.usedNamespaces)}}])&&i(n.prototype,t),r&&i(n,r),e}();function N(e){h=e}function k(){return h}var I={type:"3rdParty",init:function(e){j(e.options.react),N(e)}};function P(e){return function(n){return new Promise((function(t){var a=R();e.getInitialProps?e.getInitialProps(n).then((function(e){t(r(r({},e),a))})):t(a)}))}}function R(){var e=k(),n=e.reportNamespaces?e.reportNamespaces.getUsedNamespaces():[],t={},r={};return e.languages.forEach((function(t){r[t]={},n.forEach((function(n){r[t][n]=e.getResourceBundle(t,n)||{}}))})),t.initialI18nStore=r,t.initialLanguage=e.language,t}function C(){if(console&&console.warn){for(var e,n=arguments.length,t=new Array(n),r=0;r<n;r++)t[r]=arguments[r];"string"==typeof t[0]&&(t[0]="react-i18next:: ".concat(t[0])),(e=console).warn.apply(e,t)}}var T={};function A(){for(var e=arguments.length,n=new Array(e),t=0;t<e;t++)n[t]=arguments[t];"string"==typeof n[0]&&T[n[0]]||("string"==typeof n[0]&&(T[n[0]]=new Date),C.apply(void 0,n))}function L(e,n,t){e.loadNamespaces(n,(function(){if(e.isInitialized)t();else{e.on("initialized",(function n(){setTimeout((function(){e.off("initialized",n)}),0),t()}))}}))}function z(e,n){var t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=n.languages[0],a=!!n.options&&n.options.fallbackLng,i=n.languages[n.languages.length-1];if("cimode"===r.toLowerCase())return!0;var o=function(e,t){var r=n.services.backendConnector.state["".concat(e,"|").concat(t)];return-1===r||2===r};return!(t.bindI18n&&t.bindI18n.indexOf("languageChanging")>-1&&n.services.backendConnector.backend&&n.isLanguageChangingTo&&!o(n.isLanguageChangingTo,e))&&(!!n.hasResourceBundle(r,e)||(!(n.services.backendConnector.backend&&(!n.options.resources||n.options.partialBundledLanguages))||!(!o(r,e)||a&&!o(i,e))))}function B(e,n){var t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(!n.languages||!n.languages.length)return A("i18n.languages were undefined or empty",n.languages),!0;var r=void 0!==n.options.ignoreJSONStructure;return r?n.hasLoadedNamespace(e,{precheck:function(n,r){if(t.bindI18n&&t.bindI18n.indexOf("languageChanging")>-1&&n.services.backendConnector.backend&&n.isLanguageChangingTo&&!r(n.isLanguageChangingTo,e))return!1}}):z(e,n,t)}function U(e){return e.displayName||e.name||("string"==typeof e&&e.length>0?e:"Unknown")}var D=["format"],H=["children","count","parent","i18nKey","context","tOptions","values","defaults","components","ns","i18n","t","shouldUnescape"];function K(e,n){if(!e)return!1;var t=e.props?e.props.children:e.children;return n?t.length>0:!!t}function V(e){return e?e&&e.children?e.children:e.props&&e.props.children:[]}function F(e){return Array.isArray(e)?e:[e]}function W(e,t,i,o,c,s){if(""===t)return[];var u=o.transKeepBasicHtmlNodesFor||[],l=t&&new RegExp(u.join("|")).test(t);if(!e&&!l)return[t];var f={};!function e(t){F(t).forEach((function(t){"string"!=typeof t&&(K(t)?e(V(t)):"object"!==a(t)||n.isValidElement(t)||Object.assign(f,t))}))}(e);var p=v("<0>".concat(t,"</0>")),d=r(r({},f),c);function g(e,t,r){var a=V(e),i=h(a,t.children,r);return function(e){return"[object Array]"===Object.prototype.toString.call(e)&&e.every((function(e){return n.isValidElement(e)}))}(a)&&0===i.length?a:i}function m(e,t,a,i,o){e.dummy&&(e.children=t),a.push(n.cloneElement(e,r(r({},e.props),{},{key:i}),o?void 0:t))}function h(t,c,f){var p=F(t);return F(c).reduce((function(t,c,v){var y,b,O,x=c.children&&c.children[0]&&c.children[0].content&&i.services.interpolator.interpolate(c.children[0].content,d,i.language);if("tag"===c.type){var w=p[parseInt(c.name,10)];!w&&1===f.length&&f[0][c.name]&&(w=f[0][c.name]),w||(w={});var j=0!==Object.keys(c.attrs).length?(y={props:c.attrs},(O=r({},b=w)).props=Object.assign(y.props,b.props),O):w,E=n.isValidElement(j),S=E&&K(c,!0)&&!c.voidElement,N=l&&"object"===a(j)&&j.dummy&&!E,k="object"===a(e)&&null!==e&&Object.hasOwnProperty.call(e,c.name);if("string"==typeof j){var I=i.services.interpolator.interpolate(j,d,i.language);t.push(I)}else if(K(j)||S){m(j,g(j,c,f),t,v)}else if(N){var P=h(p,c.children,f);t.push(n.cloneElement(j,r(r({},j.props),{},{key:v}),P))}else if(Number.isNaN(parseFloat(c.name))){if(k)m(j,g(j,c,f),t,v,c.voidElement);else if(o.transSupportBasicHtmlNodes&&u.indexOf(c.name)>-1)if(c.voidElement)t.push(n.createElement(c.name,{key:"".concat(c.name,"-").concat(v)}));else{var R=h(p,c.children,f);t.push(n.createElement(c.name,{key:"".concat(c.name,"-").concat(v)},R))}else if(c.voidElement)t.push("<".concat(c.name," />"));else{var C=h(p,c.children,f);t.push("<".concat(c.name,">").concat(C,"</").concat(c.name,">"))}}else if("object"!==a(j)||E)1===c.children.length&&x?t.push(n.cloneElement(j,r(r({},j.props),{},{key:v}),x)):t.push(n.cloneElement(j,r(r({},j.props),{},{key:v})));else{var T=c.children[0]?x:null;T&&t.push(T)}}else if("text"===c.type){var A=o.transWrapTextNodes,L=s?o.unescape(i.services.interpolator.interpolate(c.content,d,i.language)):i.services.interpolator.interpolate(c.content,d,i.language);A?t.push(n.createElement(A,{key:"".concat(c.name,"-").concat(v)},L)):t.push(L)}return t}),[])}return V(h([{dummy:!0,children:e||[]}],p,F(e||[]))[0])}var M=function(e,t){var r=n.useRef();return n.useEffect((function(){r.current=t?r.current:e}),[e,t]),r.current};function $(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},a=t.i18n,i=n.useContext(w)||{},o=i.i18n,c=i.defaultNS,u=a||o||k();if(u&&!u.reportNamespaces&&(u.reportNamespaces=new S),!u){A("You will need to pass in an i18next instance by using initReactI18next");var l=function(e){return Array.isArray(e)?e[e.length-1]:e},f=[l,{},!1];return f.t=l,f.i18n={},f.ready=!1,f}u.options.react&&void 0!==u.options.react.wait&&A("It seems you are still using the old wait option, you may migrate to the new useSuspense behaviour.");var p=r(r(r({},E()),u.options.react),t),d=p.useSuspense,g=p.keyPrefix,m=e||c||u.options&&u.options.defaultNS;m="string"==typeof m?[m]:m||["translation"],u.reportNamespaces.addUsedNamespaces&&u.reportNamespaces.addUsedNamespaces(m);var h=(u.isInitialized||u.initializedStoreOnce)&&m.every((function(e){return B(e,u,p)}));function v(){return u.getFixedT(null,"fallback"===p.nsMode?m:m[0],g)}var y=n.useState(v),b=s(y,2),O=b[0],x=b[1],j=m.join(),N=M(j),I=n.useRef(!0);n.useEffect((function(){var e=p.bindI18n,n=p.bindI18nStore;function t(){I.current&&x(v)}return I.current=!0,h||d||L(u,m,(function(){I.current&&x(v)})),h&&N&&N!==j&&I.current&&x(v),e&&u&&u.on(e,t),n&&u&&u.store.on(n,t),function(){I.current=!1,e&&u&&e.split(" ").forEach((function(e){return u.off(e,t)})),n&&u&&n.split(" ").forEach((function(e){return u.store.off(e,t)}))}}),[u,j]);var P=n.useRef(!0);n.useEffect((function(){I.current&&!P.current&&x(v),P.current=!1}),[u]);var R=[O,u,h];if(R.t=O,R.i18n=u,R.ready=h,h)return R;if(!h&&!d)return R;throw new Promise((function(e){L(u,m,(function(){e()}))}))}var q=["forwardedRef"];var Y=["ns","children"];function _(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},a=r.i18n,i=n.useContext(w)||{},o=i.i18n,c=a||o||k();c.options&&c.options.isClone||(e&&!c.initializedStoreOnce&&(c.services.resourceStore.data=e,c.options.ns=Object.values(e).reduce((function(e,n){return Object.keys(n).forEach((function(n){e.indexOf(n)<0&&e.push(n)})),e}),c.options.ns),c.initializedStoreOnce=!0,c.isInitialized=!0),t&&!c.initializedLanguageOnce&&(c.changeLanguage(t),c.initializedLanguageOnce=!0))}var J=["initialI18nStore","initialLanguage"];e.I18nContext=w,e.I18nextProvider=function(e){var t=e.i18n,r=e.defaultNS,a=e.children,i=n.useMemo((function(){return{i18n:t,defaultNS:r}}),[t,r]);return n.createElement(w.Provider,{value:i},a)},e.Trans=function(e){var t=e.children,i=e.count,o=e.parent,s=e.i18nKey,u=e.context,l=e.tOptions,f=void 0===l?{}:l,p=e.values,d=e.defaults,g=e.components,m=e.ns,h=e.i18n,v=e.t,y=e.shouldUnescape,b=c(e,H),O=n.useContext(w)||{},x=O.i18n,j=O.defaultNS,S=h||x||k();if(!S)return A("You will need to pass in an i18next instance by using i18nextReactModule"),t;var N=v||S.t.bind(S)||function(e){return e};u&&(f.context=u);var I=r(r({},E()),S.options&&S.options.react),P=m||N.ns||j||S.options&&S.options.defaultNS;P="string"==typeof P?[P]:P||["translation"];var R=d||function e(t,r){if(!t)return"";var i="",o=F(t),s=r.transSupportBasicHtmlNodes&&r.transKeepBasicHtmlNodesFor?r.transKeepBasicHtmlNodesFor:[];return o.forEach((function(t,o){if("string"==typeof t)i+="".concat(t);else if(n.isValidElement(t)){var u=Object.keys(t.props).length,l=s.indexOf(t.type)>-1,f=t.props.children;if(!f&&l&&0===u)i+="<".concat(t.type,"/>");else if(f||l&&0===u)if(t.props.i18nIsDynamicList)i+="<".concat(o,"></").concat(o,">");else if(l&&1===u&&"string"==typeof f)i+="<".concat(t.type,">").concat(f,"</").concat(t.type,">");else{var p=e(f,r);i+="<".concat(o,">").concat(p,"</").concat(o,">")}else i+="<".concat(o,"></").concat(o,">")}else if(null===t)C("Trans: the passed in value is invalid - seems you passed in a null child.");else if("object"===a(t)){var d=t.format,g=c(t,D),m=Object.keys(g);if(1===m.length){var h=d?"".concat(m[0],", ").concat(d):m[0];i+="{{".concat(h,"}}")}else C("react-i18next: the passed in object contained more than one variable - the object should look like {{ value, format }} where format is optional.",t)}else C("Trans: the passed in value is invalid - seems you passed in a variable like {number} - please pass in variables for interpolation as full objects like {{number}}.",t)})),i}(t,I)||I.transEmptyNodeValue||s,T=I.hashTransKey,L=s||(T?T(R):R),z=p?f.interpolation:{interpolation:r(r({},f.interpolation),{},{prefix:"#$?",suffix:"?$#"})},B=r(r(r(r({},f),{},{count:i},p),z),{},{defaultValue:R,ns:P}),U=W(g||t,L?N(L,B):R,S,I,B,y),K=void 0!==o?o:I.defaultTransParent;return K?n.createElement(K,b,U):U},e.Translation=function(e){var n=e.ns,t=e.children,r=s($(n,c(e,Y)),3),a=r[0],i=r[1],o=r[2];return t(a,{i18n:i,lng:i.language},o)},e.composeInitialProps=P,e.date=function(){return""},e.getDefaults=E,e.getI18n=k,e.getInitialProps=R,e.initReactI18next=I,e.number=function(){return""},e.plural=function(){return""},e.select=function(){return""},e.selectOrdinal=function(){return""},e.setDefaults=j,e.setI18n=N,e.time=function(){return""},e.useSSR=_,e.useTranslation=$,e.withSSR=function(){return function(e){function t(t){var a=t.initialI18nStore,i=t.initialLanguage,o=c(t,J);return _(a,i),n.createElement(e,r({},o))}return t.getInitialProps=P(e),t.displayName="withI18nextSSR(".concat(U(e),")"),t.WrappedComponent=e,t}},e.withTranslation=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return function(a){function i(i){var o=i.forwardedRef,u=c(i,q),l=s($(e,r(r({},u),{},{keyPrefix:t.keyPrefix})),3),f=l[0],p=l[1],d=l[2],g=r(r({},u),{},{t:f,i18n:p,tReady:d});return t.withRef&&o?g.ref=o:!t.withRef&&o&&(g.forwardedRef=o),n.createElement(a,g)}i.displayName="withI18nextTranslation(".concat(U(a),")"),i.WrappedComponent=a;return t.withRef?n.forwardRef((function(e,t){return n.createElement(i,Object.assign({},e,{forwardedRef:t}))})):i}},Object.defineProperty(e,"__esModule",{value:!0})}));
!function(e,n){"object"==typeof exports&&"undefined"!=typeof module?n(exports,require("react")):"function"==typeof define&&define.amd?define(["exports","react"],n):n((e=e||self).ReactI18next={},e.React)}(this,(function(e,n){"use strict";function t(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function r(e){for(var n=1;n<arguments.length;n++){var r=null!=arguments[n]?arguments[n]:{};n%2?t(Object(r),!0).forEach((function(n){o(e,n,r[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):t(Object(r)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))}))}return e}function a(e){return(a="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 i(e,n){for(var t=0;t<n.length;t++){var r=n[t];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function o(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function c(e,n){if(null==e)return{};var t,r,a=function(e,n){if(null==e)return{};var t,r,a={},i=Object.keys(e);for(r=0;r<i.length;r++)t=i[r],n.indexOf(t)>=0||(a[t]=e[t]);return a}(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)t=i[r],n.indexOf(t)>=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(a[t]=e[t])}return a}function s(e,n){return function(e){if(Array.isArray(e))return e}(e)||function(e,n){var t=e&&("undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"]);if(null==t)return;var r,a,i=[],o=!0,c=!1;try{for(t=t.call(e);!(o=(r=t.next()).done)&&(i.push(r.value),!n||i.length!==n);o=!0);}catch(e){c=!0,a=e}finally{try{o||null==t.return||t.return()}finally{if(c)throw a}}return i}(e,n)||function(e,n){if(!e)return;if("string"==typeof e)return u(e,n);var t=Object.prototype.toString.call(e).slice(8,-1);"Object"===t&&e.constructor&&(t=e.constructor.name);if("Map"===t||"Set"===t)return Array.from(e);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return u(e,n)}(e,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function u(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=new Array(n);t<n;t++)r[t]=e[t];return r}var l={area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0},f=/\s([^'"/\s><]+?)[\s/>]|([^\s=]+)=\s?(".*?"|'.*?')/g;function p(e){var n={type:"tag",name:"",voidElement:!1,attrs:{},children:[]},t=e.match(/<\/?([^\s]+?)[/\s>]/);if(t&&(n.name=t[1],(l[t[1]]||"/"===e.charAt(e.length-2))&&(n.voidElement=!0),n.name.startsWith("!--"))){var r=e.indexOf("--\x3e");return{type:"comment",comment:-1!==r?e.slice(4,r):""}}for(var a=new RegExp(f),i=null;null!==(i=a.exec(e));)if(i[0].trim())if(i[1]){var o=i[1].trim(),c=[o,""];o.indexOf("=")>-1&&(c=o.split("=")),n.attrs[c[0]]=c[1],a.lastIndex--}else i[2]&&(n.attrs[i[2]]=i[3].trim().substring(1,i[3].length-1));return n}var d=/<[a-zA-Z0-9\-\!\/](?:"[^"]*"|'[^']*'|[^'">])*>/g,g=/^\s*$/,m=Object.create(null);var h,v=function(e,n){n||(n={}),n.components||(n.components=m);var t,r=[],a=[],i=-1,o=!1;if(0!==e.indexOf("<")){var c=e.indexOf("<");r.push({type:"text",content:-1===c?e:e.substring(0,c)})}return e.replace(d,(function(c,s){if(o){if(c!=="</"+t.name+">")return;o=!1}var u,l="/"!==c.charAt(1),f=c.startsWith("\x3c!--"),d=s+c.length,m=e.charAt(d);if(f){var h=p(c);return i<0?(r.push(h),r):((u=a[i]).children.push(h),r)}if(l&&(i++,"tag"===(t=p(c)).type&&n.components[t.name]&&(t.type="component",o=!0),t.voidElement||o||!m||"<"===m||t.children.push({type:"text",content:e.slice(d,e.indexOf("<",d))}),0===i&&r.push(t),(u=a[i-1])&&u.children.push(t),a[i]=t),(!l||t.voidElement)&&(i>-1&&(t.voidElement||t.name===c.slice(2,-1))&&(i--,t=-1===i?r:a[i]),!o&&"<"!==m&&m)){u=-1===i?r:a[i].children;var v=e.indexOf("<",d),y=e.slice(d,-1===v?void 0:v);g.test(y)&&(y=" "),(v>-1&&i+u.length>=0||" "!==y)&&u.push({type:"text",content:y})}})),r},y=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230);/g,b={"&amp;":"&","&#38;":"&","&lt;":"<","&#60;":"<","&gt;":">","&#62;":">","&apos;":"'","&#39;":"'","&quot;":'"',"&#34;":'"',"&nbsp;":" ","&#160;":" ","&copy;":"©","&#169;":"©","&reg;":"®","&#174;":"®","&hellip;":"…","&#8230;":"…"},O=function(e){return b[e]},x={bindI18n:"languageChanged",bindI18nStore:"",transEmptyNodeValue:"",transSupportBasicHtmlNodes:!0,transWrapTextNodes:"",transKeepBasicHtmlNodesFor:["br","strong","i","p"],useSuspense:!0,unescape:function(e){return e.replace(y,O)}},w=n.createContext();function j(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};x=r(r({},x),e)}function E(){return x}var S=function(){function e(){!function(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}(this,e),this.usedNamespaces={}}var n,t,r;return n=e,(t=[{key:"addUsedNamespaces",value:function(e){var n=this;e.forEach((function(e){n.usedNamespaces[e]||(n.usedNamespaces[e]=!0)}))}},{key:"getUsedNamespaces",value:function(){return Object.keys(this.usedNamespaces)}}])&&i(n.prototype,t),r&&i(n,r),e}();function N(e){h=e}function k(){return h}var I={type:"3rdParty",init:function(e){j(e.options.react),N(e)}};function P(e){return function(n){return new Promise((function(t){var a=R();e.getInitialProps?e.getInitialProps(n).then((function(e){t(r(r({},e),a))})):t(a)}))}}function R(){var e=k(),n=e.reportNamespaces?e.reportNamespaces.getUsedNamespaces():[],t={},r={};return e.languages.forEach((function(t){r[t]={},n.forEach((function(n){r[t][n]=e.getResourceBundle(t,n)||{}}))})),t.initialI18nStore=r,t.initialLanguage=e.language,t}function C(){if(console&&console.warn){for(var e,n=arguments.length,t=new Array(n),r=0;r<n;r++)t[r]=arguments[r];"string"==typeof t[0]&&(t[0]="react-i18next:: ".concat(t[0])),(e=console).warn.apply(e,t)}}var T={};function A(){for(var e=arguments.length,n=new Array(e),t=0;t<e;t++)n[t]=arguments[t];"string"==typeof n[0]&&T[n[0]]||("string"==typeof n[0]&&(T[n[0]]=new Date),C.apply(void 0,n))}function L(e,n,t){e.loadNamespaces(n,(function(){if(e.isInitialized)t();else{e.on("initialized",(function n(){setTimeout((function(){e.off("initialized",n)}),0),t()}))}}))}function z(e,n){var t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=n.languages[0],a=!!n.options&&n.options.fallbackLng,i=n.languages[n.languages.length-1];if("cimode"===r.toLowerCase())return!0;var o=function(e,t){var r=n.services.backendConnector.state["".concat(e,"|").concat(t)];return-1===r||2===r};return!(t.bindI18n&&t.bindI18n.indexOf("languageChanging")>-1&&n.services.backendConnector.backend&&n.isLanguageChangingTo&&!o(n.isLanguageChangingTo,e))&&(!!n.hasResourceBundle(r,e)||(!(n.services.backendConnector.backend&&(!n.options.resources||n.options.partialBundledLanguages))||!(!o(r,e)||a&&!o(i,e))))}function B(e,n){var t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(!n.languages||!n.languages.length)return A("i18n.languages were undefined or empty",n.languages),!0;var r=void 0!==n.options.ignoreJSONStructure;return r?n.hasLoadedNamespace(e,{precheck:function(n,r){if(t.bindI18n&&t.bindI18n.indexOf("languageChanging")>-1&&n.services.backendConnector.backend&&n.isLanguageChangingTo&&!r(n.isLanguageChangingTo,e))return!1}}):z(e,n,t)}function U(e){return e.displayName||e.name||("string"==typeof e&&e.length>0?e:"Unknown")}var D=["format"],H=["children","count","parent","i18nKey","context","tOptions","values","defaults","components","ns","i18n","t","shouldUnescape"];function K(e,n){if(!e)return!1;var t=e.props?e.props.children:e.children;return n?t.length>0:!!t}function V(e){return e?e&&e.children?e.children:e.props&&e.props.children:[]}function F(e){return Array.isArray(e)?e:[e]}function W(e,t,i,o,c,s){if(""===t)return[];var u=o.transKeepBasicHtmlNodesFor||[],l=t&&new RegExp(u.join("|")).test(t);if(!e&&!l)return[t];var f={};!function e(t){F(t).forEach((function(t){"string"!=typeof t&&(K(t)?e(V(t)):"object"!==a(t)||n.isValidElement(t)||Object.assign(f,t))}))}(e);var p=v("<0>".concat(t,"</0>")),d=r(r({},f),c);function g(e,t,r){var a=V(e),i=h(a,t.children,r);return function(e){return"[object Array]"===Object.prototype.toString.call(e)&&e.every((function(e){return n.isValidElement(e)}))}(a)&&0===i.length?a:i}function m(e,t,a,i,o){e.dummy&&(e.children=t),a.push(n.cloneElement(e,r(r({},e.props),{},{key:i}),o?void 0:t))}function h(t,c,f){var p=F(t);return F(c).reduce((function(t,c,v){var y,b,O,x=c.children&&c.children[0]&&c.children[0].content&&i.services.interpolator.interpolate(c.children[0].content,d,i.language);if("tag"===c.type){var w=p[parseInt(c.name,10)];!w&&1===f.length&&f[0][c.name]&&(w=f[0][c.name]),w||(w={});var j=0!==Object.keys(c.attrs).length?(y={props:c.attrs},(O=r({},b=w)).props=Object.assign(y.props,b.props),O):w,E=n.isValidElement(j),S=E&&K(c,!0)&&!c.voidElement,N=l&&"object"===a(j)&&j.dummy&&!E,k="object"===a(e)&&null!==e&&Object.hasOwnProperty.call(e,c.name);if("string"==typeof j){var I=i.services.interpolator.interpolate(j,d,i.language);t.push(I)}else if(K(j)||S){m(j,g(j,c,f),t,v)}else if(N){var P=h(p,c.children,f);t.push(n.cloneElement(j,r(r({},j.props),{},{key:v}),P))}else if(Number.isNaN(parseFloat(c.name))){if(k)m(j,g(j,c,f),t,v,c.voidElement);else if(o.transSupportBasicHtmlNodes&&u.indexOf(c.name)>-1)if(c.voidElement)t.push(n.createElement(c.name,{key:"".concat(c.name,"-").concat(v)}));else{var R=h(p,c.children,f);t.push(n.createElement(c.name,{key:"".concat(c.name,"-").concat(v)},R))}else if(c.voidElement)t.push("<".concat(c.name," />"));else{var C=h(p,c.children,f);t.push("<".concat(c.name,">").concat(C,"</").concat(c.name,">"))}}else if("object"!==a(j)||E)1===c.children.length&&x?t.push(n.cloneElement(j,r(r({},j.props),{},{key:v}),x)):t.push(n.cloneElement(j,r(r({},j.props),{},{key:v})));else{var T=c.children[0]?x:null;T&&t.push(T)}}else if("text"===c.type){var A=o.transWrapTextNodes,L=s?o.unescape(i.services.interpolator.interpolate(c.content,d,i.language)):i.services.interpolator.interpolate(c.content,d,i.language);A?t.push(n.createElement(A,{key:"".concat(c.name,"-").concat(v)},L)):t.push(L)}return t}),[])}return V(h([{dummy:!0,children:e||[]}],p,F(e||[]))[0])}var M=function(e,t){var r=n.useRef();return n.useEffect((function(){r.current=t?r.current:e}),[e,t]),r.current};function $(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},a=t.i18n,i=n.useContext(w)||{},o=i.i18n,c=i.defaultNS,u=a||o||k();if(u&&!u.reportNamespaces&&(u.reportNamespaces=new S),!u){A("You will need to pass in an i18next instance by using initReactI18next");var l=function(e){return Array.isArray(e)?e[e.length-1]:e},f=[l,{},!1];return f.t=l,f.i18n={},f.ready=!1,f}u.options.react&&void 0!==u.options.react.wait&&A("It seems you are still using the old wait option, you may migrate to the new useSuspense behaviour.");var p=r(r(r({},E()),u.options.react),t),d=p.useSuspense,g=p.keyPrefix,m=e||c||u.options&&u.options.defaultNS;m="string"==typeof m?[m]:m||["translation"],u.reportNamespaces.addUsedNamespaces&&u.reportNamespaces.addUsedNamespaces(m);var h=(u.isInitialized||u.initializedStoreOnce)&&m.every((function(e){return B(e,u,p)}));function v(){return u.getFixedT(null,"fallback"===p.nsMode?m:m[0],g)}var y=n.useState(v),b=s(y,2),O=b[0],x=b[1],j=m.join(),N=M(j),I=n.useRef(!0);n.useEffect((function(){var e=p.bindI18n,n=p.bindI18nStore;function t(){I.current&&x(v)}return I.current=!0,h||d||L(u,m,(function(){I.current&&x(v)})),h&&N&&N!==j&&I.current&&x(v),e&&u&&u.on(e,t),n&&u&&u.store.on(n,t),function(){I.current=!1,e&&u&&e.split(" ").forEach((function(e){return u.off(e,t)})),n&&u&&n.split(" ").forEach((function(e){return u.store.off(e,t)}))}}),[u,j]);var P=n.useRef(!0);n.useEffect((function(){I.current&&!P.current&&x(v),P.current=!1}),[u]);var R=[O,u,h];if(R.t=O,R.i18n=u,R.ready=h,h)return R;if(!h&&!d)return R;throw new Promise((function(e){L(u,m,(function(){e()}))}))}var q=["forwardedRef"];var Y=["ns","children"];function _(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},a=r.i18n,i=n.useContext(w)||{},o=i.i18n,c=a||o||k();c.options&&c.options.isClone||(e&&!c.initializedStoreOnce&&(c.services.resourceStore.data=e,c.options.ns=Object.values(e).reduce((function(e,n){return Object.keys(n).forEach((function(n){e.indexOf(n)<0&&e.push(n)})),e}),c.options.ns),c.initializedStoreOnce=!0,c.isInitialized=!0),t&&!c.initializedLanguageOnce&&(c.changeLanguage(t),c.initializedLanguageOnce=!0))}var J=["initialI18nStore","initialLanguage"];e.I18nContext=w,e.I18nextProvider=function(e){var t=e.i18n,r=e.defaultNS,a=e.children,i=n.useMemo((function(){return{i18n:t,defaultNS:r}}),[t,r]);return n.createElement(w.Provider,{value:i},a)},e.Trans=function(e){var t=e.children,i=e.count,o=e.parent,s=e.i18nKey,u=e.context,l=e.tOptions,f=void 0===l?{}:l,p=e.values,d=e.defaults,g=e.components,m=e.ns,h=e.i18n,v=e.t,y=e.shouldUnescape,b=c(e,H),O=n.useContext(w)||{},x=O.i18n,j=O.defaultNS,S=h||x||k();if(!S)return A("You will need to pass in an i18next instance by using i18nextReactModule"),t;var N=v||S.t.bind(S)||function(e){return e};u&&(f.context=u);var I=r(r({},E()),S.options&&S.options.react),P=m||N.ns||j||S.options&&S.options.defaultNS;P="string"==typeof P?[P]:P||["translation"];var R=d||function e(t,r){if(!t)return"";var i="",o=F(t),s=r.transSupportBasicHtmlNodes&&r.transKeepBasicHtmlNodesFor?r.transKeepBasicHtmlNodesFor:[];return o.forEach((function(t,o){if("string"==typeof t)i+="".concat(t);else if(n.isValidElement(t)){var u=Object.keys(t.props).length,l=s.indexOf(t.type)>-1,f=t.props.children;if(!f&&l&&0===u)i+="<".concat(t.type,"/>");else if(f||l&&0===u)if(t.props.i18nIsDynamicList)i+="<".concat(o,"></").concat(o,">");else if(l&&1===u&&"string"==typeof f)i+="<".concat(t.type,">").concat(f,"</").concat(t.type,">");else{var p=e(f,r);i+="<".concat(o,">").concat(p,"</").concat(o,">")}else i+="<".concat(o,"></").concat(o,">")}else if(null===t)C("Trans: the passed in value is invalid - seems you passed in a null child.");else if("object"===a(t)){var d=t.format,g=c(t,D),m=Object.keys(g);if(1===m.length){var h=d?"".concat(m[0],", ").concat(d):m[0];i+="{{".concat(h,"}}")}else C("react-i18next: the passed in object contained more than one variable - the object should look like {{ value, format }} where format is optional.",t)}else C("Trans: the passed in value is invalid - seems you passed in a variable like {number} - please pass in variables for interpolation as full objects like {{number}}.",t)})),i}(t,I)||I.transEmptyNodeValue||s,T=I.hashTransKey,L=s||(T?T(R):R),z=p?f.interpolation:{interpolation:r(r({},f.interpolation),{},{prefix:"#$?",suffix:"?$#"})},B=r(r(r(r({},f),{},{count:i},p),z),{},{defaultValue:R,ns:P}),U=W(g||t,L?N(L,B):R,S,I,B,y),K=void 0!==o?o:I.defaultTransParent;return K?n.createElement(K,b,U):U},e.Translation=function(e){var n=e.ns,t=e.children,r=s($(n,c(e,Y)),3),a=r[0],i=r[1],o=r[2];return t(a,{i18n:i,lng:i.language},o)},e.composeInitialProps=P,e.date=function(){return""},e.getDefaults=E,e.getI18n=k,e.getInitialProps=R,e.initReactI18next=I,e.number=function(){return""},e.plural=function(){return""},e.select=function(){return""},e.selectOrdinal=function(){return""},e.setDefaults=j,e.setI18n=N,e.time=function(){return""},e.useSSR=_,e.useTranslation=$,e.withSSR=function(){return function(e){function t(t){var a=t.initialI18nStore,i=t.initialLanguage,o=c(t,J);return _(a,i),n.createElement(e,r({},o))}return t.getInitialProps=P(e),t.displayName="withI18nextSSR(".concat(U(e),")"),t.WrappedComponent=e,t}},e.withTranslation=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return function(a){function i(i){var o=i.forwardedRef,u=c(i,q),l=s($(e,r(r({},u),{},{keyPrefix:t.keyPrefix})),3),f=l[0],p=l[1],d=l[2],g=r(r({},u),{},{t:f,i18n:p,tReady:d});return t.withRef&&o?g.ref=o:!t.withRef&&o&&(g.forwardedRef=o),n.createElement(a,g)}i.displayName="withI18nextTranslation(".concat(U(a),")"),i.WrappedComponent=a;return t.withRef?n.forwardRef((function(e,t){return n.createElement(i,Object.assign({},e,{forwardedRef:t}))})):i}},Object.defineProperty(e,"__esModule",{value:!0})}));

@@ -1,3 +0,5 @@

const matchHtmlEntity = /&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34);/g;
// unescape common html entities
const matchHtmlEntity = /&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230);/g;
const htmlEntities = {

@@ -14,2 +16,10 @@ '&amp;': '&',

'&#34;': '"',
'&nbsp;': ' ',
'&#160;': ' ',
'&copy;': '©',
'&#169;': '©',
'&reg;': '®',
'&#174;': '®',
'&hellip;': '…',
'&#8230;': '…',
};

@@ -16,0 +26,0 @@

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc