text: !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("react")):"function"==typeof define&&define.amd?define("react-firebaseui-localized",["React"],t):"object"==typeof exports?exports["react-firebaseui-localized"]=t(require("react")):e["react-firebaseui-localized"]=t(e.React)}(this,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="/dist/",r(r.s=1)}([function(t,r){t.exports=e},function(e,t,r){"use strict";function n(e){return(n="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)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o,u=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!==n(e)&&"function"!=typeof e)return{default:e};var t=a();if(t&&t.has(e))return t.get(e);var r={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var u in e)if(Object.prototype.hasOwnProperty.call(e,u)){var i=o?Object.getOwnPropertyDescriptor(e,u):null;i&&(i.get||i.set)?Object.defineProperty(r,u,i):r[u]=e[u]}r.default=e,t&&t.set(e,r);return r}(r(0)),i=(o=r(2))&&o.__esModule?o:{default:o};function a(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return a=function(){return e},e}function f(e,t,r,n,o,u,i){try{var a=e[u](i),f=a.value}catch(e){return void r(e)}a.done?t(f):Promise.resolve(f).then(n,o)}function c(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var r=[],n=!0,o=!1,u=void 0;try{for(var i,a=e[Symbol.iterator]();!(n=(i=a.next()).done)&&(r.push(i.value),!t||r.length!==t);n=!0);}catch(e){o=!0,u=e}finally{try{n||null==a.return||a.return()}finally{if(o)throw u}}return r}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return l(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return l(e,t)}(e,t)||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 l(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var s=function(e){return"https://www.gstatic.com/firebasejs/ui/4.1.0/firebase-ui-auth__".concat(e,".js")},d="firebaseui_container";var y=function(e){var t=e.auth,r=e.config,n=e.lang,o=e.firebase,a=c((0,i.default)(s(n)),2),l=a[0],y=a[1],p=(0,u.useRef)();return(0,u.useEffect)(function(){window.firebase=o},[]),(0,u.useEffect)(function(){if(l){if(y)throw y;var e;(e=regeneratorRuntime.mark(function e(){var n;return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(!(n=window.firebase.apps.find(function(e){return e.name.endsWith("-firebaseui-temp")}))){e.next=4;break}return e.next=4,n.delete();case 4:p.current&&(p.current.innerHTML=""),new window.firebaseui.auth.AuthUI(t).start("#".concat(d),r);case 7:case"end":return e.stop()}},e)}),function(){var t=this,r=arguments;return new Promise(function(n,o){var u=e.apply(t,r);function i(e){f(u,n,o,i,a,"next",e)}function a(e){f(u,n,o,i,a,"throw",e)}i(void 0)})})()}},[t,r,y,l]),u.default.createElement(u.default.Fragment,null,u.default.createElement("link",{type:"text/css",rel:"stylesheet",href:"https://www.gstatic.com/firebasejs/ui/4.1.0/firebase-ui-auth.css"}),u.default.createElement("div",{ref:p,id:d}))};t.default=y},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=r(0);function o(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var r=[],n=!0,o=!1,u=void 0;try{for(var i,a=e[Symbol.iterator]();!(n=(i=a.next()).done)&&(r.push(i.value),!t||r.length!==t);n=!0);}catch(e){o=!0,u=e}finally{try{n||null==a.return||a.return()}finally{if(o)throw u}}return r}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return u(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return u(e,t)}(e,t)||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,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var i=function(e){var t=o((0,n.useState)({loaded:!1,error:!1}),2),r=t[0],u=t[1],i=(0,n.useRef)();return(0,n.useEffect)(function(){i.current=document.createElement("script"),i.current.src=e,i.current.async=!0;var t=function(){return u({loaded:e,error:!1})},r=function(e){i.current.remove(),u({loaded:!1,error:e})};return i.current.addEventListener("load",t),i.current.addEventListener("error",r),document.body.appendChild(i.current),function(){i.current.removeEventListener("load",t),i.current.removeEventListener("error",r)}},[e]),[r.loaded,r.error]};t.default=i}])});