window.CUSTOMER_DATA_HUB_API_SERVER="https://hubapi.fromdoppler.com",window.cdhReferrer=function(){var e;return e=window.cdh_stored_referrer||""===window.cdh_stored_referrer?window.cdh_stored_referrer:document.referrer,window.cdh_stored_referrer=window.location.href,e}();const enableCustomTracking=document.currentScript&&"true"==document.currentScript.getAttribute("enableCustomTracking"),domainsToBeLinked=document.currentScript&&document.currentScript.getAttribute("domainsToBeLinked");var _dha=function(){function e(e){var t;return void 0===(t="object"==typeof e[0]?e[0]:{}).local&&(t.local=!1),t}function t(e,t,n){return enableCustomTracking?{page:e||window.location.pathname,search:t,hash:n,referrer:window.cdhReferrer,host:window.location.host}:{page:window.location.pathname,search:window.location.search,hash:window.location.hash,referrer:window.cdhReferrer,host:window.location.host}}function n(e,t,n,r,o){_dha.utils.getPageInformation(!1,null,function(i,a){i||_dha.proxy.trackData(_dha.storage.getItem("_dha__uuid"),window.location.host,e||window.location.pathname,r,t,n,_dha.utils.detectSourceByUrl(),"historychange_"+o,null,null,a,_dha.utils.hasEmail())})}function r(e){if(0!==e.button&&1!==e.button)return;const t=domainsToBeLinked&&domainsToBeLinked.split(",").map(function(e){return e.trim()});if(!t||0===t.length)return;const n=_dha.storage.getItem("_dha__em");if(n){const e=_dha.utils.asciiToHex(n),r={completeUrl:this.href,protocolHostAndPath:this.origin+this.pathname,search:this.search,hash:this.hash,host:this.host};-1!==t.indexOf(r.host)&&(this.href=_dha.utils.getUrlAddingNewParam(r,"dplrid",e))}}function o(e){if(!domainsToBeLinked||""===domainsToBeLinked.trim())return;const t=(e||document).getElementsByTagName("a"),n=t&&[].slice.call(t).filter(e=>e.href);[].forEach.call(n,function(e){e.addEventListener("click",r),e.addEventListener("auxclick",r)})}function i(e){const n=function(e){e.cdhFnOnChange&&e.removeEventListener("change",e.cdhFnOnChange),e.cdhFnOnChange=function(n){!function(e,n){if(_dha.utils.trackVisitorEmail(e.target.value)){const e=t(null,null,null);_dha.utils.getPageInformation(!1,null,function(t,r){t||_dha.proxy.trackData(_dha.storage.getItem("_dha__uuid"),e.host,e.page,e.referrer,e.search,e.hash,"","inputemailchange",n.id,null,r,_dha.utils.hasEmail())})}}(n,e)},e.addEventListener("change",e.cdhFnOnChange)},r=(e||document).getElementsByTagName("input");[].forEach.call(r,function(e){("email"===e.type||e.id&&-1!==e.id.indexOf("email")||e.name&&-1!==e.name.indexOf("email"))&&n(e)})}return window.addEventListener("hashchange",function(e){if(!enableCustomTracking){var t=_dha.storage.getItem("_dha__uuid");t&&_dha.utils.getPageInformation(!1,null,function(n,r){n||_dha.proxy.trackData(t,window.location.host,window.location.pathname,e.oldURL,window.location.search,window.location.hash,null,"hashchange",null,null,r,_dha.utils.hasEmail())})}}),{trackAddToCart:function(e){var t=e.formSelectors||[],n=_dha.utils.getTagsByNameAndAttribute("form",t),r=[];n&&n.length>=1&&n.forEach(function(e){var t=e.querySelector("input[type=submit], button[type=submit], button[type=button]");t&&r.push({form:e,input:t})}),r.forEach(function(e){e.input.addEventListener("click",function(){_dha.utils.getPageInformation(!0,{involvedForm:e.form},function(e,t){e||_dha.proxy.trackData(_dha.storage.getItem("_dha__uuid"),window.location.host,window.location.pathname,window.cdhReferrer,window.location.search,window.location.hash,_dha.utils.detectSourceByUrl(),"addcartformevent",null,null,t,_dha.utils.hasEmail())})})})},track:function(){var n=e(arguments);_dha.proxy.config(n);var r=_dha.storage.getItem("_dha__uuid"),o=_dha.utils.obtainEmailParameter(),i=function(e,t){var n=!1,r="";return e?(t&&e!==t?(r=t,_dha.storage.deleteItem("_dha__uuid"),_dha.storage.setItem("_dha__uuid",r),_dha.proxy.aliasVisitor(t,e)):r=e,{guid:r,isNewGuid:n}):(t?r=t:(r=_dha.utils.generateUUID(),n=!0),_dha.storage.setItem("_dha__uuid",r),{guid:r,isNewGuid:n})}(r,_dha.utils.getParameterByName("dha_id"));_dha.updateUrlLink(i.guid);const a=t(n.navigatedPage,n.search,n.hash);_dha.utils.getPageInformation(!1,null,function(e,t){e||_dha.proxy.trackData(i.guid,a.host,a.page,a.referrer,a.search,a.hash,_dha.utils.detectSourceByUrl(),"pageview",null,null,t,_dha.utils.hasEmail())});var s=!1,u=!1,c=!1;if(o&&_dha.utils.isValidEmail(o)&&(s=!0,o===_dha.storage.getItem("_dha__em")&&(u=!0),c=_dha.utils.isFirstEmail(),_dha.storage.setItem("_dha__em",o)),i.isNewGuid)_dha.proxy.addVisitor(i.guid,s?o:null,window.location.host,c);else if(s&&!u)_dha.proxy.updateVisitor(i.guid,o,null,null,window.location.host,c);else if(localStorage.getItem("_dha__vud")){var l=new Date(JSON.parse(localStorage.getItem("_dha__vud")));new Date>l&&_dha.proxy.updateVisitor(i.guid,s?o:null,null,null,window.location.host,c)}},savePushNotificationToken:function(e,t){var n=_dha.storage.getItem("_dha__uuid"),r=_dha.storage.getItem("_dha__push_token");return!!n&&(!r||t?(_dha.storage.setItem("_dha__push_token","true"),_dha.proxy.updateVisitor(n,null,null,null,window.location.host,!1,e)):void 0)},trackForm:function(){var t=e(arguments);t.trackForm.length>0?_dha.trackFormByParameters(t.trackForm,t.navigatedPage,t.hash,t.search):_dha.trackAllForm(t.navigatedPage,t.hash,t.search)},trackFormByParameters:function(e,n,r,o){var i=_dha.storage.getItem("_dha__uuid");e.forEach(function(e){var a="",s=document.querySelector("#"+e.id_form_track);s?a="#"+e.id_form_track:(s=document.querySelector("form[name="+e.id_form_track+"]"))&&(a="form[name="+e.id_form_track+"]"),a&&document.forms[e.id_form_track].addEventListener("submit",function(){var s=[];if(e.id_input_track.length>0)e.id_input_track.forEach(function(e){var t,n=document.querySelector(a+" #"+e);t=n?n.getAttribute("id"):(n=document.querySelector(a+" input[name="+e+"]")).getAttribute("name");var r=n.getAttribute("type");if(t&&t.indexOf("email")>-1||r&&"email"===r.toLowerCase()){var o=n.value;if(o&&_dha.utils.isValidEmail(o)){const e=_dha.utils.isFirstEmail();_dha.proxy.updateVisitor(i,o,null,null,window.location.host,e),_dha.storage.setItem("_dha__em",o)}}r&&"password"!=r.toLowerCase()&&"hidden"!=r.toLowerCase()&&n.value&&s.push({name:t,value:n.value})});else{var u=document.querySelectorAll(a+" input");[].forEach.call(u,function(e){input_id=e.getAttribute("id")?e.getAttribute("id"):e.getAttribute("name");var t=e.getAttribute("type");t&&"password"!=t.toLowerCase()&&"hidden"!=t.toLowerCase()&&e.value&&s.push({name:input_id,value:e.value})})}if(s.length>0){n||window.location.pathname;const a=t(n,o,r);_dha.proxy.trackData(i,a.host,a.page,a.referrer,a.search,a.hash,"","formevent",e.id_form_track,s,null,_dha.utils.hasEmail(),!1)}})})},trackAllForm:function(e,n,r){[].forEach.call(document.forms,function(o){var i=[],a=o.getAttribute("id");a||(a=o.getAttribute("name"))||(a="");var s=_dha.storage.getItem("_dha__uuid");o.addEventListener("submit",function(){var o=this.querySelectorAll("input");if([].forEach.call(o,function(e){var t=e.getAttribute("id"),n=e.getAttribute("type");if(t||(t=e.getAttribute("name")),t&&t.indexOf("email")>-1||n&&"email"===n.toLowerCase()){var r=e.value;if(r&&_dha.utils.isValidEmail(r)){const e=_dha.utils.isFirstEmail();_dha.proxy.updateVisitor(s,r,null,null,window.location.host,e),_dha.storage.setItem("_dha__em",r)}}n&&"password"!=n.toLowerCase()&&"hidden"!=n.toLowerCase()&&e.value&&i.push({name:t,value:e.value})}),i.length>0){const o=t(e,r,n);_dha.proxy.trackData(s,o.host,o.page,o.referrer,o.search,o.hash,"","formevent",a,i,null,_dha.utils.hasEmail(),!1)}})})},linkDomains:function(e){o(e)},trackInputEmail:function(e){i(e)},trackDOMMutation:function(){const e=document.body;new MutationObserver(function(e,t){for(let t of e)"childList"===t.type&&t.addedNodes&&t.addedNodes.length>0&&(i(t.target),o(t.target))}).observe(e,{childList:!0,subtree:!0})},trackChangeState:function(){const e=window.history.pushState;window.history.pushState=function(t,n,r){return"function"==typeof window.history.onpushstate_cdh&&window.history.onpushstate_cdh({state:t,unused:n,url:r}),e.apply(window.history,arguments)},window.history.onpushstate_cdh=function(e){const t=window.location.pathname;var r=e.url||window.location;"object"==typeof r?n(r.pathname,r.search,r.hash,t,"onpushstate"):n(r,null,null,t,"onpushstate")},window.addEventListener("popstate",function(e){const t=window.location;n(t.pathname,t.search,t.hash,document.referrer,"onpopstate")})},updateUrlLink:function(e){if(e){var t=document.querySelectorAll(".dh--link--exit");[].forEach.call(t,function(t){t.onclick=function(){t.href=-1===t.href.indexOf("?")?t.href+"?dha_id="+e:t.href+"&dha_id="+e}})}},trackEmail:function(e){_dha.utils.trackVisitorEmail(e)}}}();_dha.proxy=function(){var e={local:!1};document.location.protocol;function t(){return e.local?"http://localhost:3000":CUSTOMER_DATA_HUB_API_SERVER}function n(){var e=new Date;return e.setMinutes(e.getMinutes()+14400),e}return{config:function(t){e=t},addVisitor:function(e,r,o,i){_dha.storage.setItem("_dha__vud",JSON.stringify(n()));var a=new XMLHttpRequest;a.open("POST",t()+"/api/visitors"),a.setRequestHeader("Content-Type","application/json;charset=UTF-8"),a.onload=function(e){4===a.readyState&&(200===a.status||console.error(a.statusText))},a.onerror=function(e){console.error(a.statusText)},a.send(JSON.stringify({visitor:{visitorGuid:e,email:r,domain:o,isFirstEmail:i}}))},aliasVisitor:function(e,n){var r=new XMLHttpRequest;r.open("POST",t()+"/api/alias"),r.setRequestHeader("Content-Type","application/json;charset=UTF-8"),r.onload=function(e){4===r.readyState&&(200===r.status||console.error(r.statusText))},r.onerror=function(e){console.error(r.statusText)},r.send(JSON.stringify({visitor:{visitor_1:e,visitor_2:n}}))},updateVisitor:function(e,r,o,i,a,s,u){_dha.storage.setItem("_dha__vud",JSON.stringify(n()));var c=new XMLHttpRequest,l=t()+"/api/visitors/"+e;c.open("POST",l),c.setRequestHeader("Content-Type","application/json;charset=UTF-8"),c.onload=function(e){4===c.readyState&&(200===c.status||console.error(c.statusText))},c.onerror=function(e){console.error(c.statusText)},c.send(JSON.stringify({visitor:{visitorGuid:e,email:r,username:o,fullname:i,domain:a,isFirstEmail:s,pushNotificationToken:u}}))},trackData:function(e,n,r,o,i,a,s,u,c,l,f,d,p){p=void 0===p||p;var h=new XMLHttpRequest;h.open("POST",t()+"/api/data",p),h.setRequestHeader("Content-Type","application/json;charset=UTF-8"),h.onload=function(e){4===h.readyState&&(200===h.status||console.error(h.statusText))},h.onerror=function(e){console.error(h.statusText)},h.send(JSON.stringify({visitor:{visitorGuid:e,domain:n,page:r,referrer:o,queryString:i,hash:a,source:s,eventType:u,eventName:c,additionalInfo:l,pageInfo:f,scriptVersion:"1.15.0",userAgent:navigator.userAgent,appName:navigator.appName,appVersion:navigator.appVersion,hasEmail:d}}))}}}(),_dha.storage=function(){var e=!1,t=!1;function n(){t||(e=function(){var e="_dha__ck";try{return localStorage.setItem(e,e),localStorage.removeItem(e),!0}catch(e){return!1}}(),t=!0)}return{setItem:function(t,r){n(),e?function(e,t){localStorage.setItem(e,t)}(t,r):function(e,t){var n=new Date;n.setTime(n.getTime()+31536e7);var r="expires="+n.toUTCString();document.cookie=e+"="+t+"; "+r+"path=/"}(t,r)},getItem:function(t){return n(),e?function(e){return localStorage.getItem(e)}(t):function(e){for(var t=e+"=",n=document.cookie.split(";"),r=0;r<n.length;r++){for(var o=n[r];" "==o.charAt(0);)o=o.substring(1);if(0===o.indexOf(t))return o.substring(t.length,o.length)}return""}(t)},deleteItem:function(t){return n(),e?function(e){localStorage.removeItem(e)}(t):(r=t,void(document.cookie=r+"=;expires=Thu, 01 Jan 1970 00:00:00 UTCpath=/"));var r}}}(),_dha.utils=function(){const e=/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino/i,t=/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i;function n(e){var t;e.pageType||(t=o("meta",[{attName:"property",attValue:"og:type"}]))&&t.length>0&&(e.pageType=t[0].getAttribute("content"));e.price||(t=o("meta",[{attName:"property",attValue:"og:price"},{attName:"property",attValue:"og:price:amount"},{attName:"property",attValue:"product:price:amount"}]))&&t.length>0&&(e.price=t[0].getAttribute("content"));return e}function r(e){return e.pageType?{pageType:e.pageType,productId:e.productId?e.productId.toString():void 0,price:e.price?e.price:void 0,categoryId:e.categoryId?e.categoryId.toString():void 0,cartId:e.cartId?e.cartId.toString():void 0,items:e.items&&e.items.length>=1?e.items:void 0,eCommerceCustomer:e.eCommerceCustomer?e.eCommerceCustomer.toString():void 0}:null}function o(e,t,n){for(var r=(n||document).getElementsByTagName(e),o=[],i=0;i<r.length;i++)for(var a=0;a<t.length;a++)if(r[i].getAttribute(t[a].attName)===t[a].attValue)o.push(r[i]);else if("class"===t[a].attName){const e=r[i].getAttribute(t[a].attName),n=e&&e.split(" ");n&&-1!==n.indexOf(t[a].attValue)&&o.push(r[i])}return o}function i(e){if(!e||!e.hasChildNodes())return"";const t=e.childNodes;for(var n=0;n<t.length;n++){const e=t[n];if(8===e.nodeType){const t=e.textContent.match(/VirtualFolder\.Name: (\S+)/);if(t&&t[1])return t[1]}}return""}function a(e){const t={pageType:void 0,productId:void 0,price:void 0,categoryId:void 0};switch(t.pageType=function(){let e="";switch((e=i(document.body))||(e=i(document.head)),e.toLowerCase()){case"/":return"home";case"@produto@":case"@product@":return"product";case"@departamento@":case"@departament@":case"@categoria@":case"@category@":return"category";case"busca":case"search":return"search"}if("/checkout/"===window.location.pathname||"/cart"===window.location.pathname)return window.location.pathname.replace(/\//g,"")}(),t.pageType){case"product":if(window.skuJson){const e=window.skuJson.skus.filter(function(e){return e.available})[0]||{};t.productId=window.skuJson.productId,t.price=e.bestPrice&&e.bestPrice/100,t.categoryId=window.vtxctx&&window.vtxctx.categoryId}break;case"category":t.categoryId=window.vtxctx&&window.vtxctx.categoryId;break;case"cart":case"checkout":t.cartId=window.vtexjs.checkout.orderFormId}return"cart"!==t.pageType&&"checkout"!==t.pageType||t.cartId?e(null,t):window.vtexjs.checkout.getOrderForm().then(function(n){return t.cartId=n&&n.orderFormId,e(null,t)})}return{getTagsByNameAndAttribute:function(e,t,n){return o(e,t,n)},getPageInformation:function(e,t,i){var s={pageType:void 0,productId:void 0,price:void 0,categoryId:void 0};switch("undefined"!=typeof Shopify&&Shopify&&Shopify.shop?"shopify":window.LS?"tienda-nube":_dha.storage.getItem("mage-cache-storage")?"magento":window.vtxctx||window.vtexjs?"vtex":void 0){case"shopify":s=function(e){const t={pageType:e?"cart":void 0,productId:void 0,price:void 0,categoryId:void 0};return window.meta&&(t.pageType||(t.pageType=window.meta.page&&window.meta.page.pageType),window.meta.product&&(t.productId=window.meta.product.id,t.price=window.meta.product.variants&&window.meta.product.variants.length>0?window.meta.product.variants[0].price:void 0)),t}(e);break;case"tienda-nube":s=function(e,t){const n={pageType:e?"cart":window.LS.template,productId:void 0,price:void 0,categoryId:void 0};let r;if(n.pageType||(n.pageType=/^\/checkout\//.test(window.location.pathname)?"checkout":void 0),e&&t&&t.involvedForm){const e=o("input",[{attName:"name",attValue:"add_to_cart"}],t.involvedForm);r=e&&e.length>0&&e[0].value||void 0}if(n.cartId=window.LS.cart?window.LS.cart.id:void 0,n.productId=r||window.LS.product&&window.LS.product.id||void 0,n.price=window.LS.variants&&window.LS.variants.length>0?window.LS.variants[0].price_number:void 0,n.categoryId=window.LS.category?window.LS.category.id:void 0,n.eCommerceCustomer=window.LS.customer,n.eCommerceCustomer){const e=new XMLHttpRequest;e.open("GET","/account/info/",!0),e.responseType="document",e.onload=function(){if(4==e.readyState)if(200==e.status){const t=e.responseXML.getElementsByName("email");t&&t.length>0&&Array.prototype.slice.call(t).forEach(function(e){_dha.utils.isValidEmail(e.value)&&_dha.utils.trackVisitorEmail(e.value)})}else console.error(`${e.status} => ${e.statusText}`)},e.onerror=function(){console.error(`${e.status} => ${e.statusText}`)},e.send()}return n}(e,t);break;case"magento":s=function(e){const t={pageType:e?"cart":void 0,productId:void 0,price:void 0,categoryId:void 0,items:void 0};if(t.pageType||(t.pageType=/\/checkout\//.test(window.location.pathname)?"checkout":void 0),"cart"===t.pageType){const e=o("form",[{attName:"id",attValue:"product_addtocart_form"}]);t.productId=e&&e.length>0&&e[0].getAttribute("data-product-sku")}if("cart"===t.pageType||"checkout"===t.pageType){const e=JSON.parse(_dha.storage.getItem("mage-cache-storage"));if(e&&e.cart&&e.cart.items){const n=e.cart.items.map(e=>({item_id:e.item_id,product_id:e.product_id,sku:e.product_sku}));t.items=n}}return t}(e);break;case"vtex":return a(function(e,t){return s=n(t),i(null,r(s))});default:s=function(){const e={pageType:void 0,productId:void 0,price:void 0,categoryId:void 0};if(window.dataLayer){for(var t,n=0;n<window.dataLayer.length&&!t;n++){const e=window.dataLayer[n];e.hasOwnProperty("pagetype")&&(t=e)}t&&(e.pageType=t.pagetype,e.productId=t.prodID,e.price=t.totalvalue,e.categoryId=t.catID)}return e}()}return s=n(s),i(null,r(s))},hexToAscii:function(e){for(var t=e.toString(),n="",r=0;r<t.length;r+=2)n+=String.fromCharCode(parseInt(t.substr(r,2),16));return n},asciiToHex:function(e){const t=[];for(let n=0;n<e.length;n++){const r=Number(e.charCodeAt(n)).toString(16);t.push(r)}return t.join("")},getUrlAddingNewParam:function(e,t,n){const r=t+"=";return-1!==e.search.indexOf(r)?e.completeUrl:e.protocolHostAndPath+(e.search?e.search+"&":"?")+r+n+e.hash},getParameterByName:function(e){e=e.replace(/[\[]/,"\\[").replace(/[\]]/,"\\]");var t=new RegExp("[\\?&]"+e+"=([^&#]*)","i");return results=t.exec(location.search),null===results?"":decodeURIComponent(results[1].replace(/\+/g," "))},isValidEmail:function(e){return/^((([a-zA-Z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+(\.([a-zA-Z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+)*)|((\x22)((((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(([\x01-\x08\x0b\x0c\x0e-\x1f\x7f]|\x21|[\x23-\x5b]|[\x5d-\x7e]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(\\([\x01-\x09\x0b\x0c\x0d-\x7f]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))))*(((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(\x22)))@((([a-zA-Z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-zA-Z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-zA-Z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-zA-Z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-zA-Z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-zA-Z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-zA-Z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-zA-Z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?$/.test(e)},trackVisitorEmail:function(e){if(_dha.utils.isValidEmail(e)){var t=_dha.storage.getItem("_dha__uuid");if(t){const n=_dha.utils.isFirstEmail();return _dha.storage.setItem("_dha__em",e),_dha.proxy.updateVisitor(t,e,null,null,window.location.host,n),!0}}return!1},obtainEmailParameter:function(){var e=_dha.utils.getParameterByName("dplrid");return e?e=_dha.utils.hexToAscii(e):(e=_dha.utils.getParameterByName("email"))||_dha.utils.getParameterByName("dha_em")},hasEmail:function(){const e=_dha.storage.getItem("_dha__em"),t=_dha.utils.obtainEmailParameter();return!!(e||t&&_dha.utils.isValidEmail(t))},isFirstEmail:function(){return!_dha.storage.getItem("_dha__em")},isStringIntoArrayOfSubstring:function(e,t){return t.some(function(t){return e.indexOf(t)>-1})},isStringIntoArrayOfString:function(e,t){return t.indexOf(e)>-1},detectSourceByUrl:function(){var e=["twitter","facebook","linkedin","pinterest","plus.google","youtube","instagram"],t=["google","bing","duckduckgo","exalead","gigablast","munax","qwant","yahoo","yandex"],n=_dha.utils.getParameterByName("utm_medium"),r=_dha.utils.getParameterByName("utm_source"),o=_dha.utils.getParameterByName("utm_campaign");const i=!!_dha.utils.getParameterByName("dplrid");var a=[];if(n&&(n=n.toLowerCase(),a.push(n)),r&&(r=r.toLowerCase(),a.push(r)),o&&(o=o.toLowerCase(),a.push(o)),"social"===n){if(_dha.utils.isStringIntoArrayOfString(r,e))return"Social";if(window.cdhReferrer&&_dha.utils.isStringIntoArrayOfSubstring(window.cdhReferrer,e))return"Social"}return _dha.utils.isStringIntoArrayOfSubstring(window.cdhReferrer,e)?"Social":_dha.utils.isStringIntoArrayOfSubstring(r,["email"])||_dha.utils.isStringIntoArrayOfSubstring(n,["email"])||_dha.utils.isStringIntoArrayOfSubstring(o,["email"])||i?"Email":_dha.utils.isStringIntoArrayOfSubstring(r,["adword","ppc","cpc"])||_dha.utils.isStringIntoArrayOfSubstring(n,["adword","ppc","cpc"])||_dha.utils.isStringIntoArrayOfSubstring(o,["adword","ppc","cpc"])?"Paid":_dha.utils.getParameterByName("gclid")?"Paid":window.cdhReferrer&&a.length>0&&_dha.utils.isStringIntoArrayOfSubstring(window.cdhReferrer,a)?"Paid":window.cdhReferrer&&_dha.utils.isStringIntoArrayOfSubstring(window.cdhReferrer,t)?"Organic":!window.cdhReferrer||_dha.utils.isStringIntoArrayOfSubstring(window.cdhReferrer,t)&&_dha.utils.isStringIntoArrayOfSubstring(window.cdhReferrer,e)?"Direct":"Referral"},generateBrowserFingerprint:function(){var e=(new Date).getTime(),t=window.navigator,n=window.screen,r=t.mimeTypes.length;r+=t.userAgent.replace(/\D+/g,""),r+=t.plugins.length,r+=n.height||"",r+=n.width||"";for(var o=e+(r+=n.pixelDepth||""),i=[8,4,4,4,12],a=[],s=0,u=0;u<i.length;u++)a.push(o.slice(s,s+i[u])),s+=i[u];return a.join("-")},generateUUID:function(){for(var e=[],t=0;t<256;t++)e[t]=(t<16?"0":"")+t.toString(16);var n=4294967295*Math.random()|0,r=4294967295*Math.random()|0,o=4294967295*Math.random()|0,i=4294967295*Math.random()|0;return e[255&n]+e[n>>8&255]+e[n>>16&255]+e[n>>24&255]+"-"+e[255&r]+e[r>>8&255]+"-"+e[r>>16&15|64]+e[r>>24&255]+"-"+e[63&o|128]+e[o>>8&255]+"-"+e[o>>16&255]+e[o>>24&255]+e[255&i]+e[i>>8&255]+e[i>>16&255]+e[i>>24&255]},isMobile:function(){const n=navigator.userAgent||navigator.vendor||window.opera;return e.test(n)||t.test(n.substr(0,4))}}}(),_dha.UI=function(){var e={},t=0,n=!1;function r(e){var t;return function e(t,n){for(var r in n)t.hasOwnProperty(r)?"object"==typeof n[r]&&e(t[r],n[r]):t[r]=n[r]}(t="object"==typeof e[0]?e[0]:{},{delay_capturer_display:0,mobile:!1,leave_window:!1,after_time:{show:!1,time:1e4},repeat_after_time:2592e6,capturer_info:{handle_by_lib:!0,import_file:!0,capturer_id:"dha-capturer-container",form_id:"dha-capturer-form"}}),t}return{config:function(t){e=t},init:function(){window.onblur=function(){n=!0},window.onfocus=function(){n=!1},e.capturer_info.handle_by_lib&&(document.onclick=function(t){t.target.id!=e.capturer_info.capturer_id&&"dha-close-popup"!=t.target.id&&"dha-close-popup"!=t.target.parentElement.id||(document.getElementById(e.capturer_info.capturer_id).style.display="none")})},captureEmail:function(){if(!_dha.storage.getItem("_dha__ps")){if(_dha.UI.config(r(arguments)),_dha.utils.isMobile()&&!e.mobile)return;if(e.capturer_info.import_file){var t=document.querySelector("#dha-capturer-file");t&&t.href&&fetch(t.href).then(function(e){return e.text()}).then(function(e){var t=document.createElement("div");t.innerHTML=e,document.body.appendChild(t)})}_dha.UI.init(),_dha.UI.verify_time_to_repeat(),e.after_time.show&&_dha.UI.show_popup_after_period_a_time(),e.leave_window&&setTimeout(function(){document.onmouseout=function(e){if(!_dha.storage.getItem("_dha__ped")){var t=(e=e||window.event).relatedTarget||e.toElement;t&&"HTML"!=t.nodeName||_dha.UI.show_popup()}}},e.delay_capturer_display),e.capturer_info.handle_by_lib||_dha.UI.bindCapturerSubmit()}},validateCapturer:function(){var t="#"+e.capturer_info.form_id,n=document.querySelector(t+" #email");return document.querySelector(t+" #dha-error-email-empty").style.display="none",document.querySelector(t+" #dha-error-email-invalid").style.display="none",n.value?_dha.utils.isValidEmail(n.value)?void _dha.UI.registerInfoPopup(n.value):(n.className&&-1==n.className.indexOf("dha-error")?n.className+=" dha-error":n.className||(n.className="dha-error"),void(document.querySelector(t+" #dha-error-email-invalid").style.display="block")):(n.className&&-1==n.className.indexOf("dha-error")?n.className+=" dha-error":n.className||(n.className="dha-error"),void(document.querySelector(t+" #dha-error-email-empty").style.display="block"))},show_popup_after_period_a_time:function(){time=e.after_time.time,delta=100,_dha.storage.getItem("_dha__ped")||(t=setInterval(function(){n?time=e.after_time.time:(time-=delta,time<=0&&(clearInterval(t),_dha.UI.show_popup()))},delta))},verify_time_to_repeat:function(){if(_dha.storage.getItem("_dha__ped")){popup_exit_date=new Date(JSON.parse(localStorage.getItem("_dha__ped"))),max_date_popup=new Date(JSON.parse(localStorage.getItem("_dha__ped")));var t=Math.floor(e.repeat_after_time/1e3/60);max_date_popup.setMinutes(max_date_popup.getMinutes()+t),current_time=new Date,current_time>max_date_popup&&_dha.storage.deleteItem("_dha__ped")}},show_popup:function(){if(_dha.storage.setItem("_dha__ped",JSON.stringify(new Date)),clearInterval(t),e.capturer_info.handle_by_lib){var n="#"+e.capturer_info.form_id,r=document.querySelector(n+" #email");r.className=r.className.replace("dha-error",""),document.querySelector(n+" #dha-error-email-empty").style.display="none",document.querySelector(n+" #dha-error-email-invalid").style.display="none",document.querySelector(n+" div.dha-before-submit").style.display="block",document.querySelector(n+" div.dha-after-submit").style.display="none",document.querySelector(n+" div.dha-inputs-holder").style.display="block"}document.querySelector("div#"+e.capturer_info.capturer_id)&&(document.querySelector("div#"+e.capturer_info.capturer_id).style.display="block")},bindCapturerSubmit:function(){var t=_dha.storage.getItem("_dha__uuid"),n=document.querySelector("#"+e.capturer_info.form_id);n&&n.addEventListener("submit",function(){var e=this.querySelector("#email").value;if(e&&_dha.utils.isValidEmail(e)){const n=_dha.utils.isFirstEmail();_dha.proxy.updateVisitor(t,e,null,null,window.location.host,n),_dha.storage.setItem("_dha__em",e),_dha.storage.setItem("_dha__ps",new Date)}})},registerInfoPopup:function(t){var n=_dha.storage.getItem("_dha__uuid");const r=_dha.utils.isFirstEmail();_dha.proxy.updateVisitor(n,t,null,null,window.location.host,r),_dha.storage.setItem("_dha__em",t),_dha.storage.setItem("_dha__ps",new Date);var o="#"+e.capturer_info.form_id;document.querySelector(o+" div.dha-before-submit").style.display="none",document.querySelector(o+" div.dha-after-submit").style.display="block",document.querySelector(o+" div.dha-inputs-holder").style.display="none",setTimeout(function(){document.getElementById(e.capturer_info.capturer_id).style.display="none"},4e3)}}}(),function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=16)}([function(e,t,n){!function(e){"use strict";function t(e){return new Promise(function(t,n){e.onsuccess=function(){t(e.result)},e.onerror=function(){n(e.error)}})}function n(e,n,r){var o,i=new Promise(function(i,a){t(o=e[n].apply(e,r)).then(i,a)});return i.request=o,i}function r(e,t,r){var o=n(e,t,r);return o.then(function(e){if(e)return new c(e,o.request)})}function o(e,t,n){n.forEach(function(n){Object.defineProperty(e.prototype,n,{get:function(){return this[t][n]},set:function(e){this[t][n]=e}})})}function i(e,t,r,o){o.forEach(function(o){o in r.prototype&&(e.prototype[o]=function(){return n(this[t],o,arguments)})})}function a(e,t,n,r){r.forEach(function(r){r in n.prototype&&(e.prototype[r]=function(){return this[t][r].apply(this[t],arguments)})})}function s(e,t,n,o){o.forEach(function(o){o in n.prototype&&(e.prototype[o]=function(){return r(this[t],o,arguments)})})}function u(e){this._index=e}function c(e,t){this._cursor=e,this._request=t}function l(e){this._store=e}function f(e){this._tx=e,this.complete=new Promise(function(t,n){e.oncomplete=function(){t()},e.onerror=function(){n(e.error)},e.onabort=function(){n(e.error)}})}function d(e,t,n){this._db=e,this.oldVersion=t,this.transaction=new f(n)}function p(e){this._db=e}o(u,"_index",["name","keyPath","multiEntry","unique"]),i(u,"_index",IDBIndex,["get","getKey","getAll","getAllKeys","count"]),s(u,"_index",IDBIndex,["openCursor","openKeyCursor"]),o(c,"_cursor",["direction","key","primaryKey","value"]),i(c,"_cursor",IDBCursor,["update","delete"]),["advance","continue","continuePrimaryKey"].forEach(function(e){e in IDBCursor.prototype&&(c.prototype[e]=function(){var n=this,r=arguments;return Promise.resolve().then(function(){return n._cursor[e].apply(n._cursor,r),t(n._request).then(function(e){if(e)return new c(e,n._request)})})})}),l.prototype.createIndex=function(){return new u(this._store.createIndex.apply(this._store,arguments))},l.prototype.index=function(){return new u(this._store.index.apply(this._store,arguments))},o(l,"_store",["name","keyPath","indexNames","autoIncrement"]),i(l,"_store",IDBObjectStore,["put","add","delete","clear","get","getAll","getKey","getAllKeys","count"]),s(l,"_store",IDBObjectStore,["openCursor","openKeyCursor"]),a(l,"_store",IDBObjectStore,["deleteIndex"]),f.prototype.objectStore=function(){return new l(this._tx.objectStore.apply(this._tx,arguments))},o(f,"_tx",["objectStoreNames","mode"]),a(f,"_tx",IDBTransaction,["abort"]),d.prototype.createObjectStore=function(){return new l(this._db.createObjectStore.apply(this._db,arguments))},o(d,"_db",["name","version","objectStoreNames"]),a(d,"_db",IDBDatabase,["deleteObjectStore","close"]),p.prototype.transaction=function(){return new f(this._db.transaction.apply(this._db,arguments))},o(p,"_db",["name","version","objectStoreNames"]),a(p,"_db",IDBDatabase,["close"]),["openCursor","openKeyCursor"].forEach(function(e){[l,u].forEach(function(t){e in t.prototype&&(t.prototype[e.replace("open","iterate")]=function(){var t=function(e){return Array.prototype.slice.call(e)}(arguments),n=t[t.length-1],r=this._store||this._index,o=r[e].apply(r,t.slice(0,-1));o.onsuccess=function(){n(o.result)}})})}),[u,l].forEach(function(e){e.prototype.getAll||(e.prototype.getAll=function(e,t){var n=this,r=[];return new Promise(function(o){n.iterateCursor(e,function(e){e?(r.push(e.value),void 0===t||r.length!=t?e.continue():o(r)):o(r)})})})}),e.openDb=function(e,t,r){var o=n(indexedDB,"open",[e,t]),i=o.request;return i&&(i.onupgradeneeded=function(e){r&&r(new d(i.result,e.oldVersion,i.transaction))}),o.then(function(e){return new p(e)})},e.deleteDb=function(e){return n(indexedDB,"deleteDatabase",[e])},Object.defineProperty(e,"__esModule",{value:!0})}(t)},function(e,t,n){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0});var r=n(9),o={NODE_CLIENT:!1,NODE_ADMIN:!1,SDK_VERSION:"${JSCORE_VERSION}"},i=function(e,t){if(!e)throw a(t)},a=function(e){return new Error("Firebase Database ("+o.SDK_VERSION+") INTERNAL ASSERT FAILED: "+e)},s=function(e){for(var t=[],n=0,r=0;r<e.length;r++){var o=e.charCodeAt(r);o<128?t[n++]=o:o<2048?(t[n++]=o>>6|192,t[n++]=63&o|128):55296==(64512&o)&&r+1<e.length&&56320==(64512&e.charCodeAt(r+1))?(o=65536+((1023&o)<<10)+(1023&e.charCodeAt(++r)),t[n++]=o>>18|240,t[n++]=o>>12&63|128,t[n++]=o>>6&63|128,t[n++]=63&o|128):(t[n++]=o>>12|224,t[n++]=o>>6&63|128,t[n++]=63&o|128)}return t},u={byteToCharMap_:null,charToByteMap_:null,byteToCharMapWebSafe_:null,charToByteMapWebSafe_:null,ENCODED_VALS_BASE:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",get ENCODED_VALS(){return this.ENCODED_VALS_BASE+"+/="},get ENCODED_VALS_WEBSAFE(){return this.ENCODED_VALS_BASE+"-_."},HAS_NATIVE_SUPPORT:"function"==typeof atob,encodeByteArray:function(e,t){if(!Array.isArray(e))throw Error("encodeByteArray takes an array as a parameter");this.init_();for(var n=t?this.byteToCharMapWebSafe_:this.byteToCharMap_,r=[],o=0;o<e.length;o+=3){var i=e[o],a=o+1<e.length,s=a?e[o+1]:0,u=o+2<e.length,c=u?e[o+2]:0,l=i>>2,f=(3&i)<<4|s>>4,d=(15&s)<<2|c>>6,p=63&c;u||(p=64,a||(d=64)),r.push(n[l],n[f],n[d],n[p])}return r.join("")},encodeString:function(e,t){return this.HAS_NATIVE_SUPPORT&&!t?btoa(e):this.encodeByteArray(s(e),t)},decodeString:function(e,t){return this.HAS_NATIVE_SUPPORT&&!t?atob(e):function(e){for(var t=[],n=0,r=0;n<e.length;){var o=e[n++];if(o<128)t[r++]=String.fromCharCode(o);else if(o>191&&o<224){var i=e[n++];t[r++]=String.fromCharCode((31&o)<<6|63&i)}else if(o>239&&o<365){var a=((7&o)<<18|(63&(i=e[n++]))<<12|(63&(s=e[n++]))<<6|63&e[n++])-65536;t[r++]=String.fromCharCode(55296+(a>>10)),t[r++]=String.fromCharCode(56320+(1023&a))}else{i=e[n++];var s=e[n++];t[r++]=String.fromCharCode((15&o)<<12|(63&i)<<6|63&s)}}return t.join("")}(this.decodeStringToByteArray(e,t))},decodeStringToByteArray:function(e,t){this.init_();for(var n=t?this.charToByteMapWebSafe_:this.charToByteMap_,r=[],o=0;o<e.length;){var i=n[e.charAt(o++)],a=o<e.length?n[e.charAt(o)]:0,s=++o<e.length?n[e.charAt(o)]:64,u=++o<e.length?n[e.charAt(o)]:64;if(++o,null==i||null==a||null==s||null==u)throw Error();var c=i<<2|a>>4;if(r.push(c),64!==s){var l=a<<4&240|s>>2;if(r.push(l),64!==u){var f=s<<6&192|u;r.push(f)}}}return r},init_:function(){if(!this.byteToCharMap_){this.byteToCharMap_={},this.charToByteMap_={},this.byteToCharMapWebSafe_={},this.charToByteMapWebSafe_={};for(var e=0;e<this.ENCODED_VALS.length;e++)this.byteToCharMap_[e]=this.ENCODED_VALS.charAt(e),this.charToByteMap_[this.byteToCharMap_[e]]=e,this.byteToCharMapWebSafe_[e]=this.ENCODED_VALS_WEBSAFE.charAt(e),this.charToByteMapWebSafe_[this.byteToCharMapWebSafe_[e]]=e,e>=this.ENCODED_VALS_BASE.length&&(this.charToByteMap_[this.ENCODED_VALS_WEBSAFE.charAt(e)]=e,this.charToByteMapWebSafe_[this.ENCODED_VALS.charAt(e)]=e)}}},c=function(e){try{return u.decodeString(e,!0)}catch(e){console.error("base64Decode failed: ",e)}return null};function l(e,t){if(!(t instanceof Object))return t;switch(t.constructor){case Date:return new Date(t.getTime());case Object:void 0===e&&(e={});break;case Array:e=[];break;default:return t}for(var n in t)t.hasOwnProperty(n)&&(e[n]=l(e[n],t[n]));return e}var f=function(){function e(){var e=this;this.reject=function(){},this.resolve=function(){},this.promise=new Promise(function(t,n){e.resolve=t,e.reject=n})}return e.prototype.wrapCallback=function(e){var t=this;return function(n,r){n?t.reject(n):t.resolve(r),"function"==typeof e&&(t.promise.catch(function(){}),1===e.length?e(n):e(n,r))}},e}();function d(){return"undefined"!=typeof navigator&&"string"==typeof navigator.userAgent?navigator.userAgent:""}var p=function(e){function t(n,r){var o=e.call(this,r)||this;return o.code=n,o.name="FirebaseError",Object.setPrototypeOf(o,t.prototype),Error.captureStackTrace&&Error.captureStackTrace(o,h.prototype.create),o}return r.__extends(t,e),t}(Error),h=function(){function e(e,t,n){this.service=e,this.serviceName=t,this.errors=n}return e.prototype.create=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];for(var r=t[0]||{},o=this.service+"/"+e,i=this.errors[e],a=i?function(e,t){return e.replace(v,function(e,n){var r=t[n];return null!=r?r.toString():"<"+n+"?>"})}(i,r):"Error",s=this.serviceName+": "+a+" ("+o+").",u=new p(o,s),c=0,l=Object.keys(r);c<l.length;c++){var f=l[c];"_"!==f.slice(-1)&&(f in u&&console.warn('Overwriting FirebaseError base field "'+f+'" can cause unexpected behavior.'),u[f]=r[f])}return u},e}();var v=/\{\$([^}]+)}/g;function g(e){return JSON.parse(e)}var y=function(e){var t={},n={},r={},o="";try{var i=e.split(".");t=g(c(i[0])||""),n=g(c(i[1])||""),o=i[2],r=n.d||{},delete n.d}catch(e){}return{header:t,claims:n,data:r,signature:o}},m=function(){function e(){this.chain_=[],this.buf_=[],this.W_=[],this.pad_=[],this.inbuf_=0,this.total_=0,this.blockSize=64,this.pad_[0]=128;for(var e=1;e<this.blockSize;++e)this.pad_[e]=0;this.reset()}return e.prototype.reset=function(){this.chain_[0]=1732584193,this.chain_[1]=4023233417,this.chain_[2]=2562383102,this.chain_[3]=271733878,this.chain_[4]=3285377520,this.inbuf_=0,this.total_=0},e.prototype.compress_=function(e,t){t||(t=0);var n=this.W_;if("string"==typeof e)for(var r=0;r<16;r++)n[r]=e.charCodeAt(t)<<24|e.charCodeAt(t+1)<<16|e.charCodeAt(t+2)<<8|e.charCodeAt(t+3),t+=4;else for(r=0;r<16;r++)n[r]=e[t]<<24|e[t+1]<<16|e[t+2]<<8|e[t+3],t+=4;for(r=16;r<80;r++){var o=n[r-3]^n[r-8]^n[r-14]^n[r-16];n[r]=4294967295&(o<<1|o>>>31)}var i,a,s=this.chain_[0],u=this.chain_[1],c=this.chain_[2],l=this.chain_[3],f=this.chain_[4];for(r=0;r<80;r++)r<40?r<20?(i=l^u&(c^l),a=1518500249):(i=u^c^l,a=1859775393):r<60?(i=u&c|l&(u|c),a=2400959708):(i=u^c^l,a=3395469782),o=(s<<5|s>>>27)+i+f+a+n[r]&4294967295,f=l,l=c,c=4294967295&(u<<30|u>>>2),u=s,s=o;this.chain_[0]=this.chain_[0]+s&4294967295,this.chain_[1]=this.chain_[1]+u&4294967295,this.chain_[2]=this.chain_[2]+c&4294967295,this.chain_[3]=this.chain_[3]+l&4294967295,this.chain_[4]=this.chain_[4]+f&4294967295},e.prototype.update=function(e,t){if(null!=e){void 0===t&&(t=e.length);for(var n=t-this.blockSize,r=0,o=this.buf_,i=this.inbuf_;r<t;){if(0===i)for(;r<=n;)this.compress_(e,r),r+=this.blockSize;if("string"==typeof e){for(;r<t;)if(o[i]=e.charCodeAt(r),++r,++i===this.blockSize){this.compress_(o),i=0;break}}else for(;r<t;)if(o[i]=e[r],++r,++i===this.blockSize){this.compress_(o),i=0;break}}this.inbuf_=i,this.total_+=t}},e.prototype.digest=function(){var e=[],t=8*this.total_;this.inbuf_<56?this.update(this.pad_,56-this.inbuf_):this.update(this.pad_,this.blockSize-(this.inbuf_-56));for(var n=this.blockSize-1;n>=56;n--)this.buf_[n]=255&t,t/=256;this.compress_(this.buf_);var r=0;for(n=0;n<5;n++)for(var o=24;o>=0;o-=8)e[r]=this.chain_[n]>>o&255,++r;return e},e}(),b=function(){function e(e,t){var n=this;this.observers=[],this.unsubscribes=[],this.observerCount=0,this.task=Promise.resolve(),this.finalized=!1,this.onNoObservers=t,this.task.then(function(){e(n)}).catch(function(e){n.error(e)})}return e.prototype.next=function(e){this.forEachObserver(function(t){t.next(e)})},e.prototype.error=function(e){this.forEachObserver(function(t){t.error(e)}),this.close(e)},e.prototype.complete=function(){this.forEachObserver(function(e){e.complete()}),this.close()},e.prototype.subscribe=function(e,t,n){var r,o=this;if(void 0===e&&void 0===t&&void 0===n)throw new Error("Missing Observer.");void 0===(r=function(e,t){if("object"!=typeof e||null===e)return!1;for(var n=0,r=["next","error","complete"];n<r.length;n++){var o=r[n];if(o in e&&"function"==typeof e[o])return!0}return!1}(e)?e:{next:e,error:t,complete:n}).next&&(r.next=_),void 0===r.error&&(r.error=_),void 0===r.complete&&(r.complete=_);var i=this.unsubscribeOne.bind(this,this.observers.length);return this.finalized&&this.task.then(function(){try{o.finalError?r.error(o.finalError):r.complete()}catch(e){}}),this.observers.push(r),i},e.prototype.unsubscribeOne=function(e){void 0!==this.observers&&void 0!==this.observers[e]&&(delete this.observers[e],this.observerCount-=1,0===this.observerCount&&void 0!==this.onNoObservers&&this.onNoObservers(this))},e.prototype.forEachObserver=function(e){if(!this.finalized)for(var t=0;t<this.observers.length;t++)this.sendOne(t,e)},e.prototype.sendOne=function(e,t){var n=this;this.task.then(function(){if(void 0!==n.observers&&void 0!==n.observers[e])try{t(n.observers[e])}catch(e){"undefined"!=typeof console&&console.error&&console.error(e)}})},e.prototype.close=function(e){var t=this;this.finalized||(this.finalized=!0,void 0!==e&&(this.finalError=e),this.task.then(function(){t.observers=void 0,t.onNoObservers=void 0}))},e}();function _(){}function w(e,t,n){var r="";switch(t){case 1:r=n?"first":"First";break;case 2:r=n?"second":"Second";break;case 3:r=n?"third":"Third";break;case 4:r=n?"fourth":"Fourth";break;default:throw new Error("errorPrefix called with argumentNumber > 4.  Need to update it?")}return e+" failed: "+(r+" argument ")}t.CONSTANTS=o,t.Deferred=f,t.ErrorFactory=h,t.FirebaseError=p,t.Sha1=m,t.assert=i,t.assertionError=a,t.async=function(e,t){return function(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];Promise.resolve(!0).then(function(){e.apply(void 0,n)}).catch(function(e){t&&t(e)})}},t.base64=u,t.base64Decode=c,t.base64Encode=function(e){var t=s(e);return u.encodeByteArray(t,!0)},t.contains=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.createSubscribe=function(e,t){var n=new b(e,t);return n.subscribe.bind(n)},t.decode=y,t.deepCopy=function(e){return l(void 0,e)},t.deepExtend=l,t.errorPrefix=w,t.getUA=d,t.isAdmin=function(e){var t=y(e).claims;return"object"==typeof t&&!0===t.admin},t.isBrowser=function(){return"object"==typeof self&&self.self===self},t.isBrowserExtension=function(){var e="object"==typeof chrome?chrome.runtime:"object"==typeof browser?browser.runtime:void 0;return"object"==typeof e&&void 0!==e.id},t.isElectron=function(){return d().indexOf("Electron/")>=0},t.isEmpty=function(e){for(var t in e)if(Object.prototype.hasOwnProperty.call(e,t))return!1;return!0},t.isIE=function(){var e=d();return e.indexOf("MSIE ")>=0||e.indexOf("Trident/")>=0},t.isMobileCordova=function(){return"undefined"!=typeof window&&!!(window.cordova||window.phonegap||window.PhoneGap)&&/ios|iphone|ipod|ipad|android|blackberry|iemobile/i.test(d())},t.isNode=function(){try{return"[object process]"===Object.prototype.toString.call(e.process)}catch(e){return!1}},t.isNodeSdk=function(){return!0===o.NODE_CLIENT||!0===o.NODE_ADMIN},t.isReactNative=function(){return"object"==typeof navigator&&"ReactNative"===navigator.product},t.isUWP=function(){return d().indexOf("MSAppHost/")>=0},t.isValidFormat=function(e){var t=y(e).claims;return!!t&&"object"==typeof t&&t.hasOwnProperty("iat")},t.isValidTimestamp=function(e){var t=y(e).claims,n=Math.floor((new Date).getTime()/1e3),r=0,o=0;return"object"==typeof t&&(t.hasOwnProperty("nbf")?r=t.nbf:t.hasOwnProperty("iat")&&(r=t.iat),o=t.hasOwnProperty("exp")?t.exp:r+86400),!!n&&!!r&&!!o&&n>=r&&n<=o},t.issuedAtTime=function(e){var t=y(e).claims;return"object"==typeof t&&t.hasOwnProperty("iat")?t.iat:null},t.jsonEval=g,t.map=function(e,t,n){var r={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(r[o]=t.call(n,e[o],o,e));return r},t.querystring=function(e){for(var t=[],n=function(e,n){Array.isArray(n)?n.forEach(function(n){t.push(encodeURIComponent(e)+"="+encodeURIComponent(n))}):t.push(encodeURIComponent(e)+"="+encodeURIComponent(n))},r=0,o=Object.entries(e);r<o.length;r++){var i=o[r];n(i[0],i[1])}return t.length?"&"+t.join("&"):""},t.querystringDecode=function(e){var t={};return e.replace(/^\?/,"").split("&").forEach(function(e){if(e){var n=e.split("=");t[n[0]]=n[1]}}),t},t.safeGet=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)?e[t]:void 0},t.stringLength=function(e){for(var t=0,n=0;n<e.length;n++){var r=e.charCodeAt(n);r<128?t++:r<2048?t+=2:r>=55296&&r<=56319?(t+=4,n++):t+=3}return t},t.stringToByteArray=function(e){for(var t=[],n=0,r=0;r<e.length;r++){var o=e.charCodeAt(r);if(o>=55296&&o<=56319){var a=o-55296;i(++r<e.length,"Surrogate pair missing trail surrogate."),o=65536+(a<<10)+(e.charCodeAt(r)-56320)}o<128?t[n++]=o:o<2048?(t[n++]=o>>6|192,t[n++]=63&o|128):o<65536?(t[n++]=o>>12|224,t[n++]=o>>6&63|128,t[n++]=63&o|128):(t[n++]=o>>18|240,t[n++]=o>>12&63|128,t[n++]=o>>6&63|128,t[n++]=63&o|128)}return t},t.stringify=function(e){return JSON.stringify(e)},t.validateArgCount=function(e,t,n,r){var o;if(r<t?o="at least "+t:r>n&&(o=0===n?"none":"no more than "+n),o)throw new Error(e+" failed: Was called with "+r+(1===r?" argument.":" arguments.")+" Expects "+o+".")},t.validateCallback=function(e,t,n,r){if((!r||n)&&"function"!=typeof n)throw new Error(w(e,t,r)+"must be a valid function.")},t.validateContextObject=function(e,t,n,r){if((!r||n)&&("object"!=typeof n||null===n))throw new Error(w(e,t,r)+"must be a valid context object.")},t.validateNamespace=function(e,t,n,r){if((!r||n)&&"string"!=typeof n)throw new Error(w(e,t,r)+"must be a valid firebase namespace.")}}).call(this,n(8))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,o,i=n(7),a=n(1),s=n(3),u=n(11),c=((r={})["no-app"]="No Firebase App '{$appName}' has been created - call Firebase App.initializeApp()",r["bad-app-name"]="Illegal App name: '{$appName}",r["duplicate-app"]="Firebase App named '{$appName}' already exists",r["app-deleted"]="Firebase App named '{$appName}' already deleted",r["invalid-app-argument"]="firebase.{$appName}() takes either no argument or a Firebase App instance.",r["invalid-log-argument"]="First argument to `onLog` must be null or a function.",r),l=new a.ErrorFactory("app","Firebase",c),f=((o={})["@firebase/app"]="fire-core",o["@firebase/analytics"]="fire-analytics",o["@firebase/auth"]="fire-auth",o["@firebase/database"]="fire-rtdb",o["@firebase/functions"]="fire-fn",o["@firebase/installations"]="fire-iid",o["@firebase/messaging"]="fire-fcm",o["@firebase/performance"]="fire-perf",o["@firebase/remote-config"]="fire-rc",o["@firebase/storage"]="fire-gcs",o["@firebase/firestore"]="fire-fst",o["fire-js"]="fire-js",o["firebase-wrapper"]="fire-js-all",o),d=new u.Logger("@firebase/app"),p=function(){function e(e,t,n){var r,o,u=this;this.firebase_=n,this.isDeleted_=!1,this.name_=t.name,this.automaticDataCollectionEnabled_=t.automaticDataCollectionEnabled||!1,this.options_=a.deepCopy(e),this.container=new s.ComponentContainer(t.name),this._addComponent(new s.Component("app",function(){return u},"PUBLIC"));try{for(var c=i.__values(this.firebase_.INTERNAL.components.values()),l=c.next();!l.done;l=c.next()){var f=l.value;this._addComponent(f)}}catch(e){r={error:e}}finally{try{l&&!l.done&&(o=c.return)&&o.call(c)}finally{if(r)throw r.error}}}return Object.defineProperty(e.prototype,"automaticDataCollectionEnabled",{get:function(){return this.checkDestroyed_(),this.automaticDataCollectionEnabled_},set:function(e){this.checkDestroyed_(),this.automaticDataCollectionEnabled_=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"name",{get:function(){return this.checkDestroyed_(),this.name_},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"options",{get:function(){return this.checkDestroyed_(),this.options_},enumerable:!0,configurable:!0}),e.prototype.delete=function(){var e=this;return new Promise(function(t){e.checkDestroyed_(),t()}).then(function(){return e.firebase_.INTERNAL.removeApp(e.name_),Promise.all(e.container.getProviders().map(function(e){return e.delete()}))}).then(function(){e.isDeleted_=!0})},e.prototype._getService=function(e,t){return void 0===t&&(t="[DEFAULT]"),this.checkDestroyed_(),this.container.getProvider(e).getImmediate({identifier:t})},e.prototype._removeServiceInstance=function(e,t){void 0===t&&(t="[DEFAULT]"),this.container.getProvider(e).clearInstance(t)},e.prototype._addComponent=function(e){try{this.container.addComponent(e)}catch(t){d.debug("Component "+e.name+" failed to register with FirebaseApp "+this.name,t)}},e.prototype._addOrOverwriteComponent=function(e){this.container.addOrOverwriteComponent(e)},e.prototype.checkDestroyed_=function(){if(this.isDeleted_)throw l.create("app-deleted",{appName:this.name_})},e}();p.prototype.name&&p.prototype.options||p.prototype.delete||console.log("dc");var h=function e(){var t=function(e){var t={},n=new Map,r={__esModule:!0,initializeApp:function(n,o){void 0===o&&(o={}),"object"==typeof o&&null!==o||(o={name:o});var i=o;void 0===i.name&&(i.name="[DEFAULT]");var s=i.name;if("string"!=typeof s||!s)throw l.create("bad-app-name",{appName:String(s)});if(a.contains(t,s))throw l.create("duplicate-app",{appName:s});var u=new e(n,i,r);return t[s]=u,u},app:o,registerVersion:function(e,t,n){var r,o=null!==(r=f[e])&&void 0!==r?r:e;n&&(o+="-"+n);var i=o.match(/\s|\//),a=t.match(/\s|\//);if(i||a){var u=['Unable to register library "'+o+'" with version "'+t+'":'];return i&&u.push('library name "'+o+'" contains illegal characters (whitespace or "/")'),i&&a&&u.push("and"),a&&u.push('version name "'+t+'" contains illegal characters (whitespace or "/")'),void d.warn(u.join(" "))}c(new s.Component(o+"-version",function(){return{library:o,version:t}},"VERSION"))},setLogLevel:u.setLogLevel,onLog:function(e,t){if(null!==e&&"function"!=typeof e)throw l.create("invalid-log-argument",{appName:name});u.setUserLogHandler(e,t)},apps:null,SDK_VERSION:"7.14.1",INTERNAL:{registerComponent:c,removeApp:function(e){delete t[e]},components:n,useAsService:function(e,t){return"serverAuth"===t?null:t}}};function o(e){if(e=e||"[DEFAULT]",!a.contains(t,e))throw l.create("no-app",{appName:e});return t[e]}function c(s){var u,c,f=s.name;if(n.has(f))return d.debug("There were multiple attempts to register component "+f+"."),"PUBLIC"===s.type?r[f]:null;if(n.set(f,s),"PUBLIC"===s.type){var p=function(e){if(void 0===e&&(e=o()),"function"!=typeof e[f])throw l.create("invalid-app-argument",{appName:f});return e[f]()};void 0!==s.serviceProps&&a.deepExtend(p,s.serviceProps),r[f]=p,e.prototype[f]=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return this._getService.bind(this,f).apply(this,s.multipleInstances?e:[])}}try{for(var h=i.__values(Object.keys(t)),v=h.next();!v.done;v=h.next()){var g=v.value;t[g]._addComponent(s)}}catch(e){u={error:e}}finally{try{v&&!v.done&&(c=h.return)&&c.call(h)}finally{if(u)throw u.error}}return"PUBLIC"===s.type?r[f]:null}return r.default=r,Object.defineProperty(r,"apps",{get:function(){return Object.keys(t).map(function(e){return t[e]})}}),o.App=e,r}(p);return t.INTERNAL=i.__assign(i.__assign({},t.INTERNAL),{createFirebaseNamespace:e,extendNamespace:function(e){a.deepExtend(t,e)},createSubscribe:a.createSubscribe,ErrorFactory:a.ErrorFactory,deepExtend:a.deepExtend}),t}(),v=function(){function e(e){this.container=e}return e.prototype.getPlatformInfoString=function(){return this.container.getProviders().map(function(e){if(function(e){var t=e.getComponent();return"VERSION"===(null==t?void 0:t.type)}(e)){var t=e.getImmediate();return t.library+"/"+t.version}return null}).filter(function(e){return e}).join(" ")},e}();if(a.isBrowser()&&void 0!==self.firebase){d.warn("\n    Warning: Firebase is already defined in the global scope. Please make sure\n    Firebase library is only loaded once.\n  ");var g=self.firebase.SDK_VERSION;g&&g.indexOf("LITE")>=0&&d.warn("\n    Warning: You are trying to load Firebase while using Firebase Performance standalone script.\n    You should load Firebase Performance with this instance of Firebase to avoid loading duplicate code.\n    ")}var y=h.initializeApp;h.initializeApp=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return a.isNode()&&d.warn('\n      Warning: This is a browser-targeted Firebase bundle but it appears it is being\n      run in a Node environment.  If running in a Node environment, make sure you\n      are using the bundle specified by the "main" field in package.json.\n      \n      If you are using Webpack, you can specify "main" as the first item in\n      "resolve.mainFields":\n      https://webpack.js.org/configuration/resolve/#resolvemainfields\n      \n      If using Rollup, use the rollup-plugin-node-resolve plugin and specify "main"\n      as the first item in "mainFields", e.g. [\'main\', \'module\'].\n      https://github.com/rollup/rollup-plugin-node-resolve\n      '),y.apply(void 0,e)};var m=h;!function(e,t){e.INTERNAL.registerComponent(new s.Component("platform-logger",function(e){return new v(e)},"PRIVATE")),e.registerVersion("@firebase/app","0.6.2",void 0),e.registerVersion("fire-js","")}(m),t.default=m,t.firebase=m},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(10),o=n(1),i=function(){function e(e,t,n){this.name=e,this.instanceFactory=t,this.type=n,this.multipleInstances=!1,this.serviceProps={},this.instantiationMode="LAZY"}return e.prototype.setInstantiationMode=function(e){return this.instantiationMode=e,this},e.prototype.setMultipleInstances=function(e){return this.multipleInstances=e,this},e.prototype.setServiceProps=function(e){return this.serviceProps=e,this},e}(),a=function(){function e(e,t){this.name=e,this.container=t,this.component=null,this.instances=new Map,this.instancesDeferred=new Map}return e.prototype.get=function(e){void 0===e&&(e="[DEFAULT]");var t=this.normalizeInstanceIdentifier(e);if(!this.instancesDeferred.has(t)){var n=new o.Deferred;this.instancesDeferred.set(t,n);try{var r=this.getOrInitializeService(t);r&&n.resolve(r)}catch(e){}}return this.instancesDeferred.get(t).promise},e.prototype.getImmediate=function(e){var t=r.__assign({identifier:"[DEFAULT]",optional:!1},e),n=t.identifier,o=t.optional,i=this.normalizeInstanceIdentifier(n);try{var a=this.getOrInitializeService(i);if(!a){if(o)return null;throw Error("Service "+this.name+" is not available")}return a}catch(e){if(o)return null;throw e}},e.prototype.getComponent=function(){return this.component},e.prototype.setComponent=function(e){var t,n;if(e.name!==this.name)throw Error("Mismatching Component "+e.name+" for Provider "+this.name+".");if(this.component)throw Error("Component for "+this.name+" has already been provided");if(this.component=e,function(e){return"EAGER"===e.instantiationMode}(e))try{this.getOrInitializeService("[DEFAULT]")}catch(e){}try{for(var o=r.__values(this.instancesDeferred.entries()),i=o.next();!i.done;i=o.next()){var a=r.__read(i.value,2),s=a[0],u=a[1],c=this.normalizeInstanceIdentifier(s);try{var l=this.getOrInitializeService(c);u.resolve(l)}catch(e){}}}catch(e){t={error:e}}finally{try{i&&!i.done&&(n=o.return)&&n.call(o)}finally{if(t)throw t.error}}},e.prototype.clearInstance=function(e){void 0===e&&(e="[DEFAULT]"),this.instancesDeferred.delete(e),this.instances.delete(e)},e.prototype.delete=function(){return r.__awaiter(this,void 0,void 0,function(){var e;return r.__generator(this,function(t){switch(t.label){case 0:return e=Array.from(this.instances.values()),[4,Promise.all(e.filter(function(e){return"INTERNAL"in e}).map(function(e){return e.INTERNAL.delete()}))];case 1:return t.sent(),[2]}})})},e.prototype.isComponentSet=function(){return null!=this.component},e.prototype.getOrInitializeService=function(e){var t=this.instances.get(e);return!t&&this.component&&(t=this.component.instanceFactory(this.container,function(e){return"[DEFAULT]"===e?void 0:e}(e)),this.instances.set(e,t)),t||null},e.prototype.normalizeInstanceIdentifier=function(e){return this.component?this.component.multipleInstances?e:"[DEFAULT]":e},e}(),s=function(){function e(e){this.name=e,this.providers=new Map}return e.prototype.addComponent=function(e){var t=this.getProvider(e.name);if(t.isComponentSet())throw new Error("Component "+e.name+" has already been registered with "+this.name);t.setComponent(e)},e.prototype.addOrOverwriteComponent=function(e){this.getProvider(e.name).isComponentSet()&&this.providers.delete(e.name),this.addComponent(e)},e.prototype.getProvider=function(e){if(this.providers.has(e))return this.providers.get(e);var t=new a(e,this);return this.providers.set(e,t),t},e.prototype.getProviders=function(){return Array.from(this.providers.values())},e}();t.Component=i,t.ComponentContainer=s,t.Provider=a},function(e,t,n){e.exports=n(14)},function(e,t){function n(e,t,n,r,o,i,a){try{var s=e[i](a),u=s.value}catch(e){return void n(e)}s.done?t(u):Promise.resolve(u).then(r,o)}e.exports=function(e){return function(){var t=this,r=arguments;return new Promise(function(o,i){var a=e.apply(t,r);function s(e){n(a,o,i,s,u,"next",e)}function u(e){n(a,o,i,s,u,"throw",e)}s(void 0)})}}},function(e,t,n){"use strict";var r,o=(r=n(2))&&"object"==typeof r&&"default"in r?r.default:r;o.registerVersion("firebase","7.14.2","app"),e.exports=o},function(e,t,n){"use strict";n.r(t),n.d(t,"__extends",function(){return o}),n.d(t,"__assign",function(){return i}),n.d(t,"__rest",function(){return a}),n.d(t,"__decorate",function(){return s}),n.d(t,"__param",function(){return u}),n.d(t,"__metadata",function(){return c}),n.d(t,"__awaiter",function(){return l}),n.d(t,"__generator",function(){return f}),n.d(t,"__exportStar",function(){return d}),n.d(t,"__values",function(){return p}),n.d(t,"__read",function(){return h}),n.d(t,"__spread",function(){return v}),n.d(t,"__spreadArrays",function(){return g}),n.d(t,"__await",function(){return y}),n.d(t,"__asyncGenerator",function(){return m}),n.d(t,"__asyncDelegator",function(){return b}),n.d(t,"__asyncValues",function(){return _}),n.d(t,"__makeTemplateObject",function(){return w}),n.d(t,"__importStar",function(){return S}),n.d(t,"__importDefault",function(){return k}),n.d(t,"__classPrivateFieldGet",function(){return x}),n.d(t,"__classPrivateFieldSet",function(){return E});var r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)};function o(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var i=function(){return(i=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)};function a(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n}function s(e,t,n,r){var o,i=arguments.length,a=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a}function u(e,t){return function(n,r){t(n,r,e)}}function c(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}function l(e,t,n,r){return new(n||(n=Promise))(function(o,i){function a(e){try{u(r.next(e))}catch(e){i(e)}}function s(e){try{u(r.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}u((r=r.apply(e,t||[])).next())})}function f(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}}function d(e,t){for(var n in e)t.hasOwnProperty(n)||(t[n]=e[n])}function p(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function h(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-->0)&&!(r=i.next()).done;)a.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a}function v(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(h(arguments[t]));return e}function g(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;var r=Array(e),o=0;for(t=0;t<n;t++)for(var i=arguments[t],a=0,s=i.length;a<s;a++,o++)r[o]=i[a];return r}function y(e){return this instanceof y?(this.v=e,this):new y(e)}function m(e,t,n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r,o=n.apply(e,t||[]),i=[];return r={},a("next"),a("throw"),a("return"),r[Symbol.asyncIterator]=function(){return this},r;function a(e){o[e]&&(r[e]=function(t){return new Promise(function(n,r){i.push([e,t,n,r])>1||s(e,t)})})}function s(e,t){try{(n=o[e](t)).value instanceof y?Promise.resolve(n.value.v).then(u,c):l(i[0][2],n)}catch(e){l(i[0][3],e)}var n}function u(e){s("next",e)}function c(e){s("throw",e)}function l(e,t){e(t),i.shift(),i.length&&s(i[0][0],i[0][1])}}function b(e){var t,n;return t={},r("next"),r("throw",function(e){throw e}),r("return"),t[Symbol.iterator]=function(){return this},t;function r(r,o){t[r]=e[r]?function(t){return(n=!n)?{value:y(e[r](t)),done:"return"===r}:o?o(t):t}:o}}function _(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,n=e[Symbol.asyncIterator];return n?n.call(e):(e=p(e),t={},r("next"),r("throw"),r("return"),t[Symbol.asyncIterator]=function(){return this},t);function r(n){t[n]=e[n]&&function(t){return new Promise(function(r,o){!function(e,t,n,r){Promise.resolve(r).then(function(t){e({value:t,done:n})},t)}(r,o,(t=e[n](t)).done,t.value)})}}}function w(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}function S(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}function k(e){return e&&e.__esModule?e:{default:e}}function x(e,t){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return t.get(e)}function E(e,t,n){if(!t.has(e))throw new TypeError("attempted to set private field on non-instance");return t.set(e,n),n}},function(e,t){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(e){"object"==typeof window&&(n=window)}e.exports=n},function(e,t,n){"use strict";n.r(t),n.d(t,"__extends",function(){return o}),n.d(t,"__assign",function(){return i}),n.d(t,"__rest",function(){return a}),n.d(t,"__decorate",function(){return s}),n.d(t,"__param",function(){return u}),n.d(t,"__metadata",function(){return c}),n.d(t,"__awaiter",function(){return l}),n.d(t,"__generator",function(){return f}),n.d(t,"__exportStar",function(){return d}),n.d(t,"__values",function(){return p}),n.d(t,"__read",function(){return h}),n.d(t,"__spread",function(){return v}),n.d(t,"__spreadArrays",function(){return g}),n.d(t,"__await",function(){return y}),n.d(t,"__asyncGenerator",function(){return m}),n.d(t,"__asyncDelegator",function(){return b}),n.d(t,"__asyncValues",function(){return _}),n.d(t,"__makeTemplateObject",function(){return w}),n.d(t,"__importStar",function(){return S}),n.d(t,"__importDefault",function(){return k}),n.d(t,"__classPrivateFieldGet",function(){return x}),n.d(t,"__classPrivateFieldSet",function(){return E});var r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)};function o(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var i=function(){return(i=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)};function a(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n}function s(e,t,n,r){var o,i=arguments.length,a=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a}function u(e,t){return function(n,r){t(n,r,e)}}function c(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}function l(e,t,n,r){return new(n||(n=Promise))(function(o,i){function a(e){try{u(r.next(e))}catch(e){i(e)}}function s(e){try{u(r.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}u((r=r.apply(e,t||[])).next())})}function f(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}}function d(e,t){for(var n in e)t.hasOwnProperty(n)||(t[n]=e[n])}function p(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function h(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-->0)&&!(r=i.next()).done;)a.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a}function v(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(h(arguments[t]));return e}function g(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;var r=Array(e),o=0;for(t=0;t<n;t++)for(var i=arguments[t],a=0,s=i.length;a<s;a++,o++)r[o]=i[a];return r}function y(e){return this instanceof y?(this.v=e,this):new y(e)}function m(e,t,n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r,o=n.apply(e,t||[]),i=[];return r={},a("next"),a("throw"),a("return"),r[Symbol.asyncIterator]=function(){return this},r;function a(e){o[e]&&(r[e]=function(t){return new Promise(function(n,r){i.push([e,t,n,r])>1||s(e,t)})})}function s(e,t){try{(n=o[e](t)).value instanceof y?Promise.resolve(n.value.v).then(u,c):l(i[0][2],n)}catch(e){l(i[0][3],e)}var n}function u(e){s("next",e)}function c(e){s("throw",e)}function l(e,t){e(t),i.shift(),i.length&&s(i[0][0],i[0][1])}}function b(e){var t,n;return t={},r("next"),r("throw",function(e){throw e}),r("return"),t[Symbol.iterator]=function(){return this},t;function r(r,o){t[r]=e[r]?function(t){return(n=!n)?{value:y(e[r](t)),done:"return"===r}:o?o(t):t}:o}}function _(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,n=e[Symbol.asyncIterator];return n?n.call(e):(e=p(e),t={},r("next"),r("throw"),r("return"),t[Symbol.asyncIterator]=function(){return this},t);function r(n){t[n]=e[n]&&function(t){return new Promise(function(r,o){!function(e,t,n,r){Promise.resolve(r).then(function(t){e({value:t,done:n})},t)}(r,o,(t=e[n](t)).done,t.value)})}}}function w(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}function S(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}function k(e){return e&&e.__esModule?e:{default:e}}function x(e,t){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return t.get(e)}function E(e,t,n){if(!t.has(e))throw new TypeError("attempted to set private field on non-instance");return t.set(e,n),n}},function(e,t,n){"use strict";n.r(t),n.d(t,"__extends",function(){return o}),n.d(t,"__assign",function(){return i}),n.d(t,"__rest",function(){return a}),n.d(t,"__decorate",function(){return s}),n.d(t,"__param",function(){return u}),n.d(t,"__metadata",function(){return c}),n.d(t,"__awaiter",function(){return l}),n.d(t,"__generator",function(){return f}),n.d(t,"__exportStar",function(){return d}),n.d(t,"__values",function(){return p}),n.d(t,"__read",function(){return h}),n.d(t,"__spread",function(){return v}),n.d(t,"__spreadArrays",function(){return g}),n.d(t,"__await",function(){return y}),n.d(t,"__asyncGenerator",function(){return m}),n.d(t,"__asyncDelegator",function(){return b}),n.d(t,"__asyncValues",function(){return _}),n.d(t,"__makeTemplateObject",function(){return w}),n.d(t,"__importStar",function(){return S}),n.d(t,"__importDefault",function(){return k}),n.d(t,"__classPrivateFieldGet",function(){return x}),n.d(t,"__classPrivateFieldSet",function(){return E});var r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)};function o(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var i=function(){return(i=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)};function a(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n}function s(e,t,n,r){var o,i=arguments.length,a=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a}function u(e,t){return function(n,r){t(n,r,e)}}function c(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}function l(e,t,n,r){return new(n||(n=Promise))(function(o,i){function a(e){try{u(r.next(e))}catch(e){i(e)}}function s(e){try{u(r.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}u((r=r.apply(e,t||[])).next())})}function f(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}}function d(e,t){for(var n in e)t.hasOwnProperty(n)||(t[n]=e[n])}function p(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function h(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-->0)&&!(r=i.next()).done;)a.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a}function v(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(h(arguments[t]));return e}function g(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;var r=Array(e),o=0;for(t=0;t<n;t++)for(var i=arguments[t],a=0,s=i.length;a<s;a++,o++)r[o]=i[a];return r}function y(e){return this instanceof y?(this.v=e,this):new y(e)}function m(e,t,n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r,o=n.apply(e,t||[]),i=[];return r={},a("next"),a("throw"),a("return"),r[Symbol.asyncIterator]=function(){return this},r;function a(e){o[e]&&(r[e]=function(t){return new Promise(function(n,r){i.push([e,t,n,r])>1||s(e,t)})})}function s(e,t){try{(n=o[e](t)).value instanceof y?Promise.resolve(n.value.v).then(u,c):l(i[0][2],n)}catch(e){l(i[0][3],e)}var n}function u(e){s("next",e)}function c(e){s("throw",e)}function l(e,t){e(t),i.shift(),i.length&&s(i[0][0],i[0][1])}}function b(e){var t,n;return t={},r("next"),r("throw",function(e){throw e}),r("return"),t[Symbol.iterator]=function(){return this},t;function r(r,o){t[r]=e[r]?function(t){return(n=!n)?{value:y(e[r](t)),done:"return"===r}:o?o(t):t}:o}}function _(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,n=e[Symbol.asyncIterator];return n?n.call(e):(e=p(e),t={},r("next"),r("throw"),r("return"),t[Symbol.asyncIterator]=function(){return this},t);function r(n){t[n]=e[n]&&function(t){return new Promise(function(r,o){!function(e,t,n,r){Promise.resolve(r).then(function(t){e({value:t,done:n})},t)}(r,o,(t=e[n](t)).done,t.value)})}}}function w(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}function S(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}function k(e){return e&&e.__esModule?e:{default:e}}function x(e,t){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return t.get(e)}function E(e,t,n){if(!t.has(e))throw new TypeError("attempted to set private field on non-instance");return t.set(e,n),n}},function(e,t,n){"use strict";function r(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;var r=Array(e),o=0;for(t=0;t<n;t++)for(var i=arguments[t],a=0,s=i.length;a<s;a++,o++)r[o]=i[a];return r}var o;n.r(t),n.d(t,"LogLevel",function(){return i}),n.d(t,"Logger",function(){return f}),n.d(t,"setLogLevel",function(){return d}),n.d(t,"setUserLogHandler",function(){return p});var i,a=[];!function(e){e[e.DEBUG=0]="DEBUG",e[e.VERBOSE=1]="VERBOSE",e[e.INFO=2]="INFO",e[e.WARN=3]="WARN",e[e.ERROR=4]="ERROR",e[e.SILENT=5]="SILENT"}(i||(i={}));var s={debug:i.DEBUG,verbose:i.VERBOSE,info:i.INFO,warn:i.WARN,error:i.ERROR,silent:i.SILENT},u=i.INFO,c=((o={})[i.DEBUG]="log",o[i.VERBOSE]="log",o[i.INFO]="info",o[i.WARN]="warn",o[i.ERROR]="error",o),l=function(e,t){for(var n=[],o=2;o<arguments.length;o++)n[o-2]=arguments[o];if(!(t<e.logLevel)){var i=(new Date).toISOString(),a=c[t];if(!a)throw new Error("Attempted to log a message with an invalid logType (value: "+t+")");console[a].apply(console,r(["["+i+"]  "+e.name+":"],n))}},f=function(){function e(e){this.name=e,this._logLevel=u,this._logHandler=l,this._userLogHandler=null,a.push(this)}return Object.defineProperty(e.prototype,"logLevel",{get:function(){return this._logLevel},set:function(e){if(!(e in i))throw new TypeError("Invalid value assigned to `logLevel`");this._logLevel=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"logHandler",{get:function(){return this._logHandler},set:function(e){if("function"!=typeof e)throw new TypeError("Value assigned to `logHandler` must be a function");this._logHandler=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"userLogHandler",{get:function(){return this._userLogHandler},set:function(e){this._userLogHandler=e},enumerable:!0,configurable:!0}),e.prototype.debug=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this._userLogHandler&&this._userLogHandler.apply(this,r([this,i.DEBUG],e)),this._logHandler.apply(this,r([this,i.DEBUG],e))},e.prototype.log=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this._userLogHandler&&this._userLogHandler.apply(this,r([this,i.VERBOSE],e)),this._logHandler.apply(this,r([this,i.VERBOSE],e))},e.prototype.info=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this._userLogHandler&&this._userLogHandler.apply(this,r([this,i.INFO],e)),this._logHandler.apply(this,r([this,i.INFO],e))},e.prototype.warn=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this._userLogHandler&&this._userLogHandler.apply(this,r([this,i.WARN],e)),this._logHandler.apply(this,r([this,i.WARN],e))},e.prototype.error=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this._userLogHandler&&this._userLogHandler.apply(this,r([this,i.ERROR],e)),this._logHandler.apply(this,r([this,i.ERROR],e))},e}();function d(e){var t="string"==typeof e?s[e]:e;a.forEach(function(e){e.logLevel=t})}function p(e,t){for(var n=function(n){var r=null;t&&t.level&&(r=s[t.level]),n.userLogHandler=null===e?null:function(t,n){for(var o=[],a=2;a<arguments.length;a++)o[a-2]=arguments[a];var s=o.map(function(e){if(null==e)return null;if("string"==typeof e)return e;if("number"==typeof e||"boolean"==typeof e)return e.toString();if(e instanceof Error)return e.message;try{return JSON.stringify(e)}catch(e){return null}}).filter(function(e){return e}).join(" ");n>=(null!=r?r:t.logLevel)&&e({level:i[n].toLowerCase(),message:s,args:o,type:t.name})}},r=0,o=a;r<o.length;r++)n(o[r])}},function(e,t,n){"use strict";n.r(t);var r=n(2),o=n.n(r),i=n(3),a=function(){return(a=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)};function s(e,t,n,r){return new(n||(n=Promise))(function(o,i){function a(e){try{u(r.next(e))}catch(e){i(e)}}function s(e){try{u(r.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}u((r=r.apply(e,t||[])).next())})}function u(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}}function c(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function l(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-->0)&&!(r=i.next()).done;)a.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a}var f,d=n(1),p=n(0),h=((f={})["missing-app-config-values"]='Missing App configuration value: "{$valueName}"',f["not-registered"]="Firebase Installation is not registered.",f["installation-not-found"]="Firebase Installation not found.",f["request-failed"]='{$requestName} request failed with error "{$serverCode} {$serverStatus}: {$serverMessage}"',f["app-offline"]="Could not process request. Application offline.",f["delete-pending-registration"]="Can't delete installation while there is a pending registration request.",f),v=new d.ErrorFactory("installations","Installations",h);function g(e){return e instanceof d.FirebaseError&&e.code.includes("request-failed")}function y(e){return"https://firebaseinstallations.googleapis.com/v1/projects/"+e.projectId+"/installations"}function m(e){return{token:e.token,requestStatus:2,expiresIn:(t=e.expiresIn,Number(t.replace("s","000"))),creationTime:Date.now()};var t}function b(e,t){return s(this,void 0,void 0,function(){var n,r;return u(this,function(o){switch(o.label){case 0:return[4,t.json()];case 1:return n=o.sent(),r=n.error,[2,v.create("request-failed",{requestName:e,serverCode:r.code,serverMessage:r.message,serverStatus:r.status})]}})})}function _(e){var t=e.apiKey;return new Headers({"Content-Type":"application/json",Accept:"application/json","x-goog-api-key":t})}function w(e,t){var n=t.refreshToken,r=_(e);return r.append("Authorization","FIS_v2 "+n),r}function S(e){return s(this,void 0,void 0,function(){var t;return u(this,function(n){switch(n.label){case 0:return[4,e()];case 1:return(t=n.sent()).status>=500&&t.status<600?[2,e()]:[2,t]}})})}function k(e){return new Promise(function(t){setTimeout(t,e)})}var x=/^[cdef][\w-]{21}$/;function E(){try{var e=new Uint8Array(17);(self.crypto||self.msCrypto).getRandomValues(e),e[0]=112+e[0]%16;var t=function(e){return function(e){return btoa(String.fromCharCode.apply(String,function(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(l(arguments[t]));return e}(e))).replace(/\+/g,"-").replace(/\//g,"_")}(e).substr(0,22)}(e);return x.test(t)?t:""}catch(e){return""}}function I(e){return e.appName+"!"+e.appId}var O=new Map;function T(e,t){var n=I(e);C(n,t),function(e,t){var n=P();n&&n.postMessage({key:e,fid:t}),F()}(n,t)}function C(e,t){var n,r,o=O.get(e);if(o)try{for(var i=c(o),a=i.next();!a.done;a=i.next())(0,a.value)(t)}catch(e){n={error:e}}finally{try{a&&!a.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}}var A=null;function P(){return!A&&"BroadcastChannel"in self&&((A=new BroadcastChannel("[Firebase] FID Change")).onmessage=function(e){C(e.data.key,e.data.fid)}),A}function F(){0===O.size&&A&&(A.close(),A=null)}var D,N="firebase-installations-store",j=null;function L(){return j||(j=Object(p.openDb)("firebase-installations-database",1,function(e){switch(e.oldVersion){case 0:e.createObjectStore(N)}})),j}function R(e,t){return s(this,void 0,void 0,function(){var n,r,o,i,a;return u(this,function(s){switch(s.label){case 0:return n=I(e),[4,L()];case 1:return r=s.sent(),o=r.transaction(N,"readwrite"),[4,(i=o.objectStore(N)).get(n)];case 2:return a=s.sent(),[4,i.put(t,n)];case 3:return s.sent(),[4,o.complete];case 4:return s.sent(),a&&a.fid===t.fid||T(e,t.fid),[2,t]}})})}function M(e){return s(this,void 0,void 0,function(){var t,n,r;return u(this,function(o){switch(o.label){case 0:return t=I(e),[4,L()];case 1:return n=o.sent(),[4,(r=n.transaction(N,"readwrite")).objectStore(N).delete(t)];case 2:return o.sent(),[4,r.complete];case 3:return o.sent(),[2]}})})}function B(e,t){return s(this,void 0,void 0,function(){var n,r,o,i,a,s;return u(this,function(u){switch(u.label){case 0:return n=I(e),[4,L()];case 1:return r=u.sent(),o=r.transaction(N,"readwrite"),[4,(i=o.objectStore(N)).get(n)];case 2:return a=u.sent(),void 0!==(s=t(a))?[3,4]:[4,i.delete(n)];case 3:return u.sent(),[3,6];case 4:return[4,i.put(s,n)];case 5:u.sent(),u.label=6;case 6:return[4,o.complete];case 7:return u.sent(),!s||a&&a.fid===s.fid||T(e,s.fid),[2,s]}})})}function V(e){return s(this,void 0,void 0,function(){var t,n,r;return u(this,function(o){switch(o.label){case 0:return[4,B(e,function(n){var r=q(n||{fid:E(),registrationStatus:0}),o=function(e,t){if(0===t.registrationStatus){if(!navigator.onLine)return{installationEntry:t,registrationPromise:Promise.reject(v.create("app-offline"))};var n={fid:t.fid,registrationStatus:1,registrationTime:Date.now()},r=function(e,t){return s(this,void 0,void 0,function(){var n,r;return u(this,function(o){switch(o.label){case 0:return o.trys.push([0,2,,7]),[4,function(e,t){var n=t.fid;return s(this,void 0,void 0,function(){var t,r,o,i,a,s;return u(this,function(u){switch(u.label){case 0:return t=y(e),r=_(e),o={fid:n,authVersion:"FIS_v2",appId:e.appId,sdkVersion:"w:0.4.8"},i={method:"POST",headers:r,body:JSON.stringify(o)},[4,S(function(){return fetch(t,i)})];case 1:return(a=u.sent()).ok?[4,a.json()]:[3,3];case 2:return[2,{fid:(s=u.sent()).fid||n,registrationStatus:2,refreshToken:s.refreshToken,authToken:m(s.authToken)}];case 3:return[4,b("Create Installation",a)];case 4:throw u.sent()}})})}(e,t)];case 1:return n=o.sent(),[2,R(e,n)];case 2:return g(r=o.sent())&&409===r.serverCode?[4,M(e)]:[3,4];case 3:return o.sent(),[3,6];case 4:return[4,R(e,{fid:t.fid,registrationStatus:0})];case 5:o.sent(),o.label=6;case 6:throw r;case 7:return[2]}})})}(e,n);return{installationEntry:n,registrationPromise:r}}return 1===t.registrationStatus?{installationEntry:t,registrationPromise:function(e){return s(this,void 0,void 0,function(){var t,n,r,o;return u(this,function(i){switch(i.label){case 0:return[4,U(e)];case 1:t=i.sent(),i.label=2;case 2:return 1!==t.registrationStatus?[3,5]:[4,k(100)];case 3:return i.sent(),[4,U(e)];case 4:return t=i.sent(),[3,2];case 5:return 0!==t.registrationStatus?[3,7]:[4,V(e)];case 6:return n=i.sent(),r=n.installationEntry,(o=n.registrationPromise)?[2,o]:[2,r];case 7:return[2,t]}})})}(e)}:{installationEntry:t}}(e,r);return t=o.registrationPromise,o.installationEntry})];case 1:return""!==(n=o.sent()).fid?[3,3]:(r={},[4,t]);case 2:return[2,(r.installationEntry=o.sent(),r)];case 3:return[2,{installationEntry:n,registrationPromise:t}]}})})}function U(e){return B(e,function(e){if(!e)throw v.create("installation-not-found");return q(e)})}function q(e){return 1===(t=e).registrationStatus&&t.registrationTime+1e4<Date.now()?{fid:e.fid,registrationStatus:0}:e;var t}function H(e,t){return void 0===t&&(t=!1),s(this,void 0,void 0,function(){var n,r,o;return u(this,function(i){switch(i.label){case 0:return[4,B(e.appConfig,function(r){if(!z(r))throw v.create("not-registered");var o=r.authToken;if(!t&&function(e){return 2===e.requestStatus&&!function(e){var t=Date.now();return t<e.creationTime||e.creationTime+e.expiresIn<t+36e5}(e)}(o))return r;if(1===o.requestStatus)return n=function(e,t){return s(this,void 0,void 0,function(){var n,r;return u(this,function(o){switch(o.label){case 0:return[4,K(e.appConfig)];case 1:n=o.sent(),o.label=2;case 2:return 1!==n.authToken.requestStatus?[3,5]:[4,k(100)];case 3:return o.sent(),[4,K(e.appConfig)];case 4:return n=o.sent(),[3,2];case 5:return 0===(r=n.authToken).requestStatus?[2,H(e,t)]:[2,r]}})})}(e,t),r;if(!navigator.onLine)throw v.create("app-offline");var i=function(e){var t={requestStatus:1,requestTime:Date.now()};return a(a({},e),{authToken:t})}(r);return n=function(e,t){return s(this,void 0,void 0,function(){var n,r,o;return u(this,function(i){switch(i.label){case 0:return i.trys.push([0,3,,8]),[4,function(e,t){var n=e.appConfig,r=e.platformLoggerProvider;return s(this,void 0,void 0,function(){var e,o,i,a,s,c;return u(this,function(u){switch(u.label){case 0:return e=function(e,t){var n=t.fid;return y(e)+"/"+n+"/authTokens:generate"}(n,t),o=w(n,t),(i=r.getImmediate({optional:!0}))&&o.append("x-firebase-client",i.getPlatformInfoString()),a={installation:{sdkVersion:"w:0.4.8"}},s={method:"POST",headers:o,body:JSON.stringify(a)},[4,S(function(){return fetch(e,s)})];case 1:return(c=u.sent()).ok?[4,c.json()]:[3,3];case 2:return[2,m(u.sent())];case 3:return[4,b("Generate Auth Token",c)];case 4:throw u.sent()}})})}(e,t)];case 1:return n=i.sent(),o=a(a({},t),{authToken:n}),[4,R(e.appConfig,o)];case 2:return i.sent(),[2,n];case 3:return!g(r=i.sent())||401!==r.serverCode&&404!==r.serverCode?[3,5]:[4,M(e.appConfig)];case 4:return i.sent(),[3,7];case 5:return o=a(a({},t),{authToken:{requestStatus:0}}),[4,R(e.appConfig,o)];case 6:i.sent(),i.label=7;case 7:throw r;case 8:return[2]}})})}(e,i),i})];case 1:return r=i.sent(),n?[4,n]:[3,3];case 2:return o=i.sent(),[3,4];case 3:o=r.authToken,i.label=4;case 4:return[2,o]}})})}function K(e){return B(e,function(e){if(!z(e))throw v.create("not-registered");var t;return 1===(t=e.authToken).requestStatus&&t.requestTime+1e4<Date.now()?a(a({},e),{authToken:{requestStatus:0}}):e})}function z(e){return void 0!==e&&2===e.registrationStatus}function W(e){return v.create("missing-app-config-values",{valueName:e})}(D=o.a).INTERNAL.registerComponent(new i.Component("installations",function(e){var t=e.getProvider("app").getImmediate(),n={appConfig:function(e){var t,n;if(!e||!e.options)throw W("App Configuration");if(!e.name)throw W("App Name");try{for(var r=c(["projectId","apiKey","appId"]),o=r.next();!o.done;o=r.next()){var i=o.value;if(!e.options[i])throw W(i)}}catch(e){t={error:e}}finally{try{o&&!o.done&&(n=r.return)&&n.call(r)}finally{if(t)throw t.error}}return{appName:e.name,projectId:e.options.projectId,apiKey:e.options.apiKey,appId:e.options.appId}}(t),platformLoggerProvider:e.getProvider("platform-logger")};return{app:t,getId:function(){return function(e){return s(this,void 0,void 0,function(){var t,n,r;return u(this,function(o){switch(o.label){case 0:return[4,V(e.appConfig)];case 1:return t=o.sent(),n=t.installationEntry,(r=t.registrationPromise)?r.catch(console.error):H(e).catch(console.error),[2,n.fid]}})})}(n)},getToken:function(e){return function(e,t){return void 0===t&&(t=!1),s(this,void 0,void 0,function(){return u(this,function(n){switch(n.label){case 0:return[4,function(e){return s(this,void 0,void 0,function(){var t;return u(this,function(n){switch(n.label){case 0:return[4,V(e)];case 1:return(t=n.sent().registrationPromise)?[4,t]:[3,3];case 2:n.sent(),n.label=3;case 3:return[2]}})})}(e.appConfig)];case 1:return n.sent(),[4,H(e,t)];case 2:return[2,n.sent().token]}})})}(n,e)},delete:function(){return function(e){return s(this,void 0,void 0,function(){var t,n;return u(this,function(r){switch(r.label){case 0:return[4,B(t=e.appConfig,function(e){if(!e||0!==e.registrationStatus)return e})];case 1:if(!(n=r.sent()))return[3,6];if(1!==n.registrationStatus)return[3,2];throw v.create("delete-pending-registration");case 2:if(2!==n.registrationStatus)return[3,6];if(navigator.onLine)return[3,3];throw v.create("app-offline");case 3:return[4,function(e,t){return s(this,void 0,void 0,function(){var n,r,o,i;return u(this,function(a){switch(a.label){case 0:return n=function(e,t){var n=t.fid;return y(e)+"/"+n}(e,t),r=w(e,t),o={method:"DELETE",headers:r},[4,S(function(){return fetch(n,o)})];case 1:return(i=a.sent()).ok?[3,3]:[4,b("Delete Installation",i)];case 2:throw a.sent();case 3:return[2]}})})}(t,n)];case 4:return r.sent(),[4,M(t)];case 5:r.sent(),r.label=6;case 6:return[2]}})})}(n)},onIdChange:function(e){return function(e,t){var n=e.appConfig;return function(e,t){P();var n=I(e),r=O.get(n);r||(r=new Set,O.set(n,r)),r.add(t)}(n,t),function(){!function(e,t){var n=I(e),r=O.get(n);r&&(r.delete(t),0===r.size&&O.delete(n),F())}(n,t)}}(n,e)}}},"PUBLIC")),D.registerVersion("@firebase/installations","0.4.8");var G,J=function(){return(J=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)};function $(e,t,n,r){return new(n||(n=Promise))(function(o,i){function a(e){try{u(r.next(e))}catch(e){i(e)}}function s(e){try{u(r.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}u((r=r.apply(e,t||[])).next())})}function Z(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}}function X(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function Y(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-->0)&&!(r=i.next()).done;)a.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a}var Q=((G={})["missing-app-config-values"]='Missing App configuration value: "{$valueName}"',G["only-available-in-window"]="This method is available in a Window context.",G["only-available-in-sw"]="This method is available in a service worker context.",G["permission-default"]="The notification permission was not granted and dismissed instead.",G["permission-blocked"]="The notification permission was not granted and blocked instead.",G["unsupported-browser"]="This browser doesn't support the API's required to use the firebase SDK.",G["failed-service-worker-registration"]="We are unable to register the default service worker. {$browserErrorMessage}",G["token-subscribe-failed"]="A problem occured while subscribing the user to FCM: {$errorInfo}",G["token-subscribe-no-token"]="FCM returned no token when subscribing the user to push.",G["token-unsubscribe-failed"]="A problem occured while unsubscribing the user from FCM: {$errorInfo}",G["token-update-failed"]="A problem occured while updating the user from FCM: {$errorInfo}",G["token-update-no-token"]="FCM returned no token when updating the user to push.",G["use-sw-after-get-token"]="The useServiceWorker() method may only be called once and must be called before calling getToken() to ensure your service worker is used.",G["invalid-sw-registration"]="The input to useServiceWorker() must be a ServiceWorkerRegistration.",G["invalid-bg-handler"]="The input to setBackgroundMessageHandler() must be a function.",G["invalid-vapid-key"]="The public VAPID key must be a string.",G["use-vapid-key-after-get-token"]="The usePublicVapidKey() method may only be called once and must be called before calling getToken() to ensure your VAPID key is used.",G),ee=new d.ErrorFactory("messaging","Messaging",Q);function te(e){return ee.create("missing-app-config-values",{valueName:e})}function ne(e){var t=new Uint8Array(e);return btoa(String.fromCharCode.apply(String,function(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(Y(arguments[t]));return e}(t))).replace(/=/g,"").replace(/\+/g,"-").replace(/\//g,"_")}var re=null;function oe(){return re||(re=Object(p.openDb)("firebase-messaging-database",1,function(e){switch(e.oldVersion){case 0:e.createObjectStore("firebase-messaging-store")}})),re}function ie(e){return $(this,void 0,void 0,function(){var t,n,r;return Z(this,function(o){switch(o.label){case 0:return t=se(e),[4,oe()];case 1:return[4,o.sent().transaction("firebase-messaging-store").objectStore("firebase-messaging-store").get(t)];case 2:return(n=o.sent())?[2,n]:[3,3];case 3:return[4,function(e){return $(this,void 0,void 0,function(){var t,n=this;return Z(this,function(r){switch(r.label){case 0:return"databases"in indexedDB?[4,indexedDB.databases()]:[3,2];case 1:if(!r.sent().map(function(e){return e.name}).includes("fcm_token_details_db"))return[2,null];r.label=2;case 2:return t=null,[4,Object(p.openDb)("fcm_token_details_db",5,function(r){return $(n,void 0,void 0,function(){var n,o,i,a;return Z(this,function(s){switch(s.label){case 0:return r.oldVersion<2?[2]:r.objectStoreNames.contains("fcm_token_object_Store")?[4,(n=r.transaction.objectStore("fcm_token_object_Store")).index("fcmSenderId").get(e)]:[2];case 1:return o=s.sent(),[4,n.clear()];case 2:if(s.sent(),!o)return[2];if(2===r.oldVersion){if(!(i=o).auth||!i.p256dh||!i.endpoint)return[2];t={token:i.fcmToken,createTime:null!==(a=i.createTime)&&void 0!==a?a:Date.now(),subscriptionOptions:{auth:i.auth,p256dh:i.p256dh,endpoint:i.endpoint,swScope:i.swScope,vapidKey:"string"==typeof i.vapidKey?i.vapidKey:ne(i.vapidKey)}}}else(3===r.oldVersion||4===r.oldVersion)&&(t={token:(i=o).fcmToken,createTime:i.createTime,subscriptionOptions:{auth:ne(i.auth),p256dh:ne(i.p256dh),endpoint:i.endpoint,swScope:i.swScope,vapidKey:ne(i.vapidKey)}});return[2]}})})})];case 3:return r.sent().close(),[4,Object(p.deleteDb)("fcm_token_details_db")];case 4:return r.sent(),[4,Object(p.deleteDb)("fcm_vapid_details_db")];case 5:return r.sent(),[4,Object(p.deleteDb)("undefined")];case 6:return r.sent(),[2,function(e){if(!e||!e.subscriptionOptions)return!1;var t=e.subscriptionOptions;return"number"==typeof e.createTime&&e.createTime>0&&"string"==typeof e.token&&e.token.length>0&&"string"==typeof t.auth&&t.auth.length>0&&"string"==typeof t.p256dh&&t.p256dh.length>0&&"string"==typeof t.endpoint&&t.endpoint.length>0&&"string"==typeof t.swScope&&t.swScope.length>0&&"string"==typeof t.vapidKey&&t.vapidKey.length>0}(t)?t:null]}})})}(e.appConfig.senderId)];case 4:return(r=o.sent())?[4,ae(e,r)]:[3,6];case 5:return o.sent(),[2,r];case 6:return[2]}})})}function ae(e,t){return $(this,void 0,void 0,function(){var n,r,o;return Z(this,function(i){switch(i.label){case 0:return n=se(e),[4,oe()];case 1:return r=i.sent(),[4,(o=r.transaction("firebase-messaging-store","readwrite")).objectStore("firebase-messaging-store").put(t,n)];case 2:return i.sent(),[4,o.complete];case 3:return i.sent(),[2,t]}})})}function se(e){return e.appConfig.appId}var ue,ce="BDOU99-h67HcA6JeFXHbSNMu7e2yNNu3RzoMj8TM4W88jITfq7ZmPvIM1Iv-4_l2LxQcYwhqby2xGpWwzjfAnG4";function le(e,t){return $(this,void 0,void 0,function(){var n,r,o,i,a;return Z(this,function(s){switch(s.label){case 0:return[4,de(e)];case 1:n=s.sent(),r={method:"DELETE",headers:n},s.label=2;case 2:return s.trys.push([2,5,,6]),[4,fetch(fe(e.appConfig)+"/"+t,r)];case 3:return[4,s.sent().json()];case 4:if((o=s.sent()).error)throw i=o.error.message,ee.create("token-unsubscribe-failed",{errorInfo:i});return[3,6];case 5:throw a=s.sent(),ee.create("token-unsubscribe-failed",{errorInfo:a});case 6:return[2]}})})}function fe(e){return"https://fcmregistrations.googleapis.com/v1/projects/"+e.projectId+"/registrations"}function de(e){var t=e.appConfig,n=e.installations;return $(this,void 0,void 0,function(){var e;return Z(this,function(r){switch(r.label){case 0:return[4,n.getToken()];case 1:return e=r.sent(),[2,new Headers({"Content-Type":"application/json",Accept:"application/json","x-goog-api-key":t.apiKey,"x-goog-firebase-installations-auth":"FIS "+e})]}})})}function pe(e){var t=e.p256dh,n=e.auth,r=e.endpoint,o=e.vapidKey,i={web:{endpoint:r,auth:n,p256dh:t}};return o!==ce&&(i.web.applicationPubKey=o),i}function he(e,t,n){return $(this,void 0,void 0,function(){var r,o,i,a;return Z(this,function(s){switch(s.label){case 0:if("granted"!==Notification.permission)throw ee.create("permission-blocked");return[4,function(e,t){return $(this,void 0,void 0,function(){var n;return Z(this,function(r){switch(r.label){case 0:return[4,e.pushManager.getSubscription()];case 1:return(n=r.sent())?[2,n]:[2,e.pushManager.subscribe({userVisibleOnly:!0,applicationServerKey:function(e){for(var t=(e+"=".repeat((4-e.length%4)%4)).replace(/\-/g,"+").replace(/_/g,"/"),n=atob(t),r=new Uint8Array(n.length),o=0;o<n.length;++o)r[o]=n.charCodeAt(o);return r}(t)})]}})})}(t,n)];case 1:return r=s.sent(),[4,ie(e)];case 2:return o=s.sent(),i={vapidKey:n,swScope:t.scope,endpoint:r.endpoint,auth:ne(r.getKey("auth")),p256dh:ne(r.getKey("p256dh"))},o?[3,3]:[2,ge(e,i)];case 3:if(u=o.subscriptionOptions,l=(c=i).vapidKey===u.vapidKey,f=c.endpoint===u.endpoint,d=c.auth===u.auth,p=c.p256dh===u.p256dh,l&&f&&d&&p)return[3,8];s.label=4;case 4:return s.trys.push([4,6,,7]),[4,le(e,o.token)];case 5:return s.sent(),[3,7];case 6:return a=s.sent(),console.warn(a),[3,7];case 7:return[2,ge(e,i)];case 8:return Date.now()>=o.createTime+6048e5?[2,function(e,t,n){return $(this,void 0,void 0,function(){var r,o,i;return Z(this,function(a){switch(a.label){case 0:return a.trys.push([0,3,,5]),[4,function(e,t){return $(this,void 0,void 0,function(){var n,r,o,i,a,s;return Z(this,function(u){switch(u.label){case 0:return[4,de(e)];case 1:n=u.sent(),r=pe(t.subscriptionOptions),o={method:"PATCH",headers:n,body:JSON.stringify(r)},u.label=2;case 2:return u.trys.push([2,5,,6]),[4,fetch(fe(e.appConfig)+"/"+t.token,o)];case 3:return[4,u.sent().json()];case 4:return i=u.sent(),[3,6];case 5:throw a=u.sent(),ee.create("token-update-failed",{errorInfo:a});case 6:if(i.error)throw s=i.error.message,ee.create("token-update-failed",{errorInfo:s});if(!i.token)throw ee.create("token-update-no-token");return[2,i.token]}})})}(t,e)];case 1:return r=a.sent(),o=J({token:r,createTime:Date.now()},e),[4,ae(t,o)];case 2:return a.sent(),[2,r];case 3:return i=a.sent(),[4,ve(t,n)];case 4:throw a.sent(),i;case 5:return[2]}})})}({token:o.token,createTime:Date.now(),subscriptionOptions:i},e,t)]:[2,o.token];case 9:return[2]}var u,c,l,f,d,p})})}function ve(e,t){return $(this,void 0,void 0,function(){var n,r;return Z(this,function(o){switch(o.label){case 0:return[4,ie(e)];case 1:return(n=o.sent())?[4,le(e,n.token)]:[3,4];case 2:return o.sent(),[4,function(e){return $(this,void 0,void 0,function(){var t,n,r;return Z(this,function(o){switch(o.label){case 0:return t=se(e),[4,oe()];case 1:return n=o.sent(),[4,(r=n.transaction("firebase-messaging-store","readwrite")).objectStore("firebase-messaging-store").delete(t)];case 2:return o.sent(),[4,r.complete];case 3:return o.sent(),[2]}})})}(e)];case 3:o.sent(),o.label=4;case 4:return[4,t.pushManager.getSubscription()];case 5:return(r=o.sent())?[2,r.unsubscribe()]:[2,!0]}})})}function ge(e,t){return $(this,void 0,void 0,function(){var n,r;return Z(this,function(o){switch(o.label){case 0:return[4,function(e,t){return $(this,void 0,void 0,function(){var n,r,o,i,a,s;return Z(this,function(u){switch(u.label){case 0:return[4,de(e)];case 1:n=u.sent(),r=pe(t),o={method:"POST",headers:n,body:JSON.stringify(r)},u.label=2;case 2:return u.trys.push([2,5,,6]),[4,fetch(fe(e.appConfig),o)];case 3:return[4,u.sent().json()];case 4:return i=u.sent(),[3,6];case 5:throw a=u.sent(),ee.create("token-subscribe-failed",{errorInfo:a});case 6:if(i.error)throw s=i.error.message,ee.create("token-subscribe-failed",{errorInfo:s});if(!i.token)throw ee.create("token-subscribe-no-token");return[2,i.token]}})})}(e,t)];case 1:return n=o.sent(),r={token:n,createTime:Date.now(),subscriptionOptions:t},[4,ae(e,r)];case 2:return o.sent(),[2,r.token]}})})}function ye(e){return"object"==typeof e&&!!e&&"google.c.a.c_id"in e}!function(e){e.PUSH_RECEIVED="push-received",e.NOTIFICATION_CLICKED="notification-clicked"}(ue||(ue={}));var me=function(){function e(e){var t=this;this.firebaseDependencies=e,this.vapidKey=null,this.onMessageCallback=null,navigator.serviceWorker.addEventListener("message",function(e){return t.messageEventListener(e)})}return Object.defineProperty(e.prototype,"app",{get:function(){return this.firebaseDependencies.app},enumerable:!0,configurable:!0}),e.prototype.getToken=function(){return $(this,void 0,void 0,function(){var e;return Z(this,function(t){switch(t.label){case 0:return this.vapidKey||(this.vapidKey=ce),[4,this.getServiceWorkerRegistration()];case 1:return e=t.sent(),"default"!==Notification.permission?[3,3]:[4,Notification.requestPermission()];case 2:t.sent(),t.label=3;case 3:if("granted"!==Notification.permission)throw ee.create("permission-blocked");return[2,he(this.firebaseDependencies,e,this.vapidKey)]}})})},e.prototype.deleteToken=function(){return $(this,void 0,void 0,function(){var e;return Z(this,function(t){switch(t.label){case 0:return[4,this.getServiceWorkerRegistration()];case 1:return e=t.sent(),[2,ve(this.firebaseDependencies,e)]}})})},e.prototype.requestPermission=function(){return $(this,void 0,void 0,function(){var e;return Z(this,function(t){switch(t.label){case 0:return"granted"===Notification.permission?[2]:[4,Notification.requestPermission()];case 1:if("granted"===(e=t.sent()))return[2];throw"denied"===e?ee.create("permission-blocked"):ee.create("permission-default")}})})},e.prototype.usePublicVapidKey=function(e){if(null!==this.vapidKey)throw ee.create("use-vapid-key-after-get-token");if("string"!=typeof e||0===e.length)throw ee.create("invalid-vapid-key");this.vapidKey=e},e.prototype.useServiceWorker=function(e){if(!(e instanceof ServiceWorkerRegistration))throw ee.create("invalid-sw-registration");if(this.swRegistration)throw ee.create("use-sw-after-get-token");this.swRegistration=e},e.prototype.onMessage=function(e){var t=this;return this.onMessageCallback="function"==typeof e?e:e.next,function(){t.onMessageCallback=null}},e.prototype.setBackgroundMessageHandler=function(){throw ee.create("only-available-in-sw")},e.prototype.onTokenRefresh=function(){return function(){}},e.prototype.getServiceWorkerRegistration=function(){return $(this,void 0,void 0,function(){var e,t;return Z(this,function(n){switch(n.label){case 0:if(this.swRegistration)return[3,4];n.label=1;case 1:return n.trys.push([1,3,,4]),e=this,[4,navigator.serviceWorker.register("/firebase-messaging-sw.js",{scope:"/firebase-cloud-messaging-push-scope"})];case 2:return e.swRegistration=n.sent(),this.swRegistration.update().catch(function(){}),[3,4];case 3:throw t=n.sent(),ee.create("failed-service-worker-registration",{browserErrorMessage:t.message});case 4:return[2,this.swRegistration]}})})},e.prototype.messageEventListener=function(e){var t;return $(this,void 0,void 0,function(){var n,r,o,i;return Z(this,function(a){switch(a.label){case 0:return(null===(t=e.data)||void 0===t?void 0:t.firebaseMessaging)?(n=e.data.firebaseMessaging,r=n.type,o=n.payload,this.onMessageCallback&&r===ue.PUSH_RECEIVED&&this.onMessageCallback(o),ye(i=o.data)&&"1"===i["google.c.a.e"]?[4,this.logEvent(r,i)]:[3,2]):[2];case 1:a.sent(),a.label=2;case 2:return[2]}})})},e.prototype.logEvent=function(e,t){return $(this,void 0,void 0,function(){var n;return Z(this,function(r){switch(r.label){case 0:return n=function(e){switch(e){case ue.NOTIFICATION_CLICKED:return"notification_open";case ue.PUSH_RECEIVED:return"notification_foreground";default:throw new Error}}(e),[4,this.firebaseDependencies.analyticsProvider.get()];case 1:return r.sent().logEvent(n,{message_id:t["google.c.a.c_id"],message_name:t["google.c.a.c_l"],message_time:t["google.c.a.ts"],message_device_time:Math.floor(Date.now()/1e3)}),[2]}})})},e}(),be=function(){function e(e){var t=this;this.firebaseDependencies=e,this.vapidKey=null,this.bgMessageHandler=null,self.addEventListener("push",function(e){e.waitUntil(t.onPush(e))}),self.addEventListener("pushsubscriptionchange",function(e){e.waitUntil(t.onSubChange(e))}),self.addEventListener("notificationclick",function(e){e.waitUntil(t.onNotificationClick(e))})}return Object.defineProperty(e.prototype,"app",{get:function(){return this.firebaseDependencies.app},enumerable:!0,configurable:!0}),e.prototype.setBackgroundMessageHandler=function(e){if(!e||"function"!=typeof e)throw ee.create("invalid-bg-handler");this.bgMessageHandler=e},e.prototype.getToken=function(){var e,t;return $(this,void 0,void 0,function(){var n;return Z(this,function(r){switch(r.label){case 0:return this.vapidKey?[3,2]:[4,ie(this.firebaseDependencies)];case 1:n=r.sent(),this.vapidKey=null!==(t=null===(e=null==n?void 0:n.subscriptionOptions)||void 0===e?void 0:e.vapidKey)&&void 0!==t?t:ce,r.label=2;case 2:return[2,he(this.firebaseDependencies,self.registration,this.vapidKey)]}})})},e.prototype.deleteToken=function(){return ve(this.firebaseDependencies,self.registration)},e.prototype.requestPermission=function(){throw ee.create("only-available-in-window")},e.prototype.usePublicVapidKey=function(e){if(null!==this.vapidKey)throw ee.create("use-vapid-key-after-get-token");if("string"!=typeof e||0===e.length)throw ee.create("invalid-vapid-key");this.vapidKey=e},e.prototype.useServiceWorker=function(){throw ee.create("only-available-in-window")},e.prototype.onMessage=function(){throw ee.create("only-available-in-window")},e.prototype.onTokenRefresh=function(){throw ee.create("only-available-in-window")},e.prototype.onPush=function(e){return $(this,void 0,void 0,function(){var t,n,r;return Z(this,function(o){switch(o.label){case 0:return(t=function(e){var t=e.data;if(!t)return null;try{return t.json()}catch(e){return null}}(e))?[4,_e()]:[2];case 1:return(n=o.sent()).some(function(e){return"visible"===e.visibilityState&&!e.url.startsWith("chrome-extension://")})?[2,function(e,t){var n,r,o=we(ue.PUSH_RECEIVED,t);try{for(var i=X(e),a=i.next();!a.done;a=i.next())a.value.postMessage(o)}catch(e){n={error:e}}finally{try{a&&!a.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}}(n,t)]:(r=function(e){var t;if(e&&"object"==typeof e.notification){var n=J({},e.notification);return n.data=J(J({},e.notification.data),((t={}).FCM_MSG=e,t)),n}}(t))?[4,function(e){var t,n=null!==(t=e.title)&&void 0!==t?t:"",r=e.actions,o=Notification.maxActions;return r&&o&&r.length>o&&console.warn("This browser only supports "+o+" actions. The remaining actions will not be displayed."),self.registration.showNotification(n,e)}(r)]:[3,3];case 2:return o.sent(),[3,5];case 3:return this.bgMessageHandler?[4,this.bgMessageHandler(t)]:[3,5];case 4:o.sent(),o.label=5;case 5:return[2]}})})},e.prototype.onSubChange=function(e){var t,n;return $(this,void 0,void 0,function(){var r;return Z(this,function(o){switch(o.label){case 0:return e.newSubscription?[3,2]:[4,ve(this.firebaseDependencies,self.registration)];case 1:return o.sent(),[2];case 2:return[4,ie(this.firebaseDependencies)];case 3:return r=o.sent(),[4,ve(this.firebaseDependencies,self.registration)];case 4:return o.sent(),[4,he(this.firebaseDependencies,self.registration,null!==(n=null===(t=null==r?void 0:r.subscriptionOptions)||void 0===t?void 0:t.vapidKey)&&void 0!==n?n:ce)];case 5:return o.sent(),[2]}})})},e.prototype.onNotificationClick=function(e){var t,n;return $(this,void 0,void 0,function(){var r,o,i,a;return Z(this,function(s){switch(s.label){case 0:return(r=null===(n=null===(t=e.notification)||void 0===t?void 0:t.data)||void 0===n?void 0:n.FCM_MSG)?e.action?[2]:(e.stopImmediatePropagation(),e.notification.close(),(o=function(e){var t,n,r,o=null!==(n=null===(t=e.fcmOptions)||void 0===t?void 0:t.link)&&void 0!==n?n:null===(r=e.notification)||void 0===r?void 0:r.click_action;return o||(ye(e.data)?self.location.origin:null)}(r))?[4,function(e){return $(this,void 0,void 0,function(){var t,n,r,o,i,a,s;return Z(this,function(u){switch(u.label){case 0:return t=new URL(e,self.location.href),[4,_e()];case 1:n=u.sent();try{for(r=X(n),o=r.next();!o.done;o=r.next())if(i=o.value,new URL(i.url,self.location.href).host===t.host)return[2,i]}catch(e){a={error:e}}finally{try{o&&!o.done&&(s=r.return)&&s.call(r)}finally{if(a)throw a.error}}return[2,null]}})})}(o)]:[2]):[2];case 1:return(i=s.sent())?[3,4]:[4,self.clients.openWindow(o)];case 2:return i=s.sent(),[4,(3e3,new Promise(function(e){setTimeout(e,3e3)}))];case 3:return s.sent(),[3,6];case 4:return[4,i.focus()];case 5:i=s.sent(),s.label=6;case 6:return i?(a=we(ue.NOTIFICATION_CLICKED,r),[2,i.postMessage(a)]):[2]}})})},e}();function _e(){return self.clients.matchAll({type:"window",includeUncontrolled:!0})}function we(e,t){return{firebaseMessaging:{type:e,payload:t}}}var Se={isSupported:ke};function ke(){return self&&"ServiceWorkerGlobalScope"in self?"indexedDB"in self&&null!==indexedDB&&"PushManager"in self&&"Notification"in self&&ServiceWorkerRegistration.prototype.hasOwnProperty("showNotification")&&PushSubscription.prototype.hasOwnProperty("getKey"):"indexedDB"in window&&null!==indexedDB&&navigator.cookieEnabled&&"serviceWorker"in navigator&&"PushManager"in window&&"Notification"in window&&"fetch"in window&&ServiceWorkerRegistration.prototype.hasOwnProperty("showNotification")&&PushSubscription.prototype.hasOwnProperty("getKey")}o.a.INTERNAL.registerComponent(new i.Component("messaging",function(e){var t=e.getProvider("app").getImmediate(),n={app:t,appConfig:function(e){var t,n;if(!e||!e.options)throw te("App Configuration Object");if(!e.name)throw te("App Name");var r=e.options;try{for(var o=X(["projectId","apiKey","appId","messagingSenderId"]),i=o.next();!i.done;i=o.next()){var a=i.value;if(!r[a])throw te(a)}}catch(e){t={error:e}}finally{try{i&&!i.done&&(n=o.return)&&n.call(o)}finally{if(t)throw t.error}}return{appName:e.name,projectId:r.projectId,apiKey:r.apiKey,appId:r.appId,senderId:r.messagingSenderId}}(t),installations:e.getProvider("installations").getImmediate(),analyticsProvider:e.getProvider("analytics-internal")};if(!ke())throw ee.create("unsupported-browser");return self&&"ServiceWorkerGlobalScope"in self?new be(n):new me(n)},"PUBLIC").setServiceProps(Se))},function(e,t){function n(t){return"function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?e.exports=n=function(e){return typeof e}:e.exports=n=function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(t)}e.exports=n},function(e,t,n){var r=function(e){"use strict";var t=Object.prototype,n=t.hasOwnProperty,r="function"==typeof Symbol?Symbol:{},o=r.iterator||"@@iterator",i=r.asyncIterator||"@@asyncIterator",a=r.toStringTag||"@@toStringTag";function s(e,t,n,r){var o=t&&t.prototype instanceof l?t:l,i=Object.create(o.prototype),a=new S(r||[]);return i._invoke=function(e,t,n){var r="suspendedStart";return function(o,i){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===o)throw i;return{value:void 0,done:!0}}for(n.method=o,n.arg=i;;){var a=n.delegate;if(a){var s=b(a,n);if(s){if(s===c)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var l=u(e,t,n);if("normal"===l.type){if(r=n.done?"completed":"suspendedYield",l.arg===c)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(r="completed",n.method="throw",n.arg=l.arg)}}}(e,n,a),i}function u(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}e.wrap=s;var c={};function l(){}function f(){}function d(){}var p={};p[o]=function(){return this};var h=Object.getPrototypeOf,v=h&&h(h(k([])));v&&v!==t&&n.call(v,o)&&(p=v);var g=d.prototype=l.prototype=Object.create(p);function y(e){["next","throw","return"].forEach(function(t){e[t]=function(e){return this._invoke(t,e)}})}function m(e,t){var r;this._invoke=function(o,i){function a(){return new t(function(r,a){!function r(o,i,a,s){var c=u(e[o],e,i);if("throw"!==c.type){var l=c.arg,f=l.value;return f&&"object"==typeof f&&n.call(f,"__await")?t.resolve(f.__await).then(function(e){r("next",e,a,s)},function(e){r("throw",e,a,s)}):t.resolve(f).then(function(e){l.value=e,a(l)},function(e){return r("throw",e,a,s)})}s(c.arg)}(o,i,r,a)})}return r=r?r.then(a,a):a()}}function b(e,t){var n=e.iterator[t.method];if(void 0===n){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=void 0,b(e,t),"throw"===t.method))return c;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return c}var r=u(n,e.iterator,t.arg);if("throw"===r.type)return t.method="throw",t.arg=r.arg,t.delegate=null,c;var o=r.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,c):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,c)}function _(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function w(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function S(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(_,this),this.reset(!0)}function k(e){if(e){var t=e[o];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var r=-1,i=function t(){for(;++r<e.length;)if(n.call(e,r))return t.value=e[r],t.done=!1,t;return t.value=void 0,t.done=!0,t};return i.next=i}}return{next:x}}function x(){return{value:void 0,done:!0}}return f.prototype=g.constructor=d,d.constructor=f,d[a]=f.displayName="GeneratorFunction",e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===f||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,d):(e.__proto__=d,a in e||(e[a]="GeneratorFunction")),e.prototype=Object.create(g),e},e.awrap=function(e){return{__await:e}},y(m.prototype),m.prototype[i]=function(){return this},e.AsyncIterator=m,e.async=function(t,n,r,o,i){void 0===i&&(i=Promise);var a=new m(s(t,n,r,o),i);return e.isGeneratorFunction(n)?a:a.next().then(function(e){return e.done?e.value:a.next()})},y(g),g[a]="Generator",g[o]=function(){return this},g.toString=function(){return"[object Generator]"},e.keys=function(e){var t=[];for(var n in e)t.push(n);return t.reverse(),function n(){for(;t.length;){var r=t.pop();if(r in e)return n.value=r,n.done=!1,n}return n.done=!0,n}},e.values=k,S.prototype={constructor:S,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(w),!e)for(var t in this)"t"===t.charAt(0)&&n.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function r(n,r){return a.type="throw",a.arg=e,t.next=n,r&&(t.method="next",t.arg=void 0),!!r}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return r("end");if(i.tryLoc<=this.prev){var s=n.call(i,"catchLoc"),u=n.call(i,"finallyLoc");if(s&&u){if(this.prev<i.catchLoc)return r(i.catchLoc,!0);if(this.prev<i.finallyLoc)return r(i.finallyLoc)}else if(s){if(this.prev<i.catchLoc)return r(i.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return r(i.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===e||"continue"===e)&&i.tryLoc<=t&&t<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=e,a.arg=t,i?(this.method="next",this.next=i.finallyLoc,c):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),c},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),w(n),c}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var o=r.arg;w(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:k(e),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=void 0),c}},e}(e.exports);try{regeneratorRuntime=r}catch(e){Function("r","regeneratorRuntime = r")(r)}},,function(e,t,n){"use strict";n.r(t);var r=n(4),o=n.n(r),i=n(5),a=n.n(i),s=n(13),u=n.n(s);!function(e,t){var n="http"+("https:"===t.location.protocol?"s":"")+"://",r="logglytrackingsession",o=r.length+1;function i(){this.key=!1,this.sendConsoleErrors=!1,this.tag="jslogger",this.useDomainProxy=!1,this.useUtfEncoding=!1}function a(t){1==t.useDomainProxy?t.inputUrl=n+e.location.host+"/loggly/inputs/"+t.key+"/tag/"+t.tag:t.inputUrl=n+(t.logglyCollectorDomain||"logs-01.loggly.com")+"/inputs/"+t.key+"/tag/"+t.tag}i.prototype={setSession:function(e){e?(this.session_id=e,this.setCookie(this.session_id)):this.session_id||(this.session_id=this.readCookie(),this.session_id||(this.session_id="xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(e){var t=16*Math.random()|0;return("x"==e?t:3&t|8).toString(16)}),this.setCookie(this.session_id)))},push:function(t){var n=u()(t);if(t&&("object"===n||"string"===n)){var r,o,i,s,c,l,f,d,p=this;if("string"===n)t={text:t};else{if(t.logglyCollectorDomain)return void(p.logglyCollectorDomain=t.logglyCollectorDomain);if(void 0!==t.sendConsoleErrors&&function(t,n){if(t.sendConsoleErrors=n,!0===t.sendConsoleErrors){var r=e.onerror;e.onerror=function(n,o,i,a,s){t.push({category:"BrowserJsException",exception:{message:n,url:o,lineno:i,colno:a,stack:s?s.stack:"n/a"}}),r&&"function"==typeof r&&r.apply(e,arguments)}}}(p,t.sendConsoleErrors),t.tag&&(f=p,d=t.tag,f.tag=d),void 0!==t.useUtfEncoding&&(c=p,l=t.useUtfEncoding,c.useUtfEncoding=l),t.useDomainProxy&&(i=p,s=t.useDomainProxy,i.useDomainProxy=s,a(i)),t.logglyKey)return r=p,o=t.logglyKey,r.key=o,r.setSession(),void a(r);if(t.session_id)return void p.setSession(t.session_id)}p.key&&p.track(t)}},track:function(t){t.sessionId=this.session_id;try{var n=new XMLHttpRequest;n.open("POST",this.inputUrl,!0),!0===c.useUtfEncoding?n.setRequestHeader("Content-Type","text/plain; charset=utf-8"):n.setRequestHeader("Content-Type","text/plain"),n.send(JSON.stringify(t))}catch(n){e&&e.console&&"function"==typeof e.console.log&&(console.log("Failed to log to loggly because of this exception:\n"+n),console.log("Failed log data:",t))}},readCookie:function(){var e=t.cookie,n=e.indexOf(r);if(n<0)return!1;var i=e.indexOf(";",n+1);return i=i<0?e.length:i,e.slice(n+o,i)},setCookie:function(e){t.cookie=r+"="+e}};var s=e._LTracker,c=new i;if(s&&s.length){var l=0,f=s.length;for(l=0;l<f;l++)c.push(s[l])}e._LTracker=c,e.LogglyTracker=i}(window,document);var c=n(6);n(12);var l=new LogglyTracker;function f(){return function(){return a()(o.a.mark(function e(){var t,n,r,i,s,u;return o.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return t={apiKey:"AIzaSyAv7G04oyBZYqE_yAyku-rRQRXnsA1mLmw",authDomain:"webpush-prod.firebaseapp.com",projectId:"webpush-prod",storageBucket:"webpush-prod.appspot.com",messagingSenderId:"312459295826",appId:"1:312459295826:web:6d6650a797358aafe3f38b",measurementId:"G-FWD9J8MWD6"},n=c.initializeApp(t,"pushMessage"),(r=n.messaging()).usePublicVapidKey("BAdGdYm_SSlWJV0eXw36DDjDPhKYsa37R5WphjCA_Dm1kBo55XsVCn62jCE1RFAAXbzQGs0mG3hs9ZvXhVfTUpg"),i=function(e,t){try{_dha.savePushNotificationToken(e,t)}catch(e){l.push("Datahub script must be included first. Error: ".concat(e))}},s=function(){var e=a()(o.a.mark(function e(t){return o.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(t===_dha.storage.getItem("_dha__push_deviceToken")){e.next=5;break}return e.next=3,fetch("".concat("https://apis.fromdoppler.com/doppler-push-contact","/push-contacts"),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({domain:window.location.host,deviceToken:t,email:_dha.storage.getItem("_dha__em")||null})});case 3:e.sent.ok&&_dha.storage.setItem("_dha__push_deviceToken",t);case 5:case"end":return e.stop()}},e)}));return function(t){return e.apply(this,arguments)}}(),e.prev=6,e.next=9,r.requestPermission();case 9:return e.next=11,r.getToken();case 11:return u=e.sent,i(u,!1),e.next=15,s(u);case 15:e.next=20;break;case 17:e.prev=17,e.t0=e.catch(6),l.push("FCM blocked or not allowed: ".concat(JSON.stringify(e.t0)));case 20:r.onMessage(function(){}),r.onTokenRefresh(a()(o.a.mark(function e(){var t;return o.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,r.getToken();case 3:return t=e.sent,i(t,!0),e.next=7,s(t);case 7:e.next=12;break;case 9:e.prev=9,e.t0=e.catch(0),l.push("Unable to retrieve refreshed token ".concat(e.t0));case 12:case"end":return e.stop()}},e,null,[[0,9]])})));case 22:case"end":return e.stop()}},e,null,[[6,17]])})).apply(this,arguments)}.apply(this,arguments)}l.push({logglyKey:"97cc20a4-a0dc-40b0-a74e-9643a9388202",sendConsoleErrors:!1,tag:"push-client-side-".concat("prod")});var d=document.querySelector('script[enablepushnotificationfeature="true"]'),p=function(){var e=a()(o.a.mark(function e(){var t,n,r,i;return o.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,t=document.location.hostname,n="".concat("https://apis.fromdoppler.com/doppler-push-contact","/domains/").concat(t,"/isPushFeatureEnabled"),e.next=5,fetch(n);case 5:if(404!==(r=e.sent).status){e.next=9;break}return l.push("Api push contact. Hostname ".concat(t," not found.")),e.abrupt("return",!1);case 9:return e.next=11,r.json();case 11:return i=e.sent,e.abrupt("return",i);case 15:return e.prev=15,e.t0=e.catch(0),l.push("Api push contact. Err: ".concat(JSON.stringify(e.t0))),e.abrupt("return",!1);case 19:case"end":return e.stop()}},e,null,[[0,15]])}));return function(){return e.apply(this,arguments)}}();a()(o.a.mark(function e(){return o.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(e.t0=d,e.t0){e.next=5;break}return e.next=4,p();case 4:e.t0=e.sent;case 5:if(!e.t0){e.next=7;break}f();case 7:case"end":return e.stop()}},e)}))()}]);