From 659a7de6aab5527cf05ab2238cdc401461dfbc5f Mon Sep 17 00:00:00 2001 From: Jan Muehlemann Date: Thu, 28 Sep 2017 08:45:50 +0200 Subject: [PATCH] updated build --- CHANGELOG.md | 3 +++ package.json | 2 +- react-i18next.min.js | 2 +- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 68c0c569..1d189175 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,6 @@ +### 6.0.2 +- rebuild needed cause of uppercasing for components name was not reflected in last build + ### 6.0.1 - remove react from dependencies - not sure how that came into the package.json diff --git a/package.json b/package.json index feab5447..2ec83e3c 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "react-i18next", - "version": "6.0.1", + "version": "6.0.2", "description": "Internationalization for react done right. Using the i18next i18n ecosystem.", "main": "dist/commonjs/index.js", "jsnext:main": "dist/es/index.js", diff --git a/react-i18next.min.js b/react-i18next.min.js index 13823364..ef724507 100644 --- a/react-i18next.min.js +++ b/react-i18next.min.js @@ -1 +1 @@ -!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("react"),require("prop-types")):"function"==typeof define&&define.amd?define("reactI18next",["exports","react","prop-types"],e):e(t.reactI18next=t.reactI18next||{},t.React,t.PropTypes)}(this,function(t,e,n){"use strict";function i(t){N=_({},N,t)}function r(){return N}function o(t){R=t}function s(){return R}function a(t){return t.displayName||t.name||"Component"}function p(t){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return function(o){var p=function(e){function n(e,o){w(this,n);var a=T(this,(n.__proto__||Object.getPrototypeOf(n)).call(this,e,o));a.i18n=o.i18n||e.i18n||i.i18n||s(),"string"==typeof(t=t||a.i18n.options.defaultNS)&&(t=[t]);var p=a.i18n&&a.i18n.options.react||{};return a.options=_({},r(),p,i),a.getWrappedInstance=a.getWrappedInstance.bind(a),a}return C(n,e),P(n,[{key:"getWrappedInstance",value:function(){return this.options.withRef||console.error("To access the wrapped instance, you need to specify { withRef: true } as the second argument of the translate() call."),this.wrappedInstance}},{key:"render",value:function(){var e=this,n={};return this.options.withRef&&(n.ref=function(t){e.wrappedInstance=t}),b.createElement(A,_({ns:t},this.options,this.props,{i18n:this.i18n}),function(t,i){return b.createElement(o,_({},e.props,n,i))})}}]),n}(e.PureComponent);return p.WrappedComponent=o,p.contextTypes={i18n:n.object},p.displayName="Translate("+a(o)+")",p.namespaces=t,I(p,o)}}function c(t,e,n,i,r){var o=e.indexOf("<",i),s=e.slice(i,-1===o?void 0:o);/^\s*$/.test(s)&&(s=" "),(!r&&o>-1&&n+t.length>=0||" "!==s)&&t.push({type:"text",content:s})}function u(t){var e=[];for(var n in t)e.push(n+'="'+t[n]+'"');return e.length?" "+e.join(" "):""}function l(t,e){switch(e.type){case"text":return t+e.content;case"tag":return t+="<"+e.name+(e.attrs?u(e.attrs):"")+(e.voidElement?"/>":">"),e.voidElement?t:t+e.children.reduce(l,"")+""}}function f(t){return t&&(t.children||t.props&&t.props.children)}function h(t){return t&&t.children?t.children:t.props&&t.props.children}function d(t,e,n){return"[object Array]"!==Object.prototype.toString.call(e)&&(e=[e]),e.forEach(function(e,n){var i=""+n;if("string"==typeof e)t=""+t+e;else if(f(e))t=t+"<"+i+">"+d("",h(e),n+1)+"";else if(b.isValidElement(e))t=t+"<"+i+">";else if("object"===(void 0===e?"undefined":j(e))){var r=_({},e),o=r.format;delete r.format;var s=Object.keys(r);o&&1===s.length?t=t+"<"+i+">{{"+s[0]+", "+o+"}}":1===s.length&&(t=t+"<"+i+">{{"+s[0]+"}}")}}),t}function y(t,e,n){function i(t,e){return"[object Array]"!==Object.prototype.toString.call(t)&&(t=[t]),"[object Array]"!==Object.prototype.toString.call(e)&&(e=[e]),e.reduce(function(e,r,o){if("tag"===r.type){var s=t[parseInt(r.name,10)]||{},a=b.isValidElement(s);if("string"==typeof s)e.push(s);else if(f(s)){var p=i(h(s),r.children);s.dummy&&(s.children=p),e.push(b.cloneElement(s,_({},s.props,{key:o}),p))}else if("object"!==(void 0===s?"undefined":j(s))||a)e.push(s);else{var c=n.services.interpolator.interpolate(r.children[0].content,s,n.language);e.push(c)}}else"text"===r.type&&e.push(r.content);return e},[])}return h(i([{dummy:!0,children:t}],F.parse("<0>"+e+""))[0])}function m(t,e){for(var n=0,i=t.length;n=0||Object.prototype.hasOwnProperty.call(t,i)&&(n[i]=t[i]);return n},T=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e},k=function(){function t(t,e){var n=[],i=!0,r=!1,o=void 0;try{for(var s,a=t[Symbol.iterator]();!(i=(s=a.next()).done)&&(n.push(s.value),!e||n.length!==e);i=!0);}catch(t){r=!0,o=t}finally{try{!i&&a.return&&a.return()}finally{if(r)throw o}}return n}return function(e,n){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return t(e,n);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),N={wait:!1,withRef:!1,bindI18n:"languageChanged loaded",bindStore:"added removed",translateFuncName:"t",nsMode:"default"},R=void 0,L={type:"3rdParty",init:function(t){i(t.options.react),o(t)}},q=!1,A=function(t){function e(t,n){w(this,e);var i=T(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n));i.i18n=n.i18n||t.i18n||s(),i.namespaces=i.props.ns||i.i18n.options.defaultNS,"string"==typeof i.namespaces&&(i.namespaces=[i.namespaces]);var o=i.i18n&&i.i18n.options.react||{};return i.options=_({},r(),o,t),t.initialI18nStore&&(i.i18n.services.resourceStore.data=t.initialI18nStore,i.options.wait=!1),t.initialLanguage&&i.i18n.changeLanguage(t.initialLanguage),i.i18n.options.isInitialSSR&&(i.options.wait=!1),i.state={i18nLoadedAt:null,ready:!1},i.onI18nChanged=i.onI18nChanged.bind(i),i}return C(e,t),P(e,[{key:"getChildContext",value:function(){return{t:this.t,i18n:this.i18n}}},{key:"componentWillMount",value:function(){this.t=this.i18n.getFixedT(null,"fallback"===this.options.nsMode?this.namespaces:this.namespaces[0])}},{key:"componentDidMount",value:function(){var t=this,e=function(){t.options.bindI18n&&t.i18n&&t.i18n.on(t.options.bindI18n,t.onI18nChanged),t.options.bindStore&&t.i18n.store&&t.i18n.store.on(t.options.bindStore,t.onI18nChanged)};this.mounted=!0,this.i18n.loadNamespaces(this.namespaces,function(){var n=function(){t.mounted&&!t.state.ready&&t.setState({ready:!0}),t.options.wait&&t.mounted&&e()};if(t.i18n.isInitialized)n();else{var i=function e(){setTimeout(function(){t.i18n.off("initialized",e)},1e3),n()};t.i18n.on("initialized",i)}}),this.options.wait||e()}},{key:"componentWillUnmount",value:function(){var t=this;if(this.mounted=!1,this.onI18nChanged){if(this.options.bindI18n){this.options.bindI18n.split(" ").forEach(function(e){return t.i18n.off(e,t.onI18nChanged)})}if(this.options.bindStore){this.options.bindStore.split(" ").forEach(function(e){return t.i18n.store&&t.i18n.store.off(e,t.onI18nChanged)})}}}},{key:"onI18nChanged",value:function(){this.mounted&&this.setState({i18nLoadedAt:new Date})}},{key:"render",value:function(){var t=this,e=this.props.children;return!this.state.ready&&this.options.wait?null:(this.i18n.options.isInitialSSR&&!q&&(q=!0,setTimeout(function(){delete t.i18n.options.isInitialSSR},100)),e(this.t,{i18n:this.i18n,t:this.t}))}}]),e}(e.PureComponent);A.contextTypes={i18n:n.object},A.childContextTypes={t:n.func.isRequired,i18n:n.object},p.setDefaults=i,p.setI18n=o;var W=function(t){function e(t,n){w(this,e);var i=T(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n));return i.i18n=t.i18n||n.i18n,i.t=t.t||n.t,i}return C(e,t),P(e,[{key:"render",value:function(){var t=this,e=this.props.parent||"span",n=this.props.regexp||this.i18n.services.interpolator.regexp,i=this.props,r=i.className,o=i.style,s=this.props.useDangerouslySetInnerHTML||!1,a=this.props.dangerouslySetInnerHTMLPartElement||"span",p=_({},this.props.options,{interpolation:{prefix:"#$?",suffix:"?$#"}}),c=this.t(this.props.i18nKey,p);if(!c||"string"!=typeof c)return b.createElement("noscript",null);var u=[],l=function(e,n){if(e.indexOf(t.i18n.options.interpolation.formatSeparator)<0)return void 0===n[e]&&t.i18n.services.logger.warn("interpolator: missed to pass in variable "+e+" for interpolating "+c),n[e];var i=e.split(t.i18n.options.interpolation.formatSeparator),r=i.shift().trim(),o=i.join(t.i18n.options.interpolation.formatSeparator).trim();return void 0===n[r]&&t.i18n.services.logger.warn("interpolator: missed to pass in variable "+r+" for interpolating "+c),t.i18n.options.interpolation.format(n[r],o,t.i18n.language)};c.split(n).reduce(function(e,n,i){var r=void 0;if(i%2==0){if(0===n.length)return e;r=s?b.createElement(a,{dangerouslySetInnerHTML:{__html:n}}):n}else r=l(n,t.props);return e.push(r),e},u);var f={};if(this.i18n.options.react&&this.i18n.options.react.exposeNamespace){var h="string"==typeof this.t.ns?this.t.ns:this.t.ns[0];if(this.props.i18nKey&&this.i18n.options.nsSeparator&&this.props.i18nKey.indexOf(this.i18n.options.nsSeparator)>-1){h=this.props.i18nKey.split(this.i18n.options.nsSeparator)[0]}this.t.ns&&(f["data-i18next-options"]=JSON.stringify({ns:h}))}return r&&(f.className=r),o&&(f.style=o),b.createElement.apply(this,[e,f].concat(u))}}]),e}(e.PureComponent);W.propTypes={className:n.string},W.defaultProps={className:""},W.contextTypes={i18n:n.object.isRequired,t:n.func.isRequired};var M={area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,menuitem:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0},D=/([\w-]+)|=|(['"])([.\s\S]*?)\2/g,K=function(t){var e,n=0,i=!0,r={type:"tag",name:"",voidElement:!1,attrs:{},children:[]};return t.replace(D,function(o){if("="===o)return i=!0,void n++;i?0===n?((M[o]||"/"===t.charAt(t.length-2))&&(r.voidElement=!0),r.name=o):(r.attrs[e]=o.replace(/^['"]|['"]$/g,""),e=void 0):(e&&(r.attrs[e]=e),e=o),n++,i=!1}),r},$=/(?:|<(?:"[^"]*"['"]*|'[^']*'['"]*|[^'">])+>)/g,z=Object.create?Object.create(null):{},H=function(t,e){e||(e={}),e.components||(e.components=z);var n,i=[],r=-1,o=[],s={},a=!1;return t.replace($,function(p,u){if(a){if(p!=="")return;a=!1}var l,f="/"!==p.charAt(1),h=0===p.indexOf("\x3c!--"),d=u+p.length,y=t.charAt(d);f&&!h&&(r++,n=K(p),"tag"===n.type&&e.components[n.name]&&(n.type="component",a=!0),n.voidElement||a||!y||"<"===y||c(n.children,t,r,d,e.ignoreWhitespace),s[n.tagName]=n,0===r&&i.push(n),l=o[r-1],l&&l.children.push(n),o[r]=n),(h||!f||n.voidElement)&&(h||r--,!a&&"<"!==y&&y&&(l=-1===r?i:o[r].children,c(l,t,r,d,e.ignoreWhitespace)))}),!i.length&&t.length&&c(i,t,0,0,e.ignoreWhitespace),i},V=function(t){return t.reduce(function(t,e){return t+l("",e)},"")},F={parse:H,stringify:V},J=function(t){function e(t,n){w(this,e);var i=T(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n));return i.i18n=t.i18n||n.i18n,i.t=t.t||n.t,i}return C(e,t),P(e,[{key:"render",value:function(){var t=this.props,e=t.children,n=t.count,i=t.parent,r=t.i18nKey,o=E(t,["children","count","parent","i18nKey"]),s=d("",e,0),a=r||s,p=this.t(a,{interpolation:{prefix:"#$?",suffix:"?$#"},defaultValue:s,count:n});if(this.i18n.options.react&&this.i18n.options.react.exposeNamespace){var c="string"==typeof this.t.ns?this.t.ns:this.t.ns[0];if(r&&this.i18n.options.nsSeparator&&r.indexOf(this.i18n.options.nsSeparator)>-1){c=r.split(this.i18n.options.nsSeparator)[0]}this.t.ns&&(o["data-i18next-options"]=JSON.stringify({ns:c}))}return b.createElement(i,o,y(e,p,this.i18n))}}]),e}(b.PureComponent);J.propTypes={count:n.number,parent:n.string,i18nKey:n.string},J.defaultProps={parent:"div"},J.contextTypes={i18n:n.object.isRequired,t:n.func.isRequired};var U=function(t){function n(t,e){w(this,n);var i=T(this,(n.__proto__||Object.getPrototypeOf(n)).call(this,t,e));return i.i18n=t.i18n,t.initialI18nStore&&(i.i18n.services.resourceStore.data=t.initialI18nStore,i.i18n.options.isInitialSSR=!0),t.initialLanguage&&i.i18n.changeLanguage(t.initialLanguage),i}return C(n,t),P(n,[{key:"getChildContext",value:function(){return{i18n:this.i18n}}},{key:"componentWillReceiveProps",value:function(t){if(this.props.i18n!==t.i18n)throw new Error("[react-i18next][I18nextProvider]does not support changing the i18n object.")}},{key:"render",value:function(){var t=this.props.children;return e.Children.only(t)}}]),n}(e.PureComponent);U.propTypes={i18n:n.object.isRequired,children:n.element.isRequired},U.childContextTypes={i18n:n.object.isRequired},t.translate=p,t.I18n=A,t.Interpolate=W,t.Trans=J,t.I18nextProvider=U,t.loadNamespaces=v,t.reactI18nextModule=L,t.setDefaults=i,t.getDefaults=r,t.setI18n=o,t.getI18n=s,Object.defineProperty(t,"__esModule",{value:!0})}); +!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("react"),require("prop-types")):"function"==typeof define&&define.amd?define("reactI18next",["exports","react","prop-types"],e):e(t.reactI18next=t.reactI18next||{},t.React,t.PropTypes)}(this,function(t,e,n){"use strict";function i(t){N=_({},N,t)}function r(){return N}function o(t){R=t}function s(){return R}function a(t){return t.displayName||t.name||"Component"}function p(t){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return function(o){var p=function(e){function n(e,o){w(this,n);var a=T(this,(n.__proto__||Object.getPrototypeOf(n)).call(this,e,o));a.i18n=o.i18n||e.i18n||i.i18n||s(),"string"==typeof(t=t||a.i18n.options.defaultNS)&&(t=[t]);var p=a.i18n&&a.i18n.options.react||{};return a.options=_({},r(),p,i),a.getWrappedInstance=a.getWrappedInstance.bind(a),a}return C(n,e),P(n,[{key:"getWrappedInstance",value:function(){return this.options.withRef||console.error("To access the wrapped instance, you need to specify { withRef: true } as the second argument of the translate() call."),this.wrappedInstance}},{key:"render",value:function(){var e=this,n={};return this.options.withRef&&(n.ref=function(t){e.wrappedInstance=t}),b.createElement(A,_({ns:t},this.options,this.props,{i18n:this.i18n}),function(t,i){return b.createElement(o,_({},e.props,n,i))})}}]),n}(e.PureComponent);return p.WrappedComponent=o,p.contextTypes={i18n:n.object},p.displayName="Translate("+a(o)+")",p.namespaces=t,I(p,o)}}function c(t,e,n,i,r){var o=e.indexOf("<",i),s=e.slice(i,-1===o?void 0:o);/^\s*$/.test(s)&&(s=" "),(!r&&o>-1&&n+t.length>=0||" "!==s)&&t.push({type:"text",content:s})}function u(t){var e=[];for(var n in t)e.push(n+'="'+t[n]+'"');return e.length?" "+e.join(" "):""}function l(t,e){switch(e.type){case"text":return t+e.content;case"tag":return t+="<"+e.name+(e.attrs?u(e.attrs):"")+(e.voidElement?"/>":">"),e.voidElement?t:t+e.children.reduce(l,"")+""}}function f(t){return t&&(t.children||t.props&&t.props.children)}function h(t){return t&&t.children?t.children:t.props&&t.props.children}function d(t,e,n){return"[object Array]"!==Object.prototype.toString.call(e)&&(e=[e]),e.forEach(function(e,n){var i=""+n;if("string"==typeof e)t=""+t+e;else if(f(e))t=t+"<"+i+">"+d("",h(e),n+1)+"";else if(b.isValidElement(e))t=t+"<"+i+">";else if("object"===(void 0===e?"undefined":j(e))){var r=_({},e),o=r.format;delete r.format;var s=Object.keys(r);o&&1===s.length?t=t+"<"+i+">{{"+s[0]+", "+o+"}}":1===s.length&&(t=t+"<"+i+">{{"+s[0]+"}}")}}),t}function y(t,e,n){function i(t,e){return"[object Array]"!==Object.prototype.toString.call(t)&&(t=[t]),"[object Array]"!==Object.prototype.toString.call(e)&&(e=[e]),e.reduce(function(e,r,o){if("tag"===r.type){var s=t[parseInt(r.name,10)]||{},a=b.isValidElement(s);if("string"==typeof s)e.push(s);else if(f(s)){var p=i(h(s),r.children);s.dummy&&(s.children=p),e.push(b.cloneElement(s,_({},s.props,{key:o}),p))}else if("object"!==(void 0===s?"undefined":j(s))||a)e.push(s);else{var c=n.services.interpolator.interpolate(r.children[0].content,s,n.language);e.push(c)}}else"text"===r.type&&e.push(r.content);return e},[])}return h(i([{dummy:!0,children:t}],H.parse("<0>"+e+""))[0])}function m(t,e){for(var n=0,i=t.length;n=0||Object.prototype.hasOwnProperty.call(t,i)&&(n[i]=t[i]);return n},T=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e},k=function(){function t(t,e){var n=[],i=!0,r=!1,o=void 0;try{for(var s,a=t[Symbol.iterator]();!(i=(s=a.next()).done)&&(n.push(s.value),!e||n.length!==e);i=!0);}catch(t){r=!0,o=t}finally{try{!i&&a.return&&a.return()}finally{if(r)throw o}}return n}return function(e,n){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return t(e,n);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),N={wait:!1,withRef:!1,bindI18n:"languageChanged loaded",bindStore:"added removed",translateFuncName:"t",nsMode:"default"},R=void 0,L={type:"3rdParty",init:function(t){i(t.options.react),o(t)}},q=!1,A=function(t){function e(t,n){w(this,e);var i=T(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n));i.i18n=n.i18n||t.i18n||s(),i.namespaces=i.props.ns||i.i18n.options.defaultNS,"string"==typeof i.namespaces&&(i.namespaces=[i.namespaces]);var o=i.i18n&&i.i18n.options.react||{};return i.options=_({},r(),o,t),t.initialI18nStore&&(i.i18n.services.resourceStore.data=t.initialI18nStore,i.options.wait=!1),t.initialLanguage&&i.i18n.changeLanguage(t.initialLanguage),i.i18n.options.isInitialSSR&&(i.options.wait=!1),i.state={i18nLoadedAt:null,ready:!1},i.onI18nChanged=i.onI18nChanged.bind(i),i}return C(e,t),P(e,[{key:"getChildContext",value:function(){return{t:this.t,i18n:this.i18n}}},{key:"componentWillMount",value:function(){this.t=this.i18n.getFixedT(null,"fallback"===this.options.nsMode?this.namespaces:this.namespaces[0])}},{key:"componentDidMount",value:function(){var t=this,e=function(){t.options.bindI18n&&t.i18n&&t.i18n.on(t.options.bindI18n,t.onI18nChanged),t.options.bindStore&&t.i18n.store&&t.i18n.store.on(t.options.bindStore,t.onI18nChanged)};this.mounted=!0,this.i18n.loadNamespaces(this.namespaces,function(){var n=function(){t.mounted&&!t.state.ready&&t.setState({ready:!0}),t.options.wait&&t.mounted&&e()};if(t.i18n.isInitialized)n();else{var i=function e(){setTimeout(function(){t.i18n.off("initialized",e)},1e3),n()};t.i18n.on("initialized",i)}}),this.options.wait||e()}},{key:"componentWillUnmount",value:function(){var t=this;if(this.mounted=!1,this.onI18nChanged){if(this.options.bindI18n){this.options.bindI18n.split(" ").forEach(function(e){return t.i18n.off(e,t.onI18nChanged)})}if(this.options.bindStore){this.options.bindStore.split(" ").forEach(function(e){return t.i18n.store&&t.i18n.store.off(e,t.onI18nChanged)})}}}},{key:"onI18nChanged",value:function(){this.mounted&&this.setState({i18nLoadedAt:new Date})}},{key:"render",value:function(){var t=this,e=this.props.children;return!this.state.ready&&this.options.wait?null:(this.i18n.options.isInitialSSR&&!q&&(q=!0,setTimeout(function(){delete t.i18n.options.isInitialSSR},100)),e(this.t,{i18n:this.i18n,t:this.t}))}}]),e}(e.PureComponent);A.contextTypes={i18n:n.object},A.childContextTypes={t:n.func.isRequired,i18n:n.object},p.setDefaults=i,p.setI18n=o;var W=function(t){function e(t,n){w(this,e);var i=T(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n));return i.i18n=t.i18n||n.i18n,i.t=t.t||n.t,i}return C(e,t),P(e,[{key:"render",value:function(){var t=this,e=this.props.parent||"span",n=this.props.regexp||this.i18n.services.interpolator.regexp,i=this.props,r=i.className,o=i.style,s=this.props.useDangerouslySetInnerHTML||!1,a=this.props.dangerouslySetInnerHTMLPartElement||"span",p=_({},this.props.options,{interpolation:{prefix:"#$?",suffix:"?$#"}}),c=this.t(this.props.i18nKey,p);if(!c||"string"!=typeof c)return b.createElement("noscript",null);var u=[],l=function(e,n){if(e.indexOf(t.i18n.options.interpolation.formatSeparator)<0)return void 0===n[e]&&t.i18n.services.logger.warn("interpolator: missed to pass in variable "+e+" for interpolating "+c),n[e];var i=e.split(t.i18n.options.interpolation.formatSeparator),r=i.shift().trim(),o=i.join(t.i18n.options.interpolation.formatSeparator).trim();return void 0===n[r]&&t.i18n.services.logger.warn("interpolator: missed to pass in variable "+r+" for interpolating "+c),t.i18n.options.interpolation.format(n[r],o,t.i18n.language)};c.split(n).reduce(function(e,n,i){var r=void 0;if(i%2==0){if(0===n.length)return e;r=s?b.createElement(a,{dangerouslySetInnerHTML:{__html:n}}):n}else r=l(n,t.props);return e.push(r),e},u);var f={};if(this.i18n.options.react&&this.i18n.options.react.exposeNamespace){var h="string"==typeof this.t.ns?this.t.ns:this.t.ns[0];if(this.props.i18nKey&&this.i18n.options.nsSeparator&&this.props.i18nKey.indexOf(this.i18n.options.nsSeparator)>-1){h=this.props.i18nKey.split(this.i18n.options.nsSeparator)[0]}this.t.ns&&(f["data-i18next-options"]=JSON.stringify({ns:h}))}return r&&(f.className=r),o&&(f.style=o),b.createElement.apply(this,[e,f].concat(u))}}]),e}(e.PureComponent);W.propTypes={className:n.string},W.defaultProps={className:""},W.contextTypes={i18n:n.object.isRequired,t:n.func.isRequired};var M={area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,menuitem:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0},D=function(t){var e,n=0,i=!0,r={type:"tag",name:"",voidElement:!1,attrs:{},children:[]};return t.replace(/([\w-]+)|=|(['"])([.\s\S]*?)\2/g,function(o){if("="===o)return i=!0,void n++;i?0===n?((M[o]||"/"===t.charAt(t.length-2))&&(r.voidElement=!0),r.name=o):(r.attrs[e]=o.replace(/^['"]|['"]$/g,""),e=void 0):(e&&(r.attrs[e]=e),e=o),n++,i=!1}),r},K=Object.create?Object.create(null):{},$=function(t,e){e||(e={}),e.components||(e.components=K);var n,i=[],r=-1,o=[],s={},a=!1;return t.replace(/(?:|<(?:"[^"]*"['"]*|'[^']*'['"]*|[^'">])+>)/g,function(p,u){if(a){if(p!=="")return;a=!1}var l,f="/"!==p.charAt(1),h=0===p.indexOf("\x3c!--"),d=u+p.length,y=t.charAt(d);f&&!h&&(r++,n=D(p),"tag"===n.type&&e.components[n.name]&&(n.type="component",a=!0),n.voidElement||a||!y||"<"===y||c(n.children,t,r,d,e.ignoreWhitespace),s[n.tagName]=n,0===r&&i.push(n),l=o[r-1],l&&l.children.push(n),o[r]=n),(h||!f||n.voidElement)&&(h||r--,!a&&"<"!==y&&y&&(l=-1===r?i:o[r].children,c(l,t,r,d,e.ignoreWhitespace)))}),!i.length&&t.length&&c(i,t,0,0,e.ignoreWhitespace),i},z=function(t){return t.reduce(function(t,e){return t+l("",e)},"")},H={parse:$,stringify:z},V=function(t){function e(t,n){w(this,e);var i=T(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n));return i.i18n=t.i18n||n.i18n,i.t=t.t||n.t,i}return C(e,t),P(e,[{key:"render",value:function(){var t=this.props,e=t.children,n=t.count,i=t.parent,r=t.i18nKey,o=E(t,["children","count","parent","i18nKey"]),s=d("",e,0),a=r||s,p=this.t(a,{interpolation:{prefix:"#$?",suffix:"?$#"},defaultValue:s,count:n});if(this.i18n.options.react&&this.i18n.options.react.exposeNamespace){var c="string"==typeof this.t.ns?this.t.ns:this.t.ns[0];if(r&&this.i18n.options.nsSeparator&&r.indexOf(this.i18n.options.nsSeparator)>-1){c=r.split(this.i18n.options.nsSeparator)[0]}this.t.ns&&(o["data-i18next-options"]=JSON.stringify({ns:c}))}return b.createElement(i,o,y(e,p,this.i18n))}}]),e}(b.PureComponent);V.propTypes={count:n.number,parent:n.string,i18nKey:n.string},V.defaultProps={parent:"div"},V.contextTypes={i18n:n.object.isRequired,t:n.func.isRequired};var F=function(t){function n(t,e){w(this,n);var i=T(this,(n.__proto__||Object.getPrototypeOf(n)).call(this,t,e));return i.i18n=t.i18n,t.initialI18nStore&&(i.i18n.services.resourceStore.data=t.initialI18nStore,i.i18n.options.isInitialSSR=!0),t.initialLanguage&&i.i18n.changeLanguage(t.initialLanguage),i}return C(n,t),P(n,[{key:"getChildContext",value:function(){return{i18n:this.i18n}}},{key:"componentWillReceiveProps",value:function(t){if(this.props.i18n!==t.i18n)throw new Error("[react-i18next][I18nextProvider]does not support changing the i18n object.")}},{key:"render",value:function(){var t=this.props.children;return e.Children.only(t)}}]),n}(e.PureComponent);F.propTypes={i18n:n.object.isRequired,children:n.element.isRequired},F.childContextTypes={i18n:n.object.isRequired},t.translate=p,t.I18n=A,t.Interpolate=W,t.Trans=V,t.I18nextProvider=F,t.loadNamespaces=v,t.reactI18nextModule=L,t.setDefaults=i,t.getDefaults=r,t.setI18n=o,t.getI18n=s,Object.defineProperty(t,"__esModule",{value:!0})});