text: !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("react")):"function"==typeof define&&define.amd?define("react-text",["React"],t):"object"==typeof exports?exports["react-text"]=t(require("react")):e["react-text"]=t(e.React)}(window,(function(e){return function(e){var t={};function r(n){if(t[n])return t[n].exports;var o=t[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}return r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)r.d(n,o,function(t){return e[t]}.bind(null,o));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=1)}([function(t,r){t.exports=e},function(e,t,r){"use strict";r.r(t);var n=r(0),o=r.n(n);function c(e){return(c="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,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function u(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?i(Object(r),!0).forEach((function(t){a(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):i(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function a(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function f(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if(!(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e)))return;var r=[],n=!0,o=!1,c=void 0;try{for(var i,u=e[Symbol.iterator]();!(n=(i=u.next()).done)&&(r.push(i.value),!t||r.length!==t);n=!0);}catch(e){o=!0,c=e}finally{try{n||null==u.return||u.return()}finally{if(o)throw c}}return r}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function l(e,t){if(null==e)return{};var r,n,o=function(e,t){if(null==e)return{};var r,n,o={},c=Object.keys(e);for(n=0;n<c.length;n++)r=c[n],t.indexOf(r)>=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var c=Object.getOwnPropertySymbols(e);for(n=0;n<c.length;n++)r=c[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}var y=function(e){var t=e.id,r=e.dictionary,n=e.language,o=l(e,["id","dictionary","language"]);if(!t){var c=Object.entries(o).filter((function(e){var t=f(e,2);t[0];return"boolean"==typeof t[1]})).map((function(e){return f(e,1)[0]}));if(!c.length)throw new Error("Please make sure to pass an id");if(c.length>1)throw new Error("Please only pass a single id/boolean, detected '".concat(c,"'"));t=c[0]}var i=Object.keys(r);if(!i.includes(t))throw new Error("Couldn't find '".concat(t,"' in the dictionary. Available ids: ").concat(i));if(void 0===r[t][n])throw new Error("The language '".concat(n,"' is not available (attempted with id '").concat(t,"')"));return r[t][n](o)};function p(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function b(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?p(Object(r),!0).forEach((function(t){s(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):p(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function s(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function d(e,t){if(null==e)return{};var r,n,o=function(e,t){if(null==e)return{};var r,n,o={},c=Object.keys(e);for(n=0;n<c.length;n++)r=c[n],t.indexOf(r)>=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var c=Object.getOwnPropertySymbols(e);for(n=0;n<c.length;n++)r=c[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}var O=Object(n.createContext)({}),g=O.Provider,v=O.Consumer,j=function(e){return e.children};try{j=r(!function(){var e=new Error("Cannot find module 'react-native'");throw e.code="MODULE_NOT_FOUND",e}()).Text}catch(e){}t.default=function(e){var t=e.language,r=e.dictionary,n=void 0===r?{}:r,i=e.children,f=e.render,l=e.component,p=d(e,["language","dictionary","children","render","component"]);return o.a.createElement(v,null,(function(e){return i?(t=t||e.language,n=b({},e.dictionary,{},function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];var n,o=Object.assign.apply(Object,[{}].concat(t));return Object.keys(o).reduce((function(e,t){var r=Object.keys(o[t]);if(n||(n=r),JSON.stringify(n.sort())!==JSON.stringify(r.sort()))throw new Error("Wrong amount of languages, expected '".concat(n,"' but got '").concat(r,"'"));return u({},e,a({},t,n.reduce((function(e,r){var n=o[t][r];if(n&&n.normalized)return u({},e,a({},r,n));if("function"==typeof n){var i=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return n(e)};return i.normalized=!0,u({},e,a({},r,i))}if("string"==typeof n){var f=function(){return n};return f.normalized=!0,u({},e,a({},r,f))}throw new Error('Value cannot be of type "'.concat(c(n),'"'))}),{})))}),{})}(n)),o.a.createElement(g,{value:{language:t,dictionary:n}},i)):l?!0===p[e.language]?l:null:f?f(y(b({},e,{},p))):o.a.createElement(j,null,y(b({},e,{},p)))}))}}])}));