1/*! For license information please see 2.b3adc127.chunk.js.LICENSE.txt */ 2(this["webpackJsonpbd-project"]=this["webpackJsonpbd-project"]||[]).push([[2],[function(e,t,n){"use strict";n.d(t,"a",(function(){return l}));var r=n(4),i=n.n(r),o={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},a=i.a.createContext&&i.a.createContext(o),s=function(){return(s=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)},u=function(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 i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n};function c(e){return e&&e.map((function(e,t){return i.a.createElement(e.tag,s({key:t},e.attr),c(e.child))}))}function l(e){return function(t){return i.a.createElement(f,s({attr:s({},e.attr)},t),c(e.child))}}function f(e){var t=function(t){var n,r=e.attr,o=e.size,a=e.title,c=u(e,["attr","size","title"]),l=o||t.size||"1em";return t.className&&(n=t.className),e.className&&(n=(n?n+" ":"")+e.className),i.a.createElement("svg",s({stroke:"currentColor",fill:"currentColor",strokeWidth:"0"},t.attr,r,c,{className:n,style:s(s({color:e.color||t.color},t.style),e.style),height:l,width:l,xmlns:"http://www.w3.org/2000/svg"}),a&&i.a.createElement("title",null,a),e.children)};return void 0!==a?i.a.createElement(a.Consumer,null,(function(e){return t(e)})):t(o)}},function(e,t,n){"use strict";e.exports=n(306)},function(e,t,n){"use strict";n.d(t,"c",(function(){return i})),n.d(t,"a",(function(){return o})),n.d(t,"b",(function(){return a})),n.d(t,"d",(function(){return s})),n.d(t,"h",(function(){return u})),n.d(t,"e",(function(){return c})),n.d(t,"f",(function(){return l})),n.d(t,"g",(function(){return f}));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 i(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var o=function(){return(o=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)};function a(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{u(r.next(e))}catch(t){o(t)}}function s(e){try{u(r.throw(e))}catch(t){o(t)}}function u(e){var t;e.done?i(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 s(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"===typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=(i=a.trys).length>0&&i[i.length-1])&&(6===o[0]||2===o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=t.call(e,a)}catch(s){o=[6,s],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}}function u(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 c(e,t){var n="function"===typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(s){i={error:s}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a}function l(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(c(arguments[t]));return e}function f(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;var r=Array(e),i=0;for(t=0;t<n;t++)for(var o=arguments[t],a=0,s=o.length;a<s;a++,i++)r[i]=o[a];return r}},function(e,t,n){"use strict";(function(e){n.d(t,"a",(function(){return v})),n.d(t,"b",(function(){return I})),n.d(t,"c",(function(){return x})),n.d(t,"d",(function(){return W})),n.d(t,"e",(function(){return P})),n.d(t,"f",(function(){return s})),n.d(t,"g",(function(){return u})),n.d(t,"h",(function(){return l})),n.d(t,"i",(function(){return f})),n.d(t,"j",(function(){return Z})),n.d(t,"k",(function(){return F})),n.d(t,"l",(function(){return z})),n.d(t,"m",(function(){return d})),n.d(t,"n",(function(){return p})),n.d(t,"o",(function(){return Y})),n.d(t,"p",(function(){return y}
2)),n.d(t,"q",(function(){return D})),n.d(t,"r",(function(){return b})),n.d(t,"s",(function(){return _})),n.d(t,"t",(function(){return k})),n.d(t,"u",(function(){return V})),n.d(t,"v",(function(){return S})),n.d(t,"w",(function(){return T})),n.d(t,"x",(function(){return m})),n.d(t,"y",(function(){return g})),n.d(t,"z",(function(){return E})),n.d(t,"A",(function(){return w})),n.d(t,"B",(function(){return O})),n.d(t,"C",(function(){return L})),n.d(t,"D",(function(){return A})),n.d(t,"E",(function(){return B})),n.d(t,"F",(function(){return q})),n.d(t,"G",(function(){return U})),n.d(t,"H",(function(){return J})),n.d(t,"I",(function(){return X})),n.d(t,"J",(function(){return M})),n.d(t,"K",(function(){return K})),n.d(t,"L",(function(){return Q})),n.d(t,"M",(function(){return $})),n.d(t,"N",(function(){return C}));var r=n(2),i=!1,o=!1,a="${JSCORE_VERSION}",s=function(e,t){if(!e)throw u(t)},u=function(e){return new Error("Firebase Database ("+a+") INTERNAL ASSERT FAILED: "+e)},c=function(e){for(var t=[],n=0,r=0;r<e.length;r++){var i=e.charCodeAt(r);i<128?t[n++]=i:i<2048?(t[n++]=i>>6|192,t[n++]=63&i|128):55296===(64512&i)&&r+1<e.length&&56320===(64512&e.charCodeAt(r+1))?(i=65536+((1023&i)<<10)+(1023&e.charCodeAt(++r)),t[n++]=i>>18|240,t[n++]=i>>12&63|128,t[n++]=i>>6&63|128,t[n++]=63&i|128):(t[n++]=i>>12|224,t[n++]=i>>6&63|128,t[n++]=63&i|128)}return t},l={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=[],i=0;i<e.length;i+=3){var o=e[i],a=i+1<e.length,s=a?e[i+1]:0,u=i+2<e.length,c=u?e[i+2]:0,l=o>>2,f=(3&o)<<4|s>>4,h=(15&s)<<2|c>>6,d=63&c;u||(d=64,a||(h=64)),r.push(n[l],n[f],n[h],n[d])}return r.join("")},encodeString:function(e,t){return this.HAS_NATIVE_SUPPORT&&!t?btoa(e):this.encodeByteArray(c(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 i=e[n++];if(i<128)t[r++]=String.fromCharCode(i);else if(i>191&&i<224){var o=e[n++];t[r++]=String.fromCharCode((31&i)<<6|63&o)}else if(i>239&&i<365){var a=((7&i)<<18|(63&(o=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{o=e[n++];var s=e[n++];t[r++]=String.fromCharCode((15&i)<<12|(63&o)<<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=[],i=0;i<e.length;){var o=n[e.charAt(i++)],a=i<e.length?n[e.charAt(i)]:0,s=++i<e.length?n[e.charAt(i)]:64,u=++i<e.length?n[e.charAt(i)]:64;if(++i,null==o||null==a||null==s||null==u)throw Error();var c=o<<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)}}},f=function(e){var t=c(e);return l.encodeByteArray(t,!0)},h=function(e){try{return l.decodeString(e,!0)}catch(t){console.error("base64Decode failed: ",t)}return null};function d(e){return p(void 0,e)}function p(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]=p(e[n],t[n]));return e}var v=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 y(){return"undefined"!==typeof navigator&&"string"===typeof navigator.userAgent?navigator.userAgent:""}function m(){return"undefined"!==typeof window&&!!(window.cordova||window.phonegap||window.PhoneGap)&&/ios|iphone|ipod|ipad|android|blackberry|iemobile/i.test(y())}function g(){try{return"[object process]"===Object.prototype.toString.call(e.process)}catch(t){return!1}}function b(){return"object"===typeof self&&self.self===self}function _(){var e="object"===typeof chrome?chrome.runtime:"object"===typeof browser?browser.runtime:void 0;return"object"===typeof e&&void 0!==e.id}function w(){return"object"===typeof navigator&&"ReactNative"===navigator.product}function k(){return y().indexOf("Electron/")>=0}function S(){var e=y();return e.indexOf("MSIE ")>=0||e.indexOf("Trident/")>=0}function O(){return y().indexOf("MSAppHost/")>=0}function E(){return!0===i||!0===o}function T(){return"indexedDB"in self&&null!=indexedDB}function C(){return new Promise((function(e,t){try{var n=!0,r="validate-browser-context-for-indexeddb-analytics-module",i=window.indexedDB.open(r);i.onsuccess=function(){i.result.close(),n||window.indexedDB.deleteDatabase(r),e(!0)},i.onupgradeneeded=function(){n=!1},i.onerror=function(){var e;t((null===(e=i.error)||void 0===e?void 0:e.message)||"")}}catch(o){t(o)}}))}function P(){return!(!navigator||!navigator.cookieEnabled)}var x=function(e){function t(n,r,i){var o=e.call(this,r)||this;return o.code=n,o.customData=i,o.name="FirebaseError",Object.setPrototypeOf(o,t.prototype),Error.captureStackTrace&&Error.captureStackTrace(o,I.prototype.create),o}return Object(r.c)(t,e),t}(Error),I=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];var r=t[0]||{},i=this.service+"/"+e,o=this.errors[e],a=o?j(o,r):"Error",s=this.serviceName+": "+a+" ("+i+").",u=new x(i,s,r);return u},e}();function j(e,t){return e.replace(R,(function(e,n){var r=t[n];return null!=r?String(r):"<"+n+"?>"}))}var R=/\{\$([^}]+)}/g;function A(e){return JSON.parse(e)}function M(e){return JSON.stringify(e)}var N=function(e){var t={},n={},r={},i="";try{var o=e.split(".");t=A(h(o[0])||""),n=A(h(o[1])||""),i=o[2],r=n.d||{},delete n.d}catch(a){}return{header:t,claims:n,data:r,signature:i}},L=function(e){var t=N(e).claims;return!!t&&"object"===typeof t&&t.hasOwnProperty("iat")},D=function(e){var t=N(e).claims;return"object"===typeof t&&!0===t.admin};function F(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function U(e,t){return Object.prototype.hasOwnProperty.call(e,t)?e[t]:void 0}function V(e){for(var t in e)if(Object.prototype.hasOwnProperty.call(e,t))return!1;return!0}function B(e,t,n){var r={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(r[i]=t.call(n,e[i],i,e));return r}function q(e){for(var t=[],n=function(e,n){Array.isArray(n)?n.forEac
2h((function(n){t.push(encodeURIComponent(e)+"="+encodeURIComponent(n))})):t.push(encodeURIComponent(e)+"="+encodeURIComponent(n))},r=0,i=Object.entries(e);r<i.length;r++){var o=i[r];n(o[0],o[1])}return t.length?"&"+t.join("&"):""}var W=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 i=n[r-3]^n[r-8]^n[r-14]^n[r-16];n[r]=4294967295&(i<<1|i>>>31)}var o,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?(o=l^u&(c^l),a=1518500249):(o=u^c^l,a=1859775393):r<60?(o=u&c|l&(u|c),a=2400959708):(o=u^c^l,a=3395469782);i=(s<<5|s>>>27)+o+f+a+n[r]&4294967295;f=l,l=c,c=4294967295&(u<<30|u>>>2),u=s,s=i}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,i=this.buf_,o=this.inbuf_;r<t;){if(0===o)for(;r<=n;)this.compress_(e,r),r+=this.blockSize;if("string"===typeof e){for(;r<t;)if(i[o]=e.charCodeAt(r),++r,++o===this.blockSize){this.compress_(i),o=0;break}}else for(;r<t;)if(i[o]=e[r],++r,++o===this.blockSize){this.compress_(i),o=0;break}}this.inbuf_=o,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 i=24;i>=0;i-=8)e[r]=this.chain_[n]>>i&255,++r;return e},e}();function z(e,t){var n=new H(e,t);return n.subscribe.bind(n)}var H=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,i=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=t;n<r.length;n++){var i=r[n];if(i in e&&"function"===typeof e[i])return!0}return!1}(e,["next","error","complete"])?e:{next:e,error:t,complete:n}).next&&(r.next=G),void 0===r.error&&(r.error=G),void 0===r.complete&&(r.complete=G);var o=this.unsubscribeOne.bind(this,this.observers.length);return this.finalized&&this.task.then((function(){try{i.finalError?r.error(i.finalError):r.complete()}catch(e){}})),this.observers.push(r),o},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(r){"undefined"!==typeof console&&console.error&&console.error(r)}}))},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 G(){}var K=function(e,t,n,r){var i;if(r<t?i="at least "+t:r>n&&(i=0===n?"none":"no more than "+n),i)throw new Error(e+" failed: Was called with "+r+(1===r?" argument.":" arguments.")+" Expects "+i+".")};function Y(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?")}var i=e+" failed: ";return i+=r+" argument "}function Q(e,t,n,r){if((!r||n)&&"function"!==typeof n)throw new Error(Y(e,t,r)+"must be a valid function.")}function $(e,t,n,r){if((!r||n)&&("object"!==typeof n||null===n))throw new Error(Y(e,t,r)+"must be a valid context object.")}var X=function(e){for(var t=[],n=0,r=0;r<e.length;r++){var i=e.charCodeAt(r);if(i>=55296&&i<=56319){var o=i-55296;r++,s(r<e.length,"Surrogate pair missing trail surrogate."),i=65536+(o<<10)+(e.charCodeAt(r)-56320)}i<128?t[n++]=i:i<2048?(t[n++]=i>>6|192,t[n++]=63&i|128):i<65536?(t[n++]=i>>12|224,t[n++]=i>>6&63|128,t[n++]=63&i|128):(t[n++]=i>>18|240,t[n++]=i>>12&63|128,t[n++]=i>>6&63|128,t[n++]=63&i|128)}return t},J=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};function Z(e,t,n){void 0===t&&(t=1e3),void 0===n&&(n=2);var r=t*Math.pow(n,e),i=Math.round(.5*r*(Math.random()-.5)*2);return Math.min(144e5,r+i)}}).call(this,n(44))},function(e,t,n){"use strict";e.exports=n(307)},function(e,t,n){"use strict";n.d(t,"a",(function(){return o}
2));var r=n(29);function i(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function o(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?i(Object(n),!0).forEach((function(t){Object(r.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):i(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}},function(e,t,n){e.exports=n(312)},function(e,t,n){"use strict";function r(){return(r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";function r(e,t,n,r,i,o,a){try{var s=e[o](a),u=s.value}catch(c){return void n(c)}s.done?t(u):Promise.resolve(u).then(r,i)}function i(e){return function(){var t=this,n=arguments;return new Promise((function(i,o){var a=e.apply(t,n);function s(e){r(a,i,o,s,u,"next",e)}function u(e){r(a,i,o,s,u,"throw",e)}s(void 0)}))}}n.d(t,"a",(function(){return i}))},function(e,t){e.exports=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,i=n(4),o=(r=i)&&"object"===typeof r&&"default"in r?r.default:r,a=new(n(313)),s=a.getBrowser(),u=(a.getCPU(),a.getDevice()),c=a.getEngine(),l=a.getOS(),f=a.getUA(),h=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"none";return e||t},d=function(){return!("undefined"===typeof window||!window.navigator&&!navigator)&&(window.navigator||navigator)},p=function(e){var t=d();return t&&t.platform&&(-1!==t.platform.indexOf(e)||"MacIntel"===t.platform&&t.maxTouchPoints>1&&!window.MSStream)};function v(e){return(v="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function y(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function m(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function g(){return(g=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function b(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function _(e){return(_=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function w(e,t){return(w=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function k(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}var S="mobile",O="tablet",E="smarttv",T="console",C="wearable",P=void 0,x="Chrome",I="Firefox",j="Opera",R="Yandex",A="Safari",M="Internet Explorer",N="Edge",L="Chromium",D="IE",F="Mobile Safari",U="MIUI Browser",V="iOS",B="Android",q="Windows Phone",W="Windows",z="Mac OS",H={isMobile:!1,isTablet:!1,isBrowser:!1,isSmartTV:!1,isConsole:!1,isWearable:!1},G=function(e,t,n,r){return function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?b(n,!0).forEach((function(t){m(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):b(n).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},e,{vendor:h(t.vendor),model:h(t.model),os:h(n.name),osVersion:h(n.version),ua:h(r)})},K=function(e){switch(e){case S:return{isMobile:!0};case O:return{isTablet:!0};case E:return{isSmartTV:!0};case T:return{isConsole:!0};case C:return{isWearable:!0};case P:return{isBrowser:!0};default:return H}}(u.type);var Y=function(){return"string"===typeof f&&-1!==f.indexOf("Edg/")},Q=function(){return s.name===N},$=function(){return p("iPad")},X=u.type===E,J=u.type===T,Z=u.type===C,ee=s.name===F||$(),te=s.name===L,ne=function(){switch(u.type){case S:case O:return!0;default:return!1}}()||$(),re=u.type===S,ie=u.type===O||$(),oe=u.type===P,ae=l.name===B,se=l.name===q,ue=l.name===V||$(),ce=s.name===x,le=s.name===I,fe=s.name===A||s.name===F,he=s.name===j,de=s.name===M||s.name===D,pe
2=h(l.version),ve=h(l.name),ye=h(s.version),me=h(s.major),ge=h(s.name),be=h(u.vendor),_e=h(u.model),we=h(c.name),ke=h(c.version),Se=h(f),Oe=Q()||Y(),Ee=s.name===R,Te=h(u.type,"browser"),Ce=function(){var e=d();return e&&(/iPad|iPhone|iPod/.test(e.platform)||"MacIntel"===e.platform&&e.maxTouchPoints>1)&&!window.MSStream}(),Pe=$(),xe=p("iPhone"),Ie=p("iPod"),je=function(){var e=d(),t=e&&e.userAgent.toLowerCase();return"string"===typeof t&&/electron/.test(t)}(),Re=Y(),Ae=Q()&&!Y(),Me=l.name===W,Ne=l.name===z,Le=s.name===U;t.AndroidView=function(e){var t=e.renderWithFragment,n=e.children,r=e.viewClassName,a=e.style;return ae?t?o.createElement(i.Fragment,null,n):o.createElement("div",{className:r,style:a},n):null},t.BrowserView=function(e){var t=e.renderWithFragment,n=e.children,r=e.viewClassName,a=e.style;return oe?t?o.createElement(i.Fragment,null,n):o.createElement("div",{className:r,style:a},n):null},t.ConsoleView=function(e){var t=e.renderWithFragment,n=e.children,r=e.viewClassName,a=e.style;return J?t?o.createElement(i.Fragment,null,n):o.createElement("div",{className:r,style:a},n):null},t.CustomView=function(e){var t=e.renderWithFragment,n=e.children,r=e.viewClassName,a=e.style;return e.condition?t?o.createElement(i.Fragment,null,n):o.createElement("div",{className:r,style:a},n):null},t.IEView=function(e){var t=e.renderWithFragment,n=e.children,r=e.viewClassName,a=e.style;return de?t?o.createElement(i.Fragment,null,n):o.createElement("div",{className:r,style:a},n):null},t.IOSView=function(e){var t=e.renderWithFragment,n=e.children,r=e.viewClassName,a=e.style;return ue?t?o.createElement(i.Fragment,null,n):o.createElement("div",{className:r,style:a},n):null},t.MobileOnlyView=function(e){var t=e.renderWithFragment,n=e.children,r=e.viewClassName,a=e.style;return re?t?o.createElement(i.Fragment,null,n):o.createElement("div",{className:r,style:a},n):null},t.MobileView=function(e){var t=e.renderWithFragment,n=e.children,r=e.viewClassName,a=e.style;return ne?t?o.createElement(i.Fragment,null,n):o.createElement("div",{className:r,style:a},n):null},t.SmartTVView=function(e){var t=e.renderWithFragment,n=e.children,r=e.viewClassName,a=e.style;return X?t?o.createElement(i.Fragment,null,n):o.createElement("div",{className:r,style:a},n):null},t.TabletView=function(e){var t=e.renderWithFragment,n=e.children,r=e.viewClassName,a=e.style;return ie?t?o.createElement(i.Fragment,null,n):o.createElement("div",{className:r,style:a},n):null},t.WearableView=function(e){var t=e.renderWithFragment,n=e.children,r=e.viewClassName,a=e.style;return Z?t?o.createElement(i.Fragment,null,n):o.createElement("div",{className:r,style:a},n):null},t.WinPhoneView=function(e){var t=e.renderWithFragment,n=e.children,r=e.viewClassName,a=e.style;return se?t?o.createElement(i.Fragment,null,n):o.createElement("div",{className:r,style:a},n):null},t.browserName=ge,t.browserVersion=me,t.deviceDetect=function(){var e=K.isBrowser,t=K.isMobile,n=K.isTablet,r=K.isSmartTV,i=K.isConsole,o=K.isWearable;return e?function(e,t,n,r,i){return{isBrowser:e,browserMajorVersion:h(t.major),browserFullVersion:h(t.version),browserName:h(t.name),engineName:h(n.name),engineVersion:h(n.version),osName:h(r.name),osVersion:h(r.version),userAgent:h(i)}}(e,s,c,l,f):r?function(e,t,n,r){return{isSmartTV:e,engineName:h(t.name),engineVersion:h(t.version),osName:h(n.name),osVersion:h(n.version),userAgent:h(r)}}(r,c,l,f):i?function(e,t,n,r){return{isConsole:e,engineName:h(t.name),engineVersion:h(t.version),osName:h(n.name),osVersion:h(n.version),userAgent:h(r)}}(i,c,l,f):t||n?G(K,u,l,f):o?function(e,t,n,r){return{isWearable:e,engineName:h(t.name),engineVersion:h(t.version),osName:h(n.name),osVersion:h(n.version),userAgent:h(r)}}(o,c,l,f):void 0},t.deviceType=Te,t.engineName=we,t.engineVersion=ke,t.fullBrowserVersion=ye,t.getUA=Se,t.isAndroid=ae,t.isBrowser=oe,t.isChrome=ce,t.isChromium=te,t.isConsole=J,t.isEdge=Oe,t.isEdgeChromium=Re,t.isElectron=je,t.isFirefox=le,t.isIE=de,t.isIOS=ue,t.isIOS13=Ce,t.isIPad13=Pe,t.isIPhone13=xe,t.isIPod13=Ie,t.isLegacyEdge=Ae,t.isMIUI=Le,t.isMacOs=Ne,t.isMobile=ne,t.isMobileOnly=re,t.isMobileSafari=ee,t.isOpera=he,t.isSafari=fe,t.isSmartTV=X,t.isTablet=ie,t.isWearable=Z,t.isWinPhone=se,t.isWindows=Me,t.isYandex=Ee,t.mobileModel=_e,t.mobileVendor=be,t.osName=ve,t.osVersion=pe,t.withOr
2ientationChange=function(e){return function(t){function n(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,n),(t=function(e,t){return!t||"object"!==typeof t&&"function"!==typeof t?k(e):t}(this,_(n).call(this,e))).isEventListenerAdded=!1,t.handleOrientationChange=t.handleOrientationChange.bind(k(t)),t.onOrientationChange=t.onOrientationChange.bind(k(t)),t.onPageLoad=t.onPageLoad.bind(k(t)),t.state={isLandscape:!1,isPortrait:!1},t}var r,i,a;return function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&w(e,t)}(n,t),r=n,(i=[{key:"handleOrientationChange",value:function(){this.isEventListenerAdded||(this.isEventListenerAdded=!0);var e=window.innerWidth>window.innerHeight?90:0;this.setState({isPortrait:0===e,isLandscape:90===e})}},{key:"onOrientationChange",value:function(){this.handleOrientationChange()}},{key:"onPageLoad",value:function(){this.handleOrientationChange()}},{key:"componentDidMount",value:function(){void 0!==("undefined"===typeof window?"undefined":v(window))&&ne&&(this.isEventListenerAdded?window.removeEventListener("load",this.onPageLoad,!1):(this.handleOrientationChange(),window.addEventListener("load",this.onPageLoad,!1)),window.addEventListener("resize",this.onOrientationChange,!1))}},{key:"componentWillUnmount",value:function(){window.removeEventListener("resize",this.onOrientationChange,!1)}},{key:"render",value:function(){return o.createElement(e,g({},this.props,{isLandscape:this.state.isLandscape,isPortrait:this.state.isPortrait}))}}])&&y(r.prototype,i),a&&y(r,a),n}(o.Component)}},function(e,t,n){"use strict";var r,i,o=n(2),a=n(3),s=n(33),u=n(37),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.b("app","Firebase",c),f="@firebase/app",h="[DEFAULT]",d=((i={})[f]="fire-core",i["@firebase/analytics"]="fire-analytics",i["@firebase/auth"]="fire-auth",i["@firebase/database"]="fire-rtdb",i["@firebase/functions"]="fire-fn",i["@firebase/installations"]="fire-iid",i["@firebase/messaging"]="fire-fcm",i["@firebase/performance"]="fire-perf",i["@firebase/remote-config"]="fire-rc",i["@firebase/storage"]="fire-gcs",i["@firebase/firestore"]="fire-fst",i["fire-js"]="fire-js",i["firebase-wrapper"]="fire-js-all",i),p=new u.b("@firebase/app"),v=function(){function e(e,t,n){var r,i,u=this;this.firebase_=n,this.isDeleted_=!1,this.name_=t.name,this.automaticDataCollectionEnabled_=t.automaticDataCollectionEnabled||!1,this.options_=Object(a.m)(e),this.container=new s.b(t.name),this._addComponent(new s.a("app",(function(){return u}),"PUBLIC"));try{for(var c=Object(o.h)(this.firebase_.INTERNAL.components.values()),l=c.next();!l.done;l=c.next()){var f=l.value;this._addComponent(f)}}catch(h){r={error:h}}finally{try{l&&!l.done&&(i=c.return)&&i.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:!1,configurable:!0}),Object.defineProperty(e.prototype,"name",{get:function(){return this.checkDestroyed_(),this.name_},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"options",{get:function(){return this.checkDestroyed_(),this.options_},enumerable:!1,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=h),this.checkDestroyed_(),this.container.getProvider(e).getImmediate({identifier:t})},e.prototype._removeServiceInstance=function(e,t){void 0===t&&(t=h),this.container.getProvider(e).
2clearInstance(t)},e.prototype._addComponent=function(e){try{this.container.addComponent(e)}catch(t){p.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}();v.prototype.name&&v.prototype.options||v.prototype.delete||console.log("dc");var y=function e(){var t=function(e){var t={},n=new Map,r={__esModule:!0,initializeApp:function(n,i){void 0===i&&(i={}),"object"===typeof i&&null!==i||(i={name:i});var o=i;void 0===o.name&&(o.name=h);var s=o.name;if("string"!==typeof s||!s)throw l.create("bad-app-name",{appName:String(s)});if(Object(a.k)(t,s))throw l.create("duplicate-app",{appName:s});var u=new e(n,o,r);return t[s]=u,u},app:i,registerVersion:function(e,t,n){var r,i=null!==(r=d[e])&&void 0!==r?r:e;n&&(i+="-"+n);var o=i.match(/\s|\//),a=t.match(/\s|\//);if(o||a){var u=['Unable to register library "'+i+'" with version "'+t+'":'];return o&&u.push('library name "'+i+'" contains illegal characters (whitespace or "/")'),o&&a&&u.push("and"),a&&u.push('version name "'+t+'" contains illegal characters (whitespace or "/")'),void p.warn(u.join(" "))}c(new s.a(i+"-version",(function(){return{library:i,version:t}}),"VERSION"))},setLogLevel:u.c,onLog:function(e,t){if(null!==e&&"function"!==typeof e)throw l.create("invalid-log-argument",{appName:name});Object(u.d)(e,t)},apps:null,SDK_VERSION:"8.0.0",INTERNAL:{registerComponent:c,removeApp:function(e){delete t[e]},components:n,useAsService:function(e,t){return"serverAuth"===t?null:t}}};function i(e){if(e=e||h,!Object(a.k)(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 p.debug("There were multiple attempts to register component "+f+"."),"PUBLIC"===s.type?r[f]:null;if(n.set(f,s),"PUBLIC"===s.type){var h=function(e){if(void 0===e&&(e=i()),"function"!==typeof e[f])throw l.create("invalid-app-argument",{appName:f});return e[f]()};void 0!==s.serviceProps&&Object(a.n)(h,s.serviceProps),r[f]=h,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 d=Object(o.h)(Object.keys(t)),v=d.next();!v.done;v=d.next()){var y=v.value;t[y]._addComponent(s)}}catch(m){u={error:m}}finally{try{v&&!v.done&&(c=d.return)&&c.call(d)}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]}))}}),i.App=e,r}(v);return t.INTERNAL=Object(o.a)(Object(o.a)({},t.INTERNAL),{createFirebaseNamespace:e,extendNamespace:function(e){Object(a.n)(t,e)},createSubscribe:a.l,ErrorFactory:a.b,deepExtend:a.n}),t}(),m=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?void 0:t.type)}(e)){var t=e.getImmediate();return t.library+"/"+t.version}return null})).filter((function(e){return e})).join(" ")},e}();if(Object(a.r)()&&void 0!==self.firebase){p.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&&p.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 b=y.initializeApp;y.initializeApp=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return Object(a.y)()&&p.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 '),b.apply(void 0,e)};var _=y;!function(e,t){e.INTERNAL.registerComponent(new s.a("platform-logger",(function(e){return new m(e)}),"PRIVATE")),e.registerVersion(f,"0.6.12",t),e.registerVersion("fire-js","")}(_),t.a=_},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";function r(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function i(e,t,n){return t&&r(e.prototype,t),n&&r(e,n),e}n.d(t,"a",(function(){return i}))},function(e,t,n){e.exports=n(338)()},function(e,t,n){"use strict";function r(e){return(r=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function i(e){return(i="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}n.d(t,"a",(function(){return s}));var o=n(19);function a(e,t){return!t||"object"!==i(t)&&"function"!==typeof t?Object(o.a)(e):t}function s(e){var t=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,i=r(e);
2if(t){var o=r(this).constructor;n=Reflect.construct(i,arguments,o)}else n=i.apply(this,arguments);return a(this,n)}}},function(e,t,n){"use strict";function r(e,t){return(r=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function i(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&r(e,t)}n.d(t,"a",(function(){return i}))},function(e,t){function n(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}e.exports=function(e,t,r){return t&&n(e.prototype,t),r&&n(e,r),e}},function(e,t,n){"use strict";var r,i="object"===typeof Reflect?Reflect:null,o=i&&"function"===typeof i.apply?i.apply:function(e,t,n){return Function.prototype.apply.call(e,t,n)};r=i&&"function"===typeof i.ownKeys?i.ownKeys:Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.getOwnPropertyNames(e)};var a=Number.isNaN||function(e){return e!==e};function s(){s.init.call(this)}e.exports=s,e.exports.once=function(e,t){return new Promise((function(n,r){function i(){void 0!==o&&e.removeListener("error",o),n([].slice.call(arguments))}var o;"error"!==t&&(o=function(n){e.removeListener(t,i),r(n)},e.once("error",o)),e.once(t,i)}))},s.EventEmitter=s,s.prototype._events=void 0,s.prototype._eventsCount=0,s.prototype._maxListeners=void 0;var u=10;function c(e){if("function"!==typeof e)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}function l(e){return void 0===e._maxListeners?s.defaultMaxListeners:e._maxListeners}function f(e,t,n,r){var i,o,a,s;if(c(n),void 0===(o=e._events)?(o=e._events=Object.create(null),e._eventsCount=0):(void 0!==o.newListener&&(e.emit("newListener",t,n.listener?n.listener:n),o=e._events),a=o[t]),void 0===a)a=o[t]=n,++e._eventsCount;else if("function"===typeof a?a=o[t]=r?[n,a]:[a,n]:r?a.unshift(n):a.push(n),(i=l(e))>0&&a.length>i&&!a.warned){a.warned=!0;var u=new Error("Possible EventEmitter memory leak detected. "+a.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");u.name="MaxListenersExceededWarning",u.emitter=e,u.type=t,u.count=a.length,s=u,console&&console.warn&&console.warn(s)}return e}function h(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function d(e,t,n){var r={fired:!1,wrapFn:void 0,target:e,type:t,listener:n},i=h.bind(r);return i.listener=n,r.wrapFn=i,i}function p(e,t,n){var r=e._events;if(void 0===r)return[];var i=r[t];return void 0===i?[]:"function"===typeof i?n?[i.listener||i]:[i]:n?function(e){for(var t=new Array(e.length),n=0;n<t.length;++n)t[n]=e[n].listener||e[n];return t}(i):y(i,i.length)}function v(e){var t=this._events;if(void 0!==t){var n=t[e];if("function"===typeof n)return 1;if(void 0!==n)return n.length}return 0}function y(e,t){for(var n=new Array(t),r=0;r<t;++r)n[r]=e[r];return n}Object.defineProperty(s,"defaultMaxListeners",{enumerable:!0,get:function(){return u},set:function(e){if("number"!==typeof e||e<0||a(e))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+e+".");u=e}}),s.init=function(){void 0!==this._events&&this._events!==Object.getPrototypeOf(this)._events||(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},s.prototype.setMaxListeners=function(e){if("number"!==typeof e||e<0||a(e))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+e+".");return this._maxListeners=e,this},s.prototype.getMaxListeners=function(){return l(this)},s.prototype.emit=function(e){for(var t=[],n=1;n<arguments.length;n++)t.push(arguments[n]);var r="error"===e,i=this._events;if(void 0!==i)r=r&&void 0===i.error;else if(!r)return!1;if(r){var a;if(t.length>0&&(a=t[0]),a instanceof Error)throw a;var s=new Error("Unhandled error."+(a?" ("+a.message+")":""));throw s.context=a,s}var u=i[e];if(void 0===u)return!1;if("function"===typeof u)o(u,this,t);else{var c=u.length,l=y(u,c);for(n=0;n<c;++n)o(l[n],this,t)}return!0},s.prototype.addListener=function(e,t){return f(this,e,t,!1)},s.prototype.on=s.prototype.addListener,s.prototype.prependListener=function(e,t){return f(this,e,t,!0)},s.prototype.once=function(e,t){return c(t),this.on(e,d(this,e,t)),this},s.prototype.prependOnceListener=function(e,t){return c(t),this.prependListener(e,d(this,e,t)),this},s.prototype.removeListener=function(e,t){var n,r,i,o,a;if(c(t),void 0===(r=this._events))return this;if(void 0===(n=r[e]))return this;if(n===t||n.listener===t)0===--this._eventsCount?this._events=Object.create(null):(delete r[e],r.removeListener&&this.emit
2("removeListener",e,n.listener||t));else if("function"!==typeof n){for(i=-1,o=n.length-1;o>=0;o--)if(n[o]===t||n[o].listener===t){a=n[o].listener,i=o;break}if(i<0)return this;0===i?n.shift():function(e,t){for(;t+1<e.length;t++)e[t]=e[t+1];e.pop()}(n,i),1===n.length&&(r[e]=n[0]),void 0!==r.removeListener&&this.emit("removeListener",e,a||t)}return this},s.prototype.off=s.prototype.removeListener,s.prototype.removeAllListeners=function(e){var t,n,r;if(void 0===(n=this._events))return this;if(void 0===n.removeListener)return 0===arguments.length?(this._events=Object.create(null),this._eventsCount=0):void 0!==n[e]&&(0===--this._eventsCount?this._events=Object.create(null):delete n[e]),this;if(0===arguments.length){var i,o=Object.keys(n);for(r=0;r<o.length;++r)"removeListener"!==(i=o[r])&&this.removeAllListeners(i);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if("function"===typeof(t=n[e]))this.removeListener(e,t);else if(void 0!==t)for(r=t.length-1;r>=0;r--)this.removeListener(e,t[r]);return this},s.prototype.listeners=function(e){return p(this,e,!0)},s.prototype.rawListeners=function(e){return p(this,e,!1)},s.listenerCount=function(e,t){return"function"===typeof e.listenerCount?e.listenerCount(t):v.call(e,t)},s.prototype.listenerCount=v,s.prototype.eventNames=function(){return this._eventsCount>0?r(this._events):[]}},function(e,t,n){"use strict";function r(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}n.d(t,"a",(function(){return r}))},function(e,t,n){var r=n(161);e.exports=function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&r(e,t)}},function(e,t,n){var r=n(66),i=n(264),o=n(526);e.exports=function(e){var t=i();return function(){var n,i=r(e);if(t){var a=r(this).constructor;n=Reflect.construct(i,arguments,a)}else n=i.apply(this,arguments);return o(this,n)}}},function(e,t,n){"use strict";var r=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],r=!0,i=!1,o=void 0;try{for(var a,s=e[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(u){i=!0,o=u}finally{try{!r&&s.return&&s.return()}finally{if(i)throw o}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")},i="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};function o(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function s(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}function u(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)}var c=n(35),l=c.typeErrors,f=c.trackPriority,h=n(26);function d(e,t,n,r){if(!(r in t)&&!r.match(/^on[a-z]+$/)){var o=void 0;try{o=i(e[r])}catch(a){}"function"===o&&(t[r]=function(){var e;return(e=this[n])[r].apply(e,arguments)})}}function p(e){Object.getOwnPropertyNames(e).forEach((function(t){t.startsWith("_")&&v(e,t)}))}function v(e,t){var n=Object.getOwnPropertyDescriptor(e,t);n.enumerable=!1,Object.defineProperty(e,t,n)}function y(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];t.forEach((function(t){e.hasOwnProperty(t)&&v(e,t)}))}function m(e){return e.map(g)}function g(e){return Array.isArray(e)?m(e):e instanceof Set?m([].concat(u(e))):e instanceof Map?[].concat(u(e.entries())).reduce((function(e,t){var n=r(t,2),i=n[0],a=n[1];return Object.assign(o({},i,g(a)),e)}),{}):e&&"object"===("undefined"===typeof e?"undefined":i(e))?(t=e,Object.entries(t).reduce((function(e,t){var n=r(t,2),i=n[0],a=n[1];return Object.assign(o({},i,g(a)),e)}),{})):e;var t}function b(e){return k(e,[{prop:"dominantSpeakerPriority",type:"string",payloadProp:"active_speaker_priority"},{prop:"maxSubscriptionBitrate",type:"number",payloadProp:"max_subscription_bandwidth"},{prop:"maxTracks",type:"number",payloadProp:"max_tracks"},{prop:"mode",type:"string"},{prop:"renderDimensions",type:"object",payloadProp:"render_dimensions",transform:w},{prop:"trackSwitchOffMode",type:"string",payloadProp:"track_switch_off"}
2])}function _(e){return k(e,[{prop:"height",type:"number"},{prop:"width",type:"number"}])}function w(e){return k(e,[{prop:f.PRIORITY_HIGH,type:"object",transform:_},{prop:f.PRIORITY_LOW,type:"object",transform:_},{prop:f.PRIORITY_STANDARD,type:"object",transform:_}])}function k(e,t){return t.reduce((function(t,n){var r=n.prop,a=n.type,s=n.payloadProp,u=void 0===s?r:s,c=n.transform,l=void 0===c?function(e){return e}:c;return i(e[r])===a?Object.assign(o({},u,l(e[r])),t):t}),{})}t.constants=c,t.createBandwidthProfilePayload=function(e){return k(e,[{prop:"video",type:"object",transform:b}])},t.createMediaSignalingPayload=function(e,t,n,r){var i={transports:[{type:"data-channel"}]};return Object.assign(e?{active_speaker:i}:{},t?{network_quality:i}:{},n?{track_priority:i}:{},r?{track_switch_off:i}:{})},t.createRoomConnectEventPayload=function(e){var t={iceServers:(e.iceServers||[]).length,audioTracks:(e.tracks||[]).filter((function(e){return"audio"===e.kind})).length,videoTracks:(e.tracks||[]).filter((function(e){return"video"===e.kind})).length,dataTracks:(e.tracks||[]).filter((function(e){return"data"===e.kind})).length};if([["audio"],["automaticSubscription"],["enableDscp"],["eventListener"],["preflight"],["video"],["dominantSpeaker","enableDominantSpeaker"]].forEach((function(n){var i=r(n,2),o=i[0],a=i[1];t[a=a||o]=!!e[o]?"true":"false"})),[["maxVideoBitrate"],["maxAudioBitrate"],["iceTransportPolicy"],["region"],["name","roomName"]].forEach((function(n){var i=r(n,2),o=i[0],a=i[1];a=a||o,"number"!==typeof e[o]&&"string"!==typeof e[o]||(t[a]=e[o])})),["preferredAudioCodecs","preferredVideoCodecs"].forEach((function(n){n in e&&(t[n]=JSON.stringify(e[n]))})),e.bandwidthProfile&&e.bandwidthProfile.video){var n=e.bandwidthProfile.video||{};t.bandwidthProfileOptions={},["mode","maxTracks","trackSwitchOffMode","dominantSpeakerPriority"].forEach((function(e){"number"!==typeof n[e]&&"string"!==typeof n[e]||e in n&&(t.bandwidthProfileOptions[e]=n[e])})),"renderDimensions"in n&&(t.bandwidthProfileOptions.renderDimensions=JSON.stringify(n.renderDimensions))}return{group:"room",name:"connect",level:"info",payload:t}},t.createSubscribePayload=function(e){return{rules:[{type:e?"include":"exclude",all:!0}],revision:1}},t.asLocalTrack=function(e,t){if(e instanceof t.LocalAudioTrack||e instanceof t.LocalVideoTrack||e instanceof t.LocalDataTrack)return e;if(e instanceof t.MediaStreamTrack)return"audio"===e.kind?new t.LocalAudioTrack(e,t):new t.LocalVideoTrack(e,t);throw l.INVALID_TYPE("track","LocalAudioTrack, LocalVideoTrack, LocalDataTrack, or MediaStreamTrack")},t.asLocalTrackPublication=function(e,t,n,r){return new(0,{audio:r.LocalAudioTrackPublication,video:r.LocalVideoTrackPublication,data:r.LocalDataTrackPublication}[e.kind])(t,e,n,r)},t.capitalize=function(e){return e[0].toUpperCase()+e.slice(1)},t.deprecateEvents=function(e,t,n,r){var i=new Set;t.on("newListener",(function o(a){n.has(a)&&!i.has(a)&&(r.deprecated(e+"#"+a+" has been deprecated and scheduled for removal in [email protected]."+(n.get(a)?" Use "+e+"#"+n.get(a)+" instead.":"")),i.add(a)),i.size>=n.size&&t.removeListener("newListener",o)}))},t.difference=function(e,t){e=Array.isArray(e)?new Set(e):new Set(e.values()),t=Array.isArray(t)?new Set(t):new Set(t.values());var n=new Set;return e.forEach((function(e){t.has(e)||n.add(e)})),n},t.filterObject=function(e,t){return Object.keys(e).reduce((function(n,r){return e[r]!==t&&(n[r]=e[r]),n}),{})},t.flatMap=function(e,t){var n=e instanceof Map||e instanceof Set?Array.from(e.values()):e;return t=t||function(e){return e},n.reduce((function(e,n){var r=t(n);return e.concat(r)}),[])},t.getUserAgent=function(){return"undefined"!==typeof navigator&&navigator.userAgent?navigator.userAgent:"Unknown"},t.hidePrivateProperties=p,t.hidePrivateAndCertainPublicPropertiesInClass=function(e,t){return function(e){function n(){var e;a(this,n);for(var r=arguments.length,i=Array(r),o=0;o<r;o++)i[o]=arguments[o];var u=s(this,(e=n.__proto__||Object.getPrototypeOf(n)).call.apply(e,[this].concat(i)));return p(u),y(u,t),u}return function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(n,e),n}(e)},t.isDeepEqual=function e(t,n){if(t===n)return!0;
2if(("undefined"===typeof t?"undefined":i(t))!==("undefined"===typeof n?"undefined":i(n)))return!1;if(null===t)return null===n;if(null===n)return!1;if(Array.isArray(t))return Array.isArray(n)&&t.length===n.length&&t.every((function(t,r){return e(t,n[r])}));if("object"===("undefined"===typeof t?"undefined":i(t))){var r=Object.keys(t).sort(),o=Object.keys(n).sort();return!Array.isArray(n)&&e(r,o)&&r.every((function(r){return e(t[r],n[r])}))}return!1},t.isNonArrayObject=function(e){return"object"===("undefined"===typeof e?"undefined":i(e))&&!Array.isArray(e)},t.inRange=function(e,t,n){return t<=e&&e<=n},t.makeUUID=function(){return"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)}))},t.oncePerTick=function(e){var t=null;function n(){t=null,e()}return function(){t&&clearTimeout(t),t=setTimeout(n)}},t.promiseFromEvents=function(e,t,n,r){return new Promise((function(i,o){function a(){var e=[].slice.call(arguments);r&&t.removeListener(r,s),i.apply(void 0,u(e))}function s(){var e=[].slice.call(arguments);t.removeListener(n,a),o.apply(void 0,u(e))}t.once(n,a),r&&t.once(r,s),e()}))},t.getOrNull=function(e,t){return t.split(".").reduce((function(e,t){return e?e[t]:null}),e)},t.defer=function(){var e={};return e.promise=new Promise((function(t,n){e.resolve=t,e.reject=n})),e},t.delegateMethods=function(e,t,n){for(var r in e)d(e,t,n,r)},t.proxyProperties=function(e,t,n){Object.getOwnPropertyNames(e).forEach((function(e){!function(e,t,n,r){if(r in t)return;if(r.match(/^on[a-z]+$/))return Object.defineProperty(t,r,{value:null,writable:!0}),void n.addEventListener(r.slice(2),(function(){t.dispatchEvent.apply(t,arguments)}));Object.defineProperty(t,r,{enumerable:!0,get:function(){return n[r]}})}(0,t,n,e)}))},t.legacyPromise=function(e,t,n){return t?e.then((function(e){t(e)}),(function(e){n(e)})):e},t.buildLogLevels=function(e){return"string"===typeof e?{default:e,media:e,signaling:e,webrtc:e}:e},t.trackClass=function(e,t){return(t=t?"Local":"")+(e.kind||"").replace(/\w{1}/,(function(e){return e.toUpperCase()}))+"Track"},t.trackPublicationClass=function(e,t){return(t=t?"Local":"")+(e.kind||"").replace(/\w{1}/,(function(e){return e.toUpperCase()}))+"TrackPublication"},t.valueToJSON=g,t.withJitter=function(e,t){var n=Math.random();return e-t+Math.floor(2*t*n+.5)},t.isChromeScreenShareTrack=function(e){return"chrome"===h.guessBrowser()&&"video"===e.kind&&e.label&&(/^screen:[0-9]+/.test(e.label)||/^web-contents-media-stream:[0-9/]+/.test(e.label)||/^window:[0-9]+/.test(e.label))},t.waitForSometime=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:10;return new Promise((function(t){return setTimeout(t,e)}))},t.waitForEvent=function(e,t){return new Promise((function(n){e.addEventListener(t,(function r(i){e.removeEventListener(t,r),n(i)}))}))}},function(e,t,n){"use strict";t.__esModule=!0,t.default=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}},function(e,t,n){"use strict";t.__esModule=!0;var r,i=n(483),o=(r=i)&&r.__esModule?r:{default:r};t.default=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),(0,o.default)(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}()},function(e,t){var n=e.exports={version:"2.6.11"};"number"==typeof __e&&(__e=n)},function(e,t,n){"use strict";function r(e,t,n,r){if(!(r in t)&&!r.match(/^on[a-z]+$/)){var i;try{i=typeof e[r]}catch(o){}"function"===i&&(t[r]=function(){return this[n][r].apply(this[n],arguments)})}}function i(){return"undefined"!==typeof navigator&&"string"===typeof navigator.userAgent?navigator.userAgent:null}function o(e){return"undefined"===typeof e&&(e=i()),/Chrome|CriOS/.test(e)?"chrome":/Firefox|FxiOS/.test(e)?"firefox":/Safari/.test(e)?"safari":null}t.defer=function(){var e={};return e.promise=new Promise((function(t,n){e.resolve=t,e.reject=n})),e},t.delegateMethods=function(e,t,n){for(var i in e)r(e,t,n,i)},t.difference=function(e,t){e=Array.isArray(e)?new Set(e):new Set(e.values()),t=Array.isArray(t)?new Set(t):new Set(t.values());var n=new Set;return e.forEach((function(e){t.has(e)||n.add(e)})),n},t.flatMap=function(e,t){return(e instanceof Map||e instanceof Set?Array.from(e.values()):e).reduce((function(e,n){var r=t(n);return e.concat(r)}),[])},t.guessBrowser=o,t.guessBrowserVersion=function(e){"undefined"===typeof e&&(e=i());var t={chrome:"Chrome|CriOS",firefox:"Firefox|FxiOS",safari:"Version"}[o(e)];if(!t)return null;var n=new RegExp("("+t+")/([^\\s]+)"),r=(e.match(n)||[])[2];if(!r)return null;var a=r.split(".").map(Number);return{major:isNaN(a[0])?null:a[0],minor:isNaN(a[1])?null:a[1]}},t.interceptEvent=function(e,t){var n=null;Object.defineProperty(e,"on"+t,{get:function(){return n},set:function(e){n&&this.removeEventListener(t,n),"function"===typeof e?(n=e,this.addEventListener(t,n)):n=null}})},t.legacyPromise=function(e,t,n){return t?e.then((function(e){t(e)}),(function(e){n(e)})):e},t.makeUUID=function(){return"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)}))},t.proxyProperties=function(e,t,n){Object.getOwnPropertyNames(e).forEach((function(e){!function(e,t,n,r){if(r in t)return;if(r.match(/^on[a-z]+$/))return Object.defineProperty(t,r,{value:null,writable:!0}),void n.addEventListener(r.slice(2),(function(){t.dispatchEvent.apply(t,arguments)}));Object.defineProperty(t,r,{enumerable:!0,get:function(){return n[r]}})}(0,t,n,e)}))},t.support=function(){return"object"===typeof navigator&&"object"===typeof navigator.mediaDevices&&"function"===typeof navigator.mediaDevices.getUserMedia&&"function"===typeof RTCPeerConnection}},function(e,t){function n(e,t,n,r,i,o,a){try{var s=e[o](a),u=s.value}catch(c){return void n(c)}s.done?t(u):Promise.resolve(u).then(r,i)}
2e.exports=function(e){return function(){var t=this,r=arguments;return new Promise((function(i,o){var a=e.apply(t,r);function s(e){n(a,i,o,s,u,"next",e)}function u(e){n(a,i,o,s,u,"throw",e)}s(void 0)}))}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return b})),n.d(t,"b",(function(){return v})),n.d(t,"c",(function(){return E})),n.d(t,"d",(function(){return p})),n.d(t,"e",(function(){return g}));var r=n(30),i=n(4),o=n.n(i),a=(n(14),n(56)),s=n(172),u=n(51),c=n(7),l=n(173),f=n.n(l),h=(n(297),n(43)),d=(n(128),function(e){var t=Object(s.a)();return t.displayName=e,t}("Router-History")),p=function(e){var t=Object(s.a)();return t.displayName=e,t}("Router"),v=function(e){function t(t){var n;return(n=e.call(this,t)||this).state={location:t.history.location},n._isMounted=!1,n._pendingLocation=null,t.staticContext||(n.unlisten=t.history.listen((function(e){n._isMounted?n.setState({location:e}):n._pendingLocation=e}))),n}Object(r.a)(t,e),t.computeRootMatch=function(e){return{path:"/",url:"/",params:{},isExact:"/"===e}};var n=t.prototype;return n.componentDidMount=function(){this._isMounted=!0,this._pendingLocation&&this.setState({location:this._pendingLocation})},n.componentWillUnmount=function(){this.unlisten&&this.unlisten()},n.render=function(){return o.a.createElement(p.Provider,{value:{history:this.props.history,location:this.state.location,match:t.computeRootMatch(this.state.location.pathname),staticContext:this.props.staticContext}},o.a.createElement(d.Provider,{children:this.props.children||null,value:this.props.history}))},t}(o.a.Component);o.a.Component;o.a.Component;var y={},m=0;function g(e,t){void 0===t&&(t={}),("string"===typeof t||Array.isArray(t))&&(t={path:t});var n=t,r=n.path,i=n.exact,o=void 0!==i&&i,a=n.strict,s=void 0!==a&&a,u=n.sensitive,c=void 0!==u&&u;return[].concat(r).reduce((function(t,n){if(!n&&""!==n)return null;if(t)return t;var r=function(e,t){var n=""+t.end+t.strict+t.sensitive,r=y[n]||(y[n]={});if(r[e])return r[e];var i=[],o={regexp:f()(e,i,t),keys:i};return m<1e4&&(r[e]=o,m++),o}(n,{end:o,strict:s,sensitive:c}),i=r.regexp,a=r.keys,u=i.exec(e);if(!u)return null;var l=u[0],h=u.slice(1),d=e===l;return o&&!d?null:{path:n,url:"/"===n&&""===l?"/":l,isExact:d,params:a.reduce((function(e,t,n){return e[t.name]=h[n],e}),{})}}),null)}var b=function(e){function t(){return e.apply(this,arguments)||this}return Object(r.a)(t,e),t.prototype.render=function(){var e=this;return o.a.createElement(p.Consumer,null,(function(t){t||Object(u.a)(!1);var n=e.props.location||t.location,r=e.props.computedMatch?e.props.computedMatch:e.props.path?g(n.pathname,e.props):t.match,i=Object(c.a)({},t,{location:n,match:r}),a=e.props,s=a.children,l=a.component,f=a.render;return Array.isArray(s)&&0===s.length&&(s=null),o.a.createElement(p.Provider,{value:i},i.match?s?"function"===typeof s?s(i):s:l?o.a.createElement(l,i):f?f(i):null:"function"===typeof s?s(i):null)}))},t}(o.a.Component);function _(e){return"/"===e.charAt(0)?e:"/"+e}function w(e,t){if(!e)return t;var n=_(e);return 0!==t.pathname.indexOf(n)?t:Object(c.a)({},t,{pathname:t.pathname.substr(n.length)})}function k(e){return"string"===typeof e?e:Object(a.e)(e)}function S(e){return function(){Object(u.a)(!1)}}function O(){}o.a.Component;var E=function(e){function t(){return e.apply(this,arguments)||this}return Object(r.a)(t,e),t.prototype.render=function(){var e=this;return o.a.createElement(p.Consumer,null,(function(t){t||Object(u.a)(!1);var n,r,i=e.props.location||t.location;return o.a.Children.forEach(e.props.children,(function(e){if(null==r&&o.a.isValidElement(e)){n=e;var a=e.props.path||e.props.from;r=a?g(i.pathname,Object(c.a)({},e.props,{path:a})):t.match}})),r?o.a.cloneElement(n,{location:i,computedMatch:r}):null}))},t}(o.a.Component);o.a.useContext},function(e,t,n){"use strict";function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";function r(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";function r(e){var t,n,i="";if("string"===typeof e||"number"===typeof e)i+=e;else if("object"===typeof e)if(Array.isArray(e))for(t=0;t<e.length;t++)e[t]&&(n=r(e[t]))&&(i&&(i+=" "),i+=n);else for(t in e)e[t]&&(i&&(i+=" "),i+=t);return i}t.a=function(){for(var e,t,n=0,i="";n<arguments.length;)(e=arguments[n++])&&(t=r(e))&&(i&&(i+=" "),i+=t);return i}},function(e,t,n){(function(t,n){e.exports=function(e){function t(r){if(n[r])return n[r].exports;var i=n[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,t),i.l=!0,i.exports}var n={};return t.m=e,t.c=n,t.d=function(e,n,r){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:r})}
vendor: 4,151 bytes, line 2
2,t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=8)}([function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r="swal-button";t.CLASS_NAMES={MODAL:"swal-modal",OVERLAY:"swal-overlay",SHOW_MODAL:"swal-overlay--show-modal",MODAL_TITLE:"swal-title",MODAL_TEXT:"swal-text",ICON:"swal-icon",ICON_CUSTOM:"swal-icon--custom",CONTENT:"swal-content",FOOTER:"swal-footer",BUTTON_CONTAINER:"swal-button-container",BUTTON:r,CONFIRM_BUTTON:r+"--confirm",CANCEL_BUTTON:r+"--cancel",DANGER_BUTTON:r+"--danger",BUTTON_LOADING:r+"--loading",BUTTON_LOADER:r+"__loader"},t.default=t.CLASS_NAMES},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getNode=function(e){var t="."+e;return document.querySelector(t)},t.stringToNode=function(e){var t=document.createElement("div");return t.innerHTML=e.trim(),t.firstChild},t.insertAfter=function(e,t){var n=t.nextSibling;t.parentNode.insertBefore(e,n)},t.removeNode=function(e){e.parentElement.removeChild(e)},t.throwErr=function(e){throw"SweetAlert: "+(e=e.replace(/ +(?= )/g,"")).trim()},t.isPlainObject=function(e){if("[object Object]"!==Object.prototype.toString.call(e))return!1;var t=Object.getPrototypeOf(e);return null===t||t===Object.prototype},t.ordinalSuffixOf=function(e){var t=e%10,n=e%100;return 1===t&&11!==n?e+"st":2===t&&12!==n?e+"nd":3===t&&13!==n?e+"rd":e+"th"}},function(e,t,n){"use strict";function r(e){for(var n in e)t.hasOwnProperty(n)||(t[n]=e[n])}Object.defineProperty(t,"__esModule",{value:!0}),r(n(25));var i=n(26);t.overlayMarkup=i.default,r(n(27)),r(n(28)),r(n(29));var o=n(0),a=o.default.MODAL_TITLE,s=o.default.MODAL_TEXT,u=o.default.ICON,c=o.default.FOOTER;t.iconMarkup='\n <div class="'+u+'"></div>',t.titleMarkup='\n <div class="'+a+'"></div>\n',t.textMarkup='\n <div class="'+s+'"></div>',t.footerMarkup='\n <div class="'+c+'"></div>\n'},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(1);t.CONFIRM_KEY="confirm",t.CANCEL_KEY="cancel";var i={visible:!0,text:null,value:null,className:"",closeModal:!0},o=Object.assign({},i,{visible:!1,text:"Cancel",value:null}),a=Object.assign({},i,{text:"OK",value:!0});t.defaultButtonList={cancel:o,confirm:a};var s=function(e){switch(e){case t.CONFIRM_KEY:return a;case t.CANCEL_KEY:return o;default:var n=e.charAt(0).toUpperCase()+e.slice(1);return Object.assign({},i,{text:n,value:e})}},u=function(e,t){var n=s(e);return!0===t?Object.assign({},n,{visible:!0}):"string"==typeof t?Object.assign({},n,{visible:!0,text:t}):r.isPlainObject(t)?Object.assign({visible:!0},n,t):Object.assign({},n,{visible:!1})},c=function(e){for(var t={},n=0,r=Object.keys(e);n<r.length;n++){var i=r[n],a=e[i],s=u(i,a);t[i]=s}return t.cancel||(t.cancel=o),t},l=function(e){var n={};switch(e.length){case 1:n[t.CANCEL_KEY]=Object.assign({},o,{visible:!1});break;case 2:n[t.CANCEL_KEY]=u(t.CANCEL_KEY,e[0]),n[t.CONFIRM_KEY]=u(t.CONFIRM_KEY,e[1]);break;default:r.throwErr("Invalid number of 'buttons' in array ("+e.length+").\n If you want more than 2 buttons, you need to use an object!")}return n};t.getButtonListOpts=function(e){var n=t.defaultButtonList;return"string"==typeof e?n[t.CONFIRM_KEY]=u(t.CONFIRM_KEY,e):Array.isArray(e)?n=l(e):r.isPlainObject(e)?n=c(e):!0===e?n=l([!0,!0]):!1===e?n=l([!1,!1]):void 0===e&&(n=t.defaultButtonList),n}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(1),i=n(2),o=n(0),a=o.default.MODAL,s=o.default.OVERLAY,u=n(30),c=n(31),l=n(32),f=n(33);t.injectElIntoModal=function(e){var t=r.getNode(a),n=r.stringToNode(e);return t.appendChild(n),n};var h=function(e){e.className=a,e.textContent=""},d=function(e,t){h(e);var n=t.className;n&&e.classList.add(n)};t.initModalContent=function(e){var t=r.getNode(a);d(t,e),u.default(e.icon),c.initTitle(e.title),c.initText(e.text),f.default(e.content),l.default(e.buttons,e.dangerMode)};var p=function(){var e=r.getNode(s),t=r.stringToNode(i.modalMarkup);e.appendChild(t)};t.default=p},function(e,t,n){"use strict";
vendor: 1,853 bytes, line 2
2Object.defineProperty(t,"__esModule",{value:!0});var r=n(3),i={isOpen:!1,promise:null,actions:{},timer:null},o=Object.assign({},i);t.resetState=function(){o=Object.assign({},i)},t.setActionValue=function(e){if("string"==typeof e)return a(r.CONFIRM_KEY,e);for(var t in e)a(t,e[t])};var a=function(e,t){o.actions[e]||(o.actions[e]={}),Object.assign(o.actions[e],{value:t})};t.setActionOptionsFor=function(e,t){var n=(void 0===t?{}:t).closeModal,r=void 0===n||n;Object.assign(o.actions[e],{closeModal:r})},t.default=o},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(1),i=n(3),o=n(0),a=o.default.OVERLAY,s=o.default.SHOW_MODAL,u=o.default.BUTTON,c=o.default.BUTTON_LOADING,l=n(5);t.openModal=function(){r.getNode(a).classList.add(s),l.default.isOpen=!0};var f=function(){r.getNode(a).classList.remove(s),l.default.isOpen=!1};t.onAction=function(e){void 0===e&&(e=i.CANCEL_KEY);var t=l.default.actions[e],n=t.value;if(!1===t.closeModal){var o=u+"--"+e;r.getNode(o).classList.add(c)}else f();l.default.promise.resolve(n)},t.getState=function(){var e=Object.assign({},l.default);return delete e.promise,delete e.timer,e},t.stopLoading=function(){for(var e=document.querySelectorAll("."+u),t=0;t<e.length;t++)e[t].classList.remove(c)}},function(e,t){var n;n=function(){return this}();try{n=n||Function("return this")()||(0,eval)("this")}catch(e){"object"==typeof window&&(n=window)}e.exports=n},function(e,t,n){(function(t){e.exports=t.sweetAlert=n(9)}).call(t,n(7))},function(e,t,n){(function(t){e.exports=t.swal=n(10)}).call(t,n(7))},function(e,t,n){"undefined"!=typeof window&&n(11),n(16);var r=n(23).default;e.exports=r},function(e,t,n){var r=n(12);"string"==typeof r&&(r=[[e.i,r,""]]);var i={insertAt:"top",transform:void 0};n(14)(r,i),r.locals&&(e.exports=r.locals)},function(e,t,n){(e.exports=n(13)(void 0)).push([e
vendor: 10,673 bytes, line 2
2.i,'.swal-icon--error{border-color:#f27474;-webkit-animation:animateErrorIcon .5s;animation:animateErrorIcon .5s}.swal-icon--error__x-mark{position:relative;display:block;-webkit-animation:animateXMark .5s;animation:animateXMark .5s}.swal-icon--error__line{position:absolute;height:5px;width:47px;background-color:#f27474;display:block;top:37px;border-radius:2px}.swal-icon--error__line--left{-webkit-transform:rotate(45deg);transform:rotate(45deg);left:17px}.swal-icon--error__line--right{-webkit-transform:rotate(-45deg);transform:rotate(-45deg);right:16px}@-webkit-keyframes animateErrorIcon{0%{-webkit-transform:rotateX(100deg);transform:rotateX(100deg);opacity:0}to{-webkit-transform:rotateX(0deg);transform:rotateX(0deg);opacity:1}}@keyframes animateErrorIcon{0%{-webkit-transform:rotateX(100deg);transform:rotateX(100deg);opacity:0}to{-webkit-transform:rotateX(0deg);transform:rotateX(0deg);opacity:1}}@-webkit-keyframes animateXMark{0%{-webkit-transform:scale(.4);transform:scale(.4);margin-top:26px;opacity:0}50%{-webkit-transform:scale(.4);transform:scale(.4);margin-top:26px;opacity:0}80%{-webkit-transform:scale(1.15);transform:scale(1.15);margin-top:-6px}to{-webkit-transform:scale(1);transform:scale(1);margin-top:0;opacity:1}}@keyframes animateXMark{0%{-webkit-transform:scale(.4);transform:scale(.4);margin-top:26px;opacity:0}50%{-webkit-transform:scale(.4);transform:scale(.4);margin-top:26px;opacity:0}80%{-webkit-transform:scale(1.15);transform:scale(1.15);margin-top:-6px}to{-webkit-transform:scale(1);transform:scale(1);margin-top:0;opacity:1}}.swal-icon--warning{border-color:#f8bb86;-webkit-animation:pulseWarning .75s infinite alternate;animation:pulseWarning .75s infinite alternate}.swal-icon--warning__body{width:5px;height:47px;top:10px;border-radius:2px;margin-left:-2px}.swal-icon--warning__body,.swal-icon--warning__dot{position:absolute;left:50%;background-color:#f8bb86}.swal-icon--warning__dot{width:7px;height:7px;border-radius:50%;margin-left:-4px;bottom:-11px}@-webkit-keyframes pulseWarning{0%{border-color:#f8d486}to{border-color:#f8bb86}}@keyframes pulseWarning{0%{border-color:#f8d486}to{border-color:#f8bb86}}.swal-icon--success{border-color:#a5dc86}.swal-icon--success:after,.swal-icon--success:before{content:"";border-radius:50%;position:absolute;width:60px;height:120px;background:#fff;-webkit-transform:rotate(45deg);transform:rotate(45deg)}.swal-icon--success:before{border-radius:120px 0 0 120px;top:-7px;left:-33px;-webkit-transform:rotate(-45deg);transform:rotate(-45deg);-webkit-transform-origin:60px 60px;transform-origin:60px 60px}.swal-icon--success:after{border-radius:0 120px 120px 0;top:-11px;left:30px;-webkit-transform:rotate(-45deg);transform:rotate(-45deg);-webkit-transform-origin:0 60px;transform-origin:0 60px;-webkit-animation:rotatePlaceholder 4.25s ease-in;animation:rotatePlaceholder 4.25s ease-in}.swal-icon--success__ring{width:80px;height:80px;border:4px solid hsla(98,55%,69%,.2);border-radius:50%;box-sizing:content-box;position:absolute;left:-4px;top:-4px;z-index:2}.swal-icon--success__hide-corners{width:5px;height:90px;background-color:#fff;padding:1px;position:absolute;left:28px;top:8px;z-index:1;-webkit-transform:rotate(-45deg);transform:rotate(-45deg)}.swal-icon--success__line{height:5px;background-color:#a5dc86;display:block;border-radius:2px;position:absolute;z-index:2}.swal-icon--success__line--tip{width:25px;left:14px;top:46px;-webkit-transform:rotate(45deg);transform:rotate(45deg);-webkit-animation:animateSuccessTip .75s;animation:animateSuccessTip .75s}.swal-icon--success__line--long{width:47px;right:8px;top:38px;-webkit-transform:rotate(-45deg);transform:rotate(-45deg);-webkit-animation:animateSuccessLong .75s;animation:animateSuccessLong .75s}@-webkit-keyframes rotatePlaceholder{0%{-webkit-transform:rotate(-45deg);transform:rotate(-45deg)}5%{-webkit-transform:rotate(-45deg);transform:rotate(-45deg)}12%{-webkit-transform:rotate(-405deg);transform:rotate(-405deg)}to{-webkit-transform:rotate(-405deg);transform:rotate(-405deg)}}@keyframes rotatePlaceholder{0%{-webkit-transform:rotate(-45deg);transform:rotate(-45deg)}5%{-webkit-transform:rotate(-45deg);transform:rotate(-45deg)}12%{-webkit-transform:rotate(-405deg);transform:rotate(-405deg)}to{-webkit-transform:rotate(-405deg);transform:rotate(-405deg)}}@-webkit-keyframes animateSuccessTip{0%{width:0;left:1px;top:19px}54%{width:0;left:1px;top:19px}70%{width:50px;left:-8px;top:37px}84%{width:17px;left:21px;top:48px}to{width:25px;left:14px;top:45px}}@keyframes animateSuccessTip{0%{width:0;left:1px;top:19px}54%{width:0;left:1px;top:19px}70%{width:50px;left:-8px;top:37px}84%{width:17px;left:21px;top:48px}to{width:25px;left:14px;top:45px}}@-webkit-keyframes animateSuccessLong{0%{width:0;right:46px;top:54px}65%{width:0;right:46px;top:54px}84%{width:55px;right:0;top:35px}to{width:47px;right:8px;top:38px}}@keyframes animateSuccessLong{0%{width:0;right:46px;top:54px}65%{width:0;right:46px;top:54px}84%{width:55px;right:0;top:35px}to{width:47px;right:8px;top:38px}}.swal-icon--info{border-color:#c9dae1}.swal-icon--info:before{width:5px;height:29px;bottom:17px;border-radius:2px;margin-left:-2px}.swal-icon--info:after,.swal-icon--info:before{content:"";position:absolute;left:50%;background-color:#c9dae1}.swal-icon--info:after{width:7px;height:7px;border-radius:50%;margin-left:-3px;top:19px}.swal-icon{width:80px;height:80px;border-width:4px;border-style:solid;border-radius:50%;padding:0;position:relative;box-sizing:content-box;margin:20px auto}.swal-icon:first-child{margin-top:32px}.swal-icon--custom{width:auto;height:auto;max-width:100%;border:none;border-radius:0}.swal-icon img{max-width:100%;max-height:100%}.swal-title{color:rgba(0,0,0,.65);font-weight:600;text-transform:none;position:relative;display:block;padding:13px 16px;font-size:27px;line-height:normal;text-align:center;margin-bottom:0}.swal-title:first-child{margin-top:26px}.swal-title:not(:first-child){padding-bottom:0}.swal-title:not(:last-child){margin-bottom:13px}.swal-text{font-size:16px;position:relative;float:none;line-height:normal;vertical-align:top;text-align:left;display:inline-block;margin:0;padding:0 10px;font-weight:400;color:rgba(0,0,0,.64);max-width:calc(100% - 20px);overflow-wrap:break-word;box-sizing:border-box}.swal-text:first-child{margin-top:45px}.swal-text:last-child{margin-bottom:45px}.swal-footer{text-align:right;padding-top:13px;margin-top:13px;padding:13px 16px;border-radius:inherit;border-top-left-radius:0;border-top-right-radius:0}.swal-button-container{margin:5px;display:inline-block;position:relative}.swal-button{background-color:#7cd1f9;color:#fff;border:none;box-shadow:none;border-radius:5px;font-weight:600;font-size:14px;padding:10px 24px;margin:0;cursor:pointer}.swal-button:not([disabled]):hover{background-color:#78cbf2}.swal-button:active{background-color:#70bce0}.swal-button:focus{outline:none;box-shadow:0 0 0 1px #fff,0 0 0 3px rgba(43,114,165,.29)}.swal-button[disabled]{opacity:.5;cursor:default}.swal-button::-moz-focus-inner{border:0}.swal-button--cancel{color:#555;background-color:#efefef}.swal-button--cancel:not([disabled]):hover{background-color:#e8e8e8}.swal-button--cancel:active{background-color:#d7d7d7}.swal-button--cancel:focus{box-shadow:0 0 0 1px #fff,0 0 0 3px rgba(116,136,150,.29)}.swal-button--danger{background-color:#e64942}.swal-button--danger:not([disabled]):hover{background-color:#df4740}.swal-button--danger:active{background-color:#cf423b}.swal-button--danger:focus{box-shadow:0 0 0 1px #fff,0 0 0 3px rgba(165,43,43,.29)}.swal-content{padding:0 20px;margin-top:20px;font-size:medium}.swal-content:last-child{margin-bottom:20px}.swal-content__input,.swal-content__textarea{-webkit-appearance:none;background-color:#fff;border:none;font-size:14px;display:block;box-sizing:border-box;width:100%;border:1px solid rgba(0,0,0,.14);padding:10px 13px;border-radius:2px;transition:border-color .2s}.swal-content__input:focus,.swal-content__textarea:focus{outline:none;border-color:#6db8ff}.swal-content__textarea{resize:vertical}.swal-button--loading{color:transparent}.swal-button--loading~.swal-button__loader{opacity:1}.swal-button__loader{position:absolute;height:auto;width:43px;z-index:2;left:50%;top:50%;-webkit-transform:translateX(-50%) translateY(-50%);transform:translateX(-50%) translateY(-50%);text-align:center;pointer-events:none;opacity:0}.swal-button__loader div{display:inline-block;float:none;vertical-align:baseline;width:9px;height:9px;padding:0;border:none;margin:2px;opacity:.4;border-radius:7px;background-color:hsla(0,0%,100%,.9);transition:background .2s;-webkit-animation:swal-loading-anim 1s infinite;animation:swal-loading-anim 1s infinite}.swal-button__loader div:nth-child(3n+2){-webkit-animation-delay:.15s;animation-delay:.15s}.swal-button__loader div:nth-child(3n+3){-webkit-animation-delay:.3s;animation-delay:.3s}@-webkit-keyframes swal-loading-anim{0%{opacity:.4}20%{opacity:.4}50%{opacity:1}to{opacity:.4}}@keyframes swal-loading-anim{0%{opacity:.4}20%{opacity:.4}50%{opacity:1}to{opacity:.4}}.swal-overlay{position:fixed;top:0;bottom:0;left:0;right:0;text-align:center;font-size:0;overflow-y:auto;background-color:rgba(0,0,0,.4);z-index:10000;pointer-events:none;opacity:0;transition:opacity .3s}.swal-overlay:before{content:" ";display:inline-block;vertical-align:middle;height:100%}.swal-overlay--show-modal{opacity:1;pointer-events:auto}.swal-overlay--show-modal .swal-modal{opacity:1;pointer-events:auto;box-sizing:border-box;-webkit-animation:showSweetAlert .3s;animation:showSweetAlert .3s;will-change:transform}.swal-modal{width:478px;opacity:0;pointer-events:none;background-color:#fff;text-align:center;border-radius:5px;position:static;margin:20px auto;display:inline-block;vertical-align:middle;-webkit-transform:scale(1);transform:scale(1);-webkit-transform-origin:50% 50%;transform-origin:50% 50%;z-index:10001;transition:opacity .2s,-webkit-transform .3s;transition:transform .3s,opacity .2s;transition:transform .3s,opacity .2s,-webkit-transform .3s}@media (max-width:500px){.swal-modal{width:calc(100% - 20px)}}@-webkit-keyframes showSweetAlert{0%{-webkit-transform:scale(1);transform:scale(1)}1%{-webkit-transform:scale(.5);transform:scale(.5)}45%{-webkit-transform:scale(1.05);transform:scale(1.05)}80%{-webkit-transform:scale(.95);transform:scale(.95)}to{-webkit-transform:scale(1);transform:scale(1)}}@keyframes showSweetAlert{0%{-webkit-transform:scale(1);transform:scale(1)}1%{-webkit-transform:scale(.5);transform:scale(.5)}45%{-webkit-transform:scale(1.05);transform:scale(1.05)}80%{-webkit-transform:scale(.95);transform:scale(.95)}to{-webkit-transform:scale(1);transform:scale(1)}}',""])},function(
2e,t){function n(e,t){var n=e[1]||"",i=e[3];
vendor: 13,848 bytes, line 2
2if(!i)return n;if(t&&"function"==typeof btoa){var o=r(i);return[n].concat(i.sources.map((function(e){return"/*# sourceURL="+i.sourceRoot+e+" */"}))).concat([o]).join("\n")}return[n].join("\n")}function r(e){return"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(e))))+" */"}e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var r=n(t,e);return t[2]?"@media "+t[2]+"{"+r+"}":r})).join("")},t.i=function(e,n){"string"==typeof e&&(e=[[null,e,""]]);for(var r={},i=0;i<this.length;i++){var o=this[i][0];"number"==typeof o&&(r[o]=!0)}for(i=0;i<e.length;i++){var a=e[i];"number"==typeof a[0]&&r[a[0]]||(n&&!a[2]?a[2]=n:n&&(a[2]="("+a[2]+") and ("+n+")"),t.push(a))}},t}},function(e,t,n){function r(e,t){for(var n=0;n<e.length;n++){var r=e[n],i=p[r.id];if(i){i.refs++;for(var o=0;o<i.parts.length;o++)i.parts[o](r.parts[o]);for(;o<r.parts.length;o++)i.parts.push(l(r.parts[o],t))}else{var a=[];for(o=0;o<r.parts.length;o++)a.push(l(r.parts[o],t));p[r.id]={id:r.id,refs:1,parts:a}}}}function i(e,t){for(var n=[],r={},i=0;i<e.length;i++){var o=e[i],a=t.base?o[0]+t.base:o[0],s={css:o[1],media:o[2],sourceMap:o[3]};r[a]?r[a].parts.push(s):n.push(r[a]={id:a,parts:[s]})}return n}function o(e,t){var n=y(e.insertInto);if(!n)throw new Error("Couldn't find a style target. This probably means that the value for the 'insertInto' parameter is invalid.");var r=b[b.length-1];if("top"===e.insertAt)r?r.nextSibling?n.insertBefore(t,r.nextSibling):n.appendChild(t):n.insertBefore(t,n.firstChild),b.push(t);else{if("bottom"!==e.insertAt)throw new Error("Invalid value for parameter 'insertAt'. Must be 'top' or 'bottom'.");n.appendChild(t)}}function a(e){if(null===e.parentNode)return!1;e.parentNode.removeChild(e);var t=b.indexOf(e);t>=0&&b.splice(t,1)}function s(e){var t=document.createElement("style");return e.attrs.type="text/css",c(t,e.attrs),o(e,t),t}function u(e){var t=document.createElement("link");return e.attrs.type="text/css",e.attrs.rel="stylesheet",c(t,e.attrs),o(e,t),t}function c(e,t){Object.keys(t).forEach((function(n){e.setAttribute(n,t[n])}))}function l(e,t){var n,r,i,o;if(t.transform&&e.css){if(!(o=t.transform(e.css)))return function(){};e.css=o}if(t.singleton){var c=g++;n=m||(m=s(t)),r=f.bind(null,n,c,!1),i=f.bind(null,n,c,!0)}else e.sourceMap&&"function"==typeof URL&&"function"==typeof URL.createObjectURL&&"function"==typeof URL.revokeObjectURL&&"function"==typeof Blob&&"function"==typeof btoa?(n=u(t),r=d.bind(null,n,t),i=function(){a(n),n.href&&URL.revokeObjectURL(n.href)}):(n=s(t),r=h.bind(null,n),i=function(){a(n)});return r(e),function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap)return;r(e=t)}else i()}}function f(e,t,n,r){var i=n?"":r.css;if(e.styleSheet)e.styleSheet.cssText=w(t,i);else{var o=document.createTextNode(i),a=e.childNodes;a[t]&&e.removeChild(a[t]),a.length?e.insertBefore(o,a[t]):e.appendChild(o)}}function h(e,t){var n=t.css,r=t.media;if(r&&e.setAttribute("media",r),e.styleSheet)e.styleSheet.cssText=n;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(n))}}function d(e,t,n){var r=n.css,i=n.sourceMap,o=void 0===t.convertToAbsoluteUrls&&i;(t.convertToAbsoluteUrls||o)&&(r=_(r)),i&&(r+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(i))))+" */");var a=new Blob([r],{type:"text/css"}),s=e.href;e.href=URL.createObjectURL(a),s&&URL.revokeObjectURL(s)}var p={},v=function(e){var t;return function(){return void 0===t&&(t=e.apply(this,arguments)),t}}((function(){return window&&document&&document.all&&!window.atob})),y=function(e){var t={};return function(n){return void 0===t[n]&&(t[n]=e.call(this,n)),t[n]}}((function(e){return document.querySelector(e)})),m=null,g=0,b=[],_=n(15);e.exports=function(e,t){if("undefined"!=typeof DEBUG&&DEBUG&&"object"!=typeof document)throw new Error("The style-loader cannot be used in a non-browser environment");(t=t||{}).attrs="object"==typeof t.attrs?t.attrs:{},t.singleton||(t.singleton=v()),t.insertInto||(t.insertInto="head"),t.insertAt||(t.insertAt="bottom");var n=i(e,t);return r(n,t),function(e){for(var o=[],a=0;a<n.length;a++){var s=n[a];(u=p[s.id]).refs--,o.push(u)}for(e&&r(i(e,t),t),a=0;a<o.length;a++){var u;if(0===(u=o[a]).refs){for(var c=0;c<u.parts.length;c++)u.parts[c]();delete p[u.id]}}}};var w=function(){var e=[];return function(t,n){return e[t]=n,e.filter(Boolean).join("\n")}}()},function(e,t){e.exports=function(e){var t="undefined"!=typeof window&&window.location;if(!t)throw new Error("fixUrls requires window.location");if(!e||"string"!=typeof e)return e;var n=t.protocol+"//"+t.host,r=n+t.pathname.replace(/\/[^\/]*$/,"/");return e.replace(/url\s*\(((?:[^)(]|\((?:[^)(]+|\([^)(]*\))*\))*)\)/gi,(function(e,t){var i,o=t.trim().replace(/^"(.*)"$/,(function(e,t){return t})).replace(/^'(.*)'$/,(function(e,t){return t}));return/^(#|data:|http:\/\/|https:\/\/|file:\/\/\/)/i.test(o)?e:(i=0===o.indexOf("//")?o:0===o.indexOf("/")?n+o:r+o.replace(/^\.\//,""),"url("+JSON.stringify(i)+")")}))}},function(e,t,n){var r=n(17);"undefined"==typeof window||window.Promise||(window.Promise=r),n(21),String.prototype.includes||(String.prototype.includes=function(e,t){"use strict";return"number"!=typeof t&&(t=0),!(t+e.length>this.length)&&-1!==this.indexOf(e,t)}),Array.prototype.includes||Object.defineProperty(Array.prototype,"includes",{value:function(e,t){if(null==this)throw new TypeError('"this" is null or not defined');var n=Object(this),r=n.length>>>0;if(0===r)return!1;for(var i=0|t,o=Math.max(i>=0?i:r-Math.abs(i),0);o<r;){if(function(e,t){return e===t||"number"==typeof e&&"number"==typeof t&&isNaN(e)&&isNaN(t)}(n[o],e))return!0;o++}return!1}}),"undefined"!=typeof window&&[Element.prototype,CharacterData.prototype,DocumentType.prototype].forEach((function(e){e.hasOwnProperty("remove")||Object.defineProperty(e,"remove",{configurable:!0,enumerable:!0,writable:!0,value:function(){this.parentNode.removeChild(this)}})}))},function(e,t,n){(function(t){!function(n){function r(){}function i(e,t){return function(){e.apply(t,arguments)}}function o(e){if("object"!=typeof this)throw new TypeError("Promises must be constructed via new");if("function"!=typeof e)throw new TypeError("not a function");this._state=0,this._handled=!1,this._value=void 0,this._deferreds=[],f(e,this)}function a(e,t){for(;3===e._state;)e=e._value;0!==e._state?(e._handled=!0,o._immediateFn((function(){var n=1===e._state?t.onFulfilled:t.onRejected;if(null!==n){var r;try{r=n(e._value)}catch(e){return void u(t.promise,e)}s(t.promise,r)}else(1===e._state?s:u)(t.promise,e._value)}))):e._deferreds.push(t)}function s(e,t){try{if(t===e)throw new TypeError("A promise cannot be resolved with itself.");if(t&&("object"==typeof t||"function"==typeof t)){var n=t.then;if(t instanceof o)return e._state=3,e._value=t,void c(e);if("function"==typeof n)return void f(i(n,t),e)}e._state=1,e._value=t,c(e)}catch(t){u(e,t)}}function u(e,t){e._state=2,e._value=t,c(e)}function c(e){2===e._state&&0===e._deferreds.length&&o._immediateFn((function(){e._handled||o._unhandledRejectionFn(e._value)}));for(var t=0,n=e._deferreds.length;t<n;t++)a(e,e._deferreds[t]);e._deferreds=null}function l(e,t,n){this.onFulfilled="function"==typeof e?e:null,this.onRejected="function"==typeof t?t:null,this.promise=n}function f(e,t){var n=!1;try{e((function(e){n||(n=!0,s(t,e))}),(function(e){n||(n=!0,u(t,e))}))}catch(e){if(n)return;n=!0,u(t,e)}}var h=setTimeout;o.prototype.catch=function(e){return this.then(null,e)},o.prototype.then=function(e,t){var n=new this.constructor(r);return a(this,new l(e,t,n)),n},o.all=function(e){var t=Array.prototype.slice.call(e);return new o((function(e,n){function r(o,a){try{if(a&&("object"==typeof a||"function"==typeof a)){var s=a.then;if("function"==typeof s)return void s.call(a,(function(e){r(o,e)}),n)}t[o]=a,0==--i&&e(t)}catch(e){n(e)}}if(0===t.length)return e([]);for(var i=t.length,o=0;o<t.length;o++)r(o,t[o])}))},o.resolve=function(e){return e&&"object"==typeof e&&e.constructor===o?e:new o((function(t){t(e)}))},o.reject=function(e){return new o((function(t,n){n(e)}))},o.race=function(e){return new o((function(t,n){for(var r=0,i=e.length;r<i;r++)e[r].then(t,n)}))},o._immediateFn="function"==typeof t&&function(e){t(e)}||function(e){h(e,0)},o._unhandledRejectionFn=function(e){"undefined"!=typeof console&&console&&console.warn("Possible Unhandled Promise Rejection:",e)},o._setImmediateFn=function(e){o._immediateFn=e},o._setUnhandledRejectionFn=function(e){o._unhandledRejectionFn=e},void 0!==e&&e.exports?e.exports=o:n.Promise||(n.Promise=o)}(this)}).call(t,n(18).setImmediate)},function(e,r,i){function o(e,t){this._id=e,this._clearFn=t}var a=Function.prototype.apply;r.setTimeout=function(){return new o(a.call(setTimeout,window,arguments),clearTimeout)},r.setInterval=function(){return new o(a.call(setInterval,window,arguments),clearInterval)},r.clearTimeout=r.clearInterval=function(e){e&&e.close()},o.prototype.unref=o.prototype.ref=function(){},o.prototype.close=function(){this._clearFn.call(window,this._id)},r.enroll=function(e,t){clearTimeout(e._idleTimeoutId),e._idleTimeout=t},r.unenroll=function(e){clearTimeout(e._idleTimeoutId),e._idleTimeout=-1},r._unrefActive=r.active=function(e){clearTimeout(e._idleTimeoutId);var t=e._idleTimeout;t>=0&&(e._idleTimeoutId=setTimeout((function(){e._onTimeout&&e._onTimeout()}),t))},i(19),r.setImmediate=t,r.clearImmediate=n},function(e,t,n){(function(e,t){!function(e,n){"use strict";function r(e){"function"!=typeof e&&(e=new Function(""+e));for(var t=new Array(arguments.length-1),n=0;n<t.length;n++)t[n]=arguments[n+1];var r={callback:e,args:t};return c[u]=r,s(u),u++}function i(e){delete c[e]}function o(e){var t=e.callback,r=e.args;switch(r.length){case 0:t();break;case 1:t(r[0]);break;case 2:t(r[0],r[1]);break;case 3:t(r[0],r[1],r[2]);break;default:t.apply(n,r)}}function a(e){if(l)setTimeout(a,0,e);else{var t=c[e];if(t){l=!0;try{o(t)}finally{i(e),l=!1}}}}if(!e.setImmediate){var s,u=1,c={},l=!1,f=e.document,h=Object.getPrototypeOf&&Object.getPrototypeOf(e);h=h&&h.setTimeout?h:e,"[object process]"==={}.toString.call(e.process)?s=function(e){t.nextTick((function(){a(e)}))}:function(){if(e.postMessage&&!e.importScripts){var t=!0,n=e.onmessage;return e.onmessage=function(){t=!1},e.postMessage("","*"),e.onmessage=n,t}}()?function(){var t="setImmediate$"+Math.random()+"$",n=function(n){n.source===e&&"string"==typeof n.data&&0===n.data.indexOf(t)&&a(+n.data.slice(t.length))};e.addEventListener?e.addEventListener("message",n,!1):e.attachEvent("onmessage",n),s=function(n){e.postMessage(t+n,"*")}}():e.MessageChannel?function(){var e=new MessageChannel;e.port1.onmessage=function(e){a(e.data)},s=function(t){e.port2.postMessage(t)}}():f&&"onreadystatechange"in f.createElement("script")?function(){var e=f.documentElement;s=function(t){var n=f.createElement("script");n.onreadystatechange=function(){a(t),n.onreadystatechange=null,e.removeChild(n),n=null},e.appendChild(n)}}():s=function(e){setTimeout(a,0,e)},h.setImmediate=r,h.clearImmediate=i}}("undefined"==typeof self?void 0===e?this:e:self)}).call(t,n(7),n(20))},function(e,t){function n(){throw new Error("setTimeout has not been defined")}function r(){throw new Error("clearTimeout has not been defined")}function i(e){if(l===setTimeout)return setTimeout(e,0);if((l===n||!l)&&setTimeout)return l=setTimeout,setTimeout(e,0);try{return l(e,0)}catch(t){try{return l.call(null,e,0)}catch(t){return l.call(this,e,0)}}}function o(e){if(f===clearTimeout)return clearTimeout(e);if((f===r||!f)&&clearTimeout)return f=clearTimeout,clearTimeout(e);try{return f(e)}catch(t){try{return f.call(null,e)}catch(t){return f.call(this,e)}}}function a(){v&&d&&(v=!1,d.length?p=d.concat(p):y=-1,p.length&&s())}function s(){if(!v){var e=i(a);v=!0;for(var t=p.length;t;){for(d=p,p=[];++y<t;)d&&d[y].run();y=-1,t=p.length}d=null,v=!1,o(e)}}function u(e,t){this.fun=e,this.array=t}function c(){}var l,f,h=e.exports={};!function(){try{l="function"==typeof setTimeout?setTimeout:n}catch(e){l=n}try{f="function"==typeof clearTimeout?clearTimeout:r}catch(e){f=r}}();var d,p=[],v=!1,y=-1;h.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];p.push(new u(e,t)),1!==p.length||v||i(s)},u.prototype.run=function(){this.fun.apply(null,this.array)},h.title="browser",h.browser=!0,h.env={},h.argv=[],h.version="",h.versions={},h.on=c,h.addListener=c,h.once=c,h.off=c,h.removeListener=c,h.removeAllListeners=c,h.emit=c,h.prependListener=c,h.prependOnceListener=c,h.listeners=function(e){return[]},h.binding=function(e){throw new Error("process.binding is not supported")},h.cwd=function(){return"/"},h.chdir=function(e){throw new Error("process.chdir is not supported")},h.umask=function(){return 0}},function(e,t,n){"use strict";n(22).polyfill()},function(e,t,n){"use strict";function r(e,t){if(void 0===e||null===e)throw new TypeError("Cannot convert first argument to object");for(var n=Object(e),r=1;r<arguments.length;r++){var i=arguments[r];if(void 0!==i&&null!==i)for(var o=Object.keys(Object(i)),a=0,s=o.length;a<s;a++){var u=o[a],c=Object.getOwnPropertyDescriptor(i,u);void 0!==c&&c.enumerable&&(n[u]=i[u])}}return n}function i(){Object.assign||Object.defineProperty(Object,"assign",{enumerable:!1,configurable:!0,writable:!0,value:r})}e.exports={assign:r,polyfill:i}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(24),i=n(6),o=n(5),a=n(36),s=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];if("undefined"!=typeof window){var n=a.getOpts.apply(void 0,e);return new Promise((function(e,t){o.default.promise={resolve:e,reject:t},r.default(n),setTimeout((function(){i.openModal()}))}))}};
2s.close=i.onAction,s.getState=i.getState,s.setActionValue=o.setActionValue,s.stopLoading=i.stopLoading,s.setDefaults=a.setDefaults,t.default=s},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(1),i=n(0).default.MODAL,o=n(4),a=n(34),s=n(35),u=n(1);t.init=function(e){r.getNode(i)||(document.body||u.throwErr("You can only use SweetAlert AFTER the DOM has loaded!"),a.default(),o.default()),o.initModalContent(e),s.default(e)},t.default=t.init},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(0).default.MODAL;t.modalMarkup='\n <div class="'+r+'" role="dialog" aria-modal="true"></div>',t.default=t.modalMarkup},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r='<div \n class="'+n(0).default.OVERLAY+'"\n tabIndex="-1">\n </div>';t.default=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(0).default.ICON;t.errorIconMarkup=function(){var e=r+"--error",t=e+"__line";return'\n <div class="'+e+'__x-mark">
2\n <span class="'+t+" "+t+'--left"></span>\n <span class="'+t+" "+t+'--right"></span>\n </div>\n '},t.warningIconMarkup=function(){var e=r+"--warning";return'\n <span class="'+e+'__body">\n <span class="'+e+'__dot"></span>\n </span>\n '},t.successIconMarkup=function(){var e=r+"--success";return'\n <span class="'+e+"__line "+e+'__line--long"></span>\n <span class="'+e+"__line "+e+'__line--tip"></span>\n\n <div class="'+e+'__ring"></div>\n <div class="'+e+'__hide-corners"></div>\n '}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(0).default.CONTENT;t.contentMarkup='\n <div class="'+r+'">\n\n </div>\n'},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(0),i=r.default.BUTTON_CONTAINER,o=r.default.BUTTON,a=r.default.BUTTON_LOADER;t.buttonMarkup='\n <div class="'+i+'">\n\n <button\n class="'+o+'"\n ></button>\n\n <div class="'+a+'">\n <div></div>\n <div></div>\n <div></div>\n </div>\n\n </div>\n'},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(4),i=n(2),o=n(0),a=o.default.ICON,s=o.default.ICON_CUSTOM,u=["error","warning","success","info"],c={error:i.errorIconMarkup(),warning:i.warningIconMarkup(),success:i.successIconMarkup()},l=function(e,t){var n=a+"--"+e;t.classList.add(n);var r=c[e];r&&(t.innerHTML=r)},f=function(e,t){t.classList.add(s);var n=document.createElement("img");n.src=e,t.appendChild(n)},h=function(e){if(e){var t=r.injectElIntoModal(i.iconMarkup);u.includes(e)?l(e,t):f(e,t)}};t.default=h},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(2),i=n(4),o=function(e){navigator.userAgent.includes("AppleWebKit")&&(e.style.display="none",e.offsetHeight,e.style.display="")};t.initTitle=function(e){if(e){var t=i.injectElIntoModal(r.titleMarkup);t.textContent=e,o(t)}},t.initText=function(e){if(e){var t=document.createDocumentFragment();e.split("\n").forEach((function(e,n,r){t.appendChild(document.createTextNode(e)),n<r.length-1&&t.appendChild(document.createElement("br"))}));var n=i.injectElIntoModal(r.textMarkup);n.appendChild(t),o(n)}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(1),i=n(4),o=n(0),a=o.default.BUTTON,s=o.default.DANGER_BUTTON,u=n(3),c=n(2),l=n(6),f=n(5),h=function(e,t,n){var i=t.text,o=t.value,h=t.className,d=t.closeModal,p=r.stringToNode(c.buttonMarkup),v=p.querySelector("."+a),y=a+"--"+e;v.classList.add(y),h&&(Array.isArray(h)?h:h.split(" ")).filter((function(e){return e.length>0})).forEach((function(e){v.classList.add(e)})),n&&e===u.CONFIRM_KEY&&v.classList.add(s),v.textContent=i;var m={};return m[e]=o,f.setActionValue(m),f.setActionOptionsFor(e,{closeModal:d}),v.addEventListener("click",(function(){return l.onAction(e)})),p},d=function(e,t){var n=i.injectElIntoModal(c.footerMarkup);for(var r in e){var o=e[r],a=h(r,o,t);o.visible&&n.appendChild(a)}0===n.children.length&&n.remove()};t.default=d},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(3),i=n(4),o=n(2),a=n(5),s=n(6),u=n(0).default.CONTENT,c=function(e){e.addEventListener("input",(function(e){var t=e.target.value;a.setActionValue(t)})),e.addEventListener("keyup",(function(e){if("Enter"===e.key)return s.onAction(r.CONFIRM_KEY)})),setTimeout((function(){e.focus(),a.setActionValue("")}),0)},l=function(e,t,n){var r=document.createElement(t),i=u+"__"+t;for(var o in r.classList.add(i),n){var a=n[o];r[o]=a}"input"===t&&c(r),e.appendChild(r)},f=function(e){if(e){var t=i.injectElIntoModal(o.contentMarkup),n=e.element,r=e.attributes;"string"==typeof n?l(t,n,r):t.appendChild(n)}};t.default=f},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(1),i=n(2),o=function(){var e=r.stringToNode(i.overlayMarkup);document.body.appendChild(e)};t.default=o},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(5),i=n(6),o=n(1),a=n(3),s=n(0),u=s.default.MODAL,c=s.default.BUTTON,l=s.default.OVERLAY,f=function(e){e.preventDefault(),y()},h=function(e){e.preventDefault(),m()},d=function(e){if(r.default.isOpen)switch(e.key){case"Escape":return i.onAction(a.CANCEL_KEY)}},p=function(e){if(r.default.isOpen)switch(e.key){case"Tab":return f(e)}},v=function(e){if(r.default.isOpen)return"Tab"===e.key&&e.shiftKey?h(e):void 0},y=function(){var e=o.getNode(c);e&&(e.tabIndex=0,e.focus())},m=function(){var e=o.getNode(u).querySelectorAll("."+c),t=e[e.length-1];t&&t.focus()},g=function(e){e[e.length-1].addEventListener("keydown",p)},b=function(e){e[0].addEventListener("keydown",v)},_=function(){var e=o.getNode(u).querySelectorAll("."+c);e.length&&(g(e),b(e))},w=function(e){if(o.getNode(l)===e.target)return i.onAction(a.CANCEL_KEY)},k=function(e){var t=o.getNode(l);t.removeEventListener("click",w),e&&t.addEventListener("click",w)},S=function(e){r.default.timer&&clearTimeout(r.default.timer),e&&(r.default.timer=window.setTimeout((function(){return i.onAction(a.CANCEL_KEY)}),e))},O=function(e){e.closeOnEsc?document.addEventListener("keyup",d):document.removeEventListener("keyup",d),e.dangerMode?y():m(),_(),k(e.closeOnClickOutside),S(e.timer)};t.default=O},function(e,t,n){"use strict";
2Object.defineProperty(t,"__esModule",{value:!0});var r=n(1),i=n(3),o=n(37),a=n(38),s={title:null,text:null,icon:null,buttons:i.defaultButtonList,content:null,className:null,closeOnClickOutside:!0,closeOnEsc:!0,dangerMode:!1,timer:null},u=Object.assign({},s);t.setDefaults=function(e){u=Object.assign({},s,e)};var c=function(e){var t=e&&e.button,n=e&&e.buttons;return void 0!==t&&void 0!==n&&r.throwErr("Cannot set both 'button' and 'buttons' options!"),void 0!==t?{confirm:t}:n},l=function(e){return r.ordinalSuffixOf(e+1)},f=function(e,t){r.throwErr(l(t)+" argument ('"+e+"') is invalid")},h=function(e,t){var n=e+1,i=t[n];r.isPlainObject(i)||void 0===i||r.throwErr("Expected "+l(n)+" argument ('"+i+"') to be a plain object")},d=function(e,t){var n=e+1,i=t[n];void 0!==i&&r.throwErr("Unexpected "+l(n)+" argument ("+i+")")},p=function(e,t,n,i){var o=t instanceof Element;if("string"===typeof t){if(0===n)return{text:t};if(1===n)return{text:t,title:i[0]};if(2===n)return h(n,i),{icon:t};f(t,n)}else{if(o&&0===n)return h(n,i),{content:t};if(r.isPlainObject(t))return d(n,i),t;f(t,n)}};t.getOpts=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n={};e.forEach((function(t,r){var i=p(0,t,r,e);Object.assign(n,i)}));var r=c(n);n.buttons=i.getButtonListOpts(r),delete n.button,n.content=o.getContentOpts(n.content);var l=Object.assign({},s,u,n);return Object.keys(l).forEach((function(e){a.DEPRECATED_OPTS[e]&&a.logDeprecation(e)})),l}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(1),i={element:"input",attributes:{placeholder:""}};t.getContentOpts=function(e){var t={};return r.isPlainObject(e)?Object.assign(t,e):e instanceof Element?{element:e}:"input"===e?i:null}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.logDeprecation=function(e){var n=t.DEPRECATED_OPTS[e],r=n.onlyRename,i=n.replacement,o=n.subOption,a=n.link,s='SweetAlert warning: "'+e+'" option has been '+(r?"renamed":"deprecated")+".";i&&(s+=" Please use"+(o?' "'+o+'" in ':" ")+'"'+i+'" instead.');var u="https://sweetalert.js.org";s+=a?" More details: "+u+a:" More details: "+u+"/guides/#upgrading-from-1x",console.warn(s)},t.DEPRECATED_OPTS={type:{replacement:"icon",link:"/docs/#icon"},imageUrl:{replacement:"icon",link:"/docs/#icon"},customClass:{replacement:"className",onlyRename:!0,link:"/docs/#classname"},imageSize:{},showCancelButton:{replacement:"buttons",link:"/docs/#buttons"},showConfirmButton:{replacement:"button",link:"/docs/#button"},confirmButtonText:{replacement:"button",link:"/docs/#button"},confirmButtonColor:{},cancelButtonText:{replacement:"buttons",link:"/docs/#buttons"},closeOnConfirm:{replacement:"button",subOption:"closeModal",link:"/docs/#button"},closeOnCancel:{replacement:"buttons",subOption:"closeModal",link:"/docs/#buttons"},showLoaderOnConfirm:{replacement:"buttons"},animation:{},inputType:{replacement:"content",link:"/docs/#content"},inputValue:{replacement:"content",link:"/docs/#content"},inputPlaceholder:{replacement:"content",link:"/docs/#content"},html:{replacement:"content",link:"/docs/#content"},allowEscapeKey:{replacement:"closeOnEsc",onlyRename:!0,link:"/docs/#closeonesc"},allowClickOutside:{replacement:"closeOnClickOutside",onlyRename:!0,link:"/docs/#closeonclickoutside"}}}])}).call(this,n(175).setImmediate,n(175).clearImmediate)},function(e,t,n){"use strict";n.d(t,"a",(function(){return o})),n.d(t,"b",(function(){return u})),n.d(t,"c",(function(){return s}));var r=n(2),i=n(3),o=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="[DEFAULT]",s=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=a);var t=this.normalizeInstanceIdentifier(e);if(!this.instancesDeferred.has(t)){var n=new i.a;this.instancesDeferred.set(t,n);try{var r=this.getOrInitializeService(t);r&&n.resolve(r)}catch(o){}}return this.instancesDeferred.get(t).promise},e.prototype.getImmediate=function(e){var t=Object(r.a)({identifier:a,optional:!1},e),n=t.identifier,i=t.optional,o=this.normalizeInstanceIdentifier(n);try{var s=this.getOrInitializeService(o);if(!s){if(i)return null;throw Error("Service "+this.name+" is not available")}return s}catch(u){if(i)return null;throw u}},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");
2if(this.component=e,function(e){return"EAGER"===e.instantiationMode}(e))try{this.getOrInitializeService(a)}catch(h){}try{for(var i=Object(r.h)(this.instancesDeferred.entries()),o=i.next();!o.done;o=i.next()){var s=Object(r.e)(o.value,2),u=s[0],c=s[1],l=this.normalizeInstanceIdentifier(u);try{var f=this.getOrInitializeService(l);c.resolve(f)}catch(h){}}}catch(d){t={error:d}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(t)throw t.error}}},e.prototype.clearInstance=function(e){void 0===e&&(e=a),this.instancesDeferred.delete(e),this.instances.delete(e)},e.prototype.delete=function(){return Object(r.b)(this,void 0,void 0,(function(){var e;return Object(r.d)(this,(function(t){switch(t.label){case 0:return e=Array.from(this.instances.values()),[4,Promise.all(Object(r.f)(e.filter((function(e){return"INTERNAL"in e})).map((function(e){return e.INTERNAL.delete()})),e.filter((function(e){return"_delete"in e})).map((function(e){return e._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 e===a?void 0:e}(e)),this.instances.set(e,t)),t||null},e.prototype.normalizeInstanceIdentifier=function(e){return this.component?this.component.multipleInstances?e:a:e},e}();var u=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 s(e,this);return this.providers.set(e,t),t},e.prototype.getProviders=function(){return Array.from(this.providers.values())},e}()},function(e,t,n){"use strict";var r=n(11);n.d(t,"a",(function(){return r.a}));r.a.registerVersion("firebase","8.0.0","app")},function(e,t,n){"use strict";e.exports.DEFAULT_ENVIRONMENT="prod",e.exports.DEFAULT_REALM="us1",e.exports.DEFAULT_REGION="gll",e.exports.DEFAULT_LOG_LEVEL="warn",e.exports.DEFAULT_LOGGER_NAME="twilio-video",e.exports.WS_SERVER=function(e,t){return t="gll"===t?"global":encodeURIComponent(t),"prod"===e?"wss://"+t+".vss.twilio.com/signaling":"wss://"+t+".vss."+e+".twilio.com/signaling"},e.exports.PUBLISH_MAX_ATTEMPTS=5,e.exports.PUBLISH_BACKOFF_JITTER=10,e.exports.PUBLISH_BACKOFF_MS=20,e.exports.typeErrors={ILLEGAL_INVOKE:function(e,t){return new TypeError("Illegal call to "+e+": "+t)},INVALID_TYPE:function(e,t){return new TypeError(e+" must be "+((["a","e","i","o","u"].includes(t.toLowerCase()[0])?"an":"a")+" ")+t)},INVALID_VALUE:function(e,t){return new RangeError(e+" must be one of "+t.join(", "))},REQUIRED_ARGUMENT:function(e){return new TypeError(e+" must be specified")}},e.exports.DEFAULT_ICE_GATHERING_TIMEOUT_MS=15e3,e.exports.DEFAULT_SESSION_TIMEOUT_SEC=30,e.exports.DEFAULT_NQ_LEVEL_LOCAL=1,e.exports.DEFAULT_NQ_LEVEL_REMOTE=0,e.exports.MAX_NQ_LEVEL=3,e.exports.ICE_ACTIVITY_CHECK_PERIOD_MS=1e3,e.exports.ICE_INACTIVITY_THRESHOLD_MS=3e3,e.exports.iceRestartBackoffConfig={factor:1.1,initialDelay:1,maxDelay:1e3*e.exports.DEFAULT_SESSION_TIMEOUT_SEC,randomisationFactor:.5},e.exports.reconnectBackoffConfig={factor:1.5,initialDelay:80,randomisationFactor:.5},e.exports.subscriptionMode={MODE_COLLABORATION:"collaboration",MODE_GRID:"grid",MODE_PRESENTATION:"presentation"},e.exports.trackSwitchOffMode={MODE_DISABLED:"disabled",MODE_DETECTED:"detected",MODE_PREDICTED:"predicted"},e.exports.trackPriority={PRIORITY_HIGH:"high",PRIORITY_LOW:"low",PRIORITY_STANDARD:"standard"}},function(e,t,n){var r=n(39),i=n(25),o=n(65),a=n(70),s=n(79),u=function e(t,n,u){var c,l,f,h=t&e.F,d=t&e.G,p=t&e.S,v=t&e.P,y=t&e.B,m=t&e.W,g=d?i:i[n]||(i[n]={}),b=g.prototype,_=d?r:p?r[n]:(r[n]||{}).prototype;for(c in d&&(u=n),u)(l=!h&&_&&void 0!==_[c])&&s(g,c)||(f=l?_[c]:u[c],g[c]=d&&"function"!=typeof _[c]?u[c]:y&&l?o(f,r):m&&_[c]==f?function(e){var t=function(t,n,r){if(this instanceof e){switch(arguments.length){case 0:return new e;case 1:return new e(t);case 2:return new e(t,n)}return new e(t,n,r)}return e.apply(this,arguments)};return t.prototype=e.prototype,t}(f):v&&"function"==typeof f?o(Function.call,f):f,v&&((g.virtual||(g.virtual={}
2))[c]=f,t&e.R&&b&&!b[c]&&a(b,c,f)))};u.F=1,u.G=2,u.S=4,u.P=8,u.B=16,u.W=32,u.U=64,u.R=128,e.exports=u},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),i=0;for(t=0;t<n;t++)for(var o=arguments[t],a=0,s=o.length;a<s;a++,i++)r[i]=o[a];return r}var i;n.d(t,"a",(function(){return o})),n.d(t,"b",(function(){return f})),n.d(t,"c",(function(){return h})),n.d(t,"d",(function(){return d}));var o,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"}(o||(o={}));var s={debug:o.DEBUG,verbose:o.VERBOSE,info:o.INFO,warn:o.WARN,error:o.ERROR,silent:o.SILENT},u=o.INFO,c=((i={})[o.DEBUG]="log",i[o.VERBOSE]="log",i[o.INFO]="info",i[o.WARN]="warn",i[o.ERROR]="error",i),l=function(e,t){for(var n=[],i=2;i<arguments.length;i++)n[i-2]=arguments[i];if(!(t<e.logLevel)){var o=(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(["["+o+"] "+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 o))throw new TypeError('Invalid value "'+e+'" assigned to `logLevel`');this._logLevel=e},enumerable:!1,configurable:!0}),e.prototype.setLogLevel=function(e){this._logLevel="string"===typeof e?s[e]:e},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:!1,configurable:!0}),Object.defineProperty(e.prototype,"userLogHandler",{get:function(){return this._userLogHandler},set:function(e){this._userLogHandler=e},enumerable:!1,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,o.DEBUG],e)),this._logHandler.apply(this,r([this,o.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,o.VERBOSE],e)),this._logHandler.apply(this,r([this,o.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,o.INFO],e)),this._logHandler.apply(this,r([this,o.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,o.WARN],e)),this._logHandler.apply(this,r([this,o.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,o.ERROR],e)),this._logHandler.apply(this,r([this,o.ERROR],e))},e}();function h(e){a.forEach((function(t){t.setLogLevel(e)}))}function d(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 i=[],a=2;a<arguments.length;a++)i[a-2]=arguments[a];var s=i.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(t){return null}})).filter((function(e){return e})).join(" ");n>=(null!==r&&void 0!==r?r:t.logLevel)&&e({level:o[n].toLowerCase(),message:s,args:i,type:t.name})}},r=0,i=a;r<i.length;r++){n(i[r])}}},function(e,t,n){e.exports=n(463)},function(e,t){var n=e.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=n)},function(e,t,n){"use strict";t.__esModule=!0;var r,i=n(49),o=(r=i)&&r.__esModule?r:{default:r};t.default=function(e){return function(){var t=e.apply(this,arguments);return new o.default((function(e,n){return function r(i,a){try{var s=t[i](a),u=s.value}catch(c){return void n(c)}if(!s.done)return o.default.resolve(u).then((function(e){r("next",e)}),(function(e){r("throw",e)}));e(u)}("next")}))}}},function(e,t,n){"use strict";
2Object.defineProperty(t,"__esModule",{value:!0}),t.parseStartTime=function(e){return h(e,u)},t.parseEndTime=function(e){return h(e,c)},t.randomString=function(){return Math.random().toString(36).substr(2,5)},t.queryString=function(e){return Object.keys(e).map((function(t){return"".concat(t,"=").concat(e[t])})).join("&")},t.getSDK=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:function(){return!0},o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:r.default,a=d(t);if(a&&i(a))return Promise.resolve(a);return new Promise((function(r,i){if(p[e])p[e].push({resolve:r,reject:i});else{p[e]=[{resolve:r,reject:i}];var a=function(t){p[e].forEach((function(e){return e.resolve(t)}))};if(n){var s=window[n];window[n]=function(){s&&s(),a(d(t))}}o(e,(function(r){r?(p[e].forEach((function(e){return e.reject(r)})),p[e]=null):n||a(d(t))}))}}))},t.getConfig=function(e,t){return(0,i.default)(t.config,e.config)},t.omit=function(e){for(var t,n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];for(var o=(t=[]).concat.apply(t,r),a={},s=Object.keys(e),u=0,c=s;u<c.length;u++){var l=c[u];-1===o.indexOf(l)&&(a[l]=e[l])}return a},t.callPlayer=function(e){var t;if(!this.player||!this.player[e]){var n="ReactPlayer: ".concat(this.constructor.displayName," player could not call %c").concat(e,"%c \u2013 ");return this.player?this.player[e]||(n+="The method was not available"):n+="The player was not available",console.warn(n,"font-weight: bold",""),null}for(var r=arguments.length,i=new Array(r>1?r-1:0),o=1;o<r;o++)i[o-1]=arguments[o];return(t=this.player)[e].apply(t,i)},t.isMediaStream=function(e){return"undefined"!==typeof window&&"undefined"!==typeof window.MediaStream&&e instanceof window.MediaStream},t.isBlobUrl=function(e){return/^blob:/.test(e)},t.supportsWebKitPresentationMode=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document.createElement("video"),t=!1===/iPhone|iPod/.test(navigator.userAgent);return e.webkitSupportsPresentationMode&&"function"===typeof e.webkitSetPresentationMode&&t};var r=o(n(323)),i=o(n(176));function o(e){return e&&e.__esModule?e:{default:e}}function a(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"===typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,i=!1,o=void 0;try{for(var a,s=e[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(u){i=!0,o=u}finally{try{r||null==s.return||s.return()}finally{if(i)throw o}}return n}(e,t)||function(e,t){if(!e)return;if("string"===typeof e)return s(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return s(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function s(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var u=/[?&#](?:start|t)=([0-9hms]+)/,c=/[?&#]end=([0-9hms]+)/,l=/(\d+)(h|m|s)/g,f=/^\d+$/;function h(e,t){if(!(e instanceof Array)){var n=e.match(t);if(n){var r=n[1];if(r.match(l))return function(e){var t=0,n=l.exec(e);for(;null!==n;){var r=a(n,3),i=r[1],o=r[2];"h"===o&&(t+=60*parseInt(i,10)*60),"m"===o&&(t+=60*parseInt(i,10)),"s"===o&&(t+=parseInt(i,10)),n=l.exec(e)}return t}(r);if(f.test(r))return parseInt(r)}}}function d(e){return window[e]?window[e]:window.exports&&window.exports[e]?window.exports[e]:window.module&&window.module.exports&&window.module.exports[e]?window.module.exports[e]:null}var p={}},function(e,t,n){var r=n(146)("wks"),i=n(117),o=n(39).Symbol,a="function"==typeof o;(e.exports=function(e){return r[e]||(r[e]=a&&o[e]||(a?o:i)("Symbol."+e))}).store=r},function(e,t,n){"use strict";function r(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}n.d(t,"a",(function(){return r}))},function(e,t){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(r){"object"===typeof window&&(n=window)}e.exports=n},function(e,t){e.exports=function(e){return"object"===typeof e?null!==e:"function"===typeof e}},function(e,t,n){"use strict";
2Object.defineProperty(t,"__esModule",{value:!0}),t.canPlay=t.FLV_EXTENSIONS=t.DASH_EXTENSIONS=t.HLS_EXTENSIONS=t.VIDEO_EXTENSIONS=t.AUDIO_EXTENSIONS=t.MATCH_URL_KALTURA=t.MATCH_URL_VIDYARD=t.MATCH_URL_MIXCLOUD=t.MATCH_URL_DAILYMOTION=t.MATCH_URL_TWITCH_CHANNEL=t.MATCH_URL_TWITCH_VIDEO=t.MATCH_URL_WISTIA=t.MATCH_URL_STREAMABLE=t.MATCH_URL_FACEBOOK_WATCH=t.MATCH_URL_FACEBOOK=t.MATCH_URL_VIMEO=t.MATCH_URL_SOUNDCLOUD=t.MATCH_URL_YOUTUBE=void 0;var r=n(41);function i(e,t){var n;if("undefined"===typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"===typeof e)return o(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return o(e,t)}(e))||t&&e&&"number"===typeof e.length){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,s=!0,u=!1;return{s:function(){n=e[Symbol.iterator]()},n:function(){var e=n.next();return s=e.done,e},e:function(e){u=!0,a=e},f:function(){try{s||null==n.return||n.return()}finally{if(u)throw a}}}}function o(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var a=/(?:youtu\.be\/|youtube(?:-nocookie)?\.com\/(?:embed\/|v\/|watch\/|watch\?v=|watch\?.+&v=))((\w|-){11})|youtube\.com\/playlist\?list=|youtube\.com\/user\//;t.MATCH_URL_YOUTUBE=a;var s=/(?:soundcloud\.com|snd\.sc)\/[^.]+$/;t.MATCH_URL_SOUNDCLOUD=s;var u=/vimeo\.com\/.+/;t.MATCH_URL_VIMEO=u;var c=/^https?:\/\/(www\.)?facebook\.com.*\/(video(s)?|watch|story)(\.php?|\/).+$/;t.MATCH_URL_FACEBOOK=c;var l=/^https?:\/\/fb\.watch\/.+$/;t.MATCH_URL_FACEBOOK_WATCH=l;var f=/streamable\.com\/([a-z0-9]+)$/;t.MATCH_URL_STREAMABLE=f;var h=/(?:wistia\.(?:com|net)|wi\.st)\/(?:medias|embed)\/(?:iframe\/)?(.*)$/;t.MATCH_URL_WISTIA=h;var d=/(?:www\.|go\.)?twitch\.tv\/videos\/(\d+)($|\?)/;t.MATCH_URL_TWITCH_VIDEO=d;var p=/(?:www\.|go\.)?twitch\.tv\/([a-zA-Z0-9_]+)($|\?)/;t.MATCH_URL_TWITCH_CHANNEL=p;var v=/^(?:(?:https?):)?(?:\/\/)?(?:www\.)?(?:(?:dailymotion\.com(?:\/embed)?\/video)|dai\.ly)\/([a-zA-Z0-9]+)(?:_[\w_-]+)?$/;t.MATCH_URL_DAILYMOTION=v;var y=/mixcloud\.com\/([^/]+\/[^/]+)/;t.MATCH_URL_MIXCLOUD=y;var m=/vidyard.com\/(?:watch\/)?([a-zA-Z0-9-]+)/;t.MATCH_URL_VIDYARD=m;var g=/^https?:\/\/[a-zA-Z]+\.kaltura.(com|org)\/p\/([0-9]+)\/sp\/([0-9]+)00\/embedIframeJs\/uiconf_id\/([0-9]+)\/partner_id\/([0-9]+)(.*)entry_id.([a-zA-Z0-9-_]+)$/;t.MATCH_URL_KALTURA=g;var b=/\.(m4a|mp4a|mpga|mp2|mp2a|mp3|m2a|m3a|wav|weba|aac|oga|spx)($|\?)/i;t.AUDIO_EXTENSIONS=b;var _=/\.(mp4|og[gv]|webm|mov|m4v)($|\?)/i;t.VIDEO_EXTENSIONS=_;var w=/\.(m3u8)($|\?)/i;t.HLS_EXTENSIONS=w;var k=/\.(mpd)($|\?)/i;t.DASH_EXTENSIONS=k;var S=/\.(flv)($|\?)/i;t.FLV_EXTENSIONS=S;var O={youtube:function(e){return e instanceof Array?e.every((function(e){return a.test(e)})):a.test(e)},soundcloud:function(e){return s.test(e)&&!b.test(e)},vimeo:function(e){return u.test(e)&&!_.test(e)&&!w.test(e)},facebook:function(e){return c.test(e)||l.test(e)},streamable:function(e){return f.test(e)},wistia:function(e){return h.test(e)},twitch:function(e){return d.test(e)||p.test(e)},dailymotion:function(e){return v.test(e)},mixcloud:function(e){return y.test(e)},vidyard:function(e){return m.test(e)},kaltura:function(e){return g.test(e)},file:function e(t){if(t instanceof Array){var n,o=i(t);try{for(o.s();!(n=o.n()).done;){var a=n.value;if("string"===typeof a&&e(a))return!0;if(e(a.src))return!0}}catch(s){o.e(s)}finally{o.f()}return!1}return!(!(0,r.isMediaStream)(t)&&!(0,r.isBlobUrl)(t))||(b.test(t)||_.test(t)||w.test(t)||k.test(t)||S.test(t))}};t.canPlay=O},function(e,t,n){"use strict";var r=n(181),i=Object.prototype.toString;function o(e){return"[object Array]"===i.call(e)}function a(e){return"undefined"===typeof e}function s(e){return null!==e&&"object"===typeof e}function u(e){if("[object Object]"!==i.call(e))return!1;var t=Object.getPrototypeOf(e);return null===t||t===Object.prototype}function c(e){return"[object Function]"===i.call(e)}function l(e,t){if(null!==e&&"undefined"!==typeof e)if("object"!==typeof e&&(e=[e]),o(e))for(var n=0,r=e.length;n<r;n++)t.call(null,e[n],n,e);else for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.call(null,e[i],i,e)}e.exports={isArray:o,isArrayBuffer:function(e){return"[object ArrayBuffer]"===i.call(e)},isBuffer:function(e){return null!==e&&!a(e)&&null!==e.constructor&&!
vendor: 4,392 bytes, line 2
2a(e.constructor)&&"function"===typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)},isFormData:function(e){return"undefined"!==typeof FormData&&e instanceof FormData},isArrayBufferView:function(e){return"undefined"!==typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&e.buffer instanceof ArrayBuffer},isString:function(e){return"string"===typeof e},isNumber:function(e){return"number"===typeof e},isObject:s,isPlainObject:u,isUndefined:a,isDate:function(e){return"[object Date]"===i.call(e)},isFile:function(e){return"[object File]"===i.call(e)},isBlob:function(e){return"[object Blob]"===i.call(e)},isFunction:c,isStream:function(e){return s(e)&&c(e.pipe)},isURLSearchParams:function(e){return"undefined"!==typeof URLSearchParams&&e instanceof URLSearchParams},isStandardBrowserEnv:function(){return("undefined"===typeof navigator||"ReactNative"!==navigator.product&&"NativeScript"!==navigator.product&&"NS"!==navigator.product)&&("undefined"!==typeof window&&"undefined"!==typeof document)},forEach:l,merge:function e(){var t={};function n(n,r){u(t[r])&&u(n)?t[r]=e(t[r],n):u(n)?t[r]=e({},n):o(n)?t[r]=n.slice():t[r]=n}for(var r=0,i=arguments.length;r<i;r++)l(arguments[r],n);return t},extend:function(e,t,n){return l(t,(function(t,i){e[i]=n&&"function"===typeof t?r(t,n):t})),e},trim:function(e){return e.replace(/^\s*/,"").replace(/\s*$/,"")},stripBOM:function(e){return 65279===e.charCodeAt(0)&&(e=e.slice(1)),e}}},function(e,t,n){(function(e){var r=Object.getOwnPropertyDescriptors||function(e){for(var t=Object.keys(e),n={},r=0;r<t.length;r++)n[t[r]]=Object.getOwnPropertyDescriptor(e,t[r]);return n},i=/%[sdj%]/g;t.format=function(e){if(!m(e)){for(var t=[],n=0;n<arguments.length;n++)t.push(s(arguments[n]));return t.join(" ")}n=1;for(var r=arguments,o=r.length,a=String(e).replace(i,(function(e){if("%%"===e)return"%";if(n>=o)return e;switch(e){case"%s":return String(r[n++]);case"%d":return Number(r[n++]);case"%j":try{return JSON.stringify(r[n++])}catch(t){return"[Circular]"}default:return e}})),u=r[n];n<o;u=r[++n])v(u)||!_(u)?a+=" "+u:a+=" "+s(u);return a},t.deprecate=function(n,r){if("undefined"!==typeof e&&!0===e.noDeprecation)return n;if("undefined"===typeof e)return function(){return t.deprecate(n,r).apply(this,arguments)};var i=!1;return function(){if(!i){if(e.throwDeprecation)throw new Error(r);e.traceDeprecation?console.trace(r):console.error(r),i=!0}return n.apply(this,arguments)}};var o,a={};function s(e,n){var r={seen:[],stylize:c};return arguments.length>=3&&(r.depth=arguments[2]),arguments.length>=4&&(r.colors=arguments[3]),p(n)?r.showHidden=n:n&&t._extend(r,n),g(r.showHidden)&&(r.showHidden=!1),g(r.depth)&&(r.depth=2),g(r.colors)&&(r.colors=!1),g(r.customInspect)&&(r.customInspect=!0),r.colors&&(r.stylize=u),l(r,e,r.depth)}function u(e,t){var n=s.styles[t];return n?"\x1b["+s.colors[n][0]+"m"+e+"\x1b["+s.colors[n][1]+"m":e}function c(e,t){return e}function l(e,n,r){if(e.customInspect&&n&&S(n.inspect)&&n.inspect!==t.inspect&&(!n.constructor||n.constructor.prototype!==n)){var i=n.inspect(r,e);return m(i)||(i=l(e,i,r)),i}var o=function(e,t){if(g(t))return e.stylize("undefined","undefined");if(m(t)){var n="'"+JSON.stringify(t).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return e.stylize(n,"string")}if(y(t))return e.stylize(""+t,"number");if(p(t))return e.stylize(""+t,"boolean");if(v(t))return e.stylize("null","null")}(e,n);if(o)return o;var a=Object.keys(n),s=function(e){var t={};return e.forEach((function(e,n){t[e]=!0})),t}(a);if(e.showHidden&&(a=Object.getOwnPropertyNames(n)),k(n)&&(a.indexOf("message")>=0||a.indexOf("description")>=0))return f(n);if(0===a.length){if(S(n)){var u=n.name?": "+n.name:"";return e.stylize("[Function"+u+"]","special")}if(b(n))return e.stylize(RegExp.prototype.toString.call(n),"regexp");if(w(n))return e.stylize(Date.prototype.toString.call(n),"date");if(k(n))return f(n)}var c,_="",O=!1,E=["{","}"];(d(n)&&(O=!0,E=["[","]"]),S(n))&&(_=" [Function"+(n.name?": "+n.name:"")+"]");return b(n)&&(_=" "+RegExp.prototype.toString.call(n)),w(n)&&(_=" "+Date.prototype.toUTCString.call(n)),k(n)&&(_=" "+f(n)),0!==a.length||O&&0!=n.length?r<0?b(n)?e.stylize(RegExp.prototype.toString.call(n),"regexp"):e.stylize("[Object]","special"):(e.seen.push(n),c=O?function(e,t,n,r,i){for(var o=[],a=0,s=t.length;a<s;++a)P(t,String(a))?o.push(h(e,t,n,r,String(a),!0)):o.push("");
vendor: 4,284 bytes, line 2
2return i.forEach((function(i){i.match(/^\d+$/)||o.push(h(e,t,n,r,i,!0))})),o}(e,n,r,s,a):a.map((function(t){return h(e,n,r,s,t,O)})),e.seen.pop(),function(e,t,n){if(e.reduce((function(e,t){return t.indexOf("\n")>=0&&0,e+t.replace(/\u001b\[\d\d?m/g,"").length+1}),0)>60)return n[0]+(""===t?"":t+"\n ")+" "+e.join(",\n ")+" "+n[1];return n[0]+t+" "+e.join(", ")+" "+n[1]}(c,_,E)):E[0]+_+E[1]}function f(e){return"["+Error.prototype.toString.call(e)+"]"}function h(e,t,n,r,i,o){var a,s,u;if((u=Object.getOwnPropertyDescriptor(t,i)||{value:t[i]}).get?s=u.set?e.stylize("[Getter/Setter]","special"):e.stylize("[Getter]","special"):u.set&&(s=e.stylize("[Setter]","special")),P(r,i)||(a="["+i+"]"),s||(e.seen.indexOf(u.value)<0?(s=v(n)?l(e,u.value,null):l(e,u.value,n-1)).indexOf("\n")>-1&&(s=o?s.split("\n").map((function(e){return" "+e})).join("\n").substr(2):"\n"+s.split("\n").map((function(e){return" "+e})).join("\n")):s=e.stylize("[Circular]","special")),g(a)){if(o&&i.match(/^\d+$/))return s;(a=JSON.stringify(""+i)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(a=a.substr(1,a.length-2),a=e.stylize(a,"name")):(a=a.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),a=e.stylize(a,"string"))}return a+": "+s}function d(e){return Array.isArray(e)}function p(e){return"boolean"===typeof e}function v(e){return null===e}function y(e){return"number"===typeof e}function m(e){return"string"===typeof e}function g(e){return void 0===e}function b(e){return _(e)&&"[object RegExp]"===O(e)}function _(e){return"object"===typeof e&&null!==e}function w(e){return _(e)&&"[object Date]"===O(e)}function k(e){return _(e)&&("[object Error]"===O(e)||e instanceof Error)}function S(e){return"function"===typeof e}function O(e){return Object.prototype.toString.call(e)}function E(e){return e<10?"0"+e.toString(10):e.toString(10)}t.debuglog=function(n){if(g(o)&&(o=Object({NODE_ENV:"production",PUBLIC_URL:"",WDS_SOCKET_HOST:void 0,WDS_SOCKET_PATH:void 0,WDS_SOCKET_PORT:void 0,FAST_REFRESH:!0}).NODE_DEBUG||""),n=n.toUpperCase(),!a[n])if(new RegExp("\\b"+n+"\\b","i").test(o)){var r=e.pid;a[n]=function(){var e=t.format.apply(t,arguments);console.error("%s %d: %s",n,r,e)}}else a[n]=function(){};return a[n]},t.inspect=s,s.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},s.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},t.isArray=d,t.isBoolean=p,t.isNull=v,t.isNullOrUndefined=function(e){return null==e},t.isNumber=y,t.isString=m,t.isSymbol=function(e){return"symbol"===typeof e},t.isUndefined=g,t.isRegExp=b,t.isObject=_,t.isDate=w,t.isError=k,t.isFunction=S,t.isPrimitive=function(e){return null===e||"boolean"===typeof e||"number"===typeof e||"string"===typeof e||"symbol"===typeof e||"undefined"===typeof e},t.isBuffer=n(361);var T=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function C(){var e=new Date,t=[E(e.getHours()),E(e.getMinutes()),E(e.getSeconds())].join(":");return[e.getDate(),T[e.getMonth()],t].join(" ")}function P(e,t){return Object.prototype.hasOwnProperty.call(e,t)}t.log=function(){console.log("%s - %s",C(),t.format.apply(t,arguments))},t.inherits=n(362),t._extend=function(e,t){if(!t||!_(t))return e;for(var n=Object.keys(t),r=n.length;r--;)e[n[r]]=t[n[r]];return e};var x="undefined"!==typeof Symbol?Symbol("util.promisify.custom"):void 0;function I(e,t){if(!e){var n=new Error("Promise was rejected with a falsy value");n.reason=e,e=n}return t(e)}t.promisify=function(e){if("function"!==typeof e)throw new TypeError('The "original" argument must be of type Function');if(x&&e[x]){var t;if("function"!==typeof(t=e[x]))throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(t,x,{value:t,enumerable:!1,writable:!1,configurable:!0}),t}function t(){for(var t,n,r=new Promise((function(e,r){t=e,n=r})),i=[],o=0;o<arguments.length;o++)i.push(arguments[o]);i.push((function(e,r){e?n(e):t(r)}));try{e.apply(this,i)}catch(a){n(a)}return r}return Object.setPrototypeOf(t,Object.getPrototypeOf(e)),x&&Object.defineProperty(t,x,{value:t,enumerable:!1,writable:!1,
2configurable:!0}),Object.defineProperties(t,r(e))},t.promisify.custom=x,t.callbackify=function(t){if("function"!==typeof t)throw new TypeError('The "original" argument must be of type Function');function n(){for(var n=[],r=0;r<arguments.length;r++)n.push(arguments[r]);var i=n.pop();if("function"!==typeof i)throw new TypeError("The last argument must be of type Function");var o=this,a=function(){return i.apply(o,arguments)};t.apply(this,n).then((function(t){e.nextTick(a,null,t)}),(function(t){e.nextTick(I,t,a)}))}return Object.setPrototypeOf(n,Object.getPrototypeOf(t)),Object.defineProperties(n,r(t)),n}}).call(this,n(98))},function(e,t,n){e.exports={default:n(470),__esModule:!0}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,i=(r=n(322))&&r.__esModule?r:{default:r},o=n(336);var a=i.default[i.default.length-1],s=(0,o.createReactPlayer)(i.default,a);t.default=s},function(e,t,n){"use strict";var r="Invariant failed";t.a=function(e,t){if(!e)throw new Error(r)}},function(e,t,n){"use strict";var r=n(4),i=n.n(r),o=n(14),a=n.n(o),s="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto),u=new Uint8Array(16);function c(){if(!s)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return s(u)}for(var l=[],f=0;f<256;++f)l[f]=(f+256).toString(16).substr(1);var h=function(e,t){var n=t||0,r=l;return[r[e[n++]],r[e[n++]],r[e[n++]],r[e[n++]],"-",r[e[n++]],r[e[n++]],"-",r[e[n++]],r[e[n++]],"-",r[e[n++]],r[e[n++]],"-",r[e[n++]],r[e[n++]],r[e[n++]],r[e[n++]],r[e[n++]],r[e[n++]]].join("")};var d=function(e,t,n){var r=t&&n||0;"string"==typeof e&&(t="binary"===e?new Array(16):null,e=null);var i=(e=e||{}).random||(e.rng||c)();if(i[6]=15&i[6]|64,i[8]=63&i[8]|128,t)for(var o=0;o<16;++o)t[r+o]=i[o];return t||h(i)};function p(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function v(e,t,n){return t&&p(e.prototype,t),n&&p(e,n),e}function y(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function m(){return(m=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function g(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function b(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?g(Object(n),!0).forEach((function(t){y(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):g(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function _(e){return(_=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function w(e,t){return(w=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function k(e,t){return!t||"object"!==typeof t&&"function"!==typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}var S={HIDE:"__react_tooltip_hide_event",REBUILD:"__react_tooltip_rebuild_event",SHOW:"__react_tooltip_show_event"},O=function(e,t){var n;"function"===typeof window.CustomEvent?n=new window.CustomEvent(e,{detail:t}):(n=document.createEvent("Event")).initEvent(e,!1,!0,t),window.dispatchEvent(n)};var E=function(e,t){var n=this.state.show,r=this.props.id,i=this.isCapture(t.currentTarget),o=t.currentTarget.getAttribute("currentItem");i||t.stopPropagation(),n&&"true"===o?e||this.hideTooltip(t):(t.currentTarget.setAttribute("currentItem","true"),T(t.currentTarget,this.getTargetArray(r)),this.showTooltip(t))},T=function(e,t){for(var n=0;n<t.length;n++)e!==t[n]?t[n].setAttribute("currentItem","false"):t[n].setAttribute("currentItem","true")},C={id:"9b69f92e-d3fe-498b-b1b4-c5e63a51b0cf",set:function(e,t,n){this.id in e?e[this.id][t]=n:Object.defineProperty(e,this.id,{configurable:!0,value:y({},t,n)})},get:function(e,t){var n=e[this.id];if(void 0!==n)return n[t]}};var P=function(e,t,n){var r=t.respectEffect,i=void 0!==r&&r,o=t.customEvent,a=void 0!==o&&o,s=this.props.id,u=n.target.getAttribute("data-tip")||null,c=n.target.getAttribute("data-for")||null,l=n.target;
2if(!this.isCustomEvent(l)||a){var f=null==s&&null==c||c===s;if(null!=u&&(!i||"float"===this.getEffect(l))&&f){var h=function(e){var t={};for(var n in e)"function"===typeof e[n]?t[n]=e[n].bind(e):t[n]=e[n];return t}(n);h.currentTarget=l,e(h)}}},x=function(e,t){var n={};return e.forEach((function(e){var r=e.getAttribute(t);r&&r.split(" ").forEach((function(e){return n[e]=!0}))})),n},I=function(){return document.getElementsByTagName("body")[0]};function j(e,t,n,r,i,o,a){for(var s=R(n),u=s.width,c=s.height,l=R(t),f=l.width,h=l.height,d=A(e,t,o),p=d.mouseX,v=d.mouseY,y=M(o,f,h,u,c),m=N(a),g=m.extraOffsetX,b=m.extraOffsetY,_=window.innerWidth,w=window.innerHeight,k=L(n),S=k.parentTop,O=k.parentLeft,E=function(e){var t=y[e].l;return p+t+g},T=function(e){var t=y[e].t;return v+t+b},C=function(e){return function(e){var t=y[e].r;return p+t+g}(e)>_},P=function(e){return function(e){var t=y[e].b;return v+t+b}(e)>w},x=function(e){return function(e){return E(e)<0}(e)||C(e)||function(e){return T(e)<0}(e)||P(e)},I=function(e){return!x(e)},j=["top","bottom","left","right"],D=[],F=0;F<4;F++){var U=j[F];I(U)&&D.push(U)}var V,B=!1,q=i!==r;return I(i)&&q?(B=!0,V=i):D.length>0&&x(i)&&x(r)&&(B=!0,V=D[0]),B?{isNewState:!0,newState:{place:V}}:{isNewState:!1,position:{left:parseInt(E(r)-O,10),top:parseInt(T(r)-S,10)}}}var R=function(e){var t=e.getBoundingClientRect(),n=t.height,r=t.width;return{height:parseInt(n,10),width:parseInt(r,10)}},A=function(e,t,n){var r=t.getBoundingClientRect(),i=r.top,o=r.left,a=R(t),s=a.width,u=a.height;return"float"===n?{mouseX:e.clientX,mouseY:e.clientY}:{mouseX:o+s/2,mouseY:i+u/2}},M=function(e,t,n,r,i){var o,a,s,u;return"float"===e?(o={l:-r/2,r:r/2,t:-(i+3+2),b:-3},s={l:-r/2,r:r/2,t:15,b:i+3+2+12},u={l:-(r+3+2),r:-3,t:-i/2,b:i/2},a={l:3,r:r+3+2,t:-i/2,b:i/2}):"solid"===e&&(o={l:-r/2,r:r/2,t:-(n/2+i+2),b:-n/2},s={l:-r/2,r:r/2,t:n/2,b:n/2+i+2},u={l:-(r+t/2+2),r:-t/2,t:-i/2,b:i/2},a={l:t/2,r:r+t/2+2,t:-i/2,b:i/2}),{top:o,bottom:s,left:u,right:a}},N=function(e){var t=0,n=0;for(var r in"[object String]"===Object.prototype.toString.apply(e)&&(e=JSON.parse(e.toString().replace(/'/g,'"'))),e)"top"===r?n-=parseInt(e[r],10):"bottom"===r?n+=parseInt(e[r],10):"left"===r?t-=parseInt(e[r],10):"right"===r&&(t+=parseInt(e[r],10));return{extraOffsetX:t,extraOffsetY:n}},L=function(e){for(var t=e;t;){var n=window.getComputedStyle(t);if("none"!==n.getPropertyValue("transform")||"transform"===n.getPropertyValue("will-change"))break;t=t.parentElement}return{parentTop:t&&t.getBoundingClientRect().top||0,parentLeft:t&&t.getBoundingClientRect().left||0}};function D(e,t,n,r){if(t)return t;if(void 0!==n&&null!==n)return n;if(null===n)return null;var o=/<br\s*\/?>/;return r&&"false"!==r&&o.test(e)?e.split(o).map((function(e,t){return i.a.createElement("span",{key:t,className:"multi-line"},e)})):e}function F(e){var t={};return Object.keys(e).filter((function(e){return/(^aria-\w+$|^role$)/.test(e)})).forEach((function(n){t[n]=e[n]})),t}function U(e){var t=e.length;return e.hasOwnProperty?Array.prototype.slice.call(e):new Array(t).fill().map((function(t){return e[t]}))}!function(e){if(e&&"undefined"!==typeof window){var t=document.createElement("style");t.setAttribute("type","text/css"),t.innerHTML=e,document.head.appendChild(t)}}('.__react_component_tooltip {\n border-radius: 3px;\n display: inline-block;\n font-size: 13px;\n left: -999em;\n opacity: 0;\n padding: 8px 21px;\n position: fixed;\n pointer-events: none;\n transition: opacity 0.3s ease-out;\n top: -999em;\n visibility: hidden;\n z-index: 999;\n}\n.__react_component_tooltip.allow_hover, .__react_component_tooltip.allow_click {\n pointer-events: auto;\n}\n.__react_component_tooltip::before, .__react_component_tooltip::after {\n content: "";\n width: 0;\n height: 0;\n position: absolute;\n}\n.__react_component_tooltip.show {\n opacity: 0.9;\n margin-top: 0;\n margin-left: 0;\n visibility: visible;\n}\n.__react_component_tooltip.place-top::before {\n border-left: 10px solid transparent;\n border-right: 10px solid transparent;\n bottom: -8px;\n left: 50%;\n margin-left: -10px;\n}\n.__react_component_tooltip.place-bottom::before {\n border-left: 10px solid transparent;\n border-right: 10px solid transparent;\n top: -8px;\n left: 50%;\n margin-left: -10px;\n}\n.__react_component_tooltip.place-left::before {\n border-top: 6px solid transparent;\n border-bottom: 6px solid transparent;\n right: -8px;\n top: 50%;\n margin-top: -5px;\n}\n.__react_component_tooltip.place-right::before {\n border-top: 6px solid transparent;\n border-bottom: 6px solid transparent;\n left: -8px;\n top: 50%;\n margin-top: -5px;\n}\n.__react_component_tooltip .multi-line {\n display: block;\n padding: 2px 0;\n text-align: center;\n}');var V,B,q,W={dark:{text:"#fff",background:"#222",border:"transparent",arrow:"#222"},success:{text:"#fff",background:"#8DC572",border:"transparent",arrow:"#8DC572"},warning:{text:"#fff",background:"#F0AD4E",border:"transparent",arrow:"#F0AD4E"},error:{text:"#fff",background:"#BE6464",border:"transparent",arrow:"#BE6464"},info:{text:"#fff",background:"#337AB7",border:"transparent",arrow:"#337AB7"},light:{text:"#222",background:"#fff",border:"transparent",arrow:"#fff"}};function z(e,t,n,r){return function(e,t){var n=t.text,r=t.background,i=t.border,o=t.arrow;return"\n \t.".concat(e," {\n\t color: ").concat(n,";\n\t background: ").concat(r,";\n\t border: 1px solid ").concat(i,";\n \t}\n\n \t.").concat(e,".place-top {\n margin-top: -10px;\n }\n .").concat(e,".place-top::before {\n border-top: 8px solid ").concat(i,";\n }\n .").concat(e,".place-top::after {\n border-left: 8px solid transparent;\n border-right: 8px solid transparent;\n bottom: -6px;\n left: 50%;\n margin-left: -8px;\n border-top-color: ").concat(o,";\n border-top-style: solid;\n border-top-width: 6px;\n }\n\n .").concat(e,".place-bottom {\n margin-top: 10px;\n }\n .").concat(e,".place-bottom::before {\n border-bottom: 8px solid ").concat(i,";\n }\n .").concat(e,".place-bottom::after {\n border-left: 8px solid transparent;\n border-right: 8px solid transparent;\n top: -6px;\n left: 50%;\n margin-left: -8px;\n border-bottom-color: ").concat(o,";\n border-bottom-style: solid;\n border-bottom-width: 6px;\n }\n\n .").concat(e,".place-left {\n margin-left: -10px;\n }\n .").concat(e,".place-left::before {\n border-left: 8px solid ").concat(i,";\n }\n .").concat(e,".place-left::after {\n border-top: 5px solid transparent;\n border-bottom: 5px solid transparent;\n right: -6px;\n top: 50%;\n margin-top: -4px;\n border-left-color: ").concat(o,";\n border-left-style: solid;\n border-left-width: 6px;\n }\n\n .").concat(e,".place-right {\n margin-left: 10px;\n }\n .").concat(e,".place-right::before {\n border-right: 8px solid ").concat(i,";\n }\n .").concat(e,".place-right::after {\n border-top: 5px solid transparent;\n border-bottom: 5px solid transparent;\n left: -6px;\n top: 50%;\n margin-top: -4px;\n border-right-color: ").concat(o,";\n border-right-style: solid;\n border-right-width: 6px;\n }\n ")}(e,function(e,t,n){var r=e.text,i=e.background,o=e.border,a=e.arrow?e.arrow:e.background,s=function(e){return W[e]?b({},W[e]):void 0}(t);r&&(s.text=r);i&&(s.background=i);n&&(s.border=o||("light"===t?"black":"white"));a&&(s.arrow=a);return s}(t,n,r))}var H,G=function(e){e.hide=function(e){O(S.HIDE,{target:e})},e.rebuild=function(){O(S.REBUILD)},e.show=function(e){O(S.SHOW,{target:e})},e.prototype.globalRebuild=function(){this.mount&&(this.unbindListener(),this.bindListener())},e.prototype.globalShow=function(e){if(this.mount){var t=!!(e&&e.detail&&e.detail.target);this.showTooltip({currentTarget:t&&e.detail.target},!0)}},e.prototype.globalHide=function(e){if(this.mount){var t=!!(e&&e.detail&&e.detail.target);this.hideTooltip({currentTarget:t&&e.detail.target},t)}}}(V=function(e){e.prototype.bindWindowEvents=function(e){window.removeEventListener(S.HIDE,this.globalHide),window.addEventListener(S.HIDE,this.globalHide,!1),window.removeEventListener(S.REBUILD,this.globalRebuild),window.addEventListener(S.REBUILD,this.globalRebuild,!1),window.removeEventListener(S.SHOW,this.globalShow),window.addEventListener(S.SHOW,this.globalShow,!1),e&&(window.removeEventListener("resize",this.onWindowResize),window.addEventListener("resize",this.onWindowResize,!1))},e.prototype.unbindWindowEvents=function(){window.removeEventListener(S.HIDE,this.globalHide),window.removeEventListener(S.REBUILD,this.globalRebuild),window.removeEventListener(S.SHOW,this.globalShow),window.removeEventListener("resize",this.onWindowResize)},e.prototype.onWindowResize=function(){this.mount&&this.hideTooltip()}}(V=function(e){e.prototype.isCustomEvent=function(e){return this.state.event||!!e.getAttribute("data-event")},e.prototype.customBindListener=function(e){var t=this,n=this.state,r=n.event,i=n.eventOff,o=e.getAttribute("data-event")||r,a=e.getAttribute("data-event-off")||i;o.split(" ").forEach((function(n){e.removeEventListener(n,C.get(e,n));var r=E.bind(t,a);C.set(e,n,r),e.addEventListener(n,r,!1)})),a&&a.split(" ").forEach((function(n){e.removeEventListener(n,t.hideTooltip),e.addEventListener(n,t.hideTooltip,!1)}))},e.prototype.customUnbindListener=function(e){var t=this.state,n=t.event,r=t.eventOff,i=n||e.getAttribute("data-event"),o=r||e.getAttribute("data-event-off");e.removeEventListener(i,C.get(e,n)),o&&e.removeEventListener(o,this.hideTooltip)}}(V=function(e){e.prototype.isCapture=function(e){return e&&"true"===e.getAttribute("data-iscapture")||this.props.isCapture||!1}}(V=function(e){e.prototype.getEffect=function(e){return e.getAttribute("data-effect")||this.props.effect||"float"}}(V=function(e){e.prototype.isBodyMode=function(){return!!this.props.bodyMode},e.prototype.bindBodyListener=function(e){var t=this,n=this.state,r=n.event,i=n.eventOff,o=n.possibleCustomEvents,a=n.possibleCustomEventsOff,s=I(),u=x(e,"data-event"),c=x(e,"data-event-off");null!=r&&(u[r]=!0),null!=i&&(c[i]=!0),o.split(" ").forEach((function(e){return u[e]=!0})),a.split(" ").forEach((function(e){return c[e]=!0})),this.unbindBodyListener(s);var l=this.bodyModeListeners={};for(var f in null==r&&(l.mouseover=P.bind(this,this.showTooltip,{}),l.mousemove=P.bind(this,this.updateTooltip,{respectEffect:!0}),l.mouseout=P.bind(this,this.hideTooltip,{})),u)l[f]=P.bind(this,(function(e){var n=e.currentTarget.getAttribute("data-event-off")||i;E.call(t,n,e)}),{customEvent:!0});for(var h in c)l[h]=P.bind(this,this.hideTooltip,{customEvent:!0});for(var d in l)s.addEventListener(d,l[d])},e.prototype.unbindBodyListener=function(e){e=e||I();var t=this.bodyModeListeners;for(var n in t)e.removeEventListener(n,t[n])}}((q=B=function(e){function t(e){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(n=k(this,_(t).call(this,e))).state={uuid:e.uuid||"t"+d(),place:e.place||"top",desiredPlace:e.place||"top",type:"dark",effect:"float",show:!1,border:!1,customColors:{},offset:{},extraClass:"",html:!1,delayHide:0,delayShow:0,event:e.event||null,eventOff:e.eventOff||null,currentEvent:null,currentTarget:null,ariaProps:F(e),isEmptyTip:!1,disable:!1,possibleCustomEvents:e.possibleCustomEvents||"",possibleCustomEventsOff:e.possibleCustomEventsOff||"",originTooltip:null,isMultiline:!1},n.bind(["showTooltip","updateTooltip","hideTooltip","hideTooltipOnScroll","getTooltipContent","globalRebuild","globalShow","globalHide","onWindowResize","mouseOnToolTip"]),n.mount=!0,n.delayShowLoop=null,n.delayHideLoop=null,n.delayReshow=null,n.intervalUpdateContent=null,n}return function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&w(e,t)}(t,e),v(t,null,[{key:"propTypes",get:function(){return{uuid:a.a.string,children:a.a.any,place:a.a.string,type:a.a.string,effect:a.a.string,offset:a.a.object,multiline:a.a.bool,border:a.a.bool,textColor:a.a.string,backgroundColor:a.a.string,borderColor:a.a.string,arrowColor:a.a.string,insecure:a.a.bool,class:a.a.string,className:a.a.string,id:a.a.string,html:a.a.bool,delayHide:a.a.number,delayUpdate:a.a.number,delayShow:a.a.number,event:a.a.string,eventOff:a.a.string,isCapture:a.a.bool,globalEventOff
2:a.a.string,getContent:a.a.any,afterShow:a.a.func,afterHide:a.a.func,overridePosition:a.a.func,disable:a.a.bool,scrollHide:a.a.bool,resizeHide:a.a.bool,wrapper:a.a.string,bodyMode:a.a.bool,possibleCustomEvents:a.a.string,possibleCustomEventsOff:a.a.string,clickable:a.a.bool}}}]),v(t,[{key:"bind",value:function(e){var t=this;e.forEach((function(e){t[e]=t[e].bind(t)}))}},{key:"componentDidMount",value:function(){var e=this.props,t=(e.insecure,e.resizeHide);this.bindListener(),this.bindWindowEvents(t)}},{key:"componentWillUnmount",value:function(){this.mount=!1,this.clearTimer(),this.unbindListener(),this.removeScrollListener(this.state.currentTarget),this.unbindWindowEvents()}},{key:"mouseOnToolTip",value:function(){return!(!this.state.show||!this.tooltipRef)&&(this.tooltipRef.matches||(this.tooltipRef.msMatchesSelector?this.tooltipRef.matches=this.tooltipRef.msMatchesSelector:this.tooltipRef.matches=this.tooltipRef.mozMatchesSelector),this.tooltipRef.matches(":hover"))}},{key:"getTargetArray",value:function(e){var t,n=[];if(e){var r=e.replace(/\\/g,"\\\\").replace(/"/g,'\\"');t='[data-tip][data-for="'.concat(r,'"]')}else t="[data-tip]:not([data-for])";return U(document.getElementsByTagName("*")).filter((function(e){return e.shadowRoot})).forEach((function(e){n=n.concat(U(e.shadowRoot.querySelectorAll(t)))})),n.concat(U(document.querySelectorAll(t)))}},{key:"bindListener",value:function(){var e=this,t=this.props,n=t.id,r=t.globalEventOff,i=t.isCapture,o=this.getTargetArray(n);o.forEach((function(t){null===t.getAttribute("currentItem")&&t.setAttribute("currentItem","false"),e.unbindBasicListener(t),e.isCustomEvent(t)&&e.customUnbindListener(t)})),this.isBodyMode()?this.bindBodyListener(o):o.forEach((function(t){var n=e.isCapture(t),r=e.getEffect(t);e.isCustomEvent(t)?e.customBindListener(t):(t.addEventListener("mouseenter",e.showTooltip,n),"float"===r&&t.addEventListener("mousemove",e.updateTooltip,n),t.addEventListener("mouseleave",e.hideTooltip,n))})),r&&(window.removeEventListener(r,this.hideTooltip),window.addEventListener(r,this.hideTooltip,i)),this.bindRemovalTracker()}},{key:"unbindListener",value:function(){var e=this,t=this.props,n=t.id,r=t.globalEventOff;this.isBodyMode()?this.unbindBodyListener():this.getTargetArray(n).forEac
2h((function(t){e.unbindBasicListener(t),e.isCustomEvent(t)&&e.customUnbindListener(t)})),r&&window.removeEventListener(r,this.hideTooltip),this.unbindRemovalTracker()}},{key:"unbindBasicListener",value:function(e){var t=this.isCapture(e);e.removeEventListener("mouseenter",this.showTooltip,t),e.removeEventListener("mousemove",this.updateTooltip,t),e.removeEventListener("mouseleave",this.hideTooltip,t)}},{key:"getTooltipContent",value:function(){var e,t=this.props,n=t.getContent,r=t.children;return n&&(e=Array.isArray(n)?n[0]&&n[0](this.state.originTooltip):n(this.state.originTooltip)),D(this.state.originTooltip,r,e,this.state.isMultiline)}},{key:"isEmptyTip",value:function(e){return"string"===typeof e&&""===e||null===e}},{key:"showTooltip",value:function(e,t){if(this.tooltipRef){if(t&&!this.getTargetArray(this.props.id).some((function(t){return t===e.currentTarget})))return;var n=this.props,r=n.multiline,i=n.getContent,o=e.currentTarget.getAttribute("data-tip"),a=e.currentTarget.getAttribute("data-multiline")||r||!1,s=e instanceof window.FocusEvent||t,u=!0;e.currentTarget.getAttribute("data-scroll-hide")?u="true"===e.currentTarget.getAttribute("data-scroll-hide"):null!=this.props.scrollHide&&(u=this.props.scrollHide);var c=e.currentTarget.getAttribute("data-place")||this.props.place||"top",l=s?"solid":this.getEffect(e.currentTarget),f=e.currentTarget.getAttribute("data-offset")||this.props.offset||{},h=j(e,e.currentTarget,this.tooltipRef,c,c,l,f);h.position&&this.props.overridePosition&&(h.position=this.props.overridePosition(h.position,e,e.currentTarget,this.tooltipRef,c,c,l,f));var d=h.isNewState?h.newState.place:c;this.clearTimer();var p=e.currentTarget,v=this.state.show?p.getAttribute("data-delay-update")||this.props.delayUpdate:0,y=this,m=function(){y.setState({originTooltip:o,isMultiline:a,desiredPlace:c,place:d,type:p.getAttribute("data-type")||y.props.type||"dark",customColors:{text:p.getAttribute("data-text-color")||y.props.textColor||null,background:p.getAttribute("data-background-color")||y.props.backgroundColor||null,border:p.getAttribute("data-border-color")||y.props.borderColor||null,arrow:p.getAttribute("data-arrow-color")||y.props.arrowColor||null},effect:l,offset:f,html:(p.getAttribute("data-html")?"true"===p.getAttribute("data-html"):y.props.html)||!1,delayShow:p.getAttribute("data-delay-show")||y.props.delayShow||0,delayHide:p.getAttribute("data-delay-hide")||y.props.delayHide||0,delayUpdate:p.getAttribute("data-delay-update")||y.props.delayUpdate||0,border:(p.getAttribute("data-border")?"true"===p.getAttribute("data-border"):y.props.border)||!1,extraClass:p.getAttribute("data-class")||y.props.class||y.props.className||"",disable:(p.getAttribute("data-tip-disable")?"true"===p.getAttribute("data-tip-disable"):y.props.disable)||!1,currentTarget:p},(function(){u&&y.addScrollListener(y.state.currentTarget),y.updateTooltip(e),i&&Array.isArray(i)&&(y.intervalUpdateContent=setInterval((function(){if(y.mount){var e=y.props.getContent,t=D(o,"",e[0](),a),n=y.isEmptyTip(t);y.setState({isEmptyTip:n}),y.updatePosition()}}),i[1]))}))};v?this.delayReshow=setTimeout(m,v):m()}}},{key:"updateTooltip",value:function(e){var t=this,n=this.state,r=n.delayShow,i=n.disable,o=this.props.afterShow,a=this.getTooltipContent(),s=parseInt(r,10),u=e.currentTarget||e.target;if(!this.mouseOnToolTip()&&!this.isEmptyTip(a)&&!i){var c=function(){if(Array.isArray(a)&&a.length>0||a){var n=!t.state.show;t.setState({currentEvent:e,currentTarget:u,show:!0},(function(){t.updatePosition(),n&&o&&o(e)}))}};clearTimeout(this.delayShowLoop),r?this.delayShowLoop=setTimeout(c,s):c()}}},{key:"listenForTooltipExit",value:function(){this.state.show&&this.tooltipRef&&this.tooltipRef.addEventListener("mouseleave",this.hideTooltip)}},{key:"removeListenerForTooltipExit",value:function(){this.state.show&&this.tooltipRef&&this.tooltipRef.removeEventListener("mouseleave",this.hideTooltip)}},{key:"hideTooltip",value:function(e,t){var n=this,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{isScroll:!1},i=this.state.disable,o=r.isScroll,a=o?0:this.state.delayHide,s=this.props.afterHide,u=this.getTooltipContent();if(this.mount&&!this.isEmptyTip(u)&&!i){if(t){var c=this.getTargetArray(this.props.id),l=c.some((function(t){return t===e.currentTarget}));if(!l||!this.state.show)return}var f=function(){var t=n.state.show;n.mouseOnToolTip()?n.listenForTooltipExit():(n.removeListenerForTooltipExit(),n.setState({show:!1},(function(){n.removeScrollListener(n.state.currentTarget),t&&s&&s(e)})))};this.clearTimer(),a?this.delayHideLoop=setTimeout(f,parseInt(a,10)):f()}}},{key:"hideTooltipOnScroll",value:function(e,t){this.hideTooltip(e,t,{isScroll:!0})}},{key:"addScrollListener",value:function(e){var t=this.isCapture(e);window.addEventListener("scroll",this.hideTooltipOnScroll,t)}},{key:"removeScrollListener",value:function(e){var t=this.isCapture(e);window.removeEventListener("scroll",this.hideTooltipOnScroll,t)}},{key:"updatePosition",value:function(){var e=this,t=this.state,n=t.currentEvent,r=t.currentTarget,i=t.place,o=t.desiredPlace,a=t.effect,s=t.offset,u=this.tooltipRef,c=j(n,r,u,i,o,a,s);if(c.position&&this.props.overridePosition&&(c.position=this.props.overridePosition(c.position,n,r,u,i,o,a,s)),c.isNewState)return this.setState(c.newState,(function(){e.updatePosition()}));u.style.left=c.position.left+"px",u.style.top=c.position.top+"px"}},{key:"clearTimer",value:function(){clearTimeout(this.delayShowLoop),clearTimeout(this.delayHideLoop),clearTimeout(this.delayReshow),clearInterval(this.intervalUpdateContent)}},{key:"hasCustomColors",value:function(){var e=this;return Boolean(Object.keys(this.state.customColors).find((function(t){return"border"!==t&&e.state.customColors[t]}))||this.state.border&&this.state.customColors.border)}},{key:"render",value:function(){var e=this,n=this.state,r=n.extraClass,o=n.html,a=n.ariaProps,s=n.disable,u=this.getTooltipContent(),c=this.isEmptyTip(u),l=z(this.state.uuid,this.state.customColors,this.state.type,this.state.border),f="__react_component_tooltip"+" ".concat(this.state.uuid)+(!this.state.show||s||c?"":" show")+(this.state.border?" border":"")+" place-".concat(this.state.place)+" type-".concat(this.hasCustomColors()?"custom"
2:this.state.type)+(this.props.delayUpdate?" allow_hover":"")+(this.props.clickable?" allow_click":""),h=this.props.wrapper;t.supportedWrappers.indexOf(h)<0&&(h=t.defaultProps.wrapper);var d=[f,r].filter(Boolean).join(" ");if(o){var p="".concat(u,"\n<style>").concat(l,"</style>");return i.a.createElement(h,m({className:"".concat(d),id:this.props.id,ref:function(t){return e.tooltipRef=t}},a,{"data-id":"tooltip",dangerouslySetInnerHTML:{__html:p}}))}return i.a.createElement(h,m({className:"".concat(d),id:this.props.id},a,{ref:function(t){return e.tooltipRef=t},"data-id":"tooltip"}),i.a.createElement("style",{dangerouslySetInnerHTML:{__html:l}}),u)}}],[{key:"getDerivedStateFromProps",value:function(e,t){var n=t.ariaProps,r=F(e);return Object.keys(r).some((function(e){return r[e]!==n[e]}))?b({},t,{ariaProps:r}):null}}]),t}(i.a.Component),y(B,"defaultProps",{insecure:!0,resizeHide:!0,wrapper:"div",clickable:!1}),y(B,"supportedWrappers",["div","span"]),y(B,"displayName","ReactTooltip"),(H=V=q).prototype.bindRemovalTracker=function(){var e=this,t=window.MutationObserver||window.WebKitMutationObserver||window.MozMutationObserver;if(null!=t){var n=new t((function(t){for(var n=0;n<t.length;n++)for(var r=t[n],i=0;i<r.removedNodes.length;i++)if(r.removedNodes[i]===e.state.currentTarget)return void e.hideTooltip()}));n.observe(window.document,{childList:!0,subtree:!0}),this.removalTracker=n}},V=void(H.prototype.unbindRemovalTracker=function(){this.removalTracker&&(this.removalTracker.disconnect(),this.removalTracker=null)})||V))||V)||V)||V)||V)||V)||V;t.a=G},function(e,t,n){"use strict";var r=a(n(23)),i=a(n(24)),o=a(n(157));function a(e){return e&&e.__esModule?e:{default:e}}function s(e,t){return[(new Date).toISOString()+" Chat "+e+":"].concat((0,o.default)(t))}Object.defineProperty(t,"__esModule",{value:!0});var u=n(76).getLogger("twilio-chat"),c=function(){function e(t){(0,r.default)(this,e),this.prefix="",this.prefix=null!==t&&void 0!==t&&t.length>0?t+" ":""}return(0,i.default)(e,[{key:"setLevel",value:function(e){u.setLevel(e)}},{key:"trace",value:function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];u.trace.apply(null,s(this.prefix+"T",t))}},{key:"debug",value:function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];u.debug.apply(null,s(this.prefix+"D",t))}},{key:"info",value:function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];u.info.apply(null,s(this.prefix+"I",t))}},{key:"warn",value:function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];u.warn.apply(null,s(this.prefix+"W",t))}},{key:"error",value:function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];u.error.apply(null,s(this.prefix+"E",t))}}],[{key:"scope",value:function(t){return new e(t)}},{key:"setLevel",value:function(e){u.setLevel(e)}},{key:"trace",value:function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];u.trace.apply(null,s("T",t))}},{key:"debug",value:function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];u.debug.apply(null,s("D",t))}},{key:"info",value:function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];u.info.apply(null,s("I",t))}},{key:"warn",value:function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];u.warn.apply(null,s("W",t))}},{key:"error",value:function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];u.error.apply(null,s("E",t))}}]),e}();t.Logger=c},function(e,t,n){"use strict";var r=a(n(23)),i=a(n(24)),o=a(n(82));function a(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var s=n(505);t.isDeepEqual=function(e,t){return 0===s.createPatch(e,t).length},t.deepClone=function(e){return JSON.parse((0,o.default)(e))},t.parseToNumber=function(e){return"undefined"===typeof e||isNaN(Number(e))?null:Number(e)},t.parseTime=function(e){try{return new Date(e)}catch(t){return null}},t.parseAttributes=function(e,t,n){var r={};if(e)try{r=JSON.parse(e)}catch(i){n.warn(t,i)}return r};var u=function(){function e(t){(0,r.default)(this,e),this.base=t.replace(/\/$/,""),this.args=[],this.paths=[]}return(0,i.default)(e,[{key:"arg",value:function(e,t){return"undefined"!==typeof t&&this.args.push(encodeURIComponent(e)+"="+encodeURIComponent(t)),this}},{key:"path",value:function(e){return this.paths.push(encodeURIComponent(e)),this}},{key:"build",value:function(){var e=this.base;return this.paths.length&&(e+="/"+this.paths.join("/")),this.args.length&&(e+="?"+this.args.join("&")),e}}]),e}();t.UriBuilder=u},function(e,t,n){"use strict";!function e(){if("undefined"!==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"===typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE)try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}(),e.exports=n(308)},function(e,t,n){"use strict";n.d(t,"a",(function(){return S})),n.d(t,"b",(function(){return x})),n.d(t,"d",(function(){return j})),n.d(t,"c",(function(){return v})),n.d(t,"f",(function(){return y}
vendor: 6,253 bytes, line 2
2)),n.d(t,"e",(function(){return p}));var r=n(7);function i(e){return"/"===e.charAt(0)}function o(e,t){for(var n=t,r=n+1,i=e.length;r<i;n+=1,r+=1)e[n]=e[r];e.pop()}var a=function(e,t){void 0===t&&(t="");var n,r=e&&e.split("/")||[],a=t&&t.split("/")||[],s=e&&i(e),u=t&&i(t),c=s||u;if(e&&i(e)?a=r:r.length&&(a.pop(),a=a.concat(r)),!a.length)return"/";if(a.length){var l=a[a.length-1];n="."===l||".."===l||""===l}else n=!1;for(var f=0,h=a.length;h>=0;h--){var d=a[h];"."===d?o(a,h):".."===d?(o(a,h),f++):f&&(o(a,h),f--)}if(!c)for(;f--;f)a.unshift("..");!c||""===a[0]||a[0]&&i(a[0])||a.unshift("");var p=a.join("/");return n&&"/"!==p.substr(-1)&&(p+="/"),p};function s(e){return e.valueOf?e.valueOf():Object.prototype.valueOf.call(e)}var u=function e(t,n){if(t===n)return!0;if(null==t||null==n)return!1;if(Array.isArray(t))return Array.isArray(n)&&t.length===n.length&&t.every((function(t,r){return e(t,n[r])}));if("object"===typeof t||"object"===typeof n){var r=s(t),i=s(n);return r!==t||i!==n?e(r,i):Object.keys(Object.assign({},t,n)).every((function(r){return e(t[r],n[r])}))}return!1},c=n(51);function l(e){return"/"===e.charAt(0)?e:"/"+e}function f(e){return"/"===e.charAt(0)?e.substr(1):e}function h(e,t){return function(e,t){return 0===e.toLowerCase().indexOf(t.toLowerCase())&&-1!=="/?#".indexOf(e.charAt(t.length))}(e,t)?e.substr(t.length):e}function d(e){return"/"===e.charAt(e.length-1)?e.slice(0,-1):e}function p(e){var t=e.pathname,n=e.search,r=e.hash,i=t||"/";return n&&"?"!==n&&(i+="?"===n.charAt(0)?n:"?"+n),r&&"#"!==r&&(i+="#"===r.charAt(0)?r:"#"+r),i}function v(e,t,n,i){var o;"string"===typeof e?(o=function(e){var t=e||"/",n="",r="",i=t.indexOf("#");-1!==i&&(r=t.substr(i),t=t.substr(0,i));var o=t.indexOf("?");return-1!==o&&(n=t.substr(o),t=t.substr(0,o)),{pathname:t,search:"?"===n?"":n,hash:"#"===r?"":r}}(e)).state=t:(void 0===(o=Object(r.a)({},e)).pathname&&(o.pathname=""),o.search?"?"!==o.search.charAt(0)&&(o.search="?"+o.search):o.search="",o.hash?"#"!==o.hash.charAt(0)&&(o.hash="#"+o.hash):o.hash="",void 0!==t&&void 0===o.state&&(o.state=t));try{o.pathname=decodeURI(o.pathname)}catch(s){throw s instanceof URIError?new URIError('Pathname "'+o.pathname+'" could not be decoded. This is likely caused by an invalid percent-encoding.'):s}return n&&(o.key=n),i?o.pathname?"/"!==o.pathname.charAt(0)&&(o.pathname=a(o.pathname,i.pathname)):o.pathname=i.pathname:o.pathname||(o.pathname="/"),o}function y(e,t){return e.pathname===t.pathname&&e.search===t.search&&e.hash===t.hash&&e.key===t.key&&u(e.state,t.state)}function m(){var e=null;var t=[];return{setPrompt:function(t){return e=t,function(){e===t&&(e=null)}},confirmTransitionTo:function(t,n,r,i){if(null!=e){var o="function"===typeof e?e(t,n):e;"string"===typeof o?"function"===typeof r?r(o,i):i(!0):i(!1!==o)}else i(!0)},appendListener:function(e){var n=!0;function r(){n&&e.apply(void 0,arguments)}return t.push(r),function(){n=!1,t=t.filter((function(e){return e!==r}))}},notifyListeners:function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];t.forEach((function(e){return e.apply(void 0,n)}))}}}var g=!("undefined"===typeof window||!window.document||!window.document.createElement);function b(e,t){t(window.confirm(e))}var _="popstate",w="hashchange";function k(){try{return window.history.state||{}}catch(e){return{}}}function S(e){void 0===e&&(e={}),g||Object(c.a)(!1);var t=window.history,n=function(){var e=window.navigator.userAgent;return(-1===e.indexOf("Android 2.")&&-1===e.indexOf("Android 4.0")||-1===e.indexOf("Mobile Safari")||-1!==e.indexOf("Chrome")||-1!==e.indexOf("Windows Phone"))&&window.history&&"pushState"in window.history}(),i=!(-1===window.navigator.userAgent.indexOf("Trident")),o=e,a=o.forceRefresh,s=void 0!==a&&a,u=o.getUserConfirmation,f=void 0===u?b:u,y=o.keyLength,S=void 0===y?6:y,O=e.basename?d(l(e.basename)):"";function E(e){var t=e||{},n=t.key,r=t.state,i=window.location,o=i.pathname+i.search+i.hash;return O&&(o=h(o,O)),v(o,r,n)}function T(){return Math.random().toString(36).substr(2,S)}var C=m();function P(e){Object(r.a)(V,e),V.length=t.length,C.notifyListeners(V.location,V.action)}function x(e){(function(e){return void 0===e.state&&-1===navigator.userAgent.indexOf("CriOS")})(e)||R(E(e.state))}function I(){R(E(k()))}var j=!1;function R(e){if(j)j=!1,P();else{C.confirmTransitionTo(e,"POP",f,(function(t){t?P({action:"POP",location:e}):function(e){var t=V.location,n=M.indexOf(t.key);-1===n&&(n=0);var r=M.indexOf(e.key);-1===r&&(r=0);var i=n-r;i&&(j=!0,L(i))}(e)}))}}var A=E(k()),M=[A.key];function N(e){return O+p(e)}function L(e){t.go(e)}var D=0;function F(e){1===(D+=e)&&1===e?(window.addEventListener(_,x),i&&window.addEventListener(w,I)):0===D&&(window.removeEventListener(_,x),i&&window.removeEventListener(w,I))}var U=!1;var V={length:t.length,action:"POP",location:A,createHref:N,push:function(e,r){var i="PUSH",o=v(e,r,T(),V.location);C.confirmTransitionTo(o,i,f,(function(e){if(e){var r=N(o),a=o.key,u=o.state;if(n)if(t.pushState({key:a,state:u},null,r),s)window.location.href=r;else{var c=M.indexOf(V.location.key),l=M.slice(0,c+1);l.push(o.key),M=l,P({action:i,location:o})}else window.location.href=r}}))},replace:function(e,r){var i="REPLACE",o=v(e,r,T(),V.location);C.confirmTransitionTo(o,i,f,(function(e){if(e){var r=N(o),a=o.key,u=o.state;if(n)if(t.replaceState({key:a,state:u},null,r),s)window.location.replace(r);else{var c=M.indexOf(V.location.key);-1!==c&&(M[c]=o.key),P({action:i,location:o})}else window.location.replace(r)}}))},go:L,goBack:function(){L(-1)},goForward:function(){L(1)},block:function(e){void 0===e&&(e=!1);var t=C.setPrompt(e);return U||(F(1),U=!0),function(){return U&&(U=!1,F(-1)),t()}},listen:function(e){var t=C.appendListener(e);return F(1),function(){F(-1),t()}}};return V}var O="hashchange",E={hashbang:{encodePath:function(e){return"!"===e.charAt(0)?e:"!/"+f(e)},decodePath:function(e){return"!"===e.charAt(0)?e.substr(1):e}},noslash:{encodePath:f,decodePath:l},slash:{encodePath:l,decodePath:l}};function T(e){var t=e.indexOf("#");return-1===t?e:e.slice(0,t)}function C(){var e=window.location.href,t=e.indexOf("#");return-1===t?"":e.substring(t+1)}function P(e){window.location.replace(T(window.location.href)+"#"+e)}function x(e){void 0===e&&(e={}
vendor: 4,415 bytes, line 2
2),g||Object(c.a)(!1);var t=window.history,n=(window.navigator.userAgent.indexOf("Firefox"),e),i=n.getUserConfirmation,o=void 0===i?b:i,a=n.hashType,s=void 0===a?"slash":a,u=e.basename?d(l(e.basename)):"",f=E[s],y=f.encodePath,_=f.decodePath;function w(){var e=_(C());return u&&(e=h(e,u)),v(e)}var k=m();function S(e){Object(r.a)(V,e),V.length=t.length,k.notifyListeners(V.location,V.action)}var x=!1,I=null;function j(){var e,t,n=C(),r=y(n);if(n!==r)P(r);else{var i=w(),a=V.location;if(!x&&(t=i,(e=a).pathname===t.pathname&&e.search===t.search&&e.hash===t.hash))return;if(I===p(i))return;I=null,function(e){if(x)x=!1,S();else{var t="POP";k.confirmTransitionTo(e,t,o,(function(n){n?S({action:t,location:e}):function(e){var t=V.location,n=N.lastIndexOf(p(t));-1===n&&(n=0);var r=N.lastIndexOf(p(e));-1===r&&(r=0);var i=n-r;i&&(x=!0,L(i))}(e)}))}}(i)}}var R=C(),A=y(R);R!==A&&P(A);var M=w(),N=[p(M)];function L(e){t.go(e)}var D=0;function F(e){1===(D+=e)&&1===e?window.addEventListener(O,j):0===D&&window.removeEventListener(O,j)}var U=!1;var V={length:t.length,action:"POP",location:M,createHref:function(e){var t=document.querySelector("base"),n="";return t&&t.getAttribute("href")&&(n=T(window.location.href)),n+"#"+y(u+p(e))},push:function(e,t){var n="PUSH",r=v(e,void 0,void 0,V.location);k.confirmTransitionTo(r,n,o,(function(e){if(e){var t=p(r),i=y(u+t);if(C()!==i){I=t,function(e){window.location.hash=e}(i);var o=N.lastIndexOf(p(V.location)),a=N.slice(0,o+1);a.push(t),N=a,S({action:n,location:r})}else S()}}))},replace:function(e,t){var n="REPLACE",r=v(e,void 0,void 0,V.location);k.confirmTransitionTo(r,n,o,(function(e){if(e){var t=p(r),i=y(u+t);C()!==i&&(I=t,P(i));var o=N.indexOf(p(V.location));-1!==o&&(N[o]=t),S({action:n,location:r})}}))},go:L,goBack:function(){L(-1)},goForward:function(){L(1)},block:function(e){void 0===e&&(e=!1);var t=k.setPrompt(e);return U||(F(1),U=!0),function(){return U&&(U=!1,F(-1)),t()}},listen:function(e){var t=k.appendListener(e);return F(1),function(){F(-1),t()}}};return V}function I(e,t,n){return Math.min(Math.max(e,t),n)}function j(e){void 0===e&&(e={});var t=e,n=t.getUserConfirmation,i=t.initialEntries,o=void 0===i?["/"]:i,a=t.initialIndex,s=void 0===a?0:a,u=t.keyLength,c=void 0===u?6:u,l=m();function f(e){Object(r.a)(_,e),_.length=_.entries.length,l.notifyListeners(_.location,_.action)}function h(){return Math.random().toString(36).substr(2,c)}var d=I(s,0,o.length-1),y=o.map((function(e){return v(e,void 0,"string"===typeof e?h():e.key||h())})),g=p;function b(e){var t=I(_.index+e,0,_.entries.length-1),r=_.entries[t];l.confirmTransitionTo(r,"POP",n,(function(e){e?f({action:"POP",location:r,index:t}):f()}))}var _={length:y.length,action:"POP",location:y[d],index:d,entries:y,createHref:g,push:function(e,t){var r="PUSH",i=v(e,t,h(),_.location);l.confirmTransitionTo(i,r,n,(function(e){if(e){var t=_.index+1,n=_.entries.slice(0);n.length>t?n.splice(t,n.length-t,i):n.push(i),f({action:r,location:i,index:t,entries:n})}}))},replace:function(e,t){var r="REPLACE",i=v(e,t,h(),_.location);l.confirmTransitionTo(i,r,n,(function(e){e&&(_.entries[_.index]=i,f({action:r,location:i}))}))},go:b,goBack:function(){b(-1)},goForward:function(){b(1)},canGo:function(e){var t=_.index+e;return t>=0&&t<_.entries.length},block:function(e){return void 0===e&&(e=!1),l.setPrompt(e)},listen:function(e){return l.appendListener(e)}};return _}},,function(e,t,n){var r=n(59),i=n(233),o=n(141),a=Object.defineProperty;t.f=n(60)?Object.defineProperty:function(e,t,n){if(r(e),t=o(t,!0),r(n),i)try{return a(e,t,n)}catch(s){}if("get"in n||"set"in n)throw TypeError("Accessors not supported!");return"value"in n&&(e[t]=n.value),e}},function(e,t,n){var r=n(45);e.exports=function(e){if(!r(e))throw TypeError(e+" is not an object!");return e}},function(e,t,n){e.exports=!n(71)((function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a}))},function(e,t,n){"use strict";(function(e){n.d(t,"a",(function(){return nr})),n.d(t,"b",(function(){return rr})),n.d(t,"c",(function(){return ir})),n.d(t,"d",(function(){return or})),n.d(t,"e",(function(){return tr}));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)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)};function i(e){var t="function"===typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);
2if(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.")}var o,a="undefined"!==typeof globalThis?globalThis:"undefined"!==typeof window?window:"undefined"!==typeof e?e:"undefined"!==typeof self?self:{},s=s||{},u=a||self;function c(){}function l(e){var t=typeof e;return"object"!=t?t:e?Array.isArray(e)?"array":t:"null"}function f(e){var t=l(e);return"array"==t||"object"==t&&"number"==typeof e.length}function h(e){var t=typeof e;return"object"==t&&null!=e||"function"==t}var d="closure_uid_"+(1e9*Math.random()>>>0),p=0;function v(e,t,n){return e.call.apply(e.bind,arguments)}function y(e,t,n){if(!e)throw Error();if(2<arguments.length){var r=Array.prototype.slice.call(arguments,2);return function(){var n=Array.prototype.slice.call(arguments);return Array.prototype.unshift.apply(n,r),e.apply(t,n)}}return function(){return e.apply(t,arguments)}}function m(e,t,n){return(m=Function.prototype.bind&&-1!=Function.prototype.bind.toString().indexOf("native code")?v:y).apply(null,arguments)}function g(e,t){var n=Array.prototype.slice.call(arguments,1);return function(){var t=n.slice();return t.push.apply(t,arguments),e.apply(this,t)}}var b=Date.now;function _(e,t){function n(){}n.prototype=t.prototype,e.S=t.prototype,e.prototype=new n,e.prototype.constructor=e}function w(){this.j=this.j,this.i=this.i}w.prototype.j=!1,w.prototype.ja=function(){if(!this.j&&(this.j=!0,this.G(),0))(function(e){Object.prototype.hasOwnProperty.call(e,d)&&e[d]||(e[d]=++p)})(this)},w.prototype.G=function(){if(this.i)for(;this.i.length;)this.i.shift()()};var k=Array.prototype.indexOf?function(e,t){return Array.prototype.indexOf.call(e,t,void 0)}:function(e,t){if("string"===typeof e)return"string"!==typeof t||1!=t.length?-1:e.indexOf(t,0);for(var n=0;n<e.length;n++)if(n in e&&e[n]===t)return n;return-1},S=Array.prototype.forEach?function(e,t,n){Array.prototype.forEach.call(e,t,n)}:function(e,t,n){for(var r=e.length,i="string"===typeof e?e.split(""):e,o=0;o<r;o++)o in i&&t.call(n,i[o],o,e)};function O(e){return Array.prototype.concat.apply([],arguments)}function E(e){var t=e.length;if(0<t){for(var n=Array(t),r=0;r<t;r++)n[r]=e[r];return n}return[]}function T(e){return/^[\s\xa0]*$/.test(e)}var C,P=String.prototype.trim?function(e){return e.trim()}:function(e){return/^[\s\xa0]*([\s\S]*?)[\s\xa0]*$/.exec(e)[1]};function x(e,t){return-1!=e.indexOf(t)}function I(e,t){return e<t?-1:e>t?1:0}e:{var j=u.navigator;if(j){var R=j.userAgent;if(R){C=R;break e}}C=""}function A(e,t,n){for(var r in e)t.call(n,e[r],r,e)}function M(e){var t={};for(var n in e)t[n]=e[n];return t}var N="constructor hasOwnProperty isPrototypeOf propertyIsEnumerable toLocaleString toString valueOf".split(" ");function L(e,t){for(var n,r,i=1;i<arguments.length;i++){for(n in r=arguments[i])e[n]=r[n];for(var o=0;o<N.length;o++)n=N[o],Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}}function D(e){return D[" "](e),e}D[" "]=c;var F,U=x(C,"Opera"),V=x(C,"Trident")||x(C,"MSIE"),B=x(C,"Edge"),q=B||V,W=x(C,"Gecko")&&!(x(C.toLowerCase(),"webkit")&&!x(C,"Edge"))&&!(x(C,"Trident")||x(C,"MSIE"))&&!x(C,"Edge"),z=x(C.toLowerCase(),"webkit")&&!x(C,"Edge");function H(){var e=u.document;return e?e.documentMode:void 0}e:{var G="",K=function(){var e=C;return W?/rv:([^\);]+)(\)|;)/.exec(e):B?/Edge\/([\d\.]+)/.exec(e):V?/\b(?:MSIE|rv)[: ]([^\);]+)(\)|;)/.exec(e):z?/WebKit\/(\S+)/.exec(e):U?/(?:Version)[ \/]?(\S+)/.exec(e):void 0}();if(K&&(G=K?K[1]:""),V){var Y=H();if(null!=Y&&Y>parseFloat(G)){F=String(Y);break e}}F=G}var Q,$={};function X(e){return function(e,t){var n=$;return Object.prototype.hasOwnProperty.call(n,e)?n[e]:n[e]=t(e)}(e,(function(){for(var t=0,n=P(String(F)).split("."),r=P(String(e)).split("."),i=Math.max(n.length,r.length),o=0;0==t&&o<i;o++){var a=n[o]||"",s=r[o]||"";do{if(a=/(\d*)(\D*)(.*)/.exec(a)||["","","",""],s=/(\d*)(\D*)(.*)/.exec(s)||["","","",""],0==a[0].length&&0==s[0].length)break;t=I(0==a[1].length?0:parseInt(a[1],10),0==s[1].length?0:parseInt(s[1],10))||I(0==a[2].length,0==s[2].length)||I(a[2],s[2]),a=a[3],s=s[3]}while(0==t)}return 0<=t}))}if(u.document&&V){var J=H();Q=J||(parseInt(F,10)||void 0)}else Q=void 0;var Z=Q,ee=!V||9<=Number(Z),te=V&&!X("9"),ne=function(){if(!u.addEventListener||!Object.defineProperty)return!1;var e=!1,t=Object.defineProperty({},"passive",{get:function(){e=!0}});try{u.addEventListener("test",c,t),u.removeEventListener("test",c,t)}catch(n){}return e}();function re(e,t){this.type=e,this.a=this.target=t,this.defaultPrevented=!1}function ie(e,t){if(re.call(this,e?e.type:""),this.relatedTarget=this.a=this.target=null,this.button=this.screenY=this.screenX=this.clientY=this.clientX=0,this.key="",this.metaKey=this.shiftKey=this.altKey=this.ctrlKey=!1,this.pointerId=0,this.pointerType="",this.c=null,e){var n=this.type=e.type,r=e.changedTouches&&e.changedTouches.length?e.changedTouches[0]:null;if(this.target=e.target||e.srcElement,this.a=t,t=e.relatedTarget){if(W){e:{try{D(t.nodeName);var i=!0;break e}catch(o){}i=!1}i||(t=null)}}
2else"mouseover"==n?t=e.fromElement:"mouseout"==n&&(t=e.toElement);this.relatedTarget=t,r?(this.clientX=void 0!==r.clientX?r.clientX:r.pageX,this.clientY=void 0!==r.clientY?r.clientY:r.pageY,this.screenX=r.screenX||0,this.screenY=r.screenY||0):(this.clientX=void 0!==e.clientX?e.clientX:e.pageX,this.clientY=void 0!==e.clientY?e.clientY:e.pageY,this.screenX=e.screenX||0,this.screenY=e.screenY||0),this.button=e.button,this.key=e.key||"",this.ctrlKey=e.ctrlKey,this.altKey=e.altKey,this.shiftKey=e.shiftKey,this.metaKey=e.metaKey,this.pointerId=e.pointerId||0,this.pointerType="string"===typeof e.pointerType?e.pointerType:oe[e.pointerType]||"",this.c=e,e.defaultPrevented&&this.b()}}re.prototype.b=function(){this.defaultPrevented=!0},_(ie,re);var oe={2:"touch",3:"pen",4:"mouse"};ie.prototype.b=function(){ie.S.b.call(this);var e=this.c;if(e.preventDefault)e.preventDefault();else if(e.returnValue=!1,te)try{(e.ctrlKey||112<=e.keyCode&&123>=e.keyCode)&&(e.keyCode=-1)}catch(t){}};var ae="closure_listenable_"+(1e6*Math.random()|0),se=0;function ue(e,t,n,r,i){this.listener=e,this.proxy=null,this.src=t,this.type=n,this.capture=!!r,this.ca=i,this.key=++se,this.Y=this.Z=!1}function ce(e){e.Y=!0,e.listener=null,e.proxy=null,e.src=null,e.ca=null}function le(e){this.src=e,this.a={},this.b=0}function fe(e,t){var n=t.type;if(n in e.a){var r,i=e.a[n],o=k(i,t);(r=0<=o)&&Array.prototype.splice.call(i,o,1),r&&(ce(t),0==e.a[n].length&&(delete e.a[n],e.b--))}}function he(e,t,n,r){for(var i=0;i<e.length;++i){var o=e[i];if(!o.Y&&o.listener==t&&o.capture==!!n&&o.ca==r)return i}return-1}le.prototype.add=function(e,t,n,r,i){var o=e.toString();(e=this.a[o])||(e=this.a[o]=[],this.b++);var a=he(e,t,r,i);return-1<a?(t=e[a],n||(t.Z=!1)):((t=new ue(t,this.src,o,!!r,i)).Z=n,e.push(t)),t};var de="closure_lm_"+(1e6*Math.random()|0),pe={};function ve(e,t,n,r,i){if(r&&r.once)return me(e,t,n,r,i);if(Array.isArray(t)){for(var o=0;o<t.length;o++)ve(e,t[o],n,r,i);return null}return n=Ee(n),e&&e[ae]?e.va(t,n,h(r)?!!r.capture:!!r,i):ye(e,t,n,!1,r,i)}function ye(e,t,n,r,i,o){if(!t)throw Error("Invalid event type");var a=h(i)?!!i.capture:!!i;if(a&&!ee)return null;var s=Se(e);if(s||(e[de]=s=new le(e)),(n=s.add(t,n,r,a,o)).proxy)return n;if(r=function(){var e=ke,t=ee?function(n){return e.call(t.src,t.listener,n)}:function(n){if(!(n=e.call(t.src,t.listener,n)))return n};return t}(),n.proxy=r,r.src=e,r.listener=n,e.addEventListener)ne||(i=a),void 0===i&&(i=!1),e.addEventListener(t.toString(),r,i);else if(e.attachEvent)e.attachEvent(_e(t.toString()),r);else{if(!e.addListener||!e.removeListener)throw Error("addEventListener and attachEvent are unavailable.");e.addListener(r)}return n}function me(e,t,n,r,i){if(Array.isArray(t)){for(var o=0;o<t.length;o++)me(e,t[o],n,r,i);return null}return n=Ee(n),e&&e[ae]?e.wa(t,n,h(r)?!!r.capture:!!r,i):ye(e,t,n,!0,r,i)}function ge(e,t,n,r,i){if(Array.isArray(t))for(var o=0;o<t.length;o++)ge(e,t[o],n,r,i);else r=h(r)?!!r.capture:!!r,n=Ee(n),e&&e[ae]?(e=e.c,(t=String(t).toString())in e.a&&(-1<(n=he(o=e.a[t],n,r,i))&&(ce(o[n]),Array.prototype.splice.call(o,n,1),0==o.length&&(delete e.a[t],e.b--)))):e&&(e=Se(e))&&(t=e.a[t.toString()],e=-1,t&&(e=he(t,n,r,i)),(n=-1<e?t[e]:null)&&be(n))}function be(e){if("number"!==typeof e&&e&&!e.Y){var t=e.src;if(t&&t[ae])fe(t.c,e);else{var n=e.type,r=e.proxy;t.removeEventListener?t.removeEventListener(n,r,e.capture):t.detachEvent?t.detachEvent(_e(n),r):t.addListener&&t.removeListener&&t.removeListener(r),(n=Se(t))?(fe(n,e),0==n.b&&(n.src=null,t[de]=null)):ce(e)}}}function _e(e){return e in pe?pe[e]:pe[e]="on"+e}function we(e,t){var n=e.listener,r=e.ca||e.src;return e.Z&&be(e),n.call(r,t)}function ke(e,t){if(e.Y)return!0;if(!ee){if(!t)e:{t=["window","event"];for(var n=u,r=0;r<t.length;r++)if(null==(n=n[t[r]])){t=null;break e}t=n}return we(e,t=new ie(t,this))}return we(e,new ie(t,this))}function Se(e){return(e=e[de])instanceof le?e:null}var Oe="__closure_events_fn_"+(1e9*Math.random()>>>0);function Ee(e){return"function"==l(e)?e:(e[Oe]||(e[Oe]=function(t){return e.handleEvent(t)}),e[Oe])}function Te(){w.call(this),this.c=new le(this),this.J=this,this.C=null}function Ce(e,t,n,r){if(!(t=e.c.a[String(t)]))return!0;t=t.concat();for(var i=!0,o=0;o<t.length;++o){var a=t[o];if(a&&!a.Y&&a.capture==n){var s=a.listener,u=a.ca||a.src;a.Z&&fe(e.c,a),i=!1!==s.call(u,r)&&i}}return i&&!r.defaultPrevented}_(Te,w),Te.prototype[ae]=!0,(o=Te.prototype).addEventListener=function(e,t,n,r){ve(this,e,t,n,r)},o.removeEventListener=function(e,t,n,r){ge(this,e,t,n,r)},o.dispatchEvent=function(e){var t,n=this.C;if(n)for(t=[];n;n=n.C)t.push(n);n=this.J;var r=e.type||e;if("string"===typeof e)e=new re(e,n);else if(e instanceof re)e.target=e.target||n;else{var i=e;L(e=new re(r,n),i)}if(i=!0,t)for(var o=t.length-1;0<=o;o--){var a=e.a=t[o];i=Ce(a,r,!0,e)&&i}if(i=Ce(a=e.a=n,r,!0,e)&&i,i=Ce(a,r,!1,e)&&i,t)for(o=0;o<t.length;o++)i=Ce(a=e.a=t[o],r,!1,e)&&i;return i},o.G=function(){if(Te.S.G.call(this),this.c){var e,t=this.c;for(e in t.a){for(var n=t.a[e],r=0;r<n.length;r++)ce(n[r]);delete t.a[e],t.b--}}this.C=null},o.va=function(e,t,n,r){return this.c.add(String(e),t,!1,n,r)},o.wa=function(e,t,n,r){return this.c.add(String(e),t,!0,n,r)};var Pe=u.JSON.stringify;function xe(){this.b=this.a=null}var Ie,je=new(function(){function e(e,t,n){this.f=n,this.c=e,this.g=t,this.b=0,this.a=null}return e.prototype.get=function(){var e;return 0<this.b?(this.b--,e=this.a,this.a=e.next,e.next=null):e=this.c(),e},e}())((function(){return new Ae}),(function(e){e.reset()}),100);function Re(){var e=De,t=null;return e.a&&(t=e.a,e.a=e.a.next,e.a||(e.b=null),t.next=null),t}function Ae(){this.next=this.b=this.a=null}function Me(e){u.setTimeout((function(){throw e}
2),0)}function Ne(e,t){Ie||function(){var e=u.Promise.resolve(void 0);Ie=function(){e.then(Fe)}}(),Le||(Ie(),Le=!0),De.add(e,t)}xe.prototype.add=function(e,t){var n=je.get();n.set(e,t),this.b?this.b.next=n:this.a=n,this.b=n},Ae.prototype.set=function(e,t){this.a=e,this.b=t,this.next=null},Ae.prototype.reset=function(){this.next=this.b=this.a=null};var Le=!1,De=new xe;function Fe(){for(var e;e=Re();){try{e.a.call(e.b)}catch(n){Me(n)}var t=je;t.g(e),t.b<t.f&&(t.b++,e.next=t.a,t.a=e)}Le=!1}function Ue(e,t){Te.call(this),this.b=e||1,this.a=t||u,this.f=m(this.Ya,this),this.g=b()}function Ve(e){e.aa=!1,e.M&&(e.a.clearTimeout(e.M),e.M=null)}function Be(e,t,n){if("function"==l(e))n&&(e=m(e,n));else{if(!e||"function"!=typeof e.handleEvent)throw Error("Invalid listener argument");e=m(e.handleEvent,e)}return 2147483647<Number(t)?-1:u.setTimeout(e,t||0)}function qe(e){e.a=Be((function(){e.a=null,e.c&&(e.c=!1,qe(e))}),e.h);var t=e.b;e.b=null,e.g.apply(null,t)}_(Ue,Te),(o=Ue.prototype).aa=!1,o.M=null,o.Ya=function(){if(this.aa){var e=b()-this.g;0<e&&e<.8*this.b?this.M=this.a.setTimeout(this.f,this.b-e):(this.M&&(this.a.clearTimeout(this.M),this.M=null),this.dispatchEvent("tick"),this.aa&&(Ve(this),this.start()))}},o.start=function(){this.aa=!0,this.M||(this.M=this.a.setTimeout(this.f,this.b),this.g=b())},o.G=function(){Ue.S.G.call(this),Ve(this),delete this.a};var We=function(e){function t(t,n,r){var i=e.call(this)||this;return i.g=null!=r?t.bind(r):t,i.h=n,i.b=null,i.c=!1,i.a=null,i}return function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}(t,e),t.prototype.f=function(e){this.b=arguments,this.a?this.c=!0:qe(this)},t.prototype.G=function(){e.prototype.G.call(this),this.a&&(u.clearTimeout(this.a),this.a=null,this.c=!1,this.b=null)},t}(w);function ze(e){w.call(this),this.b=e,this.a={}}_(ze,w);var He=[];function Ge(e,t,n,r){Array.isArray(n)||(n&&(He[0]=n.toString()),n=He);for(var i=0;i<n.length;i++){var o=ve(t,n[i],r||e.handleEvent,!1,e.b||e);if(!o)break;e.a[o.key]=o}}function Ke(e){A(e.a,(function(e,t){this.a.hasOwnProperty(t)&&be(e)}),e),e.a={}}function Ye(){this.a=!0}function Qe(e,t,n,r){e.info((function(){return"XMLHTTP TEXT ("+t+"): "+function(e,t){if(!e.a)return t;if(!t)return null;try{var n=JSON.parse(t);if(n)for(e=0;e<n.length;e++)if(Array.isArray(n[e])){var r=n[e];if(!(2>r.length)){var i=r[1];if(Array.isArray(i)&&!(1>i.length)){var o=i[0];if("noop"!=o&&"stop"!=o&&"close"!=o)for(var a=1;a<i.length;a++)i[a]=""}}}return Pe(n)}catch(s){return t}}(e,n)+(r?" "+r:"")}))}ze.prototype.G=function(){ze.S.G.call(this),Ke(this)},ze.prototype.handleEvent=function(){throw Error("EventHandler.handleEvent not implemented")},Ye.prototype.info=function(){};var $e=null;function Xe(){return $e=$e||new Te}function Je(e){re.call(this,"serverreachability",e)}function Ze(e){var t=Xe();t.dispatchEvent(new Je(t,e))}function et(e){re.call(this,"statevent",e)}function tt(e){var t=Xe();t.dispatchEvent(new et(t,e))}function nt(e){re.call(this,"timingevent",e)}function rt(e,t){if("function"!=l(e))throw Error("Fn must not be null and must be a function");return u.setTimeout((function(){e()}),t)}_(Je,re),_(et,re),_(nt,re);var it={NO_ERROR:0,Za:1,gb:2,fb:3,bb:4,eb:5,hb:6,Da:7,TIMEOUT:8,kb:9},ot={ab:"complete",ob:"success",Ea:"error",Da:"abort",mb:"ready",nb:"readystatechange",TIMEOUT:"timeout",ib:"incrementaldata",lb:"progress",cb:"downloadprogress",pb:"uploadprogress"};function at(){}function st(e){var t;return(t=e.a)||(t=e.a={}),t}function ut(){}at.prototype.a=null;var ct,lt={OPEN:"a",$a:"b",Ea:"c",jb:"d"};function ft(){re.call(this,"d")}function ht(){re.call(this,"c")}function dt(){}function pt(e,t,n,r){this.g=e,this.c=t,this.f=n,this.T=r||1,this.J=new ze(this),this.P=vt,e=q?125:void 0,this.R=new Ue(e),this.B=null,this.b=!1,this.j=this.l=this.i=this.H=this.u=this.U=this.o=null,this.s=[],this.a=null,this.D=0,this.h=this.m=null,this.N=-1,this.A=!1,this.O=0,this.F=null,this.W=this.C=this.V=this.I=!1}_(ft,re),_(ht,re),_(dt,at),ct=new dt;var vt=45e3,yt={},mt={};function gt(e,t,n){e.H=1,e.i=Vt(Mt(t)),e.j=n,e.I=!0,bt(e,null)}function bt(e,t){e.u=b(),kt(e),e.l=Mt(e.i);var n=e.l,r=e.T;Array.isArray(r)||(r=[String(r)]),Zt(n.b,"t",r),e.D=0,e.a=Yn(e.g,e.g.C?t:null),0<e.O&&(e.F=new We(m(e.Ca,e,e.a),e.O)),Ge(e.J,e.a,"readystatechange",e.Wa),t=e.B?M(e.B):{},e.j?(e.m||(e.m="POST"),t["Content-Type"]="application/x-www-form-urlencoded",e.a.ba(e.l,e.m,e.j,t)):(e.m="GET",e.a.ba(e.l,e.m,null,t)),Ze(1),function(e,t,n,r,i,o){e.info((function(){if(e.a)if(o)for(var a="",s=o.split("&"),u=0;u<s.length;u++){var c=s[u].split("=");if(1<c.length){var l=c[0];c=c[1];var f=l.split("_");a=2<=f.length&&"type"==f[1]?a+(l+"=")+c+"&":a+(l+"=redacted&")}}else a=null;else a=o;return"XMLHTTP REQ ("+r+") [attempt "+i+"]: "+t+"\n"+n+"\n"+a}))}(e.c,e.m,e.l,e.f,e.T,e.j)}function _t(e,t,n){for(var r=!0;!e.A&&e.D<n.length;){var i=wt(e,n);if(i==mt){4==t&&(e.h=4,tt(14),r=!1),Qe(e.c,e.f,null,"[Incomplete Response]");break}if(i==yt){e.h=4,tt(15),Qe(e.c,e.f,n,"[Invalid Chunk]"),r=!1;break}Qe(e.c,e.f,i,null),Ct(e,i)}4==t&&0==n.length&&(e.h=1,tt(16),r=!1),e.b=e.b&&r,r?0<n.length&&!e.W&&(e.W=!0,(t=e.g).a==e&&t.V&&!t.F&&(t.c.info("Great, no buffering proxy detected. Bytes received: "+n.length),Vn(t),t.F=!0)):(Qe(e.c,e.f,n,"[Invalid Chunked Response]"),Tt(e),Et(e))}function wt(e,t){var n=e.D,r=t.indexOf("\n",n);return-1==r?mt:(n=Number(t.substring(n,r)),isNaN(n)?yt:(r+=1)+n>t.length?mt:(t=t.substr(r,n),e.D=r+n,t))}function kt(e){e.U=b()+e.P,St(e,e.P)}function St(e,t){if(null!=e.o)throw Error("WatchDog timer not null");e.o=rt(m(e.Ua,e),t)}function Ot(e){e.o&&(u.clearTimeout(e.o),e.o=null)}function Et(e){0==e.g.v||e.A||Wn(e.g,e)}function Tt(e){Ot(e);var t=e.F;t&&"function"==typeof t.ja&&t.ja(),e.F=null,Ve(e.R),Ke(e.J),e.a&&(t=e.a,e.a=null,t.abort(),t.ja())}function Ct(e,t){try{var n=e.g;if(0!=n.v&&(n.a==e||sn(n.b,e)))if(n.I=e.N,!e.C&&sn(n.b,e)&&3==n.v){try{var r=n.ka.a.parse(t)}catch(y){r=null}if(Array.isArray(r)&&3==r.length){var i=r;
vendor: 18,178 bytes, line 2
2if(0==i[0]){e:if(!n.j){if(n.a){if(!(n.a.u+3e3<e.u))break e;qn(n),jn(n)}Un(n),tt(18)}}else n.oa=i[1],0<n.oa-n.P&&37500>i[2]&&n.H&&0==n.o&&!n.m&&(n.m=rt(m(n.Ra,n),6e3));if(1>=an(n.b)&&n.ea){try{n.ea()}catch(y){}n.ea=void 0}}else Hn(n,11)}else if((e.C||n.a==e)&&qn(n),!T(t))for(t=r=n.ka.a.parse(t),r=0;r<t.length;r++)if(i=t[r],n.P=i[0],i=i[1],2==n.v)if("c"==i[0]){n.J=i[1],n.ga=i[2];var o=i[3];null!=o&&(n.ha=o,n.c.info("VER="+n.ha));var a=i[4];null!=a&&(n.pa=a,n.c.info("SVER="+n.pa));var s=i[5];if(null!=s&&"number"===typeof s&&0<s){var u=1.5*s;n.D=u,n.c.info("backChannelRequestTimeoutMs_="+u)}u=n;var c=e.a;if(c){var l=c.a?c.a.getResponseHeader("X-Client-Wire-Protocol"):null;if(l){var f=u.b;!f.a&&(x(l,"spdy")||x(l,"quic")||x(l,"h2"))&&(f.f=f.g,f.a=new Set,f.b&&(un(f,f.b),f.b=null))}if(u.A){var h=c.a?c.a.getResponseHeader("X-HTTP-Session-Id"):null;h&&(u.na=h,Ut(u.B,u.A,h))}}n.v=3,n.f&&n.f.ta(),n.V&&(n.N=b()-e.u,n.c.info("Handshake RTT: "+n.N+"ms"));var d=e;if((u=n).la=Kn(u,u.C?u.ga:null,u.fa),d.C){cn(u.b,d);var p=d,v=u.D;v&&p.setTimeout(v),p.o&&(Ot(p),kt(p)),u.a=d}else Fn(u);0<n.g.length&&Mn(n)}else"stop"!=i[0]&&"close"!=i[0]||Hn(n,7);else 3==n.v&&("stop"==i[0]||"close"==i[0]?"stop"==i[0]?Hn(n,7):In(n):"noop"!=i[0]&&n.f&&n.f.sa(i),n.o=0);Ze(4)}catch(y){}}function Pt(e,t){if(e.forEach&&"function"==typeof e.forEach)e.forEach(t,void 0);else if(f(e)||"string"===typeof e)S(e,t,void 0);else{if(e.L&&"function"==typeof e.L)var n=e.L();else if(e.K&&"function"==typeof e.K)n=void 0;else if(f(e)||"string"===typeof e){n=[];for(var r=e.length,i=0;i<r;i++)n.push(i)}else for(i in n=[],r=0,e)n[r++]=i;i=(r=function(e){if(e.K&&"function"==typeof e.K)return e.K();if("string"===typeof e)return e.split("");if(f(e)){for(var t=[],n=e.length,r=0;r<n;r++)t.push(e[r]);return t}for(r in t=[],n=0,e)t[n++]=e[r];return t}(e)).length;for(var o=0;o<i;o++)t.call(void 0,r[o],n&&n[o],e)}}function xt(e,t){this.b={},this.a=[],this.c=0;var n=arguments.length;if(1<n){if(n%2)throw Error("Uneven number of arguments");for(var r=0;r<n;r+=2)this.set(arguments[r],arguments[r+1])}else if(e)if(e instanceof xt)for(n=e.L(),r=0;r<n.length;r++)this.set(n[r],e.get(n[r]));else for(r in e)this.set(r,e[r])}function It(e){if(e.c!=e.a.length){for(var t=0,n=0;t<e.a.length;){var r=e.a[t];jt(e.b,r)&&(e.a[n++]=r),t++}e.a.length=n}if(e.c!=e.a.length){var i={};for(n=t=0;t<e.a.length;)jt(i,r=e.a[t])||(e.a[n++]=r,i[r]=1),t++;e.a.length=n}}function jt(e,t){return Object.prototype.hasOwnProperty.call(e,t)}(o=pt.prototype).setTimeout=function(e){this.P=e},o.Wa=function(e){e=e.target;var t=this.F;t&&3==Tn(e)?t.f():this.Ca(e)},o.Ca=function(e){try{if(e==this.a)e:{var t=Tn(this.a),n=this.a.ua(),r=this.a.X();if(!(3>t||3==t&&!q&&!this.a.$())){this.A||4!=t||7==n||Ze(8==n||0>=r?3:2),Ot(this);var i=this.a.X();this.N=i;var o=this.a.$();if(this.b=200==i,function(e,t,n,r,i,o,a){e.info((function(){return"XMLHTTP RESP ("+r+") [ attempt "+i+"]: "+t+"\n"+n+"\n"+o+" "+a}))}(this.c,this.m,this.l,this.f,this.T,t,i),this.b){if(this.V&&!this.C){t:{if(this.a){var a,s=this.a;if((a=s.a?s.a.getResponseHeader("X-HTTP-Initial-Response"):null)&&!T(a)){var u=a;break t}}u=null}if(!u){this.b=!1,this.h=3,tt(12),Tt(this),Et(this);break e}Qe(this.c,this.f,u,"Initial handshake response via X-HTTP-Initial-Response"),this.C=!0,Ct(this,u)}this.I?(_t(this,t,o),q&&this.b&&3==t&&(Ge(this.J,this.R,"tick",this.Va),this.R.start())):(Qe(this.c,this.f,o,null),Ct(this,o)),4==t&&Tt(this),this.b&&!this.A&&(4==t?Wn(this.g,this):(this.b=!1,kt(this)))}else 400==i&&0<o.indexOf("Unknown SID")?(this.h=3,tt(12)):(this.h=0,tt(13)),Tt(this),Et(this)}}}catch(c){}},o.Va=function(){if(this.a){var e=Tn(this.a),t=this.a.$();this.D<t.length&&(Ot(this),_t(this,e,t),this.b&&4!=e&&kt(this))}},o.cancel=function(){this.A=!0,Tt(this)},o.Ua=function(){this.o=null;var e=b();0<=e-this.U?(function(e,t){e.info((function(){return"TIMEOUT: "+t}))}(this.c,this.l),2!=this.H&&(Ze(3),tt(17)),Tt(this),this.h=2,Et(this)):St(this,this.U-e)},(o=xt.prototype).K=function(){It(this);for(var e=[],t=0;t<this.a.length;t++)e.push(this.b[this.a[t]]);return e},o.L=function(){return It(this),this.a.concat()},o.get=function(e,t){return jt(this.b,e)?this.b[e]:t},o.set=function(e,t){jt(this.b,e)||(this.c++,this.a.push(e)),this.b[e]=t},o.forEach=function(e,t){for(var n=this.L(),r=0;r<n.length;r++){var i=n[r],o=this.get(i);e.call(t,o,i,this)}};var Rt=/^(?:([^:/?#.]+):)?(?:\/\/(?:([^\\/?#]*)@)?([^\\/?#]*?)(?::([0-9]+))?(?=[\\/?#]|$))?([^?#]+)?(?:\?([^#]*))?(?:#([\s\S]*))?$/;function At(e,t){if(this.c=this.j=this.f="",this.h=null,this.i=this.g="",this.a=!1,e instanceof At){this.a=void 0!==t?t:e.a,Nt(this,e.f),this.j=e.j,Lt(this,e.c),Dt(this,e.h),this.g=e.g,t=e.b;var n=new Qt;n.c=t.c,t.a&&(n.a=new xt(t.a),n.b=t.b),Ft(this,n),this.i=e.i}else e&&(n=String(e).match(Rt))?(this.a=!!t,Nt(this,n[1]||"",!0),this.j=Bt(n[2]||""),Lt(this,n[3]||"",!0),Dt(this,n[4]),this.g=Bt(n[5]||"",!0),Ft(this,n[6]||"",!0),this.i=Bt(n[7]||"")):(this.a=!!t,this.b=new Qt(null,this.a))}function Mt(e){return new At(e)}function Nt(e,t,n){e.f=n?Bt(t,!0):t,e.f&&(e.f=e.f.replace(/:$/,""))}function Lt(e,t,n){e.c=n?Bt(t,!0):t}function Dt(e,t){if(t){if(t=Number(t),isNaN(t)||0>t)throw Error("Bad port number "+t);e.h=t}else e.h=null}function Ft(e,t,n){t instanceof Qt?(e.b=t,function(e,t){t&&!e.f&&($t(e),e.c=null,e.a.forEach((function(e,t){var n=t.toLowerCase();t!=n&&(Xt(this,t),Zt(this,n,e))}),e)),e.f=t}(e.b,e.a)):(n||(t=qt(t,Kt)),e.b=new Qt(t,e.a))}function Ut(e,t,n){e.b.set(t,n)}function Vt(e){return Ut(e,"zx",Math.floor(2147483648*Math.random()).toString(36)+Math.abs(Math.floor(2147483648*Math.random())^b()).toString(36)),e}function Bt(e,t){return e?t?decodeURI(e.replace(/%25/g,"%2525")):decodeURIComponent(e):""}function qt(e,t,n){return"string"===typeof e?(e=encodeURI(e).replace(t,Wt),n&&(e=e.replace(/%25([0-9a-fA-F]{2})/g,"%$1")),e):null}function Wt(e){return"%"+((e=e.charCodeAt(0))>>4&15).toString(16)+(15&e).toString(16)}At.prototype.toString=function(){var e=[],t=this.f;t&&e.push(qt(t,zt,!0),":");var n=this.c;return(n||"file"==t)&&(e.push("//"),(t=this.j)&&e.push(qt(t,zt,!0),"@"),e.push(encodeURIComponent(String(n)).replace(/%25([0-9a-fA-F]{2})/g,"%$1")),null!=(n=this.h)&&e.push(":",String(n))),(n=this.g)&&(this.c&&"/"!=n.charAt(0)&&e.push("/"),e.push(qt(n,"/"==n.charAt(0)?Gt:Ht,!0))),(n=this.b.toString())&&e.push("?",n),(n=this.i)&&e.push("#",qt(n,Yt)),e.join("")};var zt=/[#\/\?@]/g,Ht=/[#\?:]/g,Gt=/[#\?]/g,Kt=/[#\?@]/g,Yt=/#/g;function Qt(e,t){this.b=this.a=null,this.c=e||null,this.f=!!t}function $t(e){e.a||(e.a=new xt,e.b=0,e.c&&function(e,t){if(e){e=e.split("&");for(var n=0;n<e.length;n++){var r=e[n].indexOf("="),i=null;if(0<=r){var o=e[n].substring(0,r);i=e[n].substring(r+1)}else o=e[n];t(o,i?decodeURIComponent(i.replace(/\+/g," ")):"")}}}(e.c,(function(t,n){e.add(decodeURIComponent(t.replace(/\+/g," ")),n)})))}function Xt(e,t){$t(e),t=en(e,t),jt(e.a.b,t)&&(e.c=null,e.b-=e.a.get(t).length,jt((e=e.a).b,t)&&(delete e.b[t],e.c--,e.a.length>2*e.c&&It(e)))}function Jt(e,t){return $t(e),t=en(e,t),jt(e.a.b,t)}function Zt(e,t,n){Xt(e,t),0<n.length&&(e.c=null,e.a.set(en(e,t),E(n)),e.b+=n.length)}function en(e,t){return t=String(t),e.f&&(t=t.toLowerCase()),t}function tn(e,t){this.b=e,this.a=t}function nn(e){this.g=e||rn,u.PerformanceNavigationTiming?e=0<(e=u.performance.getEntriesByType("navigation")).length&&("hq"==e[0].nextHopProtocol||"h2"==e[0].nextHopProtocol):e=!!(u.ia&&u.ia.ya&&u.ia.ya()&&u.ia.ya().qb),this.f=e?this.g:1,this.a=null,1<this.f&&(this.a=new Set),this.b=null,this.c=[]}(o=Qt.prototype).add=function(e,t){$t(this),this.c=null,e=en(this,e);var n=this.a.get(e);return n||this.a.set(e,n=[]),n.push(t),this.b+=1,this},o.forEach=function(e,t){$t(this),this.a.forEach((function(n,r){S(n,(function(n){e.call(t,n,r,this)}),this)}),this)},o.L=function(){$t(this);for(var e=this.a.K(),t=this.a.L(),n=[],r=0;r<t.length;r++)for(var i=e[r],o=0;o<i.length;o++)n.push(t[r]);return n},o.K=function(e){$t(this);var t=[];if("string"===typeof e)Jt(this,e)&&(t=O(t,this.a.get(en(this,e))));else{e=this.a.K();for(var n=0;n<e.length;n++)t=O(t,e[n])}return t},o.set=function(e,t){return $t(this),this.c=null,Jt(this,e=en(this,e))&&(this.b-=this.a.get(e).length),this.a.set(e,[t]),this.b+=1,this},o.get=function(e,t){return e&&0<(e=this.K(e)).length?String(e[0]):t},o.toString=function(){if(this.c)return this.c;if(!this.a)return"";for(var e=[],t=this.a.L(),n=0;n<t.length;n++){var r=t[n],i=encodeURIComponent(String(r));r=this.K(r);for(var o=0;o<r.length;o++){var a=i;""!==r[o]&&(a+="="+encodeURIComponent(String(r[o]))),e.push(a)}}return this.c=e.join("&")};var rn=10;function on(e){return!!e.b||!!e.a&&e.a.size>=e.f}function an(e){return e.b?1:e.a?e.a.size:0}function sn(e,t){return e.b?e.b==t:!!e.a&&e.a.has(t)}function un(e,t){e.a?e.a.add(t):e.b=t}function cn(e,t){e.b&&e.b==t?e.b=null:e.a&&e.a.has(t)&&e.a.delete(t)}function ln(e){var t,n;if(null!=e.b)return e.c.concat(e.b.s);if(null!=e.a&&0!==e.a.size){var r=e.c;try{for(var o=i(e.a.values()),a=o.next();!a.done;a=o.next()){var s=a.value;r=r.concat(s.s)}}catch(u){t={error:u}}finally{try{a&&!a.done&&(n=o.return)&&n.call(o)}finally{if(t)throw t.error}}return r}return E(e.c)}function fn(){}function hn(){this.a=new fn}function dn(e,t,n){var r=n||"";try{Pt(e,(function(e,n){var i=e;h(e)&&(i=Pe(e)),t.push(r+n+"="+encodeURIComponent(i))}))}catch(i){throw t.push(r+"type="+encodeURIComponent("_badmap")),i}}function pn(e,t,n,r,i){try{t.onload=null,t.onerror=null,t.onabort=null,t.ontimeout=null,i(r)}catch(o){}}nn.prototype.cancel=function(){var e,t;if(this.c=ln(this),this.b)this.b.cancel(),this.b=null;else if(this.a&&0!==this.a.size){try{for(var n=i(this.a.values()),r=n.next();!r.done;r=n.next()){r.value.cancel()}}catch(o){e={error:o}}finally{try{r&&!r.done&&(t=n.return)&&t.call(n)}finally{if(e)throw e.error}}this.a.clear()}},fn.prototype.stringify=function(e){return u.JSON.stringify(e,void 0)},fn.prototype.parse=function(e){return u.JSON.parse(e,void 0)};var vn=u.JSON.parse;function yn(e){Te.call(this),this.headers=new xt,this.H=e||null,this.b=!1,this.s=this.a=null,this.B="",this.h=0,this.f="",this.g=this.A=this.l=this.u=!1,this.o=0,this.m=null,this.I=mn,this.D=this.F=!1}_(yn,Te);var mn="",gn=/^https?$/i,bn=["POST","PUT"];function _n(e){return"content-type"==e.toLowerCase()}function wn(e,t){e.b=!1,e.a&&(e.g=!0,e.a.abort(),e.g=!1),e.f=t,e.h=5,kn(e),On(e)}function kn(e){e.u||(e.u=!0,e.dispatchEvent("complete"),e.dispatchEvent("error"))}function Sn(e){if(e.b&&"undefined"!=typeof s&&(!e.s[1]||4!=Tn(e)||2!=e.X()))if(e.l&&4==Tn(e))Be(e.za,0,e);else if(e.dispatchEvent("readystatechange"),4==Tn(e)){e.b=!1;try{var t,n=e.X();e:switch(n){case 200:case 201:case 202:case 204:case 206:case 304:case 1223:var r=!0;break e;default:r=!1}if(!(t=r)){var i;if(i=0===n){var o=String(e.B).match(Rt)[1]||null;if(!o&&u.self&&u.self.location){var a=u.self.location.protocol;o=a.substr(0,a.length-1)}i=!gn.test(o?o.toLowerCase():"")}t=i}if(t)e.dispatchEvent("complete"),e.dispatchEvent("success");else{e.h=6;try{var c=2<Tn(e)?e.a.statusText:""}catch(l){c=""}e.f=c+" ["+e.X()+"]",kn(e)}}finally{On(e)}}}function On(e,t){if(e.a){En(e);var n=e.a,r=e.s[0]?c:null;e.a=null,e.s=null,t||e.dispatchEvent("ready");try{n.onreadystatechange=r}catch(i){}}}function En(e){e.a&&e.D&&(e.a.ontimeout=null),e.m&&(u.clearTimeout(e.m),e.m=null)}function Tn(e){return e.a?e.a.readyState:0}function Cn(e,t,n){e:{for(r in n){var r=!1;break e}r=!0}r||(n=function(e){var t="";return A(e,(function(e,n){t+=n,t+=":",t+=e,t+="\r\n"})),t}(n),"string"===typeof e?null!=n&&encodeURIComponent(String(n)):Ut(e,t,n))}function Pn(e,t,n){return n&&n.internalChannelParams&&n.internalChannelParams[e]||t}function xn(e){this.pa=0,this.g=[],this.c=new Ye,this.ga=this.la=this.B=this.fa=this.a=this.na=this.A=this.W=this.i=this.O=this.l=null,this.La=this.R=0,this.Ia=Pn("failFast",!1,e),this.H=this.m=this.j=this.h=this.f=null,this.T=!0,this.I=this.oa=this.P=-1,this.U=this.o=this.u=0,this.Fa=Pn("baseRetryDelayMs",5e3,e),this.Ma=Pn("retryDelaySeedMs",1e4,e),this.Ja=Pn("forwardChannelMaxRetries",2,e),this.ma=Pn("forwardChannelRequestTimeoutMs",2e4,e),this.Ka=e&&e.g||void 0,this.D=void 0,this.C=e&&e.supportsCrossDomainXhr||!1,this.J="",this.b=new nn(e&&e.concurrentRequestLimit),this.ka=new hn,this.da=e&&e.fastHandshake||!1,this.Ga=e&&e.b||!1,e&&e.f&&(this.c.a=!1),e&&e.forceLongPolling&&(this.T=!1),this.V=!this.da&&this.T&&e&&e.c||!1,this.ea=void 0,this.N=0,this.F=!1,this.s=null}function In(e){if(Rn(e),3==e.v){var t=e.R++,n=Mt(e.B);Ut(n,"SID",e.J),Ut(n,"RID",t),Ut(n,"TYPE","terminate"),Ln(e,n),(t=new pt(e,e.c,t,void 0)).H=2,t.i=Vt(Mt(n)),n=!1,u.navigator&&u.navigator.sendBeacon&&(n=u.navigator.sendBeacon(t.i.toString(),"")),!n&&u.Image&&((new Image).src=t.i,n=!0),n||(t.a=Yn(t.g,null),t.a.ba(t.i)),t.u=b(),kt(t)}Gn(e)}function jn(e){e.a&&(Vn(e),e.a.cancel(),e.a=null)}function Rn(e){jn(e),e.j&&(u.clearTimeout(e.j),e.j=null),qn(e),e.b.cancel(),e.h&&("number"===typeof e.h&&u.clearTimeout(e.h),e.h=null)}function An(e,t){e.g.push(new tn(e.La++,t)),3==e.v&&Mn(e)}function Mn(e){on(e.b)||e.h||(e.h=!0,Ne(e.Ba,e),e.u=0)}function Nn(e,t){var n;n=t?t.f:e.R++;var r=Mt(e.B);Ut(r,"SID",e.J),Ut(r,"RID",n),Ut(r,"AID",e.P),Ln(e,r),e.i&&e.l&&Cn(r,e.i,e.l),n=new pt(e,e.c,n,e.u+1),null===e.i&&(n.B=e.l),t&&(e.g=t.s.concat(e.g)),t=Dn(e,n,1e3),n.setTimeout(Math.round(.5*e.ma)+Math.round(.5*e.ma*Math.random())),un(e.b,n),gt(n,r,t)}function Ln(e,t){e.f&&Pt({},(function(e,n){Ut(t,n,e)}))}function Dn(e,t,n){n=Math.min(e.g.length,n);var r=e.f?m(e.f.Ha,e.f,e):null;e:for(var i=e.g,o=-1;;){var a=["count="+n];-1==o?0<n?(o=i[0].b,a.push("ofs="+o)):o=0:a.push("ofs="+o);for(var s=!0,u=0;u<n;u++){var c=i[u].b,l=i[u].a;if(0>(c-=o))o=Math.max(0,i[u].b-100),s=!1;else try{dn(l,a,"req"+c+"_")}catch(f){r&&r(l)}}if(s){r=a.join("&");break e}}return e=e.g.splice(0,n),t.s=e,r}function Fn(e){e.a||e.j||(e.U=1,Ne(e.Aa,e),e.o=0)}function Un(e){return!(e.a||e.j||3<=e.o)&&(e.U++,e.j=rt(m(e.Aa,e),zn(e,e.o)),e.o++,!0)}function Vn(e){null!=e.s&&(u.clearTimeout(e.s),e.s=null)}function Bn(e){e.a=new pt(e,e.c,"rpc",e.U),null===e.i&&(e.a.B=e.l),e.a.O=0;var t=Mt(e.la);Ut(t,"RID","rpc"),Ut(t,"SID",e.J),Ut(t,"CI",e.H?"0":"1"),Ut(t,"AID",e.P),Ln(e,t),Ut(t,"TYPE","xmlhttp"),e.i&&e.l&&Cn(t,e.i,e.l),e.D&&e.a.setTimeout(e.D);var n=e.a;e=e.ga,n.H=1,n.i=Vt(Mt(t)),n.j=null,n.I=!0,bt(n,e)}function qn(e){null!=e.m&&(u.clearTimeout(e.m),e.m=null)}function Wn(e,t){var n=null;if(e.a==t){qn(e),Vn(e),e.a=null;var r=2}else{if(!sn(e.b,t))return;n=t.s,cn(e.b,t),r=1}if(e.I=t.N,0!=e.v)if(t.b)if(1==r){n=t.j?t.j.length:0,t=b()-t.u;var i=e.u;(r=Xe()).dispatchEvent(new nt(r,n,t,i)),Mn(e)}else Fn(e);else if(3==(i=t.h)||0==i&&0<e.I||!(1==r&&function(e,t){return!(an(e.b)>=e.b.f-(e.h?1:0))&&(e.h?(e.g=t.s.concat(e.g),!0):!(1==e.v||2==e.v||e.u>=(e.Ia?0:e.Ja))&&(e.h=rt(m(e.Ba,e,t),zn(e,e.u)),e.u++,!0))}(e,t)||2==r&&Un(e)))switch(n&&0<n.length&&(t=e.b,t.c=t.c.concat(n)),i){case 1:Hn(e,5);break;case 4:Hn(e,10);break;case 3:Hn(e,6);break;default:Hn(e,2)}}function zn(e,t){var n=e.Fa+Math.floor(Math.random()*e.Ma);return e.f||(n*=2),n*t}function Hn(e,t){if(e.c.info("Error code "+t),2==t){var n=null;e.f&&(n=null);var r=m(e.Xa,e);n||(n=new At("//www.google.com/images/cleardot.gif"),u.location&&"http"==u.location.protocol||Nt(n,"https"),Vt(n)),function(e,t){var n=new Ye;if(u.Image){var r=new Image;r.onload=g(pn,n,r,"TestLoadImage: loaded",!0,t),r.onerror=g(pn,n,r,"TestLoadImage: error",!1,t),r.onabort=g(pn,n,r,"TestLoadImage: abort",!1,t),r.ontimeout=g(pn,n,r,"TestLoadImage: timeout",!1,t),u.setTimeout((function(){r.ontimeout&&r.ontimeout()}),1e4),r.src=e}else t(!1)}(n.toString(),r)}else tt(2);e.v=0,e.f&&e.f.ra(t),Gn(e),Rn(e)}function Gn(e){e.v=0,e.I=-1,e.f&&(0==ln(e.b).length&&0==e.g.length||(e.b.c.length=0,E(e.g),e.g.length=0),e.f.qa())}function Kn(e,t,n){var r=function(e){return e instanceof At?Mt(e):new At(e,void 0)}(n);if(""!=r.c)t&&Lt(r,t+"."+r.c),Dt(r,r.h);else{var i=u.location;r=function(e,t,n,r){var i=new At(null,void 0);return e&&Nt(i,e),t&&Lt(i,t),n&&Dt(i,n),r&&(i.g=r),i}(i.protocol,t?t+"."+i.hostname:i.hostname,+i.port,n)}return e.W&&A(e.W,(function(e,t){Ut(r,t,e)})),t=e.A,n=e.na,t&&n&&Ut(r,t,n),Ut(r,"VER",e.ha),Ln(e,r),r}function Yn(e,t){if(t&&!e.C)throw Error("Can't create secondary domain capable XhrIo object.");return(t=new yn(e.Ka)).F=e.C,t}function Qn(){}function $n(){if(V&&!(10<=Number(Z)))throw Error("Environmental error: no available transport.")}function Xn(e,t){Te.call(this),this.a=new xn(t),this.l=e,this.b=t&&t.messageUrlParams||null,e=t&&t.messageHeaders||null,t&&t.clientProtocolHeaderRequired&&(e?e["X-Client-Protocol"]="webchannel":e={"X-Client-Protocol":"webchannel"}),this.a.l=e,e=t&&t.initMessageHeaders||null,t&&t.messageContentType&&(e?e["X-WebChannel-Content-Type"]=t.messageContentType:e={"X-WebChannel-Content-Type":t.messageContentType}),t&&t.a&&(e?e["X-WebChannel-Client-Profile"]=t.a:e={"X-WebChannel-Client-Profile":t.a}),this.a.O=e,(e=t&&t.httpHeadersOverwriteParam)&&!T(e)&&(this.a.i=e),this.h=t&&t.supportsCrossDomainXhr||!1,this.g=t&&t.sendRawJson||!1,(t=t&&t.httpSessionIdParam)&&!T(t)&&(this.a.A=t,null!==(e=this.b)&&t in e&&(t in(e=this.b)&&delete e[t])),this.f=new er(this)}function Jn(e){ft.call(this);var t=e.__sm__;if(t){e:{for(var n in t){e=n;break e}e=void 0}(this.c=e)?(e=this.c,this.data=null!==t&&e in t?t[e]:void 0):this.data=t}else this.data=e}function Zn(){ht.call(this),this.status=1}function er(e){this.a=e}(o=yn.prototype).ba=function(e,t,n,r){if(this.a)throw Error("[goog.net.XhrIo] Object is active with another request="+this.B+"; newUri="+e);t=t?t.toUpperCase():"GET",this.B=e,this.f="",this.h=0,this.u=!1,this.b=!0,this.a=new XMLHttpRequest,this.s=this.H?st(this.H):st(ct),this.a.onreadystatechange=m(this.za,this);try{this.A=!0,this.a.open(t,String(e),!0),this.A=!1}catch(o){return void wn(this,o)}e=n||"";var i=new xt(this.headers);r&&Pt(r,(function(e,t){i.set(t,e)})),r=function(e){e:{for(var t=_n,n=e.length,r="string"===typeof e?e.split(""):e,i=0;i<n;i++)if(i in r&&t.call(void 0,r[i],i,e)){t=i;break e}t=-1}return 0>t?null:"string"===typeof e?e.charAt(t):e[t]}(i.L()),n=u.FormData&&e instanceof u.FormData,!(0<=k(bn,t))||r||n||i.set("Content-Type","application/x-www-form-urlencoded;
2charset=utf-8"),i.forEach((function(e,t){this.a.setRequestHeader(t,e)}),this),this.I&&(this.a.responseType=this.I),"withCredentials"in this.a&&this.a.withCredentials!==this.F&&(this.a.withCredentials=this.F);try{En(this),0<this.o&&((this.D=function(e){return V&&X(9)&&"number"===typeof e.timeout&&void 0!==e.ontimeout}(this.a))?(this.a.timeout=this.o,this.a.ontimeout=m(this.xa,this)):this.m=Be(this.xa,this.o,this)),this.l=!0,this.a.send(e),this.l=!1}catch(o){wn(this,o)}},o.xa=function(){"undefined"!=typeof s&&this.a&&(this.f="Timed out after "+this.o+"ms, aborting",this.h=8,this.dispatchEvent("timeout"),this.abort(8))},o.abort=function(e){this.a&&this.b&&(this.b=!1,this.g=!0,this.a.abort(),this.g=!1,this.h=e||7,this.dispatchEvent("complete"),this.dispatchEvent("abort"),On(this))},o.G=function(){this.a&&(this.b&&(this.b=!1,this.g=!0,this.a.abort(),this.g=!1),On(this,!0)),yn.S.G.call(this)},o.za=function(){this.j||(this.A||this.l||this.g?Sn(this):this.Ta())},o.Ta=function(){Sn(this)},o.X=function(){try{return 2<Tn(this)?this.a.status:-1}catch(e){return-1}},o.$=function(){try{return this.a?this.a.responseText:""}catch(e){return""}},o.Na=function(e){if(this.a){var t=this.a.responseText;return e&&0==t.indexOf(e)&&(t=t.substring(e.length)),vn(t)}},o.ua=function(){return this.h},o.Qa=function(){return"string"===typeof this.f?this.f:String(this.f)},(o=xn.prototype).ha=8,o.v=1,o.Ba=function(e){if(this.h)if(this.h=null,1==this.v){if(!e){this.R=Math.floor(1e5*Math.random()),e=this.R++;var t,n=new pt(this,this.c,e,void 0),r=this.l;if(this.O&&(r?L(r=M(r),this.O):r=this.O),null===this.i&&(n.B=r),this.da)e:{for(var i=t=0;i<this.g.length;i++){var o=this.g[i];if(void 0===(o="__data__"in o.a&&"string"===typeof(o=o.a.__data__)?o.length:void 0))break;if(4096<(t+=o)){t=i;break e}if(4096===t||i===this.g.length-1){t=i+1;break e}}t=1e3}else t=1e3;t=Dn(this,n,t),Ut(i=Mt(this.B),"RID",e),Ut(i,"CVER",22),this.A&&Ut(i,"X-HTTP-Session-Id",this.A),Ln(this,i),this.i&&r&&Cn(i,this.i,r),un(this.b,n),this.Ga&&Ut(i,"TYPE","init"),this.da?(Ut(i,"$req",t),Ut(i,"SID","null"),n.V=!0,gt(n,i,null)):gt(n,i,t),this.v=2}}else 3==this.v&&(e?Nn(this,e):0==this.g.length||on(this.b)||Nn(this))},o.Aa=function(){if(this.j=null,Bn(this),this.V&&!(this.F||null==this.a||0>=this.N)){var e=2*this.N;this.c.info("BP detection timer enabled: "+e),this.s=rt(m(this.Sa,this),e)}},o.Sa=function(){this.s&&(this.s=null,this.c.info("BP detection timeout reached."),this.c.info("Buffering proxy detected and switch to long-polling!"),this.H=!1,this.F=!0,jn(this),Bn(this))},o.Ra=function(){null!=this.m&&(this.m=null,jn(this),Un(this),tt(19))},o.Xa=function(e){e?(this.c.info("Successfully pinged google.com"),tt(2)):(this.c.info("Failed to ping google.com"),tt(1))},(o=Qn.prototype).ta=function(){},o.sa=function(){},o.ra=function(){},o.qa=function(){},o.Ha=function(){},$n.prototype.a=function(e,t){return new Xn(e,t)},_(Xn,Te),(o=Xn.prototype).addEventListener=function(e,t,n,r){Xn.S.addEventListener.call(this,e,t,n,r)},o.removeEventListener=function(e,t,n,r){Xn.S.removeEventListener.call(this,e,t,n,r)},o.Oa=function(){this.a.f=this.f,this.h&&(this.a.C=!0);var e=this.a,t=this.l,n=this.b||void 0;tt(0),e.fa=t,e.W=n||{},e.H=e.T,e.B=Kn(e,null,e.fa),Mn(e)},o.close=function(){In(this.a)},o.Pa=function(e){if("string"===typeof e){var t={};t.__data__=e,An(this.a,t)}else this.g?((t={}).__data__=Pe(e),An(this.a,t)):An(this.a,e)},o.G=function(){this.a.f=null,delete this.f,In(this.a),delete this.a,Xn.S.G.call(this)},_(Jn,ft),_(Zn,ht),_(er,Qn),er.prototype.ta=function(){this.a.dispatchEvent("a")},er.prototype.sa=function(e){this.a.dispatchEvent(new Jn(e))},er.prototype.ra=function(e){this.a.dispatchEvent(new Zn(e))},er.prototype.qa=function(){this.a.dispatchEvent("b")},$n.prototype.createWebChannel=$n.prototype.a,Xn.prototype.send=Xn.prototype.Pa,Xn.prototype.open=Xn.prototype.Oa,Xn.prototype.close=Xn.prototype.close,it.NO_ERROR=0,it.TIMEOUT=8,it.HTTP_ERROR=6,ot.COMPLETE="complete",ut.EventType=lt,lt.OPEN="a",lt.CLOSE="b",lt.ERROR="c",lt.MESSAGE="d",Te.prototype.listen=Te.prototype.va,yn.prototype.listenOnce=yn.prototype.wa,yn.prototype.getLastError=yn.prototype.Qa,yn.prototype.getLastErrorCode=yn.prototype.ua,yn.prototype.getStatus=yn.prototype.X,yn.prototype.getResponseJson=yn.prototype.Na,yn.prototype.getResponseText=yn.prototype.$,yn.prototype.send=yn.prototype.ba;var tr=function(){return new $n},nr=it,rr=ot,ir=ut,or=yn}).call(this,n(44))},function(e,t,n){e.exports={default:n(481),__esModule:!0}},function(e,t,n){"use strict";t.__esModule=!0;var r,i=n(249),o=(r=i)&&r.__esModule?r:{default:r};t.default=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==("undefined"===typeof t?"undefined":(0,o.default)(t))&&"function"!==typeof t?e:t}},function(e,t,n){"use strict";t.__esModule=!0;var r=a(n(253)),i=a(n(254)),o=a(n(249));
2function a(e){return e&&e.__esModule?e:{default:e}}t.default=function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+("undefined"===typeof t?"undefined":(0,o.default)(t)));e.prototype=(0,i.default)(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(r.default?(0,r.default)(e,t):e.__proto__=t)}},function(e,t,n){var r=n(78);e.exports=function(e,t,n){if(r(e),void 0===t)return e;switch(n){case 1:return function(n){return e.call(t,n)};case 2:return function(n,r){return e.call(t,n,r)};case 3:return function(n,r,i){return e.call(t,n,r,i)}}return function(){return e.apply(t,arguments)}}},function(e,t){function n(t){return e.exports=n=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},n(t)}e.exports=n},function(e,t,n){"use strict";var r=n(9),i=n(20),o=n(21),a=n(164);Object.defineProperty(t,"__esModule",{value:!0}),t.TwilsockError=void 0;var s=function(e){i(n,e);var t=o(n);function n(e){return r(this,n),t.call(this,e)}return n}(a(Error));t.TwilsockError=s},function(e,t,n){"use strict";t.a=function(e,t){}},function(e,t,n){"use strict";var r={};Object.defineProperties(r,{getStats:{enumerable:!0,value:n(364)},getUserMedia:{enumerable:!0,value:n(365)},MediaStream:{enumerable:!0,value:n(191)},MediaStreamTrack:{enumerable:!0,value:n(366)},RTCIceCandidate:{enumerable:!0,value:n(367)},RTCPeerConnection:{enumerable:!0,value:n(368)},RTCSessionDescription:{enumerable:!0,value:n(373)},version:{enumerable:!0,value:n(374).version}}),e.exports=r},function(e,t,n){var r=n(58),i=n(100);e.exports=n(60)?function(e,t,n){return r.f(e,t,i(1,n))}:function(e,t,n){return e[t]=n,e}},function(e,t){e.exports=function(e){try{return!!e()}catch(t){return!0}}},function(e,t,n){e.exports={default:n(516),__esModule:!0}},function(e,t,n){"use strict";var r=n(9),i=n(17);Object.defineProperty(t,"__esModule",{value:!0}),t.log=t.Logger=void 0;var o=n(76).getLogger("twilsock");function a(e,t){return["".concat((new Date).toISOString()," Twilsock ").concat(e,":")].concat(Array.from(t))}var s=function(){function e(t){r(this,e),this.prefix="",this.prefix=null!==t&&void 0!==t&&t.length>0?" "+t+":":""}return i(e,[{key:"setLevel",value:function(e){o.setLevel(e)}},{key:"trace",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];o.debug.apply(null,a("T",t))}},{key:"debug",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];o.debug.apply(null,a("D",t))}},{key:"info",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];o.info.apply(null,a("I",t))}},{key:"warn",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];o.warn.apply(null,a("W",t))}},{key:"error",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];o.error.apply(null,a("E",t))}}],[{key:"setLevel",value:function(e){o.setLevel(e)}},{key:"trace",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];o.trace.apply(null,a("T",t))}},{key:"debug",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];o.debug.apply(null,a("D",t))}},{key:"info",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];o.info.apply(null,a("I",t))}},{key:"warn",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];o.warn.apply(null,a("W",t))}},{key:"error",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];o.error.apply(null,a("E",t))}}]),e}();t.Logger=s;var u=new s("");t.log=u},function(e,t,n){"use strict";var r=n(9),i=n(20),o=n(21),a=n(164);Object.defineProperty(t,"__esModule",{value:!0}),t.SyncNetworkError=t.SyncError=void 0;var s=function(e){i(n,e);var t=o(n);function n(e){var i,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;return r(this,n),(i=t.call(this)).name=i.constructor.name,i.message="".concat(e," (status: ").concat(o,", code: ").concat(a,")"),i.status=o,i.code=a,i}return n}(a(Error));t.SyncError=s;var u=function(e){i(n,e);var t=o(n);function n(e){var i,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,s=arguments.length>3?arguments[3]:void 0;return r(this,n),(i=t.call(this,e,o,a)).body=s,i}return n}(s);t.SyncNetworkError=u,t.default=s},function(e,t,n){"use strict";
2Object.defineProperty(t,"__esModule",{value:!0});var r=n(76).getLogger("twilio-sync");function i(e,t){return["".concat((new Date).toISOString()," Sync ").concat(e,":")].concat(Array.from(t))}t.default={setLevel:function(e){r.setLevel(e)},trace:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];r.trace.apply(null,i("T",t))},debug:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];r.debug.apply(null,i("D",t))},info:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];r.info.apply(null,i("I",t))},warn:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];r.warn.apply(null,i("W",t))},error:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];r.error.apply(null,i("E",t))}}},function(e,t,n){var r,i;!function(o,a){"use strict";void 0===(i="function"===typeof(r=function(){var e=function(){},t="undefined",n=typeof window!==t&&typeof window.navigator!==t&&/Trident\/|MSIE /.test(window.navigator.userAgent),r=["trace","debug","info","warn","error"];function i(e,t){var n=e[t];if("function"===typeof n.bind)return n.bind(e);try{return Function.prototype.bind.call(n,e)}catch(r){return function(){return Function.prototype.apply.apply(n,[e,arguments])}}}function o(){console.log&&(console.log.apply?console.log.apply(console,arguments):Function.prototype.apply.apply(console.log,[console,arguments])),console.trace&&console.trace()}function a(r){return"debug"===r&&(r="log"),typeof console!==t&&("trace"===r&&n?o:void 0!==console[r]?i(console,r):void 0!==console.log?i(console,"log"):e)}function s(t,n){for(var i=0;i<r.length;i++){var o=r[i];this[o]=i<t?e:this.methodFactory(o,t,n)}this.log=this.debug}function u(e,n,r){return function(){typeof console!==t&&(s.call(this,n,r),this[e].apply(this,arguments))}}function c(e,t,n){return a(e)||u.apply(this,arguments)}function l(e,n,i){var o,a=this,u="loglevel";function l(e){var n=(r[e]||"silent").toUpperCase();if(typeof window!==t&&u){try{return void(window.localStorage[u]=n)}catch(i){}try{window.document.cookie=encodeURIComponent(u)+"="+n+";"}catch(i){}}}function f(){var e;if(typeof window!==t&&u){try{e=window.localStorage[u]}catch(i){}if(typeof e===t)try{var n=window.document.cookie,r=n.indexOf(encodeURIComponent(u)+"=");-1!==r&&(e=/^([^;]+)/.exec(n.slice(r))[1])}catch(i){}return void 0===a.levels[e]&&(e=void 0),e}}"string"===typeof e?u+=":"+e:"symbol"===typeof e&&(u=void 0),a.name=e,a.levels={TRACE:0,DEBUG:1,INFO:2,WARN:3,ERROR:4,SILENT:5},a.methodFactory=i||c,a.getLevel=function(){return o},a.setLevel=function(n,r){if("string"===typeof n&&void 0!==a.levels[n.toUpperCase()]&&(n=a.levels[n.toUpperCase()]),!("number"===typeof n&&n>=0&&n<=a.levels.SILENT))throw"log.setLevel() called with invalid level: "+n;if(o=n,!1!==r&&l(n),s.call(a,n,e),typeof console===t&&n<a.levels.SILENT)return"No console available for logging"},a.setDefaultLevel=function(e){f()||a.setLevel(e,!1)},a.enableAll=function(e){a.setLevel(a.levels.TRACE,e)},a.disableAll=function(e){a.setLevel(a.levels.SILENT,e)};var h=f();null==h&&(h=null==n?"WARN":n),a.setLevel(h,!1)}var f=new l,h={};f.getLogger=function(e){if("symbol"!==typeof e&&"string"!==typeof e||""===e)throw new TypeError("You must supply a name when creating a logger.");var t=h[e];return t||(t=h[e]=new l(e,f.getLevel(),f.methodFactory)),t};var d=typeof window!==t?window.log:void 0;return f.noConflict=function(){return typeof window!==t&&window.log===f&&(window.log=d),f},f.getLoggers=function(){return h},f.default=f,f})?r.call(t,n,t,e):r)||(e.exports=i)}()},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}function o(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var a=n(410),s={};
2t.createTwilioError=function(e,t){return t="string"===typeof t&&t?t:"Unknown error",s[e="number"===typeof e?e:0]?new s[e]:new a(e,t)};var u=function(e){function t(){return r(this,t),i(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,20101,"Invalid Access Token"))}return o(t,e),t}(a);t.AccessTokenInvalidError=u,Object.defineProperty(s,20101,{value:u});var c=function(e){function t(){return r(this,t),i(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,20102,"Invalid Access Token header"))}return o(t,e),t}(a);t.AccessTokenHeaderInvalidError=c,Object.defineProperty(s,20102,{value:c});var l=function(e){function t(){return r(this,t),i(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,20103,"Invalid Access Token issuer/subject"))}return o(t,e),t}(a);t.AccessTokenIssuerInvalidError=l,Object.defineProperty(s,20103,{value:l});var f=function(e){function t(){return r(this,t),i(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,20104,"Access Token expired or expiration date invalid"))}return o(t,e),t}(a);t.AccessTokenExpiredError=f,Object.defineProperty(s,20104,{value:f});var h=function(e){function t(){return r(this,t),i(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,20105,"Access Token not yet valid"))}return o(t,e),t}(a);t.AccessTokenNotYetValidError=h,Object.defineProperty(s,20105,{value:h});var d=function(e){function t(){return r(this,t),i(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,20106,"Invalid Access Token grants"))}return o(t,e),t}(a);t.AccessTokenGrantsInvalidError=d,Object.defineProperty(s,20106,{value:d});var p=function(e){function t(){return r(this,t),i(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,20107,"Invalid Access Token signature"))}return o(t,e),t}(a);t.AccessTokenSignatureInvalidError=p,Object.defineProperty(s,20107,{value:p});var v=function(e){function t(){return r(this,t),i(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,53e3,"Signaling connection error"))}return o(t,e),t}(a);t.SignalingConnectionError=v,Object.defineProperty(s,53e3,{value:v});var y=function(e){function t(){return r(this,t),i(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,53001,"Signaling connection disconnected"))}return o(t,e),t}(a);t.SignalingConnectionDisconnectedError=y,Object.defineProperty(s,53001,{value:y});var m=function(e){function t(){return r(this,t),i(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,53002,"Signaling connection timed out"))}return o(t,e),t}(a);t.SignalingConnectionTimeoutError=m,Object.defineProperty(s,53002,{value:m});var g=function(e){function t(){return r(this,t),i(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,53003,"Client received an invalid signaling message"))}return o(t,e),t}(a);t.SignalingIncomingMessageInvalidError=g,Object.defineProperty(s,53003,{value:g});var b=function(e){function t(){return r(this,t),i(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,53004,"Client sent an invalid signaling message"))}return o(t,e),t}(a);t.SignalingOutgoingMessageInvalidError=b,Object.defineProperty(s,53004,{value:b});var _=function(e){function t(){return r(this,t),i(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,53006,"Video server is busy"))}return o(t,e),t}(a);t.SignalingServerBusyError=_,Object.defineProperty(s,53006,{value:_});var w=function(e){function t(){return r(this,t),i(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,53100,"Room name is invalid"))}return o(t,e),t}(a);t.RoomNameInvalidError=w,Object.defineProperty(s,53100,{value:w});var k=function(e){function t(){return r(this,t),i(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,53101,"Room name is too long"))}return o(t,e),t}(a);t.RoomNameTooLongError=k,Object.defineProperty(s,53101,{value:k});var S=function(e){function t(){return r(this,t),i(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,53102,"Room name contains invalid characters"))}return o(t,e),t}(a);t.RoomNameCharsInvalidError=S,Object.defineProperty(s,53102,{value:S});var O=function(e){function t(){return r(this,t),i(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,53103,"Unable to create Room"))}return o(t,e),t}(a);t.RoomCreateFailedError=O,Object.defineProperty(s,53103,{value:O});var E=function(e){function t(){return r(this,t),i(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,53104,"Unable to connect to Room"))}return o(t,e),t}(a);t.RoomConnectFailedError=E,Object.defineProperty(s,53104,{value:E});var T=function(e){function t(){return r(this,t),i(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,53105,"Room contains too many Participants"))}return o(t,e),t}(a);t.RoomMaxParticipantsExceededError=T,Object.defineProperty(s,53105,{value:T});var C=function(e){function t(){return r(this,t),i(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,53106,"Room not found"))}return o(t,e),t}(a);t.RoomNotFoundError=C,Object.defineProperty(s,53106,{value:C});var P=function(e){function t(){return r(this,t),i(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,53107,"MaxParticipants is out of range"))}return o(t,e),t}(a);t.RoomMaxParticipantsOutOfRangeError=P,Object.defineProperty(s,53107,{value:P});var x=function(e){function t(){return r(this,t),i(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,53108,"RoomType is not val
2id"))}return o(t,e),t}(a);t.RoomTypeInvalidError=x,Object.defineProperty(s,53108,{value:x});var I=function(e){function t(){return r(this,t),i(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,53109,"Timeout is out of range"))}return o(t,e),t}(a);t.RoomTimeoutOutOfRangeError=I,Object.defineProperty(s,53109,{value:I});var j=function(e){function t(){return r(this,t),i(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,53110,"StatusCallbackMethod is invalid"))}return o(t,e),t}(a);t.RoomStatusCallbackMethodInvalidError=j,Object.defineProperty(s,53110,{value:j});var R=function(e){function t(){return r(this,t),i(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,53111,"StatusCallback is invalid"))}return o(t,e),t}(a);t.RoomStatusCallbackInvalidError=R,Object.defineProperty(s,53111,{value:R});var A=function(e){function t(){return r(this,t),i(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,53112,"Status is invalid"))}return o(t,e),t}(a);t.RoomStatusInvalidError=A,Object.defineProperty(s,53112,{value:A});var M=function(e){function t(){return r(this,t),i(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,53113,"Room exists"))}return o(t,e),t}(a);t.RoomRoomExistsError=M,Object.defineProperty(s,53113,{value:M});var N=function(e){function t(){return r(this,t),i(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,53114,"Room creation parameter(s) incompatible with the Room type"))}return o(t,e),t}(a);t.RoomInvalidParametersError=N,Object.defineProperty(s,53114,{value:N});var L=function(e){function t(){return r(this,t),i(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,53115,"MediaRegion is invalid"))}return o(t,e),t}(a);t.RoomMediaRegionInvalidError=L,Object.defineProperty(s,53115,{value:L});var D=function(e){function t(){return r(this,t),i(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,53116,"There are no media servers available in the MediaRegion"))}return o(t,e),t}(a);t.RoomMediaRegionUnavailableError=D,Object.defineProperty(s,53116,{value:D});var F=function(e){function t(){return r(this,t),i(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,53117,"The subscription operation requested is not supported for the Room type"))}return o(t,e),t}(a);t.RoomSubscriptionOperationNotSupportedError=F,Object.defineProperty(s,53117,{value:F});var U=function(e){function t(){return r(this,t),i(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,53118,"Room completed"))}return o(t,e),t}(a);t.RoomCompletedError=U,Object.defineProperty(s,53118,{value:U});var V=function(e){function t(){return r(this,t),i(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,53200,"Participant identity is invali
2d"))}return o(t,e),t}(a);t.ParticipantIdentityInvalidError=V,Object.defineProperty(s,53200,{value:V});var B=function(e){function t(){return r(this,t),i(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,53201,"Participant identity is too long"))}return o(t,e),t}(a);t.ParticipantIdentityTooLongError=B,Object.defineProperty(s,53201,{value:B});var q=function(e){function t(){return r(this,t),i(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,53202,"Participant identity contains invalid characters"))}return o(t,e),t}(a);t.ParticipantIdentityCharsInvalidError=q,Object.defineProperty(s,53202,{value:q});var W=function(e){function t(){return r(this,t),i(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,53203,"Participant has too many Tracks"))}return o(t,e),t}(a);t.ParticipantMaxTracksExceededError=W,Object.defineProperty(s,53203,{value:W});var z=function(e){function t(){return r(this,t),i(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,53204,"Participant not found"))}return o(t,e),t}(a);t.ParticipantNotFoundError=z,Object.defineProperty(s,53204,{value:z});var H=function(e){function t(){return r(this,t),i(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,53205,"Participant disconnected because of duplicate identity"))}return o(t,e),t}(a);t.ParticipantDuplicateIdentityError=H,Object.defineProperty(s,53205,{value:H});var G=function(e){function t(){return r(this,t),i(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,53300,"Track is invalid"))}return o(t,e),t}(a);t.TrackInvalidError=G,Object.defineProperty(s,53300,{value:G});var K=function(e){function t(){return r(this,t),i(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,53301,"Track name is invalid"))}return o(t,e),t}(a);t.TrackNameInvalidError=K,Object.defineProperty(s,53301,{value:K});var Y=function(e){function t(){return r(this,t),i(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,53302,"Track name is too long"))}return o(t,e),t}(a);t.TrackNameTooLongError=Y,Object.defineProperty(s,53302,{value:Y});var Q=function(e){function t(){return r(this,t),i(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,53303,"Track name contains invalid characters"))}return o(t,e),t}(a);t.TrackNameCharsInvalidError=Q,Object.defineProperty(s,53303,{value:Q});var $=function(e){function t(){return r(this,t),i(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,53304,"Track name is duplicated"))}return o(t,e),t}(a);t.TrackNameIsDuplicatedError=$,Object.defineProperty(s,53304,{value:$});var X=function(e){function t(){return r(this,t),i(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,53305,"The server has reached capacity and cannot fulfill this request"))}return o(t,e),t}(a);t.TrackServerTrackCapacityReachedError=X,Object.defineProperty(s,53305,{value:X});var J=function(e){function t(){return r(this,t),i(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,53400,"Client is unable to create or apply a local media description"))}return o(t,e),t}(a);t.MediaClientLocalDescFailedError=J,Object.defineProperty(s,53400,{value:J});var Z=function(e){function t(){return r(this,t),i(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,53401,"Server is unable to create or apply a local media description"))}return o(t,e),t}(a);t.MediaServerLocalDescFailedError=Z,Object.defineProperty(s,53401,{value:Z});var ee=function(e){function t(){return r(this,t),i(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,53402,"Client is unable to apply a remote media description"))}return o(t,e),t}(a);t.MediaClientRemoteDescFailedError=ee,Object.defineProperty(s,53402,{value:ee});var te=function(e){function t(){return r(this,t),i(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,53403,"Server is unable to apply a remote media description"))}return o(t,e),t}(a);t.MediaServerRemoteDescFailedError=te,Object.defineProperty(s,53403,{value:te});var ne=function(e){function t(){return r(this,t),i(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,53404,"No supported codec"))}return o(t,e),t}(a);t.MediaNoSupportedCodecError=ne,Object.defineProperty(s,53404,{value:ne});var re=function(e){function t(){return r(this,t),i(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,53405,"Media connection failed or Media activity ceased"))}return o(t,e),t}(a);t.MediaConnectionError=re,Object.defineProperty(s,53405,{value:re});var ie=function(e){function t(){return r(this,t),i(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,53407,"Media connection failed due to DTLS handshake failure"))}return o(t,e),t}(a);t.MediaDTLSTransportFailedError=ie,Object.defineProperty(s,53407,{value:ie});var oe=function(e){function t(){return r(this,t),i(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,53500,"Unable to acquire configuration"))}return o(t,e),t}(a);t.ConfigurationAcquireFailedError=oe,Object.defineProperty(s,53500,{value:oe});var ae=function(e){function t(){return r(this,t),i(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,53501,"Unable to acquire TURN credentials"))}return o(t,e),t}(a);t.ConfigurationAcquireTurnFailedError=ae,Object.defineProperty(s,53501,{value:ae})},function(e,t){e.exports=function(e){if("function"!=typeof e)throw TypeError(e+" is not a function!");return e}},function(e,t){var n={}.hasOwnProperty;e.exports=function(e,t){return n.call(e,t)}},function(e,t,n){var r=n(143);e.exports=function(e){return Object(r(e))}},function(e,t,n){"use strict";var r=n(471)(!0);n(149)(String,"String",(function(e){this._t=String(e),this._i=0}),(function(){var e,t=this._t,n=this._i;return n>=t.length?{value:void 0,done:!0}:(e=r(t,n),this._i+=e.length,{value:e,done:!1})}))},function(e,t,n){e.exports={default:n(504),__esModule:!0}},function(e,t){e.exports=function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}},function(e,t,n){"use strict";var r=n(9);
vendor: 4,278 bytes, line 2
2Object.defineProperty(t,"__esModule",{value:!0}),t.AbstractMessage=void 0;var i=n(163);t.AbstractMessage=function e(t){r(this,e),this.id=t||"TM".concat(i.v4())}},function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(111);var i=n(124);function o(e){return function(e){if(Array.isArray(e))return Object(r.a)(e)}(e)||function(e){if("undefined"!==typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||Object(i.a)(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}},function(e,t,n){"use strict";n.d(t,"a",(function(){return H})),n.d(t,"b",(function(){return W})),n.d(t,"c",(function(){return ie}));var r=n(4),i=n.n(r),o=n(43),a=n(30),s=(n(14),n(55)),u=n.n(s),c=!1,l=n(96),f="unmounted",h="exited",d="entering",p="entered",v="exiting",y=function(e){function t(t,n){var r;r=e.call(this,t,n)||this;var i,o=n&&!n.isMounting?t.enter:t.appear;return r.appearStatus=null,t.in?o?(i=h,r.appearStatus=d):i=p:i=t.unmountOnExit||t.mountOnEnter?f:h,r.state={status:i},r.nextCallback=null,r}Object(a.a)(t,e),t.getDerivedStateFromProps=function(e,t){return e.in&&t.status===f?{status:h}:null};var n=t.prototype;return n.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},n.componentDidUpdate=function(e){var t=null;if(e!==this.props){var n=this.state.status;this.props.in?n!==d&&n!==p&&(t=d):n!==d&&n!==p||(t=v)}this.updateStatus(!1,t)},n.componentWillUnmount=function(){this.cancelNextCallback()},n.getTimeouts=function(){var e,t,n,r=this.props.timeout;return e=t=n=r,null!=r&&"number"!==typeof r&&(e=r.exit,t=r.enter,n=void 0!==r.appear?r.appear:t),{exit:e,enter:t,appear:n}},n.updateStatus=function(e,t){void 0===e&&(e=!1),null!==t?(this.cancelNextCallback(),t===d?this.performEnter(e):this.performExit()):this.props.unmountOnExit&&this.state.status===h&&this.setState({status:f})},n.performEnter=function(e){var t=this,n=this.props.enter,r=this.context?this.context.isMounting:e,i=this.props.nodeRef?[r]:[u.a.findDOMNode(this),r],o=i[0],a=i[1],s=this.getTimeouts(),l=r?s.appear:s.enter;!e&&!n||c?this.safeSetState({status:p},(function(){t.props.onEntered(o)})):(this.props.onEnter(o,a),this.safeSetState({status:d},(function(){t.props.onEntering(o,a),t.onTransitionEnd(l,(function(){t.safeSetState({status:p},(function(){t.props.onEntered(o,a)}))}))})))},n.performExit=function(){var e=this,t=this.props.exit,n=this.getTimeouts(),r=this.props.nodeRef?void 0:u.a.findDOMNode(this);t&&!c?(this.props.onExit(r),this.safeSetState({status:v},(function(){e.props.onExiting(r),e.onTransitionEnd(n.exit,(function(){e.safeSetState({status:h},(function(){e.props.onExited(r)}))}))}))):this.safeSetState({status:h},(function(){e.props.onExited(r)}))},n.cancelNextCallback=function(){null!==this.nextCallback&&(this.nextCallback.cancel(),this.nextCallback=null)},n.safeSetState=function(e,t){t=this.setNextCallback(t),this.setState(e,t)},n.setNextCallback=function(e){var t=this,n=!0;return this.nextCallback=function(r){n&&(n=!1,t.nextCallback=null,e(r))},this.nextCallback.cancel=function(){n=!1},this.nextCallback},n.onTransitionEnd=function(e,t){this.setNextCallback(t);var n=this.props.nodeRef?this.props.nodeRef.current:u.a.findDOMNode(this),r=null==e&&!this.props.addEndListener;if(n&&!r){if(this.props.addEndListener){var i=this.props.nodeRef?[this.nextCallback]:[n,this.nextCallback],o=i[0],a=i[1];this.props.addEndListener(o,a)}null!=e&&setTimeout(this.nextCallback,e)}else setTimeout(this.nextCallback,0)},n.render=function(){var e=this.state.status;if(e===f)return null;var t=this.props,n=t.children,r=(t.in,t.mountOnEnter,t.unmountOnExit,t.appear,t.enter,t.exit,t.timeout,t.addEndListener,t.onEnter,t.onEntering,t.onEntered,t.onExit,t.onExiting,t.onExited,t.nodeRef,Object(o.a)(t,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]));return i.a.createElement(l.a.Provider,{value:null},"function"===typeof n?n(e,r):i.a.cloneElement(i.a.Children.only(n),r))},t}(i.a.Component);function m(){}y.contextType=l.a,y.propTypes={},y.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter
2:!0,exit:!0,onEnter:m,onEntering:m,onEntered:m,onExit:m,onExiting:m,onExited:m},y.UNMOUNTED=f,y.EXITED=h,y.ENTERING=d,y.ENTERED=p,y.EXITING=v;var g=y,b=n(31);function _(){return(_=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function w(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}function k(e){return"number"===typeof e&&!isNaN(e)}function S(e){return"boolean"===typeof e}function O(e){return"string"===typeof e}function E(e){return"function"===typeof e}function T(e){return O(e)||E(e)?e:null}function C(e){return 0===e||e}var P=!("undefined"===typeof window||!window.document||!window.document.createElement);function x(e){return Object(r.isValidElement)(e)||O(e)||E(e)||k(e)}var I={TOP_LEFT:"top-left",TOP_RIGHT:"top-right",TOP_CENTER:"top-center",BOTTOM_LEFT:"bottom-left",BOTTOM_RIGHT:"bottom-right",BOTTOM_CENTER:"bottom-center"},j={INFO:"info",SUCCESS:"success",WARNING:"warning",ERROR:"error",DEFAULT:"default",DARK:"dark"};function R(e){var t,n,i=e.enter,o=e.exit,a=e.duration,s=void 0===a?750:a,u=e.appendPosition,c=void 0!==u&&u,l=e.collapse,f=void 0===l||l,h=e.collapseDuration,d=void 0===h?300:h;return Array.isArray(s)&&2===s.length?(t=s[0],n=s[1]):t=n=s,function(e){var a=e.children,s=e.position,u=e.preventExitTransition,l=e.done,h=w(e,["children","position","preventExitTransition","done"]),p=c?i+"--"+s:i,v=c?o+"--"+s:o,y=function e(){var t=h.nodeRef.current;t&&(t.removeEventListener("animationend",e),f?function(e,t,n){void 0===n&&(n=300);var r=e.scrollHeight,i=e.style;requestAnimationFrame((function(){i.minHeight="initial",i.height=r+"px",i.transition="all "+n+"ms",requestAnimationFrame((function(){i.height="0",i.padding="0",i.margin="0",setTimeout((function(){return t()}),n)}))}))}(t,l,d):l())};return Object(r.createElement)(g,Object.assign({},h,{timeout:u?f?d:50:{enter:t,exit:f?n+d:n+50},onEnter:function(){var e=h.nodeRef.current;e&&(e.classList.add(p),e.style.animationFillMode="forwards",e.style.animationDuration=t+"ms")},onEntered:function(){var e=h.nodeRef.current;e&&(e.classList.remove(p),e.style.cssText="")},onExit:u?y:function(){var e=h.nodeRef.current;e&&(e.classList.add(v),e.style.animationFillMode="forwards",e.style.animationDuration=n+"ms",e.addEventListener("animationend",y))},unmountOnExit:!0}),a)}}var A={list:new Map,emitQueue:new Map,on:function(e,t){return this.list.has(e)||this.list.set(e,[]),this.list.get(e).push(t),this},off:function(e,t){if(t){var n=this.list.get(e).filter((function(e){return e!==t}));return this.list.set(e,n),this}return this.list.delete(e),this},cancelEmit:function(e){var t=this.emitQueue.get(e);return t&&(t.forEach((function(e){return clearTimeout(e)})),this.emitQueue.delete(e)),this},emit:function(e){for(var t=this,n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];this.list.has(e)&&this.list.get(e).forEach((function(n){var i=setTimeout((function(){n.apply(void 0,r)}),0);t.emitQueue.has(e)||t.emitQueue.set(e,[]),t.emitQueue.get(e).push(i)}))}};function M(e,t){void 0===t&&(t=!1);var n=Object(r.useRef)(e);return Object(r.useEffect)((function(){t&&(n.current=e)})),n.current}function N(e,t){switch(t.type){case"ADD":return[].concat(e,[t.toastId]).filter((function(e){return e!==t.staleId}));case"REMOVE":return C(t.toastId)?e.filter((function(e){return e!==t.toastId})):[]}}function L(e){var t=Object(r.useReducer)((function(e){return e+1}),0)[1],n=Object(r.useReducer)(N,[]),i=n[0],o=n[1],a=Object(r.useRef)(null),s=M(0),u=M([]),c=M({}),l=M({toastKey:1,displayedToast:0,props:e,containerId:null,isToastActive:f,getToast:function(e){return c[e]||null}});function f(e){return-1!==i.indexOf(e)}function h(e){var t=e.containerId,n=l.props,r=n.limit,i=n.enableMultiContainer;r&&(!t||l.containerId===t&&i)&&(s-=u.length,u=[])}function d(e){var t=u.length;if((s=C(e)?s-1:s-l.displayedToast)<0&&(s=0),t>0){var n=C(e)?1:l.props.limit;if(1===t||1===n)l.displayedToast++,p();else{var r=n>t?t:n;l.displayedToast=r;
2for(var i=0;i<r;i++)p()}}o({type:"REMOVE",toastId:e})}function p(){var e=u.shift(),t=e.toastContent,n=e.toastProps,r=e.staleId;setTimeout((function(){y(t,n,r)}),500)}function v(e,n){var i=n.delay,o=n.staleId,f=w(n,["delay","staleId"]);if(x(e)&&!function(e){var t=e.containerId,n=e.toastId,r=e.updateId;return!!(!a.current||l.props.enableMultiContainer&&t!==l.props.containerId||l.isToastActive(n)&&null==r)}(f)){var h=f.toastId,p=f.updateId,v=l.props,m=function(){return d(h)},g=!(0,l.isToastActive)(h);g&&s++;var b,_,C={toastId:h,updateId:p,key:f.key||l.toastKey++,type:f.type,closeToast:m,closeButton:f.closeButton,rtl:v.rtl,position:f.position||v.position,transition:f.transition||v.transition,className:T(f.className||v.toastClassName),bodyClassName:T(f.bodyClassName||v.bodyClassName),style:f.style||v.toastStyle,bodyStyle:f.bodyStyle||v.bodyStyle,onClick:f.onClick||v.onClick,pauseOnHover:S(f.pauseOnHover)?f.pauseOnHover:v.pauseOnHover,pauseOnFocusLoss:S(f.pauseOnFocusLoss)?f.pauseOnFocusLoss:v.pauseOnFocusLoss,draggable:S(f.draggable)?f.draggable:v.draggable,draggablePercent:k(f.draggablePercent)?f.draggablePercent:v.draggablePercent,closeOnClick:S(f.closeOnClick)?f.closeOnClick:v.closeOnClick,progressClassName:T(f.progressClassName||v.progressClassName),progressStyle:f.progressStyle||v.progressStyle,autoClose:(b=f.autoClose,_=v.autoClose,!1===b||k(b)&&b>0?b:_),hideProgressBar:S(f.hideProgressBar)?f.hideProgressBar:v.hideProgressBar,progress:f.progress,role:O(f.role)?f.role:v.role,deleteToast:function(){!function(e){delete c[e],t()}(h)}};E(f.onOpen)&&(C.onOpen=f.onOpen),E(f.onClose)&&(C.onClose=f.onClose);var P=v.closeButton;!1===f.closeButton||x(f.closeButton)?P=f.closeButton:!0===f.closeButton&&(P=!x(v.closeButton)||v.closeButton),C.closeButton=P;var I=e;Object(r.isValidElement)(e)&&!O(e.type)?I=Object(r.cloneElement)(e,{closeToast:m}):E(e)&&(I=e({closeToast:m})),v.limit&&v.limit>0&&s>v.limit&&g?u.push({toastContent:I,toastProps:C,staleId:o}):k(i)&&i>0?setTimeout((function(){y(I,C,o)}),i):y(I,C,o)}}function y(e,t,n){var r=t.toastId;c[r]={content:e,props:t},o({type:"ADD",toastId:r,staleId:n})}return Object(r.useEffect)((function(){return l.containerId=e.containerId,A.cancelEmit(3).on(0,v).on(1,(function(e){return a.current&&d(e)})).on(5,h).emit(2,l),function(){return A.emit(3,l)}}),[]),Object(r.useEffect)((function(){l.isToastActive=f,l.displayedToast=i.length,A.emit(4,i.length,e.containerId)}),[i]),Object(r.useEffect)((function(){l.props=e})),{getToastToRender:function(t){for(var n={},r=e.newestOnTop?Object.keys(c).reverse():Object.keys(c),i=0;i<r.length;i++){var o=c[r[i]],a=o.props.position;n[a]||(n[a]=[]),n[a].push(o)}return Object.keys(n).map((function(e){return t(e,n[e])}))},collection:c,containerRef:a,isToastActive:f}}function D(e){return e.targetTouches&&e.targetTouches.length>=1?e.targetTouches[0].clientX:e.clientX}function F(e){var t=Object(r.useState)(!0),n=t[0],i=t[1],o=Object(r.useState)(!1),a=o[0],s=o[1],u=Object(r.useRef)(null),c=M({start:0,x:0,y:0,deltaX:0,removalDistance:0,canCloseOnClick:!0,canDrag:!1,boundingRect:null}),l=M(e,!0),f=e.autoClose,h=e.pauseOnHover,d=e.closeToast,p=e.onClick,v=e.closeOnClick;function y(t){var n=u.current;c.canCloseOnClick=!0,c.canDrag=!0,c.boundingRect=n.getBoundingClientRect(),n.style.transition="",c.start=c.x=D(t.nativeEvent),c.removalDistance=n.offsetWidth*(e.draggablePercent/100)}function m(){if(c.boundingRect){var t=c.boundingRect,n=t.top,r=t.bottom,i=t.left,o=t.right;e.pauseOnHover&&c.x>=i&&c.x<=o&&c.y>=n&&c.y<=r?b():g()}}function g(){i(!0)}function b(){i(!1)}function _(e){var t=u.current;c.canDrag&&(n&&b(),c.x=D(e),c.deltaX=c.x-c.start,c.y=function(e){return e.targetTouches&&e.targetTouches.length>=1?e.targetTouches[0].clientY:e.clientY}(e),c.start!==c.x&&(c.canCloseOnClick=!1),t.style.transform="translateX("+c.deltaX+"px)",t.style.opacity=""+(1-Math.abs(c.deltaX/c.removalDistance)))}function w(){var t=u.current;if(c.canDrag){if(c.canDrag=!1,Math.abs(c.deltaX)>c.removalDistance)return s(!0),void e.closeToast();t.style.transition="transform 0.2s, opacity 0.2s",t.style.transform="translateX(0)",t.style.opacity="1"}}Object(r.useEffect)((function(){return E(e.onOpen)&&e.onOpen(Object(r.isValidElement)(e.children)&&e.children.props),function(){E(l.onClose)&&l.onClose(Object(r.isValidElement)(l.children)&&l.children.props)}}),[]),Object(r.useEffect)((function(){return e.draggable&&(document.addEventListener("mousemove",_),document.addEventListener("mouseup",w),document.addEventListener("touchmove",_),document.addEventListener("touchend",w)),function(){e.draggable&&(document.removeEventListener("mousemove",_),document.removeEventListener("mouseup",w),document.removeEventListener("touchmove",_),document.removeEventListener("touchend",w))}}),[e.draggable]),Object(r.useEffect)((function(){return e.pauseOnFocusLoss&&(window.addEventListener("focus",g),window.addEventListener("blur",b)),function(){e.pauseOnFocusLoss&&(window.removeEventListener("focus",g),window.removeEventListener("blur",b))}}),[e.pauseOnFocusLoss]);var k={onMouseDown:y,onTouchStart:y,onMouseUp:m,onTouchEnd:m};return f&&h&&(k.onMouseEnter=b,k.onMouseLeave=g),v&&(k.onClick=function(e){p&&p(e),c.c
2anCloseOnClick&&d()}),{playToast:g,pauseToast:b,isRunning:n,preventExitTransition:a,toastRef:u,eventHandlers:k}}function U(e){var t=e.closeToast,n=e.type,i=e.ariaLabel,o=void 0===i?"close":i;return Object(r.createElement)("button",{className:"Toastify__close-button Toastify__close-button--"+n,type:"button",onClick:function(e){e.stopPropagation(),t(e)},"aria-label":o},Object(r.createElement)("svg",{"aria-hidden":"true",viewBox:"0 0 14 16"},Object(r.createElement)("path",{fillRule:"evenodd",d:"M7.71 8.23l3.75 3.75-1.48 1.48-3.75-3.75-3.75 3.75L1 11.98l3.75-3.75L1 4.48 2.48 3l3.75 3.75L9.98 3l1.48 1.48-3.75 3.75z"})))}function V(e){var t,n,i=e.delay,o=e.isRunning,a=e.closeToast,s=e.type,u=e.hide,c=e.className,l=e.style,f=e.controlledProgress,h=e.progress,d=e.rtl,p=e.isIn,v=_({},l,{animationDuration:i+"ms",animationPlayState:o?"running":"paused",opacity:u?0:1});f&&(v.transform="scaleX("+h+")");var y=["Toastify__progress-bar",f?"Toastify__progress-bar--controlled":"Toastify__progress-bar--animated","Toastify__progress-bar--"+s,(t={},t["Toastify__progress-bar--rtl"]=d,t)],m=E(c)?c({rtl:d,type:s,defaultClassName:b.a.apply(void 0,y)}):b.a.apply(void 0,[].concat(y,[c])),g=((n={})[f&&h>=1?"onTransitionEnd":"onAnimationEnd"]=f&&h<1?null:function(){p&&a()},n);return Object(r.createElement)("div",Object.assign({className:m,style:v},g))}V.defaultProps={type:j.DEFAULT,hide:!1};var B=function(e){var t,n=F(e),i=n.isRunning,o=n.preventExitTransition,a=n.toastRef,s=n.eventHandlers,u=e.closeButton,c=e.children,l=e.autoClose,f=e.onClick,h=e.type,d=e.hideProgressBar,p=e.closeToast,v=e.transition,y=e.position,m=e.className,g=e.style,_=e.bodyClassName,w=e.bodyStyle,k=e.progressClassName,S=e.progressStyle,O=e.updateId,T=e.role,C=e.progress,P=e.rtl,x=e.toastId,I=e.deleteToast,j=["Toastify__toast","Toastify__toast--"+h,(t={},t["Toastify__toast--rtl"]=P,t)],R=E(m)?m({rtl:P,position:y,type:h,defaultClassName:b.a.apply(void 0,j)}):b.a.apply(void 0,[].concat(j,[m])),A=!!C;return Object(r.createElement)(v,{in:e.in,appear:!0,done:I,position:y,preventExitTransition:o,nodeRef:a},Object(r.createElement)("div",Object.assign({id:x,onClick:f,className:R||void 0},s,{style:g,ref:a}),Object(r.createElement)("div",Object.assign({},e.in&&{role:T},{className:E(_)?_({type:h}):Object(b.a)("Toastify__toast-body",_),style:w}),c),function(e){if(e){var t={closeToast:p,type:h};return E(e)?e(t):Object(r.isValidElement)(e)?Object(r.cloneElement)(e,t):void 0}}(u),(l||A)&&Object(r.createElement)(V,Object.assign({},O&&!A?{key:"pb-"+O}:{},{rtl:P,delay:l,isRunning:i,isIn:e.in,closeToast:p,hide:d,type:h,style:S,className:k,controlledProgress:A,progress:C}))))},q=R({enter:"Toastify__bounce-enter",exit:"Toastify__bounce-exit",appendPosition:!0}),W=R({enter:"Toastify__zoom-enter",exit:"Toastify__zoom-exit"}),z=function(e){var t=e.children,n=e.className,i=e.style,o=w(e,["children","className","style"]);return delete o.in,Object(r.createElement)("div",{className:n,style:i},r.Children.map(t,(function(e){return Object(r.cloneElement)(e,o)})))},H=function(e){var t=L(e),n=t.getToastToRender,i=t.containerRef,o=t.isToastActive,a=e.className,s=e.style,u=e.rtl,c=e.containerId;return Object(r.createElement)("div",{ref:i,className:"Toastify",id:c},n((function(e,t){var n,i,c={className:E(a)?a({position:e,rtl:u,defaultClassName:Object(b.a)("Toastify__toast-container","Toastify__toast-container--"+e,(n={},n["Toastify__toast-container--rtl"]=u,n))}):Object(b.a)("Toastify__toast-container","Toastify__toast-container--"+e,(i={},i["Toastify__toast-container--rtl"]=u,i),T(a)),style:0===t.length?_({},s,{pointerEvents:"none"}):_({},s)};return Object(r.createElement)(z,Object.assign({},c,{key:"container-"+e}),t.map((function(e){var t=e.content,n=e.props;return Object(r.createElement)(B,Object.assign({},n,{in:o(n.toastId),key:"toast-"+n.key,closeButton:!0===n.closeButton?U:n.closeButton}),t)})))})))};H.defaultProps={position:I.TOP_RIGHT,transition:q,rtl:!1,autoClose:5e3,hideProgressBar:!1,closeButton:U,pauseOnHover:!0,pauseOnFocusLoss:!0,closeOnClick:!0,newestOnTop:!1,draggable:!0,draggablePercent:80,role:"alert"};var G,K,Y,Q=new Map,$=[],X=!1;function J(){return Q.size>0}function Z(e,t){var n=function(e){return J()?Q.get(e||G):null}(t.containerId);return n?n.getToast(e):null}function ee(){return(Math.random().toString(36)+Date.now().toString(36)).substr(2,10)}function te(e){return e&&(O(e.toastId)||k(e.toastId))?e.toastId:ee()}function ne(e,t){return J()?A.emit(0,e,t):($.push({content:e,options:t}),X&&P&&(X=!1,K=document.createElement("div"),document.body.appendChild(K),Object(s.render)(Object(r.createElement)(H,Object.assign({},Y)),K))),t.toastId}function re(e,t){return _({},t,{type:t&&t.type||e,toastId:te(t)})}var ie=function(e,t){return ne(e,re(j.DEFAULT,t))};ie.success=function(e,t){return ne(e,re(j.SUCCESS,t))},ie.info=function(e,t){return ne(e,re(j.INFO,t))},ie.error=function(e,t){return ne(e,re(j.ERROR,t))},ie.warning=function(e,t){return ne(e,re(j.WARNING,t))},ie.dark=function(e,t){return ne(e,re(j.DARK,t))},ie.warn=ie.warning,ie.dismiss=function(e){return J()&&A.emit(1,e)},ie.clearWaitingQueue=function(e){return void 0===e&&(e={}),J()&&A.emit(5,e)},ie.isActive=function(e){var t=!1;return Q.forEach((function(n){n.isToastActive&&n.isToastActive(e)&&(t=!0)})),t},ie.update=function(e,t){void 0===t&&(t={}),setTimeout((function(){var n=Z(e,t);if(n){var r=n.props,i=n.content,o=_({},r,t,{toastId:t.toastId||e,updateId:ee()});o.toastId!==e&&(o.staleId=e);var a="undefined"!==typeof o.render?o.render:i;delete o.render,ne(a,o)}}),0)},ie.done=function(e){ie.update(e,{progress:1})},ie.onChange=function(e){return E(e)&&A.on(4,e),function(){E(e)&&A.off(4,e)}},ie.configure=function(e){void 0===e&&(e={}),X=!0,Y=e},ie.POSITION=I,ie.TYPE=j,A.on(2,(function(e){G=e.containerId||e,Q.set(G,e),$.forEach((function(e){A.emit(0,e.content,e.options)})),$=[]})).on(3,(function(e){Q.delete(e.containerId||e),0===Q.size&&A.off(0).off(1).off(5),P&&K&&document.body.removeChild(K)}))},function(e,t,n){"use strict";var r=n(26).flatMap,i=n(26).guessBrowser,o=null;var a=null;function s(e){return e&&function(){if("boolean"===typeof o)return o;if("undefined"===typeof RTCPeerConnection)return o=!1;try{new RTCPeerConnection({sdpSemantics:"foo"}),o=!1}catch(e){o=!0}return o}()?{"plan-b":"planb","unified-plan":"unified"}[e]:function(){if(!a)if("undefined"!==typeof RTCPeerConnection&&"addTransceiver"in RTCPeerConnection.prototype)try{(new RTCPeerConnection).addTransceiver("audio"),a="unified"}catch(e){a="planb"}else a="planb";return a}()}function u(e,t){return(t.match(new RegExp(e,"gm"))||[]).reduce((function(t,n){var r=n.match(new RegExp(e));return r?t.add(r[1]):t}),new Set)}function c(e,t){return u(e,t)}function l(e){return c("^a=ssrc:[0-9]+ +msid:.+ +(.+) *$",e)}function f(e){return c("^a=msid:.+ +(.+) *$",e)}function h(e,t){return u("^a=ssrc:([0-9]+) +msid:[^ ]+ +"+t+" *$",e)}function d(e,t,n){return t=t||".*",n=n||".*",e.split("\r\nm=").slice(1).map((function(e){return"m="+e})).filter((function(e){var r=new RegExp("m="+t,"gm"),i=new RegExp("a="+n,"gm");return r.test(e)&&i.test(e)}))}function p(e){return Array.from(u("^a=ssrc:([0-9]+) +.*$",e))}function v(e,t){var n=d(e),i=new RegExp("^a=msid:[^ ]+ +"+t+" *$","gm"),o=n.filter((function(e){return e.match(i)}));return new Set(r(o,p))}function y(e,t,n){return new Map(Array.from(e(n)).map((function(e){return[e,t(n,e)]})))}function m(e){return y(l,h,e)}function g(e){return y(f,v,e)}function b(e,t,n){var r=e(n),i=new Map;r.forEach((function(e,r){if(t.has(r)){var o=Array.from(t.get(r)),a=Array.from(e);o.forEach((function(e,t){var r=a[t];i.set(r,e);var o="^a=ssrc:"+r+" (.*)$",s="a=ssrc:"+e+" $1";n=n.replace(new RegExp(o,"gm"),s)}))}else t.set(r,e)}));var o="^(a=ssrc-group:[^ ]+ +)(.*)$";
2return(n.match(new RegExp(o,"gm"))||[]).forEach((function(e){var t=e.match(new RegExp(o));if(t){var r=t[1],a=t[2].split(" ").map((function(e){var t=i.get(e);return t||e})).join(" ");n=n.replace(t[0],r+a)}})),n}t.getSdpFormat=function(e){return{chrome:s(e),firefox:"unified",safari:"undefined"!==typeof RTCRtpTransceiver&&"currentDirection"in RTCRtpTransceiver.prototype?"unified":"planb"}[i()]||null},t.getMediaSections=d,t.getPlanBTrackIds=l,t.getUnifiedPlanTrackIds=f,t.getPlanBSSRCs=h,t.getUnifiedPlanSSRCs=v,t.updatePlanBTrackIdsToSSRCs=function(e,t){return b(m,e,t)},t.updateUnifiedPlanTrackIdsToSSRCs=function(e,t){return b(g,e,t)}},function(e,t,n){"use strict";var r="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();var o=n(76).getLogger,a=n(35),s=a.DEFAULT_LOG_LEVEL,u=a.DEFAULT_LOGGER_NAME,c=n(35).typeErrors,l=void 0;var f=function(){function e(t,n,i,a,l){if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),"string"!==typeof t)throw c.INVALID_TYPE("moduleName","string");if(!n)throw c.REQUIRED_ARGUMENT("component");"object"!==("undefined"===typeof i?"undefined":r(i))&&(i={}),l=l||o,y(i),Object.defineProperties(this,{_component:{value:n},_logLevels:{value:i},_warnings:{value:new Set},_loggerName:{get:function(){var e=a&&"string"===typeof a?a:u;return this._logLevelsEqual||(e=e+"-"+t),e}},_logger:{get:function(){var e=l(this._loggerName),n=this._logLevels[t]||s;return n="off"===n?"silent":n,e.setDefaultLevel(n),e}},_logLevelsEqual:{get:function(){return 1===new Set(Object.values(this._logLevels)).size}},logLevel:{get:function(){return e.getLevelByName(i[t]||s)}},name:{get:n.toString.bind(n)}})}return i(e,[{key:"createLog",value:function(t,n){var r=this._loggerName;return this._logLevelsEqual||(r=r.substring(0,r.lastIndexOf("-"))),new e(t,n,this._logLevels,r)}},{key:"setLevels",value:function(e){return y(e),Object.assign(this._logLevels,e),this}},{key:"log",value:function(t,n){var r=e._levels[t];if(!r)throw c.INVALID_VALUE("logLevel",d);r=r.toLowerCase();var i=[(new Date).toISOString(),r,this.name];return(this._logger[r]||function(){}).apply(void 0,function(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)}(i.concat(n))),this}},{key:"debug",value:function(){return this.log(e.DEBUG,[].slice.call(arguments))}},{key:"deprecated",value:function(e){var t=function(e){if((l=l||new Map).has(e))return l.get(e);var t=new Set;return l.set(e,t),t}(this._component.constructor);return t.has(e)?this:(t.add(e),this.warn(e))}},{key:"info",value:function(){return this.log(e.INFO,[].slice.call(arguments))}},{key:"warn",value:function(){return this.log(e.WARN,[].slice.call(arguments))}},{key:"warnOnce",value:function(e){return this._warnings.has(e)?this:(this._warnings.add(e),this.warn(e))}},{key:"error",value:function(){return this.log(e.ERROR,[].slice.call(arguments))}},{key:"throw",value:function(t,n){throw t.clone&&(t=t.clone(n)),this.log(e.ERROR,t),t}}],[{key:"getLevelByName",value:function(t){return isNaN(t)?(v(t=t.toUpperCase()),e[t]):parseInt(t,10)}}]),e}();Object.defineProperties(f,{DEBUG:{value:0},INFO:{value:1},WARN:{value:2},ERROR:{value:3},OFF:{value:4},_levels:{value:["DEBUG","INFO","WARN","ERROR","OFF"]}});var h={},d=[],p=f._levels.map((function(e,t){return h[e]=!0,d.push(t),e}));function v(e){if(!(e in h))throw c.INVALID_VALUE("level",p)}function y(e){Object.keys(e).forEach((function(t){v(e[t].toUpperCase())}))}e.exports=f},function(e,t,n){"use strict";var r="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();var o=n(18).EventEmitter,a=n(22),s=function(e){function t(e,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var r,i=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this)),o=null,a=e;return n=function(e){var t=new Map;for(var n in e)t.set(n,new Set(e[n]));return t}(n),Object.defineProperties(i,{_lock:{get:function(){return o}
2,set:function(e){o=e}},_reachableStates:{value:(r=n,Array.from(r.keys()).reduce((function(e,t){return e.set(t,c(r,t))}),new Map))},_state:{get:function(){return a},set:function(e){a=e}},_states:{value:n},_whenDeferreds:{value:new Set},isLocked:{enumerable:!0,get:function(){return null!==o}},state:{enumerable:!0,get:function(){return a}}}),i.on("stateChanged",(function(e){i._whenDeferreds.forEach((function(t){t.when(e,t.resolve,t.reject)}))})),i}return function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),i(t,[{key:"_whenPromise",value:function(e){var t=this;if("function"!==typeof e)return Promise.reject(new Error("when() executor must be a function"));var n=a.defer();return n.when=e,this._whenDeferreds.add(n),n.promise.then((function(e){return t._whenDeferreds.delete(n),e}),(function(e){throw t._whenDeferreds.delete(n),e}))}},{key:"bracket",value:function(e,t){var n=void 0,r=this;function i(e){if(r.hasLock(n)&&r.releaseLockCompletely(n),e)throw e}return this.takeLock(e).then((function(e){return t(n=e)})).then((function(e){return i(),e}),i)}},{key:"hasLock",value:function(e){return this._lock===e}},{key:"preempt",value:function(e,t,n){if(!u(this._states,this.state,e))throw new Error('Cannot transition from "'+this.state+'" to "'+e+'"');var r=void 0;this.isLocked&&(r=this._lock,this._lock=null);var i=null;t&&(i=this.takeLockSync(t));var o=i?null:this.takeLockSync("preemption");return this.transition(e,i||o,n),r&&r.resolve(),o&&this.releaseLock(o),i}},{key:"releaseLock",value:function(e){if(!this.isLocked)throw new Error("Could not release the lock for "+e.name+" because the StateMachine is not locked");if(!this.hasLock(e))throw new Error("Could not release the lock for "+e.name+" because "+this._lock.name+" has the lock");0===e.depth?(this._lock=null,e.resolve()):e.depth--}},{key:"releaseLockCompletely",value:function(e){if(!this.isLocked)throw new Error("Could not release the lock for "+e.name+" because the StateMachine is not locked");if(!this.hasLock(e))throw new Error("Could not release the lock for "+e.name+" because "+this._lock.name+" has the lock");e.depth=0,this._lock=null,e.resolve()}},{key:"takeLock",value:function(e){var t=this;if("object"===("undefined"===typeof e?"undefined":r(e))){var n=e;return new Promise((function(e){e(t.takeLockSync(n))}))}var i=e;if(this.isLocked){var o=this.takeLock.bind(this,i);return this._lock.promise.then(o)}return Promise.resolve(this.takeLockSync(i))}},{key:"takeLockSync",value:function(e){var t="string"===typeof e?null:e,n=t?t.name:e;if(t&&!this.hasLock(t)||!t&&this.isLocked)throw new Error("Could not take the lock for "+n+" because the lock for "+this._lock.name+" was not released");if(t)return t.depth++,t;var r=function(e){var t=a.defer();return t.name=e,t.depth=0,t}(n);return this._lock=r,r}},{key:"transition",value:function(e,t,n){if(n=n||[],this.isLocked){if(!t)throw new Error("You must provide the key in order to transition");if(!this.hasLock(t))throw new Error("Could not transition using the key for "+t.name+" because "+this._lock.name+" has the lock")}else if(t)throw new Error("Key provided for "+t.name+", but the StateMachine was not locked (possibly due to preemption)");if(!u(this._states,this.state,e))throw new Error('Cannot transition from "'+this.state+'" to "'+e+'"');this._state=e,this.emit.apply(this,function(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)}(["stateChanged",e].concat(n)))}},{key:"tryTransition",value:function(e,t,n){try{this.transition(e,t,n)}catch(r){return!1}return!0}},{key:"when",value:function(e){var t=this;return this.state===e?Promise.resolve(this):u(this._reachableStates,this.state,e)?this._whenPromise((function(n,r,i){n===e?r(t):u(t._reachableStates,n,e)||i(l(n,e))})):Promise.reject(l(this.state,e))}}]),t}(o);function u(e,t,n){return e.get(t).has(n)}
2function c(e,t,n){return n=n||new Set,e.get(t).forEach((function(t){n.has(t)||(n.add(t),c(e,t,n).forEach(n.add,n))})),n}function l(e,t){return new Error('"'+t+'" cannot be reached from "'+e+'"')}e.exports=s},function(e,t,n){var r=n(142),i=n(143);e.exports=function(e){return r(i(e))}},function(e,t){e.exports={}},function(e,t,n){n(474);for(var r=n(39),i=n(70),o=n(91),a=n(42)("toStringTag"),s="CSSRuleList,CSSStyleDeclaration,CSSValueList,ClientRectList,DOMRectList,DOMStringList,DOMTokenList,DataTransferItemList,FileList,HTMLAllCollection,HTMLCollection,HTMLFormElement,HTMLSelectElement,MediaList,MimeTypeArray,NamedNodeMap,NodeList,PaintRequestList,Plugin,PluginArray,SVGLengthList,SVGNumberList,SVGPathSegList,SVGPointList,SVGStringList,SVGTransformList,SourceBufferList,StyleSheetList,TextTrackCueList,TextTrackList,TouchList".split(","),u=0;u<s.length;u++){var c=s[u],l=r[c],f=l&&l.prototype;f&&!f[a]&&i(f,a,c),o[c]=o.Array}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(525);t.Retrier=r.Retrier;var i=n(528);t.Backoff=i.Backoff,t.default=r.Retrier},function(e,t,n){var r=n(532);function i(t,n,o){return"undefined"!==typeof Reflect&&Reflect.get?e.exports=i=Reflect.get:e.exports=i=function(e,t,n){var i=r(e,t);if(i){var o=Object.getOwnPropertyDescriptor(i,t);return o.get?o.get.call(n):o.value}},i(t,n,o||t)}e.exports=i},function(e,t,n){"use strict";var r=n(112),i=r.LocalAudioTrack,o=r.LocalDataTrack,a=r.LocalVideoTrack,s=n(206).version,u={};Object.defineProperties(u,{connect:{enumerable:!0,value:n(381)},createLocalAudioTrack:{enumerable:!0,value:n(231).audio},createLocalTracks:{enumerable:!0,value:n(135)},createLocalVideoTrack:{enumerable:!0,value:n(231).video},isSupported:{enumerable:!0,value:n(459)()},LocalAudioTrack:{enumerable:!0,value:i},LocalDataTrack:{enumerable:!0,value:o},LocalVideoTrack:{enumerable:!0,value:a},Logger:{enumerable:!0,value:n(76)},version:{enumerable:!0,value:s}}),e.exports=u},function(e,t,n){"use strict";var r=n(4),i=n.n(r);t.a=i.a.createContext(null)},function(module,exports,__webpack_require__){module.exports=function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return 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 i in e)n.d(r,i,function(t){return e[t]}.bind(null,i));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=2)}([function(e,t){e.exports=__webpack_require__(14)},function(e,t){e.exports=__webpack_require__(4)},function(module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.r(__webpack_exports__),function(module){var react__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(1),react__WEBPACK_IMPORTED_MODULE_0___default=__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__),prop_types__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__(0),prop_types__WEBPACK_IMPORTED_MODULE_1___default=__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_1__),enterModule;function _typeof(e){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function _extends(){return(_extends=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _defineProperties(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function _createClass(e,t,n){return t&&_defineProperties(e.prototype,t),n&&_defineProperties(e,n),e}function _inherits(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&_setPrototypeOf(e,t)}function _setPrototypeOf(e,t){return(_setPrototypeOf=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function _createSuper(e){return function(){var t,n=_getPrototypeOf(e);if(_isNativeReflectConstruct()){var r=_getPrototypeOf(this).constructor;t=Reflect.construct(n,arguments,r)}else t=n.apply(this,arguments);return _possibleConstructorReturn(this,t)}}function _possibleConstructorReturn(e,t){return!t||"object"!==_typeof(t)&&"function"!=typeof t?_assertThisInitialized(e):t}function _assertThisInitialized(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function _isNativeReflectConstruct(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}function _getPrototypeOf(e){return(_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function _defineProperty(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}enterModule="undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal.enterModule:void 0,enterModule&&enterModule(module);var __signature__="undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal.default.signature:function(e){return e},ReactAudioPlayer=function(_Component){_inherits(ReactAudioPlayer,_Component);var _super=_createSuper(ReactAudioPlayer);function ReactAudioPlayer(){var e;_classCallCheck(this,ReactAudioPlayer);for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return _defineProperty(_assertThisInitialized(e=_super.call.apply(_super,[this].concat(n))),"audioEl",react__WEBPACK_IMPORTED_MODULE_0___default.a.createRef()),_defineProperty(_assertThisInitialized(e),"listenTracker",void 0),e}
2return _createClass(ReactAudioPlayer,[{key:"componentDidMount",value:function(){var e=this,t=this.audioEl.current;t&&(this.updateVolume(this.props.volume),t.addEventListener("error",(function(t){e.props.onError(t)})),t.addEventListener("canplay",(function(t){e.props.onCanPlay(t)})),t.addEventListener("canplaythrough",(function(t){e.props.onCanPlayThrough(t)})),t.addEventListener("play",(function(t){e.setListenTrack(),e.props.onPlay(t)})),t.addEventListener("abort",(function(t){e.clearListenTrack(),e.props.onAbort(t)})),t.addEventListener("ended",(function(t){e.clearListenTrack(),e.props.onEnded(t)})),t.addEventListener("pause",(function(t){e.clearListenTrack(),e.props.onPause(t)})),t.addEventListener("seeked",(function(t){e.props.onSeeked(t)})),t.addEventListener("loadedmetadata",(function(t){e.props.onLoadedMetadata(t)})),t.addEventListener("volumechange",(function(t){e.props.onVolumeChanged(t)})))}},{key:"componentDidUpdate",value:function(e){this.updateVolume(this.props.volume)}},{key:"setListenTrack",value:function(){var e=this;if(!this.listenTracker){var t=this.props.listenInterval;this.listenTracker=window.setInterval((function(){e.audioEl.current&&e.props.onListen(e.audioEl.current.currentTime)}),t)}}},{key:"updateVolume",value:function(e){var t=this.audioEl.current;null!==t&&"number"==typeof e&&e!==(null==t?void 0:t.volume)&&(t.volume=e)}},{key:"clearListenTrack",value:function(){this.listenTracker&&(clearInterval(this.listenTracker),delete this.listenTracker)}},{key:"render",value:function(){var e=this.props.children||react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("p",null,"Your browser does not support the ",react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("code",null,"audio")," element."),t=!(!1===this.props.controls),n=this.props.title?this.props.title:this.props.src,r={};return this.props.controlsList&&(r.controlsList=this.props.controlsList),react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("audio",_extends({autoPlay:this.props.autoPlay,className:"react-audio-player ".concat(this.props.className),controls:t,crossOrigin:this.props.crossOrigin,id:this.props.id,loop:this.props.loop,muted:this.props.muted,preload:this.props.preload,ref:this.audioEl,src:this.props.src,style:this.props.style,title:n},r),e)}},{key:"__reactstandin__regenerateByEval",value:function __reactstandin__regenerateByEval(key,code){this[key]=eval(code)}}]),ReactAudioPlayer}(react__WEBPACK_IMPORTED_MODULE_0__.Component);_defineProperty(ReactAudioPlayer,"propTypes",void 0),_defineProperty(ReactAudioPlayer,"defaultProps",void 0),ReactAudioPlayer.defaultProps={autoPlay:!1,children:null,className:"",controls:!1,controlsList:"",id:"",listenInterval:1e4,loop:!1,muted:!1,onAbort:function(){},onCanPlay:function(){},onCanPlayThrough:function(){},onEnded:function(){},onError:function(){},onListen:function(){},onPause:function(){},onPlay:function(){},onSeeked:function(){},onVolumeChanged:function(){},onLoadedMetadata:function(){},preload:"metadata",style:{},title:"",volume:1},ReactAudioPlayer.propTypes={autoPlay:prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.bool,children:prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.element,className:prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string,controls:prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.bool,controlsList:prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string,crossOrigin:prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string,id:prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string,listenInterval:prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.number,loop:prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.bool,muted:prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.bool,onAbort:prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.func,onCanPlay:prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.func,onCanPlayThrough:prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.func,onEnded:prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.func,onError:prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.func,onListen:prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.func,onLoadedMetadata:prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.func,onPause:prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.func,onPlay:
2prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.func,onSeeked:prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.func,onVolumeChanged:prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.func,preload:prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.oneOf(["","none","metadata","auto"]),src:prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string,style:prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.objectOf(prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string),title:prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string,volume:prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.number};var _default=ReactAudioPlayer,reactHotLoader,leaveModule;__webpack_exports__.default=_default,reactHotLoader="undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal.default:void 0,reactHotLoader&&(reactHotLoader.register(ReactAudioPlayer,"ReactAudioPlayer","/home/justin/Projects/react-audio-player/src/index.tsx"),reactHotLoader.register(_default,"default","/home/justin/Projects/react-audio-player/src/index.tsx")),leaveModule="undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal.leaveModule:void 0,leaveModule&&leaveModule(module)}.call(this,__webpack_require__(3)(module))},function(e,t){e.exports=function(e){if(!e.webpackPolyfill){var t=Object.create(e);t.children||(t.children=[]),Object.defineProperty(t,"loaded",{enumerable:!0,get:function(){return t.l}}),Object.defineProperty(t,"id",{enumerable:!0,get:function(){return t.i}}),Object.defineProperty(t,"exports",{enumerable:!0}),t.webpackPolyfill=1}return t}}])},function(e,t){var n,r,i=e.exports={};function o(){throw new Error("setTimeout has not been defined")}function a(){throw new Error("clearTimeout has not been defined")}function s(e){if(n===setTimeout)return setTimeout(e,0);if((n===o||!n)&&setTimeout)return n=setTimeout,setTimeout(e,0);try{return n(e,0)}catch(t){try{return n.call(null,e,0)}catch(t){return n.call(this,e,0)}}}!function(){try{n="function"===typeof setTimeout?setTimeout:o}catch(e){n=o}try{r="function"===typeof clearTimeout?clearTimeout:a}catch(e){r=a}}();var u,c=[],l=!1,f=-1;function h(){l&&u&&(l=!1,u.length?c=u.concat(c):f=-1,c.length&&d())}function d(){if(!l){var e=s(h);l=!0;for(var t=c.length;t;){for(u=c,c=[];++f<t;)u&&u[f].run();f=-1,t=c.length}u=null,l=!1,function(e){if(r===clearTimeout)return clearTimeout(e);if((r===a||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(e);try{r(e)}catch(t){try{return r.call(null,e)}catch(t){return r.call(this,e)}}}(e)}}function p(e,t){this.fun=e,this.array=t}function v(){}i.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];c.push(new p(e,t)),1!==c.length||l||s(d)},p.prototype.run=function(){this.fun.apply(null,this.array)},i.title="browser",i.browser=!0,i.env={},i.argv=[],i.version="",i.versions={},i.on=v,i.addListener=v,i.once=v,i.off=v,i.removeListener=v,i.removeAllListeners=v,i.emit=v,i.prependListener=v,i.prependOnceListener=v,i.listeners=function(e){return[]},i.binding=function(e){throw new Error("process.binding is not supported")},i.cwd=function(){return"/"},i.chdir=function(e){throw new Error("process.chdir is not supported")},i.umask=function(){return 0}},function(e,t,n){"use strict";var r=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],r=!0,i=!1,o=void 0;try{for(var a,s=e[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(u){i=!0,o=u}finally{try{!r&&s.return&&s.return()}finally{if(i)throw o}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")},i=n(22).difference,o=n(22).flatMap,a=n(409),s={0:"PCMU",8:"PCMA"};function u(e,t){return t?"\r\nb="+e+":"+("AS"===e?Math.round((t+16e3)/950):t):null}function c(e){return Array.from(f(e)).reduce((function(e,t){var n=t[0],r=t[1],i=e.get(r)||[];return e.set(r,i.concat(n))}),new Map)}function l(e){return p(e).reduce((function(e,t){var n=d(t);return n?e.set(n,t):e}),new Map)}function f(e){return v(e).reduce((function(t,n){var r=new RegExp("a=rtpmap:"+n+" ([^/]+)"),i=e.match(r),o=i?i[1].toLowerCase():s[n]?s[n].toLowerCase():"";return t.set(n,o)}),new Map)}function h(e,t){var n=new RegExp("^a=fmtp:"+e+" (.+)$","m"),i=t.match(n);return i&&i[1].split(";").reduce((function(e,t){var n=t.split("="),i=r(n,2),o=i[0],a=i[1];return e[o]=isNaN(a)?a:parseInt(a,10),e}),{})}function d(e){var t=e.match(/^a=mid:(.+)$/m);return t&&t[1]}function p(e,t,n){return e.replace(/\r\n\r\n$/,"\r\n").split("\r\nm=").slice(1).map((function(e){return"m="+e})).filter((function(e){var r=new RegExp("m="+(t||".*"),"gm"),i=new RegExp("a="+(n||".*"),"gm");return r.test(e)&&i.test(e)}))}function v(e){var t=e.split("\r\n")[0].match(/([0-9]+)/g);return t?t.slice(1).map((function(e){return parseInt(e,10)})):[]}function y(e,t){var n=t.split("\r\n"),r=n[0],i=n.slice(1);return[r=r.replace(/([0-9]+\s?)+$/,e.join(" "))].concat(i).join("\r\n")}function m(e,t){if(!/^m=(audio|video)/.test(e))return e;var n=d(e),i=n&&t.get(n);if(!i)return e;var a=f(i),s=c(e),u=o(Array.from(a),(function(t){var n=r(t,2),o=n[0],a=n[1];return"rtx"!==a?function(e,t,n,r,i){var o=n.get(e)||[];if(o.length<=1)return o;var a=h(t,i);if(!a)return o;var s=o.find((function(e){var t=h(e,r);return t&&Object.keys(a).every((function(e){return a[e]===t[e]}))}));return"number"===typeof s?[s]:o}(a,o,s,e,i):[]})),l=s.get("rtx")||[];u=u.concat(l.filter((function(t){var n=h(t,e);return n&&u.includes(n.apt)})));var p=e.split("\r\n").filter((function(e){var t=e.match(/^a=(rtpmap|fmtp|rtcp-fb):(.+
2) .+$/),n=t&&t[2];return!t||n&&u.includes(parseInt(n,10))}));return y(v(e).filter((function(e){return u.includes(e)})),p.join("\r\n"))}function g(e,t){var n=p(e);return[e.split("\r\nm=")[0]].concat(n.map((function(e){if(!/^m=(audio|video)/.test(e))return e;var n=d(e);if(!n)return e;var i=t.get(n);if(!i)return e;var o=(e.match(/^a=msid:(.+)$/m)||[])[1];if(!o)return e;var a=o.split(" "),s=r(a,2),u=s[0],c=s[1],l=new RegExp("msid:"+u+(c?" "+c:"")+"$","gm");return e.replace(l,"msid:"+u+" "+i)}))).join("\r\n")}function b(e,t){return"a=fmtp:"+e+" "+Object.entries(t).map((function(e){var t=r(e,2);return t[0]+"="+t[1]})).join(";")}t.createCodecMapForMediaSection=c,t.createPtToCodecName=f,t.disableRtx=function(e){var t=p(e);return[e.split("\r\nm=")[0]].concat(t.map((function(e){if(!/^m=video/.test(e))return e;var t=c(e).get("rtx");if(!t)return e;var n=new Set(v(e));t.forEach((function(e){return n.delete(e)}));var r=e.match(/a=ssrc-group:FID [0-9]+ ([0-9]+)/),i=r&&r[1],o=[/^a=fmtp:.+ apt=.+$/,/^a=rtpmap:.+ rtx\/.+$/,/^a=ssrc-group:.+$/].concat(i?[new RegExp("^a=ssrc:"+i+" .+$")]:[]);return e=e.split("\r\n").filter((function(e){return o.every((function(t){return!t.test(e)}))})).join("\r\n"),y(Array.from(n),e)}))).join("\r\n")},t.enableDtxForOpus=function(e,t){var n=p(e),r=e.split("\r\nm=")[0];return t=t||n.filter((function(e){return/^m=audio/.test(e)})).map(d),[r].concat(n.map((function(e){if(!/^m=audio/.test(e))return e;var n=c(e).get("opus");if(!n)return e;var r=h(n,e);if(!r)return e;var i=b(n,r),o=new RegExp(i),a=d(e);t.includes(a)?r.usedtx=1:delete r.usedtx;var s=b(n,r);return e.replace(o,s)}))).join("\r\n")},t.getMediaSections=p,t.removeSSRCAttributes=function(e,t){return e.split("\r\n").filter((function(e){return!t.find((function(t){return new RegExp("a=ssrc:.*"+t+":","g").test(e)}))})).join("\r\n")},t.revertSimulcastForNonVP8MediaSections=function(e,t,n){var r=l(n),i=l(t),o=p(e);return[e.split("\r\nm=")[0]].concat(o.map((function(e){if(e=e.replace(/\r\n$/,""),!/^m=video/.test(e))return e;var t=e.match(/^a=mid:(.+)$/m),n=t&&t[1];if(!n)return e;var o=r.get(n),a=f(o),s=v(o);return s.length&&"vp8"===a.get(s[0])?e:i.get(n).replace(/\r\n$/,"")}))).concat("").join("\r\n")},t.setBitrateParameters=function(e,t,n,r){var i=p(e);return[e.split("\r\nm=")[0]].concat(i.map((function(e){if(!/^m=(audio|video)/.test(e)||!/a=(recvonly|sendrecv)/.test(e))return e;var i=e.match(/^m=(audio|video)/)[1];return function(e,t,n){var r=u(e,t)||"",i=/\r\nb=(AS|TIAS):([0-9]+)/,o=n.match(i);if(!o)return n.replace(/(\r\n)?$/,r+"$1");var a=parseInt(o[2],10);return t=t||1/0,r=u(e,Math.min(a,t)),n.replace(i,r)}(t,"audio"===i?n:r,e)}))).join("\r\n")},t.setCodecPreferences=function(e,t,n){var r=p(e);return[e.split("\r\nm=")[0]].concat(r.map((function(e){if(!/^m=(audio|video)/.test(e))return e;var r=e.match(/^m=(audio|video)/)[1],a=c(e),s=function(e,t){t=t.map((function(e){return e.codec.toLowerCase()}));var n=o(t,(function(t){return e.get(t)||[]})),r=i(Array.from(e.keys()),t),a=o(r,(function(t){return e.get(t)}));return n.concat(a)}(a,"audio"===r?t:n),u=y(s,e),l=a.get("pcma")||[],f=a.get("pcmu")||[];return("audio"===r?new Set(l.concat(f)):new Set).has(s[0])?u.replace(/\r\nb=(AS|TIAS):([0-9]+)/g,""):u}))).join("\r\n")},t.setSimulcast=function(e,t,n){var r=p(e);return[e.split("\r\nm=")[0]].concat(r.map((function(e){if(e=e.replace(/\r\n$/,""),!/^m=video/.test(e))return e;var r=c(e),i=v(e),o=new Set(r.get("vp8")||[]);return i.some((function(e){return o.has(e)}))?a(e,t,n):e}))).concat("").join("\r\n")},t.unifiedPlanFilterLocalCodecs=function(e,t){var n=p(e),r=e.split("\r\nm=")[0],i=l(t);return[r].concat(n.map((function(e){return m(e,i)}))).join("\r\n")},t.unifiedPlanAddOrRewriteNewTrackIds=function(e,t,n){var i=Array.from(n).reduce((function(n,i){var o=r(i,2),a=o[0],s=o[1];return p(e,a,"send(only|recv)").map(d).filter((function(e){return!t.has(e)})).forEach((function(e,t){return n.set(e,s[t])})),n}),new Map);return g(e,i)},t.unifiedPlanAddOrRewriteTrackIds=g},function(e,t){e.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},function(e,t,n){var r=n(234),i=n(147);e.exports=Object.keys||function(e){return r(e,i)}},function(e,t){var n={}.toString;e.exports=function(e){return n.call(e).slice(8,-1)}},function(e,t){e.exports=!0},function(e,t,n){var r=n(59),i=n(473),o=n(147),a=n(145)("IE_PROTO"),s=function(){},u=function(){var e,t=n(140)("iframe"),r=o.length;for(t.style.display="none",n(236).appendChild(t),t.src="javascript:",(e=t.contentWindow.document).open(),e.write("<script>document.F=Object<\/script>"),e.close(),u=e.F;r--;)delete u.prototype[o[r]];return u()};e.exports=Object.create||function(e,t){var n;return null!==e?(s.prototype=r(e),n=new s,s.prototype=null,n[a]=e):n=u(),void 0===t?n:i(n,t)}},function(e,t,n){var r=n(58).f,i=n(79),o=n(42)("toStringTag");e.exports=function(e,t,n){e&&!i(e=n?e:e.prototype,o)&&r(e,o,{configurable:!0,value:t})}},function(e,t,n){var r=n(65),i=n(239),o=n(240),a=n(59),s=n(116),u=n(151),c={},l={};(t=e.exports=function(e,t,n,f,h){var d,p,v,y,m=h?function(){return e}:u(e),g=r(n,f,t?2:1),b=0;if("function"!=typeof m)throw TypeError(e+" is not iterable!");if(o(m)){for(d=s(e.length);d>b;b++)if((y=t?g(a(p=e[b])[0],p[1]):g(e[b]))===c||y===l)return y}else for(v=m.call(e);!(p=v.next()).done;)if((y=i(v,g,p.value,t))===c||y===l)return y}).BREAK=c,t.RETURN=l},function(e,t,n){"use strict";
2Object.defineProperty(t,"__esModule",{value:!0}),t.TransportUnavailableError=t.TwilsockError=t.Twilsock=t.TwilsockClient=void 0;var r=n(531);Object.defineProperty(t,"TwilsockClient",{enumerable:!0,get:function(){return r.TwilsockClient}}),Object.defineProperty(t,"Twilsock",{enumerable:!0,get:function(){return r.TwilsockClient}});var i=n(67);Object.defineProperty(t,"TwilsockError",{enumerable:!0,get:function(){return i.TwilsockError}});var o=n(271);Object.defineProperty(t,"TransportUnavailableError",{enumerable:!0,get:function(){return o.TransportUnavailableError}})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validateId=t.validatePageSize=t.validateMandatoryTtl=t.validateOptionalTtl=t.deepClone=void 0;var r=n(74);function i(e,t){if(!t||void 0!==e){var n,i=typeof e;if("number"!==i||!(o(n=e)&&n>=0)){var a="object"===i?"object":"'".concat(e,"' of type '").concat(i,"'");throw new r.default("Invalid TTL, expected a positive integer of type number, was ".concat(a),400,54011)}}}function o(e){return!isNaN(parseInt(e))&&isFinite(e)}t.deepClone=function(e){return JSON.parse(JSON.stringify(e))},t.validateId=function(e){if(void 0!==e){var t=typeof e;if("string"!==t)throw new Error("Invalid ID type, expected a string, got '".concat(t,"'"))}},t.validateOptionalTtl=function(e){i(e,!0)},t.validateMandatoryTtl=function(e){i(e,!1)},t.validatePageSize=function(e){var t;if(!(void 0===e||o(t=e)&&t>0))throw new r.default("Invalid pageSize parameter. Expected a positive integer, was '".concat(e,"'."),400,54455)}},function(e,t,n){"use strict";var r=n(123),i=n(9),o=n(17);Object.defineProperty(t,"__esModule",{value:!0}),t.SyncEntity=void 0;var a=function(){function e(t,n){i(this,e),this.services=t,this.removalHandler=n,this.subscriptionState="none",this._attachedListeners=new Map}return o(e,[{key:"_advanceLastEventId",value:function(e,t){}},{key:"reportFailure",value:function(e){404===e.status?this.onRemoved(!1):this.broadcastEventToListeners("failure",e)}},{key:"_subscribe",value:function(){this.services.router.subscribe(this.sid,this)}},{key:"_unsubscribe",value:function(){this.services.router.unsubscribe(this.sid)}},{key:"_setSubscriptionState",value:function(e){this.subscriptionState=e,this.broadcastEventToListeners("_subscriptionStateChanged",e)}},{key:"close",value:function(){this._unsubscribe(),null!=this.removalHandler&&this.removalHandler(this.type,this.sid,this.uniqueName)}},{key:"attach",value:function(e){var t=e.listenerUuid;this._attachedListeners.get(t)||(this._attachedListeners.size||this._subscribe(),this._attachedListeners.set(t,e))}},{key:"detach",value:function(e){this._attachedListeners.delete(e),this._attachedListeners.size||this.close()}},{key:"broadcastEventToListeners",value:function(e,t){var n,i=r(this._attachedListeners.values());try{for(i.s();!(n=i.n()).done;){n.value.emit(e,t)}}catch(o){i.e(o)}finally{i.f()}}}]),e}();t.SyncEntity=a,t.default=a},function(e,t,n){"use strict";var r=n(9),i=n(17),o=n(20),a=n(21);Object.defineProperty(t,"__esModule",{value:!0}),t.Closeable=void 0;var s=n(18),u=n(277),c=function(e){o(n,e);var t=a(n);function n(){var e;return r(this,n),(e=t.call(this)).closed=!1,e.uuid=u(),e}return i(n,[{key:"close",value:function(){this.removeAllListeners(),this.closed=!0}},{key:"ensureNotClosed",value:function(){if(this.closed)throw new Error("Invalid operation on closed object")}},{key:"listenerUuid",get:function(){return this.uuid}}]),n}(s.EventEmitter);t.Closeable=c,t.default=c},function(e,t,n){"use strict";function r(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";e.exports={LocalAudioTrack:n(360),LocalVideoTrack:n(376),LocalDataTrack:n(378)}},function(e,t,n){"use strict";var r=n(18).EventEmitter,i=n(22).hidePrivateAndCertainPublicPropertiesInClass;e.exports=i(r,["domain"])},function(e,t,n){"use strict";var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var o=function(){function e(t,n){var r=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];i(this,e),Object.defineProperties(this,{_delay:{value:n,writable:!0},_fn:{value:t},_timeout:{value:null,writable:!0}}),r&&this.start()}return r(e,[{key:"setDelay",value:function(e){this._delay=e}},{key:"start",value:function(){var e=this;this.isSet||(this._timeout=setTimeout((function(){var t=e._fn;e.clear(),t()}),this._delay))}},{key:"clear",value:function(){clearTimeout(this._timeout),this._timeout=null}},{key:"reset",value:function(){this.clear(),this.start()}},{key:"delay",get:function(){return this._delay}},{key:"isSet",get:function(){return!!this._timeout}}]),e}();e.exports=o},,function(e,t,n){var r=n(144),i=Math.min;e.exports=function(e){return e>0?i(r(e),9007199254740991):0}},function(e,t){var n=0,r=Math.random();e.exports=function(e){return"Symbol(".concat(void 0===e?"":e,")_",(++n+r).toString(36))}},function(e,t){t.f={}.propertyIsEnumerable},function(e,t){},function(e,t,n){var r=n(102),i=n(42)("toStringTag"),o="Arguments"==r(function(){return arguments}());e.exports=function(e){var t,n,a;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(n=function(e,t){try{return e[t]}catch(n){}}
2(t=Object(e),i))?n:o?r(t):"Object"==(a=r(t))&&"function"==typeof t.callee?"Arguments":a}},function(e,t,n){"use strict";var r=a(n(49)),i=a(n(23)),o=a(n(24));function a(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var s=function(){function e(t,n,r,o){(0,i.default)(this,e),this.state={prevToken:r,nextToken:o,source:n,items:t}}return(0,o.default)(e,[{key:"nextPage",value:function(){return this.hasNextPage?this.state.source(this.state.nextToken):r.default.reject(new Error("No next page"))}},{key:"prevPage",value:function(){return this.hasPrevPage?this.state.source(this.state.prevToken):r.default.reject(new Error("No previous page"))}},{key:"hasNextPage",get:function(){return!!this.state.nextToken}},{key:"hasPrevPage",get:function(){return!!this.state.prevToken}},{key:"items",get:function(){return this.state.items}}]),e}();t.RestPaginator=s},function(e,t,n){"use strict";var r=n(9),i=n(17);Object.defineProperty(t,"__esModule",{value:!0}),t.UriBuilder=void 0;var o=function(){function e(t){r(this,e),this.base=t,this.args=new Array,this.paths=new Array}return i(e,[{key:"pathSegment",value:function(e){return this.paths.push(encodeURIComponent(e)),this}},{key:"queryParam",value:function(e,t){return"undefined"!==typeof t&&this.args.push(encodeURIComponent(e)+"="+encodeURIComponent(t)),this}},{key:"build",value:function(){var e=this.base;return this.paths.length&&(e+="/"+this.paths.join("/")),this.args.length&&(e+="?"+this.args.join("&")),e}}]),e}();t.UriBuilder=o},function(e,t,n){var r=n(168);e.exports=function(e,t){var n;if("undefined"===typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=r(e))||t&&e&&"number"===typeof e.length){n&&(e=n);var i=0,o=function(){};return{s:o,n:function(){return i>=e.length?{done:!0}:{done:!1,value:e[i++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,s=!0,u=!1;return{s:function(){n=e[Symbol.iterator]()},n:function(){var e=n.next();return s=e.done,e},e:function(e){u=!0,a=e},f:function(){try{s||null==n.return||n.return()}finally{if(u)throw a}}}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(111);function i(e,t){if(e){if("string"===typeof e)return Object(r.a)(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Object(r.a)(e,t):void 0}}},function(e,t,n){(function(e){e.exports=function(){"use strict";var t,n;function r(){return t.apply(null,arguments)}function i(e){t=e}function o(e){return e instanceof Array||"[object Array]"===Object.prototype.toString.call(e)}function a(e){return null!=e&&"[object Object]"===Object.prototype.toString.call(e)}function s(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function u(e){if(Object.getOwnPropertyNames)return 0===Object.getOwnPropertyNames(e).length;var t;for(t in e)if(s(e,t))return!1;return!0}function c(e){return void 0===e}function l(e){return"number"===typeof e||"[object Number]"===Object.prototype.toString.call(e)}function f(e){return e instanceof Date||"[object Date]"===Object.prototype.toString.call(e)}function h(e,t){var n,r=[];for(n=0;n<e.length;++n)r.push(t(e[n],n));return r}function d(e,t){for(var n in t)s(t,n)&&(e[n]=t[n]);return s(t,"toString")&&(e.toString=t.toString),s(t,"valueOf")&&(e.valueOf=t.valueOf),e}function p(e,t,n,r){return Kn(e,t,n,r,!0).utc()}function v(){return{empty:!1,unusedTokens:[],unusedInput:[],overflow:-2,charsLeftOver:0,nullInput:!1,invalidEra:null,invalidMonth:null,invalidFormat:!1,userInvalidated:!1,iso:!1,parsedDateParts:[],era:null,meridiem:null,rfc2822:!1,weekdayMismatch:!1}}function y(e){return null==e._pf&&(e._pf=v()),e._pf}function m(e){if(null==e._isValid){var t=y(e),r=n.call(t.parsedDateParts,(function(e){return null!=e})),i=!isNaN(e._d.getTime())&&t.overflow<0&&!t.empty&&!t.invalidEra&&!t.invalidMonth&&!t.invalidWeekday&&!t.weekdayMismatch&&!t.nullInput&&!t.invali
vendor: 40,861 bytes, line 2
2dFormat&&!t.userInvalidated&&(!t.meridiem||t.meridiem&&r);if(e._strict&&(i=i&&0===t.charsLeftOver&&0===t.unusedTokens.length&&void 0===t.bigHour),null!=Object.isFrozen&&Object.isFrozen(e))return i;e._isValid=i}return e._isValid}function g(e){var t=p(NaN);return null!=e?d(y(t),e):y(t).userInvalidated=!0,t}n=Array.prototype.some?Array.prototype.some:function(e){var t,n=Object(this),r=n.length>>>0;for(t=0;t<r;t++)if(t in n&&e.call(this,n[t],t,n))return!0;return!1};var b=r.momentProperties=[],_=!1;function w(e,t){var n,r,i;if(c(t._isAMomentObject)||(e._isAMomentObject=t._isAMomentObject),c(t._i)||(e._i=t._i),c(t._f)||(e._f=t._f),c(t._l)||(e._l=t._l),c(t._strict)||(e._strict=t._strict),c(t._tzm)||(e._tzm=t._tzm),c(t._isUTC)||(e._isUTC=t._isUTC),c(t._offset)||(e._offset=t._offset),c(t._pf)||(e._pf=y(t)),c(t._locale)||(e._locale=t._locale),b.length>0)for(n=0;n<b.length;n++)c(i=t[r=b[n]])||(e[r]=i);return e}function k(e){w(this,e),this._d=new Date(null!=e._d?e._d.getTime():NaN),this.isValid()||(this._d=new Date(NaN)),!1===_&&(_=!0,r.updateOffset(this),_=!1)}function S(e){return e instanceof k||null!=e&&null!=e._isAMomentObject}function O(e){!1===r.suppressDeprecationWarnings&&"undefined"!==typeof console&&console.warn&&console.warn("Deprecation warning: "+e)}function E(e,t){var n=!0;return d((function(){if(null!=r.deprecationHandler&&r.deprecationHandler(null,e),n){var i,o,a,u=[];for(o=0;o<arguments.length;o++){if(i="","object"===typeof arguments[o]){for(a in i+="\n["+o+"] ",arguments[0])s(arguments[0],a)&&(i+=a+": "+arguments[0][a]+", ");i=i.slice(0,-2)}else i=arguments[o];u.push(i)}O(e+"\nArguments: "+Array.prototype.slice.call(u).join("")+"\n"+(new Error).stack),n=!1}return t.apply(this,arguments)}),t)}var T,C={};function P(e,t){null!=r.deprecationHandler&&r.deprecationHandler(e,t),C[e]||(O(t),C[e]=!0)}function x(e){return"undefined"!==typeof Function&&e instanceof Function||"[object Function]"===Object.prototype.toString.call(e)}function I(e){var t,n;for(n in e)s(e,n)&&(x(t=e[n])?this[n]=t:this["_"+n]=t);this._config=e,this._dayOfMonthOrdinalParseLenient=new RegExp((this._dayOfMonthOrdinalParse.source||this._ordinalParse.source)+"|"+/\d{1,2}/.source)}function j(e,t){var n,r=d({},e);for(n in t)s(t,n)&&(a(e[n])&&a(t[n])?(r[n]={},d(r[n],e[n]),d(r[n],t[n])):null!=t[n]?r[n]=t[n]:delete r[n]);for(n in e)s(e,n)&&!s(t,n)&&a(e[n])&&(r[n]=d({},r[n]));return r}function R(e){null!=e&&this.set(e)}r.suppressDeprecationWarnings=!1,r.deprecationHandler=null,T=Object.keys?Object.keys:function(e){var t,n=[];for(t in e)s(e,t)&&n.push(t);return n};var A={sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"};function M(e,t,n){var r=this._calendar[e]||this._calendar.sameElse;return x(r)?r.call(t,n):r}function N(e,t,n){var r=""+Math.abs(e),i=t-r.length;return(e>=0?n?"+":"":"-")+Math.pow(10,Math.max(0,i)).toString().substr(1)+r}var L=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,D=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,F={},U={};function V(e,t,n,r){var i=r;"string"===typeof r&&(i=function(){return this[r]()}),e&&(U[e]=i),t&&(U[t[0]]=function(){return N(i.apply(this,arguments),t[1],t[2])}),n&&(U[n]=function(){return this.localeData().ordinal(i.apply(this,arguments),e)})}function B(e){return e.match(/\[[\s\S]/)?e.replace(/^\[|\]$/g,""):e.replace(/\\/g,"")}function q(e){var t,n,r=e.match(L);for(t=0,n=r.length;t<n;t++)U[r[t]]?r[t]=U[r[t]]:r[t]=B(r[t]);return function(t){var i,o="";for(i=0;i<n;i++)o+=x(r[i])?r[i].call(t,e):r[i];return o}}function W(e,t){return e.isValid()?(t=z(t,e.localeData()),F[t]=F[t]||q(t),F[t](e)):e.localeData().invalidDate()}function z(e,t){var n=5;function r(e){return t.longDateFormat(e)||e}for(D.lastIndex=0;n>=0&&D.test(e);)e=e.replace(D,r),D.lastIndex=0,n-=1;return e}var H={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"};function G(e){var t=this._longDateFormat[e],n=this._longDateFormat[e.toUpperCase()];return t||!n?t:(this._longDateFormat[e]=n.match(L).map((function(e){return"MMMM"===e||"MM"===e||"DD"===e||"dddd"===e?e.slice(1):e})).join(""),this._longDateFormat[e])}var K="Invalid date";function Y(){return this._invalidDate}var Q="%d",$=/\d{1,2}/;function X(e){return this._ordinal.replace("%d",e)}var J={future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",w:"a week",ww:"%d weeks",M:"a month",MM:"%d months",y:"a year",yy:"%d years"};function Z(e,t,n,r){var i=this._relativeTime[n];return x(i)?i(e,t,n,r):i.replace(/%d/i,e)}function ee(e,t){var n=this._relativeTime[e>0?"future":"past"];return x(n)?n(t):n.replace(/%s/i,t)}var te={};function ne(e,t){var n=e.toLowerCase();te[n]=te[n+"s"]=te[t]=e}function re(e){return"string"===typeof e?te[e]||te[e.toLowerCase()]:void 0}function ie(e){var t,n,r={};for(n in e)s(e,n)&&(t=re(n))&&(r[t]=e[n]);return r}var oe={};function ae(e,t){oe[e]=t}function se(e){var t,n=[];for(t in e)s(e,t)&&n.push({unit:t,priority:oe[t]});return n.sort((function(e,t){return e.priority-t.priority})),n}function ue(e){return e%4===0&&e%100!==0||e%400===0}function ce(e){return e<0?Math.ceil(e)||0:Math.floor(e)}function le(e){var t=+e,n=0;return 0!==t&&isFinite(t)&&(n=ce(t)),n}function fe(e,t){return function(n){return null!=n?(de(this,e,n),r.updateOffset(this,t),this):he(this,e)}}function he(e,t){return e.isValid()?e._d["get"+(e._isUTC?"UTC":"")+t]():NaN}function de(e,t,n){e.isValid()&&!isNaN(n)&&("FullYear"===t&&ue(e.year())&&1===e.month()&&29===e.date()?(n=le(n),e._d["set"+(e._isUTC?"UTC":"")+t](n,e.month(),Ze(n,e.month()))):e._d["set"+(e._isUTC?"UTC":"")+t](n))}function pe(e){return x(this[e=re(e)])?this[e]():this}function ve(e,t){if("object"===typeof e){var n,r=se(e=ie(e));for(n=0;n<r.length;n++)this[r[n].unit](e[r[n].unit])}else if(x(this[e=re(e)]))return this[e](t);return this}var ye,me=/\d/,ge=/\d\d/,be=/\d{3}/,_e=/\d{4}/,we=/[+-]?\d{6}/,ke=/\d\d?/,Se=/\d\d\d\d?/,Oe=/\d\d\d\d\d\d?/,Ee=/\d{1,3}/,Te=/\d{1,4}/,Ce=/[+-]?\d{1,6}/,Pe=/\d+/,xe=/[+-]?\d+/,Ie=/Z|[+-]\d\d:?\d\d/gi,je=/Z|[+-]\d\d(?::?\d\d)?/gi,Re=/[+-]?\d+(\.\d{1,3})?/,Ae=/[0-9]{0,256}['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFF07\uFF10-\uFFEF]{1,256}|[\u0600-\u06FF\/]{1,256}(\s*?[\u0600-\u06FF]{1,256}){1,2}/i;function Me(e,t,n){ye[e]=x(t)?t:function(e,r){return e&&n?n:t}}function Ne(e,t){return s(ye,e)?ye[e](t._strict,t._locale):new RegExp(Le(e))}function Le(e){return De(e.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,(function(e,t,n,r,i){return t||n||r||i})))}function De(e){return e.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}ye={};var Fe={};function Ue(e,t){var n,r=t;for("string"===typeof e&&(e=[e]),l(t)&&(r=function(e,n){n[t]=le(e)}),n=0;n<e.length;n++)Fe[e[n]]=r}function Ve(e,t){Ue(e,(function(e,n,r,i){r._w=r._w||{},t(e,r._w,r,i)}))}function Be(e,t,n){null!=t&&s(Fe,e)&&Fe[e](t,n._a,n,e)}var qe,We=0,ze=1,He=2,Ge=3,Ke=4,Ye=5,Qe=6,$e=7,Xe=8;function Je(e,t){return(e%t+t)%t}function Ze(e,t){if(isNaN(e)||isNaN(t))return NaN;var n=Je(t,12);return e+=(t-n)/12,1===n?ue(e)?29:28:31-n%7%2}qe=Array.prototype.indexOf?Array.prototype.indexOf:function(e){var t;for(t=0;t<this.length;++t)if(this[t]===e)return t;return-1},V("M",["MM",2],"Mo",(function(){return this.month()+1})),V("MMM",0,0,(function(e){return this.localeData().monthsShort(this,e)})),V("MMMM",0,0,(function(e){return this.localeData().months(this,e)})),ne("month","M"),ae("month",8),Me("M",ke),Me("MM",ke,ge),Me("MMM",(function(e,t){return t.monthsShortRegex(e)})),Me("MMMM",(function(e,t){return t.monthsRegex(e)})),Ue(["M","MM"],(function(e,t){t[ze]=le(e)-1})),Ue(["MMM","MMMM"],(function(e,t,n,r){var i=n._locale.monthsParse(e,r,n._strict);null!=i?t[ze]=i:y(n).invalidMonth=e}));var et="January_February_March_April_May_June_July_August_September_October_November_December".split("_"),tt="Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),nt=/D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/,rt=Ae,it=Ae;function ot(e,t){return e?o(this._months)?this._months[e.month()]:this._months[(this._months.isFormat||nt).test(t)?"format":"standalone"][e.month()]:o(this._months)?this._months:this._months.standalone}function at(e,t){return e?o(this._monthsShort)?this._monthsShort[e.month()]:this._monthsShort[nt.test(t)?"format":"standalone"][e.month()]:o(this._monthsShort)?this._monthsShort:this._monthsShort.standalone}function st(e,t,n){var r,i,o,a=e.toLocaleLowerCase();if(!this._monthsParse)for(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[],r=0;r<12;++r)o=p([2e3,r]),this._shortMonthsParse[r]=this.monthsShort(o,"").toLocaleLowerCase(),this._longMonthsParse[r]=this.months(o,"").toLocaleLowerCase();return n?"MMM"===t?-1!==(i=qe.call(this._shortMonthsParse,a))?i:null:-1!==(i=qe.call(this._longMonthsParse,a))?i:null:"MMM"===t?-1!==(i=qe.call(this._shortMonthsParse,a))||-1!==(i=qe.call(this._longMonthsParse,a))?i:null:-1!==(i=qe.call(this._longMonthsParse,a))||-1!==(i=qe.call(this._shortMonthsParse,a))?i:null}function ut(e,t,n){var r,i,o;if(this._monthsParseExact)return st.call(this,e,t,n);for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),r=0;r<12;r++){if(i=p([2e3,r]),n&&!this._longMonthsParse[r]&&(this._longMonthsParse[r]=new RegExp("^"+this.months(i,"").replace(".","")+"$","i"),this._shortMonthsParse[r]=new RegExp("^"+this.monthsShort(i,"").replace(".","")+"$","i")),n||this._monthsParse[r]||(o="^"+this.months(i,"")+"|^"+this.monthsShort(i,""),this._monthsParse[r]=new RegExp(o.replace(".",""),"i")),n&&"MMMM"===t&&this._longMonthsParse[r].test(e))return r;if(n&&"MMM"===t&&this._shortMonthsParse[r].test(e))return r;if(!n&&this._monthsParse[r].test(e))return r}}function ct(e,t){var n;if(!e.isValid())return e;if("string"===typeof t)if(/^\d+$/.test(t))t=le(t);else if(!l(t=e.localeData().monthsParse(t)))return e;return n=Math.min(e.date(),Ze(e.year(),t)),e._d["set"+(e._isUTC?"UTC":"")+"Month"](t,n),e}function lt(e){return null!=e?(ct(this,e),r.updateOffset(this,!0),this):he(this,"Month")}function ft(){return Ze(this.year(),this.month())}function ht(e){return this._monthsParseExact?(s(this,"_monthsRegex")||pt.call(this),e?this._monthsShortStrictRegex:this._monthsShortRegex):(s(this,"_monthsShortRegex")||(this._monthsShortRegex=rt),this._monthsShortStrictRegex&&e?this._monthsShortStrictRegex:this._monthsShortRegex)}function dt(e){return this._monthsParseExact?(s(this,"_monthsRegex")||pt.call(this),e?this._monthsStrictRegex:this._monthsRegex):(s(this,"_monthsRegex")||(this._monthsRegex=it),this._monthsStrictRegex&&e?this._monthsStrictRegex:this._monthsRegex)}function pt(){function e(e,t){return t.length-e.length}var t,n,r=[],i=[],o=[];for(t=0;t<12;t++)n=p([2e3,t]),r.push(this.monthsShort(n,"")),i.push(this.months(n,"")),o.push(this.months(n,"")),o.push(this.monthsShort(n,""));for(r.sort(e),i.sort(e),o.sort(e),t=0;t<12;t++)r[t]=De(r[t]),i[t]=De(i[t]);for(t=0;t<24;t++)o[t]=De(o[t]);this._monthsRegex=new RegExp("^("+o.join("|")+")","i"),this._monthsShortRegex=this._monthsRegex,this._monthsStrictRegex=new RegExp("^("+i.join("|")+")","i"),this._monthsShortStrictRegex=new RegExp("^("+r.join("|")+")","i")}function vt(e){return ue(e)?366:365}V("Y",0,0,(function(){var e=this.year();return e<=9999?N(e,4):"+"+e})),V(0,["YY",2],0,(function(){return this.year()%100})),V(0,["YYYY",4],0,"year"),V(0,["YYYYY",5],0,"year"),V(0,["YYYYYY",6,!0],0,"year"),ne("year","y"),ae("year",1),Me("Y",xe),Me("YY",ke,ge),Me("YYYY",Te,_e),Me("YYYYY",Ce,we),Me("YYYYYY",Ce,we),Ue(["YYYYY","YYYYYY"],We),Ue("YYYY",(function(e,t){t[We]=2===e.length?r.parseTwoDigitYear(e):le(e)})),Ue("YY",(function(e,t){t[We]=r.parseTwoDigitYear(e)})),Ue("Y",(function(e,t){t[We]=parseInt(e,10)})),r.parseTwoDigitYear=function(e){return le(e)+(le(e)>68?1900:2e3)};var yt=fe("FullYear",!0);function mt(){return ue(this.year())}function gt(e,t,n,r,i,o,a){var s;return e<100&&e>=0?(s=new Date(e+400,t,n,r,i,o,a),isFinite(s.getFullYear())&&s.setFullYear(e)):s=new Date(e,t,n,r,i,o,a),s}function bt(e){var t,n;return e<100&&e>=0?((n=Array.prototype.slice.call(arguments))[0]=e+400,t=new Date(Date.UTC.apply(null,n)),isFinite(t.getUTCFullYear())&&t.setUTCFullYear(e)):t=new Date(Date.UTC.apply(null,arguments)),t}function _t(e,t,n){var r=7+t-n;return-(7+bt(e,0,r).getUTCDay()-t)%7+r-1}function wt(e,t,n,r,i){var o,a,s=1+7*(t-1)+(7+n-r)%7+_t(e,r,i);return s<=0?a=vt(o=e-1)+s:s>vt(e)?(o=e+1,a=s-vt(e)):(o=e,a=s),{year:o,dayOfYear:a}}function kt(e,t,n){var r,i,o=_t(e.year(),t,n),a=Math.floor((e.dayOfYear()-o-1)/7)+1;return a<1?r=a+St(i=e.year()-1,t,n):a>St(e.year(),t,n)?(r=a-St(e.year(),t,n),i=e.year()+1):(i=e.year(),r=a),{week:r,year:i}}function St(e,t,n){var r=_t(e,t,n),i=_t(e+1,t,n);return(vt(e)-r+i)/7}function Ot(e){return kt(e,this._week.dow,this._week.doy).week}V("w",["ww",2],"wo","week"),V("W",["WW",2],"Wo","isoWeek"),ne("week","w"),ne("isoWeek","W"),ae("week",5),ae("isoWeek",5),Me("w",ke),Me("ww",ke,ge),Me("W",ke),Me("WW",ke,ge),Ve(["w","ww","W","WW"],(function(e,t,n,r){t[r.substr(0,1)]=le(e)}));var Et={dow:0,doy:6};function Tt(){return this._week.dow}function Ct(){return this._week.doy}function Pt(e){var t=this.localeData().week(this);return null==e?t:this.add(7*(e-t),"d")}function xt(e){var t=kt(this,1,4).week;return null==e?t:this.add(7*(e-t),"d")}function It(e,t){return"string"!==typeof e?e:isNaN(e)?"number"===typeof(e=t.weekdaysParse(e))?e:null:parseInt(e,10)}function jt(e,t){return"string"===typeof e?t.weekdaysParse(e)%7||7:isNaN(e)?null:e}function Rt(e,t){return e.slice(t,7).concat(e.slice(0,t))}V("d",0,"do","day"),V("dd",0,0,(function(e){return this.localeData().weekdaysMin(this,e)})),V("ddd",0,0,(function(e){return this.localeData().weekdaysShort(this,e)})),V("dddd",0,0,(function(e){return this.localeData().weekdays(this,e)})),V("e",0,0,"weekday"),V("E",0,0,"isoWeekday"),ne("day","d"),ne("weekday","e"),ne("isoWeekday","E"),ae("day",11),ae("weekday",11),ae("isoWeekday",11),Me("d",ke),Me("e",ke),Me("E",ke),Me("dd",(function(e,t){return t.weekdaysMinRegex(e)})),Me("ddd",(function(e,t){return t.weekdaysShortRegex(e)})),Me("dddd",(function(e,t){return t.weekdaysRegex(e)})),Ve(["dd","ddd","dddd"],(function(e,t,n,r){var i=n._locale.weekdaysParse(e,r,n._strict);null!=i?t.d=i:y(n).invalidWeekday=e})),Ve(["d","e","E"],(function(e,t,n,r){t[r]=le(e)}));var At="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),Mt="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),Nt="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),Lt=Ae,Dt=Ae,Ft=Ae;function Ut(e,t){var n=o(this._weekdays)?this._weekdays:this._weekdays[e&&!0!==e&&this._weekdays.isFormat.test(t)?"format":"standalone"];return!0===e?Rt(n,this._week.dow):e?n[e.day()]:n}function Vt(e){return!0===e?Rt(this._weekdaysShort,this._week.dow):e?this._weekdaysShort[e.day()]:this._weekdaysShort}function Bt(e){return!0===e?Rt(this._weekdaysMin,this._week.dow):e?this._weekdaysMin[e.day()]:this._weekdaysMin}function qt(e,t,n){var r,i,o,a=e.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],r=0;r<7;++r)o=p([2e3,1]).day(r),this._minWeekdaysParse[r]=this.weekdaysMin(o,"").toLocaleLowerCase(),this._shortWeekdaysParse[r]=this.weekdaysShort(o,"").toLocaleLowerCase(),this._weekdaysParse[r]=this.weekdays(o,"").toLocaleLowerCase();return n?"dddd"===t?-1!==(i=qe.call(this._weekdaysParse,a))?i:null:"ddd"===t?-1!==(i=qe.call(this._shortWeekdaysParse,a))?i:null:-1!==(i=qe.call(this._minWeekdaysParse,a))?i:null:"dddd"===t?-1!==(i=qe.call(this._weekdaysParse,a))||-1!==(i=qe.call(this._shortWeekdaysParse,a))||-1!==(i=qe.call(this._minWeekdaysParse,a))?i:null:"ddd"===t?-1!==(i=qe.call(this._shortWeekdaysParse,a))||-1!==(i=qe.call(this._weekdaysParse,a))||-1!==(i=qe.call(this._minWeekdaysParse,a))?i:null:-1!==(i=qe.call(this._minWeekdaysParse,a))||-1!==(i=qe.call(this._weekdaysParse,a))||-1!==(i=qe.call(this._shortWeekdaysParse,a))?i:null}function Wt(e,t,n){var r,i,o;if(this._weekdaysParseExact)return qt.call(this,e,t,n);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),r=0;r<7;r++){if(i=p([2e3,1]).day(r),n&&!this._fullWeekdaysParse[r]&&(this._fullWeekdaysParse[r]=new RegExp("^"+this.weekdays(i,"").replace(".","\\.?")+"$","i"),this._shortWeekdaysParse[r]=new RegExp("^"+this.weekdaysShort(i,"").replace(".","\\.?")+"$","i"),this._minWeekdaysParse[r]=new RegExp("^"+this.weekdaysMin(i,"").replace(".","\\.?")+"$","i")),this._weekdaysParse[r]||(o="^"+this.weekdays(i,"")+"|^"+this.weekdaysShort(i,"")+"|^"+this.weekdaysMin(i,""),this._weekdaysParse[r]=new RegExp(o.replace(".",""),"i")),n&&"dddd"===t&&this._fullWeekdaysParse[r].test(e))return r;if(n&&"ddd"===t&&this._shortWeekdaysParse[r].test(e))return r;if(n&&"dd"===t&&this._minWeekdaysParse[r].test(e))return r;if(!n&&this._weekdaysParse[r].test(e))return r}}function zt(e){if(!this.isValid())return null!=e?this:NaN;var t=this._isUTC?this._d.getUTCDay():this._d.getDay();return null!=e?(e=It(e,this.localeData()),this.add(e-t,"d")):t}function Ht(e){if(!this.isValid())return null!=e?this:NaN;var t=(this.day()+7-this.localeData()._week.dow)%7;return null==e?t:this.add(e-t,"d")}function Gt(e){if(!this.isValid())return null!=e?this:NaN;if(null!=e){var t=jt(e,this.localeData());return this.day(this.day()%7?t:t-7)}return this.day()||7}function Kt(e){return this._weekdaysParseExact?(s(this,"_weekdaysRegex")||$t.call(this),e?this._weekdaysStrictRegex:this._weekdaysRegex):(s(this,"_weekdaysRegex")||(this._weekdaysRegex=Lt),this._weekdaysStrictRegex&&e?this._weekdaysStrictRegex:this._weekdaysRegex)}function Yt(e){return this._weekdaysParseExact?(s(this,"_weekdaysRegex")||$t.call(this),e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(s(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=Dt),this._weekdaysShortStrictRegex&&e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)}function Qt(e){return this._weekdaysParseExact?(s(this,"_weekdaysRegex")||$t.call(this),e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(s(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=Ft),this._weekdaysMinStrictRegex&&e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)}function $t(){function e(e,t){return t.length-e.length}var t,n,r,i,o,a=[],s=[],u=[],c=[];for(t=0;t<7;t++)n=p([2e3,1]).day(t),r=De(this.weekdaysMin(n,"")),i=De(this.weekdaysShort(n,"")),o=De(this.weekdays(n,"")),a.push(r),s.push(i),u.push(o),c.push(r),c.push(i),c.push(o);a.sort(e),s.sort(e),u.sort(e),c.sort(e),this._weekdaysRegex=new RegExp("^("+c.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+u.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+s.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+a.join("|")+")","i")}function Xt(){return this.hours()%12||12}function Jt(){return this.hours()||24}function Zt(e,t){V(e,0,0,(function(){return this.localeData().meridiem(this.hours(),this.minutes(),t)}))}function en(e,t){return t._meridiemParse}function tn(e){return"p"===(e+"").toLowerCase().charAt(0)}V("H",["HH",2],0,"hour"),V("h",["hh",2],0,Xt),V("k",["kk",2],0,Jt),V("hmm",0,0,(function(){return""+Xt.apply(this)+N(this.minutes(),2)})),V("hmmss",0,0,(function(){return""+Xt.apply(this)+N(this.minutes(),2)+N(this.seconds(),2)})),V("Hmm",0,0,(function(){return""+this.hours()+N(this.minutes(),2)})),V("Hmmss",0,0,(function(){return""+this.hours()+N(this.minutes(),2)+N(this.seconds(),2)})),Zt("a",!0),Zt("A",!1),ne("hour","h"),ae("hour",13),Me("a",en),Me("A",en),Me("H",ke),Me("h",ke),Me("k",ke),Me("HH",ke,ge),Me("hh",ke,ge),Me("kk",ke,ge),Me("hmm",Se),Me("hmmss",Oe),Me("Hmm",Se),Me("Hmmss",Oe),Ue(["H","HH"],Ge),Ue(["k","kk"],(function(e,t,n){var r=le(e);t[Ge]=24===r?0:r})),Ue(["a","A"],(function(e,t,n){n._isPm=n._locale.isPM(e),n._meridiem=e})),Ue(["h","hh"],(function(e,t,n){t[Ge]=le(e),y(n).bigHour=!0})),Ue("hmm",(function(e,t,n){var r=e.length-2;t[Ge]=le(e.substr(0,r)),t[Ke]=le(e.substr(r)),y(n).bigHour=!0})),Ue("hmmss",(function(e,t,n){var r=e.length-4,i=e.length-2;t[Ge]=le(e.substr(0,r)),t[Ke]=le(e.substr(r,2)),t[Ye]=le(e.substr(i)),y(n).bigHour=!0})),Ue("Hmm",(function(e,t,n){var r=e.length-2;t[Ge]=le(e.substr(0,r)),t[Ke]=le(e.substr(r))})),Ue("Hmmss",(function(e,t,n){var r=e.length-4,i=e.length-2;t[Ge]=le(e.substr(0,r)),t[Ke]=le(e.substr(r,2)),t[Ye]=le(e.substr(i))}));var nn=/[ap]\.?m?\.?/i,rn=fe("Hours",!0);function on(e,t,n){return e>11?n?"pm":"PM":n?"am":"AM"}var an,sn={calendar:A,longDateFormat:H,invalidDate:K,ordinal:Q,dayOfMonthOrdinalParse:$,relativeTime:J,months:et,monthsShort:tt,week:Et,weekdays:At,weekdaysMin:Nt,weekdaysShort:Mt,meridiemParse:nn},un={},cn={};function ln(e,t){var n,r=Math.min(e.length,t.length);for(n=0;n<r;n+=1)if(e[n]!==t[n])return n;return r}function fn(e){return e?e.toLowerCase().replace("_","-"):e}function hn(e){for(var t,n,r,i,o=0;o<e.length;){for(t=(i=fn(e[o]).split("-")).length,n=(n=fn(e[o+1]))?n.split("-"):null;t>0;){if(r=dn(i.slice(0,t).join("-")))return r;if(n&&n.length>=t&&ln(i,n)>=t-1)break;t--}o++}return an}function dn(t){var n=null;if(void 0===un[t]&&"undefined"!==typeof e&&e&&e.exports)try{n=an._abbr,function(){var e=new Error("Cannot find module 'undefined'");throw e.code="MODULE_NOT_FOUND",e}(),pn(n)}catch(r){un[t]=null}return un[t]}function pn(e,t){var n;return e&&((n=c(t)?mn(e):vn(e,t))?an=n:"undefined"!==typeof console&&console.warn&&console.warn("Locale "+e+" not found. Did you forget to load it?")),an._abbr}function vn(e,t){if(null!==t){var n,r=sn;if(t.abbr=e,null!=un[e])P("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),r=un[e]._config;else if(null!=t.parentLocale)if(null!=un[t.parentLocale])r=un[t.parentLocale]._config;else{if(null==(n=dn(t.parentLocale)))return cn[t.parentLocale]||(cn[t.parentLocale]=[]),cn[t.parentLocale].push({name:e,config:t}),null;r=n._config}return un[e]=new R(j(r,t)),cn[e]&&cn[e].forEach((function(e){vn(e.name,e.config)})),pn(e),un[e]}return delete un[e],null}function yn(e,t){if(null!=t){var n,r,i=sn;null!=un[e]&&null!=un[e].parentLocale?un[e].set(j(un[e]._config,t)):(null!=(r=dn(e))&&(i=r._config),t=j(i,t),null==r&&(t.abbr=e),(n=new R(t)).parentLocale=un[e],un[e]=n),pn(e)}else null!=un[e]&&(null!=un[e].parentLocale?(un[e]=un[e].parentLocale,e===pn()&&pn(e)):null!=un[e]&&delete un[e]);return un[e]}function mn(e){var t;if(e&&e._locale&&e._locale._abbr&&(e=e._locale._abbr),!e)return an;if(!o(e)){if(t=dn(e))return t;e=[e]}return hn(e)}function gn(){return T(un)}function bn(e){var t,n=e._a;return n&&-2===y(e).overflow&&(t=n[ze]<0||n[ze]>11?ze:n[He]<1||n[He]>Ze(n[We],n[ze])?He:n[Ge]<0||n[Ge]>24||24===n[Ge]&&(0!==n[Ke]||0!==n[Ye]||0!==n[Qe])?Ge:n[Ke]<0||n[Ke]>59?Ke:n[Ye]<0||n[Ye]>59?Ye:n[Qe]<0||n[Qe]>999?Qe:-1,y(e)._overflowDayOfYear&&(t<We||t>He)&&(t=He),y(e)._overflowWeeks&&-1===t&&(t=$e),y(e)._overflowWeekday&&-1===t&&(t=Xe),y(e).overflow=t),e}var _n=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,wn=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d|))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,kn=/Z|[+-]\d\d(?::?\d\d)?/,Sn=[["YYYYYY-MM-DD",/[+-]\d{6}-\d\d-\d\d/],["YYYY-MM-DD",/\d{4}-\d\d-\d\d/],["GGGG-[W]WW-E",/\d{4}-W\d\d-\d/],["GGGG-[W]WW",/\d{4}-W\d\d/,!1],["YYYY-DDD",/\d{4}-\d{3}/],["YYYY-MM",/\d{4}-\d\d/,!1],["YYYYYYMMDD",/[+-]\d{10}/],["YYYYMMDD",/\d{8}/],["GGGG[W]WWE",/\d{4}W\d{3}/],["GGGG[W]WW",/\d{4}W\d{2}/,!1],["YYYYDDD",/\d{7}/],["YYYYMM",/\d{6}/,!1],["YYYY",/\d{4}/,!1]],On=[["HH:mm:ss.SSSS",/\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss,SSSS",/\d\d:\d\d:\d\d,\d+/],["HH:mm:ss",/\d\d:\d\d:\d\d/],["HH:mm",/\d\d:\d\d/],["HHmmss.SSSS",/\d\d\d\d\d\d\.\d+/],["HHmmss,SSSS",/\d\d\d\d\d\d,\d+/],["HHmmss",/\d\d\d\d\d\d/],["HHmm",/\d\d\d\d/],["HH",/\d\d/]],En=/^\/?Date\((-?\d+)/i,Tn=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\d{4}))$/,Cn={UT:0,GMT:0,EDT:-240,EST:-300,CDT:-300,CST:-360,MDT:-360,MST:-420,PDT:-420,PST:-480};function Pn(e){var t,n,r,i,o,a,s=e._i,u=_n.exec(s)||wn.exec(s);if(u){for(y(e).iso=!0,t=0,n=Sn.length;t<n;t++)if(Sn[t][1].exec(u[1])){i=Sn[t][0],r=!1!==Sn[t][2];break}if(null==i)return void(e._isValid=!1);if(u[3]){for(t=0,n=On.length;t<n;t++)if(On[t][1].exec(u[3])){o=(u[2]||" ")+On[t][0];break}if(null==o)return void(e._isValid=!1)}if(!r&&null!=o)return void(e._isValid=!1);if(u[4]){if(!kn.exec(u[4]))return void(e._isValid=!1);a="Z"}e._f=i+(o||"")+(a||""),Vn(e)}else e._isValid=!1}function xn(e,t,n,r,i,o){var a=[In(e),tt.indexOf(t),parseInt(n,10),parseInt(r,10),parseInt(i,10)];return o&&a.push(parseInt(o,10)),a}function In(e){var t=parseInt(e,10);return t<=49?2e3+t:t<=999?1900+t:t}function jn(e){return e.replace(/\([^)]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").replace(/^\s\s*/,"").replace(/\s\s*$/,"")}function Rn(e,t,n){return!e||Mt.indexOf(e)===new Date(t[0],t[1],t[2]).getDay()||(y(n).weekdayMismatch=!0,n._isValid=!1,!1)}function An(e,t,n){if(e)return Cn[e];if(t)return 0;var r=parseInt(n,10),i=r%100;return(r-i)/100*60+i}function Mn(e){var t,n=Tn.exec(jn(e._i));if(n){if(t=xn(n[4],n[3],n[2],n[5],n[6],n[7]),!Rn(n[1],t,e))return;e._a=t,e._tzm=An(n[8],n[9],n[10]),e._d=bt.apply(null,e._a),e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),y(e).rfc2822=!0}else e._isValid=!1}function Nn(e){var t=En.exec(e._i);null===t?(Pn(e),!1===e._isValid&&(delete e._isValid,Mn(e),!1===e._isValid&&(delete e._isValid,e._strict?e._isValid=!1:r.createFromInputFallback(e)))):e._d=new Date(+t[1])}function Ln(e,t,n){return null!=e?e:null!=t?t:n}function Dn(e){var t=new Date(r.now());return e._useUTC?[t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate()]:[t.getFullYear(),t.getMonth(),t.getDate()]}function Fn(e){var t,n,r,i,o,a=[];if(!e._d){for(r=Dn(e),e._w&&null==e._a[He]&&null==e._a[ze]&&Un(e),null!=e._dayOfYear&&(o=Ln(e._a[We],r[We]),(e._dayOfYear>vt(o)||0===e._dayOfYear)&&(y(e)._overflowDayOfYear=!0),n=bt(o,0,e._dayOfYear),e._a[ze]=n.getUTCMonth(),e._a[He]=n.getUTCDate()),t=0;t<3&&null==e._a[t];++t)e._a[t]=a[t]=r[t];for(;t<7;t++)e._a[t]=a[t]=null==e._a[t]?2===t?1:0:e._a[t];24===e._a[Ge]&&0===e._a[Ke]&&0===e._a[Ye]&&0===e._a[Qe]&&(e._nextDay=!0,e._a[Ge]=0),e._d=(e._useUTC?bt:gt).apply(null,a),i=e._useUTC?e._d.getUTCDay():e._d.getDay(),null!=e._tzm&&e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),e._nextDay&&(e._a[Ge]=24),e._w&&"undefined"!==typeof e._w.d&&e._w.d!==i&&(y(e).weekdayMismatch=!0)}}function Un(e){var t,n,r,i,o,a,s,u,c;null!=(t=e._w).GG||null!=t.W||null!=t.E?(o=1,a=4,n=Ln(t.GG,e._a[We],kt(Yn(),1,4).year),r=Ln(t.W,1),((i=Ln(t.E,1))<1||i>7)&&(u=!0)):(o=e._locale._week.dow,a=e._locale._week.doy,c=kt(Yn(),o,a),n=Ln(t.gg,e._a[We],c.year),r=Ln(t.w,c.week),null!=t.d?((i=t.d)<0||i>6)&&(u=!0):null!=t.e?(i=t.e+o,(t.e<0||t.e>6)&&(u=!0)):i=o),r<1||r>St(n,o,a)?y(e)._overflowWeeks=!0:null!=u?y(e)._overflowWeekday=!0:(s=wt(n,r,i,o,a),e._a[We]=s.year,e._dayOfYear=s.dayOfYear)}function Vn(e){if(e._f!==r.ISO_8601)if(e._f!==r.RFC_2822){e._a=[],y(e).empty=!0;var t,n,i,o,a,s,u=""+e._i,c=u.length,l=0;for(i=z(e._f,e._locale).match(L)||[],t=0;t<i.length;t++)o=i[t],(n=(u.match(Ne(o,e))||[])[0])&&((a=u.substr(0,u.indexOf(n))).length>0&&y(e).unusedInput.push(a),u=u.slice(u.indexOf(n)+n.length),l+=n.length),U[o]?(n?y(e).empty=!1:y(e).unusedTokens.push(o),Be(o,n,e)):e._strict&&!n&&y(e).unusedTokens.push(o);y(e).charsLeftOver=c-l,u.length>0&&y(e).unusedInput.push(u),e._a[Ge]<=12&&!0===y(e).bigHour&&e._a[Ge]>0&&(y(e).bigHour=void 0),y(e).parsedDateParts=e._a.slice(0),y(e).meridiem=e._meridiem,e._a[Ge]=Bn(e._locale,e._a[Ge],e._meridiem),null!==(s=y(e).era)&&(e._a[We]=e._locale.erasConvertYear(s,e._a[We])),Fn(e),bn(e)}else Mn(e);else Pn(e)}function Bn(e,t,n){var r;return null==n?t:null!=e.meridiemHour?e.meridiemHour(t,n):null!=e.isPM?((r=e.isPM(n))&&t<12&&(t+=12),r||12!==t||(t=0),t):t}function qn(e){var t,n,r,i,o,a,s=!1;if(0===e._f.length)return y(e).invalidFormat=!0,void(e._d=new Date(NaN));for(i=0;i<e._f.length;i++)o=0,a=!1,t=w({},e),null!=e._useUTC&&(t._useUTC=e._useUTC),t._f=e._f[i],Vn(t),m(t)&&(a=!0),o+=y(t).charsLeftOver,o+=10*y(t).unusedTokens.length,y(t).score=o,s?o<r&&(r=o,n=t):(null==r||o<r||a)&&(r=o,n=t,a&&(s=!0));d(e,n||t)}function Wn(e){if(!e._d){var t=ie(e._i),n=void 0===t.day?t.date:t.day;e._a=h([t.year,t.month,n,t.hour,t.minute,t.second,t.millisecond],(function(e){return e&&parseInt(e,10)})),Fn(e)}}function zn(e){var t=new k(bn(Hn(e)));return t._nextDay&&(t.add(1,"d"),t._nextDay=void 0),t}function Hn(e){var t=e._i,n=e._f;return e._locale=e._locale||mn(e._l),null===t||void 0===n&&""===t?g({nullInput:!0}):("string"===typeof t&&(e._i=t=e._locale.preparse(t)),S(t)?new k(bn(t)):(f(t)?e._d=t:o(n)?qn(e):n?Vn(e):Gn(e),m(e)||(e._d=null),e))}function Gn(e){var t=e._i;c(t)?e._d=new Date(r.now()):f(t)?e._d=new Date(t.valueOf()):"string"===typeof t?Nn(e):o(t)?(e._a=h(t.slice(0),(function(e){return parseInt(e,10)})),Fn(e)):a(t)?Wn(e):l(t)?e._d=new Date(t):r.createFromInputFallback(e)}function Kn(e,t,n,r,i){var s={};return!0!==t&&!1!==t||(r=t,t=void 0),!0!==n&&!1!==n||(r=n,n=void 0),(a(e)&&u(e)||o(e)&&0===e.length)&&(e=void 0),s._isAMomentObject=!0,s._useUTC=s._isUTC=i,s._l=n,s._i=e,s._f=t,s._strict=r,zn(s)}function Yn(e,t,n,r){return Kn(e,t,n,r,!1)}r.createFromInputFallback=E("value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are discouraged. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.",(function(e){e._d=new Date(e._i+(e._useUTC?" UTC":""))})),r.ISO_8601=function(){},r.RFC_2822=function(){};var Qn=E("moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/",(function(){var e=Yn.apply(null,arguments);return this.isValid()&&e.isValid()?e<this?this:e:g()})),$n=E("moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/",(function(){var e=Yn.apply(null,arguments);return this.isValid()&&e.isValid()?e>this?this:e:g()}));function Xn(e,t){var n,r;if(1===t.length&&o(t[0])&&(t=t[0]),!t.length)return Yn();for(n=t[0],r=1;r<t.length;++r)t[r].isValid()&&!t[r][e](n)||(n=t[r]);return n}function Jn(){return Xn("isBefore",[].slice.call(arguments,0))}function Zn(){return Xn("isAfter",[].slice.call(arguments,0))}var er=function(){return Date.now?Date.now():+new Date},tr=["year","quarter","month","week","day","hour","minute","second","millisecond"];function nr(e){var t,n,r=!1;for(t in e)if(s(e,t)&&(-1===qe.call(tr,t)||null!=e[t]&&isNaN(e[t])))return!1;for(n=0;n<tr.length;++n)if(e[tr[n]]){if(r)return!1;parseFloat(e[tr[n]])!==le(e[tr[n]])&&(r=!0)}return!0}function rr(){return this._isValid}function ir(){return Cr(NaN)}function or(e){var t=ie(e),n=t.year||0,r=t.quarter||0,i=t.month||0,o=t.week||t.isoWeek||0,a=t.day||0,s=t.hour||0,u=t.minute||0,c=t.second||0,l=t.millisecond||0;this._isValid=nr(t),this._milliseconds=+l+1e3*c+6e4*u+1e3*s*60*60,this._days=+a+7*o,this._months=+i+3*r+12*n,this._data={},this._locale=mn(),this._bubble()}function ar(e){return e instanceof or}function sr(e){return e<0?-1*Math.round(-1*e):Math.round(e)}function ur(e,t,n){var r,i=Math.min(e.length,t.length),o=Math.abs(e.length-t.length),a=0;for(r=0;r<i;r++)(n&&e[r]!==t[r]||!n&&le(e[r])!==le(t[r]))&&a++;return a+o}function cr(e,t){V(e,0,0,(function(){var e=this.utcOffset(),n="+";return e<0&&(e=-e,n="-"),n+N(~~(e/60),2)+t+N(~~e%60,2)}))}cr("Z",":"),cr("ZZ",""),Me("Z",je),Me("ZZ",je),Ue(["Z","ZZ"],(function(e,t,n){n._useUTC=!0,n._tzm=fr(je,e)}));var lr=/([\+\-]|\d\d)/gi;function fr(e,t){var n,r,i=(t||"").match(e);return null===i?null:0===(r=60*(n=((i[i.length-1]||[])+"").match(lr)||["-",0,0])[1]+le(n[2]))?0:"+"===n[0]?r:-r}function hr(e,t){var n,i;return t._isUTC?(n=t.clone(),i=(S(e)||f(e)?e.valueOf():Yn(e).valueOf())-n.valueOf(),n._d.setTime(n._d.valueOf()+i),r.updateOffset(n,!1),n):Yn(e).local()}function dr(e){return-Math.round(e._d.getTimezoneOffset())}function pr(e,t,n){var i,o=this._offset||0;if(!this.isValid())return null!=e?this:NaN;if(null!=e){if("string"===typeof e){if(null===(e=fr(je,e)))return this}else Math.abs(e)<16&&!n&&(e*=60);return!this._isUTC&&t&&(i=dr(this)),this._offset=e,this._isUTC=!0,null!=i&&this.add(i,"m"),o!==e&&(!t||this._changeInProgress?Rr(this,Cr(e-o,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,r.updateOffset(this,!0),this._changeInProgress=null)),this}return this._isUTC?o:dr(this)}function vr(e,t){return null!=e?("string"!==typeof e&&(e=-e),this.utcOffset(e,t),this):-this.utcOffset()}function yr(e){return this.utcOffset(0,e)}function mr(e){return this._isUTC&&(this.utcOffset(0,e),this._isUTC=!1,e&&this.subtract(dr(this),"m")),this}function gr(){if(null!=this._tzm)this.utcOffset(this._tzm,!1,!0);else if("string"===typeof this._i){var e=fr(Ie,this._i);null!=e?this.utcOffset(e):this.utcOffset(0,!0)}return this}function br(e){return!!this.isValid()&&(e=e?Yn(e).utcOffset():0,(this.utcOffset()-e)%60===0)}function _r(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()}function wr(){if(!c(this._isDSTShifted))return this._isDSTShifted;var e,t={};return w(t,this),(t=Hn(t))._a?(e=t._isUTC?p(t._a):Yn(t._a),this._isDSTShifted=this.isValid()&&ur(t._a,e.toArray())>0):this._isDSTShifted=!1,this._isDSTShifted}function kr(){return!!this.isValid()&&!this._isUTC}function Sr(){return!!this.isValid()&&this._isUTC}function Or(){return!!this.isValid()&&this._isUTC&&0===this._offset}r.updateOffset=function(){};var Er=/^(-|\+)?(?:(\d*)[. ])?(\d+):(\d+)(?::(\d+)(\.\d*)?)?$/,Tr=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;function Cr(e,t){var n,r,i,o=e,a=null;return ar(e)?o={ms:e._milliseconds,d:e._days,M:e._months}:l(e)||!isNaN(+e)?(o={},t?o[t]=+e:o.milliseconds=+e):(a=Er.exec(e))?(n="-"===a[1]?-1:1,o={y:0,d:le(a[He])*n,h:le(a[Ge])*n,m:le(a[Ke])*n,s:le(a[Ye])*n,ms:le(sr(1e3*a[Qe]))*n}):(a=Tr.exec(e))?(n="-"===a[1]?-1:1,o={y:Pr(a[2],n),M:Pr(a[3],n),w:Pr(a[4],n),d:Pr(a[5],n),h:Pr(a[6],n),m:Pr(a[7],n),s:Pr(a[8],n)}):null==o?o={}:"object"===typeof o&&("from"in o||"to"in o)&&(i=Ir(Yn(o.from),Yn(o.to)),(o={}).ms=i.milliseconds,o.M=i.months),r=new or(o),ar(e)&&s(e,"_locale")&&(r._locale=e._locale),ar(e)&&s(e,"_isValid")&&(r._isValid=e._isValid),r}function Pr(e,t){var n=e&&parseFloat(e.replace(",","."));return(isNaN(n)?0:n)*t}function xr(e,t){var n={};return n.months=t.month()-e.month()+12*(t.year()-e.year()),e.clone().add(n.months,"M").isAfter(t)&&--n.months,n.milliseconds=+t-+e.clone().add(n.months,"M"),n}function Ir(e,t){var n;return e.isValid()&&t.isValid()?(t=hr(t,e),e.isBefore(t)?n=xr(e,t):((n=xr(t,e)).milliseconds=-n.milliseconds,n.months=-n.months),n):{milliseconds:0,months:0}}function jr(e,t){return function(n,r){var i;return null===r||isNaN(+r)||(P(t,"moment()."+t+"(period, number) is deprecated. Please use moment()."+t+"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."),i=n,n=r,r=i),Rr(this,Cr(n,r),e),this}}function Rr(e,t,n,i){var o=t._milliseconds,a=sr(t._days),s=sr(t._months);e.isValid()&&(i=null==i||i,s&&ct(e,he(e,"Month")+s*n),a&&de(e,"Date",he(e,"Date")+a*n),o&&e._d.setTime(e._d.valueOf()+o*n),i&&r.updateOffset(e,a||s))}Cr.fn=or.prototype,Cr.invalid=ir;var Ar=jr(1,"add"),Mr=jr(-1,"subtract");function Nr(e){return"string"===typeof e||e instanceof String}function Lr(e){return S(e)||f(e)||Nr(e)||l(e)||Fr(e)||Dr(e)||null===e||void 0===e}function Dr(e){var t,n,r=a(e)&&!u(e),i=!1,o=["years","year","y","months","month","M","days","day","d","dates","date","D","hours","hour","h","minutes","minute","m","seconds","second","s","milliseconds","millisecond","ms"];for(t=0;t<o.length;t+=1)n=o[t],i=i||s(e,n);return r&&i}function Fr(e){var t=o(e),n=!1;return t&&(n=0===e.filter((function(t){return!l(t)&&Nr(e)})).length),t&&n}function Ur(e){var t,n,r=a(e)&&!u(e),i=!1,o=["sameDay","nextDay","lastDay","nextWeek","lastWeek","sameElse"];for(t=0;t<o.length;t+=1)n=o[t],i=i||s(e,n);return r&&i}function Vr(e,t){var n=e.diff(t,"days",!0);return n<-6?"sameElse":n<-1?"lastWeek":n<0?"lastDay":n<1?"sameDay":n<2?"nextDay":n<7?"nextWeek":"sameElse"}function Br(e,t){1===arguments.length&&(arguments[0]?Lr(arguments[0])?(e=arguments[0],t=void 0):Ur(arguments[0])&&(t=arguments[0],e=void 0):(e=void 0,t=void 0));var n=e||Yn(),i=hr(n,this).startOf("day"),o=r.calendarFormat(this,i)||"sameElse",a=t&&(x(t[o])?t[o].call(this,n):t[o]);return this.format(a||this.localeData().calendar(o,this,Yn(n)))}function qr(){return new k(this)}function Wr(e,t){var n=S(e)?e:Yn(e);return!(!this.isValid()||!n.isValid())&&("millisecond"===(t=re(t)||"millisecond")?this.valueOf()>n.valueOf():n.valueOf()<this.clone().startOf(t).valueOf())}function zr(e,t){var n=S(e)?e:Yn(e);return!(!this.isValid()||!n.isValid())&&("millisecond"===(t=re(t)||"millisecond")?this.valueOf()<n.valueOf():this.clone().endOf(t).valueOf()<n.valueOf())}function Hr(e,t,n,r){var i=S(e)?e:Yn(e),o=S(t)?t:Yn(t);return!!(this.isValid()&&i.isValid()&&o.isValid())&&("("===(r=r||"()")[0]?this.isAfter(i,n):!this.isBefore(i,n))&&(")"===r[1]?this.isBefore(o,n):!this.isAfter(o,n))}function Gr(e,t){var n,r=S(e)?e:Yn(e);return!(!this.isValid()||!r.isValid())&&("millisecond"===(t=re(t)||"millisecond")?this.valueOf()===r.valueOf():(n=r.valueOf(),this.clone().startOf(t).valueOf()<=n&&n<=this.clone().endOf(t).valueOf()))}function Kr(e,t){return this.isSame(e,t)||this.isAfter(e,t)}function Yr(e,t){return this.isSame(e,t)||this.isBefore(e,t)}function Qr(e,t,n){var r,i,o;if(!this.isValid())return NaN;if(!(r=hr(e,this)).isValid())return NaN;switch(i=6e4*(r.utcOffset()-this.utcOffset()),t=re(t)){case"year":o=$r(this,r)/12;break;case"month":o=$r(this,r);break;case"quarter":o=$r(this,r)/3;break;case"second":o=(this-r)/1e3;break;case"minute":o=(this-r)/6e4;break;case"hour":o=(this-r)/36e5;break;case"day":o=(this-r-i)/864e5;break;case"week":o=(this-r-i)/6048e5;break;default:o=this-r}return n?o:ce(o)}function $r(e,t){if(e.date()<t.date())return-$r(t,e);var n=12*(t.year()-e.year())+(t.month()-e.month()),r=e.clone().add(n,"months");return-(n+(t-r<0?(t-r)/(r-e.clone().add(n-1,"months")):(t-r)/(e.clone().add(n+1,"months")-r)))||0}function Xr(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")}function Jr(e){if(!this.isValid())return null;var t=!0!==e,n=t?this.clone().utc():this;return n.year()<0||n.year()>9999?W(n,t?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):x(Date.prototype.toISOString)?t?this.toDate().toISOString():new Date(this.valueOf()+60*this.utcOffset()*1e3).toISOString().replace("Z",W(n,"Z")):W(n,t?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")}function Zr(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var e,t,n,r,i="moment",o="";return this.isLocal()||(i=0===this.utcOffset()?"moment.utc":"moment.parseZone",o="Z"),e="["+i+'("]',t=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY",n="-MM-DD[T]HH:mm:ss.SSS",r=o+'[")]',this.format(e+t+n+r)}function ei(e){e||(e=this.isUtc()?r.defaultFormatUtc:r.defaultFormat);var t=W(this,e);return this.localeData().postformat(t)}function ti(e,t){return this.isValid()&&(S(e)&&e.isValid()||Yn(e).isValid())?Cr({to:this,from:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()}function ni(e){return this.from(Yn(),e)}function ri(e,t){return this.isValid()&&(S(e)&&e.isValid()||Yn(e).isValid())?Cr({from:this,to:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()}function ii(e){return this.to(Yn(),e)}function oi(e){var t;return void 0===e?this._locale._abbr:(null!=(t=mn(e))&&(this._locale=t),this)}r.defaultFormat="YYYY-MM-DDTHH:mm:ssZ",r.defaultFormatUtc="YYYY-MM-DDTHH:mm:ss[Z]";var ai=E("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",(function(e){return void 0===e?this.localeData():this.locale(e)}));function si(){return this._locale}var ui=1e3,ci=60*ui,li=60*ci,fi=3506328*li;function hi(e,t){return(e%t+t)%t}function di(e,t,n){return e<100&&e>=0?new Date(e+400,t,n)-fi:new Date(e,t,n).valueOf()}function pi(e,t,n){return e<100&&e>
vendor: 4,129 bytes, line 2
2=0?Date.UTC(e+400,t,n)-fi:Date.UTC(e,t,n)}function vi(e){var t,n;if(void 0===(e=re(e))||"millisecond"===e||!this.isValid())return this;switch(n=this._isUTC?pi:di,e){case"year":t=n(this.year(),0,1);break;case"quarter":t=n(this.year(),this.month()-this.month()%3,1);break;case"month":t=n(this.year(),this.month(),1);break;case"week":t=n(this.year(),this.month(),this.date()-this.weekday());break;case"isoWeek":t=n(this.year(),this.month(),this.date()-(this.isoWeekday()-1));break;case"day":case"date":t=n(this.year(),this.month(),this.date());break;case"hour":t=this._d.valueOf(),t-=hi(t+(this._isUTC?0:this.utcOffset()*ci),li);break;case"minute":t=this._d.valueOf(),t-=hi(t,ci);break;case"second":t=this._d.valueOf(),t-=hi(t,ui)}return this._d.setTime(t),r.updateOffset(this,!0),this}function yi(e){var t,n;if(void 0===(e=re(e))||"millisecond"===e||!this.isValid())return this;switch(n=this._isUTC?pi:di,e){case"year":t=n(this.year()+1,0,1)-1;break;case"quarter":t=n(this.year(),this.month()-this.month()%3+3,1)-1;break;case"month":t=n(this.year(),this.month()+1,1)-1;break;case"week":t=n(this.year(),this.month(),this.date()-this.weekday()+7)-1;break;case"isoWeek":t=n(this.year(),this.month(),this.date()-(this.isoWeekday()-1)+7)-1;break;case"day":case"date":t=n(this.year(),this.month(),this.date()+1)-1;break;case"hour":t=this._d.valueOf(),t+=li-hi(t+(this._isUTC?0:this.utcOffset()*ci),li)-1;break;case"minute":t=this._d.valueOf(),t+=ci-hi(t,ci)-1;break;case"second":t=this._d.valueOf(),t+=ui-hi(t,ui)-1}return this._d.setTime(t),r.updateOffset(this,!0),this}function mi(){return this._d.valueOf()-6e4*(this._offset||0)}function gi(){return Math.floor(this.valueOf()/1e3)}function bi(){return new Date(this.valueOf())}function _i(){var e=this;return[e.year(),e.month(),e.date(),e.hour(),e.minute(),e.second(),e.millisecond()]}function wi(){var e=this;return{years:e.year(),months:e.month(),date:e.date(),hours:e.hours(),minutes:e.minutes(),seconds:e.seconds(),milliseconds:e.milliseconds()}}function ki(){return this.isValid()?this.toISOString():null}function Si(){return m(this)}function Oi(){return d({},y(this))}function Ei(){return y(this).overflow}function Ti(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}}function Ci(e,t){var n,i,o,a=this._eras||mn("en")._eras;for(n=0,i=a.length;n<i;++n){switch(typeof a[n].since){case"string":o=r(a[n].since).startOf("day"),a[n].since=o.valueOf()}switch(typeof a[n].until){case"undefined":a[n].until=1/0;break;case"string":o=r(a[n].until).startOf("day").valueOf(),a[n].until=o.valueOf()}}return a}function Pi(e,t,n){var r,i,o,a,s,u=this.eras();for(e=e.toUpperCase(),r=0,i=u.length;r<i;++r)if(o=u[r].name.toUpperCase(),a=u[r].abbr.toUpperCase(),s=u[r].narrow.toUpperCase(),n)switch(t){case"N":case"NN":case"NNN":if(a===e)return u[r];break;case"NNNN":if(o===e)return u[r];break;case"NNNNN":if(s===e)return u[r]}else if([o,a,s].indexOf(e)>=0)return u[r]}function xi(e,t){var n=e.since<=e.until?1:-1;return void 0===t?r(e.since).year():r(e.since).year()+(t-e.offset)*n}function Ii(){var e,t,n,r=this.localeData().eras();for(e=0,t=r.length;e<t;++e){if(n=this.clone().startOf("day").valueOf(),r[e].since<=n&&n<=r[e].until)return r[e].name;if(r[e].until<=n&&n<=r[e].since)return r[e].name}return""}function ji(){var e,t,n,r=this.localeData().eras();for(e=0,t=r.length;e<t;++e){if(n=this.clone().startOf("day").valueOf(),r[e].since<=n&&n<=r[e].until)return r[e].narrow;if(r[e].until<=n&&n<=r[e].since)return r[e].narrow}return""}function Ri(){var e,t,n,r=this.localeData().eras();for(e=0,t=r.length;e<t;++e){if(n=this.clone().startOf("day").valueOf(),r[e].since<=n&&n<=r[e].until)return r[e].abbr;if(r[e].until<=n&&n<=r[e].since)return r[e].abbr}return""}function Ai(){var e,t,n,i,o=this.localeData().eras();for(e=0,t=o.length;e<t;++e)if(n=o[e].since<=o[e].until?1:-1,i=this.clone().startOf("day").valueOf(),o[e].since<=i&&i<=o[e].until||o[e].until<=i&&i<=o[e].since)return(this.year()-r(o[e].since).year())*n+o[e].offset;return this.year()}function Mi(e){return s(this,"_erasNameRegex")||Bi.call(this),e?this._erasNameRegex:this._erasRegex}
vendor: 11,351 bytes, line 2
2function Ni(e){return s(this,"_erasAbbrRegex")||Bi.call(this),e?this._erasAbbrRegex:this._erasRegex}function Li(e){return s(this,"_erasNarrowRegex")||Bi.call(this),e?this._erasNarrowRegex:this._erasRegex}function Di(e,t){return t.erasAbbrRegex(e)}function Fi(e,t){return t.erasNameRegex(e)}function Ui(e,t){return t.erasNarrowRegex(e)}function Vi(e,t){return t._eraYearOrdinalRegex||Pe}function Bi(){var e,t,n=[],r=[],i=[],o=[],a=this.eras();for(e=0,t=a.length;e<t;++e)r.push(De(a[e].name)),n.push(De(a[e].abbr)),i.push(De(a[e].narrow)),o.push(De(a[e].name)),o.push(De(a[e].abbr)),o.push(De(a[e].narrow));this._erasRegex=new RegExp("^("+o.join("|")+")","i"),this._erasNameRegex=new RegExp("^("+r.join("|")+")","i"),this._erasAbbrRegex=new RegExp("^("+n.join("|")+")","i"),this._erasNarrowRegex=new RegExp("^("+i.join("|")+")","i")}function qi(e,t){V(0,[e,e.length],0,t)}function Wi(e){return Qi.call(this,e,this.week(),this.weekday(),this.localeData()._week.dow,this.localeData()._week.doy)}function zi(e){return Qi.call(this,e,this.isoWeek(),this.isoWeekday(),1,4)}function Hi(){return St(this.year(),1,4)}function Gi(){return St(this.isoWeekYear(),1,4)}function Ki(){var e=this.localeData()._week;return St(this.year(),e.dow,e.doy)}function Yi(){var e=this.localeData()._week;return St(this.weekYear(),e.dow,e.doy)}function Qi(e,t,n,r,i){var o;return null==e?kt(this,r,i).year:(t>(o=St(e,r,i))&&(t=o),$i.call(this,e,t,n,r,i))}function $i(e,t,n,r,i){var o=wt(e,t,n,r,i),a=bt(o.year,0,o.dayOfYear);return this.year(a.getUTCFullYear()),this.month(a.getUTCMonth()),this.date(a.getUTCDate()),this}function Xi(e){return null==e?Math.ceil((this.month()+1)/3):this.month(3*(e-1)+this.month()%3)}V("N",0,0,"eraAbbr"),V("NN",0,0,"eraAbbr"),V("NNN",0,0,"eraAbbr"),V("NNNN",0,0,"eraName"),V("NNNNN",0,0,"eraNarrow"),V("y",["y",1],"yo","eraYear"),V("y",["yy",2],0,"eraYear"),V("y",["yyy",3],0,"eraYear"),V("y",["yyyy",4],0,"eraYear"),Me("N",Di),Me("NN",Di),Me("NNN",Di),Me("NNNN",Fi),Me("NNNNN",Ui),Ue(["N","NN","NNN","NNNN","NNNNN"],(function(e,t,n,r){var i=n._locale.erasParse(e,r,n._strict);i?y(n).era=i:y(n).invalidEra=e})),Me("y",Pe),Me("yy",Pe),Me("yyy",Pe),Me("yyyy",Pe),Me("yo",Vi),Ue(["y","yy","yyy","yyyy"],We),Ue(["yo"],(function(e,t,n,r){var i;n._locale._eraYearOrdinalRegex&&(i=e.match(n._locale._eraYearOrdinalRegex)),n._locale.eraYearOrdinalParse?t[We]=n._locale.eraYearOrdinalParse(e,i):t[We]=parseInt(e,10)})),V(0,["gg",2],0,(function(){return this.weekYear()%100})),V(0,["GG",2],0,(function(){return this.isoWeekYear()%100})),qi("gggg","weekYear"),qi("ggggg","weekYear"),qi("GGGG","isoWeekYear"),qi("GGGGG","isoWeekYear"),ne("weekYear","gg"),ne("isoWeekYear","GG"),ae("weekYear",1),ae("isoWeekYear",1),Me("G",xe),Me("g",xe),Me("GG",ke,ge),Me("gg",ke,ge),Me("GGGG",Te,_e),Me("gggg",Te,_e),Me("GGGGG",Ce,we),Me("ggggg",Ce,we),Ve(["gggg","ggggg","GGGG","GGGGG"],(function(e,t,n,r){t[r.substr(0,2)]=le(e)})),Ve(["gg","GG"],(function(e,t,n,i){t[i]=r.parseTwoDigitYear(e)})),V("Q",0,"Qo","quarter"),ne("quarter","Q"),ae("quarter",7),Me("Q",me),Ue("Q",(function(e,t){t[ze]=3*(le(e)-1)})),V("D",["DD",2],"Do","date"),ne("date","D"),ae("date",9),Me("D",ke),Me("DD",ke,ge),Me("Do",(function(e,t){return e?t._dayOfMonthOrdinalParse||t._ordinalParse:t._dayOfMonthOrdinalParseLenient})),Ue(["D","DD"],He),Ue("Do",(function(e,t){t[He]=le(e.match(ke)[0])}));var Ji=fe("Date",!0);function Zi(e){var t=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return null==e?t:this.add(e-t,"d")}V("DDD",["DDDD",3],"DDDo","dayOfYear"),ne("dayOfYear","DDD"),ae("dayOfYear",4),Me("DDD",Ee),Me("DDDD",be),Ue(["DDD","DDDD"],(function(e,t,n){n._dayOfYear=le(e)})),V("m",["mm",2],0,"minute"),ne("minute","m"),ae("minute",14),Me("m",ke),Me("mm",ke,ge),Ue(["m","mm"],Ke);var eo=fe("Minutes",!1);V("s",["ss",2],0,"second"),ne("second","s"),ae("second",15),Me("s",ke),Me("ss",ke,ge),Ue(["s","ss"],Ye);var to,no,ro=fe("Seconds",!1);for(V("S",0,0,(function(){return~~(this.millisecond()/100)})),V(0,["SS",2],0,(function(){return~~(this.millisecond()/10)})),V(0,["SSS",3],0,"millisecond"),V(0,["SSSS",4],0,(function(){return 10*this.millisecond()})),V(0,["SSSSS",5],0,(function(){return 100*this.millisecond()})),V(0,["SSSSSS",6],0,(function(){return 1e3*this.millisecond()})),V(0,["SSSSSSS",7],0,(function(){return 1e4*this.millisecond()})),V(0,["SSSSSSSS",8],0,(function(){return 1e5*this.millisecond()})),V(0,["SSSSSSSSS",9],0,(function(){return 1e6*this.millisecond()})),ne("millisecond","ms"),ae("millisecond",16),Me("S",Ee,me),Me("SS",Ee,ge),Me("SSS",Ee,be),to="SSSS";to.length<=9;to+="S")Me(to,Pe);function io(e,t){t[Qe]=le(1e3*("0."+e))}for(to="S";to.length<=9;to+="S")Ue(to,io);function oo(){return this._isUTC?"UTC":""}function ao(){return this._isUTC?"Coordinated Universal Time":""}no=fe("Milliseconds",!1),V("z",0,0,"zoneAbbr"),V("zz",0,0,"zoneName");var so=k.prototype;function uo(e){return Yn(1e3*e)}function co(){return Yn.apply(null,arguments).parseZone()}function lo(e){return e}so.add=Ar,so.calendar=Br,so.clone=qr,so.diff=Qr,so.endOf=yi,so.format=ei,so.from=ti,so.fromNow=ni,so.to=ri,so.toNow=ii,so.get=pe,so.invalidAt=Ei,so.isAfter=Wr,so.isBefore=zr,so.isBetween=Hr,so.isSame=Gr,so.isSameOrAfter=Kr,so.isSameOrBefore=Yr,so.isValid=Si,so.lang=ai,so.locale=oi,so.localeData=si,so.max=$n,so.min=Qn,so.parsingFlags=Oi,so.set=ve,so.startOf=vi,so.subtract=Mr,so.toArray=_i,so.toObject=wi,so.toDate=bi,so.toISOString=Jr,so.inspect=Zr,"undefined"!==typeof Symbol&&null!=Symbol.for&&(so[Symbol.for("nodejs.util.inspect.custom")]=function(){return"Moment<"+this.format()+">"}),so.toJSON=ki,so.toString=Xr,so.unix=gi,so.valueOf=mi,so.creationData=Ti,so.eraName=Ii,so.eraNarrow=ji,so.eraAbbr=Ri,so.eraYear=Ai,so.year=yt,so.isLeapYear=mt,so.weekYear=Wi,so.isoWeekYear=zi,so.quarter=so.quarters=Xi,so.month=lt,so.daysInMonth=ft,so.week=so.weeks=Pt,so.isoWeek=so.isoWeeks=xt,so.weeksInYear=Ki,so.weeksInWeekYear=Yi,so.isoWeeksInYear=Hi,so.isoWeeksInISOWeekYear=Gi,so.date=Ji,so.day=so.days=zt,so.weekday=Ht,so.isoWeekday=Gt,so.dayOfYear=Zi,so.hour=so.hours=rn,so.minute=so.minutes=eo,so.second=so.seconds=ro,so.millisecond=so.milliseconds=no,so.utcOffset=pr,so.utc=yr,so.local=mr,so.parseZone=gr,so.hasAlignedHourOffset=br,so.isDST=_r,so.isLocal=kr,so.isUtcOffset=Sr,so.isUtc=Or,so.isUTC=Or,so.zoneAbbr=oo,so.zoneName=ao,so.dates=E("dates accessor is deprecated. Use date instead.",Ji),so.months=E("months accessor is deprecated. Use month instead",lt),so.years=E("years accessor is deprecated. Use year instead",yt),so.zone=E("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",vr),so.isDSTShifted=E("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",wr);var fo=R.prototype;function ho(e,t,n,r){var i=mn(),o=p().set(r,t);return i[n](o,e)}function po(e,t,n){if(l(e)&&(t=e,e=void 0),e=e||"",null!=t)return ho(e,t,n,"month");var r,i=[];for(r=0;r<12;r++)i[r]=ho(e,r,n,"month");return i}function vo(e,t,n,r){"boolean"===typeof e?(l(t)&&(n=t,t=void 0),t=t||""):(n=t=e,e=!1,l(t)&&(n=t,t=void 0),t=t||"");var i,o=mn(),a=e?o._week.dow:0,s=[];if(null!=n)return ho(t,(n+a)%7,r,"day");for(i=0;i<7;i++)s[i]=ho(t,(i+a)%7,r,"day");return s}function yo(e,t){return po(e,t,"months")}function mo(e,t){return po(e,t,"monthsShort")}function go(e,t,n){return vo(e,t,n,"weekdays")}function bo(e,t,n){return vo(e,t,n,"weekdaysShort")}function _o(e,t,n){return vo(e,t,n,"weekdaysMin")}fo.calendar=M,fo.longDateFormat=G,fo.invalidDate=Y,fo.ordinal=X,fo.preparse=lo,fo.postformat=lo,fo.relativeTime=Z,fo.pastFuture=ee,fo.set=I,fo.eras=Ci,fo.erasParse=Pi,fo.erasConvertYear=xi,fo.erasAbbrRegex=Ni,fo.erasNameRegex=Mi,fo.erasNarrowRegex=Li,fo.months=ot,fo.monthsShort=at,fo.monthsParse=ut,fo.monthsRegex=dt,fo.monthsShortRegex=ht,fo.week=Ot,fo.firstDayOfYear=Ct,fo.firstDayOfWeek=Tt,fo.weekdays=Ut,fo.weekdaysMin=Bt,fo.weekdaysShort=Vt,fo.weekdaysParse=Wt,fo.weekdaysRegex=Kt,fo.weekdaysShortRegex=Yt,fo.weekdaysMinRegex=Qt,fo.isPM=tn,fo.meridiem=on,pn("en",{eras:[{since:"0001-01-01",until:1/0,offset:1,name:"Anno Domini",narrow:"AD",abbr:"AD"},{since:"0000-12-31",until:-1/0,offset:1,name:"Before Christ",narrow:"BC",abbr:"BC"}],dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(e){var t=e%10;return e+(1===le(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th")}}),r.lang=E("moment.lang is deprecated. Use moment.locale instead.",pn),r.langData=E("moment.langData is deprecated. Use moment.localeData instead.",mn);var wo=Math.abs;function ko(){var e=this._data;return this._milliseconds=wo(this._milliseconds),this._days=wo(this._days),this._months=wo(this._months),e.milliseconds=wo(e.milliseconds),e.seconds=wo(e.seconds),e.minutes=wo(e.minutes),e.hours=wo(e.hours),e.months=wo(e.months),e.years=wo(e.years),this}function So(e,t,n,r){var i=Cr(t,n);return e._milliseconds+=r*i._milliseconds,e._days+=r*i._days,e._months+=r*i._months,e._bubble()}function Oo(e,t){return So(this,e,t,1)}function Eo(e,t){return So(this,e,t,-1)}function To(e){return e<0?Math.floor(e):Math.ceil(e)}function Co(){var e,t,n,r,i,o=this._milliseconds,a=this._days,s=this._months,u=this._data;return o>=0&&a>=0&&s>=0||o<=0&&a<=0&&s<=0||(o+=864e5*To(xo(s)+a),a=0,s=0),u.milliseconds=o%1e3,e=ce(o/1e3),u.seconds=e%60,t=ce(e/60),u.minutes=t%60,n=ce(t/60),u.hours=n%24,a+=ce(n/24),s+=i=ce(Po(a)),a-=To(xo(i)),r=ce(s/12),s%=12,u.days=a,u.months=s,u.years=r,this}function Po(e){return 4800*e/146097}function xo(e){return 146097*e/4800}function Io(e){if(!this.isValid())return NaN;var t,n,r=this._milliseconds;if("month"===(e=re(e))||"quarter"===e||"year"===e)switch(t=this._days+r/864e5,n=this._months+Po(t),e){case"month":return n;case"quarter":return n/3;case"year":return n/12}else switch(t=this._days+Math.round(xo(this._months)),e){case"week":return t/7+r/6048e5;case"day":return t+r/864e5;case"hour":return 24*t+r/36e5;case"minute":return 1440*t+r/6e4;case"second":return 86400*t+r/1e3;case"millisecond":return Math.floor(864e5*t)+r;default:throw new Error("Unknown unit "+e)}}function jo(){return this.isValid()?this._milliseconds+864e5*this._days+this._months%12*2592e6+31536e6*le(this._months/12):NaN}function Ro(e){return function(){return this.as(e)}}var Ao=Ro("ms"),Mo=Ro("s"),No=Ro("m"),Lo=Ro("h"),Do=Ro("d"),Fo=Ro("w"),Uo=Ro("M"),Vo=Ro("Q"),Bo=Ro("y");function qo(){return Cr(this)}function Wo(e){return e=re(e),this.isValid()?this[e+"s"]():NaN}function zo(e){return function(){return this.isValid()?this._data[e]:NaN}}var Ho=zo("milliseconds"),Go=zo("seconds"),Ko=zo("minutes"),Yo=zo("hours"),Qo=zo("days"),$o=zo("months"),Xo=zo("years");function Jo(){return ce(this.days()/7)}var Zo=Math.round,ea={ss:44,s:45,m:45,h:22,d:26,w:null,M:11};function ta(e,t,n,r,i){return i.relativeTime(t||1,!!n,e,r)}function na(e,t,n,r){var i=Cr(e).abs(),o=Zo(i.as("s")),a=Zo(i.as("m")),s=Zo(i.as("h")),u=Zo(i.as("d")),c=Zo(i.as("M")),l=Zo(i.as("w")),f=Zo(i.as("y")),h=o<=n.ss&&["s",o]||o<n.s&&["ss",o]||a<=1&&["m"]||a<n.m&&["mm",a]||s<=1&&["h"]||s<n.h&&["hh",s]||u<=1&&["d"]||u<n.d&&["dd",u];return null!=n.w&&(h=h||l<=1&&["w"]||l<n.w&&["ww",l]),(h=h||c<=1&&["M"]||c<n.M&&["MM",c]||f<=1&&["y"]||["yy",f])[2]=t,h[3]=+e>0,h[4]=r,ta.apply(null,h)}function ra(e){return void 0===e?Zo:"function"===typeof e&&(Zo=e,!0)}function ia(e,t){return void 0!==ea[e]&&(void 0===t?ea[e]:(ea[e]=t,"
2s"===e&&(ea.ss=t-1),!0))}function oa(e,t){if(!this.isValid())return this.localeData().invalidDate();var n,r,i=!1,o=ea;return"object"===typeof e&&(t=e,e=!1),"boolean"===typeof e&&(i=e),"object"===typeof t&&(o=Object.assign({},ea,t),null!=t.s&&null==t.ss&&(o.ss=t.s-1)),r=na(this,!i,o,n=this.localeData()),i&&(r=n.pastFuture(+this,r)),n.postformat(r)}var aa=Math.abs;function sa(e){return(e>0)-(e<0)||+e}function ua(){if(!this.isValid())return this.localeData().invalidDate();var e,t,n,r,i,o,a,s,u=aa(this._milliseconds)/1e3,c=aa(this._days),l=aa(this._months),f=this.asSeconds();return f?(e=ce(u/60),t=ce(e/60),u%=60,e%=60,n=ce(l/12),l%=12,r=u?u.toFixed(3).replace(/\.?0+$/,""):"",i=f<0?"-":"",o=sa(this._months)!==sa(f)?"-":"",a=sa(this._days)!==sa(f)?"-":"",s=sa(this._milliseconds)!==sa(f)?"-":"",i+"P"+(n?o+n+"Y":"")+(l?o+l+"M":"")+(c?a+c+"D":"")+(t||e||u?"T":"")+(t?s+t+"H":"")+(e?s+e+"M":"")+(u?s+r+"S":"")):"P0D"}var ca=or.prototype;return ca.isValid=rr,ca.abs=ko,ca.add=Oo,ca.subtract=Eo,ca.as=Io,ca.asMilliseconds=Ao,ca.asSeconds=Mo,ca.asMinutes=No,ca.asHours=Lo,ca.asDays=Do,ca.asWeeks=Fo,ca.asMonths=Uo,ca.asQuarters=Vo,ca.asYears=Bo,ca.valueOf=jo,ca._bubble=Co,ca.clone=qo,ca.get=Wo,ca.milliseconds=Ho,ca.seconds=Go,ca.minutes=Ko,ca.hours=Yo,ca.days=Qo,ca.weeks=Jo,ca.months=$o,ca.years=Xo,ca.humanize=oa,ca.toISOString=ua,ca.toString=ua,ca.toJSON=ua,ca.locale=oi,ca.localeData=si,ca.toIsoString=E("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",ua),ca.lang=ai,V("X",0,0,"unix"),V("x",0,0,"valueOf"),Me("x",xe),Me("X",Re),Ue("X",(function(e,t,n){n._d=new Date(1e3*parseFloat(e))})),Ue("x",(function(e,t,n){n._d=new Date(le(e))})),r.version="2.29.1",i(Yn),r.fn=so,r.min=Jn,r.max=Zn,r.now=er,r.utc=p,r.unix=uo,r.months=yo,r.isDate=f,r.locale=pn,r.invalid=g,r.duration=Cr,r.isMoment=S,r.weekdays=go,r.parseZone=co,r.localeData=mn,r.isDuration=ar,r.monthsShort=mo,r.weekdaysMin=_o,r.defineLocale=vn,r.updateLocale=yn,r.locales=gn,r.weekdaysShort=bo,r.normalizeUnits=re,r.relativeTimeRounding=ra,r.relativeTimeThreshold=ia,r.calendarFormat=Vr,r.prototype=so,r.HTML5_FMT={DATETIME_LOCAL:"YYYY-MM-DDTHH:mm",DATETIME_LOCAL_SECONDS:"YYYY-MM-DDTHH:mm:ss",DATETIME_LOCAL_MS:"YYYY-MM-DDTHH:mm:ss.SSS",DATE:"YYYY-MM-DD",TIME:"HH:mm",TIME_SECONDS:"HH:mm:ss",TIME_MS:"HH:mm:ss.SSS",WEEK:"GGGG-[W]WW",MONTH:"YYYY-MM"},r}()}).call(this,n(180)(e))},function(e,t,n){e.exports=n(343)},function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(0);function i(e){return Object(r.a)({tag:"svg",attr:{viewBox:"0 0 1024 1024"},child:[{tag:"path",attr:{d:"M862 465.3h-81c-4.6 0-9 2-12.1 5.5L550 723.1V160c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v563.1L255.1 470.8c-3-3.5-7.4-5.5-12.1-5.5h-81c-6.8 0-10.5 8.1-6 13.2L487.9 861a31.96 31.96 0 0 0 48.3 0L868 478.5c4.5-5.2.8-13.2-6-13.2z"}}]})(e)}},function(e,t,n){"use strict";var r=n(297),i={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},o={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},a={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},s={};function u(e){return r.isMemo(e)?a:s[e.$$typeof]||i}s[r.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},s[r.Memo]=a;var c=Object.defineProperty,l=Object.getOwnPropertyNames,f=Object.getOwnPropertySymbols,h=Object.getOwnPropertyDescriptor,d=Object.getPrototypeOf,p=Object.prototype;e.exports=function e(t,n,r){if("string"!==typeof n){if(p){var i=d(n);i&&i!==p&&e(t,i,r)}var a=l(n);f&&(a=a.concat(f(n)));for(var s=u(t),v=u(n),y=0;y<a.length;++y){var m=a[y];if(!o[m]&&(!r||!r[m])&&(!v||!v[m])&&(!s||!s[m])){var g=h(n,m);try{c(t,m,g)}catch(b){}}}}return t}},function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(124);function i(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"!==typeof Symbol&&Symbol.iterator in Object(e)){var n=[],r=!0,i=!1,o=void 0;try{for(var a,s=e[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(u){i=!0,o=u}finally{try{r||null==s.return||s.return()}finally{if(i)throw o}}return n}}(e,t)||Object(r.a)(e,t)||function(){throw new TypeError("Invalid attempt to de
2structure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}},function(e,t,n){"use strict";var r=Object.getOwnPropertySymbols,i=Object.prototype.hasOwnProperty,o=Object.prototype.propertyIsEnumerable;function a(e){if(null===e||void 0===e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}e.exports=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(t).map((function(e){return t[e]})).join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach((function(e){r[e]=e})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(i){return!1}}()?Object.assign:function(e,t){for(var n,s,u=a(e),c=1;c<arguments.length;c++){for(var l in n=Object(arguments[c]))i.call(n,l)&&(u[l]=n[l]);if(r){s=r(n);for(var f=0;f<s.length;f++)o.call(n,s[f])&&(u[s[f]]=n[s[f]])}}return u}},function(e,t,n){"use strict";var r=n(18).EventEmitter;function i(){Object.defineProperties(this,{_eventEmitter:{value:new r}})}i.prototype.dispatchEvent=function(e){return this._eventEmitter.emit(e.type,e)},i.prototype.addEventListener=function(){return this._eventEmitter.addListener.apply(this._eventEmitter,arguments)},i.prototype.removeEventListener=function(){return this._eventEmitter.removeListener.apply(this._eventEmitter,arguments)},e.exports=i},function(e,t,n){"use strict";var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();var i=n(113),o=n(22),a=o.buildLogLevels,s=o.valueToJSON,u=n(35).DEFAULT_LOG_LEVEL,c=n(88),l=0,f=function(e){function t(e,n,r){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),r=Object.assign({name:e,log:null,logLevel:u},r);var i=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this)),o=String(r.name),s=a(r.logLevel),f=r.log?r.log.createLog("media",i):new c("media",i,s,r.loggerName);return Object.defineProperties(i,{_instanceId:{value:++l},_log:{value:f},kind:{enumerable:!0,value:n},name:{enumerable:!0,value:o}}),i}return function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),r(t,[{key:"toJSON",value:function(){return s(this)}}]),t}(i);e.exports=f},function(e,t,n){"use strict";var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();var i="undefined"!==typeof AudioContext?AudioContext:"undefined"!==typeof webkitAudioContext?webkitAudioContext:null,o=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),t=Object.assign({AudioContext:i},t),Object.defineProperties(this,{_AudioContext:{value:t.AudioContext},_audioContext:{value:null,writable:!0},_holders:{value:new Set},AudioContextFactory:{enumerable:!0,value:e}})}return r(e,[{key:"getOrCreate",value:function(e){if(!this._holders.has(e)&&(this._holders.add(e),this._AudioContext&&!this._audioContext))try{this._audioContext=new this._AudioContext}catch(t){}return this._audioContext}},{key:"release",value:function(e){this._holders.has(e)&&(this._holders.delete(e),!this._holders.size&&this._audioContext&&(this._audioContext.close(),this._audioContext=null))}}]),e}();e.exports=new o},function(e,t,n){"use strict";var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();function i(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)}var o=function(){function e(t,n){var r=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),Object.defineProperties(this,{_isCancelable:{writable:!0,value:!0},_isCanceled:{writable:!0,value:!1},_onCancel:{value:n}}),Object.defineProperty(this,"_promise",{value:new Promise((function(e,n){t((function(t){r._isCancelable=!1,e(t)}),(function(e){r._isCancelable=!1,n(e)}),(function(){return r._isCanceled}))}))})}return r(e,[{key:"cancel",value:function(){return this._isCancelable&&(this._isCanceled=!0,this._onCancel()),this}},{key:"catch",value:function(){var t=[].slice.call(arguments),n=this._promise;return new e((function(e,r){n.catch.apply(n,i(t)).then(e,r)}),this._onCancel)}},{key:"then",value:function(){var t=[].slice.call(arguments),n=this._promise;return new e((function(e,r){n.then.apply(n,i(t)).then(e,r)}),this._onCancel)}}
2],[{key:"reject",value:function(t){return new e((function(e,n){n(t)}),(function(){}))}},{key:"resolve",value:function(t){return new e((function(e){e(t)}),(function(){}))}}]),e}();e.exports=o},function(e,t,n){"use strict";var r=n(22).asLocalTrack,i=n(22).buildLogLevels,o=n(69).getUserMedia,a=n(112),s=a.LocalAudioTrack,u=a.LocalDataTrack,c=a.LocalVideoTrack,l=n(69).MediaStreamTrack,f=n(88),h=n(35),d=h.DEFAULT_LOG_LEVEL,p=h.DEFAULT_LOGGER_NAME,v=n(200),y=0;e.exports=function(e){var t=!(e&&("audio"in e||"video"in e));e=Object.assign({audio:t,getUserMedia:o,loggerName:p,logLevel:d,LocalAudioTrack:s,LocalDataTrack:u,LocalVideoTrack:c,MediaStreamTrack:l,Log:f,video:t},e);var n="[createLocalTracks #"+ ++y+"]",a=i(e.logLevel),h=new e.Log("default",n,a,e.loggerName),m=Object.assign({log:h},e);if(delete m.name,!1===e.audio&&!1===e.video)return h.info("Neither audio nor video requested, so returning empty LocalTracks"),Promise.resolve([]);if(e.tracks)return h.info("Adding user-provided LocalTracks"),h.debug("LocalTracks:",e.tracks),Promise.resolve(e.tracks);var g={audio:e.audio&&e.audio.name?{name:e.audio.name}:{},video:e.video&&e.video.name?{name:e.video.name}:{}};g.audio.isCreatedByCreateLocalTracks=!0,g.video.isCreatedByCreateLocalTracks=!0,e.audio&&"boolean"===typeof e.audio.workaroundWebKitBug1208516&&(g.audio.workaroundWebKitBug1208516=e.audio.workaroundWebKitBug1208516),e.video&&"boolean"===typeof e.video.workaroundWebKitBug1208516&&(g.video.workaroundWebKitBug1208516=e.video.workaroundWebKitBug1208516),e.audio&&delete e.audio.name,e.video&&delete e.video.name;var b={audio:e.audio,video:e.video};return(e.audio&&e.audio.workaroundWebKitBug180748?v(h,e.getUserMedia,b):e.getUserMedia(b)).then((function(e){var t=e.getAudioTracks().concat(e.getVideoTracks());return h.info("Call to getUserMedia successful; got MediaStreamTracks:",t),t.map((function(e){return r(e,Object.assign(g[e.kind],m))}))}),(function(e){throw h.warn("Call to getUserMedia failed:",e),e}))}},function(e,t,n){"use strict";var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();var i=n(208),o=n(35),a=o.typeErrors,s=o.trackPriority,u=function(e){function t(e,n,r,i){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var o=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,n.name,e.sid,i));return Object.defineProperties(o,{_reemitTrackEvent:{value:function(){return o.emit(o.isTrackEnabled?"trackEnabled":"trackDisabled")}},_signaling:{value:e},_unpublish:{value:r},isTrackEnabled:{enumerable:!0,get:function(){return"data"===this.track.kind||this.track.isEnabled}},kind:{enumerable:!0,value:n.kind},priority:{enumerable:!0,get:function(){return e.updatedPriority}},track:{enumerable:!0,value:n}}),n.on("disabled",o._reemitTrackEvent),n.on("enabled",o._reemitTrackEvent),o}return function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),r(t,[{key:"toString",value:function(){return"[LocalTrackPublication #"+this._instanceId+": "+this.trackSid+"]"}},{key:"setPriority",value:function(e){var t=Object.values(s);if(!t.includes(e))throw a.INVALID_VALUE("priority",t);return this._signaling.setPriority(e),this}},{key:"unpublish",value:function(){return this.track.removeListener("disabled",this._reemitTrackEvent),this.track.removeListener("enabled",this._reemitTrackEvent),this._unpublish(this),this}}]),t}(i);e.exports=u},function(e,t,n){"use strict";var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();var i=function(e){function t(e,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var r=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e.name,e.sid,n));Object.defineProperties(r,{_signaling:{value:e},_track:{value:null,writable:!0},isSubscribed:{enumerable:!0,get:function(){return!!this._track}},isTrackEnabled:{enumerable:!0,get:function(){return e.isEnabled}},kind:{enumerable:!0,value:e.kind},publishPriority:{enumerable:!0,get:function(){return e.priority}},track:{enumerable:!0,get:function(){return this._track}}});var i=e.error,o=e.isEnabled,a=e.isSwitchedOff,s=e.priority;return e.on("updated",(function(){if(i!==e.error)return i=e.error,void r.emit("subscriptionFailed",e.error);o!==e.isEnabled&&(o=e.isEnabled,r.track&&r.track._setEnabled(e.isEnabled),r.emit(e.isEnabled?"trackEnabled":"trackDisabled")),a!==e.isSwitchedOff&&(a=e.isSwitchedOff,r.track&&(r.track._setSwitchedOff(e.isSwitchedOff),r.emit(e.isSwitchedOff?"trackSwitchedOff":"trackSwitchedOn",r.track))),s!==e.priority&&(s=e.priority,r.emit("publishPriorityChanged",s))}
2)),r}return function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),r(t,[{key:"toString",value:function(){return"[RemoteTrackPublication #"+this._instanceId+": "+this.trackSid+"]"}},{key:"_subscribed",value:function(e){!this._track&&e&&(this._track=e,this.emit("subscribed",e))}},{key:"_unsubscribe",value:function(){if(this._track){var e=this._track;this._track=null,this.emit("unsubscribed",e)}}}]),t}(n(208));e.exports=i},function(e,t,n){e.exports=n(405)},function(e,t,n){"use strict";var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();var i=n(89),o=n(436),a={connecting:["connected"],connected:["disconnected","reconnecting"],reconnecting:["connected","disconnected"],disconnected:[]},s=function(e){function t(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var e=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,"connecting",a));return Object.defineProperties(e,{_enqueuedPriorityUpdates:{value:new Map},_identity:{writable:!0,value:null},_networkQualityLevel:{value:null,writable:!0},_networkQualityStats:{value:null,writable:!0},_sid:{writable:!0,value:null},_trackPrioritySignaling:{value:null,writable:!0},identity:{enumerable:!0,get:function(){return this._identity}},sid:{enumerable:!0,get:function(){return this._sid}},tracks:{enumerable:!0,value:new Map}}),e}return function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),r(t,[{key:"addTrack",value:function(e){return this.tracks.set(e.id||e.sid,e),this.emit("trackAdded",e),this}},{key:"disconnect",value:function(){return"disconnected"!==this.state&&(this.preempt("disconnected"),!0)}},{key:"removeTrack",value:function(e){var t=this.tracks.get(e.id||e.sid);return this.tracks.delete(e.id||e.sid),t&&this.emit("trackRemoved",e),t||null}},{key:"setNetworkQualityLevel",value:function(e,t){this._networkQualityLevel!==e&&(this._networkQualityLevel=e,this._networkQualityStats=t&&(t.audio||t.video)?new o(t):null,this.emit("networkQualityLevelChanged"))}},{key:"updateSubscriberTrackPriority",value:function(e,t){this._enqueuedPriorityUpdates.set(e,t),this._trackPrioritySignaling&&this._trackPrioritySignaling.sendTrackPriorityUpdate(e,"subscribe",t)}},{key:"setTrackPrioritySignaling",value:function(e){var t=this;return this._trackPrioritySignaling=e,e&&this._enqueuedPriorityUpdates.forEach((function(e,n){t._trackPrioritySignaling.sendTrackPriorityUpdate(n,"subscribe",e)})),this}},{key:"connect",value:function(e,t){return("connecting"===this.state||"reconnecting"===this.state)&&(this._sid||(this._sid=e),this._identity||(this._identity=t),this.preempt("connected"),!0)}},{key:"reconnecting",value:function(){return("connecting"===this.state||"connected"===this.state)&&(this.preempt("reconnecting"),!0)}},{key:"networkQualityLevel",get:function(){return this._networkQualityLevel}},{key:"networkQualityStats",get:function(){return this._networkQualityStats}}]),t}(i);e.exports=s},function(e,t,n){var r=n(45),i=n(39).document,o=r(i)&&r(i.createElement);e.exports=function(e){return o?i.createElement(e):{}}},function(e,t,n){var r=n(45);e.exports=function(e,t){if(!r(e))return e;var n,i;if(t&&"function"==typeof(n=e.toString)&&!r(i=n.call(e)))return i;if("function"==typeof(n=e.valueOf)&&!r(i=n.call(e)))return i;if(!t&&"function"==typeof(n=e.toString)&&!r(i=n.call(e)))return i;throw TypeError("Can't convert object to primitive value")}},function(e,t,n){var r=n(102);e.exports=Object("z").propertyIsEnumerable(0)?Object:function(e){return"String"==r(e)?e.split(""):Object(e)}},function(e,t){e.exports=function(e){if(void 0==e)throw TypeError("Can't call method on "+e);return e}},function(e,t){var n=Math.ceil,r=Math.floor;e.exports=function(e){return isNaN(e=+e)?0:(e>0?r:n)(e)}},function(e,t,n){var r=n(146)("keys"),i=n(117);e.exports=function(e){return r[e]||(r[e]=i(e))}},function(e,t,n){var r=n(25),i=n(39),o="__core-js_shared__",a=i[o]||(i[o]={});(e.exports=function(e,t){return a[e]||(a[e]=void 0!==t?t:{})})("versions",[]).push({version:r.version,mode:n(103)?"pure":"global",copyright:"\xa9 2019 Denis Pushkarev (zloirock.ru)"})},function(e,t){e.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleStr
2ing,toString,valueOf".split(",")},function(e,t){t.f=Object.getOwnPropertySymbols},function(e,t,n){"use strict";var r=n(103),i=n(36),o=n(235),a=n(70),s=n(91),u=n(472),c=n(105),l=n(237),f=n(42)("iterator"),h=!([].keys&&"next"in[].keys()),d="keys",p="values",v=function(){return this};e.exports=function(e,t,n,y,m,g,b){u(n,t,y);var _,w,k,S=function(e){if(!h&&e in C)return C[e];switch(e){case d:case p:return function(){return new n(this,e)}}return function(){return new n(this,e)}},O=t+" Iterator",E=m==p,T=!1,C=e.prototype,P=C[f]||C["@@iterator"]||m&&C[m],x=P||S(m),I=m?E?S("entries"):x:void 0,j="Array"==t&&C.entries||P;if(j&&(k=l(j.call(new e)))!==Object.prototype&&k.next&&(c(k,O,!0),r||"function"==typeof k[f]||a(k,f,v)),E&&P&&P.name!==p&&(T=!0,x=function(){return P.call(this)}),r&&!b||!h&&!T&&C[f]||a(C,f,x),s[t]=x,s[O]=v,m)if(_={values:E?x:S(p),keys:g?x:S(d),entries:I},b)for(w in _)w in C||o(C,w,_[w]);else i(i.P+i.F*(h||T),t,_);return _}},function(e,t){e.exports=function(e,t,n,r){if(!(e instanceof t)||void 0!==r&&r in e)throw TypeError(n+": incorrect invocation!");return e}},function(e,t,n){var r=n(120),i=n(42)("iterator"),o=n(91);e.exports=n(25).getIteratorMethod=function(e){if(void 0!=e)return e[i]||e["@@iterator"]||o[r(e)]}},function(e,t,n){"use strict";var r=n(78);function i(e){var t,n;this.promise=new e((function(e,r){if(void 0!==t||void 0!==n)throw TypeError("Bad Promise constructor");t=e,n=r})),this.resolve=r(t),this.reject=r(n)}e.exports.f=function(e){return new i(e)}},function(e,t,n){var r=n(70);e.exports=function(e,t,n){for(var i in t)n&&e[i]?e[i]=t[i]:r(e,i,t[i]);return e}},function(e,t,n){t.f=n(42)},function(e,t,n){var r=n(117)("meta"),i=n(45),o=n(79),a=n(58).f,s=0,u=Object.isExtensible||function(){return!0},c=!n(71)((function(){return u(Object.preventExtensions({}))})),l=function(e){a(e,r,{value:{i:"O"+ ++s,w:{}}})},f=e.exports={KEY:r,NEED:!1,fastKey:function(e,t){if(!i(e))return"symbol"==typeof e?e:("string"==typeof e?"S":"P")+e;if(!o(e,r)){if(!u(e))return"F";if(!t)return"E";l(e)}return e[r].i},getWeak:function(e,t){if(!o(e,r)){if(!u(e))return!0;if(!t)return!1;l(e)}return e[r].w},onFreeze:function(e){return c&&f.NEED&&u(e)&&!o(e,r)&&l(e),e}}},function(e,t,n){var r=n(39),i=n(25),o=n(103),a=n(154),s=n(58).f;e.exports=function(e){var t=i.Symbol||(i.Symbol=o?{}:r.Symbol||{});"_"==e.charAt(0)||e in t||s(t,e,{value:a.f(e)})}},function(e,t,n){e.exports={default:n(500),__esModule:!0}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.clone=t.objectType=t.hasOwnProperty=void 0,t.hasOwnProperty=Object.prototype.hasOwnProperty,t.objectType=function(e){return void 0===e?"undefined":null===e?"null":Array.isArray(e)?"array":typeof e},t.clone=function e(n){if(null==n||"object"!=typeof n)return n;if(n.constructor==Array){for(var r=n.length,i=new Array(r),o=0;o<r;o++)i[o]=e(n[o]);return i}var a={};for(var s in n)t.hasOwnProperty.call(n,s)&&(a[s]=e(n[s]));return a}},function(e,t,n){e.exports={default:n(510),__esModule:!0}},function(e,t,n){var r=n(45);e.exports=function(e,t){if(!r(e)||e._t!==t)throw TypeError("Incompatible receiver, "+t+" required!");return e}},function(e,t){function n(t,r){return e.exports=n=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},n(t,r)}e.exports=n},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Telemetry=t.Close=t.Reply=t.Message=t.Update=t.InitReply=t.Init=void 0;var r=n(536);Object.defineProperty(t,"Init",{enumerable:!0,get:function(){return r.Init}});var i=n(539);Object.defineProperty(t,"InitReply",{enumerable:!0,get:function(){return i.InitReply}});var o=n(540);Object.defineProperty(t,"Update",{enumerable:!0,get:function(){return o.Update}});var a=n(541);Object.defineProperty(t,"Message",{enumerable:!0,get:function(){return a.Message}});var s=n(542);Object.defineProperty(t,"Reply",{enumerable:!0,get:function(){return s.Reply}});var u=n(543);Object.defineProperty(t,"Close",{enumerable:!0,get:function(){return u.Close}});var c=n(268);Object.defineProperty(t,"Telemetry",{enumerable:!0,get:function(){return c.Telemetry}})},function(e,t,n){var r=n(537),i=n(538),o=i;o.v1=r,o.v4=i,e.exports=o},function(e,t,n){var r=n(66),i=n(161),o=n(544),a=n(545);function s(t){var n="function"===typeof Map?new Map:void 0;return e.exports=s=function(e){if(null===e||!o(e))return e;if("function"!==typeof e)throw new TypeError("Super expression must either be null or a function");if("undefined"!==typeof n){if(n.has(e))return n.get(e);n.set(e,t)}function t(){return a(e,arguments,r(this).constructor)}return t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),i(t,e)},s(t)}e.exports=s},function(e,t,n){(function(e,r){var i;(function(){"use strict";var o={function:!0,object:!0},a=o[typeof window]&&window||this,s=o[typeof t]&&t,u=o[typeof e]&&e&&!e.nodeType&&e,c=s&&u&&"object"==typeof r&&r;!c||c.global!==c&&c.window!==c&&c.self!==c||(a=c);var l=Math.pow(2,53)-1,f=/\bOpera/,h=Object.prototype,d=h.hasOwnProperty,p=h.toString;function v(e){return(e=String(e)).charAt(0).toUpperCase()+e.slice(1)}function y(e){return e=w(e),/^(?:webOS|i(?:OS|P))/.test(e)?e:v(e)}function m(e,t){for(var n in e)d.call(e,n)&&t(e[n],n,e)}function g(e){return null==e?v(e):p.call(e).slice(8,-1)}function b(e){return String(e).replace(/([ -])(?!$)/g,"$1?")}function _(e,t){var n=null;return function(e,t){var n=-1,r=e?e.length:0;if("number"==typeof r&&r>-1&&r<=l)for(;++n<r;)t(e[n],n,e);else m(e,t)}(e,(function(r,i){n=t(n,r,i,e)})),n}function w(e){return String(e).replace(/^ +| +$/g,"")}var k=function e(t){var n=a,r=t&&"object"==typeof t&&"String"!=g(t);r&&(n=t,t=null);var i=n.navigator||{},o=i.userAgent||"";t||(t=o);var s,u,c=r?!!i.likeChrome:/\bChrome\b/.test(t)&&!/internal|\n/i.test(p.toString()),l="Object",h=r?l:"ScriptBridgingProxyObject",d=r?l:"Environment",v=r&&n.java?"JavaPackage":g(n.java),k=r?l:"RuntimeObject",S=/\bJava/.test(v)&&n.java,O=S&&g(n.environment)==d,E=S?"a":"\u03b1",T=S?"b":"\u03b2",C=n.document||{},P=n.operamini||n.opera,x=f.test(x=r&&P?P["[[Class]]"]:g(P))?x:P=null,I=t,j=[],R=null,A=t==o,M=A&&P&&"function"==typeof P.version&&P.version(),N=_([{label:"EdgeHTML",pattern:"Edge"},"Trident",{label:"WebKit",pattern:"AppleWebKit"},"iCab","Presto","NetFront","Tasman","KHTML","Gecko"],(function(e,n){return e||RegExp("\\b"+(n.pattern||b(n))+"\\b","i").exec(t)&&(n.label||n)})),L=function(e){return _(e,(function(e,n){return e||RegExp("\\b"+(n.pattern||b(n))+"\\b","i").exec(t)&&(n.label||n)}))}(["Adobe AIR","Arora","Avant Browser","Breach","Camino","Electron","Epiphany","Fennec","Flock","Galeon","Green
2Browser","iCab","Iceweasel","K-Meleon","Konqueror","Lunascape","Maxthon",{label:"Microsoft Edge",pattern:"(?:Edge|Edg|EdgA|EdgiOS)"},"Midori","Nook Browser","PaleMoon","PhantomJS","Raven","Rekonq","RockMelt",{label:"Samsung Internet",pattern:"SamsungBrowser"},"SeaMonkey",{label:"Silk",pattern:"(?:Cloud9|Silk-Accelerated)"},"Sleipnir","SlimBrowser",{label:"SRWare Iron",pattern:"Iron"},"Sunrise","Swiftfox","Vivaldi","Waterfox","WebPositive",{label:"Yandex Browser",pattern:"YaBrowser"},{label:"UC Browser",pattern:"UCBrowser"},"Opera Mini",{label:"Opera Mini",pattern:"OPiOS"},"Opera",{label:"Opera",pattern:"OPR"},"Chromium","Chrome",{label:"Chrome",pattern:"(?:HeadlessChrome)"},{label:"Chrome Mobile",pattern:"(?:CriOS|CrMo)"},{label:"Firefox",pattern:"(?:Firefox|Minefield)"},{label:"Firefox for iOS",pattern:"FxiOS"},{label:"IE",pattern:"IEMobile"},{label:"IE",pattern:"MSIE"},"Safari"]),D=V([{label:"BlackBerry",pattern:"BB10"},"BlackBerry",{label:"Galaxy S",pattern:"GT-I9000"},{label:"Galaxy S2",pattern:"GT-I9100"},{label:"Galaxy S3",pattern:"GT-I9300"},{label:"Galaxy S4",pattern:"GT-I9500"},{label:"Galaxy S5",pattern:"SM-G900"},{label:"Galaxy S6",pattern:"SM-G920"},{label:"Galaxy S6 Edge",pattern:"SM-G925"},{label:"Galaxy S7",pattern:"SM-G930"},{label:"Galaxy S7 Edge",pattern:"SM-G935"},"Google TV","Lumia","iPad","iPod","iPhone","Kindle",{label:"Kindle Fire",pattern:"(?:Cloud9|Silk-Accelerated)"},"Nexus","Nook","PlayBook","PlayStation Vita","PlayStation","TouchPad","Transformer",{label:"Wii U",pattern:"WiiU"},"Wii","Xbox One",{label:"Xbox 360",pattern:"Xbox"},"Xoom"]),F=function(e){return _(e,(function(e,n,r){return e||(n[D]||n[/^[a-z]+(?: +[a-z]+\b)*/i.exec(D)]||RegExp("\\b"+b(r)+"(?:\\b|\\w*\\d)","i").exec(t))&&r}))}({Apple:{iPad:1,iPhone:1,iPod:1},Alcatel:{},Archos:{},Amazon:{Kindle:1,"Kindle Fire":1},Asus:{Transformer:1},"Barnes & Noble":{Nook:1},BlackBerry:{PlayBook:1},Google:{"Google TV":1,Nexus:1},HP:{TouchPad:1},HTC:{},Huawei:{},Lenovo:{},LG:{},Microsoft:{Xbox:1,"Xbox One":1},Motorola:{Xoom:1},Nintendo:{"Wii U":1,Wii:1},Nokia:{Lumia:1},Oppo:{},Samsung:{"Galaxy S":1,"Galaxy S2":1,"Galaxy S3":1,"Galaxy S4":1},Sony:{PlayStation:1,"PlayStation Vita":1},Xiaomi:{Mi:1,Redmi:1}}),U=function(e){return _(e,(function(e,n){var r=n.pattern||b(n);return!e&&(e=RegExp("\\b"+r+"(?:/[\\d.]+|[ \\w.]*)","i").exec(t))&&(e=function(e,t,n){var r={"10.0":"10",6.4:"10 Technical Preview",6.3:"8.1",6.2:"8",6.1:"Server 2008 R2 / 7","6.0":"Server 2008 / Vista",5.2:"Server 2003 / XP 64-bit",5.1:"XP",5.01:"2000 SP1","5.0":"2000","4.0":"NT","4.90":"ME"};return t&&n&&/^Win/i.test(e)&&!/^Windows Phone /i.test(e)&&(r=r[/[\d.]+$/.exec(e)])&&(e="Windows "+r),e=String(e),t&&n&&(e=e.replace(RegExp(t,"i"),n)),y(e.replace(/ ce$/i," CE").replace(/\bhpw/i,"web").replace(/\bMacintosh\b/,"Mac OS").replace(/_PowerPC\b/i," OS").replace(/\b(OS X) [^ \d]+/i,"$1").replace(/\bMac (OS X)\b/,"$1").replace(/\/(\d)/," $1").replace(/_/g,".").replace(/(?: BePC|[ .]*fc[ \d.]+)$/i,"").replace(/\bx86\.64\b/gi,"x86_64").replace(/\b(Windows Phone) OS\b/,"$1").replace(/\b(Chrome OS \w+) [\d.]+\b/,"$1").split(" on ")[0])}(e,r,n.label||n)),e}))}(["Windows Phone","KaiOS","Android","CentOS",{label:"Chrome OS",pattern:"CrOS"},"Debian",{label:"DragonFly BSD",pattern:"DragonFly"},"Fedora","FreeBSD","Gentoo","Haiku","Kubuntu","Linux Mint","OpenBSD","Red Hat","SuSE","Ubuntu","Xubuntu","Cygwin","Symbian OS","hpwOS","webOS ","webOS","Tablet OS","Tizen","Linux","Mac OS X","Macintosh","Mac","Windows 98;","Windows "]);function V(e){return _(e,(function(e,n){var r=n.pattern||b(n);return!e&&(e=RegExp("\\b"+r+" *\\d+[.\\w_]*","i").exec(t)||RegExp("\\b"+r+" *\\w+-[\\w]*","i").exec(t)||RegExp("\\b"+r+"(?:; *(?:[a-z]+[_-])?[a-z]+\\d+|[^ ();-]*)","i").exec(t))&&((e=String(n.label&&!RegExp(r,"i").test(n.label)?n.label:e).split("/"))[1]&&!/[\d.]+/.test(e[0])&&(e[0]+=" "+e[1]),n=n.label||n,e=y(e[0].replace(RegExp(r,"i"),n).replace(RegExp("; *(?:"+n+"[_-])?","i")," ").replace(RegExp("("+n+")[-_.]?(\\w)","i"),"$1 $2"))),e}))}function B(e){return _(e,(function(e,n){return e||(RegExp(n+"(?:-[\\d.]+/|(?: for [\\w-]+)?[ /-])([\\d.]+[^ ();/_-]*)","i").exec(t)||0)[1]||null}))}if(N&&(N=[N]),/\bAndroid\b/.test(U)&&!D&&(s=/\bAndroid[^;]*;(.*?)(?:Build|\) AppleWebKit)\b/i.exec(t))&&(D=w(s[1]).replace(/^[a-z]{2}-[a-z]{2};\s*/i,"")||null),F&&!D?D=V([F]):F&&D&&(D=D.replace(RegExp("^("+b(F)+")[-_.\\s]","i"),F+" ").replace(RegExp("^("+b(F)+")[-_.]?(\\w)","i"),F+" $2")),(s=/\bGoogle TV\b/.exec(D))&&(D=s[0]),/\bSimulator\b/i.test(t)&&(D=(D?D+" ":"")+"Simulator"),"Opera Mini"==L&&/\bOPiOS\b/.test(t)&&j.push("running in Turbo/Uncompressed mode"),"IE"==L&&/\blike iPhone OS\b/.test(t)?(F=(s=e(t.replace(/like iPhone OS/,""))).manufacturer,D=s.product):/^iP/.test(D)?(L||(L="Safari"),U="iOS"+((s=/ OS ([\d_]+)/i.exec(t))?" "+s[1].replace(/_/g,"."):"")):"Konqueror"==L&&/^Linux\b/i.test(U)?U="Kubuntu":F&&"Google"!=F&&(/Chrome/.test(L)&&!/\bMobile Safari\b/i.test(t)||/\bVita\b/.test(D))||/\bAndroid\b/.test(U)&&/^Chrome/.test(L)&&/\bVersion\//i.test(t)?(L="Android Browser",U=/\bAndroid\b/.test(U)?U:"Android"):"Silk"==L?(/\bMobi/i.test(t)||(U="Android",j.unshift("desktop mode")),/Accelerated *= *true/i.test(t)&&j.unshift("accelerated")):"UC Browser"==L&&/\bUCWEB\b/.test(t)?j.push("speed mode"):"PaleMoon"==L&&(s=/\bFirefox\/([\d.]+)\b/.exec(t))?j.push("identifying as Firefox "+s[1]):"Firefox"==L&&(s=/\b(Mobile|Tablet|TV)\b/i.exec(t))?(U||(U="Firefox OS"),D||(D=s[1])):!L||(s=!/\bMinefield\b/i.test(t)&&/\b(?:Firefox|Safari)\b/.exec(L))?(L&&!D&&/[\/,]|^[^(]+?\)/.test(t.slice(t.indexOf(s+"/")+8))&&(L=null),(s=D||F||U)&&(D||F||/\b(?:Android|Symbian OS|Tablet OS|webOS)\b/.test(U))&&(L=/[a-z]+(?: Hat)?/i.exec(/\bAndroid\b/.test(U)?U:s)+" Browser")):"Electron"==L&&(s=(/\bChrome\/([\d.]+)\b/.exec(t)||0)[1])&&j.push("Chromium "+s),M||(M=B(["(?:Cloud9|CriOS|CrMo|Edge|Edg|EdgA|EdgiOS|FxiOS|HeadlessChrome|IEMobile|Iron|Opera ?Mini|OPiOS|OPR|Raven|SamsungBrowser|Silk(?!/[\\d.]+$)|UCBrowser|YaBrowser)","Version",b(L),"(?:Firefox|Minefield|NetFront)"])),(s=("iCab"==N&&parseFloat(M
vendor: 4,733 bytes, line 2
2)>3?"WebKit":/\bOpera\b/.test(L)&&(/\bOPR\b/.test(t)?"Blink":"Presto"))||/\b(?:Midori|Nook|Safari)\b/i.test(t)&&!/^(?:Trident|EdgeHTML)$/.test(N)&&"WebKit"||!N&&/\bMSIE\b/i.test(t)&&("Mac OS"==U?"Tasman":"Trident")||"WebKit"==N&&/\bPlayStation\b(?! Vita\b)/i.test(L)&&"NetFront")&&(N=[s]),"IE"==L&&(s=(/; *(?:XBLWP|ZuneWP)(\d+)/i.exec(t)||0)[1])?(L+=" Mobile",U="Windows Phone "+(/\+$/.test(s)?s:s+".x"),j.unshift("desktop mode")):/\bWPDesktop\b/i.test(t)?(L="IE Mobile",U="Windows Phone 8.x",j.unshift("desktop mode"),M||(M=(/\brv:([\d.]+)/.exec(t)||0)[1])):"IE"!=L&&"Trident"==N&&(s=/\brv:([\d.]+)/.exec(t))&&(L&&j.push("identifying as "+L+(M?" "+M:"")),L="IE",M=s[1]),A){if(function(e,t){var n=null!=e?typeof e[t]:"number";return!/^(?:boolean|number|string|undefined)$/.test(n)&&("object"!=n||!!e[t])}(n,"global"))if(S&&(I=(s=S.lang.System).getProperty("os.arch"),U=U||s.getProperty("os.name")+" "+s.getProperty("os.version")),O){try{M=n.require("ringo/engine").version.join("."),L="RingoJS"}catch(W){(s=n.system)&&s.global.system==n.system&&(L="Narwhal",U||(U=s[0].os||null))}L||(L="Rhino")}else"object"==typeof n.process&&!n.process.browser&&(s=n.process)&&("object"==typeof s.versions&&("string"==typeof s.versions.electron?(j.push("Node "+s.versions.node),L="Electron",M=s.versions.electron):"string"==typeof s.versions.nw&&(j.push("Chromium "+M,"Node "+s.versions.node),L="NW.js",M=s.versions.nw)),L||(L="Node.js",I=s.arch,U=s.platform,M=(M=/[\d.]+/.exec(s.version))?M[0]:null));else g(s=n.runtime)==h?(L="Adobe AIR",U=s.flash.system.Capabilities.os):g(s=n.phantom)==k?(L="PhantomJS",M=(s=s.version||null)&&s.major+"."+s.minor+"."+s.patch):"number"==typeof C.documentMode&&(s=/\bTrident\/(\d+)/i.exec(t))?(M=[M,C.documentMode],(s=+s[1]+4)!=M[1]&&(j.push("IE "+M[1]+" mode"),N&&(N[1]=""),M[1]=s),M="IE"==L?String(M[1].toFixed(1)):M[0]):"number"==typeof C.documentMode&&/^(?:Chrome|Firefox)\b/.test(L)&&(j.push("masking as "+L+" "+M),L="IE",M="11.0",N=["Trident"],U="Windows");U=U&&y(U)}if(M&&(s=/(?:[ab]|dp|pre|[ab]\d+pre)(?:\d+\+?)?$/i.exec(M)||/(?:alpha|beta)(?: ?\d)?/i.exec(t+";"+(A&&i.appMinorVersion))||/\bMinefield\b/i.test(t)&&"a")&&(R=/b/i.test(s)?"beta":"alpha",M=M.replace(RegExp(s+"\\+?$"),"")+("beta"==R?T:E)+(/\d+\+?/.exec(s)||"")),"Fennec"==L||"Firefox"==L&&/\b(?:Android|Firefox OS|KaiOS)\b/.test(U))L="Firefox Mobile";else if("Maxthon"==L&&M)M=M.replace(/\.[\d.]+/,".x");else if(/\bXbox\b/i.test(D))"Xbox 360"==D&&(U=null),"Xbox 360"==D&&/\bIEMobile\b/.test(t)&&j.unshift("mobile mode");else if(!/^(?:Chrome|IE|Opera)$/.test(L)&&(!L||D||/Browser|Mobi/.test(L))||"Windows CE"!=U&&!/Mobi/i.test(t))if("IE"==L&&A)try{null===n.external&&j.unshift("platform preview")}catch(W){j.unshift("embedded")}else(/\bBlackBerry\b/.test(D)||/\bBB10\b/.test(t))&&(s=(RegExp(D.replace(/ +/g," *")+"/([.\\d]+)","i").exec(t)||0)[1]||M)?(U=((s=[s,/BB10/.test(t)])[1]?(D=null,F="BlackBerry"):"Device Software")+" "+s[0],M=null):this!=m&&"Wii"!=D&&(A&&P||/Opera/.test(L)&&/\b(?:MSIE|Firefox)\b/i.test(t)||"Firefox"==L&&/\bOS X (?:\d+\.){2,}/.test(U)||"IE"==L&&(U&&!/^Win/.test(U)&&M>5.5||/\bWindows XP\b/.test(U)&&M>8||8==M&&!/\bTrident\b/.test(t)))&&!f.test(s=e.call(m,t.replace(f,"")+";"))&&s.name&&(s="ing as "+s.name+((s=s.version)?" "+s:""),f.test(L)?(/\bIE\b/.test(s)&&"Mac OS"==U&&(U=null),s="identify"+s):(s="mask"+s,L=x?y(x.replace(/([a-z])([A-Z])/g,"$1 $2")):"Opera",/\bIE\b/.test(s)&&(U=null),A||(M=null)),N=["Presto"],j.push(s));else L+=" Mobile";(s=(/\bAppleWebKit\/([\d.]+\+?)/i.exec(t)||0)[1])&&(s=[parseFloat(s.replace(/\.(\d)$/,".0$1")),s],"Safari"==L&&"+"==s[1].slice(-1)?(L="WebKit Nightly",R="alpha",M=s[1].slice(0,-1)):M!=s[1]&&M!=(s[2]=(/\bSafari\/([\d.]+\+?)/i.exec(t)||0)[1])||(M=null),s[1]=(/\b(?:Headless)?Chrome\/([\d.]+)/i.exec(t)||0)[1],537.36==s[0]&&537.36==s[2]&&parseFloat(s[1])>=28&&"WebKit"==N&&(N=["Blink"]),A&&(c||s[1])?(N&&(N[1]="like Chrome"),s=s[1]||((s=s[0])<530?1:s<532?2:s<532.05?3:s<533?4:s<534.03?5:s<534.07?6:s<534.1?7:s<534.13?8:s<534.16?9:s<534.24?10:s<534.3?11:s<535.01?12:s<535.02?"13+":s<535.07?15:s<535.11?16:s<535.19?17:s<536.05?18:s<536.1?19:s<537.01?20:s<537.11?"21+":s<537.13?23:s<537.18?24:s<537.24?25:s<537.36?26:"Blink"!=N?"27":"28")):(N&&(N[1]="like Safari"),s=(s=s[0])<400?1:s<500?2:s<526?3:s<533?4:s<534?"4+":s<535?5:s<537?6:s<538?7:s<601?8:s<602?9:s<604?10:s<606?11:s<608?12:"12"),N&&(N[1]+=" "+(s+="number"==typeof s?".x":/[.+]/.test(s)?"":"+")),"Safari"==L&&(!M||parseInt(M)>45)?M=s:"Chrome"==L&&/\bHeadlessChrome/i.test(t)&&j.unshift("headless")),"Opera"==L&&(s=/\bzbov|zvav$/.exec(U))?(L+=" ",j.unshift("desktop mode"),"zvav"==s?(L+="Mini",M=null):L+="Mobile",U=U.replace(RegExp(" *"+s+"$"),"")):"Safari"==L&&/\bChrome\b/.exec(N&&N[1])?(j.unshift("desktop mode"),L="
2Chrome Mobile",M=null,/\bOS X\b/.test(U)?(F="Apple",U="iOS 4.3+"):U=null):/\bSRWare Iron\b/.test(L)&&!M&&(M=B("Chrome")),M&&0==M.indexOf(s=/[\d.]+$/.exec(U))&&t.indexOf("/"+s+"-")>-1&&(U=w(U.replace(s,""))),U&&-1!=U.indexOf(L)&&!RegExp(L+" OS").test(U)&&(U=U.replace(RegExp(" *"+b(L)+" *"),"")),N&&!/\b(?:Avant|Nook)\b/.test(L)&&(/Browser|Lunascape|Maxthon/.test(L)||"Safari"!=L&&/^iOS/.test(U)&&/\bSafari\b/.test(N[1])||/^(?:Adobe|Arora|Breach|Midori|Opera|Phantom|Rekonq|Rock|Samsung Internet|Sleipnir|SRWare Iron|Vivaldi|Web)/.test(L)&&N[1])&&(s=N[N.length-1])&&j.push(s),j.length&&(j=["("+j.join("; ")+")"]),F&&D&&D.indexOf(F)<0&&j.push("on "+F),D&&j.push((/^on /.test(j[j.length-1])?"":"on ")+D),U&&(s=/ ([\d.+]+)$/.exec(U),u=s&&"/"==U.charAt(U.length-s[0].length-1),U={architecture:32,family:s&&!u?U.replace(s[0],""):U,version:s?s[1]:null,toString:function(){var e=this.version;return this.family+(e&&!u?" "+e:"")+(64==this.architecture?" 64-bit":"")}}),(s=/\b(?:AMD|IA|Win|WOW|x86_|x)64\b/i.exec(I))&&!/\bi686\b/i.test(I)?(U&&(U.architecture=64,U.family=U.family.replace(RegExp(" *"+s),"")),L&&(/\bWOW64\b/i.test(t)||A&&/\w(?:86|32)$/.test(i.cpuClass||i.platform)&&!/\bWin64; x64\b/i.test(t))&&j.unshift("32-bit")):U&&/^OS X/.test(U.family)&&"Chrome"==L&&parseFloat(M)>=39&&(U.architecture=64),t||(t=null);var q={};return q.description=t,q.layout=N&&N[0],q.manufacturer=F,q.name=L,q.prerelease=R,q.product=D,q.ua=t,q.version=L&&M,q.os=U||{architecture:null,family:null,version:null,toString:function(){return"null"}},q.parse=e,q.toString=function(){return this.description||""},q.version&&j.unshift(M),q.name&&j.unshift(L),U&&L&&(U!=String(U).split(" ")[0]||U!=L.split(" ")[0]&&!D)&&j.push(D?"("+U+")":"on "+U),j.length&&(q.description=j.join(" ")),q}();a.platform=k,void 0===(i=function(){return k}.call(t,n,t,e))||(e.exports=i)}).call(this)}).call(this,n(180)(e),n(44))},function(e,t,n){"use strict";var r=n(9),i=n(17);Object.defineProperty(t,"__esModule",{value:!0}),t.log=t.Logger=void 0;var o=n(76);function a(e,t){return["".concat((new Date).toISOString()," Notifications ").concat(e,":")].concat(Array.from(t))}var s=function(){function e(){r(this,e),this.prefix=""}return i(e,[{key:"setLevel",value:function(e){o.setLevel(e)}},{key:"trace",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];o.debug.apply(null,a("T"+this.prefix,t))}},{key:"debug",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];o.debug.apply(null,a("D"+this.prefix,t))}},{key:"info",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];o.info.apply(null,a("I"+this.prefix,t))}},{key:"warn",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];o.warn.apply(null,a("W"+this.prefix,t))}},{key:"error",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];o.error.apply(null,a("E"+this.prefix,t))}}],[{key:"scope",value:function(){return new e}}]),e}();t.Logger=s;var u=s.scope();t.log=u},function(e,t,n){var r=n(562),i=n(563),o=n(168),a=n(564);e.exports=function(e,t){return r(e)||i(e,t)||o(e,t)||a()}},function(e,t,n){var r=n(274);e.exports=function(e,t){if(e){if("string"===typeof e)return r(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?r(e,t):void 0}}},function(e,t,n){"use strict";var r=n(6),i=n(27),o=n(9),a=n(17);Object.defineProperty(t,"__esModule",{value:!0}),t.NamespacedMergingQueue=t.MergingQueue=void 0;var s=function(){function e(t){o(this,e),this.queuedRequests=[],this.isRequestInFlight=!1,this.inputMergingFunction=t}return a(e,[{key:"add",value:function(e,t){var n=this,r=new Promise((function(r,i){return n.queuedRequests.push({input:e,requestFunction:t,resolve:r,reject:i})}));return this.wakeupQueue(),r}},{key:"squashAndAdd",value:function(e,t){var n,r=this.queuedRequests;this.queuedRequests=[],r.length>0?(n=r.map((function(e){return e.input})).reduce(this.inputMergingFunction),n=this.inputMergingFunction(n,e)):n=e;var i=this.add(n,t);return r.forEach((function(e){return i.then(e.resolve,e.reject)})),i}},{key:"isEmpty",value:function(){return 0===this.queuedRequests.length&&!this.isRequestInFlight}},{key:"wakeupQueue",value:function(){var e=this;if(0!==this.queuedRequests.length&&!this.isRequestInFlight){var t=this.queuedRequests.shift();this.isRequestInFlight=!0,t.requestFunction(t.input).then(t.resolve,t.reject).then((function(t){e.isRequestInFlight=!1,e.wakeupQueue()}))}}}]),e}();t.MergingQueue=s;var u=function(){function e(t){o(this,e),this.queueByNamespaceKey=new Map,this.inputReducer=t}return a(e,[{key:"add",value:function(){var e=i(r.mark((function e(t,n,i){return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",this.invokeQueueMethod(t,(function(e){return e.add(n,i)})));case 1:case"end":return e.stop()}}),e,this)})));return function(t,n,r){return e.apply(this,arguments)}}()},{key:"squashAndAdd",value:function(){var e=i(r.mark((function e(t,n,i){return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",this.invokeQueueMethod(t,(function(e){return e.squashAndAdd(n,i)})));case 1:case"end":return e.stop()}}),e,this)})));return function(t,n,r){return e.apply(this,arguments)}}()},{key:"invokeQueueMethod",value:function(){var e=i(r.mark((function e(t,n){var i,o;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this.queueByNamespaceKey.has(t)||this.queueByNamespaceKey.set(t,new s(this.inputReducer)),i=this.queueByNamespaceKey.get(t),o=n(i),this.queueByNamespaceKey.get(t).isEmpty()&&this.queueByNamespaceKey.delete(t),e.abrupt("return",o);case 5:case"end":return e.stop()}}),e,this)})));return function(t,n){return e.apply(this,arguments)}}()}]),e}();t.NamespacedMergingQueue=u},function(e,t,n){"use strict";var r=n(167),i=n(123),o=n(9),a=n(17);
2Object.defineProperty(t,"__esModule",{value:!0}),t.Cache=void 0;var s=n(581),u=function(){function e(t,n){o(this,e),this.value=t,this.revision=n||0}return a(e,[{key:"isValid",get:function(){return!0}}]),e}(),c=function(){function e(t){o(this,e),this.revision=t}return a(e,[{key:"isValid",get:function(){return!1}}]),e}(),l=function(){function e(){o(this,e),this.items=new s.TreeMap}return a(e,[{key:"store",value:function(e,t,n){var r=this.items.get(e);return r&&r.revision>n?r.isValid?r.value:null:(this.items.set(e,new u(t,n)),t)}},{key:"delete",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=this.items.get(e);(!r||r.revision<t||r&&!0===n)&&this.items.set(e,new c(t))}},{key:"isKnown",value:function(e,t){var n=this.items.get(e);return n&&n.revision>=t}},{key:"get",value:function(e){var t=this.items.get(e);return t&&t.isValid?t.value:null}},{key:"has",value:function(e){var t=this.items.get(e);return t&&t.isValid}},{key:"forEach",value:function(e){if(this.items){var t,n=i(this.items);try{for(n.s();!(t=n.n()).done;){var o=r(t.value,2),a=o[0],s=o[1];s.isValid&&e(a,s.value)}}catch(u){n.e(u)}finally{n.f()}}}}]),e}();t.Cache=l,t.default=l},function(e,t,n){"use strict";n.d(t,"a",(function(){return f}));var r=n(28),i=n(30),o=n(4),a=n.n(o),s=n(56),u=(n(14),n(7)),c=n(43),l=n(51),f=function(e){function t(){for(var t,n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return(t=e.call.apply(e,[this].concat(r))||this).history=Object(s.a)(t.props),t}return Object(i.a)(t,e),t.prototype.render=function(){return a.a.createElement(r.b,{history:this.history,children:this.props.children})},t}(a.a.Component);a.a.Component;var h=function(e,t){return"function"===typeof e?e(t):e},d=function(e,t){return"string"===typeof e?Object(s.c)(e,null,null,t):e},p=function(e){return e},v=a.a.forwardRef;"undefined"===typeof v&&(v=p);var y=v((function(e,t){var n=e.innerRef,r=e.navigate,i=e.onClick,o=Object(c.a)(e,["innerRef","navigate","onClick"]),s=o.target,l=Object(u.a)({},o,{onClick:function(e){try{i&&i(e)}catch(t){throw e.preventDefault(),t}e.defaultPrevented||0!==e.button||s&&"_self"!==s||function(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}(e)||(e.preventDefault(),r())}});return l.ref=p!==v&&t||n,a.a.createElement("a",l)}));var m=v((function(e,t){var n=e.component,i=void 0===n?y:n,o=e.replace,s=e.to,f=e.innerRef,m=Object(c.a)(e,["component","replace","to","innerRef"]);return a.a.createElement(r.d.Consumer,null,(function(e){e||Object(l.a)(!1);var n=e.history,r=d(h(s,e.location),e.location),c=r?n.createHref(r):"",y=Object(u.a)({},m,{href:c,navigate:function(){var t=h(s,e.location);(o?n.replace:n.push)(t)}});return p!==v?y.ref=t||f:y.innerRef=f,a.a.createElement(i,y)}))})),g=function(e){return e},b=a.a.forwardRef;"undefined"===typeof b&&(b=g);b((function(e,t){var n=e["aria-current"],i=void 0===n?"page":n,o=e.activeClassName,s=void 0===o?"active":o,f=e.activeStyle,p=e.className,v=e.exact,y=e.isActive,_=e.location,w=e.sensitive,k=e.strict,S=e.style,O=e.to,E=e.innerRef,T=Object(c.a)(e,["aria-current","activeClassName","activeStyle","className","exact","isActive","location","sensitive","strict","style","to","innerRef"]);return a.a.createElement(r.d.Consumer,null,(function(e){e||Object(l.a)(!1);var n=_||e.location,o=d(h(O,n),n),c=o.pathname,C=c&&c.replace(/([.+*?=^!:${}()[\]|/\\])/g,"\\$1"),P=C?Object(r.e)(n.pathname,{path:C,exact:v,sensitive:w,strict:k}):null,x=!!(y?y(P,n):P),I=x?function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return t.filter((function(e){return e})).join(" ")}(p,s):p,j=x?Object(u.a)({},S,{},f):S,R=Object(u.a)({"aria-current":x&&i||null,className:I,style:j,to:o},T);return g!==b?R.ref=t||E:R.innerRef=E,a.a.createElement(m,R)}))}))},function(e,t,n){"use strict";(function(e){var r=n(4),i=n.n(r),o=n(30),a=n(14),s=n.n(a),u=1073741823,c="undefined"!==typeof globalThis?globalThis:"undefined"!==typeof window?window:"undefined"!==typeof e?e:{};function l(e){var t=[];return{on:function(e){t.push(e)},off:function(e){t=t.filter((function(t){return t!==e}))},get:function(){return e},set:function(n,r){e=n,t.forEach((function(t){return t(e,r)}))}}}var f=i.a.createContext||function(e,t){var n,i,a="__create-react-context-"+function(){var e="__global_unique_id__";return c[e]=(c[e]||0)+1}()+"__",f=function(e){function n(){var t;return(t=e.apply(this,arguments)||this).emitter=l(t.props.value),t}Object(o.a)(n,e);var r=n.prototype;return r.getChildContext=function(){var e;return(e={})[a]=this.emitter,e},r.componentWillReceiveProps=function(e){if(this.props.value!==e.value){var n,r=this.props.value,i=e.value;((o=r)===(a=i)?0!==o||1/o===1/a:o!==o&&a!==a)?n=0:(n="function"===typeof t?t(r,i):u,0!==(n|=0)&&this.emitter.set(e.value,n))}var o,a},r.render=function(){return this.props.children},n}(r.Component);f.childContextTypes=((n={})[a]=s.a.object.isRequired,n);var h=function(t){function n(){var e;return(e=t.apply(this,arguments)||this).state={value:e.getValue()},e.onUpdate=function(t,n){0!==((0|e.observedBits)&n)&&e.setState({value:e.getValue()})},e}Object(o.a)(n,t);var r=n.prototype;return r.componentWillReceiveProps=function(e){var t=e.observedBits;this.observedBits=void 0===t||null===t?u:t},r.componentDidMount=function(){this.context[a]&&this.context[a].on(this.onUpdate);var e=this.props.observedBits;this.observedBits=void 0===e||null===e?u:e},r.componentWillUnmount=function(){this.context[a]&&this.context[a].off(this.onUpdate)},r.getValue=function(){return this.context[a]?this.context[a].get():e},r.render=function(){return(e=this.props.children,Array.isArray(e)?e[0]:e)(this.state.value);var e},n}(r.Component);return h.contextTypes=((i={})[a]=s.a.object,i),{Provider:f,Consumer:h}};t.a=f}).call(this,n(44))},function(e,t,n){var r=n(633);e.exports=d,e.exports.parse=o,e.exports.compile=function(e,t){return s(o(e,t),t)},e.exports.tokensToFunction=s,e.exports.tokensToRegExp=h;var i=new RegExp(["(\\\\.)","([\\/.])?(?:(?:\\:(\\w+)(?:\\(((?:\\\\.|[^\\\\()])+)\\))?|\\(((?:\\\\.|[^\\\\()])+)\\))([+*?])?|(\\*))"].join("|"),"g");function o(e,t){for(var n,r=[],o=0,a=0,s="",l=t&&t.delimiter||"/";null!=(n=i.exec(e));){var f=n[0],h=n[1],d=n.index;if(s+=e.slice(a,d),a=d+f.length,h)s+=h[1];else{var p=e[a],v=n[2],y=n[3],m=n[4],g=n[5],b=n[6],_=n[7];s&&(r.push(s),s="");var w=null!=v&&null!=p&&p!==v,k="+"===b||"*"===b,S="?"===b||"*"===b,O=n[2]||l,E=m||g;r.push({name:y||o++,prefix:v||"",delimiter:O,optional:S,repeat:k,partial:w,asterisk:!!_,pattern:E?c(E):_?".*":"[^"+u(O)+"]+?"})}}return a<e.length&&(s+=e.substr(a)),s&&r.push(s),r}function a(e){return encodeURI(e).replace(/[\/?#]/g,(function(e){return"%"+e.charCodeAt(0).toString(16).toUpperCase()}))}function s(e,t){for(var n=new Array(e.length),i=0;i<e.length;i++)"object"===typeof e[i]&&(n[i]=new RegExp("^(?:"+e[i].pattern+")$",f(t)));return function(t,i){for(var o="",s=t||{},u=(i||{}).pretty?a:encodeURIComponent,c=0;c<e.length;c++){var l=e[c];if("string"!==typeof l){var f,h=s[l.name];if(null==h){if(l.optional){l.partial&&(o+=l.prefix);continue}throw new TypeError('Expected "'+l.name+'" to be defined')}if(r(h)){if(!l.repeat)throw new TypeError('Expected "'+l.name+'" to not repeat, but received `'+JSON.stringify(h)+"`");if(0===h.length){if(l.optional)continue;throw new TypeError('Expected "'+l.name+'" to not be empty')}for(var d=0;d<h.length;d++){if(f=u(h[d]),!n[c].test(f))throw new TypeError('Expected all "'+l.name+'" to match "'+l.pattern+'", but received `'+JSON.stringify(f)+"`");o+=(0===d?l.prefix:l.delimiter)+f}}else{if(f=l.asterisk?encodeURI(h).replace(/[?#]/g,(function(e){return"%"+e.charCodeAt(0).toString(16).toUpperCase()})):u(h),!n[c].test(f))throw new TypeError('Expected "'+l.name+'" to match "'+l.pattern+'", but received "'+f+'"');o+=l.prefix+f}}else o+=l}return o}}function u(e){return e.replace(/([.+*?=^!:${}()[\]|\/\\])/g,"\\$1")}function c(e){return e.replace(/([=!:$\/()])/g,"\\$1")}function l(e,t){return e.keys=t,e}function f(e){return e&&e.sensitive?"":"i"}function h(e,t,n){r(t)||(n=t||n,t=[]);for(var i=(n=n||{}).strict,o=!1!==n.end,a="",s=0;s<e.length;s++){var c=e[s];if("string"===typeof c)a+=u(c);else{var h=u(c.prefix),d="(?:"+c.pattern+")";t.push(c),c.repeat&&(d+="(?:"+h+d+")*"),a+=d=c.optional?c.partial?h+"("+d+")?":"(?:"+h+"("+d+"))?":h+"("+d+")"}}var p=u(n.delimiter||"/"),v=a.slice(-p.length)===p;
2return i||(a=(v?a.slice(0,-p.length):a)+"(?:"+p+"(?=$))?"),a+=o?"$":i&&v?"":"(?="+p+"|$)",l(new RegExp("^"+a,f(n)),t)}function d(e,t,n){return r(t)||(n=t||n,t=[]),n=n||{},e instanceof RegExp?function(e,t){var n=e.source.match(/\((?!\?)/g);if(n)for(var r=0;r<n.length;r++)t.push({name:r,prefix:null,delimiter:null,optional:!1,repeat:!1,partial:!1,asterisk:!1,pattern:null});return l(e,t)}(e,t):r(e)?function(e,t,n){for(var r=[],i=0;i<e.length;i++)r.push(d(e[i],t,n).source);return l(new RegExp("(?:"+r.join("|")+")",f(n)),t)}(e,t,n):function(e,t,n){return h(o(e,n),t,n)}(e,t,n)}},,function(e,t,n){(function(e){var r="undefined"!==typeof e&&e||"undefined"!==typeof self&&self||window,i=Function.prototype.apply;function o(e,t){this._id=e,this._clearFn=t}t.setTimeout=function(){return new o(i.call(setTimeout,r,arguments),clearTimeout)},t.setInterval=function(){return new o(i.call(setInterval,r,arguments),clearInterval)},t.clearTimeout=t.clearInterval=function(e){e&&e.close()},o.prototype.unref=o.prototype.ref=function(){},o.prototype.close=function(){this._clearFn.call(r,this._id)},t.enroll=function(e,t){clearTimeout(e._idleTimeoutId),e._idleTimeout=t},t.unenroll=function(e){clearTimeout(e._idleTimeoutId),e._idleTimeout=-1},t._unrefActive=t.active=function(e){clearTimeout(e._idleTimeoutId);var t=e._idleTimeout;t>=0&&(e._idleTimeoutId=setTimeout((function(){e._onTimeout&&e._onTimeout()}),t))},n(321),t.setImmediate="undefined"!==typeof self&&self.setImmediate||"undefined"!==typeof e&&e.setImmediate||this&&this.setImmediate,t.clearImmediate="undefined"!==typeof self&&self.clearImmediate||"undefined"!==typeof e&&e.clearImmediate||this&&this.clearImmediate}).call(this,n(44))},function(e,t,n){"use strict";var r=function(e){return function(e){return!!e&&"object"===typeof e}(e)&&!function(e){var t=Object.prototype.toString.call(e);return"[object RegExp]"===t||"[object Date]"===t||function(e){return e.$$typeof===i}(e)}(e)};var i="function"===typeof Symbol&&Symbol.for?Symbol.for("react.element"):60103;function o(e,t){return!1!==t.clone&&t.isMergeableObject(e)?l((n=e,Array.isArray(n)?[]:{}),e,t):e;var n}function a(e,t,n){return e.concat(t).map((function(e){return o(e,n)}))}function s(e){return Object.keys(e).concat(function(e){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(e).filter((function(t){return e.propertyIsEnumerable(t)})):[]}(e))}function u(e,t){try{return t in e}catch(n){return!1}}function c(e,t,n){var r={};return n.isMergeableObject(e)&&s(e).forEach((function(t){r[t]=o(e[t],n)})),s(t).forEach((function(i){(function(e,t){return u(e,t)&&!(Object.hasOwnProperty.call(e,t)&&Object.propertyIsEnumerable.call(e,t))})(e,i)||(u(e,i)&&n.isMergeableObject(t[i])?r[i]=function(e,t){if(!t.customMerge)return l;var n=t.customMerge(e);return"function"===typeof n?n:l}(i,n)(e[i],t[i],n):r[i]=o(t[i],n))})),r}function l(e,t,n){(n=n||{}).arrayMerge=n.arrayMerge||a,n.isMergeableObject=n.isMergeableObject||r,n.cloneUnlessOtherwiseSpecified=o;var i=Array.isArray(t);return i===Array.isArray(e)?i?n.arrayMerge(e,t,n):c(e,t,n):o(t,n)}l.all=function(e,t){if(!Array.isArray(e))throw new Error("first argument should be an array");return e.reduce((function(e,n){return l(e,n,t)}),{})};var f=l;e.exports=f},function(e,t){var n="undefined"!==typeof Element,r="function"===typeof Map,i="function"===typeof Set,o="function"===typeof ArrayBuffer&&!!ArrayBuffer.isView;function a(e,t){if(e===t)return!0;if(e&&t&&"object"==typeof e&&"object"==typeof t){if(e.constructor!==t.constructor)return!1;var s,u,c,l;if(Array.isArray(e)){if((s=e.length)!=t.length)return!1;for(u=s;0!==u--;)if(!a(e[u],t[u]))return!1;return!0}if(r&&e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(l=e.entries();!(u=l.next()).done;)if(!t.has(u.value[0]))return!1;for(l=e.entries();!(u=l.next()).done;)if(!a(u.value[1],t.get(u.value[0])))return!1;return!0}if(i&&e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(l=e.entries();!(u=l.next()).done;)if(!t.has(u.value[0]))return!1;return!0}if(o&&ArrayBuffer.isView(e)&&ArrayBuffer.isView(t)){if((s=e.length)!=t.length)return!1;for(u=s;0!==u--;)if(e[u]!==t[u])return!1;return!0}if(e.constructor===RegExp)return e.source===t.source&&e.flags===t.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===t.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===t.toString();if((s=(c=Object.keys(e)).length)!==Object.keys(t).length)return!1;for(u=s;0!==u--;)if(!Object.prototype.hasOwnProperty.call(t,c[u]))return!1;if(n&&e instanceof Element)return!1;for(u=s;0!==u--;)if(("_owner"!==c[u]&&"__v"!==c[u]&&"__o"!==c[u]||!e.$$typeof)&&!a(e[c[u]],t[c[u]]))return!1;return!0}return e!==e&&t!==t}e.exports=function(e,t){try{return a(e,t)}catch(n){if((n.message||"").match(/stack|recursion/i))return console.warn("react-fast-compare cannot handle circular refs"),!1;throw n}}},function(e,t,n){"use strict";
2Object.defineProperty(t,"__esModule",{value:!0}),t.defaultProps=t.propTypes=void 0;var r,i=(r=n(14))&&r.__esModule?r:{default:r};var o=i.default.string,a=i.default.bool,s=i.default.number,u=i.default.array,c=i.default.oneOfType,l=i.default.shape,f=i.default.object,h=i.default.func,d=i.default.node,p={url:c([o,u,f]),playing:a,loop:a,controls:a,volume:s,muted:a,playbackRate:s,width:c([o,s]),height:c([o,s]),style:f,progressInterval:s,playsinline:a,pip:a,stopOnUnmount:a,light:c([a,o]),playIcon:d,previewTabIndex:s,fallback:d,wrapper:c([o,h,l({render:h.isRequired})]),config:l({soundcloud:l({options:f}),youtube:l({playerVars:f,embedOptions:f,onUnstarted:h}),facebook:l({appId:o,version:o,playerId:o,attributes:f}),dailymotion:l({params:f}),vimeo:l({playerOptions:f}),file:l({attributes:f,tracks:u,forceVideo:a,forceAudio:a,forceHLS:a,forceDASH:a,forceFLV:a,hlsOptions:f,hlsVersion:o,dashVersion:o,flvVersion:o}),wistia:l({options:f,playerId:o,customControls:u}),mixcloud:l({options:f}),twitch:l({options:f,playerId:o}),vidyard:l({options:f})}),onReady:h,onStart:h,onPlay:h,onPause:h,onBuffer:h,onBufferEnd:h,onEnded:h,onError:h,onDuration:h,onSeek:h,onProgress:h,onClickPreview:h,onEnablePIP:h,onDisablePIP:h};t.propTypes=p;var v=function(){},y={playing:!1,loop:!1,controls:!1,volume:null,muted:!1,playbackRate:1,width:"640px",height:"360px",style:{},progressInterval:1e3,playsinline:!1,pip:!1,stopOnUnmount:!0,light:!1,fallback:null,wrapper:"div",previewTabIndex:0,config:{soundcloud:{options:{visual:!0,buying:!1,liking:!1,download:!1,sharing:!1,show_comments:!1,show_playcount:!1}},youtube:{playerVars:{playsinline:1,showinfo:0,rel:0,iv_load_policy:3,modestbranding:1},embedOptions:{},onUnstarted:v},facebook:{appId:"1309697205772819",version:"v3.3",playerId:null,attributes:{}},dailymotion:{params:{api:1,"endscreen-enable":!1}},vimeo:{playerOptions:{autopause:!1,byline:!1,portrait:!1,title:!1}},file:{attributes:{},tracks:[],forceVideo:!1,forceAudio:!1,forceHLS:!1,forceDASH:!1,forceFLV:!1,hlsOptions:{},hlsVersion:"0.14.16",dashVersion:"3.1.3",flvVersion:"1.5.0"},wistia:{options:{},playerId:null,customControls:null},mixcloud:{options:{hide_cover:1}},twitch:{options:{},playerId:null},vidyard:{options:{}}},onReady:v,onStart:v,onPlay:v,onPause:v,onBuffer:v,onBufferEnd:v,onEnded:v,onError:v,onDuration:v,onSeek:v,onProgress:v,onClickPreview:v,onEnablePIP:v,onDisablePIP:v};t.defaultProps=y},,function(e,t){e.exports=function(e){return e.webpackPolyfill||(e.deprecate=function(){},e.paths=[],e.children||(e.children=[]),Object.defineProperty(e,"loaded",{enumerable:!0,get:function(){return e.l}}),Object.defineProperty(e,"id",{enumerable:!0,get:function(){return e.i}}),e.webpackPolyfill=1),e}},function(e,t,n){"use strict";e.exports=function(e,t){return function(){for(var n=new Array(arguments.length),r=0;r<n.length;r++)n[r]=arguments[r];return e.apply(t,n)}}},function(e,t,n){"use strict";var r=n(47);function i(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}e.exports=function(e,t,n){if(!t)return e;var o;if(n)o=n(t);else if(r.isURLSearchParams(t))o=t.toString();else{var a=[];r.forEach(t,(function(e,t){null!==e&&"undefined"!==typeof e&&(r.isArray(e)?t+="[]":e=[e],r.forEach(e,(function(e){r.isDate(e)?e=e.toISOString():r.isObject(e)&&(e=JSON.stringify(e)),a.push(i(t)+"="+i(e))})))})),o=a.join("&")}if(o){var s=e.indexOf("#");-1!==s&&(e=e.slice(0,s)),e+=(-1===e.indexOf("?")?"?":"&")+o}return e}},function(e,t,n){"use strict";e.exports=function(e){return!(!e||!e.__CANCEL__)}},function(e,t,n){"use strict";(function(t){var r=n(47),i=n(348),o={"Content-Type":"application/x-www-form-urlencoded"};function a(e,t){!r.isUndefined(e)&&r.isUndefined(e["Content-Type"])&&(e["Content-Type"]=t)}var s={adapter:function(){var e;return("undefined"!==typeof XMLHttpRequest||"undefined"!==typeof t&&"[object process]"===Object.prototype.toString.call(t))&&(e=n(185)),e}(),transformRequest:[function(e,t){return i(t,"Accept"),i(t,"Content-Type"),r.isFormData(e)||r.isArrayBuffer(e)||r.isBuffer(e)||r.isStream(e)||r.isFile(e)||r.isBlob(e)?e:r.isArrayBufferView(e)?e.buffer:r.isURLSearchParams(e)?(a(t,"application/x-www-form-urlencoded;charset=utf-8"),e.toString()):r.isObject(e)?(a(t,"application/json;charset=utf-8"),JSON.stringify(e)):e}],transformResponse:[function(e){if("string"===typeof e)try{e=JSON.parse(e)}catch(t){}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};r.forEach(["delete","get","head"],(function(e){s.headers[e]={}})),r.forEach(["post","put","patch"],(function(e){s.headers[e]=r.merge(o)})),e.exports=s}).call(this,n(98))},function(e,t,n){"use strict";var r=n(47),i=n(349),o=n(351),a=n(182),s=n(352),u=n(355),c=n(356),l=n(186);e.exports=function(e){return new Promise((function(t,n){var f=e.data,h=e.headers;r.isFormData(f)&&delete h["Content-Type"];var d=new XMLHttpRequest;if(e.auth){var p=e.auth.username||"",v=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";h.Authorization="Basic "+btoa(p+":"+v)}var y=s(e.baseURL,e.url);if(d.open(e.method.toUpperCase(),a(y,e.params,e.paramsSerializer),!0),d.timeout=e.timeout,d.onreadystatechange=function(){if(d&&4===d.readyState&&(0!==d.status||d.responseURL&&0===d.responseURL.indexOf("file:"))){var r="getAllResponseHeaders"in d?u(d.getAllResponseHeaders()):null,o={data:e.responseType&&"text"!==e.responseType?d.response:d.responseText,status:d.status,statusText:d.statusText,headers:r,config:e,request:d};i(t,n,o),d=null}},d.onabort=function(){d&&(n(l("Request aborted",e,"ECONNABORTED",d)),d=null)},d.onerror=function(){n(l("Network Error",e,null,d)),d=null},d.ontimeout=function(){var t="timeout of "+e.timeout+"ms exceeded";e.timeoutErrorMessage&&(t=e.timeoutErrorMessage),n(l(t,e,"ECONNABORTED",d)),d=null},r.isStandardBrowserEnv()){var m=(e.withCredentials||c(y))&&e.xsrfCookieName?o.read(e.xsrfCookieName):void 0;m&&(h[e.xsrfHeaderName]=m)}if("setRequestHeader"in d&&r.forEach(h,(function(e,t){"undefined"===typeof f&&"content-type"===t.toLowerCase()?delete h[t]:d.setRequestHeader(t,e)})),r.isUndefined(e.withCredentials)||(d.withCredentials=!!e.withCredentials),e.responseType)try{d.responseType=e.responseType}catch(g){if("json"!==e.responseType)throw g}"function"===typeof e.onDownloadProgress&&d.addEventListener("progress",e.onDownloadProgress),"function"===typeof e.onUploadProgress&&d.upload&&d.upload.addEventListener("progress",e.onUploadProgress),e.cancelToken&&e.cancelToken.promise.then((function(e){d&&(d.abort(),n(e),d=null)})),f||(f=null),d.send(f)}))}},function(e,t,n){"use strict";var r=n(350);e.exports=function(e,t,n,i,o){var a=new Error(e);return r(a,t,n,i,o)}},function(e,t,n){"use strict";var r=n(47);e.exports=function(e,t){t=t||{};var n={},i=["url","method","data"],o=["headers","auth","proxy","params"],a=["baseURL","transformRequest","transformResponse","paramsSerializer","timeout","timeoutMessage","withCredentials","adapter","responseType","xsrfCookieName","xsrfHeaderName","onUploadProgress","onDownloadProgress","decompress","maxContentLength","maxBodyLength","maxRedirects","transport","httpAgent","httpsAgent","cancelToken","socketPath","responseEncoding"],s=["validateStatus"];function u(e,t){return r.isPlainObject(e)&&r.isPlainObject(t)?r.merge(e,t):r.isPlainObject(t)?r.merge({},t):r.isArray(t)?t.slice():t}function c(i){r.isUndefined(t[i])?r.isUndefined(e[i])||(n[i]=u(void 0,e[i])):n[i]=u(e[i],t[i])}r.forEach(i,(function(e){r.isUndefined(t[e])||(n[e]=u(void 0,t[e]))})),r.forEach(o,c),r.forEach(a,(function(i){r.isUndefined(t[i])?r.isUndefined(e[i])||(n[i]=u(void 0,e[i])):n[i]=u(void 0,t[i])})),r.forEach(s,(function(r){r in t?n[r]=u(e[r],t[r]):r in e&&(n[r]=u(void 0,e[r]))}));var l=i.concat(o).concat(a).concat(s),f=Object.keys(e).concat(Object.keys(t)).filter((function(e){return-1===l.indexOf(e)}));return r.forEach(f,c),n}},function(e,t,n){"use strict";function r(e){this.message=e}r.prototype.toString=function(){return"Cancel"+(this.message?": "+this.message:"")}
2,r.prototype.__CANCEL__=!0,e.exports=r},function(e,t,n){"use strict";var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),i=function e(t,n,r){null===t&&(t=Function.prototype);var i=Object.getOwnPropertyDescriptor(t,n);if(void 0===i){var o=Object.getPrototypeOf(t);return null===o?void 0:e(o,n,r)}if("value"in i)return i.value;var a=i.get;return void 0!==a?a.call(r):void 0};var o=function(e){function t(e,n){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,n))}return function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),r(t,[{key:"_start",value:function(){i(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"_start",this).call(this),this._dummyEl&&this._detachElement(this._dummyEl)}},{key:"attach",value:function(){return i(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"attach",this).apply(this,arguments)}},{key:"detach",value:function(){return i(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"detach",this).apply(this,arguments)}}]),t}(n(190));e.exports=o},function(e,t,n){"use strict";var r="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();var o=n(26).guessBrowser,a=n(69).MediaStream,s=n(22),u=s.waitForEvent,c=s.waitForSometime,l=n(195),f=function(e){function t(e,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),n=Object.assign({playPausedElementsIfNotBackgrounded:"safari"===o()&&"object"===("undefined"===typeof document?"undefined":r(document))&&"function"===typeof document.addEventListener&&"string"===typeof document.visibilityState},n);var i=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e.id,e.kind,n)),s=!1;return n=Object.assign({MediaStream:a},n),Object.defineProperties(i,{_attachments:{value:new Set},_dummyEl:{value:null,writable:!0},_elShims:{value:new WeakMap},_isStarted:{get:function(){return s},set:function(e){s=e}},_playPausedElementsIfNotBackgrounded:{value:n.playPausedElementsIfNotBackgrounded},_shouldShimAttachedElements:{value:n.workaroundWebKitBug212780||n.playPausedElementsIfNotBackgrounded},_MediaStream:{value:n.MediaStream},isStarted:{enumerable:!0,get:function(){return s}},mediaStreamTrack:{enumerable:!0,get:function(){return e.track}}}),i._initialize(),i}return function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),i(t,[{key:"_start",value:function(){this._log.debug("Started"),this._isStarted=!0,this._dummyEl&&(this._dummyEl.oncanplay=null),this.emit("started",this)}},{key:"_initialize",value:function(){var e=this;this._log.debug("Initializing"),this._dummyEl=this._createElement(),this.mediaStreamTrack.addEventListener("ended",(function t(){e._end(),e.mediaStreamTrack.removeEventListener("ended",t)})),this._dummyEl&&(this._dummyEl.muted=!0,this._dummyEl.oncanplay=this._start.bind(this,this._dummyEl),this._attach(this._dummyEl),this._attachments.delete(this._dummyEl))}},{key:"_end",value:function(){this._log.debug("Ended"),this._dummyEl&&(this._detachElement(this._dummyEl),this._dummyEl.oncanplay=null)}},{key:"attach",value:function(e){var t=this;if("string"===typeof e?e=this._selectElement(e):e||(e=this._createElement()),this._log.debug("Attempting to attach to element:",e),e=this._attach(e),this._shouldShimAttachedElements&&!this._elShims.has(e)){var n=this._playPausedElementsIfNotBackgroun
2ded?function(){return function(e,t){var n=e.tagName.toLowerCase();t.warn("Unintentionally paused:",e),Promise.race([u(document,"visibilitychange"),c(1e3)]).then((function(){"visible"===document.visibilityState&&l.whenResolved("audio").then((function(){return t.info("Playing unintentionally paused <"+n+"> element"),t.debug("Element:",e),e.play()})).then((function(){t.info("Successfully played unintentionally paused <"+n+"> element"),t.debug("Element:",e)})).catch((function(r){t.warn("Error while playing unintentionally paused <"+n+"> element:",{error:r,el:e})}))}))}(e,t._log)}:null;this._elShims.set(e,function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=e.pause,r=e.play,i=!1;e.pause=function(){return i=!0,n.call(e)},e.play=function(){return i=!1,r.call(e)};var o=t?function(){i||t()}:null;o&&e.addEventListener("pause",o);return{pausedIntentionally:function(){return i},unShim:function(){e.pause=n,e.play=r,o&&e.removeEventListener("pause",o)}}}(e,n))}return e}},{key:"_attach",value:function(e){var t=e.srcObject;t instanceof this._MediaStream||(t=new this._MediaStream);var n="audio"===this.mediaStreamTrack.kind?"getAudioTracks":"getVideoTracks";return t[n]().forEach((function(e){t.removeTrack(e)})),t.addTrack(this.mediaStreamTrack),e.srcObject=t,e.autoplay=!0,e.playsInline=!0,this._attachments.has(e)||this._attachments.add(e),e}},{key:"_selectElement",value:function(e){var t=document.querySelector(e);if(!t)throw new Error("Selector matched no element: "+e);return t}},{key:"_createElement",value:function(){return"undefined"!==typeof document?document.createElement(this.kind):null}},{key:"detach",value:function(e){var t=void 0;return t="string"===typeof e?[this._selectElement(e)]:e?[e]:this._getAllAttachedElements(),this._log.debug("Attempting to detach from elements:",t),this._detachElements(t),e?t[0]:t}},{key:"_detachElements",value:function(e){return e.map(this._detachElement.bind(this))}},{key:"_detachElement",value:function(e){if(!this._attachments.has(e))return e;var t=e.srcObject;(t instanceof this._MediaStream&&t.removeTrack(this.mediaStreamTrack),this._attachments.delete(e),this._shouldShimAttachedElements&&this._elShims.has(e))&&(this._elShims.get(e).unShim(),this._elShims.delete(e));return e}},{key:"_getAllAttachedElements",value:function(){var e=[];return this._attachments.forEach((function(t){e.push(t)})),e}}]),t}(n(132));e.exports=f},function(e,t,n){"use strict";"function"===typeof MediaStream?e.exports=MediaStream:e.exports=function(){throw new Error("MediaStream is not supported")}},function(e,t,n){"use strict";e.exports=function e(t){if(!(this instanceof e))return new e(t);var n=t&&"rollback"===t.type?null:new RTCSessionDescription(t);Object.defineProperties(this,{_description:{get:function(){return n}},sdp:{enumerable:!0,value:n?n.sdp:t.sdp},type:{enumerable:!0,value:n?n.type:t.type}})}},function(e,t,n){"use strict";var r=n(26).defer,i={high:new Set(["low"]),low:new Set(["high"])};function o(e){if(!(this instanceof o))return new o(e);var t=e||"low";Object.defineProperties(this,{_state:{set:function(e){if(t!==e){t=e;var n=this._whenDeferreds.get(t);n.forEach((function(e){e.resolve(this)}),this),n.clear()}},get:function(){return t}},_whenDeferreds:{value:new Map([["high",new Set],["low",new Set]])},state:{enumerable:!0,get:function(){return this._state}}})}function a(e,t){return new Error('Cannot transition from "'+e+'" to "'+t+'"')}o.prototype.lower=function(){return this.transition("low")},o.prototype.raise=function(){return this.transition("high")},o.prototype.transition=function(e){if(!i[this.state].has(e))throw a(this.state,e);return this._state=e,this},o.prototype.when=function(e){if(this.state===e)return Promise.resolve(this);if(!i[this.state].has(e))return Promise.reject(a(this.state,e));var t=r();return this._whenDeferreds.get(e).add(t),t.promise},e.exports=o},function(e,t,n){"use strict";e.exports=RTCSessionDescription},function(e,t,n){"use strict";var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();var i=n(22).defer,o=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),Object.defineProperties(this,{_audio:{value:i(),writable:!0},_video:{value:i(),writable:!0}}),this._audio.resolve(),this._video.resolve()}return r(e,[{key:"resolveDeferred",value:function(e){"audio"===e?this._audio.resolve():this._video.resolve()}},{key:"startDeferred",value:function(e){"audio"===e?this._audio=i():this._video=i()}},{key:"whenResolved",value:function(e){return"audio"===e?this._audio.promise:this._video.promise}}]),e}();e.exports=new o},function(e,t,n){"use strict";var r="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),o=function e(t,n,r){null===t&&(t=Function.prototype);var i=Object.getOwnPropertyDescriptor(t,n);if(void 0===i){var o=Object.getPrototypeOf(t);return null===o?void 0:e(o,n,r)}if("value"in i)return i.value;var a=i.get;return void 0!==a?a.call(r):void 0};var a=n(69).getUserMedia,s=n(26).guessBrowser,u=n(22),c=u.capitalize,l=u.defer,f=u.waitForSometime,h=u.waitForEvent,d=n(35).typeErrors.ILLEGAL_INVOKE,p=n(375),v=n(198),y=n(199),m=n(195),g=n(200),b=n(201);
2function _(e){var t=e._log,n=e.kind,r={audio:p,video:v}[n],i=e._dummyEl,o=e.mediaStreamTrack,a=null;function s(){var n=e._workaroundWebKitBug1208516Cleanup,o=e.isStopped,s=e.mediaStreamTrack.muted,u=o&&!!n;return Promise.resolve().then((function(){return"visible"===document.visibilityState&&!a&&(s||u||i.play().then((function(){return r(i)})).then((function(e){return e?t.warn("Silence detected"):t.info("Non-silence detected"),e})).catch((function(e){t.warn("Failed to detect silence:",e)})).finally((function(){i.pause()})))}))}function u(){return Promise.race([h(o,"unmute"),f(50)]).then((function(){return s()})).then((function(t){return t&&!a&&(a=l(),e._restart().finally((function(){i=e._dummyEl,g(),o=e.mediaStreamTrack,d(),a.resolve(),a=null}))),(a&&a.promise||Promise.resolve()).finally((function(){return m.resolveDeferred(n)}))}))}function c(){var t=e._log,n=e.kind;t.info("Muted"),t.debug("LocalMediaTrack:",e),m.startDeferred(n)}function d(){o.addEventListener("ended",u),o.addEventListener("mute",c),o.addEventListener("unmute",u)}function g(){o.removeEventListener("ended",u),o.removeEventListener("mute",c),o.removeEventListener("unmute",u)}return y.onVisible(1,u),d(),function(){y.offVisible(1,u),g()}}e.exports=function(e){return function(e){function t(e,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var i="safari"===s()&&"object"===("undefined"===typeof document?"undefined":r(document))&&"function"===typeof document.addEventListener&&"string"===typeof document.visibilityState;n=Object.assign({getUserMedia:a,isCreatedByCreateLocalTracks:!1,workaroundWebKitBug1208516:i,gUMSilentTrackWorkaround:g},n);var o=new b(e),u=o.kind,c=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,o,n));return Object.defineProperties(c,{_constraints:{value:"object"===r(n[u])?n[u]:{},writable:!0},_getUserMedia:{value:n.getUserMedia},_gUMSilentTrackWorkaround:{value:n.gUMSilentTrackWorkaround},_workaroundWebKitBug1208516:{value:n.workaroundWebKitBug1208516},_workaroundWebKitBug1208516Cleanup:{value:null,writable:!0},_didCallEnd:{value:!1,writable:!0},_isCreatedByCreateLocalTracks:{value:n.isCreatedByCreateLocalTracks},_trackSender:{value:o},id:{enumerable:!0,value:o.id},isEnabled:{enumerable:!0,get:function(){return o.enabled}},isStopped:{enumerable:!0,get:function(){return"ended"===o.readyState}}}),c._workaroundWebKitBug1208516&&(c._workaroundWebKitBug1208516Cleanup=_(c)),c}return function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),i(t,[{key:"_end",value:function(){this._didCallEnd||(o(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"_end",this).call(this),this._didCallEnd=!0,this.emit("stopped",this))}},{key:"_initialize",value:function(){this._didCallEnd&&(this._didCallEnd=!1),o(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"_initialize",this).call(this)}},{key:"_reacquireTrack",value:function(e){var t=this._getUserMedia,n=this._gUMSilentTrackWorkaround,r=this._log,i=this.mediaStreamTrack.kind;r.info("Re-acquiring the MediaStreamTrack"),r.debug("Constraints:",e);var o,a,s,u=Object.assign({audio:!1,video:!1},(s=e,(a=i)in(o={})?Object.defineProperty(o,a,{value:s,enumerable:!0,configurable:!0,writable:!0}):o[a]=s,o));return(this._workaroundWebKitBug1208516Cleanup?n(r,t,u):t(u)).then((function(e){return e.getTracks()[0]}))}},{key:"_restart",value:function(e){var t=this,n=this._log;return e=e||this._constraints,this._stop(),this._reacquireTrack(e).catch((function(t){throw n.error("Failed to re-acquire the MediaStreamTrack:",{error:t,constraints:e}),t})).then((function(r){return n.info("Re-acquired the MediaStreamTrack"),n.debug("MediaStreamTrack:",r),t._constraints=Object.assign({},e),t._setMediaStreamTrack(r)}))}},{key:"_setMediaStreamTrack",value:function(e){var t=this;return e.enabled=this.mediaStreamTrack.enabled,this._stop(),this._trackSender.setMediaStreamTrack(e).catch((function(n){t._log.warn("setMediaStreamTrack failed:",{error:n,mediaStreamTrack:e})})).then((function(){t._initialize(),t._getAllAttachedElements().forEac
2h((function(e){return t._attach(e)}))}))}},{key:"_stop",value:function(){return this.mediaStreamTrack.stop(),this._end(),this}},{key:"enable",value:function(e){return(e="boolean"!==typeof e||e)!==this.mediaStreamTrack.enabled&&(this._log.info((e?"En":"Dis")+"abling"),this.mediaStreamTrack.enabled=e,this.emit(e?"enabled":"disabled",this)),this}},{key:"disable",value:function(){return this.enable(!1)}},{key:"restart",value:function(e){var t=this,n=this.kind;if(!this._isCreatedByCreateLocalTracks)return Promise.reject(d("restart","can only be called on a Local"+c(n)+"Track that is created using createLocalTracks or createLocal"+c(n)+"Track."));this._workaroundWebKitBug1208516Cleanup&&(this._workaroundWebKitBug1208516Cleanup(),this._workaroundWebKitBug1208516Cleanup=null);var r=this._restart(e);return this._workaroundWebKitBug1208516&&(r=r.finally((function(){t._workaroundWebKitBug1208516Cleanup=_(t)}))),r}},{key:"stop",value:function(){return this._log.info("Stopping"),this._workaroundWebKitBug1208516Cleanup&&(this._workaroundWebKitBug1208516Cleanup(),this._workaroundWebKitBug1208516Cleanup=null),this._stop()}}]),t}(e)}},function(e,t,n){"use strict";e.exports=function(e,t,n){n="number"===typeof n?n:250;var r=e.createMediaStreamSource(t),i=e.createAnalyser();i.fftSize=2048,r.connect(i);var o=new Uint8Array(i.fftSize),a=!1;return setTimeout((function(){a=!0}),n),function e(){return a?Promise.resolve(!0):(i.getByteTimeDomainData(o),o.some((function(e){return 128!==e&&0!==e}))?Promise.resolve(!1):function(e){return e="number"===typeof e?e:0,new Promise((function(t){return setTimeout(t,e)}))}().then(e))}().then((function(e){return r.disconnect(),e}),(function(e){throw r.disconnect(),e}))}},function(e,t,n){"use strict";var r=null;e.exports=function(e){return r=r||document.createElement("canvas"),new Promise((function(t){var n=3;setTimeout((function i(){return n--,function(e){var t=r.getContext("2d");t.drawImage(e,0,0,50,50);var n=t.getImageData(0,0,50,50).data.filter((function(e,t){return(t+1)%4}));return 0===Math.max.apply(Math,n)}(e)?n>0?setTimeout(i,250):t(!0):t(!1)}),250)}))}},function(e,t,n){"use strict";var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var o=function(){function e(){var t=this,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1;i(this,e),Object.defineProperties(this,{_listeners:{value:[]},_onVisibilityChange:{value:function(){"visible"===document.visibilityState&&t._emitVisible()}}});for(var r=0;r<n;r++)this._listeners.push([])}return r(e,[{key:"_listenerCount",value:function(){return this._listeners.reduce((function(e,t){return e+t.length}),0)}},{key:"_emitVisible",value:function(){for(var e=this,t=Promise.resolve(),n=function(n){t=t.then((function(){return e._emitVisiblePhase(n)}))},r=1;r<=this._listeners.length;r++)n(r);return t}},{key:"_emitVisiblePhase",value:function(e){var t=this._listeners[e-1];return Promise.all(t.map((function(e){var t=e();return t instanceof Promise?t:Promise.resolve(t)})))}},{key:"_start",value:function(){document.addEventListener("visibilitychange",this._onVisibilityChange)}},{key:"_stop",value:function(){document.removeEventListener("visibilitychange",this._onVisibilityChange)}},{key:"onVisible",value:function(e,t){if("number"!==typeof e||e<=0||e>this._listeners.length)throw new Error("invalid phase: ",e);return this._listeners[e-1].push(t),1===this._listenerCount()&&this._start(),this}},{key:"offVisible",value:function(e,t){if("number"!==typeof e||e<=0||e>this._listeners.length)throw new Error("invalid phase: ",e);var n=this._listeners[e-1],r=n.indexOf(t);return-1!==r&&(n.splice(r,1),0===this._listenerCount()&&this._stop()),this}}]),e}();e.exports=new o(2)},function(e,t,n){"use strict";var r=n(197);e.exports=function(e,t,i,o,a){o="number"===typeof o?o:3;var s=0,u=n(133),c={},l=u.getOrCreate(c);return function n(){return t(i).then((function(t){return(i.audio?r(l,t,a).catch((function(t){return e.warn("Encountered an error while detecting silence",t),!0})):Promise.resolve(!1)).then((function(r){return r?o<=0?(e.warn("Got a silent audio MediaStreamTrack. Normally we would try to get a new one, but we've run out of retries; returning it anyway."),t):(e.warn("Got a silent audio MediaStreamTrack. Stopping all MediaStreamTracks and calling getUserMedia again. This is retry #"+ ++s+"."),t.getTracks().forEac
2h((function(e){return e.stop()})),o--,n()):(e.info("Got a non-silent audio MediaStreamTrack; returning it."),t)}))}))}().then((function(e){return u.release(c),e}),(function(e){throw u.release(c),e}))}},function(e,t,n){"use strict";var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();var i=function(e){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var n=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e.id,e));return Object.defineProperties(n,{_clones:{value:new Set},_senders:{value:new Set}}),n}return function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),r(t,[{key:"clone",value:function(){var e=new t(this.track.clone());return this._clones.add(e),e}},{key:"removeClone",value:function(e){this._clones.delete(e)}},{key:"setMediaStreamTrack",value:function(e){var t=this,n=Array.from(this._clones),r=Array.from(this._senders);return Promise.all(n.map((function(t){return t.setMediaStreamTrack(e.clone())})).concat(r.map((function(t){return t.replaceTrack(e)})))).finally((function(){t._track=e}))}},{key:"addSender",value:function(e){return this._senders.add(e),this}},{key:"removeSender",value:function(e){return this._senders.delete(e),this}}]),t}(n(202));e.exports=i},function(e,t,n){"use strict";var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),i=function e(t,n,r){null===t&&(t=Function.prototype);var i=Object.getOwnPropertyDescriptor(t,n);if(void 0===i){var o=Object.getPrototypeOf(t);return null===o?void 0:e(o,n,r)}if("value"in i)return i.value;var a=i.get;return void 0!==a?a.call(r):void 0};var o=function(e){function t(e,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var r=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,n.kind));return Object.defineProperties(r,{_track:{value:n,writable:!0},enabled:{enumerable:!0,get:function(){return this._track.enabled}},readyState:{enumerable:!0,get:function(){return this._track.readyState}},track:{enumerable:!0,get:function(){return this._track}}}),r}return function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),r(t,[{key:"stop",value:function(){this.track.stop(),i(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"stop",this).call(this)}}]),t}(n(203));e.exports=o},function(e,t,n){"use strict";var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();var i=function(e){function t(e,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var r=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return Object.defineProperties(r,{id:{enumerable:!0,value:e},kind:{enumerable:!0,value:n}}),r}return function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}
2(t,e),r(t,[{key:"stop",value:function(){this.emit("stopped")}}]),t}(n(18).EventEmitter);e.exports=i},function(e,t,n){"use strict";var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),i=function e(t,n,r){null===t&&(t=Function.prototype);var i=Object.getOwnPropertyDescriptor(t,n);if(void 0===i){var o=Object.getPrototypeOf(t);return null===o?void 0:e(o,n,r)}if("value"in i)return i.value;var a=i.get;return void 0!==a?a.call(r):void 0};function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}var a=function(e){function t(e,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var r=o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,n));return Object.defineProperties(r,{dimensions:{enumerable:!0,value:{width:null,height:null}}}),o(r,r)}return function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),r(t,[{key:"_initialize",value:function(){var e=this;i(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"_initialize",this).call(this),this._dummyEl&&(this._dummyEl.onloadedmetadata=function(){s(e,e._dummyEl)&&(e.dimensions.width=e._dummyEl.videoWidth,e.dimensions.height=e._dummyEl.videoHeight)},this._dummyEl.onresize=function(){s(e,e._dummyEl)&&(e.dimensions.width=e._dummyEl.videoWidth,e.dimensions.height=e._dummyEl.videoHeight,e.isStarted&&(e._log.debug("Dimensions changed:",e.dimensions),e.emit(t.DIMENSIONS_CHANGED,e)))})}},{key:"_start",value:function(e){return this.dimensions.width=e.videoWidth,this.dimensions.height=e.videoHeight,this._log.debug("Dimensions:",this.dimensions),i(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"_start",this).call(this,e)}},{key:"attach",value:function(){return i(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"attach",this).apply(this,arguments)}},{key:"detach",value:function(){return i(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"detach",this).apply(this,arguments)}}]),t}(n(190));function s(e,t){return e.dimensions.width!==t.videoWidth||e.dimensions.height!==t.videoHeight}a.DIMENSIONS_CHANGED="dimensionsChanged",e.exports=a},function(e,t,n){"use strict";var r=function(e){function t(e,n,r,i){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var o=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,"data"));return Object.defineProperties(o,{maxPacketLifeTime:{enumerable:!0,value:n},maxRetransmits:{enumerable:!0,value:r},ordered:{enumerable:!0,value:i}}),o}return function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),t}(n(203));e.exports=r},function(e){e.exports=JSON.parse('{"_args":[["[email protected]","C:\\\\Users\\\\DJ 2020\\\\Downloads\\\\diageo-video-call-master\\\\diageo-video-call-master"]],"_from":"[email protected]","_id":"[email protected]","_inBundle":false,"_integrity":"sha512-XRVztAp9NefECW8Zg6sg5dGxtrwvJZQ6DLCCBL3nmNgviYmE9tKOErSzlH9MmAUUvyu6YArcuTTmfIL4AcHAsw==","_location":"/twilio-video","_phantomChildren":{"async-limiter":"1.0.1","ultron":"1.1.1"},"_requested":{"type":"version","registry":true,"raw":"[email protected]","name":"twilio-video","escapedName":"twilio-video","rawSpec":"2.10.0","saveSpec":null,"fetchSpec":"2.10.0"},"_requiredBy":["/"],"_resolved":"https://registry.npmjs.org/twilio-video/-/twilio-video-2.10.0.tgz","_spec":"2.10.0","_where":"C:\\\\Users\\\\DJ 2020\\\\Downloads\\\\diageo-video-call-master\\\\diageo-video-call-master","author":{"name":"Mark Andrus Roberts","email":"[email protected]"},"browser":{"ws":"./src/ws.js","xmlhttprequest":"./src/xmlhttprequest.js"},"bugs":{"url":"https://github.com/twilio/twilio-video.js/issues"},"contributors":[{"name":"Ryan Rowland","email":"[email protected]"},{"name":"Manjesh Malavalli","email":"[email protected]"},{"name":"Makarand Patwardhan","email":"[email protected]"}],"dependencies":{"@twilio/webrtc":"4.3.2","backoff":"^2.5.0","loglevel":"^1.7.0","ws":"^3.3.1","xmlhttprequest":"^1.8.0"},"description":"Twilio Video JavaScript Library","devDependencies":{"@types/express":"^4.11.0","@types/node":"^8.5.1","@types/selenium-webdriver":"^3.0.8","@types/ws":"^3.2.1","babel-cli":"^6.26.0","babel-preset-es2015":"^6.24.1","browserify":"^17.0.0","cheerio":"^0.22.0","cors":"^2.8.5","electron":"^9.1.0","envify":"^4.0.0","eslint":"^6.2.1","eslint-config-standard":"^14.0.0","eslint-plugin-import":"^2.18.2","eslint-plugin-node":"^9.1.0","eslint-plugin-
2promise":"^4.2.1","eslint-plugin-standard":"^4.0.1","express":"^4.16.2","ink-docstrap":"^1.3.2","inquirer":"^7.0.0","is-docker":"^2.0.0","istanbul":"^0.4.5","jsdoc":"^3.5.5","json-loader":"^0.5.7","karma":"^5.0.2","karma-browserify":"^7.0.0","karma-chrome-launcher":"^2.0.0","karma-edgium-launcher":"^4.0.0-0","karma-electron":"^6.1.0","karma-firefox-launcher":"^1.3.0","karma-htmlfile-reporter":"^0.3.8","karma-junit-reporter":"^1.2.0","karma-mocha":"^1.3.0","karma-safari-launcher":"^1.0.0","karma-spec-reporter":"0.0.32","mocha":"^3.2.0","node-http-server":"^8.1.2","npm-run-all":"^4.0.2","requirejs":"^2.3.3","rimraf":"^2.6.1","simple-git":"^1.126.0","sinon":"^4.0.1","ts-node":"4.0.1","tslint":"5.8.0","twilio":"^3.49.0","twilio-release-tool":"^1.0.0","typescript":"2.6.2","uglify-js":"^2.8.22","vinyl-fs":"^2.4.4","vinyl-source-stream":"^1.1.0","watchify":"^3.11.1","webrtc-adapter":"^4.1.1"},"engines":{"node":">=0.12"},"homepage":"https://twilio.com","keywords":["twilio","webrtc","library","javascript","video","rooms"],"license":"BSD-3-Clause","main":"./es5/index.js","name":"twilio-video","repository":{"type":"git","url":"git+https://github.com/twilio/twilio-video.js.git"},"scripts":{"build":"npm-run-all clean lint docs cover test:integration build:es5 build:js build:min.js test:umd","build:es5":"rimraf ./es5 && babel lib -d es5","build:js":"node ./scripts/build.js ./src/twilio-video.js ./LICENSE.md ./dist/twilio-video.js","build:min.js":"uglifyjs ./dist/twilio-video.js -o ./dist/twilio-video.min.js --comments \\"/^! twilio-video.js/\\" -b beautify=false,ascii_only=true","build:quick":"npm-run-all clean lint docs build:es5 build:js build:min.js","clean":"rimraf ./coverage ./es5 ./dist","cover":"istanbul cover node_modules/mocha/bin/_mocha -- ./test/unit/index.js","docs":"node ./scripts/docs.js ./dist/docs","lint":"eslint ./lib ./test/*.js ./docker/**/*.js ./test/framework/*.js ./test/lib/*.js ./test/integration/** ./test/unit/**","test":"npm-run-all test:unit test:integration","test:crossbrowser":"npm-run-all test:crossbrowser:*","test:crossbrowser:build":"npm-run-all test:crossbrowser:build:*","test:crossbrowser:build:browser":"cd ./test/crossbrowser && browserify lib/crossbrowser/src/browser/index.js > src/browser/index.js","test:crossbrowser:build:clean":"rimraf ./test/crossbrowser/lib ./test/crossbrowser/src/browser/index.js","test:crossbrowser:build:lint":"cd ./test/crossbrowser && tslint --project tsconfig.json","test:crossbrowser:build:tsc":"cd ./test/crossbrowser && tsc","test:crossbrowser:test":"cd ./test/crossbrowser && mocha --compilers ts:ts-node/register test/integration/spec/**/*.ts","test:framework":"npm-run-all test:framework:install test:framework:angular test:framework:no-framework test:framework:react","test:framework:angular":"npm-run-all test:framework:angular:*","test:framework:angular:install":"cd ./test/framework/twilio-video-angular && rimraf ./node_modules package-lock.json && npm install","test:framework:angular:run":"mocha ./test/framework/twilio-video-angular.js","test:framework:install":"npm install chromedriver && npm install selenium-webdriver && npm install geckodriver && npm install puppeteer","test:framework:no-framework":"npm-run-all test:framework:no-framework:*","test:framework:no-framework:run":"mocha ./test/framework/twilio-video-no-framework.js","test:framework:react":"npm-run-all test:framework:react:*","test:framework:react:build":"cd ./test/framework/twilio-video-react && npm run build","test:framework:react:install":"cd ./test/framework/twilio-video-react && rimraf ./node_modules package-lock.json && npm install","test:framework:react:run":"mocha ./test/framework/twilio-video-react.js","test:framework:react:test":"node ./scripts/framework.js twilio-video-react","test:integration":"node ./scripts/karma.js karma/integration.conf.js","test:integration:adapter":"node ./scripts/karma.js karma/integration.adapter.conf.js","test:sdkdriver":"npm-run-all test:sdkdriver:*","test:sdkdriver:build":"npm-run-all test:sdkdriver:build:*","test:sdkdriver:build:clean":"rimraf ./test/lib/sdkdriver/lib ./test/lib/sdkdriver/test/integration/browser/index.js","test:sdkdriver:build:lint":"cd ./test/lib/sdkdriver && tslint --project tsconfig.json","test:sdkdriver:build:tsc":"cd ./test/lib/sdkdriver && tsc --rootDir src","test:sdkdriver:test":"npm-run-all test:sdkdriver:test:*","test:sdkdriver:test:integration":"npm-run-all test:sdkdriver:test:integration:*","test:sdkdriver:test:integration:browser":"cd ./test/lib/sdkdriver/test/integration && browserify browser/browser.js > browser/index.js","test:sdkdriver:test:integration:run":"cd ./test/lib/sdkdriver && mocha --compilers ts:ts-node/register test/integration/spec/**/*.ts","test:sdkdriver:test:unit":"cd ./test/lib/sdkdriver && mocha --compilers ts:ts-node/register test/unit/spec/**/*.ts","test:umd":"mocha ./test/umd/index.js","test:unit":"mocha ./test/unit/index.js"},"title":"Twilio Video","version":"2.10.0"}')},function(e,t,n){"use strict";var r="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i=n(22).isNonArrayObject,o=n(35),a=o.typeErrors,s=o.subscriptionMode,u=o.trackPriority,c=o.trackSwitchOffMode;function l(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];return"undefined"===typeof e?null:null!==e&&i(e)?n.reduce((function(n,i){var o=i.prop,s=i.type,u=i.values;if(n||!(o in e))return n;var c=e[o];return s&&("undefined"===typeof c?"undefined":r(c))!==s||"number"===s&&isNaN(c)?a.INVALID_TYPE(t+"."+o,s):Array.isArray(u)&&!u.includes(c)?a.INVALID_VALUE(t+"."+o,u):n}),null):a.INVALID_TYPE(t,"object")}t.validateBandwidthProfile=function(e){var t=l(e,"options.bandwidthProfile");return!e||t?t:(t=l(e.video,"options.bandwidthProfile.video",[{prop:"dominantSpeakerPriority",values:Object.values(u)},{prop:"maxSubscriptionBitrate",type:"number"},{prop:"maxTracks",type:"number"},{prop:"mode",values:Object.values(s)},{prop:"trackSwitchOffMode",values:Object.values(c)}]))||(e.video?function(e){var t="options.bandwidthProfile.video.renderDimensions",n=l(e,t);return e?n||Object.values(u).reduce((function(n,r){return n||l(e[r],t+"."+r,[{prop:"height",type:"number"},{prop:"width",type:"number"}])}),null):n}(e.video.renderDimensions):null)},t.validateLocalTrack=function(e,t){if(!(e instanceof t.LocalAudioTrack||e instanceof t.LocalDataTrack||e instanceof t.LocalVideoTrack||e instanceof t.MediaStreamTrack))throw a.INVALID_TYPE("track","LocalAudioTrack, LocalVideoTrack, LocalDataTrack, or MediaStreamTrack")},t.validateObject=l},function(e,t,n){"use strict";var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();var i=n(113),o=n(22),a=o.buildLogLevels,s=o.valueToJSON,u=n(35).DEFAULT_LOG_LEVEL,c=n(88),l=0,f=function(e){function t(e,n,r){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var i=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));r=Object.assign({logLevel:u},r);var o=a(r.logLevel);return Object.defineProperties(i,{_instanceId:{value:l++},_log:{value:r.log||new c("default",i,o,r.loggerName)}
2,trackName:{enumerable:!0,value:e},trackSid:{enumerable:!0,value:n}}),i}return function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),r(t,[{key:"toJSON",value:function(){return s(this)}},{key:"toString",value:function(){return"[TrackPublication #"+this._instanceId+": "+this.trackSid+"]"}}]),t}(i);e.exports=f},function(e,t,n){"use strict";var r=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],r=!0,i=!1,o=void 0;try{for(var a,s=e[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(u){i=!0,o=u}finally{try{!r&&s.return&&s.return()}finally{if(i)throw o}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")},i=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();function o(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)}var a=n(113),s=n(388),u=n(389),c=n(390),l=n(391),f=n(392),h=n(393),d=n(22),p=0,v=function(e){function t(e,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var r=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this)),i=function(e){var t=e.map((function(e){return[e.id,e]})),n=t.filter((function(e){return"audio"===e[1].kind})),r=t.filter((function(e){return"video"===e[1].kind})),i=t.filter((function(e){return"data"===e[1].kind}));return{audioTracks:n,dataTracks:i,tracks:t,videoTracks:r}}((n=Object.assign({RemoteAudioTrack:s,RemoteAudioTrackPublication:u,RemoteDataTrack:c,RemoteDataTrackPublication:l,RemoteVideoTrack:f,RemoteVideoTrackPublication:h,tracks:[]},n)).tracks),o=n.log.createLog("default",r),a=new Map(i.audioTracks),d=new Map(i.dataTracks),v=new Map(i.tracks),m=new Map(i.videoTracks);return Object.defineProperties(r,{_RemoteAudioTrack:{value:n.RemoteAudioTrack},_RemoteAudioTrackPublication:{value:n.RemoteAudioTrackPublication},_RemoteDataTrack:{value:n.RemoteDataTrack},_RemoteDataTrackPublication:{value:n.RemoteDataTrackPublication},_RemoteVideoTrack:{value:n.RemoteVideoTrack},_RemoteVideoTrackPublication:{value:n.RemoteVideoTrackPublication},_audioTracks:{value:a},_dataTracks:{value:d},_instanceId:{value:++p},_log:{value:o},_signaling:{value:e},_tracks:{value:v},_trackEventReemitters:{value:new Map},_trackPublicationEventReemitters:{value:new Map},_trackSignalingUpdatedEventCallbacks:{value:new Map},_videoTracks:{value:m},audioTracks:{enumerable:!0,value:new Map},dataTracks:{enumerable:!0,value:new Map},identity:{enumerable:!0,get:function(){return e.identity}},networkQualityLevel:{enumerable:!0,get:function(){return e.networkQualityLevel}},networkQualityStats:{enumerable:!0,get:function(){return e.networkQualityStats}},sid:{enumerable:!0,get:function(){return e.sid}},state:{enumerable:!0,get:function(){return e.state}},tracks:{enumerable:!0,value:new Map},videoTracks:{enumerable:!0,value:new Map}}),r._tracks.forEach(y.bind(null,r)),e.on("networkQualityLevelChanged",(function(){return r.emit("networkQualityLevelChanged",r.networkQualityLevel,r.networkQualityStats&&(r.networkQualityStats.audio||r.networkQualityStats.video)?r.networkQualityStats:null)})),function(e,t){var n=e._log;if("disconnected"===e.state)return;t.on("stateChanged",(function r(i){n.debug("Transitioned to state:",i),e.emit(i,e),"disconnected"===i&&(n.debug("Removing Track event reemitters"),t.removeListener("stateChanged",r),e._tracks.forEach((function(t){var n=e._trackEventReemitters.get(t.id);
2t&&n&&n.forEach((function(e,n){t.removeListener(n,e)}))})),t.tracks.forEach((function(t){var n=e._tracks.get(t.id),r=e._trackEventReemitters.get(t.id);n&&r&&r.forEach((function(e,t){n.removeListener(t,e)}))})),e._trackEventReemitters.clear(),e.tracks.forEach((function(t){e._trackPublicationEventReemitters.get(t.trackSid).forEach((function(e,n){t.removeListener(n,e)}))})),e._trackPublicationEventReemitters.clear())}))}(r,e),o.info("Created a new Participant"+(r.identity?": "+r.identity:"")),r}return function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),i(t,[{key:"_getTrackEvents",value:function(){return[["dimensionsChanged","trackDimensionsChanged"],["message","trackMessage"],["started","trackStarted"]]}},{key:"_getTrackPublicationEvents",value:function(){return[]}},{key:"toString",value:function(){return"[Participant #"+this._instanceId+": "+this.sid+"]"}},{key:"_addTrack",value:function(e,t){var n=this._log;return this._tracks.has(t)?null:(this._tracks.set(t,e),{audio:this._audioTracks,video:this._videoTracks,data:this._dataTracks}[e.kind].set(t,e),y(this,e,t),n.info("Added a new "+d.trackClass(e)+":",t),n.debug(d.trackClass(e)+":",e),e)}},{key:"_addTrackPublication",value:function(e){var t=this._log;return this.tracks.has(e.trackSid)?null:(this.tracks.set(e.trackSid,e),{audio:this.audioTracks,data:this.dataTracks,video:this.videoTracks}[e.kind].set(e.trackSid,e),function(e,t){var n=new Map;if("disconnected"===e.state)return;e._getTrackPublicationEvents().forEach((function(i){var o=r(i,2),a=o[0],s=o[1];n.set(a,(function(){for(var n=arguments.length,r=Array(n),i=0;i<n;i++)r[i]=arguments[i];e.emit.apply(e,[s].concat(r,[t]))})),t.on(a,n.get(a))})),e._trackPublicationEventReemitters.set(t.trackSid,n)}(this,e),t.info("Added a new "+d.trackPublicationClass(e)+":",e.trackSid),t.debug(d.trackPublicationClass(e)+":",e),e)}},{key:"_handleTrackSignalingEvents",value:function(){var e=this._log,t=this;if("disconnected"!==this.state){var n=this._RemoteAudioTrack,i=this._RemoteAudioTrackPublication,o=this._RemoteVideoTrack,a=this._RemoteVideoTrackPublication,s=this._RemoteDataTrack,u=this._RemoteDataTrackPublication,c=this._signaling;c.on("trackAdded",l),c.on("trackRemoved",f),c.tracks.forEach(l),c.on("stateChanged",(function n(r){"disconnected"===r?(e.debug("Removing event listeners"),c.removeListener("stateChanged",n),c.removeListener("trackAdded",l),c.removeListener("trackRemoved",f)):"connected"===r&&(e.info("reconnected"),setTimeout((function(){return t.emit("reconnected")}),0))}))}function l(n){var o=new(0,{audio:i,data:u,video:a}[n.kind])(n,{log:e});t._addTrackPublication(o);var s=n.isSubscribed;s&&h(n),t._trackSignalingUpdatedEventCallbacks.set(n.sid,(function(){if(s!==n.isSubscribed){if(s=n.isSubscribed)return void h(n);!function(e){var n=Array.from(t._tracks.entries()).find((function(t){return r(t,2)[1].sid===e.sid})),i=r(n,2),o=i[0],a=i[1],s=t.tracks.get(e.sid);a&&t._removeTrack(a,s,o)}(n)}})),n.on("updated",t._trackSignalingUpdatedEventCallbacks.get(n.sid))}function f(e){e.isSubscribed&&e.setTrackTransceiver(null);var n=t._trackSignalingUpdatedEventCallbacks.get(e.sid);n&&(e.removeListener("updated",n),t._trackSignalingUpdatedEventCallbacks.delete(e.sid));var r=t.tracks.get(e.sid);r&&t._removeTrackPublication(r)}function h(r){var i=r.isEnabled,a=r.name,u=r.kind,l=r.sid,f=r.trackTransceiver,h={audio:n,video:o,data:s}[u],d=t.tracks.get(l);if(h&&u===f.kind){var p={log:e,name:a},v="data"===u?new h(l,f,p):new h(l,f,i,(function(e){return c.updateSubscriberTrackPriority(l,e)}),p);t._addTrack(v,d,f.id)}}}},{key:"_removeTrack",value:function(e,t){if(!this._tracks.has(t))return null;this._tracks.delete(t),{audio:this._audioTracks,video:this._videoTracks,data:this._dataTracks}[e.kind].delete(t),(this._trackEventReemitters.get(t)||new Map).forEach((function(t,n){e.removeListener(n,t)}));var n=this._log;return n.info("Removed a "+d.trackClass(e)+":",t),n.debug(d.trackClass(e)+":",e),e}},{key:"_removeTrackPublication",value:function(e){if(!(e=this.tracks.get(e.trackSid)))return null;this.tracks.delete(e.trackSid),{audio:this.audioTracks,data:this.dataTracks,video:this.videoTracks}[e.kind].delete(e.trackSid),(this._trackPublicationEventReemitters.get(e.trackSid)||new Map).forEac
2h((function(t,n){e.removeListener(n,t)}));var t=this._log;return t.info("Removed a "+d.trackPublicationClass(e)+":",e.trackSid),t.debug(d.trackPublicationClass(e)+":",e),e}},{key:"toJSON",value:function(){return d.valueToJSON(this)}}]),t}(a);function y(e,t,n){var r=new Map;"disconnected"!==e.state&&(e._getTrackEvents().forEach((function(n){var i=n[0],a=n[1];r.set(i,(function(){var t=[a].concat([].slice.call(arguments));return e.emit.apply(e,o(t))})),t.on(i,r.get(i))})),e._trackEventReemitters.set(n,r))}e.exports=v},function(e,t,n){"use strict";var r="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),o=function e(t,n,r){null===t&&(t=Function.prototype);var i=Object.getOwnPropertyDescriptor(t,n);if(void 0===i){var o=Object.getPrototypeOf(t);return null===o?void 0:e(o,n,r)}if("value"in i)return i.value;var a=i.get;return void 0!==a?a.call(r):void 0};var a=n(35),s=a.typeErrors,u=a.trackPriority,c=n(26).guessBrowser,l=n(199);e.exports=function(e){return function(e){function t(e,n,i,o,a){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),a=Object.assign({workaroundWebKitBug212780:"safari"===c()&&"object"===("undefined"===typeof document?"undefined":r(document))&&"function"===typeof document.addEventListener&&"string"===typeof document.visibilityState},a);var s=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,n,a));return Object.defineProperties(s,{_isEnabled:{value:i,writable:!0},_isSwitchedOff:{value:!1,writable:!0},_priority:{value:null,writable:!0},_setPriority:{value:o},isEnabled:{enumerable:!0,get:function(){return this._isEnabled}},isSwitchedOff:{enumerable:!0,get:function(){return this._isSwitchedOff}},priority:{enumerable:!0,get:function(){return this._priority}},sid:{enumerable:!0,value:e},_workaroundWebKitBug212780:{value:a.workaroundWebKitBug212780},_workaroundWebKitBug212780Cleanup:{value:null,writable:!0}}),s}return function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),i(t,[{key:"setPriority",value:function(e){var t=[null].concat(function(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)}(Object.values(u)));if(!t.includes(e))throw s.INVALID_VALUE("priority",t);return this._priority!==e&&(this._priority=e,this._setPriority(e)),this}},{key:"_setEnabled",value:function(e){this._isEnabled!==e&&(this._isEnabled=e,this.emit(this._isEnabled?"enabled":"disabled",this))}},{key:"_setSwitchedOff",value:function(e){this._isSwitchedOff!==e&&(this._isSwitchedOff=e,this.emit(e?"switchedOff":"switchedOn",this))}},{key:"attach",value:function(e){var n=o(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"attach",this).call(this,e);return!0!==this.mediaStreamTrack.enabled&&(this.mediaStreamTrack.enabled=!0),this._workaroundWebKitBug212780&&(this._workaroundWebKitBug212780Cleanup=this._workaroundWebKitBug212780Cleanup||function(e){var t=e._log,n=e.kind;function r(){e._attachments.forEach((function(r){var i=e._elShims.get(r);r.paused&&i&&!i.pausedIntentionally()&&(t.info("Playing inadvertently paused <"+n+"> element"),t.debug("Element:",r),t.debug("RemoteMediaTrack:",e),r.play().then((function(){t.info("Successfully played inadvertently paused <"+n+"> element"),t.debug("Element:",r),t.debug("RemoteMediaTrack:",e)}
2)).catch((function(i){t.warn("Error while playing inadvertently paused <"+n+"> element:",{err:i,el:r,remoteMediaTrack:e})})))}))}return l.onVisible(2,r),function(){l.offVisible(2,r)}}(this)),n}},{key:"detach",value:function(e){var n=o(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"detach",this).call(this,e);return 0===this._attachments.size&&(this.mediaStreamTrack.enabled=!1,this._workaroundWebKitBug212780Cleanup&&(this._workaroundWebKitBug212780Cleanup(),this._workaroundWebKitBug212780Cleanup=null)),n}}]),t}(e)}},function(e,t,n){"use strict";var r=n(397),i=n(398),o=n(399),a=n(400);e.exports=function e(t,n,s){if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),"string"!==typeof t)throw new Error("RTCPeerConnection id must be a string");Object.defineProperties(this,{peerConnectionId:{value:t,enumerable:!0},localAudioTrackStats:{value:n.localAudioTrackStats.map((function(e){return new r(e.trackId,e,s)})),enumerable:!0},localVideoTrackStats:{value:n.localVideoTrackStats.map((function(e){return new i(e.trackId,e,s)})),enumerable:!0},remoteAudioTrackStats:{value:n.remoteAudioTrackStats.map((function(e){return new o(e.trackId,e)})),enumerable:!0},remoteVideoTrackStats:{value:n.remoteVideoTrackStats.map((function(e){return new a(e.trackId,e)})),enumerable:!0}})}},function(e,t,n){"use strict";var r=function(e){function t(e,n,r){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var i=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,n));return Object.defineProperties(i,{bytesSent:{value:"number"===typeof n.bytesSent?n.bytesSent:r?0:null,enumerable:!0},packetsSent:{value:"number"===typeof n.packetsSent?n.packetsSent:r?0:null,enumerable:!0},roundTripTime:{value:"number"===typeof n.roundTripTime?n.roundTripTime:r?0:null,enumerable:!0}}),i}return function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),t}(n(213));e.exports=r},function(e,t,n){"use strict";e.exports=function e(t,n){if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),"string"!==typeof t)throw new Error("Track id must be a string");Object.defineProperties(this,{trackId:{value:t,enumerable:!0},trackSid:{value:n.trackSid,enumerable:!0},timestamp:{value:n.timestamp,enumerable:!0},ssrc:{value:n.ssrc,enumerable:!0},packetsLost:{value:"number"===typeof n.packetsLost?n.packetsLost:null,enumerable:!0},codec:{value:"string"===typeof n.codecName?n.codecName:null,enumerable:!0}})}},function(e,t,n){"use strict";var r=function(e){function t(e,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var r=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,n));return Object.defineProperties(r,{bytesReceived:{value:"number"===typeof n.bytesReceived?n.bytesReceived:null,enumerable:!0},packetsReceived:{value:"number"===typeof n.packetsReceived?n.packetsReceived:null,enumerable:!0}}),r}return function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),t}(n(213));e.exports=r},function(e,t,n){var r=n(216),i=n(407),o=n(218),a=n(408);e.exports.Backoff=r,e.exports.FunctionCall=a,e.exports.FibonacciStrategy=o,e.exports.ExponentialStrategy=i,e.exports.fibonacci=function(e){return new r(new o(e))},e.exports.exponential=function(e){return new r(new i(e))},e.exports.call=function(e,t,n){var r=Array.prototype.slice.call(arguments);return e=r[0],t=r.slice(1,r.length-1),n=r[r.length-1],new a(e,t,n)}},function(e,t,n){var r=n(18),i=n(138);function o(e){r.EventEmitter.call(this),this.backoffStrategy_=e,this.maxNumberOfRetry_=-1,this.backoffNumber_=0,this.backoffDelay_=0,this.timeoutID_=-1,this.handlers={backoff:this.onBackoff_.bind(this)}}n(48).inherits(o,r.EventEmitter),o.prototype.failAfter=function(e){i.checkArgument(e>0,"Expected a maximum number of retry greater than 0 but got %s.",e),this.maxNumberOfRetry_=e},o.prototype.backoff=function(e){i.checkState(-1===this.timeoutID_,"Backoff in progress."),this.backoffNumber_===this.maxNumberOfRetry_?(this.emit
2("fail",e),this.reset()):(this.backoffDelay_=this.backoffStrategy_.next(),this.timeoutID_=setTimeout(this.handlers.backoff,this.backoffDelay_),this.emit("backoff",this.backoffNumber_,this.backoffDelay_,e))},o.prototype.onBackoff_=function(){this.timeoutID_=-1,this.emit("ready",this.backoffNumber_,this.backoffDelay_),this.backoffNumber_++},o.prototype.reset=function(){this.backoffNumber_=0,this.backoffStrategy_.reset(),clearTimeout(this.timeoutID_),this.timeoutID_=-1},e.exports=o},function(e,t,n){n(18),n(48);function r(e){return void 0!==e&&null!==e}function i(e){if(r((e=e||{}).initialDelay)&&e.initialDelay<1)throw new Error("The initial timeout must be greater than 0.");if(r(e.maxDelay)&&e.maxDelay<1)throw new Error("The maximal timeout must be greater than 0.");if(this.initialDelay_=e.initialDelay||100,this.maxDelay_=e.maxDelay||1e4,this.maxDelay_<=this.initialDelay_)throw new Error("The maximal backoff delay must be greater than the initial backoff delay.");if(r(e.randomisationFactor)&&(e.randomisationFactor<0||e.randomisationFactor>1))throw new Error("The randomisation factor must be between 0 and 1.");this.randomisationFactor_=e.randomisationFactor||0}i.prototype.getMaxDelay=function(){return this.maxDelay_},i.prototype.getInitialDelay=function(){return this.initialDelay_},i.prototype.next=function(){var e=this.next_(),t=1+Math.random()*this.randomisationFactor_;return Math.round(e*t)},i.prototype.next_=function(){throw new Error("BackoffStrategy.next_() unimplemented.")},i.prototype.reset=function(){this.reset_()},i.prototype.reset_=function(){throw new Error("BackoffStrategy.reset_() unimplemented.")},e.exports=i},function(e,t,n){var r=n(48),i=n(217);function o(e){i.call(this,e),this.backoffDelay_=0,this.nextBackoffDelay_=this.getInitialDelay()}r.inherits(o,i),o.prototype.next_=function(){var e=Math.min(this.nextBackoffDelay_,this.getMaxDelay());return this.nextBackoffDelay_+=this.backoffDelay_,this.backoffDelay_=e,e},o.prototype.reset_=function(){this.nextBackoffDelay_=this.getInitialDelay(),this.backoffDelay_=0},e.exports=o},function(e,t,n){"use strict";var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();var i=n(220),o=n(221),a=n(222),s=function(e){function t(e,n,r,i,o,a,s){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var u=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,n,r)),c=o>0?i/o:0;return Object.defineProperties(u,{deltaPacketsLost:{enumerable:!0,value:i},deltaPacketsReceived:{enumerable:!0,value:o},fractionLost:{enumerable:!0,value:a},jitter:{enumerable:!0,value:s},phonyFractionLost:{enumerable:!0,value:c}}),u}return function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),r(t,[{key:"summarize",value:function(){return{bitrate:this.bitrate,fractionLost:"number"===typeof this.fractionLost?this.fractionLost:this.phonyFractionLost,jitter:this.jitter}}}],[{key:"of",value:function(e,n,r){if(n.id!==r.id)throw new Error("RTCStats IDs must match");var i=(r.timestamp-n.timestamp)/1e3,o=r.bytesReceived-n.bytesReceived,a=i>0?o/i*8:0,s=Math.max(r.packetsLost-n.packetsLost,0),u=r.packetsReceived-n.packetsReceived,c=r.fractionLost,l=r.jitter;return new t(n.id,e,a,s,u,c,l)}},{key:"summarize",value:function(e){var t=e.map((function(e){return e.summarize()}));return{bitrate:a(t.map((function(e){return e.bitrate}))),fractionLost:i(t.map((function(e){return e.fractionLost}))),jitter:i(t.map((function(e){return e.jitter})))}}}]),t}(o);e.exports=s},function(e,t,n){"use strict";e.exports=function(e){return(e=e.filter((function(e){return"number"===typeof e}))).length<1?void 0:e.reduce((function(e,t){return t+e}))/e.length}},function(e,t,n){"use strict";e.exports=function e(t,n,r){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),Object.defineProperties(this,{id:{enumerable:!0,value:t},trackId:{enumerable:!0,value:n},bitrate:{enumerable:!0,value:r}})}},function(e,t,n){"use strict";e.exports=function(e){return e.reduce((function(e,t){return"number"===typeof t?t+e:e}),0)}},function(e,t,n){"use strict";var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();var i=n(220),o=n(221),a=n(222),s=function(e){function t(e,n,r,i){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var o=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,n,r));return Object.defineProperties(o,{rtt:{enumerable:!0,value:i}}),o}return function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),r(t,null,[{key:"of",value:function(e,n,r,i){if(n.id!==r.id)throw new Error("RTCStats IDs must match");var o=(r.timestamp-n.timestamp)/1e3,a=r.bytesSent-n.bytesSent,s=o>0?a/o*8:0,u=i&&"number"===typeof i.roundTripTime?i.roundTripTime/1e3:void 0;return new t(n.id,e,s,u)}},{key:"summarize",value:function(e){return{bitrate:a(e.map((function(e){return e.bitrate}
2))),rtt:i(e.map((function(e){return e.rtt})))}}}]),t}(o);e.exports=s},function(e,t,n){"use strict";e.exports=function e(t,n,r){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),Object.defineProperties(this,{id:{enumerable:!0,value:t,writable:!0},trackId:{enumerable:!0,value:n,writable:!0},lastStats:{enumerable:!0,value:r,writable:!0}})}},function(e,t,n){"use strict";var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();var i=function(e){function t(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var e=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return Object.defineProperties(e,{_isEnabled:{value:null,writable:!0},isEnabled:{enumerable:!0,get:function(){return this._isEnabled}}}),e}return function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),r(t,[{key:"disable",value:function(){return this.enable(!1)}},{key:"enable",value:function(e){return e="boolean"!==typeof e||e,this.isEnabled!==e&&(this._isEnabled=e,this.emit("updated")),this}}]),t}(n(18).EventEmitter);e.exports=i},function(e,t,n){"use strict";var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();var i=n(225),o=n(89),a=n(114),s=n(77),u=s.MediaConnectionError,c=s.MediaDTLSTransportFailedError,l=s.SignalingConnectionDisconnectedError,f={connected:["reconnecting","disconnected"],reconnecting:["connected","disconnected"],disconnected:[]},h=function(e){function t(e,n,r,o){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),o=Object.assign({RecordingSignaling:i,Timeout:a},o);var s=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,"connected",f)),u=o.RecordingSignaling,l=new o.Timeout((function(){s._disconnect(s._reconnectingError)}),o.sessionTimeout,!1);return Object.defineProperties(s,{_mediaConnectionIsReconnecting:{writable:!0,value:!1},_options:{value:o},_reconnectingError:{value:null,writable:!0},_sessionTimeout:{value:l},dominantSpeakerSid:{enumerable:!0,value:null,writable:!0},localParticipant:{enumerable:!0,value:e},name:{enumerable:!0,value:r},participants:{enumerable:!0,value:new Map},recording:{enumerable:!0,value:new u},sid:{enumerable:!0,value:n}}),s.on("connectionStateChanged",(function(){"failed"!==s.connectionState||["disconnected","failed"].includes(s.iceConnectionState)||s._disconnect(new c)})),s.on("iceConnectionStateChanged",(function(){return d(s)})),s.on("signalingConnectionStateChanged",(function(){return d(s)})),setTimeout((function(){return d(s)})),s}return function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),r(t,[{key:"_disconnect",value:function(e){return"disconnected"!==this.state&&(this.preempt("disconnected",null,[e]),!0)}},{key:"connectParticipant",value:function(e){var t=this;return"disconnected"!==e.state&&(!this.participants.has(e.sid)&&(this.participants.set(e.sid,e),e.on("stateChanged",(function n(r){"disconnected"===r&&(e.removeListener("stateChanged",n),t.participants.delete(e.sid),t.emit("participantDisconnected",e))}
2)),this.emit("participantConnected",e),!0))}},{key:"disconnect",value:function(){return this._disconnect()}},{key:"setDominantSpeaker",value:function(e){this.dominantSpeakerSid=e,this.emit("dominantSpeakerChanged")}}]),t}(o);function d(e){if("disconnected"!==e.state&&"disconnected"!==e.signalingConnectionState){var t=void 0;"reconnecting"===e.signalingConnectionState?t=e.signalingConnectionState:"failed"===e.iceConnectionState?(e._mediaConnectionIsReconnecting=!0,t="reconnecting"):"new"===e.iceConnectionState||"checking"===e.iceConnectionState?t=e._mediaConnectionIsReconnecting?"reconnecting":"connected":(e._mediaConnectionIsReconnecting=!1,e._reconnectingError=null,e._sessionTimeout.clear(),t="connected"),t!==e.state&&("reconnecting"===t?(e._reconnectingError="reconnecting"===e.signalingConnectionState?new l:new u,e._sessionTimeout.start(),e.preempt(t,null,[e._reconnectingError])):e.preempt(t))}else e._sessionTimeout.clear()}e.exports=h},function(e,t,n){"use strict";var r=n(438),i=n(442);e.exports=function e(t){var n=t.send,o=t.recv,a=t.sendStats,s=void 0===a?null:a,u=t.recvStats,c=void 0===u?null:u;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),Object.defineProperties(this,{send:{value:n,enumerable:!0},recv:{value:o,enumerable:!0},sendStats:{value:s?new r(s):null,enumerable:!0},recvStats:{value:c?new i(c):null,enumerable:!0}})}},function(e,t,n){"use strict";var r=n(439),i=n(440),o=n(441);e.exports=function e(t){var n=t.bandwidth,a=void 0===n?null:n,s=t.fractionLost,u=void 0===s?null:s,c=t.latency,l=void 0===c?null:c;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),Object.defineProperties(this,{bandwidth:{value:a?new r(a):null,enumerable:!0},fractionLost:{value:u?new i(u):null,enumerable:!0},latency:{value:l?new o(l):null,enumerable:!0}})}},function(e,t,n){"use strict";var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();var i=function(e){function t(e,n,r,i){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var o=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this)),a=null;return Object.defineProperties(o,{_error:{value:null,writable:!0},_isEnabled:{value:r,writable:!0},_priority:{value:i,writable:!0},_trackTransceiver:{value:null,writable:!0},_sid:{get:function(){return a}
2,set:function(e){null===a&&(a=e)}},kind:{enumerable:!0,value:n},name:{enumerable:!0,value:e}}),o}return function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),r(t,[{key:"disable",value:function(){return this.enable(!1)}},{key:"enable",value:function(e){return e="boolean"!==typeof e||e,this.isEnabled!==e&&(this._isEnabled=e,this.emit("updated")),this}},{key:"setTrackTransceiver",value:function(e){return e=e||null,this.trackTransceiver!==e&&(this._trackTransceiver=e,this.emit("updated")),this}},{key:"setSid",value:function(e){return null===this.sid&&(this._sid=e,this.emit("updated")),this}},{key:"error",get:function(){return this._error}},{key:"isEnabled",get:function(){return this._isEnabled}},{key:"priority",get:function(){return this._priority}},{key:"sid",get:function(){return this._sid}},{key:"trackTransceiver",get:function(){return this._trackTransceiver}}]),t}(n(18).EventEmitter);e.exports=i},function(e,t){e.exports=WebSocket},function(e,t,n){"use strict";var r=n(135),i=n(35),o=i.DEFAULT_LOG_LEVEL,a=i.DEFAULT_LOGGER_NAME;function s(e,t){t=Object.assign({createLocalTracks:r,loggerName:a,logLevel:o},t);var n={};n.loggerName=t.loggerName,n.logLevel=t.logLevel,delete t.loggerName,delete t.logLevel;var i=t.createLocalTracks;return delete t.createLocalTracks,n[e]=!(Object.keys(t).length>0)||t,i(n).then((function(e){return e[0]}))}e.exports={audio:function(e){return s("audio",e)},video:function(e){return s("video",e)}}},function(e,t,n){e.exports={default:n(465),__esModule:!0}},function(e,t,n){e.exports=!n(60)&&!n(71)((function(){return 7!=Object.defineProperty(n(140)("div"),"a",{get:function(){return 7}}).a}))},function(e,t,n){var r=n(79),i=n(90),o=n(468)(!1),a=n(145)("IE_PROTO");e.exports=function(e,t){var n,s=i(e),u=0,c=[];for(n in s)n!=a&&r(s,n)&&c.push(n);for(;t.length>u;)r(s,n=t[u++])&&(~o(c,n)||c.push(n));return c}},function(e,t,n){e.exports=n(70)},function(e,t,n){var r=n(39).document;e.exports=r&&r.documentElement},function(e,t,n){var r=n(79),i=n(80),o=n(145)("IE_PROTO"),a=Object.prototype;e.exports=Object.getPrototypeOf||function(e){return e=i(e),r(e,o)?e[o]:"function"==typeof e.constructor&&e instanceof e.constructor?e.constructor.prototype:e instanceof Object?a:null}},function(e,t){e.exports=function(e,t){return{value:t,done:!!e}}},function(e,t,n){var r=n(59);e.exports=function(e,t,n,i){try{return i?t(r(n)[0],n[1]):t(n)}catch(a){var o=e.return;throw void 0!==o&&r(o.call(e)),a}}},function(e,t,n){var r=n(91),i=n(42)("iterator"),o=Array.prototype;e.exports=function(e){return void 0!==e&&(r.Array===e||o[i]===e)}},function(e,t,n){var r=n(59),i=n(78),o=n(42)("species");e.exports=function(e,t){var n,a=r(e).constructor;return void 0===a||void 0==(n=r(a)[o])?t:i(n)}},function(e,t,n){var r,i,o,a=n(65),s=n(243),u=n(236),c=n(140),l=n(39),f=l.process,h=l.setImmediate,d=l.clearImmediate,p=l.MessageChannel,v=l.Dispatch,y=0,m={},g="onreadystatechange",b=function(){var e=+this;if(m.hasOwnProperty(e)){var t=m[e];delete m[e],t()}},_=function(e){b.call(e.data)};h&&d||(h=function(e){for(var t=[],n=1;arguments.length>n;)t.push(arguments[n++]);return m[++y]=function(){s("function"==typeof e?e:Function(e),t)},r(y),y},d=function(e){delete m[e]},"process"==n(102)(f)?r=function(e){f.nextTick(a(b,e,1))}:v&&v.now?r=function(e){v.now(a(b,e,1))}:p?(o=(i=new p).port2,i.port1.onmessage=_,r=a(o.postMessage,o,1)):l.addEventListener&&"function"==typeof postMessage&&!l.importScripts?(r=function(e){l.postMessage(e+"","*")},l.addEventListener("message",_,!1)):r=g in c("script")?function(e){u.appendChild(c("script")).onreadystatechange=function(){u.removeChild(this),b.call(e)}}:function(e){setTimeout(a(b,e,1),0)}),e.exports={set:h,clear:d}},function(e,t){e.exports=function(e,t,n){var r=void 0===n;switch(t.length){case 0:return r?e():e.call(n);case 1:return r?e(t[0]):e.call(n,t[0]);case 2:return r?e(t[0],t[1]):e.call(n,t[0],t[1]);case 3:return r?e(t[0],t[1],t[2]):e.call(n,t[0],t[1],t[2]);case 4:return r?e(t[0],t[1],t[2],t[3]):e.call(n,t[0],t[1],t[2],t[3])}return e.apply(n,t)}},function(e,t){e.exports=function(e){try{return{e:!1,v:e()}}catch(t){return{e:!0,v:t}}}},function(e,t,n){var r=n(59),i=n(45),o=n(152);e.exports=function(e,t){if(r(e),i(t)&&t.constructor===e)return t;var n=o.f(e);return(0,n.resolve)(t),n.promise}},function(e,t,n){"use strict";var r=n(39),i=n(25),o=n(58),a=n(60),s=n(42)("species");e.exports=function(e){var t="function"==typeof i[e]?i[e]:r[e];a&&t&&!t[s]&&o.f(t,s,{configurable:!0,get:function(){return this}})}},function(e,t,n){var r=n(42)("iterator"),i=!1;try{var o=[7][r]();o.return=function(){i=!0},Array.from(o,(function(){throw 2}))}catch(a){}e.exports=function(e,t){if(!t&&!i)return!1;var n=!1;try{var o=[7],s=o[r]();s.next=function(){return{done:n=!0}},o[r]=function(){return s},e(o)}catch(a){}return n}},function(e,t,n){var r=n(36),i=n(25),o=n(71);e.exports=function(e,t){var n=(i.Object||{})[e]||Object[e],a={};a[e]=t(n),r(r.S+r.F*o((function(){n(1)})),"Object",a)}},function(e,t,n){"use strict";t.__esModule=!0;var r=a(n(486)),i=a(n(488)),o="function"===typeof i.default&&"symbol"===typeof r.default?function(e){return typeof e}:function(e){return e&&"function"===typeof i.default&&e.constructor===i.default&&e!==i.default.prototype?"symbol":typeof e};
2function a(e){return e&&e.__esModule?e:{default:e}}t.default="function"===typeof i.default&&"symbol"===o(r.default)?function(e){return"undefined"===typeof e?"undefined":o(e)}:function(e){return e&&"function"===typeof i.default&&e.constructor===i.default&&e!==i.default.prototype?"symbol":"undefined"===typeof e?"undefined":o(e)}},function(e,t,n){var r=n(102);e.exports=Array.isArray||function(e){return"Array"==r(e)}},function(e,t,n){var r=n(234),i=n(147).concat("length","prototype");t.f=Object.getOwnPropertyNames||function(e){return r(e,i)}},function(e,t,n){var r=n(118),i=n(100),o=n(90),a=n(141),s=n(79),u=n(233),c=Object.getOwnPropertyDescriptor;t.f=n(60)?c:function(e,t){if(e=o(e),t=a(t,!0),u)try{return c(e,t)}catch(n){}if(s(e,t))return i(!r.f.call(e,t),e[t])}},function(e,t,n){e.exports={default:n(495),__esModule:!0}},function(e,t,n){e.exports={default:n(498),__esModule:!0}},function(e,t,n){"use strict";var r=h(n(82)),i=h(n(38)),o=h(n(40)),a=h(n(49)),s=h(n(62)),u=h(n(23)),c=h(n(24)),l=h(n(63)),f=h(n(64));function h(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var d=n(18),p=n(53),v=n(54),y=p.Logger.scope("User"),m=function(e){function t(e,n,r){(0,u.default)(this,t);var i=(0,l.default)(this,(t.__proto__||(0,s.default)(t)).call(this));return i.subscribed="initializing",i.setMaxListeners(0),i.services=r,i.state={identity:e,entityName:n,friendlyName:null,attributes:{},online:null,notifiable:null},i}return(0,f.default)(t,e),(0,c.default)(t,[{key:"_update",value:function(e,t){var n=[];switch(y.debug("User for",this.state.identity,"updated:",e,t),e){case"friendlyName":this.state.friendlyName!==t.value&&(n.push("friendlyName"),this.state.friendlyName=t.value);break;case"attributes":var r=v.parseAttributes(t.value,"Retrieved malformed attributes from the server for user: "+this.state.identity,y);v.isDeepEqual(this.state.attributes,r)||(this.state.attributes=r,n.push("attributes"));break;case"reachability":this.state.online!==t.online&&(this.state.online=t.online,n.push("online")),this.state.notifiable!==t.notifiable&&(this.state.notifiable=t.notifiable,n.push("notifiable"));break;default:return}n.length>0&&this.emit("updated",{user:this,updateReasons:n})}},{key:"_updateReachabilityInfo",value:function(e,t){var n=this;return this.services.session.reachabilityEnabled?e.get("reachability").then(t).catch((function(e){y.warn("Failed to get reachability info for ",n.state.identity,e)})):a.default.resolve()}},{key:"_fetch",value:function(){var e=(0,o.default)(i.default.mark((function e(){var t=this;return i.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.state.entityName){e.next=2;break}return e.abrupt("return",this);case 2:return this.promiseToFetch=this.services.syncClient.map({id:this.state.entityName,mode:"open_existing",includeItems:!0}).then((function(e){return t.entity=e,e.on("itemUpdated",(function(e){return y.debug(t.state.entityName+" ("+t.state.identity+") itemUpdated: "+e.item.key),t._update(e.item.key,e.item.value)})),a.default.all([e.get("friendlyName").then((function(e){return t._update(e.key,e.value)})),e.get("attributes").then((function(e){return t._update(e.key,e.value)})),t._updateReachabilityInfo(e,(function(e){return t._update(e.key,e.value)}))])})).then((function(){return y.debug("Fetched for",t.identity),t.subscribed="subscribed",t.emit("userSubscribed",t),t})).catch((function(e){throw t.promiseToFetch=null,e})),e.abrupt("return",this.promiseToFetch);case 4:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"_ensureFetched",value:function(){return this.promiseToFetch||this._fetch()}},{key:"updateAttributes",value:function(){var e=(0,o.default)(i.default.mark((function e(t){return i.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if("undefined"!==typeof t){e.next=2;break}throw new Error("Attributes is required parameter");case 2:if("unsubscribed"!=this.subscribed){e.next=4;break}throw new Error("Can't modify unsubscribed object");case 4:return e.next=6,this.services.session.addCommand("editUserAttributes",{username:this.state.identity,attributes:(0,r.default)(t)});case 6:return e.abrupt("return",this);case 7:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"updateFriendlyName",value:function(){var e=(0,o.default)(i.default.mark((function e(t){return i.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!t||"string"===typeof t){e.next=2;break}throw new Error("friendlyName must be string or empty");case 2:if("unsubscribed"!=this.subscribed){e.next=4;break}throw new Error("Can't modify unsubscribed object");case 4:return e.next=6,this.services.session.addCommand("editUserFriendlyName",{username:this.state.identity,friendlyName:t});case 6:return e.abrupt("return",this);case 7:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"unsubscribe",value:function(){var e=(0,o.default)(i.default.mark((function e(){return i.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!this.promiseToFetch){e.next=7;break}return e.next=3,this.promiseToFetch;case 3:this.entity.close(),this.promiseToFetch=null,this.subscribed="unsubscribed",this.emit
2("userUnsubscribed",this);case 7:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"identity",get:function(){return this.state.identity},set:function(e){this.state.identity=e}},{key:"entityName",set:function(e){this.state.entityName=e}},{key:"attributes",get:function(){return this.state.attributes}},{key:"friendlyName",get:function(){return this.state.friendlyName}},{key:"online",get:function(){return this.state.online}},{key:"notifiable",get:function(){return this.state.notifiable}},{key:"isSubscribed",get:function(){return"subscribed"==this.subscribed}}]),t}(d.EventEmitter);t.User=m},function(e,t,n){"use strict";function r(e){return e.replace(/~1/g,"/").replace(/~0/g,"~")}function i(e){return e.replace(/~/g,"~0").replace(/\//g,"~1")}Object.defineProperty(t,"__esModule",{value:!0}),t.Pointer=void 0;var o=function(){function e(e){void 0===e&&(e=[""]),this.tokens=e}return e.fromJSON=function(t){var n=t.split("/").map(r);if(""!==n[0])throw new Error("Invalid JSON Pointer: "+t);return new e(n)},e.prototype.toString=function(){return this.tokens.map(i).join("/")},e.prototype.evaluate=function(e){for(var t=null,n="",r=e,i=1,o=this.tokens.length;i<o;i++)r=((t=r)||{})[n=this.tokens[i]];return{parent:t,key:n,value:r}},e.prototype.get=function(e){return this.evaluate(e).value},e.prototype.set=function(e,t){for(var n=e,r=1,i=this.tokens.length-1,o=this.tokens[r];r<i;r++)n=(n||{})[o];n&&(n[this.tokens[this.tokens.length-1]]=t)},e.prototype.push=function(e){this.tokens.push(e)},e.prototype.add=function(t){return new e(this.tokens.concat(String(t)))},e}();t.Pointer=o},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.compare=void 0;var r=n(158);function i(e,t){if(e===t)return!0;var n=r.objectType(e),o=r.objectType(t);return"array"==n&&"array"==o?function(e,t){var n=e.length;if(n!==t.length)return!1;for(var r=0;r<n;r++)if(!i(e[r],t[r]))return!1;return!0}(e,t):"object"==n&&"object"==o&&function(e,t){var n=Object.keys(e),o=Object.keys(t),a=n.length;if(a!==o.length)return!1;for(var s=0;s<a;s++){var u=n[s];if(!r.hasOwnProperty.call(t,u)||!i(e[u],t[u]))return!1}return!0}(e,t)}t.compare=i},function(e,t,n){"use strict";var r=o(n(23)),i=o(n(24));function o(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var a=n(53),s=n(54),u=a.Logger.scope("ChannelDescriptor"),c=function(){function e(t,n){(0,r.default)(this,e),this.client=t,this.descriptor=n,n.sid?(this.sid=n.sid,this.channel=n.sid+".channel"):(this.sid=n.channel_sid,this.channel=n.channel_sid+".channel"),this.uniqueName=n.unique_name,this.friendlyName=n.friendly_name,this.attributes=s.parseAttributes(n.attributes,"Failed to parse channel attributes",u),this.createdBy=n.created_by,this.dateCreated=s.parseTime(n.date_created),this.dateUpdated=s.parseTime(n.date_updated),this.messagesCount=n.messages_count,this.membersCount=n.members_count,this.type=n.type,this.isPrivate="private"==n.type,this.lastConsumedMessageIndex=n.last_consumed_message_index,n.notification_level&&(this.notificationLevel=n.notification_level),n.status?this.status=n.status:this.status="unknown"}return(0,i.default)(e,[{key:"getChannel",value:function(){return this.client.getChannelBySid(this.sid)}}]),e}();t.ChannelDescriptor=c},function(e,t,n){"use strict";var r=n(58).f,i=n(104),o=n(153),a=n(65),s=n(150),u=n(106),c=n(149),l=n(238),f=n(246),h=n(60),d=n(155).fastKey,p=n(160),v=h?"_s":"size",y=function(e,t){var n,r=d(t);if("F"!==r)return e._i[r];for(n=e._f;n;n=n.n)if(n.k==t)return n};e.exports={getConstructor:function(e,t,n,c){var l=e((function(e,r){s(e,l,t,"_i"),e._t=t,e._i=i(null),e._f=void 0,e._l=void 0,e[v]=0,void 0!=r&&u(r,n,e[c],e)}));return o(l.prototype,{clear:function(){for(var e=p(this,t),n=e._i,r=e._f;r;r=r.n)r.r=!0,r.p&&(r.p=r.p.n=void 0),delete n[r.i];e._f=e._l=void 0,e[v]=0},delete:function(e){var n=p(this,t),r=y(n,e);if(r){var i=r.n,o=r.p;delete n._i[r.i],r.r=!0,o&&(o.n=i),i&&(i.p=o),n._f==r&&(n._f=i),n._l==r&&(n._l=o),n[v]--}return!!r},forEach:function(e){p(this,t);for(var n,r=a(e,arguments.length>1?arguments[1]:void 0,3);n=n?n.n:this._f;)for(r(n.v,n.k,this);n&&n.r;)n=n.p},has:function(e){return!!y(p(this,t),e)}}),h&&r(l.prototype,"size",{get:function(){return p(this,t)[v]}}),l},def:function(e,t,n){var r,i,o=y(e,t);return o?o.v=n:(e._l=o={i:i=d(t,!0),k:t,v:n,p:r=e._l,n:void 0,r:!1},e._f||(e._f=o),r&&(r.n=o),e[v]++,"F"!==i&&(e._i[i]=o)),e},getEntry:y,setStrong:function(e,t,n){c(e,t,(function(e,n){this._t=p(e,t),this._k=n,this._l=void 0}),(function(){for(var e=this,t=e._k,n=e._l;n&&n.r;)n=n.p;return e._t&&(e._l=n=n?n.n:e._t._f)?l(0,"keys"==t?n.k:"values"==t?n.v:[n.k,n.v]):(e._t=void 0,l(1))}),n?"entries":"values",!n,!0),f(t)}}},function(e,t,n){"use strict";var r=n(39),i=n(36),o=n(155),a=n(71),s=n(70),u=n(153),c=n(106),l=n(150),f=n(45),h=n(105),d=n(58).f,p=n(518)(0),v=n(60);e.exports=function(e,t,n,y,m,g){var b=r[e],_=b,w=m?"set":"add",k=_&&_.prototype,S={};
2return v&&"function"==typeof _&&(g||k.forEach&&!a((function(){(new _).entries().next()})))?(_=t((function(t,n){l(t,_,e,"_c"),t._c=new b,void 0!=n&&c(n,m,t[w],t)})),p("add,clear,delete,forEach,get,has,set,keys,values,entries,toJSON".split(","),(function(e){var t="add"==e||"set"==e;!(e in k)||g&&"clear"==e||s(_.prototype,e,(function(n,r){if(l(this,_,e),!t&&g&&!f(n))return"get"==e&&void 0;var i=this._c[e](0===n?0:n,r);return t?this:i}))})),g||d(_.prototype,"size",{get:function(){return this._c.size}})):(_=y.getConstructor(t,e,m,w),u(_.prototype,n),o.NEED=!0),h(_,e),S[e]=_,i(i.G+i.W+i.F,S),g||y.setStrong(_,e,m),_}},function(e,t,n){var r=n(120),i=n(522);e.exports=function(e){return function(){if(r(this)!=e)throw TypeError(e+"#toJSON isn't generic");return i(this)}}},function(e,t,n){"use strict";var r=n(36);e.exports=function(e){r(r.S,e,{of:function(){for(var e=arguments.length,t=new Array(e);e--;)t[e]=arguments[e];return new this(t)}})}},function(e,t,n){"use strict";var r=n(36),i=n(78),o=n(65),a=n(106);e.exports=function(e){r(r.S,e,{from:function(e){var t,n,r,s,u=arguments[1];return i(this),(t=void 0!==u)&&i(u),void 0==e?new this:(n=[],t?(r=0,s=o(u,arguments[2],2),a(e,!1,(function(e){n.push(s(e,r++))}))):a(e,!1,n.push,n),new this(n))}})}},function(e,t){e.exports=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}},function(e,t,n){"use strict";var r,i=n(23),o=(r=i)&&r.__esModule?r:{default:r};Object.defineProperty(t,"__esModule",{value:!0});var a=function e(){(0,o.default)(this,e)};t.NotificationTypes=a,a.TYPING_INDICATOR="twilio.ipmsg.typing_indicator",a.NEW_MESSAGE="twilio.channel.new_message",a.ADDED_TO_CHANNEL="twilio.channel.added_to_channel",a.INVITED_TO_CHANNEL="twilio.channel.invited_to_channel",a.REMOVED_FROM_CHANNEL="twilio.channel.removed_from_channel",a.CONSUMPTION_UPDATE="twilio.channel.consumption_update"},function(e,t){var n="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof window.msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto);if(n){var r=new Uint8Array(16);e.exports=function(){return n(r),r}}else{var i=new Array(16);e.exports=function(){for(var e,t=0;t<16;t++)0===(3&t)&&(e=4294967296*Math.random()),i[t]=e>>>((3&t)<<3)&255;return i}}},function(e,t){for(var n=[],r=0;r<256;++r)n[r]=(r+256).toString(16).substr(1);e.exports=function(e,t){var r=t||0,i=n;return[i[e[r++]],i[e[r++]],i[e[r++]],i[e[r++]],"-",i[e[r++]],i[e[r++]],"-",i[e[r++]],i[e[r++]],"-",i[e[r++]],i[e[r++]],"-",i[e[r++]],i[e[r++]],i[e[r++]],i[e[r++]],i[e[r++]],i[e[r++]]].join("")}},function(e,t,n){"use strict";var r=n(20),i=n(21),o=n(9);Object.defineProperty(t,"__esModule",{value:!0}),t.TelemetryEvent=t.Telemetry=void 0;var a=n(84);t.TelemetryEvent=function e(t,n,r,i,a,s){o(this,e),this.start=t,this.end=n,this.title=r,this.details=i,this.id=a,this.type=s};var s=function(e){r(n,e);var t=i(n);function n(e){var r;return o(this,n),(r=t.call(this)).method="telemetry.v1",r.events=e,r}return n}(a.AbstractMessage);t.Telemetry=s},function(e,t,n){"use strict";var r=n(9),i=n(17);Object.defineProperty(t,"__esModule",{value:!0}),t.Parser=void 0;var o=n(73);function a(e){return encodeURIComponent(e).replace(/%([0-9A-F]{2})/g,(function(e,t){return String.fromCharCode("0x"+t)})).length}function s(e){var t=encodeURIComponent(e).replace(/%([0-9A-F]{2})/g,(function(e,t){return String.fromCharCode("0x"+t)})),n=new Uint8Array(t.length);return Array.prototype.forEach.call(t,(function(e,t){n[t]=e.charCodeAt(0)})),n}function u(e){var t=Array.prototype.map.call(e,(function(e){return String.fromCharCode(e)})).join("").replace(/(.)/g,(function(e,t){var n=t.charCodeAt(0).toString(16).toUpperCase();return n.length<2&&(n="0"+n),"%"+n}));return decodeURIComponent(t)}function c(e){return JSON.parse(u(e))}var l=function(){function e(){r(this,e)}return i(e,null,[{key:"parse",value:function(e){var t=new Uint8Array(e),n=function(e){for(var t="",n=0;n<e.length;++n){var r=String.fromCharCode(e[n]);if(t+=r,"\r"===r){n+=2;break}}var i=t.split(" ");return{size:n,protocol:i[0],version:i[1],headerSize:Number(i[2])}}(t);if("TWILSOCK"===n.protocol&&"V3.0"===n.version){var r=null;try{r=c(t.subarray(n.size,n.size+n.headerSize))}catch(l){return void o.log.error("failed to parse message header",l,e)}o.log.debug("message received: ",r.method),o.log.trace("message received: ",r);var i=null;if(r.payload_size>0){var a=2+n.size+n.headerSize,s=r.payload_size;if(r.hasOwnProperty("payload_type")&&0!==r.payload_type.indexOf("application/json"))0===r.payload_type.indexOf("text/plain")&&(i=u(t.subarray(a,a+s)));else try{i=c(t.subarray(a,a+s))}catch(l){return void o.log.error("failed to parse message body",l,e)}}return{method:r.method,header:r,payload:i}}o.log.error("unsupported protocol: ".concat(n.protocol," ver ").concat(n.version))}},{key:"createPacket",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";e.payload_size=a(t);var n=JSON.stringify(e)+"\r\n",r="TWILSOCK V3.0 "+(a(n)-2)+"\r\n";o.log.debug("send request:",r+n+t);var i=s(r+n+t);return i.buffer}}]),e}();t.Parser=l},function(e,t,n){"use strict";var r=n(9),i=n(20),o=n(21);
2Object.defineProperty(t,"__esModule",{value:!0}),t.TwilsockReplyError=void 0;var a=function(e){i(n,e);var t=o(n);function n(e,i){var o;return r(this,n),(o=t.call(this,e)).reply=i,o}return n}(n(67).TwilsockError);t.TwilsockReplyError=a},function(e,t,n){"use strict";var r=n(9),i=n(20),o=n(21);Object.defineProperty(t,"__esModule",{value:!0}),t.TransportUnavailableError=void 0;var a=function(e){i(n,e);var t=o(n);function n(e){return r(this,n),t.call(this,e)}return n}(n(67).TwilsockError);t.TransportUnavailableError=a},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Notifications=void 0;var r=n(558);Object.defineProperty(t,"Notifications",{enumerable:!0,get:function(){return r.Client}})},function(e,t,n){"use strict";var r=n(167),i=n(6),o=n(27),a=n(20),s=n(21),u=n(565),c=n(9),l=n(17);Object.defineProperty(t,"__esModule",{value:!0}),t.Connector=t.RegistrationState=void 0;var f=n(18),h=n(166),d=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:new Set;c(this,e),this.token=t,this.notificationId=n,this.messageTypes=r}return l(e,[{key:"clone",value:function(){return new e(this.token,this.notificationId,new Set(this.messageTypes))}}]),e}();function p(e,t){var n=new Set;return e.notificationId!==t.notificationId&&n.add("notificationId"),e.token!==t.token&&n.add("token"),function(e,t){return[].concat(u(u(e).filter((function(e){return!t.has(e)}))),u(u(t).filter((function(t){return!e.has(t)}))))}(e.messageTypes,t.messageTypes).length>0&&n.add("messageType"),[n.size>0,n]}t.RegistrationState=d;var v=function(e){a(n,e);var t=s(n);function n(e){var r;return c(this,n),(r=t.call(this)).config=e,r.desiredState=new d,r.currentState=new d,r.hasActiveAttempt=!1,r}return l(n,[{key:"subscribe",value:function(){var e=o(i.mark((function e(t){return i.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!this.desiredState.messageTypes.has(t)){e.next=3;break}return h.log.debug("message type already registered ",t),e.abrupt("return");case 3:return this.desiredState.messageTypes.add(t),e.next=6,this.persistRegistration();case 6:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"unsubscribe",value:function(){var e=o(i.mark((function e(t){return i.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.desiredState.messageTypes.has(t)){e.next=2;break}return e.abrupt("return");case 2:return this.desiredState.messageTypes.delete(t),e.next=5,this.persistRegistration();case 5:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"updateToken",value:function(e){this.desiredState.token=e,this.persistRegistration()}},{key:"persistRegistration",value:function(){var e=o(i.mark((function e(){var t,n,o,a,s,u,c=this;return i.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.config.token&&0!==this.config.token.length){e.next=3;break}return h.log.trace("Can't persist registration: token is not set"),e.abrupt("return");case 3:if(!this.hasActiveAttempt){e.next=6;break}return h.log.trace("One registration attempt is already in progress"),e.abrupt("return");case 6:if(t=p(this.desiredState,this.currentState),n=r(t,2),o=n[0],a=n[1],o){e.next=9;break}return e.abrupt("return");case 9:if(this.currentState.notificationId||a.delete("notificationId"),h.log.trace("Persisting registration",a,this.desiredState),e.prev=11,this.hasActiveAttempt=!0,!((s=this.desiredState.clone()).messageTypes.size>0)){e.next=24;break}return e.next=17,this.updateRegistration(s,a);case 17:u=e.sent,this.currentState.token=u.token,this.currentState.notificationId=u.notificationId,this.currentState.messageTypes=u.messageTypes,this.emit("stateChanged","registered"),e.next=30;break;case 24:return e.next=26,this.removeRegistration();case 26:this.currentState.token=s.token,this.currentState.notificationId=s.notificationId,this.currentState.messageTypes.clear(),this.emit("stateChanged","unregistered");case 30:return e.prev=30,this.hasActiveAttempt=!1,setTimeout((function(){return c.persistRegistration()}),0),e.finish(30);case 34:case"end":return e.stop()}}),e,this,[[11,,30,34]])})));return function(){return e.apply(this,arguments)}}()},{key:"setNotificationId",value:function(e){this.desiredState.notificationId=e,this.persistRegistration()}}]),n}(f.EventEmitter);t.Connector=v},function(e,t){e.exports=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}},function(e,t){var n="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof window.msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto);
2if(n){var r=new Uint8Array(16);e.exports=function(){return n(r),r}}else{var i=new Array(16);e.exports=function(){for(var e,t=0;t<16;t++)0===(3&t)&&(e=4294967296*Math.random()),i[t]=e>>>((3&t)<<3)&255;return i}}},function(e,t){for(var n=[],r=0;r<256;++r)n[r]=(r+256).toString(16).substr(1);e.exports=function(e,t){var r=t||0,i=n;return[i[e[r++]],i[e[r++]],i[e[r++]],i[e[r++]],"-",i[e[r++]],i[e[r++]],"-",i[e[r++]],i[e[r++]],"-",i[e[r++]],i[e[r++]],"-",i[e[r++]],i[e[r++]],i[e[r++]],i[e[r++]],i[e[r++]],i[e[r++]]].join("")}},function(e,t,n){var r=n(579),i=n(580),o=i;o.v1=r,o.v4=i,e.exports=o},function(e,t){var n="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof window.msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto);if(n){var r=new Uint8Array(16);e.exports=function(){return n(r),r}}else{var i=new Array(16);e.exports=function(){for(var e,t=0;t<16;t++)0===(3&t)&&(e=4294967296*Math.random()),i[t]=e>>>((3&t)<<3)&255;return i}}},function(e,t){for(var n=[],r=0;r<256;++r)n[r]=(r+256).toString(16).substr(1);e.exports=function(e,t){var r=t||0,i=n;return[i[e[r++]],i[e[r++]],i[e[r++]],i[e[r++]],"-",i[e[r++]],i[e[r++]],"-",i[e[r++]],i[e[r++]],"-",i[e[r++]],i[e[r++]],"-",i[e[r++]],i[e[r++]],i[e[r++]],i[e[r++]],i[e[r++]],i[e[r++]]].join("")}},function(e,t,n){"use strict";var r=n(83),i=n(94),o=n(66),a=n(6),s=n(27),u=n(9),c=n(17),l=n(20),f=n(21);Object.defineProperty(t,"__esModule",{value:!0}),t.SyncDocumentImpl=t.SyncDocument=void 0;var h=n(74),d=n(108),p=n(75),v=n(109),y=n(169),m=n(110),g=function(e){l(n,e);var t=f(n);function n(e,r,i){var o;u(this,n),(o=t.call(this,e,i)).isDeleted=!1;return o.updateMergingQueue=new y.MergingQueue((function(e,t){return"number"===typeof t.ttl?{ttl:t.ttl}:e})),o.descriptor=r,o.descriptor.data=o.descriptor.data||{},o.descriptor.date_updated=new Date(o.descriptor.date_updated),o}return c(n,[{key:"_update",value:function(e){switch(e.date_created=new Date(e.date_created),e.type){case"document_updated":e.id>this.lastEventId?(this.descriptor.last_event_id=e.id,this.descriptor.revision=e.document_revision,this.descriptor.date_updated=e.date_created,this.descriptor.data=e.document_data,this.broadcastEventToListeners("updated",{value:e.document_data,isLocal:!1}),this.services.storage.update(this.type,this.sid,this.uniqueName,{last_event_id:e.id,revision:e.document_revision,date_updated:e.date_created,data:e.document_data})):p.default.trace("Document update skipped, current:",this.lastEventId,", remote:",e.id);break;case"document_removed":this.onRemoved(!1)}}},{key:"set",value:function(){var e=s(a.mark((function e(t,n){var r,i=this;return a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=n||{},d.validateOptionalTtl(r.ttl),e.abrupt("return",this.updateMergingQueue.squashAndAdd(r,(function(e){return i._setUnconditionally(t,e.ttl)})));case 3:case"end":return e.stop()}}),e,this)})));return function(t,n){return e.apply(this,arguments)}}()},{key:"mutate",value:function(){var e=s(a.mark((function e(t,n){var r,i=this;return a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=n||{},d.validateOptionalTtl(r.ttl),e.abrupt("return",this.updateMergingQueue.add(r,(function(e){return i._setWithIfMatch(t,e.ttl)})));case 3:case"end":return e.stop()}}),e,this)})));return function(t,n){return e.apply(this,arguments)}}()},{key:"update",value:function(){var e=s(a.mark((function e(t,n){return a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",this.mutate((function(e){return Object.assign(e,t)}),n));case 1:case"end":return e.stop()}}),e,this)})));return function(t,n){return e.apply(this,arguments)}}()},{key:"setTtl",value:function(){var e=s(a.mark((function e(t){var n;return a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return d.validateMandatoryTtl(t),e.next=3,this._postUpdateToServer({ttl:t});case 3:n=e.sent,this.descriptor.date_expires=n.date_expires;case 5:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"_setUnconditionally",value:function(){var e=s(a.mark((function e(t,n){var r;return a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this._postUpdateToServer({data:t,revision:void 0,ttl:n});case 2:return r=e.sent,this._handleSuccessfulUpdateResult(r),e.abrupt("return",this.value);case 5:case"end":return e.stop()}}),e,this)})));return function(t,n){return e.apply(this,arguments)}}()},{key:"_setWithIfMatch",value:function(){var e=s(a.mark((function e(t,n){var r,i,o;return a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!(r=t(d.deepClone(this.value)))){e.next=22;break}return i=this.revision,e.prev=3,e.next=6,this._postUpdateToServer({data:r,revision:i,ttl:n});case 6:return o=e.sent,this._handleSuccessfulUpdateResult(o),e.abrupt("return",this.value);case 11:if(e.prev=11,e.t0=e.catch(3),412!==e.t0.status){e.next=19;break}return e.next=16,this._softSync();case 16:return e.abrupt("return",this._setWithIfMatch(t));case 19:throw e.t0;case 20:e.next=23;break;case 22:return e.abrupt("return",this.value);case 23:case"end":return e.stop()}}),e,this,[[3,11]])})));return function(t,n){return e.apply(this,arguments)}}()},{key:"_handleSuccessfulUpdateResult",value:function(e){e.last_event_id>this.descriptor.last_event_id&&(this.descriptor.revision=e.revision,this.descriptor.data=e.data,this.descriptor.last_event_id=e.last_event_id,this.descriptor.date_expires=e.date_expires,this.descriptor.date_updated=new Date(e.date_updated),this.services.storage.update(this.t
2ype,this.sid,this.uniqueName,{last_event_id:e.last_event_id,revision:e.revision,date_updated:e.date_updated,data:e.data}),this.broadcastEventToListeners("updated",{value:this.value,isLocal:!0}))}},{key:"_postUpdateToServer",value:function(){var e=s(a.mark((function e(t){var n,r,i;return a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.isDeleted){e.next=17;break}return n={data:t.data},void 0!==t.ttl&&(n.ttl=t.ttl),r=t.revision,e.prev=4,e.next=7,this.services.network.post(this.uri,n,r);case 7:return i=e.sent,e.abrupt("return",{revision:i.body.revision,data:t.data,last_event_id:i.body.last_event_id,date_updated:i.body.date_updated,date_expires:i.body.date_expires});case 11:throw e.prev=11,e.t0=e.catch(4),404===e.t0.status&&this.onRemoved(!1),e.t0;case 15:e.next=18;break;case 17:return e.abrupt("return",Promise.reject(new h.SyncError("The Document has been removed",404,54100)));case 18:case"end":return e.stop()}}),e,this,[[4,11]])})));return function(t){return e.apply(this,arguments)}}()},{key:"_softSync",value:function(){var e=s(a.mark((function e(){var t=this;return a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",this.services.network.get(this.uri).then((function(e){var n={type:"document_updated",id:e.body.last_event_id,document_revision:e.body.revision,document_data:e.body.data,date_created:e.body.date_updated};return t._update(n),t})).catch((function(e){404===e.status?t.onRemoved(!1):p.default.error("Can't get updates for ".concat(t.sid,":"),e)})));case 1:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"onRemoved",value:function(e){this.isDeleted||(this.isDeleted=!0,this._unsubscribe(),this.removalHandler(this.type,this.sid,this.uniqueName),this.broadcastEventToListeners("removed",{isLocal:e}))}},{key:"removeDocument",value:function(){var e=s(a.mark((function e(){return a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.isDeleted){e.next=6;break}return e.next=3,this.services.network.delete(this.uri);case 3:this.onRemoved(!0),e.next=7;break;case 6:return e.abrupt("return",Promise.reject(new h.SyncError("The Document has been removed",404,54100)));case 7:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"uri",get:function(){return this.descriptor.url}},{key:"revision",get:function(){return this.descriptor.revision}},{key:"lastEventId",get:function(){return this.descriptor.last_event_id}},{key:"dateExpires",get:function(){return this.descriptor.date_expires}},{key:"type",get:function(){return"document"}},{key:"indexName",get:function(){}},{key:"queryString",get:function(){}},{key:"sid",get:function(){return this.descriptor.sid}},{key:"value",get:function(){return this.descriptor.data}},{key:"dateUpdated",get:function(){return this.descriptor.date_updated}},{key:"uniqueName",get:function(){return this.descriptor.unique_name||null}}],[{key:"type",get:function(){return"document"}}]),n}(v.SyncEntity);t.SyncDocumentImpl=g;var b=function(e){l(n,e);var t=f(n);function n(e){var i;return u(this,n),(i=t.call(this)).syncDocumentImpl=e,i.syncDocumentImpl.attach(r(i)),i}return c(n,[{key:"set",value:function(){var e=s(a.mark((function e(t,n){return a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this.ensureNotClosed(),e.abrupt("return",this.syncDocumentImpl.set(t,n));case 2:case"end":return e.stop()}}),e,this)})));return function(t,n){return e.apply(this,arguments)}}()},{key:"mutate",value:function(){var e=s(a.mark((function e(t,n){return a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this.ensureNotClosed(),e.abrupt("return",this.syncDocumentImpl.mutate(t,n));case 2:case"end":return e.stop()}}),e,this)})));return function(t,n){return e.apply(this,arguments)}}()},{key:"update",value:function(){var e=s(a.mark((function e(t,n){return a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this.ensureNotClosed(),e.abrupt("return",this.syncDocumentImpl.update(t,n));case 2:case"end":return e.stop()}}),e,this)})));return function(t,n){return e.apply(this,arguments)}}()},{key:"setTtl",value:function(){var e=s(a.mark((function e(t){return a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this.ensureNotClosed(),e.abrupt("return",this.syncDocumentImpl.setTtl(t));case 2:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"removeDocument",value:function(){var e=s(a.mark((function e(){return a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this.ensureNotClosed(),e.abrupt("return",this.syncDocumentImpl.removeDocument());case 2:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"close",value:function(){i(o(n.prototype),"close",this).call(this),this.syncDocumentImpl.detach(this.listenerUuid)}},{key:"uri",get:function(){return this.syncDocumentImpl.uri}},{key:"revision",get:function(){return this.syncDocumentImpl.revision}},{key:"lastEventId",get:function(){return this.syncDocumentImpl.lastEventId}},{key:"dateExpires",get:function(){return this.syncDocumentImpl.dateExpires}},{key:"type",get:function(){return g.type}},{key:"sid",get:function(){return this.syncDocumentImpl.sid}},{key:"value",get:function(){return this.syncDocumentImpl.value}},{key:"dateUpdated",get:function(){return this.syncDocumentImpl.dateUpdated}},{key:"uniqueName",get:function(){return this.syncDocumentImpl.uniqueName}}],[{key:"type",get:function(){return g.type}}]),n}(m.default);t.SyncDocument=b,t.default=b},function(e,t,n){"use strict";var r=n(83),i=n(94),o=n(66),a=n(6),s=n(27),u=n(9),c=n(17),l=n(20),f=n(21);
2Object.defineProperty(t,"__esModule",{value:!0}),t.SyncListImpl=t.SyncList=void 0;var h=n(108),d=n(122),p=n(74),v=n(75),y=n(109),m=n(282),g=n(283),b=n(170),_=n(169),w=n(110),k=function(e){l(n,e);var t=f(n);function n(e,r,i){var o;u(this,n);return(o=t.call(this,e,i)).updateMergingQueue=new _.NamespacedMergingQueue((function(e,t){return"number"===typeof t.ttl?{ttl:t.ttl}:e})),o.cache=new b.Cache,o.descriptor=r,o.descriptor.date_updated=new Date(o.descriptor.date_updated),o}return c(n,[{key:"_addOrUpdateItemOnServer",value:function(){var e=s(a.mark((function e(t,n,r,i){var o,s;return a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return o={data:n},void 0!==i&&(o.ttl=i),e.next=4,this.services.network.post(t,o,r);case 4:return(s=e.sent).body.data=n,s.body.date_updated=new Date(s.body.date_updated),e.abrupt("return",s.body);case 8:case"end":return e.stop()}}),e,this)})));return function(t,n,r,i){return e.apply(this,arguments)}}()},{key:"push",value:function(){var e=s(a.mark((function e(t,n){var r,i,o;return a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=(n||{}).ttl,h.validateOptionalTtl(r),e.next=4,this._addOrUpdateItemOnServer(this.links.items,t,void 0,r);case 4:return i=e.sent,o=Number(i.index),this._handleItemMutated(o,i.url,i.last_event_id,i.revision,t,i.date_updated,i.date_expires,!0,!1),e.abrupt("return",this.cache.get(o));case 8:case"end":return e.stop()}}),e,this)})));return function(t,n){return e.apply(this,arguments)}}()},{key:"set",value:function(){var e=s(a.mark((function e(t,n,r){var i,o=this;return a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=r||{},h.validateOptionalTtl(i.ttl),e.abrupt("return",this.updateMergingQueue.squashAndAdd(t,i,(function(e){return o._updateItemUnconditionally(t,n,e.ttl)})));case 3:case"end":return e.stop()}}),e,this)})));return function(t,n,r){return e.apply(this,arguments)}}()},{key:"_updateItemUnconditionally",value:function(){var e=s(a.mark((function e(t,n,r){var i,o;return a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.get(t);case 2:return i=e.sent,e.next=5,this._addOrUpdateItemOnServer(i.uri,n,void 0,r);case 5:return o=e.sent,this._handleItemMutated(t,o.url,o.last_event_id,o.revision,o.data,o.date_updated,o.date_expires,!1,!1),e.abrupt("return",this.cache.get(t));case 8:case"end":return e.stop()}}),e,this)})));return function(t,n,r){return e.apply(this,arguments)}}()},{key:"_updateItemWithIfMatch",value:function(){var e=s(a.mark((function e(t,n,r){var i,o,s,u;return a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.get(t);case 2:if(i=e.sent,!(o=n(h.deepClone(i.value)))){e.next=25;break}return s=i.revision,e.prev=6,e.next=9,this._addOrUpdateItemOnServer(i.uri,o,s,r);case 9:return u=e.sent,this._handleItemMutated(t,u.url,u.last_event_id,u.revision,u.data,u.date_updated,u.date_expires,!1,!1),e.abrupt("return",this.cache.get(t));case 14:if(e.prev=14,e.t0=e.catch(6),412!==e.t0.status){e.next=22;break}return e.next=19,this._getItemFromServer(t);case 19:return e.abrupt("return",this._updateItemWithIfMatch(t,n,r));case 22:throw e.t0;case 23:e.next=26;break;case 25:return e.abrupt("return",i);case 26:case"end":return e.stop()}}),e,this,[[6,14]])})));return function(t,n,r){return e.apply(this,arguments)}}()},{key:"mutate",value:function(){var e=s(a.mark((function e(t,n,r){var i,o=this;return a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=r||{},h.validateOptionalTtl(i.ttl),e.abrupt("return",this.updateMergingQueue.add(t,i,(function(e){return o._updateItemWithIfMatch(t,n,e.ttl)})));case 3:case"end":return e.stop()}}),e,this)})));return function(t,n,r){return e.apply(this,arguments)}}()},{key:"update",value:function(){var e=s(a.mark((function e(t,n,r){return a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",this.mutate(t,(function(e){return Object.assign(e,n)}),r));case 1:case"end":return e.stop()}}),e,this)})));return function(t,n,r){return e.apply(this,arguments)}}()},{key:"remove",value:function(){var e=s(a.mark((function e(t){var n,r;return a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.get(t);case 2:return n=e.sent,e.next=5,this.services.network.delete(n.uri);case 5:r=e.sent,this._handleItemRemoved(t,r.body.last_event_id,void 0,new Date(r.body.date_updated),!1);case 7:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"get",value:function(){var e=s(a.mark((function e(t){var n;return a.wrap((function(e){for(;;
2)switch(e.prev=e.next){case 0:if(!(n=this.cache.get(t))){e.next=5;break}return e.abrupt("return",n);case 5:return e.abrupt("return",this._getItemFromServer(t));case 6:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"_getItemFromServer",value:function(){var e=s(a.mark((function e(t){var n;return a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.queryItems({index:t});case 2:if(!((n=e.sent).items.length<1)){e.next=7;break}throw new p.SyncError("No item with index ".concat(t," found"),404,54151);case 7:return e.abrupt("return",n.items[0]);case 8:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"queryItems",value:function(){var e=s(a.mark((function e(t){var n,r,i,o,s=this;return a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=t||{},n=new d.UriBuilder(this.links.items).queryParam("From",t.from).queryParam("PageSize",t.limit).queryParam("Index",t.index).queryParam("PageToken",t.pageToken).queryParam("Order",t.order).build(),e.next=4,this.services.network.get(n);case 4:return r=e.sent,i=r.body.items.map((function(e){return e.date_updated=new Date(e.date_updated),s.cache.get(e.index)?s._handleItemMutated(e.index,e.url,e.last_event_id,e.revision,e.data,e.date_updated,e.date_expires,!1,!0):s.cache.store(Number(e.index),new m.ListItem({index:Number(e.index),uri:e.url,revision:e.revision,lastEventId:e.last_event_id,dateUpdated:e.date_updated,dateExpires:e.date_expires,value:e.data}),e.last_event_id),s.cache.get(e.index)})),o=r.body.meta,e.abrupt("return",new g.Paginator(i,(function(e){return s.queryItems({pageToken:e})}),o.previous_token,o.next_token));case 8:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"getItems",value:function(){var e=s(a.mark((function e(t){return a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=t||{},h.validatePageSize(t.pageSize),t.limit=t.pageSize||t.limit||50,t.order=t.order||"asc",e.abrupt("return",this.queryItems(t));case 5:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"getContext",value:function(){var e=s(a.mark((function e(){var t;return a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.context){e.next=5;break}return e.next=3,this.services.network.get(this.links.context);case 3:t=e.sent,this._updateContextIfRequired(t.body.data,t.body.last_event_id);case 5:return e.abrupt("return",this.context);case 6:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"setTtl",value:function(){var e=s(a.mark((function e(t){var n,r;return a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return h.validateMandatoryTtl(t),e.prev=1,n={ttl:t},e.next=5,this.services.network.post(this.uri,n);case 5:r=e.sent,this.descriptor.date_expires=r.body.date_expires,e.next=13;break;case 9:throw e.prev=9,e.t0=e.catch(1),404===e.t0.status&&this.onRemoved(!1),e.t0;case 13:case"end":return e.stop()}}),e,this,[[1,9]])})));return function(t){return e.apply(this,arguments)}}()},{key:"setItemTtl",value:function(){var e=s(a.mark((function e(t,n){var r,i,o;return a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return h.validateMandatoryTtl(n),e.next=3,this.get(t);case 3:return r=e.sent,i={ttl:n},e.next=7,this.services.network.post(r.uri,i);case 7:o=e.sent,r.updateDateExpires(o.body.date_expires);case 9:case"end":return e.stop()}}),e,this)})));return function(t,n){return e.apply(this,arguments)}}()},{key:"removeList",value:function(){var e=s(a.mark((function e(){return a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.services.network.delete(this.uri);case 2:this.onRemoved(!0);case 3:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"onRemoved",value:function(e){this._unsubscribe(),this.removalHandler(this.type,this.sid,this.uniqueName),this.broadcastEventToListeners("removed",{isLocal:e})}},{key:"shouldIgnoreEvent",value:function(e,t){return this.cache.isKnown(e,t)}},{key:"_update",value:function(e,t){var n=Number(e.item_index);switch(e.date_created=new Date(e.date_created),e.type){case"list_item_added":case"list_item_updated":this._handleItemMutated(n,e.item_url,e.id,e.item_revision,e.item_data,e.date_created,void 0,"list_item_added"===e.type,!0);break;case"list_item_removed":this._handleItemRemoved(n,e.id,e.item_data,e.date_created,!0);break;case"list_context_updated":this._handleContextUpdate(e.context_data,e.id,e.date_created);break;case"list_removed":this.onRemoved(!1)}t&&this._advanceLastEventId(e.id,e.list_revision)}},{key:"_advanceLastEventId",value:function(e,t){this.lastEventId<e&&(this.descriptor.last_event_id=e,t&&(this.descriptor.revision=t))}},{key:"_updateRootDateUpdated",value:function(e){(!this.descriptor.date_updated||e.getTime()>this.descriptor.date_updated.getTime())&&(this.descriptor.date_updated=e,this.services.storage.update(this.t
2ype,this.sid,this.uniqueName,{date_updated:e}))}},{key:"_handleItemMutated",value:function(e,t,n,r,i,o,a,s,u){if(this.shouldIgnoreEvent(e,n))v.default.trace("Item ",e," update skipped, current:",this.lastEventId,", remote:",n);else{this._updateRootDateUpdated(o);var c=this.cache.get(e);if(c)c.update(n,r,i,o),this.cache.store(e,c,n),void 0!==a&&c.updateDateExpires(a),this.emitItemMutationEvent(c,u,!1);else{var l=new m.ListItem({index:e,uri:t,lastEventId:n,revision:r,value:i,dateUpdated:o,dateExpires:a});this.cache.store(e,l,n),this.emitItemMutationEvent(l,u,s)}}}},{key:"emitItemMutationEvent",value:function(e,t,n){var r=n?"itemAdded":"itemUpdated";this.broadcastEventToListeners(r,{item:e,isLocal:!t})}},{key:"_handleItemRemoved",value:function(e,t,n,r,i){this._updateRootDateUpdated(r),this.cache.delete(e,t),this.broadcastEventToListeners("itemRemoved",{index:e,isLocal:!i,value:n})}},{key:"_handleContextUpdate",value:function(e,t,n){this._updateRootDateUpdated(n),this._updateContextIfRequired(e,t)&&this.broadcastEventToListeners("contextUpdated",{context:e,isLocal:!1})}},{key:"_updateContextIfRequired",value:function(e,t){return!this.contextEventId||t>this.contextEventId?(this.context=e,this.contextEventId=t,!0):(v.default.trace("Context update skipped, current:",this.lastEventId,", remote:",t),!1)}},{key:"uri",get:function(){return this.descriptor.url}},{key:"revision",get:function(){return this.descriptor.revision}},{key:"lastEventId",get:function(){return this.descriptor.last_event_id}},{key:"links",get:function(){return this.descriptor.links}},{key:"dateExpires",get:function(){return this.descriptor.date_expires}},{key:"type",get:function(){return"list"}},{key:"indexName",get:function(){}},{key:"queryString",get:function(){}},{key:"sid",get:function(){return this.descriptor.sid}},{key:"uniqueName",get:function(){return this.descriptor.unique_name||null}},{key:"dateUpdated",get:function(){return this.descriptor.date_updated}}],[{key:"type",get:function(){return"list"}}]),n}(y.SyncEntity);t.SyncListImpl=k;var S=function(e){l(n,e);var t=f(n);function n(e){var i;return u(this,n),(i=t.call(this)).syncListImpl=e,i.syncListImpl.attach(r(i)),i}return c(n,[{key:"push",value:function(){var e=s(a.mark((function e(t,n){return a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this.ensureNotClosed(),e.abrupt("return",this.syncListImpl.push(t,n));case 2:case"end":return e.stop()}}),e,this)})));return function(t,n){return e.apply(this,arguments)}}()},{key:"set",value:function(){var e=s(a.mark((function e(t,n,r){return a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this.ensureNotClosed(),e.abrupt("return",this.syncListImpl.set(t,n,r));case 2:case"end":return e.stop()}}),e,this)})));return function(t,n,r){return e.apply(this,arguments)}}()},{key:"mutate",value:function(){var e=s(a.mark((function e(t,n,r){return a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this.ensureNotClosed(),e.abrupt("return",this.syncListImpl.mutate(t,n,r));case 2:case"end":return e.stop()}}),e,this)})));return function(t,n,r){return e.apply(this,arguments)}}()},{key:"update",value:function(){var e=s(a.mark((function e(t,n,r){return a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this.ensureNotClosed(),e.abrupt("return",this.syncListImpl.update(t,n,r));case 2:case"end":return e.stop()}}),e,this)})));return function(t,n,r){return e.apply(this,arguments)}}()},{key:"remove",value:function(){var e=s(a.mark((function e(t){return a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this.ensureNotClosed(),e.abrupt("return",this.syncListImpl.remove(t));case 2:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"get",value:function(){var e=s(a.mark((function e(t){return a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this.ensureNotClosed(),e.abrupt("return",this.syncListImpl.get(t));case 2:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"getContext",value:function(){var e=s(a.mark((function e(){return a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this.ensureNotClosed(),e.abrupt("return",this.syncListImpl.getContext());case 2:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"getItems",value:function(){var e=s(a.mark((function e(t){return a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this.ensureNotClosed(),e.abrupt("return",this.syncListImpl.getItems(t));case 2:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"setTtl",value:function(){var e=s(a.mark((function e(t){return a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this.ensureNotClosed(),e.abrupt("return",this.syncListImpl.setTtl(t));case 2:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"setItemTtl",value:function(){var e=s(a.mark((function e(t,n){return a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this.ensureNotClosed(),e.abrupt("return",this.syncListImpl.setItemTtl(t,n));case 2:case"end":return e.stop()}}),e,this)})));return function(t,n){return e.apply(this,arguments)}}()},{key:"removeList",value:function(){var e=s(a.mark((function e(){return a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this.ensureNotClosed(),e.abrupt("return",this.syncListImpl.removeList());case 2:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"close",value:function(){i(o(n.prototype),"close",this).call(this),this.syncListImpl.detach(this.listenerUuid)}},{key:"uri",get:function(){return this.syncListImpl.uri}},{key:"revision",get:function(){return this.syncListImpl.revision}},{key:"lastEventId",get:function(){return this.syncListImpl.lastEventId}},{key:"links",get:function(){return this.syncListImpl.links}},{key:"dateExpires",get:function(){return this.syncListImpl.dateExpires}},{key:"type",get:function(){return k.type}},{key:"sid",get:function(){return this.syncListImpl.sid}},{key:"uniqueName",get:function(){return this.syncListImpl.uniqueName}},{key:"dateUpdated",get:function(){return this.syncListImpl.dateUpdated}}],[{key:"type",get:function(){return k.type}}]),n}(w.default);t.SyncList=S,t.default=S},function(e,t,n){"use strict";var r=n(9),i=n(17);
2Object.defineProperty(t,"__esModule",{value:!0}),t.ListItem=void 0;var o=function(){function e(t){r(this,e),this.data=t}return i(e,[{key:"update",value:function(e,t,n,r){return this.data.lastEventId=e,this.data.revision=t,this.data.value=n,this.data.dateUpdated=r,this}},{key:"updateDateExpires",value:function(e){this.data.dateExpires=e}},{key:"uri",get:function(){return this.data.uri}},{key:"revision",get:function(){return this.data.revision}},{key:"lastEventId",get:function(){return this.data.lastEventId}},{key:"dateUpdated",get:function(){return this.data.dateUpdated}},{key:"dateExpires",get:function(){return this.data.dateExpires}},{key:"index",get:function(){return this.data.index}},{key:"value",get:function(){return this.data.value}}]),e}();t.ListItem=o,t.default=o},function(e,t,n){"use strict";var r=n(6),i=n(27),o=n(9),a=n(17);Object.defineProperty(t,"__esModule",{value:!0}),t.Paginator=void 0;var s=function(){function e(t,n,r,i){o(this,e),this.prevToken=r,this.nextToken=i,this.items=t,this.source=n}return a(e,[{key:"nextPage",value:function(){var e=i(r.mark((function e(){return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.hasNextPage){e.next=2;break}throw new Error("No next page");case 2:return e.abrupt("return",this.source(this.nextToken));case 3:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"prevPage",value:function(){var e=i(r.mark((function e(){return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.hasPrevPage){e.next=2;break}throw new Error("No previous page");case 2:return e.abrupt("return",this.source(this.prevToken));case 3:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"hasNextPage",get:function(){return!!this.nextToken}},{key:"hasPrevPage",get:function(){return!!this.prevToken}}]),e}();t.Paginator=s},function(e,t,n){"use strict";var r=n(83),i=n(94),o=n(66),a=n(6),s=n(27),u=n(9),c=n(17),l=n(20),f=n(21);Object.defineProperty(t,"__esModule",{value:!0}),t.SyncMap=t.SyncMapImpl=void 0;var h=n(108),d=n(122),p=n(74),v=n(75),y=n(109),m=n(285),g=n(283),b=n(170),_=n(169),w=n(110),k=function(e){l(n,e);var t=f(n);function n(e,r,i){var o;u(this,n);return(o=t.call(this,e,i)).updateMergingQueue=new _.NamespacedMergingQueue((function(e,t){return"number"===typeof t.ttl?{ttl:t.ttl}:e})),o.cache=new b.Cache,o.descriptor=r,o.descriptor.date_updated=new Date(o.descriptor.date_updated),r.items&&r.items.forEach((function(e){e.date_updated=new Date(e.date_updated),o.cache.store(e.key,new m.MapItem(e),e.last_event_id)})),o}return c(n,[{key:"set",value:function(){var e=s(a.mark((function e(t,n,r){var i,o=this;return a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=r||{},h.validateOptionalTtl(i.ttl),e.abrupt("return",this.updateMergingQueue.squashAndAdd(t,i,(function(e){return o._putItemUnconditionally(t,n,e.ttl)})));case 3:case"end":return e.stop()}}),e,this)})));return function(t,n,r){return e.apply(this,arguments)}}()},{key:"get",value:function(){var e=s(a.mark((function e(t){return a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!this.cache.has(t)){e.next=4;break}return e.abrupt("return",this.cache.get(t));case 4:return e.abrupt("return",this._getItemFromServer(t));case 5:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"_getItemFromServer",value:function(){var e=s(a.mark((function e(t){var n;return a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.queryItems({key:t});case 2:if(!((n=e.sent).items.length<1)){e.next=7;break}throw new p.SyncError("No item with key ".concat(t," found"),404,54201);case 7:return e.abrupt("return",n.items[0]);case 8:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"mutate",value:function(){var e=s(a.mark((function e(t,n,r){var i,o=this;return a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=r||{},h.validateOptionalTtl(i.ttl),e.abrupt("return",this.updateMergingQueue.add(t,i,(function(e){return o._putItemWithIfMatch(t,n,e.ttl)})));case 3:case"end":return e.stop()}}),e,this)})));return function(t,n,r){return e.apply(this,arguments)}}()},{key:"update",value:function(){var e=s(a.mark((function e(t,n,r){return a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",this.mutate(t,(function(e){return Object.assign(e,n)}),r));case 1:case"end":return e.stop()}}),e,this)})));return function(t,n,r){return e.apply(this,arguments)}}()},{key:"_putItemUnconditionally",value:function(){var e=s(a.mark((function e(t,n,r){var i,o;return a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this._putItemToServer(t,n,void 0,r);case 2:return i=e.sent,o=i.item,this._handleItemMutated(o.key,o.url,o.last_event_id,o.revision,o.data,o.date_updated,o.date_expires,i.added,!1),e.abrupt("return",this.cache.get(o.key));case 6:case"end":return e.stop()}}),e,this)})));return function(t,n,r){return e.apply(this,arguments)}}()},{key:"_putItemWithIfMatch",value:function(){var e=s(a.mark((function e(t,n,r){var i,o,s,u,c;return a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.get(t).catch((function(e){if(404===e.status)return new m.MapItem({key:t,data:{},last_event_id:-1,revision:"-1",url:null,date_updated:null,date_expires:null});throw e}));case 2:if(i=e.sent,!(o=n(h.deepClone(i.value)))){e.next=26;break}return s=i.revision,e.prev=6,e.next=9,this._putItemToServer(t,o,s,r);case 9:return u=e.sent,c=u.item,this._handleItemMutated(c.key,c.url,c.last_event_id,c.revision,c.data,c.date_updated,c.date_expires,u.added,!1),e.abrupt("return",this.cache.get(c.key));case 15:if(e.prev=15,e.t0=e.catch(6),412!==e.t0.status){e.next=23;break}return e.next=20,this._getItemFromServer(t);case 20:return e.abrupt("return",this._putItemWithIfMatch(t,n,r));case 23:throw e.t0;case 24:e.next=27;break;case 26:return e.abrupt("return",i);case 27:case"end":return e.stop()}}),e,this,[[6,15]])})));return function(t,n,r){return e.apply(this,arguments)}}()},{key:"_putItemToServer",value:function(){var e=s(a.mark((function e(t,n,r,i){var o,s,u,c,l;return a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return o=new d.UriBuilder(this.links.items).pathSegment(t).build(),s={data:n},void 0!==i&&(s.ttl=i),e.prev=3,e.next=6,this.services.network.put(o,s,r);case 6:return u=e.sent,(c=u.body).data=n,c.date_updated=new Date(c.date_updated),l=201===u.status.code,e.abrupt("return",{added:l,item:c});case 14:throw e.prev=14,e.t0=e.catch(3),404===e.t0.status&&this.onRemoved(!1),e.t0;case 18:case"end":return e.stop()}}),e,this,[[3,14]])})));return function(t,n,r,i){return e.apply(this,arguments)}}()},{key:"remove",value:function(){var e=s(a.mark((function e(t){var n,r;return a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if("undefined"!==typeof t){e.next=2;break}
2throw new Error("Key argument is invalid");case 2:return e.next=4,this.get(t);case 4:return n=e.sent,e.next=7,this.services.network.delete(n.uri);case 7:r=e.sent,this._handleItemRemoved(t,r.body.last_event_id,void 0,new Date(r.body.date_updated),!1);case 9:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"queryItems",value:function(){var e=s(a.mark((function e(t){var n,r,i,o,s=this;return a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=t||{},n=new d.UriBuilder(this.links.items).queryParam("From",t.from).queryParam("PageSize",t.limit).queryParam("Key",t.key).queryParam("PageToken",t.pageToken).queryParam("Order",t.order).build(),e.next=4,this.services.network.get(n);case 4:return r=e.sent,i=r.body.items.map((function(e){return e.date_updated=new Date(e.date_updated),s.cache.get(e.key)?s._handleItemMutated(e.key,e.url,e.last_event_id,e.revision,e.data,e.date_updated,e.date_expires,!1,!0):s.cache.store(e.key,new m.MapItem(e),e.last_event_id),s.cache.get(e.key)})),o=r.body.meta,e.abrupt("return",new g.Paginator(i,(function(e){return s.queryItems({pageToken:e})}),o.previous_token,o.next_token));case 8:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"getItems",value:function(){var e=s(a.mark((function e(t){return a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=t||{},h.validatePageSize(t.pageSize),t.limit=t.pageSize||t.limit||50,t.order=t.order||"asc",e.abrupt("return",this.queryItems(t));case 5:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"shouldIgnoreEvent",value:function(e,t){return this.cache.isKnown(e,t)}},{key:"_update",value:function(e,t){switch(e.date_created=new Date(e.date_created),e.type){case"map_item_added":case"map_item_updated":this._handleItemMutated(e.item_key,e.item_url,e.id,e.item_revision,e.item_data,e.date_created,void 0,"map_item_added"===e.type,!0);break;case"map_item_removed":this._handleItemRemoved(e.item_key,e.id,e.item_data,e.date_created,!0);break;case"map_removed":this.onRemoved(!1)}t&&this._advanceLastEventId(e.id,e.map_revision)}},{key:"_advanceLastEventId",value:function(e,t){this.lastEventId<e&&(this.descriptor.last_event_id=e,t&&(this.descriptor.revision=t))}},{key:"_updateRootDateUpdated",value:function(e){(!this.descriptor.date_updated||e.getTime()>this.descriptor.date_updated.getTime())&&(this.descriptor.date_updated=e,this.services.storage.update(this.type,this.sid,this.uniqueName,{date_updated:e}))}},{key:"_handleItemMutated",value:function(e,t,n,r,i,o,a,s,u){if(this.shouldIgnoreEvent(e,n))v.default.trace("Item ",e," update skipped, current:",this.lastEventId,", remote:",n);else{this._updateRootDateUpdated(o);var c=this.cache.get(e);c?(c.update(n,r,i,o),this.cache.store(e,c,n),void 0!==a&&c.updateDateExpires(a),this.emitItemMutationEvent(c,u,!1)):(c=new m.MapItem({key:e,url:t,last_event_id:n,revision:r,data:i,date_updated:o,date_expires:a}),this.cache.store(e,c,n),this.emitItemMutationEvent(c,u,s))}}},{key:"emitItemMutationEvent",value:function(e,t,n){var r=n?"itemAdded":"itemUpdated";this.broadcastEventToListeners(r,{item:e,isLocal:!t})}},{key:"_handleItemRemoved",value:function(e,t,n,r,i){this._updateRootDateUpdated(r),this.cache.delete(e,t),this.broadcastEventToListeners("itemRemoved",{key:e,isLocal:!i,value:n})}},{key:"onRemoved",value:function(e){this._unsubscribe(),this.removalHandler(this.type,this.sid,this.uniqueName),this.broadcastEventToListeners("removed",{isLocal:e})}},{key:"setTtl",value:function(){var e=s(a.mark((function e(t){var n,r;return a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return h.validateMandatoryTtl(t),e.prev=1,n={ttl:t},e.next=5,this.services.network.post(this.uri,n);case 5:r=e.sent,this.descriptor.date_expires=r.body.date_expires,e.next=13;break;case 9:throw e.prev=9,e.t0=e.catch(1),404===e.t0.status&&this.onRemoved(!1),e.t0;case 13:case"end":return e.stop()}}),e,this,[[1,9]])})));return function(t){return e.apply(this,arguments)}}()},{key:"setItemTtl",value:function(){var e=s(a.mark((function e(t,n){var r,i,o;return a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return h.validateMandatoryTtl(n),e.next=3,this.get(t);case 3:return r=e.sent,i={ttl:n},e.next=7,this.services.network.post(r.uri,i);case 7:o=e.sent,r.updateDateExpires(o.body.date_expires);case 9:case"end":return e.stop()}}),e,this)})));return function(t,n){return e.apply(this,arguments)}}()},{key:"removeMap",value:function(){var e=s(a.mark((function e(){return a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.services.network.delete(this.uri);case 2:this.onRemoved(!0);case 3:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"uri",get:function(){return this.descriptor.url}},{key:"links",get:function(){return this.descriptor.links}},{key:"revision",get:function(){return this.descriptor.revision}},{key:"lastEventId",get:function(){return this.descriptor.last_event_id}},{key:"dateExpires",get:function(){return this.descriptor.date_expires}},{key:"type",get:function(){return"map"}},{key:"indexName",get:function(){}},{key:"queryString",get:function(){}},{key:"sid",get:function(){return this.descriptor.sid}},{key:"uniqueName",get:function(){return this.descriptor.unique_name||null}},{key:"dateUpdated",get:function(){return this.descriptor.date_updated}}],[{key:"type",get:function(){return"map"}}]),n}(y.SyncEntity);t.SyncMapImpl=k;var S=function(e){l(n,e);var t=f(n);function n(e){var i;return u(this,n),(i=t.call(this)).syncMapImpl=e,i.syncMapImpl.attach(r(i)),i}return c(n,[{key:"set",value:function(){var e=s(a.mark((function e(t,n,r){return a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this.ensureNotClosed(),e.abrupt("return",this.syncMapImpl.set(t,n,r));case 2:case"end":return e.stop()}}),e,this)})));return function(t,n,r){return e.apply(this,arguments)}}()},{key:"get",value:function(){var e=s(a.mark((function e(t){return a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this.ensureNotClosed(),e.abrupt("return",this.syncMapImpl.get(t));case 2:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"mutate",value:function(){var e=s(a.mark((function e(t,n,r){return a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this.ensureNotClosed(),e.abrupt("return",this.syncMapImpl.mutate(t,n,r));case 2:case"end":return e.stop()}}),e,this)})));return function(t,n,r){return e.apply(this,arguments)}}()},{key:"update",value:function(){var e=s(a.mark((function e(t,n,r){return a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this.ensureNotClosed(),e.abrupt("return",this.syncMapImpl.update(t,n,r));case 2:case"end":return e.stop()}}),e,this)})));return function(t,n,r){return e.apply(this,arguments)}}()},{key:"remove",value:function(){var e=s(a.mark((function e(t){return a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this.ensureNotClosed(),e.abrupt("return",this.syncMapImpl.remove(t));case 2:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"getItems",value:function(){var e=s(a.mark((function e(t){return a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this.ensureNotClosed(),e.abrupt("return",this.syncMapImpl.getItems(t));case 2:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"setTtl",value:function(){var e=s(a.mark((function e(t){return a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this.ensureNotClosed(),e.abrupt("return",this.syncMapImpl.setTtl(t));case 2:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"setItemTtl",value:function(){var e=s(a.mark((function e(t,n){return a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this.ensureNotClosed(),e.abrupt("return",this.syncMapImpl.setItemTtl(t,n));case 2:case"end":return e.stop()}}),e,this)})));return function(t,n){return e.apply(this,arguments)}}()},{key:"removeMap",value:function(){var e=s(a.mark((function e(){return a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this.ensureNotClosed(),e.next=3,this.syncMapImpl.removeMap();case 3:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"close",value:function(){i(o(n.prototype),"close",this).call(this),this.syncMapImpl.detach(this.listenerUuid)}},{key:"uri",get:function(){return this.syncMapImpl.uri}},{key:"links",get:function(){return this.syncMapImpl.links}},{key:"revision",get:function(){return this.syncMapImpl.revision}},{key:"lastEventId",get:function(){return this.syncMapImpl.lastEventId}},{key:"dateExpires",get:function(){return this.syncMapImpl.dateExpires}},{key:"type",get:function(){return k.type}},{key:"sid",get:function(){return this.syncMapImpl.sid}},{key:"uniqueName",get:function(){return this.syncMapImpl.uniqueName}},{key:"dateUpdated",get:function(){return this.syncMapImpl.dateUpdated}}],[{key:"type",get:function(){return k.type}}]),n}(w.Closeable);t.SyncMap=S,t.default=S},function(e,t,n){"use strict";var r=n(9),i=n(17);
2Object.defineProperty(t,"__esModule",{value:!0}),t.MapItem=void 0;var o=function(){function e(t){r(this,e),this.descriptor=t}return i(e,[{key:"update",value:function(e,t,n,r){return this.descriptor.last_event_id=e,this.descriptor.revision=t,this.descriptor.data=n,this.descriptor.date_updated=r,this}},{key:"updateDateExpires",value:function(e){this.descriptor.date_expires=e}},{key:"uri",get:function(){return this.descriptor.url}},{key:"revision",get:function(){return this.descriptor.revision}},{key:"lastEventId",get:function(){return this.descriptor.last_event_id}},{key:"dateExpires",get:function(){return this.descriptor.date_expires}},{key:"key",get:function(){return this.descriptor.key}},{key:"value",get:function(){return this.descriptor.data}},{key:"dateUpdated",get:function(){return this.descriptor.date_updated}}]),e}();t.MapItem=o},function(e,t,n){"use strict";var r=n(6),i=n(83),o=n(94),a=n(66),s=n(27),u=n(17),c=n(20),l=n(21),f=n(9);Object.defineProperty(t,"__esModule",{value:!0}),t.InstantQuery=t.LiveQuery=t.queryItems=t.LiveQueryImpl=t.InsightsItem=void 0;var h=n(122),d=n(74),p=n(75),v=n(18),y=n(109),m=n(110),g=n(170);t.InsightsItem=function e(){f(this,e)};var b=function(e){c(n,e);var t=l(n);function n(e,r,i,o){var a;return f(this,n),(a=t.call(this,r,i)).descriptor=e,a.cache=new g.Cache,o&&o.forEach((function(e){a.cache.store(e.key,{key:e.key,value:e.data},e.revision)})),a}return u(n,[{key:"onRemoved",value:function(){}},{key:"getItems",value:function(){var e={};return this.cache.forEach((function(t,n){e[t]=n.value})),e}},{key:"_update",value:function(e,t){switch(e.type){case"live_query_item_updated":this.handleItemMutated(e.item_key,e.item_data,e.item_revision);break;case"live_query_item_removed":this.handleItemRemoved(e.item_key,e.item_revision);break;case"live_query_updated":this.handleBatchUpdate(e.items)}t&&this._advanceLastEventId(e.last_event_id)}},{key:"handleItemMutated",value:function(e,t,n){if(this.shouldIgnoreEvent(e,n))p.default.trace("Item ".concat(e," update skipped, revision: ").concat(n));else{var r={key:e,value:t};this.cache.store(e,r,n),this.broadcastEventToListeners("itemUpdated",r)}}},{key:"handleItemRemoved",value:function(e,t){var n=null===t;this.shouldIgnoreEvent(e,t)?p.default.trace("Item ".concat(e," delete skipped, revision: ").concat(t)):(this.cache.delete(e,t,n),this.broadcastEventToListeners("itemRemoved",{key:e}))}},{key:"handleBatchUpdate",value:function(e){var t=this,n={};for(var r in null!=e&&e.forEach((function(e){n[e.key]={data:e.data,revision:e.revision}})),this.cache.forEach((function(e,r){var i=n[e];null!=i?t.handleItemMutated(e,i.data,i.revision):t.handleItemRemoved(e,null),delete n[e]})),n)this.handleItemMutated(r,n[r].data,n[r].revision)}},{key:"shouldIgnoreEvent",value:function(e,t){return null!=e&&null!=t&&this.cache.isKnown(e,t)}},{key:"_advanceLastEventId",value:function(e,t){this.lastEventId<e&&(this.descriptor.last_event_id=e)}},{key:"sid",get:function(){return this.descriptor.sid}},{key:"uniqueName",get:function(){return null}},{key:"type",get:function(){return n.type}},{key:"lastEventId",get:function(){return this.descriptor.last_event_id}},{key:"indexName",get:function(){return this.descriptor.indexName}},{key:"queryString",get:function(){return this.descriptor.queryExpression}},{key:"queryUri",get:function(){return this.descriptor.queryUri}},{key:"liveQueryDescriptor",get:function(){return this.descriptor}}],[{key:"type",get:function(){return"live_query"}}]),n}(y.SyncEntity);function _(e){return w.apply(this,arguments)}function w(){return(w=s(r.mark((function e(t){var n,i,o,a,s,u;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=t.network,i=t.queryString,o=t.uri,a=t.type,null!=i){e.next=3;break}throw new d.SyncError("Invalid query",400,54507);case 3:return s={query_string:i},a===k.type&&(s.type=a),e.next=7,n.post(o,s,void 0,!0);case 7:return u=e.sent,e.abrupt("return",u.body);case 9:case"end":return e.stop()}}),e)})))).apply(this,arguments)}t.LiveQueryImpl=b,t.queryItems=_;var k=function(e){c(n,e);var t=l(n);function n(e){var r;return f(this,n),(r=t.call(this)).liveQueryImpl=e,r.liveQueryImpl.attach(i(r)),r}return u(n,[{key:"close",value:function(){o(a(n.prototype),"close",this).call(this),this.liveQueryImpl.detach(this.listenerUuid)}},{key:"getItems",value:function(){return this.ensureNotClosed(),this.liveQueryImpl.getItems()}},{key:"type",get:function(){return b.type}},{key:"lastEventId",get:function(){return this.liveQueryImpl.lastEventId}},{key:"sid",get:function(){return this.liveQueryImpl.sid}}],[{key:"type",get:function(){return b.type}}]),n}(m.Closeable);t.LiveQuery=k;var S=function(e){c(n,e);var t=l(n);function n(e){var r;return f(this,n),(r=t.call(this)).queryExpression=null,r.items={},Object.assign(i(r),e),r.updateIndexName(e.indexName),r}return u(n,[{key:"search",value:function(){var e=s(r.mark((function e(t){var n=this;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this.items={},e.abrupt("return",_({network:this.network,uri:this.queryUri,queryString:t}
2).then((function(e){n.queryExpression=t,e.items&&e.items.forEach((function(e){n.items[e.key]=e.data})),n.emit("searchResult",n.getItems())})).catch((function(e){throw p.default.error("Error '".concat(e.message,"' while executing query '").concat(t,"'")),n.queryExpression=null,e})));case 2:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"subscribe",value:function(){var e=s(r.mark((function e(){return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(null!=this.queryExpression){e.next=2;break}return e.abrupt("return",Promise.reject(new d.SyncError("Invalid query",400,54507)));case 2:return e.abrupt("return",this.liveQueryCreator(this.indexName,this.queryExpression));case 3:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"getItems",value:function(){return this.items}},{key:"updateIndexName",value:function(e){if(!e||"string"!==typeof e)throw new Error("Index name must contain a non-empty string value");this.indexName=e,this.queryUri=this.generateQueryUri(this.indexName)}},{key:"generateQueryUri",value:function(e){return new h.UriBuilder(this.insightsUri).pathSegment(e).pathSegment("Items").build()}},{key:"type",get:function(){return n.type}}],[{key:"type",get:function(){return"instant_query"}}]),n}(v.EventEmitter);t.InstantQuery=S,t.default=k},function(e,t,n){"use strict";var r=n(9),i=n(17);Object.defineProperty(t,"__esModule",{value:!0});var o=n(76);function a(e,t){return["".concat((new Date).toISOString()," MCS Client ").concat(e,":")].concat(Array.from(t))}var s=function(){function e(t){r(this,e),this.prefix="",this.prefix=null!==t&&void 0!==t&&t.length>0?t+" ":""}return i(e,[{key:"setLevel",value:function(e){o.setLevel(e)}},{key:"trace",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];o.trace.apply(null,a(this.prefix+"T",t))}},{key:"debug",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];o.debug.apply(null,a(this.prefix+"D",t))}},{key:"info",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];o.info.apply(null,a(this.prefix+"I",t))}},{key:"warn",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];o.warn.apply(null,a(this.prefix+"W",t))}},{key:"error",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];o.error.apply(null,a(this.prefix+"E",t))}}],[{key:"scope",value:function(t){return new e(t)}},{key:"setLevel",value:function(e){o.setLevel(e)}},{key:"trace",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];o.trace.apply(null,a("T",t))}},{key:"debug",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];o.debug.apply(null,a("D",t))}},{key:"info",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];o.info.apply(null,a("I",t))}},{key:"warn",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];o.warn.apply(null,a("W",t))}},{key:"error",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];o.error.apply(null,a("E",t))}}]),e}();t.Logger=s},function(e,t,n){"use strict";var r=n(9),i=n(17);Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(t,n,i){r(this,e);var o=i.MCS||i||{};this.region=o.region||i.region,this.baseUrl=("undefined"===typeof this.region?"https://mcs.us1.twilio.com":"https://mcs.".concat(this.region,".twilio.com"))+n,this.token=t,this.retryWhenThrottledOverride=o.retryWhenThrottledOverride,this.backoffConfigOverride=o.backoffConfigOverride}return i(e,[{key:"updateToken",value:function(e){this.token=e}}],[{key:"backoffConfigDefault",get:function(){return{min:1e3,max:4e3,maxAttemptsCount:3}}},{key:"retryWhenThrottledDefault",get:function(){return true}}]),e}();t.Configuration=o},function(e,t){var n="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof window.msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto);
2if(n){var r=new Uint8Array(16);e.exports=function(){return n(r),r}}else{var i=new Array(16);e.exports=function(){for(var e,t=0;t<16;t++)0===(3&t)&&(e=4294967296*Math.random()),i[t]=e>>>((3&t)<<3)&255;return i}}},function(e,t){for(var n=[],r=0;r<256;++r)n[r]=(r+256).toString(16).substr(1);e.exports=function(e,t){var r=t||0,i=n;return[i[e[r++]],i[e[r++]],i[e[r++]],i[e[r++]],"-",i[e[r++]],i[e[r++]],"-",i[e[r++]],i[e[r++]],"-",i[e[r++]],i[e[r++]],"-",i[e[r++]],i[e[r++]],i[e[r++]],i[e[r++]],i[e[r++]],i[e[r++]]].join("")}},function(e,t,n){"use strict";var r=f(n(254)),i=f(n(253)),o=f(n(157)),a=f(n(600)),s=f(n(62)),u=f(n(23)),c=f(n(63)),l=f(n(64));function f(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var h=function(e){function t(e,n){(0,u.default)(this,t);var r=(0,c.default)(this,(t.__proto__||(0,s.default)(t)).call(this));return r.name=r.constructor.name,r.message=e,r.code=n,Error.captureStackTrace?Error.captureStackTrace(r,r.constructor):r.stack=(new Error).stack,r}return(0,l.default)(t,e),t}(function(e){function t(){var t=(0,a.default)(e,(0,o.default)(arguments));return(0,i.default)(t,(0,s.default)(this)),t}return t.prototype=(0,r.default)(e.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),i.default?(0,i.default)(t,e):t.__proto__=e,t}(Error));t.SessionError=h},function(e,t,n){"use strict";var r=a(n(49)),i=a(n(23)),o=a(n(24));function a(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var s=function(){function e(){var t=this;(0,i.default)(this,e),this._promise=new r.default((function(e,n){t._resolve=e,t._reject=n}))}return(0,o.default)(e,[{key:"update",value:function(e){this._resolve(e)}},{key:"set",value:function(e){this.current=e,this._resolve(e)}},{key:"fail",value:function(e){this._reject(e)}},{key:"promise",get:function(){return this._promise}}]),e}();t.Deferred=s},function(e){e.exports=JSON.parse('{"_args":[["[email protected]","C:\\\\Users\\\\DJ 2020\\\\Downloads\\\\diageo-video-call-master\\\\diageo-video-call-master"]],"_from":"[email protected]","_id":"[email protected]","_inBundle":false,"_integrity":"sha512-wMSCz6JHBrISvhujpj8nGHUxlWH9k6MNIhLGzs7UGFyPH5UwswotOEmgXdQSnn5tfuR4z54Vy8NtAIRXUViz/Q==","_location":"/twilio-chat","_phantomChildren":{},"_requested":{"type":"version","registry":true,"raw":"[email protected]","name":"twilio-chat","escapedName":"twilio-chat","rawSpec":"4.0.0","saveSpec":null,"fetchSpec":"4.0.0"},"_requiredBy":["/"],"_resolved":"https://registry.npmjs.org/twilio-chat/-/twilio-chat-4.0.0.tgz","_spec":"4.0.0","_where":"C:\\\\Users\\\\DJ 2020\\\\Downloads\\\\diageo-video-call-master\\\\diageo-video-call-master","author":{"name":"Twilio"},"browser":"browser/index.js","browserslist":["IE 11","last 3 Chrome versions","last 3 Firefox versions","last 3 Safari versions","last 3 Edge versions","last 2 iOS version","last 2 ChromeAndroid version","last 2 FirefoxAndroid version","last 2 Samsung versions","last 2 UCAndroid versions"],"dependencies":{"iso8601-duration":"^1.2.0","loglevel":"^1.6.6","operation-retrier":"^3.0.0","platform":"^1.3.5","rfc6902":"^3.0.2","twilio-mcs-client":"^0.3.3","twilio-notifications":"^0.5.9","twilio-sync":"^0.12.2","twilsock":"^0.5.12","uuid":"^3.3.2"},"description":"Twilio Chat service client library","devDependencies":{"@types/chai":"^4.2.5","@types/chai-as-promised":"^7.1.2","@types/chai-string":"^1.4.1","@types/core-js":"^2.5.0","@types/mocha":"^5.2.7","@types/node":"^12.12.12","@types/sinon":"^7.5.1","@types/sinon-chai":"^3.2.2","async":"^3.0.1","async-test-tools":"^1.0.7","babel-core":"^6.26.0","babel-plugin-transform-builtin-extend":"^1.1.2","babel-plugin-transform-runtime":"^6.23.0","babel-preset-env":"^1.6.1","babel-runtime":"^6.26.0","babelify":"^8.0.0","backoff":"^2.5.0","browserify":"^16.2.3","browserify-replace":"^1.0.0","browserslist":"^4.13.0","chai":"^4.2.0","chai-as-promised":"^7.1.1","chai-string":"^1.5.0","cheerio":"^1.0.0-rc.2","cross-env":"^5.2.0","del":"^5.1.0","fancy-log":"^1.3.3","fs":"0.0.2","gulp":"^4.0.2","gulp-babel":"^7.0.1","gulp-derequire":"^2.1.0","gulp-if":"^2.0.2","gulp-insert":"^0.5.0","gulp-rename":"^1.4.0","gulp-sourcemaps":"^2.6.5","gulp-tap":"^1.0.1","gulp-tslint":"^8.1.4","gulp-typescript":"^5.0.1","gulp-uglify-es":"^1.0.4","ink-docstrap":"^1.3.2","isomorphic-form-data":"^2.0.0","jsdoc":"~3.5.5","jsdoc-strip-async-await":"^0.1.0","mocha":"^6.2.2","mocha.parallel":"^0.15.6","no
2de-fetch":"^2.6.0","nyc":"^14.1.1","path":"^0.12.7","sinon":"^7.5.0","sinon-chai":"^3.3.0","source-map-explorer":"^2.1.1","ts-node":"^8.5.2","tslint":"^5.20.1","twilio":"^3.37.1","typescript":"^3.7.2","uglify-save-license":"^0.4.1","vinyl-buffer":"^1.0.1","vinyl-source-stream":"^2.0.0"},"engines":{"node":">=6"},"license":"MIT","main":"lib/index.js","name":"twilio-chat","types":"./lib/client.d.ts","version":"4.0.0"}')},function(e,t,n){e.exports={default:n(606),__esModule:!0}},function(e,t,n){e.exports={default:n(616),__esModule:!0}},function(e,t,n){"use strict";var r=h(n(82)),i=h(n(38)),o=h(n(40)),a=h(n(295)),s=h(n(62)),u=h(n(23)),c=h(n(24)),l=h(n(63)),f=h(n(64));function h(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var d=n(18),p=n(54),v=n(53).Logger.scope("Member"),y=function(e){function t(e,n,r,i){(0,u.default)(this,t);var o=(0,l.default)(this,(t.__proto__||(0,s.default)(t)).call(this));if(o.channel=n,o.services=e,o.state={attributes:p.parseAttributes(r.attributes,"Retrieved malformed attributes from the server for member: "+i,v),dateCreated:r.dateCreated?p.parseTime(r.dateCreated):null,dateUpdated:r.dateCreated?p.parseTime(r.dateUpdated):null,sid:i,typingTimeout:null,isTyping:!1,identity:r.identity||null,roleSid:r.roleSid||null,lastConsumedMessageIndex:(0,a.default)(r.lastConsumedMessageIndex)?r.lastConsumedMessageIndex:null,lastConsumptionTimestamp:r.lastConsumptionTimestamp?p.parseTime(r.lastConsumptionTimestamp):null,type:r.type||"chat",userInfo:r.userInfo},!r.identity&&!r.type)throw new Error("Received invalid Member object from server: Missing identity or type of Member.");return o}return(0,f.default)(t,e),(0,c.default)(t,[{key:"_startTyping",value:function(e){var t=this;return clearTimeout(this.state.typingTimeout),this.state.isTyping=!0,this.emit("typingStarted",this),this.channel.emit("typingStarted",this),this.state.typingTimeout=setTimeout((function(){return t._endTyping()}),e),this}},{key:"_endTyping",value:function(){this.state.typingTimeout&&(this.state.isTyping=!1,this.emit("typingEnded",this),this.channel.emit("typingEnded",this),clearInterval(this.state.typingTimeout),this.state.typingTimeout=null)}},{key:"_update",value:function(e){var t=[],n=p.parseAttributes(e.attributes,"Retrieved malformed attributes from the server for member: "+this.state.sid,v);e.attributes&&!p.isDeepEqual(this.state.attributes,n)&&(this.state.attributes=n,t.push("attributes"));var r=p.parseTime(e.dateUpdated);e.dateUpdated&&r.getTime()!==(this.state.dateUpdated&&this.state.dateUpdated.getTime())&&(this.state.dateUpdated=r,t.push("dateUpdated"));var i=p.parseTime(e.dateCreated);if(e.dateCreated&&i.getTime()!==(this.state.dateCreated&&this.state.dateCreated.getTime())&&(this.state.dateCreated=i,t.push("dateCreated")),e.roleSid&&this.state.roleSid!==e.roleSid&&(this.state.roleSid=e.roleSid,t.push("roleSid")),!(0,a.default)(e.lastConsumedMessageIndex)&&null!==e.lastConsumedMessageIndex||this.state.lastConsumedMessageIndex===e.lastConsumedMessageIndex||(this.state.lastConsumedMessageIndex=e.lastConsumedMessageIndex,t.push("lastConsumedMessageIndex")),e.lastConsumptionTimestamp){var o=new Date(e.lastConsumptionTimestamp);this.state.lastConsumptionTimestamp&&this.state.lastConsumptionTimestamp.getTime()===o.getTime()||(this.state.lastConsumptionTimestamp=o,t.push("lastConsumptionTimestamp"))}return t.length>0&&this.emit("updated",{member:this,updateReasons:t}),this}},{key:"getUserDescriptor",value:function(){var e=(0,o.default)(i.default.mark((function e(){return i.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if("chat"==this.type){e.next=2;break}throw new Error("Getting User Descriptor is not supported for this Member type: "+this.type);case 2:return e.abrupt("return",this.services.users.getUserDescriptor(this.state.identity));case 3:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"getUser",value:function(){var e=(0,o.default)(i.default.mark((function e(){return i.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if("chat"==this.type){e.next=2;break}throw new Error("Getting User is not supported for this Member type: "+this.type);case 2:return e.abrupt("return",this.services.users.getUser(this.state.identity,this.state.userInfo));case 3:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"remove",value:function(){var e=(0,o.default)(i.default.mark((function e(){return i.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",this.channel.removeMember(this));case 1:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"updateAttributes",value:function(){var e=(0,o.default)(i.default.mark((function e(t){return i.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if("undefined"!==typeof t){e.next=2;break}throw new Error("Attributes is required parameter");case 2:return e.next=4,this.services.session.addCommand("editMemberAttributes",{channelSid:this.channel.sid,memberSid:this.sid,attributes:(0,r.default)(t)});case 4:return e.abrupt("return",this);case 5:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"sid",get:function(){return this.state.sid}},{key:"attributes",get:function(){return this.state.attributes}},{key:"dateCreated",get:function(){return this.state.dateCreated}},{key:"dateUpdated",get:function(){return this.state.dateUpdated}},{key:"identity",get:function(){return this.state.identity}},{key:"isTyping",get:function(){return this.state.isTyping}},{key:"lastConsumedMessageIndex",get:function(){return this.state.lastConsumedMessageIndex}},{key:"lastConsumptionTimestamp",get:function(){return this.state.lastConsumptionTimestamp}},{key:"roleSid",get:function(){return this.state.roleSid}},{key:"type",get:function(){return this.state.type}}]),t}(d.EventEmitter);t.Member=y},function(e,t,n){"use strict";e.exports=n(632)},function(e,t,n){!function(e){"use strict";function t(e){return Array.prototype.slice.call(e)}function n(e){return new Promise((function(t,n){e.onsuccess=function(){t(e.result)},e.onerror=function(){n(e.error)}}))}function r(e,t,r){var i,o=new Promise((function(o,a){n(i=e[t].apply(e,r)).then(o,a)}));return o.request=i,o}function i(e,t,n){var i=r(e,t,n);return i.then((function(e){if(e)return new l(e,i.request)}))}
2function 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 a(e,t,n,i){i.forEach((function(i){i in n.prototype&&(e.prototype[i]=function(){return r(this[t],i,arguments)})}))}function s(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 u(e,t,n,r){r.forEach((function(r){r in n.prototype&&(e.prototype[r]=function(){return i(this[t],r,arguments)})}))}function c(e){this._index=e}function l(e,t){this._cursor=e,this._request=t}function f(e){this._store=e}function h(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 h(n)}function p(e){this._db=e}function v(e,t,n){var i=r(indexedDB,"open",[e,t]),o=i.request;return o&&(o.onupgradeneeded=function(e){n&&n(new d(o.result,e.oldVersion,o.transaction))}),i.then((function(e){return new p(e)}))}function y(e){return r(indexedDB,"deleteDatabase",[e])}o(c,"_index",["name","keyPath","multiEntry","unique"]),a(c,"_index",IDBIndex,["get","getKey","getAll","getAllKeys","count"]),u(c,"_index",IDBIndex,["openCursor","o
2penKeyCursor"]),o(l,"_cursor",["direction","key","primaryKey","value"]),a(l,"_cursor",IDBCursor,["update","delete"]),["advance","continue","continuePrimaryKey"].forEach((function(e){e in IDBCursor.prototype&&(l.prototype[e]=function(){var t=this,r=arguments;return Promise.resolve().then((function(){return t._cursor[e].apply(t._cursor,r),n(t._request).then((function(e){if(e)return new l(e,t._request)}))}))})})),f.prototype.createIndex=function(){return new c(this._store.createIndex.apply(this._store,arguments))},f.prototype.index=function(){return new c(this._store.index.apply(this._store,arguments))},o(f,"_store",["name","keyPath","indexNames","autoIncrement"]),a(f,"_store",IDBObjectStore,["put","add","delete","clear","get","getAll","getKey","getAllKeys","count"]),u(f,"_store",IDBObjectStore,["openCursor","openKeyCursor"]),s(f,"_store",IDBObjectStore,["deleteIndex"]),h.prototype.objectStore=function(){return new f(this._tx.objectStore.apply(this._tx,arguments))},o(h,"_tx",["objectStoreNames","mode"]),s(h,"_tx",IDBTransaction,["abort"]),d.prototype.createObjectStore=function(){return new f(this._db.createObjectStore.apply(this._db,arguments))},o(d,"_db",["name","version","objectStoreNames"]),s(d,"_db",IDBDatabase,["deleteObjectStore","close"]),p.prototype.transaction=function(){return new h(this._db.transaction.apply(this._db,arguments))},o(p,"_db",["name","version","objectStoreNames"]),s(p,"_db",IDBDatabase,["close"]),["openCursor","o
2penKeyCursor"].forEach((function(e){[f,c].forEach((function(n){e in n.prototype&&(n.prototype[e.replace("open","iterate")]=function(){var n=t(arguments),r=n[n.length-1],i=this._store||this._index,o=i[e].apply(i,n.slice(0,-1));o.onsuccess=function(){r(o.result)}})}))})),[c,f].forEach((function(e){e.prototype.getAll||(e.prototype.getAll=function(e,t){var n=this,r=[];return new Promise((function(i){n.iterateCursor(e,(function(e){e?(r.push(e.value),void 0===t||r.length!=t?e.continue():i(r)):i(r)}))}))})})),e.openDb=v,e.deleteDb=y,Object.defineProperty(e,"__esModule",{value:!0})}(t)},function(e,t,n){"use strict";(function(e){var r=n(12),i=n(13),o=n(18),a=n.n(o),s="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof e?e:"undefined"!=typeof self?self:{};function u(e,t){return e(t={exports:{}},t.exports),t.exports}var c=u((function(e){function t(n){return"function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?e.exports=t=function(e){return typeof e}:e.exports=t=function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},t(n)}e.exports=t})),l=u((function(e){var t=function(e){var t,n=Object.prototype,r=n.hasOwnProperty,i="function"==typeof Symbol?Symbol:{},o=i.iterator||"@@iterator",a=i.asyncIterator||"@@asyncIterator",s=i.toStringTag||"@@toStringTag";function u(e,t,n,r){var i=t&&t.prototype instanceof v?t:v,o=Object.create(i.prototype),a=new C(r||[]);return o._invoke=function(e,t,n){var r=l;return function(i,o){if(r===h)throw new Error("Generator is already running");if(r===d){if("throw"===i)throw o;return x()}for(n.method=i,n.arg=o;;){var a=n.delegate;if(a){var s=O(a,n);if(s){if(s===p)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(r===l)throw r=d,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r=h;var u=c(e,t,n);if("normal"===u.type){if(r=n.done?d:f,u.arg===p)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(r=d,n.method="throw",n.arg=u.arg)}}}(e,n,a),o}function c(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}e.wrap=u;var l="suspendedStart",f="suspendedYield",h="executing",d="completed",p={};function v(){}function y(){}function m(){}var g={};g[o]=function(){return this};var b=Object.getPrototypeOf,_=b&&b(b(P([])));_&&_!==n&&r.call(_,o)&&(g=_);var w=m.prototype=v.prototype=Object.create(g);function k(e){["next","throw","return"].forEach((function(t){e[t]=function(e){return this._invoke(t,e)}}))}function S(e){var t;this._invoke=function(n,i){function o(){return new Promise((function(t,o){!function t(n,i,o,a){var s=c(e[n],e,i);if("throw"!==s.type){var u=s.arg,l=u.value;return l&&"object"==typeof l&&r.call(l,"__await")?Promise.resolve(l.__await).then((function(e){t("next",e,o,a)}),(function(e){t("throw",e,o,a)})):Promise.resolve(l).then((function(e){u.value=e,o(u)}),(function(e){return t("throw",e,o,a)}))}a(s.arg)}(n,i,t,o)}))}return t=t?t.then(o,o):o()}}function O(e,n){var r=e.iterator[n.method];if(r===t){if(n.delegate=null,"throw"===n.method){if(e.iterator.return&&(n.method="return",n.arg=t,O(e,n),"throw"===n.method))return p;n.method="throw",n.arg=new TypeError("The iterator does not provide a 'throw' method")}return p}var i=c(r,e.iterator,n.arg);if("throw"===i.type)return n.method="throw",n.arg=i.arg,n.delegate=null,p;var o=i.arg;return o?o.done?(n[e.resultName]=o.value,n.next=e.nextLoc,"return"!==n.method&&(n.method="next",n.arg=t),n.delegate=null,p):o:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,p)}function E(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 T(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function C(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(E,this),this.reset(!0)}function P(e){if(e){var n=e[o];if(n)return n.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var i=-1,a=function n(){for(;++i<e.length;)if(r.call(e,i))return n.value=e[i],n.done=!1,n;return n.value=t,n.done=!0,n};return a.next=a}}return{next:x}}function x(){return{value:t,done:!0}}return y.prototype=w.constructor=m,m.constructor=y,m[s]=y.displayName="GeneratorFunction",e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===y||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,m):(e.__proto__=m,s in e||(e[s]="GeneratorFunction")),e.prototype=Object.create(w),e},e.awrap=function(e){return{__await:e}},k(S.prototype),S.prototype[a]=function(){return this},e.AsyncIterator=S,e.async=function(t,n,r,i){var o=new S(u(t,n,r,i));return e.isGeneratorFunction(n)?o:o.next().then((function(e){return e.done?e.value:o.next()}))},k(w),w[s]="Generator",w[o]=function(){return this},w.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=P,C.prototype={constructor:C,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEac
2h(T),!e)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=t)},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 n=this;function i(r,i){return s.type="throw",s.arg=e,n.next=r,i&&(n.method="next",n.arg=t),!!i}for(var o=this.tryEntries.length-1;o>=0;--o){var a=this.tryEntries[o],s=a.completion;if("root"===a.tryLoc)return i("end");if(a.tryLoc<=this.prev){var u=r.call(a,"catchLoc"),c=r.call(a,"finallyLoc");if(u&&c){if(this.prev<a.catchLoc)return i(a.catchLoc,!0);if(this.prev<a.finallyLoc)return i(a.finallyLoc)}else if(u){if(this.prev<a.catchLoc)return i(a.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return i(a.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&r.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=e,a.arg=t,o?(this.method="next",this.next=o.finallyLoc,p):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),p},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),T(n),p}},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 i=r.arg;T(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(e,n,r){return this.delegate={iterator:P(e),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=t),p}},e}(e.exports);try{regeneratorRuntime=t}catch(e){Function("r","regeneratorRuntime = r")(t)}}));function f(e,t,n,r,i,o,a){try{var s=e[o](a),u=s.value}catch(e){return void n(e)}s.done?t(u):Promise.resolve(u).then(r,i)}var h=function(e){return function(){var t=this,n=arguments;return new Promise((function(r,i){var o=e.apply(t,n);function a(e){f(o,r,i,a,s,"next",e)}function s(e){f(o,r,i,a,s,"throw",e)}a(void 0)}))}},d=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},p=function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e},v=function(e,t){return!t||"object"!==c(t)&&"function"!=typeof t?p(e):t},y=u((function(e){function t(n){return e.exports=t=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},t(n)}e.exports=t}));function m(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var g=function(e,t,n){return t&&m(e.prototype,t),n&&m(e,n),e},b=u((function(e){function t(n,r){return e.exports=t=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},t(n,r)}e.exports=t})),_=function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&b(e,t)},w=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},k="function"==typeof Map,S="function"==typeof Set,O="function"==typeof WeakSet,E=Object.keys,T=function(e,t){return e&&"object"==typeof e&&t.add(e)},C=function(e,t,n,r){for(var i,o=0;o<e.length;o++)if(n((i=e[o])[0],t[0],r)&&n(i[1],t[1],r))return!0;return!1},P=function(e,t,n,r){for(var i=0;i<e.length;i++)if(n(e[i],t,r))return!0;return!1},x=function(e,t){return e===t||e!=e&&t!=t},I=function(e){return e.constructor===Object},j=function(e){return"function"==typeof e.then},R=function(e){return!(!e.$$typeof||!e._store)},A=function(e){return function(t){var n=e||t;return function(e,t,r){void 0===r&&(r=O?new WeakSet:Object.create({_values:[],add:function(e){this._values.push(e)},has:function(e){return!!~this._values.indexOf(e)}}));var i=r.has(e),o=r.has(t);return i||o?i&&o:(T(e,r),T(t,r),n(e,t,r))}}},M=function(e){var t=[];return e.forEach((function(e,n){return t.push([n,e])})),t},N=function(e){var t=[];return e.forEach((function(e){return t.push(e)})),t},L=function(e,t,n,r){var i,o=E(e),a=E(t);if(o.length!==a.length)return!1;for(var s=0;s<o.length;s++){if(i=o[s],!P(a,i,x))return!1;
2if(("_owner"!==i||!R(e)||!R(t))&&!n(e[i],t[i],r))return!1}return!0},D=Array.isArray,F=function(e){var t="function"==typeof e?e(n):n;function n(e,n,r){if(x(e,n))return!0;var i=typeof e;if(i!==typeof n||"object"!==i||!e||!n)return!1;if(I(e)&&I(n))return L(e,n,t,r);var o=D(e),a=D(n);if(o||a)return o===a&&function(e,t,n,r){if(e.length!==t.length)return!1;for(var i=0;i<e.length;i++)if(!n(e[i],t[i],r))return!1;return!0}(e,n,t,r);var s=e instanceof Date,u=n instanceof Date;if(s||u)return s===u&&x(e.getTime(),n.getTime());var c=e instanceof RegExp,l=n instanceof RegExp;if(c||l)return c===l&&function(e,t){return e.source===t.source&&e.global===t.global&&e.ignoreCase===t.ignoreCase&&e.multiline===t.multiline&&e.unicode===t.unicode&&e.sticky===t.sticky&&e.lastIndex===t.lastIndex}(e,n);if(j(e)||j(n))return e===n;if(k){var f=e instanceof Map,h=n instanceof Map;if(f||h)return f===h&&function(e,t,n,r){if(e.size!==t.size)return!1;for(var i=M(e),o=M(t),a=0;a<i.length;a++)if(!C(o,i[a],n,r)||!C(i,o[a],n,r))return!1;return!0}(e,n,t,r)}if(S){var d=e instanceof Set,p=n instanceof Set;if(d||p)return d===p&&function(e,t,n,r){if(e.size!==t.size)return!1;for(var i=N(e),o=N(t),a=0;a<i.length;a++)if(!P(o,i[a],n,r)||!P(i,o[a],n,r))return!1;return!0}(e,n,t,r)}return L(e,n,t,r)}return n},U=(F(A()),F(A(x)),F());F((function(){return x}));var V=function(e,t){for(var n=-1,r=null==e?0:e.length,i=0,o=[];++n<r;){var a=e[n];t(a,n,e)&&(o[i++]=a)}return o},B=function(e,t,n){for(var r=-1,i=Object(e),o=n(e),a=o.length;a--;){var s=o[++r];if(!1===t(i[s],s,i))break}return e},q="object"==typeof s&&s&&s.Object===Object&&s,W="object"==typeof self&&self&&self.Object===Object&&self,z=q||W||Function("return this")(),H=z.Symbol,G=Object.prototype,K=G.hasOwnProperty,Y=G.toString,Q=H?H.toStringTag:void 0,$=Object.prototype.toString,X=H?H.toStringTag:void 0,J=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":X&&X in Object(e)?function(e){var t=K.call(e,Q),n=e[Q];try{e[Q]=void 0;var r=!0}catch(e){}var i=Y.call(e);return r&&(t?e[Q]=n:delete e[Q]),i}(e):function(e){return $.call(e)}(e)},Z=function(e){return null!=e&&"object"==typeof e},ee=function(e){return Z(e)&&"[object Arguments]"==J(e)},te=Object.prototype,ne=te.hasOwnProperty,re=te.propertyIsEnumerable,ie=ee(function(){return arguments}())?ee:function(e){return Z(e)&&ne.call(e,"callee")&&!re.call(e,"callee")},oe=Array.isArray,ae=function(){return!1},se=u((function(e,t){var n=t&&!t.nodeType&&t,r=n&&e&&!e.nodeType&&e,i=r&&r.exports===n?z.Buffer:void 0,o=(i?i.isBuffer:void 0)||ae;e.exports=o})),ue=/^(?:0|[1-9]\d*)$/,ce=function(e,t){var n=typeof e;return!!(t=null==t?9007199254740991:t)&&("number"==n||"symbol"!=n&&ue.test(e))&&e>-1&&e%1==0&&e<t},le=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991},fe={};fe["[object Float32Array]"]=fe["[object Float64Array]"]=fe["[object Int8Array]"]=fe["[object Int16Array]"]=fe["[object Int32Array]"]=fe["[object Uint8Array]"]=fe["[object Uint8ClampedArray]"]=fe["[object Uint16Array]"]=fe["[object Uint32Array]"]=!0,fe["[object Arguments]"]=fe["[object Array]"]=fe["[object ArrayBuffer]"]=fe["[object Boolean]"]=fe["[object DataView]"]=fe["[object Date]"]=fe["[object Error]"]=fe["[object Function]"]=fe["[object Map]"]=fe["[object Number]"]=fe["[object Object]"]=fe["[object RegExp]"]=fe["[object Set]"]=fe["[object String]"]=fe["[object WeakMap]"]=!1;var he,de,pe=function(e){return function(t){return e(t)}},ve=u((function(e,t){var n=t&&!t.nodeType&&t,r=n&&e&&!e.nodeType&&e,i=r&&r.exports===n&&q.process,o=function(){try{return r&&r.require&&r.require("util").types||i&&i.binding&&i.binding("util")}catch(e){}}();e.exports=o})),ye=ve&&ve.isTypedArray,me=ye?pe(ye):function(e){return Z(e)&&le(e.length)&&!!fe[J(e)]},ge=Object.prototype.hasOwnProperty,be=function(e,t){var n=oe(e),r=!n&&ie(e),i=!n&&!r&&se(e),o=!n&&!r&&!i&&me(e),a=n||r||i||o,s=a?function(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}(e.length,String):[],u=s.length;for(var c in e)!t&&!ge.call(e,c)||a&&("length"==c||i&&("offset"==c||"parent"==c)||o&&("buffer"==c||"byteLength"==c||"byteOffset"==c)||ce(c,u))||s.push(c);return s},_e=Object.prototype,we=(he=Object.keys,de=Object,function(e){return he(de(e))}),ke=Object.prototype.hasOwnProperty,Se=function(e){if(!function(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||_e)}(e))return we(e);var t=[];for(var n in Object(e))ke.call(e,n)&&"constructor"!=n&&t.push(n);return t},Oe=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)},Ee=function(e){if(!Oe(e))return!1;var t=J(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t},Te=function(e){return null!=e&&le(e.length)&&!Ee(e)},Ce=function(e){return Te(e)?be(e):Se(e)},Pe=function(e,t){if(null==e)return e;if(!Te(e))return function(e,t){return e&&B(e,t,Ce)}(e,t);for(var n=e.length,r=-1,i=Object(e);++r<n&&!1!==t(i[r],r,i););return e},xe=function(e,t){var n=[];return Pe(e,(function(e,r,i){t(e,r,i)&&n.push(e)})),n},Ie=function(e,t){return e===t||e!=e&&t!=t},je=function(e,t){for(var n=e.length;n--;)if(Ie(e[n][0],t))return n;return-1},Re=Array.prototype.splice;function Ae(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}Ae.prototype.clear=function(){this.__data__=[],this.size=0},Ae.prototype.delete=function(e){var t=this.__data__,n=je(t,e);return!(n<0||(n==t.length-1?t.pop():Re.call(t,n,1),--this.size,0))},Ae.prototype.get=function(e){var t=this.__data__,n=je(t,e);return n<0?void 0:t[n][1]},Ae.prototype.has=function(e){return je(this.__data__,e)>-1},Ae.prototype.set=function(e,t){var n=this.__data__,r=je(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this};var Me,Ne=Ae,Le=z["__core-js_shared__"],De=(Me=/[^.]+$/.exec(Le&&Le.keys&&Le.keys.IE_PROTO||""))?"Symbol(sr
2c)_1."+Me:"",Fe=Function.prototype.toString,Ue=function(e){if(null!=e){try{return Fe.call(e)}catch(e){}try{return e+""}catch(e){}}return""},Ve=/^\[object .+?Constructor\]$/,Be=Function.prototype,qe=Object.prototype,We=Be.toString,ze=qe.hasOwnProperty,He=RegExp("^"+We.call(ze).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Ge=function(e){return!(!Oe(e)||function(e){return!!De&&De in e}(e))&&(Ee(e)?He:Ve).test(Ue(e))},Ke=function(e,t){var n=function(e,t){return null==e?void 0:e[t]}(e,t);return Ge(n)?n:void 0},Ye=Ke(z,"Map"),Qe=Ke(Object,"create"),$e=Object.prototype.hasOwnProperty,Xe=Object.prototype.hasOwnProperty;function Je(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}Je.prototype.clear=function(){this.__data__=Qe?Qe(null):{},this.size=0},Je.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},Je.prototype.get=function(e){var t=this.__data__;if(Qe){var n=t[e];return"__lodash_hash_undefined__"===n?void 0:n}return $e.call(t,e)?t[e]:void 0},Je.prototype.has=function(e){var t=this.__data__;return Qe?void 0!==t[e]:Xe.call(t,e)},Je.prototype.set=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=Qe&&void 0===t?"__lodash_hash_undefined__":t,this};var Ze=Je,et=function(e,t){var n=e.__data__;return function(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}(t)?n["string"==typeof t?"string":"hash"]:n.map};function tt(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}tt.prototype.clear=function(){this.size=0,this.__data__={hash:new Ze,map:new(Ye||Ne),string:new Ze}},tt.prototype.delete=function(e){var t=et(this,e).delete(e);return this.size-=t?1:0,t},tt.prototype.get=function(e){return et(this,e).get(e)},tt.prototype.has=function(e){return et(this,e).has(e)},tt.prototype.set=function(e,t){var n=et(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this};var nt=tt;function rt(e){var t=this.__data__=new Ne(e);this.size=t.size}rt.prototype.clear=function(){this.__data__=new Ne,this.size=0},rt.prototype.delete=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},rt.prototype.get=function(e){return this.__data__.get(e)},rt.prototype.has=function(e){return this.__data__.has(e)},rt.prototype.set=function(e,t){var n=this.__data__;if(n instanceof Ne){var r=n.__data__;if(!Ye||r.length<199)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new nt(r)}return n.set(e,t),this.size=n.size,this};var it=rt;function ot(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new nt;++t<n;)this.add(e[t])}ot.prototype.add=ot.prototype.push=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this},ot.prototype.has=function(e){return this.__data__.has(e)};var at=ot,st=function(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1},ut=function(e,t){return e.has(t)},ct=function(e,t,n,r,i,o){var a=1&n,s=e.length,u=t.length;if(s!=u&&!(a&&u>s))return!1;var c=o.get(e);if(c&&o.get(t))return c==t;var l=-1,f=!0,h=2&n?new at:void 0;for(o.set(e,t),o.set(t,e);++l<s;){var d=e[l],p=t[l];if(r)var v=a?r(p,d,l,t,e,o):r(d,p,l,e,t,o);if(void 0!==v){if(v)continue;f=!1;break}if(h){if(!st(t,(function(e,t){if(!ut(h,t)&&(d===e||i(d,e,n,r,o)))return h.push(t)}))){f=!1;break}}else if(d!==p&&!i(d,p,n,r,o)){f=!1;break}}return o.delete(e),o.delete(t),f},lt=z.Uint8Array,ft=function(e){var t=-1,n=Array(e.size);return e.forEach((function(e,r){n[++t]=[r,e]})),n},ht=function(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=e})),n},dt=H?H.prototype:void 0,pt=dt?dt.valueOf:void 0,vt=Object.prototype.propertyIsEnumerable,yt=Object.getOwnPropertySymbols,mt=yt?function(e){return null==e?[]:(e=Object(e),V(yt(e),(function(t){return vt.call(e,t)})))}:function(){return[]},gt=function(e){return function(e,t,n){var r=t(e);return oe(e)?r:function(e,t){for(var n=-1,r=t.length,i=e.length;++n<r;)e[i+n]=t[n];return e}(r,n(e))}(e,Ce,mt)},bt=Object.prototype.hasOwnProperty,_t=Ke(z,"DataView"),wt=Ke(z,"Promise"),kt=Ke(z,"Set"),St=Ke(z,"WeakMap"),Ot=Ue(_t),Et=Ue(Ye),Tt=Ue(wt),Ct=Ue(kt),Pt=Ue(St),xt=J;(_t&&"[object DataView]"!=xt(new _t(new ArrayBuffer(1)))||Ye&&"[object Map]"!=xt(new Ye)||wt&&"[object Promise]"!=xt(wt.resolve())||kt&&"[object Set]"!=xt(new kt)||St&&"[object WeakMap]"!=xt(new St))&&(xt=function(e){var t=J(e),n="[object Object]"==t?e.constructor:void 0,r=n?Ue(n):"";if(r)switch(r){case Ot:return"[object DataView]";case Et:return"[object Map]";case Tt:return"[object Promise]";case Ct:return"[object Set]";case Pt:return"[object WeakMap]"}return t});var It=xt,jt="[object Arguments]",Rt="[object Array]",At="[object Object]",Mt=Object.prototype.hasOwnProperty,Nt=function(e,t,n,r,i,o){var a=oe(e),s=oe(t),u=a?Rt:It(e),c=s?Rt:It(t),l=(u=u==jt?At:u)==At,f=(c=c==jt?At:c)==At,h=u==c;if(h&&se(e)){if(!se(t))return!1;a=!0,l=!1}if(h&&!l)return o||(o=new it),a||me(e)?ct(e,t,n,r,i,o):function(e,t,n,r,i,o,a){switch(n){case"[object DataView]":if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case"[object ArrayBuffer]":return!(e.byteLength!=t.byteLength||!o(new lt(e),new lt(t)));case"[object Boolean]":case"[object Date]":case"[object Number]":return Ie(+e,+t);case"[object Error]":return e.name==t.name&&e.message==t.message;case"[object RegExp]":case"[object String]":return e==t+"";case"[object Map]":var s=ft;case"[object Set]":var u=1&r;if(s||(s=ht),e.size!=t.size&&!u)return!1;var c=a.get(e);if(c)return c==t;r|=2,a.set(e,t);var l=ct(s(e),s(t),r,i,o,a);return a.delete(e),l;case"[object Symbol]":if(pt)return pt.call(e)==pt.call(t)}return!1}(e,t,u,n,r,i,o);if(!(1&n)){var d=l&&Mt.call(e,"__wrapped__"),p=f&&Mt.call(t,"__wrapped__");
2if(d||p){var v=d?e.value():e,y=p?t.value():t;return o||(o=new it),i(v,y,n,r,o)}}return!!h&&(o||(o=new it),function(e,t,n,r,i,o){var a=1&n,s=gt(e),u=s.length;if(u!=gt(t).length&&!a)return!1;for(var c=u;c--;){var l=s[c];if(!(a?l in t:bt.call(t,l)))return!1}var f=o.get(e);if(f&&o.get(t))return f==t;var h=!0;o.set(e,t),o.set(t,e);for(var d=a;++c<u;){var p=e[l=s[c]],v=t[l];if(r)var y=a?r(v,p,l,t,e,o):r(p,v,l,e,t,o);if(!(void 0===y?p===v||i(p,v,n,r,o):y)){h=!1;break}d||(d="constructor"==l)}if(h&&!d){var m=e.constructor,g=t.constructor;m!=g&&"constructor"in e&&"constructor"in t&&!("function"==typeof m&&m instanceof m&&"function"==typeof g&&g instanceof g)&&(h=!1)}return o.delete(e),o.delete(t),h}(e,t,n,r,i,o))},Lt=function e(t,n,r,i,o){return t===n||(null==t||null==n||!Z(t)&&!Z(n)?t!=t&&n!=n:Nt(t,n,r,i,e,o))},Dt=function(e){return e==e&&!Oe(e)},Ft=function(e,t){return function(n){return null!=n&&n[e]===t&&(void 0!==t||e in Object(n))}},Ut=function(e){var t=function(e){for(var t=Ce(e),n=t.length;n--;){var r=t[n],i=e[r];t[n]=[r,i,Dt(i)]}return t}(e);return 1==t.length&&t[0][2]?Ft(t[0][0],t[0][1]):function(n){return n===e||function(e,t,n,r){var i=n.length,o=i,a=!r;if(null==e)return!o;for(e=Object(e);i--;){var s=n[i];if(a&&s[2]?s[1]!==e[s[0]]:!(s[0]in e))return!1}for(;++i<o;){var u=(s=n[i])[0],c=e[u],l=s[1];if(a&&s[2]){if(void 0===c&&!(u in e))return!1}else{var f=new it;if(r)var h=r(c,l,u,e,t,f);if(!(void 0===h?Lt(l,c,3,r,f):h))return!1}}return!0}(n,e,t)}},Vt=function(e){return"symbol"==typeof e||Z(e)&&"[object Symbol]"==J(e)},Bt=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,qt=/^\w*$/,Wt=function(e,t){if(oe(e))return!1;var n=typeof e;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=e&&!Vt(e))||qt.test(e)||!Bt.test(e)||null!=t&&e in Object(t)};function zt(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new TypeError("Expected a function");var n=function n(){var r=arguments,i=t?t.apply(this,r):r[0],o=n.cache;if(o.has(i))return o.get(i);var a=e.apply(this,r);return n.cache=o.set(i,a)||o,a};return n.cache=new(zt.Cache||nt),n}zt.Cache=nt;var Ht=zt,Gt=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Kt=/\\(\\)?/g,Yt=function(e){var t=Ht((function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(Gt,(function(e,n,r,i){t.push(r?i.replace(Kt,"$1"):n||e)})),t}),(function(e){return 500===n.size&&n.clear(),e})),n=t.cache;return t}(),Qt=function(e,t){for(var n=-1,r=null==e?0:e.length,i=Array(r);++n<r;)i[n]=t(e[n],n,e);return i},$t=H?H.prototype:void 0,Xt=$t?$t.toString:void 0,Jt=function e(t){if("string"==typeof t)return t;if(oe(t))return Qt(t,e)+"";if(Vt(t))return Xt?Xt.call(t):"";var n=t+"";return"0"==n&&1/t==-Infinity?"-0":n},Zt=function(e){return null==e?"":Jt(e)},en=function(e,t){return oe(e)?e:Wt(e,t)?[e]:Yt(Zt(e))},tn=function(e){if("string"==typeof e||Vt(e))return e;var t=e+"";return"0"==t&&1/e==-Infinity?"-0":t},nn=function(e,t){for(var n=0,r=(t=en(t,e)).length;null!=e&&n<r;)e=e[tn(t[n++])];return n&&n==r?e:void 0},rn=function(e,t){return null!=e&&t in Object(e)},on=function(e,t){return null!=e&&function(e,t,n){for(var r=-1,i=(t=en(t,e)).length,o=!1;++r<i;){var a=tn(t[r]);if(!(o=null!=e&&n(e,a)))break;e=e[a]}return o||++r!=i?o:!!(i=null==e?0:e.length)&&le(i)&&ce(a,i)&&(oe(e)||ie(e))}(e,t,rn)},an=function(e,t){return Wt(e)&&Dt(t)?Ft(tn(e),t):function(n){var r=function(e,t,n){var r=null==e?void 0:nn(e,t);return void 0===r?n:r}(n,e);return void 0===r&&r===t?on(n,e):Lt(t,r,3)}},sn=function(e){return e},un=function(e){return Wt(e)?function(e){return function(t){return null==t?void 0:t[e]}}(tn(e)):function(e){return function(t){return nn(t,e)}}(e)},cn=function(e){return"function"==typeof e?e:null==e?sn:"object"==typeof e?oe(e)?an(e[0],e[1]):Ut(e):un(e)},ln=function(e,t){return(oe(e)?V:xe)(e,cn(t))},fn=function(e,t){if(e!==t){var n=void 0!==e,r=null===e,i=e==e,o=Vt(e),a=void 0!==t,s=null===t,u=t==t,c=Vt(t);if(!s&&!c&&!o&&e>t||o&&a&&u&&!s&&!c||r&&a&&u||!n&&u||!i)return 1;if(!r&&!o&&!c&&e<t||c&&n&&i&&!r&&!o||s&&n&&i||!a&&i||!u)return-1}return 0},hn=function(e,t,n){var r=-1;
2return t=Qt(t.length?t:[sn],pe(cn)),function(e,t){var n=e.length;for(e.sort(t);n--;)e[n]=e[n].value;return e}(function(e,t){var n=-1,r=Te(e)?Array(e.length):[];return Pe(e,(function(e,i,o){r[++n]=t(e,i,o)})),r}(e,(function(e,n,i){return{criteria:Qt(t,(function(t){return t(e)})),index:++r,value:e}})),(function(e,t){return function(e,t,n){for(var r=-1,i=e.criteria,o=t.criteria,a=i.length,s=n.length;++r<a;){var u=fn(i[r],o[r]);if(u)return r>=s?u:u*("desc"==n[r]?-1:1)}return e.index-t.index}(e,t,n)}))},dn=function(e,t,n,r){return null==e?[]:(oe(t)||(t=null==t?[]:[t]),oe(n=r?void 0:n)||(n=null==n?[]:[n]),hn(e,t,n))},pn="new",vn="loading",yn="joining-meeting",mn="joined-meeting",gn="left-meeting",bn="error",_n="fullscreen",wn="exited-fullscreen",kn="daily-custom-track",Sn={"Amazon Silk":"amazon_silk","Android Browser":"android",Bada:"bada",BlackBerry:"blackberry",Chrome:"chrome",Chromium:"chromium",Electron:"electron",Epiphany:"epiphany",Firefox:"firefox",Focus:"focus",Generic:"generic","Google Search":"google_search",Googlebot:"googlebot","Internet Explorer":"ie","K-Meleon":"k_meleon",Maxthon:"maxthon","Microsoft Edge":"edge","MZ Browser":"mz","NAVER Whale Browser":"naver",Opera:"opera","Opera Coast":"opera_coast",PhantomJS:"phantomjs",Puffin:"puffin",QupZilla:"qupzilla",QQ:"qq",QQLite:"qqlite",Safari:"safari",Sailfish:"sailfish","Samsung Internet for Android":"samsung_internet",SeaMonkey:"seamonkey",Sleipnir:"sleipnir",Swing:"swing",Tizen:"tizen","UC Browser":"uc",Vivaldi:"vivaldi","WebOS Browser":"webos",WeChat:"wechat","Yandex Browser":"yandex",Roku:"roku"},On={amazon_silk:"Amazon Silk",android:"Android Browser",bada:"Bada",blackberry:"BlackBerry",chrome:"Chrome",chromium:"Chromium",electron:"Electron",epiphany:"Epiphany",firefox:"Firefox",focus:"Focus",generic:"Generic",googlebot:"Googlebot",google_search:"Google Search",ie:"Internet Explorer",k_meleon:"K-Meleon",maxthon:"Maxthon",edge:"Microsoft Edge",mz:"MZ Browser",naver:"NAVER Whale Browser",opera:"Opera",opera_coast:"Opera Coast",phantomjs:"PhantomJS",puffin:"Puffin",qupzilla:"QupZilla",qq:"QQ Browser",qqlite:"QQ Browser Lite",safari:"Safari",sailfish:"Sailfish",samsung_internet:"Samsung Internet for Android",seamonkey:"SeaMonkey",sleipnir:"Sleipnir",swing:"Swing",tizen:"Tizen",uc:"UC Browser",vivaldi:"Vivaldi",webos:"WebOS Browser",wechat:"WeChat",yandex:"Yandex Browser"},En={tablet:"tablet",mobile:"mobile",desktop:"desktop",tv:"tv"},Tn={WindowsPhone:"Windows Phone",Windows:"Windows",MacOS:"macOS",iOS:"iOS",Android:"Android",WebOS:"WebOS",BlackBerry:"BlackBerry",Bada:"Bada",Tizen:"Tizen",Linux:"Linux",ChromeOS:"Chrome OS",PlayStation4:"PlayStation 4",Roku:"Roku"},Cn={EdgeHTML:"EdgeHTML",Blink:"Blink",Trident:"Trident",Presto:"Presto",Gecko:"Gecko",WebKit:"WebKit"},Pn=function(){function e(){Object(r.a)(this,e)}return Object(i.a)(e,null,[{key:"getFirstMatch",value:function(e,t){var n=t.match(e);return n&&n.length>0&&n[1]||""}},{key:"getSecondMatch",value:function(e,t){var n=t.match(e);return n&&n.length>1&&n[2]||""}},{key:"matchAndReturnConst",value:function(e,t,n){if(e.test(t))return n}},{key:"getWindowsVersionName",value:function(e){switch(e){case"NT":return"NT";case"XP":return"XP";case"NT 5.0":return"2000";case"NT 5.1":return"XP";case"NT 5.2":return"2003";case"NT 6.0":return"Vista";case"NT 6.1":return"7";case"NT 6.2":return"8";case"NT 6.3":return"8.1";case"NT 10.0":return"10";default:return}}},{key:"getMacOSVersionName",value:function(e){var t=e.split(".").splice(0,2).map((function(e){return parseInt(e,10)||0}));if(t.push(0),10===t[0])switch(t[1]){case 5:return"Leopard";case 6:return"Snow Leopard";case 7:return"Lion";case 8:return"Mountain Lion";case 9:return"Mavericks";case 10:return"Yosemite";case 11:return"El Capitan";case 12:return"Sierra";case 13:return"High Sierra";case 14:return"Mojave";case 15:return"Catalina";default:return}}},{key:"getAndroidVersionName",value:function(e){var t=e.split(".").splice(0,2).map((function(e){return parseInt(e,10)||0}));if(t.push(0),!(1===t[0]&&t[1]<5))return 1===t[0]&&t[1]<6?"Cupcake":1===t[0]&&t[1]>=6?"Donut":2===t[0]&&t[1]<2?"Eclair":2===t[0]&&2===t[1]?"Froyo":2===t[0]&&t[1]>2?"Gingerbread":3===t[0]?"Honeycomb":4===t[0]&&t[1]<1?"Ice Cream Sandwich":4===t[0]&&t[1]<4?"Jelly Bean":4===t[0]&&t[1]>=4?"KitKat":5===t[0]?"Lollipop":6===t[0]?"Marshmallow":7===t[0]?"Nougat":8===t[0]?"Oreo":9===t[0]?"Pie":void 0}},{key:"getVersionPrecision",value:function(e){return e.split(".").length}},{key:"compareVersions",value:function(t,n){var r=arguments.length>2&&void 0!==arguments[2]&&arguments[2],i=e.getVersionPrecision(t),o=e.getVersionPrecision(n),a=Math.max(i,o),s=0,u=e.map([t,n],(function(t){var n=a-e.getVersionPrecision(t),r=t+new Array(n+1).join(".0");return e.map(r.split("."),(function(e){return new Array(20-e.length).join("0")+e})).reverse()}));for(r&&(s=a-Math.min(i,o)),a-=1;a>=s;){if(u[0][a]>u[1][a])return 1;if(u[0][a]===u[1][a]){if(a===s)return 0;a-=1}else if(u[0][a]<u[1][a])return-1}}},{key:"map",value:function(e,t){var n,r=[];if(Array.prototype.map)return Array.prototype.map.call(e,t);for(n=0;n<e.length;n+=1)r.push(t(e[n]));return r}},{key:"find",value:function(e,t){var n,r;if(Array.prototype.find)return Array.prototype.find.call(e,t);for(n=0,r=e.length;n<r;n+=1){var i=e[n];if(t(i,n))return i}}},{key:"assign",value:function(e){for(var t,n,r=e,i=arguments.length,o=new Array(i>1?i-1:0),a=1;a<i;a++)o[a-1]=arguments[a];if(Object.assign)return Object.assign.apply(Object,[e].concat(o));var s=function(){var e=o[t];"object"==typeof e&&null!==e&&Object.keys(e).forEach((function(t){r[t]=e[t]}))};for(t=0,n=o.length;t<n;t+=1)s();return e}},{key:"getBrowserAlias",value:function(e){return Sn[e]}},{key:"getBrowserTypeByAlias",value:function(e){return On[e]||""}}]),e}(),xn=/version\/(\d+(\.?_?\d+)+)/i,In=[{test:[/googlebot/i],describe:function(e){var t={name:"Googlebot"},n=Pn.getFirstMatch(/googlebot\/(\d+(\.\d+))/i,e)||Pn.getFirstMatch(xn,e);return n&&(t.version=n),t}},{test:[/opera/i],describe:function(e){var t={name:"Opera"},n=Pn.getFirstMatch(xn,e)||Pn.getFirstMatch(/(?:opera)[\s\/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/opr\/|opios/i],describe:function(e){var t={name:"Opera"},n=Pn.getFirstMatch(/(?:opr|opios)[\s\/](\S+)/i,e)||Pn.getFirstMatch(xn,e);return n&&(t.version=n),t}},{test:[/SamsungBrowser/i],describe:function(e){var t={name:"Samsung Internet for Android"},n=Pn.getFirstMatch(xn,e)||Pn.getFirstMatch(/(?:SamsungBrowser)[\s\/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/Whale/i],describe:function(e){var t={name:"NAVER Whale Browser"},n=Pn.getFirstMatch(xn,e)||Pn.getFirstMatch(/(?:whale)[\s\/](\d+(?:\.\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/MZBrowser/i],describe:function(e){var t={name:"MZ Browser"},n=Pn.getFirstMatch(/(?:MZBrowser)[\s\/](\d+(?:\.\d+)+)/i,e)||Pn.getFirstMatch(xn,e);return n&&(t.version=n),t}},{test:[/focus/i],describe:function(e){var t={name:"Focus"},n=Pn.getFirstMatch(/(?:focus)[\s\/](\d+(?:\.\d+)+)/i,e)||Pn.getFirstMatch(xn,e);return n&&(t.version=n),t}},{test:[/swing/i],describe:function(e){var t={name:"Swing"},n=Pn.getFirstMatch(/(?:swing)[\s\/](\d+(?:\.\d+)+)/i,e)||Pn.getFirstMatch(xn,e);return n&&(t.version=n),t}},{test:[/coast/i],describe:function(e){var t={name:"Opera Coast"},n=Pn.getFirstMatch(xn,e)||Pn.getFirstMatch(/(?:coast)[\s\/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/yabrowser/i],describe:function(e){var t={name:"Yandex Browser"},n=Pn.getFirstMatch(/(?:yabrowser)[\s\/](\d+(\.?_?\d+)+)/i,e)||Pn.getFirstMatch(xn,e);return n&&(t.version=n),t}},{test:[/ucbrowser/i],describe:function(e){var t={name:"UC Browser"},n=Pn.getFirstMatch(xn,e)||Pn.getFirstMatch(/(?:ucbrowser)[\s\/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/Maxthon|mxios/i],describe:function(e){var t={name:"Maxthon"}
2,n=Pn.getFirstMatch(xn,e)||Pn.getFirstMatch(/(?:Maxthon|mxios)[\s\/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/epiphany/i],describe:function(e){var t={name:"Epiphany"},n=Pn.getFirstMatch(xn,e)||Pn.getFirstMatch(/(?:epiphany)[\s\/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/puffin/i],describe:function(e){var t={name:"Puffin"},n=Pn.getFirstMatch(xn,e)||Pn.getFirstMatch(/(?:puffin)[\s\/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/sleipnir/i],describe:function(e){var t={name:"Sleipnir"},n=Pn.getFirstMatch(xn,e)||Pn.getFirstMatch(/(?:sleipnir)[\s\/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/k-meleon/i],describe:function(e){var t={name:"K-Meleon"},n=Pn.getFirstMatch(xn,e)||Pn.getFirstMatch(/(?:k-meleon)[\s\/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/micromessenger/i],describe:function(e){var t={name:"WeChat"},n=Pn.getFirstMatch(/(?:micromessenger)[\s\/](\d+(\.?_?\d+)+)/i,e)||Pn.getFirstMatch(xn,e);return n&&(t.version=n),t}},{test:[/qqbrowser/i],describe:function(e){var t={name:/qqbrowserlite/i.test(e)?"QQ Browser Lite":"QQ Browser"},n=Pn.getFirstMatch(/(?:qqbrowserlite|qqbrowser)[\/](\d+(\.?_?\d+)+)/i,e)||Pn.getFirstMatch(xn,e);return n&&(t.version=n),t}},{test:[/msie|trident/i],describe:function(e){var t={name:"Internet Explorer"},n=Pn.getFirstMatch(/(?:msie |rv:)(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/\sedg\//i],describe:function(e){var t={name:"Microsoft Edge"},n=Pn.getFirstMatch(/\sedg\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/edg([ea]|ios)/i],describe:function(e){var t={name:"Microsoft Edge"},n=Pn.getSecondMatch(/edg([ea]|ios)\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/vivaldi/i],describe:function(e){var t={name:"Vivaldi"},n=Pn.getFirstMatch(/vivaldi\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/seamonkey/i],describe:function(e){var t={name:"SeaMonkey"},n=Pn.getFirstMatch(/seamonkey\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/sailfish/i],describe:function(e){var t={name:"Sailfish"},n=Pn.getFirstMatch(/sailfish\s?browser\/(\d+(\.\d+)?)/i,e);return n&&(t.version=n),t}},{test:[/silk/i],describe:function(e){var t={name:"Amazon Silk"},n=Pn.getFirstMatch(/silk\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/phantom/i],describe:function(e){var t={name:"PhantomJS"},n=Pn.getFirstMatch(/phantomjs\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/slimerjs/i],describe:function(e){var t={name:"SlimerJS"},n=Pn.getFirstMatch(/slimerjs\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/blackberry|\bbb\d+/i,/rim\stablet/i],describe:function(e){var t={name:"BlackBerry"},n=Pn.getFirstMatch(xn,e)||Pn.getFirstMatch(/blackberry[\d]+\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/(web|hpw)[o0]s/i],describe:function(e){var t={name:"WebOS Browser"},n=Pn.getFirstMatch(xn,e)||Pn.getFirstMatch(/w(?:eb)?[o0]sbrowser\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/bada/i],describe:function(e){var t={name:"Bada"},n=Pn.getFirstMatch(/dolfin\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/tizen/i],describe:function(e){var t={name:"Tizen"},n=Pn.getFirstMatch(/(?:tizen\s?)?browser\/(\d+(\.?_?\d+)+)/i,e)||Pn.getFirstMatch(xn,e);return n&&(t.version=n),t}},{test:[/qupzilla/i],describe:function(e){var t={name:"QupZilla"},n=Pn.getFirstMatch(/(?:qupzilla)[\s\/](\d+(\.?_?\d+)+)/i,e)||Pn.getFirstMatch(xn,e);return n&&(t.version=n),t}},{test:[/firefox|iceweasel|fxios/i],describe:function(e){var t={name:"Firefox"},n=Pn.getFirstMatch(/(?:firefox|iceweasel|fxios)[\s\/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/electron/i],describe:function(e){var t={name:"Electron"},n=Pn.getFirstMatch(/(?:electron)\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/chromium/i],describe:function(e){var t={name:"Chromium"},n=Pn.getFirstMatch(/(?:chromium)[\s\/](\d+(\.?_?\d+)+)/i,e)||Pn.getFirstMatch(xn,e);return n&&(t.version=n),t}},{test:[/chrome|crios|crmo/i],describe:function(e){var t={name:"Chrome"},n=Pn.getFirstMatch(/(?:chrome|crios|crmo)\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/GSA/i],describe:function(e){var t={name:"Google Search"},n=Pn.getFirstMatch(/(?:GSA)\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:function(e){var t=!e.test(/like android/i),n=e.test(/android/i);return t&&n},describe:function(e){var t={name:"Android Browser"},n=Pn.getFirstMatch(xn,e);return n&&(t.version=n),t}},{test:[/playstation 4/i],describe:function(e){var t={name:"PlayStation 4"},n=Pn.getFirstMatch(xn,e);return n&&(t.version=n),t}},{test:[/safari|applewebkit/i],describe:function(e){var t={name:"Safari"},n=Pn.getFirstMatch(xn,e);return n&&(t.version=n),t}},{test:[/.*/i],describe:function(e){var t=-1!==e.search("\\(")?/^(.*)\/(.*)[ \t]\((.*)/:/^(.*)\/(.*) /;return{name:Pn.getFirstMatch(t,e),version:Pn.getSecondMatch(t,e)}}}],jn=[{test:[/Roku\/DVP/],describe:function(e){var t=Pn.getFirstMatch(/Roku\/DVP-(\d+\.\d+)/i,e);return{name:Tn.Roku,version:t}}},{test:[/windows phone/i],describe:function(e){var t=Pn.getFirstMatch(/windows phone (?:os)?\s?(\d+(\.\d+)*)/i,e);return{name:Tn.WindowsPhone,version:t}}},{test:[/windows /i],describe:function(e){var t=Pn.getFirstMatch(/Windows ((NT|XP)( \d\d?.\d)?)/i,e),n=Pn.getWindowsVersionName(t);return{name:Tn.Windows,version:t,versionName:n}}},{test:[/Macintosh(.*?) FxiOS(.*?) Version\//],describe:function(e){var t=Pn.getSecondMatch(/(Version\/)(\d[\d.]+)/,e);return{name:Tn.iOS,version:t}}},{test:[/macintosh/i],describe:function(e){var t=Pn.getFirstMatch(/mac os x (\d+(\.?_?\d+)+)/i,e).replace(/[_\s]/g,"."),n=Pn.getMacOSVersionName(t),r={name:Tn.MacOS,version:t};return n&&(r.versionName=n),r}},{test:[/(ipod|iphone|ipad)/i],describe:function(e){var t=Pn.getFirstMatch(/os (\d+([_\s]\d+)*) like mac os x/i,e).replace(/[_\s]/g,".");return{name:Tn.iOS,version:t}}},{test:function(e){var t=!e.test(/like android/i),n=e.test(/android/i);return t&&n},describe:function(e){var t=Pn.getFirstMatch(/android[\s\/-](\d+(\.\d+)*)/i,e),n=Pn.getAndroidVersionName(t),r={name:Tn.Android,version:t};return n&&(r.versionName=n),r}},{test:[/(web|hpw)[o0]s/i],describe:function(e){var t=Pn.getFirstMatch(/(?:web|hpw)[o0]s\/(\d+(\.\d+)*)/i,e),n={name:Tn.WebOS};return t&&t.length&&(n.version=t),n}},{test:[/blackberry|\bbb\d+/i,/rim\stablet/i],describe:function(e){var t=Pn.getFirstMatch(/rim\stablet\sos\s(\d+(\.\d+)*)/i,e)||Pn.getFirstMatch(/blackberry\d+\/(\d+([_\s]\d+)*)/i,e)||Pn.getFirstMatch(/\bbb(\d+)/i,e);return{name:Tn.BlackBerry,version:t}}},{test:[/bada/i],describe:function(e){var t=Pn.getFirstMatch(/bada\/(\d+(\.\d+)*)/i,e);return{name:Tn.Bada,version:t}}},{test:[/tizen/i],describe:function(e){var t=Pn.getFirstMatch(/tizen[\/\s](\d+(\.\d+)*)/i,e);return{name:Tn.Tizen,version:t}}},{test:[/linux/i],describe:function(){return{name:Tn.Linux}}},{test:[/CrOS/],describe:function(){return{name:Tn.ChromeOS}}},{test:[/PlayStation 4/],describe:function(e){var t=Pn.getFirstMatch(/PlayStation 4[\/\s](\d+(\.\d+)*)/i,e);
2return{name:Tn.PlayStation4,version:t}}}],Rn=[{test:[/googlebot/i],describe:function(){return{type:"bot",vendor:"Google"}}},{test:[/huawei/i],describe:function(e){var t=Pn.getFirstMatch(/(can-l01)/i,e)&&"Nova",n={type:En.mobile,vendor:"Huawei"};return t&&(n.model=t),n}},{test:[/nexus\s*(?:7|8|9|10).*/i],describe:function(){return{type:En.tablet,vendor:"Nexus"}}},{test:[/ipad/i],describe:function(){return{type:En.tablet,vendor:"Apple",model:"iPad"}}},{test:[/Macintosh(.*?) FxiOS(.*?) Version\//],describe:function(){return{type:En.tablet,vendor:"Apple",model:"iPad"}}},{test:[/kftt build/i],describe:function(){return{type:En.tablet,vendor:"Amazon",model:"Kindle Fire HD 7"}}},{test:[/silk/i],describe:function(){return{type:En.tablet,vendor:"Amazon"}}},{test:[/tablet(?! pc)/i],describe:function(){return{type:En.tablet}}},{test:function(e){var t=e.test(/ipod|iphone/i),n=e.test(/like (ipod|iphone)/i);return t&&!n},describe:function(e){var t=Pn.getFirstMatch(/(ipod|iphone)/i,e);return{type:En.mobile,vendor:"Apple",model:t}}},{test:[/nexus\s*[0-6].*/i,/galaxy nexus/i],describe:function(){return{type:En.mobile,vendor:"Nexus"}}},{test:[/[^-]mobi/i],describe:function(){return{type:En.mobile}}},{test:function(e){return"blackberry"===e.getBrowserName(!0)},describe:function(){return{type:En.mobile,vendor:"BlackBerry"}}},{test:function(e){return"bada"===e.getBrowserName(!0)},describe:function(){return{type:En.mobile}}},{test:function(e){return"windows phone"===e.getBrowserName()},describe:function(){return{type:En.mobile,vendor:"Microsoft"}}},{test:function(e){var t=Number(String(e.getOSVersion()).split(".")[0]);return"android"===e.getOSName(!0)&&t>=3},describe:function(){return{type:En.tablet}}},{test:function(e){return"android"===e.getOSName(!0)},describe:function(){return{type:En.mobile}}},{test:function(e){return"macos"===e.getOSName(!0)},describe:function(){return{type:En.desktop,vendor:"Apple"}}},{test:function(e){return"windows"===e.getOSName(!0)},describe:function(){return{type:En.desktop}}},{test:function(e){return"linux"===e.getOSName(!0)},describe:function(){return{type:En.desktop}}},{test:function(e){return"playstation 4"===e.getOSName(!0)},describe:function(){return{type:En.tv}}},{test:function(e){return"roku"===e.getOSName(!0)},describe:function(){return{type:En.tv}}}],An=[{test:function(e){return"microsoft edge"===e.getBrowserName(!0)},describe:function(e){if(/\sedg\//i.test(e))return{name:Cn.Blink};var t=Pn.getFirstMatch(/edge\/(\d+(\.?_?\d+)+)/i,e);return{name:Cn.EdgeHTML,version:t}}},{test:[/trident/i],describe:function(e){var t={name:Cn.Trident},n=Pn.getFirstMatch(/trident\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:function(e){return e.test(/presto/i)},describe:function(e){var t={name:Cn.Presto},n=Pn.getFirstMatch(/presto\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:function(e){var t=e.test(/gecko/i),n=e.test(/like gecko/i);return t&&!n},describe:function(e){var t={name:Cn.Gecko},n=Pn.getFirstMatch(/gecko\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/(apple)?webkit\/537\.36/i],describe:function(){return{name:Cn.Blink}}},{test:[/(apple)?webkit/i],describe:function(e){var t={name:Cn.WebKit},n=Pn.getFirstMatch(/webkit\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}}],Mn=function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(Object(r.a)(this,e),null==t||""===t)throw new Error("UserAgent parameter can't be empty");this._ua=t,this.parsedResult={},!0!==n&&this.parse()}return Object(i.a)(e,[{key:"getUA",value:function(){return this._ua}},{key:"test",value:function(e){return e.test(this._ua)}},{key:"parseBrowser",value:function(){var e=this;this.parsedResult.browser={};var t=Pn.find(In,(function(t){if("function"==typeof t.test)return t.test(e);if(t.test instanceof Array)return t.test.some((function(t){return e.test(t)}));throw new Error("Browser's test function is not valid")}));return t&&(this.parsedResult.browser=t.describe(this.getUA())),this.parsedResult.browser}},{key:"getBrowser",value:function(){return this.parsedResult.browser?this.parsedResult.browser:this.parseBrowser()}},{key:"getBrowserName",value:function(e){return e?String(this.getBrowser().name).toLowerCase()||"":this.getBrowser().name||""}},{key:"getBrowserVersion",value:function(){return this.getBrowser().version}},{key:"getOS",value:function(){return this.parsedResult.os?this.parsedResult.os:this.parseOS()}},{key:"parseOS",value:function(){var e=this;this.parsedResult.os={};var t=Pn.find(jn,(function(t){if("function"==typeof t.test)return t.test(e);
2if(t.test instanceof Array)return t.test.some((function(t){return e.test(t)}));throw new Error("Browser's test function is not valid")}));return t&&(this.parsedResult.os=t.describe(this.getUA())),this.parsedResult.os}},{key:"getOSName",value:function(e){var t=this.getOS().name;return e?String(t).toLowerCase()||"":t||""}},{key:"getOSVersion",value:function(){return this.getOS().version}},{key:"getPlatform",value:function(){return this.parsedResult.platform?this.parsedResult.platform:this.parsePlatform()}},{key:"getPlatformType",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=this.getPlatform(),n=t.type;return e?String(n).toLowerCase()||"":n||""}},{key:"parsePlatform",value:function(){var e=this;this.parsedResult.platform={};var t=Pn.find(Rn,(function(t){if("function"==typeof t.test)return t.test(e);if(t.test instanceof Array)return t.test.some((function(t){return e.test(t)}));throw new Error("Browser's test function is not valid")}));return t&&(this.parsedResult.platform=t.describe(this.getUA())),this.parsedResult.platform}},{key:"getEngine",value:function(){return this.parsedResult.engine?this.parsedResult.engine:this.parseEngine()}},{key:"getEngineName",value:function(e){return e?String(this.getEngine().name).toLowerCase()||"":this.getEngine().name||""}},{key:"parseEngine",value:function(){var e=this;this.parsedResult.engine={};var t=Pn.find(An,(function(t){if("function"==typeof t.test)return t.test(e);if(t.test instanceof Array)return t.test.some((function(t){return e.test(t)}));throw new Error("Browser's test function is not valid")}));return t&&(this.parsedResult.engine=t.describe(this.getUA())),this.parsedResult.engine}},{key:"parse",value:function(){return this.parseBrowser(),this.parseOS(),this.parsePlatform(),this.parseEngine(),this}},{key:"getResult",value:function(){return Pn.assign({},this.parsedResult)}},{key:"satisfies",value:function(e){var t=this,n={},r=0,i={},o=0;if(Object.keys(e).forEach((function(t){var a=e[t];"string"==typeof a?(i[t]=a,o+=1):"object"==typeof a&&(n[t]=a,r+=1)})),r>0){var a=Object.keys(n),s=Pn.find(a,(function(e){return t.isOS(e)}));if(s){var u=this.satisfies(n[s]);if(void 0!==u)return u}var c=Pn.find(a,(function(e){return t.isPlatform(e)}));if(c){var l=this.satisfies(n[c]);if(void 0!==l)return l}}if(o>0){var f=Object.keys(i),h=Pn.find(f,(function(e){return t.isBrowser(e,!0)}));if(void 0!==h)return this.compareVersion(i[h])}}},{key:"isBrowser",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=this.getBrowserName().toLowerCase(),r=e.toLowerCase(),i=Pn.getBrowserTypeByAlias(r);return t&&i&&(r=i.toLowerCase()),r===n}},{key:"compareVersion",value:function(e){var t=[0],n=e,r=!1,i=this.getBrowserVersion();if("string"==typeof i)return">"===e[0]||"<"===e[0]?(n=e.substr(1),"="===e[1]?(r=!0,n=e.substr(2)):t=[],">"===e[0]?t.push(1):t.push(-1)):"="===e[0]?n=e.substr(1):"~"===e[0]&&(r=!0,n=e.substr(1)),t.indexOf(Pn.compareVersions(i,n,r))>-1}},{key:"isOS",value:function(e){return this.getOSName(!0)===String(e).toLowerCase()}},{key:"isPlatform",value:function(e){return this.getPlatformType(!0)===String(e).toLowerCase()}},{key:"isEngine",value:function(e){return this.getEngineName(!0)===String(e).toLowerCase()}},{key:"is",value:function(e){return this.isBrowser(e)||this.isOS(e)||this.isPlatform(e)}},{key:"some",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return t.some((function(t){return e.is(t)}))}}]),e}(),Nn=function(){function e(){Object(r.a)(this,e)}return Object(i.a)(e,null,[{key:"getParser",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if("string"!=typeof e)throw new Error("UserAgent should be a string");return new Mn(e,t)}},{key:"parse",value:function(e){return new Mn(e).getResult()}},{key:"BROWSER_MAP",get:function(){return On}},{key:"ENGINE_MAP",get:function(){return Cn}},{key:"OS_MAP",get:function(){return Tn}},{key:"PLATFORMS_MAP",get:function(){return En}}]),e}();function Ln(){return"undefined"!=typeof navigator&&navigator.product&&"ReactNative"===navigator.product}function Dn(){if(Ln())return{supported:!0,mobile:!0,name:"React Native",version:null,supportsScreenShare:!1,supportsSfu:!0};var e=Nn.getParser(window.navigator.userAgent),t=e.getBrowser(),n=Nn.parse(window.navigator.userAgent),r=e.satisfies({electron:">=6",chromium:">=61",chrome:">=61",firefox:">=63",opera:">
2=61",safari:">=12",edge:">=18",iOS:{chromium:"<0",chrome:"<0",firefox:"<0",opera:"<0",safari:">=12",edge:"<0"}}),i=!!(r&&navigator&&navigator.mediaDevices&&navigator.mediaDevices.getDisplayMedia&&function(e){return e.satisfies({electron:">=6",chromium:">=75",chrome:">=75",firefox:">=67",opera:">=61",safari:">=13.0.1",edge:">=79"})}(e)),o=!(!r||e.satisfies({edge:"<=18"}));return{supported:r,mobile:"mobile"===n.platform.type,name:t.name,version:t.version,supportsScreenShare:i,supportsSfu:o}}function Fn(){throw new Error("Method must be implemented in subclass")}function Un(e){var t=e?new URL(e).origin:null;return!t||t.match(/https:\/\/[^.]+\.daily\.co/)?Dn().supportsSfu?"https://c.daily.co/static/call-machine-object-bundle.js":"https://c.daily.co/static/call-machine-object-nosfu-bundle.js":(t||(console.warn("No baseUrl provided for call object bundle. Defaulting to production CDN..."),t="https://c.daily.co"),Dn().supportsSfu?"".concat(t,"/static/call-machine-object-bundle.js"):"".concat(t,"/static/call-machine-object-nosfu-bundle.js"))}var Vn=function(){function e(){d(this,e)}return g(e,[{key:"addListenerForMessagesFromCallMachine",value:function(e,t,n){Fn()}},{key:"addListenerForMessagesFromDailyJs",value:function(e,t,n){Fn()}},{key:"sendMessageToCallMachine",value:function(e,t,n,r){Fn()}},{key:"sendMessageToDailyJs",value:function(e,t,n){Fn()}},{key:"removeListener",value:function(e){Fn()}}]),e}();function Bn(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}var qn=function(e){function t(){var e;return d(this,t),(e=v(this,y(t).call(this)))._wrappedListeners={},e._messageCallbacks={},e}return _(t,Vn),g(t,[{key:"addListenerForMessagesFromCallMachine",value:function(e,t,n){var r=this,i=function(i){if(i.data&&"iframe-call-message"===i.data.what&&(!i.data.callFrameId||i.data.callFrameId===t)&&(!i.data.from||"module"!==i.data.from)){var o=i.data;if(delete o.from,o.callbackStamp&&r._messageCallbacks[o.callbackStamp]){var a=o.callbackStamp;r._messageCallbacks[a].call(n,o),delete r._messageCallbacks[a]}delete o.what,delete o.callbackStamp,e.call(n,o)}};this._wrappedListeners[e]=i,window.addEventListener("message",i)}},{key:"addListenerForMessagesFromDailyJs",value:function(e,t,n){var r=function(r){if(!(!r.data||"iframe-call-message"!==r.data.what||!r.data.action||r.data.from&&"module"!==r.data.from||r.data.callFrameId&&t&&r.data.callFrameId!==t)){var i=r.data;e.call(n,i)}};this._wrappedListeners[e]=r,window.addEventListener("message",r)}},{key:"sendMessageToCallMachine",value:function(e,t,n,r){var i=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Bn(Object(n),!0).forEach((function(t){w(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Bn(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},e);if(i.what="iframe-call-message",i.from="module",i.callFrameId=r,t){var o=Date.now();this._messageCallbacks[o]=t,i.callbackStamp=o}(n?n.contentWindow:window).postMessage(i,"*")}},{key:"sendMessageToDailyJs",value:function(e,t,n){e.what="iframe-call-message",e.callFrameId=n,e.from="embedded",(t?window:window.parent).postMessage(e,"*")}},{key:"removeListener",value:function(e){var t=this._wrappedListeners[e];t&&(window.removeEventListener("message",t),delete this._wrappedListeners[e])}}]),t}();e.callMachineToDailyJsEmitter=e.callMachineToDailyJsEmitter||new o.EventEmitter,e.dailyJsToCallMachineEmitter=e.dailyJsToCallMachineEmitter||new o.EventEmitter;var Wn=function(t){function n(){var e;return d(this,n),(e=v(this,y(n).call(this)))._wrappedListeners={},e._messageCallbacks={},e}return _(n,Vn),g(n,[{key:"addListenerForMessagesFromCallMachine",value:function(t,n,r){this._addListener(t,e.callMachineToDailyJsEmitter,r,"received call machine message")}},{key:"addListenerForMessagesFromDailyJs",value:function(t,n,r){this._addListener(t,e.dailyJsToCallMachineEmitter,r,"received daily-js message")}},{key:"sendMessageToCallMachine",value:function(t,n){this._sendMessage(t,e.dailyJsToCallMachineEmitter,"sending message to call machine",n)}},{key:"sendMessageToDailyJs",value:function(t){this._sendMessage(t,e.callMachineToDailyJsEmitter,"sending message to daily-js")}},{key:"removeListener",value:function(t){var n=this._wrappedListeners[t];
2n&&(e.callMachineToDailyJsEmitter.removeListener("message",n),e.dailyJsToCallMachineEmitter.removeListener("message",n),delete this._wrappedListeners[t])}},{key:"_addListener",value:function(e,t,n,r){var i=this,o=function(t){if(t.callbackStamp&&i._messageCallbacks[t.callbackStamp]){var r=t.callbackStamp;i._messageCallbacks[r].call(n,t),delete i._messageCallbacks[r]}e.call(n,t)};this._wrappedListeners[e]=o,t.addListener("message",o)}},{key:"_sendMessage",value:function(e,t,n,r){if(r){var i=Date.now();this._messageCallbacks[i]=r,e.callbackStamp=i}t.emit("message",e)}}]),n}(),zn=u((function(e){function t(n,r,i){return function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}()?e.exports=t=Reflect.construct:e.exports=t=function(e,t,n){var r=[null];r.push.apply(r,t);var i=new(Function.bind.apply(e,r));return n&&b(i,n.prototype),i},t.apply(null,arguments)}e.exports=t})),Hn=u((function(e){function t(n){var r="function"==typeof Map?new Map:void 0;return e.exports=t=function(e){if(null===e||!function(e){return-1!==Function.toString.call(e).indexOf("[native code]")}(e))return e;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==r){if(r.has(e))return r.get(e);r.set(e,t)}function t(){return zn(e,arguments,y(this).constructor)}return t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),b(t,e)},t(n)}e.exports=t})),Gn=function(){function e(){d(this,e),this._currentLoad=null}return g(e,[{key:"load",value:function(e,t,n,r){if(this.loaded)return window._dailyCallObjectSetup(t),void n(!0);!function(e){window._dailyConfig||(window._dailyConfig={}),window._dailyConfig.callFrameId=e}(t),this._currentLoad&&this._currentLoad.cancel(),this._currentLoad=new Kn(e,t,(function(){n(!1)}),r),this._currentLoad.start()}},{key:"cancel",value:function(){this._currentLoad&&this._currentLoad.cancel()}},{key:"loaded",get:function(){return this._currentLoad&&this._currentLoad.succeeded}}]),e}(),Kn=function(){function e(t,n,r,i){d(this,e),this._attemptsRemaining=3,this._currentAttempt=null,this._meetingOrBaseUrl=t,this._callFrameId=n,this._successCallback=r,this._failureCallback=i}return g(e,[{key:"start",value:function(){var e=this;this._currentAttempt||(this._currentAttempt=new Qn(this._meetingOrBaseUrl,this._callFrameId,this._successCallback,(function t(n){e._currentAttempt.cancelled||(e._attemptsRemaining--,e._failureCallback(n,e._attemptsRemaining>0),e._attemptsRemaining<=0||setTimeout((function(){e._currentAttempt.cancelled||(e._currentAttempt=new Qn(e._meetingOrBaseUrl,e._callFrameId,e._successCallback,t),e._currentAttempt.start())}),3e3))})),this._currentAttempt.start())}},{key:"cancel",value:function(){this._currentAttempt&&this._currentAttempt.cancel()}},{key:"cancelled",get:function(){return this._currentAttempt&&this._currentAttempt.cancelled}},{key:"succeeded",get:function(){return this._currentAttempt&&this._currentAttempt.succeeded}}]),e}(),Yn=function(e){function t(){return d(this,t),v(this,y(t).apply(this,arguments))}return _(t,e),t}(Hn(Error)),Qn=function(){function e(t,n,r,i){d(this,e),this.cancelled=!1,this.succeeded=!1,this._networkTimedOut=!1,this._networkTimeout=null,this._iosCache="undefined"!=typeof iOSCallObjectBundleCache&&iOSCallObjectBundleCache,this._refetchHeaders=null,this._meetingOrBaseUrl=t,this._callFrameId=n,this._successCallback=r,this._failureCallback=i}return g(e,[{key:"start",value:function(){var e=h(l.mark((function e(){var t;return l.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=Un(this._meetingOrBaseUrl),e.next=3,this._tryLoadFromIOSCache(t);case 3:!e.sent&&this._loadFromNetwork(t);case 5:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"cancel",value:function(){clearTimeout(this._networkTimeout),this.cancelled=!0}},{key:"_tryLoadFromIOSCache",value:function(){var e=h(l.mark((function e(t){var n;return l.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this._iosCache){e.next=2;break}return e.abrupt("return",!1);case 2:return e.prev=2,e.next=5,this._iosCache.get(t);case 5:if(n=e.sent,!this.cancelled){e.next=8;break}return e.abrupt("return",!0);case 8:if(n){e.next=10;break}return e.abrupt("return",!1);case 10:if(n.code){e.next=13;break}return this._refetchHeaders=n.refetchHeaders,e.abrupt("return",!1);case 13:return Function('"use strict";'+n.code)(),this.succeeded=!0,this._successCallback(),e.abrupt("return",!0);case 19:return e.prev=19,e.t0=e.catch(2),e.abrupt("return",!1);case 22:case"end":return e.stop()}}),e,this,[[2,19]])})));return function(t){return e.apply(this,arguments)}}()},{key:"_loadFromNetwork",value:function(){var e=h(l.mark((function e(t){var n,r,i,o=this;return l.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this._networkTimeout=setTimeout((function(){o._networkTimedOut=!0,o._failureCallback("Timed out (>
2".concat(2e4," ms) when loading call object bundle ").concat(t))}),2e4),e.prev=1,n=this._refetchHeaders?{headers:this._refetchHeaders}:{},e.next=5,fetch(t,n);case 5:if(r=e.sent,clearTimeout(this._networkTimeout),!this.cancelled&&!this._networkTimedOut){e.next=9;break}throw new Yn;case 9:return e.next=11,this._getBundleCodeFromResponse(t,r);case 11:if(i=e.sent,!this.cancelled){e.next=14;break}throw new Yn;case 14:Function('"use strict";'+i)(),this._iosCache&&this._iosCache.set(t,i,r.headers),this.succeeded=!0,this._successCallback(),e.next=26;break;case 20:if(e.prev=20,e.t0=e.catch(1),clearTimeout(this._networkTimeout),!(e.t0 instanceof Yn||this.cancelled||this._networkTimedOut)){e.next=25;break}return e.abrupt("return");case 25:this._failureCallback("Failed to load call object bundle ".concat(t,": ").concat(e.t0));case 26:case"end":return e.stop()}}),e,this,[[1,20]])})));return function(t){return e.apply(this,arguments)}}()},{key:"_getBundleCodeFromResponse",value:function(){var e=h(l.mark((function e(t,n){var r;return l.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!n.ok){e.next=4;break}return e.next=3,n.text();case 3:return e.abrupt("return",e.sent);case 4:if(!this._iosCache||304!==n.status){e.next=9;break}return e.next=7,this._iosCache.renew(t,n.headers);case 7:return r=e.sent,e.abrupt("return",r.code);case 9:throw new Error("Received ".concat(n.status," response"));case 10:case"end":return e.stop()}}),e,this)})));return function(t,n){return e.apply(this,arguments)}}()}]),e}(),$n=function(e,t,n){return Xn(e,e.local,t,n)},Xn=function(e,t,n,r){return!!t&&(!(t.public.subscribedTracks&&!t.public.subscribedTracks.ALL)||!!t.public.subscribedTracks[n]&&(void 0!==t.public.subscribedTracks[n].ALL?t.public.subscribedTracks[n].ALL:t.public.subscribedTracks[n][r]))};function Jn(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Zn(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Jn(Object(n),!0).forEach((function(t){w(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Jn(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var er="video",tr="voice",nr={androidInCallNotification:{title:"string",subtitle:"string",iconName:"string",disableForCustomOverride:"boolean"},disableAutoDeviceManagement:{audio:"boolean",video:"boolean"}},rr={url:{validate:function(e){return"string"==typeof e},help:"url should be a string"},baseUrl:{validate:function(e){return"string"==typeof e},help:"baseUrl should be a string"},token:{validate:function(e){return"string"==typeof e},help:"token should be a string",queryString:"t"},dailyConfig:{validate:function(e){return window._dailyConfig||(window._dailyConfig={}),window._dailyConfig.experimentalGetUserMediaConstraintsModify=e.experimentalGetUserMediaConstraintsModify,delete e.experimentalGetUserMediaConstraintsModify,!0}},reactNativeConfig:{validate:function(e){return function e(t,n){if(void 0===n)return!1;switch(c(n)){case"string":return c(t)===n;case"object":if("object"!==c(t))return!1;for(var r in t)if(!e(t[r],n[r]))return!1;return!0;default:return!1}}(e,nr)},help:"reactNativeConfig should look like ".concat(JSON.stringify(nr),", all fields optional")},lang:{validate:function(e){return["de","en-us","en","es","fi","fr","it","jp","ka","nl","pl","pt","sv","tr"].includes(e)},help:"language not supported. Options are: de, en-us, en, es, fi, fr, it, jp, ka, nl, pl, pt, sv, tr"},userName:!0,showLeaveButton:!0,showFullscreenButton:!0,iframeStyle:!0,customLayout:!0,cssFile:!0,cssText:!0,bodyClass:!0,videoSource:{validate:function(e,t){return t._preloadCache.videoDeviceId=e,!0}},audioSource:{validate:function(e,t){return t._preloadCache.audioDeviceId=e,!0}},subscribeToTracksAutomatically:{validate:function(e,t){return t._preloadCache.subscribeToTracksAutomatically=e,!0}},layout:{validate:function(e){return"custom-v1"===e||"browser"===e||"none"===e},help:'layout may only be set to "custom-v1"',queryString:"layout"},emb:{queryString:"emb"},embHref:{queryString:"embHref"},dailyJsVersion:{queryString:"dailyJsVersion"}},ir={styles:{validate:function(e){for(var t in e)if("cam"!==t&&"screen"!==t)return!1;if(e.cam)for(var t in e.cam)if("div"!==t&&"video"!==t)return!1;if(e.screen)for(var t in e.screen)if("div"!==t&&"video"!==t)return!1;return!0},help:"styles format should be a subset of: { cam: {div: {}, video: {}}, screen: {div: {}, video: {}} }"},setSubscribedTracks:{validate:function(e,t,n){if(t._preloadCache.subscribeToTracksAutomatically)return!1;if([!0,!1,"avatar"].includes(e))return!0;for(var r in e)if("audio"!==r&&"video"!==r&&"screenVideo"!==r&&"screenAudio"!==r)return!1;return!0},help:"setSubscribedTracks cannot be used when setSubscribeToTracksAutomatically is enabled, and should be of the form: true | 'avatar' | false | { [audio: true|false], [video: true|false], [screenVideo: true|false] }"},setAudio:!0,setVideo:!0,eject:!0};function or(e){var t={};for(var n in e)e[n]instanceof MediaStreamTrack?t[n]=kn:"dailyConfig"===n?(e[n].modifyLocalSdpHook&&(window._dailyConfig&&(window._dailyConfig.modifyLocalSdpHook=e[n].modifyLocalSdpHook),delete e[n].modifyLocalSdpHook),e[n].modifyRemoteSdpHook&&(window._dailyConfig&&(window._dailyConfig.modifyRemoteSdpHook=e[n].modifyRemoteSdpHook),delete e[n].modifyRemoteSdpHook),t[n]=e[n]):t[n]=e[n];return t}function ar(){if(Ln())throw new Error("This daily-js method is not currently supported in React Native")}function sr(){if(!Ln())throw new Error("This daily-js method is only supported in React Native")}t.a=function(e){function t(e){var n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(d(this,t),n=v(this,y(t).call(this)),w(p(n),"handleNativeAppActiveStateChange",(function(e){n.disableReactNativeAutoDeviceManagement("video")||(e?n.camUnmutedBeforeLosingNativeActiveState&&n.setLocalVideo(!0):(n.camUnmutedBeforeLosingNativeActiveState=n.localVideo(),n.camUnmutedBeforeLosingNativeActiveState&&n.setLocalVideo(!1)))})),w(p(n),"handleNativeAudioFocusChange",(function(e){n.disableReactNativeAutoDeviceManagement("audio")||(n._hasNativeAudioFocus=e,n.toggleParticipantAudioBasedOnNativeAudioFocus(),n._hasNativeAudioFocus?n.micUnmutedBeforeLosingNativeAudioFocus&&n.setLocalAudio(!0):(n.micUnmutedBeforeLosingNativeAudioFocus=n.localAudio(),n.setLocalAudio(!1)))})),r.dailyJsVersion="0.9.995",n._iframe=e,n._callObjectMode="none"===r.layout&&!n._iframe,n._preloadCache={subscribeToTracksAutomatically:!0,audioDeviceId:null,videoDeviceId:null,outputDeviceId:null},n._callObjectMode&&(window._dailyPreloadCache=n._preloadCache),n.validateProperties(r),n.properties=Zn({},r),n._callObjectLoader=n._callObjectMode?new Gn:null,n._meetingState=pn,n._isPreparingToJoin=!1,n._nativeInCallAudioMode=er,n._participants={},n._inputEventsOn={},n._network={threshold:"good",quality:100},n._activeSpeaker={},n._activeSpeakerMode=!1,n._callFrameId=Date.now()+Math.random().toString(),n._messageChannel=Ln()?new Wn:new qn,n._iframe&&(n._iframe.requestFullscreen?n._iframe.addEventListener("fullscreenchange",(function(e){document.fullscreenElement===n._iframe?(n.emit(_n),n.sendMessageToCallMachine({action:_n})):(n.emit(wn),n.sendMessageToCallMachine({action:wn}))})):n._iframe.webkitRequestFullscreen&&n._iframe.addEventListener("webkitfullscreenchange",(function(e){document.webkitFullscreenElement===n._iframe?(n.emit(_n),n.sendMessageToCallMachine({action:_n})):(n.emit(wn),n.sendMessageToCallMachine({action:wn}))}))),Ln()){var i=n.nativeUtils();i.addAudioFocusChangeListener&&i.removeAudioFocusChangeListener&&i.addAppActiveStateChangeListener&&i.removeAppActiveStateChangeListener||console.warn("expected (add|remove)(AudioFocus|AppActiveState)ChangeListener to be available in React Native"),n._hasNativeAudioFocus=!0,i.addAudioFocusChangeListener(n.handleNativeAudioFocusChange),i.addAppActiveStateChangeListener(n.handleNativeAppActiveStateChange)}return n._messageChannel.addListenerForMessagesFromCallMachine(n.handleMessageFromCallMachine,n._callFrameId,p(n)),n}return _(t,a.a),g(t,null,[{key:"supportedBrowser",value:function(){return Dn()}},{key:"version",value:function(){return"0.9.995"}},{key:"createCallObject",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return e.layout="none",new t(null,e)}},{key:"wrap",value:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(ar(),!e||!e.contentWindow||"string"!=typeof e.src)throw new Error("DailyIframe::Wrap needs an iframe-like first argument");return n.layout||(n.customLayout?n.layout="custom-v1":n.layout="browser"),new t(e,n)}},{key:"createFrame",value:function(e,n){var r,i;ar(),e&&n?(r=e,i=n):e&&e.append?(r=e,i={}):(r=document.body,i=e||{});var o=i.iframeStyle;o||(o=r===document.body?{position:"fixed",border:"1px solid black",backgroundColor:"white",width:"375px",height:"450px",right:"1em",bottom:"1em"}:{border:0,width:"100%",height:"100%"});var a=document.createElement("iframe");window.navigator&&window.navigator.userAgent.match(/Chrome\/61\./)?a.allow="microphone, camera":a.allow="microphone; camera; autoplay; display-capture",a.style.visibility="hidden",r.appendChild(a),a.style.visibility=null,Object.keys(o).forEac
2h((function(e){return a.style[e]=o[e]})),i.layout||(i.customLayout?i.layout="custom-v1":i.layout="browser");try{return new t(a,i)}catch(e){throw r.removeChild(a),e}}},{key:"createTransparentFrame",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};ar();var n=document.createElement("iframe");return n.allow="microphone; camera; autoplay",n.style.cssText="\n position: fixed;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n border: 0;\n pointer-events: none;\n ",document.body.appendChild(n),e.layout||(e.layout="custom-v1"),t.wrap(n,e)}}]),g(t,[{key:"destroy",value:function(){var e=h(l.mark((function e(){var t,n,r;return l.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=0,![mn,vn].includes(this._meetingState)){e.next=4;break}return e.next=4,this.leave();case 4:e.next=8;break;case 6:e.prev=6,e.t0=e.catch(0);case 8:(t=this._iframe)&&(n=t.parentElement)&&n.removeChild(t),this._messageChannel.removeListener(this.handleMessageFromCallMachine),Ln()&&((r=this.nativeUtils()).removeAudioFocusChangeListener(this.handleNativeAudioFocusChange),r.removeAppActiveStateChangeListener(this.handleNativeAppActiveStateChange));case 12:case"end":return e.stop()}}),e,this,[[0,6]])})));return function(){return e.apply(this,arguments)}}()},{key:"loadCss",value:function(e){var t=e.bodyClass,n=e.cssFile,r=e.cssText;return ar(),this.sendMessageToCallMachine({action:"load-css",cssFile:this.absoluteUrl(n),bodyClass:t,cssText:r}),this}},{key:"iframe",value:function(){return ar(),this._iframe}},{key:"meetingState",value:function(){return this._meetingState}},{key:"participants",value:function(){return this._participants}},{key:"updateParticipant",value:function(e,t){if(ar(),this._participants.local&&this._participants.local.session_id===e&&(e="local"),e&&t&&this._participants[e]){for(var n in t){if(!ir[n])throw new Error("unrecognized updateParticipant property ".concat(n));if(ir[n].validate&&!ir[n].validate(t[n],this,this._participants[e]))throw new Error(ir[n].help)}this.sendMessageToCallMachine({action:"update-participant",id:e,properties:t})}return this}},{key:"updateParticipants",value:function(e){for(var t in ar(),e)this.updateParticipant(t,e[t]);return this}},{key:"localAudio",value:function(){return this._participants.local?this._participants.local.audio:null}},{key:"localVideo",value:function(){return this._participants.local?this._participants.local.video:null}},{key:"setLocalAudio",value:function(e){return this.sendMessageToCallMachine({action:"local-audio",state:e}),this}},{key:"setLocalVideo",value:function(e){return this.sendMessageToCallMachine({action:"local-video",state:e}),this}},{key:"setBandwidth",value:function(e){var t=e.kbs,n=e.trackConstraints;return ar(),this.sendMessageToCallMachine({action:"set-bandwidth",kbs:t,trackConstraints:n}),this}},{key:"setDailyLang",value:function(e){return ar(),this.sendMessageToCallMachine({action:"set-daily-lang",lang:e}),this}},{key:"startCamera",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return new Promise(function(){var n=h(l.mark((function n(r,i){var o;return l.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(o=function(e){delete e.action,delete e.callbackStamp,r(e)},!e.needsLoad()){n.next=10;break}return n.prev=2,n.next=5,e.load(t);case 5:n.next=10;break;case 7:n.prev=7,n.t0=n.catch(2),i(n.t0);case 10:e.sendMessageToCallMachine({action:"start-camera",properties:or(e.properties)},o);case 11:case"end":return n.stop()}}),n,null,[[2,7]])})));return function(e,t){return n.apply(this,arguments)}}())}},{key:"cycleCamera",value:function(){var e=this;return new Promise((function(t,n){e.sendMessageToCallMachine({action:"cycle-camera"},(function(e){t({device:e.device})}))}))}},{key:"cycleMic",value:function(){var e=this;return ar(),new Promise((function(t,n){e.sendMessageToCallMachine({action:"cycle-mic"},(function(e){t({device:e.device})}))}))}},{key:"getCameraFacingMode",value:function(){var e=this;return sr(),new Promise((function(t,n){e.sendMessageToCallMachine({action:"get-camera-facing-mode"},(function(e){t(e.facingMode)}))}))}},{key:"setInputDevices",value:function(e){var t=e.audioDeviceId,n=e.videoDeviceId,r=e.audioSource,i=e.videoSource;return ar(),void 0!==r&&(t=r),void 0!==i&&(n=i),t&&(this._preloadCache.audioDeviceId=t),n&&(this._preloadCache.videoDeviceId=n),this._callObjectMode&&this._meetingState!==mn||(t instanceof MediaStreamTrack&&(t=kn),n instanceof MediaStreamTrack&&(n=kn),this.sendMessageToCallMachine({action:"set-input-devices",audioDeviceId:t,videoDeviceId:n})),this}},{key:"setOutputDevice",value:function(e){var t=e.outputDeviceId;return ar(),t&&(this._preloadCache.outputDeviceId=t),this._callObjectMode&&this._meetingState!==mn||this.sendMessageToCallMachine({action:"set-output-device",outputDeviceId:t}),this}},{key:"getInputDevices",value:function(){var e=this;return ar(),this._callObjectMode&&this._meetingState!==mn?{camera:{deviceId:this._preloadCache.videoDeviceId},mic:{deviceId:this._preloadCache.audioDeviceId},speaker:{deviceId:this._preloadCache.outputDeviceId}}:new Promise((function(t,n){e.sendMessageToCallMachine({action:"get-input-devices"},(function(e){delete e.action,delete e.callbackStamp,t(e)}))}))}},{key:"nativeInCallAudioMode",value:function(){return sr(),this._nativeInCallAudioMode}},{key:"setNativeInCallAudioMode",value:function(e){if(sr(),[er,tr].includes(e)){if(e!==this._nativeInCallAudioMode)return this._nativeInCallAudioMode=e,!this.disableReactNativeAutoDeviceManagement("audio")&&this.shouldDeviceUseInCallAudioMode(this._meetingState)&&this.nativeUtils().setAudioMo
2de(this._nativeInCallAudioMode),this}else console.error("invalid in-call audio mode specified: ",e)}},{key:"load",value:function(){var e=h(l.mark((function e(t){var n=this;return l.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.needsLoad()){e.next=2;break}return e.abrupt("return");case 2:if(t&&(this.validateProperties(t),this.properties=Zn({},this.properties,{},t)),this._callObjectMode||this.properties.url){e.next=5;break}throw new Error("can't load iframe meeting because url property isn't set");case 5:this.updateMeetingState(vn);try{this.emit("loading",{action:"loading"})}catch(e){console.log("could not emit 'loading'")}if(!this._callObjectMode){e.next=11;break}return e.abrupt("return",new Promise((function(e,t){n._callObjectLoader.cancel(),n._callObjectLoader.load(n.properties.url||n.properties.baseUrl,n._callFrameId,(function(t){n.updateMeetingState("loaded"),t&&n.emit("loaded",{action:"loaded"}),e()}),(function(e,r){n.emit("load-attempt-failed",{action:"load-attempt-failed",errorMsg:e}),r||(n.updateMeetingState(bn),n.emit("error",{action:"error",errorMsg:e}),t(e))}))})));case 11:return this._iframe.src=this.assembleMeetingUrl(),e.abrupt("return",new Promise((function(e,t){n._loadedCallback=function(r){if(n._meetingState!==bn){for(var i in n.updateMeetingState("loaded"),(n.properties.cssFile||n.properties.cssText)&&n.loadCss(n.properties),n._inputEventsOn)n.sendMessageToCallMachine({action:"register-input-handler",on:i});e()}else t(r)}})));case 13:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"join",value:function(){var e=h(l.mark((function e(){var t,n,r,i,o=this,a=arguments;return l.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t=a.length>0&&void 0!==a[0]?a[0]:{},n=!1,!this.needsLoad()){e.next=15;break}return this.updateIsPreparingToJoin(!0),e.prev=4,e.next=7,this.load(t);case 7:e.next=13;break;case 9:return e.prev=9,e.t0=e.catch(4),this.updateIsPreparingToJoin(!1),e.abrupt("return",Promise.reject(e.t0));case 13:e.next=33;break;case 15:if(n=!(!this.properties.cssFile&&!this.properties.cssText),!t.url){e.next=31;break}if(!this._callObjectMode){e.next=27;break}if(r=Un(t.url),i=Un(this.properties.url||this.properties.baseUrl),r===i){e.next=24;break}return console.error("error: in call object mode, can't change the daily.co call url after load() to one with a different bundle url (".concat(i," -> ").concat(r,")")),this.updateIsPreparingToJoin(!1),e.abrupt("return",Promise.reject());case 24:this.properties.url=t.url,e.next=31;break;case 27:if(!t.url||t.url===this.properties.url){e.next=31;break}return console.error("error: in iframe mode, can't change the daily.co call url after load() (".concat(this.properties.url," -> ").concat(t.url,")")),this.updateIsPreparingToJoin(!1),e.abrupt("return",Promise.reject());case 31:this.validateProperties(t),this.properties=Zn({},this.properties,{},t);case 33:if(this._meetingState!==mn&&this._meetingState!==yn){e.next=37;break}return console.warn("already joined meeting, call leave() before joining again"),this.updateIsPreparingToJoin(!1),e.abrupt("return");case 37:this.updateMeetingState(yn,!1);try{this.emit("joining-meeting",{action:"joining-meeting"})}catch(e){console.log("could not emit 'joining-meeting'")}return this.sendMessageToCallMachine({action:"join-meeting",properties:or(this.properties),preloadCache:or(this._preloadCache)}),e.abrupt("return",new Promise((function(e,t){o._joinedCallback=function(r,i){if(o._meetingState!==bn){if(o.updateMeetingState(mn),r)for(var a in r){o.fixupParticipant(r[a]);var s=r[a].local?"local":r[a].session_id;o.matchParticipantTracks(s,r[a]),o._participants[a]=Zn({},r[a]),o.toggleParticipantAudioBasedOnNativeAudioFocus()}n&&o.loadCss(o.properties),e(r)}else t(i)}})));case 41:case"end":return e.stop()}}),e,this,[[4,9]])})));return function(){return e.apply(this,arguments)}}()},{key:"leave",value:function(){var e=h(l.mark((function e(){var t=this;return l.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",new Promise((function(e,n){var r=function(){t._iframe,t.updateMeetingState(gn),t._participants={},t._activeSpeakerMode=!1,t._preloadCache;try{t.emit(gn,{action:gn})}catch(e){console.log("could not emit 'left-meeting'")}e()};t._callObjectLoader&&!t._callObjectLoader.loaded?(t._callObjectLoader.cancel(),r()):t._meetingState===gn||t._meetingState===bn?e():t.sendMessageToCallMachine({action:"leave-meeting"},r)})));case 1:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}()},{key:"startScreenShare",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};ar(),e.mediaStream&&(this._preloadCache.screenMediaStream=e.mediaStream,e.mediaStream=kn),this.sendMessageToCallMachine({action:"local-screen-start",captureOptions:e})}},{key:"stopScreenShare",value:function(){ar(),this.sendMessageToCallMachine({action:"local-screen-stop"})}},{key:"startRecording",value:function(){ar(),this.sendMessageToCallMachine({action:"local-recording-start"})}},{key:"stopRecording",value:function(){ar(),this.sendMessageToCallMachine({action:"local-recording-stop"})}},{key:"startLiveStreaming",value:function(e){var t=e.rtmpUrl,n=e.width,r=void 0===n?1920:n,i=e.he
2ight,o=void 0===i?1080:i,a=e.backgroundColor,s=void 0===a?"0xff000000":a;ar(),this.sendMessageToCallMachine({action:"daily-method-start-live-streaming",rtmpUrl:t,width:r,height:o,backgroundColor:s})}},{key:"stopLiveStreaming",value:function(){ar(),this.sendMessageToCallMachine({action:"daily-method-stop-live-streaming"})}},{key:"getNetworkStats",value:function(){var e=this;return this._meetingState!==mn?{stats:{latest:{}}}:new Promise((function(t,n){e.sendMessageToCallMachine({action:"get-calc-stats"},(function(n){t(Zn({stats:n.stats},e._network))}))}))}},{key:"getActiveSpeaker",value:function(){return ar(),this._activeSpeaker}},{key:"setActiveSpeakerMode",value:function(e){return ar(),this.sendMessageToCallMachine({action:"set-active-speaker-mode",enabled:e}),this}},{key:"activeSpeakerMode",value:function(){return ar(),this._activeSpeakerMode}},{key:"subscribeToTracksAutomatically",value:function(){return ar(),this._preloadCache.subscribeToTracksAutomatically}},{key:"setSubscribeToTracksAutomatically",value:function(e){if(ar(),this._meetingState!==mn)throw new Error("setSubscribeToTracksAutomatically() is only allowed while in a meeting");return this._preloadCache.subscribeToTracksAutomatically=e,this.sendMessageToCallMachine({action:"daily-method-subscribe-to-tracks-automatically",enabled:e}),this}},{key:"enumerateDevices",value:function(){var e=h(l.mark((function e(){var t,n=this;return l.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(ar(),!this._callObjectMode){e.next=6;break}return e.next=4,navigator.mediaDevices.enumerateDevices();case 4:return t=e.sent,e.abrupt("return",{devices:t.map((function(e){return JSON.parse(JSON.stringify(e))}))});case 6:return e.abrupt("return",new Promise((function(e,t){n.sendMessageToCallMachine({action:"enumerate-devices"},(function(t){e({devices:t.devices})}))})));case 7:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"sendAppMessage",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"*";if(JSON.stringify(e).length>4096)throw new Error("Message data too large. Max size is 4096");return this.sendMessageToCallMachine({action:"app-msg",data:e,to:t}),this}},{key:"addFakeParticipant",value:function(e){return ar(),this.sendMessageToCallMachine(Zn({action:"add-fake-participant"},e)),this}},{key:"setShowNamesMode",value:function(e){return ar(),e&&"always"!==e&&"never"!==e?(console.error('setShowNamesMode argument should be "always", "never", or false'),this):(this.sendMessageToCallMachine({action:"set-show-names",mode:e}),this)}},{key:"detectAllFaces",value:function(){var e=this;return ar(),new Promise((function(t,n){e.sendMessageToCallMachine({action:"detect-all-faces"},(function(e){delete e.action,delete e.callbackStamp,t(e)}))}))}},{key:"requestFullscreen",value:function(){var e=h(l.mark((function e(){return l.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(ar(),this._iframe&&!document.fullscreenElement){e.next=3;break}return e.abrupt("return");case 3:return e.prev=3,e.next=6,this._iframe.requestFullscreen;case 6:if(!e.sent){e.next=10;break}this._iframe.requestFullscreen(),e.next=11;break;case 10:this._iframe.webkitRequestFullscreen();case 11:e.next=16;break;case 13:e.prev=13,e.t0=e.catch(3),console.log("could not make video call fullscreen",e.t0);case 16:case"end":return e.stop()}}),e,this,[[3,13]])})));return function(){return e.apply(this,arguments)}}()},{key:"exitFullscreen",value:function(){ar(),document.fullscreenElement?document.exitFullscreen():document.webkitFullscreenElement&&document.webkitExitFullscreen()}},{key:"room",value:function(){var e=h(l.mark((function e(){var t=this;return l.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this._meetingState===mn){e.next=4;break}if(!this.properties.url){e.next=3;break}return e.abrupt("return",{roomUrlPendingJoin:this.properties.url});case 3:return e.abrupt("return",null);case 4:return e.abrupt("return",new Promise((function(e,n){t.sendMessageToCallMachine({action:"lib-room-info"},(function(t){delete t.action,delete t.callbackStamp,e(t)}))}
2)));case 5:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"geo",value:function(){var e=h(l.mark((function e(){return l.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",new Promise(function(){var e=h(l.mark((function e(t,n){var r,i;return l.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=4,fetch("https://gs.daily.co/_ks_/x-swsl/:");case 4:return r=e.sent,e.next=7,r.json();case 7:i=e.sent,t({current:i.geo}),e.next=15;break;case 11:e.prev=11,e.t0=e.catch(0),console.error("geo lookup failed",e.t0),t({current:""});case 15:case"end":return e.stop()}}),e,null,[[0,11]])})));return function(t,n){return e.apply(this,arguments)}}()));case 1:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}()},{key:"setNetworkTopology",value:function(){var e=h(l.mark((function e(t){var n=this;return l.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return ar(),e.abrupt("return",new Promise(function(){var e=h(l.mark((function e(r,i){var o;return l.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:o=function(e){e.error?i({error:e.error}):r({workerId:e.workerId})},n.sendMessageToCallMachine({action:"set-network-topology",opts:t},o);case 2:case"end":return e.stop()}}),e)})));return function(t,n){return e.apply(this,arguments)}}()));case 2:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()},{key:"setPlayNewParticipantSound",value:function(e){if(ar(),"number"!=typeof e&&!0!==e&&!1!==e)throw new Error("argument to setShouldPlayNewParticipantSound should be true, false, or a number, but is ".concat(e));this.sendMessageToCallMachine({action:"daily-method-set-play-ding",arg:e})}},{key:"on",value:function(e,t){return this._inputEventsOn[e]={},this.sendMessageToCallMachine({action:"register-input-handler",on:e}),a.a.prototype.on.call(this,e,t)}},{key:"once",value:function(e,t){return this._inputEventsOn[e]={},this.sendMessageToCallMachine({action:"register-input-handler",on:e}),a.a.prototype.once.call(this,e,t)}},{key:"off",value:function(e,t){return delete this._inputEventsOn[e],this.sendMessageToCallMachine({action:"register-input-handler",off:e}),a.a.prototype.off.call(this,e,t)}},{key:"validateProperties",value:function(e){for(var t in e){if(!rr[t])throw new Error("unrecognized property '".concat(t,"'"));if(rr[t].validate&&!rr[t].validate(e[t],this))throw new Error("property '".concat(t,"': ").concat(rr[t].help))}}},{key:"assembleMeetingUrl",value:function(){var e=Zn({},this.properties,{emb:this._callFrameId,embHref:encodeURIComponent(window.location.href)}),t=e.url.match(/\?/)?"&":"?";return e.url+t+Object.keys(rr).filter((function(t){return rr[t].queryString&&void 0!==e[t]})).map((function(t){return"".concat(rr[t].queryString,"=").concat(e[t])})).join("&")}},{key:"needsLoad",value:function(){return[pn,vn,gn,bn].includes(this._meetingState)}},{key:"sendMessageToCallMachine",value:function(e,t){this._messageChannel.sendMessageToCallMachine(e,t,this._iframe,this._callFrameId)}},{key:"handleMessageFromCallMachine",value:function(e){switch(e.action){case"loaded":this._loadedCallback&&(this._loadedCallback(),this._loadedCallback=null);try{this.emit(e.action,e)}catch(t){console.log("could not emit",e)}break;case"joined-meeting":this._joinedCallback&&(this._joinedCallback(e.participants),this._joinedCallback=null);try{this.emit(e.action,e)}catch(t){console.log("could not emit",e)}break;case"participant-joined":case"participant-updated":if(this._meetingState===gn)return;if(this.fixupParticipant(e),e.participant&&e.participant.session_id){var t=e.participant.local?"local":e.participant.session_id;this.matchParticipantTracks(t,e.participant);try{this.maybeEventTrackStopped(this._participants[t],e.participant,"audioTrack"),this.maybeEventTrackStopped(this._participants[t],e.participant,"videoTrack"),this.maybeEventTrackStopped(this._participants[t],e.participant,"screenVideoTrack"),this.maybeEventTrackStopped(this._participants[t],e.participant,"screenAudioTrack"),this.maybeEventTrackStarted(this._participants[t],e.participant,"audioTrack"),this.maybeEventTrackStarted(this._participants[t],e.participant,"videoTrack"),this.maybeEventTrackStarted(this._participants[t],e.participant,"screenVideoTrack"),this.maybeEventTrackStarted(this._participants[t],e.participant,"screenAudioTrack")}catch(e){console.error("track events error",e)}if(!this.compareEqualForParticipantUpdateEvent(e.participant,this._participants[t])){this._participants[t]=Zn({},e.participant),this.toggleParticipantAudioBasedOnNativeAudioFocus();
2try{this.emit(e.action,e)}catch(t){console.log("could not emit",e)}}}break;case"participant-left":if(this.fixupParticipant(e),e.participant&&e.participant.session_id){var n=this._participants[e.participant.session_id];n&&(this.maybeEventTrackStopped(n,null,"audioTrack"),this.maybeEventTrackStopped(n,null,"videoTrack"),this.maybeEventTrackStopped(n,null,"screenVideoTrack"),this.maybeEventTrackStopped(n,null,"screenAudioTrack")),delete this._participants[e.participant.session_id];try{this.emit(e.action,e)}catch(t){console.log("could not emit",e)}}break;case"error":this._iframe&&(this._iframe.src=""),this.updateMeetingState(bn),this._participants={},this._loadedCallback&&(this._loadedCallback(e.errorMsg),this._loadedCallback=null),this._joinedCallback&&(this._joinedCallback(null,e.errorMsg),this._joinedCallback=null);try{this.emit(e.action,e)}catch(t){console.log("could not emit",e)}break;case"left-meeting":this._meetingState!==bn&&this.updateMeetingState(gn);try{this.emit(e.action,e)}catch(t){console.log("could not emit",e)}break;case"input-event":var r=this._participants[e.session_id];r||(r=e.session_id===this._participants.local.session_id?this._participants.local:{});try{this.emit(e.event.type,{action:e.event.type,event:e.event,participant:Zn({},r)})}catch(t){console.log("could not emit",e)}break;case"network-quality-change":var i=e.threshold,o=e.quality;if(i!==this._network.threshold||o!==this._network.quality){this._network.quality=o,this._network.threshold=i;try{this.emit(e.action,e)}catch(t){console.log("could not emit",e)}}break;case"active-speaker-change":var a=e.activeSpeaker;if(this._activeSpeaker.peerId!==a.peerId){this._activeSpeaker.peerId=a.peerId;try{this.emit(e.action,{action:e.action,activeSpeaker:this._activeSpeaker})}catch(t){console.log("could not emit",e)}}break;case"active-speaker-mode-change":var s=e.enabled;if(this._activeSpeakerMode!==s){this._activeSpeakerMode=s;try{this.emit(e.action,{action:e.action,enabled:this._activeSpeakerMode})}catch(t){console.log("could not emit",e)}}break;case"recording-started":case"recording-stopped":case"recording-stats":case"recording-error":case"recording-upload-completed":case"started-camera":case"camera-error":case"app-message":case"local-screen-share-started":case"local-screen-share-stopped":case"network-connection":case"recording-data":case"live-streaming-started":case"live-streaming-stopped":case"live-streaming-error":try{this.emit(e.action,e)}catch(t){console.log("could not emit",e,t)}break;case"request-fullscreen":this.requestFullscreen();break;case"request-exit-fullscreen":this.exitFullscreen()}}},{key:"fixupParticipant",value:function(e){var t=e.participant?e.participant:e;t.id&&(t.owner=!!t.owner,t.session_id=t.id,t.user_name=t.name,t.joined_at=t.joinedAt,delete t.id,delete t.name,delete t.joinedAt)}},{key:"matchParticipantTracks",value:function(e,t){if(this._callObjectMode){var n=store.getState();if("local"!==e){var r=!0;try{var i=n.participants[t.session_id];i&&i.public&&i.public.rtcType&&"peer-to-peer"===i.public.rtcType.impl&&i.private&&!["connected","completed"].includes(i.private.peeringState)&&(r=!1)}catch(e){console.error(e)}if(!r)return t.audio=!1,t.audioTrack=!1,t.video=!1,t.videoTrack=!1,t.screen=!1,void(t.screenTrack=!1);try{var o=n.streams,a=this._participants[t.session_id];if(t.audio&&$n(n,t.session_id,"cam-audio")){var s=dn(ln(o,(function(e){return e.participantId===t.session_id&&"cam"===e.type&&e.pendingTrack&&"audio"===e.pendingTrack.kind})),"starttime","desc");s&&s[0]&&s[0].pendingTrack&&(a&&a.audioTrack&&a.audioTrack.id===s[0].pendingTrack.id?t.audioTrack=s[0].pendingTrack:s[0].pendingTrack.muted||(t.audioTrack=s[0].pendingTrack)),t.audioTrack||(t.audio=!1)}if(t.video&&$n(n,t.session_id,"cam-video")){var u=dn(ln(o,(function(e){return e.participantId===t.session_id&&"cam"===e.type&&e.pendingTrack&&"video"===e.pendingTrack.kind})),"starttime","desc");u&&u[0]&&u[0].pendingTrack&&(a&&a.videoTrack&&a.videoTrack.id===u[0].pendingTrack.id?t.videoTrack=u[0].pendingTrack:u[0].pendingTrack.muted||(t.videoTrack=u[0].pendingTrack)),t.videoTrack||(t.video=!1)}if(t.screen&&$n(n,t.session_id,"screen-audio")){var c=dn(ln(o,(function(e){return e.participantId===t.session_id&&"screen"===e.type&&e.pendingTrack&&"audio"===e.pendingTrack.kind})),"starttime","desc");
2c&&c[0]&&c[0].pendingTrack&&(a&&a.screenAudioTrack&&a.screenAudioTrack.id===c[0].pendingTrack.id?t.screenAudioTrack=c[0].pendingTrack:c[0].pendingTrack.muted||(t.screenAudioTrack=c[0].pendingTrack))}if(t.screen&&$n(n,t.session_id,"screen-video")){var l=dn(ln(o,(function(e){return e.participantId===t.session_id&&"screen"===e.type&&e.pendingTrack&&"video"===e.pendingTrack.kind})),"starttime","desc");l&&l[0]&&l[0].pendingTrack&&(a&&a.screenVideoTrack&&a.screenVideoTrack.id===l[0].pendingTrack.id?t.screenVideoTrack=l[0].pendingTrack:l[0].pendingTrack.muted||(t.screenVideoTrack=l[0].pendingTrack))}t.screenVideoTrack||t.screenAudioTrack||(t.screen=!1)}catch(e){console.error("unexpected error matching up tracks",e)}}else{if(t.audio)try{t.audioTrack=n.local.streams.cam.stream.getAudioTracks()[0],t.audioTrack||(t.audio=!1)}catch(e){}if(t.video)try{t.videoTrack=n.local.streams.cam.stream.getVideoTracks()[0],t.videoTrack||(t.video=!1)}catch(e){}if(t.screen)try{t.screenVideoTrack=n.local.streams.screen.stream.getVideoTracks()[0],t.screenAudioTrack=n.local.streams.screen.stream.getAudioTracks()[0],t.screenVideoTrack||t.screenAudioTrack||(t.screen=!1)}catch(e){}}}}},{key:"maybeEventTrackStopped",value:function(e,t,n){if(e&&(e[n]&&"ended"===e[n].readyState||e[n]&&(!t||!t[n])||e[n]&&e[n].id!==t[n].id))try{this.emit("track-stopped",{action:"track-stopped",track:e[n],participant:t})}catch(e){console.log("could not emit",e)}}},{key:"maybeEventTrackStarted",value:function(e,t,n){if(t[n]&&(!e||!e[n])||t[n]&&"ended"===e[n].readyState||t[n]&&t[n].id!==e[n].id)try{this.emit("track-started",{action:"track-started",track:t[n],participant:t})}catch(e){console.log("could not emit",e)}}},{key:"compareEqualForParticipantUpdateEvent",value:function(e,t){return!!U(e,t)&&(!e.videoTrack||!t.videoTrack||e.videoTrack.id===t.videoTrack.id&&e.videoTrack.muted===t.videoTrack.muted&&e.videoTrack.enabled===t.videoTrack.enabled)&&(!e.audioTrack||!t.audioTrack||e.audioTrack.id===t.audioTrack.id&&e.audioTrack.muted===t.audioTrack.muted&&e.audioTrack.enabled===t.audioTrack.enabled)}},{key:"nativeUtils",value:function(){return Ln()?"undefined"==typeof DailyNativeUtils?(console.warn("in React Native, DailyNativeUtils is expected to be available"),null):DailyNativeUtils:null}},{key:"updateIsPreparingToJoin",value:function(e){this.updateMeetingState(this._meetingState,e)}},{key:"updateMeetingState",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this._isPreparingToJoin;if(e!==this._meetingState||t!==this._isPreparingToJoin){var n=this._meetingState,r=this._isPreparingToJoin;this._meetingState=e,this._isPreparingToJoin=t;var i=this.isMeetingPendingOrOngoing(n,r),o=this.isMeetingPendingOrOngoing(this._meetingState,this._isPreparingToJoin);i!==o&&(this.updateKeepDeviceAwake(o),this.updateDeviceAudioMode(o),this.updateShowAndroidOngoingMeetingNotification(o),this.updateNoOpRecordingEnsuringBackgroun
2dContinuity(o))}}},{key:"updateKeepDeviceAwake",value:function(e){Ln()&&this.nativeUtils().setKeepDeviceAwake(e,this._callFrameId)}},{key:"updateDeviceAudioMode",value:function(e){if(Ln()&&!this.disableReactNativeAutoDeviceManagement("audio")){var t=e?this._nativeInCallAudioMode:"idle";this.nativeUtils().setAudioMode(t)}}},{key:"updateShowAndroidOngoingMeetingNotification",value:function(e){if(Ln()&&this.nativeUtils().setShowOngoingMeetingNotification){var t,n,r,i;if(this.properties.reactNativeConfig&&this.properties.reactNativeConfig.androidInCallNotification){var o=this.properties.reactNativeConfig.androidInCallNotification;t=o.title,n=o.subtitle,r=o.iconName,i=o.disableForCustomOverride}i&&(e=!1),this.nativeUtils().setShowOngoingMeetingNotification(e,t,n,r,this._callFrameId)}}},{key:"updateNoOpRecordingEnsuringBackgroundContinuity",value:function(e){Ln()&&this.nativeUtils().enableNoOpRecordingEnsuringBackgroundContinuity&&this.nativeUtils().enableNoOpRecordingEnsuringBackgroundContinuity(e)}},{key:"isMeetingPendingOrOngoing",value:function(e,t){return[yn,mn].includes(e)||t}},{key:"toggleParticipantAudioBasedOnNativeAudioFocus",value:function(){if(Ln()){var e=store.getState();for(var t in e.streams){var n=e.streams[t];n&&n.pendingTrack&&"audio"===n.pendingTrack.kind&&(n.pendingTrack.enabled=this._hasNativeAudioFocus)}}}},{key:"disableReactNativeAutoDeviceManagement",value:function(e){return this.properties.reactNativeConfig&&this.properties.reactNativeConfig.disableAutoDeviceManagement&&this.properties.reactNativeConfig.disableAutoDeviceManagement[e]}},{key:"absoluteUrl",value:function(e){if(void 0!==e){var t=document.createElement("a");return t.href=e,t.href}}},{key:"sayHello",value:function(){var e="hello, world.";return console.log(e),e}}]),t}()}).call(this,n(44))},function(e,t,n){"use strict";var r=n(462);e.exports=r},function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(0);function i(e){return Object(r.a)({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{d:"M21.707 20.293l-2.023-2.023c1.44-1.686 2.315-3.846 2.315-6.27 0-4.091-2.472-7.453-5.999-9v2c2.387 1.386 3.999 4.047 3.999 7 0 1.832-.629 3.543-1.672 4.913l-1.285-1.285C17.644 14.536 18 13.19 18 12c0-1.771-.775-3.9-2-5v7.586l-2-2V4c0-.369-.203-.708-.528-.882-.324-.174-.72-.154-1.026.05L7.727 6.313l-4.02-4.02L2.293 3.707l18 18L21.707 20.293zM12 5.868v4.718L9.169 7.755 12 5.868zM4 17h2.697l5.748 3.832C12.612 20.943 12.806 21 13 21c.162 0 .324-.039.472-.118C13.797 20.708 14 20.369 14 20v-1.879l-2-2v2.011l-4.445-2.964c-.025-.017-.056-.02-.082-.033-.061-.033-.123-.058-.19-.078-.064-.019-.126-.032-.192-.038C7.059 15.016 7.032 15 7 15H4V9h.879L3.102 7.223C2.451 7.554 2 8.222 2 9v6C2 16.103 2.897 17 4 17z"}}]})(e)}},function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(0);function i(e){return Object(r.a)({tag:"svg",attr:{viewBox:"0 0 16 16"},child:[{tag:"path",attr:{fillRule:"evenodd",d:"M12 8.02c0 1.09-.45 2.09-1.17 2.83l-.67-.67c.55-.56.89-1.31.89-2.16 0-.85-.34-1.61-.89-2.16l.67-.67A3.99 3.99 0 0 1 12 8.02zM7.72 2.28L4 6H2c-.55 0-1 .45-1 1v2c0 .55.45 1 1 1h2l3.72 3.72c.47.47 1.28.14 1.28-.53V2.81c0-.67-.81-1-1.28-.53zm5.94.08l-.67.67a6.996 6.996 0 0 1 2.06 4.98c0 1.94-.78 3.7-2.06 4.98l.67.67A7.973 7.973 0 0 0 16 8c0-2.22-.89-4.22-2.34-5.66v.02zm-1.41 1.41l-.69.67a5.05 5.05 0 0 1 1.48 3.58c0 1.39-.56 2.66-1.48 3.56l.69.67A5.971 5.971 0 0 0 14 8.02c0-1.65-.67-3.16-1.75-4.25z"}}]})(e)}},,,,function(e,t,n){"use strict";n(130);var r=n(4),i=60103;if(t.Fragment=60107,"function"===typeof Symbol&&Symbol.for){var o=Symbol.for;i=o("react.element"),t.Fragment=o("react.fragment")}var a=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,s=Object.prototype.hasOwnProperty,u={key:!0,ref:!0,__self:!0,__source:!0};function c(e,t,n){var r,o={},c=null,l=null;for(r in void 0!==n&&(c=""+n),void 0!==t.key&&(c=""+t.key),void 0!==t.ref&&(l=t.ref),t)s.call(t,r)&&!u.hasOwnProperty(r)&&(o[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps)void 0===o[r]&&(o[r]=t[r]);return{$$typeof:i,type:e,key:c,ref:l,props:o,_owner:a.current}}t.jsx=c,t.jsxs=c},function(e,t,n){"use strict";var r=n(130),i=60103,o=60106;t.Fragment=60107,t.StrictMode=60108,t.Profiler=60114;var a=60109,s=60110,u=60112;t.Suspense=60113;var c=60115,l=60116;if("function"===typeof Symbol&&Symbol.for){var f=Symbol.for;i=f("react.element"),o=f("react.portal"),t.Fragment=f("react.fragment"),t.StrictMode=f("react.strict_mode"),t.Profiler=f("react.profiler"),a=f("react.provider"),s=f("react.context"),u=f("react.forward_ref"),t.Suspense=f("react.suspense"),c=f("react.memo"),l=f("react.lazy")}var h="function"===typeof Symbol&&Symbol.iterator;function d(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var p={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},v={};function y(e,t,n){this.props=e,this.context=t,this.refs=v,this.updater=n||p}function m(){}function g(e,t,n){this.props=e,this.context=t,this.refs=v,this.updater=n||p}y.prototype.isReactComponent={},y.prototype.setState=function(e,t){if("object"!==typeof e&&"function"!==typeof e&&null!=e)throw Error(d(85));this.updater.enqueueSetState(this,e,t,"setState")},y.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")},m.prototype=y.prototype;var b=g.prototype=new m;b.constructor=g,r(b,y.prototype),b.isPureReactComponent=!0;var _={current:null},w=Object.prototype.hasOwnProperty,k={key:!0,ref:!0,__self:!0,__source:!0};function S(e,t,n){var r,o={},a=null,s=null;if(null!=t)for(r in void 0!==t.ref&&(s=t.ref),void 0!==t.key&&(a=""+t.key),t)w.call(t,r)&&!k.hasOwnProperty(r)&&(o[r]=t[r]);var u=arguments.length-2;if(1===u)o.children=n;else if(1<u){for(var c=Array(u),l=0;l<u;l++)c[l]=arguments[l+2];o.children=c}if(e&&e.defaultProps)for(r in u=e.defaultProps)void 0===o[r]&&(o[r]=u[r]);return{$$typeof:i,type:e,key:a,ref:s,props:o,_owner:_.current}}function O(e){return"object"===typeof e&&null!==e&&e.$$typeof===i}var E=/\/+/g;function T(e,t){return"object"===typeof e&&null!==e&&null!=e.key?function(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,(function(e){return t[e]}))}(""+e.key):t.toString(36)}function C(e,t,n,r,a){var s=typeof e;"undefined"!==s&&"boolean"!==s||(e=null);var u=!1;if(null===e)u=!0;else switch(s){case"string":case"number":u=!0;break;case"object":switch(e.$$typeof){case i:case o:u=!0}}if(u)return a=a(u=e),e=""===r?"."+T(u,0):r,Array.isArray(a)?(n="",null!=e&&(n=e.replace(E,"$&/")+"/"),C(a,t,n,"",(function(e){return e}
vendor: 14,056 bytes, line 2
2))):null!=a&&(O(a)&&(a=function(e,t){return{$$typeof:i,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}(a,n+(!a.key||u&&u.key===a.key?"":(""+a.key).replace(E,"$&/")+"/")+e)),t.push(a)),1;if(u=0,r=""===r?".":r+":",Array.isArray(e))for(var c=0;c<e.length;c++){var l=r+T(s=e[c],c);u+=C(s,t,n,l,a)}else if("function"===typeof(l=function(e){return null===e||"object"!==typeof e?null:"function"===typeof(e=h&&e[h]||e["@@iterator"])?e:null}(e)))for(e=l.call(e),c=0;!(s=e.next()).done;)u+=C(s=s.value,t,n,l=r+T(s,c++),a);else if("object"===s)throw t=""+e,Error(d(31,"[object Object]"===t?"object with keys {"+Object.keys(e).join(", ")+"}":t));return u}function P(e,t,n){if(null==e)return e;var r=[],i=0;return C(e,r,"","",(function(e){return t.call(n,e,i++)})),r}function x(e){if(-1===e._status){var t=e._result;t=t(),e._status=0,e._result=t,t.then((function(t){0===e._status&&(t=t.default,e._status=1,e._result=t)}),(function(t){0===e._status&&(e._status=2,e._result=t)}))}if(1===e._status)return e._result;throw e._result}var I={current:null};function j(){var e=I.current;if(null===e)throw Error(d(321));return e}var R={ReactCurrentDispatcher:I,ReactCurrentBatchConfig:{transition:0},ReactCurrentOwner:_,IsSomeRendererActing:{current:!1},assign:r};t.Children={map:P,forEach:function(e,t,n){P(e,(function(){t.apply(this,arguments)}),n)},count:function(e){var t=0;return P(e,(function(){t++})),t},toArray:function(e){return P(e,(function(e){return e}))||[]},only:function(e){if(!O(e))throw Error(d(143));return e}},t.Component=y,t.PureComponent=g,t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=R,t.cloneElement=function(e,t,n){if(null===e||void 0===e)throw Error(d(267,e));var o=r({},e.props),a=e.key,s=e.ref,u=e._owner;if(null!=t){if(void 0!==t.ref&&(s=t.ref,u=_.current),void 0!==t.key&&(a=""+t.key),e.type&&e.type.defaultProps)var c=e.type.defaultProps;for(l in t)w.call(t,l)&&!k.hasOwnProperty(l)&&(o[l]=void 0===t[l]&&void 0!==c?c[l]:t[l])}var l=arguments.length-2;if(1===l)o.children=n;else if(1<l){c=Array(l);for(var f=0;f<l;f++)c[f]=arguments[f+2];o.children=c}return{$$typeof:i,type:e.type,key:a,ref:s,props:o,_owner:u}},t.createContext=function(e,t){return void 0===t&&(t=null),(e={$$typeof:s,_calculateChangedBits:t,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null}).Provider={$$typeof:a,_context:e},e.Consumer=e},t.createElement=S,t.createFactory=function(e){var t=S.bind(null,e);return t.type=e,t},t.createRef=function(){return{current:null}},t.forwardRef=function(e){return{$$typeof:u,render:e}},t.isValidElement=O,t.lazy=function(e){return{$$typeof:l,_payload:{_status:-1,_result:e},_init:x}},t.memo=function(e,t){return{$$typeof:c,type:e,compare:void 0===t?null:t}},t.useCallback=function(e,t){return j().useCallback(e,t)},t.useContext=function(e,t){return j().useContext(e,t)},t.useDebugValue=function(){},t.useEffect=function(e,t){return j().useEffect(e,t)},t.useImperativeHandle=function(e,t,n){return j().useImperativeHandle(e,t,n)},t.useLayoutEffect=function(e,t){return j().useLayoutEffect(e,t)},t.useMemo=function(e,t){return j().useMemo(e,t)},t.useReducer=function(e,t,n){return j().useReducer(e,t,n)},t.useRef=function(e){return j().useRef(e)},t.useState=function(e){return j().useState(e)},t.version="17.0.1"},function(e,t,n){"use strict";var r=n(4),i=n(130),o=n(309);function a(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}if(!r)throw Error(a(227));var s=new Set,u={};function c(e,t){l(e,t),l(e+"Capture",t)}function l(e,t){for(u[e]=t,e=0;e<t.length;e++)s.add(t[e])}var f=!("undefined"===typeof window||"undefined"===typeof window.document||"undefined"===typeof window.document.createElement),h=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,d=Object.prototype.hasOwnProperty,p={},v={};function y(e,t,n,r,i,o,a){this.acceptsBooleans=2===t||3===t||4===t,this.attributeName=r,this.attributeNamespace=i,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=o,this.removeEmptyString=a}var m={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach((function(e){m[e]=new y(e,0,!1,e,null,!1,!1)})),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach((function(e){var t=e[0];m[t]=new y(t,1,!1,e[1],null,!1,!1)})),["contentEditable","draggable","spellCheck","value"].forEach((function(e){m[e]=new y(e,2,!1,e.toLowerCase(),null,!1,!1)})),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach((function(e){m[e]=new y(e,2,!1,e,null,!1,!1)})),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach((function(e){m[e]=new y(e,3,!1,e.toLowerCase(),null,!1,!1)})),["checked","multiple","muted","selected"].forEach((function(e){m[e]=new y(e,3,!0,e,null,!1,!1)})),["capture","download"].forEach((function(e){m[e]=new y(e,4,!1,e,null,!1,!1)})),["cols","rows","size","span"].forEach((function(e){m[e]=new y(e,6,!1,e,null,!1,!1)})),["rowSpan","start"].forEach((function(e){m[e]=new y(e,5,!1,e.toLowerCase(),null,!1,!1)}));var g=/[\-:]([a-z])/g;function b(e){return e[1].toUpperCase()}function _(e,t,n,r){var i=m.hasOwnProperty(t)?m[t]:null;(null!==i?0===i.type:!r&&(2<t.length&&("o"===t[0]||"O"===t[0])&&("n"===t[1]||"N"===t[1])))||(function(e,t,n,r){if(null===t||"undefined"===typeof t||function(e,t,n,r){if(null!==n&&0===n.type)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return!r&&(null!==n?!n.acceptsBooleans:"data-"!==(e=e.toLowerCase().slice(0,5))&&"aria-"!==e);default:return!1}}(e,t,n,r))return!0;if(r)return!1;if(null!==n)switch(n.type){case 3:return!t;case 4:return!1===t;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}(t,n,i,r)&&(n=null),r||null===i?function(e){return!!d.call(v,e)||!d.call(p,e)&&(h.test(e)?v[e]=!0:(p[e]=!0,!1))}(t)&&(null===n?e.removeAttribute(t):e.setAttribute(t,""+n)):i.mustUseProperty?e[i.propertyName]=null===n?3!==i.type&&"":n:(t=i.attributeName,r=i.attributeNamespace,null===n?e.removeAttribute(t):(n=3===(i=i.type)||4===i&&!0===n?"":""+n,r?e.setAttributeNS(r,t,n):e.setAttribute(t,n))))}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach((function(e){var t=e.replace(g,b);m[t]=new y(t,1,!1,e,null,!1,!1)})),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach((function(e){var t=e.replace(g,b);m[t]=new y(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)})),["xml:base","xml:lang","xml:space"].forEach((function(e){var t=e.replace(g,b);m[t]=new y(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)})),["tabIndex","crossOrigin"].forEach((function(e){m[e]=new y(e,1,!1,e.toLowerCase(),null,!1,!1)})),m.xlinkHref=new y("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach((function(e){m[e]=new y(e,1,!1,e.toLowerCase(),null,!0,!0)}));var w=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,k=60103,S=60106,O=60107,E=60108,T=60114,C=60109,P=60110,x=60112,I=60113,j=60120,R=60115,A=60116,M=60121,N=60128,L=60129,D=60130,F=60131;if("function"===typeof Symbol&&Symbol.for){var U=Symbol.for;k=U("react.element"),S=U("react.portal"),O=U("react.fragment"),E=U("react.strict_mode"),T=U("react.profiler"),C=U("react.provider"),P=U("react.context"),x=U("react.forward_ref"),I=U("react.suspense"),j=U("react.suspense_list"),R=U("react.memo"),A=U("react.lazy"),M=U("react.block"),U("react.scope"),N=U("react.opaque.id"),L=U("react.debug_trace_mode"),D=U("react.offscreen"),F=U("react.legacy_hidden")}var V,B="function"===typeof Symbol&&Symbol.iterator;function q(e){return null===e||"object"!==typeof e?null:"function"===typeof(e=B&&e[B]||e["@@iterator"])?e:null}function W(e){if(void 0===V)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);V=t&&t[1]||""}return"\n"+V+e}var z=!1;function H(e,t){if(!e||z)return"";z=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),"object"===typeof Reflect&&Reflect.construct){try{Reflect.construct(t,[])}catch(u){var r=u}Reflect.construct(e,[],t)}else{try{t.call()}catch(u){r=u}e.call(t.prototype)}else{try{throw Error()}catch(u){r=u}e()}}catch(u){if(u&&r&&"string"===typeof u.stack){for(var i=u.stack.split("\n"),o=r.stack.split("\n"),a=i.length-1,s=o.length-1;1<=a&&0<=s&&i[a]!==o[s];)s--;for(;1<=a&&0<=s;a--,s--)if(i[a]!==o[s]){if(1!==a||1!==s)do{if(a--,0>--s||i[a]!==o[s])return"\n"+i[a].replace(" at new "," at ")}while(1<=a&&0<=s);break}}}finally{z=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?W(e):""}function G(e){switch(e.tag){case 5:return W(e.type);case 16:return W("Lazy");case 13:return W("Suspense");case 19:return W("SuspenseList");case 0:case 2:case 15:return e=H(e.type,!1);case 11:return e=H(e.type.render,!1);case 22:return e=H(e.type._render,!1);case 1:return e=H(e.type,!0);default:return""}}function K(e){if(null==e)return null;if("function"===typeof e)return e.displayName||e.name||null;if("string"===typeof e)return e;switch(e){case O:return"Fragment";case S:return"Portal";case T:return"Profiler";case E:return"StrictMode";case I:return"Suspense";case j:return"SuspenseList"}if("object"===typeof e)switch(e.$$typeof){case P:return(e.displayName||"Context")+".Consumer";case C:return(e._context.displayName||"Context")+".Provider";case x:var t=e.render;return t=t.displayName||t.name||"",e.displayName||(""!==t?"ForwardRef("+t+")":"ForwardRef");case R:return K(e.type);case M:return K(e._render);case A:t=e._payload,e=e._init;try{return K(e(t))}catch(n){}}return null}function Y(e){switch(typeof e){case"boolean":case"number":case"object":case"string":case"undefined":return e;default:return""}}function Q(e){var t=e.type;return(e=e.nodeName)&&"input"===e.toLowerCase()&&("checkbox"===t||"radio"===t)}function $(e){e._valueTracker||(e._valueTracker=function(e){var t=Q(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&"undefined"!==typeof n&&"function"===typeof n.get&&"function"===typeof n.set){var i=n.get,o=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(e){r=""+e,o.call(this,e)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(e){r=""+e},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}(e))}function X(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=Q(e)?e.checked?"true":"false":e.value),(e=r)!==n&&(t.setValue(e),!0)}function J(e){if("undefined"===typeof(e=e||("undefined"!==typeof document?document:void 0)))return null;try{return e.activeElement||e.body}catch(t){return e.body}}function Z(e,t){var n=t.checked;return i({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:null!=n?n:e._wrapperState.initialChecked})}function ee(e,t){var n=null==t.defaultValue?"":t.defaultValue,r=null!=t.checked?t.checked:t.defaultChecked;n=Y(null!=t.value?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:"checkbox"===t.type||"radio"===t.type?null!=t.checked:null!=t.value}}function te(e,t){null!=(t=t.checked)&&_(e,"checked",t,!1)}function ne(e,t){te(e,t);var n=Y(t.value),r=t.type;if(null!=n)"number"===r?(0===n&&""===e.value||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if("submit"===r||"reset"===r)return void e.removeAttribute("value");t.hasOwnProperty("value")?ie(e,t.type,n):t.hasOwnProperty("defaultValue")&&ie(e,t.type,Y(t.defaultValue)),null==t.checked&&null!=t.defaultChecked&&(e.defaultChecked=!!t.defaultChecked)}function re(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!("submit"!==r&&"reset"!==r||void 0!==t.value&&null!==t.value))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}""!==(n=e.name)&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,""!==n&&(e.name=n)}function ie(e,t,n){"number"===t&&J(e.ownerDocument)===e||(null==n?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}function oe(e,t){return e=i({children:void 0},t),(t=function(e){var t="";
vendor: 4,117 bytes, line 2
2return r.Children.forEach(e,(function(e){null!=e&&(t+=e)})),t}(t.children))&&(e.children=t),e}function ae(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i<n.length;i++)t["$"+n[i]]=!0;for(n=0;n<e.length;n++)i=t.hasOwnProperty("$"+e[n].value),e[n].selected!==i&&(e[n].selected=i),i&&r&&(e[n].defaultSelected=!0)}else{for(n=""+Y(n),t=null,i=0;i<e.length;i++){if(e[i].value===n)return e[i].selected=!0,void(r&&(e[i].defaultSelected=!0));null!==t||e[i].disabled||(t=e[i])}null!==t&&(t.selected=!0)}}function se(e,t){if(null!=t.dangerouslySetInnerHTML)throw Error(a(91));return i({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function ue(e,t){var n=t.value;if(null==n){if(n=t.children,t=t.defaultValue,null!=n){if(null!=t)throw Error(a(92));if(Array.isArray(n)){if(!(1>=n.length))throw Error(a(93));n=n[0]}t=n}null==t&&(t=""),n=t}e._wrapperState={initialValue:Y(n)}}function ce(e,t){var n=Y(t.value),r=Y(t.defaultValue);null!=n&&((n=""+n)!==e.value&&(e.value=n),null==t.defaultValue&&e.defaultValue!==n&&(e.defaultValue=n)),null!=r&&(e.defaultValue=""+r)}function le(e){var t=e.textContent;t===e._wrapperState.initialValue&&""!==t&&null!==t&&(e.value=t)}var fe="http://www.w3.org/1999/xhtml",he="http://www.w3.org/2000/svg";function de(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function pe(e,t){return null==e||"http://www.w3.org/1999/xhtml"===e?de(t):"http://www.w3.org/2000/svg"===e&&"foreignObject"===t?"http://www.w3.org/1999/xhtml":e}var ve,ye,me=(ye=function(e,t){if(e.namespaceURI!==he||"innerHTML"in e)e.innerHTML=t;else{for((ve=ve||document.createElement("div")).innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=ve.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}},"undefined"!==typeof MSApp&&MSApp.execUnsafeLocalFunction?function(e,t,n,r){MSApp.execUnsafeLocalFunction((function(){return ye(e,t)}))}:ye);function ge(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&3===n.nodeType)return void(n.nodeValue=t)}e.textContent=t}var be={animationIterationCount:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},_e=["Webkit","ms","Moz","O"];function we(e,t,n){return null==t||"boolean"===typeof t||""===t?"":n||"number"!==typeof t||0===t||be.hasOwnProperty(e)&&be[e]?(""+t).trim():t+"px"}function ke(e,t){for(var n in e=e.style,t)if(t.hasOwnProperty(n)){var r=0===n.indexOf("--"),i=we(n,t[n],r);"float"===n&&(n="cssFloat"),r?e.setProperty(n,i):e[n]=i}}Object.keys(be).forEach((function(e){_e.forEach((function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),be[t]=be[e]}))}));var Se=i({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function Oe(e,t){if(t){if(Se[e]&&(null!=t.children||null!=t.dangerouslySetInnerHTML))throw Error(a(137,e));if(null!=t.dangerouslySetInnerHTML){if(null!=t.children)throw Error(a(60));if("object"!==typeof t.dangerouslySetInnerHTML||!("__html"in t.dangerouslySetInnerHTML))throw Error(a(61))}if(null!=t.style&&"object"!==typeof t.style)throw Error(a(62))}}function Ee(e,t){if(-1===e.indexOf("-"))return"string"===typeof t.is;switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}function Te(e){return(e=e.target||e.srcElement||window).correspondingUseElement&&(e=e.correspondingUseElement),3===e.n
vendor: 3,897 bytes, line 2
2odeType?e.parentNode:e}var Ce=null,Pe=null,xe=null;function Ie(e){if(e=ei(e)){if("function"!==typeof Ce)throw Error(a(280));var t=e.stateNode;t&&(t=ni(t),Ce(e.stateNode,e.type,t))}}function je(e){Pe?xe?xe.push(e):xe=[e]:Pe=e}function Re(){if(Pe){var e=Pe,t=xe;if(xe=Pe=null,Ie(e),t)for(e=0;e<t.length;e++)Ie(t[e])}}function Ae(e,t){return e(t)}function Me(e,t,n,r,i){return e(t,n,r,i)}function Ne(){}var Le=Ae,De=!1,Fe=!1;function Ue(){null===Pe&&null===xe||(Ne(),Re())}function Ve(e,t){var n=e.stateNode;if(null===n)return null;var r=ni(n);if(null===r)return null;n=r[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(r=!r.disabled)||(r=!("button"===(e=e.type)||"input"===e||"select"===e||"textarea"===e)),e=!r;break e;default:e=!1}if(e)return null;if(n&&"function"!==typeof n)throw Error(a(231,t,typeof n));return n}var Be=!1;if(f)try{var qe={};Object.defineProperty(qe,"passive",{get:function(){Be=!0}}),window.addEventListener("test",qe,qe),window.removeEventListener("test",qe,qe)}catch(ye){Be=!1}function We(e,t,n,r,i,o,a,s,u){var c=Array.prototype.slice.call(arguments,3);try{t.apply(n,c)}catch(l){this.onError(l)}}var ze=!1,He=null,Ge=!1,Ke=null,Ye={onError:function(e){ze=!0,He=e}};function Qe(e,t,n,r,i,o,a,s,u){ze=!1,He=null,We.apply(Ye,arguments)}function $e(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do{0!==(1026&(t=e).flags)&&(n=t.return),e=t.return}while(e)}return 3===t.tag?n:null}function Xe(e){if(13===e.tag){var t=e.memoizedState;if(null===t&&(null!==(e=e.alternate)&&(t=e.memoizedState)),null!==t)return t.dehydrated}return null}function Je(e){if($e(e)!==e)throw Error(a(188))}function Ze(e){if(!(e=function(e){var t=e.alternate;if(!t){if(null===(t=$e(e)))throw Error(a(188));return t!==e?null:e}for(var n=e,r=t;;){var i=n.return;if(null===i)break;var o=i.alternate;if(null===o){if(null!==(r=i.return)){n=r;continue}break}if(i.child===o.child){for(o=i.child;o;){if(o===n)return Je(i),e;if(o===r)return Je(i),t;o=o.sibling}throw Error(a(188))}if(n.return!==r.return)n=i,r=o;else{for(var s=!1,u=i.child;u;){if(u===n){s=!0,n=i,r=o;break}if(u===r){s=!0,r=i,n=o;break}u=u.sibling}if(!s){for(u=o.child;u;){if(u===n){s=!0,n=o,r=i;break}if(u===r){s=!0,r=o,n=i;break}u=u.sibling}if(!s)throw Error(a(189))}}if(n.alternate!==r)throw Error(a(190))}if(3!==n.tag)throw Error(a(188));return n.stateNode.current===n?e:t}(e)))return null;for(var t=e;;){if(5===t.tag||6===t.tag)return t;if(t.child)t.child.return=t,t=t.child;else{if(t===e)break;for(;!t.sibling;){if(!t.return||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}}return null}function et(e,t){for(var n=e.alternate;null!==t;){if(t===e||t===n)return!0;t=t.return}return!1}var tt,nt,rt,it,ot=!1,at=[],st=null,ut=null,ct=null,lt=new Map,ft=new Map,ht=[],dt="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(" ");function pt(e,t,n,r,i){return{blockedOn:e,domEventName:t,eventSystemFlags:16|n,nativeEvent:i,targetContainers:[r]}}function vt(e,t){switch(e){case"focusin":case"focusout":st=null;break;case"dragenter":case"dragleave":ut=null;break;case"mouseover":case"mouseout":ct=null;break;case"pointerover":case"pointerout":lt.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":ft.delete(t.pointerId)}}function yt(e,t,n,r,i,o){return null===e||e.nativeEvent!==o?(e=pt(t,n,r,i,o),null!==t&&(null!==(t=ei(t))&&nt(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,null!==i&&-1===t.indexOf(i)&&t.push(i),e)}function mt(e){var t=Zr(e.target);if(null!==t){var n=$e(t);
vendor: 51,596 bytes, line 2
2if(null!==n)if(13===(t=n.tag)){if(null!==(t=Xe(n)))return e.blockedOn=t,void it(e.lanePriority,(function(){o.unstable_runWithPriority(e.priority,(function(){rt(n)}))}))}else if(3===t&&n.stateNode.hydrate)return void(e.blockedOn=3===n.tag?n.stateNode.containerInfo:null)}e.blockedOn=null}function gt(e){if(null!==e.blockedOn)return!1;for(var t=e.targetContainers;0<t.length;){var n=Zt(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(null!==n)return null!==(t=ei(n))&&nt(t),e.blockedOn=n,!1;t.shift()}return!0}function bt(e,t,n){gt(e)&&n.delete(t)}function _t(){for(ot=!1;0<at.length;){var e=at[0];if(null!==e.blockedOn){null!==(e=ei(e.blockedOn))&&tt(e);break}for(var t=e.targetContainers;0<t.length;){var n=Zt(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(null!==n){e.blockedOn=n;break}t.shift()}null===e.blockedOn&&at.shift()}null!==st&>(st)&&(st=null),null!==ut&>(ut)&&(ut=null),null!==ct&>(ct)&&(ct=null),lt.forEach(bt),ft.forEach(bt)}function wt(e,t){e.blockedOn===t&&(e.blockedOn=null,ot||(ot=!0,o.unstable_scheduleCallback(o.unstable_NormalPriority,_t)))}function kt(e){function t(t){return wt(t,e)}if(0<at.length){wt(at[0],e);for(var n=1;n<at.length;n++){var r=at[n];r.blockedOn===e&&(r.blockedOn=null)}}for(null!==st&&wt(st,e),null!==ut&&wt(ut,e),null!==ct&&wt(ct,e),lt.forEach(t),ft.forEach(t),n=0;n<ht.length;n++)(r=ht[n]).blockedOn===e&&(r.blockedOn=null);for(;0<ht.length&&null===(n=ht[0]).blockedOn;)mt(n),null===n.blockedOn&&ht.shift()}function St(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var Ot={animationend:St("Animation","AnimationEnd"),animationiteration:St("Animation","AnimationIteration"),animationstart:St("Animation","AnimationStart"),transitionend:St("Transition","TransitionEnd")},Et={},Tt={};function Ct(e){if(Et[e])return Et[e];if(!Ot[e])return e;var t,n=Ot[e];for(t in n)if(n.hasOwnProperty(t)&&t in Tt)return Et[e]=n[t];return e}f&&(Tt=document.createElement("div").style,"AnimationEvent"in window||(delete Ot.animationend.animation,delete Ot.animationiteration.animation,delete Ot.animationstart.animation),"TransitionEvent"in window||delete Ot.transitionend.transition);var Pt=Ct("animationend"),xt=Ct("animationiteration"),It=Ct("animationstart"),jt=Ct("transitionend"),Rt=new Map,At=new Map,Mt=["abort","abort",Pt,"animationEnd",xt,"animationIteration",It,"animationStart","canplay","canPlay","canplaythrough","canPlayThrough","durationchange","durationChange","emptied","emptied","encrypted","encrypted","ended","ended","error","error","gotpointercapture","gotPointerCapture","load","load","loadeddata","loadedData","loadedmetadata","loadedMetadata","loadstart","loadStart","lostpointercapture","lostPointerCapture","playing","playing","progress","progress","seeking","seeking","stalled","stalled","suspend","suspend","timeupdate","timeUpdate",jt,"transitionEnd","waiting","waiting"];function Nt(e,t){for(var n=0;n<e.length;n+=2){var r=e[n],i=e[n+1];i="on"+(i[0].toUpperCase()+i.slice(1)),At.set(r,t),Rt.set(r,i),c(i,[r])}}(0,o.unstable_now)();var Lt=8;function Dt(e){if(0!==(1&e))return Lt=15,1;if(0!==(2&e))return Lt=14,2;if(0!==(4&e))return Lt=13,4;var t=24&e;return 0!==t?(Lt=12,t):0!==(32&e)?(Lt=11,32):0!==(t=192&e)?(Lt=10,t):0!==(256&e)?(Lt=9,256):0!==(t=3584&e)?(Lt=8,t):0!==(4096&e)?(Lt=7,4096):0!==(t=4186112&e)?(Lt=6,t):0!==(t=62914560&e)?(Lt=5,t):67108864&e?(Lt=4,67108864):0!==(134217728&e)?(Lt=3,134217728):0!==(t=805306368&e)?(Lt=2,t):0!==(1073741824&e)?(Lt=1,1073741824):(Lt=8,e)}function Ft(e,t){var n=e.pendingLanes;if(0===n)return Lt=0;var r=0,i=0,o=e.expiredLanes,a=e.suspendedLanes,s=e.pingedLanes;if(0!==o)r=o,i=Lt=15;else if(0!==(o=134217727&n)){var u=o&~a;0!==u?(r=Dt(u),i=Lt):0!==(s&=o)&&(r=Dt(s),i=Lt)}else 0!==(o=n&~a)?(r=Dt(o),i=Lt):0!==s&&(r=Dt(s),i=Lt);if(0===r)return 0;if(r=n&((0>(r=31-zt(r))?0:1<<r)<<1)-1,0!==t&&t!==r&&0===(t&a)){if(Dt(t),i<=Lt)return t;Lt=i}if(0!==(t=e.entangledLanes))for(e=e.entanglements,t&=r;0<t;)i=1<<(n=31-zt(t)),r|=e[n],t&=~i;return r}function Ut(e){return 0!==(e=-1073741825&e.pendingLanes)?e:1073741824&e?1073741824:0}function Vt(e,t){switch(e){case 15:return 1;case 14:return 2;case 12:return 0===(e=Bt(24&~t))?Vt(10,t):e;case 10:return 0===(e=Bt(192&~t))?Vt(8,t):e;case 8:return 0===(e=Bt(3584&~t))&&(0===(e=Bt(4186112&~t))&&(e=512)),e;case 2:return 0===(t=Bt(805306368&~t))&&(t=268435456),t}throw Error(a(358,e))}function Bt(e){return e&-e}function qt(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function Wt(e,t,n){e.pendingLanes|=t;var r=t-1;e.suspendedLanes&=r,e.pingedLanes&=r,(e=e.eventTimes)[t=31-zt(t)]=n}var zt=Math.clz32?Math.clz32:function(e){return 0===e?32:31-(Ht(e)/Gt|0)|0},Ht=Math.log,Gt=Math.LN2;var Kt=o.unstable_UserBlockingPriority,Yt=o.unstable_runWithPriority,Qt=!0;function $t(e,t,n,r){De||Ne();var i=Jt,o=De;De=!0;try{Me(i,e,t,n,r)}finally{(De=o)||Ue()}}function Xt(e,t,n,r){Yt(Kt,Jt.bind(null,e,t,n,r))}function Jt(e,t,n,r){var i;if(Qt)if((i=0===(4&t))&&0<at.length&&-1<dt.indexOf(e))e=pt(null,e,t,n,r),at.push(e);else{var o=Zt(e,t,n,r);if(null===o)i&&vt(e,r);else{if(i){if(-1<dt.indexOf(e))return e=pt(o,e,t,n,r),void at.push(e);if(function(e,t,n,r,i){switch(t){case"focusin":return st=yt(st,e,t,n,r,i),!0;case"dragenter":return ut=yt(ut,e,t,n,r,i),!0;case"mouseover":return ct=yt(ct,e,t,n,r,i),!0;case"pointerover":var o=i.pointerId;return lt.set(o,yt(lt.get(o)||null,e,t,n,r,i)),!0;case"gotpointercapture":return o=i.pointerId,ft.set(o,yt(ft.get(o)||null,e,t,n,r,i)),!0}return!1}(o,e,t,n,r))return;vt(e,r)}Rr(e,t,r,null,n)}}}function Zt(e,t,n,r){var i=Te(r);if(null!==(i=Zr(i))){var o=$e(i);if(null===o)i=null;else{var a=o.tag;if(13===a){if(null!==(i=Xe(o)))return i;i=null}else if(3===a){if(o.stateNode.hydrate)return 3===o.tag?o.stateNode.containerInfo:null;i=null}else o!==i&&(i=null)}}return Rr(e,t,r,i,n),null}var en=null,tn=null,nn=null;function rn(){if(nn)return nn;var e,t,n=tn,r=n.length,i="value"in en?en.value:en.textContent,o=i.length;for(e=0;e<r&&n[e]===i[e];e++);var a=r-e;for(t=1;t<=a&&n[r-t]===i[o-t];t++);return nn=i.slice(e,1<t?1-t:void 0)}function on(e){var t=e.keyCode;return"charCode"in e?0===(e=e.charCode)&&13===t&&(e=13):e=t,10===e&&(e=13),32<=e||13===e?e:0}function an(){return!0}function sn(){return!1}function un(e){function t(t,n,r,i,o){for(var a in this._reactName=t,this._targetInst=r,this.type=n,this.nativeEvent=i,this.target=o,this.currentTarget=null,e)e.hasOwnProperty(a)&&(t=e[a],this[a]=t?t(i):i[a]);return this.isDefaultPrevented=(null!=i.defaultPrevented?i.defaultPrevented:!1===i.returnValue)?an:sn,this.isPropagationStopped=sn,this}return i(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var e=this.nativeEvent;e&&(e.preventDefault?e.preventDefault():"unknown"!==typeof e.returnValue&&(e.returnValue=!1),this.isDefaultPrevented=an)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():"unknown"!==typeof e.cancelBubble&&(e.cancelBubble=!0),this.isPropagationStopped=an)},persist:function(){},isPersistent:an}),t}var cn,ln,fn,hn={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},dn=un(hn),pn=i({},hn,{view:0,detail:0}),vn=un(pn),yn=i({},pn,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Cn,button:0,buttons:0,relatedTarget:function(e){return void 0===e.relatedTarget?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==fn&&(fn&&"mousemove"===e.type?(cn=e.screenX-fn.screenX,ln=e.screenY-fn.screenY):ln=cn=0,fn=e),cn)},movementY:function(e){return"movementY"in e?e.movementY:ln}}),mn=un(yn),gn=un(i({},yn,{dataTransfer:0})),bn=un(i({},pn,{relatedTarget:0})),_n=un(i({},hn,{animationName:0,elapsedTime:0,pseudoElement:0})),wn=un(i({},hn,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}})),kn=un(i({},hn,{data:0})),Sn={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},On={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},En={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Tn(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):!!(e=En[e])&&!!t[e]}function Cn(){return Tn}var Pn=un(i({},pn,{key:function(e){if(e.key){var t=Sn[e.key]||e.key;if("Unidentified"!==t)return t}return"keypress"===e.type?13===(e=on(e))?"Enter":String.fromCharCode(e):"keydown"===e.type||"keyup"===e.type?On[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Cn,charCode:function(e){return"keypress"===e.type?on(e):0},keyCode:function(e){return"keydown"===e.type||"keyup"===e.type?e.keyCode:0},which:function(e){return"keypress"===e.type?on(e):"keydown"===e.type||"keyup"===e.type?e.keyCode:0}})),xn=un(i({},yn,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0})),In=un(i({},pn,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Cn})),jn=un(i({},hn,{propertyName:0,elapsedTime:0,pseudoElement:0})),Rn=un(i({},yn,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0})),An=[9,13,27,32],Mn=f&&"CompositionEvent"in window,Nn=null;f&&"documentMode"in document&&(Nn=document.documentMode);var Ln=f&&"TextEvent"in window&&!Nn,Dn=f&&(!Mn||Nn&&8<Nn&&11>=Nn),Fn=String.fromCharCode(32),Un=!1;function Vn(e,t){switch(e){case"keyup":return-1!==An.indexOf(t.keyCode);case"keydown":return 229!==t.keyCode;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Bn(e){return"object"===typeof(e=e.detail)&&"data"in e?e.data:null}var qn=!1;var Wn={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function zn(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return"input"===t?!!Wn[e.type]:"textarea"===t}function Hn(e,t,n,r){je(r),0<(t=Mr(t,"onChange")).length&&(n=new dn("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var Gn=null,Kn=null;function Yn(e){Tr(e,0)}function Qn(e){if(X(ti(e)))return e}function $n(e,t){if("change"===e)return t}var Xn=!1;if(f){var Jn;if(f){var Zn="oninput"in document;if(!Zn){var er=document.createElement("div");er.setAttribute("oninput","return;"),Zn="function"===typeof er.oninput}Jn=Zn}else Jn=!1;Xn=Jn&&(!document.documentMode||9<document.documentMode)}function tr(){Gn&&(Gn.detachEvent("onpropertychange",nr),Kn=Gn=null)}function nr(e){if("value"===e.propertyName&&Qn(Kn)){var t=[];if(Hn(t,Kn,e,Te(e)),e=Yn,De)e(t);else{De=!0;try{Ae(e,t)}finally{De=!1,Ue()}}}}function rr(e,t,n){"focusin"===e?(tr(),Kn=n,(Gn=t).attachEvent("onpropertychange",nr)):"focusout"===e&&tr()}function ir(e){if("selectionchange"===e||"keyup"===e||"keydown"===e)return Qn(Kn)}function or(e,t){if("click"===e)return Qn(t)}function ar(e,t){if("input"===e||"change"===e)return Qn(t)}var sr="function"===typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e===1/t)||e!==e&&t!==t},ur=Object.prototype.hasOwnProperty;function cr(e,t){if(sr(e,t))return!0;if("object"!==typeof e||null===e||"object"!==typeof t||null===t)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++)if(!ur.call(t,n[r])||!sr(e[n[r]],t[n[r]]))return!1;return!0}function lr(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function fr(e,t){var n,r=lr(e);for(e=0;r;){if(3===r.nodeType){if(n=e+r.textContent.length,e<=t&&n>=t)return{node:r,offset:t-e};e=n}e:{for(;r;){if(r.nextSibling){r=r.nextSibling;break e}r=r.parentNode}r=void 0}r=lr(r)}}function hr(e,t){return!(!e||!t)&&(e===t||(!e||3!==e.nodeType)&&(t&&3===t.nodeType?hr(e,t.parentNode):"contains"in e?e.contains(t):!!e.compareDocumentPosition&&!!(16&e.compareDocumentPosition(t))))}function dr(){for(var e=window,t=J();t instanceof e.HTMLIFrameElement;){try{var n="string"===typeof t.contentWindow.location.href}catch(r){n=!1}if(!n)break;t=J((e=t.contentWindow).document)}return t}function pr(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&("input"===t&&("text"===e.type||"search"===e.type||"tel"===e.type||"url"===e.type||"password"===e.type)||"textarea"===t||"true"===e.contentEditable)}var vr=f&&"documentMode"in document&&11>=document.documentMode,yr=null,mr=null,gr=null,br=!1;function _r(e,t,n){var r=n.window===n?n.document:9===n.nodeType?n:n.ownerDocument;br||null==yr||yr!==J(r)||("selectionStart"in(r=yr)&&pr(r)?r={start:r.selectionStart,end:r.selectionEnd}:r={anchorNode:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection()).anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset},gr&&cr(gr,r)||(gr=r,0<(r=Mr(mr,"onSelect")).length&&(t=new dn("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=yr)))}Nt("cancel cancel click click close close contextmenu contextMenu copy copy cut cut auxclick auxClick dblclick doubleClick dragend dragEnd dragstart dragStart drop drop focusin focus focusout blur input input invalid invalid keydown keyDown keypress keyPress keyup keyUp mousedown mouseDown mouseup mouseUp paste paste pause pause play play pointercancel pointerCancel pointerdown pointerDown pointerup pointerUp ratechange rateChange reset reset seeked seeked submit submit touchcancel touchCancel touchend touchEnd touchstart touchStart volumechange volumeChange".split(" "),0),Nt("drag drag dragenter dragEnter dragexit dragExit dragleave dragLeave dragover dragOver mousemove mouseMove mouseout mouseOut mouseover mouseOver pointermove pointerMove pointerout pointerOut pointerover pointerOver scroll scroll toggle toggle touchmove touchMove wheel wheel".split(" "),1),Nt(Mt,2);for(var wr="change selectionchange textInput compositionstart compositionend compositionupdate".split(" "),kr=0;kr<wr.length;kr++)At.set(wr[kr],0);l("onMouseEnter",["mouseout","mouseover"]),l("onMouseLeave",["mouseout","mouseover"]),l("onPointerEnter",["pointerout","pointerover"]),l("onPointerLeave",["pointerout","pointerover"]),c("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),c("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),c("onBeforeInput",["compositionend","keypress","textInput","paste"]),c("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),c("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),c("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Sr="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),Or=new Set("cancel close invalid load scroll toggle".split(" ").concat(Sr));function Er(e,t,n){var r=e.type||"unknown-event";e.currentTarget=n,function(e,t,n,r,i,o,s,u,c){if(Qe.apply(this,arguments),ze){if(!ze)throw Error(a(198));var l=He;ze=!1,He=null,Ge||(Ge=!0,Ke=l)}}(r,t,void 0,e),e.currentTarget=null}function Tr(e,t){t=0!==(4&t);for(var n=0;n<e.length;n++){var r=e[n],i=r.event;r=r.listeners;e:{var o=void 0;if(t)for(var a=r.length-1;0<=a;a--){var s=r[a],u=s.instance,c=s.currentTarget;if(s=s.listener,u!==o&&i.isPropagationStopped())break e;Er(i,s,c),o=u}else for(a=0;a<r.length;a++){if(u=(s=r[a]).instance,c=s.currentTarget,s=s.listener,u!==o&&i.isPropagationStopped())break e;Er(i,s,c),o=u}}}if(Ge)throw e=Ke,Ge=!1,Ke=null,e}function Cr(e,t){var n=ri(t),r=e+"__bubble";n.has(r)||(jr(t,e,2,!1),n.add(r))}var Pr="_reactListening"+Math.random().toString(36).slice(2);function xr(e){e[Pr]||(e[Pr]=!0,s.forEach((function(t){Or.has(t)||Ir(t,!1,e,null),Ir(t,!0,e,null)})))}function Ir(e,t,n,r){var i=4<arguments.length&&void 0!==arguments[4]?arguments[4]:0,o=n;if("selectionchange"===e&&9!==n.nodeType&&(o=n.ownerDocument),null!==r&&!t&&Or.has(e)){if("scroll"!==e)return;i|=2,o=r}var a=ri(o),s=e+"__"+(t?"capture":"bubble");a.has(s)||(t&&(i|=4),jr(o,e,i,t),a.add(s))}function jr(e,t,n,r){var i=At.get(t);switch(void 0===i?2:i){case 0:i=$t;break;case 1:i=Xt;break;default:i=Jt}n=i.bind(null,t,n,e),i=void 0,!Be||"touchstart"!==t&&"touchmove"!==t&&"wheel"!==t||(i=!0),r?void 0!==i?e.addEventListener(t,n,{capture:!0,passive:i}):e.addEventListener(t,n,!0):void 0!==i?e.addEventListener(t,n,{passive:i}):e.addEventListener(t,n,!1)}function Rr(e,t,n,r,i){var o=r;if(0===(1&t)&&0===(2&t)&&null!==r)e:for(;;){if(null===r)return;var a=r.tag;if(3===a||4===a){var s=r.stateNode.containerInfo;if(s===i||8===s.nodeType&&s.parentNode===i)break;if(4===a)for(a=r.return;null!==a;){var u=a.tag;if((3===u||4===u)&&((u=a.stateNode.containerInfo)===i||8===u.nodeType&&u.parentNode===i))return;a=a.return}for(;null!==s;){if(null===(a=Zr(s)))return;if(5===(u=a.tag)||6===u){r=o=a;continue e}s=s.parentNode}}r=r.return}!function(e,t,n){if(Fe)return e(t,n);Fe=!0;try{Le(e,t,n)}finally{Fe=!1,Ue()}}((function(){var r=o,i=Te(n),a=[];e:{var s=Rt.get(e);if(void 0!==s){var u=dn,c=e;switch(e){case"keypress":if(0===on(n))break e;case"keydown":case"keyup":u=Pn;break;case"focusin":c="focus",u=bn;break;case"focusout":c="blur",u=bn;break;case"beforeblur":case"afterblur":u=bn;break;case"click":if(2===n.button)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":u=mn;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":u=gn;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":u=In;break;case Pt:case xt:case It:u=_n;break;case jt:u=jn;break;case"scroll":u=vn;break;case"wheel":u=Rn;break;case"copy":case"cut":case"paste":u=wn;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":u=xn}var l=0!==(4&t),f=!l&&"scroll"===e,h=l?null!==s?s+"Capture":null:s;l=[];for(var d,p=r;null!==p;){var v=(d=p).stateNode;if(5===d.tag&&null!==v&&(d=v,null!==h&&(null!=(v=Ve(p,h))&&l.push(Ar(p,v,d)))),f)break;p=p.return}0<l.length&&(s=new u(s,c,null,n,i),a.push({event:s,listeners:l}))}}if(0===(7&t)){if(u="mouseout"===e||"pointerout"===e,(!(s="mouseover"===e||"pointerover"===e)||0!==(16&t)||!(c=n.relatedTarget||n.fromElement)||!Zr(c)&&!c[Xr])&&(u||s)&&(s=i.window===i?i:(s=i.ownerDocument)?s.defaultView||s.parentWindow:window,u?(u=r,null!==(c=(c=n.relatedTarget||n.toElement)?Zr(c):null)&&(c!==(f=$e(c))||5!==c.tag&&6!==c.tag)&&(c=null)):(u=null,c=r),u!==c)){if(l=mn,v="onMouseLeave",h="onMouseEnter",p="mouse","pointerout"!==e&&"pointerover"!==e||(l=xn,v="onPointerLeave",h="onPointerEnter",p="pointer"),f=null==u?s:ti(u),d=null==c?s:ti(c),(s=new l(v,p+"leave",u,n,i)).target=f,s.relatedTarget=d,v=null,Zr(i)===r&&((l=new l(h,p+"enter",c,n,i)).target=d,l.relatedTarget=f,v=l),f=v,u&&c)e:{for(h=c,p=0,d=l=u;d;d=Nr(d))p++;for(d=0,v=h;v;v=Nr(v))d++;for(;0<p-d;)l=Nr(l),p--;for(;0<d-p;)h=Nr(h),d--;for(;p--;){if(l===h||null!==h&&l===h.alternate)break e;l=Nr(l),h=Nr(h)}l=null}else l=null;null!==u&&Lr(a,s,u,l,!1),null!==c&&null!==f&&Lr(a,f,c,l,!0)}if("select"===(u=(s=r?ti(r):window).nodeName&&s.nodeName.toLowerCase())||"input"===u&&"file"===s.type)var y=$n;else if(zn(s))if(Xn)y=ar;else{y=ir;var m=rr}else(u=s.nodeName)&&"input"===u.toLowerCase()&&("checkbox"===s.type||"radio"===s.type)&&(y=or);switch(y&&(y=y(e,r))?Hn(a,y,n,i):(m&&m(e,s,r),"focusout"===e&&(m=s._wrapperState)&&m.controlled&&"number"===s.type&&ie(s,"number",s.value)),m=r?ti(r):window,e){case"focusin":(zn(m)||"true"===m.contentEditable)&&(yr=m,mr=r,gr=null);break;case"focusout":gr=mr=yr=null;break;case"mousedown":br=!0;break;case"contextmenu":case"mouseup":case"dragend":br=!1,_r(a,n,i);break;case"selectionchange":if(vr)break;case"keydown":case"keyup":_r(a,n,i)}var g;if(Mn)e:{switch(e){case"compositionstart":var b="onCompositionStart";break e;case"compositionend":b="onCompositionEnd";break e;case"compositionupdate":b="onCompositionUpdate";break e}b=void 0}else qn?Vn(e,n)&&(b="onCompositionEnd"):"keydown"===e&&229===n.keyCode&&(b="onCompositionStart");b&&(Dn&&"ko"!==n.locale&&(qn||"onCompositionStart"!==b?"onCompositionEnd"===b&&qn&&(g=rn()):(tn="value"in(en=i)?en.value:en.textContent,qn=!0)),0<(m=Mr(r,b)).length&&(b=new kn(b,e,null,n,i),a.push({event:b,listeners:m}),g?b.data=g:null!==(g=Bn(n))&&(b.data=g))),(g=Ln?function(e,t){switch(e){case"compositionend":return Bn(t);case"keypress":return 32!==t.which?null:(Un=!0,Fn);case"textInput":return(e=t.data)===Fn&&Un?null:e;default:return null}}(e,n):function(e,t){if(qn)return"compositionend"===e||!Mn&&Vn(e,t)?(e=rn(),nn=tn=en=null,qn=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return Dn&&"ko"!==t.locale?null:t.data;default:return null}}(e,n))&&(0<(r=Mr(r,"onBeforeInput")).length&&(i=new kn("onBeforeInput","beforeinput",null,n,i),a.push({event:i,listeners:r}),i.data=g))}Tr(a,t)}))}function Ar(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Mr(e,t){for(var n=t+"Capture",r=[];null!==e;){var i=e,o=i.stateNode;5===i.tag&&null!==o&&(i=o,null!=(o=Ve(e,n))&&r.unshift(Ar(e,o,i)),null!=(o=Ve(e,t))&&r.push(Ar(e,o,i))),e=e.return}return r}function Nr(e){if(null===e)return null;do{e=e.return}while(e&&5!==e.tag);return e||null}function Lr(e,t,n,r,i){for(var o=t._reactName,a=[];null!==n&&n!==r;){var s=n,u=s.alternate,c=s.stateNode;if(null!==u&&u===r)break;5===s.tag&&null!==c&&(s=c,i?null!=(u=Ve(n,o))&&a.unshift(Ar(n,u,s)):i||null!=(u=Ve(n,o))&&a.push(Ar(n,u,s))),n=n.return}0!==a.length&&e.push({event:t,listeners:a})}function Dr(){}var Fr=null,Ur=null;function Vr(e,t){switch(e){case"button":case"input":case"select":case"textarea":return!!t.autoFocus}return!1}function Br(e,t){return"textarea"===e||"option"===e||"noscript"===e||"string"===typeof t.children||"number"===typeof t.children||"object"===typeof t.dangerouslySetInnerHTML&&null!==t.dangerouslySetInnerHTML&&null!=t.dangerouslySetInnerHTML.__html}var qr="function"===typeof setTimeout?setTimeout:void 0,Wr="function"===typeof clearTimeout?clearTimeout:void 0;function zr(e){1===e.nodeType?e.textContent="":9===e.nodeType&&(null!=(e=e.body)&&(e.textContent=""))}function Hr(e){for(;null!=e;e=e.nextSibling){var t=e.nodeType;if(1===t||3===t)break}return e}function Gr(e){e=e.previousSibling;for(var t=0;e;){if(8===e.nodeType){var n=e.data;if("$"===n||"$!"===n||"$?"===n){if(0===t)return e;t--}else"/$"===n&&t++}e=e.previousSibling}return null}var Kr=0;var Yr=Math.random().toString(36).slice(2),Qr="__reactFiber$"+Yr,$r="__reactProps$"+Yr,Xr="__reactContainer$"+Yr,Jr="__reactEvents$"+Yr;function Zr(e){var t=e[Qr];if(t)return t;for(var n=e.parentNode;n;){if(t=n[Xr]||n[Qr]){if(n=t.alternate,null!==t.child||null!==n&&null!==n.child)for(e=Gr(e);null!==e;){if(n=e[Qr])return n;e=Gr(e)}return t}n=(e=n).parentNode}return null}function ei(e){return!(e=e[Qr]||e[Xr])||5!==e.tag&&6!==e.tag&&13!==e.tag&&3!==e.tag?null:e}function ti(e){if(5===e.tag||6===e.tag)return e.stateNode;throw Error(a(33))}function ni(e){return e[$r]||null}function ri(e){var t=e[Jr];return void 0===t&&(t=e[Jr]=new Set),t}var ii=[],oi=-1;function ai(e){return{current:e}}function si(e){0>oi||(e.current=ii[oi],ii[oi]=null,oi--)}function ui(e,t){oi++,ii[oi]=e.current,e.current=t}var ci={},li=ai(ci),fi=ai(!1),hi=ci;function di(e,t){var n=e.type.contextTypes;if(!n)return ci;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var i,o={};for(i in n)o[i]=t[i];return r&&((e=e.stateNode).__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=o),o}function pi(e){return null!==(e=e.childContextTypes)&&void 0!==e}function vi(){si(fi),si(li)}function yi(e,t,n){if(li.current!==ci)throw Error(a(168));ui(li,t),ui(fi,n)}function mi(e,t,n){var r=e.stateNode;if(e=t.childContextTypes,"function"!==typeof r.getChildContext)return n;for(var o in r=r.getChildContext())if(!(o in e))throw Error(a(108,K(t)||"Unknown",o));return i({},n,r)}function gi(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||ci,hi=li.current,ui(li,e),ui(fi,fi.current),!0}function bi(e,t,n){var r=e.stateNode;if(!r)throw Error(a(169));n?(e=mi(e,t,hi),r.__reactInternalMemoizedMergedChildContext=e,si(fi),si(li),ui(li,e)):si(fi),ui(fi,n)}var _i=null,wi=null,ki=o.unstable_runWithPriority,Si=o.unstable_scheduleCallback,Oi=o.unstable_cancelCallback,Ei=o.unstable_shouldYield,Ti=o.unstable_requestPaint,Ci=o.unstable_now,Pi=o.unstable_getCurrentPriorityLevel,xi=o.unstable_ImmediatePriority,Ii=o.unstable_UserBlockingPriority,ji=o.unstable_NormalPriority,Ri=o.unstable_LowPriority,Ai=o.unstable_IdlePriority,Mi={},Ni=void 0!==Ti?Ti:function(){},Li=null,Di=null,Fi=!1,Ui=Ci(),Vi=1e4>Ui?Ci:function(){return Ci()-Ui};function Bi(){switch(Pi()){case xi:return 99;case Ii:return 98;case ji:return 97;case Ri:return 96;case Ai:return 95;default:throw Error(a(332))}}function qi(e){switch(e){case 99:return xi;case 98:return Ii;case 97:return ji;case 96:return Ri;case 95:return Ai;default:throw Error(a(332))}}function Wi(e,t){return e=qi(e),ki(e,t)}function zi(e,t,n){return e=qi(e),Si(e,t,n)}function Hi(){if(null!==Di){var e=Di;Di=null,Oi(e)}Gi()}function Gi(){if(!Fi&&null!==Li){Fi=!0;var e=0;try{var t=Li;Wi(99,(function(){for(;e<t.length;e++){var n=t[e];do{n=n(!0)}while(null!==n)}})),Li=null}catch(n){throw null!==Li&&(Li=Li.slice(e+1)),Si(xi,Hi),n}finally{Fi=!1}}}var Ki=w.ReactCurrentBatchConfig;function Yi(e,t){if(e&&e.defaultProps){for(var n in t=i({},t),e=e.defaultProps)void 0===t[n]&&(t[n]=e[n]);return t}return t}var Qi=ai(null),$i=null,Xi=null,Ji=null;function Zi(){Ji=Xi=$i=null}function eo(e){var t=Qi.current;si(Qi),e.type._context._currentValue=t}function to(e,t){for(;null!==e;){var n=e.alternate;if((e.childLanes&t)===t){if(null===n||(n.childLanes&t)===t)break;n.childLanes|=t}else e.childLanes|=t,null!==n&&(n.childLanes|=t);e=e.return}}function no(e,t){$i=e,Ji=Xi=null,null!==(e=e.dependencies)&&null!==e.firstContext&&(0!==(e.lanes&t)&&(Ma=!0),e.firstContext=null)}function ro(e,t){if(Ji!==e&&!1!==t&&0!==t)if("number"===typeof t&&1073741823!==t||(Ji=e,t=1073741823),t={context:e,observedBits:t,next:null},null===Xi){if(null===$i)throw Error(a(308));Xi=t,$i.dependencies={lanes:0,firstContext:t,responders:null}}else Xi=Xi.next=t;return e._currentValue}var io=!1;function oo(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null},effects:null}}function ao(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function so(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function uo(e,t){if(null!==(e=e.updateQueue)){var n=(e=e.shared).pending;null===n?t.next=t:(t.next=n.next,n.next=t),e.pending=t}}function co(e,t){var n=e.updateQueue,r=e.alternate;if(null!==r&&n===(r=r.updateQueue)){var i=null,o=null;if(null!==(n=n.firstBaseUpdate)){do{var a={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};null===o?i=o=a:o=o.next=a,n=n.next}while(null!==n);null===o?i=o=t:o=o.next=t}else i=o=t;return n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:o,shared:r.shared,effects:r.effects},void(e.updateQueue=n)}null===(e=n.lastBaseUpdate)?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function lo(e,t,n,r){var o=e.updateQueue;io=!1;var a=o.firstBaseUpdate,s=o.lastBaseUpdate,u=o.shared.pending;if(null!==u){o.shared.pending=null;var c=u,l=c.next;c.next=null,null===s?a=l:s.next=l,s=c;var f=e.alternate;if(null!==f){var h=(f=f.updateQueue).lastBaseUpdate;h!==s&&(null===h?f.firstBaseUpdate=l:h.next=l,f.lastBaseUpdate=c)}}if(null!==a){for(h=o.baseState,s=0,f=l=c=null;;){u=a.lane;var d=a.eventTime;if((r&u)===u){null!==f&&(f=f.next={eventTime:d,lane:0,tag:a.tag,payload:a.payload,callback:a.callback,next:null});e:{var p=e,v=a;switch(u=t,d=n,v.tag){case 1:if("function"===typeof(p=v.payload)){h=p.call(d,h,u);break e}h=p;break e;case 3:p.flags=-4097&p.flags|64;case 0:if(null===(u="function"===typeof(p=v.payload)?p.call(d,h,u):p)||void 0===u)break e;h=i({},h,u);break e;case 2:io=!0}}null!==a.callback&&(e.flags|=32,null===(u=o.effects)?o.effects=[a]:u.push(a))}else d={eventTime:d,lane:u,tag:a.tag,payload:a.payload,callback:a.callback,next:null},null===f?(l=f=d,c=h):f=f.next=d,s|=u;if(null===(a=a.next)){if(null===(u=o.shared.pending))break;a=u.next,u.next=null,o.lastBaseUpdate=u,o.shared.pending=null}}null===f&&(c=h),o.baseState=c,o.firstBaseUpdate=l,o.lastBaseUpdate=f,Fs|=s,e.lanes=s,e.memoizedState=h}}function fo(e,t,n){if(e=t.effects,t.effects=null,null!==e)for(t=0;t<e.length;t++){var r=e[t],i=r.callback;if(null!==i){if(r.callback=null,r=n,"function"!==typeof i)throw Error(a(191,i));i.call(r)}}}var ho=(new r.Component).refs;function po(e,t,n,r){n=null===(n=n(r,t=e.memoizedState))||void 0===n?t:i({},t,n),e.memoizedState=n,0===e.lanes&&(e.updateQueue.baseState=n)}var vo={isMounted:function(e){return!!(e=e._reactInternals)&&$e(e)===e},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=cu(),i=lu(e),o=so(r,i);o.payload=t,void 0!==n&&null!==n&&(o.callback=n),uo(e,o),fu(e,i,r)},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=cu(),i=lu(e),o=so(r,i);o.tag=1,o.payload=t,void 0!==n&&null!==n&&(o.callback=n),uo(e,o),fu(e,i,r)},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=cu(),r=lu(e),i=so(n,r);i.tag=2,void 0!==t&&null!==t&&(i.callback=t),uo(e,i),fu(e,r,n)}};function yo(e,t,n,r,i,o,a){return"function"===typeof(e=e.stateNode).shouldComponentUpdate?e.shouldComponentUpdate(r,o,a):!t.prototype||!t.prototype.isPureReactComponent||(!cr(n,r)||!cr(i,o))}function mo(e,t,n){var r=!1,i=ci,o=t.contextType;return"object"===typeof o&&null!==o?o=ro(o):(i=pi(t)?hi:li.current,o=(r=null!==(r=t.contextTypes)&&void 0!==r)?di(e,i):ci),t=new t(n,o),e.memoizedState=null!==t.state&&void 0!==t.state?t.state:null,t.updater=vo,e.stateNode=t,t._reactInternals=e,r&&((e=e.stateNode).__reactInternalMemoizedUnmaskedChildContext=i,e.__reactInternalMemoizedMaskedChildContext=o),t}function go(e,t,n,r){e=t.state,"function"===typeof t.componentWillReceiveProps&&t.componentWillReceiveProps(n,r),"function"===typeof t.UNSAFE_componentWillReceiveProps&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&vo.enqueueReplaceState(t,t.state,null)}function bo(e,t,n,r){var i=e.stateNode;i.props=n,i.state=e.memoizedState,i.refs=ho,oo(e);var o=t.contextType;"object"===typeof o&&null!==o?i.context=ro(o):(o=pi(t)?hi:li.current,i.context=di(e,o)),lo(e,n,i,r),i.state=e.memoizedState,"function"===typeof(o=t.getDerivedStateFromProps)&&(po(e,t,o,n),i.state=e.memoizedState),"function"===typeof t.getDerivedStateFromProps||"function"===typeof i.getSnapshotBeforeUpdate||"function"!==typeof i.UNSAFE_componentWillMount&&"function"!==typeof i.componentWillMount||(t=i.state,"function"===typeof i.componentWillMount&&i.componentWillMount(),"function"===typeof i.UNSAFE_componentWillMount&&i.UNSAFE_componentWillMount(),t!==i.state&&vo.enqueueReplaceState(i,i.state,null),lo(e,n,i,r),i.state=e.memoizedState),"function"===typeof i.componentDidMount&&(e.flags|=4)}var _o=Array.isArray;function wo(e,t,n){if(null!==(e=n.ref)&&"function"!==typeof e&&"object"!==typeof e){if(n._owner){if(n=n._owner){if(1!==n.tag)throw Error(a(309));var r=n.stateNode}if(!r)throw Error(a(147,e));var i=""+e;return null!==t&&null!==t.ref&&"function"===typeof t.ref&&t.ref._stringRef===i?t.ref:((t=function(e){var t=r.refs;t===ho&&(t=r.refs={}),null===e?delete t[i]:t[i]=e})._stringRef=i,t)}if("string"!==typeof e)throw Error(a(284));if(!n._owner)throw Error(a(290,e))}return e}function ko(e,t){if("textarea"!==e.type)throw Error(a(31,"[object Object]"===Object.prototype.toString.call(t)?"object with keys {"+Object.keys(t).join(", ")+"}":t))}function So(e){function t(t,n){if(e){var r=t.lastEffect;null!==r?(r.nextEffect=n,t.lastEffect=n):t.firstEffect=t.lastEffect=n,n.nextEffect=null,n.flags=8}}function n(n,r){if(!e)return null;for(;null!==r;)t(n,r),r=r.sibling;return null}function r(e,t){for(e=new Map;null!==t;)null!==t.key?e.set(t.key,t):e.set(t.index,t),t=t.sibling;return e}function i(e,t){return(e=Wu(e,t)).index=0,e.sibling=null,e}function o(t,n,r){return t.index=r,e?null!==(r=t.alternate)?(r=r.index)<n?(t.flags=2,n):r:(t.flags=2,n):n}function s(t){return e&&null===t.alternate&&(t.flags=2),t}function u(e,t,n,r){return null===t||6!==t.tag?((t=Ku(n,e.mode,r)).return=e,t):((t=i(t,n)).return=e,t)}function c(e,t,n,r){return null!==t&&t.elementType===n.type?((r=i(t,n.props)).ref=wo(e,t,n),r.return=e,r):((r=zu(n.type,n.key,n.props,null,e.mode,r)).ref=wo(e,t,n),r.return=e,r)}function l(e,t,n,r){return null===t||4!==t.tag||t.stateNode.containerInfo!==n.containerInfo||t.stateNode.implementation!==n.implementation?((t=Yu(n,e.mode,r)).return=e,t):((t=i(t,n.children||[])).return=e,t)}function f(e,t,n,r,o){return null===t||7!==t.tag?((t=Hu(n,e.mode,r,o)).return=e,t):((t=i(t,n)).return=e,t)}function h(e,t,n){if("string"===typeof t||"number"===typeof t)return(t=Ku(""+t,e.mode,n)).return=e,t;if("object"===typeof t&&null!==t){switch(t.$$typeof){case k:return(n=zu(t.type,t.key,t.props,null,e.mode,n)).ref=wo(e,null,t),n.return=e,n;case S:return(t=Yu(t,e.mode,n)).return=e,t}if(_o(t)||q(t))return(t=Hu(t,e.mode,n,null)).return=e,t;ko(e,t)}return null}function d(e,t,n,r){var i=null!==t?t.key:null;if("string"===typeof n||"number"===typeof n)return null!==i?null:u(e,t,""+n,r);if("object"===typeof n&&null!==n){switch(n.$$typeof){case k:return n.key===i?n.type===O?f(e,t,n.props.children,r,i):c(e,t,n,r):null;case S:return n.key===i?l(e,t,n,r):null}if(_o(n)||q(n))return null!==i?null:f(e,t,n,r,null);ko(e,n)}return null}function p(e,t,n,r,i){if("string"===typeof r||"number"===typeof r)return u(t,e=e.get(n)||null,""+r,i);if("object"===typeof r&&null!==r){switch(r.$$typeof){case k:return e=e.get(null===r.key?n:r.key)||null,r.type===O?f(t,e,r.props.children,i,r.key):c(t,e,r,i);case S:return l(t,e=e.get(null===r.key?n:r.key)||null,r,i)}if(_o(r)||q(r))return f(t,e=e.get(n)||null,r,i,null);ko(t,r)}return null}function v(i,a,s,u){for(var c=null,l=null,f=a,v=a=0,y=null;null!==f&&v<s.length;v++){f.index>v?(y=f,f=null):y=f.sibling;var m=d(i,f,s[v],u);if(null===m){null===f&&(f=y);break}e&&f&&null===m.alternate&&t(i,f),a=o(m,a,v),null===l?c=m:l.sibling=m,l=m,f=y}if(v===s.length)return n(i,f),c;if(null===f){for(;v<s.length;v++)null!==(f=h(i,s[v],u))&&(a=o(f,a,v),null===l?c=f:l.sibling=f,l=f);return c}for(f=r(i,f);v<s.length;v++)null!==(y=p(f,i,v,s[v],u))&&(e&&null!==y.alternate&&f.delete(null===y.key?v:y.key),a=o(y,a,v),null===l?c=y:l.sibling=y,l=y);return e&&f.forEach((function(e){return t(i,e)})),c}function y(i,s,u,c){var l=q(u);if("function"!==typeof l)throw Error(a(150));if(null==(u=l.call(u)))throw Error(a(151));for(var f=l=null,v=s,y=s=0,m=null,g=u.next();null!==v&&!g.done;y++,g=u.next()){v.index>y?(m=v,v=null):m=v.sibling;var b=d(i,v,g.value,c);if(null===b){null===v&&(v=m);break}e&&v&&null===b.alternate&&t(i,v),s=o(b,s,y),null===f?l=b:f.sibling=b,f=b,v=m}if(g.done)return n(i,v),l;if(null===v){for(;!g.done;y++,g=u.next())null!==(g=h(i,g.value,c))&&(s=o(g,s,y),null===f?l=g:f.sibling=g,f=g);return l}for(v=r(i,v);!g.done;y++,g=u.next())null!==(g=p(v,i,y,g.value,c))&&(e&&null!==g.alternate&&v.delete(null===g.key?y:g.key),s=o(g,s,y),null===f?l=g:f.sibling=g,f=g);return e&&v.forEach((function(e){return t(i,e)})),l}return function(e,r,o,u){var c="object"===typeof o&&null!==o&&o.type===O&&null===o.key;c&&(o=o.props.children);var l="object"===typeof o&&null!==o;if(l)switch(o.$$typeof){case k:e:{for(l=o.key,c=r;null!==c;){if(c.key===l){switch(c.tag){case 7:if(o.type===O){n(e,c.sibling),(r=i(c,o.props.children)).return=e,e=r;break e}break;default:if(c.elementType===o.type){n(e,c.sibling),(r=i(c,o.props)).ref=wo(e,c,o),r.return=e,e=r;break e}}n(e,c);break}t(e,c),c=c.sibling}o.type===O?((r=Hu(o.props.children,e.mode,u,o.key)).return=e,e=r):((u=zu(o.type,o.key,o.props,null,e.mode,u)).ref=wo(e,r,o),u.return=e,e=u)}return s(e);case S:e:{for(c=o.key;null!==r;){if(r.key===c){if(4===r.tag&&r.stateNode.containerInfo===o.containerInfo&&r.stateNode.implementation===o.implementation){n(e,r.sibling),(r=i(r,o.children||[])).return=e,e=r;break e}n(e,r);break}t(e,r),r=r.sibling}(r=Yu(o,e.mode,u)).return=e,e=r}return s(e)}if("string"===typeof o||"number"===typeof o)return o=""+o,null!==r&&6===r.tag?(n(e,r.sibling),(r=i(r,o)).return=e,e=r):(n(e,r),(r=Ku(o,e.mode,u)).return=e,e=r),s(e);if(_o(o))return v(e,r,o,u);if(q(o))return y(e,r,o,u);if(l&&ko(e,o),"undefined"===typeof o&&!c)switch(e.tag){case 1:case 22:case 0:case 11:case 15:throw Error(a(152,K(e.type)||"Component"))}return n(e,r)}}var Oo=So(!0),Eo=So(!1),To={},Co=ai(To),Po=ai(To),xo=ai(To);function Io(e){if(e===To)throw Error(a(174));return e}function jo(e,t){switch(ui(xo,t),ui(Po,e),ui(Co,To),e=t.nodeType){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:pe(null,"");break;default:t=pe(t=(e=8===e?t.parentNode:t).namespaceURI||null,e=e.tagName)}si(Co),ui(Co,t)}function Ro(){si(Co),si(Po),si(xo)}function Ao(e){Io(xo.current);var t=Io(Co.current),n=pe(t,e.type);t!==n&&(ui(Po,e),ui(Co,n))}function Mo(e){Po.current===e&&(si(Co),si(Po))}var No=ai(0);function Lo(e){for(var t=e;null!==t;){if(13===t.tag){var n=t.memoizedState;if(null!==n&&(null===(n=n.dehydrated)||"$?"===n.data||"$!"===n.data))return t}else if(19===t.tag&&void 0!==t.memoizedProps.revealOrder){if(0!==(64&t.flags))return t}else if(null!==t.child){t.child.return=t,t=t.child;continue}if(t===e)break;for(;null===t.sibling;){if(null===t.return||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var Do=null,Fo=null,Uo=!1;function Vo(e,t){var n=Bu(5,null,null,0);n.elementType="DELETED",n.type="DELETED",n.stateNode=t,n.return=e,n.flags=8,null!==e.lastEffect?(e.lastEffect.nextEffect=n,e.lastEffect=n):e.firstEffect=e.lastEffect=n}function Bo(e,t){switch(e.tag){case 5:var n=e.type;return null!==(t=1!==t.nodeType||n.toLowerCase()!==t.nodeName.toLowerCase()?null:t)&&(e.stateNode=t,!0);case 6:return null!==(t=""===e.pendingProps||3!==t.nodeType?null:t)&&(e.stateNode=t,!0);case 13:default:return!1}}function qo(e){if(Uo){var t=Fo;if(t){var n=t;if(!Bo(e,t)){if(!(t=Hr(n.nextSibling))||!Bo(e,t))return e.flags=-1025&e.flags|2,Uo=!1,void(Do=e);Vo(Do,n)}Do=e,Fo=Hr(t.firstChild)}else e.flags=-1025&e.flags|2,Uo=!1,Do=e}}function Wo(e){for(e=e.return;null!==e&&5!==e.tag&&3!==e.tag&&13!==e.tag;)e=e.return;Do=e}function zo(e){if(e!==Do)return!1;if(!Uo)return Wo(e),Uo=!0,!1;var t=e.type;if(5!==e.tag||"head"!==t&&"body"!==t&&!Br(t,e.memoizedProps))for(t=Fo;t;)Vo(e,t),t=Hr(t.nextSibling);if(Wo(e),13===e.tag){if(!(e=null!==(e=e.memoizedState)?e.dehydrated:null))throw Error(a(317));e:{for(e=e.nextSibling,t=0;e;){if(8===e.nodeType){var n=e.data;if("/$"===n){if(0===t){Fo=Hr(e.nextSibling);break e}t--}else"$"!==n&&"$!"!==n&&"$?"!==n||t++}e=e.nextSibling}Fo=null}}else Fo=Do?Hr(e.stateNode.nextSibling):null;return!0}function Ho(){Fo=Do=null,Uo=!1}var Go=[];function Ko(){for(var e=0;e<Go.length;e++)Go[e]._workInProgressVersionPrimary=null;Go.length=0}var Yo=w.ReactCurrentDispatcher,Qo=w.ReactCurrentBatchConfig,$o=0,Xo=null,Jo=null,Zo=null,ea=!1,ta=!1;function na(){throw Error(a(321))}function ra(e,t){if(null===t)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!sr(e[n],t[n]))return!1;return!0}function ia(e,t,n,r,i,o){if($o=o,Xo=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,Yo.current=null===e||null===e.memoizedState?Ia:ja,e=n(r,i),ta){o=0;do{if(ta=!1,!(25>o))throw Error(a(301));o+=1,Zo=Jo=null,t.updateQueue=null,Yo.current=Ra,e=n(r,i)}while(ta)}if(Yo.current=xa,t=null!==Jo&&null!==Jo.next,$o=0,Zo=Jo=Xo=null,ea=!1,t)throw Error(a(300));return e}function oa(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return null===Zo?Xo.memoizedState=Zo=e:Zo=Zo.next=e,Zo}function aa(){if(null===Jo){var e=Xo.alternate;e=null!==e?e.memoizedState:null}else e=Jo.next;var t=null===Zo?Xo.memoizedState:Zo.next;if(null!==t)Zo=t,Jo=e;else{if(null===e)throw Error(a(310));e={memoizedState:(Jo=e).memoizedState,baseState:Jo.baseState,baseQueue:Jo.baseQueue,queue:Jo.queue,next:null},null===Zo?Xo.memoizedState=Zo=e:Zo=Zo.next=e}return Zo}function sa(e,t){return"function"===typeof t?t(e):t}function ua(e){var t=aa(),n=t.queue;if(null===n)throw Error(a(311));n.lastRenderedReducer=e;var r=Jo,i=r.baseQueue,o=n.pending;if(null!==o){if(null!==i){var s=i.next;i.next=o.next,o.next=s}r.baseQueue=i=o,n.pending=null}if(null!==i){i=i.next,r=r.baseState;var u=s=o=null,c=i;do{var l=c.lane;if(($o&l)===l)null!==u&&(u=u.next={lane:0,action:c.action,eagerReducer:c.eagerReducer,eagerState:c.eagerState,next:null}),r=c.eagerReducer===e?c.eagerState:e(r,c.action);else{var f={lane:l,action:c.action,eagerReducer:c.eagerReducer,eagerState:c.eagerState,next:null};null===u?(s=u=f,o=r):u=u.next=f,Xo.lanes|=l,Fs|=l}c=c.next}while(null!==c&&c!==i);null===u?o=r:u.next=s,sr(r,t.memoizedState)||(Ma=!0),t.memoizedState=r,t.baseState=o,t.baseQueue=u,n.lastRenderedState=r}return[t.memoizedState,n.dispatch]}function ca(e){var t=aa(),n=t.queue;if(null===n)throw Error(a(311));n.lastRenderedReducer=e;var r=n.dispatch,i=n.pending,o=t.memoizedState;if(null!==i){n.pending=null;var s=i=i.next;do{o=e(o,s.action),s=s.next}while(s!==i);sr(o,t.memoizedState)||(Ma=!0),t.memoizedState=o,null===t.baseQueue&&(t.baseState=o),n.lastRenderedState=o}return[o,r]}function la(e,t,n){var r=t._getVersion;r=r(t._source);var i=t._workInProgressVersionPrimary;if(null!==i?e=i===r:(e=e.mutableReadLanes,(e=($o&e)===e)&&(t._workInProgressVersionPrimary=r,Go.push(t))),e)return n(t._source);throw Go.push(t),Error(a(350))}function fa(e,t,n,r){var i=Is;if(null===i)throw Error(a(349));var o=t._getVersion,s=o(t._source),u=Yo.current,c=u.useState((function(){return la(i,t,n)})),l=c[1],f=c[0];c=Zo;var h=e.memoizedState,d=h.refs,p=d.getSnapshot,v=h.source;h=h.subscribe;var y=Xo;return e.memoizedState={refs:d,source:t,subscribe:r},u.useEffect((function(){d.getSnapshot=n,d.setSnapshot=l;var e=o(t._source);if(!sr(s,e)){e=n(t._source),sr(f,e)||(l(e),e=lu(y),i.mutableReadLanes|=e&i.pendingLanes),e=i.mutableReadLanes,i.entangledLanes|=e;for(var r=i.entanglements,a=e;0<a;){var u=31-zt(a),c=1<<u;r[u]|=e,a&=~c}}}),[n,t,r]),u.useEffect((function(){return r(t._source,(function(){var e=d.getSnapshot,n=d.setSnapshot;try{n(e(t._source));var r=lu(y);i.mutableReadLanes|=r&i.pendingLanes}catch(o){n((function(){throw o}))}}))}),[t,r]),sr(p,n)&&sr(v,t)&&sr(h,r)||((e={pending:null,dispatch:null,lastRenderedReducer:sa,lastRenderedState:f}).dispatch=l=Pa.bind(null,Xo,e),c.queue=e,c.baseQueue=null,f=la(i,t,n),c.memoizedState=c.baseState=f),f}function ha(e,t,n){return fa(aa(),e,t,n)}function da(e){var t=oa();return"function"===typeof e&&(e=e()),t.memoizedState=t.baseState=e,e=(e=t.queue={pending:null,dispatch:null,lastRenderedReducer:sa,lastRenderedState:e}).dispatch=Pa.bind(null,Xo,e),[t.memoizedState,e]}function pa(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},null===(t=Xo.updateQueue)?(t={lastEffect:null},Xo.updateQueue=t,t.lastEffect=e.next=e):null===(n=t.lastEffect)?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e),e}function va(e){return e={current:e},oa().memoizedState=e}function ya(){return aa().memoizedState}function ma(e,t,n,r){var i=oa();Xo.flags|=e,i.memoizedState=pa(1|t,n,void 0,void 0===r?null:r)}function ga(e,t,n,r){var i=aa();r=void 0===r?null:r;var o=void 0;if(null!==Jo){var a=Jo.memoizedState;if(o=a.destroy,null!==r&&ra(r,a.deps))return void pa(t,n,o,r)}Xo.flags|=e,i.memoizedState=pa(1|t,n,o,r)}function ba(e,t){return ma(516,4,e,t)}function _a(e,t){return ga(516,4,e,t)}function wa(e,t){return ga(4,2,e,t)}function ka(e,t){return"function"===typeof t?(e=e(),t(e),function(){t(null)}):null!==t&&void 0!==t?(e=e(),t.current=e,function(){t.current=null}):void 0}function Sa(e,t,n){return n=null!==n&&void 0!==n?n.concat([e]):null,ga(4,2,ka.bind(null,t,e),n)}function Oa(){}function Ea(e,t){var n=aa();t=void 0===t?null:t;var r=n.memoizedState;return null!==r&&null!==t&&ra(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function Ta(e,t){var n=aa();t=void 0===t?null:t;var r=n.memoizedState;return null!==r&&null!==t&&ra(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function Ca(e,t){var n=Bi();Wi(98>n?98:n,(function(){e(!0)})),Wi(97<n?97:n,(function(){var n=Qo.transition;Qo.transition=1;try{e(!1),t()}finally{Qo.transition=n}}))}function Pa(e,t,n){var r=cu(),i=lu(e),o={lane:i,action:n,eagerReducer:null,eagerState:null,next:null},a=t.pending;if(null===a?o.next=o:(o.next=a.next,a.next=o),t.pending=o,a=e.alternate,e===Xo||null!==a&&a===Xo)ta=ea=!0;else{if(0===e.lanes&&(null===a||0===a.lanes)&&null!==(a=t.lastRenderedReducer))try{var s=t.lastRenderedState,u=a(s,n);if(o.eagerReducer=a,o.eagerState=u,sr(u,s))return}catch(c){}fu(e,i,r)}}var xa={readContext:ro,useCallback:na,useContext:na,useEffect:na,useImperativeHandle:na,useLayoutEffect:na,useMemo:na,useReducer:na,useRef:na,useState:na,useDebugValue:na,useDeferredValue:na,useTransition:na,useMutableSource:na,useOpaqueIdentifier:na,unstable_isNewReconciler:!1},Ia={readContext:ro,useCallback:function(e,t){return oa().memoizedState=[e,void 0===t?null:t],e},useContext:ro,useEffect:ba,useImperativeHandle:function(e,t,n){return n=null!==n&&void 0!==n?n.concat([e]):null,ma(4,2,ka.bind(null,t,e),n)},useLayoutEffect:function(e,t){return ma(4,2,e,t)},useMemo:function(e,t){var n=oa();return t=void 0===t?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=oa();return t=void 0!==n?n(t):t,r.memoizedState=r.baseState=t,e=(e=r.queue={pending:null,dispatch:null,lastRenderedReducer:e,lastRenderedState:t}).dispatch=Pa.bind(null,Xo,e),[r.memoizedState,e]},useRef:va,useState:da,useDebugValue:Oa,useDeferredValue:function(e){var t=da(e),n=t[0],r=t[1];return ba((function(){var t=Qo.transition;Qo.transition=1;try{r(e)}finally{Qo.transition=t}}),[e]),n},useTransition:function(){var e=da(!1),t=e[0];return va(e=Ca.bind(null,e[1])),[e,t]},useMutableSource:function(e,t,n){var r=oa();return r.memoizedState={refs:{getSnapshot:t,setSnapshot:null},source:e,subscribe:n},fa(r,e,t,n)},useOpaqueIdentifier:function(){if(Uo){var e=!1,t=function(e){return{$$typeof:N,toString:e,valueOf:e}}((function(){throw e||(e=!0,n("r:"+(Kr++).toString(36))),Error(a(355))})),n=da(t)[1];return 0===(2&Xo.mode)&&(Xo.flags|=516,pa(5,(function(){n("r:"+(Kr++).toString(36))}),void 0,null)),t}return da(t="r:"+(Kr++).toString(36)),t},unstable_isNewReconciler:!1},ja={readContext:ro,useCallback:Ea,useContext:ro,useEffect:_a,useImperativeHandle:Sa,useLayoutEffect:wa,useMemo:Ta,useReducer:ua,useRef:ya,useState:function(){return ua(sa)},useDebugValue:Oa,useDeferredValue:function(e){var t=ua(sa),n=t[0],r=t[1];return _a((function(){var t=Qo.transition;Qo.transition=1;try{r(e)}finally{Qo.transition=t}}),[e]),n},useTransition:function(){var e=ua(sa)[0];return[ya().current,e]},useMutableSource:ha,useOpaqueIdentifier:function(){return ua(sa)[0]},unstable_isNewReconciler:!1},Ra={readContext:ro,useCallback:Ea,useContext:ro,useEffect:_a,useImperativeHandle:Sa,useLayoutEffect:wa,useMemo:Ta,useReducer:ca,useRef:ya,useState:function(){return ca(sa)},useDebugValue:Oa,useDeferredValue:function(e){var t=ca(sa),n=t[0],r=t[1];return _a((function(){var t=Qo.transition;Qo.transition=1;try{r(e)}finally{Qo.transition=t}}),[e]),n},useTransition:function(){var e=ca(sa)[0];return[ya().current,e]},useMutableSource:ha,useOpaqueIdentifier:function(){return ca(sa)[0]},unstable_isNewReconciler:!1},Aa=w.ReactCurrentOwner,Ma=!1;function Na(e,t,n,r){t.child=null===e?Eo(t,null,n,r):Oo(t,e.child,n,r)}function La(e,t,n,r,i){n=n.render;var o=t.ref;return no(t,i),r=ia(e,t,n,r,o,i),null===e||Ma?(t.flags|=1,Na(e,t,r,i),t.child):(t.updateQueue=e.updateQueue,t.flags&=-517,e.lanes&=~i,ns(e,t,i))}function Da(e,t,n,r,i,o){if(null===e){var a=n.type;return"function"!==typeof a||qu(a)||void 0!==a.defaultProps||null!==n.compare||void 0!==n.defaultProps?((e=zu(n.type,null,r,t,t.mode,o)).ref=t.ref,e.return=t,t.child=e):(t.tag=15,t.type=a,Fa(e,t,a,r,i,o))}return a=e.child,0===(i&o)&&(i=a.memoizedProps,(n=null!==(n=n.compare)?n:cr)(i,r)&&e.ref===t.ref)?ns(e,t,o):(t.flags|=1,(e=Wu(a,r)).ref=t.ref,e.return=t,t.child=e)}function Fa(e,t,n,r,i,o){if(null!==e&&cr(e.memoizedProps,r)&&e.ref===t.ref){if(Ma=!1,0===(o&i))return t.lanes=e.lanes,ns(e,t,o);0!==(16384&e.flags)&&(Ma=!0)}return Ba(e,t,n,r,o)}function Ua(e,t,n){var r=t.pendingProps,i=r.children,o=null!==e?e.memoizedState:null;if("hidden"===r.mode||"unstable-defer-without-hiding"===r.mode)if(0===(4&t.mode))t.memoizedState={baseLanes:0},bu(t,n);else{if(0===(1073741824&n))return e=null!==o?o.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e},bu(t,e),null;t.memoizedState={baseLanes:0},bu(t,null!==o?o.baseLanes:n)}else null!==o?(r=o.baseLanes|n,t.memoizedState=null):r=n,bu(t,r);return Na(e,t,i,n),t.child}function Va(e,t){var n=t.ref;(null===e&&null!==n||null!==e&&e.ref!==n)&&(t.flags|=128)}function Ba(e,t,n,r,i){var o=pi(n)?hi:li.current;return o=di(t,o),no(t,i),n=ia(e,t,n,r,o,i),null===e||Ma?(t.flags|=1,Na(e,t,n,i),t.child):(t.updateQueue=e.updateQueue,t.flags&=-517,e.lanes&=~i,ns(e,t,i))}function qa(e,t,n,r,i){if(pi(n)){var o=!0;gi(t)}else o=!1;if(no(t,i),null===t.stateNode)null!==e&&(e.alternate=null,t.alternate=null,t.flags|=2),mo(t,n,r),bo(t,n,r,i),r=!0;else if(null===e){var a=t.stateNode,s=t.memoizedProps;a.props=s;var u=a.context,c=n.contextType;"object"===typeof c&&null!==c?c=ro(c):c=di(t,c=pi(n)?hi:li.current);var l=n.getDerivedStateFromProps,f="function"===typeof l||"function"===typeof a.getSnapshotBeforeUpdate;f||"function"!==typeof a.UNSAFE_componentWillReceiveProps&&"function"!==typeof a.componentWillReceiveProps||(s!==r||u!==c)&&go(t,a,r,c),io=!1;var h=t.memoizedState;a.state=h,lo(t,r,a,i),u=t.memoizedState,s!==r||h!==u||fi.current||io?("function"===typeof l&&(po(t,n,l,r),u=t.memoizedState),(s=io||yo(t,n,s,r,h,u,c))?(f||"function"!==typeof a.UNSAFE_componentWillMount&&"function"!==typeof a.componentWillMount||("function"===typeof a.componentWillMount&&a.componentWillMount(),"function"===typeof a.UNSAFE_componentWillMount&&a.UNSAFE_componentWillMount()),"function"===typeof a.componentDidMount&&(t.flags|=4)):("function"===typeof a.componentDidMount&&(t.flags|=4),t.memoizedProps=r,t.memoizedState=u),a.props=r,a.state=u,a.context=c,r=s):("function"===typeof a.componentDidMount&&(t.flags|=4),r=!1)}else{a=t.stateNode,ao(e,t),s=t.memoizedProps,c=t.type===t.elementType?s:Yi(t.type,s),a.props=c,f=t.pen
2dingProps,h=a.context,"object"===typeof(u=n.contextType)&&null!==u?u=ro(u):u=di(t,u=pi(n)?hi:li.current);var d=n.getDerivedStateFromProps;(l="function"===typeof d||"function"===typeof a.getSnapshotBeforeUpdate)||"function"!==typeof a.UNSAFE_componentWillReceiveProps&&"function"!==typeof a.componentWillReceiveProps||(s!==f||h!==u)&&go(t,a,r,u),io=!1,h=t.memoizedState,a.state=h,lo(t,r,a,i);var p=t.memoizedState;s!==f||h!==p||fi.current||io?("function"===typeof d&&(po(t,n,d,r),p=t.memoizedState),(c=io||yo(t,n,c,r,h,p,u))?(l||"function"!==typeof a.UNSAFE_componentWillUpdate&&"function"!==typeof a.componentWillUpdate||("function"===typeof a.componentWillUpdate&&a.componentWillUpdate(r,p,u),"function"===typeof a.UNSAFE_componentWillUpdate&&a.UNSAFE_componentWillUpdate(r,p,u)),"function"===typeof a.componentDidUpdate&&(t.flags|=4),"function"===typeof a.getSnapshotBeforeUpdate&&(t.flags|=256)):("function"!==typeof a.componentDidUpdate||s===e.memoizedProps&&h===e.memoizedState||(t.flags|=4),"function"!==typeof a.getSnapshotBeforeUpdate||s===e.memoizedProps&&h===e.memoizedState||(t.flags|=256),t.memoizedProps=r,t.memoizedState=p),a.props=r,a.state=p,a.context=u,r=c):("function"!==typeof a.componentDidUpdate||s===e.memoizedProps&&h===e.memoizedState||(t.flags|=4),"function"!==typeof a.getSnapshotBeforeUpdate||s===e.memoizedProps&&h===e.memoizedState||(t.flags|=256),r=!1)}return Wa(e,t,n,r,o,i)}function Wa(e,t,n,r,i,o){Va(e,t);var a=0!==(64&t.flags);if(!r&&!a)return i&&bi(t,n,!1),ns(e,t,o);r=t.stateNode,Aa.current=t;var s=a&&"function"!==typeof n.getDerivedStateFromError?null:r.render();return t.flags|=1,null!==e&&a?(t.child=Oo(t,e.child,null,o),t.child=Oo(t,null,s,o)):Na(e,t,s,o),t.memoizedState=r.state,i&&bi(t,n,!0),t.child}function za(e){var t=e.stateNode;t.pendingContext?yi(0,t.pendingContext,t.pendingContext!==t.context):t.context&&yi(0,t.context,!1),jo(e,t.containerInfo)}var Ha,Ga,Ka,Ya={dehydrated:null,retryLane:0};function Qa(e,t,n){var r,i=t.pendingProps,o=No.current,a=!1;return(r=0!==(64&t.flags))||(r=(null===e||null!==e.memoizedState)&&0!==(2&o)),r?(a=!0,t.flags&=-65):null!==e&&null===e.memoizedState||void 0===i.fallback||!0===i.unstable_avoidThisFallback||(o|=1),ui(No,1&o),null===e?(void 0!==i.fallback&&qo(t),e=i.children,o=i.fallback,a?(e=$a(t,e,o,n),t.child.memoizedState={baseLanes:n},t.memoizedState=Ya,e):"number"===typeof i.unstable_expectedLoadTime?(e=$a(t,e,o,n),t.child.memoizedState={baseLanes:n},t.memoizedState=Ya,t.lanes=33554432,e):((n=Gu({mode:"visible",children:e},t.mode,n,null)).return=t,t.child=n)):(e.memoizedState,a?(i=Ja(e,t,i.children,i.fallback,n),a=t.child,o=e.child.memoizedState,a.memoizedState=null===o?{baseLanes:n}:{baseLanes:o.baseLanes|n},a.childLanes=e.childLanes&~n,t.memoizedState=Ya,i):(n=Xa(e,t,i.children,n),t.memoizedState=null,n))}function $a(e,t,n,r){var i=e.mode,o=e.child;return t={mode:"hidden",children:t},0===(2&i)&&null!==o?(o.childLanes=0,o.pendingProps=t):o=Gu(t,i,0,null),n=Hu(n,i,r,null),o.return=e,n.return=e,o.sibling=n,e.child=o,n}function Xa(e,t,n,r){var i=e.child;return e=i.sibling,n=Wu(i,{mode:"visible",children:n}),0===(2&t.mode)&&(n.lanes=r),n.return=t,n.sibling=null,null!==e&&(e.nextEffect=null,e.flags=8,t.firstEffect=t.lastEffect=e),t.child=n}function Ja(e,t,n,r,i){var o=t.mode,a=e.child;e=a.sibling;var s={mode:"hidden",children:n};return 0===(2&o)&&t.child!==a?((n=t.child).childLanes=0,n.pendingProps=s,null!==(a=n.lastEffect)?(t.firstEffect=n.firstEffect,t.lastEffect=a,a.nextEffect=null):t.firstEffect=t.lastEffect=null):n=Wu(a,s),null!==e?r=Wu(e,r):(r=Hu(r,o,i,null)).flags|=2,r.return=t,n.return=t,n.sibling=r,t.child=n,r}function Za(e,t){e.lanes|=t;var n=e.alternate;null!==n&&(n.lanes|=t),to(e.return,t)}function es(e,t,n,r,i,o){var a=e.memoizedState;null===a?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:i,lastEffect:o}:(a.isBackwards=t,a.rendering=null,a.renderingStartTime=0,a.last=r,a.tail=n,a.tailMode=i,a.lastEffect=o)}function ts(e,t,n){var r=t.pendingProps,i=r.revealOrder,o=r.tail;if(Na(e,t,r.children,n),0!==(2&(r=No.current)))r=1&r|2,t.flags|=64;else{if(null!==e&&0!==(64&e.flags))e:for(e=t.child;null!==e;
vendor: 10,262 bytes, line 2
2){if(13===e.tag)null!==e.memoizedState&&Za(e,n);else if(19===e.tag)Za(e,n);else if(null!==e.child){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;null===e.sibling;){if(null===e.return||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=1}if(ui(No,r),0===(2&t.mode))t.memoizedState=null;else switch(i){case"forwards":for(n=t.child,i=null;null!==n;)null!==(e=n.alternate)&&null===Lo(e)&&(i=n),n=n.sibling;null===(n=i)?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),es(t,!1,i,n,o,t.lastEffect);break;case"backwards":for(n=null,i=t.child,t.child=null;null!==i;){if(null!==(e=i.alternate)&&null===Lo(e)){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}es(t,!0,n,null,o,t.lastEffect);break;case"together":es(t,!1,null,null,void 0,t.lastEffect);break;default:t.memoizedState=null}return t.child}function ns(e,t,n){if(null!==e&&(t.dependencies=e.dependencies),Fs|=t.lanes,0!==(n&t.childLanes)){if(null!==e&&t.child!==e.child)throw Error(a(153));if(null!==t.child){for(n=Wu(e=t.child,e.pendingProps),t.child=n,n.return=t;null!==e.sibling;)e=e.sibling,(n=n.sibling=Wu(e,e.pendingProps)).return=t;n.sibling=null}return t.child}return null}function rs(e,t){if(!Uo)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;null!==t;)null!==t.alternate&&(n=t),t=t.sibling;null===n?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;null!==n;)null!==n.alternate&&(r=n),n=n.sibling;null===r?t||null===e.tail?e.tail=null:e.tail.sibling=null:r.sibling=null}}function is(e,t,n){var r=t.pendingProps;switch(t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return null;case 1:return pi(t.type)&&vi(),null;case 3:return Ro(),si(fi),si(li),Ko(),(r=t.stateNode).pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),null!==e&&null!==e.child||(zo(t)?t.flags|=4:r.hydrate||(t.flags|=256)),null;case 5:Mo(t);var o=Io(xo.current);if(n=t.type,null!==e&&null!=t.stateNode)Ga(e,t,n,r),e.ref!==t.ref&&(t.flags|=128);else{if(!r){if(null===t.stateNode)throw Error(a(166));return null}if(e=Io(Co.current),zo(t)){r=t.stateNode,n=t.type;var s=t.memoizedProps;switch(r[Qr]=t,r[$r]=s,n){case"dialog":Cr("cancel",r),Cr("close",r);break;case"iframe":case"object":case"embed":Cr("load",r);break;case"video":case"audio":for(e=0;e<Sr.length;e++)Cr(Sr[e],r);break;case"source":Cr("error",r);break;case"img":case"image":case"link":Cr("error",r),Cr("load",r);break;case"details":Cr("toggle",r);break;case"input":ee(r,s),Cr("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!s.multiple},Cr("invalid",r);break;case"textarea":ue(r,s),Cr("invalid",r)}for(var c in Oe(n,s),e=null,s)s.hasOwnProperty(c)&&(o=s[c],"children"===c?"string"===typeof o?r.textContent!==o&&(e=["children",o]):"number"===typeof o&&r.textContent!==""+o&&(e=["children",""+o]):u.hasOwnProperty(c)&&null!=o&&"onScroll"===c&&Cr("scroll",r));switch(n){case"input":$(r),re(r,s,!0);break;case"textarea":$(r),le(r);break;case"select":case"option":break;default:"function"===typeof s.onClick&&(r.onclick=Dr)}r=e,t.updateQueue=r,null!==r&&(t.flags|=4)}else{switch(c=9===o.nodeType?o:o.ownerDocument,e===fe&&(e=de(n)),e===fe?"script"===n?((e=c.createElement("div")).innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):"string"===typeof r.is?e=c.createElement(n,{is:r.is}):(e=c.createElement(n),"select"===n&&(c=e,r.multiple?c.multiple=!0:r.size&&(c.size=r.size))):e=c.createElementNS(e,n),e[Qr]=t,e[$r]=r,Ha(e,t),t.stateNode=e,c=Ee(n,r),n){case"dialog":Cr("cancel",e),Cr("close",e),o=r;break;case"iframe":case"object":case"embed":Cr("load",e),o=r;break;case"video":case"audio":for(o=0;o<Sr.length;o++)Cr(Sr[o],e);o=r;break;case"source":Cr("error",e),o=r;break;case"img":case"image":case"link":Cr("error",e),Cr("load",e),o=r;break;case"details":Cr("toggle",e),o=r;break;case"input":ee(e,r),o=Z(e,r),Cr("invalid",e);break;case"option":o=oe(e,r);break;case"select":e._wrapperState={wasMultiple:!!r.multiple},o=i({},r,{value:void 0}),Cr("invalid",e);break;case"textarea":ue(e,r),o=se(e,r),Cr("invalid",e);break;default:o=r}Oe(n,o);var l=o;for(s in l)if(l.hasOwnProperty(s)){var f=l[s];"style"===s?ke(e,f):"dangerouslySetInnerHTML"===s?null!=(f=f?f.__html:void 0)&&me(e,f):"children"===s?"string"===typeof f?("textarea"!==n||""!==f)&&ge(e,f):"number"===typeof f&&ge(e,""+f):"suppressContentEditableWarning"!==s&&"suppressHydrationWarning"!==s&&"autoFocus"!==s&&(u.hasOwnProperty(s)?null!=f&&"onScroll"===s&&Cr("scroll",e):null!=f&&_(e,s,f,c))}switch(n){case"input":$(e),re(e,r,!1);break;case"textarea":$(e),le(e);break;case"option":null!=r.value&&e.setAttribute("value",""+Y(r.value));break;case"select":e.multiple=!!r.multiple,null!=(s=r.value)?ae(e,!!r.multiple,s,!1):null!=r.defaultValue&&ae(e,!!r.multiple,r.defaultValue,!0);break;default:"function"===typeof o.onClick&&(e.onclick=Dr)}Vr(n,r)&&(t.flags|=4)}null!==t.ref&&(t.flags|=128)}return null;case 6:if(e&&null!=t.stateNode)Ka(0,t,e.memoizedProps,r);else{if("string"!==typeof r&&null===t.stateNode)throw Error(a(166));n=Io(xo.current),Io(Co.current),zo(t)?(r=t.stateNode,n=t.memoizedProps,r[Qr]=t,r.nodeValue!==n&&(t.flags|=4)):((r=(9===n.nodeType?n:n.ownerDocument).createTextNode(r))[Qr]=t,t.stateNode=r)}return null;case 13:return si(No),r=t.memoizedState,0!==(64&t.flags)?(t.lanes=n,t):(r=null!==r,n=!1,null===e?void 0!==t.memoizedProps.fallback&&zo(t):n=null!==e.memoizedState,r&&!n&&0!==(2&t.mode)&&(null===e&&!0!==t.memoizedProps.unstable_avoidThisFallback||0!==(1&No.current)?0===Ns&&(Ns=3):(0!==Ns&&3!==Ns||(Ns=4),null===Is||0===(134217727&Fs)&&0===(134217727&Us)||vu(Is,Rs))),(r||n)&&(t.flags|=4),null);case 4:return Ro(),null===e&&xr(t.stateNode.containerInfo),null;case 10:return eo(t),null;case 17:return pi(t.type)&&vi(),null;case 19:if(si(No),null===(r=t.memoizedState))return null;if(s=0!==(64&t.flags),null===(c=r.rendering))if(s)rs(r,!1);else{if(0!==Ns||null!==e&&0!==(64&e.flags))for(e=t.child;null!==e;){if(null!==(c=Lo(e))){for(t.flags|=64,rs(r,!1),null!==(s=c.updateQueue)&&(t.updateQueue=s,t.flags|=4),null===r.lastEffect&&(t.firstEffect=null),t.lastEffect=r.lastEffect,r=n,n=t.child;null!==n;)e=r,(s=n).flags&=2,s.nextEffect=null,s.firstEffect=null,s.lastEffect=null,null===(c=s.alternate)?(s.childLanes=0,s.lanes=e,s.child=null,s.memoizedProps=null,s.memoizedState=null,s.updateQueue=null,s.dependencies=null,s.stateNode=null):(s.childLanes=c.childLanes,s.lanes=c.lanes,s.child=c.child,s.memoizedProps=c.memoizedProps,s.memoizedState=c.memoizedState,s.updateQueue=c.updateQueue,s.type=c.type,e=c.dependencies,s.dependencies=null===e?null:{lanes:e.lanes,firstContext:e.firstContext}),n=n.sibling;return ui(No,1&No.current|2),t.child}e=e.sibling}null!==r.tail&&Vi()>Ws&&(t.flags|=64,s=!0,rs(r,!1),t.lanes=33554432)}else{if(!s)if(null!==(e=Lo(c))){if(t.flags|=64,s=!0,null!==(n=e.updateQueue)&&(t.updateQueue=n,t.flags|=4),rs(r,!0),null===r.tail&&"hidden"===r.tailMode&&!c.alternate&&!Uo)return null!==(t=t.lastEffect=r.lastEffect)&&(t.nextEffect=null),null}else 2*Vi()-r.renderingStartTime>Ws&&1073741824!==n&&(t.flags|=64,s=!0,rs(r,!1),t.lanes=33554432);r.isBackwards?(c.sibling=t.child,t.child=c):(null!==(n=r.last)?n.sibling=c:t.child=c,r.last=c)}return null!==r.tail?(n=r.tail,r.rendering=n,r.tail=n.sibling,r.lastEffect=t.lastEffect,r.renderingStartTime=Vi(),n.sibling=null,t=No.current,ui(No,s?1&t|2:1&t),n):null;case 23:case 24:return _u(),null!==e&&null!==e.memoizedState!==(null!==t.memoizedState)&&"unstable-defer-without-hiding"!==r.mode&&(t.flags|=4),null}throw Error(a(156,t.tag))}function os(e){switch(e.tag){case 1:pi(e.type)&&vi();var t=e.flags;return 4096&t?(e.flags=-4097&t|64,e):null;case 3:if(Ro(),si(fi),si(li),Ko(),0!==(64&(t=e.flags)))throw Error(a(285));return e.flags=-4097&t|64,e;case 5:return Mo(e),null;case 13:return si(No),4096&(t=e.flags)?(e.flags=-4097&t|64,e):null;case 19:return si(No),null;case 4:return Ro(),null;case 10:return eo(e),null;case 23:case 24:return _u(),null;default:return null}}function as(e,t){try{var n="",r=t;do{n+=G(r),r=r.return}while(r);var i=n}catch(o){i="\nError generating stack: "+o.message+"\n"+o.stack}return{value:e,source:t,stack:i}}function ss(e,t){try{console.error(t.value)}catch(n){setTimeout((function(){throw n}))}}Ha=function(e,t){for(var n=t.child;null!==n;){if(5===n.tag||6===n.tag)e.appendChild(n.stateNode);else if(4!==n.tag&&null!==n.child){n.child.return=n,n=n.child;continue}if(n===t)break;for(;null===n.sibling;){if(null===n.return||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}},Ga=function(e,t,n,r){var o=e.memoizedProps;if(o!==r){e=t.stateNode,Io(Co.current);var a,s=null;switch(n){case"input":o=Z(e,o),r=Z(e,r),s=[];break;case"option":o=oe(e,o),r=oe(e,r),s=[];break;case"select":o=i({},o,{value:void 0}),r=i({},r,{value:void 0}),s=[];break;case"textarea":o=se(e,o),r=se(e,r),s=[];break;default:"function"!==typeof o.onClick&&"function"===typeof r.onClick&&(e.onclick=Dr)}for(f in Oe(n,r),n=null,o)if(!r.hasOwnProperty(f)&&o.hasOwnProperty(f)&&null!=o[f])if("style"===f){var c=o[f];for(a in c)c.hasOwnProperty(a)&&(n||(n={}),n[a]="")}else"dangerouslySetInnerHTML"!==f&&"children"!==f&&"suppressContentEditableWarning"!==f&&"suppressHydrationWarning"!==f&&"autoFocus"!==f&&(u.hasOwnProperty(f)?s||(s=[]):(s=s||[]).push(f,null));for(f in r){var l=r[f];if(c=null!=o?o[f]:void 0,r.hasOwnProperty(f)&&l!==c&&(null!=l||null!=c))if("style"===f)if(c){for(a in c)!c.hasOwnProperty(a)||l&&l.hasOwnProperty(a)||(n||(n={}),n[a]="");for(a in l)l.hasOwnProperty(a)&&c[a]!==l[a]&&(n||(n={}),n[a]=l[a])}else n||(s||(s=[]),s.push(f,n)),n=l;else"dangerouslySetInnerHTML"===f?(l=l?l.__html:void 0,c=c?c.__html:void 0,null!=l&&c!==l&&(s=s||[]).push(f,l)):"children"===f?"string"!==typeof l&&"number"!==typeof l||(s=s||[]).push(f,""+l):"suppressContentEditableWarning"!==f&&"suppressHydrationWarning"!==f&&(u.hasOwnProperty(f)?(null!=l&&"onScroll"===f&&Cr("scroll",e),s||c===l||(s=[])):"object"===typeof l&&null!==l&&l.$$typeof===N?l.toString():(s=s||[]).push(f,l))}n&&(s=s||[]).push("style",n);var f=s;(t.updateQueue=f)&&(t.flags|=4)}},Ka=function(e,t,n,r){n!==r&&(t.flags|=4)};var us="function"===typeof WeakMap?WeakMap:Map;function cs(e,t,n){(n=so(-1,n)).tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){Ks||(Ks=!0,Ys=r),ss(0,t)},n}
vendor: 4,119 bytes, line 2
2function ls(e,t,n){(n=so(-1,n)).tag=3;var r=e.type.getDerivedStateFromError;if("function"===typeof r){var i=t.value;n.payload=function(){return ss(0,t),r(i)}}var o=e.stateNode;return null!==o&&"function"===typeof o.componentDidCatch&&(n.callback=function(){"function"!==typeof r&&(null===Qs?Qs=new Set([this]):Qs.add(this),ss(0,t));var e=t.stack;this.componentDidCatch(t.value,{componentStack:null!==e?e:""})}),n}var fs="function"===typeof WeakSet?WeakSet:Set;function hs(e){var t=e.ref;if(null!==t)if("function"===typeof t)try{t(null)}catch(n){Du(e,n)}else t.current=null}function ds(e,t){switch(t.tag){case 0:case 11:case 15:case 22:return;case 1:if(256&t.flags&&null!==e){var n=e.memoizedProps,r=e.memoizedState;t=(e=t.stateNode).getSnapshotBeforeUpdate(t.elementType===t.type?n:Yi(t.type,n),r),e.__reactInternalSnapshotBeforeUpdate=t}return;case 3:return void(256&t.flags&&zr(t.stateNode.containerInfo));case 5:case 6:case 4:case 17:return}throw Error(a(163))}function ps(e,t,n){switch(n.tag){case 0:case 11:case 15:case 22:if(null!==(t=null!==(t=n.updateQueue)?t.lastEffect:null)){e=t=t.next;do{if(3===(3&e.tag)){var r=e.create;e.destroy=r()}e=e.next}while(e!==t)}if(null!==(t=null!==(t=n.updateQueue)?t.lastEffect:null)){e=t=t.next;do{var i=e;r=i.next,0!==(4&(i=i.tag))&&0!==(1&i)&&(Mu(n,e),Au(n,e)),e=r}while(e!==t)}return;case 1:return e=n.stateNode,4&n.flags&&(null===t?e.componentDidMount():(r=n.elementType===n.type?t.memoizedProps:Yi(n.type,t.memoizedProps),e.componentDidUpdate(r,t.memoizedState,e.__reactInternalSnapshotBeforeUpdate))),void(null!==(t=n.updateQueue)&&fo(n,t,e));case 3:if(null!==(t=n.updateQueue)){if(e=null,null!==n.child)switch(n.child.tag){case 5:e=n.child.stateNode;break;case 1:e=n.child.stateNode}fo(n,t,e)}return;case 5:return e=n.stateNode,void(null===t&&4&n.flags&&Vr(n.type,n.memoizedProps)&&e.focus());case 6:case 4:case 12:return;case 13:return void(null===n.memoizedState&&(n=n.alternate,null!==n&&(n=n.memoizedState,null!==n&&(n=n.dehydrated,null!==n&&kt(n)))));case 19:case 17:case 20:case 21:case 23:case 24:return}throw Error(a(163))}function vs(e,t){for(var n=e;;){if(5===n.tag){var r=n.stateNode;if(t)"function"===typeof(r=r.style).setProperty?r.setProperty("display","none","important"):r.display="none";else{r=n.stateNode;var i=n.memoizedProps.style;i=void 0!==i&&null!==i&&i.hasOwnProperty("display")?i.display:null,r.style.display=we("display",i)}}else if(6===n.tag)n.stateNode.nodeValue=t?"":n.memoizedProps;else if((23!==n.tag&&24!==n.tag||null===n.memoizedState||n===e)&&null!==n.child){n.child.return=n,n=n.child;continue}if(n===e)break;for(;null===n.sibling;){if(null===n.return||n.return===e)return;n=n.return}n.sibling.return=n.return,n=n.sibling}}function ys(e,t){if(wi&&"function"===typeof wi.onCommitFiberUnmount)try{wi.onCommitFiberUnmount(_i,t)}catch(o){}switch(t.tag){case 0:case 11:case 14:case 15:case 22:if(null!==(e=t.updateQueue)&&null!==(e=e.lastEffect)){var n=e=e.next;do{var r=n,i=r.destroy;if(r=r.tag,void 0!==i)if(0!==(4&r))Mu(t,n);else{r=t;try{i()}catch(o){Du(r,o)}}n=n.next}while(n!==e)}break;case 1:if(hs(t),"function"===typeof(e=t.stateNode).componentWillUnmount)try{e.props=t.memoizedProps,e.state=t.memoizedState,e.componentWillUnmount()}catch(o){Du(t,o)}break;case 5:hs(t);break;case 4:ks(e,t)}}function ms(e){e.alternate=null,e.child=null,e.dependencies=null,e.firstEffect=null,e.lastEffect=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.return=null,e.updateQueue=null}function gs(e){return 5===e.tag||3===e.tag||4===e.tag}function bs(e){e:{for(var t=e.return;null!==t;){if(gs(t))break e;t=t.return}throw Error(a(160))}var n=t;switch(t=n.stateNode,n.tag){case 5:var r=!1;break;case 3:case 4:t=t.containerInfo,r=!0;break;default:throw Error(a(161))}16&n.flags&&(ge(t,""),n.flags&=-17);e:t:for(n=e;;){for(;null===n.sibling;){if(null===n.return||gs(n.return)){n=null;break e}n=n.return}for(n.sibling.return=n.return,n=n.sibling;5!==n.tag&&6!==n.tag&&18!==n.tag;){if(2&n.flags)continue t;if(null===n.child||4===n.tag)continue t;n.child.return=n,n=n.child}if(!(2&n.flags)){n=n.stateNode;break e}}r?_s(e,n,t):ws(e,n,t)}
vendor: 10,884 bytes, line 2
2function _s(e,t,n){var r=e.tag,i=5===r||6===r;if(i)e=i?e.stateNode:e.stateNode.instance,t?8===n.nodeType?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(8===n.nodeType?(t=n.parentNode).insertBefore(e,n):(t=n).appendChild(e),null!==(n=n._reactRootContainer)&&void 0!==n||null!==t.onclick||(t.onclick=Dr));else if(4!==r&&null!==(e=e.child))for(_s(e,t,n),e=e.sibling;null!==e;)_s(e,t,n),e=e.sibling}function ws(e,t,n){var r=e.tag,i=5===r||6===r;if(i)e=i?e.stateNode:e.stateNode.instance,t?n.insertBefore(e,t):n.appendChild(e);else if(4!==r&&null!==(e=e.child))for(ws(e,t,n),e=e.sibling;null!==e;)ws(e,t,n),e=e.sibling}function ks(e,t){for(var n,r,i=t,o=!1;;){if(!o){o=i.return;e:for(;;){if(null===o)throw Error(a(160));switch(n=o.stateNode,o.tag){case 5:r=!1;break e;case 3:case 4:n=n.containerInfo,r=!0;break e}o=o.return}o=!0}if(5===i.tag||6===i.tag){e:for(var s=e,u=i,c=u;;)if(ys(s,c),null!==c.child&&4!==c.tag)c.child.return=c,c=c.child;else{if(c===u)break e;for(;null===c.sibling;){if(null===c.return||c.return===u)break e;c=c.return}c.sibling.return=c.return,c=c.sibling}r?(s=n,u=i.stateNode,8===s.nodeType?s.parentNode.removeChild(u):s.removeChild(u)):n.removeChild(i.stateNode)}else if(4===i.tag){if(null!==i.child){n=i.stateNode.containerInfo,r=!0,i.child.return=i,i=i.child;continue}}else if(ys(e,i),null!==i.child){i.child.return=i,i=i.child;continue}if(i===t)break;for(;null===i.sibling;){if(null===i.return||i.return===t)return;4===(i=i.return).tag&&(o=!1)}i.sibling.return=i.return,i=i.sibling}}function Ss(e,t){switch(t.tag){case 0:case 11:case 14:case 15:case 22:var n=t.updateQueue;if(null!==(n=null!==n?n.lastEffect:null)){var r=n=n.next;do{3===(3&r.tag)&&(e=r.destroy,r.destroy=void 0,void 0!==e&&e()),r=r.next}while(r!==n)}return;case 1:return;case 5:if(null!=(n=t.stateNode)){r=t.memoizedProps;var i=null!==e?e.memoizedProps:r;e=t.type;var o=t.updateQueue;if(t.updateQueue=null,null!==o){for(n[$r]=r,"input"===e&&"radio"===r.type&&null!=r.name&&te(n,r),Ee(e,i),t=Ee(e,r),i=0;i<o.length;i+=2){var s=o[i],u=o[i+1];"style"===s?ke(n,u):"dangerouslySetInnerHTML"===s?me(n,u):"children"===s?ge(n,u):_(n,s,u,t)}switch(e){case"input":ne(n,r);break;case"textarea":ce(n,r);break;case"select":e=n._wrapperState.wasMultiple,n._wrapperState.wasMultiple=!!r.multiple,null!=(o=r.value)?ae(n,!!r.multiple,o,!1):e!==!!r.multiple&&(null!=r.defaultValue?ae(n,!!r.multiple,r.defaultValue,!0):ae(n,!!r.multiple,r.multiple?[]:"",!1))}}}return;case 6:if(null===t.stateNode)throw Error(a(162));return void(t.stateNode.nodeValue=t.memoizedProps);case 3:return void((n=t.stateNode).hydrate&&(n.hydrate=!1,kt(n.containerInfo)));case 12:return;case 13:return null!==t.memoizedState&&(qs=Vi(),vs(t.child,!0)),void Os(t);case 19:return void Os(t);case 17:return;case 23:case 24:return void vs(t,null!==t.memoizedState)}throw Error(a(163))}function Os(e){var t=e.updateQueue;if(null!==t){e.updateQueue=null;var n=e.stateNode;null===n&&(n=e.stateNode=new fs),t.forEach((function(t){var r=Uu.bind(null,e,t);n.has(t)||(n.add(t),t.then(r,r))}))}}function Es(e,t){return null!==e&&(null===(e=e.memoizedState)||null!==e.dehydrated)&&(null!==(t=t.memoizedState)&&null===t.dehydrated)}var Ts=Math.ceil,Cs=w.ReactCurrentDispatcher,Ps=w.ReactCurrentOwner,xs=0,Is=null,js=null,Rs=0,As=0,Ms=ai(0),Ns=0,Ls=null,Ds=0,Fs=0,Us=0,Vs=0,Bs=null,qs=0,Ws=1/0;function zs(){Ws=Vi()+500}var Hs,Gs=null,Ks=!1,Ys=null,Qs=null,$s=!1,Xs=null,Js=90,Zs=[],eu=[],tu=null,nu=0,ru=null,iu=-1,ou=0,au=0,su=null,uu=!1;function cu(){return 0!==(48&xs)?Vi():-1!==iu?iu:iu=Vi()}function lu(e){if(0===(2&(e=e.mode)))return 1;if(0===(4&e))return 99===Bi()?1:2;if(0===ou&&(ou=Ds),0!==Ki.transition){0!==au&&(au=null!==Bs?Bs.pendingLanes:0),e=ou;var t=4186112&~au;return 0===(t&=-t)&&(0===(t=(e=4186112&~e)&-e)&&(t=8192)),t}return e=Bi(),0!==(4&xs)&&98===e?e=Vt(12,ou):e=Vt(e=function(e){switch(e){case 99:return 15;case 98:return 10;case 97:case 96:return 8;case 95:return 2;default:return 0}}(e),ou),e}function fu(e,t,n){if(50<nu)throw nu=0,ru=null,Error(a(185));if(null===(e=hu(e,t)))return null;Wt(e,t,n),e===Is&&(Us|=t,4===Ns&&vu(e,Rs));var r=Bi();1===t?0!==(8&xs)&&0===(48&xs)?yu(e):(du(e,n),0===xs&&(zs(),Hi())):(0===(4&xs)||98!==r&&99!==r||(null===tu?tu=new Set([e]):tu.add(e)),du(e,n)),Bs=e}function hu(e,t){e.lanes|=t;var n=e.alternate;for(null!==n&&(n.lanes|=t),n=e,e=e.return;null!==e;)e.childLanes|=t,null!==(n=e.alternate)&&(n.childLanes|=t),n=e,e=e.return;return 3===n.tag?n.stateNode:null}function du(e,t){for(var n=e.callbackNode,r=e.suspendedLanes,i=e.pingedLanes,o=e.expirationTimes,s=e.pendingLanes;0<s;){var u=31-zt(s),c=1<<u,l=o[u];if(-1===l){if(0===(c&r)||0!==(c&i)){l=t,Dt(c);var f=Lt;o[u]=10<=f?l+250:6<=f?l+5e3:-1}}else l<=t&&(e.expiredLanes|=c);s&=~c}if(r=Ft(e,e===Is?Rs:0),t=Lt,0===r)null!==n&&(n!==Mi&&Oi(n),e.callbackNode=null,e.callbackPriority=0);else{if(null!==n){if(e.callbackPriority===t)return;n!==Mi&&Oi(n)}15===t?(n=yu.bind(null,e),null===Li?(Li=[n],Di=Si(xi,Gi)):Li.push(n),n=Mi):14===t?n=zi(99,yu.bind(null,e)):n=zi(n=function(e){switch(e){case 15:case 14:return 99;case 13:case 12:case 11:case 10:return 98;case 9:case 8:case 7:case 6:case 4:case 5:return 97;case 3:case 2:case 1:return 95;case 0:return 90;default:throw Error(a(358,e))}}(t),pu.bind(null,e)),e.callbackPriority=t,e.callbackNode=n}}function pu(e){if(iu=-1,au=ou=0,0!==(48&xs))throw Error(a(327));var t=e.callbackNode;if(Ru()&&e.callbackNode!==t)return null;var n=Ft(e,e===Is?Rs:0);if(0===n)return null;var r=n,i=xs;xs|=16;var o=Su();for(Is===e&&Rs===r||(zs(),wu(e,r));;)try{Tu();break}catch(u){ku(e,u)}if(Zi(),Cs.current=o,xs=i,null!==js?r=0:(Is=null,Rs=0,r=Ns),0!==(Ds&Us))wu(e,0);else if(0!==r){if(2===r&&(xs|=64,e.hydrate&&(e.hydrate=!1,zr(e.containerInfo)),0!==(n=Ut(e))&&(r=Ou(e,n))),1===r)throw t=Ls,wu(e,0),vu(e,n),du(e,Vi()),t;switch(e.finishedWork=e.current.alternate,e.finishedLanes=n,r){case 0:case 1:throw Error(a(345));case 2:xu(e);break;case 3:if(vu(e,n),(62914560&n)===n&&10<(r=qs+500-Vi())){if(0!==Ft(e,0))break;if(((i=e.suspendedLanes)&n)!==n){cu(),e.pingedLanes|=e.suspendedLanes&i;break}e.timeoutHandle=qr(xu.bind(null,e),r);break}xu(e);break;case 4:if(vu(e,n),(4186112&n)===n)break;for(r=e.eventTimes,i=-1;0<n;){var s=31-zt(n);o=1<<s,(s=r[s])>i&&(i=s),n&=~o}if(n=i,10<(n=(120>(n=Vi()-n)?120:480>n?480:1080>n?1080:1920>n?1920:3e3>n?3e3:4320>n?4320:1960*Ts(n/1960))-n)){e.timeoutHandle=qr(xu.bind(null,e),n);break}xu(e);break;case 5:xu(e);break;default:throw Error(a(329))}}return du(e,Vi()),e.callbackNode===t?pu.bind(null,e):null}function vu(e,t){for(t&=~Vs,t&=~Us,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-zt(t),r=1<<n;e[n]=-1,t&=~r}}function yu(e){if(0!==(48&xs))throw Error(a(327));if(Ru(),e===Is&&0!==(e.expiredLanes&Rs)){var t=Rs,n=Ou(e,t);0!==(Ds&Us)&&(n=Ou(e,t=Ft(e,t)))}else n=Ou(e,t=Ft(e,0));if(0!==e.tag&&2===n&&(xs|=64,e.hydrate&&(e.hydrate=!1,zr(e.containerInfo)),0!==(t=Ut(e))&&(n=Ou(e,t))),1===n)throw n=Ls,wu(e,0),vu(e,t),du(e,Vi()),n;return e.finishedWork=e.current.alternate,e.finishedLanes=t,xu(e),du(e,Vi()),null}function mu(e,t){var n=xs;xs|=1;try{return e(t)}finally{0===(xs=n)&&(zs(),Hi())}}function gu(e,t){var n=xs;xs&=-2,xs|=8;try{return e(t)}finally{0===(xs=n)&&(zs(),Hi())}}function bu(e,t){ui(Ms,As),As|=t,Ds|=t}function _u(){As=Ms.current,si(Ms)}function wu(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(-1!==n&&(e.timeoutHandle=-1,Wr(n)),null!==js)for(n=js.return;null!==n;){var r=n;switch(r.tag){case 1:null!==(r=r.type.childContextTypes)&&void 0!==r&&vi();break;case 3:Ro(),si(fi),si(li),Ko();break;case 5:Mo(r);break;case 4:Ro();break;case 13:case 19:si(No);break;case 10:eo(r);break;case 23:case 24:_u()}n=n.return}Is=e,js=Wu(e.current,null),Rs=As=Ds=t,Ns=0,Ls=null,Vs=Us=Fs=0}function ku(e,t){for(;;){var n=js;try{if(Zi(),Yo.current=xa,ea){for(var r=Xo.memoizedState;null!==r;){var i=r.queue;null!==i&&(i.pending=null),r=r.next}ea=!1}if($o=0,Zo=Jo=Xo=null,ta=!1,Ps.current=null,null===n||null===n.return){Ns=1,Ls=t,js=null;break}e:{var o=e,a=n.return,s=n,u=t;if(t=Rs,s.flags|=2048,s.firstEffect=s.lastEffect=null,null!==u&&"object"===typeof u&&"function"===typeof u.then){var c=u;if(0===(2&s.mode)){var l=s.alternate;l?(s.updateQueue=l.updateQueue,s.memoizedState=l.memoizedState,s.lanes=l.lanes):(s.updateQueue=null,s.memoizedState=null)}var f=0!==(1&No.current),h=a;do{var d;if(d=13===h.tag){var p=h.memoizedState;if(null!==p)d=null!==p.dehydrated;else{var v=h.memoizedProps;d=void 0!==v.fallback&&(!0!==v.unstable_avoidThisFallback||!f)}}if(d){var y=h.updateQueue;if(null===y){var m=new Set;m.add(c),h.updateQueue=m}else y.add(c);if(0===(2&h.mode)){if(h.flags|=64,s.flags|=16384,s.flags&=-2981,1===s.tag)if(null===s.alternate)s.tag=17;else{var g=so(-1,1);g.tag=2,uo(s,g)}s.lanes|=1;break e}u=void 0,s=t;var b=o.pingCache;if(null===b?(b=o.pingCache=new us,u=new Set,b.set(c,u)):void 0===(u=b.get(c))&&(u=new Set,b.set(c,u)),!u.has(s)){u.add(s);var _=Fu.bind(null,o,c,s);c.then(_,_)}h.flags|=4096,h.lanes=t;break e}h=h.return}while(null!==h);u=Error((K(s.type)||"A React component")+" suspended while rendering, but no fallback UI was specified.\n\nAdd a <Suspense fallback=...> component higher in the tree to provide a loading indicator or placeholder to display.")}5!==Ns&&(Ns=2),u=as(u,s),h=a;do{switch(h.tag){case 3:o=u,h.flags|=4096,t&=-t,h.lanes|=t,co(h,cs(0,o,t));break e;case 1:o=u;var w=h.type,k=h.stateNode;if(0===(64&h.flags)&&("function"===typeof w.getDerivedStateFromError||null!==k&&"function"===typeof k.componentDidCatch&&(null===Qs||!Qs.has(k)))){h.flags|=4096,t&=-t,h.lanes|=t,co(h,ls(h,o,t));break e}}h=h.return}while(null!==h)}Pu(n)}catch(S){t=S,js===n&&null!==n&&(js=n=n.return);continue}break}}function Su(){var e=Cs.current;return Cs.current=xa,null===e?xa:e}function Ou(e,t){var n=xs;xs|=16;var r=Su();for(Is===e&&Rs===t||wu(e,t);;)try{Eu();break}catch(i){ku(e,i)}if(Zi(),xs=n,Cs.current=r,null!==js)throw Error(a(261));return Is=null,Rs=0,Ns}function Eu(){for(;null!==js;)Cu(js)}function Tu(){for(;null!==js&&!Ei();)Cu(js)}function Cu(e){var t=Hs(e.alternate,e,As);e.memoizedProps=e.pendingProps,null===t?Pu(e):js=t,Ps.current=null}function Pu(e){var t=e;do{var n=t.alternate;if(e=t.return,0===(2048&t.flags)){if(null!==(n=is(n,t,As)))return void(js=n);if(24!==(n=t).tag&&23!==n.tag||null===n.memoizedState||0!==(1073741824&As)||0===(4&n.mode)){for(var r=0,i=n.child;null!==i;)r|=i.lanes|i.childLanes,i=i.sibling;n.childLanes=r}null!==e&&0===(2048&e.flags)&&(null===e.firstEffect&&(e.firstEffect=t.firstEffect),null!==t.lastEffect&&(null!==e.lastEffect&&(e.lastEffect.nextEffect=t.firstEffect),e.lastEffect=t.lastEffect),1<t.flags&&(null!==e.lastEffect?e.lastEffect.nextEffect=t:e.firstEffect=t,e.lastEffect=t))}else{if(null!==(n=os(t)))return n.flags&=2047,void(js=n);null!==e&&(e.firstEffect=e.lastEffect=null,e.flags|=2048)}if(null!==(t=t.sibling))return void(js=t);js=t=e}while(null!==t);
vendor: 4,533 bytes, line 2
20===Ns&&(Ns=5)}function xu(e){var t=Bi();return Wi(99,Iu.bind(null,e,t)),null}function Iu(e,t){do{Ru()}while(null!==Xs);if(0!==(48&xs))throw Error(a(327));var n=e.finishedWork;if(null===n)return null;if(e.finishedWork=null,e.finishedLanes=0,n===e.current)throw Error(a(177));e.callbackNode=null;var r=n.lanes|n.childLanes,i=r,o=e.pendingLanes&~i;e.pendingLanes=i,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=i,e.mutableReadLanes&=i,e.entangledLanes&=i,i=e.entanglements;for(var s=e.eventTimes,u=e.expirationTimes;0<o;){var c=31-zt(o),l=1<<c;i[c]=0,s[c]=-1,u[c]=-1,o&=~l}if(null!==tu&&0===(24&r)&&tu.has(e)&&tu.delete(e),e===Is&&(js=Is=null,Rs=0),1<n.flags?null!==n.lastEffect?(n.lastEffect.nextEffect=n,r=n.firstEffect):r=n:r=n.firstEffect,null!==r){if(i=xs,xs|=32,Ps.current=null,Fr=Qt,pr(s=dr())){if("selectionStart"in s)u={start:s.selectionStart,end:s.selectionEnd};else e:if(u=(u=s.ownerDocument)&&u.defaultView||window,(l=u.getSelection&&u.getSelection())&&0!==l.rangeCount){u=l.anchorNode,o=l.anchorOffset,c=l.focusNode,l=l.focusOffset;try{u.nodeType,c.nodeType}catch(T){u=null;break e}var f=0,h=-1,d=-1,p=0,v=0,y=s,m=null;t:for(;;){for(var g;y!==u||0!==o&&3!==y.nodeType||(h=f+o),y!==c||0!==l&&3!==y.nodeType||(d=f+l),3===y.nodeType&&(f+=y.nodeValue.length),null!==(g=y.firstChild);)m=y,y=g;for(;;){if(y===s)break t;if(m===u&&++p===o&&(h=f),m===c&&++v===l&&(d=f),null!==(g=y.nextSibling))break;m=(y=m).parentNode}y=g}u=-1===h||-1===d?null:{start:h,end:d}}else u=null;u=u||{start:0,end:0}}else u=null;Ur={focusedElem:s,selectionRange:u},Qt=!1,su=null,uu=!1,Gs=r;do{try{ju()}catch(T){if(null===Gs)throw Error(a(330));Du(Gs,T),Gs=Gs.nextEffect}}while(null!==Gs);su=null,Gs=r;do{try{for(s=e;null!==Gs;){var b=Gs.flags;if(16&b&&ge(Gs.stateNode,""),128&b){var _=Gs.alternate;if(null!==_){var w=_.ref;null!==w&&("function"===typeof w?w(null):w.current=null)}}switch(1038&b){case 2:bs(Gs),Gs.flags&=-3;break;case 6:bs(Gs),Gs.flags&=-3,Ss(Gs.alternate,Gs);break;case 1024:Gs.flags&=-1025;break;case 1028:Gs.flags&=-1025,Ss(Gs.alternate,Gs);break;case 4:Ss(Gs.alternate,Gs);break;case 8:ks(s,u=Gs);var k=u.alternate;ms(u),null!==k&&ms(k)}Gs=Gs.nextEffect}}catch(T){if(null===Gs)throw Error(a(330));Du(Gs,T),Gs=Gs.nextEffect}}while(null!==Gs);if(w=Ur,_=dr(),b=w.focusedElem,s=w.selectionRange,_!==b&&b&&b.ownerDocument&&hr(b.ownerDocument.documentElement,b)){null!==s&&pr(b)&&(_=s.start,void 0===(w=s.end)&&(w=_),"selectionStart"in b?(b.selectionStart=_,b.selectionEnd=Math.min(w,b.value.length)):(w=(_=b.ownerDocument||document)&&_.defaultView||window).getSelection&&(w=w.getSelection(),u=b.textContent.length,k=Math.min(s.start,u),s=void 0===s.end?k:Math.min(s.end,u),!w.extend&&k>s&&(u=s,s=k,k=u),u=fr(b,k),o=fr(b,s),u&&o&&(1!==w.rangeCount||w.anchorNode!==u.node||w.anchorOffset!==u.offset||w.focusNode!==o.node||w.focusOffset!==o.offset)&&((_=_.createRange()).setStart(u.node,u.offset),w.removeAllRanges(),k>s?(w.addRange(_),w.extend(o.node,o.offset)):(_.setEnd(o.node,o.offset),w.addRange(_))))),_=[];for(w=b;w=w.parentNode;)1===w.nodeType&&_.push({element:w,left:w.scrollLeft,top:w.scrollTop});for("function"===typeof b.focus&&b.focus(),b=0;b<_.length;b++)(w=_[b]).element.scrollLeft=w.left,w.element.scrollTop=w.top}Qt=!!Fr,Ur=Fr=null,e.current=n,Gs=r;do{try{for(b=e;null!==Gs;){var S=Gs.flags;if(36&S&&ps(b,Gs.alternate,Gs),128&S){_=void 0;var O=Gs.ref;if(null!==O){var E=Gs.stateNode;switch(Gs.tag){case 5:_=E;break;default:_=E}"function"===typeof O?O(_):O.current=_}}Gs=Gs.nextEffect}}catch(T){if(null===Gs)throw Error(a(330));Du(Gs,T),Gs=Gs.nextEffect}}while(null!==Gs);Gs=null,Ni(),xs=i}else e.current=n;if($s)$s=!1,Xs=e,Js=t;else for(Gs=r;null!==Gs;)t=Gs.nextEffect,Gs.nextEffect=null,8&Gs.flags&&((S=Gs).sibling=null,S.stateNode=null),Gs=t;if(0===(r=e.pendingLanes)&&(Qs=null),1===r?e===ru?nu++:(nu=0,ru=e):nu=0,n=n.stateNode,wi&&"function"===typeof wi.onCommitFiberRoot)try{wi.onCommitFiberRoot(_i,n,void 0,64===(64&n.current.flags))}catch(T){}if(du(e,Vi()),Ks)throw Ks=!1,e=Ys,Ys=null,e;return 0!==(8&xs)||Hi(),null}function ju(){for(;null!==Gs;){var e=Gs.alternate;uu||null===su||(0!==(8&Gs.flags)?et(Gs,su)&&(uu=!0):13===Gs.tag&&Es(e,Gs)&&et(Gs,su)&&(uu=!0));var t=Gs.flags;0!==(256&t)&&ds(e,Gs),0===(512&t)||$s||($s=!0,zi(97,(function(){return Ru(),null}))),Gs=Gs.nextEffect}}function Ru(){if(90!==Js){var e=97<Js?97:Js;return Js=90,Wi(e,Nu)}return!1}function Au(e,t){Zs.push(t,e),$s||($s=!0,zi(97,(function(){return Ru(),null})))}function Mu(e,t){eu.push(t,e),$s||($s=!0,zi(97,(function(){return Ru(),null})))}
vendor: 9,323 bytes, line 2
2function Nu(){if(null===Xs)return!1;var e=Xs;if(Xs=null,0!==(48&xs))throw Error(a(331));var t=xs;xs|=32;var n=eu;eu=[];for(var r=0;r<n.length;r+=2){var i=n[r],o=n[r+1],s=i.destroy;if(i.destroy=void 0,"function"===typeof s)try{s()}catch(c){if(null===o)throw Error(a(330));Du(o,c)}}for(n=Zs,Zs=[],r=0;r<n.length;r+=2){i=n[r],o=n[r+1];try{var u=i.create;i.destroy=u()}catch(c){if(null===o)throw Error(a(330));Du(o,c)}}for(u=e.current.firstEffect;null!==u;)e=u.nextEffect,u.nextEffect=null,8&u.flags&&(u.sibling=null,u.stateNode=null),u=e;return xs=t,Hi(),!0}function Lu(e,t,n){uo(e,t=cs(0,t=as(n,t),1)),t=cu(),null!==(e=hu(e,1))&&(Wt(e,1,t),du(e,t))}function Du(e,t){if(3===e.tag)Lu(e,e,t);else for(var n=e.return;null!==n;){if(3===n.tag){Lu(n,e,t);break}if(1===n.tag){var r=n.stateNode;if("function"===typeof n.type.getDerivedStateFromError||"function"===typeof r.componentDidCatch&&(null===Qs||!Qs.has(r))){var i=ls(n,e=as(t,e),1);if(uo(n,i),i=cu(),null!==(n=hu(n,1)))Wt(n,1,i),du(n,i);else if("function"===typeof r.componentDidCatch&&(null===Qs||!Qs.has(r)))try{r.componentDidCatch(t,e)}catch(o){}break}}n=n.return}}function Fu(e,t,n){var r=e.pingCache;null!==r&&r.delete(t),t=cu(),e.pingedLanes|=e.suspendedLanes&n,Is===e&&(Rs&n)===n&&(4===Ns||3===Ns&&(62914560&Rs)===Rs&&500>Vi()-qs?wu(e,0):Vs|=n),du(e,t)}function Uu(e,t){var n=e.stateNode;null!==n&&n.delete(t),0===(t=0)&&(0===(2&(t=e.mode))?t=1:0===(4&t)?t=99===Bi()?1:2:(0===ou&&(ou=Ds),0===(t=Bt(62914560&~ou))&&(t=4194304))),n=cu(),null!==(e=hu(e,t))&&(Wt(e,t,n),du(e,n))}function Vu(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.flags=0,this.lastEffect=this.firstEffect=this.nextEffect=null,this.childLanes=this.lanes=0,this.alternate=null}function Bu(e,t,n,r){return new Vu(e,t,n,r)}function qu(e){return!(!(e=e.prototype)||!e.isReactComponent)}function Wu(e,t){var n=e.alternate;return null===n?((n=Bu(e.tag,t,e.key,e.mode)).elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.nextEffect=null,n.firstEffect=null,n.lastEffect=null),n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=null===t?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function zu(e,t,n,r,i,o){var s=2;if(r=e,"function"===typeof e)qu(e)&&(s=1);else if("string"===typeof e)s=5;else e:switch(e){case O:return Hu(n.children,i,o,t);case L:s=8,i|=16;break;case E:s=8,i|=1;break;case T:return(e=Bu(12,n,t,8|i)).elementType=T,e.type=T,e.lanes=o,e;case I:return(e=Bu(13,n,t,i)).type=I,e.elementType=I,e.lanes=o,e;case j:return(e=Bu(19,n,t,i)).elementType=j,e.lanes=o,e;case D:return Gu(n,i,o,t);case F:return(e=Bu(24,n,t,i)).elementType=F,e.lanes=o,e;default:if("object"===typeof e&&null!==e)switch(e.$$typeof){case C:s=10;break e;case P:s=9;break e;case x:s=11;break e;case R:s=14;break e;case A:s=16,r=null;break e;case M:s=22;break e}throw Error(a(130,null==e?e:typeof e,""))}return(t=Bu(s,n,t,i)).elementType=e,t.type=r,t.lanes=o,t}function Hu(e,t,n,r){return(e=Bu(7,e,r,t)).lanes=n,e}function Gu(e,t,n,r){return(e=Bu(23,e,r,t)).elementType=D,e.lanes=n,e}function Ku(e,t,n){return(e=Bu(6,e,null,t)).lanes=n,e}function Yu(e,t,n){return(t=Bu(4,null!==e.children?e.children:[],e.key,t)).lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function Qu(e,t,n){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.pendingContext=this.context=null,this.hydrate=n,this.callbackNode=null,this.callbackPriority=0,this.eventTimes=qt(0),this.expirationTimes=qt(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=qt(0),this.mutableSourceEagerHydrationData=null}function $u(e,t,n){var r=3<arguments.length&&void 0!==arguments[3]?arguments[3]:null;return{$$typeof:S,key:null==r?null:""+r,children:e,containerInfo:t,implementation:n}}function Xu(e,t,n,r){var i=t.current,o=cu(),s=lu(i);e:if(n){t:{if($e(n=n._reactInternals)!==n||1!==n.tag)throw Error(a(170));var u=n;do{switch(u.tag){case 3:u=u.stateNode.context;break t;case 1:if(pi(u.type)){u=u.stateNode.__reactInternalMemoizedMergedChildContext;break t}}u=u.return}while(null!==u);throw Error(a(171))}if(1===n.tag){var c=n.type;if(pi(c)){n=mi(n,c,u);break e}}n=u}else n=ci;return null===t.context?t.context=n:t.pendingContext=n,(t=so(o,s)).payload={element:e},null!==(r=void 0===r?null:r)&&(t.callback=r),uo(i,t),fu(i,s,o),s}function Ju(e){if(!(e=e.current).child)return null;switch(e.child.tag){case 5:default:return e.child.stateNode}}function Zu(e,t){if(null!==(e=e.memoizedState)&&null!==e.dehydrated){var n=e.retryLane;e.retryLane=0!==n&&n<t?n:t}}function ec(e,t){Zu(e,t),(e=e.alternate)&&Zu(e,t)}function tc(e,t,n){var r=null!=n&&null!=n.hydrationOptions&&n.hydrationOptions.mutableSources||null;if(n=new Qu(e,t,null!=n&&!0===n.hydrate),t=Bu(3,null,null,2===t?7:1===t?3:0),n.current=t,t.stateNode=n,oo(t),e[Xr]=n.current,xr(8===e.nodeType?e.parentNode:e),r)for(e=0;e<r.length;e++){var i=(t=r[e])._getVersion;i=i(t._source),null==n.mutableSourceEagerHydrationData?n.mutableSourceEagerHydrationData=[t,i]:n.mutableSourceEagerHydrationData.push(t,i)}this._internalRoot=n}function nc(e){return!(!e||1!==e.nodeType&&9!==e.nodeType&&11!==e.nodeType&&(8!==e.nodeType||" react-mount-point-unstable "!==e.nodeValue))}function rc(e,t,n,r,i){var o=n._reactRootContainer;if(o){var a=o._internalRoot;if("function"===typeof i){var s=i;i=function(){var e=Ju(a);s.call(e)}}Xu(t,a,e,i)}else{if(o=n._reactRootContainer=function(e,t){if(t||(t=!(!(t=e?9===e.nodeType?e.documentElement:e.firstChild:null)||1!==t.nodeType||!t.hasAttribute("data-reactroot"))),!t)for(var n;n=e.lastChild;)e.removeChild(n);return new tc(e,0,t?{hydrate:!0}:void 0)}(n,r),a=o._internalRoot,"function"===typeof i){var u=i;i=function(){var e=Ju(a);u.call(e)}}gu((function(){Xu(t,a,e,i)}))}return Ju(a)}function ic(e,t){var n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:null;if(!nc(t))throw Error(a(200));return $u(e,t,null,n)}Hs=function(e,t,n){var r=t.lanes;if(null!==e)if(e.memoizedProps!==t.pendingProps||fi.current)Ma=!0;else{if(0===(n&r)){switch(Ma=!1,t.tag){case 3:za(t),Ho();break;case 5:Ao(t);break;case 1:pi(t.type)&&gi(t);break;case 4:jo(t,t.stateNode.containerInfo);break;case 10:r=t.memoizedProps.value;var i=t.type._context;ui(Qi,i._currentValue),i._currentValue=r;break;case 13:if(null!==t.memoizedState)return 0!==(n&t.child.childLanes)?Qa(e,t,n):(ui(No,1&No.current),null!==(t=ns(e,t,n))?t.sibling:null);ui(No,1&No.current);break;case 19:if(r=0!==(n&t.childLanes),0!==(64&e.flags)){if(r)return ts(e,t,n);t.flags|=64}if(null!==(i=t.memoizedState)&&(i.rendering=null,i.tail=null,i.lastEffect=null),ui(No,No.current),r)break;return null;case 23:case 24:return t.lanes=0,Ua(e,t,n)}return ns(e,t,n)}Ma=0!==(16384&e.flags)}else Ma=!1;switch(t.lanes=0,t.tag){case 2:if(r=t.type,null!==e&&(e.alternate=null,t.alternate=null,t.flags|=2),e=t.pendingProps,i=di(t,li.current),no(t,n),i=ia(null,t,r,e,i,n),t.flags|=1,"object"===typeof i&&null!==i&&"function"===typeof i.render&&void 0===i.$$typeof){if(t.tag=1,t.memoizedState=null,t.updateQueue=null,pi(r)){var o=!0;gi(t)}else o=!1;t.memoizedState=null!==i.state&&void 0!==i.state?i.state:null,oo(t);var s=r.getDerivedStateFromProps;"function"===typeof s&&po(t,r,s,e),i.updater=vo,t.stateNode=i,i._reactInternals=t,bo(t,r,e,n),t=Wa(null,t,r,!0,o,n)}else t.tag=0,Na(null,t,i,n),t=t.child;return t;case 16:i=t.elementType;e:{switch(null!==e&&(e.alternate=null,t.alternate=null,t.flags|=2),e=t.pendingProps,i=(o=i._init)(i._payload),t.type=i,o=t.tag=function(e){if("function"===typeof e)return qu(e)?1:0;if(void 0!==e&&null!==e){if((e=e.$$typeof)===x)return 11;if(e===R)return 14}return 2}(i),e=Yi(i,e),o){case 0:t=Ba(null,t,i,e,n);break e;case 1:t=qa(null,t,i,e,n);break e;case 11:t=La(null,t,i,e,n);break e;case 14:t=Da(null,t,i,Yi(i.type,e),r,n);break e}throw Error(a(306,i,""))}return t;case 0:return r=t.type,i=t.pendingProps,Ba(e,t,r,i=t.elementType===r?i:Yi(r,i),n);case 1:return r=t.type,i=t.pendingProps,qa(e,t,r,i=t.elementType===r?i:Yi(r,i),n);case 3:if(za(t),r=t.updateQueue,null===e||null===r)throw Error(a(282));if(r=t.pendingProps,i=null!==(i=t.memoizedState)?i.element:null,ao(e,t),lo(t,r,null,n),(r=t.memoizedState.element)===i)Ho(),t=ns(e,t,n);else{if((o=(i=t.stateNode).hydrate)&&(Fo=Hr(t.stateNode.containerInfo.firstChild),Do=t,o=Uo=!0),o){if(null!=(e=i.mutableSourceEagerHydrationData))for(i=0;i<e.length;i+=2)(o=e[i])._workInProgressVersionPrimary=e[i+1],Go.push(o);for(n=Eo(t,null,r,n),t.child=n;n;)n.flags=-3&n.flags|1024,n=n.sibling}else Na(e,t,r,n),Ho();t=t.child}return t;case 5:return Ao(t),null===e&&qo(t),r=t.type,i=t.pendingProps,o=null!==e?e.memoizedProps:null,s=i.children,Br(r,i)?s=null:null!==o&&Br(r,o)&&(t.flags|=16),Va(e,t),Na(e,t,s,n),t.child;case 6:return null===e&&qo(t),null;
vendor: 9,195 bytes, line 2
2case 13:return Qa(e,t,n);case 4:return jo(t,t.stateNode.containerInfo),r=t.pendingProps,null===e?t.child=Oo(t,null,r,n):Na(e,t,r,n),t.child;case 11:return r=t.type,i=t.pendingProps,La(e,t,r,i=t.elementType===r?i:Yi(r,i),n);case 7:return Na(e,t,t.pendingProps,n),t.child;case 8:case 12:return Na(e,t,t.pendingProps.children,n),t.child;case 10:e:{r=t.type._context,i=t.pendingProps,s=t.memoizedProps,o=i.value;var u=t.type._context;if(ui(Qi,u._currentValue),u._currentValue=o,null!==s)if(u=s.value,0===(o=sr(u,o)?0:0|("function"===typeof r._calculateChangedBits?r._calculateChangedBits(u,o):1073741823))){if(s.children===i.children&&!fi.current){t=ns(e,t,n);break e}}else for(null!==(u=t.child)&&(u.return=t);null!==u;){var c=u.dependencies;if(null!==c){s=u.child;for(var l=c.firstContext;null!==l;){if(l.context===r&&0!==(l.observedBits&o)){1===u.tag&&((l=so(-1,n&-n)).tag=2,uo(u,l)),u.lanes|=n,null!==(l=u.alternate)&&(l.lanes|=n),to(u.return,n),c.lanes|=n;break}l=l.next}}else s=10===u.tag&&u.type===t.type?null:u.child;if(null!==s)s.return=u;else for(s=u;null!==s;){if(s===t){s=null;break}if(null!==(u=s.sibling)){u.return=s.return,s=u;break}s=s.return}u=s}Na(e,t,i.children,n),t=t.child}return t;case 9:return i=t.type,r=(o=t.pendingProps).children,no(t,n),r=r(i=ro(i,o.unstable_observedBits)),t.flags|=1,Na(e,t,r,n),t.child;case 14:return o=Yi(i=t.type,t.pendingProps),Da(e,t,i,o=Yi(i.type,o),r,n);case 15:return Fa(e,t,t.type,t.pendingProps,r,n);case 17:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:Yi(r,i),null!==e&&(e.alternate=null,t.alternate=null,t.flags|=2),t.tag=1,pi(r)?(e=!0,gi(t)):e=!1,no(t,n),mo(t,r,i),bo(t,r,i,n),Wa(null,t,r,!0,e,n);case 19:return ts(e,t,n);case 23:case 24:return Ua(e,t,n)}throw Error(a(156,t.tag))},tc.prototype.render=function(e){Xu(e,this._internalRoot,null,null)},tc.prototype.unmount=function(){var e=this._internalRoot,t=e.containerInfo;Xu(null,e,null,(function(){t[Xr]=null}))},tt=function(e){13===e.tag&&(fu(e,4,cu()),ec(e,4))},nt=function(e){13===e.tag&&(fu(e,67108864,cu()),ec(e,67108864))},rt=function(e){if(13===e.tag){var t=cu(),n=lu(e);fu(e,n,t),ec(e,n)}},it=function(e,t){return t()},Ce=function(e,t,n){switch(t){case"input":if(ne(e,n),t=n.name,"radio"===n.type&&null!=t){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var i=ni(r);if(!i)throw Error(a(90));X(r),ne(r,i)}}}break;case"textarea":ce(e,n);break;case"select":null!=(t=n.value)&&ae(e,!!n.multiple,t,!1)}},Ae=mu,Me=function(e,t,n,r,i){var o=xs;xs|=4;try{return Wi(98,e.bind(null,t,n,r,i))}finally{0===(xs=o)&&(zs(),Hi())}},Ne=function(){0===(49&xs)&&(function(){if(null!==tu){var e=tu;tu=null,e.forEach((function(e){e.expiredLanes|=24&e.pendingLanes,du(e,Vi())}))}Hi()}(),Ru())},Le=function(e,t){var n=xs;xs|=2;try{return e(t)}finally{0===(xs=n)&&(zs(),Hi())}};var oc={Events:[ei,ti,ni,je,Re,Ru,{current:!1}]},ac={findFiberByHostInstance:Zr,bundleType:0,version:"17.0.1",rendererPackageName:"react-dom"},sc={bundleType:ac.bundleType,version:ac.version,rendererPackageName:ac.rendererPackageName,rendererConfig:ac.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:w.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return null===(e=Ze(e))?null:e.stateNode},findFiberByHostInstance:ac.findFiberByHostInstance||function(){return null},findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null};if("undefined"!==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__){var uc=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!uc.isDisabled&&uc.supportsFiber)try{_i=uc.inject(sc),wi=uc}catch(ye){}}t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=oc,t.createPortal=ic,t.findDOMNode=function(e){if(null==e)return null;if(1===e.nodeType)return e;var t=e._reactInternals;if(void 0===t){if("function"===typeof e.render)throw Error(a(188));throw Error(a(268,Object.keys(e)))}return e=null===(e=Ze(t))?null:e.stateNode},t.flushSync=function(e,t){var n=xs;if(0!==(48&n))return e(t);xs|=1;try{if(e)return Wi(99,e.bind(null,t))}finally{xs=n,Hi()}},t.hydrate=function(e,t,n){if(!nc(t))throw Error(a(200));return rc(null,e,t,!0,n)},t.render=function(e,t,n){if(!nc(t))throw Error(a(200));return rc(null,e,t,!1,n)},t.unmountComponentAtNode=function(e){if(!nc(e))throw Error(a(40));return!!e._reactRootContainer&&(gu((function(){rc(null,null,e,!1,(function(){e._reactRootContainer=null,e[Xr]=null}))})),!0)},t.unstable_batchedUpdates=mu,t.unstable_createPortal=function(e,t){return ic(e,t,2<arguments.length&&void 0!==arguments[2]?arguments[2]:null)},t.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!nc(n))throw Error(a(200));if(null==e||void 0===e._reactInternals)throw Error(a(38));return rc(e,t,n,!1,r)},t.version="17.0.1"},function(e,t,n){"use strict";e.exports=n(310)},function(e,t,n){"use strict";var r,i,o,a;if("object"===typeof performance&&"function"===typeof performance.now){var s=performance;t.unstable_now=function(){return s.now()}}else{var u=Date,c=u.now();t.unstable_now=function(){return u.now()-c}}if("undefined"===typeof window||"function"!==typeof MessageChannel){var l=null,f=null,h=function e(){if(null!==l)try{var n=t.unstable_now();l(!0,n),l=null}catch(r){throw setTimeout(e,0),r}};r=function(e){null!==l?setTimeout(r,0,e):(l=e,setTimeout(h,0))},i=function(e,t){f=setTimeout(e,t)},o=function(){clearTimeout(f)},t.unstable_shouldYield=function(){return!1},a=t.unstable_forceFrameRate=function(){}}else{var d=window.setTimeout,p=window.clearTimeout;if("undefined"!==typeof console){var v=window.cancelAnimationFrame;"function"!==typeof window.requestAnimationFrame&&console.error("This browser doesn't support requestAnimationFrame. Make sure that you load a polyfill in older browsers. https://reactjs.org/link/react-polyfills"),"function"!==typeof v&&console.error("This browser doesn't support cancelAnimationFrame. Make sure that you load a polyfill in older browsers. https://reactjs.org/link/react-polyfills")}var y=!1,m=null,g=-1,b=5,_=0;t.unstable_shouldYield=function(){return t.unstable_now()>=_},a=function(){},t.unstable_forceFrameRate=function(e){0>e||125<e?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):b=0<e?Math.floor(1e3/e):5};var w=new MessageChannel,k=w.port2;w.port1.onmessage=function(){if(null!==m){var e=t.unstable_now();_=e+b;try{m(!0,e)?k.postMessage(null):(y=!1,m=null)}catch(n){throw k.postMessage(null),n}}else y=!1},r=function(e){m=e,y||(y=!0,k.postMessage(null))},i=function(e,n){g=d((function(){e(t.unstable_now())}),n)},o=function(){p(g),g=-1}}function S(e,t){var n=e.length;e.push(t);e:for(;;){var r=n-1>>>1,i=e[r];if(!(void 0!==i&&0<T(i,t)))break e;e[r]=t,e[n]=i,n=r}}function O(e){return void 0===(e=e[0])?null:e}function E(e){var t=e[0];if(void 0!==t){var n=e.pop();if(n!==t){e[0]=n;e:for(var r=0,i=e.length;r<i;){var o=2*(r+1)-1,a=e[o],s=o+1,u=e[s];if(void 0!==a&&0>T(a,n))void 0!==u&&0>T(u,a)?(e[r]=u,e[s]=n,r=s):(e[r]=a,e[o]=n,r=o);else{if(!(void 0!==u&&0>T(u,n)))break e;e[r]=u,e[s]=n,r=s}}}return t}return null}function T(e,t){var n=e.sortIndex-t.sortIndex;return 0!==n?n:e.id-t.id}var C=[],P=[],x=1,I=null,j=3,R=!1,A=!1,M=!1;function N(e){for(var t=O(P);null!==t;){if(null===t.callback)E(P);else{if(!(t.startTime<=e))break;E(P),t.sortIndex=t.expirationTime,S(C,t)}t=O(P)}}function L(e){if(M=!1,N(e),!A)if(null!==O(C))A=!0,r(D);else{var t=O(P);null!==t&&i(L,t.startTime-e)}}function D(e,n){A=!1,M&&(M=!1,o()),R=!0;var r=j;try{for(N(n),I=O(C);null!==I&&(!(I.expirationTime>n)||e&&!t.unstable_shouldYield());){var a=I.callback;if("function"===typeof a){I.callback=null,j=I.priorityLevel;var s=a(I.expirationTime<=n);n=t.unstable_now(),"function"===typeof s?I.callback=s:I===O(C)&&E(C),N(n)}else E(C);I=O(C)}if(null!==I)var u=!0;else{var c=O(P);null!==c&&i(L,c.startTime-n),u=!1}return u}finally{I=null,j=r,R=!1}}var F=a;t.unstable_IdlePriority=5,t.unstable_ImmediatePriority=1,t.unstable_LowPriority=4,t.unstable_NormalPriority=3,t.unstable_Profiling=null,t.unstable_UserBlockingPriority=2,t.unstable_cancelCallback=function(e){e.callback=null},t.unstable_continueExecution=function(){A||R||(A=!0,r(D))},t.unstable_getCurrentPriorityLevel=function(){return j},t.unstable_getFirstCallbackNode=function(){return O(C)},t.unstable_next=function(e){switch(j){case 1:case 2:case 3:var t=3;break;default:t=j}var n=j;j=t;try{return e()}finally{j=n}},t.unstable_pauseExecution=function(){},t.unstable_requestPaint=F,t.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=j;j=e;try{return t()}finally{j=n}},t.unstable_scheduleCallback=function(e,n,a){var s=t.unstable_now();switch("object"===typeof a&&null!==a?a="number"===typeof(a=a.delay)&&0<a?s+a:s:a=s,e){case 1:var u=-1;break;case 2:u=250;break;case 5:u=1073741823;break;case 4:u=1e4;break;default:u=5e3}return e={id:x++,callback:n,priorityLevel:e,startTime:a,expirationTime:u=
vendor: 4,638 bytes, line 2
2a+u,sortIndex:-1},a>s?(e.sortIndex=a,S(P,e),null===O(C)&&e===O(P)&&(M?o():M=!0,i(L,a-s))):(e.sortIndex=u,S(C,e),A||R||(A=!0,r(D))),e},t.unstable_wrapCallback=function(e){var t=j;return function(){var n=j;j=t;try{return e.apply(this,arguments)}finally{j=n}}}},,function(e,t,n){var r=function(e){"use strict";var t,n=Object.prototype,r=n.hasOwnProperty,i="function"===typeof Symbol?Symbol:{},o=i.iterator||"@@iterator",a=i.asyncIterator||"@@asyncIterator",s=i.toStringTag||"@@toStringTag";function u(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{u({},"")}catch(j){u=function(e,t,n){return e[t]=n}}function c(e,t,n,r){var i=t&&t.prototype instanceof y?t:y,o=Object.create(i.prototype),a=new P(r||[]);return o._invoke=function(e,t,n){var r=f;return function(i,o){if(r===d)throw new Error("Generator is already running");if(r===p){if("throw"===i)throw o;return I()}for(n.method=i,n.arg=o;;){var a=n.delegate;if(a){var s=E(a,n);if(s){if(s===v)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(r===f)throw r=p,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r=d;var u=l(e,t,n);if("normal"===u.type){if(r=n.done?p:h,u.arg===v)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(r=p,n.method="throw",n.arg=u.arg)}}}(e,n,a),o}function l(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(j){return{type:"throw",arg:j}}}e.wrap=c;var f="suspendedStart",h="suspendedYield",d="executing",p="completed",v={};function y(){}function m(){}function g(){}var b={};b[o]=function(){return this};var _=Object.getPrototypeOf,w=_&&_(_(x([])));w&&w!==n&&r.call(w,o)&&(b=w);var k=g.prototype=y.prototype=Object.create(b);function S(e){["next","throw","return"].forEach((function(t){u(e,t,(function(e){return this._invoke(t,e)}))}))}function O(e,t){function n(i,o,a,s){var u=l(e[i],e,o);if("throw"!==u.type){var c=u.arg,f=c.value;return f&&"object"===typeof f&&r.call(f,"__await")?t.resolve(f.__await).then((function(e){n("next",e,a,s)}),(function(e){n("throw",e,a,s)})):t.resolve(f).then((function(e){c.value=e,a(c)}),(function(e){return n("throw",e,a,s)}))}s(u.arg)}var i;this._invoke=function(e,r){function o(){return new t((function(t,i){n(e,r,t,i)}))}return i=i?i.then(o,o):o()}}function E(e,n){var r=e.iterator[n.method];if(r===t){if(n.delegate=null,"throw"===n.method){if(e.iterator.return&&(n.method="return",n.arg=t,E(e,n),"throw"===n.method))return v;n.method="throw",n.arg=new TypeError("The iterator does not provide a 'throw' method")}return v}var i=l(r,e.iterator,n.arg);if("throw"===i.type)return n.method="throw",n.arg=i.arg,n.delegate=null,v;var o=i.arg;return o?o.done?(n[e.resultName]=o.value,n.next=e.nextLoc,"return"!==n.method&&(n.method="next",n.arg=t),n.delegate=null,v):o:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,v)}function T(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 C(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function P(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(T,this),this.reset(!0)}function x(e){if(e){var n=e[o];if(n)return n.call(e);if("function"===typeof e.next)return e;if(!isNaN(e.length)){var i=-1,a=function n(){for(;++i<e.length;)if(r.call(e,i))return n.value=e[i],n.done=!1,n;return n.value=t,n.done=!0,n};return a.next=a}}return{next:I}}function I(){return{value:t,done:!0}}return m.prototype=k.constructor=g,g.constructor=m,m.displayName=u(g,s,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"===typeof e&&e.constructor;return!!t&&(t===m||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,g):(e.__proto__=g,u(e,s,"GeneratorFunction")),e.prototype=Object.create(k),e},e.awrap=function(e){return{__await:e}},S(O.prototype),O.prototype[a]=function(){return this},e.AsyncIterator=O,e.async=function(t,n,r,i,o){void 0===o&&(o=Promise);var a=new O(c(t,n,r,i),o);return e.isGeneratorFunction(n)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},S(k),u(k,s,"Generator"),k[o]=function(){return this},k.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=x,P.prototype={constructor:P,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEac
vendor: 4,581 bytes, line 2
2h(C),!e)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=t)},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 n=this;function i(r,i){return s.type="throw",s.arg=e,n.next=r,i&&(n.method="next",n.arg=t),!!i}for(var o=this.tryEntries.length-1;o>=0;--o){var a=this.tryEntries[o],s=a.completion;if("root"===a.tryLoc)return i("end");if(a.tryLoc<=this.prev){var u=r.call(a,"catchLoc"),c=r.call(a,"finallyLoc");if(u&&c){if(this.prev<a.catchLoc)return i(a.catchLoc,!0);if(this.prev<a.finallyLoc)return i(a.finallyLoc)}else if(u){if(this.prev<a.catchLoc)return i(a.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return i(a.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&r.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=e,a.arg=t,o?(this.method="next",this.next=o.finallyLoc,v):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),v},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),C(n),v}},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 i=r.arg;C(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(e,n,r){return this.delegate={iterator:x(e),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=t),v}},e}(e.exports);try{regeneratorRuntime=r}catch(i){Function("r","regeneratorRuntime = r")(r)}},function(e,t,n){var r;!function(i,o){"use strict";var a="function",s="undefined",u="object",c="model",l="name",f="type",h="vendor",d="version",p="architecture",v="console",y="mobile",m="tablet",g="smarttv",b="wearable",_={extend:function(e,t){var n={};for(var r in e)t[r]&&t[r].length%2===0?n[r]=t[r].concat(e[r]):n[r]=e[r];return n},has:function(e,t){return"string"===typeof e&&-1!==t.toLowerCase().indexOf(e.toLowerCase())},lowerize:function(e){return e.toLowerCase()},major:function(e){return"string"===typeof e?e.replace(/[^\d\.]/g,"").split(".")[0]:o},trim:function(e){return e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")}},w={rgx:function(e,t){for(var n,r,i,s,c,l,f=0;f<t.length&&!c;){var h=t[f],d=t[f+1];for(n=r=0;n<h.length&&!c;)if(c=h[n++].exec(e))for(i=0;i<d.length;i++)l=c[++r],typeof(s=d[i])===u&&s.length>0?2==s.length?typeof s[1]==a?this[s[0]]=s[1].call(this,l):this[s[0]]=s[1]:3==s.length?typeof s[1]!==a||s[1].exec&&s[1].test?this[s[0]]=l?l.replace(s[1],s[2]):o:this[s[0]]=l?s[1].call(this,l,s[2]):o:4==s.length&&(this[s[0]]=l?s[3].call(this,l.replace(s[1],s[2])):o):this[s]=l||o;f+=2}},str:function(e,t){for(var n in t)if(typeof t[n]===u&&t[n].length>0){for(var r=0;r<t[n].length;r++)if(_.has(t[n][r],e))return"?"===n?o:n}else if(_.has(t[n],e))return"?"===n?o:n;return e}},k={browser:{oldsafari:{version:{"1.0":"/8",1.2:"/1",1.3:"/3","2.0":"/412","2.0.2":"/416","2.0.3":"/417","2.0.4":"/419","?":"/"}}},device:{amazon:{model:{"Fire Phone":["SD","KF"]}},sprint:{model:{"Evo Shift 4G":"7373KT"},vendor:{HTC:"APA",Sprint:"Sprint"}}},os:{windows:{version:{ME:"4.90","NT 3.11":"NT3.51","NT 4.0":"NT4.0",2e3:"NT 5.0",XP:["NT 5.1","NT 5.2"],Vista:"NT 6.0",7:"NT 6.1",8:"NT 6.2",8.1:"NT 6.3",10:["NT 6.4","NT 10.0"],RT:"ARM"}}}},S={browser:[[/(opera\smini)\/([\w\.-]+)/i,/(opera\s[mobiletab]+).+version\/([\w\.-]+)/i,/(opera).+version\/([\w\.]+)/i,/(opera)[\/\s]+([\w\.]+)/i],[l,d],[/(opios)[\/\s]+([\w\.]+)/i],[[l,"Opera Mini"],d],[/\s(opr)\/([\w\.]+)/i],[[l,"Opera"],d],[/(kindle)\/([\w\.]+)/i,/(lunascape|maxthon|netfront|jasmine|blazer)[\/\s]?([\w\.]*)/i,/(avant\s|iemobile|slim)(?:browser)?[\/\s]?([\w\.]*)/i,/(bidubrowser|baidubrowser)[\/\s]?([\w\.]+)/i,/(?:ms|\()(ie)\s([\w\.]+)/i,/(rekonq)\/([\w\.]*)/i,/(chromium|flock|rockmelt|midori|epiphany|silk|skyfire|ovibrowser|bolt|iron|vivaldi|iridium|phantomjs|bowser|quark|qupzilla|falkon)\/([\w\.-]+)/i],[l,d],[/(konqueror)\/([\w\.]+)/i],[[l,"Konqueror"],d],[/(trident).+rv[:\s]([\w\.]+).+like\sgecko/i],[[l,"IE"],d],[/(edge|edgios|edga|edg)\/((\d+)?[\w\.]+)/i],[[l,"E
2dge"],d],[/(yabrowser)\/([\w\.]+)/i],[[l,"Yandex"],d],[/(Avast)\/([\w\.]+)/i],[[l,"Avast Secure Browser"],d],[/(AVG)\/([\w\.]+)/i],[[l,"AVG Secure Browser"],d],[/(puffin)\/([\w\.]+)/i],[[l,"Puffin"],d],[/(focus)\/([\w\.]+)/i],[[l,"Firefox Focus"],d],[/(opt)\/([\w\.]+)/i],[[l,"Opera Touch"],d],[/((?:[\s\/])uc?\s?browser|(?:juc.+)ucweb)[\/\s]?([\w\.]+)/i],[[l,"UCBrowser"],d],[/(comodo_dragon)\/([\w\.]+)/i],[[l,/_/g," "],d],[/(windowswechat qbcore)\/([\w\.]+)/i],[[l,"WeChat(Win) Desktop"],d],[/(micromessenger)\/([\w\.]+)/i],[[l,"WeChat"],d],[/(brave)\/([\w\.]+)/i],[[l,"Brave"],d],[/(qqbrowserlite)\/([\w\.]+)/i],[l,d],[/(QQ)\/([\d\.]+)/i],[l,d],[/m?(qqbrowser)[\/\s]?([\w\.]+)/i],[l,d],[/(baiduboxapp)[\/\s]?([\w\.]+)/i],[l,d],[/(2345Explorer)[\/\s]?([\w\.]+)/i],[l,d],[/(MetaSr)[\/\s]?([\w\.]+)/i],[l],[/(LBBROWSER)/i],[l],[/xiaomi\/miuibrowser\/([\w\.]+)/i],[d,[l,"MIUI Browser"]],[/;fbav\/([\w\.]+);/i],[d,[l,"Facebook"]],[/safari\s(line)\/([\w\.]+)/i,/android.+(line)\/([\w\.]+)\/iab/i],[l,d],[/headlesschrome(?:\/([\w\.]+)|\s)/i],[d,[l,"Chrome Headless"]],[/\swv\).+(chrome)\/([\w\.]+)/i],[[l,/(.+)/,"$1 WebView"],d],[/((?:oculus|samsung)browser)\/([\w\.]+)/i],[[l,/(.+(?:g|us))(.+)/,"$1 $2"],d],[/android.+version\/([\w\.]+)\s+(?:mobile\s?safari|safari)*/i],[d,[l,"Android Browser"]],[/(sailfishbrowser)\/([\w\.]+)/i],[[l,"Sailfish Browser"],d],[/(chrome|omniweb|arora|[tizenoka]{5}\s?browser)\/v?([\w\.]+)/i],[l,d],[/(dolfin)\/([\w\.]+)/i],[[l,"Dolphin"],d],[/(qihu|qhbrowser|qihoobrowser|360browser)/i],[[l,"360 Browser"]],[/((?:android.+)crmo|crios)\/([\w\.]+)/i],[[l,"Chrome"],d],[/(coast)\/([\w\.]+)/i],[[l,"Opera Coast"],d],[/fxios\/([\w\.-]+)/i],[d,[l,"Firefox"]],[/version\/([\w\.]+).+?mobile\/\w+\s(safari)/i],[d,[l,"Mobile Safari"]],[/version\/([\w\.]+).+?(mobile\s?safari|safari)/i],[d,l],[/webkit.+?(gsa)\/([\w\.]+).+?(mobile\s?safari|safari)(\/[\w\.]+)/i],[[l,"GSA"],d],[/webkit.+?(mobile\s?safari|safari)(\/[\w\.]+)/i],[l,[d,w.str,k.browser.oldsafari.version]],[/(webkit|khtml)\/([\w\.]+)/i],[l,d],[/(navigator|netscape)\/([\w\.-]+)/i],[[l,"Netscape"],d],[/(swiftfox)/i,/(icedragon|iceweasel|camino|chimera|fennec|maemo\sbrowser|minimo|conkeror)[\/\s]?([\w\.\+]+)/i,/(firefox|seamonkey|k-meleon|icecat|iceape|firebird|phoenix|palemoon|basilisk|waterfox)\/([\w\.-]+)$/i,/(mozilla)\/([\w\.]+).+rv\:.
vendor: 6,575 bytes, line 2
2+gecko\/\d+/i,/(polaris|lynx|dillo|icab|doris|amaya|w3m|netsurf|sleipnir)[\/\s]?([\w\.]+)/i,/(links)\s\(([\w\.]+)/i,/(gobrowser)\/?([\w\.]*)/i,/(ice\s?browser)\/v?([\w\._]+)/i,/(mosaic)[\/\s]([\w\.]+)/i],[l,d]],cpu:[[/(?:(amd|x(?:(?:86|64)[_-])?|wow|win)64)[;\)]/i],[[p,"amd64"]],[/(ia32(?=;))/i],[[p,_.lowerize]],[/((?:i[346]|x)86)[;\)]/i],[[p,"ia32"]],[/windows\s(ce|mobile);\sppc;/i],[[p,"arm"]],[/((?:ppc|powerpc)(?:64)?)(?:\smac|;|\))/i],[[p,/ower/,"",_.lowerize]],[/(sun4\w)[;\)]/i],[[p,"sparc"]],[/((?:avr32|ia64(?=;))|68k(?=\))|arm(?:64|(?=v\d+[;l]))|(?=atmel\s)avr|(?:irix|mips|sparc)(?:64)?(?=;)|pa-risc)/i],[[p,_.lowerize]]],device:[[/\((ipad|playbook);[\w\s\),;-]+(rim|apple)/i],[c,h,[f,m]],[/applecoremedia\/[\w\.]+ \((ipad)/],[c,[h,"Apple"],[f,m]],[/(apple\s{0,1}tv)/i],[[c,"Apple TV"],[h,"Apple"],[f,g]],[/(archos)\s(gamepad2?)/i,/(hp).+(touchpad)/i,/(hp).+(tablet)/i,/(kindle)\/([\w\.]+)/i,/\s(nook)[\w\s]+build\/(\w+)/i,/(dell)\s(strea[kpr\s\d]*[\dko])/i],[h,c,[f,m]],[/(kf[A-z]+)\sbuild\/.+silk\//i],[c,[h,"Amazon"],[f,m]],[/(sd|kf)[0349hijorstuw]+\sbuild\/.+silk\//i],[[c,w.str,k.device.amazon.model],[h,"Amazon"],[f,y]],[/android.+aft([bms])\sbuild/i],[c,[h,"Amazon"],[f,g]],[/\((ip[honed|\s\w*]+);.+(apple)/i],[c,h,[f,y]],[/\((ip[honed|\s\w*]+);/i],[c,[h,"Apple"],[f,y]],[/(blackberry)[\s-]?(\w+)/i,/(blackberry|benq|palm(?=\-)|sonyericsson|acer|asus|dell|meizu|motorola|polytron)[\s_-]?([\w-]*)/i,/(hp)\s([\w\s]+\w)/i,/(asus)-?(\w+)/i],[h,c,[f,y]],[/\(bb10;\s(\w+)/i],[c,[h,"BlackBerry"],[f,y]],[/android.+(transfo[prime\s]{4,10}\s\w+|eeepc|slider\s\w+|nexus 7|padfone|p00c)/i],[c,[h,"Asus"],[f,m]],[/(sony)\s(tablet\s[ps])\sbuild\//i,/(sony)?(?:sgp.+)\sbuild\//i],[[h,"Sony"],[c,"Xperia Tablet"],[f,m]],[/android.+\s([c-g]\d{4}|so[-l]\w+)(?=\sbuild\/|\).+chrome\/(?![1-6]{0,1}\d\.))/i],[c,[h,"Sony"],[f,y]],[/\s(ouya)\s/i,/(nintendo)\s([wids3u]+)/i],[h,c,[f,v]],[/android.+;\s(shield)\sbuild/i],[c,[h,"Nvidia"],[f,v]],[/(playstation\s[34portablevi]+)/i],[c,[h,"Sony"],[f,v]],[/(sprint\s(\w+))/i],[[h,w.str,k.device.sprint.vendor],[c,w.str,k.device.sprint.model],[f,y]],[/(htc)[;_\s-]+([\w\s]+(?=\)|\sbuild)|\w+)/i,/(zte)-(\w*)/i,/(alcatel|geeksphone|nexian|panasonic|(?=;\s)sony)[_\s-]?([\w-]*)/i],[h,[c,/_/g," "],[f,y]],[/(nexus\s9)/i],[c,[h,"HTC"],[f,m]],[/d\/huawei([\w\s-]+)[;\)]/i,/(nexus\s6p|vog-l29|ane-lx1|eml-l29|ele-l29)/i],[c,[h,"Huawei"],[f,y]],[/android.+(bah2?-a?[lw]\d{2})/i],[c,[h,"Huawei"],[f,m]],[/(microsoft);\s(lumia[\s\w]+)/i],[h,c,[f,y]],[/[\s\(;](xbox(?:\sone)?)[\s\);]/i],[c,[h,"Microsoft"],[f,v]],[/(kin\.[onetw]{3})/i],[[c,/\./g," "],[h,"Microsoft"],[f,y]],[/\s(milestone|droid(?:[2-4x]|\s(?:bionic|x2|pro|razr))?:?(\s4g)?)[\w\s]+build\//i,/mot[\s-]?(\w*)/i,/(XT\d{3,4}) build\//i,/(nexus\s6)/i],[c,[h,"Motorola"],[f,y]],[/android.+\s(mz60\d|xoom[\s2]{0,2})\sbuild\//i],[c,[h,"Motorola"],[f,m]],[/hbbtv\/\d+\.\d+\.\d+\s+\([\w\s]*;\s*(\w[^;]*);([^;]*)/i],[[h,_.trim],[c,_.trim],[f,g]],[/hbbtv.+maple;(\d+)/i],[[c,/^/,"SmartTV"],[h,"Samsung"],[f,g]],[/\(dtv[\);].+(aquos)/i],[c,[h,"Sharp"],[f,g]],[/android.+((sch-i[89]0\d|shw-m380s|gt-p\d{4}|gt-n\d+|sgh-t8[56]9|nexus 10))/i,/((SM-T\w+))/i],[[h,"Samsung"],c,[f,m]],[/smart-tv.+(samsung)/i],[h,[f,g],c],[/((s[cgp]h-\w+|gt-\w+|galaxy\snexus|sm-\w[\w\d]+))/i,/(sam[sung]*)[\s-]*(\w+-?[\w-]*)/i,/sec-((sgh\w+))/i],[[h,"Samsung"],c,[f,y]],[/sie-(\w*)/i],[c,[h,"Siemens"],[f,y]],[/(maemo|nokia).*(n900|lumia\s\d+)/i,/(nokia)[\s_-]?([\w-]*)/i],[[h,"Nokia"],c,[f,y]],[/android[x\d\.\s;]+\s([ab][1-7]\-?[0178a]\d\d?)/i],[c,[h,"Acer"],[f,m]],[/android.+([vl]k\-?\d{3})\s+build/i],[c,[h,"LG"],[f,m]],[/android\s3\.[\s\w;-]{10}(lg?)-([06cv9]{3,4})/i],[[h,"LG"],c,[f,m]],[/(lg) netcast\.tv/i],[h,c,[f,g]],[/(nexus\s[45])/i,/lg[e;\s\/-]+(\w*)/i,/android.+lg(\-?[\d\w]+)\s+build/i],[c,[h,"LG"],[f,y]],[/(lenovo)\s?(s(?:5000|6000)(?:[\w-]+)|tab(?:[\s\w]+))/i],[h,c,[f,m]],[/android.+(ideatab[a-z0-9\-\s]+)/i],[c,[h,"Lenovo"],[f,m]],[/(lenovo)[_\s-]?([\w-]+)/i],[h,c,[f,y]],[/linux;.+((jolla));/i],[h,c,[f,y]],[/((pebble))app\/[\d\.]+\s/i],[h,c,[f,b]],[/android.+;\s(oppo)\s?([\w\s]+)\sbuild/i],[h,c,[f,y]],[/crkey/i],[[c,"Chromecast"],[h,"Google"],[f,g]],[/android.+;\s(glass)\s\d/i],[c,[h,"Google"],[f,b]],[/android.+;\s(pixel c)[\s)]/i],[c,[h,"Google"],[f,m]],[/android.+;\s(pixel( [23])?( xl)?)[\s)]/i],[c,[h,"Google"],[f,y]],[/android.+;\s(\w+)\s+build\/hm\1/i,/android.+(hm[\s\-_]*note?[\s_]*(?:\d\w)?)\s+build/i,/android.+(mi[\s\-_]*(?:a\d|one|one[\s_]plus|note lte)?[\s_]*(?:\d?\w?)[\s_]*(?:plus)?)\s+build/i,/android.+(redmi[\s\-_]*(?:note)?(?:[\s_]?[\w\s]+))\s+build/i],[[c,/_/g," "],[h,"Xiaomi"],[f,y]],[/android.+(mi[\s\-_]*(?:pad)(?:[\s_]?[\w\s]+))\s+build/i],[[c,/_/g," "],[h,"Xiaomi"],[f,m]],[/android.+;\s(m[1-5]\snote)\sbuild/i],[c,[h,"Meizu"],[f,y]],[/(mz)-([\w-]{2,})/i],[[h,"Meizu"],c,[f,y]],[/android.+a000(1)\s+build/i,/android.+oneplus\s(a\d{4})[\s)]/i],[c,[h,"OnePlus"],[f,y]],[/android.+[;\/]\s*(RCT[\d\w]+)\s+build/i],[c,[h,"RCA"],[f,m]],[/android.+[;\/\s]+(Venue[\d\s]{2,7})\s+build/i],[c,[h,"Dell"],[f,m]],[/android.+[;\/]\s*(Q[T|M][\d\w]+)\s+build/i],[c,[h,"Verizon"],[f,m]],[/android.+[;\/]\s+(Barnes[&\s]+Noble\s+|BN[RT])(V?.*)\s+build/i],[[h,"Barnes & Noble"],c,[f,m]],[/android.+[;\/]\s+(TM\d{3}.*\b)\s+build/i],[c,[h,"NuVision"],[f,m]],[/android.+;\s(k88)\sbuild/i],[c,[h,"ZTE"],[f,m]],[/android.+[;\/]\s*(gen\d{3})\s+build.*49h/i],[c,[h,"Swiss"],[f,y]],[/android.+[;\/]\s*(zur\d{3})\s+build/i],[c,[h,"Swiss"],[f,m]],[/android.+[;\/]\s*((Zeki)?TB.*\b)\s+build/i],[c,[h,"Zeki"],[f,m]],[/(android).+[;\/]\s+([YR]\d{2})\s+build/i,/android.+[;\/]\s+(Dragon[\-\s]+Touch\s+|DT)(\w{5})\sbuild/i],[[h,"Dragon Touch"],c,[f,m]],[/android.+[;\/]\s*(NS-?\w{0,9})\sbuild/i],[c,[h,"Insignia"],[f,m]],[/android.+[;\/]\s*((NX|Next)-?\w{0,9})\s+build/i],[c,[h,"NextBook"],[f,m]],[/android.+[;\/]\s*(Xtreme\_)?(V(1[045]|2[015]|30|40|60|7[05]|90))\s+build/i],[[h,"Voice"],c,[f,y]],[/android.+[;\/]\s*(LVTEL\-)?(V1[12])\s+build/i],[[h,"LvTel"],c,[f,y]],[/android.+;\s(PH-1)\s/i],[c,[h,"Essential"],[f,y]],[/android.+[;\/]\s*(V(100MD|700NA|7011|917G).*\b)\s+build/i],[c,[h,"Envizen"],[f,m]],[/android.+[;\/]\s*(Le[\s\-]+Pan)[\s\-]+(\w{1,9})\s+build/i],[h,c,[f,m]],[/android.+[;\/]\s*(Trio[\s\-]*.*)\s+build/i],[c,[h,"MachSpeed"],[f,m]],[/android.+[;\/]\s*(Trinity)[\-\s]*(T\d{3})\s+build/i],[h,c,[f,m]],[/android.+[;\/]\s*TU_(1491)\s+build/i],[c,[h,"Rotor"],[f,m]],[/android.+(KS(.+))\s+build/i],[c,[h,"Amazon"],[f,m]],[/android.+(Gigaset)[\s\-]+(Q\w{1,9})\s+build/i],[h,c,[f,m]],[/\s(tablet|tab)[;\/]/i,/\s(mobile)(?:[;\/]|\ssafari)/i],[[f,_.lowerize],h,c],[/[\s\/\(](smart-?tv)[;
2\)]/i],[[f,g]],[/(android[\w\.\s\-]{0,9});.+build/i],[c,[h,"Generic"]]],engine:[[/windows.+\sedge\/([\w\.]+)/i],[d,[l,"EdgeHTML"]],[/webkit\/537\.36.+chrome\/(?!27)([\w\.]+)/i],[d,[l,"Blink"]],[/(presto)\/([\w\.]+)/i,/(webkit|trident|netfront|netsurf|amaya|lynx|w3m|goanna)\/([\w\.]+)/i,/(khtml|tasman|links)[\/\s]\(?([\w\.]+)/i,/(icab)[\/\s]([23]\.[\d\.]+)/i],[l,d],[/rv\:([\w\.]{1,9}).+(gecko)/i],[d,l]],os:[[/microsoft\s(windows)\s(vista|xp)/i],[l,d],[/(windows)\snt\s6\.2;\s(arm)/i,/(windows\sphone(?:\sos)*)[\s\/]?([\d\.\s\w]*)/i,/(windows\smobile|windows)[\s\/]?([ntce\d\.\s]+\w)/i],[l,[d,w.str,k.os.windows.version]],[/(win(?=3|9|n)|win\s9x\s)([nt\d\.]+)/i],[[l,"Windows"],[d,w.str,k.os.windows.version]],[/\((bb)(10);/i],[[l,"BlackBerry"],d],[/(blackberry)\w*\/?([\w\.]*)/i,/(tizen|kaios)[\/\s]([\w\.]+)/i,/(android|webos|palm\sos|qnx|bada|rim\stablet\sos|meego|sailfish|contiki)[\/\s-]?([\w\.]*)/i],[l,d],[/(symbian\s?os|symbos|s60(?=;))[\/\s-]?([\w\.]*)/i],[[l,"Symbian"],d],[/\((series40);/i],[l],[/mozilla.+\(mobile;.+gecko.+firefox/i],[[l,"Firefox OS"],d],[/(nintendo|playstation)\s([wids34portablevu]+)/i,/(mint)[\/\s\(]?(\w*)/i,/(mageia|vectorlinux)[;\s]/i,/(joli|[kxln]?ubuntu|debian|suse|opensuse|gentoo|(?=\s)arch|slackware|fedora|mandriva|centos|pclinuxos|redhat|zenwalk|linpus)[\/\s-]?(?!chrom)([\w\.-]*)/i,/(hurd|linux)\s?([\w\.]*)/i,/(gnu)\s?([\w\.]*)/i],[l,d],[/(cros)\s[\w]+\s([\w\.]+\w)/i],[[l,"Chromium OS"],d],[/(sunos)\s?([\w\.\d]*)/i],[[l,"Solaris"],d],[/\s([frentopc-]{0,4}bsd|dragonfly)\s?([\w\.]*)/i],[l,d],[/(haiku)\s(\w+)/i],[l,d],[/cfnetwork\/.+darwin/i,/ip[honead]{2,4}(?:.*os\s([\w]+)\slike\smac|;\sopera)/i],[[d,/_/g,"."],[l,"iOS"]],[/(mac\sos\sx)\s?([\w\s\.]*)/i,/(macintosh|mac(?=_powerpc)\s)/i],[[l,"Mac OS"],[d,/_/g,"."]],[/((?:open)?solaris)[\/\s-]?([\w\.]*)/i,/(aix)\s((\d)(?=\.|\)|\s)[\w\.])*/i,/(plan\s9|minix|beos|os\/2|amigaos|morphos|risc\sos|openvms|fuchsia)/i,/(unix)\s?([\w\.]*)/i],[l,d]]},O=function e(t,n){if("object"===typeof t&&(n=t,t=o),!(this instanceof e))return new e(t,n).getResult();var r=t||(i&&i.navigator&&i.navigator.userAgent?i.navigator.userAgent:""),a=n?_.extend(S,n):S;return this.getBrowser=function(){var e={name:o,version:o};return w.rgx.call(e,r,a.browser),e.major=_.major(e.version),e},this.getCPU=function(){var e={architecture:o};return w.rgx.call(e,r,a.cpu),e},this.getDevice=function(){var e={vendor:o,model:o,type:o};return w.rgx.call(e,r,a.device),e},this.getEngine=function(){var e={name:o,version:o};return w.rgx.call(e,r,a.engine),e},this.getOS=function(){var e={name:o,version:o};return w.rgx.call(e,r,a.os),e},this.getResult=function(){return{ua:this.getUA(),browser:this.getBrowser(),engine:this.getEngine(),os:this.getOS(),device:this.getDevice(),cpu:this.getCPU()}},this.getUA=function(){return r},this.setUA=function(e){return r=e,this},this};O.VERSION="0.7.22",O.BROWSER={NAME:l,MAJOR:"major",VERSION:d},O.CPU={ARCHITECTURE:p},O.DEVICE={MODEL:c,VENDOR:h,TYPE:f,CONSOLE:v,MOBILE:y,SMARTTV:g,TABLET:m,WEARABLE:b,EMBEDDED:"embedded"},O.ENGINE={NAME:l,VERSION:d},O.OS={NAME:l,VERSION:d},typeof t!==s?(typeof e!==s&&e.exports&&(t=e.exports=O),t.UAParser=O):(r=function(){return O}.call(t,n,t,e))===o||(e.exports=r);var E=i&&(i.jQuery||i.Zepto);if(E&&!E.ua){var T=new O;E.ua=T.getResult(),E.ua.get=function(){return T.getUA()},E.ua.set=function(e){T.setUA(e);var t=T.getResult();for(var n in t)E.ua[n]=t[n]}}}("object"===typeof window?window:this)},function(e,t,n){"use strict";n(315)},function(e,t,n){"use strict";(function(e){var t=n(11);(function(){var n,r="function"==typeof Object.defineProperties?Object.defineProperty:function(e,t,n){e!=Array.prototype&&e!=Object.prototype&&(e[t]=n.value)};var i=function(t){t=["object"==typeof window&&window,"object"==typeof self&&self,"object"==typeof e&&e,t];for(var n=0;n<t.length;++n){var r=t[n];if(r&&r.Math==Math)return r}return globalThis}(this);function o(e){var t=0;return function(){return t<e.length?{done:!1,value:e[t++]}:{done:!0}}}function a(e){var t="undefined"!=typeof Symbol&&Symbol.iterator&&e[Symbol.iterator];return t?t.call(e):{next:o(e)}}!function(e,t){if(t){var n=i;e=e.split(".");for(var o=0;o<e.length-1;o++){var a=e[o];a in n||(n[a]={}),n=n[a]}(t=t(o=n[e=e[e.length-1]]))!=o&&null!=t&&r(n,e,{configurable:!0,writable:!0,value:t})}}("Promise",(function(e){function t(e){this.b=0,this.c=void 0,this.a=[];var t=this.f();try{e(t.resolve,t.reject)}catch(n){t.reject(n)}}function n(){this.a=null}function r(e){return e instanceof t?e:new t((function(t){t(e)}))}if(e)return e;n.prototype.b=function(e){if(null==this.a){this.a=[];var t=this;this.c((function(){t.g()}))}this.a.push(e)};var o=i.setTimeout;n.prototype.c=function(e){o(e,0)},n.prototype.g=function(){for(;this.a&&this.a.length;){var e=this.a;this.a=[];for(var t=0;t<e.length;++t){var n=e[t];e[t]=null;try{n()}catch(r){this.f(r)}}}this.a=null},n.prototype.f=function(e){this.c((function(){throw e}))},t.prototype.f=function(){function e(e){return function(r){n||(n=!0,e.call(t,r))}}var t=this,n=!1;return{resolve:e(this.v),reject:e(this.g)}}
2,t.prototype.v=function(e){if(e===this)this.g(new TypeError("A Promise cannot resolve to itself"));else if(e instanceof t)this.o(e);else{e:switch(typeof e){case"object":var n=null!=e;break e;case"function":n=!0;break e;default:n=!1}n?this.m(e):this.h(e)}},t.prototype.m=function(e){var t=void 0;try{t=e.then}catch(n){return void this.g(n)}"function"==typeof t?this.u(t,e):this.h(e)},t.prototype.g=function(e){this.i(2,e)},t.prototype.h=function(e){this.i(1,e)},t.prototype.i=function(e,t){if(0!=this.b)throw Error("Cannot settle("+e+", "+t+"): Promise already settled in state"+this.b);this.b=e,this.c=t,this.l()},t.prototype.l=function(){if(null!=this.a){for(var e=0;e<this.a.length;++e)s.b(this.a[e]);this.a=null}};var s=new n;return t.prototype.o=function(e){var t=this.f();e.Pa(t.resolve,t.reject)},t.prototype.u=function(e,t){var n=this.f();try{e.call(t,n.resolve,n.reject)}catch(r){n.reject(r)}},t.prototype.then=function(e,n){function r(e,t){return"function"==typeof e?function(t){try{i(e(t))}catch(n){o(n)}}:t}var i,o,a=new t((function(e,t){i=e,o=t}));return this.Pa(r(e,i),r(n,o)),a},t.prototype.catch=function(e){return this.then(void 0,e)},t.prototype.Pa=function(e,t){function n(){switch(r.b){case 1:e(r.c);break;case 2:t(r.c);break;default:throw Error("Unexpected state: "+r.b)}}var r=this;null==this.a?s.b(n):this.a.push(n)},t.resolve=r,t.reject=function(e){return new t((function(t,n){n(e)}))},t.race=function(e){return new t((function(t,n){for(var i=a(e),o=i.next();!o.done;o=i.next())r(o.value).Pa(t,n)}))},t.all=function(e){var n=a(e),i=n.next();return i.done?r([]):new t((function(e,t){function o(t){return function(n){a[t]=n,0==--s&&e(a)}}var a=[],s=0;do{a.push(void 0),s++,r(i.value).Pa(o(a.length-1),t),i=n.next()}while(!i.done)}))},t}));var s=s||{},u=this||self,c=/^[\w+/_-]+[=]{0,2}$/,l=null;function f(){}function h(e){var t=typeof e;if("object"==t){if(!e)return"null";if(e instanceof Array)return"array";if(e instanceof Object)return t;var n=Object.prototype.toString.call(e);if("[object Window]"==n)return"object";if("[object Array]"==n||"number"==typeof e.length&&"undefined"!=typeof e.splice&&"undefined"!=typeof e.propertyIsEnumerable&&!e.propertyIsEnumerable("splice"))return"array";if("[object Function]"==n||"undefined"!=typeof e.call&&"undefined"!=typeof e.propertyIsEnumerable&&!e.propertyIsEnumerable("call"))return"function"}else if("function"==t&&"undefined"==typeof e.call)return"object";return t}function d(e){var t=h(e);return"array"==t||"object"==t&&"number"==typeof e.length}function p(e){return"function"==h(e)}function v(e){var t=typeof e;return"object"==t&&null!=e||"function"==t}function y(e){return Object.prototype.hasOwnProperty.call(e,m)&&e[m]||(e[m]=++g)}var m="closure_uid_"+(1e9*Math.random()>>>0),g=0;function b(e,t,n){return e.call.apply(e.bind,arguments)}function _(e,t,n){if(!e)throw Error();if(2<arguments.length){var r=Array.prototype.slice.call(arguments,2);return function(){var n=Array.prototype.slice.call(arguments);return Array.prototype.unshift.apply(n,r),e.apply(t,n)}}return function(){return e.apply(t,arguments)}}function w(e,t,n){return(w=Function.prototype.bind&&-1!=Function.prototype.bind.toString().indexOf("native code")?b:_).apply(null,arguments)}function k(e,t){var n=Array.prototype.slice.call(arguments,1);return function(){var t=n.slice();return t.push.apply(t,arguments),e.apply(this,t)}}var S=Date.now||function(){return+new Date};function O(e,t){function n(){}n.prototype=t.prototype,e.$a=t.prototype,e.prototype=new n,e.prototype.constructor=e}function E(e,t,n){this.code=P+e,this.message=t||x[e]||"",this.a=n||null}function T(e){var t=e&&e.code;return t?new E(t.substring(P.length),e.message,e.serverResponse):null}O(E,Error),E.prototype.w=function(){var e={code:this.code,message:this.message};return this.a&&(e.serverResponse=this.a),e},E.prototype.toJSON=function(){return this.w()};var C,P="auth/",x={"admin-restricted-operation":"This operation is restricted to administrators only.","argument-error":"","app-not-authorized":"This app, identified by the domain where it's hosted, is not authorized to use Firebase Authentication with the provided API key. Review your key configuration in the Google API console.","app-not-installed":"The requested mobile application corresponding to the identifier (Android package name or iOS bundle ID) provided is not installed on this device.","captcha-check-failed":"The reCAPTCHA response token provided is either invalid, expired, already used or the domain associated with it does not match the list of whitelisted domains.","code-expired":"The SMS code has expired. Please re-send the verification code to try again.","cordova-not-ready":"Cordova framework is not ready.","cors-unsupported":"This browser is not supported.","credential-already-in-use":"This credential is already associated with a different user account.","custom-token-mismatch":"The custom token corresponds to a different audience.","requires-recent-login":"This operation is sensitive and requires recent authentication. Log in again before retrying this request.","dynamic-link-not-activated":"Please activate Dynamic Links in the Firebase Console and agree to the terms and conditions.","email-change-needs-verification":"Multi-factor users must al
2ways have a verified email.","email-already-in-use":"The email address is already in use by another account.","expired-action-code":"The action code has expired. ","cancelled-popup-request":"This operation has been cancelled due to another conflicting popup being opened.","internal-error":"An internal error has occurred.","invalid-app-credential":"The phone verification request contains an invalid application verifier. The reCAPTCHA token response is either invalid or expired.","invalid-app-id":"The mobile app identifier is not registed for the current project.","invalid-user-token":"This user's credential isn't valid for this project. This can happen if the user's token has been tampered with, or if the user isn't for the project associated with this API key.","invalid-auth-event":"An internal error has occurred.","invalid-verification-code":"The SMS verification code used to create the phone auth credential is invalid. Please resend the verification code sms and be sure use the verification code provided by the user.","invalid-continue-uri":"The continue URL provided in the request is invalid.","invalid-cordova-configuration":"The following Cordova plugins must be installed to enable OAuth sign-in: cordova-plugin-buildinfo, cordova-universal-links-plugin, cordova-plugin-browsertab, cordova-plugin-inappbrowser and cordova-plugin-customurlscheme.","invalid-custom-token":"The custom token format is incorrect. Please check the documentation.","invalid-dynamic-link-domain":"The provided dynamic link domain is not configured or authorized for the current project.","invalid-email":"The email address is badly formatted.","invalid-api-key":"Your API key is invalid, please check you have copied it correctly.","invalid-cert-hash":"The SHA-1 certificate hash provided is invalid.","invalid-credential":"The supplied auth credential is malformed or has expired.","invalid-message-payload":"The email template corresponding to this action contains invalid characters in its message. Please fix by going to the Auth email templates section in the Firebase Console.","invalid-multi-factor-session":"The request does not contain a valid proof of first factor successful sign-in.","invalid-oauth-provider":"EmailAuthProvider is not supported for this operation. This operation only supports OAuth providers.","invalid-oauth-client-id":"The OAuth client ID provided is either invalid or does not match the specified API key.","unauthorized-domain":"This domain is not authorized for OAuth operations for your Firebase project. Edit the list of authorized domains from the Firebase console.","invalid-action-code":"The action code is invalid. This can happen if the code is malformed, expired, or has already been used.","wrong-password":"The password is invalid or the user does not have a password.","invalid-persistence-type":"The specified persistence type is invalid. It can only be local, session or none.","invali
2d-phone-number":"The format of the phone number provided is incorrect. Please enter the phone number in a format that can be parsed into E.164 format. E.164 phone numbers are written in the format [+][country code][subscriber number including area code].","invalid-provider-id":"The specified provider ID is invalid.","invalid-recipient-email":"The email corresponding to this action failed to send as the provided recipient email address is invalid.","invalid-sender":"The email template corresponding to this action contains an invalid sender email or name. Please fix by going to the Auth email templates section in the Firebase Console.","invalid-verification-id":"The verification ID used to create the phone auth credential is invalid.","invalid-tenant-id":"The Auth instance's tenant ID is invalid.","multi-factor-info-not-found":"The user does not have a second factor matching the identifier provided.","multi-factor-auth-required":"Proof of ownership of a second factor is required to complete sign-in.","missing-android-pkg-name":"An Android Package Name must be provided if the Android App is required to be installed.","auth-domain-config-required":"Be sure to include authDomain when calling firebase.initializeApp(), by following the instructions in the Firebase console.","missing-app-credential":"The phone verification request is missing an application verifier assertion. A reCAPTCHA response token needs to be provided.","missing-verification-code":"The phone auth credential was created with an empty SMS verification code.","missing-continue-uri":"A continue URL must be provided in the request.","missing-iframe-start":"An internal error has occurred.","missing-ios-bundle-id":"An iOS Bundle ID must be provided if an App Store ID is provided.","missing-multi-factor-info":"No second factor identifier is provided.","missing-multi-factor-session":"The request is missing proof of first factor successful sign-in.","missing-or-invalid-nonce":"The request does not contain a valid nonce. This can occur if the SHA-256 hash of the provided raw nonce does not match the hashed nonce in the ID token payload.","missing-phone-number":"To send verification codes, provide a phone number for the recipient.","missing-verification-id":"The phone auth credential was created with an empty verification ID.","app-deleted":"This instance of FirebaseApp has been deleted.","account-exists-with-different-credential":"An account already exists with the same email address but different sign-in credentials. Sign in using a provider associated with this email address.","network-request-failed":"A network error (such as timeout, interrupted connection or unreachable host) has occurred.","no-auth-event":"An internal error has occurred.","no-such-provider":"User was not linked to an account with the given provider.","null-user":"A null user object was provided as the argument for an operation which requires a non-null user object.","operation-not-allowed":"The given sign-in provider is disabled for this Firebase project. Enable it in the Firebase console, under the sign-in method tab of the Auth section.","operation-not-supported-in-this-environment":'This operation is not supported in the environment this application is running on. "location.protocol" must be http, https or chrome-extension and web storage must be enabled.',"popup-blocked":"Unable to establish a connection with the popup. It may have been blocked by the browser.","popup-closed-by-user":"The popup has been closed by the user before finalizing the operation.","provider-already-linked":"User can only be linked to one identity for the given provider.","quota-exceeded":"The project's quota for this operation has been exceeded.","redirect-cancelled-by-user":"The redirect operation has been cancelled by the user before finalizing.","redirect-operation-pending":"A redirect sign-in operation is already pending.","rejected-credential":"The request contains malformed or mismatching credentials.","second-factor-already-in-use":"The second factor is already enrolled on this account.","maximum-second-factor-count-exceeded":"The maximum allowed number of second factors on a user has been exceeded.","tenant-id-mismatch":"The provided tenant ID does not match the Auth instance's tenant ID",timeout:"The operation has timed out.","user-token-expired":"The user's credential is no longer valid. The user must sign in again.","too-many-requests":"We have blocked all requests from this device due to unusual activity. Try again later.","unauthorized-continue-uri":"The domain of the continue URL is not whitelisted. Please whitelist the domain in the Firebase console.","unsupported-first-factor":"Enrolling a second factor or signing in with a multi-factor account requires sign-in with a supported first factor.","unsupported-persistence-type":"The current environment does not support the specified persistence type.","unsupported-tenant-operation":"This operation is not supported in a multi-tenant context.","unverified-email":"The operation requires a verified email.","user-cancelled":"The user did not grant your application the permissions it requested.","user-not-found":"There is no user record corresponding to this identifier. The user may have been deleted.","user-disabled":"The user account has been disabled by an administrator.","user-mismatch":"The supplied credentials do not correspond to the previously signed in user.","user-signed-out":"","weak-password":"The password must be 6 characters long or more.","web-storage-unsupported":"This browser is not supported or 3rd party cookies and data may be disabled."},I={kd:{Sa:"https://staging-identitytoolkit.sandbox.googleapis.com/identitytoolkit/v3/relyingparty/",Ya:"https://staging-securetoken.sandbox.googleapis.com/v1/token",Va:"https://staging-identitytoolkit.sandbox.googleapis.com/v2/",id:"b"},rd:{Sa:"https://www.googleapis.com/identitytoolkit/v3/relyingparty/",Ya:"https://securetoken.googleapis.com/v1/token",Va:"https://identitytoolkit.googleapis.com/v2/",id:"p"},td:{Sa:"https://staging-www.sandbox.googleapis.com/identitytoolkit/v3/relyingparty/",Ya:"https://staging-securetoken.sandbox.googleapis.com/v1/token",Va:"https://staging-identitytoolkit.sandbox.googleapis.com/v2/",id:"s"},ud:{Sa:"https://www-googleapis-test.sandbox.google.com/identitytoolkit/v3/relyingparty/",Ya:"https://test-securetoken.sandbox.googleapis.com/v1/token",Va:"https://test-identitytoolkit.sandbox.googleapis.com/v2/",id:"t"}};function j(e){for(var t in I)if(I[t].id===e)return{firebaseEndpoint:(e=I[t]).Sa,secureTokenEndpoint:e.Ya,identityPlatformEndpoint:e.Va};return null}function R(e){if(!e)return!1;
2try{return!!e.$goog_Thenable}catch(t){return!1}}function A(e){if(Error.captureStackTrace)Error.captureStackTrace(this,A);else{var t=Error().stack;t&&(this.stack=t)}e&&(this.message=String(e))}function M(e,t){for(var n="",r=(e=e.split("%s")).length-1,i=0;i<r;i++)n+=e[i]+(i<t.length?t[i]:"%s");A.call(this,n+e[r])}function N(e,t){throw new M("Failure"+(e?": "+e:""),Array.prototype.slice.call(arguments,1))}function L(e,t){this.c=e,this.f=t,this.b=0,this.a=null}function D(e,t){e.f(t),100>e.b&&(e.b++,t.next=e.a,e.a=t)}function F(){this.b=this.a=null}C=j("__EID__")?"__EID__":void 0,O(A,Error),A.prototype.name="CustomError",O(M,A),M.prototype.name="AssertionError",L.prototype.get=function(){if(0<this.b){this.b--;var e=this.a;this.a=e.next,e.next=null}else e=this.c();return e};var U=new L((function(){return new B}),(function(e){e.reset()}));function V(){var e=mt,t=null;return e.a&&(t=e.a,e.a=e.a.next,e.a||(e.b=null),t.next=null),t}function B(){this.next=this.b=this.a=null}F.prototype.add=function(e,t){var n=U.get();n.set(e,t),this.b?this.b.next=n:this.a=n,this.b=n},B.prototype.set=function(e,t){this.a=e,this.b=t,this.next=null},B.prototype.reset=function(){this.next=this.b=this.a=null};var q=Array.prototype.indexOf?function(e,t){return Array.prototype.indexOf.call(e,t,void 0)}:function(e,t){if("string"===typeof e)return"string"!==typeof t||1!=t.length?-1:e.indexOf(t,0);for(var n=0;n<e.length;n++)if(n in e&&e[n]===t)return n;return-1},W=Array.prototype.forEach?function(e,t,n){Array.prototype.forEach.call(e,t,n)}:function(e,t,n){for(var r=e.length,i="string"===typeof e?e.split(""):e,o=0;o<r;o++)o in i&&t.call(n,i[o],o,e)};var z=Array.prototype.filter?function(e,t){return Array.prototype.filter.call(e,t,void 0)}:function(e,t){for(var n=e.length,r=[],i=0,o="string"===typeof e?e.split(""):e,a=0;a<n;a++)if(a in o){var s=o[a];t.call(void 0,s,a,e)&&(r[i++]=s)}return r},H=Array.prototype.map?function(e,t){return Array.prototype.map.call(e,t,void 0)}:function(e,t){for(var n=e.length,r=Array(n),i="string"===typeof e?e.split(""):e,o=0;o<n;o++)o in i&&(r[o]=t.call(void 0,i[o],o,e));return r},G=Array.prototype.some?function(e,t){return Array.prototype.some.call(e,t,void 0)}:function(e,t){for(var n=e.length,r="string"===typeof e?e.split(""):e,i=0;i<n;i++)if(i in r&&t.call(void 0,r[i],i,e))return!0;return!1};function K(e,t){return 0<=q(e,t)}function Y(e,t){var n;return(n=0<=(t=q(e,t)))&&Array.prototype.splice.call(e,t,1),n}function Q(e,t){!function(e,t){for(var n="string"===typeof e?e.split(""):e,r=e.length-1;0<=r;--r)r in n&&t.call(void 0,n[r],r,e)}(e,(function(n,r){t.call(void 0,n,r,e)&&1==Array.prototype.splice.call(e,r,1).length&&0}))}function $(e){return Array.prototype.concat.apply([],arguments)}function X(e){var t=e.length;if(0<t){for(var n=Array(t),r=0;r<t;r++)n[r]=e[r];return n}return[]}var J,Z=String.prototype.trim?function(e){return e.trim()}:function(e){return/^[\s\xa0]*([\s\S]*?)[\s\xa0]*$/.exec(e)[1]},ee=/&/g,te=/</g,ne=/>/g,re=/"/g,ie=/'/g,oe=/\x00/g,ae=/[\x00&<>"']/;function se(e,t){return-1!=e.indexOf(t)}function ue(e,t){return e<t?-1:e>t?1:0}e:{var ce=u.navigator;if(ce){var le=ce.userAgent;if(le){J=le;break e}}J=""}function fe(e){return se(J,e)}function he(e,t){for(var n in e)t.call(void 0,e[n],n,e)}function de(e){for(var t in e)return!1;return!0}function pe(e){var t,n={};for(t in e)n[t]=e[t];return n}var ve="constructor hasOwnProperty isPrototypeOf propertyIsEnumerable toLocaleString toString valueOf".split(" ");function ye(e,t){for(var n,r,i=1;i<arguments.length;i++){for(n in r=arguments[i])e[n]=r[n];for(var o=0;o<ve.length;o++)n=ve[o],Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}}function me(e,t){e:{try{var n=e&&e.ownerDocument,r=n&&(n.defaultView||n.parentWindow);if((r=r||u).Element&&r.Location){var i=r;break e}}catch(a){}i=null}if(i&&"undefined"!=typeof i[t]&&(!e||!(e instanceof i[t])&&(e instanceof i.Location||e instanceof i.Element))){if(v(e))try{var o=e.constructor.displayName||e.constructor.name||Object.prototype.toString.call(e)}catch(a){o="<object could not be stringified>"}else o=void 0===e?"undefined":null===e?"null":typeof e;N("Argument is not a %s (or a non-Element, non-Location mock); got: %s",t,o)}}function ge(e,t){this.a=e===we&&t||"",this.b=_e}function be(e){return e instanceof ge&&e.constructor===ge&&e.b===_e?e.a:(N("expected object of type Const, got '"+e+"'"),"type_error:Const")}ge.prototype.sa=!0,ge.prototype.ra=function(){return this.a},ge.prototype.toString=function(){return"Const{"+this.a+"}"};var _e={},we={},ke=new ge(we,"");function Se(e,t){this.a=e===xe&&t||"",this.b=Pe}function Oe(e){return e instanceof Se&&e.constructor===Se&&e.b===Pe?e.a:(N("expected object of type TrustedResourceUrl, got '"+e+"' of type "+h(e)),"type_error:TrustedResourceUrl")}function Ee(e,t){var n=be(e);if(!Ce.test(n))throw Error("Invalid TrustedResourceUrl format: "+n);return e=n.replace(Te,(function(e,r){if(!Object.prototype.hasOwnProperty.call(t,r))throw Error('Found marker, "'+r+'", in format str
2ing, "'+n+'", but no valid label mapping found in args: '+JSON.stringify(t));return(e=t[r])instanceof ge?be(e):encodeURIComponent(String(e))})),new Se(xe,e)}Se.prototype.sa=!0,Se.prototype.ra=function(){return this.a.toString()},Se.prototype.toString=function(){return"TrustedResourceUrl{"+this.a+"}"};var Te=/%{(\w+)}/g,Ce=/^((https:)?\/\/[0-9a-z.:[\]-]+\/|\/[^/\\]|[^:/\\%]+\/|[^:/\\%]*[?#]|about:blank#)/i,Pe={},xe={};function Ie(e,t){this.a=e===Ne&&t||"",this.b=Me}function je(e){return e instanceof Ie&&e.constructor===Ie&&e.b===Me?e.a:(N("expected object of type SafeUrl, got '"+e+"' of type "+h(e)),"type_error:SafeUrl")}Ie.prototype.sa=!0,Ie.prototype.ra=function(){return this.a.toString()},Ie.prototype.toString=function(){return"SafeUrl{"+this.a+"}"};var Re=/^(?:(?:https?|mailto|ftp):|[^:/?#]*(?:[/?#]|$))/i;function Ae(e){return e instanceof Ie?e:(e="object"==typeof e&&e.sa?e.ra():String(e),Re.test(e)||(e="about:invalid#zClosurez"),new Ie(Ne,e))}var Me={},Ne={};function Le(){this.a="",this.b=Fe}function De(e){return e instanceof Le&&e.constructor===Le&&e.b===Fe?e.a:(N("expected object of type SafeHtml, got '"+e+"' of type "+h(e)),"type_error:SafeHtml")}Le.prototype.sa=!0,Le.prototype.ra=function(){return this.a.toString()},Le.prototype.toString=function(){return"SafeHtml{"+this.a+"}"};var Fe={};function Ue(e){var t=new Le;return t.a=e,t}Ue("<!DOCTYPE html>");var Ve=Ue("");function Be(e,t){for(var n=e.split("%s"),r="",i=Array.prototype.slice.call(arguments,1);i.length&&1<n.length;)r+=n.shift()+i.shift();return r+n.join("%s")}function qe(e){return ae.test(e)&&(-1!=e.indexOf("&")&&(e=e.replace(ee,"&")),-1!=e.indexOf("<")&&(e=e.replace(te,"<")),-1!=e.indexOf(">")&&(e=e.replace(ne,">")),-1!=e.indexOf('"')&&(e=e.replace(re,""")),-1!=e.indexOf("'")&&(e=e.replace(ie,"'")),-1!=e.indexOf("\0")&&(e=e.replace(oe,"�"))),e}function We(e){return We[" "](e),e}Ue("<br>"),We[" "]=f;var ze,He=fe("Opera"),Ge=fe("Trident")||fe("MSIE"),Ke=fe("Edge"),Ye=Ke||Ge,Qe=fe("Gecko")&&!(se(J.toLowerCase(),"webkit")&&!fe("Edge"))&&!(fe("Trident")||fe("MSIE"))&&!fe("Edge"),$e=se(J.toLowerCase(),"webkit")&&!fe("Edge");function Xe(){var e=u.document;return e?e.documentMode:void 0}e:{var Je="",Ze=function(){var e=J;return Qe?/rv:([^\);]+)(\)|;)/.exec(e):Ke?/Edge\/([\d\.]+)/.exec(e):Ge?/\b(?:MSIE|rv)[: ]([^\);]+)(\)|;)/.exec(e):$e?/WebKit\/(\S+)/.exec(e):He?/(?:Version)[ \/]?(\S+)/.exec(e):void 0}();if(Ze&&(Je=Ze?Ze[1]:""),Ge){var et=Xe();if(null!=et&&et>parseFloat(Je)){ze=String(et);break e}}ze=Je}var tt,nt={};function rt(e){return function(e,t){var n=nt;return Object.prototype.hasOwnProperty.call(n,e)?n[e]:n[e]=t(e)}(e,(function(){for(var t=0,n=Z(String(ze)).split("."),r=Z(String(e)).split("."),i=Math.max(n.length,r.length),o=0;0==t&&o<i;o++){var a=n[o]||"",s=r[o]||"";do{if(a=/(\d*)(\D*)(.*)/.exec(a)||["","","",""],s=/(\d*)(\D*)(.*)/.exec(s)||["","","",""],0==a[0].length&&0==s[0].length)break;t=ue(0==a[1].length?0:parseInt(a[1],10),0==s[1].length?0:parseInt(s[1],10))||ue(0==a[2].length,0==s[2].length)||ue(a[2],s[2]),a=a[3],s=s[3]}while(0==t)}return 0<=t}))}tt=u.document&&Ge?Xe():void 0;try{new self.OffscreenCanvas(0,0).getContext("2d")}catch(la){}var it=!Ge||9<=Number(tt);function ot(e){var t=document;return"string"===typeof e?t.getElementById(e):e}function at(e,t){he(t,(function(t,n){t&&"object"==typeof t&&t.sa&&(t=t.ra()),"style"==n?e.style.cssText=t:"class"==n?e.className=t:"for"==n?e.htmlFor=t:ct.hasOwnProperty(n)?e.setAttribute(ct[n],t):0==n.lastIndexOf("aria-",0)||0==n.lastIndexOf("data-",0)?e.setAttribute(n,t):e[n]=t}))}var st,ut,ct={cellpadding:"cellPadding",cellspacing:"cellSpacing",colspan:"colSpan",frameborder:"frameBorder",height:"height",maxlength:"maxLength",nonce:"nonce",role:"role",rowspan:"rowSpan",type:"type",usemap:"useMap",valign:"vAlign",width:"width"};function lt(e,t,n){function r(n){n&&t.appendChild("string"===typeof n?e.createTextNode(n):n)}for(var i=2;i<n.length;i++){var o=n[i];!d(o)||v(o)&&0<o.nodeType?r(o):W(ht(o)?X(o):o,r)}}function ft(e,t){return t=String(t),"application/xhtml+xml"===e.contentType&&(t=t.toLowerCase()),e.createElement(t)}function ht(e){if(e&&"number"==typeof e.length){if(v(e))return"function"==typeof e.item||"string"==typeof e.item;if(p(e))return"function"==typeof e.item}return!1}function dt(e){u.setTimeout((function(){throw e}
2),0)}function pt(){var e=u.MessageChannel;if("undefined"===typeof e&&"undefined"!==typeof window&&window.postMessage&&window.addEventListener&&!fe("Presto")&&(e=function(){var e=ft(document,"IFRAME");e.style.display="none",function(e){var t=new Se(xe,be(ke));me(e,"HTMLIFrameElement"),e.src=Oe(t).toString()}(e),document.documentElement.appendChild(e);var t=e.contentWindow;(e=t.document).open(),e.write(De(Ve)),e.close();var n="callImmediate"+Math.random(),r="file:"==t.location.protocol?"*":t.location.protocol+"//"+t.location.host;e=w((function(e){"*"!=r&&e.origin!=r||e.data!=n||this.port1.onmessage()}),this),t.addEventListener("message",e,!1),this.port1={},this.port2={postMessage:function(){t.postMessage(n,r)}}}),"undefined"!==typeof e&&!fe("Trident")&&!fe("MSIE")){var t=new e,n={},r=n;return t.port1.onmessage=function(){if(void 0!==n.next){var e=(n=n.next).Fb;n.Fb=null,e()}},function(e){r.next={Fb:e},r=r.next,t.port2.postMessage(0)}}return function(e){u.setTimeout(e,0)}}function vt(e,t){ut||function(){if(u.Promise&&u.Promise.resolve){var e=u.Promise.resolve(void 0);ut=function(){e.then(gt)}}else ut=function(){var e=gt;!p(u.setImmediate)||u.Window&&u.Window.prototype&&!fe("Edge")&&u.Window.prototype.setImmediate==u.setImmediate?(st||(st=pt()),st(e)):u.setImmediate(e)}}(),yt||(ut(),yt=!0),mt.add(e,t)}var yt=!1,mt=new F;function gt(){for(var e;e=V();){try{e.a.call(e.b)}catch(t){dt(t)}D(U,e)}yt=!1}function bt(e,t){if(this.a=_t,this.i=void 0,this.f=this.b=this.c=null,this.g=this.h=!1,e!=f)try{var n=this;e.call(t,(function(e){At(n,wt,e)}),(function(e){if(!(e instanceof Vt))try{if(e instanceof Error)throw e;throw Error("Promise rejected.")}catch(t){}At(n,kt,e)}))}catch(r){At(this,kt,r)}}var _t=0,wt=2,kt=3;function St(){this.next=this.f=this.b=this.g=this.a=null,this.c=!1}St.prototype.reset=function(){this.f=this.b=this.g=this.a=null,this.c=!1};var Ot=new L((function(){return new St}),(function(e){e.reset()}));function Et(e,t,n){var r=Ot.get();return r.g=e,r.b=t,r.f=n,r}function Tt(e){if(e instanceof bt)return e;var t=new bt(f);return At(t,wt,e),t}function Ct(e){return new bt((function(t,n){n(e)}))}function Pt(e,t,n){Mt(e,t,n,null)||vt(k(t,e))}function xt(e){return new bt((function(t){var n=e.length,r=[];if(n)for(var i=function(e,i,o){n--,r[e]=i?{Ob:!0,value:o}:{Ob:!1,reason:o},0==n&&t(r)},o=0;o<e.length;o++)Pt(e[o],k(i,o,!0),k(i,o,!1));else t(r)}))}function It(e,t){if(e.a==_t)if(e.c){var n=e.c;if(n.b){for(var r=0,i=null,o=null,a=n.b;a&&(a.c||(r++,a.a==e&&(i=a),!(i&&1<r)));a=a.next)i||(o=a);i&&(n.a==_t&&1==r?It(n,t):(o?((r=o).next==n.f&&(n.f=r),r.next=r.next.next):Lt(n),Dt(n,i,kt,t)))}e.c=null}else At(e,kt,t)}function jt(e,t){e.b||e.a!=wt&&e.a!=kt||Nt(e),e.f?e.f.next=t:e.b=t,e.f=t}function Rt(e,t,n,r){var i=Et(null,null,null);return i.a=new bt((function(e,o){i.g=t?function(n){try{var i=t.call(r,n);e(i)}catch(a){o(a)}}:e,i.b=n?function(t){try{var i=n.call(r,t);void 0===i&&t instanceof Vt?o(t):e(i)}catch(a){o(a)}}:o})),i.a.c=e,jt(e,i),i.a}function At(e,t,n){e.a==_t&&(e===n&&(t=kt,n=new TypeError("Promise cannot resolve to itself")),e.a=1,Mt(n,e.Zc,e.$c,e)||(e.i=n,e.a=t,e.c=null,Nt(e),t!=kt||n instanceof Vt||function(e,t){e.g=!0,vt((function(){e.g&&Ut.call(null,t)}))}(e,n)))}function Mt(e,t,n,r){if(e instanceof bt)return jt(e,Et(t||f,n||null,r)),!0;if(R(e))return e.then(t,n,r),!0;if(v(e))try{var i=e.then;if(p(i))return function(e,t,n,r,i){function o(e){s||(s=!0,r.call(i,e))}function a(e){s||(s=!0,n.call(i,e))}var s=!1;try{t.call(e,a,o)}catch(u){o(u)}}(e,i,t,n,r),!0}catch(o){return n.call(r,o),!0}return!1}function Nt(e){e.h||(e.h=!0,vt(e.fc,e))}function Lt(e){var t=null;return e.b&&(t=e.b,e.b=t.next,t.next=null),e.b||(e.f=null),t}function Dt(e,t,n,r){if(n==kt&&t.b&&!t.c)for(;e&&e.g;e=e.c)e.g=!1;if(t.a)t.a.c=null,Ft(t,n,r);else try{t.c?t.g.call(t.f):Ft(t,n,r)}catch(i){Ut.call(null,i)}D(Ot,t)}function Ft(e,t,n){t==wt?e.g.call(e.f,n):e.b&&e.b.call(e.f,n)}bt.prototype.then=function(e,t,n){return Rt(this,p(e)?e:null,p(t)?t:null,n)},bt.prototype.$goog_Thenable=!0,(n=bt.prototype).na=function(e,t){return(e=Et(e,e,t)).c=!0,jt(this,e),this},n.s=function(e,t){return Rt(this,null,e,t)},n.cancel=function(e){if(this.a==_t){var t=new Vt(e);vt((function(){It(this,t)}),this)}},n.Zc=function(e){this.a=_t,At(this,wt,e)},n.$c=function(e){this.a=_t,At(this,kt,e)},n.fc=function(){for(var e;e=Lt(this);)Dt(this,e,this.a,this.i);this.h=!1};var Ut=dt;function Vt(e){A.call(this,e)}function Bt(){0!=qt&&(Wt[y(this)]=this),this.xa=this.xa,this.oa=this.oa}O(Vt,A),Vt.prototype.name="cancel";var qt=0,Wt={};function zt(e){if(!e.xa&&(e.xa=!0,e.Da(),0!=qt)){var t=y(e);if(0!=qt&&e.oa&&0<e.oa.length)throw Error(e+" did not empty its onDisposeCallbacks queue. This probably means it overrode dispose() or disposeInternal() without calling the superclass' method.");delete Wt[t]}}Bt.prototype.xa=!1,Bt.prototype.Da=function(){if(this.oa)for(;this.oa.length;)this.oa.shift()()};var Ht=Object.freeze||function(e){return e},Gt=!Ge||9<=Number(tt),Kt=Ge&&!rt("9"),Yt=function(){if(!u.addEventListener||!Object.defineProperty)return!1;var e=!1,t=Object.defineProperty({},"passive",{get:function(){e=!0}});try{u.addEventListener("test",f,t),u.removeEventListener("test",f,t)}catch(n){}return e}();function Qt(e,t){this.type=e,this.b=this.target=t,this.defaultPrevented=!1}function $t(e,t){if(Qt.call(this,e?e.type:""),this.relatedTarget=this.b=this.target=null,this.button=this.screenY=this.screenX=this.clientY=this.clientX=0,this.key="",this.metaKey=this.shiftKey=this.altKey=this.ctrlKey=!1,this.pointerId=0,this.pointerType="",this.a=null,e){var n=this.type=e.type,r=e.changedTouches&&e.changedTouches.length?e.changedTouches[0]:null;if(this.target=e.target||e.srcElement,this.b=t,t=e.relatedTarget){if(Qe){e:{try{We
2(t.nodeName);var i=!0;break e}catch(o){}i=!1}i||(t=null)}}else"mouseover"==n?t=e.fromElement:"mouseout"==n&&(t=e.toElement);this.relatedTarget=t,r?(this.clientX=void 0!==r.clientX?r.clientX:r.pageX,this.clientY=void 0!==r.clientY?r.clientY:r.pageY,this.screenX=r.screenX||0,this.screenY=r.screenY||0):(this.clientX=void 0!==e.clientX?e.clientX:e.pageX,this.clientY=void 0!==e.clientY?e.clientY:e.pageY,this.screenX=e.screenX||0,this.screenY=e.screenY||0),this.button=e.button,this.key=e.key||"",this.ctrlKey=e.ctrlKey,this.altKey=e.altKey,this.shiftKey=e.shiftKey,this.metaKey=e.metaKey,this.pointerId=e.pointerId||0,this.pointerType="string"===typeof e.pointerType?e.pointerType:Xt[e.pointerType]||"",this.a=e,e.defaultPrevented&&this.preventDefault()}}Qt.prototype.preventDefault=function(){this.defaultPrevented=!0},O($t,Qt);var Xt=Ht({2:"touch",3:"pen",4:"mouse"});$t.prototype.preventDefault=function(){$t.$a.preventDefault.call(this);var e=this.a;if(e.preventDefault)e.preventDefault();else if(e.returnValue=!1,Kt)try{(e.ctrlKey||112<=e.keyCode&&123>=e.keyCode)&&(e.keyCode=-1)}catch(t){}},$t.prototype.g=function(){return this.a};var Jt="closure_listenable_"+(1e6*Math.random()|0),Zt=0;function en(e,t,n,r,i){this.listener=e,this.proxy=null,this.src=t,this.type=n,this.capture=!!r,this.Ua=i,this.key=++Zt,this.va=this.Oa=!1}function tn(e){e.va=!0,e.listener=null,e.proxy=null,e.src=null,e.Ua=null}function nn(e){this.src=e,this.a={},this.b=0}function rn(e,t){var n=t.type;n in e.a&&Y(e.a[n],t)&&(tn(t),0==e.a[n].length&&(delete e.a[n],e.b--))}function on(e,t,n,r){for(var i=0;i<e.length;++i){var o=e[i];if(!o.va&&o.listener==t&&o.capture==!!n&&o.Ua==r)return i}return-1}nn.prototype.add=function(e,t,n,r,i){var o=e.toString();(e=this.a[o])||(e=this.a[o]=[],this.b++);var a=on(e,t,r,i);return-1<a?(t=e[a],n||(t.Oa=!1)):((t=new en(t,this.src,o,!!r,i)).Oa=n,e.push(t)),t};var an="closure_lm_"+(1e6*Math.random()|0),sn={};function un(e,t,n,r,i){if(r&&r.once)ln(e,t,n,r,i);else if(Array.isArray(t))for(var o=0;o<t.length;o++)un(e,t[o],n,r,i);else n=bn(n),e&&e[Jt]?wn(e,t,n,v(r)?!!r.capture:!!r,i):cn(e,t,n,!1,r,i)}function cn(e,t,n,r,i,o){if(!t)throw Error("Invalid event type");var a=v(i)?!!i.capture:!!i,s=mn(e);if(s||(e[an]=s=new nn(e)),!(n=s.add(t,n,r,a,o)).proxy){if(r=function(){var e=yn,t=Gt?function(n){return e.call(t.src,t.listener,n)}:function(n){if(!(n=e.call(t.src,t.listener,n)))return n};return t}(),n.proxy=r,r.src=e,r.listener=n,e.addEventListener)Yt||(i=a),void 0===i&&(i=!1),e.addEventListener(t.toString(),r,i);else if(e.attachEvent)e.attachEvent(dn(t.toString()),r);else{if(!e.addListener||!e.removeListener)throw Error("addEventListener and attachEvent are unavailable.");e.addListener(r)}0}}function ln(e,t,n,r,i){if(Array.isArray(t))for(var o=0;o<t.length;o++)ln(e,t[o],n,r,i);else n=bn(n),e&&e[Jt]?kn(e,t,n,v(r)?!!r.capture:!!r,i):cn(e,t,n,!0,r,i)}function fn(e,t,n,r,i){if(Array.isArray(t))for(var o=0;o<t.length;o++)fn(e,t[o],n,r,i);else r=v(r)?!!r.capture:!!r,n=bn(n),e&&e[Jt]?(e=e.v,(t=String(t).toString())in e.a&&(-1<(n=on(o=e.a[t],n,r,i))&&(tn(o[n]),Array.prototype.splice.call(o,n,1),0==o.length&&(delete e.a[t],e.b--)))):e&&(e=mn(e))&&(t=e.a[t.toString()],e=-1,t&&(e=on(t,n,r,i)),(n=-1<e?t[e]:null)&&hn(n))}function hn(e){if("number"!==typeof e&&e&&!e.va){var t=e.src;if(t&&t[Jt])rn(t.v,e);else{var n=e.type,r=e.proxy;t.removeEventListener?t.removeEventListener(n,r,e.capture):t.detachEvent?t.detachEvent(dn(n),r):t.addListener&&t.removeListener&&t.removeListener(r),(n=mn(t))?(rn(n,e),0==n.b&&(n.src=null,t[an]=null)):tn(e)}}}function dn(e){return e in sn?sn[e]:sn[e]="on"+e}function pn(e,t,n,r){var i=!0;if((e=mn(e))&&(t=e.a[t.toString()]))for(t=t.concat(),e=0;e<t.length;e++){var o=t[e];o&&o.capture==n&&!o.va&&(o=vn(o,r),i=i&&!1!==o)}return i}function vn(e,t){var n=e.listener,r=e.Ua||e.src;return e.Oa&&hn(e),n.call(r,t)}function yn(e,t){if(e.va)return!0;if(!Gt){if(!t)e:{t=["window","event"];for(var n=u,r=0;r<t.length;r++)if(null==(n=n[t[r]])){t=null;break e}t=n}if(t=new $t(r=t,this),n=!0,!(0>r.keyCode||void 0!=r.returnValue)){e:{var i=!1;if(0==r.keyCode)try{r.keyCode=-1;break e}catch(a){i=!0}(i||void 0==r.returnValue)&&(r.returnValue=!0)}for(r=[],i=t.b;i;i=i.parentNode)r.push(i);for(e=e.type,i=r.length-1;0<=i;i--){t.b=r[i];var o=pn(r[i],e,!0,t);n=n&&o}for(i=0;i<r.length;i++)t.b=r[i],o=pn(r[i],e,!1,t),n=n&&o}return n}return vn(e,new $t(t,this))}function mn(e){return(e=e[an])instanceof nn?e:null}var gn="__closure_events_fn_"+(1e9*Math.random()>>>0);function bn(e){return p(e)?e:(e[gn]||(e[gn]=function(t){return e.handleEvent(t)}),e[gn])}function _n(){Bt.call(this),this.v=new nn(this),this.$b=this,this.fb=null}function wn(e,t,n,r,i){e.v.add(String(t),n,!1,r,i)}function kn(e,t,n,r,i){e.v.add(String(t),n,!0,r,i)}function Sn(e,t,n,r){if(!(t=e.v.a[String(t)]))return!0;t=t.concat();for(var i=!0,o=0;o<t.length;++o){var a=t[o];if(a&&!a.va&&a.capture==n){var s=a.listener,u=a.Ua||a.src;a.Oa&&rn(e.v,a),i=!1!==s.call(u,r)&&i}}return i&&!r.defaultPrevented}function On(e,t,n){if(p(e))n&&(e=w(e,n));else{if(!e||"function"!=typeof e.handleEvent)throw Error("Invalid listener argument");e=w(e.handleEvent,e)}return 2147483647<Number(t)?-1:u.setTimeout(e,t||0)}function En(e){var t=null;return new bt((function(n,r){-1==(t=On((function(){n(void 0)}),e))&&r(Error("Failed to schedule timer."))})).s((function(e){throw u.clearTimeout(t),e}))}function Tn(e){if(e.V&&"function"==typeof e.V)return e.V();if("string"===typeof e)return e.split("");
2if(d(e)){for(var t=[],n=e.length,r=0;r<n;r++)t.push(e[r]);return t}for(r in t=[],n=0,e)t[n++]=e[r];return t}function Cn(e){if(e.Y&&"function"==typeof e.Y)return e.Y();if(!e.V||"function"!=typeof e.V){if(d(e)||"string"===typeof e){var t=[];e=e.length;for(var n=0;n<e;n++)t.push(n);return t}for(var r in t=[],n=0,e)t[n++]=r;return t}}function Pn(e,t){this.b={},this.a=[],this.c=0;var n=arguments.length;if(1<n){if(n%2)throw Error("Uneven number of arguments");for(var r=0;r<n;r+=2)this.set(arguments[r],arguments[r+1])}else if(e)if(e instanceof Pn)for(n=e.Y(),r=0;r<n.length;r++)this.set(n[r],e.get(n[r]));else for(r in e)this.set(r,e[r])}function xn(e){if(e.c!=e.a.length){for(var t=0,n=0;t<e.a.length;){var r=e.a[t];In(e.b,r)&&(e.a[n++]=r),t++}e.a.length=n}if(e.c!=e.a.length){var i={};for(n=t=0;t<e.a.length;)In(i,r=e.a[t])||(e.a[n++]=r,i[r]=1),t++;e.a.length=n}}function In(e,t){return Object.prototype.hasOwnProperty.call(e,t)}O(_n,Bt),_n.prototype[Jt]=!0,_n.prototype.addEventListener=function(e,t,n,r){un(this,e,t,n,r)},_n.prototype.removeEventListener=function(e,t,n,r){fn(this,e,t,n,r)},_n.prototype.dispatchEvent=function(e){var t,n=this.fb;if(n)for(t=[];n;n=n.fb)t.push(n);n=this.$b;var r=e.type||e;if("string"===typeof e)e=new Qt(e,n);else if(e instanceof Qt)e.target=e.target||n;else{var i=e;ye(e=new Qt(r,n),i)}if(i=!0,t)for(var o=t.length-1;0<=o;o--){var a=e.b=t[o];i=Sn(a,r,!0,e)&&i}if(i=Sn(a=e.b=n,r,!0,e)&&i,i=Sn(a,r,!1,e)&&i,t)for(o=0;o<t.length;o++)i=Sn(a=e.b=t[o],r,!1,e)&&i;return i},_n.prototype.Da=function(){if(_n.$a.Da.call(this),this.v){var e,t=this.v;for(e in t.a){for(var n=t.a[e],r=0;r<n.length;r++)tn(n[r]);delete t.a[e],t.b--}}this.fb=null},(n=Pn.prototype).V=function(){xn(this);for(var e=[],t=0;t<this.a.length;t++)e.push(this.b[this.a[t]]);return e},n.Y=function(){return xn(this),this.a.concat()},n.clear=function(){this.b={},this.c=this.a.length=0},n.get=function(e,t){return In(this.b,e)?this.b[e]:t},n.set=function(e,t){In(this.b,e)||(this.c++,this.a.push(e)),this.b[e]=t},n.forEach=function(e,t){for(var n=this.Y(),r=0;r<n.length;r++){var i=n[r],o=this.get(i);e.call(t,o,i,this)}};var jn=/^(?:([^:/?#.]+):)?(?:\/\/(?:([^/?#]*)@)?([^/#?]*?)(?::([0-9]+))?(?=[/\\#?]|$))?([^?#]+)?(?:\?([^#]*))?(?:#([\s\S]*))?$/;function Rn(e,t){var n;this.a=this.l=this.f="",this.g=null,this.h=this.c="",this.i=!1,e instanceof Rn?(this.i=void 0!==t?t:e.i,An(this,e.f),this.l=e.l,this.a=e.a,Mn(this,e.g),this.c=e.c,Nn(this,er(e.b)),this.h=e.h):e&&(n=String(e).match(jn))?(this.i=!!t,An(this,n[1]||"",!0),this.l=Vn(n[2]||""),this.a=Vn(n[3]||"",!0),Mn(this,n[4]),this.c=Vn(n[5]||"",!0),Nn(this,n[6]||"",!0),this.h=Vn(n[7]||"")):(this.i=!!t,this.b=new Yn(null,this.i))}function An(e,t,n){e.f=n?Vn(t,!0):t,e.f&&(e.f=e.f.replace(/:$/,""))}function Mn(e,t){if(t){if(t=Number(t),isNaN(t)||0>t)throw Error("Bad port number "+t);e.g=t}else e.g=null}function Nn(e,t,n){t instanceof Yn?(e.b=t,function(e,t){t&&!e.f&&(Qn(e),e.c=null,e.a.forEach((function(e,t){var n=t.toLowerCase();t!=n&&(Xn(this,t),Zn(this,n,e))}),e)),e.f=t}(e.b,e.i)):(n||(t=Bn(t,Gn)),e.b=new Yn(t,e.i))}function Ln(e,t,n){e.b.set(t,n)}function Dn(e,t){return e.b.get(t)}function Fn(e){return e instanceof Rn?new Rn(e):new Rn(e,void 0)}function Un(e,t,n,r){var i=new Rn(null,void 0);return e&&An(i,e),t&&(i.a=t),n&&Mn(i,n),r&&(i.c=r),i}function Vn(e,t){return e?t?decodeURI(e.replace(/%25/g,"%2525")):decodeURIComponent(e):""}function Bn(e,t,n){return"string"===typeof e?(e=encodeURI(e).replace(t,qn),n&&(e=e.replace(/%25([0-9a-fA-F]{2})/g,"%$1")),e):null}function qn(e){return"%"+((e=e.charCodeAt(0))>>4&15).toString(16)+(15&e).toString(16)}Rn.prototype.toString=function(){var e=[],t=this.f;t&&e.push(Bn(t,Wn,!0),":");var n=this.a;return(n||"file"==t)&&(e.push("//"),(t=this.l)&&e.push(Bn(t,Wn,!0),"@"),e.push(encodeURIComponent(String(n)).replace(/%25([0-9a-fA-F]{2})/g,"%$1")),null!=(n=this.g)&&e.push(":",String(n))),(n=this.c)&&(this.a&&"/"!=n.charAt(0)&&e.push("/"),e.push(Bn(n,"/"==n.charAt(0)?Hn:zn,!0))),(n=this.b.toString())&&e.push("?",n),(n=this.h)&&e.push("#",Bn(n,Kn)),e.join("")},Rn.prototype.resolve=function(e){var t=new Rn(this),n=!!e.f;n?An(t,e.f):n=!!e.l,n?t.l=e.l:n=!!e.a,n?t.a=e.a:n=null!=e.g;var r=e.c;if(n)Mn(t,e.g);else if(n=!!e.c){if("/"!=r.charAt(0))if(this.a&&!this.c)r="/"+r;else{var i=t.c.lastIndexOf("/");-1!=i&&(r=t.c.substr(0,i+1)+r)}if(".."==(i=r)||"."==i)r="";else if(se(i,"./")||se(i,"/.")){r=0==i.lastIndexOf("/",0),i=i.split("/");for(var o=[],a=0;a<i.length;){var s=i[a++];"."==s?r&&a==i.length&&o.push(""):".."==s?((1<o.length||1==o.length&&""!=o[0])&&o.pop(),r&&a==i.length&&o.push("")):(o.push(s),r=!0)}r=o.join("/")}else r=i}return n?t.c=r:n=""!==e.b.toString(),n?Nn(t,er(e.b)):n=!!e.h,n&&(t.h=e.h),t};var Wn=/[#\/\?@]/g,zn=/[#\?:]/g,Hn=/[#\?]/g,Gn=/[#\?@]/g,Kn=/#/g;function Yn(e,t){this.b=this.a=null,this.c=e||null,this.f=!!t}function Qn(e){e.a||(e.a=new Pn,e.b=0,e.c&&function(e,t){if(e){e=e.split("&");for(var n=0;n<e.length;n++){var r=e[n].indexOf("="),i=null;if(0<=r){var o=e[n].substring(0,r);i=e[n].substring(r+1)}else o=e[n];t(o,i?decodeURIComponent(i.replace(/\+/g," ")):"")}}}(e.c,(function(t,n){e.add(decodeURIComponent(t.replace(/\+/g," ")),n)})))}function $n(e){var t=Cn(e);
2if("undefined"==typeof t)throw Error("Keys are undefined");var n=new Yn(null,void 0);e=Tn(e);for(var r=0;r<t.length;r++){var i=t[r],o=e[r];Array.isArray(o)?Zn(n,i,o):n.add(i,o)}return n}function Xn(e,t){Qn(e),t=tr(e,t),In(e.a.b,t)&&(e.c=null,e.b-=e.a.get(t).length,In((e=e.a).b,t)&&(delete e.b[t],e.c--,e.a.length>2*e.c&&xn(e)))}function Jn(e,t){return Qn(e),t=tr(e,t),In(e.a.b,t)}function Zn(e,t,n){Xn(e,t),0<n.length&&(e.c=null,e.a.set(tr(e,t),X(n)),e.b+=n.length)}function er(e){var t=new Yn;return t.c=e.c,e.a&&(t.a=new Pn(e.a),t.b=e.b),t}function tr(e,t){return t=String(t),e.f&&(t=t.toLowerCase()),t}function nr(e){var t=[];return ir(new rr,e,t),t.join("")}function rr(){}function ir(e,t,n){if(null==t)n.push("null");else{if("object"==typeof t){if(Array.isArray(t)){var r=t;t=r.length,n.push("[");for(var i="",o=0;o<t;o++)n.push(i),ir(e,r[o],n),i=",";return void n.push("]")}if(!(t instanceof String||t instanceof Number||t instanceof Boolean)){for(r in n.push("{"),i="",t)Object.prototype.hasOwnProperty.call(t,r)&&("function"!=typeof(o=t[r])&&(n.push(i),sr(r,n),n.push(":"),ir(e,o,n),i=","));return void n.push("}")}t=t.valueOf()}switch(typeof t){case"string":sr(t,n);break;case"number":n.push(isFinite(t)&&!isNaN(t)?String(t):"null");break;case"boolean":n.push(String(t));break;case"function":n.push("null");break;default:throw Error("Unknown type: "+typeof t)}}}(n=Yn.prototype).add=function(e,t){Qn(this),this.c=null,e=tr(this,e);var n=this.a.get(e);return n||this.a.set(e,n=[]),n.push(t),this.b+=1,this},n.clear=function(){this.a=this.c=null,this.b=0},n.forEach=function(e,t){Qn(this),this.a.forEach((function(n,r){W(n,(function(n){e.call(t,n,r,this)}),this)}),this)},n.Y=function(){Qn(this);for(var e=this.a.V(),t=this.a.Y(),n=[],r=0;r<t.length;r++)for(var i=e[r],o=0;o<i.length;o++)n.push(t[r]);return n},n.V=function(e){Qn(this);var t=[];if("string"===typeof e)Jn(this,e)&&(t=$(t,this.a.get(tr(this,e))));else{e=this.a.V();for(var n=0;n<e.length;n++)t=$(t,e[n])}return t},n.set=function(e,t){return Qn(this),this.c=null,Jn(this,e=tr(this,e))&&(this.b-=this.a.get(e).length),this.a.set(e,[t]),this.b+=1,this},n.get=function(e,t){return e&&0<(e=this.V(e)).length?String(e[0]):t},n.toString=function(){if(this.c)return this.c;if(!this.a)return"";for(var e=[],t=this.a.Y(),n=0;n<t.length;n++){var r=t[n],i=encodeURIComponent(String(r));r=this.V(r);for(var o=0;o<r.length;o++){var a=i;""!==r[o]&&(a+="="+encodeURIComponent(String(r[o]))),e.push(a)}}return this.c=e.join("&")};var or={'"':'\\"',"\\":"\\\\","/":"\\/","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r","\t":"\\t","\v":"\\u000b"},ar=/\uffff/.test("\uffff")?/[\\"\x00-\x1f\x7f-\uffff]/g:/[\\"\x00-\x1f\x7f-\xff]/g;function sr(e,t){t.push('"',e.replace(ar,(function(e){var t=or[e];return t||(t="\\u"+(65536|e.charCodeAt(0)).toString(16).substr(1),or[e]=t),t})),'"')}function ur(){var e=Pr();return Ge&&!!tt&&11==tt||/Edge\/\d+/.test(e)}function cr(){return u.window&&u.window.location.href||self&&self.location&&self.location.href||""}function lr(e,t){t=t||u.window;var n="about:blank";e&&(n=je(Ae(e))),t.location.href=n}function fr(e,t){var n,r=[];for(n in e)n in t?typeof e[n]!=typeof t[n]?r.push(n):"object"==typeof e[n]&&null!=e[n]&&null!=t[n]?0<fr(e[n],t[n]).length&&r.push(n):e[n]!==t[n]&&r.push(n):r.push(n);for(n in t)n in e||r.push(n);return r}function hr(e){return!!((e=(e||Pr()).toLowerCase()).match(/android/)||e.match(/webos/)||e.match(/iphone|ipad|ipod/)||e.match(/blackberry/)||e.match(/windows phone/)||e.match(/iemobile/))}function dr(e){e=e||u.window;try{e.close()}catch(t){}}function pr(e,t,n){var r=Math.floor(1e9*Math.random()).toString();t=t||500,n=n||600;var i=(window.screen.availHeight-n)/2,o=(window.screen.availWidth-t)/2;for(a in t={width:t,height:n,top:0<i?i:0,left:0<o?o:0,location:!0,resizable:!0,statusbar:!0,toolbar:!1},n=Pr().toLowerCase(),r&&(t.target=r,se(n,"crios/")&&(t.target="_blank")),Er(Pr())==Sr&&(e=e||"http://localhost",t.scrollbars=!0),n=e||"",(e=t)||(e={}),r=window,t=n instanceof Ie?n:Ae("undefined"!=typeof n.href?n.href:String(n)),n=e.target||n.target,i=[],e)switch(a){case"width":case"height":case"top":case"left":i.push(a+"="+e[a]);break;case"target":case"noopener":case"noreferrer":break;default:i.push(a+"="+(e[a]?1:0))}var a=i.join(",");if((fe("iPhone")&&!fe("iPod")&&!fe("iPad")||fe("iPad")||fe("iPod"))&&r.navigator&&r.navigator.standalone&&n&&"_self"!=n?(me(a=ft(document,"A"),"HTMLAnchorElement"),t instanceof Ie||t instanceof Ie||(t="object"==typeof t&&t.sa?t.ra():String(t),Re.test(t)||(t="about:invalid#zClosurez"),t=new Ie(Ne,t)),a.href=je(t),a.setAttribute("target",n),e.noreferrer&&a.setAttribute("rel","noreferrer"),(e=document.createEvent("MouseEvent")).initMouseEvent("click",!0,!0,r,1),a.dispatchEvent(e),a={}):e.noreferrer?(a=r.open("",n,a),e=je(t),a&&(Ye&&se(e,";")&&(e="'"+e.replace(/'/g,"%27")+"'"),a.opener=null,e=Ue('<meta name="referrer" content="no-referrer"><meta http-equiv="refresh" content="0; url='+qe(e)+'">'),r=a.document)&&(r.write(De(e)),r.close())):(a=r.open(je(t),n,a))&&e.noopener&&(a.opener=null),a)try{a.focus()}catch(s){}return a}var vr=/^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/,yr=/^[^@]+@[^@]+$/;function mr(){var e=null;return new bt((function(t){"complete"==u.document.readyState?t():(e=function(){t()},ln(window,"load",e))})).s((function(t){throw fn(window,"load",e),t}))}function gr(e){return e=e||Pr(),!("file:"!==Ar()&&"ionic:"!==Ar()||!e.toLowerCase().match(/iphone|ipad|ipod|android/))}function br(){var e=u.window;try{return!(!e||e==e.top)}catch(t){return!1}}function _r(){return"undefined"!==typeof u.WorkerGlobalScope&&"function"===typeof u.importScripts}function wr(){return t.a.INTERNAL.hasOwnProperty("reactNative")?"ReactNative":t.a.INTERNAL.hasOwnProperty("node")?"Node":_r()?"Worker":"Browser"}function kr(){var e=wr();return"ReactNative"===e||"Node"===e}var Sr="Firefox",Or="Chrome";function Er(e){var t=e.toLowerCase();return se(t,"opera/")||se(t,"opr/")||se(t,"opios/")?"Opera":se(t,"iemobile")?"IEMobile":se(t,"msie")||se(t,"trident/")?"IE":se(t,"edge/")?"Edge":se(t,"firefox/")?Sr:se(t,"silk/")?"Silk":se(t,"blackberry")?"Blackberry":se(t,"webos")?"Webos":!se(t,"safari/")||se(t,"chrome/")||se(t,"crios/")||se(t,"android")?!se(t,"chrome/")&&!se(t,"crios/")||se(t,"edge/")?se(t,"android")?"Android":(e=e.match(/([a-zA-Z\d\.]+)\/[a-zA-Z\d\.]*$/))&&2==e.length?e[1]:"Other":Or:"Safari"}var Tr={ld:"FirebaseCore-web",nd:"FirebaseUI-web"};function Cr(e,t){t=t||[];var n,r=[],i={};for(n in Tr)i[Tr[n]]=!0;for(n=0;n<t.length;n++)"undefined"!==typeof i[t[n]]&&(delete i[t[n]],r.push(t[n]));return r.sort(),(t=r).length||(t=["FirebaseCore-web"]),"Browser"===(r=wr())?r=Er(i=Pr()):"Worker"===r&&(r=Er(i=Pr())+"-"+r),r+"/JsCore/"+e+"/"+t.join(",")}function Pr(){return u.navigator&&u.navigator.userAgent||""}function xr(e,t){e=e.split("."),t=t||u;for(var n=0;n<e.length&&"object"==typeof t&&null!=t;n++)t=t[e[n]];return n!=e.length&&(t=void 0),t}function Ir(){try{var e=u.localStorage,t=Fr();if(e)return e.setItem(t,"1"),e.removeItem(t),!ur()||!!u.indexedDB}catch(n){return _r()&&!!u.indexedDB}return!1}function jr(){return(Rr()||"chrome-extension:"===Ar()||gr())&&!kr()&&Ir()&&!_r()}function Rr(){return"http:"===Ar()||"https:"===Ar()}function Ar(){return u.location&&u.location.protocol||null}function Mr(e){return!hr(e=e||Pr())&&Er(e)!=Sr}function Nr(e){return"undefined"===typeof e?null:nr(e)}function Lr(e){var t,n={};for(t in e)e.hasOwnProperty(t)&&null!==e[t]&&void 0!==e[t]&&(n[t]=e[t]);return n}function Dr(e){if(null!==e)return JSON.parse(e)}function Fr(e){return e||Math.floor(1e9*Math.random()).toString()}function Ur(e){return"Safari"!=Er(e=e||Pr())&&!e.toLowerCase().match(/iphone|ipad|ipod/)}function Vr(){var e=u.___jsl;if(e&&e.H)for(var t in e.H)if(e.H[t].r=e.H[t].r||[],e.H[t].L=e.H[t].L||[],e.H[t].r=e.H[t].L.concat(),e.CP)for(var n=0;n<e.CP.length;n++)e.CP[n]=null}function Br(e,t){if(e>
2t)throw Error("Short delay should be less than long delay!");this.a=e,this.c=t,e=Pr(),t=wr(),this.b=hr(e)||"ReactNative"===t}function qr(){var e=u.document;return!e||"undefined"===typeof e.visibilityState||"visible"==e.visibilityState}function Wr(e){"undefined"!==typeof console&&"function"===typeof console.warn&&console.warn(e)}function zr(e){try{var t=new Date(parseInt(e,10));if(!isNaN(t.getTime())&&!/[^0-9]/.test(e))return t.toUTCString()}catch(n){}return null}function Hr(){return!(!xr("fireauth.oauthhelper",u)&&!xr("fireauth.iframe",u))}Br.prototype.get=function(){var e=u.navigator;return!e||"boolean"!==typeof e.onLine||!Rr()&&"chrome-extension:"!==Ar()&&"undefined"===typeof e.connection||e.onLine?this.b?this.c:this.a:Math.min(5e3,this.a)};var Gr,Kr={};function Yr(e){Kr[e]||(Kr[e]=!0,Wr(e))}try{var Qr={};Object.defineProperty(Qr,"abcd",{configurable:!0,enumerable:!0,value:1}),Object.defineProperty(Qr,"abcd",{configurable:!0,enumerable:!0,value:2}),Gr=2==Qr.abcd}catch(la){Gr=!1}function $r(e,t,n){Gr?Object.defineProperty(e,t,{configurable:!0,enumerable:!0,value:n}):e[t]=n}function Xr(e,t){if(t)for(var n in t)t.hasOwnProperty(n)&&$r(e,n,t[n])}function Jr(e){var t={};return Xr(t,e),t}function Zr(e){var t=e;if("object"==typeof e&&null!=e)for(var n in t="length"in e?[]:{},e)$r(t,n,Zr(e[n]));return t}function ei(e){var t=e&&(e[oi]?"phone":null);if(!(t&&e&&e[ii]))throw new E("internal-error","Internal assert: invalid MultiFactorInfo object");$r(this,"uid",e[ii]),$r(this,"displayName",e[ni]||null);var n=null;e[ri]&&(n=new Date(e[ri]).toUTCString()),$r(this,"enrollmentTime",n),$r(this,"factorId",t)}function ti(e){try{var t=new ai(e)}catch(n){t=null}return t}ei.prototype.w=function(){return{uid:this.uid,displayName:this.displayName,factorId:this.factorId,enrollmentTime:this.enrollmentTime}};var ni="displayName",ri="enrolledAt",ii="mfaEnrollmentId",oi="phoneInfo";function ai(e){ei.call(this,e),$r(this,"phoneNumber",e[oi])}function si(e){var t={},n=e[fi],r=e[di],i=e[pi];if(e=ti(e[hi]),!i||i!=ci&&i!=li&&!n||i==li&&!r||i==ui&&!e)throw Error("Invalid checkActionCode response!");i==li?(t[yi]=n||null,t[gi]=n||null,t[vi]=r):(t[yi]=r||null,t[gi]=r||null,t[vi]=n||null),t[mi]=e||null,$r(this,_i,i),$r(this,bi,Zr(t))}O(ai,ei),ai.prototype.w=function(){var e=ai.$a.w.call(this);return e.phoneNumber=this.phoneNumber,e};var ui="REVERT_SECOND_FACTOR_ADDITION",ci="EMAIL_SIGNIN",li="VERIFY_AND_CHANGE_EMAIL",fi="email",hi="mfaInfo",di="newEmail",pi="requestType",vi="email",yi="fromEmail",mi="multiFactorInfo",gi="previousEmail",bi="data",_i="operation";function wi(e){var t=Dn(e=Fn(e),ki)||null,n=Dn(e,Si)||null,r=Dn(e,Ti)||null;if(r=r&&Pi[r]||null,!t||!n||!r)throw new E("argument-error",ki+", "+Si+"and "+Ti+" are required in a valid action code URL.");Xr(this,{apiKey:t,operation:r,code:n,continueUrl:Dn(e,Oi)||null,languageCode:Dn(e,Ei)||null,tenantId:Dn(e,Ci)||null})}var ki="apiKey",Si="oobCode",Oi="continueUrl",Ei="languageCode",Ti="mode",Ci="tenantId",Pi={recoverEmail:"RECOVER_EMAIL",resetPassword:"PASSWORD_RESET",revertSecondFactorAddition:ui,signIn:ci,verifyAndChangeEmail:li,verifyEmail:"VERIFY_EMAIL"};function xi(e){try{return new wi(e)}catch(t){return null}}function Ii(e){var t=e[Ni];if("undefined"===typeof t)throw new E("missing-continue-uri");if("string"!==typeof t||"string"===typeof t&&!t.length)throw new E("invalid-continue-uri");this.h=t,this.b=this.a=null,this.g=!1;var n=e[ji];if(n&&"object"===typeof n){t=n[Fi];var r=n[Li];if(n=n[Di],"string"===typeof t&&t.length){if(this.a=t,"undefined"!==typeof r&&"boolean"!==typeof r)throw new E("argument-error",Li+" property must be a boolean when specified.");if(this.g=!!r,"undefined"!==typeof n&&("string"!==typeof n||"string"===typeof n&&!n.length))throw new E("argument-error",Di+" property must be a non empty string when specified.");this.b=n||null}else{if("undefined"!==typeof t)throw new E("argument-error",Fi+" property must be a non empty string when specified.");if("undefined"!==typeof r||"undefined"!==typeof n)throw new E("missing-android-pkg-name")}}else if("undefined"!==typeof n)throw new E("argument-error",ji+" property must be a non null object when specified.");if(this.f=null,(t=e[Mi])&&"object"===typeof t){if("string"===typeof(t=t[Ui])&&t.length)this.f=t;else if("undefined"!==typeof t)throw new E("argument-error",Ui+" property must be a non empty string when specified.")}else if("undefined"!==typeof t)throw new E("argument-error",Mi+" property must be a non null object when specified.");if("undefined"!==typeof(t=e[Ai])&&"boolean"!==typeof t)throw new E("argument-error",Ai+" property must be a boolean when specified.");if(this.c=!!t,"undefined"!==typeof(e=e[Ri])&&("string"!==typeof e||"string"===typeof e&&!e.length))throw new E("argument-error",Ri+" property must be a non empty string when specified.");this.i=e||null}var ji="android",Ri="dynamicLinkDomain",Ai="handleCodeInApp",Mi="iOS",Ni="url",Li="installApp",Di="minimumVersion",Fi="packageName",Ui="bundleId";function Vi(e){var t={};for(var n in t.continueUrl=e.h,t.canHandleCodeInApp=e.c,(t.androidPackageName=e.a)&&(t.androidMinimumVersion=e.b,t.androidInstallApp=e.g),t.iOSBundleId=e.f,t.dynamicLinkDomain=e.i,t)null===t[n]&&delete t[n];return t}var Bi=null;function qi(e){var t="";return function(e,t){function n(t){for(;r<e.length;){var n=e.charAt(r++),i=Bi[n];if(null!=i)return i;if(!/^[\s\xa0]*$/.test(n))throw Error("Unknown base64 encoding at char: "+n)}return t}!function(){if(!Bi){Bi={};for(var e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789".split(""),t=["+/=","+/","-_=","-_.","-_"],n=0;5>n;n++)for(var r=e.concat(t[n].split("")),i=0;i<r.length;i++){var o=r[i];void 0===Bi[o]&&(Bi[o]=i)}}}();for(var r=0;;){var i=n(-1),o=n(0),a=n(64),s=n(64);if(64===s&&-1===i)break;t(i<<2|o>>4),64!=a&&(t(o<<4&240|a>>2),64!=s&&t(a<<6&192|s))}}(e,(function(e){t+=String.fromCharCode(e)})),t}function Wi(e){var t=Hi(e);if(!(t&&t.sub&&t.iss&&t.aud&&t.exp))throw Error("Invalid JWT");this.g=e,this.c=t.exp,this.h=t.sub,S(),this.a=t.provider_id||t.firebase&&t.firebase.sign_in_provider||null,this.f=t.firebase&&t.firebase.tenant||null,this.b=!!t.is_anonymous||"anonymous"==this.a}function zi(e){try{return new Wi(e)}catch(t){return null}}function Hi(e){if(!e)return null;if(3!=(e=e.split(".")).length)return null;for(var t=(4-(e=e[1]).length%4)%4,n=0;n<t;n++)e+=".";try{return JSON.parse(qi(e))}catch(r){}return null}Wi.prototype.S=function(){return this.f},Wi.prototype.i=function(){return this.b},Wi.prototype.toString=function(){return this.g};var Gi="oauth_consumer_key oauth_nonce oauth_signature oauth_signature_method oauth_timestamp oauth_token oauth_version".split(" "),Ki=["client_id","response_type","scope","redirect_uri","state"],Yi={md:{Ja:"locale",ua:700,ta:600,fa:"facebook.com",Wa:Ki},od:{Ja:null,ua:500,ta:750,fa:"github.com",Wa:Ki},pd:{Ja:"hl",ua:515,ta:680,fa:"google.com",Wa:Ki},vd:{Ja:"lang",ua:485,ta:705,fa:"twitter.com",Wa:Gi},jd:{Ja:"locale",ua:640,ta:600,fa:"apple.com",Wa:[]}};function Qi(e){for(var t in Yi)if(Yi[t].fa==e)return Yi[t];return null}function $i(e){var t={};t["facebook.com"]=to,t["google.com"]=ro,t["github.com"]=no,t["twitter.com"]=io;var n=e&&e[Ji];try{if(n)return t[n]?new t[n](e):new eo(e);if("undefined"!==typeof e[Xi])return new Zi(e)}catch(r){}return null}var Xi="idToken",Ji="providerId";function Zi(e){var t=e[Ji];if(!t&&e[Xi]){var n=zi(e[Xi]);n&&n.a&&(t=n.a)}if(!t)throw Error("Invalid additional user info!");"anonymous"!=t&&"custom"!=t||(t=null),n=!1,"undefined"!==typeof e.isNewUser?n=!!e.isNewUser:"identitytoolkit#SignupNewUserResponse"===e.kind&&(n=!0),$r(this,"providerId",t),$r(this,"isNewUser",n)}function eo(e){Zi.call(this,e),$r(this,"profile",Zr((e=Dr(e.rawUserInfo||"{}"))||{}))}function to(e){if(eo.call(this,e),"facebook.com"!=this.providerId)throw Error("Invalid provider ID!")}function no(e){if(eo.call(this,e),"github.com"!=this.providerId)throw Error("Invalid provider ID!");$r(this,"username",this.profile&&this.profile.login||null)}function ro(e){if(eo.call(this,e),"google.com"!=this.providerId)throw Error("Invalid provider ID!")}function io(e){if(eo.call(this,e),"twitter.com"!=this.providerId)throw Error("Invalid provider ID!");$r(this,"username",e.screenName||null)}function oo(e){var t=Fn(e),n=Dn(t,"link"),r=Dn(Fn(n),"link");return t=Dn(t,"deep_link_id"),Dn(Fn(t),"link")||t||r||n||e}function ao(e,t){if(!e&&!t)throw new E("internal-error","Internal assert: no raw session string available");if(e&&t)throw new E("internal-error","Internal assert: unable to determine the session type");this.a=e||null,this.b=t||null,this.type=this.a?so:uo}O(eo,Zi),O(to,eo),O(no,eo),O(ro,eo),O(io,eo);var so="enroll",uo="signin";function co(){}function lo(e,t){return e.then((function(e){if(e[es]){var n=zi(e[es]);if(!n||t!=n.h)throw new E("user-mismatch");return e}throw new E("user-mismatch")})).s((function(e){throw e&&e.code&&e.code==P+"user-not-found"?new E("user-mismatch"):e}))}function fo(e,t){if(!t)throw new E("internal-error","failed to construct a credential");this.a=t,$r(this,"providerId",e),$r(this,"signInMethod",e)}function ho(e){return{pendingToken:e.a,requestUri:"http://localhost"}}function po(e){if(e&&e.providerId&&e.signInMethod&&0==e.providerId.indexOf("saml.")&&e.pendingToken)try{return new fo(e.providerId,e.pendingToken)}catch(t){}return null}function vo(e,t,n){if(this.a=null,t.idToken||t.accessToken)t.idToken&&$r(this,"idToken",t.idToken),t.accessToken&&$r(this,"accessToken",t.accessToken),t.nonce&&!t.pen
2dingToken&&$r(this,"nonce",t.nonce),t.pendingToken&&(this.a=t.pendingToken);else{if(!t.oauthToken||!t.oauthTokenSecret)throw new E("internal-error","failed to construct a credential");$r(this,"accessToken",t.oauthToken),$r(this,"secret",t.oauthTokenSecret)}$r(this,"providerId",e),$r(this,"signInMethod",n)}function yo(e){var t={};return e.idToken&&(t.id_token=e.idToken),e.accessToken&&(t.access_token=e.accessToken),e.secret&&(t.oauth_token_secret=e.secret),t.providerId=e.providerId,e.nonce&&!e.a&&(t.nonce=e.nonce),t={postBody:$n(t).toString(),requestUri:"http://localhost"},e.a&&(delete t.postBody,t.pendingToken=e.a),t}function mo(e){if(e&&e.providerId&&e.signInMethod){var t={idToken:e.oauthIdToken,accessToken:e.oauthTokenSecret?null:e.oauthAccessToken,oauthTokenSecret:e.oauthTokenSecret,oauthToken:e.oauthTokenSecret&&e.oauthAccessToken,nonce:e.nonce,pendingToken:e.pendingToken};try{return new vo(e.providerId,t,e.signInMethod)}catch(n){}}return null}function go(e,t){this.Pc=t||[],Xr(this,{providerId:e,isOAuthProvider:!0}),this.Hb={},this.ob=(Qi(e)||{}).Ja||null,this.nb=null}function bo(e){if("string"!==typeof e||0!=e.indexOf("saml."))throw new E("argument-error",'SAML provider IDs must be prefixed with "saml."');go.call(this,e,[])}function _o(e){go.call(this,e,Ki),this.a=[]}function wo(){_o.call(this,"facebook.com")}function ko(e){if(!e)throw new E("argument-error","credential failed: expected 1 argument (the OAuth access token).");var t=e;return v(e)&&(t=e.accessToken),(new wo).credential({accessToken:t})}function So(){_o.call(this,"github.com")}function Oo(e){if(!e)throw new E("argument-error","credential failed: expected 1 argument (the OAuth access token).");var t=e;return v(e)&&(t=e.accessToken),(new So).credential({accessToken:t})}function Eo(){_o.call(this,"google.com"),this.Ca("profile")}function To(e,t){var n=e;return v(e)&&(n=e.idToken,t=e.accessToken),(new Eo).credential({idToken:n,accessToken:t})}function Co(){go.call(this,"twitter.com",Gi)}function Po(e,t){var n=e;if(v(n)||(n={oauthToken:e,oauthTokenSecret:t}),!n.oauthToken||!n.oauthTokenSecret)throw new E("argument-error","credential failed: expected 2 arguments (the OAuth access token and secret).");return new vo("twitter.com",n,"twitter.com")}function xo(e,t,n){this.a=e,this.f=t,$r(this,"providerId","password"),$r(this,"signInMethod",n===jo.EMAIL_LINK_SIGN_IN_METHOD?jo.EMAIL_LINK_SIGN_IN_METHOD:jo.EMAIL_PASSWORD_SIGN_IN_METHOD)}function Io(e){return e&&e.email&&e.password?new xo(e.email,e.password,e.signInMethod):null}function jo(){Xr(this,{providerId:"password",isOAuthProvider:!1})}function Ro(e,t){if(!(t=Ao(t)))throw new E("argument-error","Invalid email link!");return new xo(e,t.code,jo.EMAIL_LINK_SIGN_IN_METHOD)}function Ao(e){return(e=xi(e=oo(e)))&&e.operation===ci?e:null}function Mo(e){if(!(e.cb&&e.bb||e.La&&e.ea))throw new E("internal-error");this.a=e,$r(this,"providerId","phone"),this.fa="phone",$r(this,"signInMethod","phone")}function No(e){if(e&&"phone"===e.providerId&&(e.verificationId&&e.verificationCode||e.temporaryProof&&e.phoneNumber)){var t={};return W(["verificationId","verificationCode","temporaryProof","phoneNumber"],(function(n){e[n]&&(t[n]=e[n])})),new Mo(t)}return null}function Lo(e){return e.a.La&&e.a.ea?{temporaryProof:e.a.La,phoneNumber:e.a.ea}:{sessionInfo:e.a.cb,code:e.a.bb}}function Do(e){try{this.a=e||t.a.auth()}catch(n){throw new E("argument-error","Either an instance of firebase.auth.Auth must be passed as an argument to the firebase.auth.PhoneAuthProvider constructor, or the default firebase App instance must be initialized via firebase.initializeApp().")}Xr(this,{providerId:"phone",isOAuthProvider:!1})}function Fo(e,t){if(!e)throw new E("missing-verification-id");if(!t)throw new E("missing-verification-code");return new Mo({cb:e,bb:t})}function Uo(e){if(e.temporaryProof&&e.phoneNumber)return new Mo({La:e.temporaryProof,ea:e.phoneNumber});var t=e&&e.providerId;if(!t||"password"===t)return null;var n=e&&e.oauthAccessToken,r=e&&e.oauthTokenSecret,i=e&&e.nonce,o=e&&e.oauthIdToken,a=e&&e.pendingToken;try{switch(t){case"google.com":return To(o,n);case"facebook.com":return ko(n);case"github.com":return Oo(n);case"twitter.com":return Po(n,r);default:return n||r||o||a?a?0==t.indexOf("saml.")?new fo(t,a):new vo(t,{pendingToken:a,idToken:e.oauthIdToken,accessToken:e.oauthAccessToken},t):new _o(t).credential({idToken:o,accessToken:n,rawNonce:i}):null}}catch(s){return null}}function Vo(e){if(!e.isOAuthProvider)throw new E("invalid-oauth-provider")}function Bo(e,t,n,r,i,o,a){if(this.c=e,this.b=t||null,this.g=n||null,this.f=r||null,this.i=o||null,this.h=a||null,this.a=i||null,!this.g&&!this.a)throw new E("invalid-auth-event");
2if(this.g&&this.a)throw new E("invalid-auth-event");if(this.g&&!this.f)throw new E("invalid-auth-event")}function qo(e){return(e=e||{}).type?new Bo(e.type,e.eventId,e.urlResponse,e.sessionId,e.error&&T(e.error),e.postBody,e.tenantId):null}function Wo(){this.b=null,this.a=[]}ao.prototype.Ha=function(){return this.a?Tt(this.a):Tt(this.b)},ao.prototype.w=function(){return this.type==so?{multiFactorSession:{idToken:this.a}}:{multiFactorSession:{pendingCredential:this.b}}},co.prototype.ja=function(){},co.prototype.b=function(){},co.prototype.c=function(){},co.prototype.w=function(){},fo.prototype.ja=function(e){return ks(e,ho(this))},fo.prototype.b=function(e,t){var n=ho(this);return n.idToken=t,Ss(e,n)},fo.prototype.c=function(e,t){return lo(Os(e,ho(this)),t)},fo.prototype.w=function(){return{providerId:this.providerId,signInMethod:this.signInMethod,pendingToken:this.a}},vo.prototype.ja=function(e){return ks(e,yo(this))},vo.prototype.b=function(e,t){var n=yo(this);return n.idToken=t,Ss(e,n)},vo.prototype.c=function(e,t){return lo(Os(e,yo(this)),t)},vo.prototype.w=function(){var e={providerId:this.providerId,sign
2InMethod:this.signInMethod};return this.idToken&&(e.oauthIdToken=this.idToken),this.accessToken&&(e.oauthAccessToken=this.accessToken),this.secret&&(e.oauthTokenSecret=this.secret),this.nonce&&(e.nonce=this.nonce),this.a&&(e.pendingToken=this.a),e},go.prototype.Ka=function(e){return this.Hb=pe(e),this},O(bo,go),O(_o,go),_o.prototype.Ca=function(e){return K(this.a,e)||this.a.push(e),this},_o.prototype.Pb=function(){return X(this.a)},_o.prototype.credential=function(e,t){var n;if(!(n=v(e)?{idToken:e.idToken||null,accessToken:e.accessToken||null,nonce:e.rawNonce||null}:{idToken:e||null,accessToken:t||null}).idToken&&!n.accessToken)throw new E("argument-error","credential failed: must provide the ID token and/or the access token.");return new vo(this.providerId,n,this.providerId)},O(wo,_o),$r(wo,"PROVIDER_ID","facebook.com"),$r(wo,"FACEBOOK_SIGN_IN_METHOD","facebook.com"),O(So,_o),$r(So,"PROVIDER_ID","github.com"),$r(So,"GITHUB_SIGN_IN_METHOD","github.com"),O(Eo,_o),$r(Eo,"PROVIDER_ID","google.com"),$r(Eo,"GOOGLE_SIGN_IN_METHOD","google.com"),O(Co,go),$r(Co,"PROVIDER_ID","twitter.com"),$r(Co,"TWITTER_SIGN_IN_METHOD","twitter.com"),xo.prototype.ja=function(e){return this.signInMethod==jo.EMAIL_LINK_SIGN_IN_METHOD?ou(e,Rs,{email:this.a,oobCode:this.f}):ou(e,eu,{email:this.a,password:this.f})},xo.prototype.b=function(e,t){return this.signInMethod==jo.EMAIL_LINK_SIGN_IN_METHOD?ou(e,As,{idToken:t,email:this.a,oobCode:this.f}):ou(e,Gs,{idToken:t,email:this.a,password:this.f})},xo.prototype.c=function(e,t){return lo(this.ja(e),t)},xo.prototype.w=function(){return{email:this.a,password:this.f,signInMethod:this.signInMethod}},Xr(jo,{PROVIDER_ID:"password"}),Xr(jo,{EMAIL_LINK_SIGN_IN_METHOD:"emailLink"}),Xr(jo,{EMAIL_PASSWORD_SIGN_IN_METHOD:"password"}),Mo.prototype.ja=function(e){return e.eb(Lo(this))},Mo.prototype.b=function(e,t){var n=Lo(this);return n.idToken=t,ou(e,nu,n)},Mo.prototype.c=function(e,t){var n=Lo(this);return n.operation="REAUTH",lo(e=ou(e,ru,n),t)},Mo.prototype.w=function(){var e={providerId:"phone"};return this.a.cb&&(e.verificationId=this.a.cb),this.a.bb&&(e.verificationCode=this.a.bb),this.a.La&&(e.temporaryProof=this.a.La),this.a.ea&&(e.phoneNumber=this.a.ea),e},Do.prototype.eb=function(e,t){var n=this.a.a;return Tt(t.verify()).then((function(r){if("string"!==typeof r)throw new E("argument-error","An implementation of firebase.auth.ApplicationVerifier.prototype.verify() must return a firebase.Promise that resolves with a string.");switch(t.type){case"recaptcha":var i=v(e)?e.session:null,o=v(e)?e.phoneNumber:e;return(i&&i.type==so?i.Ha().then((function(e){return function(e,t){return ou(e,Ys,t).then((function(e){return e.phoneSessionInfo.sessionInfo}))}(n,{idToken:e,phoneEnrollmentInfo:{phoneNumber:o,recaptchaToken:r}})})):i&&i.type==uo?i.Ha().then((function(t){return function(e,t){return ou(e,Qs,t).then((function(e){return e.phoneResponseInfo.sessionInfo}))}(n,{mfaPendingCredential:t,mfaEnrollmentId:e.multiFactorHint&&e.multiFactorHint.uid||e.multiFactorUid,phoneSignInInfo:{recaptchaToken:r}})})):function(e,t){return ou(e,zs,t)}(n,{phoneNumber:o,recaptchaToken:r})).then((function(e){return"function"===typeof t.reset&&t.reset(),e}),(function(e){throw"function"===typeof t.reset&&t.reset(),e}));default:throw new E("argument-error",'Only firebase.auth.ApplicationVerifiers with type="recaptcha" are currently supported.')}}))},Xr(Do,{PROVIDER_ID:"phone"}),Xr(Do,{PHONE_SIGN_IN_METHOD:"phone"}),Bo.prototype.getUid=function(){var e=[];return e.push(this.c),this.b&&e.push(this.b),this.f&&e.push(this.f),this.h&&e.push(this.h),e.join("-")},Bo.prototype.S=function(){return this.h},Bo.prototype.w=function(){return{type:this.c,eventId:this.b,urlResponse:this.g,sessionId:this.f,postBody:this.i,tenantId:this.h,error:this.a&&this.a.w()}};var zo,Ho=null;function Go(e){var t="unauthorized-domain",n=void 0,r=Fn(e);e=r.a,"chrome-extension"==(r=r.f)?n=Be("This chrome extension ID (chrome-extension://%s) is not authorized to run this operation. Add it to the OAuth redirect domains list in the Firebase console -> Auth section -> Sign in method tab.",e):"http"==r||"https"==r?n=Be("This domain (%s) is not authorized to run this operation. Add it to the OAuth redirect domains list in the Firebase console -> Auth section -> Sign in method tab.",e):t="operation-not-supported-in-this-environment",E.call(this,t,n)}function Ko(e,t,n){E.call(this,e,n),(e=t||{}).Ib&&$r(this,"email",e.Ib),e.ea&&$r(this,"phoneNumber",e.ea),e.credential&&$r(this,"credential",e.credential),e.Yb&&$r(this,"tenantId",e.Yb)}function Yo(e){if(e.code){var t=e.code||"";
20==t.indexOf(P)&&(t=t.substring(P.length));var n={credential:Uo(e),Yb:e.tenantId};if(e.email)n.Ib=e.email;else if(e.phoneNumber)n.ea=e.phoneNumber;else if(!n.credential)return new E(t,e.message||void 0);return new Ko(t,n,e.message)}return null}function Qo(){}function $o(e){return e.c||(e.c=e.b())}function Xo(){}function Jo(e){if(!e.f&&"undefined"==typeof XMLHttpRequest&&"undefined"!=typeof ActiveXObject){for(var t=["MSXML2.XMLHTTP.6.0","MSXML2.XMLHTTP.3.0","MSXML2.XMLHTTP","Microsoft.XMLHTTP"],n=0;n<t.length;n++){var r=t[n];try{return new ActiveXObject(r),e.f=r}catch(i){}}throw Error("Could not create ActiveXObject. ActiveX might be disabled, or MSXML might not be installed")}return e.f}function Zo(){}function ea(){this.a=new XDomainRequest,this.readyState=0,this.onreadystatechange=null,this.responseType=this.responseText=this.response="",this.status=-1,this.statusText="",this.a.onload=w(this.pc,this),this.a.onerror=w(this.Rb,this),this.a.onprogress=w(this.qc,this),this.a.ontimeout=w(this.uc,this)}function ta(e,t){e.readyState=t,e.onreadystatechange&&e.onreadystatechange()}function na(e,t,n){this.reset(e,t,n,void 0,void 0)}O(Go,E),O(Ko,E),Ko.prototype.w=function(){var e={code:this.code,message:this.message};this.email&&(e.email=this.email),this.phoneNumber&&(e.phoneNumber=this.phoneNumber),this.tenantId&&(e.tenantId=this.tenantId);var t=this.credential&&this.credential.w();return t&&ye(e,t),e},Ko.prototype.toJSON=function(){return this.w()},Qo.prototype.c=null,O(Xo,Qo),Xo.prototype.a=function(){var e=Jo(this);return e?new ActiveXObject(e):new XMLHttpRequest},Xo.prototype.b=function(){var e={};return Jo(this)&&(e[0]=!0,e[1]=!0),e},zo=new Xo,O(Zo,Qo),Zo.prototype.a=function(){var e=new XMLHttpRequest;if("withCredentials"in e)return e;if("undefined"!=typeof XDomainRequest)return new ea;throw Error("Unsupported browser")},Zo.prototype.b=function(){return{}},(n=ea.prototype).open=function(e,t,n){if(null!=n&&!n)throw Error("Only async requests are supported.");this.a.open(e,t)},n.send=function(e){if(e){if("string"!=typeof e)throw Error("Only string data is supported");this.a.send(e)}else this.a.send()},n.abort=function(){this.a.abort()},n.setRequestHeader=function(){},n.getResponseHeader=function(e){return"content-type"==e.toLowerCase()?this.a.contentType:""},n.pc=function(){this.status=200,this.response=this.responseText=this.a.responseText,ta(this,4)},n.Rb=function(){this.status=500,this.response=this.responseText="",ta(this,4)},n.uc=function(){this.Rb()},n.qc=function(){this.status=200,ta(this,1)},n.getAllResponseHeaders=function(){return"content-type: "+this.a.contentType},na.prototype.a=null;function ra(e){this.f=e,this.b=this.c=this.a=null}function ia(e,t){this.name=e,this.value=t}na.prototype.reset=function(e,t,n,r,i){"number"==typeof i||0,r||S(),delete this.a},ia.prototype.toString=function(){return this.name};var oa=new ia("SEVERE",1e3),aa=new ia("WARNING",900),sa=new ia("CONFIG",700),ua=new ia("FINE",500);function ca(e){return e.c?e.c:e.a?ca(e.a):(N("Root logger has no level set."),null)}ra.prototype.log=function(e,t,n){if(e.value>=ca(this).value)for(p(t)&&(t=t()),e=new na(e,String(t),this.f),n&&(e.a=n),n=this;n;)n=n.a};var la,fa={},ha=null;function da(e){var t;if(ha||(ha=new ra(""),fa[""]=ha,ha.c=sa),!(t=fa[e])){t=new ra(e);var n=e.lastIndexOf("."),r=e.substr(n+1);(n=da(e.substr(0,n))).b||(n.b={}),n.b[r]=t,t.a=n,fa[e]=t}return t}function pa(e,t){e&&e.log(ua,t,void 0)}function va(e){this.f=e}function ya(e){_n.call(this),this.o=e,this.readyState=ma,this.status=0,this.responseType=this.responseText=this.response=this.statusText="",this.onreadystatechange=null,this.i=new Headers,this.b=null,this.m="GET",this.g="",this.a=!1,this.h=da("goog.net.FetchXmlHttp"),this.l=this.c=this.f=null}O(va,Qo),va.prototype.a=function(){return new ya(this.f)},va.prototype.b=(la={},function(){return la}),O(ya,_n);var ma=0;function ga(e){e.c.read().then(e.oc.bind(e)).catch(e.Ta.bind(e))}function ba(e,t){t&&e.f&&(e.status=e.f.status,e.statusText=e.f.statusText),e.readyState=4,e.f=null,e.c=null,e.l=null,_a(e)}function _a(e){e.onreadystatechange&&e.onreadystatechange.call(e)}function wa(e){_n.call(this),this.headers=new Pn,this.O=e||null,this.c=!1,this.A=this.a=null,this.h=this.P=this.l="",this.f=this.N=this.i=this.G=!1,this.g=0,this.o=null,this.m=ka,this.u=this.R=!1}(n=ya.prototype).open=function(e,t){if(this.readyState!=ma)throw this.abort(),Error("Error reopening a connection");this.m=e,this.g=t,this.readyState=1,_a(this)},n.send=function(e){if(1!=this.readyState)throw this.abort(),Error("need to call open() first. ");this.a=!0;var t={headers:this.i,method:this.m,credentials:void 0,cache:void 0};
2e&&(t.body=e),this.o.fetch(new Request(this.g,t)).then(this.tc.bind(this),this.Ta.bind(this))},n.abort=function(){this.response=this.responseText="",this.i=new Headers,this.status=0,this.c&&this.c.cancel("Request was aborted."),1<=this.readyState&&this.a&&4!=this.readyState&&(this.a=!1,ba(this,!1)),this.readyState=ma},n.tc=function(e){this.a&&(this.f=e,this.b||(this.b=e.headers,this.readyState=2,_a(this)),this.a&&(this.readyState=3,_a(this),this.a&&("arraybuffer"===this.responseType?e.arrayBuffer().then(this.rc.bind(this),this.Ta.bind(this)):"undefined"!==typeof u.ReadableStream&&"body"in e?(this.response=this.responseText="",this.c=e.body.getReader(),this.l=new TextDecoder,ga(this)):e.text().then(this.sc.bind(this),this.Ta.bind(this)))))},n.oc=function(e){if(this.a){var t=this.l.decode(e.value?e.value:new Uint8Array(0),{stream:!e.done});t&&(this.response=this.responseText+=t),e.done?ba(this,!0):_a(this),3==this.readyState&&ga(this)}},n.sc=function(e){this.a&&(this.response=this.responseText=e,ba(this,!0))},n.rc=function(e){this.a&&(this.response=e,ba(this,!0))},n.Ta=function(e){var t=this.h;t&&t.log(aa,"Failed to fetch url "+this.g,e instanceof Error?e:Error(e)),this.a&&ba(this,!0)},n.setRequestHeader=function(e,t){this.i.append(e,t)},n.getResponseHeader=function(e){return this.b?this.b.get(e.toLowerCase())||"":((e=this.h)&&e.log(aa,"Attempting to get response header but no headers have been received for url: "+this.g,void 0),"")},n.getAllResponseHeaders=function(){if(!this.b){var e=this.h;return e&&e.log(aa,"Attempting to get all response headers but no headers have been received for url: "+this.g,void 0),""}e=[];for(var t=this.b.entries(),n=t.next();!n.done;)n=n.value,e.push(n[0]+": "+n[1]),n=t.next();return e.join("\r\n")},O(wa,_n);var ka="";wa.prototype.b=da("goog.net.XhrIo");var Sa=/^https?$/i,Oa=["POST","PUT"];function Ea(e,t,n,r,i){if(e.a)throw Error("[goog.net.XhrIo] Object is active with another request="+e.l+"; newUri="+t);n=n?n.toUpperCase():"GET",e.l=t,e.h="",e.P=n,e.G=!1,e.c=!0,e.a=e.O?e.O.a():zo.a(),e.A=e.O?$o(e.O):$o(zo),e.a.onreadystatechange=w(e.Ub,e);try{pa(e.b,Ma(e,"Opening Xhr")),e.N=!0,e.a.open(n,String(t),!0),e.N=!1}catch(a){return pa(e.b,Ma(e,"Error opening Xhr: "+a.message)),void Ca(e,a)}t=r||"";var o=new Pn(e.headers);i&&function(e,t){if(e.forEach&&"function"==typeof e.forEach)e.forEach(t,void 0);else if(d(e)||"string"===typeof e)W(e,t,void 0);else for(var n=Cn(e),r=Tn(e),i=r.length,o=0;o<i;o++)t.call(void 0,r[o],n&&n[o],e)}(i,(function(e,t){o.set(t,e)})),i=function(e){e:{for(var t=Ta,n=e.length,r="string"===typeof e?e.split(""):e,i=0;i<n;i++)if(i in r&&t.call(void 0,r[i],i,e)){t=i;break e}t=-1}return 0>t?null:"string"===typeof e?e.charAt(t):e[t]}(o.Y()),r=u.FormData&&t instanceof u.FormData,!K(Oa,n)||i||r||o.set("Content-Type","application/x-www-form-urlencoded;charset=utf-8"),o.forEach((function(e,t){this.a.setRequestHeader(t,e)}),e),e.m&&(e.a.responseType=e.m),"withCredentials"in e.a&&e.a.withCredentials!==e.R&&(e.a.withCredentials=e.R);try{ja(e),0<e.g&&(e.u=function(e){return Ge&&rt(9)&&"number"===typeof e.timeout&&void 0!==e.ontimeout}(e.a),pa(e.b,Ma(e,"Will abort after "+e.g+"ms if incomplete, xhr2 "+e.u)),e.u?(e.a.timeout=e.g,e.a.ontimeout=w(e.Ma,e)):e.o=On(e.Ma,e.g,e)),pa(e.b,Ma(e,"Sending request")),e.i=!0,e.a.send(t),e.i=!1}catch(a){pa(e.b,Ma(e,"Send error: "+a.message)),Ca(e,a)}}function Ta(e){return"content-type"==e.toLowerCase()}function Ca(e,t){e.c=!1,e.a&&(e.f=!0,e.a.abort(),e.f=!1),e.h=t,Pa(e),Ia(e)}function Pa(e){e.G||(e.G=!0,e.dispatchEvent("complete"),e.dispatchEvent("error"))}function xa(e){if(e.c&&"undefined"!=typeof s)if(e.A[1]&&4==Ra(e)&&2==Aa(e))pa(e.b,Ma(e,"Local request error detected and ignored"));else if(e.i&&4==Ra(e))On(e.Ub,0,e);else if(e.dispatchEvent("readystatechange"),4==Ra(e)){pa(e.b,Ma(e,"Request complete")),e.c=!1;try{var t,n=Aa(e);e:switch(n){case 200:case 201:case 202:case 204:case 206:case 304:case 1223:var r=!0;break e;default:r=!1}if(!(t=r)){var i;if(i=0===n){var o=String(e.l).match(jn)[1]||null;if(!o&&u.self&&u.self.location){var a=u.self.location.protocol;o=a.substr(0,a.length-1)}i=!Sa.test(o?o.toLowerCase():"")}t=i}if(t)e.dispatchEvent("complete"),e.dispatchEvent("success");else{try{var c=2<Ra(e)?e.a.statusText:""}catch(l){pa(e.b,"Can not get status: "+l.message),c=""}e.h=c+" ["+Aa(e)+"]",Pa(e)}}finally{Ia(e)}}}function Ia(e,t){if(e.a){ja(e);var n=e.a,r=e.A[0]?f:null;e.a=null,e.A=null,t||e.dispatchEvent("ready");try{n.onreadystatechange=r}catch(i){(e=e.b)&&e.log(oa,"Problem encountered resetting onreadystatechange: "+i.message,void 0)}}}function ja(e){e.a&&e.u&&(e.a.ontimeout=null),e.o&&(u.clearTimeout(e.o),e.o=null)}function Ra(e){return e.a?e.a.readyState:0}function Aa(e){try{return 2<Ra(e)?e.a.status:-1}catch(t){return-1}}function Ma(e,t){return t+" ["+e.P+" "+e.l+" "+Aa(e)+"]"}function Na(e){var t=Ga;this.g=[],this.u=t,this.o=e||null,this.f=this.a=!1,this.c=void 0,this.m=this.A=this.i=!1,this.h=0,this.b=null,this.l=0}function La(e,t,n){e.a=!0,e.c=n,e.f=!t,Va(e)}function Da(e){if(e.a){if(!e.m)throw new Ba(e);e.m=!1}}function Fa(e,t,n,r){e.g.push([t,n,r]),e.a&&Va(e)}function Ua(e){return G(e.g,(function(e){return p(e[1])}))}function Va(e){if(e.h&&e.a&&Ua(e)){var t=e.h,n=za[t];n&&(u.clearTimeout(n.a),delete za[t]),e.h=0}e.b&&(e.b.l--,delete e.b),t=e.c;for(var r=n=!1;e.g.length&&!e.i;){var i=e.g.shift(),o=i[0],a=i[1];if(i=i[2],o=e.f?a:o)try{var s=o.call(i||e.o,t);void 0!==s&&(e.f=e.f&&(s==t||s instanceof Error),e.c=t=s),(R(t)||"function"===typeof u.Promise&&t instanceof u.Promise)&&(r=!0,e.i=!0)}catch(c){t=c,e.f=!0,Ua(e)||(n=!0)}}e.c=t,r&&(s=w(e.v,e,!0),r=w(e.v,e,!1),t instanceof Na?(Fa(t,s,r),t.A=!0):t.then(s,r)),n&&(t=new Wa(t),za[t.a]=t,e.h=t.a)}function Ba(){A.call(this)}function qa(){A.call(this)}function Wa(e){this.a=u.setTimeout(w(this.c,this),0),this.b=e}(n=wa.prototype).Ma=function(){"undefined"!=typeof s&&this.a&&(this.h="Timed out after "+this.g+"ms, aborting",pa(this.b,Ma(this,this.h)),this.dispatchEvent("timeout"),this.abort(8))},n.abort=function(){this.a&&this.c&&(pa(this.b,Ma(this,"Aborting")),this.c=!1,this.f=!0,this.a.abort(),this.f=!1,this.dispatchEvent("complete"),this.dispatchEvent("abort"),Ia(this))},n.Da=function(){this.a&&(this.c&&(this.c=!1,this.f=!0,this.a.abort(),this.f=!1),Ia(this,!0)),wa.$a.Da.call(this)},n.Ub=function(){this.xa||(this.N||this.i||this.f?xa(this):this.Ic())},n.Ic=function(){xa(this)},n.getResponse=function(){try{if(!this.a)return null;if("response"in this.a)return this.a.response;switch(this.m){case ka:case"text":return this.a.responseText;case"arraybuffer":if("mozResponseArrayBuffer"in this.a)return this.a.mozResponseArrayBuffer}var e=this.b;return e&&e.log(oa,"Response type "+this.m+" is not supported on this browser",void 0),null}catch(t){return pa(this.b,"Can not get response: "+t.message),null}},Na.prototype.cancel=function(e){if(this.a)this.c instanceof Na&&this.c.cancel();else{if(this.b){var t=this.b;delete this.b,e?t.cancel(e):(t.l--,0>=t.l&&t.cancel())}this.u?this.u.call(this.o,this):this.m=!0,this.a||(e=new qa(this),Da(this),La(this,!1,e))}},Na.prototype.v=function(e,t){this.i=!1,La(this,e,t)},Na.prototype.then=function(e,t,n){var r,i,o=new bt((function(e,t){r=e,i=t}));return Fa(this,r,(function(e){e instanceof qa?o.cancel():i(e)})),o.then(e,t,n)}
2,Na.prototype.$goog_Thenable=!0,O(Ba,A),Ba.prototype.message="Deferred has already fired",Ba.prototype.name="AlreadyCalledError",O(qa,A),qa.prototype.message="Deferred was canceled",qa.prototype.name="CanceledError",Wa.prototype.c=function(){throw delete za[this.a],this.b};var za={};function Ha(e){var t={},n=t.document||document,r=Oe(e).toString(),i=ft(document,"SCRIPT"),o={Vb:i,Ma:void 0},a=new Na(o),s=null,f=null!=t.timeout?t.timeout:5e3;return 0<f&&(s=window.setTimeout((function(){Ka(i,!0);var e=new $a(Qa,"Timeout reached for loading script "+r);Da(a),La(a,!1,e)}),f),o.Ma=s),i.onload=i.onreadystatechange=function(){i.readyState&&"loaded"!=i.readyState&&"complete"!=i.readyState||(Ka(i,t.wd||!1,s),Da(a),La(a,!0,null))},i.onerror=function(){Ka(i,!0,s);var e=new $a(Ya,"Error while loading script "+r);Da(a),La(a,!1,e)},ye(o=t.attributes||{},{type:"text/javascript",charset:"UTF-8"}),at(i,o),function(e,t){me(e,"HTMLScriptElement"),e.src=Oe(t),null===l&&(l=(t=(t=u.document).querySelector&&t.querySelector("script[nonce]"))&&(t=t.nonce||t.getAttribute("nonce"))&&c.test(t)?t:""),(t=l)&&e.setAttribute("nonce",t)}(i,e),function(e){var t;return(t=(e||document).getElementsByTagName("HEAD"))&&0!=t.length?t[0]:e.documentElement}(n).appendChild(i),a}function Ga(){if(this&&this.Vb){var e=this.Vb;e&&"SCRIPT"==e.tagName&&Ka(e,!0,this.Ma)}}function Ka(e,t,n){null!=n&&u.clearTimeout(n),e.onload=f,e.onerror=f,e.onreadystatechange=f,t&&window.setTimeout((function(){e&&e.parentNode&&e.parentNode.removeChild(e)}),0)}var Ya=0,Qa=1;function $a(e,t){var n="Jsloader error (code #"+e+")";t&&(n+=": "+t),A.call(this,n),this.code=e}function Xa(e){this.f=e}function Ja(e,n,r){if(this.c=e,e=n||{},this.l=e.secureTokenEndpoint||"https://securetoken.googleapis.com/v1/token",this.v=e.secureTokenTimeout||ts,this.g=pe(e.secureTokenHeaders||ns),this.h=e.firebaseEndpoint||"https://www.googleapis.com/identitytoolkit/v3/relyingparty/",this.i=e.identityPlatformEndpoint||"https://identitytoolkit.googleapis.com/v2/",this.m=e.firebaseTimeout||rs,this.a=pe(e.firebaseHeaders||is),r&&(this.a["X-Client-Version"]=r,this.g["X-Client-Version"]=r),r="Node"==wr(),!(r=u.XMLHttpRequest||r&&t.a.INTERNAL.node&&t.a.INTERNAL.node.XMLHttpRequest)&&!_r())throw new E("internal-error","The XMLHttpRequest compatibility library was not found.");this.f=void 0,_r()?this.f=new va(self):kr()?this.f=new Xa(r):this.f=new Zo,this.b=null}O($a,A),O(Xa,Qo),Xa.prototype.a=function(){return new this.f},Xa.prototype.b=function(){return{}};var Za,es="idToken",ts=new Br(3e4,6e4),ns={"Content-Type":"application/x-www-form-urlencoded"},rs=new Br(3e4,6e4),is={"Content-Type":"application/json"};function os(e,t){t?e.a["X-Firebase-Locale"]=t:delete e.a["X-Firebase-Locale"]}function as(e,t){t&&(e.l=ss("https://securetoken.googleapis.com/v1/token",t),e.h=ss("https://www.googleapis.com/identitytoolkit/v3/relyingparty/",t),e.i=ss("https://identitytoolkit.googleapis.com/v2/",t))}function ss(e,t){return e=Fn(e),t=Fn(t.url),e.c=e.a+e.c,An(e,t.f),e.a=t.a,Mn(e,t.g),e.toString()}function us(e,t){t?(e.a["X-Client-Version"]=t,e.g["X-Client-Version"]=t):(delete e.a["X-Client-Version"],delete e.g["X-Client-Version"])}function cs(e,t,n,r,i,o,a){(function(){var e=Pr();return!((e=Er(e)!=Or?null:(e=e.match(/\sChrome\/(\d+)/i))&&2==e.length?parseInt(e[1],10):null)&&30>e)&&(!Ge||!tt||9<tt)})()||_r()?e=w(e.u,e):(Za||(Za=new bt((function(e,t){!function(e,t){if(((window.gapi||{}).client||{}).request)e();else{u[fs]=function(){((window.gapi||{}).client||{}).request?e():t(Error("CORS_UNSUPPORTED"))},function(e,t){Fa(e,null,t,void 0)}(Ha(Ee(ls,{onload:fs})),(function(){t(Error("CORS_UNSUPPORTED"))}))}}(e,t)}))),e=w(e.o,e)),e(t,n,r,i,o,a)}Ja.prototype.S=function(){return this.b},Ja.prototype.u=function(e,t,n,r,i,o){if(_r()&&("undefined"===typeof u.fetch||"undefined"===typeof u.Headers||"undefined"===typeof u.Request))throw new E("operation-not-supported-in-this-environment","fetch, Headers and Request native APIs or equivalent Polyfills must be available to support HTTP requests from a Worker environment.");var a=new wa(this.f);if(o){a.g=Math.max(0,o);var s=setTimeout((function(){a.dispatchEvent("timeout")}),o)}wn(a,"complete",(function(){s&&clearTimeout(s);var e=null;try{e=JSON.parse(function(e){try{return e.a?e.a.responseText:""}catch(t){return pa(e.b,"Can not get responseText: "+t.message),""}}(this))||null}catch(n){e=null}t&&t(e)})),kn(a,"ready",(function(){s&&clearTimeout(s),zt(this)})),kn(a,"timeout",(function(){s&&clearTimeout(s),zt(this),t&&t(null)})),Ea(a,e,n,r,i)};var ls=new ge(we,"https://apis.google.com/js/client.js?onload=%{onload}"),fs="__fcb"+Math.floor(1e6*Math.random()).toString();function hs(e,t,n,r,i,o,a){var s=Fn(t+n);Ln(s,"key",e.c),a&&Ln(s,"cb",S().toString());var u="GET"==r;if(u)for(var c in i)i.hasOwnProperty(c)&&Ln(s,c,i[c]);return new bt((function(t,n){cs(e,s.toString(),(function(e){e?e.error?n(su(e,o||{})):t(e):n(new E("network-request-failed"))}),r,u?void 0:nr(Lr(i)),e.a,e.m.get())}))}function ds(e){if("string"!==typeof(e=e.email)||!yr.test(e))throw new E("invalid-email")}function ps(e){"email"in e&&ds(e)}function vs(e){if(!e[es]){if(e.mfaPendingCredential)throw new E("multi-factor-auth-required",null,pe(e));throw new E("internal-error")}}function ys(e){if(e.phoneNumber||e.temporaryProof){if(!e.phoneNumber||!e.temporaryProof)throw new E("internal-error")}else{if(!e.sessionInfo)throw new E("missing-verification-id");if(!e.code)throw new E("missing-verification-code")}}Ja.prototype.o=function(e,t,n,r,i){var o=this;Za.then((function(){window.gapi.client.setApiKey(o.c);var a=window.gapi.auth.getToken();window.gapi.auth.setToken(null),window.gapi.client.request({path:e,method:n,body:r,headers:i,authType:"none",callback:function(e){window.gapi.auth.setToken(a),t&&t(e)}})})).s((function(e){t&&t({error:{message:e&&e.message||"CORS_UNSUPPORTED"}})}))},Ja.prototype.yb=function(){return ou(this,Ks,{})},Ja.prototype.Ab=function(e,t){return ou(this,Hs,{idToken:e,email:t})},Ja.prototype.Bb=function(e,t){return ou(this,Gs,{idToken:e,password:t})};var ms={displayName:"DISPLAY_NAME",photoUrl:"PHOTO_URL"};function gs(e){if(!e.phoneVerificationInfo)throw new E("internal-error");
2if(!e.phoneVerificationInfo.sessionInfo)throw new E("missing-verification-id");if(!e.phoneVerificationInfo.code)throw new E("missing-verification-code")}function bs(e){if(!e.requestUri||!e.sessionId&&!e.postBody&&!e.pendingToken)throw new E("internal-error")}function _s(e,t){return t.oauthIdToken&&t.providerId&&0==t.providerId.indexOf("oidc.")&&!t.pendingToken&&(e.sessionId?t.nonce=e.sessionId:e.postBody&&(Jn(e=new Yn(e.postBody),"nonce")&&(t.nonce=e.get("nonce")))),t}function ws(e){var t=null;if(e.needConfirmation?(e.code="account-exists-with-different-credential",t=Yo(e)):"FEDERATED_USER_ID_ALREADY_LINKED"==e.errorMessage?(e.code="credential-already-in-use",t=Yo(e)):"EMAIL_EXISTS"==e.errorMessage?(e.code="email-already-in-use",t=Yo(e)):e.errorMessage&&(t=au(e.errorMessage)),t)throw t;vs(e)}function ks(e,t){return t.returnIdpCredential=!0,ou(e,$s,t)}function Ss(e,t){return t.returnIdpCredential=!0,ou(e,Js,t)}function Os(e,t){return t.returnIdpCredential=!0,t.autoCreate=!1,ou(e,Xs,t)}function Es(e){if(!e.oobCode)throw new E("invalid-action-code")}(n=Ja.prototype).Cb=function(e,t){var n={idToken:e},r=[];return he(ms,(function(e,i){var o=t[i];null===o?r.push(e):i in t&&(n[i]=o)})),r.length&&(n.deleteAttribute=r),ou(this,Hs,n)},n.ub=function(e,t){return ye(e={requestType:"PASSWORD_RESET",email:e},t),ou(this,Vs,e)},n.vb=function(e,t){return ye(e={requestType:"EMAIL_SIGNIN",email:e},t),ou(this,Ds,e)},n.tb=function(e,t){return ye(e={requestType:"VERIFY_EMAIL",idToken:e},t),ou(this,Fs,e)},n.Db=function(e,t,n){return ye(e={requestType:"VERIFY_AND_CHANGE_EMAIL",idToken:e,newEmail:t},n),ou(this,Us,e)},n.eb=function(e){return ou(this,tu,e)},n.mb=function(e,t){return ou(this,Ws,{oobCode:e,newPassword:t})},n.Qa=function(e){return ou(this,Cs,{oobCode:e})},n.ib=function(e){return ou(this,Ts,{oobCode:e})};var Ts={endpoint:"setAccountInfo",B:Es,Z:"email",C:!0},Cs={endpoint:"resetPassword",B:Es,F:function(e){var t=e.requestType;if(!t||!e.email&&"EMAIL_SIGNIN"!=t&&"VERIFY_AND_CHANGE_EMAIL"!=t)throw new E("internal-error")},C:!0},Ps={endpoint:"signupNewUser",B:function(e){if(ds(e),!e.password)throw new E("weak-password")},F:vs,U:!0,C:!0},xs={endpoint:"createAuthUri",C:!0},Is={endpoint:"deleteAccount",M:["idToken"]},js={endpoint:"setAccountInfo",M:["idToken","deleteProvider"],B:function(e){if("array"!=h(e.deleteProvider))throw new E("internal-error")}},Rs={endpoint:"emailLinkSignin",M:["email","oobCode"],B:ds,F:vs,U:!0,C:!0},As={endpoint:"emailLinkSignin",M:["idToken","email","oobCode"],B:ds,F:vs,U:!0},Ms={endpoint:"accounts/mfaEnrollment:finalize",M:["idToken","phoneVerificationInfo"],B:gs,F:vs,C:!0,Na:!0},Ns={endpoint:"accounts/mfaSignIn:finalize",M:["mfaPendingCredential","phoneVerificationInfo"],B:gs,F:vs,C:!0,Na:!0},Ls={endpoint:"getAccountInfo"},Ds={endpoint:"getOobConfirmationCode",M:["requestType"],B:function(e){if("EMAIL_SIGNIN"!=e.requestType)throw new E("internal-error");ds(e)},Z:"email",C:!0},Fs={endpoint:"getOobConfirmationCode",M:["idToken","requestType"],B:function(e){if("VERIFY_EMAIL"!=e.requestType)throw new E("internal-error")},Z:"email",C:!0},Us={endpoint:"getOobConfirmationCode",M:["idToken","newEmail","requestType"],B:function(e){if("VERIFY_AND_CHANGE_EMAIL"!=e.requestType)throw new E("internal-error")},Z:"email",C:!0},Vs={endpoint:"getOobConfirmationCode",M:["requestType"],B:function(e){if("PASSWORD_RESET"!=e.requestType)throw new E("internal-error");ds(e)},Z:"email",C:!0},Bs={kb:!0,endpoint:"getProjectConfig",Tb:"GET"},qs={kb:!0,endpoint:"getRecaptchaParam",Tb:"GET",F:function(e){if(!e.recaptchaSiteKey)throw new E("internal-error")}},Ws={endpoint:"resetPassword",B:Es,Z:"email",C:!0},zs={endpoint:"sendVerificationCode",M:["phoneNumber","recaptchaToken"],Z:"sessionInfo",C:!0},Hs={endpoint:"setAccountInfo",M:["idToken"],B:ps,U:!0},Gs={endpoint:"setAccountInfo",M:["idToken"],B:function(e){if(ps(e),!e.password)throw new E("weak-password")},F:vs,U:!0},Ks={endpoint:"signupNewUser",F:vs,U:!0,C:!0},Ys={endpoint:"accounts/mfaEnrollment:start",M:["idToken","phoneEnrollmentInfo"],B:function(e){if(!e.phoneEnrollmentInfo)throw new E("internal-error");
2if(!e.phoneEnrollmentInfo.phoneNumber)throw new E("missing-phone-number");if(!e.phoneEnrollmentInfo.recaptchaToken)throw new E("missing-app-credential")},F:function(e){if(!e.phoneSessionInfo||!e.phoneSessionInfo.sessionInfo)throw new E("internal-error")},C:!0,Na:!0},Qs={endpoint:"accounts/mfaSignIn:start",M:["mfaPendingCredential","mfaEnrollmentId","phoneSignInInfo"],B:function(e){if(!e.phoneSignInInfo||!e.phoneSignInInfo.recaptchaToken)throw new E("missing-app-credential")},F:function(e){if(!e.phoneResponseInfo||!e.phoneResponseInfo.sessionInfo)throw new E("internal-error")},C:!0,Na:!0},$s={endpoint:"verifyAssertion",B:bs,Xa:_s,F:ws,U:!0,C:!0},Xs={endpoint:"verifyAssertion",B:bs,Xa:_s,F:function(e){if(e.errorMessage&&"USER_NOT_FOUND"==e.errorMessage)throw new E("user-not-found");if(e.errorMessage)throw au(e.errorMessage);vs(e)},U:!0,C:!0},Js={endpoint:"verifyAssertion",B:function(e){if(bs(e),!e.idToken)throw new E("internal-error")},Xa:_s,F:ws,U:!0},Zs={endpoint:"verifyCustomToken",B:function(e){if(!e.token)throw new E("invalid-custom-token")},F:vs,U:!0,C:!0},eu={endpoint:"verifyPassword",B:function(e){if(ds(e),!e.password)throw new E("wrong-password")},F:vs,U:!0,C:!0},tu={endpoint:"verifyPhoneNumber",B:ys,F:vs,C:!0},nu={endpoint:"verifyPhoneNumber",B:function(e){if(!e.idToken)throw new E("internal-error");ys(e)},F:function(e){if(e.temporaryProof)throw e.code="credential-already-in-use",Yo(e);vs(e)}},ru={Gb:{USER_NOT_FOUND:"user-not-found"},endpoint:"verifyPhoneNumber",B:ys,F:vs,C:!0},iu={endpoint:"accounts/mfaEnrollment:withdraw",M:["idToken","mfaEnrollmentId"],F:function(e){if(!!e[es]^!!e.refreshToken)throw new E("internal-error")},C:!0,Na:!0};function ou(e,t,n){if(!function(e,t){if(!t||!t.length)return!0;if(!e)return!1;for(var n=0;n<t.length;n++){var r=e[t[n]];if(void 0===r||null===r||""===r)return!1}return!0}(n,t.M))return Ct(new E("internal-error"));var r,i=!!t.Na,o=t.Tb||"POST";return Tt(n).then(t.B).then((function(){return t.U&&(n.returnSecureToken=!0),t.C&&e.b&&"undefined"===typeof n.tenantId&&(n.tenantId=e.b),hs(e,i?e.i:e.h,t.endpoint,o,n,t.Gb,t.kb||!1)})).then((function(e){return r=e,t.Xa?t.Xa(n,r):r})).then(t.F).then((function(){if(!t.Z)return r;if(!(t.Z in r))throw new E("internal-error");return r[t.Z]}))}function au(e){return su({error:{errors:[{message:e}],code:400,message:e}})}function su(e,t){var n=(e.error&&e.error.errors&&e.error.errors[0]||{}).reason||"",r={keyInvalid:"invalid-api-key",ipRefererBlocked:"app-not-authorized"};if(n=r[n]?new E(r[n]):null)return n;for(var i in n=e.error&&e.error.message||"",ye(r={INVALID_CUSTOM_TOKEN:"invalid-custom-token",CREDENTIAL_MISMATCH:"custom-token-mismatch",MISSING_CUSTOM_TOKEN:"internal-error",INVALID_IDENTIFIER:"invalid-email",MISSING_CONTINUE_URI:"internal-error",INVALID_EMAIL:"invalid-email",INVALID_PASSWORD:"wrong-password",USER_DISABLED:"user-disabled",MISSING_PASSWORD:"internal-error",EMAIL_EXISTS:"email-already-in-use",PASSWORD_LOGIN_DISABLED:"operation-not-allowed",INVALID_IDP_RESPONSE:"invalid-credential",INVALID_PENDING_TOKEN:"invalid-credential",FEDERATED_USER_ID_ALREADY_LINKED:"credential-already-in-use",MISSING_OR_INVALID_
2NONCE:"missing-or-invalid-nonce",INVALID_MESSAGE_PAYLOAD:"invalid-message-payload",INVALID_RECIPIENT_EMAIL:"invalid-recipient-email",INVALID_SENDER:"invalid-sender",EMAIL_NOT_FOUND:"user-not-found",RESET_PASSWORD_EXCEED_LIMIT:"too-many-requests",EXPIRED_OOB_CODE:"expired-action-code",INVALID_OOB_CODE:"invalid-action-code",MISSING_OOB_CODE:"internal-error",INVALID_PROVIDER_ID:"invalid-provider-id",CREDENTIAL_TOO_OLD_LOGIN_AGAIN:"requires-recent-login",INVALID_ID_TOKEN:"invalid-user-token",TOKEN_EXPIRED:"user-token-expired",USER_NOT_FOUND:"user-token-expired",CORS_UNSUPPORTED:"cors-unsupported",DYNAMIC_LINK_NOT_ACTIVATED:"dynamic-link-not-activated",INVALID_APP_ID:"invalid-app-id",TOO_MANY_ATTEMPTS_TRY_LATER:"too-many-requests",WEAK_PASSWORD:"weak-password",OPERATION_NOT_ALLOWED:"operation-not-allowed",USER_CANCELLED:"user-cancelled",CAPTCHA_CHECK_FAILED:"captcha-check-failed",INVALID_APP_CREDENTIAL:"invalid-app-credential",INVALID_CODE:"invalid-verification-code",INVALID_PHONE_NUMBER:"invalid-phone-number",INVALID_SESSION_INFO:"invalid-verification-id",INVALID_TEMPORARY_PROOF:"invalid-credential",MISSING_APP_CREDENTIAL:"missing-app-credential",MISSING_CODE:"missing-verification-code",MISSING_PHONE_NUMBER:"missing-phone-number",MISSING_SESSION_INFO:"missing-verification-id",QUOTA_EXCEEDED:"quota-exceeded",SESSION_EXPIRED:"code-expired",REJECTED_CREDENTIAL:"rejected-credential",INVALID_CONTINUE_URI:"invalid-continue-uri",MISSING_ANDROID_PACKAGE_NAME:"missing-android-pkg-name",MISSING_IOS_BUNDLE_ID:"missing-ios-bundle-id",UNAUTHORIZED_DOMAIN:"unauthorized-continue-uri",INVALID_DYNAMIC_LINK_DOMAIN:"invalid-dynamic-link-domain",INVALID_OAUTH_CLIENT_ID:"invalid-oauth-client-id",INVALID_CERT_HASH:"invalid-cert-hash",UNSUPPORTED_TENANT_OPERATION:"unsupported-tenant-operation",INVALID_TENANT_ID:"invalid-tenant-id",TENANT_ID_MISMATCH:"tenant-id-mismatch",ADMIN_ONLY_OPERATION:"admin-restricted-operation",INVALID_MFA_PENDING_CREDENTIAL:"invalid-multi-factor-session",MFA_ENROLLMENT_NOT_FOUND:"multi-factor-info-not-found",MISSING_MFA_PENDING_CREDENTIAL:"missing-multi-factor-session",MISSING_MFA_ENROLLMENT_ID:"missing-multi-factor-info",EMAIL_CHANGE_NEEDS_VERIFICATION:"email-change-needs-verification",SECOND_FACTOR_EXISTS:"second-factor-already-in-use",SECOND_FACTOR_LIMIT_EXCEEDED:"maximum-second-factor-count-exceeded",UNSUPPORTED_FIRST_FACTOR:"unsupported-first-factor",UNVERIFIED_EMAIL:"unverified-email"},t||{}),t=(t=n.match(/^[^\s]+\s*:\s*([\s\S]*)$/))&&1<t.length?t[1]:void 0,r)if(0===n.indexOf(i))return new E(r[i],t);return!t&&e&&(t=Nr(e)),new E("internal-error",t)}function uu(e){this.b=e,this.a=null,this.qb=function(e){return(hu||(hu=new bt((function(e,t){function n(){Vr(),xr("gapi.load")("gapi.iframes",{callback:e,ontimeout:function(){Vr(),t(Error("Network Error"))},timeout:lu.get()})}if(xr("gapi.iframes.Iframe"))e();else if(xr("gapi.load"))n();else{var r="__iframefcb"+Math.floor(1e6*Math.random()).toString();u[r]=function(){xr("gapi.load")?n():t(Error("Network Error"))},Tt(Ha(r=Ee(cu,{onload:r}))).s((function(){t(Error("Network Error"))}))}})).s((function(e){throw hu=null,e})))).then((function(){return new bt((function(t,n){xr("gapi.iframes.getContext")().open({where:document.body,url:e.b,messageHandlersFilter:xr("gapi.iframes.CROSS_ORIGIN_IFRAMES_FILTER"),attributes:{style:{position:"absolute",top:"-100px",width:"1px",height:"1px"}},dontclear:!0},(function(r){function i(){clearTimeout(o),t()}e.a=r,e.a.restyle({setHideOnLeave:!1});var o=setTimeout((function(){n(Error("Network Error"))}),fu.get());r.ping(i).then(i,(function(){n(Error("Network Error"))}))}))}))}))}(this)}var cu=new ge(we,"https://apis.google.com/js/api.js?onload=%{onload}"),lu=new Br(3e4,6e4),fu=new Br(5e3,15e3),hu=null;function du(e,t,n,r){this.l=e,this.h=t,this.i=n,this.g=r,this.f=null,this.g?e=Un((e=Fn(this.g.url)).f,e.a,e.g,"/emulator/auth/iframe"):e=Un("https",this.l,null,"/__/auth/iframe"),this.a=e,Ln(this.a,"apiKey",this.h),Ln(this.a,"appName",this.i),this.b=null,this.c=[]}function pu(e,t,n,r,i,o){this.u=e,this.o=t,this.c=n,this.v=r,this.m=o,this.i=this.g=this.l=null,this.a=i,this.h=this.f=null}function vu(e){try{return t.a.app(e).auth().Ga()}catch(n){return[]}}function yu(e,t,n,r,i,o){this.o=e,this.g=t,this.b=n,this.f=o,this.c=r||null,this.i=i||null,this.l=this.u=this.A=null,this.h=[],this.v=this.a=null}function mu(e){var t=cr();return function(e){return ou(e,Bs,{}).then((function(e){return e.authorizedDomains||[]}))}(e).then((function(e){e:{var n=Fn(t),r=n.f;n=n.a;for(var i=0;i<e.length;i++){var o=e[i],a=n,s=r;if(0==o.indexOf("chrome-extension://")?a=Fn(o).a==a&&"chrome-extension"==s:"http"!=s&&"https"!=s?a=!1:vr.test(o)?a=a==o:(o=o.split(".").join("\\."),a=new RegExp("^(.+\\."+o+"|"+o+")$","i").test(a)),a){e=!0;break e}}e=!1}if(!e)throw new Go(cr())}))}function gu(e){return e.v||(e.v=mr().then((function(){if(!e.u){var t=e.c,n=e.i,r=vu(e.b),i=new du(e.o,e.g,e.b,e.f);i.f=t,i.b=n,i.c=X(r||[]),e.u=i.toString()}e.m=new uu(e.u),function(e){if(!e.m)throw Error("IfcHandler must be initialized!");!function(e,t){e.qb.then((function(){e.a.register("authEvent",t,xr("gapi.iframes.CROSS_ORIGIN_IFRAMES_FILTER"))}))}(e.m,(function(t){var n={};if(t&&t.authEvent){var r=!1;for(t=qo(t.authEvent),n=0;n<e.h.length;n++)r=e.h[n](t)||r;return(n={}).status=r?"ACK":"ERROR",Tt(n)}return n.status="ERROR",Tt(n)}))}(e)}))),e.v}function bu(e){return e.l||(e.A=e.c?Cr(e.c,vu(e.b)):null,e.l=new Ja(e.g,j(e.i),e.A),e.f&&as(e.l,e.f)),e.l}function _u(e,t,n,r,i,o,a,s,u,c,l,f){return(e=new pu(e,t,n,r,i,f)).l=o,e.g=a,e.i=s,e.b=pe(u||null),e.f=c,e.xb(l).toString()}function wu(e){if(this.a=e||t.a.INTERNAL.reactNative&&t.a.INTERNAL.reactNative.AsyncStorage,!this.a)throw new E("internal-error","The React Native compatibility library was not found.");this.type="asyncStorage"}function ku(e){this.b=e,this.a={},this.f=w(this.c,this)}du.prototype.toString=function(){return this.f?Ln(this.a,"v",this.f):Xn(this.a.b,"v"),this.b?Ln(this.a,"eid",this.b):Xn(this.a.b,"eid"),this.c.length?Ln(this.a,"fw",this.c.join(",")):Xn(this.a.b,"fw"),this.a.toString()},pu.prototype.xb=function(e){return this.h=e,this},pu.prototype.toString=function(){if(this.m){var e=Fn(this.m.url);e=Un(e.f,e.a,e.g,"/emulator/auth/handler")}else e=Un("https",this.u,null,"/__/auth/handler");
2if(Ln(e,"apiKey",this.o),Ln(e,"appName",this.c),Ln(e,"authType",this.v),this.a.isOAuthProvider){var n=this.a;try{var r=t.a.app(this.c).auth().ka()}catch(u){r=null}for(var i in n.nb=r,Ln(e,"providerId",this.a.providerId),n=Lr((r=this.a).Hb))n[i]=n[i].toString();i=r.Pc,n=pe(n);for(var o=0;o<i.length;o++){var a=i[o];a in n&&delete n[a]}r.ob&&r.nb&&!n[r.ob]&&(n[r.ob]=r.nb),de(n)||Ln(e,"customParameters",Nr(n))}if("function"===typeof this.a.Pb&&((r=this.a.Pb()).length&&Ln(e,"scopes",r.join(","))),this.l?Ln(e,"redirectUrl",this.l):Xn(e.b,"redirectUrl"),this.g?Ln(e,"eventId",this.g):Xn(e.b,"eventId"),this.i?Ln(e,"v",this.i):Xn(e.b,"v"),this.b)for(var s in this.b)this.b.hasOwnProperty(s)&&!Dn(e,s)&&Ln(e,s,this.b[s]);return this.h?Ln(e,"tid",this.h):Xn(e.b,"tid"),this.f?Ln(e,"eid",this.f):Xn(e.b,"eid"),(s=vu(this.c)).length&&Ln(e,"fw",s.join(",")),e.toString()},(n=yu.prototype).Nb=function(e,t,n){var r=new E("popup-closed-by-user"),i=new E("web-storage-unsupported"),o=this,a=!1;return this.la().then((function(){(function(e){var t={type:"webStorageSupport"};return gu(e).then((function(){return function(e,t){return e.qb.then((function(){return new bt((function(n){e.a.send(t.type,t,n,xr("gapi.iframes.CROSS_ORIGIN_IFRAMES_FILTER"))}))}))}(e.m,t)})).then((function(e){if(e&&e.length&&"undefined"!==typeof e[0].webStorageSupport)return e[0].webStorageSupport;throw Error()}))})(o).then((function(n){n||(e&&dr(e),t(i),a=!0)}))})).s((function(){})).then((function(){if(!a)return function(e){return new bt((function(t){return function n(){En(2e3).then((function(){if(e&&!e.closed)return n();t()}))}()}))}(e)})).then((function(){if(!a)return En(n).then((function(){t(r)}))}))},n.Wb=function(){var e=Pr();return!Mr(e)&&!Ur(e)},n.Sb=function(){return!1}
2,n.Lb=function(e,t,n,r,i,o,a,s){if(!e)return Ct(new E("popup-blocked"));if(a&&!Mr())return this.la().s((function(t){dr(e),i(t)})),r(),Tt();this.a||(this.a=mu(bu(this)));var u=this;return this.a.then((function(){var t=u.la().s((function(t){throw dr(e),i(t),t}));return r(),t})).then((function(){(Vo(n),a)||lr(_u(u.o,u.g,u.b,t,n,null,o,u.c,void 0,u.i,s,u.f),e)})).s((function(e){throw"auth/network-request-failed"==e.code&&(u.a=null),e}))},n.Mb=function(e,t,n,r){this.a||(this.a=mu(bu(this)));var i=this;return this.a.then((function(){Vo(t),lr(_u(i.o,i.g,i.b,e,t,cr(),n,i.c,void 0,i.i,r,i.f))})).s((function(e){throw"auth/network-request-failed"==e.code&&(i.a=null),e}))},n.la=function(){var e=this;return gu(this).then((function(){return e.m.qb})).s((function(){throw e.a=null,new E("network-request-failed")}))},n.Zb=function(){return!0},n.Ea=function(e){this.h.push(e)},n.Ra=function(e){Q(this.h,(function(t){return t==e}))},(n=wu.prototype).get=function(e){return Tt(this.a.getItem(e)).then((function(e){return e&&Dr(e)}))},n.set=function(e,t){return Tt(this.a.setItem(e,Nr(t)))},n.T=function(e){return Tt(this.a.removeItem(e))},n.ca=function(){},n.ia=function(){};var Su,Ou=[];function Eu(e,t,n){de(e.a)&&e.b.addEventListener("message",e.f),"undefined"===typeof e.a[t]&&(e.a[t]=[]),e.a[t].push(n)}function Tu(e){this.a=e}function Cu(e){this.c=e,this.b=!1,this.a=[]}function Pu(e,t,n,r){var i,o,a,s,u=n||{},c=null;if(e.b)return Ct(Error("connection_unavailable"));var l=r?800:50,f="undefined"!==typeof MessageChannel?new MessageChannel:null;return new bt((function(n,r){f?(i=Math.floor(Math.random()*Math.pow(10,20)).toString(),f.port1.start(),a=setTimeout((function(){r(Error("unsupported_event"))}),l),c={messageChannel:f,onMessage:o=function(e){e.data.eventId===i&&("ack"===e.data.status?(clearTimeout(a),s=setTimeout((function(){r(Error("timeout"))}),3e3)):"done"===e.data.status?(clearTimeout(s),"undefined"!==typeof e.data.response?n(e.data.response):r(Error("unknown_error"))):(clearTimeout(a),clearTimeout(s),r(Error("invalid_response"))))}},e.a.push(c),f.port1.addEventListener("message",o),e.c.postMessage({eventType:t,eventId:i,data:u},[f.port2])):r(Error("connection_unavailable"))})).then((function(t){return xu(e,c),t})).s((function(t){throw xu(e,c),t}))}function xu(e,t){if(t){var n=t.messageChannel,r=t.onMessage;n&&(n.port1.removeEventListener("message",r),n.port1.close()),Q(e.a,(function(e){return e==t}))}}function Iu(){if(!Au())throw new E("web-storage-unsupported");this.c={},this.a=[],this.b=0,this.m=u.indexedDB,this.type="indexedDB",this.g=this.l=this.f=this.i=null,this.o=!1,this.h=null;var e=this;_r()&&self?(this.l=function(){var e=_r()?self:null;if(W(Ou,(function(n){n.b==e&&(t=n)})),!t){var t=new ku(e);Ou.push(t)}return t}(),Eu(this.l,"keyChanged",(function(t,n){return Fu(e).then((function(t){return 0<t.length&&W(e.a,(function(e){e(t)})),{keyProcessed:K(t,n.key)}}))})),Eu(this.l,"ping",(function(){return Tt(["keyChanged"])}))):function(){var e=u.navigator;return e&&e.serviceWorker?Tt().then((function(){return e.serviceWorker.ready})).then((function(e){return e.active||null})).s((function(){return null})):Tt(null)}().then((function(t){(e.h=t)&&(e.g=new Cu(new Tu(t)),Pu(e.g,"ping",null,!0).then((function(t){t[0].fulfilled&&K(t[0].value,"keyChanged")&&(e.o=!0)})).s((function(){})))}))}function ju(e){return new bt((function(t,n){var r=e.m.open("firebaseLocalStorageDb",1);r.onerror=function(e){try{e.preventDefault()}catch(t){}n(Error(e.target.error))},r.onupgradeneeded=function(e){e=e.target.result;try{e.createObjectStore("firebaseLocalStorage",{keyPath:"fbase_key"})}catch(t){n(t)}},r.onsuccess=function(r){(r=r.target.result).objectStoreNames.contains("firebaseLocalStorage")?t(r):function(e){return new bt((function(t,n){var r=e.m.deleteDatabase("firebaseLocalStorageDb");r.onsuccess=function(){t()},r.onerror=function(e){n(Error(e.target.error))}}))}(e).then((function(){return ju(e)})).then((function(e){t(e)})).s((function(e){n(e)}))}}))}function Ru(e){return e.v||(e.v=ju(e)),e.v}function Au(){try{return!!u.indexedDB}catch(la){return!1}}function Mu(e){return e.objectStore("firebaseLocalStorage")}function Nu(e,t){return e.transaction(["firebaseLocalStorage"],t?"readwrite":"readonly")}function Lu(e){return new bt((function(t,n){e.onsuccess=function(e){e&&e.target?t(e.target.result):t()},e.onerror=function(e){n(e.target.error)}}))}function Du(e,t){return e.g&&e.h&&function(){var e=u.navigator;return e&&e.serviceWorker&&e.serviceWorker.controller||null}()===e.h?Pu(e.g,"keyChanged",{key:t},e.o).then((function(){})).s((function(){})):Tt()}function Fu(e){return Ru(e).then((function(e){var t=Mu(Nu(e,!1));return t.getAll?Lu(t.getAll()):new bt((function(e,n){var r=[],i=t.openCursor();i.onsuccess=function(t){(t=t.target.result)?(r.push(t.value),t.continue()):e(r)},i.onerror=function(e){n(e.target.error)}}))})).then((function(t){var n={},r=[];if(0==e.b){for(r=0;r<t.length;r++)n[t[r].fbase_key]=t[r].value;r=fr(e.c,n),e.c=n}return r}))}function Uu(e){e.i&&e.i.cancel("STOP_EVENT"),e.f&&(clearTimeout(e.f),e.f=null)}function Vu(e){var t=this,n=null;this.a=[],this.type="indexedDB",this.c=e,this.b=Tt().then((function(){if(Au()){var e=Fr(),r="__sak"+e;return Su||(Su=new Iu),(n=Su).set(r,e).then((function(){return n.get(r)})).then((function(t){if(t!==e)throw Error("indexedDB not supported!");return n.T(r)})).then((function(){return n})).s((function(){return t.c}))}return t.c})).then((function(e){return t.type=e.type,e.ca((function(e){W(t.a,(function(t){t(e)}))})),e}))}function Bu(){this.a={},this.type="inMemory"}function qu(){if(!function(){var e="Node"==wr();if(!(e=Wu()||e&&t.a.INTERNAL.node&&t.a.INTERNAL.node.localStorage))return!1;try{return e.setItem("__sak","1"),e.removeItem("__sak"),!0}catch(n){return!1}}()){if("Node"==wr())throw new E("internal-error","The LocalStorage compatibility library was not found.");throw new E("web-storage-unsupported")}this.a=Wu()||t.a.INTERNAL.node.localStorage,this.type="localStorage"}function Wu(){try{var e=u.localStorage,t=Fr();return e&&(e.setItem(t,"1"),e.removeItem(t)),e}catch(n){return null}}function zu(){this.type="nullStorage"}function Hu(){if(!function(){var e="Node"==wr();if(!(e=Gu()||e&&t.a.INTERNAL.node&&t.a.INTERNAL.node.sessionStorage))return!1;try{return e.setItem("__sak","1"),e.removeItem("__sak"),!0}catch(n){return!1}}()){if("Node"==wr())throw new E("internal-error","The SessionStorage compatibility library was not found.");throw new E("web-storage-unsupported")}this.a=Gu()||t.a.INTERNAL.node.sessionStorage,this.type="sessionStorage"}function Gu(){try{var e=u.sessionStorage,t=Fr();return e&&(e.setItem(t,"1"),e.removeItem(t)),e}catch(n){return null}}function Ku(){var e={};e.Browser=$u,e.Node=Xu,e.ReactNative=Ju,e.Worker=Zu,this.a=e[wr()]}ku.prototype.c=function(e){var t=e.data.eventType,n=e.data.eventId,r=this.a[t];if(r&&0<r.length){e.ports[0].postMessage({status:"ack",eventId:n,eventType:t,response:null});var i=[];W(r,(function(t){i.push(Tt().then((function(){return t(e.origin,e.data.data)})))})),xt(i).then((function(r){var i=[];W(r,(function(e){i.push({fulfilled:e.Ob,value:e.value,reason:e.reason?e.reason.message:void 0})})),W(i,(function(e){for(var t in e)"undefined"===typeof e[t]&&delete e[t]})),e.ports[0].postMessage({status:"done",eventId:n,eventType:t,response:i})}))}},Tu.prototype.postMessage=function(e,t){this.a.postMessage(e,t)},Cu.prototype.close=function(){for(;0<this.a.length;)xu(this,this.a[0]);this.b=!0},(n=Iu.prototype).set=function(e,t){var n,r=!1,i=this;return Ru(this).then((function(t){return Lu((t=Mu(Nu(n=t,!0))).get(e))})).then((function(o){var a=Mu(Nu(n,!0));
2return o?(o.value=t,Lu(a.put(o))):(i.b++,r=!0,(o={}).fbase_key=e,o.value=t,Lu(a.add(o)))})).then((function(){return i.c[e]=t,Du(i,e)})).na((function(){r&&i.b--}))},n.get=function(e){return Ru(this).then((function(t){return Lu(Mu(Nu(t,!1)).get(e))})).then((function(e){return e&&e.value}))},n.T=function(e){var t=!1,n=this;return Ru(this).then((function(r){return t=!0,n.b++,Lu(Mu(Nu(r,!0)).delete(e))})).then((function(){return delete n.c[e],Du(n,e)})).na((function(){t&&n.b--}))},n.ca=function(e){0==this.a.length&&function(e){function t(){e.f=setTimeout((function(){e.i=Fu(e).then((function(t){0<t.length&&W(e.a,(function(e){e(t)}))})).then((function(){t()})).s((function(e){"STOP_EVENT"!=e.message&&t()}))}),800)}Uu(e),t()}(this),this.a.push(e)},n.ia=function(e){Q(this.a,(function(t){return t==e})),0==this.a.length&&Uu(this)},(n=Vu.prototype).get=function(e){return this.b.then((function(t){return t.get(e)}))},n.set=function(e,t){return this.b.then((function(n){return n.set(e,t)}))},n.T=function(e){return this.b.then((function(t){return t.T(e)}))},n.ca=function(e){this.a.push(e)},n.ia=function(e){Q(this.a,(function(t){return t==e}))},(n=Bu.prototype).get=function(e){return Tt(this.a[e])},n.set=function(e,t){return this.a[e]=t,Tt()},n.T=function(e){return delete this.a[e],Tt()},n.ca=function(){},n.ia=function(){},(n=qu.prototype).get=function(e){var t=this;return Tt().then((function(){return Dr(t.a.getItem(e))}))},n.set=function(e,t){var n=this;return Tt().then((function(){var r=Nr(t);null===r?n.T(e):n.a.setItem(e,r)}))},n.T=function(e){var t=this;return Tt().then((function(){t.a.removeItem(e)}))},n.ca=function(e){u.window&&un(u.window,"storage",e)},n.ia=function(e){u.window&&fn(u.window,"storage",e)},(n=zu.prototype).get=function(){return Tt(null)},n.set=function(){return Tt()},n.T=function(){return Tt()},n.ca=function(){},n.ia=function(){},(n=Hu.prototype).get=function(e){var t=this;return Tt().then((function(){return Dr(t.a.getItem(e))}))},n.set=function(e,t){var n=this;return Tt().then((function(){var r=Nr(t);null===r?n.T(e):n.a.setItem(e,r)}))},n.T=function(e){var t=this;return Tt().then((function(){t.a.removeItem(e)}))},n.ca=function(){},n.ia=function(){};var Yu,Qu,$u={D:qu,ab:Hu},Xu={D:qu,ab:Hu},Ju={D:wu,ab:zu},Zu={D:qu,ab:zu},ec={qd:"local",NONE:"none",sd:"session"};function tc(){var e=!(Ur(Pr())||!br()),t=Mr(),n=Ir();this.v=e,this.h=t,this.l=n,this.a={},Yu||(Yu=new Ku),e=Yu;try{this.g=!ur()&&Hr()||!u.indexedDB?new e.a.D:new Vu(_r()?new Bu:new e.a.D)}catch(r){this.g=new Bu,this.h=!0}try{this.i=new e.a.ab}catch(r){this.i=new Bu}this.m=new Bu,this.f=w(this.Xb,this),this.b={}}function nc(){return Qu||(Qu=new tc),Qu}function rc(e,t){switch(t){case"session":return e.i;case"none":return e.m;default:return e.g}}function ic(e,t){return"firebase:"+e.name+(t?":"+t:"")}function oc(e,t,n){return n=ic(t,n),"local"==t.D&&(e.b[n]=null),rc(e,t.D).T(n)}function ac(e){e.c&&(clearInterval(e.c),e.c=null)}function sc(e){this.a=e,this.b=nc()}(n=tc.prototype).get=function(e,t){return rc(this,e.D).get(ic(e,t))},n.set=function(e,t,n){var r=ic(e,n),i=this,o=rc(this,e.D);return o.set(r,t).then((function(){return o.get(r)})).then((function(t){"local"==e.D&&(i.b[r]=t)}))},n.addListener=function(e,t,n){e=ic(e,t),this.l&&(this.b[e]=u.localStorage.getItem(e)),de(this.a)&&(rc(this,"local").ca(this.f),this.h||(ur()||!Hr())&&u.indexedDB||!this.l||function(e){ac(e),e.c=setInterval((function(){for(var t in e.a){var n=u.localStorage.getItem(t),r=e.b[t];n!=r&&(e.b[t]=n,n=new $t({type:"storage",key:t,target:window,oldValue:r,newValue:n,a:!0}),e.Xb(n))}}),1e3)}(this)),this.a[e]||(this.a[e]=[]),this.a[e].push(n)},n.removeListener=function(e,t,n){e=ic(e,t),this.a[e]&&(Q(this.a[e],(function(e){return e==n})),0==this.a[e].length&&delete this.a[e]),de(this.a)&&(rc(this,"local").ia(this.f),ac(this))},n.Xb=function(e){if(e&&e.g){var t=e.a.key;if(null==t)for(var n in this.a){var r=this.b[n];"undefined"===typeof r&&(r=null);var i=u.localStorage.getItem(n);i!==r&&(this.b[n]=i,this.lb(n))}else if(0==t.indexOf("firebase:")&&this.a[t]){if("undefined"!==typeof e.a.a?rc(this,"local").ia(this.f):ac(this),this.v)if(n=u.localStorage.getItem(t),(r=e.a.newValue)!==n)null!==r?u.localStorage.setItem(t,r):u.localStorage.removeItem(t);else if(this.b[t]===r&&"undefined"===typeof e.a.a)return;var o=this;n=function(){"undefined"===typeof e.a.a&&o.b[t]===u.localStorage.getItem(t)||(o.b[t]=u.localStorage.getItem(t),o.lb(t))},Ge&&tt&&10==tt&&u.localStorage.getItem(t)!==e.a.newValue&&e.a.newValue!==e.a.oldValue?setTimeout(n,10):n()}}else W(e,w(this.lb,this))},n.lb=function(e){this.a[e]&&W(this.a[e],(function(e){e()}
2))};var uc,cc={name:"authEvent",D:"local"};function lc(){this.a=nc()}function fc(e,t){this.b=hc,this.f=u.Uint8Array?new Uint8Array(this.b):Array(this.b),this.g=this.c=0,this.a=[],this.i=e,this.h=t,this.l=u.Int32Array?new Int32Array(64):Array(64),void 0===uc&&(uc=u.Int32Array?new Int32Array(bc):bc),this.reset()}O(fc,(function(){this.b=-1}));for(var hc=64,dc=hc-1,pc=[],vc=0;vc<dc;vc++)pc[vc]=0;var yc=$(128,pc);function mc(e){for(var t=e.f,n=e.l,r=0,i=0;i<t.length;)n[r++]=t[i]<<24|t[i+1]<<16|t[i+2]<<8|t[i+3],i=4*r;for(t=16;64>t;t++){i=0|n[t-15],r=0|n[t-2];var o=(0|n[t-16])+((i>>>7|i<<25)^(i>>>18|i<<14)^i>>>3)|0,a=(0|n[t-7])+((r>>>17|r<<15)^(r>>>19|r<<13)^r>>>10)|0;n[t]=o+a|0}r=0|e.a[0],i=0|e.a[1];var s=0|e.a[2],u=0|e.a[3],c=0|e.a[4],l=0|e.a[5],f=0|e.a[6];for(o=0|e.a[7],t=0;64>t;t++){var h=((r>>>2|r<<30)^(r>>>13|r<<19)^(r>>>22|r<<10))+(r&i^r&s^i&s)|0;a=(o=o+((c>>>6|c<<26)^(c>>>11|c<<21)^(c>>>25|c<<7))|0)+((a=(a=c&l^~c&f)+(0|uc[t])|0)+(0|n[t])|0)|0,o=f,f=l,l=c,c=u+a|0,u=s,s=i,i=r,r=a+h|0}e.a[0]=e.a[0]+r|0,e.a[1]=e.a[1]+i|0,e.a[2]=e.a[2]+s|0,e.a[3]=e.a[3]+u|0,e.a[4]=e.a[4]+c|0,e.a[5]=e.a[5]+l|0,e.a[6]=e.a[6]+f|0,e.a[7]=e.a[7]+o|0}function gc(e,t,n){void 0===n&&(n=t.length);var r=0,i=e.c;if("string"===typeof t)for(;r<n;)e.f[i++]=t.charCodeAt(r++),i==e.b&&(mc(e),i=0);else{if(!d(t))throw Error("message must be string or array");for(;r<n;){var o=t[r++];if(!("number"==typeof o&&0<=o&&255>=o&&o==(0|o)))throw Error("message must be a byte array");e.f[i++]=o,i==e.b&&(mc(e),i=0)}}e.c=i,e.g+=n}fc.prototype.reset=function(){this.g=this.c=0,this.a=u.Int32Array?new Int32Array(this.h):X(this.h)};var bc=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298];function _c(){fc.call(this,8,wc)}O(_c,fc);var wc=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225];function kc(e,t,n,r,i,o){this.m=e,this.i=t,this.l=n,this.v=r||null,this.u=i||null,this.o=o,this.h=t+":"+n,this.A=new lc,this.g=new sc(this.h),this.f=null,this.b=[],this.a=this.c=null}function Sc(e){return new E("invalid-cordova-configuration",e)}function Oc(e){var t=new _c;gc(t,e),e=[];var n=8*t.g;56>t.c?gc(t,yc,56-t.c):gc(t,yc,t.b-(t.c-56));for(var r=63;56<=r;r--)t.f[r]=255&n,n/=256;for(mc(t),r=n=0;r<t.i;r++)for(var i=24;0<=i;i-=8)e[n++]=t.a[r]>>i&255;return function(e){return H(e,(function(e){return 1<(e=e.toString(16)).length?e:"0"+e})).join("")}(e)}function Ec(e,t){for(var n=0;n<e.b.length;n++)try{e.b[n](t)}catch(r){}}function Tc(e){return e.f||(e.f=e.la().then((function(){return new bt((function(t){e.Ea((function n(r){return t(r),e.Ra(n),!1})),function(e){function t(t){r=!0,i&&i.cancel(),Cc(e).then((function(r){var i=n;if(r&&t&&t.url){var o=null;-1!=(i=oo(t.url)).indexOf("/__/auth/callback")&&(o=(o="object"===typeof(o=Dr(Dn(o=Fn(i),"firebaseError")||null))?T(o):null)?new Bo(r.c,r.b,null,null,o,null,r.S()):new Bo(r.c,r.b,i,r.f,null,null,r.S())),i=o||n}Ec(e,i)}))}var n=new Bo("unknown",null,null,null,new E("no-auth-event")),r=!1,i=En(500).then((function(){return Cc(e).then((function(){r||Ec(e,n)}))})),o=u.handleOpenURL;u.handleOpenURL=function(e){if(0==e.toLowerCase().indexOf(xr("BuildInfo.packageName",u).toLowerCase()+"://")&&t({url:e}),"function"===typeof o)try{o(e)}catch(n){console.error(n)}},Ho||(Ho=new Wo),function(e){var t=Ho;t.a.push(e),t.b||(t.b=function(e){for(var n=0;n<t.a.length;n++)t.a[n](e)},"function"===typeof(e=xr("universalLinks.subscribe",u))&&e(null,t.b))}(t)}(e)}))}))),e.f}function Cc(e){var t=null;return function(e){return e.b.get(cc,e.a).then((function(e){return qo(e)}))}(e.g).then((function(n){return t=n,oc((n=e.g).b,cc,n.a)})).then((function(){return t}))}function Pc(e){this.a=e,this.b=nc()}(n=kc.prototype).la=function(){return this.Ia?this.Ia:this.Ia=(gr(void 0)?mr().then((function(){return new bt((function(e,t){var n=u.document,r=setTimeout((function(){t(Error("Cordova framework is not ready."))}),1e3);n.addEventListener("deviceready",(function(){clearTimeout(r),e()}),!1)}))})):Ct(Error("Cordova must run in an Android or iOS file scheme."))).then((function(){if("function"!==typeof xr("universalLinks.subscribe",u))throw Sc("cordova-universal-links-plugin-fix is not installed");if("undefined"===typeof xr("BuildInfo.packageName",u))throw Sc("cordova-plugin-buildinfo is not installed");if("function"!==typeof xr("cordova.plugins.browsertab.openUrl",u))throw Sc("cordova-plugin-browsertab is not installed");if("function"!==typeof xr("cordova.InAppBrowser.open",u))throw Sc("cordova-plugin-inappbrowser is not installed")}),(function(){throw new E("cordova-not-ready")}))},n.Nb=function(e,t){return t(new E("operation-not-supported-in-this-environment")),Tt()},n.Lb=function(){return Ct(new E("operation-not-supported-in-this-environment"))},n.Zb=function(){return!1},n.Wb=function(){return!0},n.Sb=function(){return!0},n.Mb=function(e,t,n,r){if(this.c)return Ct(new E("redirect-operation-pending"));var i=this,o=u.document,a=null,s=null,c=null,l=null;return this.c=Tt().then((function(){return Vo(t),Tc(i)})).then((function(){return function(e,t,n,r,i){var o=function(){for(var e=20,t=[];0<e;)t.push("1234567890abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ".charAt(Math.floor(62*Math.random()))),e--;return t.join("")}(),a=new Bo(t,r,null,o,new E("no-auth-event"),null,i),s=xr("BuildInfo.packageName",u);if("string"!==typeof s)throw new E("invalid-cordova-configuration");var c=xr("BuildInfo.displayName",u),l={};if(Pr().toLowerCase().match(/iphone|ipad|ipod/))l.ibi=s;else{if(!Pr().toLowerCase().match(/android/))return Ct(new E("operation-not-supported-in-this-environment"));l.apn=s}c&&(l.appDisplayName=c),o=Oc(o),l.sessionId=o;var f=_u(e.m,e.i,e.l,t,n,null,r,e.v,l,e.u,i,e.o);return e.la().then((function(){var t=e.h;return e.A.a.set(cc,a.w(),t)})).then((function(){var t=xr("cordova.plugins.browsertab.isAvailable",u);if("function"!==typeof t)throw new E("invalid-cordova-configuration");var n=null;t((function(t){if(t){if("function"!==typeof(n=xr("cordova.plugins.browsertab.openUrl",u)))throw new E("invalid-cordova-configuration");n(f)}else{if("function"!==typeof(n=xr("cordova.InAppBrowser.open",u)))throw new E("invalid-cordova-configuration");t=Pr(),e.a=n(f,t.match(/(iPad|iPhone|iPod).*OS 7_\d/i)||t.match(/(iPad|iPhone|iPod).*OS 8_\d/i)?"_blank":"_system","location=yes")}}))}))}(i,e,t,n,r)})).then((function(){return new bt((function(e,t){s=function(){var t=xr("cordova.plugins.browsertab.close",u);return e(),"function"===typeof t&&t(),i.a&&"function"===typeof i.a.close&&(i.a.close(),i.a=null),!1},i.Ea(s),c=function(){a||(a=En(2e3).then((function(){t(new E("redirect-cancelled-by-user"))})))},l=function(){qr()&&c()},o.addEventListener("resume",c,!1),Pr().toLowerCase().match(/android/)||o.addEventListener("visibilitychange",l,!1)})).s((function(e){return Cc(i).then((function(){throw e}))}))})).na((function(){c&&o.removeEventListener("resume",c,!1),l&&o.removeEventListener("visibilitychange",l,!1),a&&a.cancel(),s&&i.Ra(s),i.c=null}))},n.Ea=function(e){this.b.push(e),Tc(this).s((function(t){"auth/invalid-cordova-configuration"===t.code&&(t=new Bo("unknown",null,null,null,new E("no-auth-event")),e(t))}))},n.Ra=function(e){Q(this.b,(function(t){return t==e}))};var xc={name:"pendingRedirect",D:"session"};function Ic(e){return oc(e.b,xc,e.a)}function jc(e,t,n,r){this.i={},this.u=0,this.O=e,this.m=t,this.v=n,this.G=r,this.h=[],this.f=!1,this.l=w(this.o,this),this.b=new Gc,this.A=new Xc,this.g=new Pc(zc(this.m,this.v)),this.c={},this.c.unknown=this.b,this.c.signInViaRedirect=this.b,this.c.linkViaRedirect=this.b,this.c.reauthViaRedirect=this.b,this.c.signInViaPopup=this.A,this.c.linkViaPopup=this.A,this.c.reauthViaPopup=this.A,this.a=Rc(this.O,this.m,this.v,C,this.G)}function Rc(e,n,r,i,o){var a=t.a.SDK_VERSION||null;return gr()?new kc(e,n,r,a,i,o):new yu(e,n,r,a,i,o)}function Ac(e){e.f||(e.f=!0,e.a.Ea(e.l));var t=e.a;return e.a.la().s((function(n){throw e.a==t&&e.reset(),n}))}function Mc(e){e.a.Wb()&&Ac(e).s((function(t){var n=new Bo("unknown",null,null,null,new E("operation-not-supported-in-this-environment"));Vc(t)&&e.o(n)})),e.a.Sb()||Kc(e.b)}function Nc(e,t){K(e.h,t)||e.h.push(t),e.f||function(e){return e.b.get(xc,e.a).then((function(e){return"pending"==e}))}(e.g).then((function(t){t?Ic(e.g).then((function(){Ac(e).s((function(t){var n=new Bo("unknown",null,null,null,new E("operation-not-supported-in-this-environment"));Vc(t)&&e.o(n)}))})):Mc(e)})).s((function(){Mc(e)}))}function Lc(e,t){Q(e.h,(function(e){return e==t}))}jc.prototype.reset=function(){this.f=!1,this.a.Ra(this.l),this.a=Rc(this.O,this.m,this.v,null,this.G),this.i={}},jc.prototype.o=function(e){if(!e)throw new E("invalid-auth-event");
2if(6e5<=S()-this.u&&(this.i={},this.u=0),e&&e.getUid()&&this.i.hasOwnProperty(e.getUid()))return!1;for(var t=!1,n=0;n<this.h.length;n++){var r=this.h[n];if(r.Eb(e.c,e.b)){(t=this.c[e.c])&&(t.h(e,r),e&&(e.f||e.b)&&(this.i[e.getUid()]=!0,this.u=S())),t=!0;break}}return Kc(this.b),t};var Dc=new Br(2e3,1e4),Fc=new Br(3e4,6e4);function Uc(e,t,n,r,i,o,a){return e.a.Lb(t,n,r,(function(){e.f||(e.f=!0,e.a.Ea(e.l))}),(function(){e.reset()}),i,o,a)}function Vc(e){return!(!e||"auth/cordova-not-ready"!=e.code)}function Bc(e,t,n,r,i){var o;return function(e){return e.b.set(xc,"pending",e.a)}(e.g).then((function(){return e.a.Mb(t,n,r,i).s((function(t){if(Vc(t))throw new E("operation-not-supported-in-this-environment");return o=t,Ic(e.g).then((function(){throw o}))})).then((function(){return e.a.Zb()?new bt((function(){})):Ic(e.g).then((function(){return e.qa()})).then((function(){})).s((function(){}))}))}))}function qc(e,t,n,r,i){return e.a.Nb(r,(function(e){t.ma(n,null,e,i)}),Dc.get())}jc.prototype.qa=function(){return this.b.qa()};var Wc={};function zc(e,t,n){return e=e+":"+t,n&&(e=e+":"+n.url),e}function Hc(e,t,n,r){var i=zc(t,n,r);return Wc[i]||(Wc[i]=new jc(e,t,n,r)),Wc[i]}function Gc(){this.b=null,this.f=[],this.c=[],this.a=null,this.i=this.g=!1}function Kc(e){e.g||(e.g=!0,$c(e,!1,null,null))}function Yc(e){e.g&&!e.i&&$c(e,!1,null,null)}function Qc(e,t){if(e.b=function(){return Tt(t)},e.f.length)for(var n=0;n<e.f.length;n++)e.f[n](t)}function $c(e,t,n,r){t?r?function(e,t){if(e.b=function(){return Ct(t)},e.c.length)for(var n=0;n<e.c.length;n++)e.c[n](t)}(e,r):Qc(e,n):Qc(e,{user:null}),e.f=[],e.c=[]}function Xc(){}function Jc(){this.hb=!1,Object.defineProperty(this,"appVerificationDisabled",{get:function(){return this.hb},set:function(e){this.hb=e},enumerable:!1})}function Zc(e,t){this.a=t,$r(this,"verificationId",e)}function el(e,t,n,r){return new Do(e).eb(t,n).then((function(e){return new Zc(e,r)}))}function tl(e){var t=Hi(e);if(!(t&&t.exp&&t.auth_time&&t.iat))throw new E("internal-error","An internal error occurred. The token obtained by Firebase appears to be malformed. Please retry the operation.");Xr(this,{token:e,expirationTime:zr(1e3*t.exp),authTime:zr(1e3*t.auth_time),issuedAtTime:zr(1e3*t.iat),signInProvider:t.firebase&&t.firebase.sign_in_provider?t.firebase.sign_in_provider:null,signInSecondFactor:t.firebase&&t.firebase.sign_in_second_factor?t.firebase.sign_in_second_factor:null,claims:t})}function nl(e,t,n){var r=t&&t[il];if(!r)throw new E("argument-error","Internal assert: Invalid MultiFactorResolver");this.a=e,this.f=pe(t),this.g=n,this.c=new ao(null,r),this.b=[];var i=this;W(t[rl]||[],(function(e){(e=ti(e))&&i.b.push(e)})),$r(this,"auth",this.a),$r(this,"session",this.c),$r(this,"hints",this.b)}Gc.prototype.reset=function(){this.b=null,this.a&&(this.a.cancel(),this.a=null)},Gc.prototype.h=function(e,t){if(e){this.reset(),this.g=!0;var n=e.c,r=e.b,i=e.a&&"auth/web-storage-unsupported"==e.a.code,o=e.a&&"auth/operation-not-supported-in-this-environment"==e.a.code;this.i=!(!i&&!o),"unknown"!=n||i||o?e.a?($c(this,!0,null,e.a),Tt()):t.Fa(n,r)?function(e,t,n){n=n.Fa(t.c,t.b);var r=t.g,i=t.f,o=t.i,a=t.S(),s=!!t.c.match(/Redirect$/);n(r,i,a,o).then((function(t){$c(e,s,t,null)})).s((function(t){$c(e,s,null,t)}))}(this,e,t):Ct(new E("invalid-auth-event")):($c(this,!1,null,null),Tt())}else Ct(new E("invalid-auth-event"))},Gc.prototype.qa=function(){var e=this;return new bt((function(t,n){e.b?e.b().then(t,n):(e.f.push(t),e.c.push(n),function(e){var t=new E("timeout");e.a&&e.a.cancel(),e.a=En(Fc.get()).then((function(){e.b||(e.g=!0,$c(e,!0,null,t))}))}(e))}))},Xc.prototype.h=function(e,t){if(e){var n=e.c,r=e.b;e.a?(t.ma(e.c,null,e.a,e.b),Tt()):t.Fa(n,r)?function(e,t){var n=e.b,r=e.c;t.Fa(r,n)(e.g,e.f,e.S(),e.i).then((function(e){t.ma(r,e,null,n)})).s((function(e){t.ma(r,null,e,n)}))}(e,t):Ct(new E("invalid-auth-event"))}else Ct(new E("invalid-auth-event"))},Zc.prototype.confirm=function(e){return e=Fo(this.verificationId,e),this.a(e)};var rl="mfaInfo",il="mfaPendingCredential";function ol(e,t,n,r){E.call(this,"multi-factor-auth-required",r,t),this.b=new nl(e,t,n),$r(this,"resolver",this.b)}function al(e,t,n){if(e&&v(e.serverResponse)&&"auth/multi-factor-auth-required"===e.code)try{return new ol(t,e.serverResponse,n,e.message)}catch(r){}return null}function sl(){}function ul(e){$r(this,"factorId",e.fa),this.a=e}function cl(e){if(ul.call(this,e),this.a.fa!=Do.PROVIDER_ID)throw new E("argument-error","firebase.auth.PhoneMultiFactorAssertion requires a valid firebase.auth.PhoneAuthCredential")}function ll(e,t){for(var n in Qt.call(this,e),t)this[n]=t[n]}function fl(e,t){this.a=e,this.b=[],this.c=w(this.xc,this),un(this.a,"userReloaded",this.c);var n=[];t&&t.multiFactor&&t.multiFactor.enrolledFactors&&W(t.multiFactor.enrolledFactors,(function(e){var t=null,r={};if(e){e.uid&&(r[ii]=e.uid),e.displayName&&(r[ni]=e.displayName),e.enrollmentTime&&(r[ri]=new Date(e.enrollmentTime).toISOString()),e.phoneNumber&&(r[oi]=e.phoneNumber);try{t=new ai(r)}catch(i){}e=t}else e=null;e&&n.push(e)})),hl(this,n)}function hl(e,t){e.b=t,$r(e,"enrolledFactors",t)}function dl(e,t,n){if(this.h=e,this.i=t,this.g=n,this.c=3e4,this.f=96e4,this.b=null,this.a=this.c,this.f<this.c)throw Error("Proactive refresh lower bound greater than upper bound!")}function pl(e,t){e.stop(),e.b=En(function(e,t){return t?(e.a=e.c,e.g()):(t=e.a,e.a*=2,e.a>e.f&&(e.a=e.f),t)}(e,t)).then((function(){return function(){var e=u.document,t=null;return qr()||!e?Tt():new bt((function(n){t=function(){qr()&&(e.removeEventListener("visibilitychange",t,!1),n())},e.addEventListener("visibilitychange",t,!1)})).s((function(n){throw e.removeEventListener("visibilitychange",t,!1),n}))}()})).then((function(){return e.h()})).then((function(){pl(e,!0)})).s((function(t){e.i(t)&&pl(e,!1)}))}function vl(e){this.c=e,this.b=this.a=null}function yl(e){return e.b&&1e3*e.b.c||0}function ml(e,t){var n=t.refreshToken;e.b=zi(t[es]||""),e.a=n}function gl(e,t){return function(e,t){return new bt((function(n,r){"refresh_token"==t.grant_type&&t.refresh_token||"authorization_code"==t.grant_type&&t.code?cs(e,e.l+"?key="+encodeURIComponent(e.c),(function(e){e?e.error?r(su(e)):e.access_token&&e.refresh_token?n(e):r(new E("internal-error")):r(new E("network-request-failed"))}),"POST",$n(t).toString(),e.g,e.v.get()):r(new E("internal-error"))}))}(e.c,t).then((function(t){return e.b=zi(t.access_token),e.a=t.refresh_token,{accessToken:e.b.toString(),refreshToken:e.a}})).s((function(t){throw"auth/user-token-expired"==t.code&&(e.a=null),t}))}function bl(e,t){this.a=e||null,this.b=t||null,Xr(this,{lastSignInTime:zr(t||null),creationTime:zr(e||null)})}
2function _l(e,t,n,r,i,o){Xr(this,{uid:e,displayName:r||null,photoURL:i||null,email:n||null,phoneNumber:o||null,providerId:t})}function wl(e,n,r){this.G=[],this.l=e.apiKey,this.m=e.appName,this.o=e.authDomain||null;var i=t.a.SDK_VERSION?Cr(t.a.SDK_VERSION):null;this.a=new Ja(this.l,j(C),i),e.emulatorConfig&&as(this.a,e.emulatorConfig),this.b=new vl(this.a),xl(this,n[es]),ml(this.b,n),$r(this,"refreshToken",this.b.a),Rl(this,r||{}),_n.call(this),this.P=!1,this.o&&jr()&&(this.i=Hc(this.o,this.l,this.m)),this.R=[],this.f=null,this.u=function(e){return new dl((function(){return e.I(!0)}),(function(e){return!(!e||"auth/network-request-failed"!=e.code)}),(function(){var t=yl(e.b)-S()-3e5;return 0<t?t:0}))}(this),this.$=w(this.gb,this);var o=this;this.pa=null,this.Ba=function(e){o.wa(e.h)},this.ba=null,this.za=function(e){as(o.a,e.c)},this.W=null,this.X=[],this.Aa=function(e){Ol(o,e.f)},this.aa=null,this.N=new fl(this,r),$r(this,"multiFactor",this.N)}function kl(e,t){e.ba&&fn(e.ba,"languageCodeChanged",e.Ba),(e.ba=t)&&un(t,"languageCodeChanged",e.Ba)}function Sl(e,t){e.W&&fn(e.W,"emulatorConfigChanged",e.za),(e.W=t)&&un(t,"emulatorConfigChanged",e.za)}function Ol(e,n){e.X=n,us(e.a,t.a.SDK_VERSION?Cr(t.a.SDK_VERSION,e.X):null)}function El(e,t){e.aa&&fn(e.aa,"frameworkChanged",e.Aa),(e.aa=t)&&un(t,"frameworkChanged",e.Aa)}function Tl(e){try{return t.a.app(e.m).auth()}catch(n){throw new E("internal-error","No firebase.auth.Auth instance is available for the Firebase App '"+e.m+"'!")}}function Cl(e){e.A||e.u.b||(e.u.start(),fn(e,"tokenChanged",e.$),un(e,"tokenChanged",e.$))}function Pl(e){fn(e,"tokenChanged",e.$),e.u.stop()}function xl(e,t){e.ya=t,$r(e,"_lat",t)}function Il(e){for(var t=[],n=0;n<e.R.length;n++)t.push(e.R[n](e));return xt(t).then((function(){return e}))}function jl(e){e.i&&!e.P&&(e.P=!0,Nc(e.i,e))}function Rl(e,t){Xr(e,{uid:t.uid,displayName:t.displayName||null,photoURL:t.photoURL||null,email:t.email||null,emailVerified:t.emailVerified||!1,phoneNumber:t.phoneNumber||null,isAnonymous:t.isAnonymous||!1,tenantId:t.tenantId||null,metadata:new bl(t.createdAt,t.lastLoginAt),providerData:[]}),e.a.b=e.tenantId}function Al(){}function Ml(e){return Tt().then((function(){if(e.A)throw new E("app-deleted")}))}function Nl(e){return H(e.providerData,(function(e){return e.providerId}))}function Ll(e,t){t&&(Dl(e,t.providerId),e.providerData.push(t))}function Dl(e,t){Q(e.providerData,(function(e){return e.providerId==t}))}function Fl(e,t,n){("uid"!=t||n)&&e.hasOwnProperty(t)&&$r(e,t,n)}function Ul(e,t){e!=t&&(Xr(e,{uid:t.uid,displayName:t.displayName,photoURL:t.photoURL,email:t.email,emailVerified:t.emailVerified,phoneNumber:t.phoneNumber,isAnonymous:t.isAnonymous,tenantId:t.tenantId,providerData:[]}),t.metadata?$r(e,"metadata",function(e){return new bl(e.a,e.b)}(t.metadata)):$r(e,"metadata",new bl),W(t.providerData,(function(t){Ll(e,t)})),function(e,t){e.b=t.b,e.a=t.a}(e.b,t.b),$r(e,"refreshToken",e.b.a),hl(e.N,t.N.b))}function Vl(e){return e.I().then((function(t){var n=e.isAnonymous;return function(e,t){return ou(e.a,Ls,{idToken:t}).then(w(e.Jc,e))}(e,t).then((function(){return n||Fl(e,"isAnonymous",!1),t}))}))}function Bl(e,t){t[es]&&e.ya!=t[es]&&(ml(e.b,t),e.dispatchEvent(new ll("tokenChanged")),xl(e,t[es]),Fl(e,"refreshToken",e.b.a))}function ql(e,t){return Vl(e).then((function(){if(K(Nl(e),t))return Il(e).then((function(){throw new E("provider-already-linked")}))}))}function Wl(e,t,n){return Jr({user:e,credential:Uo(t),additionalUserInfo:t=$i(t),operationType:n})}function zl(e,t){return Bl(e,t),e.reload().then((function(){return e}))}function Hl(e,n,r,i,o){if(!jr())return Ct(new E("operation-not-supported-in-this-environment"));if(e.f&&!o)return Ct(e.f);var a=Qi(r.providerId),s=Fr(e.uid+":::"),u=null;(!Mr()||br())&&e.o&&r.isOAuthProvider&&(u=_u(e.o,e.l,e.m,n,r,null,s,t.a.SDK_VERSION||null,null,null,e.tenantId));var c=pr(u,a&&a.ua,a&&a.ta);return i=i().then((function(){if(Kl(e),!o)return e.I().then((function(){}))})).then((function(){return Uc(e.i,c,n,r,s,!!u,e.tenantId)})).then((function(){return new bt((function(t,r){e.ma(n,null,new E("cancelled-popup-request"),e.h||null),e.g=t,e.O=r,e.h=s,e.c=qc(e.i,e,n,c,s)}))})).then((function(e){return c&&dr(c),e?Jr(e):null})).s((function(e){throw c&&dr(c),e})),Yl(e,i,o)}function Gl(e,t,n,r,i){if(!jr())return Ct(new E("operation-not-supported-in-this-environment"));if(e.f&&!i)return Ct(e.f);var o=null,a=Fr(e.uid+":::");return r=r().then((function(){if(Kl(e),!i)return e.I().then((function(){}))})).then((function(){return e.ga=a,Il(e)})).then((function(t){return e.ha&&(t=(t=e.ha).b.set(Xl,e.w(),t.a)),t})).then((function(){return Bc(e.i,t,n,a,e.tenantId)})).s((function(t){if(o=t,e.ha)return Jl(e.ha);throw o})).then((function(){if(o)throw o})),Yl(e,r,i)}function Kl(e){if(!e.i||!e.P){if(e.i&&!e.P)throw new E("internal-error");throw new E("auth-domain-config-required")}}function Yl(e,t,n){var r=function(e,t,n){return e.f&&!n?(t.cancel(),Ct(e.f)):t.s((function(t){throw!t||"auth/user-disabled"!=t.code&&"auth/user-token-expired"!=t.code||(e.f||e.dispatchEvent(new ll("userInvalidated")),e.f=t),t}))}
2(e,t,n);return e.G.push(r),r.na((function(){Y(e.G,r)})),r.s((function(t){var n=null;throw t&&"auth/multi-factor-auth-required"===t.code&&(n=al(t.w(),Tl(e),w(e.ic,e))),n||t}))}function Ql(e){if(!e.apiKey)return null;var t={apiKey:e.apiKey,authDomain:e.authDomain,appName:e.appName,emulatorConfig:e.emulatorConfig},n={};if(!e.stsTokenManager||!e.stsTokenManager.accessToken)return null;n[es]=e.stsTokenManager.accessToken,n.refreshToken=e.stsTokenManager.refreshToken||null;var r=new wl(t,n,e);return e.providerData&&W(e.providerData,(function(e){e&&Ll(r,Jr(e))})),e.redirectEventId&&(r.ga=e.redirectEventId),r}function $l(e){this.a=e,this.b=nc()}nl.prototype.Qc=function(e){var t=this;return e.rb(this.a.a,this.c).then((function(e){var n=pe(t.f);return delete n[rl],delete n[il],ye(n,e),t.g(n)}))},O(ol,E),sl.prototype.rb=function(e,t,n){return t.type==so?function(e,t,n,r){return n.Ha().then((function(n){return n={idToken:n},"undefined"!==typeof r&&(n.displayName=r),ye(n,{phoneVerificationInfo:Lo(e.a)}),ou(t,Ms,n)}))}(this,e,t,n):function(e,t,n){return n.Ha().then((function(n){return ye(n={mfaPendingCredential:n},{phoneVerificationInfo:Lo(e.a)}),ou(t,Ns,n)}))}(this,e,t)},O(ul,sl),O(cl,ul),O(ll,Qt),(n=fl.prototype).xc=function(e){hl(this,function(e){var t=[];return W(e.mfaInfo||[],(function(e){(e=ti(e))&&t.push(e)})),t}(e.gd))},n.Qb=function(){return this.a.I().then((function(e){return new ao(e,null)}))},n.ec=function(e,t){var n=this,r=this.a.a;return this.Qb().then((function(n){return e.rb(r,n,t)})).then((function(e){return Bl(n.a,e),n.a.reload()}))},n.ad=function(e){var t=this,n="string"===typeof e?e:e.uid,r=this.a.a;return this.a.I().then((function(e){return ou(r,iu,{idToken:e,mfaEnrollmentId:n})})).then((function(e){var r=z(t.b,(function(e){return e.uid!=n}));return hl(t,r),Bl(t.a,e),t.a.reload().s((function(e){if("auth/user-token-expired"!=e.code)throw e}))}))},n.w=function(){return{multiFactor:{enrolledFactors:H(this.b,(function(e){return e.w()}))}}},dl.prototype.start=function(){this.a=this.c,pl(this,!0)},dl.prototype.stop=function(){this.b&&(this.b.cancel(),this.b=null)},vl.prototype.w=function(){return{apiKey:this.c.c,refreshToken:this.a,accessToken:this.b&&this.b.toString(),expirationTime:yl(this)}},vl.prototype.getToken=function(e){return e=!!e,this.b&&!this.a?Ct(new E("user-token-expired")):e||!this.b||S()>yl(this)-3e4?this.a?gl(this,{grant_type:"refresh_token",refresh_token:this.a}):Tt(null):Tt({accessToken:this.b.toString(),refreshToken:this.a})},bl.prototype.w=function(){return{lastLoginAt:this.b,createdAt:this.a}},O(wl,_n),wl.prototype.wa=function(e){this.pa=e,os(this.a,e)},wl.prototype.ka=function(){return this.pa},wl.prototype.Ga=function(){return X(this.X)},wl.prototype.gb=function(){this.u.b&&(this.u.stop(),this.u.start())},$r(wl.prototype,"providerId","firebase"),(n=wl.prototype).reload=function(){var e=this;return Yl(this,Ml(this).then((function(){return Vl(e).then((function(){return Il(e)})).then(Al)})))},n.nc=function(e){return this.I(e).then((function(e){return new tl(e)}))},n.I=function(e){var t=this;return Yl(this,Ml(this).then((function(){return t.b.getToken(e)})).then((function(e){if(!e)throw new E("internal-error");return e.accessToken!=t.ya&&(xl(t,e.accessToken),t.dispatchEvent(new ll("tokenChanged"))),Fl(t,"refreshToken",e.refreshToken),e.accessToken})))},n.Jc=function(e){if(!(e=e.users)||!e.length)throw new E("internal-error");Rl(this,{uid:(e=e[0]).localId,displayName:e.displayName,photoURL:e.photoUrl,email:e.email,emailVerified:!!e.emailVerified,phoneNumber:e.phoneNumber,lastLoginAt:e.lastLoginAt,createdAt:e.createdAt,tenantId:e.tenantId});for(var t=function(e){return(e=e.providerUserInfo)&&e.length?H(e,(function(e){return new _l(e.rawId,e.providerId,e.email,e.displayName,e.photoUrl,e.phoneNumber)})):[]}(e),n=0;n<t.length;n++)Ll(this,t[n]);Fl(this,"isAnonymous",!(this.email&&e.passwordHash)&&!(this.providerData&&this.providerData.length)),this.dispatchEvent(new ll("userReloaded",{gd:e}))},n.Kc=function(e){return Yr("firebase.User.prototype.reauthenticateAndRetrieveDataWithCredential is deprecated. Please use firebase.User.prototype.reauthenticateWithCredential instead."),this.sb(e)},n.sb=function(e){var t=this,n=null;return Yl(this,e.c(this.a,this.uid).then((function(e){return Bl(t,e),n=Wl(t,e,"reauthenticate"),t.f=null,t.reload()})).then((function(){return n})),!0)},n.Bc=function(e){return Yr("firebase.User.prototype.linkAndRetrieveDataWithCredential is deprecated. Please use firebase.User.prototype.linkWithCredential instead."),this.pb(e)},n.pb=function(e){var t=this,n=null;return Yl(this,ql(this,e.providerId).then((function(){return t.I()})).then((function(n){return e.b(t.a,n)})).then((function(e){return n=Wl(t,e,"link"),zl(t,e)})).then((function(){return n})))},n.Cc=function(e,t){var n=this;return Yl(this,ql(this,"phone").then((function(){return el(Tl(n),e,t,w(n.pb,n))}
2)))},n.Lc=function(e,t){var n=this;return Yl(this,Tt().then((function(){return el(Tl(n),e,t,w(n.sb,n))})),!0)},n.Ab=function(e){var t=this;return Yl(this,this.I().then((function(n){return t.a.Ab(n,e)})).then((function(e){return Bl(t,e),t.reload()})))},n.dd=function(e){var t=this;return Yl(this,this.I().then((function(n){return e.b(t.a,n)})).then((function(e){return Bl(t,e),t.reload()})))},n.Bb=function(e){var t=this;return Yl(this,this.I().then((function(n){return t.a.Bb(n,e)})).then((function(e){return Bl(t,e),t.reload()})))},n.Cb=function(e){if(void 0===e.displayName&&void 0===e.photoURL)return Ml(this);var t=this;return Yl(this,this.I().then((function(n){return t.a.Cb(n,{displayName:e.displayName,photoUrl:e.photoURL})})).then((function(e){return Bl(t,e),Fl(t,"displayName",e.displayName||null),Fl(t,"photoURL",e.photoUrl||null),W(t.providerData,(function(e){"password"===e.providerId&&($r(e,"displayName",t.displayName),$r(e,"photoURL",t.photoURL))})),Il(t)})).then(Al))},n.bd=function(e){var t=this;return Yl(this,Vl(this).then((function(n){return K(Nl(t),e)?function(e,t,n){return ou(e,js,{idToken:t,deleteProvider:n})}(t.a,n,[e]).then((function(e){var n={};return W(e.providerUserInfo||[],(function(e){n[e.providerId]=!0})),W(Nl(t),(function(e){n[e]||Dl(t,e)})),n[Do.PROVIDER_ID]||$r(t,"phoneNumber",null),Il(t)})):Il(t).then((function(){throw new E("no-such-provider")}))})))},n.delete=function(){var e=this;return Yl(this,this.I().then((function(t){return ou(e.a,Is,{idToken:t})})).then((function(){e.dispatchEvent(new ll("userDeleted"))}))).then((function(){for(var t=0;t<e.G.length;t++)e.G[t].cancel("app-deleted");kl(e,null),Sl(e,null),El(e,null),e.G=[],e.A=!0,Pl(e),$r(e,"refreshToken",null),e.i&&Lc(e.i,e)}))},n.Eb=function(e,t){return!!("linkViaPopup"==e&&(this.h||null)==t&&this.g||"reauthViaPopup"==e&&(this.h||null)==t&&this.g||"linkViaRedirect"==e&&(this.ga||null)==t||"reauthViaRedirect"==e&&(this.ga||null)==t)},n.ma=function(e,t,n,r){"linkViaPopup"!=e&&"reauthViaPopup"!=e||r!=(this.h||null)||(n&&this.O?this.O(n):t&&!n&&this.g&&this.g(t),this.c&&(this.c.cancel(),this.c=null),delete this.g,delete this.O)},n.Fa=function(e,t){return"linkViaPopup"==e&&t==(this.h||null)?w(this.Jb,this):"reauthViaPopup"==e&&t==(this.h||null)?w(this.Kb,this):"linkViaRedirect"==e&&(this.ga||null)==t?w(this.Jb,this):"reauthViaRedirect"==e&&(this.ga||null)==t?w(this.Kb,this):null},n.Dc=function(e){var t=this;return Hl(this,"linkViaPopup",e,(function(){return ql(t,e.providerId).then((function(){return Il(t)}))}),!1)},n.Mc=function(e){return Hl(this,"reauthViaPopup",e,(function(){return Tt()}),!0)},n.Ec=function(e){var t=this;
2return Gl(this,"linkViaRedirect",e,(function(){return ql(t,e.providerId)}),!1)},n.Nc=function(e){return Gl(this,"reauthViaRedirect",e,(function(){return Tt()}),!0)},n.Jb=function(e,t,n,r){var i=this;this.c&&(this.c.cancel(),this.c=null);var o=null;return Yl(this,this.I().then((function(n){return Ss(i.a,{requestUri:e,postBody:r,sessionId:t,idToken:n})})).then((function(e){return o=Wl(i,e,"link"),zl(i,e)})).then((function(){return o})))},n.Kb=function(e,t,n,r){var i=this;this.c&&(this.c.cancel(),this.c=null);var o=null;return Yl(this,Tt().then((function(){return lo(Os(i.a,{requestUri:e,sessionId:t,postBody:r,tenantId:n}),i.uid)})).then((function(e){return o=Wl(i,e,"reauthenticate"),Bl(i,e),i.f=null,i.reload()})).then((function(){return o})),!0)},n.tb=function(e){var t=this,n=null;return Yl(this,this.I().then((function(t){return n=t,"undefined"===typeof e||de(e)?{}:Vi(new Ii(e))})).then((function(e){return t.a.tb(n,e)})).then((function(e){if(t.email!=e)return t.reload()})).then((function(){})))},n.Db=function(e,t){var n=this,r=null;return Yl(this,this.I().then((function(e){return r=e,"undefined"===typeof t||de(t)?{}:Vi(new Ii(t))})).then((function(t){return n.a.Db(r,e,t)})).then((function(e){if(n.email!=e)return n.reload()})).then((function(){})))},n.ic=function(e){var t=null,n=this;return Yl(this,e=lo(Tt(e),n.uid).then((function(e){return t=Wl(n,e,"reauthenticate"),Bl(n,e),n.f=null,n.reload()})).then((function(){return t})),!0)},n.toJSON=function(){return this.w()},n.w=function(){var e={uid:this.uid,displayName:this.displayName,photoURL:this.photoURL,email:this.email,emailVerified:this.emailVerified,phoneNumber:this.phoneNumber,isAnonymous:this.isAnonymous,tenantId:this.tenantId,providerData:[],apiKey:this.l,appName:this.m,authDomain:this.o,stsTokenManager:this.b.w(),redirectEventId:this.ga||null};return this.metadata&&ye(e,this.metadata.w()),W(this.providerData,(function(t){e.providerData.push(function(e){var t,n={};for(t in e)e.hasOwnProperty(t)&&(n[t]=e[t]);return n}(t))})),ye(e,this.N.w()),e};var Xl={name:"redirectUser",D:"session"};function Jl(e){return oc(e.b,Xl,e.a)}function Zl(e){this.a=e,this.b=nc(),this.c=null,this.f=function(e){var t=nf("local"),n=nf("session"),r=nf("none");return function(e,t,n){var r=ic(t,n),i=rc(e,t.D);return e.get(t,n).then((function(o){var a=null;try{a=Dr(u.localStorage.getItem(r))}catch(s){}if(a&&!o)return u.localStorage.removeItem(r),e.set(t,a,n);a&&o&&"localStorage"!=i.type&&u.localStorage.removeItem(r)}))}(e.b,t,e.a).then((function(){return e.b.get(n,e.a)})).then((function(i){return i?n:e.b.get(r,e.a).then((function(n){return n?r:e.b.get(t,e.a).then((function(n){return n?t:e.b.get(tf,e.a).then((function(e){return e?nf(e):t}))}))}))})).then((function(t){return e.c=t,ef(e,t.D)})).s((function(){e.c||(e.c=t)}))}(this),this.b.addListener(nf("local"),this.a,w(this.g,this))}function ef(e,t){var n,r=[];for(n in ec)ec[n]!==t&&r.push(oc(e.b,nf(ec[n]),e.a));return r.push(oc(e.b,tf,e.a)),function(e){return new bt((function(t,n){var r=e.length,i=[];if(r)for(var o=function(e,n){r--,i[e]=n,0==r&&t(i)},a=function(e){n(e)},s=0;s<e.length;s++)Pt(e[s],k(o,s),a);else t(i)}))}(r)}Zl.prototype.g=function(){var e=this,t=nf("local");sf(this,(function(){return Tt().then((function(){return e.c&&"local"!=e.c.D?e.b.get(t,e.a):null})).then((function(n){if(n)return ef(e,"local").then((function(){e.c=t}))}))}))};var tf={name:"persistence",D:"session"};function nf(e){return{name:"authUser",D:e}}function rf(e,t){return sf(e,(function(){return e.b.set(e.c,t.w(),e.a)}))}function of(e){return sf(e,(function(){return oc(e.b,e.c,e.a)}))}function af(e,t,n){return sf(e,(function(){return e.b.get(e.c,e.a).then((function(e){return e&&t&&(e.authDomain=t),e&&n&&(e.emulatorConfig=n),Ql(e||{})}))}))}function sf(e,t){return e.f=e.f.then(t,t),e.f}function uf(e){if(this.m=!1,$r(this,"settings",new Jc),$r(this,"app",e),!mf(this).options||!mf(this).options.apiKey)throw new E("invalid-api-key");e=t.a.SDK_VERSION?Cr(t.a.SDK_VERSION):null,this.a=new Ja(mf(this).options&&mf(this).options.apiKey,j(C),e),this.R=[],this.u=[],this.P=[],this.ac=t.a.INTERNAL.createSubscribe(w(this.yc,this)),this.X=void 0,this.bc=t.a.INTERNAL.createSubscribe(w(this.zc,this)),vf(this,null),this.l=new Zl(mf(this).options.apiKey+":"+mf(this).name),this.G=new $l(mf(this).options.apiKey+":"+mf(this).name),this.$=wf(this,function(e){var t=mf(e).options.authDomain,n=function(e){var t=function(e,t){return e.b.get(Xl,e.a).then((function(e){return e&&t&&(e.authDomain=t),Ql(e||{})}))}(e.G,mf(e).options.authDomain).then((function(t){return(e.o=t)&&(t.ha=e.G),Jl(e.G)}));return wf(e,t)}(e).then((function(){return af(e.l,t,e.f)})).then((function(t){return t?(t.ha=e.G,e.o&&(e.o.ga||null)==(t.ga||null)?t:t.reload().then((function(){return rf(e.l,t).then((function(){return t}))})).s((function(n){return"auth/network-request-failed"==n.code?t:of(e.l)}))):null})).then((function(t){vf(e,t||null)}));return wf(e,n)}(this)),this.i=wf(this,function(e){return e.$.then((function(){return df(e)}
2)).s((function(){})).then((function(){if(!e.m)return e.pa()})).s((function(){})).then((function(){if(!e.m){e.ba=!0;var t=e.l;t.b.addListener(nf("local"),t.a,e.pa)}}))}(this)),this.ba=!1,this.pa=w(this.Yc,this),this.Ba=w(this.da,this),this.ya=w(this.kc,this),this.za=w(this.vc,this),this.Aa=w(this.wc,this),this.b=null,function(e){var t=mf(e).options.authDomain,n=mf(e).options.apiKey;t&&jr()&&(e.gb=e.$.then((function(){if(!e.m){if(e.b=Hc(t,n,mf(e).name,e.f),Nc(e.b,e),gf(e)&&jl(gf(e)),e.o){jl(e.o);var r=e.o;r.wa(e.ka()),kl(r,e),Ol(r=e.o,e.N),El(r,e),as((r=e.o).a,e.f),Sl(r,e),e.o=null}return e.b}})))}(this),this.INTERNAL={},this.INTERNAL.delete=w(this.delete,this),this.INTERNAL.logFramework=w(this.Fc,this),this.A=0,_n.call(this),function(e){Object.defineProperty(e,"lc",{get:function(){return this.ka()},set:function(e){this.wa(e)},enumerable:!1}),e.aa=null,Object.defineProperty(e,"ti",{get:function(){return this.S()},set:function(e){this.xb(e)},enumerable:!1}),e.W=null}(this),this.N=[],this.f=null}function cf(e){Qt.call(this,"languageCodeChanged"),this.h=e}function lf(e){Qt.call(this,"emulatorConfigChanged"),this.c=e}function ff(e){Qt.call(this,"frameworkChanged"),this.f=e}function hf(e){return e.gb||Ct(new E("auth-domain-config-required"))}function df(e){if(!jr())return Ct(new E("operation-not-supported-in-this-environment"));var t=hf(e).then((function(){return e.b.qa()})).then((function(e){return e?Jr(e):null}));return wf(e,t)}function pf(e,t){var n={};return n.apiKey=mf(e).options.apiKey,n.authDomain=mf(e).options.authDomain,n.appName=mf(e).name,e.f&&(n.emulatorConfig=e.f),e.$.then((function(){return function(e,t,n,r){var i=new wl(e,t);return n&&(i.ha=n),r&&Ol(i,r),i.reload().then((function(){return i}))}(n,t,e.G,e.Ga())})).then((function(t){return gf(e)&&t.uid==gf(e).uid?(Ul(gf(e),t),e.da(t)):(vf(e,t),jl(t),e.da(t))})).then((function(){_f(e)}))}function vf(e,t){gf(e)&&(function(e,t){Q(e.R,(function(e){return e==t}))}(gf(e),e.Ba),fn(gf(e),"tokenChanged",e.ya),fn(gf(e),"userDeleted",e.za),fn(gf(e),"userInvalidated",e.Aa),Pl(gf(e))),t&&(t.R.push(e.Ba),un(t,"tokenChanged",e.ya),un(t,"userDeleted",e.za),un(t,"userInvalidated",e.Aa),0<e.A&&Cl(t)),$r(e,"currentUser",t),t&&(t.wa(e.ka()),kl(t,e),Ol(t,e.N),El(t,e),as(t.a,e.f),Sl(t,e))}function yf(e,t){var n=null,r=null;return wf(e,t.then((function(t){return n=Uo(t),r=$i(t),pf(e,t)}),(function(t){var n=null;throw t&&"auth/multi-factor-auth-required"===t.code&&(n=al(t.w(),e,w(e.jc,e))),n||t})).then((function(){return Jr({user:gf(e),credential:n,additionalUserInfo:r,operationType:"signIn"})})))}function mf(e){return e.app}function gf(e){return e.currentUser}function bf(e){return gf(e)&&gf(e)._lat||null}function _f(e){if(e.ba){for(var t=0;t<e.u.length;t++)e.u[t]&&e.u[t](bf(e));if(e.X!==e.getUid()&&e.P.length)for(e.X=e.getUid(),t=0;t<e.P.length;t++)e.P[t]&&e.P[t](bf(e))}}function wf(e,t){return e.R.push(t),t.na((function(){Y(e.R,t)})),t}function kf(){}function Sf(){this.a={},this.b=1e12}Zl.prototype.wb=function(e){var t=null,n=this;return function(e){var t=new E("invalid-persistence-type"),n=new E("unsupported-persistence-type");e:{for(r in ec)if(ec[r]==e){var r=!0;break e}r=!1}if(!r||"string"!==typeof e)throw t;switch(wr()){case"ReactNative":if("session"===e)throw n;break;case"Node":if("none"!==e)throw n;break;case"Worker":if("session"===e||!Au()&&"none"!==e)throw n;break;default:if(!Ir()&&"none"!==e)throw n}}(e),sf(this,(function(){return e!=n.c.D?n.b.get(n.c,n.a).then((function(r){return t=r,ef(n,e)})).then((function(){if(n.c=nf(e),t)return n.b.set(n.c,t,n.a)})):Tt()}))},O(uf,_n),O(cf,Qt),O(lf,Qt),O(ff,Qt),(n=uf.prototype).wb=function(e){return wf(this,e=this.l.wb(e))},n.wa=function(e){this.aa===e||this.m||(this.aa=e,os(this.a,this.aa),this.dispatchEvent(new cf(this.ka())))},n.ka=function(){return this.aa},n.ed=function(){var e=u.navigator;this.wa(e&&(e.languages&&e.languages[0]||e.language||e.userLanguage)||null)},n.fd=function(e){if(!this.f){if(!/^https?:\/\//.test(e))throw new E("argument-error","Emulator URL must start with a valid scheme (http:// or https://).");Wr("WARNING: You are using the Auth Emulator, which is intended for local testing only. Do not use with production credentials."),u.document&&mr().then((function(){var e=u.document.createElement("div");e.innerText="Running in emulator mode. Do not use with production credentials.",e.style.position="fixed",e.style.width="100%",e.style.backgroundColor="#ffffff",e.style.border=".1em solid #000000",e.style.color="#ff0000",e.style.bottom="0px",e.style.left="0px",e.style.margin="0px",e.style.zIndex=1e4,e.style.textAlign="center",e.classList.add("firebase-emulator-warning"),u.document.body.appendChild(e)})),this.f={url:e},this.settings.hb=!0,as(this.a,this.f),this.dispatchEvent(new lf(this.f))}},n.Fc=function(e){this.N.push(e),us(this.a,t.a.SDK_VERSION?Cr(t.a.SDK_VERSION,this.N):null),this.dispatchEvent(new ff(this.N))},n.Ga=function(){return X(this.N)},n.xb=function(e){this.W===e||this.m||(this.W=e,this.a.b=this.W)},n.S=function(){return this.W},n.toJSON=function(){return{apiKey:mf(this).options.apiKey,authDomain:mf(this).options.authDomain,appName:mf(this).name,currentUser:gf(this)&&gf(this).w()}},n.Eb=function(e,t){switch(e){case"unknown":case"signInViaRedirect":return!0;case"signInViaPopup":return this.h==t&&!!this.g;default:return!1}},n.ma=function(e,t,n,r){"signInViaPopup"==e&&this.h==r&&(n&&this.O?this.O(n):t&&!n&&this.g&&this.g(t),this.c&&(this.c.cancel(),this.c=null),delete this.g,delete this.O)},n.Fa=function(e,t){return"signInViaRedirect"==e||"signInViaPopup"==e&&this.h==t&&this.g?w(this.hc,this):null},n.hc=function(e,t,n,r){var i=this,o={requestUri:e,postBody:r,sessionId:t,tenantId:n};return this.c&&(this.c.cancel(),this.c=null),i.$.then((function(){return yf(i,ks(i.a,o))}))},n.Wc=function(e){if(!jr())return Ct(new E("operation-not-supported-in-this-environment"));var n=this,r=Qi(e.providerId),i=Fr(),o=null;(!Mr()||br())&&mf(this).options.authDomain&&e.isOAuthProvider&&(o=_u(mf(this).options.authDomain,mf(this).options.apiKey,mf(this).name,"signInViaPopup",e,null,i,t.a.SDK_VERSION||null,null,null,this.S(),this.f));var a=pr(o,r&&r.ua,r&&r.ta);return wf(this,r=hf(this).then((function(t){return Uc(t,a,"signInViaPopup",e,i,!!o,n.S())})).then((function(){return new bt((function(e,t){n.ma("signInViaPopup",null,new E("cancelled-popup-request"),n.h),n.g=e,n.O=t,n.h=i,n.c=qc(n.b,n,"signInViaPopup",a,i)}))})).then((function(e){return a&&dr(a),e?Jr(e):null})).s((function(e){throw a&&dr(a),e})))},n.Xc=function(e){if(!jr())return Ct(new E("operation-not-supported-in-this-environment"));var t=this;return wf(this,hf(this).then((function(){return function(e){return sf(e,(function(){return e.b.set(tf,e.c.D,e.a)}))}(t.l)})).then((function(){return Bc(t.b,"signInViaRedirect",e,void 0,t.S())})))},n.qa=function(){var e=this;return df(this).then((function(t){return e.b&&Yc(e.b.b),t})).s((function(t){throw e.b&&Yc(e.b.b),t}))},n.cd=function(e){if(!e)return Ct(new E("null-user"));if(this.W!=e.tenantId)return Ct(new E("tenant-id-mismatch"));var t=this,n={};n.apiKey=mf(this).options.apiKey,n.authDomain=mf(this).options.authDomain,n.appName=mf(this).name;var r=function(e,t,n,r){var i=e.b,o={};return o[es]=i.b&&i.b.toString(),o.refreshToken=i.a,t=new wl(t||{apiKey:e.l,authDomain:e.o,appName:e.m},o),n&&(t.ha=n),r&&Ol(t,r),Ul(t,e),t}(e,n,t.G,t.Ga());return wf(this,this.i.then((function(){if(mf(t).options.apiKey!=e.l)return r.reload()})).then((function(){return gf(t)&&e.uid==gf(t).uid?(Ul(gf(t),e),t.da(e)):(vf(t,r),jl(r),t.da(r))})).then((function(){_f(t)})))},n.zb=function(){var e=this;return wf(this,this.i.then((function(){return e.b&&Yc(e.b.b),gf(e)?(vf(e,null),of(e.l).then((function(){_f(e)}))):Tt()})))},n.Yc=function(){var e=this;return af(this.l,mf(this).options.authDomain).then((function(t){if(!e.m){var n;if(n=gf(e)&&t){n=gf(e).uid;var r=t.uid;n=void 0!==n&&null!==n&&""!==n&&void 0!==r&&null!==r&&""!==r&&n==r}if(n)return Ul(gf(e),t),gf(e).I();(gf(e)||t)&&(vf(e,t),t&&(jl(t),t.ha=e.G),e.b&&Nc(e.b,e),_f(e))}}))},n.da=function(e){return rf(this.l,e)},n.kc=function(){_f(this),this.da(gf(this))},n.vc=function(){this.zb()},n.wc=function(){this.zb()},n.jc=function(e){var t=this;return this.i.then((function(){return yf(t,Tt(e))}))},n.yc=function(e){var t=this;this.addAuthTokenListener((function(){e.next(gf(t))}))},n.zc=function(e){var t=this;!function(e,t){e.P.push(t),wf(e,e.i.then((function(){!e.m&&K(e.P,t)&&e.X!==e.getUid()&&(e.X=e.getUid(),t(bf(e)))})))}(this,(function(){e.next(gf(t))}))},n.Hc=function(e,t,n){var r=this;return this.ba&&Promise.resolve().then((function(){"function"===typeof e?e(gf(r)):"function"===typeof e.next&&e.next(gf(r))})),this.ac(e,t,n)},n.Gc=function(e,t,n){var r=this;return this.ba&&Promise.resolve().then((function(){r.X=r.getUid(),"function"===typeof e?e(gf(r)):"function"===typeof e.next&&e.next(gf(r))}
2)),this.bc(e,t,n)},n.mc=function(e){var t=this;return wf(this,this.i.then((function(){return gf(t)?gf(t).I(e).then((function(e){return{accessToken:e}})):null})))},n.Sc=function(e){var t=this;return this.i.then((function(){return yf(t,ou(t.a,Zs,{token:e}))})).then((function(e){var n=e.user;return Fl(n,"isAnonymous",!1),t.da(n),e}))},n.Tc=function(e,t){var n=this;return this.i.then((function(){return yf(n,ou(n.a,eu,{email:e,password:t}))}))},n.dc=function(e,t){var n=this;return this.i.then((function(){return yf(n,ou(n.a,Ps,{email:e,password:t}))}))},n.Za=function(e){var t=this;return this.i.then((function(){return yf(t,e.ja(t.a))}))},n.Rc=function(e){return Yr("firebase.auth.Auth.prototype.signInAndRetrieveDataWithCredential is deprecated. Please use firebase.auth.Auth.prototype.signInWithCredential instead."),this.Za(e)},n.yb=function(){var e=this;return this.i.then((function(){var t=gf(e);if(t&&t.isAnonymous){var n=Jr({providerId:null,isNewUser:!1});return Jr({user:t,credential:null,additionalUserInfo:n,operationType:"signIn"})}return yf(e,e.a.yb()).then((function(t){var n=t.user;return Fl(n,"isAnonymous",!0),e.da(n),t}))}))},n.getUid=function(){return gf(this)&&gf(this).uid||null},n.cc=function(e){this.addAuthTokenListener(e),this.A++,0<this.A&&gf(this)&&Cl(gf(this))},n.Oc=function(e){var t=this;W(this.u,(function(n){n==e&&t.A--})),0>this.A&&(this.A=0),0==this.A&&gf(this)&&Pl(gf(this)),this.removeAuthTokenListener(e)},n.addAuthTokenListener=function(e){var t=this;this.u.push(e),wf(this,this.i.then((function(){t.m||K(t.u,e)&&e(bf(t))})))},n.removeAuthTokenListener=function(e){Q(this.u,(function(t){return t==e}))},n.delete=function(){this.m=!0;for(var e=0;e<this.R.length;e++)this.R[e].cancel("app-deleted");return this.R=[],this.l&&(e=this.l).b.removeListener(nf("local"),e.a,this.pa),this.b&&(Lc(this.b,this),Yc(this.b.b)),Promise.resolve()},n.gc=function(e){return wf(this,function(e,t){return ou(e,xs,{identifier:t,continueUri:Rr()?cr():"http://localhost"}).then((function(e){return e.signinMethods||[]}))}(this.a,e))},n.Ac=function(e){return!!Ao(e)},n.vb=function(e,t){var n=this;return wf(this,Tt().then((function(){var e=new Ii(t);if(!e.c)throw new E("argument-error",Ai+" must be true when sending sign in link to email");return Vi(e)})).then((function(t){return n.a.vb(e,t)})).then((function(){})))},n.hd=function(e){return this.Qa(e).then((function(e){return e.data.email}))},n.mb=function(e,t){return wf(this,this.a.mb(e,t).then((function(){})))},n.Qa=function(e){return wf(this,this.a.Qa(e).then((function(e){return new si(e)})))},n.ib=function(e){return wf(this,this.a.ib(e).then((function(){})))},n.ub=function(e,t){var n=this;return wf(this,Tt().then((function(){return"undefined"===typeof t||de(t)?{}:Vi(new Ii(t))})).then((function(t){return n.a.ub(e,t)})).then((function(){})))},n.Vc=function(e,t){return wf(this,el(this,e,t,w(this.Za,this)))},n.Uc=function(e,t){var n=this;return wf(this,Tt().then((function(){var r=t||cr(),i=Ro(e,r);if(!(r=Ao(r)))throw new E("argument-error","Invalid email link!");if(r.tenantId!==n.S())throw new E("tenant-id-mismatch");return n.Za(i)})))},kf.prototype.render=function(){},kf.prototype.reset=function(){},kf.prototype.getResponse=function(){},kf.prototype.execute=function(){};var Of=null;function Ef(e,t){return(t=Tf(t))&&e.a[t]||null}function Tf(e){return(e="undefined"===typeof e?1e12:e)?e.toString():null}function Cf(e,t){this.g=!1,this.c=t,this.a=this.b=null,this.h="invisible"!==this.c.size,this.f=ot(e);var n=this;this.i=function(){n.execute()},this.h?this.execute():un(this.f,"click",this.i)}function Pf(e){if(e.g)throw Error("reCAPTCHA mock was already deleted!")}function xf(){}function If(){}Sf.prototype.render=function(e,t){return this.a[this.b.toString()]=new Cf(e,t),this.b++},Sf.prototype.reset=function(e){var t=Ef(this,e);e=Tf(e),t&&e&&(t.delete(),delete this.a[e])},Sf.prototype.getResponse=function(e){return(e=Ef(this,e))?e.getResponse():null},Sf.prototype.execute=function(e){(e=Ef(this,e))&&e.execute()},Cf.prototype.getResponse=function(){return Pf(this),this.b},Cf.prototype.execute=function(){Pf(this);var e=this;this.a||(this.a=setTimeout((function(){e.b=function(){for(var e=50,t=[];0<e;)t.push("1234567890abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ".charAt(Math.floor(62*Math.random()))),e--;return t.join("")}();var t=e.c.callback,n=e.c["expired-callback"];if(t)try{t(e.b)}catch(r){}e.a=setTimeout((function(){if(e.a=null,e.b=null,n)try{n()}catch(r){}e.h&&e.execute()}),6e4)}),500))},Cf.prototype.delete=function(){Pf(this),this.g=!0,clearTimeout(this.a),this.a=null,f
2n(this.f,"click",this.i)},$r(xf,"FACTOR_ID","phone"),If.prototype.g=function(){return Of||(Of=new Sf),Tt(Of)},If.prototype.c=function(){};var jf=null;function Rf(){this.b=u.grecaptcha?1/0:0,this.f=null,this.a="__rcb"+Math.floor(1e6*Math.random()).toString()}var Af=new ge(we,"https://www.google.com/recaptcha/api.js?onload=%{onload}&render=explicit&hl=%{hl}"),Mf=new Br(3e4,6e4);Rf.prototype.g=function(e){var t=this;return new bt((function(n,r){var i=setTimeout((function(){r(new E("network-request-failed"))}),Mf.get());!u.grecaptcha||e!==t.f&&!t.b?(u[t.a]=function(){if(u.grecaptcha){t.f=e;var o=u.grecaptcha.render;u.grecaptcha.render=function(e,n){return e=o(e,n),t.b++,e},clearTimeout(i),n(u.grecaptcha)}else clearTimeout(i),r(new E("internal-error"));delete u[t.a]},Tt(Ha(Ee(Af,{onload:t.a,hl:e||""}))).s((function(){clearTimeout(i),r(new E("internal-error","Unable to load external reCAPTCHA dependencies!"))}))):(clearTimeout(i),n(u.grecaptcha))}))},Rf.prototype.c=function(){this.b--};var Nf=null;function Lf(e,t,n,r,i,o,a){if($r(this,"type","recaptcha"),this.c=this.f=null,this.A=!1,this.m=t,this.g=null,a?(jf||(jf=new If),a=jf):(Nf||(Nf=new Rf),a=Nf),this.v=a,this.a=n||{theme:"light",type:"image"},this.h=[],this.a[Uf])throw new E("argument-error","sitekey should not be provided for reCAPTCHA as one is automatically provisioned for the current project.");if(this.i="invisible"===this.a[Vf],!u.document)throw new E("operation-not-supported-in-this-environment","RecaptchaVerifier is only supported in a browser HTTP/HTTPS environment with DOM support.");if(!ot(t)||!this.i&&ot(t).hasChildNodes())throw new E("argument-error","reCAPTCHA container is either not found or already contains inner elements!");this.o=new Ja(e,o||null,i||null),this.u=r||function(){return null};var s=this;this.l=[];var c=this.a[Df];this.a[Df]=function(e){if(Bf(s,e),"function"===typeof c)c(e);else if("string"===typeof c){var t=xr(c,u);"function"===typeof t&&t(e)}};var l=this.a[Ff];this.a[Ff]=function(){if(Bf(s,null),"function"===typeof l)l();else if("string"===typeof l){var e=xr(l,u);"function"===typeof e&&e()}}}var Df="callback",Ff="expired-callback",Uf="sitekey",Vf="size";function Bf(e,t){for(var n=0;n<e.l.length;n++)try{e.l[n](t)}catch(r){}}function qf(e,t){return e.h.push(t),t.na((function(){Y(e.h,t)})),t}function Wf(e){if(e.A)throw new E("internal-error","RecaptchaVerifier instance has been destroyed.")}function zf(e,n,r){var i=!1;try{this.b=r||t.a.app()}catch(s){throw new E("argument-error","No firebase.app.App instance is currently initialized.")}if(!this.b.options||!this.b.options.apiKey)throw new E("invalid-api-key");r=this.b.options.apiKey;var o=this,a=null;try{a=this.b.auth().Ga()}catch(s){}try{i=this.b.auth().settings.appVerificationDisabledForTesting}catch(s){}a=t.a.SDK_VERSION?Cr(t.a.SDK_VERSION,a):null,Lf.call(this,r,e,n,(function(){try{var e=o.b.auth().ka()}catch(t){e=null}return e}),a,j(C),i)}function Hf(e,t,n,r){e:{n=Array.prototype.slice.call(n);for(var i=0,o=!1,a=0;a<t.length;a++)if(t[a].optional)o=!0;else{if(o)throw new E("internal-error","Argument validator encountered a required argument after an optional argument.");i++}if(o=t.length,n.length<i||o<n.length)r="Expected "+(i==o?1==i?"1 argument":i+" arguments":i+"-"+o+" arguments")+" but got "+n.length+".";else{for(i=0;i<n.length;i++)if(o=t[i].optional&&void 0===n[i],!t[i].K(n[i])&&!o){if(t=t[i],0>i||i>=Gf.length)throw new E("internal-error","Argument validator received an unsupported number of arguments.");n=Gf[i],r=(r?"":n+" argument ")+(t.name?'"'+t.name+'" ':"")+"must be "+t.J+".";break e}r=null}}if(r)throw new E("argument-error",e+" failed: "+r)}(n=Lf.prototype).Ia=function(){var e=this;return this.f?this.f:this.f=qf(this,Tt().then((function(){if(Rr()&&!_r())return mr();throw new E("operation-not-supported-in-this-environment","RecaptchaVerifier is only supported in a browser HTTP/HTTPS environment.")})).then((function(){return e.v.g(e.u())})).then((function(t){return e.g=t,ou(e.o,qs,{})})).then((function(t){e.a[Uf]=t.recaptchaSiteKey})).s((function(t){throw e.f=null,t})))},n.render=function(){Wf(this);var e=this;return qf(this,this.Ia().then((function(){if(null===e.c){var t=e.m;if(!e.i){var n=ot(t);t=function(e,t,n){var r=arguments,i=document,o=String(r[0]),a=r[1];if(!it&&a&&(a.name||a.type)){if(o=["<",o],a.name&&o.push(' name="',qe(a.name),'"'),a.type){o.push(' type="',qe(a.type),'"');var s={};ye(s,a),delete s.type,a=s}o.push(">"),o=o.join("")}return o=ft(i,o),a&&("string"===typeof a?o.className=a:Array.isArray(a)?o.className=a.join(" "):at(o,a)),2<r.length&<(i,o,r),o}("DIV"),n.appendChild(t)}e.c=e.g.render(t,e.a)}return e.c})))},n.verify=function(){Wf(this);var e=this;return qf(this,this.render().then((function(t){return new bt((function(n){var r=e.g.getResponse(t);if(r)n(r);else{e.l.push((function t(r){r&&(function(e,t){Q(e.l,(function(e){return e==t}))}(e,t),n(r))})),e.i&&e.g.execute(e.c)}}))})))},n.reset=function(){Wf(this),null!==this.c&&this.g.reset(this.c)},n.clear=function(){Wf(this),this.A=!0,this.v.c();for(var e=0;e<this.h.length;e++)this.h[e].cancel("RecaptchaVerifier instance has been destroyed.");if(!this.i){e=ot(this.m);for(var t;t=e.firstChild;)e.removeChild(t)}},O(zf,Lf);var Gf="First Second Third Fourth Fifth Sixth Seventh Eighth Ninth".split(" ");function Kf(e,t){return{name:e||"",J:"a valid string",optional:!!t,K:function(e){return"string"===typeof e}}}function Yf(e,t){return{name:e||"",J:"a boolean",optional:!!t,K:function(e){return"boolean"===typeof e}}}function Qf(e,t){return{name:e||"",J:"a valid object",optional:!!t,K:v}}function $f(e,t){return{name:e||"",J:"a function",optional:!!t,K:function(e){return"function"===typeof e}}}function Xf(e,t){return{name:e||"",J:"null",optional:!!t,K:function(e){return null===e}}}function Jf(e){return{name:e?e+"Credential":"credential",J:e?"a valid "+e+" credential":"a valid credential",optional:!1,K:function(t){if(!t)return!1;var n=!e||t.providerId===e;return!(!t.ja||!n)}}}function Zf(e,t){return v(e)&&"string"===typeof e.type&&e.type===t&&"function"===typeof e.Ha}function eh(e){return v(e)&&"string"===typeof e.uid}function th(e,t,n,r){return{name:n||"",J:e.J+" or "+t.J,optional:!!r,K:function(n){return e.K(n)||t.K(n)}}}function nh(e,t){for(var n in t){var r=t[n].name;e[r]=oh(r,e[n],t[n].j)}}function rh(e,t){for(var n in t){var r=t[n].name;r!==n&&Object.defineProperty(e,r,{get:k((function(e){return this[e]}
2),n),set:k((function(e,t,n,r){Hf(e,[n],[r],!0),this[t]=r}),r,n,t[n].jb),enumerable:!0})}}function ih(e,t,n,r){e[t]=oh(t,n,r)}function oh(e,t,n){function r(){var e=Array.prototype.slice.call(arguments);return Hf(o,n,e),t.apply(this,e)}if(!n)return t;var i,o=function(e){return(e=e.split("."))[e.length-1]}(e);for(i in t)r[i]=t[i];for(i in t.prototype)r.prototype[i]=t.prototype[i];return r}nh(uf.prototype,{ib:{name:"applyActionCode",j:[Kf("code")]},Qa:{name:"checkActionCode",j:[Kf("code")]},mb:{name:"confirmPasswordReset",j:[Kf("code"),Kf("newPassword")]},dc:{name:"createUserWithEmailAndPassword",j:[Kf("email"),Kf("password")]},gc:{name:"fetchSignInMethodsForEmail",j:[Kf("email")]},qa:{name:"getRedirectResult",j:[]},Ac:{name:"isSignInWithEmailLink",j:[Kf("emailLink")]},Gc:{name:"onAuthStateChanged",j:[th(Qf(),$f(),"nextOrObserver"),$f("opt_error",!0),$f("opt_completed",!0)]},Hc:{name:"onIdTokenChanged",j:[th(Qf(),$f(),"nextOrObserver"),$f("opt_error",!0),$f("opt_completed",!0)]},ub:{name:"sendPasswordResetEmail",j:[Kf("email"),th(Qf("opt_actionCodeSettings",!0),Xf(null,!0),"opt_actionCodeSettings",!0)]},vb:{name:"sendSignInLinkToEmail",j:[Kf("email"),Qf("actionCodeSettings")]},wb:{name:"setPersistence",j:[Kf("persistence")]},Rc:{name:"signInAndRetrieveDataWithCredential",j:[Jf()]},yb:{name:"signInAnonymously",j:[]},Za:{name:"signInWithCredential",j:[Jf()]},Sc:{name:"signInWithCustomToken",j:[Kf("token")]},Tc:{name:"signInWithEmailAndPassword",j:[Kf("email"),Kf("password")]},Uc:{name:"signInWithEmailLink",j:[Kf("email"),Kf("emailLink",!0)]},Vc:{name:"signInWithPhoneNumber",j:[Kf("phoneNumber"),{name:"applicationVerifier",J:"an implementation of firebase.auth.ApplicationVerifier",optional:!1,K:function(e){return!(!e||"string"!==typeof e.type||"function"!==typeof e.verify)}}]},Wc:{name:"signInWithPopup",j:[{name:"authProvider",J:"a valid Auth provider",optional:!1,K:function(e){return!!(e&&e.providerId&&e.hasOwnProperty&&e.hasOwnProperty("isOAuthProvider"))}}]},Xc:{name:"signInWithRedirect",j:[{name:"authProvider",J:"a valid Auth provider",optional:!1,K:function(e){return!!(e&&e.providerId&&e.hasOwnProperty&&e.hasOwnProperty("isOAuthProvider"))}}]},cd:{name:"updateCurrentUser",j:[th({name:"user",J:"an instance of Firebase User",optional:!1,K:function(e){return!!(e&&e instanceof wl)}},Xf(),"user")]},zb:{name:"signOut",j:[]},toJSON:{name:"toJSON",j:[Kf(null,!0)]},ed:{name:"useDeviceLanguage",j:[]},fd:{name:"useEmulator",j:[Kf("url")]},hd:{name:"verifyPasswordResetCode",j:[Kf("code")]}}),rh(uf.prototype,{lc:{name:"languageCode",jb:th(Kf(),Xf(),"languageCode")},ti:{name:"tenantId",jb:th(Kf(),Xf(),"tenantId")}}),uf.Persistence=ec,uf.Persistence.LOCAL="local",uf.Persistence.SESSION="session",uf.Persistence.NONE="none",nh(wl.prototype,{delete:{name:"delete",j:[]},nc:{name:"getIdTokenResult",j:[Yf("opt_forceRefresh",!0)]},I:{name:"getIdToken",j:[Yf("opt_forceRefresh",!0)]},Bc:{name:"linkAndRetrieveDataWithCredential",j:[Jf()]},pb:{name:"linkWithCredential",j:[Jf()]},Cc:{name:"linkWithPhoneNumber",j:[Kf("phoneNumber"),{name:"applicationVerifier",J:"an implementation of firebase.auth.ApplicationVerifier",optional:!1,K:function(e){return!(!e||"string"!==typeof e.type||"function"!==typeof e.verify)}}]},Dc:{name:"linkWithPopup",j:[{name:"authProvider",J:"a valid Auth provider",optional:!1,K:function(e){return!!(e&&e.providerId&&e.hasOwnProperty&&e.hasOwnProperty("isOAuthProvider"))}}]},Ec:{name:"linkWithRedirect",j:[{name:"authProvider",J:"a valid Auth provider",optional:!1,K:function(e){return!!(e&&e.providerId&&e.hasOwnProperty&&e.hasOwnProperty("isOAuthProvider"))}}]},Kc:{name:"reauthenticateAndRetrieveDataWithCredential",j:[Jf()]},sb:{name:"reauthenticateWithCredential",j:[Jf()]},Lc:{name:"reauthenticateWithPhoneNumber",j:[Kf("phoneNumber"),{name:"applicationVerifier",J:"an implementation of firebase.auth.ApplicationVerifier",optional:!1,K:function(e){return!(!e||"string"!==typeof e.type||"function"!==typeof e.verify)}}]},Mc:{name:"reauthenticateWithPopup",j:[{name:"authProvider",J:"a valid Auth provider",optional:!1,K:function(e){return!!(e&&e.providerId&&e.hasOwnProperty&&e.hasOwnProperty("isOAuthProvider"))}}]},Nc:{name:"reauthenticateWithRedirect",j:[{name:"authProvider",J:"a valid Auth provider",optional:!1,K:function(e){return!!(e&&e.providerId&&e.hasOwnProperty&&e.hasOwnProperty("isOAuthProvider"))}}]},reload:{name:"reload",j:[]},tb:{name:"sendEmailVerification",j:[th(Qf("opt_actionCodeSettings",!0),Xf(null,!0),"opt_actionCodeSettings",!0)]},toJSON:{name:"toJSON",j:[Kf(null,!0)]},bd:{name:"unlink",j:[Kf("provider")]},Ab:{name:"updateEmail",j:[Kf("email")]},Bb:{name:"updatePassword",j:[Kf("password")]},dd:{name:"updatePhoneNumber",j:[Jf("phone")]},Cb:{name:"updateProfile",j:[Qf("profile")]},Db:{name:"verifyBeforeUpdateEmail",j:[Kf("email"),th(Qf("opt_actionCodeSettings",!0),Xf(null,!0),"opt_actionCodeSettings",!0)]}}),nh(Sf.prototype,{execute:{name:"execute"},render:{name:"render"}
2,reset:{name:"reset"},getResponse:{name:"getResponse"}}),nh(kf.prototype,{execute:{name:"execute"},render:{name:"render"},reset:{name:"reset"},getResponse:{name:"getResponse"}}),nh(bt.prototype,{na:{name:"finally"},s:{name:"catch"},then:{name:"then"}}),rh(Jc.prototype,{appVerificationDisabled:{name:"appVerificationDisabledForTesting",jb:Yf("appVerificationDisabledForTesting")}}),nh(Zc.prototype,{confirm:{name:"confirm",j:[Kf("verificationCode")]}}),ih(co,"fromJSON",(function(e){e="string"===typeof e?JSON.parse(e):e;for(var t,n=[mo,Io,No,po],r=0;r<n.length;r++)if(t=n[r](e))return t;return null}),[th(Kf(),Qf(),"json")]),ih(jo,"credential",(function(e,t){return new xo(e,t)}),[Kf("email"),Kf("password")]),nh(xo.prototype,{w:{name:"toJSON",j:[Kf(null,!0)]}}),nh(wo.prototype,{Ca:{name:"addScope",j:[Kf("scope")]},Ka:{name:"setCustomParameters",j:[Qf("customOAuthParameters")]}}),ih(wo,"credential",ko,[th(Kf(),Qf(),"token")]),ih(jo,"credentialWithLink",Ro,[Kf("email"),Kf("emailLink")]),nh(So.prototype,{Ca:{name:"addScope",j:[Kf("scope")]},Ka:{name:"setCustomParameters",j:[Qf("customOAuthParameters")]}}),ih(So,"credential",Oo,[th(Kf(),Qf(),"token")]),nh(Eo.prototype,{Ca:{name:"addScope",j:[Kf("scope")]},Ka:{name:"setCustomParameters",j:[Qf("customOAuthParameters")]}}),ih(Eo,"credential",To,[th(Kf(),th(Qf(),Xf()),"idToken"),th(Kf(),Xf(),"accessToken",!0)]),nh(Co.prototype,{Ka:{name:"setCustomParameters",j:[Qf("customOAuthParameters")]}}),ih(Co,"credential",Po,[th(Kf(),Qf(),"token"),Kf("secret",!0)]),nh(_o.prototype,{Ca:{name:"addScope",j:[Kf("scope")]},credential:{name:"credential",j:[th(Kf(),th(Qf(),Xf()),"optionsOrIdToken"),th(Kf(),Xf(),"accessToken",!0)]},Ka:{name:"setCustomParameters",j:[Qf("customOAuthParameters")]}}),nh(vo.prototype,{w:{name:"toJSON",j:[Kf(null,!0)]}}),nh(fo.prototype,{w:{name:"toJSON",j:[Kf(null,!0)]}}),ih(Do,"credential",Fo,[Kf("verificationId"),Kf("verificationCode")]),nh(Do.prototype,{eb:{name:"verifyPhoneNumber",j:[th(Kf(),{name:"phoneInfoOptions",J:"valid phone info options",optional:!1,K:function(e){return!!e&&(e.session&&e.phoneNumber?Zf(e.session,so)&&"string"===typeof e.phoneNumber:e.session&&e.multiFactorHint?Zf(e.session,uo)&&eh(e.multiFactorHint):e.session&&e.multiFactorUid?Zf(e.session,uo)&&"string"===typeof e.multiFactorUid:!!e.phoneNumber&&"string"===typeof e.phoneNumber)}},"phoneInfoOptions"),{name:"applicationVerifier",J:"an implementation of firebase.auth.ApplicationVerifier",optional:!1,K:function(e){return!(!e||"string"!==typeof e.type||"function"!==typeof e.verify)}}]}}),nh(Mo.prototype,{w:{name:"toJSON",j:[Kf(null,!0)]}}),nh(E.prototype,{toJSON:{name:"toJSON",j:[Kf(null,!0)]}}),nh(Ko.prototype,{toJSON:{name:"toJSON",j:[Kf(null,!0)]}}),nh(Go.prototype,{toJSON:{name:"toJSON",j:[Kf(null,!0)]}}),nh(ol.prototype,{toJSON:{name:"toJSON",j:[Kf(null,!0)]}}),nh(nl.prototype,{Qc:{name:"resolveSignIn",j:[{name:"multiFactorAssertion",J:"a valid multiFactorAssertion",optional:!1,K:function(e){return!!e&&!!e.rb}}]}}),nh(fl.prototype,{Qb:{name:"getSession",j:[]},ec:{name:"enroll",j:[{name:"multiFactorAssertion",J:"a valid multiFactorAssertion",optional:!1,K:function(e){return!!e&&!!e.rb}},Kf("displayName",!0)]},ad:{name:"unenroll",j:[th({name:"multiFactorInfo",J:"a valid multiFactorInfo",optional:!1,K:eh},Kf(),"multiFactorInfoIdentifier")]}}),nh(zf.prototype,{clear:{name:"clear",j:[]},render:{name:"render",j:[]},verify:{name:"verify",j:[]}}),ih(wi,"parseLink",xi,[Kf("link")]),ih(xf,"assertion",(function(e){return new cl(e)}),[Jf("phone")]),function(){if("undefined"===typeof t.a||!t.a.INTERNAL||!t.a.INTERNAL.registerComponent)throw Error("Cannot find the firebase namespace; be sure to include firebase-app.js before this library.");var e={ActionCodeInfo:{Operation:{EMAIL_SIGNIN:ci,PASSWORD_RESET:"PASSWORD_RESET",RECOVER_EMAIL:"RECOVER_EMAIL",REVERT_SECOND_FACTOR_ADDITION:ui,VERIFY_AND_CHANGE_EMAIL:li,VERIFY_EMAIL:"VERIFY_EMAIL"}},Auth:uf,AuthCredential:co,Error:E};ih(e,"EmailAuthProvider",jo,[]),ih(e,"FacebookAuthProvider",wo,[]),ih(e,"GithubAuthProvider",So,[]),ih(e,"GoogleAuthProvider",Eo,[]),ih(e,"TwitterAuthProvider",Co,[]),ih(e,"OAuthProvider",_o,[Kf("providerId")]),ih(e,"SAMLAuthProvider",bo,[Kf("providerId")]),ih(e,"PhoneAuthProvider",Do,[{name:"auth",J:"an instance of Firebase Auth",optional:!0,K:function(e){return!!(e&&e instanceof uf)}}]),ih(e,"RecaptchaVerifier",zf,[th(Kf(),{name:"",J:"an HTML element",optional:!1,K:function(e){return!!(e&&e instanceof Element)}},"recaptchaContainer"),Qf("recaptchaParameters",!0),{name:"app",J:"an instance of Firebase App",optional:!0,K:function(e){return!!(e&&e instanceof t.a.app.App)}}]),ih(e,"ActionCodeURL",wi,[]),ih(e,"PhoneMultiFactorGenerator",xf,[]),t.a.INTERNAL.registerComponent({name:"auth",instanceFactory:function(e){return new uf(e=e.getProvider("app").getImmediate())},multipleInstances:!1,serviceProps:e,instantiationMode:"LAZY",type:"PUBLIC"}),t.a.INTERNAL.registerComponent({name:"auth-internal",instanceFactory:function(e){return{getUid:w((e=e.getProvider("auth").getImmediate()).getUid,e),getToken:w(e.mc,e),addAuthTokenListener:w(e.cc,e),removeAuthTokenListener:w(e.Oc,e)}},multipleInstances:!1,instantiationMode:"LAZY",type:"PRIVATE"}),t.a.registerVersion("@firebase/auth","0.15.1"),t.a.INTERNAL.extendNamespace({User:wl})}()}).apply("undefined"!==typeof e?e:"undefined"!==typeof self?self:"undefined"!==typeof window?window:{})}).call(this,n(44))},function(e,t,n){"use strict";n(317)},function(e,t,n){"use strict";(function(e){var t=n(2),r=n(11),i=n(37),o=n(3),a=n(61),s=n(33),u={OK:"ok",CANCELLED:"cancelled",UNKNOWN:"unknown",INVALID_ARGUMENT:"invalid-argument",DEADLINE_EXCEEDED:"deadline-exceeded",NOT_FOUND:"not-found",ALREADY_EXISTS:"already-exists",PERMISSION_DENIED:"permission-denied",UNAUTHENTICATED:"unauthenticated",RESOURCE_EXHAUSTED:"resource-exhausted",FAILED_PRECONDITION:"failed-precondition",ABORTED:"aborted",OUT_OF_RANGE:"out-of-range",UNIMPLEMENT
2ED:"unimplemented",INTERNAL:"internal",UNAVAILABLE:"unavailable",DATA_LOSS:"data-loss"},c=function(e){function n(t,n){var r=this;return(r=e.call(this,n)||this).code=t,r.message=n,r.name="FirebaseError",r.toString=function(){return r.name+": [code="+r.code+"]: "+r.message},r}return Object(t.c)(n,e),n}(Error),l=new i.b("@firebase/firestore");function f(){return l.logLevel}function h(e){for(var n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];if(l.logLevel<=i.a.DEBUG){var o=n.map(v);l.debug.apply(l,Object(t.g)(["Firestore (8.0.0): "+e],o))}}function d(e){for(var n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];if(l.logLevel<=i.a.ERROR){var o=n.map(v);l.error.apply(l,Object(t.g)(["Firestore (8.0.0): "+e],o))}}function p(e){for(var n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];if(l.logLevel<=i.a.WARN){var o=n.map(v);l.warn.apply(l,Object(t.g)(["Firestore (8.0.0): "+e],o))}}function v(e){if("string"==typeof e)return e;try{return t=e,JSON.stringify(t)}catch(t){return e}var t}function y(e){void 0===e&&(e="Unexpected state");var t="FIRESTORE (8.0.0) INTERNAL ASSERTION FAILED: "+e;throw d(t),new Error(t)}function m(e,t){e||y()}function g(e,t){return e}function b(e){var t="undefined"!=typeof self&&(self.crypto||self.msCrypto),n=new Uint8Array(e);if(t&&"function"==typeof t.getRandomValues)t.getRandomValues(n);else for(var r=0;r<e;r++)n[r]=Math.floor(256*Math.random());return n}var _=function(){function e(){}return e.t=function(){for(var e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",t=Math.floor(256/e.length)*e.length,n="";n.length<20;)for(var r=b(40),i=0;i<r.length;++i)n.length<20&&r[i]<t&&(n+=e.charAt(r[i]%e.length));return n},e}();function w(e,t){return e<t?-1:e>t?1:0}function k(e,t,n){return e.length===t.length&&e.every((function(e,r){return n(e,t[r])}))}function S(e){return e+"\0"}var O=function(){function e(e){this.i=e}return e.fromBase64String=function(t){return new e(atob(t))},e.fromUint8Array=function(t){return new e(function(e){for(var t="",n=0;n<e.length;++n)t+=String.fromCharCode(e[n]);return t}(t))},e.prototype.toBase64=function(){return e=this.i,btoa(e);var e},e.prototype.toUint8Array=function(){return function(e){for(var t=new Uint8Array(e.length),n=0;n<e.length;n++)t[n]=e.charCodeAt(n);return t}(this.i)},e.prototype.o=function(){return 2*this.i.length},e.prototype.h=function(e){return w(this.i,e.i)},e.prototype.isEqual=function(e){return this.i===e.i},e}();O.u=new O("");var E=function(){function e(e){this.l=e}return e.fromBase64String=function(t){try{return new e(O.fromBase64String(t))}catch(t){throw new c(u.INVALID_ARGUMENT,"Failed to construct Bytes from Base64 string: "+t)}},e.fromUint8Array=function(t){return new e(O.fromUint8Array(t))},e.prototype.toBase64=function(){return this.l.toBase64()},e.prototype.toUint8Array=function(){return this.l.toUint8Array()},e.prototype.toString=function(){return"Bytes(base64: "+this.toBase64()+")"},e.prototype.isEqual=function(e){return this.l.isEqual(e.l)},e}();function T(){if("undefined"==typeof Uint8Array)throw new c(u.UNIMPLEMENTED,"Uint8Arrays are not available in this environment.")}function C(){if("undefined"==typeof atob)throw new c(u.UNIMPLEMENTED,"Blobs are unavailable in Firestore in this environment.")}var P=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return Object(t.c)(n,e),n.fromBase64String=function(e){C();try{return new n(O.fromBase64String(e))}catch(e){throw new c(u.INVALID_ARGUMENT,"Failed to construct Blob from Base64 string: "+e)}},n.fromUint8Array=function(e){return T(),new n(O.fromUint8Array(e))},n.prototype.toBase64=function(){return C(),e.prototype.toBase64.call(this)},n.prototype.toUint8Array=function(){return T(),e.prototype.toUint8Array.call(this)},n.prototype.toString=function(){return"Blob(base64: "+this.toBase64()+")"},n}(E),x=function(e,t,n,r,i,o){this._=e,this.persistenceKey=t,this.host=n,this.ssl=r,this.forceLongPolling=i,this.T=o},I=function(){function e(e,t){this.projectId=e,this.database=t||"(default)"}return Object.defineProperty(e.prototype,"I",{get:function(){return"(default)"===this.database}
2,enumerable:!1,configurable:!0}),e.prototype.isEqual=function(t){return t instanceof e&&t.projectId===this.projectId&&t.database===this.database},e.prototype.h=function(e){return w(this.projectId,e.projectId)||w(this.database,e.database)},e}();function j(e){var t=0;for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t++;return t}function R(e,t){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t(n,e[n])}function A(e){for(var t in e)if(Object.prototype.hasOwnProperty.call(e,t))return!1;return!0}var M=function(){function e(e,t){this.m=e,this.A=t,this.R={}}return e.prototype.get=function(e){var t=this.m(e),n=this.R[t];if(void 0!==n)for(var r=0,i=n;r<i.length;r++){var o=i[r],a=o[0],s=o[1];if(this.A(a,e))return s}},e.prototype.has=function(e){return void 0!==this.get(e)},e.prototype.set=function(e,t){var n=this.m(e),r=this.R[n];if(void 0!==r){for(var i=0;i<r.length;i++)if(this.A(r[i][0],e))return void(r[i]=[e,t]);r.push([e,t])}else this.R[n]=[[e,t]]},e.prototype.delete=function(e){var t=this.m(e),n=this.R[t];if(void 0===n)return!1;for(var r=0;r<n.length;r++)if(this.A(n[r][0],e))return 1===n.length?delete this.R[t]:n.splice(r,1),!0;return!1},e.prototype.forEach=function(e){R(this.R,(function(t,n){for(var r=0,i=n;r<i.length;r++){var o=i[r],a=o[0],s=o[1];e(a,s)}}))},e.prototype.P=function(){return A(this.R)},e}(),N=function(){function e(e,t){if(this.seconds=e,this.nanoseconds=t,t<0)throw new c(u.INVALID_ARGUMENT,"Timestamp nanoseconds out of range: "+t);if(t>=1e9)throw new c(u.INVALID_ARGUMENT,"Timestamp nanoseconds out of range: "+t);if(e<-62135596800)throw new c(u.INVALID_ARGUMENT,"Timestamp seconds out of range: "+e);if(e>=253402300800)throw new c(u.INVALID_ARGUMENT,"Timestamp seconds out of range: "+e)}return e.now=function(){return e.fromMillis(Date.now())},e.fromDate=function(t){return e.fromMillis(t.getTime())},e.fromMillis=function(t){var n=Math.floor(t/1e3);return new e(n,1e6*(t-1e3*n))},e.prototype.toDate=function(){return new Date(this.toMillis())},e.prototype.toMillis=function(){return 1e3*this.seconds+this.nanoseconds/1e6},e.prototype.g=function(e){return this.seconds===e.seconds?w(this.nanoseconds,e.nanoseconds):w(this.seconds,e.seconds)},e.prototype.isEqual=function(e){return e.seconds===this.seconds&&e.nanoseconds===this.nanoseconds},e.prototype.toString=function(){return"Timestamp(seconds="+this.seconds+", nanoseconds="+this.nanoseconds+")"},e.prototype.toJSON=function(){return{seconds:this.seconds,nanoseconds:this.nanoseconds}},e.prototype.valueOf=function(){var e=this.seconds- -62135596800;return String(e).padStart(12,"0")+"."+String(this.nanoseconds).padStart(9,"0")},e}(),L=function(){function e(e){this.timestamp=e}return e.V=function(t){return new e(t)},e.min=function(){return new e(new N(0,0))},e.prototype.h=function(e){return this.timestamp.g(e.timestamp)},e.prototype.isEqual=function(e){return this.timestamp.isEqual(e.timestamp)},e.prototype.p=function(){return 1e6*this.timestamp.seconds+this.timestamp.nanoseconds/1e3},e.prototype.toString=function(){return"SnapshotVersion("+this.timestamp.toString()+")"},e.prototype.v=function(){return this.timestamp},e}(),D=function(){function e(e,t,n){void 0===t?t=0:t>e.length&&y(),void 0===n?n=e.length-t:n>e.length-t&&y(),this.segments=e,this.offset=t,this.S=n}return Object.defineProperty(e.prototype,"length",{get:function(){return this.S},enumerable:!1,configurable:!0}),e.prototype.isEqual=function(t){return 0===e.D(this,t)},e.prototype.child=function(t){var n=this.segments.slice(this.offset,this.limit());return t instanceof e?t.forEach((function(e){n.push(e)})):n.push(t),this.C(n)},e.prototype.limit=function(){return this.offset+this.length},e.prototype.N=function(e){return e=void 0===e?1:e,this.C(this.segments,this.offset+e,this.length-e)},e.prototype.F=function(){return this.C(this.segments,this.offset,this.length-1)},e.prototype.k=function(){return this.segments[this.offset]},e.prototype.O=function(){return this.get(this.length-1)},e.prototype.get=function(e){return this.segments[this.offset+e]},e.prototype.P=function(){return 0===this.length},e.prototype.M=function(e){if(e.length<this.length)return!1;for(var t=0;t<this.length;t++)if(this.get(t)!==e.get(t))return!1;return!0},e.prototype.$=function(e){if(this.length+1!==e.length)return!1;for(var t=0;t<this.length;t++)if(this.get(t)!==e.get(t))return!1;return!0},e.prototype.forEach=function(e){for(var t=this.offset,n=this.limit();t<n;t++)e(this.segments[t])},e.prototype.L=function(){return this.segments.slice(this.offset,this.limit())},e.D=function(e,t){for(var n=Math.min(e.length,t.length),r=0;r<n;r++){var i=e.get(r),o=t.get(r);if(i<o)return-1;if(i>o)return 1}return e.length<t.length?-1:e.length>t.length?1:0},e}(),F=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return Object(t.c)(n,e),n.prototype.C=function(e,t,r){return new n(e,t,r)},n.prototype.B=function(){return this.L().join("/")},n.prototype.toString=function(){return this.B()},n.q=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];for(var r=[],i=0,o=e;i<o.length;i++){var a=o[i];if(a.indexOf("//")>=0)throw new c(u.INVALID_ARGUMENT,"Invalid segment ("+a+"). Paths must not contain // in them.");r.push.apply(r,a.split("/").filter((function(e){return e.length>0})))}return new n(r)},n.U=function(){return new n([])},n}(D),U=/^[_a-zA-Z][_a-zA-Z0-9]*$/,V=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return Object(t.c)(n,e),n.prototype.C=function(e,t,r){return new n(e,t,r)},n.K=function(e){return U.test(e)},n.prototype.B=function(){return this.L().map((function(e){return e=e.replace("\\","\\\\").replace("`","\\`"),n.K(e)||(e="`"+e+"`"),e})).join(".")},n.prototype.toString=function(){return this.B()},n.prototype.W=function(){return 1===this.length&&"__name__"===this.get(0)},n.j=function(){return new n(["__name__"])},n.G=function(e){for(var t=[],r="",i=0,o=function(){if(0===r.length)throw new c(u.INVALID_ARGUMENT,"Invalid field path ("+e+"). Paths must not be empty, begin with '.', end with '.', or contain '..'");t.push(r),r=""},a=!1;i<e.length;){var s=e[i];if("\\"===s){if(i+1===e.length)throw new c(u.INVALID_ARGUMENT,"Path has trailing escape character: "+e);var l=e[i+1];if("\\"!==l&&"."!==l&&"`"!==l)throw new c(u.INVALID_ARGUMENT,"Path has invali
2d escape sequence: "+e);r+=l,i+=2}else"`"===s?(a=!a,i++):"."!==s||a?(r+=s,i++):(o(),i++)}if(o(),a)throw new c(u.INVALID_ARGUMENT,"Unterminated ` in path: "+e);return new n(t)},n.U=function(){return new n([])},n}(D),B=function(){function e(e){this.path=e}return e.H=function(t){return new e(F.q(t))},e.J=function(t){return new e(F.q(t).N(5))},e.prototype.Y=function(e){return this.path.length>=2&&this.path.get(this.path.length-2)===e},e.prototype.isEqual=function(e){return null!==e&&0===F.D(this.path,e.path)},e.prototype.toString=function(){return this.path.toString()},e.D=function(e,t){return F.D(e.path,t.path)},e.X=function(e){return e.length%2==0},e.Z=function(t){return new e(new F(t.slice()))},e}();function q(e){return null==e}function W(e){return 0===e&&1/e==-1/0}function z(e){return"number"==typeof e&&Number.isInteger(e)&&!W(e)&&e<=Number.MAX_SAFE_INTEGER&&e>=Number.MIN_SAFE_INTEGER}var H=function(e,t,n,r,i,o,a){void 0===t&&(t=null),void 0===n&&(n=[]),void 0===r&&(r=[]),void 0===i&&(i=null),void 0===o&&(o=null),void 0===a&&(a=null),this.path=e,this.collectionGroup=t,this.orderBy=n,this.filters=r,this.limit=i,this.startAt=o,this.endAt=a,this.tt=null};function G(e,t,n,r,i,o,a){return void 0===t&&(t=null),void 0===n&&(n=[]),void 0===r&&(r=[]),void 0===i&&(i=null),void 0===o&&(o=null),void 0===a&&(a=null),new H(e,t,n,r,i,o,a)}function K(e){var t=g(e);if(null===t.tt){var n=t.path.B();null!==t.collectionGroup&&(n+="|cg:"+t.collectionGroup),n+="|f:",n+=t.filters.map((function(e){return function(e){return e.field.B()+e.op.toString()+Fe(e.value)}(e)})).join(","),n+="|ob:",n+=t.orderBy.map((function(e){return(t=e).field.B()+t.dir;var t})).join(","),q(t.limit)||(n+="|l:",n+=t.limit),t.startAt&&(n+="|lb:",n+=Wn(t.startAt)),t.endAt&&(n+="|ub:",n+=Wn(t.endAt)),t.tt=n}return t.tt}function Y(e,t){if(e.limit!==t.limit)return!1;if(e.orderBy.length!==t.orderBy.length)return!1;for(var n=0;n<e.orderBy.length;n++)if(!Yn(e.orderBy[n],t.orderBy[n]))return!1;if(e.filters.length!==t.filters.length)return!1;for(var r=0;r<e.filters.length;r++)if(i=e.filters[r],o=t.filters[r],i.op!==o.op||!i.field.isEqual(o.field)||!Me(i.value,o.value))return!1;var i,o;return e.collectionGroup===t.collectionGroup&&!!e.path.isEqual(t.path)&&!!Hn(e.startAt,t.startAt)&&Hn(e.endAt,t.endAt)}function Q(e){return B.X(e.path)&&null===e.collectionGroup&&0===e.filters.length}var $,X,J=function(){function e(e,t,n,r,i,o,a){void 0===i&&(i=L.min()),void 0===o&&(o=L.min()),void 0===a&&(a=O.u),this.target=e,this.targetId=t,this.et=n,this.sequenceNumber=r,this.nt=i,this.lastLimboFreeSnapshotVersion=o,this.resumeToken=a}return e.prototype.st=function(t){return new e(this.target,this.targetId,this.et,t,this.nt,this.lastLimboFreeSnapshotVersion,this.resumeToken)},e.prototype.it=function(t,n){return new e(this.target,this.targetId,this.et,this.sequenceNumber,n,this.lastLimboFreeSnapshotVersion,t)},e.prototype.rt=function(t){return new e(this.target,this.targetId,this.et,this.sequenceNumber,this.nt,t,this.resumeToken)},e}(),Z=function(e){this.count=e};function ee(e){switch(e){case u.OK:return y();case u.CANCELLED:case u.UNKNOWN:case u.DEADLINE_EXCEEDED:case u.RESOURCE_EXHAUSTED:case u.INTERNAL:case u.UNAVAILABLE:case u.UNAUTHENTICATED:return!1;case u.INVALID_ARGUMENT:case u.NOT_FOUND:case u.ALREADY_EXISTS:case u.PERMISSION_DENIED:case u.FAILED_PRECONDITION:case u.ABORTED:case u.OUT_OF_RANGE:case u.UNIMPLEMENTED:case u.DATA_LOSS:return!0;default:return y()}}function te(e){if(void 0===e)return d("GRPC error has no .code"),u.UNKNOWN;switch(e){case $.OK:return u.OK;case $.CANCELLED:return u.CANCELLED;case $.UNKNOWN:return u.UNKNOWN;case $.DEADLINE_EXCEEDED:return u.DEADLINE_EXCEEDED;case $.RESOURCE_EXHAUSTED:return u.RESOURCE_EXHAUSTED;case $.INTERNAL:return u.INTERNAL;case $.UNAVAILABLE:return u.UNAVAILABLE;case $.UNAUTHENTICATED:return u.UNAUTHENTICATED;case $.INVALID_ARGUMENT:return u.INVALID_ARGUMENT;case $.NOT_FOUND:return u.NOT_FOUND;case $.ALREADY_EXISTS:return u.ALREADY_EXISTS;case $.PERMISSION_DENIED:return u.PERMISSION_DENIED;case $.FAILED_PRECONDITION:return u.FAILED_PRECONDITION;case $.ABORTED:return u.ABORTED;case $.OUT_OF_RANGE:return u.OUT_OF_RANGE;
2case $.UNIMPLEMENTED:return u.UNIMPLEMENTED;case $.DATA_LOSS:return u.DATA_LOSS;default:return y()}}(X=$||($={}))[X.OK=0]="OK",X[X.CANCELLED=1]="CANCELLED",X[X.UNKNOWN=2]="UNKNOWN",X[X.INVALID_ARGUMENT=3]="INVALID_ARGUMENT",X[X.DEADLINE_EXCEEDED=4]="DEADLINE_EXCEEDED",X[X.NOT_FOUND=5]="NOT_FOUND",X[X.ALREADY_EXISTS=6]="ALREADY_EXISTS",X[X.PERMISSION_DENIED=7]="PERMISSION_DENIED",X[X.UNAUTHENTICATED=16]="UNAUTHENTICATED",X[X.RESOURCE_EXHAUSTED=8]="RESOURCE_EXHAUSTED",X[X.FAILED_PRECONDITION=9]="FAILED_PRECONDITION",X[X.ABORTED=10]="ABORTED",X[X.OUT_OF_RANGE=11]="OUT_OF_RANGE",X[X.UNIMPLEMENTED=12]="UNIMPLEMENTED",X[X.INTERNAL=13]="INTERNAL",X[X.UNAVAILABLE=14]="UNAVAILABLE",X[X.DATA_LOSS=15]="DATA_LOSS";var ne=function(){function e(e,t){this.D=e,this.root=t||ie.EMPTY}return e.prototype.ot=function(t,n){return new e(this.D,this.root.ot(t,n,this.D).copy(null,null,ie.at,null,null))},e.prototype.remove=function(t){return new e(this.D,this.root.remove(t,this.D).copy(null,null,ie.at,null,null))},e.prototype.get=function(e){for(var t=this.root;!t.P();){var n=this.D(e,t.key);if(0===n)return t.value;n<0?t=t.left:n>0&&(t=t.right)}return null},e.prototype.indexOf=function(e){for(var t=0,n=this.root;!n.P();){var r=this.D(e,n.key);if(0===r)return t+n.left.size;r<0?n=n.left:(t+=n.left.size+1,n=n.right)}return-1},e.prototype.P=function(){return this.root.P()},Object.defineProperty(e.prototype,"size",{get:function(){return this.root.size},enumerable:!1,configurable:!0}),e.prototype.ht=function(){return this.root.ht()},e.prototype.ct=function(){return this.root.ct()},e.prototype.ut=function(e){return this.root.ut(e)},e.prototype.forEach=function(e){this.ut((function(t,n){return e(t,n),!1}))},e.prototype.toString=function(){var e=[];return this.ut((function(t,n){return e.push(t+":"+n),!1})),"{"+e.join(", ")+"}"},e.prototype.lt=function(e){return this.root.lt(e)},e.prototype._t=function(){return new re(this.root,null,this.D,!1)},e.prototype.ft=function(e){return new re(this.root,e,this.D,!1)},e.prototype.dt=function(){return new re(this.root,null,this.D,!0)},e.prototype.wt=function(e){return new re(this.root,e,this.D,!0)},e}(),re=function(){function e(e,t,n,r){this.Et=r,this.Tt=[];for(var i=1;!e.P();)if(i=t?n(e.key,t):1,r&&(i*=-1),i<0)e=this.Et?e.left:e.right;else{if(0===i){this.Tt.push(e);break}this.Tt.push(e),e=this.Et?e.right:e.left}}return e.prototype.It=function(){var e=this.Tt.pop(),t={key:e.key,value:e.value};if(this.Et)for(e=e.left;!e.P();)this.Tt.push(e),e=e.right;else for(e=e.right;!e.P();)this.Tt.push(e),e=e.left;return t},e.prototype.At=function(){return this.Tt.length>0},e.prototype.Rt=function(){if(0===this.Tt.length)return null;var e=this.Tt[this.Tt.length-1];return{key:e.key,value:e.value}},e}(),ie=function(){function e(t,n,r,i,o){this.key=t,this.value=n,this.color=null!=r?r:e.RED,this.left=null!=i?i:e.EMPTY,this.right=null!=o?o:e.EMPTY,this.size=this.left.size+1+this.right.size}return e.prototype.copy=function(t,n,r,i,o){return new e(null!=t?t:this.key,null!=n?n:this.value,null!=r?r:this.color,null!=i?i:this.left,null!=o?o:this.right)},e.prototype.P=function(){return!1},e.prototype.ut=function(e){return this.left.ut(e)||e(this.key,this.value)||this.right.ut(e)},e.prototype.lt=function(e){return this.right.lt(e)||e(this.key,this.value)||this.left.lt(e)},e.prototype.min=function(){return this.left.P()?this:this.left.min()},e.prototype.ht=function(){return this.min().key},e.prototype.ct=function(){return this.right.P()?this.key:this.right.ct()},e.prototype.ot=function(e,t,n){var r=this,i=n(e,r.key);return(r=i<0?r.copy(null,null,null,r.left.ot(e,t,n),null):0===i?r.copy(null,t,null,null,null):r.copy(null,null,null,null,r.right.ot(e,t,n))).Pt()},e.prototype.gt=function(){if(this.left.P())return e.EMPTY;var t=this;return t.left.Vt()||t.left.left.Vt()||(t=t.yt()),(t=t.copy(null,null,null,t.left.gt(),null)).Pt()},e.prototype.remove=function(t,n){var r,i=this;if(n(t,i.key)<0)i.left.P()||i.left.Vt()||i.left.left.Vt()||(i=i.yt()),i=i.copy(null,null,null,i.left.remove(t,n),null);else{if(i.left.Vt()&&(i=i.bt()),i.right.P()||i.right.Vt()||i.right.left.Vt()||(i=i.vt()),0===n(t,i.key)){if(i.right.P())return e.EMPTY;r=i.right.min(),i=i.copy(r.key,r.value,null,null,i.right.gt())}i=i.copy(null,null,null,null,i.right.remove(t,n))}return i.Pt()},e.prototype.Vt=function(){return this.color},e.prototype.Pt=function(){var e=this;return e.right.Vt()&&!e.left.Vt()&&(e=e.St()),e.left.Vt()&&e.left.left.Vt()&&(e=e.bt()),e.left.Vt()&&e.right.Vt()&&
2(e=e.Dt()),e},e.prototype.yt=function(){var e=this.Dt();return e.right.left.Vt()&&(e=(e=(e=e.copy(null,null,null,null,e.right.bt())).St()).Dt()),e},e.prototype.vt=function(){var e=this.Dt();return e.left.left.Vt()&&(e=(e=e.bt()).Dt()),e},e.prototype.St=function(){var t=this.copy(null,null,e.RED,null,this.right.left);return this.right.copy(null,null,this.color,t,null)},e.prototype.bt=function(){var t=this.copy(null,null,e.RED,this.left.right,null);return this.left.copy(null,null,this.color,null,t)},e.prototype.Dt=function(){var e=this.left.copy(null,null,!this.left.color,null,null),t=this.right.copy(null,null,!this.right.color,null,null);return this.copy(null,null,!this.color,e,t)},e.prototype.Ct=function(){var e=this.Nt();return Math.pow(2,e)<=this.size+1},e.prototype.Nt=function(){if(this.Vt()&&this.left.Vt())throw y();if(this.right.Vt())throw y();var e=this.left.Nt();if(e!==this.right.Nt())throw y();return e+(this.Vt()?0:1)},e}();ie.EMPTY=null,ie.RED=!0,ie.at=!1,ie.EMPTY=new(function(){function e(){this.size=0}return Object.defineProperty(e.prototype,"key",{get:function(){throw y()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"value",{get:function(){throw y()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"color",{get:function(){throw y()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"left",{get:function(){throw y()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"right",{get:function(){throw y()},enumerable:!1,configurable:!0}),e.prototype.copy=function(e,t,n,r,i){return this},e.prototype.ot=function(e,t,n){return new ie(e,t)},e.prototype.remove=function(e,t){return this},e.prototype.P=function(){return!0},e.prototype.ut=function(e){return!1},e.prototype.lt=function(e){return!1},e.prototype.ht=function(){return null},e.prototype.ct=function(){return null},e.prototype.Vt=function(){return!1},e.prototype.Ct=function(){return!0},e.prototype.Nt=function(){return 0},e}());var oe=function(){function e(e){this.D=e,this.data=new ne(this.D)}return e.prototype.has=function(e){return null!==this.data.get(e)},e.prototype.first=function(){return this.data.ht()},e.prototype.last=function(){return this.data.ct()},Object.defineProperty(e.prototype,"size",{get:function(){return this.data.size},enumerable:!1,configurable:!0}),e.prototype.indexOf=function(e){return this.data.indexOf(e)},e.prototype.forEach=function(e){this.data.ut((function(t,n){return e(t),!1}))},e.prototype.xt=function(e,t){for(var n=this.data.ft(e[0]);n.At();){var r=n.It();if(this.D(r.key,e[1])>=0)return;t(r.key)}},e.prototype.Ft=function(e,t){var n;for(n=void 0!==t?this.data.ft(t):this.data._t();n.At();)if(!e(n.It().key))return},e.prototype.kt=function(e){var t=this.data.ft(e);return t.At()?t.It().key:null},e.prototype._t=function(){return new ae(this.data._t())},e.prototype.ft=function(e){return new ae(this.data.ft(e))},e.prototype.add=function(e){return this.copy(this.data.remove(e).ot(e,!0))},e.prototype.delete=function(e){return this.has(e)?this.copy(this.data.remove(e)):this},e.prototype.P=function(){return this.data.P()},e.prototype.Ot=function(e){var t=this;return t.size<e.size&&(t=e,e=this),e.forEach((function(e){t=t.add(e)})),t},e.prototype.isEqual=function(t){if(!(t instanceof e))return!1;if(this.size!==t.size)return!1;for(var n=this.data._t(),r=t.data._t();n.At();){var i=n.It().key,o=r.It().key;if(0!==this.D(i,o))return!1}return!0},e.prototype.L=function(){var e=[];return this.forEach((function(t){e.push(t)})),e},e.prototype.toString=function(){var e=[];return this.forEach((function(t){return e.push(t)})),"SortedSet("+e.toString()+")"},e.prototype.copy=function(t){var n=new e(this.D);return n.data=t,n},e}(),ae=function(){function e(e){this.Mt=e}return e.prototype.It=function(){return this.Mt.It().key},e.prototype.At=function(){return this.Mt.At()},e}(),se=new ne(B.D);function ue(){return se}function ce(){return ue()}var le=new ne(B.D);function fe(){return le}var he=new ne(B.D),de=new oe(B.D);function pe(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];for(var n=de,r=0,i=e;r<i.length;r++){var o=i[r];n=n.add(o)}return n}var ve=new oe(w);function ye(){return ve}var me=function(){function e(e){this.D=e?function(t,n){return e(t,n)||B.D(t.key,n.key)}:function(e,t){return B.D(e.key,t.key)}
2,this.$t=fe(),this.Lt=new ne(this.D)}return e.Bt=function(t){return new e(t.D)},e.prototype.has=function(e){return null!=this.$t.get(e)},e.prototype.get=function(e){return this.$t.get(e)},e.prototype.first=function(){return this.Lt.ht()},e.prototype.last=function(){return this.Lt.ct()},e.prototype.P=function(){return this.Lt.P()},e.prototype.indexOf=function(e){var t=this.$t.get(e);return t?this.Lt.indexOf(t):-1},Object.defineProperty(e.prototype,"size",{get:function(){return this.Lt.size},enumerable:!1,configurable:!0}),e.prototype.forEach=function(e){this.Lt.ut((function(t,n){return e(t),!1}))},e.prototype.add=function(e){var t=this.delete(e.key);return t.copy(t.$t.ot(e.key,e),t.Lt.ot(e,null))},e.prototype.delete=function(e){var t=this.get(e);return t?this.copy(this.$t.remove(e),this.Lt.remove(t)):this},e.prototype.isEqual=function(t){if(!(t instanceof e))return!1;if(this.size!==t.size)return!1;for(var n=this.Lt._t(),r=t.Lt._t();n.At();){var i=n.It().key,o=r.It().key;if(!i.isEqual(o))return!1}return!0},e.prototype.toString=function(){var e=[];return this.forEach((function(t){e.push(t.toString())})),0===e.length?"DocumentSet ()":"DocumentSet (\n "+e.join(" \n")+"\n)"},e.prototype.copy=function(t,n){var r=new e;return r.D=this.D,r.$t=t,r.Lt=n,r},e}(),ge=function(){function e(){this.qt=new ne(B.D)}return e.prototype.track=function(e){var t=e.doc.key,n=this.qt.get(t);n?0!==e.type&&3===n.type?this.qt=this.qt.ot(t,e):3===e.type&&1!==n.type?this.qt=this.qt.ot(t,{type:n.type,doc:e.doc}):2===e.type&&2===n.type?this.qt=this.qt.ot(t,{type:2,doc:e.doc}):2===e.type&&0===n.type?this.qt=this.qt.ot(t,{type:0,doc:e.doc}):1===e.type&&0===n.type?this.qt=this.qt.remove(t):1===e.type&&2===n.type?this.qt=this.qt.ot(t,{type:1,doc:n.doc}):0===e.type&&1===n.type?this.qt=this.qt.ot(t,{type:2,doc:e.doc}):y():this.qt=this.qt.ot(t,e)},e.prototype.Ut=function(){var e=[];return this.qt.ut((function(t,n){e.push(n)})),e},e}(),be=function(){function e(e,t,n,r,i,o,a,s){this.query=e,this.docs=t,this.Kt=n,this.docChanges=r,this.Qt=i,this.fromCache=o,this.Wt=a,this.jt=s}return e.Gt=function(t,n,r,i){var o=[];return n.forEach((function(e){o.push({type:0,doc:e})})),new e(t,n,me.Bt(n),o,r,i,!0,!1)},Object.defineProperty(e.prototype,"hasPendingWrites",{get:function(){return!this.Qt.P()},enumerable:!1,configurable:!0}),e.prototype.isEqual=function(e){if(!(this.fromCache===e.fromCache&&this.Wt===e.Wt&&this.Qt.isEqual(e.Qt)&&Pn(this.query,e.query)&&this.docs.isEqual(e.docs)&&this.Kt.isEqual(e.Kt)))return!1;var t=this.docChanges,n=e.docChanges;if(t.length!==n.length)return!1;for(var r=0;r<t.length;r++)if(t[r].type!==n[r].type||!t[r].doc.isEqual(n[r].doc))return!1;return!0},e}(),_e=function(){function e(e,t,n,r,i){this.nt=e,this.zt=t,this.Ht=n,this.Jt=r,this.Yt=i}return e.Xt=function(t,n){var r=new Map;return r.set(t,we.Zt(t,n)),new e(L.min(),r,ye(),ue(),pe())},e}(),we=function(){function e(e,t,n,r,i){this.resumeToken=e,this.te=t,this.ee=n,this.ne=r,this.se=i}return e.Zt=function(t,n){return new e(O.u,n,pe(),pe(),pe())},e}(),ke=function(e,t,n,r){this.ie=e,this.removedTargetIds=t,this.key=n,this.re=r},Se=function(e,t){this.targetId=e,this.oe=t},Oe=function(e,t,n,r){void 0===n&&(n=O.u),void 0===r&&(r=null),this.state=e,this.targetIds=t,this.resumeToken=n,this.cause=r},Ee=function(){function e(){this.ae=0,this.he=Pe(),this.ce=O.u,this.ue=!1,this.le=!0}return Object.defineProperty(e.prototype,"te",{get:function(){return this.ue},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"resumeToken",{get:function(){return this.ce},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"_e",{get:function(){return 0!==this.ae},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"fe",{get:function(){return this.le},enumerable:!1,configurable:!0}),e.prototype.de=function(e){e.o()>0&&(this.le=!0,this.ce=e)},e.prototype.we=function(){var e=pe(),t=pe(),n=pe();return this.he.forEach((function(r,i){switch(i){case 0:e=e.add(r);break;case 2:t=t.add(r);break;case 1:n=n.add(r);break;default:y()}})),new we(this.ce,this.ue,e,t,n)},e.prototype.Ee=function(){this.le=!1,this.he=Pe()},e.prototype.Te=function(e,t){this.le=!0,this.he=this.he.ot(e,t)},e.prototype.Ie=function(e){this.le=!0,this.he=this.he.remove(e)},e.prototype.me=function(){this.ae+=1},e.prototype.Ae=function(){this.ae-=1},e.prototype.Re=function(){this.le=!0,this.ue=!0},e}(),Te=function(){function e(e){this.Pe=e,this.ge=new Map,this.Ve=ue(),this.ye=Ce(),this.pe=new oe(w)}return e.prototype.be=function(e){for(var t=0,n=e.ie;t<n.length;t++){var r=n[t];e.re instanceof hn?this.ve(r,e.re):e.re instanceof dn&&this.Se(r,e.key,e.re)}for(var i=0,o=e.removedTargetIds;i<o.length;i++){var a=o[i];this.Se(a,e.key,e.re)}},e.prototype.De=function(e){var t=this;this.Ce(e,(function(n){var r=t.Ne(n);switch(e.state){case 0:t.xe(n)&&r.de(e.resumeToken);break;case 1:r.Ae(),r._e||r.Ee(),r.de(e.resumeToken);break;case 2:r.Ae(),r._e||t.removeTarget(n);break;case 3:t.xe(n)&&(r.Re(),r.de(e.resumeToken));break;case 4:t.xe(n)&&(t.Fe(n),r.de(e.resumeToken));break;default:y()}}))},e.prototype.Ce=function(e,t){var n=this;e.targetIds.length>0?e.targetIds.forEach(t):this.ge.forEach((function(e,r){n.xe(r)&&t(r)}))},e.prototype.ke=function(e){var t=e.targetId,n=e.oe.count,r=this.Oe(t);if(r){var i=r.target;if(Q(i))if(0===n){var o=new B(i.path);this.Se(t,o,new dn(o,L.min()))}else m(1===n);else this.Me(t)!==n&&(this.Fe(t),this.pe=this.pe.add(t))}},e.prototype.$e=function(e){var t=this,n=new Map;this.ge.forEach((function(r,i){var o=t.Oe(i);if(o){if(r.te&&Q(o.target)){var a=new B(o.target.path);null!==t.Ve.get(a)||t.Le(i,a)||t.Se(i,a,new dn(a,e))}r.fe&&(n.set(i,r.we()),r.Ee())}}));var r=pe();this.ye.forEach((function(e,n){var i=!0;n.Ft((function(e){var n=t.Oe(e);return!n||2===n.et||(i=!1,!1)})),i&&(r=r.add(e))}));var i=new _e(e,n,this.pe,this.Ve,r);return this.Ve=ue(),this.ye=Ce(),this.pe=new oe(w),i},e.prototype.ve=function(e,t){if(this.xe(e)){var n=this.Le(e,t.key)?2:0;this.Ne(e).Te(t.key,n),this.Ve=this.Ve.ot(t.key,t),this.ye=this.ye.ot(t.key,this.Be(t.key).add(e))}},e.prototype.Se=function(e,t,n){if(this.xe(e)){var r=this.Ne(e);this.Le(e,t)?r.Te(t,1):r.Ie(t),this.ye=this.ye.ot(t,this.Be(t).delete(e)),n&&(this.Ve=this.Ve.ot(t,n))}},e.prototype.removeTarget=function(e){this.ge.delete(e)},e.prototype.Me=function(e){var t=this.Ne(e).we();return this.Pe.qe(e).size+t.ee.size-t.se.size},e.prototype.me=function(e){this.Ne(e).me()},e.prototype.Ne=function(e){var t=this.ge.get(e);return t||(t=new Ee,this.ge.set(e,t)),t},e.prototype.Be=function(e){var t=this.ye.get(e);return t||(t=new oe(w),this.ye=this.ye.ot(e,t)),t},e.prototype.xe=function(e){var t=null!==this.Oe(e);return t||h("WatchChangeAggregator","Detected inactive target",e),t},e.prototype.Oe=function(e){var t=this.ge.get(e);return t&&t._e?null:this.Pe.Ue(e)},e.prototype.Fe=function(e){var t=this;this.ge.set(e,new Ee),this.Pe.qe(e).forEach((function(n){t.Se(e,n,null)}))},e.prototype.Le=function(e,t){return this.Pe.qe(e).has(t)},e}();function Ce(){return new ne(B.D)}function Pe(){return new ne(B.D)}function xe(e){var t,n;return"server_timestamp"===(null===(n=((null===(t=null==e?void 0:e.mapValue)||void 0===t?void 0:t.fields)||{}).__type__)||void 0===n?void 0:n.stringValue)}function Ie(e){var t=e.mapValue.fields.__previous_value__;return xe(t)?Ie(t):t}function je(e){var t=Ve(e.mapValue.fields.__local_write_time__.timestampValue);return new N(t.seconds,t.nanos)}var Re=new RegExp(/^\d{4}-\d\d-\d\dT\d\d:\d\d:\d\d(?:\.(\d+))?Z$/);function Ae(e){return"nullValue"in e?0:"booleanValue"in e?1:"integerValue"in e||"doubleValue"in e?2:"timestampValue"in e?3:"stringValue"in e?5:"bytesValue"in e?6:"referenceValue"in e?7:"geoPointValue"in e?8:"arrayValue"in e?9:"mapValue"in e?xe(e)?4:10:y()}function Me(e,t){var n=Ae(e);
2if(n!==Ae(t))return!1;switch(n){case 0:return!0;case 1:return e.booleanValue===t.booleanValue;case 4:return je(e).isEqual(je(t));case 3:return function(e,t){if("string"==typeof e.timestampValue&&"string"==typeof t.timestampValue&&e.timestampValue.length===t.timestampValue.length)return e.timestampValue===t.timestampValue;var n=Ve(e.timestampValue),r=Ve(t.timestampValue);return n.seconds===r.seconds&&n.nanos===r.nanos}(e,t);case 5:return e.stringValue===t.stringValue;case 6:return function(e,t){return qe(e.bytesValue).isEqual(qe(t.bytesValue))}(e,t);case 7:return e.referenceValue===t.referenceValue;case 8:return function(e,t){return Be(e.geoPointValue.latitude)===Be(t.geoPointValue.latitude)&&Be(e.geoPointValue.longitude)===Be(t.geoPointValue.longitude)}(e,t);case 2:return function(e,t){if("integerValue"in e&&"integerValue"in t)return Be(e.integerValue)===Be(t.integerValue);if("doubleValue"in e&&"doubleValue"in t){var n=Be(e.doubleValue),r=Be(t.doubleValue);return n===r?W(n)===W(r):isNaN(n)&&isNaN(r)}return!1}(e,t);case 9:return k(e.arrayValue.values||[],t.arrayValue.values||[],Me);case 10:return function(e,t){var n=e.mapValue.fields||{},r=t.mapValue.fields||{};if(j(n)!==j(r))return!1;for(var i in n)if(n.hasOwnProperty(i)&&(void 0===r[i]||!Me(n[i],r[i])))return!1;return!0}(e,t);default:return y()}}function Ne(e,t){return void 0!==(e.values||[]).find((function(e){return Me(e,t)}))}function Le(e,t){var n=Ae(e),r=Ae(t);if(n!==r)return w(n,r);switch(n){case 0:return 0;case 1:return w(e.booleanValue,t.booleanValue);case 2:return function(e,t){var n=Be(e.integerValue||e.doubleValue),r=Be(t.integerValue||t.doubleValue);return n<r?-1:n>r?1:n===r?0:isNaN(n)?isNaN(r)?0:-1:1}(e,t);case 3:return De(e.timestampValue,t.timestampValue);case 4:return De(je(e),je(t));case 5:return w(e.stringValue,t.stringValue);case 6:return function(e,t){var n=qe(e),r=qe(t);return n.h(r)}(e.bytesValue,t.bytesValue);case 7:return function(e,t){for(var n=e.split("/"),r=t.split("/"),i=0;i<n.length&&i<r.length;i++){var o=w(n[i],r[i]);if(0!==o)return o}return w(n.length,r.length)}(e.referenceValue,t.referenceValue);case 8:return function(e,t){var n=w(Be(e.latitude),Be(t.latitude));return 0!==n?n:w(Be(e.longitude),Be(t.longitude))}(e.geoPointValue,t.geoPointValue);case 9:return function(e,t){for(var n=e.values||[],r=t.values||[],i=0;i<n.length&&i<r.length;++i){var o=Le(n[i],r[i]);if(o)return o}return w(n.length,r.length)}(e.arrayValue,t.arrayValue);case 10:return function(e,t){var n=e.fields||{},r=Object.keys(n),i=t.fields||{},o=Object.keys(i);r.sort(),o.sort();for(var a=0;a<r.length&&a<o.length;++a){var s=w(r[a],o[a]);if(0!==s)return s;var u=Le(n[r[a]],i[o[a]]);if(0!==u)return u}return w(r.length,o.length)}(e.mapValue,t.mapValue);default:throw y()}}function De(e,t){if("string"==typeof e&&"string"==typeof t&&e.length===t.length)return w(e,t);var n=Ve(e),r=Ve(t),i=w(n.seconds,r.seconds);return 0!==i?i:w(n.nanos,r.nanos)}function Fe(e){return Ue(e)}function Ue(e){return"nullValue"in e?"null":"booleanValue"in e?""+e.booleanValue:"integerValue"in e?""+e.integerValue:"doubleValue"in e?""+e.doubleValue:"timestampValue"in e?function(e){var t=Ve(e);return"time("+t.seconds+","+t.nanos+")"}(e.timestampValue):"stringValue"in e?e.stringValue:"bytesValue"in e?qe(e.bytesValue).toBase64():"referenceValue"in e?(n=e.referenceValue,B.J(n).toString()):"geoPointValue"in e?"geo("+(t=e.geoPointValue).latitude+","+t.longitude+")":"arrayValue"in e?function(e){for(var t="[",n=!0,r=0,i=e.values||[];r<i.length;r++)n?n=!1:t+=",",t+=Ue(i[r]);return t+"]"}(e.arrayValue):"mapValue"in e?function(e){for(var t="{",n=!0,r=0,i=Object.keys(e.fields||{}).sort();r<i.length;r++){var o=i[r];n?n=!1:t+=",",t+=o+":"+Ue(e.fields[o])}return t+"}"}(e.mapValue):y();var t,n}function Ve(e){if(m(!!e),"string"==typeof e){var t=0,n=Re.exec(e);if(m(!!n),n[1]){var r=n[1];r=(r+"000000000").substr(0,9),t=Number(r)}var i=new Date(e);return{seconds:Math.floor(i.getTime()/1e3),nanos:t}}return{seconds:Be(e.seconds),nanos:Be(e.nanos)}}function Be(e){return"number"==typeof e?e:"string"==typeof e?Number(e):0}function qe(e){return"string"==typeof e?O.fromBase64String(e):O.fromUint8Array(e)}function We(e,t){return{referenceValue:"projects/"+e.projectId+"/databases/"+e.database+"/documents/"+t.path.B()}}function ze(e){return!!e&&"integerValue"in e}function He(e){return!!e&&"arrayValue"in e}function Ge(e){return!!e&&"nullValue"in e}function Ke(e){return!!e&&"doubleValue"in e&&isNaN(Number(e.doubleValue))}function Ye(e){return!!e&&"mapValue"in e}var Qe={asc:"ASCENDING",desc:"DESCENDING"},$e={"<":"LESS_THAN","<=":"LESS_THAN_OR_EQUAL",">":"GREATER_THAN",">=":"GREATER_THAN_OR_EQUAL","==":"EQUAL","!=":"NOT_EQUAL","array-contains":"ARRAY_CONTAINS",in:"IN","not-in":"NOT_IN","array-contains-any":"ARRAY_CONTAINS_ANY"},Xe=function(e,t){this._=e,this.Ke=t};function Je(e){return{integerValue:""+e}}function Ze(e,t){if(e.Ke){if(isNaN(t))return{doubleValue:"NaN"};if(t===1/0)return{doubleValue:"Infinity"};if(t===-1/0)return{doubleValue:"-Infinity"}}return{doubleValue:W(t)?"-0":t}}function et(e,t){return z(t)?Je(t):Ze(e,t)}function tt(e,t){return e.Ke?new Date(1e3*t.seconds).toISOString().replace(/\.\d*/,"").replace("Z","")+"."+("000000000"+t.nanoseconds).slice(-9)+"Z":{seconds:""+t.seconds,nanos:t.nanoseconds}}function nt(e,t){return e.Ke?t.toBase64():t.toUint8Array()}function rt(e,t){return tt(e,t.v())}function it(e){return m(!!e),L.V(function(e){var t=Ve(e);return new N(t.seconds,t.nanos)}(e))}function ot(e,t){return function(e){return new F(["projects",e.projectId,"databases",e.database])}(e).child("documents").child(t).B()}function at(e){var t=F.q(e);return m(xt(t)),t}function st(e,t){return ot(e._,t.path)}function ut(e,t){var n=at(t);return m(n.get(1)===e._.projectId),m(!n.get(3)&&!e._.database||n.get(3)===e._.database),new B(ht(n))}function ct(e,t){return ot(e._,t)}function lt(e){var t=at(e);return 4===t.length?F.U():ht(t)}function ft(e){return new F(["projects",e._.projectId,"databases",e._.database]).B()}function ht(e){return m(e.length>4&&"documents"===e.get(4)),e.N(5)}function dt(e,t,n){return{name:st(e,t),fields:n.proto.mapValue.fields}}function pt(e,t){var n;
2if(t instanceof Zt)n={update:dt(e,t.key,t.value)};else if(t instanceof an)n={delete:st(e,t.key)};else if(t instanceof en)n={update:dt(e,t.key,t.data),updateMask:Pt(t.Qe)};else if(t instanceof nn)n={transform:{document:st(e,t.key),fieldTransforms:t.fieldTransforms.map((function(e){return function(e,t){var n=t.transform;if(n instanceof Mt)return{fieldPath:t.field.B(),setToServerValue:"REQUEST_TIME"};if(n instanceof Nt)return{fieldPath:t.field.B(),appendMissingElements:{values:n.elements}};if(n instanceof Dt)return{fieldPath:t.field.B(),removeAllFromArray:{values:n.elements}};if(n instanceof Ut)return{fieldPath:t.field.B(),increment:n.We};throw y()}(0,e)}))}};else{if(!(t instanceof sn))return y();n={verify:st(e,t.key)}}return t.Ge.je||(n.currentDocument=function(e,t){return void 0!==t.updateTime?{updateTime:rt(e,t.updateTime)}:void 0!==t.exists?{exists:t.exists}:y()}(e,t.Ge)),n}function vt(e,t){var n=t.currentDocument?function(e){return void 0!==e.updateTime?Ht.updateTime(it(e.updateTime)):void 0!==e.exists?Ht.exists(e.exists):Ht.ze()}(t.currentDocument):Ht.ze();if(t.update){t.update.name;var r=ut(e,t.update.name),i=new un({mapValue:{fields:t.update.fields}});if(t.updateMask){var o=function(e){var t=e.fieldPaths||[];return new qt(t.map((function(e){return V.G(e)})))}(t.updateMask);return new en(r,i,o,n)}return new Zt(r,i,n)}if(t.delete){var a=ut(e,t.delete);return new an(a,n)}if(t.transform){var s=ut(e,t.transform.document),u=t.transform.fieldTransforms.map((function(t){return function(e,t){var n=null;if("setToServerValue"in t)m("REQUEST_TIME"===t.setToServerValue),n=new Mt;else if("appendMissingElements"in t){var r=t.appendMissingElements.values||[];n=new Nt(r)}else if("removeAllFromArray"in t){var i=t.removeAllFromArray.values||[];n=new Dt(i)}else"increment"in t?n=new Ut(e,t.increment):y();var o=V.G(t.fieldPath);return new Wt(o,n)}(e,t)}));return m(!0===n.exists),new nn(s,u)}if(t.verify){var c=ut(e,t.verify);return new sn(c,n)}return y()}function yt(e,t){return{documents:[ct(e,t.path)]}}function mt(e,t){var n={structuredQuery:{}},r=t.path;null!==t.collectionGroup?(n.parent=ct(e,r),n.structuredQuery.from=[{collectionId:t.collectionGroup,allDescendants:!0}]):(n.parent=ct(e,r.F()),n.structuredQuery.from=[{collectionId:r.O()}]);var i=function(e){if(0!==e.length){var t=e.map((function(e){return function(e){if("=="===e.op){if(Ke(e.value))return{unaryFilter:{field:Ot(e.field),op:"IS_NAN"}};if(Ge(e.value))return{unaryFilter:{field:Ot(e.field),op:"IS_NULL"}}}else if("!="===e.op){if(Ke(e.value))return{unaryFilter:{field:Ot(e.field),op:"IS_NOT_NAN"}};if(Ge(e.value))return{unaryFilter:{field:Ot(e.field),op:"IS_NOT_NULL"}}}return{fieldFilter:{field:Ot(e.field),op:St(e.op),value:e.value}}}(e)}));return 1===t.length?t[0]:{compositeFilter:{op:"AND",filters:t}}}}(t.filters);i&&(n.structuredQuery.where=i);var o=function(e){if(0!==e.length)return e.map((function(e){return function(e){return{field:Ot(e.field),direction:kt(e.dir)}}(e)}))}(t.orderBy);o&&(n.structuredQuery.orderBy=o);var a=function(e,t){return e.Ke||q(t)?t:{value:t}}(e,t.limit);return null!==a&&(n.structuredQuery.limit=a),t.startAt&&(n.structuredQuery.startAt=_t(t.startAt)),t.endAt&&(n.structuredQuery.endAt=_t(t.endAt)),n}function gt(e){var t=lt(e.parent),n=e.structuredQuery,r=n.from?n.from.length:0,i=null;if(r>0){m(1===r);var o=n.from[0];o.allDescendants?i=o.collectionId:t=t.child(o.collectionId)}var a=[];n.where&&(a=bt(n.where));var s=[];n.orderBy&&(s=n.orderBy.map((function(e){return function(e){return new Gn(Et(e.field),function(e){switch(e){case"ASCENDING":return"asc";case"DESCENDING":return"desc";default:return}}(e.direction))}(e)})));var u=null;n.limit&&(u=function(e){var t;return q(t="object"==typeof e?e.value:e)?null:t}(n.limit));var c=null;n.startAt&&(c=wt(n.startAt));var l=null;return n.endAt&&(l=wt(n.endAt)),On(yn(t,i,s,a,u,"F",c,l))}function bt(e){return e?void 0!==e.unaryFilter?[Ct(e)]:void 0!==e.fieldFilter?[Tt(e)]:void 0!==e.compositeFilter?e.compositeFilter.filters.map((function(e){return bt(e)})).reduce((function(e,t){return e.concat(t)})):y():[]}function _t(e){return{before:e.before,values:e.position}}function wt(e){var t=!!e.before,n=e.values||[];return new qn(n,t)}function kt(e){return Qe[e]}function St(e){return $e[e]}function Ot(e){return{fieldPath:e.B()}}function Et(e){return V.G(e.fieldPath)}function Tt(e){return An.create(Et(e.fieldFilter.field),function(e){switch(e){case"EQUAL":return"==";case"NOT_EQUAL":return"!=";case"GREATER_THAN":return">";case"GREATER_THAN_OR_EQUAL":return">=";case"LESS_THAN":return"<";case"LESS_THAN_OR_EQUAL":return"<=";case"ARRAY_CONTAINS":return"array-contains";case"IN":return"in";case"NOT_IN":return"not-in";case"ARRAY_CONTAINS_ANY":return"array-contains-any";case"OPERATOR_UNSPECIFIED":default:return y()}}(e.fieldFilter.op),e.fieldFilter.value)}function Ct(e){switch(e.unaryFilter.op){case"IS_NAN":var t=Et(e.unaryFilter.field);return An.create(t,"==",{doubleValue:NaN});case"IS_NULL":var n=Et(e.unaryFilter.field);return An.create(n,"==",{nullValue:"NULL_VALUE"});
2case"IS_NOT_NAN":var r=Et(e.unaryFilter.field);return An.create(r,"!=",{doubleValue:NaN});case"IS_NOT_NULL":var i=Et(e.unaryFilter.field);return An.create(i,"!=",{nullValue:"NULL_VALUE"});case"OPERATOR_UNSPECIFIED":default:return y()}}function Pt(e){var t=[];return e.fields.forEach((function(e){return t.push(e.B())})),{fieldPaths:t}}function xt(e){return e.length>=4&&"projects"===e.get(0)&&"databases"===e.get(2)}var It=function(){this.He=void 0};function jt(e,t,n){return e instanceof Mt?function(e,t){var n={fields:{__type__:{stringValue:"server_timestamp"},__local_write_time__:{timestampValue:{seconds:e.seconds,nanos:e.nanoseconds}}}};return t&&(n.fields.__previous_value__=t),{mapValue:n}}(n,t):e instanceof Nt?Lt(e,t):e instanceof Dt?Ft(e,t):function(e,t){var n=At(e,t),r=Vt(n)+Vt(e.We);return ze(n)&&ze(e.We)?Je(r):Ze(e.serializer,r)}(e,t)}function Rt(e,t,n){return e instanceof Nt?Lt(e,t):e instanceof Dt?Ft(e,t):n}function At(e,t){return e instanceof Ut?ze(n=t)||function(e){return!!e&&"doubleValue"in e}(n)?t:{integerValue:0}:null;var n}var Mt=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return Object(t.c)(n,e),n}(It),Nt=function(e){function n(t){var n=this;return(n=e.call(this)||this).elements=t,n}return Object(t.c)(n,e),n}(It);function Lt(e,t){for(var n=Bt(t),r=function(e){n.some((function(t){return Me(t,e)}))||n.push(e)},i=0,o=e.elements;i<o.length;i++)r(o[i]);return{arrayValue:{values:n}}}var Dt=function(e){function n(t){var n=this;return(n=e.call(this)||this).elements=t,n}return Object(t.c)(n,e),n}(It);function Ft(e,t){for(var n=Bt(t),r=function(e){n=n.filter((function(t){return!Me(t,e)}))},i=0,o=e.elements;i<o.length;i++)r(o[i]);return{arrayValue:{values:n}}}var Ut=function(e){function n(t,n){var r=this;return(r=e.call(this)||this).serializer=t,r.We=n,r}return Object(t.c)(n,e),n}(It);function Vt(e){return Be(e.integerValue||e.doubleValue)}function Bt(e){return He(e)&&e.arrayValue.values?e.arrayValue.values.slice():[]}var qt=function(){function e(e){this.fields=e,e.sort(V.D)}return e.prototype.Je=function(e){for(var t=0,n=this.fields;t<n.length;t++)if(n[t].M(e))return!0;return!1},e.prototype.isEqual=function(e){return k(this.fields,e.fields,(function(e,t){return e.isEqual(t)}))},e}(),Wt=function(e,t){this.field=e,this.transform=t},zt=function(e,t){this.version=e,this.transformResults=t},Ht=function(){function e(e,t){this.updateTime=e,this.exists=t}return e.ze=function(){return new e},e.exists=function(t){return new e(void 0,t)},e.updateTime=function(t){return new e(t)},Object.defineProperty(e.prototype,"je",{get:function(){return void 0===this.updateTime&&void 0===this.exists},enumerable:!1,configurable:!0}),e.prototype.isEqual=function(e){return this.exists===e.exists&&(this.updateTime?!!e.updateTime&&this.updateTime.isEqual(e.updateTime):!e.updateTime)},e}();function Gt(e,t){return void 0!==e.updateTime?t instanceof hn&&t.version.isEqual(e.updateTime):void 0===e.exists||e.exists===t instanceof hn}var Kt=function(){};function Yt(e,t,n){return e instanceof Zt?function(e,t,n){return new hn(e.key,n.version,e.value,{hasCommittedMutations:!0})}(e,0,n):e instanceof en?function(e,t,n){if(!Gt(e.Ge,t))return new pn(e.key,n.version);var r=tn(e,t);return new hn(e.key,n.version,r,{hasCommittedMutations:!0})}(e,t,n):e instanceof nn?function(e,t,n){if(m(null!=n.transformResults),!Gt(e.Ge,t))return new pn(e.key,n.version);var r=rn(e,t),i=function(e,t,n){var r=[];m(e.length===n.length);for(var i=0;i<n.length;i++){var o=e[i],a=o.transform,s=null;t instanceof hn&&(s=t.field(o.field)),r.push(Rt(a,s,n[i]))}return r}(e.fieldTransforms,t,n.transformResults),o=n.version,a=on(e,r.data(),i);return new hn(e.key,o,a,{hasCommittedMutations:!0})}(e,t,n):function(e,t,n){return new dn(e.key,n.version,{hasCommittedMutations:!0})}(e,0,n)}function Qt(e,t,n,r){return e instanceof Zt?function(e,t){if(!Gt(e.Ge,t))return t;var n=Jt(t);return new hn(e.key,n,e.value,{Ye:!0})}(e,t):e instanceof en?function(e,t){if(!Gt(e.Ge,t))return t;var n=Jt(t),r=tn(e,t);return new hn(e.key,n,r,{Ye:!0})}(e,t):e instanceof nn?function(e,t,n,r){if(!Gt(e.Ge,t))return t;var i=rn(e,t),o=function(e,t,n,r){for(var i=[],o=0,a=e;o<a.length;o++){var s=a[o],u=s.transform,c=null;n instanceof hn&&(c=n.field(s.field)),null===c&&r instanceof hn&&(c=r.field(s.field)),i.push(jt(u,c,t))}return i}(e.fieldTransforms,n,t,r),a=on(e,i.data(),o);return new hn(e.key,i.version,a,{Ye:!0})}(e,t,r,n):function(e,t){return Gt(e.Ge,t)?new dn(e.key,L.min()):t}(e,t)}function $t(e,t){return e instanceof nn?function(e,t){for(var n=null,r=0,i=e.fieldTransforms;r<i.length;r++){var o=i[r],a=t instanceof hn?t.field(o.field):void 0,s=At(o.transform,a||null);null!=s&&(n=null==n?(new cn).set(o.field,s):n.set(o.field,s))}return n?n.Xe():null}(e,t):null}function Xt(e,t){return e.type===t.type&&!!e.key.isEqual(t.key)&&!!e.Ge.isEqual(t.Ge)&&(0===e.type?e.value.isEqual(t.value):1===e.type?e.data.isEqual(t.data)&&e.Qe.isEqual(t.Qe):2!==e.type||k(e.fieldTransforms,e.fieldTransforms,(function(e,t){return function(e,t){return e.field.isEqual(t.field)&&function(e,t){return e instanceof Nt&&t instanceof Nt||e instanceof Dt&&t instanceof Dt?k(e.elements,t.elements,Me):e instanceof Ut&&t instanceof Ut?Me(e.We,t.We):e instanceof Mt&&t instanceof Mt}(e.transform,t.transform)}(e,t)})))}function Jt(e){return e instanceof hn?e.version:L.min()}var Zt=function(e){function n(t,n,r){var i=this;return(i=e.call(this)||this).key=t,i.value=n,i.Ge=r,i.type=0,i}return Object(t.c)(n,e),n}(Kt),en=function(e){function n(t,n,r,i){var o=this;return(o=e.call(this)||this).key=t,o.data=n,o.Qe=r,o.Ge=i,o.type=1,o}return Object(t.c)(n,e),n}(Kt);function tn(e,t){return function(e,t){var n=new cn(t);return e.Qe.fields.forEach((function(t){if(!t.P()){var r=e.data.field(t);null!==r?n.set(t,r):n.delete(t)}})),n.Xe()}(e,t instanceof hn?t.data():un.empty())}var nn=function(e){function n(t,n){var r=this;return(r=e.call(this)||this).key=t,r.fieldTransforms=n,r.type=2,r.Ge=Ht.exists(!0),r}return Object(t.c)(n,e),n}(Kt);function rn(e,t){return t}function on(e,t,n){for(var r=new cn(t),i=0;i<e.fieldTransforms.length;i++){var o=e.fieldTransforms[i];r.set(o.field,n[i])}return r.Xe()}var an=function(e){function n(t,n){var r=this;return(r=e.call(this)||this).key=t,r.Ge=n,r.type=3,r}return Object(t.c)(n,e),n}(Kt),sn=function(e){function n(t,n){var r=this;return(r=e.call(this)||this).key=t,r.Ge=n,r.type=4,r}return Object(t.c)(n,e),n}(Kt),un=function(){function e(e){this.proto=e}return e.empty=function(){return new e({mapValue:{}})},e.prototype.field=function(e){if(e.P())return this.proto;for(var t=this.proto,n=0;n<e.length-1;++n){if(!t.mapValue.fields)return null;if(!Ye(t=t.mapValue.fields[e.get(n)]))return null}return(t=(t.mapValue.fields||{})[e.O()])||null},e.prototype.isEqual=function(e){return Me(this.proto,e.proto)},e}(),cn=function(){function e(e){void 0===e&&(e=un.empty()),this.Ze=e,this.tn=new Map}return e.prototype.set=function(e,t){return this.en(e,t),this},e.prototype.delete=function(e){return this.en(e,null),this},e.prototype.en=function(e,t){for(var n=this.tn,r=0;r<e.length-1;++r){var i=e.get(r),o=n.get(i);o instanceof Map?n=o:o&&10===Ae(o)?(o=new Map(Object.entries(o.mapValue.fields||{})),n.set(i,o),n=o):(o=new Map,n.set(i,o),n=o)}n.set(e.O(),t)},e.prototype.Xe=function(){var e=this.nn(V.U(),this.tn);return null!=e?new un(e):this.Ze},e.prototype.nn=function(e,t){var n=this,r=!1,i=this.Ze.field(e),o=Ye(i)?Object.assign({},i.mapValue.fields):{};return t.forEach((function(t,i){if(t instanceof Map){var a=n.nn(e.child(i),t);null!=a&&(o[i]=a,r=!0)}else null!==t?(o[i]=t,r=!0):o.hasOwnProperty(i)&&(delete o[i],r=!0)})),r?{mapValue:{fields:o}}:null},e}();function ln(e){var t=[];return R(e.fields||{},(function(e,n){var r=new V([e]);if(Ye(n)){var i=ln(n.mapValue).fields;if(0===i.length)t.push(r);else for(var o=0,a=i;o<a.length;o++){var s=a[o];t.push(r.child(s))}}else t.push(r)})),new qt(t)}var fn=function(e,t){this.key=e,this.version=t},hn=function(e){function n(t,n,r,i){var o=this;return(o=e.call(this,t,n)||this).sn=r,o.Ye=!!i.Ye,o.hasCommittedMutations=!!i.hasCommittedMutations,o}return Object(t.c)(n,e),n.prototype.field=function(e){return this.sn.field(e)},n.prototype.data=function(){return this.sn},n.prototype.rn=function(){return this.sn.proto},n.prototype.isEqual=function(e){return e instanceof n&&this.key.isEqual(e.key)&&this.version.isEqual(e.version)&&this.Ye===e.Ye&&this.hasCommittedMutations===e.hasCommittedMutations&&this.sn.isEqual(e.sn)},n.prototype.toString=function(){return"Document("+this.key+", "+this.version+", "+this.sn.toString()+", {hasLocalMutations: "+this.Ye+"}), {hasCommittedMutations: "+this.hasCommittedMutations+"})"},Object.defineProperty(n.prototype,"hasPendingWrites",{get:function(){return this.Ye||this.hasCommittedMutations}
2,enumerable:!1,configurable:!0}),n}(fn),dn=function(e){function n(t,n,r){var i=this;return(i=e.call(this,t,n)||this).hasCommittedMutations=!(!r||!r.hasCommittedMutations),i}return Object(t.c)(n,e),n.prototype.toString=function(){return"NoDocument("+this.key+", "+this.version+")"},Object.defineProperty(n.prototype,"hasPendingWrites",{get:function(){return this.hasCommittedMutations},enumerable:!1,configurable:!0}),n.prototype.isEqual=function(e){return e instanceof n&&e.hasCommittedMutations===this.hasCommittedMutations&&e.version.isEqual(this.version)&&e.key.isEqual(this.key)},n}(fn),pn=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return Object(t.c)(n,e),n.prototype.toString=function(){return"UnknownDocument("+this.key+", "+this.version+")"},Object.defineProperty(n.prototype,"hasPendingWrites",{get:function(){return!0},enumerable:!1,configurable:!0}),n.prototype.isEqual=function(e){return e instanceof n&&e.version.isEqual(this.version)&&e.key.isEqual(this.key)},n}(fn),vn=function(e,t,n,r,i,o,a,s){void 0===t&&(t=null),void 0===n&&(n=[]),void 0===r&&(r=[]),void 0===i&&(i=null),void 0===o&&(o="F"),void 0===a&&(a=null),void 0===s&&(s=null),this.path=e,this.collectionGroup=t,this.on=n,this.filters=r,this.limit=i,this.an=o,this.startAt=a,this.endAt=s,this.hn=null,this.cn=null,this.startAt,this.endAt};function yn(e,t,n,r,i,o,a,s){return new vn(e,t,n,r,i,o,a,s)}function mn(e){return new vn(e)}function gn(e){return!q(e.limit)&&"F"===e.an}function bn(e){return!q(e.limit)&&"L"===e.an}function _n(e){return e.on.length>0?e.on[0].field:null}function wn(e){for(var t=0,n=e.filters;t<n.length;t++){var r=n[t];if(r.un())return r.field}return null}function kn(e){return null!==e.collectionGroup}function Sn(e){var t=g(e);if(null===t.hn){t.hn=[];var n=wn(t),r=_n(t);if(null!==n&&null===r)n.W()||t.hn.push(new Gn(n)),t.hn.push(new Gn(V.j(),"asc"));else{for(var i=!1,o=0,a=t.on;o<a.length;o++){var s=a[o];t.hn.push(s),s.field.W()&&(i=!0)}if(!i){var u=t.on.length>0?t.on[t.on.length-1].dir:"asc";t.hn.push(new Gn(V.j(),u))}}}return t.hn}function On(e){var t=g(e);if(!t.cn)if("F"===t.an)t.cn=G(t.path,t.collectionGroup,Sn(t),t.filters,t.limit,t.startAt,t.endAt);else{for(var n=[],r=0,i=Sn(t);r<i.length;r++){var o=i[r],a="desc"===o.dir?"asc":"desc";n.push(new Gn(o.field,a))}var s=t.endAt?new qn(t.endAt.position,!t.endAt.before):null,u=t.startAt?new qn(t.startAt.position,!t.startAt.before):null;t.cn=G(t.path,t.collectionGroup,n,t.filters,t.limit,s,u)}return t.cn}function En(e,t,n){return new vn(e.path,e.collectionGroup,e.on.slice(),e.filters.slice(),t,n,e.startAt,e.endAt)}function Tn(e,t){return new vn(e.path,e.collectionGroup,e.on.slice(),e.filters.slice(),e.limit,e.an,t,e.endAt)}function Cn(e,t){return new vn(e.path,e.collectionGroup,e.on.slice(),e.filters.slice(),e.limit,e.an,e.startAt,t)}function Pn(e,t){return Y(On(e),On(t))&&e.an===t.an}function xn(e){return K(On(e))+"|lt:"+e.an}function In(e){return"Query(target="+function(e){var t=e.path.B();return null!==e.collectionGroup&&(t+=" collectionGroup="+e.collectionGroup),e.filters.length>0&&(t+=", filters: ["+e.filters.map((function(e){return(t=e).field.B()+" "+t.op+" "+Fe(t.value);var t})).join(", ")+"]"),q(e.limit)||(t+=", limit: "+e.limit),e.orderBy.length>0&&(t+=", orderBy: ["+e.orderBy.map((function(e){return(t=e).field.B()+" ("+t.dir+")";var t})).join(", ")+"]"),e.startAt&&(t+=", startAt: "+Wn(e.startAt)),e.endAt&&(t+=", endAt: "+Wn(e.endAt)),"Target("+t+")"}(On(e))+"; limitType="+e.an+")"}function jn(e,t){return function(e,t){var n=t.key.path;return null!==e.collectionGroup?t.key.Y(e.collectionGroup)&&e.path.M(n):B.X(e.path)?e.path.isEqual(n):e.path.$(n)}(e,t)&&function(e,t){for(var n=0,r=e.on;n<r.length;n++){var i=r[n];if(!i.field.W()&&null===t.field(i.field))return!1}return!0}(e,t)&&function(e,t){for(var n=0,r=e.filters;n<r.length;n++)if(!r[n].matches(t))return!1;return!0}(e,t)&&function(e,t){return!(e.startAt&&!zn(e.startAt,Sn(e),t))&&(!e.endAt||!zn(e.endAt,Sn(e),t))}(e,t)}function Rn(e){return function(t,n){for(var r=!1,i=0,o=Sn(e);i<o.length;i++){var a=o[i],s=Kn(a,t,n);if(0!==s)return s;r=r||a.field.W()}return 0}}var An=function(e){function n(t,n,r){var i=this;return(i=e.call(this)||this).field=t,i.op=n,i.value=r,i}return Object(t.c)(n,e),n.create=function(e,t,r){return e.W()?"in"===t||"not-in"===t?this.ln(e,t,r):new Mn(e,t,r):"array-contains"===t?new Fn(e,r):"in"===t?new Un(e,r):"not-in"===t?new Vn(e,r):"array-contains-any"===t?new Bn(e,r):new n(e,t,r)},n.ln=function(e,t,n){return"in"===t?new Nn(e,n):new Ln(e,n)},n.prototype.matches=function(e){var t=e.field(this.field);return"!="===this.op?null!==t&&this._n(Le(t,this.value)):null!==t&&Ae(this.value)===Ae(t)&&this._n(Le(t,this.value))},n.prototype._n=function(e){switch(this.op){case"<":return e<0;case"<=":return e<=0;case"==":return 0===e;case"!=":return 0!==e;case">":return e>0;case">=":return e>=0;default:return y()}},n.prototype.un=function(){return["<","<=",">",">=","!=","not-in"].indexOf(this.op)>=0},n}((function(){})),Mn=function(e){function n(t,n,r){var i=this;return(i=e.call(this,t,n,r)||this).key=B.J(r.referenceValue),i}return Object(t.c)(n,e),n.prototype.matches=function(e){var t=B.D(e.key,this.key);return this._n(t)},n}(An),Nn=function(e){function n(t,n){var r=this;return(r=e.call(this,t,"in",n)||this).keys=Dn("in",n),r}return Object(t.c)(n,e),n.prototype.matches=function(e){return this.keys.some((function(t){return t.isEqual(e.key)}))},n}(An),Ln=function(e){function n(t,n){var r=this;return(r=e.call(this,t,"not-in",n)||this).keys=Dn("not-in",n),r}return Object(t.c)(n,e),n.prototype.matches=function(e){return!this.keys.some((function(t){return t.isEqual(e.key)}))},n}(An);function Dn(e,t){var n;return((null===(n=t.arrayValue)||void 0===n?void 0:n.values)||[]).map((function(e){return B.J(e.referenceValue)}))}var Fn=function(e){function n(t,n){return e.call(this,t,"array-contains",n)||this}return Object(t.c)(n,e),n.prototype.matches=function(e){var t=e.field(this.field);return He(t)&&Ne(t.arrayValue,this.value)},n}(An),Un=function(e){function n(t,n){return e.call(this,t,"in",n)||this}return Object(t.c)(n,e),n.prototype.matches=function(e){var t=e.field(this.field);return null!==t&&Ne(this.value.arrayValue,t)},n}(An),Vn=function(e){function n(t,n){return e.call(this,t,"not-in",n)||this}return Object(t.c)(n,e),n.prototype.matches=function(e){if(Ne(this.value.arrayValue,{nullValue:"NULL_VALUE"}))return!1;var t=e.field(this.field);return null!==t&&!Ne(this.value.arrayValue,t)},n}(An),Bn=function(e){function n(t,n){return e.call(this,t,"array-contains-any",n)||this}return Object(t.c)(n,e),n.prototype.matches=function(e){var t=this,n=e.field(this.field);return!(!He(n)||!n.arrayValue.values)&&n.arrayValue.values.some((function(e){return Ne(t.value.arrayValue,e)}))},n}(An),qn=function(e,t){this.position=e,this.before=t};function Wn(e){return(e.before?"b":"a")+":"+e.position.map((function(e){return Fe(e)})).join(",")}function zn(e,t,n){for(var r=0,i=0;i<e.position.length;i++){var o=t[i],a=e.position[i];if(r=o.field.W()?B.D(B.J(a.referenceValue),n.key):Le(a,n.field(o.field)),"desc"===o.dir&&(r*=-1),0!==r)break}return e.before?r<=0:r<0}function Hn(e,t){if(null===e)return null===t;if(null===t)return!1;if(e.before!==t.before||e.position.length!==t.position.length)return!1;for(var n=0;n<e.position.length;n++)if(!Me(e.position[n],t.position[n]))return!1;return!0}var Gn=function(e,t){void 0===t&&(t="asc"),this.field=e,this.dir=t};function Kn(e,t,n){var r=e.field.W()?B.D(t.key,n.key):function(e,t,n){var r=t.field(e),i=n.field(e);return null!==r&&null!==i?Le(r,i):y()}(e.field,t,n);switch(e.dir){case"asc":return r;case"desc":return-1*r;default:return y()}}function Yn(e,t){return e.dir===t.dir&&e.field.isEqual(t.field)}var Qn=function(){var e=this;this.promise=new Promise((function(t,n){e.resolve=t,e.reject=n}))},$n=function(){function e(e,t,n,r,i){void 0===n&&(n=1e3),void 0===r&&(r=1.5),void 0===i&&(i=6e4),this.fn=e,this.dn=t,this.wn=n,this.En=r,this.Tn=i,this.In=0,this.mn=null,this.An=Date.now(),this.reset()}return e.prototype.reset=function(){this.In=0},e.prototype.Rn=function(){this.In=this.Tn},e.prototype.Pn=function(e){var t=this;this.cancel();var n=Math.floor(this.In+this.gn()),r=Math.max(0,Date.now()-this.An),i=Math.max(0,n-r);i>0&&h("ExponentialBackoff","Backing off for "+i+" ms (base delay: "+this.In+" ms, delay with
2jitter: "+n+" ms, last attempt: "+r+" ms ago)"),this.mn=this.fn.Vn(this.dn,i,(function(){return t.An=Date.now(),e()})),this.In*=this.En,this.In<this.wn&&(this.In=this.wn),this.In>this.Tn&&(this.In=this.Tn)},e.prototype.yn=function(){null!==this.mn&&(this.mn.pn(),this.mn=null)},e.prototype.cancel=function(){null!==this.mn&&(this.mn.cancel(),this.mn=null)},e.prototype.gn=function(){return(Math.random()-.5)*this.In},e}(),Xn=function(){function e(e){var t=this;this.bn=null,this.vn=null,this.result=void 0,this.error=void 0,this.Sn=!1,this.Dn=!1,e((function(e){t.Sn=!0,t.result=e,t.bn&&t.bn(e)}),(function(e){t.Sn=!0,t.error=e,t.vn&&t.vn(e)}))}return e.prototype.catch=function(e){return this.next(void 0,e)},e.prototype.next=function(t,n){var r=this;return this.Dn&&y(),this.Dn=!0,this.Sn?this.error?this.Cn(n,this.error):this.Nn(t,this.result):new e((function(e,i){r.bn=function(n){r.Nn(t,n).next(e,i)},r.vn=function(t){r.Cn(n,t).next(e,i)}}))},e.prototype.xn=function(){var e=this;return new Promise((function(t,n){e.next(t,n)}))},e.prototype.Fn=function(t){try{var n=t();return n instanceof e?n:e.resolve(n)}catch(t){return e.reject(t)}},e.prototype.Nn=function(t,n){return t?this.Fn((function(){return t(n)})):e.resolve(n)},e.prototype.Cn=function(t,n){return t?this.Fn((function(){return t(n)})):e.reject(n)},e.resolve=function(t){return new e((function(e,n){e(t)}))}
2,e.reject=function(t){return new e((function(e,n){n(t)}))},e.kn=function(t){return new e((function(e,n){var r=0,i=0,o=!1;t.forEach((function(t){++r,t.next((function(){++i,o&&i===r&&e()}),(function(e){return n(e)}))})),o=!0,i===r&&e()}))},e.On=function(t){for(var n=e.resolve(!1),r=function(t){n=n.next((function(n){return n?e.resolve(n):t()}))},i=0,o=t;i<o.length;i++)r(o[i]);return n},e.forEach=function(e,t){var n=this,r=[];return e.forEach((function(e,i){r.push(t.call(n,e,i))})),this.kn(r)},e}(),Jn=function(){function n(e,t,r){this.name=e,this.version=t,this.Mn=r,12.2===n.$n(Object(o.p)())&&d("Firestore persistence suffers from a bug in iOS 12.2 Safari that may cause your app to stop working. See https://stackoverflow.com/q/56496296/110915 for details and a potential workaround.")}return n.delete=function(e){return h("SimpleDb","Removing database:",e),ir(window.indexedDB.deleteDatabase(e)).xn()},n.Ln=function(){if("undefined"==typeof indexedDB)return!1;if(n.Bn())return!0;var e=Object(o.p)(),t=n.$n(e),r=0<t&&t<10,i=n.qn(e),a=0<i&&i<4.5;return!(e.indexOf("MSIE ")>0||e.indexOf("Trident/")>0||e.indexOf("Edge/")>0||r||a)},n.Bn=function(){var t;return"undefined"!=typeof e&&"YES"===(null===(t=Object({NODE_ENV:"production",PUBLIC_URL:"",WDS_SOCKET_HOST:void 0,WDS_SOCKET_PATH:void 0,WDS_SOCKET_PORT:void 0,FAST_REFRESH:!0}))||void 0===t?void 0:t.Un)},n.Kn=function(e,t){return e.store(t)},n.$n=function(e){var t=e.match(/i(?:phone|pad|pod) os ([\d_]+)/i),n=t?t[1].split("_").slice(0,2).join("."):"-1";return Number(n)},n.qn=function(e){var t=e.match(/Android ([\d.]+)/i),n=t?t[1].split(".").slice(0,2).join("."):"-1";return Number(n)},n.prototype.Qn=function(e){return Object(t.b)(this,void 0,void 0,(function(){var n,r=this;return Object(t.d)(this,(function(t){switch(t.label){case 0:return this.db?[3,2]:(h("SimpleDb","Opening database:",this.name),n=this,[4,new Promise((function(t,n){var i=indexedDB.open(r.name,r.version);i.onsuccess=function(e){var n=e.target.result;t(n)},i.onblocked=function(){n(new er(e,"Cannot upgrade IndexedDB schema while another tab is open. Close all tabs that access Firestore and reload this page to proceed."))},i.onerror=function(t){var r=t.target.error;"VersionError"===r.name?n(new c(u.FAILED_PRECONDITION,"A newer version of the Firestore SDK was previously used and so the persisted data is not compatible with the version of the SDK you are now using. The SDK will operate with persistence disabled. If you need persistence, please re-upgrade to a newer version of the SDK or else clear the persisted IndexedDB data for your app to start fresh.")):n(new er(e,r))},i.onupgradeneeded=function(e){h("SimpleDb",'Database "'+r.name+'" requires upgrade from version:',e.oldVersion);var t=e.target.result;r.Mn.createOrUpgrade(t,i.transaction,e.oldVersion,r.version).next((function(){h("SimpleDb","Database upgrade to version "+r.version+" complete")}))}}))]);case 1:n.db=t.sent(),t.label=2;case 2:return[2,(this.Wn&&(this.db.onversionchange=function(e){return r.Wn(e)}),this.db)]}}))}))},n.prototype.jn=function(e){this.Wn=e,this.db&&(this.db.onversionchange=function(t){return e(t)})},n.prototype.runTransaction=function(e,n,r,i){return Object(t.b)(this,void 0,void 0,(function(){var o,a,s,u,c;return Object(t.d)(this,(function(l){switch(l.label){case 0:o="readonly"===n,a=0,s=function(){var n,s,c,l,f;return Object(t.d)(this,(function(t){switch(t.label){case 0:++a,t.label=1;case 1:return t.trys.push([1,4,,5]),[4,u.Qn(e)];case 2:return u.db=t.sent(),n=nr.open(u.db,e,o?"readonly":"readwrite",r),s=i(n).catch((function(e){return n.abort(e),Xn.reject(e)})).xn(),c={},s.catch((function(){})),[4,n.Gn];case 3:return[2,(c.value=(t.sent(),s),c)];case 4:return l=t.sent(),f="FirebaseError"!==l.name&&a<3,h("SimpleDb","Transaction failed with error:",l.message,"Retrying:",f),u.close(),f?[3,5]:[2,{value:Promise.reject(l)}];case 5:return[2]}}
2))},u=this,l.label=1;case 1:return[5,s()];case 2:if("object"==typeof(c=l.sent()))return[2,c.value];l.label=3;case 3:return[3,1];case 4:return[2]}}))}))},n.prototype.close=function(){this.db&&this.db.close(),this.db=void 0},n}(),Zn=function(){function e(e){this.zn=e,this.Hn=!1,this.Jn=null}return Object.defineProperty(e.prototype,"Sn",{get:function(){return this.Hn},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"Yn",{get:function(){return this.Jn},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"cursor",{set:function(e){this.zn=e},enumerable:!1,configurable:!0}),e.prototype.done=function(){this.Hn=!0},e.prototype.Xn=function(e){this.Jn=e},e.prototype.delete=function(){return ir(this.zn.delete())},e}(),er=function(e){function n(t,n){var r=this;return(r=e.call(this,u.UNAVAILABLE,"IndexedDB transaction '"+t+"' failed: "+n)||this).name="IndexedDbTransactionError",r}return Object(t.c)(n,e),n}(c);function tr(e){return"IndexedDbTransactionError"===e.name}var nr=function(){function e(e,t){var n=this;this.action=e,this.transaction=t,this.aborted=!1,this.Zn=new Qn,this.transaction.oncomplete=function(){n.Zn.resolve()},this.transaction.onabort=function(){t.error?n.Zn.reject(new er(e,t.error)):n.Zn.resolve()},this.transaction.onerror=function(t){var r=ar(t.target.error);n.Zn.reject(new er(e,r))}}return e.open=function(t,n,r,i){try{return new e(n,t.transaction(i,r))}catch(t){throw new er(n,t)}},Object.defineProperty(e.prototype,"Gn",{get:function(){return this.Zn.promise},enumerable:!1,configurable:!0}),e.prototype.abort=function(e){e&&this.Zn.reject(e),this.aborted||(h("SimpleDb","Aborting transaction:",e?e.message:"Client-initiated abort"),this.aborted=!0,this.transaction.abort())},e.prototype.store=function(e){var t=this.transaction.objectStore(e);return new rr(t)},e}(),rr=function(){function e(e){this.store=e}return e.prototype.put=function(e,t){var n;return void 0!==t?(h("SimpleDb","PUT",this.store.name,e,t),n=this.store.put(t,e)):(h("SimpleDb","PUT",this.store.name,"<auto-key>",e),n=this.store.put(e)),ir(n)},e.prototype.add=function(e){return h("SimpleDb","ADD",this.store.name,e,e),ir(this.store.add(e))},e.prototype.get=function(e){var t=this;return ir(this.store.get(e)).next((function(n){return void 0===n&&(n=null),h("SimpleDb","GET",t.store.name,e,n),n}))},e.prototype.delete=function(e){return h("SimpleDb","DELETE",this.store.name,e),ir(this.store.delete(e))},e.prototype.count=function(){return h("SimpleDb","COUNT",this.store.name),ir(this.store.count())},e.prototype.ts=function(e,t){var n=this.cursor(this.options(e,t)),r=[];return this.es(n,(function(e,t){r.push(t)})).next((function(){return r}))},e.prototype.ns=function(e,t){h("SimpleDb","DELETE ALL",this.store.name);var n=this.options(e,t);n.ss=!1;var r=this.cursor(n);return this.es(r,(function(e,t,n){return n.delete()}))},e.prototype.rs=function(e,t){var n;t?n=e:(n={},t=e);var r=this.cursor(n);return this.es(r,t)},e.prototype.os=function(e){var t=this.cursor({});return new Xn((function(n,r){t.onerror=function(e){var t=ar(e.target.error);r(t)},t.onsuccess=function(t){var r=t.target.result;r?e(r.primaryKey,r.value).next((function(e){e?r.continue():n()})):n()}}))},e.prototype.es=function(e,t){var n=[];return new Xn((function(r,i){e.onerror=function(e){i(e.target.error)},e.onsuccess=function(e){var i=e.target.result;if(i){var o=new Zn(i),a=t(i.primaryKey,i.value,o);if(a instanceof Xn){var s=a.catch((function(e){return o.done(),Xn.reject(e)}));n.push(s)}o.Sn?r():null===o.Yn?i.continue():i.continue(o.Yn)}else r()}})).next((function(){return Xn.kn(n)}))},e.prototype.options=function(e,t){var n=void 0;return void 0!==e&&("string"==typeof e?n=e:t=e),{index:n,range:t}},e.prototype.cursor=function(e){var t="next";if(e.reverse&&(t="prev"),e.index){var n=this.store.index(e.index);return e.ss?n.openKeyCursor(e.range,t):n.openCursor(e.range,t)}return this.store.openCursor(e.range,t)},e}();function ir(e){return new Xn((function(t,n){e.onsuccess=function(e){var n=e.target.result;t(n)},e.onerror=function(e){var t=ar(e.target.error);n(t)}}))}var or=!1;function ar(e){var t=Jn.$n(Object(o.p)());if(t>=12.2&&t<13){var n="An internal error was encountered in the Indexed Database server";if(e.message.indexOf(n)>=0){var r=new c("internal","IOS_INDEXEDDB_BUG1: IndexedDb has thrown '"+n+"'. This is likely due to an unavoidable bug in iOS. See https://stackoverflow.com/q/56496296/110915 for details and a potential workaround.");return or||(or=!0,setTimeout((function(){throw r}),0)),r}}return e}function sr(){return"undefined"!=typeof window?window:null}function ur(){return"undefined"!=typeof document?document:null}var cr=function(){function e(e,t,n,r,i){this.hs=e,this.dn=t,this.cs=n,this.op=r,this.us=i,this.ls=new Qn,this.then=this.ls.promise.then.bind(this.ls.promise),this.ls.promise.catch((function(e){}))}return e._s=function(t,n,r,i,o){var a=new e(t,n,Date.now()+r,i,o);return a.start(r),a},e.prototype.start=function(e){var t=this;this.fs=setTimeout((function(){return t.ds()}),e)},e.prototype.pn=function(){return this.ds()},e.prototype.cancel=function(e){null!==this.fs&&(this.clearTimeout(),this.ls.reject(new c(u.CANCELLED,"Operation cancelled"+(e?": "+e:""))))},e.prototype.ds=function(){var e=this;this.hs.ws((function(){return null!==e.fs?(e.clearTimeout(),e.op().then((function(t){return e.ls.resolve(t)}))):Promise.resolve()}))},e.prototype.clearTimeout=function(){null!==this.fs&&(this.us(this),clearTimeout(this.fs),this.fs=null)},e}(),lr=function(){function e(){var e=this;this.Es=Promise.resolve(),this.Ts=[],this.Is=!1,this.As=[],this.Rs=null,this.Ps=!1,this.gs=[],this.Vs=new $n(this,"async_queue_retry"),this.ys=function(){var t=ur();t&&h("AsyncQueue","Visibility state changed to ",t.visibilityState),e.Vs.yn()};var t=ur();t&&"function"==typeof t.addEventListener&&t.addEventListener("visibilitychange",this.ys)}return Object.defineProperty(e.prototype,"ps",{get:function(){return this.Is}
2,enumerable:!1,configurable:!0}),e.prototype.ws=function(e){this.enqueue(e)},e.prototype.bs=function(e){this.vs(),this.Ss(e)},e.prototype.Ds=function(){if(!this.Is){this.Is=!0;var e=ur();e&&"function"==typeof e.removeEventListener&&e.removeEventListener("visibilitychange",this.ys)}},e.prototype.enqueue=function(e){return this.vs(),this.Is?new Promise((function(e){})):this.Ss(e)},e.prototype.Cs=function(e){var t=this;this.ws((function(){return t.Ts.push(e),t.Ns()}))},e.prototype.Ns=function(){return Object(t.b)(this,void 0,void 0,(function(){var e,n=this;return Object(t.d)(this,(function(t){switch(t.label){case 0:if(0===this.Ts.length)return[3,5];t.label=1;case 1:return t.trys.push([1,3,,4]),[4,this.Ts[0]()];case 2:return t.sent(),this.Ts.shift(),this.Vs.reset(),[3,4];case 3:if(!tr(e=t.sent()))throw e;return h("AsyncQueue","Operation failed with retryable error: "+e),[3,4];case 4:this.Ts.length>0&&this.Vs.Pn((function(){return n.Ns()})),t.label=5;case 5:return[2]}}))}))},e.prototype.Ss=function(e){var t=this,n=this.Es.then((function(){return t.Ps=!0,e().catch((function(e){throw t.Rs=e,t.Ps=!1,d("INTERNAL UNHANDLED ERROR: ",function(e){var t=e.message||"";return e.stack&&(t=e.stack.includes(e.message)?e.stack:e.message+"\n"+e.stack),t}(e)),e})).then((function(e){return t.Ps=!1,e}))}));return this.Es=n,n},e.prototype.Vn=function(e,t,n){var r=this;this.vs(),this.gs.indexOf(e)>-1&&(t=0);var i=cr._s(this,e,t,n,(function(e){return r.xs(e)}));return this.As.push(i),i},e.prototype.vs=function(){this.Rs&&y()},e.prototype.Fs=function(){},e.prototype.ks=function(){return Object(t.b)(this,void 0,void 0,(function(){var e;return Object(t.d)(this,(function(t){switch(t.label){case 0:return[4,e=this.Es];case 1:t.sent(),t.label=2;case 2:if(e!==this.Es)return[3,0];t.label=3;case 3:return[2]}}
2))}))},e.prototype.Os=function(e){for(var t=0,n=this.As;t<n.length;t++)if(n[t].dn===e)return!0;return!1},e.prototype.Ms=function(e){var t=this;return this.ks().then((function(){t.As.sort((function(e,t){return e.cs-t.cs}));for(var n=0,r=t.As;n<r.length;n++){var i=r[n];if(i.pn(),"all"!==e&&i.dn===e)break}return t.ks()}))},e.prototype.$s=function(e){this.gs.push(e)},e.prototype.xs=function(e){var t=this.As.indexOf(e);this.As.splice(t,1)},e}();function fr(e,t){if(d("AsyncQueue",t+": "+e),tr(e))return new c(u.UNAVAILABLE,t+": "+e);throw e}var hr=function(){this.Ls=void 0,this.listeners=[]},dr=function(){this.Bs=new M((function(e){return xn(e)}),Pn),this.onlineState="Unknown",this.qs=new Set};function pr(e,n){return Object(t.b)(this,void 0,void 0,(function(){var r,i,o,a,s,u,c;return Object(t.d)(this,(function(t){switch(t.label){case 0:if(r=g(e),i=n.query,o=!1,(a=r.Bs.get(i))||(o=!0,a=new hr),!o)return[3,4];t.label=1;case 1:return t.trys.push([1,3,,4]),s=a,[4,r.Us(i)];case 2:return s.Ls=t.sent(),[3,4];case 3:return u=t.sent(),c=fr(u,"Initialization of query '"+In(n.query)+"' failed"),[2,void n.onError(c)];case 4:return r.Bs.set(i,a),a.listeners.push(n),n.Ks(r.onlineState),a.Ls&&n.Qs(a.Ls)&&gr(r),[2]}}))}))}function vr(e,n){return Object(t.b)(this,void 0,void 0,(function(){var r,i,o,a,s;return Object(t.d)(this,(function(t){return r=g(e),i=n.query,o=!1,(a=r.Bs.get(i))&&(s=a.listeners.indexOf(n))>=0&&(a.listeners.splice(s,1),o=0===a.listeners.length),o?[2,(r.Bs.delete(i),r.Ws(i))]:[2]}))}))}function yr(e,t){for(var n=g(e),r=!1,i=0,o=t;i<o.length;i++){var a=o[i],s=a.query,u=n.Bs.get(s);if(u){for(var c=0,l=u.listeners;c<l.length;c++)l[c].Qs(a)&&(r=!0);u.Ls=a}}r&&gr(n)}function mr(e,t,n){var r=g(e),i=r.Bs.get(t);if(i)for(var o=0,a=i.listeners;o<a.length;o++)a[o].onError(n);r.Bs.delete(t)}function gr(e){e.qs.forEach((function(e){e.next()}))}var br=function(){function e(e,t,n){this.query=e,this.js=t,this.Gs=!1,this.zs=null,this.onlineState="Unknown",this.options=n||{}}return e.prototype.Qs=function(e){if(!this.options.includeMetadataChanges){for(var t=[],n=0,r=e.docChanges;n<r.length;n++){var i=r[n];3!==i.type&&t.push(i)}e=new be(e.query,e.docs,e.Kt,t,e.Qt,e.fromCache,e.Wt,!0)}var o=!1;return this.Gs?this.Hs(e)&&(this.js.next(e),o=!0):this.Js(e,this.onlineState)&&(this.Ys(e),o=!0),this.zs=e,o},e.prototype.onError=function(e){this.js.error(e)},e.prototype.Ks=function(e){this.onlineState=e;var t=!1;return this.zs&&!this.Gs&&this.Js(this.zs,e)&&(this.Ys(this.zs),t=!0),t},e.prototype.Js=function(e,t){if(!e.fromCache)return!0;var n="Offline"!==t;return!(this.options.Xs&&n||e.docs.P()&&"Offline"!==t)},e.prototype.Hs=function(e){if(e.docChanges.length>0)return!0;var t=this.zs&&this.zs.hasPendingWrites!==e.hasPendingWrites;return!(!e.Wt&&!t)&&!0===this.options.includeMetadataChanges},e.prototype.Ys=function(e){e=be.Gt(e.query,e.docs,e.Qt,e.fromCache),this.Gs=!0,this.js.next(e)},e}(),_r=function(){function e(e){this.uid=e}return e.prototype.Zs=function(){return null!=this.uid},e.prototype.ti=function(){return this.Zs()?"uid:"+this.uid:"anonymous-user"},e.prototype.isEqual=function(e){return e.uid===this.uid},e}();_r.UNAUTHENTICATED=new _r(null),_r.ei=new _r("google-credentials-uid"),_r.ni=new _r("first-party-uid");var wr=function(){function e(e,t){var n=this;this.previousValue=e,t&&(t.si=function(e){return n.ii(e)},this.ri=function(e){return t.oi(e)})}return e.prototype.ii=function(e){return this.previousValue=Math.max(e,this.previousValue),this.previousValue},e.prototype.next=function(){var e=++this.previousValue;return this.ri&&this.ri(e),e},e}();function kr(e,t){return"firestore_clients_"+e+"_"+t}function Sr(e,t,n){var r="firestore_mutations_"+e+"_"+n;return t.Zs()&&(r+="_"+t.uid),r}function Or(e,t){return"firestore_targets_"+e+"_"+t}wr.ai=-1;var Er=function(){function e(e,t,n,r){this.user=e,this.batchId=t,this.state=n,this.error=r}return e.hi=function(t,n,r){var i=JSON.parse(r),o="object"==typeof i&&-1!==["pending","acknowledged","rejected"].indexOf(i.state)&&(void 0===i.error||"object"==typeof i.error),a=void 0;return o&&i.error&&(o="string"==typeof i.error.message&&"string"==typeof i.error.code)&&(a=new c(i.error.code,i.error.message)),o?new e(t,n,i.state,a):(d("SharedCl
2ientState","Failed to parse mutation state for ID '"+n+"': "+r),null)},e.prototype.ci=function(){var e={state:this.state,updateTimeMs:Date.now()};return this.error&&(e.error={code:this.error.code,message:this.error.message}),JSON.stringify(e)},e}(),Tr=function(){function e(e,t,n){this.targetId=e,this.state=t,this.error=n}return e.hi=function(t,n){var r=JSON.parse(n),i="object"==typeof r&&-1!==["not-current","current","rejected"].indexOf(r.state)&&(void 0===r.error||"object"==typeof r.error),o=void 0;return i&&r.error&&(i="string"==typeof r.error.message&&"string"==typeof r.error.code)&&(o=new c(r.error.code,r.error.message)),i?new e(t,r.state,o):(d("SharedClientState","Failed to parse target state for ID '"+t+"': "+n),null)},e.prototype.ci=function(){var e={state:this.state,updateTimeMs:Date.now()};return this.error&&(e.error={code:this.error.code,message:this.error.message}),JSON.stringify(e)},e}(),Cr=function(){function e(e,t){this.clientId=e,this.activeTargetIds=t}return e.hi=function(t,n){for(var r=JSON.parse(n),i="object"==typeof r&&r.activeTargetIds instanceof Array,o=ye(),a=0;i&&a<r.activeTargetIds.length;++a)i=z(r.activeTargetIds[a]),o=o.add(r.activeTargetIds[a]);return i?new e(t,o):(d("SharedClientState","Failed to parse client data for instance '"+t+"': "+n),null)},e}(),Pr=function(){function e(e,t){this.clientId=e,this.onlineState=t}return e.hi=function(t){var n=JSON.parse(t);return"object"==typeof n&&-1!==["Unknown","Online","Offline"].indexOf(n.onlineState)&&"string"==typeof n.clientId?new e(n.clientId,n.onlineState):(d("SharedClientState","Failed to parse online state: "+t),null)},e}(),xr=function(){function e(){this.activeTargetIds=ye()}return e.prototype.ui=function(e){this.activeTargetIds=this.activeTargetIds.add(e)},e.prototype.li=function(e){this.activeTargetIds=this.activeTargetIds.delete(e)},e.prototype.ci=function(){var e={activeTargetIds:this.activeTargetIds.L(),updateTimeMs:Date.now()};return JSON.stringify(e)},e}(),Ir=function(){function e(e,t,n,r,i){this.window=e,this.fn=t,this.persistenceKey=n,this._i=r,this.fi=null,this.di=null,this.si=null,this.wi=this.Ei.bind(this),this.Ti=new ne(w),this.Ii=!1,this.mi=[];var o=n.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");this.storage=this.window.localStorage,this.currentUser=i,this.Ai=kr(this.persistenceKey,this._i),this.Ri=function(e){return"firestore_sequence_number_"+e}(this.persistenceKey),this.Ti=this.Ti.ot(this._i,new xr),this.Pi=new RegExp("^firestore_clients_"+o+"_([^_]*)$"),this.gi=new RegExp("^firestore_mutations_"+o+"_(\\d+)(?:_(.*))?$"),this.Vi=new RegExp("^firestore_targets_"+o+"_(\\d+)$"),this.yi=function(e){return"firestore_online_state_"+e}(this.persistenceKey),this.window.addEventListener("storage",this.wi)}return e.Ln=function(e){return!(!e||!e.localStorage)},e.prototype.start=function(){return Object(t.b)(this,void 0,void 0,(function(){var e,n,r,i,o,a,s,u,c,l,f,h=this;return Object(t.d)(this,(function(t){switch(t.label){case 0:return[4,this.fi.pi()];case 1:for(e=t.sent(),n=0,r=e;n<r.length;n++)(i=r[n])!==this._i&&(o=this.getItem(kr(this.persistenceKey,i)))&&(a=Cr.hi(i,o))&&(this.Ti=this.Ti.ot(a.clientId,a));for(this.bi(),(s=this.storage.getItem(this.yi))&&(u=this.vi(s))&&this.Si(u),c=0,l=this.mi;c<l.length;c++)f=l[c],this.Ei(f);return this.mi=[],this.window.addEventListener("unload",(function(){return h.Di()})),this.Ii=!0,[2]}}))}))},e.prototype.oi=function(e){this.setItem(this.Ri,JSON.stringify(e))},e.prototype.Ci=function(){return this.Ni(this.Ti)},e.prototype.xi=function(e){var t=!1;return this.Ti.forEach((function(n,r){r.activeTargetIds.has(e)&&(t=!0)})),t},e.prototype.Fi=function(e){this.ki(e,"pending")},e.prototype.Oi=function(e,t,n){this.ki(e,t,n),this.Mi(e)},e.prototype.$i=function(e){var t="not-current";if(this.xi(e)){var n=this.storage.getItem(Or(this.persistenceKey,e));if(n){var r=Tr.hi(e,n);r&&(t=r.state)}}return this.Li.ui(e),this.bi(),t},e.prototype.Bi=function(e){this.Li.li(e),this.bi()},e.prototype.qi=function(e){return this.Li.activeTargetIds.has(e)},e.prototype.Ui=function(e){this.removeItem(Or(this.persistenceKey,e))},e.prototype.Ki=function(e,t,n){this.Qi(e,t,n)},e.prototype.Wi=function(e,t,n){var r=this;t.forEach((function(e){r.Mi(e)}
2)),this.currentUser=e,n.forEach((function(e){r.Fi(e)}))},e.prototype.ji=function(e){this.Gi(e)},e.prototype.Di=function(){this.Ii&&(this.window.removeEventListener("storage",this.wi),this.removeItem(this.Ai),this.Ii=!1)},e.prototype.getItem=function(e){var t=this.storage.getItem(e);return h("SharedClientState","READ",e,t),t},e.prototype.setItem=function(e,t){h("SharedClientState","SET",e,t),this.storage.setItem(e,t)},e.prototype.removeItem=function(e){h("SharedClientState","REMOVE",e),this.storage.removeItem(e)},e.prototype.Ei=function(e){var n=this,r=e;if(r.storageArea===this.storage){if(h("SharedClientState","EVENT",r.key,r.newValue),r.key===this.Ai)return void d("Received WebStorage notification for local change. Another client might have garbage-collected our state");this.fn.Cs((function(){return Object(t.b)(n,void 0,void 0,(function(){var e,n,i,o,a,s;return Object(t.d)(this,(function(t){if(this.Ii){if(null!==r.key)if(this.Pi.test(r.key)){if(null==r.newValue)return e=this.zi(r.key),[2,this.Hi(e,null)];if(n=this.Ji(r.key,r.newValue))return[2,this.Hi(n.clientId,n)]}else if(this.gi.test(r.key)){if(null!==r.newValue&&(i=this.Yi(r.key,r.newValue)))return[2,this.Xi(i)]}else if(this.Vi.test(r.key)){if(null!==r.newValue&&(o=this.Zi(r.key,r.newValue)))return[2,this.tr(o)]}else if(r.key===this.yi){if(null!==r.newValue&&(a=this.vi(r.newValue)))return[2,this.Si(a)]}else r.key===this.Ri&&(s=function(e){var t=wr.ai;if(null!=e)try{var n=JSON.parse(e);m("number"==typeof n),t=n}catch(e){d("SharedClientState","Failed to read sequence number from WebStorage",e)}return t}(r.newValue))!==wr.ai&&this.si(s)}else this.mi.push(r);return[2]}))}))}))}},Object.defineProperty(e.prototype,"Li",{get:function(){return this.Ti.get(this._i)},enumerable:!1,configurable:!0}),e.prototype.bi=function(){this.setItem(this.Ai,this.Li.ci())},e.prototype.ki=function(e,t,n){var r=new Er(this.currentUser,e,t,n),i=Sr(this.persistenceKey,this.currentUser,e);this.setItem(i,r.ci())},e.prototype.Mi=function(e){var t=Sr(this.persistenceKey,this.currentUser,e);this.removeItem(t)},e.prototype.Gi=function(e){var t={clientId:this._i,onlineState:e};this.storage.setItem(this.yi,JSON.stringify(t))},e.prototype.Qi=function(e,t,n){var r=Or(this.persistenceKey,e),i=new Tr(e,t,n);this.setItem(r,i.ci())},e.prototype.zi=function(e){var t=this.Pi.exec(e);return t?t[1]:null},e.prototype.Ji=function(e,t){var n=this.zi(e);return Cr.hi(n,t)},e.prototype.Yi=function(e,t){var n=this.gi.exec(e),r=Number(n[1]),i=void 0!==n[2]?n[2]:null;return Er.hi(new _r(i),r,t)},e.prototype.Zi=function(e,t){var n=this.Vi.exec(e),r=Number(n[1]);return Tr.hi(r,t)},e.prototype.vi=function(e){return Pr.hi(e)},e.prototype.Xi=function(e){return Object(t.b)(this,void 0,void 0,(function(){return Object(t.d)(this,(function(t){return e.user.uid===this.currentUser.uid?[2,this.fi.er(e.batchId,e.state,e.error)]:(h("SharedClientState","Ignoring mutation for non-active user "+e.user.uid),[2])}))}))},e.prototype.tr=function(e){return this.fi.nr(e.targetId,e.state,e.error)},e.prototype.Hi=function(e,t){var n=this,r=t?this.Ti.ot(e,t):this.Ti.remove(e),i=this.Ni(this.Ti),o=this.Ni(r),a=[],s=[];return o.forEach((function(e){i.has(e)||a.push(e)})),i.forEach((function(e){o.has(e)||s.push(e)})),this.fi.sr(a,s).then((function(){n.Ti=r}))},e.prototype.Si=function(e){this.Ti.get(e.clientId)&&this.di(e.onlineState)},e.prototype.Ni=function(e){var t=ye();return e.forEach((function(e,n){t=t.Ot(n.activeTargetIds)})),t},e}(),jr=function(){function e(){this.ir=new xr,this.rr={},this.di=null,this.si=null}return e.prototype.Fi=function(e){},e.prototype.Oi=function(e,t,n){},e.prototype.$i=function(e){return this.ir.ui(e),this.rr[e]||"not-current"},e.prototype.Ki=function(e,t,n){this.rr[e]=t},e.prototype.Bi=function(e){this.ir.li(e)},e.prototype.qi=function(e){return this.ir.activeTargetIds.has(e)},e.prototype.Ui=function(e){delete this.rr[e]},e.prototype.Ci=function(){return this.ir.activeTargetIds},e.prototype.xi=function(e){return this.ir.activeTargetIds.has(e)},e.prototype.start=function(){return this.ir=new xr,Promise.resolve()},e.prototype.Wi=function(e,t,n){},e.prototype.ji=function(e){},e.prototype.Di=function(){},e.prototype.oi=function(e){},e}(),Rr=function(){function e(e,t,n,r){this.batchId=e,this.ar=t,this.baseMutations=n,this.mutations=r}return e.prototype.hr=function(e,t,n){for(var r=n.cr,i=0;i<this.mutations.length;i++){var o=this.mutations[i];o.key.isEqual(e)&&(t=Yt(o,t,r[i]))}return t},e.prototype.ur=function(e,t){for(var n=0,r=this.baseMutations;n<r.length;n++){var i=r[n];i.key.isEqual(e)&&(t=Qt(i,t,t,this.ar))}for(var o=t,a=0,s=this.mutations;a<s.length;a++){var u=s[a];u.key.isEqual(e)&&(t=Qt(u,t,o,this.ar))}return t},e.prototype.lr=function(e){var t=this,n=e;return this.mutations.forEach((function(r){var i=t.ur(r.key,e.get(r.key));i&&(n=n.ot(r.key,i))})),n},e.prototype.keys=function(){return this.mutations.reduce((function(e,t){return e.add(t.key)}),pe())},e.prototype.isEqual=function(e){return this.batchId===e.batchId&&k(this.mutations,e.mutations,(function(e,t){return Xt(e,t)}))&&k(this.baseMutations,e.baseMutations,(function(e,t){return Xt(e,t)}))},e}(),Ar=function(){function e(e,t,n,r){this.batch=e,this._r=t,this.cr=n,this.dr=r}return e.from=function(t,n,r){m(t.mutations.length===r.length);for(var i=he,o=t.mutations,a=0;a<o.length;a++)i=i.ot(o[a].key,r[a].version);return new e(t,n,r,i)},e}(),Mr=function(){function e(){this.wr=new M((function(e){return e.toString()}),(function(e,t){return e.isEqual(t)})),this.Er=!1}return Object.defineProperty(e.prototype,"readTime",{get:function(){return this.Tr},set:function(e){this.Tr=e}
2,enumerable:!1,configurable:!0}),e.prototype.Ir=function(e,t){this.mr(),this.readTime=t,this.wr.set(e.key,e)},e.prototype.Ar=function(e,t){this.mr(),t&&(this.readTime=t),this.wr.set(e,null)},e.prototype.Rr=function(e,t){this.mr();var n=this.wr.get(t);return void 0!==n?Xn.resolve(n):this.Pr(e,t)},e.prototype.getEntries=function(e,t){return this.gr(e,t)},e.prototype.apply=function(e){return this.mr(),this.Er=!0,this.Vr(e)},e.prototype.mr=function(){},e}(),Nr="The current tab is not in the required state to perform this operation. It might be necessary to refresh the browser tab.",Lr=function(){function e(){this.yr=[]}return e.prototype.pr=function(e){this.yr.push(e)},e.prototype.br=function(){this.yr.forEach((function(e){return e()}))},e}(),Dr=function(){function e(e,t,n){this.vr=e,this.Sr=t,this.Dr=n}return e.prototype.Cr=function(e,t){var n=this;return this.Sr.Nr(e,t).next((function(r){return n.Fr(e,t,r)}))},e.prototype.Fr=function(e,t,n){return this.vr.Rr(e,t).next((function(e){for(var r=0,i=n;r<i.length;r++)e=i[r].ur(t,e);return e}))},e.prototype.kr=function(e,t,n){var r=ce();return t.forEach((function(e,t){for(var i=0,o=n;i<o.length;i++)t=o[i].ur(e,t);r=r.ot(e,t)})),r},e.prototype.Or=function(e,t){var n=this;return this.vr.getEntries(e,t).next((function(t){return n.Mr(e,t)}))},e.prototype.Mr=function(e,t){var n=this;return this.Sr.$r(e,t).next((function(r){var i=n.kr(e,t,r),o=ue();return i.forEach((function(e,t){t||(t=new dn(e,L.min())),o=o.ot(e,t)})),o}))},e.prototype.Lr=function(e,t,n){return function(e){return B.X(e.path)&&null===e.collectionGroup&&0===e.filters.length}(t)?this.Br(e,t.path):kn(t)?this.qr(e,t,n):this.Ur(e,t,n)},e.prototype.Br=function(e,t){return this.Cr(e,new B(t)).next((function(e){var t=fe();return e instanceof hn&&(t=t.ot(e.key,e)),t}))},e.prototype.qr=function(e,t,n){var r=this,i=t.collectionGroup,o=fe();return this.Dr.Kr(e,i).next((function(a){return Xn.forEach(a,(function(a){var s=function(e,t){return new vn(t,null,e.on.slice(),e.filters.slice(),e.limit,e.an,e.startAt,e.endAt)}(t,a.child(i));return r.Ur(e,s,n).next((function(e){e.forEach((function(e,t){o=o.ot(e,t)}))}))})).next((function(){return o}))}))},e.prototype.Ur=function(e,t,n){var r,i,o=this;return this.vr.Lr(e,t,n).next((function(n){return r=n,o.Sr.Qr(e,t)})).next((function(t){return i=t,o.Wr(e,i,r).next((function(e){r=e;for(var t=0,n=i;t<n.length;t++)for(var o=n[t],a=0,s=o.mutations;a<s.length;a++){var u=s[a],c=u.key,l=r.get(c),f=Qt(u,l,l,o.ar);r=f instanceof hn?r.ot(c,f):r.remove(c)}}))})).next((function(){return r.forEach((function(e,n){jn(t,n)||(r=r.remove(e))})),r}))},e.prototype.Wr=function(e,t,n){for(var r=pe(),i=0,o=t;i<o.length;i++)for(var a=0,s=o[i].mutations;a<s.length;a++){var u=s[a];u instanceof en&&null===n.get(u.key)&&(r=r.add(u.key))}var c=n;return this.vr.getEntries(e,r).next((function(e){return e.forEach((function(e,t){null!==t&&t instanceof hn&&(c=c.ot(e,t))})),c}))},e}(),Fr=function(){function e(e,t,n,r){this.targetId=e,this.fromCache=t,this.jr=n,this.Gr=r}return e.zr=function(t,n){for(var r=pe(),i=pe(),o=0,a=n.docChanges;o<a.length;o++){var s=a[o];switch(s.type){case 0:r=r.add(s.doc.key);break;case 1:i=i.add(s.doc.key)}}return new e(t,n.fromCache,r,i)},e}();function Ur(e,t){var n=e[0],r=e[1],i=t[0],o=t[1],a=w(n,i);return 0===a?w(r,o):a}var Vr=function(){function e(e){this.Hr=e,this.buffer=new oe(Ur),this.Jr=0}return e.prototype.Yr=function(){return++this.Jr},e.prototype.Xr=function(e){var t=[e,this.Yr()];if(this.buffer.size<this.Hr)this.buffer=this.buffer.add(t);else{var n=this.buffer.last();Ur(t,n)<0&&(this.buffer=this.buffer.delete(n).add(t))}},Object.defineProperty(e.prototype,"maxValue",{get:function(){return this.buffer.last()[0]},enumerable:!1,configurable:!0}),e}(),Br={Zr:!1,eo:0,no:0,so:0},qr=function(){function e(e,t,n){this.io=e,this.ro=t,this.oo=n}return e.ao=function(t){return new e(t,e.ho,e.co)},e}();qr.uo=-1,qr.lo=1048576,qr._o=41943040,qr.ho=10,qr.co=1e3,qr.fo=new qr(qr._o,qr.ho,qr.co),qr.do=new qr(qr.uo,0,0);var Wr=function(){function e(e,t){this.wo=e,this.hs=t,this.Eo=!1,this.To=null}return e.prototype.start=function(e){this.wo.params.io!==qr.uo&&this.Io(e)},e.prototype.stop=function(){this.To&&(this.To.cancel(),this.To=null)},Object.defineProperty(e.prototype,"Ii",{get:function(){return null!==this.To}
2,enumerable:!1,configurable:!0}),e.prototype.Io=function(e){var n=this,r=this.Eo?3e5:6e4;h("LruGarbageCollector","Garbage collection scheduled in "+r+"ms"),this.To=this.hs.Vn("lru_garbage_collection",r,(function(){return Object(t.b)(n,void 0,void 0,(function(){var n;return Object(t.d)(this,(function(t){switch(t.label){case 0:this.To=null,this.Eo=!0,t.label=1;case 1:return t.trys.push([1,3,,7]),[4,e.mo(this.wo)];case 2:return t.sent(),[3,7];case 3:return tr(n=t.sent())?(h("LruGarbageCollector","Ignoring IndexedDB error during garbage collection: ",n),[3,6]):[3,4];case 4:return[4,uo(n)];case 5:t.sent(),t.label=6;case 6:return[3,7];case 7:return[4,this.Io(e)];case 8:return t.sent(),[2]}}))}))}))},e}(),zr=function(){function e(e,t){this.Ao=e,this.params=t}return e.prototype.Ro=function(e,t){return this.Ao.Po(e).next((function(e){return Math.floor(t/100*e)}))},e.prototype.Vo=function(e,t){var n=this;if(0===t)return Xn.resolve(wr.ai);var r=new Vr(t);return this.Ao.Ce(e,(function(e){return r.Xr(e.sequenceNumber)})).next((function(){return n.Ao.yo(e,(function(e){return r.Xr(e)}))})).next((function(){return r.maxValue}))},e.prototype.po=function(e,t,n){return this.Ao.po(e,t,n)},e.prototype.bo=function(e,t){return this.Ao.bo(e,t)},e.prototype.vo=function(e,t){var n=this;return this.params.io===qr.uo?(h("LruGarbageCollector","Garbage collection skipped; disabled"),Xn.resolve(Br)):this.So(e).next((function(r){return r<n.params.io?(h("LruGarbageCollector","Garbage collection skipped; Cache size "+r+" is lower than threshold "+n.params.io),Br):n.Do(e,t)}))},e.prototype.So=function(e){return this.Ao.So(e)},e.prototype.Do=function(e,t){var n,r,o,a,s,u,c,l=this,d=Date.now();return this.Ro(e,this.params.ro).next((function(t){return t>l.params.oo?(h("LruGarbageCollector","Capping sequence numbers to collect down to the maximum of "+l.params.oo+" from "+t),r=l.params.oo):r=t,a=Date.now(),l.Vo(e,r)})).next((function(r){return n=r,s=Date.now(),l.po(e,n,t)})).next((function(t){return o=t,u=Date.now(),l.bo(e,n)})).next((function(e){return c=Date.now(),f()<=i.a.DEBUG&&h("LruGarbageCollector","LRU Garbage Collection\n\tCounted targets in "+(a-d)+"ms\n\tDetermined least recently used "+r+" in "+(s-a)+"ms\n\tRemoved "+o+" targets in "+(u-s)+"ms\n\tRemoved "+e+" documents in "+(c-u)+"ms\nTotal Duration: "+(c-d)+"ms"),Xn.resolve({Zr:!0,eo:r,no:o,so:e})}))},e}();function Hr(e){for(var t="",n=0;n<e.length;n++)t.length>0&&(t=Kr(t)),t=Gr(e.get(n),t);return Kr(t)}function Gr(e,t){for(var n=t,r=e.length,i=0;i<r;i++){var o=e.charAt(i);switch(o){case"\0":n+="\x01\x10";break;case"\x01":n+="\x01\x11";break;default:n+=o}}return n}function Kr(e){return e+"\x01\x01"}function Yr(e){var t=e.length;if(m(t>=2),2===t)return m("\x01"===e.charAt(0)&&"\x01"===e.charAt(1)),F.U();for(var n=t-2,r=[],i="",o=0;o<t;){var a=e.indexOf("\x01",o);switch((a<0||a>n)&&y(),e.charAt(a+1)){case"\x01":var s=e.substring(o,a),u=void 0;0===i.length?u=s:(u=i+=s,i=""),r.push(u);break;case"\x10":i+=e.substring(o,a),i+="\0";break;case"\x11":i+=e.substring(o,a+1);break;default:y()}o=a+2}return new F(r)}var Qr=function(e){this.Co=e};function $r(e,t){if(t.document)return function(e,t,n){var r=ut(e,t.name),i=it(t.updateTime),o=new un({mapValue:{fields:t.fields}});return new hn(r,i,o,{hasCommittedMutations:!!n})}(e.Co,t.document,!!t.hasCommittedMutations);if(t.noDocument){var n=B.Z(t.noDocument.path),r=ti(t.noDocument.readTime);return new dn(n,r,{hasCommittedMutations:!!t.hasCommittedMutations})}if(t.unknownDocument){var i=B.Z(t.unknownDocument.path),o=ti(t.unknownDocument.version);return new pn(i,o)}return y()}function Xr(e,t,n){var r=Jr(n),i=t.key.path.F().L();if(t instanceof hn){var o=function(e,t){return{name:st(e,t.key),fields:t.rn().mapValue.fields,updateTime:tt(e,t.version.v())}}(e.Co,t),a=t.hasCommittedMutations;return new Ci(null,null,o,a,r,i)}if(t instanceof dn){var s=t.key.path.L(),u=ei(t.version),c=t.hasCommittedMutations;return new Ci(null,new Ei(s,u),null,c,r,i)}if(t instanceof pn){var l=t.key.path.L(),f=ei(t.version);return new Ci(new Ti(l,f),null,null,!0,r,i)}return y()}function Jr(e){var t=e.v();return[t.seconds,t.nanoseconds]}function Zr(e){var t=new N(e[0],e[1]);return L.V(t)}function ei(e){var t=e.v();return new _i(t.seconds,t.nanoseconds)}function ti(e){var t=new N(e.seconds,e.nanoseconds);return L.V(t)}function ni(e,t){var n=(t.baseMutations||[]).map((function(t){return vt(e.Co,t)})),r=t.mutations.map((function(t){return vt(e.Co,t)})),i=N.fromMillis(t.localWriteTimeMs);return new Rr(t.batchId,i,n,r)}function ri(e){var t,n,r=ti(e.readTime),i=void 0!==e.lastLimboFreeSnapshotVersion?ti(e.lastLimboFreeSnapshotVersion):L.min();return void 0!==e.query.documents?(m(1===(n=e.query).documents.length),t=On(mn(lt(n.documents[0])))):t=gt(e.query),new J(t,e.targetId,0,e.lastListenSequenceNumber,r,i,O.fromBase64String(e.resumeToken))}function ii(e,t){var n,r=ei(t.nt),i=ei(t.lastLimboFreeSnapshotVersion);n=Q(t.target)?yt(e.Co,t.target):mt(e.Co,t.target);var o=t.resumeToken.toBase64();return new xi(t.targetId,K(t.target),r,o,t.sequenceNumber,i,n)}var oi=function(){function e(e,t,n,r){this.userId=e,this.serializer
2=t,this.Dr=n,this.No=r,this.xo={}}return e.Fo=function(t,n,r,i){return m(""!==t.uid),new e(t.Zs()?t.uid:"",n,r,i)},e.prototype.ko=function(e){var t=!0,n=IDBKeyRange.bound([this.userId,Number.NEGATIVE_INFINITY],[this.userId,Number.POSITIVE_INFINITY]);return ui(e).rs({index:Si.userMutationsIndex,range:n},(function(e,n,r){t=!1,r.done()})).next((function(){return t}))},e.prototype.Oo=function(e,t,n,r){var i=this,o=ci(e),a=ui(e);return a.add({}).next((function(s){m("number"==typeof s);for(var u=new Rr(s,t,n,r),c=function(e,t,n){var r=n.baseMutations.map((function(t){return pt(e.Co,t)})),i=n.mutations.map((function(t){return pt(e.Co,t)}));return new Si(t,n.batchId,n.ar.toMillis(),r,i)}(i.serializer,i.userId,u),l=[],f=new oe((function(e,t){return w(e.B(),t.B())})),h=0,d=r;h<d.length;h++){var p=d[h],v=Oi.key(i.userId,p.key.path,s);f=f.add(p.key.path.F()),l.push(a.put(c)),l.push(o.put(v,Oi.PLACEHOLDER))}return f.forEach((function(t){l.push(i.Dr.Mo(e,t))})),e.pr((function(){i.xo[s]=u.keys()})),Xn.kn(l).next((function(){return u}))}))},e.prototype.$o=function(e,t){var n=this;return ui(e).get(t).next((function(e){return e?(m(e.userId===n.userId),ni(n.serializer,e)):null}))},e.prototype.Lo=function(e,t){var n=this;return this.xo[t]?Xn.resolve(this.xo[t]):this.$o(e,t).next((function(e){if(e){var r=e.keys();return n.xo[t]=r,r}return null}))},e.prototype.Bo=function(e,t){var n=this,r=t+1,i=IDBKeyRange.lowerBound([this.userId,r]),o=null;return ui(e).rs({index:Si.userMutationsIndex,range:i},(function(e,t,i){t.userId===n.userId&&(m(t.batchId>=r),o=ni(n.serializer,t)),i.done()})).next((function(){return o}))},e.prototype.qo=function(e){var t=IDBKeyRange.upperBound([this.userId,Number.POSITIVE_INFINITY]),n=-1;return ui(e).rs({index:Si.userMutationsIndex,range:t,reverse:!0},(function(e,t,r){n=t.batchId,r.done()})).next((function(){return n}))},e.prototype.Uo=function(e){var t=this,n=IDBKeyRange.bound([this.userId,-1],[this.userId,Number.POSITIVE_INFINITY]);return ui(e).ts(Si.userMutationsIndex,n).next((function(e){return e.map((function(e){return ni(t.serializer,e)}))}))},e.prototype.Nr=function(e,t){var n=this,r=Oi.prefixForPath(this.userId,t.path),i=IDBKeyRange.lowerBound(r),o=[];return ci(e).rs({range:i},(function(r,i,a){var s=r[0],u=r[1],c=r[2],l=Yr(u);if(s===n.userId&&t.path.isEqual(l))return ui(e).get(c).next((function(e){if(!e)throw y();m(e.userId===n.userId),o.push(ni(n.serializer,e))}));a.done()})).next((function(){return o}))},e.prototype.$r=function(e,t){var n=this,r=new oe(w),i=[];return t.forEach((function(t){var o=Oi.prefixForPath(n.userId,t.path),a=IDBKeyRange.lowerBound(o),s=ci(e).rs({range:a},(function(e,i,o){var a=e[0],s=e[1],u=e[2],c=Yr(s);a===n.userId&&t.path.isEqual(c)?r=r.add(u):o.done()}));i.push(s)})),Xn.kn(i).next((function(){return n.Ko(e,r)}))},e.prototype.Qr=function(e,t){var n=this,r=t.path,i=r.length+1,o=Oi.prefixForPath(this.userId,r),a=IDBKeyRange.lowerBound(o),s=new oe(w);return ci(e).rs({range:a},(function(e,t,o){var a=e[0],u=e[1],c=e[2],l=Yr(u);a===n.userId&&r.M(l)?l.length===i&&(s=s.add(c)):o.done()})).next((function(){return n.Ko(e,s)}))},e.prototype.Ko=function(e,t){var n=this,r=[],i=[];return t.forEach((function(t){i.push(ui(e).get(t).next((function(e){if(null===e)throw y();m(e.userId===n.userId),r.push(ni(n.serializer,e))})))})),Xn.kn(i).next((function(){return r}))},e.prototype.Qo=function(e,t){var n=this;return si(e.Wo,this.userId,t).next((function(r){return e.pr((function(){n.jo(t.batchId)})),Xn.forEach(r,(function(t){return n.No.Go(e,t)}))}))},e.prototype.jo=function(e){delete this.xo[e]},e.prototype.zo=function(e){var t=this;return this.ko(e).next((function(n){if(!n)return Xn.resolve();
2var r=IDBKeyRange.lowerBound(Oi.prefixForUser(t.userId)),i=[];return ci(e).rs({range:r},(function(e,n,r){if(e[0]===t.userId){var o=Yr(e[1]);i.push(o)}else r.done()})).next((function(){m(0===i.length)}))}))},e.prototype.Ho=function(e,t){return ai(e,this.userId,t)},e.prototype.Jo=function(e){var t=this;return li(e).get(this.userId).next((function(e){return e||new ki(t.userId,-1,"")}))},e}();function ai(e,t,n){var r=Oi.prefixForPath(t,n.path),i=r[1],o=IDBKeyRange.lowerBound(r),a=!1;return ci(e).rs({range:o,ss:!0},(function(e,n,r){var o=e[0],s=e[1];e[2],o===t&&s===i&&(a=!0),r.done()})).next((function(){return a}))}function si(e,t,n){var r=e.store(Si.store),i=e.store(Oi.store),o=[],a=IDBKeyRange.only(n.batchId),s=0,u=r.rs({range:a},(function(e,t,n){return s++,n.delete()}));o.push(u.next((function(){m(1===s)})));for(var c=[],l=0,f=n.mutations;l<f.length;l++){var h=f[l],d=Oi.key(t,h.key.path,n.batchId);o.push(i.delete(d)),c.push(h.key)}return Xn.kn(o).next((function(){return c}))}function ui(e){return Hi.Kn(e,Si.store)}function ci(e){return Hi.Kn(e,Oi.store)}function li(e){return Hi.Kn(e,ki.store)}var fi=function(){function e(e,t){this.serializer=e,this.Dr=t}return e.prototype.Ir=function(e,t,n){return pi(e).put(vi(t),n)},e.prototype.Ar=function(e,t){var n=pi(e),r=vi(t);return n.delete(r)},e.prototype.updateMetadata=function(e,t){var n=this;return this.getMetadata(e).next((function(r){return r.byteSize+=t,n.Yo(e,r)}))},e.prototype.Rr=function(e,t){var n=this;return pi(e).get(vi(t)).next((function(e){return n.Xo(e)}))},e.prototype.Zo=function(e,t){var n=this;return pi(e).get(vi(t)).next((function(e){var t=n.Xo(e);return t?{ta:t,size:yi(e)}:null}))},e.prototype.getEntries=function(e,t){var n=this,r=ce();return this.ea(e,t,(function(e,t){var i=n.Xo(t);r=r.ot(e,i)})).next((function(){return r}))},e.prototype.na=function(e,t){var n=this,r=ce(),i=new ne(B.D);return this.ea(e,t,(function(e,t){var o=n.Xo(t);o?(r=r.ot(e,o),i=i.ot(e,yi(t))):(r=r.ot(e,null),i=i.ot(e,0))})).next((function(){return{sa:r,ia:i}}))},e.prototype.ea=function(e,t,n){if(t.P())return Xn.resolve();var r=IDBKeyRange.bound(t.first().path.L(),t.last().path.L()),i=t._t(),o=i.It();return pi(e).rs({range:r},(function(e,t,r){for(var a=B.Z(e);o&&B.D(o,a)<0;)n(o,null),o=i.It();o&&o.isEqual(a)&&(n(o,t),o=i.At()?i.It():null),o?r.Xn(o.path.L()):r.done()})).next((function(){for(;o;)n(o,null),o=i.At()?i.It():null}))},e.prototype.Lr=function(e,t,n){var r=this,i=fe(),o=t.path.length+1,a={};if(n.isEqual(L.min())){var s=t.path.L();a.range=IDBKeyRange.lowerBound(s)}else{var u=t.path.L(),c=Jr(n);a.range=IDBKeyRange.lowerBound([u,c],!0),a.index=Ci.collectionReadTimeIndex}return pi(e).rs(a,(function(e,n,a){if(e.length===o){var s=$r(r.serializer,n);t.path.M(s.key.path)?s instanceof hn&&jn(t,s)&&(i=i.ot(s.key,s)):a.done()}})).next((function(){return i}))},e.prototype.ra=function(e){return new hi(this,!!e&&e.oa)},e.prototype.aa=function(e){return this.getMetadata(e).next((function(e){return e.byteSize}))},e.prototype.getMetadata=function(e){return di(e).get(Pi.key).next((function(e){return m(!!e),e}))},e.prototype.Yo=function(e,t){return di(e).put(Pi.key,t)},e.prototype.Xo=function(e){if(e){var t=$r(this.serializer,e);return t instanceof dn&&t.version.isEqual(L.min())?null:t}return null},e}(),hi=function(e){function n(t,n){var r=this;return(r=e.call(this)||this).ha=t,r.oa=n,r.ca=new M((function(e){return e.toString()}),(function(e,t){return e.isEqual(t)})),r}return Object(t.c)(n,e),n.prototype.Vr=function(e){var t=this,n=[],r=0,i=new oe((function(e,t){return w(e.B(),t.B())}));return this.wr.forEach((function(o,a){var s=t.ca.get(o);if(a){var u=Xr(t.ha.serializer,a,t.readTime);i=i.add(o.path.F());var c=yi(u);r+=c-s,n.push(t.ha.Ir(e,o,u))}else if(r-=s,t.oa){var l=Xr(t.ha.serializer,new dn(o,L.min()),t.readTime);n.push(t.ha.Ir(e,o,l))}else n.push(t.ha.Ar(e,o))})),i.forEach((function(r){n.push(t.ha.Dr.Mo(e,r))})),n.push(this.ha.updateMetadata(e,r)),Xn.kn(n)},n.prototype.Pr=function(e,t){var n=this;return this.ha.Zo(e,t).next((function(e){return null===e?(n.ca.set(t,0),null):(n.ca.set(t,e.size),e.ta)}))},n.prototype.gr=function(e,t){var n=this;return this.ha.na(e,t).next((function(e){var t=e.sa;
2return e.ia.forEach((function(e,t){n.ca.set(e,t)})),t}))},n}(Mr);function di(e){return Hi.Kn(e,Pi.store)}function pi(e){return Hi.Kn(e,Ci.store)}function vi(e){return e.path.L()}function yi(e){var t;if(e.document)t=e.document;else if(e.unknownDocument)t=e.unknownDocument;else{if(!e.noDocument)throw y();t=e.noDocument}return JSON.stringify(t).length}var mi=function(){function e(){this.ua=new gi}return e.prototype.Mo=function(e,t){return this.ua.add(t),Xn.resolve()},e.prototype.Kr=function(e,t){return Xn.resolve(this.ua.getEntries(t))},e}(),gi=function(){function e(){this.index={}}return e.prototype.add=function(e){var t=e.O(),n=e.F(),r=this.index[t]||new oe(F.D),i=!r.has(n);return this.index[t]=r.add(n),i},e.prototype.has=function(e){var t=e.O(),n=e.F(),r=this.index[t];return r&&r.has(n)},e.prototype.getEntries=function(e){return(this.index[e]||new oe(F.D)).L()},e}(),bi=function(){function e(e){this.serializer=e}return e.prototype.createOrUpgrade=function(e,t,n,r){var i=this;m(n<r&&n>=0&&r<=10);var o=new nr("createOrUpgrade",t);n<1&&r>=1&&(function(e){e.createObjectStore(wi.store)}(e),function(e){e.createObjectStore(ki.store,{keyPath:ki.keyPath}),e.createObjectStore(Si.store,{keyPath:Si.keyPath,autoIncrement:!0}).createIndex(Si.userMutationsIndex,Si.userMutationsKeyPath,{unique:!0}),e.createObjectStore(Oi.store)}(e),Ai(e),function(e){e.createObjectStore(Ci.store)}(e));var a=Xn.resolve();return n<3&&r>=3&&(0!==n&&(function(e){e.deleteObjectStore(Ii.store),e.deleteObjectStore(xi.store),e.deleteObjectStore(ji.store)}(e),Ai(e)),a=a.next((function(){return function(e){var t=e.store(ji.store),n=new ji(0,0,L.min().v(),0);return t.put(ji.key,n)}(o)}))),n<4&&r>=4&&(0!==n&&(a=a.next((function(){return function(e,t){return t.store(Si.store).ts().next((function(n){e.deleteObjectStore(Si.store),e.createObjectStore(Si.store,{keyPath:Si.keyPath,autoIncrement:!0}).createIndex(Si.userMutationsIndex,Si.userMutationsKeyPath,{unique:!0});var r=t.store(Si.store),i=n.map((function(e){return r.put(e)}));return Xn.kn(i)}))}(e,o)}))),a=a.next((function(){!function(e){e.createObjectStore(Mi.store,{keyPath:Mi.keyPath})}(e)}))),n<5&&r>=5&&(a=a.next((function(){return i.removeAcknowledgedMutations(o)}))),n<6&&r>=6&&(a=a.next((function(){return function(e){e.createObjectStore(Pi.store)}(e),i.addDocumentGlobal(o)}))),n<7&&r>=7&&(a=a.next((function(){return i.ensureSequenceNumbers(o)}))),n<8&&r>=8&&(a=a.next((function(){return i.createCollectionParentIndex(e,o)}))),n<9&&r>=9&&(a=a.next((function(){!function(e){e.objectStoreNames.contains("remoteDocumentChanges")&&e.deleteObjectStore("remoteDocumentChanges")}(e),function(e){var t=e.objectStore(Ci.store);t.createIndex(Ci.readTimeIndex,Ci.readTimeIndexPath,{unique:!1}),t.createIndex(Ci.collectionReadTimeIndex,Ci.collectionReadTimeIndexPath,{unique:!1})}(t)}))),n<10&&r>=10&&(a=a.next((function(){return i.rewriteCanonicalIds(o)}))),a},e.prototype.addDocumentGlobal=function(e){var t=0;return e.store(Ci.store).rs((function(e,n){t+=yi(n)})).next((function(){var n=new Pi(t);return e.store(Pi.store).put(Pi.key,n)}))},e.prototype.removeAcknowledgedMutations=function(e){var t=this,n=e.store(ki.store),r=e.store(Si.store);return n.ts().next((function(n){return Xn.forEach(n,(function(n){var i=IDBKeyRange.bound([n.userId,-1],[n.userId,n.lastAcknowledgedBatchId]);return r.ts(Si.userMutationsIndex,i).next((function(r){return Xn.forEach(r,(function(r){m(r.userId===n.userId);var i=ni(t.serializer,r);return si(e,n.userId,i).next((function(){}))}))}))}))}))},e.prototype.ensureSequenceNumbers=function(e){var t=e.store(Ii.store),n=e.store(Ci.store);return e.store(ji.store).get(ji.key).next((function(e){var r=[];return n.rs((function(n,i){var o=new F(n),a=function(e){return[0,Hr(e)
2]}(o);r.push(t.get(a).next((function(n){return n?Xn.resolve():function(n){return t.put(new Ii(0,Hr(n),e.highestListenSequenceNumber))}(o)})))})).next((function(){return Xn.kn(r)}))}))},e.prototype.createCollectionParentIndex=function(e,t){e.createObjectStore(Ri.store,{keyPath:Ri.keyPath});var n=t.store(Ri.store),r=new gi,i=function(e){if(r.add(e)){var t=e.O(),i=e.F();return n.put({collectionId:t,parent:Hr(i)})}};return t.store(Ci.store).rs({ss:!0},(function(e,t){var n=new F(e);return i(n.F())})).next((function(){return t.store(Oi.store).rs({ss:!0},(function(e,t){e[0];var n=e[1],r=(e[2],Yr(n));return i(r.F())}))}))},e.prototype.rewriteCanonicalIds=function(e){var t=this,n=e.store(xi.store);return n.rs((function(e,r){var i=ri(r),o=ii(t.serializer,i);return n.put(o)}))},e}(),_i=function(e,t){this.seconds=e,this.nanoseconds=t},wi=function(e,t,n){this.ownerId=e,this.allowTabSynchronization=t,this.leaseTimestampMs=n};wi.store="owner",wi.key="owner";var ki=function(e,t,n){this.userId=e,this.lastAcknowledgedBatchId=t,this.lastStreamToken=n};ki.store="mutationQueues",ki.keyPath="userId";var Si=function(e,t,n,r,i){this.userId=e,this.batchId=t,this.localWriteTimeMs=n,this.baseMutations=r,this.mutations=i};Si.store="mutations",Si.keyPath="batchId",Si.userMutationsIndex="userMutationsIndex",Si.userMutationsKeyPath=["userId","batchId"];var Oi=function(){function e(){}return e.prefixForUser=function(e){return[e]},e.prefixForPath=function(e,t){return[e,Hr(t)]},e.key=function(e,t,n){return[e,Hr(t),n]},e}();Oi.store="documentMutations",Oi.PLACEHOLDER=new Oi;var Ei=function(e,t){this.path=e,this.readTime=t},Ti=function(e,t){this.path=e,this.version=t},Ci=function(e,t,n,r,i,o){this.unknownDocument=e,this.noDocument=t,this.document=n,this.hasCommittedMutations=r,this.readTime=i,this.parentPath=o};Ci.store="remoteDocuments",Ci.readTimeIndex="readTimeIndex",Ci.readTimeIndexPath="readTime",Ci.collectionReadTimeIndex="collectionReadTimeIndex",Ci.collectionReadTimeIndexPath=["parentPath","readTime"];var Pi=function(e){this.byteSize=e};Pi.store="remoteDocumentGlobal",Pi.key="remoteDocumentGlobalKey";var xi=function(e,t,n,r,i,o,a){this.targetId=e,this.canonicalId=t,this.readTime=n,this.resumeToken=r,this.lastListenSequenceNumber=i,this.lastLimboFreeSnapshotVersion=o,this.query=a};xi.store="targets",xi.keyPath="targetId",xi.queryTargetsIndexName="queryTargetsIndex",xi.queryTargetsKeyPath=["canonicalId","targetId"];var Ii=function(e,t,n){this.targetId=e,this.path=t,this.sequenceNumber=n};Ii.store="targetDocuments",Ii.keyPath=["targetId","path"],Ii.documentTargetsIndex="documentTargetsIndex",Ii.documentTargetsKeyPath=["path","targetId"];var ji=function(e,t,n,r){this.highestTargetId=e,this.highestListenSequenceNumber=t,this.lastRemoteSnapshotVersion=n,this.targetCount=r};ji.key="targetGlobalKey",ji.store="targetGlobal";var Ri=function(e,t){this.collectionId=e,this.parent=t};function Ai(e){e.createObjectStore(Ii.store,{keyPath:Ii.keyPath}).createIndex(Ii.documentTargetsIndex,Ii.documentTargetsKeyPath,{unique:!0}),e.createObjectStore(xi.store,{keyPath:xi.keyPath}).createIndex(xi.queryTargetsIndexName,xi.queryTargetsKeyPath,{unique:!0}),e.createObjectStore(ji.store)}Ri.store="collectionParents",Ri.keyPath=["collectionId","parent"];var Mi=function(e,t,n,r){this.clientId=e,this.updateTimeMs=t,this.networkEnabled=n,this.inForeground=r};Mi.store="clientMetadata",Mi.keyPath="clientId";var Ni=Object(t.g)(Object(t.g)(Object(t.g)([ki.store,Si.store,Oi.store,Ci.store,xi.store,wi.store,ji.store,Ii.store],[Mi.store]),[Pi.store]),[Ri.store]),Li=function(){function e(){this.la=new gi}return e.prototype.Mo=function(e,t){var n=this;if(!this.la.has(t)){var r=t.O(),i=t.F();e.pr((function(){n.la.add(t)}));var o={collectionId:r,parent:Hr(i)};return Di(e).put(o)}return Xn.resolve()},e.prototype.Kr=function(e,t){var n=[],r=IDBKeyRange.bound([t,""],[S(t),""],!1,!0);return Di(e).ts(r).next((function(e){for(var r=0,i=e;r<i.length;r++){var o=i[r];if(o.collectionId!==t)break;n.push(Yr(o.parent))}return n}))},e}();function Di(e){return Hi.Kn(e,Ri.store)}var Fi=function(){function e(e){this._a=e}return e.prototype.next=function(){return this._a+=2,this._a},e.fa=function(){return new e(0)},e.da=function(){return new e(-1)},e}
2(),Ui=function(){function e(e,t){this.No=e,this.serializer=t}return e.prototype.wa=function(e){var t=this;return this.Ea(e).next((function(n){var r=new Fi(n.highestTargetId);return n.highestTargetId=r.next(),t.Ta(e,n).next((function(){return n.highestTargetId}))}))},e.prototype.Ia=function(e){return this.Ea(e).next((function(e){return L.V(new N(e.lastRemoteSnapshotVersion.seconds,e.lastRemoteSnapshotVersion.nanoseconds))}))},e.prototype.ma=function(e){return this.Ea(e).next((function(e){return e.highestListenSequenceNumber}))},e.prototype.Aa=function(e,t,n){var r=this;return this.Ea(e).next((function(i){return i.highestListenSequenceNumber=t,n&&(i.lastRemoteSnapshotVersion=n.v()),t>i.highestListenSequenceNumber&&(i.highestListenSequenceNumber=t),r.Ta(e,i)}))},e.prototype.Ra=function(e,t){var n=this;return this.Pa(e,t).next((function(){return n.Ea(e).next((function(r){return r.targetCount+=1,n.ga(t,r),n.Ta(e,r)}))}))},e.prototype.Va=function(e,t){return this.Pa(e,t)},e.prototype.ya=function(e,t){var n=this;return this.pa(e,t.targetId).next((function(){return Vi(e).delete(t.targetId)})).next((function(){return n.Ea(e)})).next((function(t){return m(t.targetCount>0),t.targetCount-=1,n.Ta(e,t)}))},e.prototype.po=function(e,t,n){var r=this,i=0,o=[];return Vi(e).rs((function(a,s){var u=ri(s);u.sequenceNumber<=t&&null===n.get(u.targetId)&&(i++,o.push(r.ya(e,u)))})).next((function(){return Xn.kn(o)})).next((function(){return i}))},e.prototype.Ce=function(e,t){return Vi(e).rs((function(e,n){var r=ri(n);t(r)}))},e.prototype.Ea=function(e){return Bi(e).get(ji.key).next((function(e){return m(null!==e),e}))},e.prototype.Ta=function(e,t){return Bi(e).put(ji.key,t)},e.prototype.Pa=function(e,t){return Vi(e).put(ii(this.serializer,t))},e.prototype.ga=function(e,t){var n=!1;return e.targetId>t.highestTargetId&&(t.highestTargetId=e.targetId,n=!0),e.sequenceNumber>t.highestListenSequenceNumber&&(t.highestListenSequenceNumber=e.sequenceNumber,n=!0),n},e.prototype.ba=function(e){return this.Ea(e).next((function(e){return e.targetCount}))},e.prototype.va=function(e,t){var n=K(t),r=IDBKeyRange.bound([n,Number.NEGATIVE_INFINITY],[n,Number.POSITIVE_INFINITY]),i=null;return Vi(e).rs({range:r,index:xi.queryTargetsIndexName},(function(e,n,r){var o=ri(n);Y(t,o.target)&&(i=o,r.done())})).next((function(){return i}))},e.prototype.Sa=function(e,t,n){var r=this,i=[],o=qi(e);return t.forEach((function(t){var a=Hr(t.path);i.push(o.put(new Ii(n,a))),i.push(r.No.Da(e,n,t))})),Xn.kn(i)},e.prototype.Ca=function(e,t,n){var r=this,i=qi(e);return Xn.forEach(t,(function(t){var o=Hr(t.path);return Xn.kn([i.delete([n,o]),r.No.Na(e,n,t)])}))},e.prototype.pa=function(e,t){var n=qi(e),r=IDBKeyRange.bound([t],[t+1],!1,!0);return n.delete(r)},e.prototype.xa=function(e,t){var n=IDBKeyRange.bound([t],[t+1],!1,!0),r=qi(e),i=pe();return r.rs({range:n,ss:!0},(function(e,t,n){var r=Yr(e[1]),o=new B(r);i=i.add(o)})).next((function(){return i}))},e.prototype.Ho=function(e,t){var n=Hr(t.path),r=IDBKeyRange.bound([n],[S(n)],!1,!0),i=0;return qi(e).rs({index:Ii.documentTargetsIndex,ss:!0,range:r},(function(e,t,n){var r=e[0];e[1],0!==r&&(i++,n.done())})).next((function(){return i>0}))},e.prototype.Ue=function(e,t){return Vi(e).get(t).next((function(e){return e?ri(e):null}))},e}();function Vi(e){return Hi.Kn(e,xi.store)}function Bi(e){return Hi.Kn(e,ji.store)}function qi(e){return Hi.Kn(e,Ii.store)}var Wi="Failed to obtain exclusive access to the persistence layer. To allow shared access, multi-tab synchronization has to be enabled in all tabs. If you are using `experimentalForceOwningTab:true`, make sure that only one tab has persistence enabled at any given time.",zi=function(e){function n(t,n){var r=this;return(r=e.call(this)||this).Wo=t,r.Fa=n,r}return Object(t.c)(n,e),n}(Lr),Hi=function(){function e(t,n,r,i,o,a,s,l,f,h){if(this.allowTabSynchronization=t,this.persistenceKey=n,this.clientId=r,this.fn=o,this.window=a,this.document=s,this.ka=f,this.Oa=h,this.Ma=null,this.$a=!1,this.isPrimary=!1,this.networkEnabled=!0,this.La=null,this.inForeground=!1,this.Ba=null,this.qa=null,this.Ua=Number.NEGATIVE_INFINITY,this.Ka=function(e){return Promise.resolve()}
2,!e.Ln())throw new c(u.UNIMPLEMENTED,"This platform is either missing IndexedDB or is known to have an incomplete implementation. Offline persistence has been disabled.");this.No=new Yi(this,i),this.Qa=n+"main",this.serializer=new Qr(l),this.Wa=new Jn(this.Qa,10,new bi(this.serializer)),this.ja=new Ui(this.No,this.serializer),this.Dr=new Li,this.vr=function(e,t){return new fi(e,t)}(this.serializer,this.Dr),this.window&&this.window.localStorage?this.Ga=this.window.localStorage:(this.Ga=null,!1===h&&d("IndexedDbPersistence","LocalStorage is unavailable. As a result, persistence may not work reliably. In particular enablePersistence() could fail immediately after refreshing the page."))}return e.Kn=function(e,t){if(e instanceof zi)return Jn.Kn(e.Wo,t);throw y()},e.prototype.start=function(){var e=this;return this.za().then((function(){if(!e.isPrimary&&!e.allowTabSynchronization)throw new c(u.FAILED_PRECONDITION,Wi);return e.Ha(),e.Ja(),e.Ya(),e.runTransaction("getHighestListenSequenceNumber","readonly",(function(t){return e.ja.ma(t)}))})).then((function(t){e.Ma=new wr(t,e.ka)})).then((function(){e.$a=!0})).catch((function(t){return e.Wa&&e.Wa.close(),Promise.reject(t)}))},e.prototype.Xa=function(e){var n=this;return this.Ka=function(r){return Object(t.b)(n,void 0,void 0,(function(){return Object(t.d)(this,(function(t){return this.Ii?[2,e(r)]:[2]}))}))},e(this.isPrimary)},e.prototype.Za=function(e){var n=this;this.Wa.jn((function(r){return Object(t.b)(n,void 0,void 0,(function(){return Object(t.d)(this,(function(t){switch(t.label){case 0:return null===r.newVersion?[4,e()]:[3,2];case 1:t.sent(),t.label=2;case 2:return[2]}}
2))}))}))},e.prototype.th=function(e){var n=this;this.networkEnabled!==e&&(this.networkEnabled=e,this.fn.ws((function(){return Object(t.b)(n,void 0,void 0,(function(){return Object(t.d)(this,(function(e){switch(e.label){case 0:return this.Ii?[4,this.za()]:[3,2];case 1:e.sent(),e.label=2;case 2:return[2]}}))}))})))},e.prototype.za=function(){var e=this;return this.runTransaction("updateClientMetadataAndTryBecomePrimary","readwrite",(function(t){return Ki(t).put(new Mi(e.clientId,Date.now(),e.networkEnabled,e.inForeground)).next((function(){if(e.isPrimary)return e.eh(t).next((function(t){t||(e.isPrimary=!1,e.fn.Cs((function(){return e.Ka(!1)})))}))})).next((function(){return e.nh(t)})).next((function(n){return e.isPrimary&&!n?e.sh(t).next((function(){return!1})):!!n&&e.ih(t).next((function(){return!0}))}))})).catch((function(t){if(tr(t))return h("IndexedDbPersistence","Failed to extend owner lease: ",t),e.isPrimary;if(!e.allowTabSynchronization)throw t;return h("IndexedDbPersistence","Releasing owner lease after error during lease refresh",t),!1})).then((function(t){e.isPrimary!==t&&e.fn.Cs((function(){return e.Ka(t)})),e.isPrimary=t}))},e.prototype.eh=function(e){var t=this;return Gi(e).get(wi.key).next((function(e){return Xn.resolve(t.rh(e))}))},e.prototype.oh=function(e){return Ki(e).delete(this.clientId)},e.prototype.ah=function(){return Object(t.b)(this,void 0,void 0,(function(){var n,r,i,o,a=this;return Object(t.d)(this,(function(t){switch(t.label){case 0:return!this.isPrimary||this.hh(this.Ua,18e5)?[3,2]:(this.Ua=Date.now(),[4,this.runTransaction("maybeGarbageCollectMultiClientState","readwrite-primary",(function(t){var n=e.Kn(t,Mi.store);return n.ts().next((function(e){var t=a.uh(e,18e5),r=e.filter((function(e){return-1===t.indexOf(e)}));return Xn.forEach(r,(function(e){return n.delete(e.clientId)})).next((function(){return r}))}))})).catch((function(){return[]}))]);case 1:if(n=t.sent(),this.Ga)for(r=0,i=n;r<i.length;r++)o=i[r],this.Ga.removeItem(this.lh(o.clientId));t.label=2;case 2:return[2]}}
2))}))},e.prototype.Ya=function(){var e=this;this.qa=this.fn.Vn("client_metadata_refresh",4e3,(function(){return e.za().then((function(){return e.ah()})).then((function(){return e.Ya()}))}))},e.prototype.rh=function(e){return!!e&&e.ownerId===this.clientId},e.prototype.nh=function(e){var t=this;return this.Oa?Xn.resolve(!0):Gi(e).get(wi.key).next((function(n){if(null!==n&&t.hh(n.leaseTimestampMs,5e3)&&!t._h(n.ownerId)){if(t.rh(n)&&t.networkEnabled)return!0;if(!t.rh(n)){if(!n.allowTabSynchronization)throw new c(u.FAILED_PRECONDITION,Wi);return!1}}return!(!t.networkEnabled||!t.inForeground)||Ki(e).ts().next((function(e){return void 0===t.uh(e,5e3).find((function(e){if(t.clientId!==e.clientId){var n=!t.networkEnabled&&e.networkEnabled,r=!t.inForeground&&e.inForeground,i=t.networkEnabled===e.networkEnabled;if(n||r&&i)return!0}return!1}))}))})).next((function(e){return t.isPrimary!==e&&h("IndexedDbPersistence","Client "+(e?"is":"is not")+" eligible for a primary lease."),e}))},e.prototype.Di=function(){return Object(t.b)(this,void 0,void 0,(function(){var e=this;return Object(t.d)(this,(function(t){switch(t.label){case 0:return this.$a=!1,this.fh(),this.qa&&(this.qa.cancel(),this.qa=null),this.dh(),this.wh(),[4,this.Wa.runTransaction("shutdown","readwrite",[wi.store,Mi.store],(function(t){var n=new zi(t,wr.ai);return e.sh(n).next((function(){return e.oh(n)}))}))];case 1:return t.sent(),this.Wa.close(),this.Eh(),[2]}}))}))},e.prototype.uh=function(e,t){var n=this;return e.filter((function(e){return n.hh(e.updateTimeMs,t)&&!n._h(e.clientId)}))},e.prototype.pi=function(){var e=this;return this.runTransaction("getActiveClients","readonly",(function(t){return Ki(t).ts().next((function(t){return e.uh(t,18e5).map((function(e){return e.clientId}))}))}))},Object.defineProperty(e.prototype,"Ii",{get:function(){return this.$a},enumerable:!1,configurable:!0}),e.prototype.Th=function(e){return oi.Fo(e,this.serializer,this.Dr,this.No)},e.prototype.Ih=function(){return this.ja},e.prototype.mh=function(){return this.vr},e.prototype.Ah=function(){return this.Dr},e.prototype.runTransaction=function(e,t,n){var r=this;h("IndexedDbPersistence","Starting transaction:",e);var i,o="readonly"===t?"readonly":"readwrite";return this.Wa.runTransaction(e,o,Ni,(function(o){return i=new zi(o,r.Ma?r.Ma.next():wr.ai),"readwrite-primary"===t?r.eh(i).next((function(e){return!!e||r.nh(i)})).next((function(t){if(!t)throw d("Failed to obtain primary lease for action '"+e+"'."),r.isPrimary=!1,r.fn.Cs((function(){return r.Ka(!1)})),new c(u.FAILED_PRECONDITION,Nr);return n(i)})).next((function(e){return r.ih(i).next((function(){return e}))})):r.Rh(i).next((function(){return n(i)}))})).then((function(e){return i.br(),e}))},e.prototype.Rh=function(e){var t=this;return Gi(e).get(wi.key).next((function(e){if(null!==e&&t.hh(e.leaseTimestampMs,5e3)&&!t._h(e.ownerId)&&!t.rh(e)&&!(t.Oa||t.allowTabSynchronization&&e.allowTabSynchronization))throw new c(u.FAILED_PRECONDITION,Wi)}))},e.prototype.ih=function(e){var t=new wi(this.clientId,this.allowTabSynchronization,Date.now());return Gi(e).put(wi.key,t)},e.Ln=function(){return Jn.Ln()},e.prototype.sh=function(e){var t=this,n=Gi(e);return n.get(wi.key).next((function(e){return t.rh(e)?(h("IndexedDbPersistence","Releasing primary lease."),n.delete(wi.key)):Xn.resolve()}))},e.prototype.hh=function(e,t){var n=Date.now();return!(e<n-t||e>n&&(d("Detected an update time that is in the future: "+e+" > "+n),1))},e.prototype.Ha=function(){var e=this;null!==this.document&&"function"==typeof this.document.addEventListener&&(this.Ba=function(){e.fn.ws((function(){return e.inForeground="visible"===e.document.visibilityState,e.za()}))},this.document.addEventListener("visibilitychange",this.Ba),this.inForeground="visible"===this.document.visibilityState)},e.prototype.dh=function(){this.Ba&&(this.document.removeEventListener("visibilitychange",this.Ba),this.Ba=null)},e.prototype.Ja=function(){var e,t=this;"function"==typeof(null===(e=this.window)||void 0===e?void 0:e.addEventListener)&&(this.La=function(){t.fh(),t.fn.ws((function(){return t.Di()}))},this.window.addEventListener("unload",this.La))},e.prototype.wh=function(){this.La&&(this.window.removeEventListener("unload",this.La),this.La=null)},e.prototype._h=function(e){var t;try{var n=null!==(null===(t=this.Ga)||void 0===t?void 0:t.getItem(this.lh(e)));return h("IndexedDbPersistence","Client '"+e+"' "+(n?"is":"is not")+" zombied in LocalStorage"),n}catch(e){return d("IndexedDbPersistence","Failed to get zombied client id.",e),!1}},e.prototype.fh=function(){if(this.Ga)try{this.Ga.setItem(this.lh(this.clientId),String(Date.now()))}catch(e){d("Failed to set zombie client id.",e)}},e.prototype.Eh=function(){if(this.Ga)try{this.Ga.removeItem(this.lh(this.clientId))}catch(e){}},e.prototype.lh=function(e){return"firestore_zombie_"+this.persistenceKey+"_"+e},e}();function Gi(e){return Hi.Kn(e,wi.store)}function Ki(e){return Hi.Kn(e,Mi.store)}var Yi=function(){function e(e,t){this.db=e,this.wo=new zr(this,t)}return e.prototype.Po=function(e){var t=this.Ph(e);return this.db.Ih().ba(e).next((function(e){return t.next((function(t){return e+t}))}))},e.prototype.Ph=function(e){var t=0;return this.yo(e,(function(e){t++})).next((function(){return t}))},e.prototype.Ce=function(e,t){return this.db.Ih().Ce(e,t)},e.prototype.yo=function(e,t){return this.gh(e,(function(e,n){return t(n)}))},e.prototype.Da=function(e,t,n){return Qi(e,n)},e.prototype.Na=function(e,t,n){return Qi(e,n)}
2,e.prototype.po=function(e,t,n){return this.db.Ih().po(e,t,n)},e.prototype.Go=function(e,t){return Qi(e,t)},e.prototype.Vh=function(e,t){return function(e,t){var n=!1;return li(e).os((function(r){return ai(e,r,t).next((function(e){return e&&(n=!0),Xn.resolve(!e)}))})).next((function(){return n}))}(e,t)},e.prototype.bo=function(e,t){var n=this,r=this.db.mh().ra(),i=[],o=0;return this.gh(e,(function(a,s){if(s<=t){var u=n.Vh(e,a).next((function(t){if(!t)return o++,r.Rr(e,a).next((function(){return r.Ar(a),qi(e).delete([0,Hr(a.path)])}))}));i.push(u)}})).next((function(){return Xn.kn(i)})).next((function(){return r.apply(e)})).next((function(){return o}))},e.prototype.removeTarget=function(e,t){var n=t.st(e.Fa);return this.db.Ih().Va(e,n)},e.prototype.yh=function(e,t){return Qi(e,t)},e.prototype.gh=function(e,t){var n,r=qi(e),i=wr.ai;return r.rs({index:Ii.documentTargetsIndex},(function(e,r){var o=e[0],a=(e[1],r.path),s=r.sequenceNumber;0===o?(i!==wr.ai&&t(new B(Yr(n)),i),i=s,n=a):i=wr.ai})).next((function(){i!==wr.ai&&t(new B(Yr(n)),i)}))},e.prototype.So=function(e){return this.db.mh().aa(e)},e}();function Qi(e,t){return qi(e).put(function(e,t){return new Ii(0,Hr(e.path),t)}(t,e.Fa))}function $i(e,t){var n=e.projectId;return e.I||(n+="."+e.database),"firestore/"+t+"/"+n+"/"}var Xi=function(){function e(e,t,n){this.persistence=e,this.ph=t,this.bh=new ne(w),this.Sh=new M((function(e){return K(e)}),Y),this.Dh=L.min(),this.Sr=e.Th(n),this.Ch=e.mh(),this.ja=e.Ih(),this.Nh=new Dr(this.Ch,this.Sr,this.persistence.Ah()),this.ph.xh(this.Nh)}return e.prototype.mo=function(e){var t=this;return this.persistence.runTransaction("Collect garbage","readwrite-primary",(function(n){return e.vo(n,t.bh)}))},e}();function Ji(e,t){var n=g(e);return n.persistence.runTransaction("Acknowledge batch","readwrite-primary",(function(e){var r=t.batch.keys(),i=n.Ch.ra({oa:!0});return function(e,t,n,r){var i=n.batch,o=i.keys(),a=Xn.resolve();return o.forEach((function(e){a=a.next((function(){return r.Rr(t,e)})).next((function(t){var o=t,a=n.dr.get(e);m(null!==a),(!o||o.version.h(a)<0)&&(o=i.hr(e,o,n))&&r.Ir(o,n._r)}))})),a.next((function(){return e.Sr.Qo(t,i)}))}(n,e,t,i).next((function(){return i.apply(e)})).next((function(){return n.Sr.zo(e)})).next((function(){return n.Nh.Or(e,r)}))}))}function Zi(e){var t=g(e);return t.persistence.runTransaction("Get last remote snapshot version","readonly",(function(e){return t.ja.Ia(e)}))}function eo(e,t){var n=g(e),r=t.nt,i=n.bh;return n.persistence.runTransaction("Apply remote event","readwrite-primary",(function(e){var o=n.Ch.ra({oa:!0});i=n.bh;var a=[];t.zt.forEach((function(t,o){var s=i.get(o);if(s){a.push(n.ja.Ca(e,t.se,o).next((function(){return n.ja.Sa(e,t.ee,o)})));var u=t.resumeToken;if(u.o()>0){var c=s.it(u,r).st(e.Fa);i=i.ot(o,c),function(e,t,n){return m(t.resumeToken.o()>0),0===e.resumeToken.o()||t.nt.p()-e.nt.p()>=3e8||n.ee.size+n.ne.size+n.se.size>0}(s,c,t)&&a.push(n.ja.Va(e,c))}}}));var s=ue(),u=pe();if(t.Jt.forEach((function(e,t){u=u.add(e)})),a.push(o.getEntries(e,u).next((function(i){t.Jt.forEach((function(u,c){var l=i.get(u);c instanceof dn&&c.version.isEqual(L.min())?(o.Ar(u,r),s=s.ot(u,c)):null==l||c.version.h(l.version)>0||0===c.version.h(l.version)&&l.hasPendingWrites?(o.Ir(c,r),s=s.ot(u,c)):h("LocalStore","Ignoring outdated watch update for ",u,". Current version:",l.version," Watch version:",c.version),t.Yt.has(u)&&a.push(n.persistence.No.yh(e,u))}))}))),!r.isEqual(L.min())){var c=n.ja.Ia(e).next((function(t){return n.ja.Aa(e,e.Fa,r)}));a.push(c)}return Xn.kn(a).next((function(){return o.apply(e)})).next((function(){return n.Nh.Mr(e,s)}))})).then((function(e){return n.bh=i,e}))}function to(e,t){var n=g(e);return n.persistence.runTransaction("Get next mutation batch","readonly",(function(e){return void 0===t&&(t=-1),n.Sr.Bo(e,t)}))}function no(e,t){var n=g(e);return n.persistence.runTransaction("Allocate target","readwrite",(function(e){var r;return n.ja.va(e,t).next((function(i){return i?(r=i,Xn.resolve(r)):n.ja.wa(e).next((function(i){return r=new J(t,i,0,e.Fa),n.ja.Ra(e,r).next((function(){return r}))}))}))})).then((function(e){var r=n.bh.get(e.targetId);return(null===r||e.nt.h(r.nt)>0)&&(n.bh=n.bh.ot(e.targetId,e),n.Sh.set(t,e.targetId)),e}))}function ro(e,n,r){return Object(t.b)(this,void 0,void 0,(function(){var i,o,a,s;return Object(t.d)(this,(function(t){switch(t.label){case 0:i=g(e),o=i.bh.get(n),a=r?"readwrite":"readwrite-primary",t.label=1;case 1:return t.trys.push([1,4,,5]),r?[3,3]:[4,i.persistence.runTransaction("Release target",a,(function(e){return i.persistence.No.removeTarget(e,o)}))];case 2:t.sent(),t.label=3;case 3:return[3,5];case 4:if(!tr(s=t.sent()))throw s;return h("LocalStore","Failed to update sequence numbers for target "+n+": "+s),[3,5];case 5:return i.bh=i.bh.remove(n),i.Sh.delete(o.target),[2]}}))}))}function io(e,t,n){var r=g(e),i=L.min(),o=pe();
2return r.persistence.runTransaction("Execute query","readonly",(function(e){return function(e,t,n){var r=g(e),i=r.Sh.get(n);return void 0!==i?Xn.resolve(r.bh.get(i)):r.ja.va(t,n)}(r,e,On(t)).next((function(t){if(t)return i=t.lastLimboFreeSnapshotVersion,r.ja.xa(e,t.targetId).next((function(e){o=e}))})).next((function(){return r.ph.Lr(e,t,n?i:L.min(),n?o:pe())})).next((function(e){return{documents:e,Fh:o}}))}))}function oo(e,t){var n=g(e),r=g(n.ja),i=n.bh.get(t);return i?Promise.resolve(i.target):n.persistence.runTransaction("Get target data","readonly",(function(e){return r.Ue(e,t).next((function(e){return e?e.target:null}))}))}function ao(e){var t=g(e);return t.persistence.runTransaction("Get new document changes","readonly",(function(e){return function(e,t,n){var r=g(e),i=ue(),o=Jr(n),a=pi(t),s=IDBKeyRange.lowerBound(o,!0);return a.rs({index:Ci.readTimeIndex,range:s},(function(e,t){var n=$r(r.serializer,t);i=i.ot(n.key,n),o=t.readTime})).next((function(){return{kh:i,readTime:Zr(o)}}))}(t.Ch,e,t.Dh)})).then((function(e){var n=e.kh,r=e.readTime;return t.Dh=r,n}))}function so(e){return Object(t.b)(this,void 0,void 0,(function(){var n;return Object(t.d)(this,(function(t){return[2,(n=g(e)).persistence.runTransaction("Synchronize last document change read time","readonly",(function(e){return function(e){var t=pi(e),n=L.min();return t.rs({index:Ci.readTimeIndex,reverse:!0},(function(e,t,r){t.readTime&&(n=Zr(t.readTime)),r.done()})).next((function(){return n}))}(e)})).then((function(e){n.Dh=e}))]}))}))}function uo(e){return Object(t.b)(this,void 0,void 0,(function(){return Object(t.d)(this,(function(t){if(e.code!==u.FAILED_PRECONDITION||e.message!==Nr)throw e;return h("LocalStore","Unexpectedly lost primary lease"),[2]}))}))}var co=function(){function e(){this.Oh=new oe(lo.Mh),this.$h=new oe(lo.Lh)}return e.prototype.P=function(){return this.Oh.P()},e.prototype.Da=function(e,t){var n=new lo(e,t);this.Oh=this.Oh.add(n),this.$h=this.$h.add(n)},e.prototype.Bh=function(e,t){var n=this;e.forEach((function(e){return n.Da(e,t)}))},e.prototype.Na=function(e,t){this.qh(new lo(e,t))},e.prototype.Uh=function(e,t){var n=this;e.forEach((function(e){return n.Na(e,t)}))},e.prototype.Kh=function(e){var t=this,n=new B(new F([])),r=new lo(n,e),i=new lo(n,e+1),o=[];return this.$h.xt([r,i],(function(e){t.qh(e),o.push(e.key)})),o},e.prototype.Qh=function(){var e=this;this.Oh.forEach((function(t){return e.qh(t)}))},e.prototype.qh=function(e){this.Oh=this.Oh.delete(e),this.$h=this.$h.delete(e)},e.prototype.Wh=function(e){var t=new B(new F([])),n=new lo(t,e),r=new lo(t,e+1),i=pe();return this.$h.xt([n,r],(function(e){i=i.add(e.key)})),i},e.prototype.Ho=function(e){var t=new lo(e,0),n=this.Oh.kt(t);return null!==n&&e.isEqual(n.key)},e}(),lo=function(){function e(e,t){this.key=e,this.jh=t}return e.Mh=function(e,t){return B.D(e.key,t.key)||w(e.jh,t.jh)},e.Lh=function(e,t){return w(e.jh,t.jh)||B.D(e.key,t.key)},e}(),fo=function(e,t){this.user=t,this.type="OAuth",this.Gh={},this.Gh.Authorization="Bearer "+e},ho=function(){function e(){this.zh=null}return e.prototype.getToken=function(){return Promise.resolve(null)},e.prototype.Hh=function(){},e.prototype.Jh=function(e){this.zh=e,e(_r.UNAUTHENTICATED)},e.prototype.Yh=function(){this.zh=null},e}(),po=function(){function e(e){var t=this;this.Xh=null,this.currentUser=_r.UNAUTHENTICATED,this.Zh=!1,this.tc=0,this.zh=null,this.forceRefresh=!1,this.Xh=function(){t.tc++,t.currentUser=t.ec(),t.Zh=!0,t.zh&&t.zh(t.currentUser)},this.tc=0,this.auth=e.getImmediate({optional:!0}),this.auth?this.auth.addAuthTokenListener(this.Xh):(this.Xh(null),e.get().then((function(e){t.auth=e,t.Xh&&t.auth.addAuthTokenListener(t.Xh)}),(function(){})))}return e.prototype.getToken=function(){var e=this,t=this.tc,n=this.forceRefresh;return this.forceRefresh=!1,this.auth?this.auth.getToken(n).then((function(n){return e.tc!==t?(h("FirebaseCredentialsProvider","getToken aborted due to token change."),e.getToken()):n?(m("string"==typeof n.accessToken),new fo(n.accessToken,e.currentUser)):null})):Promise.resolve(null)},e.prototype.Hh=function(){this.forceRefresh=!0},e.prototype.Jh=function(e){this.zh=e,this.Zh&&e(this.currentUser)},e.prototype.Yh=function(){this.auth&&this.auth.removeAuthTokenListener(this.
2Xh),this.Xh=null,this.zh=null},e.prototype.ec=function(){var e=this.auth&&this.auth.getUid();return m(null===e||"string"==typeof e),new _r(e)},e}(),vo=function(){function e(e,t){this.nc=e,this.sc=t,this.type="FirstParty",this.user=_r.ni}return Object.defineProperty(e.prototype,"Gh",{get:function(){var e={"X-Goog-AuthUser":this.sc},t=this.nc.auth.getAuthHeaderValueForFirstParty([]);return t&&(e.Authorization=t),e},enumerable:!1,configurable:!0}),e}(),yo=function(){function e(e,t){this.nc=e,this.sc=t}return e.prototype.getToken=function(){return Promise.resolve(new vo(this.nc,this.sc))},e.prototype.Jh=function(e){e(_r.ni)},e.prototype.Yh=function(){},e.prototype.Hh=function(){},e}(),mo=function(){function e(e,t,n,r,i,o){this.fn=e,this.ic=n,this.rc=r,this.oc=i,this.listener=o,this.state=0,this.ac=0,this.hc=null,this.stream=null,this.Vs=new $n(e,t)}return e.prototype.cc=function(){return 1===this.state||2===this.state||4===this.state},e.prototype.uc=function(){return 2===this.state},e.prototype.start=function(){3!==this.state?this.auth():this.lc()},e.prototype.stop=function(){return Object(t.b)(this,void 0,void 0,(function(){return Object(t.d)(this,(function(e){switch(e.label){case 0:return this.cc()?[4,this.close(0)]:[3,2];case 1:e.sent(),e.label=2;case 2:return[2]}}
2))}))},e.prototype._c=function(){this.state=0,this.Vs.reset()},e.prototype.fc=function(){var e=this;this.uc()&&null===this.hc&&(this.hc=this.fn.Vn(this.ic,6e4,(function(){return e.dc()})))},e.prototype.wc=function(e){this.Ec(),this.stream.send(e)},e.prototype.dc=function(){return Object(t.b)(this,void 0,void 0,(function(){return Object(t.d)(this,(function(e){return this.uc()?[2,this.close(0)]:[2]}))}))},e.prototype.Ec=function(){this.hc&&(this.hc.cancel(),this.hc=null)},e.prototype.close=function(e,n){return Object(t.b)(this,void 0,void 0,(function(){return Object(t.d)(this,(function(t){switch(t.label){case 0:return this.Ec(),this.Vs.cancel(),this.ac++,3!==e?this.Vs.reset():n&&n.code===u.RESOURCE_EXHAUSTED?(d(n.toString()),d("Using maximum backoff delay to prevent overloading the backend."),this.Vs.Rn()):n&&n.code===u.UNAUTHENTICATED&&this.oc.Hh(),null!==this.stream&&(this.Tc(),this.stream.close(),this.stream=null),this.state=e,[4,this.listener.Ic(n)];case 1:return t.sent(),[2]}}))}))},e.prototype.Tc=function(){},e.prototype.auth=function(){var e=this;this.state=1;var t=this.mc(this.ac),n=this.ac;this.oc.getToken().then((function(t){e.ac===n&&e.Ac(t)}),(function(n){t((function(){var t=new c(u.UNKNOWN,"Fetching auth token failed: "+n.message);return e.Rc(t)}))}))},e.prototype.Ac=function(e){var t=this,n=this.mc(this.ac);this.stream=this.Pc(e),this.stream.gc((function(){n((function(){return t.state=2,t.listener.gc()}))})),this.stream.Ic((function(e){n((function(){return t.Rc(e)}))})),this.stream.onMessage((function(e){n((function(){return t.onMessage(e)}))}))},e.prototype.lc=function(){var e=this;this.state=4,this.Vs.Pn((function(){return Object(t.b)(e,void 0,void 0,(function(){return Object(t.d)(this,(function(e){return this.state=0,this.start(),[2]}))}))}))},e.prototype.Rc=function(e){return h("PersistentStream","close with error: "+e),this.stream=null,this.close(3,e)},e.prototype.mc=function(e){var t=this;return function(n){t.fn.ws((function(){return t.ac===e?n():(h("PersistentStream","stream callback skipped by getCloseGuardedDispatcher."),Promise.resolve())}))}},e}(),go=function(e){function n(t,n,r,i,o){var a=this;return(a=e.call(this,t,"listen_stream_connection_backoff","listen_stream_idle",n,r,o)||this).serializer=i,a}return Object(t.c)(n,e),n.prototype.Pc=function(e){return this.rc.Vc("Listen",e)},n.prototype.onMessage=function(e){this.Vs.reset();var t=function(e,t){var n;if("targetChange"in t){t.targetChange;var r=function(e){return"NO_CHANGE"===e?0:"ADD"===e?1:"REMOVE"===e?2:"CURRENT"===e?3:"RESET"===e?4:y()}(t.targetChange.targetChangeType||"NO_CHANGE"),i=t.targetChange.targetIds||[],o=function(e,t){return e.Ke?(m(void 0===t||"string"==typeof t),O.fromBase64String(t||"")):(m(void 0===t||t instanceof Uint8Array),O.fromUint8Array(t||new Uint8Array))}(e,t.targetChange.resumeToken),a=t.targetChange.cause,s=a&&function(e){var t=void 0===e.code?u.UNKNOWN:te(e.code);return new c(t,e.message||"")}(a);n=new Oe(r,i,o,s||null)}else if("documentChange"in t){t.documentChange;var l=t.documentChange;l.document,l.document.name,l.document.updateTime;var f=ut(e,l.document.name),h=it(l.document.updateTime),d=new un({mapValue:{fields:l.document.fields}}),p=new hn(f,h,d,{}),v=l.targetIds||[],g=l.removedTargetIds||[];n=new ke(v,g,p.key,p)}else if("documentDelete"in t){t.documentDelete;var b=t.documentDelete;b.document;var _=ut(e,b.document),w=b.readTime?it(b.readTime):L.min(),k=new dn(_,w),S=b.removedTargetIds||[];n=new ke([],S,k.key,k)}else if("documentRemove"in t){t.documentRemove;var E=t.documentRemove;E.document;var T=ut(e,E.document),C=E.removedTargetIds||[];n=new ke([],C,T,null)}else{if(!("filter"in t))return y();t.filter;var P=t.filter;P.targetId;var x=P.count||0,I=new Z(x),j=P.targetId;n=new Se(j,I)}return n}(this.serializer,e),n=function(e){if(!("targetChange"in e))return L.min();var t=e.targetChange;return t.targetIds&&t.targetIds.length?L.min():t.readTime?it(t.readTime):L.min()}(e);return this.listener.yc(t,n)},n.prototype.bc=function(e){var t={};t.database=ft(this.serializer),t.addTarget=function(e,t){var n,r=t.target;return(n=Q(r)?{documents:yt(e,r)}:{query:mt(e,r)}).targetId=t.targetId,t.resumeToken.o()>0&&(n.resumeToken=nt(e,t.resumeToken)),n}(this.serializer,e);var n=function(e,t){var n=function(e,t){switch(t){case 0:return null;case 1:return"existence-filter-mismatch";case 2:return"limbo-document";default:return y()}}(0,t.et);return null==n?null:{"goog-listen-tags":n}}(this.serializer,e);n&&(t.labels=n),this.wc(t)},n.prototype.vc=function(e){var t={};t.database=ft(this.serializer),t.removeTarget=e,this.wc(t)},n}(mo),bo=function(e){function n(t,n,r,i,o){var a=this;return(a=e.call(this,t,"write_stream_connection_backoff","write_stream_idle",n,r,o)||this).serializer
2=i,a.Sc=!1,a}return Object(t.c)(n,e),Object.defineProperty(n.prototype,"Dc",{get:function(){return this.Sc},enumerable:!1,configurable:!0}),n.prototype.start=function(){this.Sc=!1,this.lastStreamToken=void 0,e.prototype.start.call(this)},n.prototype.Tc=function(){this.Sc&&this.Cc([])},n.prototype.Pc=function(e){return this.rc.Vc("Write",e)},n.prototype.onMessage=function(e){if(m(!!e.streamToken),this.lastStreamToken=e.streamToken,this.Sc){this.Vs.reset();var t=function(e,t){return e&&e.length>0?(m(void 0!==t),e.map((function(e){return function(e,t){var n=e.updateTime?it(e.updateTime):it(t);n.isEqual(L.min())&&(n=it(t));var r=null;return e.transformResults&&e.transformResults.length>0&&(r=e.transformResults),new zt(n,r)}(e,t)}))):[]}(e.writeResults,e.commitTime),n=it(e.commitTime);return this.listener.Nc(n,t)}return m(!e.writeResults||0===e.writeResults.length),this.Sc=!0,this.listener.xc()},n.prototype.Fc=function(){var e={};e.database=ft(this.serializer),this.wc(e)},n.prototype.Cc=function(e){var t=this,n={streamToken:this.lastStreamToken,writes:e.map((function(e){return pt(t.serializer,e)}))};this.wc(n)},n}(mo),_o=function(e){function n(t,n,r){var i=this;return(i=e.call(this)||this).credentials=t,i.rc=n,i.serializer=r,i.kc=!1,i}return Object(t.c)(n,e),n.prototype.Oc=function(){if(this.kc)throw new c(u.FAILED_PRECONDITION,"The client has already been terminated.")},n.prototype.Mc=function(e,t,n){var r=this;return this.Oc(),this.credentials.getToken().then((function(i){return r.rc.Mc(e,t,n,i)})).catch((function(e){throw e.code===u.UNAUTHENTICATED&&r.credentials.Hh(),e}))},n.prototype.$c=function(e,t,n){var r=this;return this.Oc(),this.credentials.getToken().then((function(i){return r.rc.$c(e,t,n,i)})).catch((function(e){throw e.code===u.UNAUTHENTICATED&&r.credentials.Hh(),e}))},n.prototype.terminate=function(){this.kc=!1},n}((function(){})),wo=function(){function e(e,t){this.hs=e,this.di=t,this.state="Unknown",this.Lc=0,this.Bc=null,this.qc=!0}return e.prototype.Uc=function(){var e=this;0===this.Lc&&(this.Kc("Unknown"),this.Bc=this.hs.Vn("online_state_timeout",1e4,(function(){return e.Bc=null,e.Qc("Backend didn't respond within 10 seconds."),e.Kc("Offline"),Promise.resolve()})))},e.prototype.Wc=function(e){"Online"===this.state?this.Kc("Unknown"):(this.Lc++,this.Lc>=1&&(this.jc(),this.Qc("Connection failed 1 times. Most recent error: "+e.toString()),this.Kc("Offline")))},e.prototype.set=function(e){this.jc(),this.Lc=0,"Online"===e&&(this.qc=!1),this.Kc(e)},e.prototype.Kc=function(e){e!==this.state&&(this.state=e,this.di(e))},e.prototype.Qc=function(e){var t="Could not reach Cloud Firestore backend. "+e+"\nThis typically indicates that your device does not have a healthy Internet connection at the moment. The client will operate in offline mode until it is able to successfully connect to the backend.";this.qc?(d(t),this.qc=!1):h("OnlineStateTracker",t)},e.prototype.jc=function(){null!==this.Bc&&(this.Bc.cancel(),this.Bc=null)},e}(),ko=function(e,n,r,i,o){var a=this;this.Gc=e,this.zc=n,this.hs=r,this.Hc={},this.Jc=[],this.Yc=new Map,this.Xc=new Set,this.Zc=[],this.tu=o,this.tu.eu((function(e){r.ws((function(){return Object(t.b)(a,void 0,void 0,(function(){return Object(t.d)(this,(function(e){switch(e.label){case 0:return Ro(this)?(h("RemoteStore","Restarting streams for network reachability change."),[4,function(e){return Object(t.b)(this,void 0,void 0,(function(){var n;return Object(t.d)(this,(function(t){switch(t.label){case 0:return(n=g(e)).Xc.add(4),[4,Oo(n)];case 1:return t.sent(),n.nu.set("Unknown"),n.Xc.delete(4),[4,So(n)];case 2:return t.sent(),[2]}}))}))}(this)]):[3,2];case 1:e.sent(),e.label=2;case 2:return[2]}}
2))}))}))})),this.nu=new wo(r,i)};function So(e){return Object(t.b)(this,void 0,void 0,(function(){var n,r;return Object(t.d)(this,(function(t){switch(t.label){case 0:if(!Ro(e))return[3,4];n=0,r=e.Zc,t.label=1;case 1:return n<r.length?[4,(0,r[n])(!0)]:[3,4];case 2:t.sent(),t.label=3;case 3:return n++,[3,1];case 4:return[2]}}))}))}function Oo(e){return Object(t.b)(this,void 0,void 0,(function(){var n,r;return Object(t.d)(this,(function(t){switch(t.label){case 0:n=0,r=e.Zc,t.label=1;case 1:return n<r.length?[4,(0,r[n])(!1)]:[3,4];case 2:t.sent(),t.label=3;case 3:return n++,[3,1];case 4:return[2]}}))}))}function Eo(e){return Object(t.b)(this,void 0,void 0,(function(){var n;return Object(t.d)(this,(function(t){switch(t.label){case 0:return n=g(e),h("RemoteStore","RemoteStore shutting down."),n.Xc.add(5),[4,Oo(n)];case 1:return t.sent(),n.tu.Di(),n.nu.set("Unknown"),[2]}}))}))}function To(e,t){var n=g(e);n.Yc.has(t.targetId)||(n.Yc.set(t.targetId,t),jo(n)?Io(n):Ko(n).uc()&&Po(n,t))}function Co(e,t){var n=g(e),r=Ko(n);n.Yc.delete(t),r.uc()&&xo(n,t),0===n.Yc.size&&(r.uc()?r.fc():Ro(n)&&n.nu.set("Unknown"))}function Po(e,t){e.su.me(t.targetId),Ko(e).bc(t)}function xo(e,t){e.su.me(t),Ko(e).vc(t)}function Io(e){e.su=new Te({qe:function(t){return e.Hc.qe(t)},Ue:function(t){return e.Yc.get(t)||null}}),Ko(e).start(),e.nu.Uc()}function jo(e){return Ro(e)&&!Ko(e).cc()&&e.Yc.size>0}function Ro(e){return 0===g(e).Xc.size}function Ao(e){e.su=void 0}function Mo(e){return Object(t.b)(this,void 0,void 0,(function(){return Object(t.d)(this,(function(t){return e.Yc.forEach((function(t,n){Po(e,t)})),[2]}))}))}function No(e,n){return Object(t.b)(this,void 0,void 0,(function(){return Object(t.d)(this,(function(t){return Ao(e),jo(e)?(e.nu.Wc(n),Io(e)):e.nu.set("Unknown"),[2]}))}))}function Lo(e,n,r){return Object(t.b)(this,void 0,void 0,(function(){var i,o,a;return Object(t.d)(this,(function(s){switch(s.label){case 0:if(e.nu.set("Online"),!(n instanceof Oe&&2===n.state&&n.cause))return[3,6];s.label=1;case 1:return s.trys.push([1,3,,5]),[4,function(e,n){return Object(t.b)(this,void 0,void 0,(function(){var r,i,o,a;return Object(t.d)(this,(function(t){switch(t.label){case 0:r=n.cause,i=0,o=n.targetIds,t.label=1;case 1:return i<o.length?(a=o[i],e.Yc.has(a)?[4,e.Hc.iu(a,r)]:[3,3]):[3,5];case 2:t.sent(),e.Yc.delete(a),e.su.removeTarget(a),t.label=3;case 3:t.label=4;case 4:return i++,[3,1];case 5:return[2]}}
2))}))}(e,n)];case 2:return s.sent(),[3,5];case 3:return i=s.sent(),h("RemoteStore","Failed to remove targets %s: %s ",n.targetIds.join(","),i),[4,Do(e,i)];case 4:return s.sent(),[3,5];case 5:return[3,13];case 6:if(n instanceof ke?e.su.be(n):n instanceof Se?e.su.ke(n):e.su.De(n),r.isEqual(L.min()))return[3,13];s.label=7;case 7:return s.trys.push([7,11,,13]),[4,Zi(e.Gc)];case 8:return o=s.sent(),r.h(o)>=0?[4,function(e,t){var n=e.su.$e(t);return n.zt.forEach((function(n,r){if(n.resumeToken.o()>0){var i=e.Yc.get(r);i&&e.Yc.set(r,i.it(n.resumeToken,t))}})),n.Ht.forEach((function(t){var n=e.Yc.get(t);if(n){e.Yc.set(t,n.it(O.u,n.nt)),xo(e,t);var r=new J(n.target,t,1,n.sequenceNumber);Po(e,r)}})),e.Hc.ru(n)}(e,r)]:[3,10];case 9:s.sent(),s.label=10;case 10:return[3,13];case 11:return h("RemoteStore","Failed to raise snapshot:",a=s.sent()),[4,Do(e,a)];case 12:return s.sent(),[3,13];case 13:return[2]}}))}))}function Do(e,n,r){return Object(t.b)(this,void 0,void 0,(function(){var i=this;return Object(t.d)(this,(function(o){switch(o.label){case 0:if(!tr(n))throw n;return e.Xc.add(1),[4,Oo(e)];case 1:return o.sent(),e.nu.set("Offline"),r||(r=function(){return Zi(e.Gc)}),e.hs.Cs((function(){return Object(t.b)(i,void 0,void 0,(function(){return Object(t.d)(this,(function(t){switch(t.label){case 0:return h("RemoteStore","Retrying IndexedDB access"),[4,r()];case 1:return t.sent(),e.Xc.delete(1),[4,So(e)];case 2:return t.sent(),[2]}}))}))})),[2]}}))}))}function Fo(e,t){return t().catch((function(n){return Do(e,n,t)}))}function Uo(e){return Object(t.b)(this,void 0,void 0,(function(){var n,r,i,o,a;return Object(t.d)(this,(function(t){switch(t.label){case 0:n=g(e),r=Yo(n),i=n.Jc.length>0?n.Jc[n.Jc.length-1].batchId:-1,t.label=1;case 1:if(!function(e){return Ro(e)&&e.Jc.length<10}(n))return[3,7];t.label=2;case 2:return t.trys.push([2,4,,6]),[4,to(n.Gc,i)];case 3:return null===(o=t.sent())?(0===n.Jc.length&&r.fc(),[3,7]):(i=o.batchId,function(e,t){e.Jc.push(t);var n=Yo(e);n.uc()&&n.Dc&&n.Cc(t.mutations)}(n,o),[3,6]);case 4:return a=t.sent(),[4,Do(n,a)];case 5:return t.sent(),[3,6];case 6:return[3,1];case 7:return Vo(n)&&Bo(n),[2]}}))}))}function Vo(e){return Ro(e)&&!Yo(e).cc()&&e.Jc.length>0}function Bo(e){Yo(e).start()}function qo(e){return Object(t.b)(this,void 0,void 0,(function(){return Object(t.d)(this,(function(t){return Yo(e).Fc(),[2]}))}))}function Wo(e){return Object(t.b)(this,void 0,void 0,(function(){var n,r,i,o;return Object(t.d)(this,(function(t){for(n=Yo(e),r=0,i=e.Jc;r<i.length;r++)o=i[r],n.Cc(o.mutations);return[2]}))}))}function zo(e,n,r){return Object(t.b)(this,void 0,void 0,(function(){var i,o;return Object(t.d)(this,(function(t){switch(t.label){case 0:return i=e.Jc.shift(),o=Ar.from(i,n,r),[4,Fo(e,(function(){return e.Hc.ou(o)}))];case 1:return t.sent(),[4,Uo(e)];case 2:return t.sent(),[2]}}))}))}function Ho(e,n){return Object(t.b)(this,void 0,void 0,(function(){return Object(t.d)(this,(function(r){switch(r.label){case 0:return n&&Yo(e).Dc?[4,function(e,n){return Object(t.b)(this,void 0,void 0,(function(){var r,i;return Object(t.d)(this,(function(t){switch(t.label){case 0:return ee(i=n.code)&&i!==u.ABORTED?(r=e.Jc.shift(),Yo(e)._c(),[4,Fo(e,(function(){return e.Hc.au(r.batchId,n)}))]):[3,3];case 1:return t.sent(),[4,Uo(e)];case 2:t.sent(),t.label=3;case 3:return[2]}}
2))}))}(e,n)]:[3,2];case 1:r.sent(),r.label=2;case 2:return Vo(e)&&Bo(e),[2]}}))}))}function Go(e,n){return Object(t.b)(this,void 0,void 0,(function(){var r;return Object(t.d)(this,(function(t){switch(t.label){case 0:return r=g(e),n?(r.Xc.delete(2),[4,So(r)]):[3,2];case 1:return t.sent(),[3,5];case 2:return n?[3,4]:(r.Xc.add(2),[4,Oo(r)]);case 3:t.sent(),r.nu.set("Unknown"),t.label=4;case 4:t.label=5;case 5:return[2]}}))}))}function Ko(e){var n=this;return e.hu||(e.hu=function(e,t,n){var r=g(e);return r.Oc(),new go(t,r.rc,r.credentials,r.serializer,n)}(e.zc,e.hs,{gc:Mo.bind(null,e),Ic:No.bind(null,e),yc:Lo.bind(null,e)}),e.Zc.push((function(r){return Object(t.b)(n,void 0,void 0,(function(){return Object(t.d)(this,(function(t){switch(t.label){case 0:return r?(e.hu._c(),jo(e)?Io(e):e.nu.set("Unknown"),[3,3]):[3,1];case 1:return[4,e.hu.stop()];case 2:t.sent(),Ao(e),t.label=3;case 3:return[2]}}))}))}))),e.hu}function Yo(e){var n=this;return e.cu||(e.cu=function(e,t,n){var r=g(e);return r.Oc(),new bo(t,r.rc,r.credentials,r.serializer,n)}(e.zc,e.hs,{gc:qo.bind(null,e),Ic:Ho.bind(null,e),xc:Wo.bind(null,e),Nc:zo.bind(null,e)}),e.Zc.push((function(r){return Object(t.b)(n,void 0,void 0,(function(){return Object(t.d)(this,(function(t){switch(t.label){case 0:return r?(e.cu._c(),[4,Uo(e)]):[3,2];case 1:return t.sent(),[3,4];case 2:return[4,e.cu.stop()];case 3:t.sent(),e.Jc.length>0&&(h("RemoteStore","Stopping write stream with "+e.Jc.length+" pending writes"),e.Jc=[]),t.label=4;case 4:return[2]}}
2))}))}))),e.cu}var Qo=function(e){this.key=e},$o=function(e){this.key=e},Xo=function(){function e(e,t){this.query=e,this.uu=t,this.lu=null,this.te=!1,this._u=pe(),this.Qt=pe(),this.fu=Rn(e),this.du=new me(this.fu)}return Object.defineProperty(e.prototype,"wu",{get:function(){return this.uu},enumerable:!1,configurable:!0}),e.prototype.Eu=function(e,t){var n=this,r=t?t.Tu:new ge,i=t?t.du:this.du,o=t?t.Qt:this.Qt,a=i,s=!1,u=gn(this.query)&&i.size===this.query.limit?i.last():null,c=bn(this.query)&&i.size===this.query.limit?i.first():null;if(e.ut((function(e,t){var l=i.get(e),f=t instanceof hn?t:null;f&&(f=jn(n.query,f)?f:null);var h=!!l&&n.Qt.has(l.key),d=!!f&&(f.Ye||n.Qt.has(f.key)&&f.hasCommittedMutations),p=!1;l&&f?l.data().isEqual(f.data())?h!==d&&(r.track({type:3,doc:f}),p=!0):n.Iu(l,f)||(r.track({type:2,doc:f}),p=!0,(u&&n.fu(f,u)>0||c&&n.fu(f,c)<0)&&(s=!0)):!l&&f?(r.track({type:0,doc:f}),p=!0):l&&!f&&(r.track({type:1,doc:l}),p=!0,(u||c)&&(s=!0)),p&&(f?(a=a.add(f),o=d?o.add(e):o.delete(e)):(a=a.delete(e),o=o.delete(e)))})),gn(this.query)||bn(this.query))for(;a.size>this.query.limit;){var l=gn(this.query)?a.last():a.first();a=a.delete(l.key),o=o.delete(l.key),r.track({type:1,doc:l})}return{du:a,Tu:r,mu:s,Qt:o}},e.prototype.Iu=function(e,t){return e.Ye&&t.hasCommittedMutations&&!t.Ye},e.prototype.Vr=function(e,t,n){var r=this,i=this.du;this.du=e.du,this.Qt=e.Qt;var o=e.Tu.Ut();o.sort((function(e,t){return function(e,t){var n=function(e){switch(e){case 0:return 1;case 2:case 3:return 2;case 1:return 0;default:return y()}};return n(e)-n(t)}(e.type,t.type)||r.fu(e.doc,t.doc)})),this.Au(n);var a=t?this.Ru():[],s=0===this._u.size&&this.te?1:0,u=s!==this.lu;return this.lu=s,0!==o.length||u?{snapshot:new be(this.query,e.du,i,o,e.Qt,0===s,u,!1),Pu:a}:{Pu:a}},e.prototype.Ks=function(e){return this.te&&"Offline"===e?(this.te=!1,this.Vr({du:this.du,Tu:new ge,Qt:this.Qt,mu:!1},!1)):{Pu:[]}},e.prototype.gu=function(e){return!this.uu.has(e)&&!!this.du.has(e)&&!this.du.get(e).Ye},e.prototype.Au=function(e){var t=this;e&&(e.ee.forEach((function(e){return t.uu=t.uu.add(e)})),e.ne.forEach((function(e){})),e.se.forEach((function(e){return t.uu=t.uu.delete(e)})),this.te=e.te)},e.prototype.Ru=function(){var e=this;if(!this.te)return[];var t=this._u;this._u=pe(),this.du.forEach((function(t){e.gu(t.key)&&(e._u=e._u.add(t.key))}));var n=[];return t.forEach((function(t){e._u.has(t)||n.push(new $o(t))})),this._u.forEach((function(e){t.has(e)||n.push(new Qo(e))})),n},e.prototype.Vu=function(e){this.uu=e.Fh,this._u=pe();var t=this.Eu(e.documents);return this.Vr(t,!0)},e.prototype.yu=function(){return be.Gt(this.query,this.du,this.Qt,0===this.lu)},e}(),Jo=function(e,t,n){this.query=e,this.targetId=t,this.view=n},Zo=function(e){this.key=e,this.pu=!1},ea=function(){function e(e,t,n,r,i,o){this.Gc=e,this.bu=t,this.vu=n,this.Su=r,this.currentUser=i,this.Du=o,this.Cu={},this.Nu=new M((function(e){return xn(e)}),Pn),this.xu=new Map,this.Fu=[],this.ku=new ne(B.D),this.Ou=new Map,this.Mu=new co,this.$u={},this.Lu=new Map,this.Bu=Fi.da(),this.onlineState="Unknown",this.qu=void 0}return Object.defineProperty(e.prototype,"Uu",{get:function(){return!0===this.qu},enumerable:!1,configurable:!0}),e}();function ta(e,n){return Object(t.b)(this,void 0,void 0,(function(){var r,i,o,a,s,u;return Object(t.d)(this,(function(t){switch(t.label){case 0:return r=Ca(e),(a=r.Nu.get(n))?(i=a.targetId,r.Su.$i(i),o=a.view.yu(),[3,4]):[3,1];case 1:return[4,no(r.Gc,On(n))];case 2:return s=t.sent(),u=r.Su.$i(s.targetId),i=s.targetId,[4,na(r,n,i,"current"===u)];case 3:o=t.sent(),r.Uu&&To(r.bu,s),t.label=4;case 4:return[2,o]}}))}))}function na(e,n,r,i){return Object(t.b)(this,void 0,void 0,(function(){var o,a,s,u,c,l;return Object(t.d)(this,(function(f){switch(f.label){case 0:return e.Ku=function(n,r,i){return function(e,n,r,i){return Object(t.b)(this,void 0,void 0,(function(){var o,a,s;return Object(t.d)(this,(function(t){switch(t.label){case 0:return(o=n.view.Eu(r)).mu?[4,io(e.Gc,n.query,!1).then((function(e){var t=e.documents;return n.view.Eu(t,o)}))]:[3,2];case 1:o=t.sent(),t.label=2;case 2:return a=i&&i.zt.get(n.targetId),s=n.view.Vr(o,e.Uu,a),[2,(da(e,n.targetId,s.Pu),s.snapshot)]}}))}))}(e,n,r,i)},[4,io(e.Gc,n,!0)];case 1:return o=f.sent(),a=new Xo(n,o.Fh),s=a.Eu(o.documents),u=we.Zt(r,i&&"Offline"!==e.onlineState),c=a.Vr(s,e.Uu,u),da(e,r,c.Pu),l=new Jo(n,r,a),[2,(e.Nu.set(n,l),e.xu.has(r)?e.xu.get(r).push(n):e.xu.set(r,[n]),c.snapshot)]}}))}))}function ra(e,n){return Object(t.b)(this,void 0,void 0,(function(){var r,i,o;return Object(t.d)(this,(function(t){switch(t.label){case 0:return r=g(e),i=r.Nu.get(n),(o=r.xu.get(i.targetId)).length>
21?[2,(r.xu.set(i.targetId,o.filter((function(e){return!Pn(e,n)}))),void r.Nu.delete(n))]:r.Uu?(r.Su.Bi(i.targetId),r.Su.xi(i.targetId)?[3,2]:[4,ro(r.Gc,i.targetId,!1).then((function(){r.Su.Ui(i.targetId),Co(r.bu,i.targetId),fa(r,i.targetId)})).catch(uo)]):[3,3];case 1:t.sent(),t.label=2;case 2:return[3,5];case 3:return fa(r,i.targetId),[4,ro(r.Gc,i.targetId,!0)];case 4:t.sent(),t.label=5;case 5:return[2]}}))}))}function ia(e,n){return Object(t.b)(this,void 0,void 0,(function(){var r,i;return Object(t.d)(this,(function(t){switch(t.label){case 0:r=g(e),t.label=1;case 1:return t.trys.push([1,4,,6]),[4,eo(r.Gc,n)];case 2:return i=t.sent(),n.zt.forEach((function(e,t){var n=r.Ou.get(t);n&&(m(e.ee.size+e.ne.size+e.se.size<=1),e.ee.size>0?n.pu=!0:e.ne.size>0?m(n.pu):e.se.size>0&&(m(n.pu),n.pu=!1))})),[4,ya(r,i,n)];case 3:return t.sent(),[3,6];case 4:return[4,uo(t.sent())];case 5:return t.sent(),[3,6];case 6:return[2]}}))}))}function oa(e,t,n){var r=g(e);if(r.Uu&&0===n||!r.Uu&&1===n){var i=[];r.Nu.forEach((function(e,n){var r=n.view.Ks(t);r.snapshot&&i.push(r.snapshot)})),function(e,t){var n=g(e);n.onlineState=t;var r=!1;n.Bs.forEach((function(e,n){for(var i=0,o=n.listeners;i<o.length;i++)o[i].Ks(t)&&(r=!0)})),r&&gr(n)}(r.vu,t),i.length&&r.Cu.yc(i),r.onlineState=t,r.Uu&&r.Su.ji(t)}}function aa(e,n,r){return Object(t.b)(this,void 0,void 0,(function(){var i,o,a,s,u,c;return Object(t.d)(this,(function(t){switch(t.label){case 0:return(i=g(e)).Su.Ki(n,"rejected",r),o=i.Ou.get(n),(a=o&&o.key)?(s=(s=new ne(B.D)).ot(a,new dn(a,L.min())),u=pe().add(a),c=new _e(L.min(),new Map,new oe(w),s,u),[4,ia(i,c)]):[3,2];case 1:return t.sent(),i.ku=i.ku.remove(a),i.Ou.delete(n),va(i),[3,4];case 2:return[4,ro(i.Gc,n,!1).then((function(){return fa(i,n,r)})).catch(uo)];case 3:t.sent(),t.label=4;case 4:return[2]}}
2))}))}function sa(e,n){return Object(t.b)(this,void 0,void 0,(function(){var r,i,o;return Object(t.d)(this,(function(t){switch(t.label){case 0:r=g(e),i=n.batch.batchId,t.label=1;case 1:return t.trys.push([1,4,,6]),[4,Ji(r.Gc,n)];case 2:return o=t.sent(),la(r,i,null),ca(r,i),r.Su.Oi(i,"acknowledged"),[4,ya(r,o)];case 3:return t.sent(),[3,6];case 4:return[4,uo(t.sent())];case 5:return t.sent(),[3,6];case 6:return[2]}}))}))}function ua(e,n,r){return Object(t.b)(this,void 0,void 0,(function(){var i,o;return Object(t.d)(this,(function(t){switch(t.label){case 0:i=g(e),t.label=1;case 1:return t.trys.push([1,4,,6]),[4,function(e,t){var n=g(e);return n.persistence.runTransaction("Reject batch","readwrite-primary",(function(e){var r;return n.Sr.$o(e,t).next((function(t){return m(null!==t),r=t.keys(),n.Sr.Qo(e,t)})).next((function(){return n.Sr.zo(e)})).next((function(){return n.Nh.Or(e,r)}))}))}(i.Gc,n)];case 2:return o=t.sent(),la(i,n,r),ca(i,n),i.Su.Oi(n,"rejected",r),[4,ya(i,o)];case 3:return t.sent(),[3,6];case 4:return[4,uo(t.sent())];case 5:return t.sent(),[3,6];case 6:return[2]}}
2))}))}function ca(e,t){(e.Lu.get(t)||[]).forEach((function(e){e.resolve()})),e.Lu.delete(t)}function la(e,t,n){var r=g(e),i=r.$u[r.currentUser.ti()];if(i){var o=i.get(t);o&&(n?o.reject(n):o.resolve(),i=i.remove(t)),r.$u[r.currentUser.ti()]=i}}function fa(e,t,n){void 0===n&&(n=null),e.Su.Bi(t);for(var r=0,i=e.xu.get(t);r<i.length;r++){var o=i[r];e.Nu.delete(o),n&&e.Cu.Qu(o,n)}e.xu.delete(t),e.Uu&&e.Mu.Kh(t).forEach((function(t){e.Mu.Ho(t)||ha(e,t)}))}function ha(e,t){var n=e.ku.get(t);null!==n&&(Co(e.bu,n),e.ku=e.ku.remove(t),e.Ou.delete(n),va(e))}function da(e,t,n){for(var r=0,i=n;r<i.length;r++){var o=i[r];o instanceof Qo?(e.Mu.Da(o.key,t),pa(e,o)):o instanceof $o?(h("SyncEngine","Document no longer in limbo: "+o.key),e.Mu.Na(o.key,t),e.Mu.Ho(o.key)||ha(e,o.key)):y()}}function pa(e,t){var n=t.key;e.ku.get(n)||(h("SyncEngine","New document in limbo: "+n),e.Fu.push(n),va(e))}function va(e){for(;e.Fu.length>0&&e.ku.size<e.Du;){var t=e.Fu.shift(),n=e.Bu.next();e.Ou.set(n,new Zo(t)),e.ku=e.ku.ot(t,n),To(e.bu,new J(On(mn(t.path)),n,2,wr.ai))}}function ya(e,n,r){return Object(t.b)(this,void 0,void 0,(function(){var i,o,a,s;return Object(t.d)(this,(function(u){switch(u.label){case 0:return i=g(e),o=[],a=[],s=[],i.Nu.P()?[3,3]:(i.Nu.forEach((function(e,t){s.push(i.Ku(t,n,r).then((function(e){if(e){i.Uu&&i.Su.Ki(t.targetId,e.fromCache?"not-current":"current"),o.push(e);var n=Fr.zr(t.targetId,e);a.push(n)}})))})),[4,Promise.all(s)]);case 1:return u.sent(),i.Cu.yc(o),[4,function(e,n){return Object(t.b)(this,void 0,void 0,(function(){var r,i,o,a,s,u,c,l,f;return Object(t.d)(this,(function(t){switch(t.label){case 0:r=g(e),t.label=1;case 1:return t.trys.push([1,3,,4]),[4,r.persistence.runTransaction("notifyLocalViewChanges","readwrite",(function(e){return Xn.forEach(n,(function(t){return Xn.forEach(t.jr,(function(n){return r.persistence.No.Da(e,t.targetId,n)})).next((function(){return Xn.forEach(t.Gr,(function(n){return r.persistence.No.Na(e,t.targetId,n)}))}))}))}))];case 2:return t.sent(),[3,4];case 3:if(!tr(i=t.sent()))throw i;return h("LocalStore","Failed to update sequence numbers: "+i),[3,4];case 4:for(o=0,a=n;o<a.length;o++)s=a[o],u=s.targetId,s.fromCache||(c=r.bh.get(u),l=c.nt,f=c.rt(l),r.bh=r.bh.ot(u,f));return[2]}}))}))}(i.Gc,a)];case 2:u.sent(),u.label=3;case 3:return[2]}}
2))}))}function ma(e,n){return Object(t.b)(this,void 0,void 0,(function(){var r,i;return Object(t.d)(this,(function(o){switch(o.label){case 0:return(r=g(e)).currentUser.isEqual(n)?[3,3]:(h("SyncEngine","User change. New user:",n.ti()),[4,function(e,n){return Object(t.b)(this,void 0,void 0,(function(){var r,i,o,a;return Object(t.d)(this,(function(t){switch(t.label){case 0:return r=g(e),i=r.Sr,o=r.Nh,[4,r.persistence.runTransaction("Handle user change","readonly",(function(e){var t;return r.Sr.Uo(e).next((function(a){return t=a,i=r.persistence.Th(n),o=new Dr(r.Ch,i,r.persistence.Ah()),i.Uo(e)})).next((function(n){for(var r=[],i=[],a=pe(),s=0,u=t;s<u.length;s++){var c=u[s];r.push(c.batchId);for(var l=0,f=c.mutations;l<f.length;l++){var h=f[l];a=a.add(h.key)}}for(var d=0,p=n;d<p.length;d++){var v=p[d];i.push(v.batchId);for(var y=0,m=v.mutations;y<m.length;y++){var g=m[y];a=a.add(g.key)}}return o.Or(e,a).next((function(e){return{Wu:e,ju:r,Gu:i}}))}))}))];case 1:return a=t.sent(),[2,(r.Sr=i,r.Nh=o,r.ph.xh(r.Nh),a)]}}))}))}(r.Gc,n)]);case 1:return i=o.sent(),r.currentUser=n,function(e,t){e.Lu.forEach((function(e){e.forEach((function(e){e.reject(new c(u.CANCELLED,"'waitForPendingWrites' promise is rejected due to a user change."))}))})),e.Lu.clear()}(r),r.Su.Wi(n,i.ju,i.Gu),[4,ya(r,i.Wu)];case 2:o.sent(),o.label=3;case 3:return[2]}}
2))}))}function ga(e,t){var n=g(e),r=n.Ou.get(t);if(r&&r.pu)return pe().add(r.key);var i=pe(),o=n.xu.get(t);if(!o)return i;for(var a=0,s=o;a<s.length;a++){var u=s[a],c=n.Nu.get(u);i=i.Ot(c.view.wu)}return i}function ba(e,n){return Object(t.b)(this,void 0,void 0,(function(){var r,i,o;return Object(t.d)(this,(function(t){switch(t.label){case 0:return[4,io((r=g(e)).Gc,n.query,!0)];case 1:return i=t.sent(),o=n.view.Vu(i),[2,(r.Uu&&da(r,n.targetId,o.Pu),o)]}}))}))}function _a(e,n,r,i){return Object(t.b)(this,void 0,void 0,(function(){var o,a;return Object(t.d)(this,(function(t){switch(t.label){case 0:return[4,function(e,t){var n=g(e),r=g(n.Sr);return n.persistence.runTransaction("Lookup mutation documents","readonly",(function(e){return r.Lo(e,t).next((function(t){return t?n.Nh.Or(e,t):Xn.resolve(null)}))}))}((o=g(e)).Gc,n)];case 1:return null===(a=t.sent())?[3,6]:"pending"!==r?[3,3]:[4,Uo(o.bu)];case 2:return t.sent(),[3,4];case 3:"acknowledged"===r||"rejected"===r?(la(o,n,i||null),ca(o,n),function(e,t){g(g(e).Sr).jo(t)}(o.Gc,n)):y(),t.label=4;case 4:return[4,ya(o,a)];case 5:return t.sent(),[3,7];case 6:h("SyncEngine","Cannot apply mutation batch with id: "+n),t.label=7;case 7:return[2]}}
2))}))}function wa(e,n){return Object(t.b)(this,void 0,void 0,(function(){var r,i,o,a,s,u,c,l;return Object(t.d)(this,(function(t){switch(t.label){case 0:return Ca(r=g(e)),Pa(r),!0!==n||!0===r.qu?[3,3]:(i=r.Su.Ci(),[4,ka(r,i.L())]);case 1:return o=t.sent(),r.qu=!0,[4,Go(r.bu,!0)];case 2:for(t.sent(),a=0,s=o;a<s.length;a++)u=s[a],To(r.bu,u);return[3,7];case 3:return!1!==n||!1===r.qu?[3,7]:(c=[],l=Promise.resolve(),r.xu.forEach((function(e,t){r.Su.qi(t)?c.push(t):l=l.then((function(){return fa(r,t),ro(r.Gc,t,!0)})),Co(r.bu,t)})),[4,l]);case 4:return t.sent(),[4,ka(r,c)];case 5:return t.sent(),function(e){var t=g(e);t.Ou.forEach((function(e,n){Co(t.bu,n)})),t.Mu.Qh(),t.Ou=new Map,t.ku=new ne(B.D)}(r),r.qu=!1,[4,Go(r.bu,!1)];case 6:t.sent(),t.label=7;case 7:return[2]}}))}))}function ka(e,n,r){return Object(t.b)(this,void 0,void 0,(function(){var r,i,o,a,s,u,c,l,f,h,d,p,v,y;return Object(t.d)(this,(function(t){switch(t.label){case 0:r=g(e),i=[],o=[],a=0,s=n,t.label=1;case 1:return a<s.length?(u=s[a],c=void 0,(l=r.xu.get(u))&&0!==l.length?[4,no(r.Gc,On(l[0]))]:[3,7]):[3,13];case 2:c=t.sent(),f=0,h=l,t.label=3;case 3:return f<h.length?(d=h[f],p=r.Nu.get(d),[4,ba(r,p)]):[3,6];case 4:(v=t.sent()).snapshot&&o.push(v.snapshot),t.label=5;case 5:return f++,[3,3];case 6:return[3,11];case 7:return[4,oo(r.Gc,u)];case 8:return y=t.sent(),[4,no(r.Gc,y)];case 9:return c=t.sent(),[4,na(r,Sa(y),u,!1)];case 10:t.sent(),t.label=11;case 11:i.push(c),t.label=12;case 12:return a++,[3,1];case 13:return[2,(r.Cu.yc(o),i)]}}))}))}function Sa(e){return yn(e.path,e.collectionGroup,e.orderBy,e.filters,e.limit,"F",e.startAt,e.endAt)}function Oa(e){var t=g(e);return g(g(t.Gc).persistence).pi()}function Ea(e,n,r,i){return Object(t.b)(this,void 0,void 0,(function(){var o,a,s;return Object(t.d)(this,(function(t){switch(t.label){case 0:return(o=g(e)).qu?(h("SyncEngine","Ignoring unexpected query state notification."),[3,8]):[3,1];case 1:if(!o.xu.has(n))return[3,8];switch(r){case"current":case"not-current":return[3,2];case"rejected":return[3,5]}return[3,7];case 2:return[4,ao(o.Gc)];case 3:return a=t.sent(),s=_e.Xt(n,"current"===r),[4,ya(o,a,s)];case 4:return t.sent(),[3,8];case 5:return[4,ro(o.Gc,n,!0)];case 6:return t.sent(),fa(o,n,i),[3,8];case 7:y(),t.label=8;case 8:return[2]}}
2))}))}function Ta(e,n,r){return Object(t.b)(this,void 0,void 0,(function(){var i,o,a,s,u,c,l,f,d,p;return Object(t.d)(this,(function(v){switch(v.label){case 0:if(!(i=Ca(e)).qu)return[3,10];o=0,a=n,v.label=1;case 1:return o<a.length?(s=a[o],i.xu.has(s)?(h("SyncEngine","Adding an already active target "+s),[3,5]):[4,oo(i.Gc,s)]):[3,6];case 2:return u=v.sent(),[4,no(i.Gc,u)];case 3:return c=v.sent(),[4,na(i,Sa(u),c.targetId,!1)];case 4:v.sent(),To(i.bu,c),v.label=5;case 5:return o++,[3,1];case 6:l=function(e){return Object(t.d)(this,(function(t){switch(t.label){case 0:return i.xu.has(e)?[4,ro(i.Gc,e,!1).then((function(){Co(i.bu,e),fa(i,e)})).catch(uo)]:[3,2];case 1:t.sent(),t.label=2;case 2:return[2]}}))},f=0,d=r,v.label=7;case 7:return f<d.length?(p=d[f],[5,l(p)]):[3,10];case 8:v.sent(),v.label=9;case 9:return f++,[3,7];case 10:return[2]}}))}))}function Ca(e){var t=g(e);return t.bu.Hc.ru=ia.bind(null,t),t.bu.Hc.qe=ga.bind(null,t),t.bu.Hc.iu=aa.bind(null,t),t.Cu.yc=yr.bind(null,t.vu),t.Cu.Qu=mr.bind(null,t.vu),t}function Pa(e){var t=g(e);return t.bu.Hc.ou=sa.bind(null,t),t.bu.Hc.au=ua.bind(null,t),t}var xa=function(){function e(){}return e.prototype.xh=function(e){this.zu=e},e.prototype.Lr=function(e,t,n,r){var o=this;return function(e){return 0===e.filters.length&&null===e.limit&&null==e.startAt&&null==e.endAt&&(0===e.on.length||1===e.on.length&&e.on[0].field.W())}(t)||n.isEqual(L.min())?this.Hu(e,t):this.zu.Or(e,r).next((function(a){var s=o.Ju(t,a);return(gn(t)||bn(t))&&o.mu(t.an,s,r,n)?o.Hu(e,t):(f()<=i.a.DEBUG&&h("IndexFreeQueryEngine","Re-using previous result from %s to execute query: %s",n.toString(),In(t)),o.zu.Lr(e,t,n).next((function(e){return s.forEach((function(t){e=e.ot(t.key,t)})),e})))}))},e.prototype.Ju=function(e,t){var n=new oe(Rn(e));return t.forEach((function(t,r){r instanceof hn&&jn(e,r)&&(n=n.add(r))})),n},e.prototype.mu=function(e,t,n,r){if(n.size!==t.size)return!0;var i="F"===e?t.last():t.first();return!!i&&(i.hasPendingWrites||i.version.h(r)>0)},e.prototype.Hu=function(e,t){return f()<=i.a.DEBUG&&h("IndexFreeQueryEngine","Using full collection scan to execute query:",In(t)),this.zu.Lr(e,t,L.min())},e}(),Ia=function(){function e(e,t){this.Dr=e,this.No=t,this.Sr=[],this.Yu=1,this.Xu=new oe(lo.Mh)}return e.prototype.ko=function(e){return Xn.resolve(0===this.Sr.length)},e.prototype.Oo=function(e,t,n,r){var i=this.Yu;this.Yu++,this.Sr.length>0&&this.Sr[this.Sr.length-1];var o=new Rr(i,t,n,r);this.Sr.push(o);for(var a=0,s=r;a<s.length;a++){var u=s[a];this.Xu=this.Xu.add(new lo(u.key,i)),this.Dr.Mo(e,u.key.path.F())}return Xn.resolve(o)},e.prototype.$o=function(e,t){return Xn.resolve(this.Zu(t))},e.prototype.Bo=function(e,t){var n=t+1,r=this.tl(n),i=r<0?0:r;return Xn.resolve(this.Sr.length>i?this.Sr[i]:null)},e.prototype.qo=function(){return Xn.resolve(0===this.Sr.length?-1:this.Yu-1)},e.prototype.Uo=function(e){return Xn.resolve(this.Sr.slice())},e.prototype.Nr=function(e,t){var n=this,r=new lo(t,0),i=new lo(t,Number.POSITIVE_INFINITY),o=[];return this.Xu.xt([r,i],(function(e){var t=n.Zu(e.jh);o.push(t)})),Xn.resolve(o)},e.prototype.$r=function(e,t){var n=this,r=new oe(w);return t.forEach((function(e){var t=new lo(e,0),i=new lo(e,Number.POSITIVE_INFINITY);n.Xu.xt([t,i],(function(e){r=r.add(e.jh)}))})),Xn.resolve(this.el(r))},e.prototype.Qr=function(e,t){var n=t.path,r=n.length+1,i=n;B.X(i)||(i=i.child(""));var o=new lo(new B(i),0),a=new oe(w);return this.Xu.Ft((function(e){var t=e.key.path;return!!n.M(t)&&(t.length===r&&(a=a.add(e.jh)),!0)}),o),Xn.resolve(this.el(a))},e.prototype.el=function(e){var t=this,n=[];return e.forEach((function(e){var r=t.Zu(e);null!==r&&n.push(r)})),n},e.prototype.Qo=function(e,t){var n=this;m(0===this.nl(t.batchId,"removed")),this.Sr.shift();var r=this.Xu;return Xn.forEach(t.mutations,(function(i){var o=new lo(i.key,t.batchId);return r=r.delete(o),n.No.Go(e,i.key)})).next((function(){n.Xu=r}))},e.prototype.jo=function(e){},e.prototype.Ho=function(e,t){var n=new lo(t,0),r=this.Xu.kt(n);return Xn.resolve(t.isEqual(r&&r.key))},e.prototype.zo=function(e){return this.Sr.length,Xn.resolve()},e.prototype.nl=function(e,t){return this.tl(e)},e.prototype.tl=function(e){return 0===this.Sr.length?0:e-this.Sr[0].batchId},e.prototype.Zu=function(e){var t=this.tl(e);return t<0||t>=this.Sr.length?null:this.Sr[t]},e}(),ja=function(){function e(e,t){this.Dr=e,this.sl=t,this.docs=new ne(B.D),this.size=0}return e.prototype.Ir=function(e,t,n){var r=t.key,i=this.docs.get(r),o=i?i.size:0,a=this.sl(t);return this.docs=this.docs.ot(r,{ta:t,size:a,readTime:n}),this.size+=a-o,this.Dr.Mo(e,r.path.F())},e.prototype.Ar=function(e){var t=this.docs.get(e);t&&(this.docs=this.docs.remove(e),this.size-=t.size)},e.prototype.Rr=function(e,t){var n=this.docs.get(t);return Xn.resolve(n?n.ta:null)},e.prototype.getEntries=function(e,t){var n=this,r=ce();return t.forEach((function(e){var t=n.docs.get(e);r=r.ot(e,t?t.ta:null)})),Xn.resolve(r)},e.prototype.Lr=function(e,t,n){for(var r=fe(),i=new B(t.path.child("")),o=this.docs.ft(i);o.At();){var a=o.It(),s=a.key,u=a.value,c=u.ta,l=u.readTime;if(!t.path.M(s.path))break;l.h(n)<=0||c instanceof hn&&jn(t,c)&&(r=r.ot(c.key,c))}return Xn.resolve(r)},e.prototype.il=function(e,t){return Xn.forEach(this.docs,(function(e){return t(e)}))},e.prototype.ra=function(e){return new Ra(this)},e.prototype.aa=function(e){return Xn.resolve(this.size)},e}(),Ra=function(e){function n(t){var n=this;return(n=e.call(this)||this).ha=t,n}return Object(t.c)(n,e),n.prototype.Vr=function(e){var t=this,n=[];return this.wr.forEach((function(r,i){i?n.push(t.ha.Ir(e,i,t.readTime)):t.ha.Ar(r)})),Xn.kn(n)},n.prototype.Pr=function(e,t){return this.ha.Rr(e,t)},n.prototype.gr=function(e,t){return this.ha.getEntries(e,t)},n}
2(Mr),Aa=function(){function e(e){this.persistence=e,this.rl=new M((function(e){return K(e)}),Y),this.lastRemoteSnapshotVersion=L.min(),this.highestTargetId=0,this.ol=0,this.al=new co,this.targetCount=0,this.hl=Fi.fa()}return e.prototype.Ce=function(e,t){return this.rl.forEach((function(e,n){return t(n)})),Xn.resolve()},e.prototype.Ia=function(e){return Xn.resolve(this.lastRemoteSnapshotVersion)},e.prototype.ma=function(e){return Xn.resolve(this.ol)},e.prototype.wa=function(e){return this.highestTargetId=this.hl.next(),Xn.resolve(this.highestTargetId)},e.prototype.Aa=function(e,t,n){return n&&(this.lastRemoteSnapshotVersion=n),t>this.ol&&(this.ol=t),Xn.resolve()},e.prototype.Pa=function(e){this.rl.set(e.target,e);var t=e.targetId;t>this.highestTargetId&&(this.hl=new Fi(t),this.highestTargetId=t),e.sequenceNumber>this.ol&&(this.ol=e.sequenceNumber)},e.prototype.Ra=function(e,t){return this.Pa(t),this.targetCount+=1,Xn.resolve()},e.prototype.Va=function(e,t){return this.Pa(t),Xn.resolve()},e.prototype.ya=function(e,t){return this.rl.delete(t.target),this.al.Kh(t.targetId),this.targetCount-=1,Xn.resolve()},e.prototype.po=function(e,t,n){var r=this,i=0,o=[];return this.rl.forEach((function(a,s){s.sequenceNumber<=t&&null===n.get(s.targetId)&&(r.rl.delete(a),o.push(r.pa(e,s.targetId)),i++)})),Xn.kn(o).next((function(){return i}))},e.prototype.ba=function(e){return Xn.resolve(this.targetCount)},e.prototype.va=function(e,t){var n=this.rl.get(t)||null;return Xn.resolve(n)},e.prototype.Sa=function(e,t,n){return this.al.Bh(t,n),Xn.resolve()},e.prototype.Ca=function(e,t,n){this.al.Uh(t,n);var r=this.persistence.No,i=[];return r&&t.forEach((function(t){i.push(r.Go(e,t))})),Xn.kn(i)},e.prototype.pa=function(e,t){return this.al.Kh(t),Xn.resolve()},e.prototype.xa=function(e,t){var n=this.al.Wh(t);return Xn.resolve(n)},e.prototype.Ho=function(e,t){return Xn.resolve(this.al.Ho(t))},e}(),Ma=function(){function e(e){var t=this;this.cl={},this.Ma=new wr(0),this.$a=!1,this.$a=!0,this.No=e(this),this.ja=new Aa(this),this.Dr=new mi,this.vr=function(e,n){return new ja(e,(function(e){return t.No.ul(e)}))}(this.Dr)}return e.prototype.start=function(){return Promise.resolve()},e.prototype.Di=function(){return this.$a=!1,Promise.resolve()},Object.defineProperty(e.prototype,"Ii",{get:function(){return this.$a},enumerable:!1,configurable:!0}),e.prototype.Za=function(){},e.prototype.th=function(){},e.prototype.Ah=function(){return this.Dr},e.prototype.Th=function(e){var t=this.cl[e.ti()];return t||(t=new Ia(this.Dr,this.No),this.cl[e.ti()]=t),t},e.prototype.Ih=function(){return this.ja},e.prototype.mh=function(){return this.vr},e.prototype.runTransaction=function(e,t,n){var r=this;h("MemoryPersistence","Starting transaction:",e);var i=new Na(this.Ma.next());return this.No.ll(),n(i).next((function(e){return r.No._l(i).next((function(){return e}))})).xn().then((function(e){return i.br(),e}))},e.prototype.fl=function(e,t){return Xn.On(Object.values(this.cl).map((function(n){return function(){return n.Ho(e,t)}})))},e}(),Na=function(e){function n(t){var n=this;return(n=e.call(this)||this).Fa=t,n}return Object(t.c)(n,e),n}(Lr),La=function(){function e(e){this.persistence=e,this.dl=new co,this.wl=null}return e.El=function(t){return new e(t)},Object.defineProperty(e.prototype,"Tl",{get:function(){if(this.wl)return this.wl;throw y()},enumerable:!1,configurable:!0}),e.prototype.Da=function(e,t,n){return this.dl.Da(n,t),this.Tl.delete(n.toString()),Xn.resolve()},e.prototype.Na=function(e,t,n){return this.dl.Na(n,t),this.Tl.add(n.toString()),Xn.resolve()},e.prototype.Go=function(e,t){return this.Tl.add(t.toString()),Xn.resolve()},e.prototype.removeTarget=function(e,t){var n=this;this.dl.Kh(t.targetId).forEach((function(e){return n.Tl.add(e.toString())}));var r=this.persistence.Ih();return r.xa(e,t.targetId).next((function(e){e.forEach((function(e){return n.Tl.add(e.toString())}))})).next((function(){return r.ya(e,t)}))},e.prototype.ll=function(){this.wl=new Set},e.prototype._l=function(e){var t=this,n=this.persistence.mh().ra();return Xn.forEach(this.Tl,(function(r){var i=B.H(r);return t.Il(e,i).next((function(e){e||n.Ar(i)}))})).next((function(){return t.wl=null,n.apply(e)}))},e.prototype.yh=function(e,t){var n=this;return this.Il(e,t).next((function(e){e?n.Tl.delete(t.toString()):n.Tl.add(t.toString())}))},e.prototype.ul=function(e){return 0},e.prototype.Il=function(e,t){var n=this;return Xn.On([function(){return Xn.resolve(n.dl.Ho(t))},function(){return n.persistence.Ih().Ho(e,t)},function(){return n.persistence.fl(e,t)}])},e}(),Da=function(){function e(e){this.ml=e.ml,this.Al=e.Al}return e.prototype.gc=function(e){this.Rl=e},e.prototype.Ic=function(e){this.Pl=e},e.prototype.onMessage=function(e){this.gl=e},e.prototype.close=function(){this.Al()},e.prototype.send=function(e){this.ml(e)},e.prototype.Vl=function(){this.Rl()},e.prototype.yl=function(e){this.Pl(e)},e.prototype.pl=function(e){this.gl(e)},e}(),Fa={BatchGetDocuments:"batchGet",Commit:"commit",RunQuery:"runQuery"},Ua=function(e){function n(t){var n=this;return(n=e.call(this,t)||this).forceLongPolling=t.forceLongPolling,n.T=t.T,n}return Object(t.c)(n,e),n.prototype.Nl=function(e,t,n,r){return new Promise((function(i,o){var s=new a.d;
2s.listenOnce(a.b.COMPLETE,(function(){try{switch(s.getLastErrorCode()){case a.a.NO_ERROR:var t=s.getResponseJson();h("Connection","XHR received:",JSON.stringify(t)),i(t);break;case a.a.TIMEOUT:h("Connection",'RPC "'+e+'" timed out'),o(new c(u.DEADLINE_EXCEEDED,"Request time out"));break;case a.a.HTTP_ERROR:var n=s.getStatus();if(h("Connection",'RPC "'+e+'" failed with status:',n,"response text:",s.getResponseText()),n>0){var r=s.getResponseJson().error;if(r&&r.status&&r.message){var l=function(e){var t=e.toLowerCase().replace("_","-");return Object.values(u).indexOf(t)>=0?t:u.UNKNOWN}(r.status);o(new c(l,r.message))}else o(new c(u.UNKNOWN,"Server responded with status "+s.getStatus()))}else o(new c(u.UNAVAILABLE,"Connection failed."));break;default:y()}}finally{h("Connection",'RPC "'+e+'" completed.')}}));var l=JSON.stringify(r);s.send(t,"POST",l,n,15)}))},n.prototype.Vc=function(e,t){var n=[this.vl,"/","google.firestore.v1.Firestore","/",e,"/channel"],r=Object(a.e)(),i={httpSessionIdParam:"gsessionid",initMessageHeaders:{},messageUrlParams:{database:"projects/"+this._.projectId+"/databases/"+this._.database},sendRawJson:!0,supportsCrossDomainXhr:!0,internalChannelParams:{forwardChannelRequestTimeoutMs:6e5},forceLongPolling:this.forceLongPolling,detectBufferingProxy:this.T};this.Cl(i.initMessageHeaders,t),Object(o.x)()||Object(o.A)()||Object(o.t)()||Object(o.v)()||Object(o.B)()||Object(o.s)()||(i.httpHeadersOverwriteParam="$httpHeaders");var s=n.join("");h("Connection","Creating WebChannel: "+s,i);var l=r.createWebChannel(s,i),f=!1,d=!1,v=new Da({ml:function(e){d?h("Connection","Not sending because WebChannel is closed:",e):(f||(h("Connection","Opening WebChannel transport."),l.open(),f=!0),h("Connection","WebChannel sending:",e),l.send(e))},Al:function(){return l.close()}}),y=function(e,t){l.listen(e,(function(e){try{t(e)}catch(e){setTimeout((function(){throw e}),0)}}))};return y(a.c.EventType.OPEN,(function(){d||h("Connection","WebChannel transport opened.")})),y(a.c.EventType.CLOSE,(function(){d||(d=!0,h("Connection","WebChannel transport closed"),v.yl())})),y(a.c.EventType.ERROR,(function(e){d||(d=!0,p("Connection","WebChannel transport errored:",e),v.yl(new c(u.UNAVAILABLE,"The operation could not be completed")))})),y(a.c.EventType.MESSAGE,(function(e){var t;if(!d){var n=e.data[0];m(!!n);var r=n,i=r.error||(null===(t=r[0])||void 0===t?void 0:t.error);if(i){h("Connection","WebChannel received error:",i);var o=i.status,a=function(e){var t=$[e];if(void 0!==t)return te(t)}(o),s=i.message;void 0===a&&(a=u.INTERNAL,s="Unknown error status: "+o+" with message "+i.message),d=!0,v.yl(new c(a,s)),l.close()}else h("Connection","WebChannel received:",n),v.pl(n)}})),setTimeout((function(){v.Vl()}),0),v},n}(function(){function e(e){this.bl=e,this._=e._;var t=e.ssl?"https":"http";this.vl=t+"://"+e.host,this.Sl="projects/"+this._.projectId+"/databases/"+this._.database+"/documents"}return e.prototype.Mc=function(e,t,n,r){var i=this.Dl(e,t);h("RestConnection","Sending: ",i,n);var o={};return this.Cl(o,r),this.Nl(e,i,o,n).then((function(e){return h("RestConnection","Received: ",e),e}),(function(t){throw p("RestConnection",e+" failed with error: ",t,"url: ",i,"request:",n),t}))},e.prototype.$c=function(e,t,n,r){return this.Mc(e,t,n,r)},e.prototype.Cl=function(e,t){if(e["X-Goog-Api-Client"]="gl-js/ fire/8.0.0",e["Content-Type"]="text/plain",t)for(var n in t.Gh)t.Gh.hasOwnProperty(n)&&(e[n]=t.Gh[n])},e.prototype.Dl=function(e,t){var n=Fa[e];return this.vl+"/v1/"+t+":"+n},e}()),Va=function(){function e(){var e=this;this.xl=function(){return e.Fl()},this.kl=function(){return e.Ol()},this.Ml=[],this.$l()}return e.prototype.eu=function(e){this.Ml.push(e)},e.prototype.Di=function(){window.removeEventListener("online",this.xl),window.removeEventListener("offline",this.kl)},e.prototype.$l=function(){window.addEventListener("online",this.xl),window.addEventListener("offline",this.kl)},e.prototype.Fl=function(){h("ConnectivityMonitor","Network connectivity changed: AVAILABLE");for(var e=0,t=this.Ml;e<t.length;e++)(0,t[e])(0)},e.prototype.Ol=function(){h("ConnectivityMonitor","Network connectivity changed: UNAVAILABLE");for(var e=0,t=this.Ml;e<t.length;e++)(0,t[e])(1)},e.Ln=function(){return"undefined"!=typeof window&&void 0!==window.addEventListener&&void 0!==window.removeEventListener},e}(),Ba=function(){function e(){}return e.prototype.eu=function(e){},e.prototype.Di=function(){},e}();function qa(e){return new Xe(e,!0)}var Wa=function(){function e(){this.synchronizeTabs=!1}return e.prototype.initialize=function(e){return Object(t.b)(this,void 0,void 0,(function(){return Object(t.d)(this,(function(t){switch(t.label){case 0:return this.Su=this.Ll(e),this.persistence=this.Bl(e),[4,this.persistence.start()];case 1:return t.sent(),this.ql=this.Ul(e),this.Gc=this.Kl(e),[2]}}))}))},e.prototype.Ul=function(e){return null},e.prototype.Kl=function(e){return t=this.persistence,n=new xa,r=e.Ql,new Xi(t,n,r);var t,n,r},e.prototype.Bl=function(e){return new Ma(La.El)},e.prototype.Ll=function(e){return new jr},e.prototype.terminate=function(){return Object(t.b)(this,void 0,void 0,(function(){return Object(t.d)(this,(function(e){switch(e.label){case 0:return this.ql&&this.ql.stop(),[4,this.Su.Di()];case 1:return e.sent(),[4,this.persistence.Di()];case 2:return e.sent(),[2]}}))}))},e}(),za=function(e){function n(t,n,r){var i=this;return(i=e.call(this)||this).Wl=t,i.cacheSizeBytes=n,i.forceOwnership=r,i.synchronizeTabs=!1,i}return Object(t.c)(n,e),n.prototype.initialize=function(n){return Object(t.b)(this,void 0,void 0,(function(){return Object(t.d)(this,(function(t){switch(t.label){case 0:return[4,e.prototype.initialize.call(this,n)];case 1:return t.sent(),[4,so(this.Gc)];case 2:return t.sent(),[4,this.Wl.initialize(this,n)];case 3:return t.sent(),[4,Pa(this.Wl.fi)];case 4:return t.sent(),[4,Uo(this.Wl.bu)];case 5:return t.sent(),[2]}}))}))},n.prototype.Ul=function(e){var t=this.persistence.No.wo;return new Wr(t,e.hs)},n.prototype.Bl=function(e){var t=$i(e.bl._,e.bl.persistenceKey),n=void 0!==this.cacheSizeBytes?qr.ao(this.cacheSizeBytes):qr.fo,r=qa(e.bl._);return new Hi(this.synchronizeTabs,t,e.clientId,n,e.hs,sr(),ur(),r,this.Su,!!this.forceOwnership)},n.prototype.Ll=function(e){return new jr},n}(Wa),Ha=function(e){function n(t,n){var r=this;
2return(r=e.call(this,t,n,!1)||this).Wl=t,r.cacheSizeBytes=n,r.synchronizeTabs=!0,r}return Object(t.c)(n,e),n.prototype.initialize=function(n){return Object(t.b)(this,void 0,void 0,(function(){var r,i=this;return Object(t.d)(this,(function(o){switch(o.label){case 0:return[4,e.prototype.initialize.call(this,n)];case 1:return o.sent(),r=this.Wl.fi,this.Su instanceof Ir?(this.Su.fi={er:_a.bind(null,r),nr:Ea.bind(null,r),sr:Ta.bind(null,r),pi:Oa.bind(null,r)},[4,this.Su.start()]):[3,3];case 2:o.sent(),o.label=3;case 3:return[4,this.persistence.Xa((function(e){return Object(t.b)(i,void 0,void 0,(function(){return Object(t.d)(this,(function(t){switch(t.label){case 0:return[4,wa(this.Wl.fi,e)];case 1:return t.sent(),this.ql&&(e&&!this.ql.Ii?this.ql.start(this.Gc):e||this.ql.stop()),[2]}}))}))}))];case 4:return o.sent(),[2]}}))}))},n.prototype.Ll=function(e){var t=sr();if(!Ir.Ln(t))throw new c(u.UNIMPLEMENTED,"IndexedDB persistence is only available on platforms that support LocalStorage.");var n=$i(e.bl._,e.bl.persistenceKey);return new Ir(t,e.hs,n,e.clientId,e.Ql)},n}(za),Ga=function(){function e(){}return e.prototype.initialize=function(e,n){return Object(t.b)(this,void 0,void 0,(function(){var r=this;return Object(t.d)(this,(function(t){switch(t.label){case 0:return this.Gc?[3,2]:(this.Gc=e.Gc,this.Su=e.Su,this.zc=this.jl(n),this.bu=this.Gl(n),this.vu=this.zl(n),this.fi=this.Hl(n,!e.synchronizeTabs),this.Su.di=function(e){return oa(r.fi,e,1)},this.bu.Hc.Jl=ma.bind(null,this.fi),[4,Go(this.bu,this.fi.Uu)]);case 1:t.sent(),t.label=2;case 2:return[2]}}
2))}))},e.prototype.zl=function(e){return new dr},e.prototype.jl=function(e){var t,n=qa(e.bl._),r=(t=e.bl,new Ua(t));return function(e,t,n){return new _o(e,t,n)}(e.credentials,r,n)},e.prototype.Gl=function(e){var t,n,r,i,o,a=this;return t=this.Gc,n=this.zc,r=e.hs,i=function(e){return oa(a.fi,e,0)},o=Va.Ln()?new Va:new Ba,new ko(t,n,r,i,o)},e.prototype.Hl=function(e,t){return function(e,t,n,r,i,o,a){var s=new ea(e,t,n,r,i,o);return a&&(s.qu=!0),s}(this.Gc,this.bu,this.vu,this.Su,e.Ql,e.Du,t)},e.prototype.terminate=function(){return Eo(this.bu)},e}(),Ka=function(){function e(e){this.observer=e,this.muted=!1}return e.prototype.next=function(e){this.observer.next&&this.Yl(this.observer.next,e)},e.prototype.error=function(e){this.observer.error?this.Yl(this.observer.error,e):console.error("Uncaught Error in snapshot listener:",e)},e.prototype.Xl=function(){this.muted=!0},e.prototype.Yl=function(e,t){var n=this;this.muted||setTimeout((function(){n.muted||e(t)}),0)},e}();function Ya(e,t,n){if(!n)throw new c(u.INVALID_ARGUMENT,"Function "+e+"() cannot be called with an empty "+t+".")}function Qa(e,t){if(void 0===t)return{merge:!1};if(void 0!==t.mergeFields&&void 0!==t.merge)throw new c(u.INVALID_ARGUMENT,"Invalid options passed to function "+e+'(): You cannot specify both "merge" and "mergeFields".');return t}function $a(e,t,n,r){if(!0===t&&!0===r)throw new c(u.INVALID_ARGUMENT,e+" and "+n+" cannot be used together.")}function Xa(e){if(void 0===e)return"undefined";if(null===e)return"null";if("string"==typeof e)return e.length>20&&(e=e.substring(0,20)+"..."),JSON.stringify(e);if("number"==typeof e||"boolean"==typeof e)return""+e;if("object"==typeof e){if(e instanceof Array)return"an array";var t=function(e){if(e.constructor){var t=/function\s+([^\s(]+)\s*\(/.exec(e.constructor.toString());if(t&&t.length>1)return t[1]}return null}(e);return t?"a custom "+t+" object":"an object"}return"function"==typeof e?"a function":y()}function Ja(e,t){if(t<=0)throw new c(u.INVALID_ARGUMENT,"Function "+e+"() requires a positive number, but it was: "+t+".")}var Za=function(e){for(var t=0;t<e.length;++t)if(0===e[t].length)throw new c(u.INVALID_ARGUMENT,"Invalid field name at argument $(i + 1). Field names must not be empty.");this.Zl=new V(e)},es=function(e){function n(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return e.call(this,t)||this}return Object(t.c)(n,e),n.documentId=function(){return new n(V.j().B())},n.prototype.isEqual=function(e){return e instanceof n&&this.Zl.isEqual(e.Zl)},n}(Za),ts=new RegExp("[~\\*/\\[\\]]"),ns=function(e){this.t_=e},rs=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return Object(t.c)(n,e),n.prototype.e_=function(e){if(2!==e.n_)throw 1===e.n_?e.s_(this.t_+"() can only appear at the top level of your update data"):e.s_(this.t_+"() cannot be used with set() unless you pass {merge:true}");return e.Qe.push(e.path),null},n.prototype.isEqual=function(e){return e instanceof n},n}(ns);function is(e,t,n){return new ys({n_:3,i_:t.settings.i_,methodName:e.t_,r_:n},t._,t.serializer,t.ignoreUndefinedProperties)}var os=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return Object(t.c)(n,e),n.prototype.e_=function(e){return new Wt(e.path,new Mt)},n.prototype.isEqual=function(e){return e instanceof n},n}(ns),as=function(e){function n(t,n){var r=this;return(r=e.call(this,t)||this).o_=n,r}return Object(t.c)(n,e),n.prototype.e_=function(e){var t=is(this,e,!0),n=this.o_.map((function(e){return ks(e,t)})),r=new Nt(n);return new Wt(e.path,r)},n.prototype.isEqual=function(e){return this===e},n}(ns),ss=function(e){function n(t,n){var r=this;return(r=e.call(this,t)||this).o_=n,r}return Object(t.c)(n,e),n.prototype.e_=function(e){var t=is(this,e,!0),n=this.o_.map((function(e){return ks(e,t)})),r=new Dt(n);return new Wt(e.path,r)},n.prototype.isEqual=function(e){return this===e},n}(ns),us=function(e){function n(t,n){var r=this;return(r=e.call(this,t)||this).a_=n,r}return Object(t.c)(n,e),n.prototype.e_=function(e){var t=new Ut(e.serializer,et(e.serializer,this.a_));return new Wt(e.path,t)},n.prototype.isEqual=function(e){return this===e},n}(ns),cs=function(){function e(e,t){if(!isFinite(e)||e<-90||e>90)throw new c(u.INVALID_ARGUMENT,"Latitude must be a number between -90 and 90, but was: "+e);if(!isFinite(t)||t<-180||t>180)throw new c(u.INVALID_ARGUMENT,"Longitude must be a number between -180 and 180, but was: "+t);this.h_=e,this.c_=t}return Object.defineProperty(e.prototype,"latitude",{get:function(){return this.h_}
2,enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"longitude",{get:function(){return this.c_},enumerable:!1,configurable:!0}),e.prototype.isEqual=function(e){return this.h_===e.h_&&this.c_===e.c_},e.prototype.toJSON=function(){return{latitude:this.h_,longitude:this.c_}},e.prototype.g=function(e){return w(this.h_,e.h_)||w(this.c_,e.c_)},e}(),ls=function(e){this.u_=e},fs=/^__.*__$/,hs=function(e,t,n){this.l_=e,this.__=t,this.f_=n},ds=function(){function e(e,t,n){this.data=e,this.Qe=t,this.fieldTransforms=n}return e.prototype.d_=function(e,t){var n=[];return null!==this.Qe?n.push(new en(e,this.data,this.Qe,t)):n.push(new Zt(e,this.data,t)),this.fieldTransforms.length>0&&n.push(new nn(e,this.fieldTransforms)),n},e}(),ps=function(){function e(e,t,n){this.data=e,this.Qe=t,this.fieldTransforms=n}return e.prototype.d_=function(e,t){var n=[new en(e,this.data,this.Qe,t)];return this.fieldTransforms.length>0&&n.push(new nn(e,this.fieldTransforms)),n},e}();function vs(e){switch(e){case 0:case 2:case 1:return!0;case 3:case 4:return!1;default:throw y()}}var ys=function(){function e(e,t,n,r,i,o){this.settings=e,this._=t,this.serializer=n,this.ignoreUndefinedProperties=r,void 0===i&&this.w_(),this.fieldTransforms=i||[],this.Qe=o||[]}return Object.defineProperty(e.prototype,"path",{get:function(){return this.settings.path},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"n_",{get:function(){return this.settings.n_},enumerable:!1,configurable:!0}),e.prototype.E_=function(t){return new e(Object.assign(Object.assign({},this.settings),t),this._,this.serializer,this.ignoreUndefinedProperties,this.fieldTransforms,this.Qe)},e.prototype.T_=function(e){var t,n=null===(t=this.path)||void 0===t?void 0:t.child(e),r=this.E_({path:n,r_:!1});return r.I_(e),r},e.prototype.m_=function(e){var t,n=null===(t=this.path)||void 0===t?void 0:t.child(e),r=this.E_({path:n,r_:!1});return r.w_(),r},e.prototype.A_=function(e){return this.E_({path:void 0,r_:!0})},e.prototype.s_=function(e){return Ps(e,this.settings.methodName,this.settings.R_||!1,this.path,this.settings.i_)},e.prototype.contains=function(e){return void 0!==this.Qe.find((function(t){return e.M(t)}))||void 0!==this.fieldTransforms.find((function(t){return e.M(t.field)}))},e.prototype.w_=function(){if(this.path)for(var e=0;e<this.path.length;e++)this.I_(this.path.get(e))},e.prototype.I_=function(e){if(0===e.length)throw this.s_("Document fields must not be empty");if(vs(this.n_)&&fs.test(e))throw this.s_('Document fields cannot begin and end with "__"')},e}(),ms=function(){function e(e,t,n){this._=e,this.ignoreUndefinedProperties=t,this.serializer=n||qa(e)}return e.prototype.P_=function(e,t,n,r){return void 0===r&&(r=!1),new ys({n_:e,methodName:t,i_:n,path:V.U(),r_:!1,R_:r},this._,this.serializer,this.ignoreUndefinedProperties)},e}();function gs(e,t,n,r,i,o){void 0===o&&(o={});var a=e.P_(o.merge||o.mergeFields?2:0,t,n,i);Es("Data must be an object, but it was:",a,r);var s,l,f=Ss(r,a);if(o.merge)s=new qt(a.Qe),l=a.fieldTransforms;else if(o.mergeFields){for(var h=[],d=0,p=o.mergeFields;d<p.length;d++){var v=p[d],m=void 0;if(v instanceof Za)m=v.Zl;else{if("string"!=typeof v)throw y();m=Cs(t,v,n)}if(!a.contains(m))throw new c(u.INVALID_ARGUMENT,"Field '"+m+"' is specified in your field mask but missing from your input data.");xs(h,m)||h.push(m)}s=new qt(h),l=a.fieldTransforms.filter((function(e){return s.Je(e.field)}))}else s=null,l=a.fieldTransforms;return new ds(new un(f),s,l)}function bs(e,t,n,r){var i=e.P_(1,t,n);Es("Data must be an object, but it was:",i,r);var o=[],a=new cn;R(r,(function(e,r){var s=Cs(t,e,n),u=i.m_(s);if(r instanceof rs||r instanceof ls&&r.u_ instanceof rs)o.push(s);else{var c=ks(r,u);null!=c&&(o.push(s),a.set(s,c))}}));var s=new qt(o);return new ps(a.Xe(),s,i.fieldTransforms)}function _s(e,t,n,r,i,o){var a=e.P_(1,t,n),s=[Ts(t,r,n)],l=[i];if(o.length%2!=0)throw new c(u.INVALID_ARGUMENT,"Function "+t+"() needs to be called with an even number of arguments that alternate between field names and values.");for(var f=0;f<o.length;f+=2)s.push(Ts(t,o[f])),l.push(o[f+1]);for(var h=[],d=new cn,p=s.length-1;p>=0;--p)if(!xs(h,s[p])){var v=s[p],y=l[p],m=a.m_(v);
2if(y instanceof rs||y instanceof ls&&y.u_ instanceof rs)h.push(v);else{var g=ks(y,m);null!=g&&(h.push(v),d.set(v,g))}}var b=new qt(h);return new ps(d.Xe(),b,a.fieldTransforms)}function ws(e,t,n,r){return void 0===r&&(r=!1),ks(n,e.P_(r?4:3,t))}function ks(e,t){if(e instanceof ls&&(e=e.u_),Os(e))return Es("Unsupported field value:",t,e),Ss(e,t);if(e instanceof ns)return function(e,t){if(!vs(t.n_))throw t.s_(e.t_+"() can only be used with update() and set()");if(!t.path)throw t.s_(e.t_+"() is not currently supported inside arrays");var n=e.e_(t);n&&t.fieldTransforms.push(n)}(e,t),null;if(t.path&&t.Qe.push(t.path),e instanceof Array){if(t.settings.r_&&4!==t.n_)throw t.s_("Nested arrays are not supported");return function(e,t){for(var n=[],r=0,i=0,o=e;i<o.length;i++){var a=ks(o[i],t.A_(r));null==a&&(a={nullValue:"NULL_VALUE"}),n.push(a),r++}return{arrayValue:{values:n}}}(e,t)}return function(e,t){if(null===e)return{nullValue:"NULL_VALUE"};if("number"==typeof e)return et(t.serializer,e);if("boolean"==typeof e)return{booleanValue:e};if("string"==typeof e)return{stringValue:e};if(e instanceof Date){var n=N.fromDate(e);return{timestampValue:tt(t.serializer,n)}}if(e instanceof N){var r=new N(e.seconds,1e3*Math.floor(e.nanoseconds/1e3));return{timestampValue:tt(t.serializer,r)}}if(e instanceof cs)return{geoPointValue:{latitude:e.latitude,longitude:e.longitude}};if(e instanceof E)return{bytesValue:nt(t.serializer,e.l)};if(e instanceof hs){var i=t._,o=e.l_;if(!o.isEqual(i))throw t.s_("Document reference is for database "+o.projectId+"/"+o.database+" but should be for database "+i.projectId+"/"+i.database);return{referenceValue:ot(e.l_||t._,e.__.path)}}if(void 0===e&&t.ignoreUndefinedProperties)return null;throw t.s_("Unsupported field value: "+Xa(e))}(e,t)}function Ss(e,t){var n={};return A(e)?t.path&&t.path.length>0&&t.Qe.push(t.path):R(e,(function(e,r){var i=ks(r,t.T_(e));null!=i&&(n[e]=i)})),{mapValue:{fields:n}}}function Os(e){return!("object"!=typeof e||null===e||e instanceof Array||e instanceof Date||e instanceof N||e instanceof cs||e instanceof E||e instanceof hs||e instanceof ns)}function Es(e,t,n){if(!Os(n)||!function(e){return"object"==typeof e&&null!==e&&(Object.getPrototypeOf(e)===Object.prototype||null===Object.getPrototypeOf(e))}(n)){var r=Xa(n);throw"an object"===r?t.s_(e+" a custom object"):t.s_(e+" "+r)}}function Ts(e,t,n){if(t instanceof Za)return t.Zl;if("string"==typeof t)return Cs(e,t);throw Ps("Field path arguments must be of type string or FieldPath.",e,!1,void 0,n)}function Cs(e,n,r){try{return function(e){if(e.search(ts)>=0)throw new c(u.INVALID_ARGUMENT,"Invalid field path ("+e+"). Paths must not contain '~', '*', '/', '[', or ']'");try{return new(es.bind.apply(es,Object(t.g)([void 0],e.split("."))))}catch(n){throw new c(u.INVALID_ARGUMENT,"Invalid field path ("+e+"). Paths must not be empty, begin with '.', end with '.', or contain '..'")}}(n).Zl}catch(n){throw Ps((i=n)instanceof Error?i.message:i.toString(),e,!1,void 0,r)}var i}function Ps(e,t,n,r,i){var o=r&&!r.P(),a=void 0!==i,s="Function "+t+"() called with invalid data";n&&(s+=" (via `toFirestore()`)");var l="";return(o||a)&&(l+=" (found",o&&(l+=" in field "+r),a&&(l+=" in document "+i),l+=")"),new c(u.INVALID_ARGUMENT,(s+=". ")+e+l)}function xs(e,t){return e.some((function(e){return e.isEqual(t)}))}var Is=function(){function e(e){this.zc=e,this.g_=new Map,this.mutations=[],this.V_=!1,this.y_=null,this.p_=new Set}return e.prototype.b_=function(e){return Object(t.b)(this,void 0,void 0,(function(){var n,r=this;return Object(t.d)(this,(function(i){switch(i.label){case 0:if(this.v_(),this.mutations.length>0)throw new c(u.INVALID_ARGUMENT,"Firestore transactions require all reads to be executed before all writes.");return[4,function(e,n){return Object(t.b)(this,void 0,void 0,(function(){var r,i,o,a,s,u;return Object(t.d)(this,(function(t){switch(t.label){case 0:return r=g(e),i=ft(r.serializer)+"/documents",o={documents:n.map((function(e){return st(r.serializer,e)}))},[4,r.$c("BatchGetDocuments",i,o)];case 1:return a=t.sent(),s=new Map,a.forEach((function(e){var t=function(e,t){return"found"in t?function(e,t){m(!!t.found),t.found.name,t.found.updateTime;
2var n=ut(e,t.found.name),r=it(t.found.updateTime),i=new un({mapValue:{fields:t.found.fields}});return new hn(n,r,i,{})}(e,t):"missing"in t?function(e,t){m(!!t.missing),m(!!t.readTime);var n=ut(e,t.missing),r=it(t.readTime);return new dn(n,r)}(e,t):y()}(r.serializer,e);s.set(t.key.toString(),t)})),u=[],[2,(n.forEach((function(e){var t=s.get(e.toString());m(!!t),u.push(t)})),u)]}}))}))}(this.zc,e)];case 1:return[2,((n=i.sent()).forEach((function(e){e instanceof dn||e instanceof hn?r.S_(e):y()})),n)]}}))}))},e.prototype.set=function(e,t){this.write(t.d_(e,this.Ge(e))),this.p_.add(e.toString())},e.prototype.update=function(e,t){try{this.write(t.d_(e,this.D_(e)))}catch(e){this.y_=e}this.p_.add(e.toString())},e.prototype.delete=function(e){this.write([new an(e,this.Ge(e))]),this.p_.add(e.toString())},e.prototype.commit=function(){return Object(t.b)(this,void 0,void 0,(function(){var e,n=this;return Object(t.d)(this,(function(r){switch(r.label){case 0:if(this.v_(),this.y_)throw this.y_;return e=this.g_,this.mutations.forEach((function(t){e.delete(t.key.toString())})),e.forEach((function(e,t){var r=B.H(t);n.mutations.push(new sn(r,n.Ge(r)))})),[4,function(e,n){return Object(t.b)(this,void 0,void 0,(function(){var r,i,o;return Object(t.d)(this,(function(t){switch(t.label){case 0:return r=g(e),i=ft(r.serializer)+"/documents",o={writes:n.map((function(e){return pt(r.serializer,e)}))},[4,r.Mc("Commit",i,o)];case 1:return t.sent(),[2]}}))}))}(this.zc,this.mutations)];case 1:return r.sent(),this.V_=!0,[2]}}))}))},e.prototype.S_=function(e){var t;if(e instanceof hn)t=e.version;else{if(!(e instanceof dn))throw y();t=L.min()}var n=this.g_.get(e.key.toString());if(n){if(!t.isEqual(n))throw new c(u.ABORTED,"Document version changed between two reads.")}else this.g_.set(e.key.toString(),t)},e.prototype.Ge=function(e){var t=this.g_.get(e.toString());return!this.p_.has(e.toString())&&t?Ht.updateTime(t):Ht.ze()},e.prototype.D_=function(e){var t=this.g_.get(e.toString());if(!this.p_.has(e.toString())&&t){if(t.isEqual(L.min()))throw new c(u.INVALID_ARGUMENT,"Can't update a document that doesn't exist.");return Ht.updateTime(t)}return Ht.exists(!0)},e.prototype.write=function(e){this.v_(),this.mutations=this.mutations.concat(e)},e.prototype.v_=function(){},e}(),js=function(){function e(e,t,n,r){this.hs=e,this.zc=t,this.updateFunction=n,this.ls=r,this.C_=5,this.Vs=new $n(this.hs,"transaction_retry")}return e.prototype.run=function(){this.N_()},e.prototype.N_=function(){var e=this;this.Vs.Pn((function(){return Object(t.b)(e,void 0,void 0,(function(){var e,n,r=this;return Object(t.d)(this,(function(t){return e=new Is(this.zc),(n=this.x_(e))&&n.then((function(t){r.hs.ws((function(){return e.commit().then((function(){r.ls.resolve(t)})).catch((function(e){r.F_(e)}))}))})).catch((function(e){r.F_(e)})),[2]}))}))}))},e.prototype.x_=function(e){try{var t=this.updateFunction(e);return!q(t)&&t.catch&&t.then?t:(this.ls.reject(Error("Transaction callback must return a Promise")),null)}catch(e){return this.ls.reject(e),null}},e.prototype.F_=function(e){var t=this;this.C_>0&&this.k_(e)?(this.C_-=1,this.hs.ws((function(){return t.N_(),Promise.resolve()}))):this.ls.reject(e)},e.prototype.k_=function(e){if("FirebaseError"===e.name){var t=e.code;return"aborted"===t||"failed-precondition"===t||!ee(t)}return!1},e}(),Rs=function(){function e(e,t){this.credentials=e,this.hs=t,this.clientId=_.t(),this.O_=new Qn}return e.prototype.start=function(e,n,r){var i=this;this.M_(),this.bl=e;var o=new Qn,a=!1;return this.credentials.Jh((function(e){if(!a)return a=!0,h("FirestoreClient","Initializing. user=",e.uid),i.L_(n,r,e,o).then(i.O_.resolve,i.O_.reject);i.hs.Cs((function(){return function(e,n){return Object(t.b)(this,void 0,void 0,(function(){var r,i;return Object(t.d)(this,(function(t){switch(t.label){case 0:return(r=g(e)).hs.Fs(),h("RemoteStore","RemoteStore received new credentials"),i=Ro(r),r.Xc.add(3),[4,Oo(r)];case 1:return t.sent(),i&&r.nu.set("Unknown"),[4,r.Hc.Jl(n)];case 2:return t.sent(),r.Xc.delete(3),[4,So(r)];case 3:return t.sent(),[2]}}))}))}(i.bu,e)}))}
2)),this.hs.ws((function(){return i.O_.promise})),o.promise},e.prototype.enableNetwork=function(){var e=this;return this.M_(),this.hs.enqueue((function(){return e.persistence.th(!0),function(e){var t=g(e);return t.Xc.delete(0),So(t)}(e.bu)}))},e.prototype.L_=function(e,n,r,i){return Object(t.b)(this,void 0,void 0,(function(){var o,a,s=this;return Object(t.d)(this,(function(c){switch(c.label){case 0:return c.trys.push([0,3,,4]),o={hs:this.hs,bl:this.bl,clientId:this.clientId,credentials:this.credentials,Ql:r,Du:100},[4,e.initialize(o)];case 1:return c.sent(),[4,n.initialize(e,o)];case 2:return c.sent(),this.persistence=e.persistence,this.Su=e.Su,this.Gc=e.Gc,this.ql=e.ql,this.zc=n.zc,this.bu=n.bu,this.fi=n.fi,this.B_=n.vu,this.B_.Us=ta.bind(null,this.fi),this.B_.Ws=ra.bind(null,this.fi),this.persistence.Za((function(){return Object(t.b)(s,void 0,void 0,(function(){return Object(t.d)(this,(function(e){switch(e.label){case 0:return[4,this.terminate()];case 1:return e.sent(),[2]}}))}))})),i.resolve(),[3,4];case 3:if(a=c.sent(),i.reject(a),!function(e){return"FirebaseError"===e.name?e.code===u.FAILED_PRECONDITION||e.code===u.UNIMPLEMENTED:!("undefined"!=typeof DOMException&&e instanceof DOMException)||22===e.code||20===e.code||11===e.code}(a))throw a;return[2,(console.warn("Error enabling offline persistence. Falling back to persistence disabled: "+a),this.L_(new Wa,new Ga,r,i))];case 4:return[2]}}
2))}))},e.prototype.M_=function(){if(this.hs.ps)throw new c(u.FAILED_PRECONDITION,"The client has already been terminated.")},e.prototype.disableNetwork=function(){var e=this;return this.M_(),this.hs.enqueue((function(){return e.persistence.th(!1),function(e){return Object(t.b)(this,void 0,void 0,(function(){var n;return Object(t.d)(this,(function(t){switch(t.label){case 0:return(n=g(e)).Xc.add(0),[4,Oo(n)];case 1:return t.sent(),n.nu.set("Offline"),[2]}}))}))}(e.bu)}))},e.prototype.terminate=function(){var e=this;this.hs.Ds();var n=new Qn;return this.hs.bs((function(){return Object(t.b)(e,void 0,void 0,(function(){var e,r;return Object(t.d)(this,(function(t){switch(t.label){case 0:return t.trys.push([0,4,,5]),this.ql&&this.ql.stop(),[4,Eo(this.bu)];case 1:return t.sent(),[4,this.Su.Di()];case 2:return t.sent(),[4,this.persistence.Di()];case 3:return t.sent(),this.credentials.Yh(),n.resolve(),[3,5];case 4:return e=t.sent(),r=fr(e,"Failed to shutdown persistence"),n.reject(r),[3,5];case 5:return[2]}}))}))})),n.promise},e.prototype.waitForPendingWrites=function(){var e=this;this.M_();var n=new Qn;return this.hs.ws((function(){return function(e,n){return Object(t.b)(this,void 0,void 0,(function(){var r,i,o,a,s;return Object(t.d)(this,(function(t){switch(t.label){case 0:Ro((r=g(e)).bu)||h("SyncEngine","The network is disabled. The task returned by 'awaitPendingWrites()' will not complete until the network is enabled."),t.label=1;case 1:return t.trys.push([1,3,,4]),[4,function(e){var t=g(e);return t.persistence.runTransaction("Get highest unacknowledged batch id","readonly",(function(e){return t.Sr.qo(e)}))}(r.Gc)];case 2:return-1===(i=t.sent())?[2,void n.resolve()]:((o=r.Lu.get(i)||[]).push(n),r.Lu.set(i,o),[3,4]);case 3:return a=t.sent(),s=fr(a,"Initialization of waitForPendingWrites() operation failed"),n.reject(s),[3,4];case 4:return[2]}}
2))}))}(e.fi,n)})),n.promise},e.prototype.listen=function(e,t,n){var r=this;this.M_();var i=new Ka(n),o=new br(e,i,t);return this.hs.ws((function(){return pr(r.B_,o)})),function(){i.Xl(),r.hs.ws((function(){return vr(r.B_,o)}))}},e.prototype.q_=function(e){return Object(t.b)(this,void 0,void 0,(function(){var n,r=this;return Object(t.d)(this,(function(i){switch(i.label){case 0:return this.M_(),[4,this.O_.promise];case 1:return i.sent(),n=new Qn,[2,(this.hs.ws((function(){return function(e,n,r){return Object(t.b)(this,void 0,void 0,(function(){var i,o,a;return Object(t.d)(this,(function(t){switch(t.label){case 0:return t.trys.push([0,2,,3]),[4,function(e,t){var n=g(e);return n.persistence.runTransaction("read document","readonly",(function(e){return n.Nh.Cr(e,t)}))}(e,n)];case 1:return(i=t.sent())instanceof hn?r.resolve(i):i instanceof dn?r.resolve(null):r.reject(new c(u.UNAVAILABLE,"Failed to get document from cache. (However, this document may exist on the server. Run again without setting 'source' in the GetOptions to attempt to retrieve the document from the server.)")),[3,3];case 2:return o=t.sent(),a=fr(o,"Failed to get document '"+n+" from cache"),r.reject(a),[3,3];case 3:return[2]}}
2))}))}(r.Gc,e,n)})),n.promise)]}}))}))},e.prototype.U_=function(e,n){return void 0===n&&(n={}),Object(t.b)(this,void 0,void 0,(function(){var r,i=this;return Object(t.d)(this,(function(t){switch(t.label){case 0:return this.M_(),[4,this.O_.promise];case 1:return t.sent(),r=new Qn,[2,(this.hs.ws((function(){return function(e,t,n,r,i){var o=new Ka({next:function(o){t.ws((function(){return vr(e,a)}));var s=o.docs.has(n);!s&&o.fromCache?i.reject(new c(u.UNAVAILABLE,"Failed to get document because the client is offline.")):s&&o.fromCache&&r&&"server"===r.source?i.reject(new c(u.UNAVAILABLE,'Failed to get document from server. (However, this document does exist in the local cache. Run again without setting source to "server" to retrieve the cached document.)')):i.resolve(o)},error:function(e){return i.reject(e)}}),a=new br(mn(n.path),o,{includeMetadataChanges:!0,Xs:!0});return pr(e,a)}(i.B_,i.hs,e,n,r)})),r.promise)]}}))}))},e.prototype.K_=function(e){return Object(t.b)(this,void 0,void 0,(function(){var n,r=this;return Object(t.d)(this,(function(i){switch(i.label){case 0:return this.M_(),[4,this.O_.promise];case 1:return i.sent(),n=new Qn,[2,(this.hs.ws((function(){return function(e,n,r){return Object(t.b)(this,void 0,void 0,(function(){var i,o,a,s,u,c;return Object(t.d)(this,(function(t){switch(t.label){case 0:return t.trys.push([0,2,,3]),[4,io(e,n,!0)];case 1:return i=t.sent(),o=new Xo(n,i.Fh),a=o.Eu(i.documents),s=o.Vr(a,!1),r.resolve(s.snapshot),[3,3];case 2:return u=t.sent(),c=fr(u,"Failed to execute query '"+n+" against cache"),r.reject(c),[3,3];case 3:return[2]}}
2))}))}(r.Gc,e,n)})),n.promise)]}}))}))},e.prototype.Q_=function(e,n){return void 0===n&&(n={}),Object(t.b)(this,void 0,void 0,(function(){var r,i=this;return Object(t.d)(this,(function(t){switch(t.label){case 0:return this.M_(),[4,this.O_.promise];case 1:return t.sent(),r=new Qn,[2,(this.hs.ws((function(){return function(e,t,n,r,i){var o=new Ka({next:function(n){t.ws((function(){return vr(e,a)})),n.fromCache&&"server"===r.source?i.reject(new c(u.UNAVAILABLE,'Failed to get documents from server. (However, these documents may exist in the local cache. Run again without setting source to "server" to retrieve the cached documents.)')):i.resolve(n)},error:function(e){return i.reject(e)}}),a=new br(n,o,{includeMetadataChanges:!0,Xs:!0});return pr(e,a)}(i.B_,i.hs,e,n,r)})),r.promise)]}}))}))},e.prototype.write=function(e){var n=this;this.M_();var r=new Qn;return this.hs.ws((function(){return function(e,n,r){return Object(t.b)(this,void 0,void 0,(function(){var i,o,a,s;return Object(t.d)(this,(function(t){switch(t.label){case 0:i=Pa(e),t.label=1;case 1:return t.trys.push([1,5,,6]),[4,function(e,t){var n,r=g(e),i=N.now(),o=t.reduce((function(e,t){return e.add(t.key)}),pe());return r.persistence.runTransaction("Locally write mutations","readwrite",(function(e){return r.Nh.Or(e,o).next((function(o){n=o;for(var a=[],s=0,u=t;s<u.length;s++){var c=u[s],l=$t(c,n.get(c.key));null!=l&&a.push(new en(c.key,l,ln(l.proto.mapValue),Ht.exists(!0)))}return r.Sr.Oo(e,i,a,t)}))})).then((function(e){var t=e.lr(n);return{batchId:e.batchId,wr:t}}))}(i.Gc,n)];case 2:return o=t.sent(),i.Su.Fi(o.batchId),function(e,t,n){var r=e.$u[e.currentUser.ti()];r||(r=new ne(w)),r=r.ot(t,n),e.$u[e.currentUser.ti()]=r}(i,o.batchId,r),[4,ya(i,o.wr)];case 3:return t.sent(),[4,Uo(i.bu)];case 4:return t.sent(),[3,6];case 5:return a=t.sent(),s=fr(a,"Failed to persist write"),r.reject(s),[3,6];case 6:return[2]}}
2))}))}(n.fi,e,r)})),r.promise},e.prototype._=function(){return this.bl._},e.prototype.W_=function(e){var n=this;this.M_();var r=new Ka(e);return this.hs.ws((function(){return Object(t.b)(n,void 0,void 0,(function(){return Object(t.d)(this,(function(e){return[2,function(e,t){g(e).qs.add(t),t.next()}(this.B_,r)]}))}))})),function(){r.Xl(),n.hs.ws((function(){return Object(t.b)(n,void 0,void 0,(function(){return Object(t.d)(this,(function(e){return[2,function(e,t){g(e).qs.delete(t)}(this.B_,r)]}))}))}))}},Object.defineProperty(e.prototype,"j_",{get:function(){return this.hs.ps},enumerable:!1,configurable:!0}),e.prototype.transaction=function(e){var t=this;this.M_();var n=new Qn;return this.hs.ws((function(){return new js(t.hs,t.zc,e,n).run(),Promise.resolve()})),n.promise},e}();function As(e){return function(e,t){if("object"!=typeof e||null===e)return!1;for(var n=e,r=0,i=["next","error","complete"];r<i.length;r++){var o=i[r];if(o in n&&"function"==typeof n[o])return!0}return!1}(e)}var Ms=function(){function e(e,t,n,r){this._=e,this.G_=t,this.z_=n,this.H_=r}return e.prototype.J_=function(e){switch(Ae(e)){case 0:return null;case 1:return e.booleanValue;case 2:return Be(e.integerValue||e.doubleValue);case 3:return this.Y_(e.timestampValue);case 4:return this.X_(e);case 5:return e.stringValue;case 6:return this.H_(qe(e.bytesValue));case 7:return this.Z_(e.referenceValue);case 8:return this.tf(e.geoPointValue);case 9:return this.ef(e.arrayValue);case 10:return this.nf(e.mapValue);default:throw y()}},e.prototype.nf=function(e){var t=this,n={};return R(e.fields||{},(function(e,r){n[e]=t.J_(r)})),n},e.prototype.tf=function(e){return new cs(Be(e.latitude),Be(e.longitude))},e.prototype.ef=function(e){var t=this;return(e.values||[]).map((function(e){return t.J_(e)}))},e.prototype.X_=function(e){switch(this.G_){case"previous":var t=Ie(e);return null==t?null:this.J_(t);case"estimate":return this.Y_(je(e));default:return null}},e.prototype.Y_=function(e){var t=Ve(e);return new N(t.seconds,t.nanos)},e.prototype.Z_=function(e){var t=F.q(e);m(xt(t));var n=new I(t.get(1),t.get(3)),r=new B(t.N(5));return n.isEqual(this._)||d("Document "+r+" contains a document reference within a different database ("+n.projectId+"/"+n.database+") which is not supported. It will be treated as a reference in the current database ("+this._.projectId+"/"+this._.database+") instead."),this.z_(r)},e}(),Ns=qr.uo,Ls=function(){function e(e){var t;if(void 0===e.host){if(void 0!==e.ssl)throw new c(u.INVALID_ARGUMENT,"Can't provide ssl option if host option is not set");this.host="firestore.googleapis.com",this.ssl=!0}else this.host=e.host,this.ssl=null===(t=e.ssl)||void 0===t||t;if(this.credentials=e.credentials,this.ignoreUndefinedProperties=!!e.ignoreUndefinedProperties,void 0===e.cacheSizeBytes)this.cacheSizeBytes=qr._o;else{if(e.cacheSizeBytes!==Ns&&e.cacheSizeBytes<qr.lo)throw new c(u.INVALID_ARGUMENT,"cacheSizeBytes must be at least "+qr.lo);this.cacheSizeBytes=e.cacheSizeBytes}this.experimentalForceLongPolling=!!e.experimentalForceLongPolling,this.experimentalAutoDetectLongPolling=!!e.experimentalAutoDetectLongPolling,$a("experimentalForceLongPolling",e.experimentalForceLongPolling,"experimentalAutoDetectLongPolling",e.experimentalAutoDetectLongPolling)}return e.prototype.isEqual=function(e){return this.host===e.host&&this.ssl===e.ssl&&this.credentials===e.credentials&&this.cacheSizeBytes===e.cacheSizeBytes&&this.experimentalForceLongPolling===e.experimentalForceLongPolling&&this.experimentalAutoDetectLongPolling===e.experimentalAutoDetectLongPolling&&this.ignoreUndefinedProperties===e.ignoreUndefinedProperties},e}(),Ds="You are using the memory-only build of Firestore. Persistence support is only available via the @firebase/firestore bundle or the firebase-firestore.js build.",Fs=function(){function e(){}return e.prototype.enableIndexedDbPersistence=function(e,t){throw new c(u.FAILED_PRECONDITION,Ds)},e.prototype.enableMultiTabIndexedDbPersistence=function(e){throw new c(u.FAILED_PRECONDITION,Ds)},e.prototype.clearIndexedDbPersistence=function(e){throw new c(u.FAILED_PRECONDITION,Ds)},e}(),Us=function(){function e(){}return e.prototype.enableIndexedDbPersistence=function(e,t){var n=new Ga,r=new za(n,e.sf().cacheSizeBytes,t);
2return e.if(r,n)},e.prototype.enableMultiTabIndexedDbPersistence=function(e){var t=new Ga,n=new Ha(t,e.sf().cacheSizeBytes);return e.if(n,t)},e.prototype.clearIndexedDbPersistence=function(e){var n=this,r=new Qn;return e.rf.bs((function(){return Object(t.b)(n,void 0,void 0,(function(){var n;return Object(t.d)(this,(function(i){switch(i.label){case 0:return i.trys.push([0,2,,3]),[4,function(e){return Object(t.b)(this,void 0,void 0,(function(){var n;return Object(t.d)(this,(function(t){switch(t.label){case 0:return Jn.Ln()?(n=e+"main",[4,Jn.delete(n)]):[2,Promise.resolve()];case 1:return t.sent(),[2]}}))}))}($i(e.l_,e.af))];case 1:return i.sent(),r.resolve(),[3,3];case 2:return n=i.sent(),r.reject(n),[3,3];case 3:return[2]}}))}))})),r.promise},e}(),Vs=function(){function e(n,r,i){var o=this;if(void 0===i&&(i=new Fs),this.hf=i,this.cf=null,this.rf=new lr,this.INTERNAL={delete:function(){return Object(t.b)(o,void 0,void 0,(function(){return Object(t.d)(this,(function(e){switch(e.label){case 0:return this.uf(),[4,this.lf.terminate()];case 1:return e.sent(),[2]}}))}))}},"object"==typeof n.options){var a=n;this.cf=a,this.l_=e._f(a),this.af=a.name,this.ff=new po(r)}else{var s=n;if(!s.projectId)throw new c(u.INVALID_ARGUMENT,"Must provide projectId");this.l_=new I(s.projectId,s.database),this.af="[DEFAULT]",this.ff=new ho}this.df=new Ls({})}return Object.defineProperty(e.prototype,"wf",{get:function(){return this.Ef||(this.Ef=new ms(this.l_,this.df.ignoreUndefinedProperties)),this.Ef},enumerable:!1,configurable:!0}),e.prototype.settings=function(e){e.merge&&delete(e=Object.assign(Object.assign({},this.df),e)).merge;var t=new Ls(e);if(this.lf&&!this.df.isEqual(t))throw new c(u.FAILED_PRECONDITION,"Firestore has already been started and its settings can no longer be changed. You can only modify settings before calling any other methods on a Firestore object.");this.df=t,void 0!==t.credentials&&(this.ff=function(e){if(!e)return new ho;switch(e.type){case"gapi":var t=e.client;return m(!("object"!=typeof t||null===t||!t.auth||!t.auth.getAuthHeaderValueForFirstParty)),new yo(t,e.sessionIndex||"0");case"provider":return e.client;default:throw new c(u.INVALID_ARGUMENT,"makeCredentialsProvider failed due to invalid credential type")}}(t.credentials))},e.prototype.useEmulator=function(e,t){"firestore.googleapis.com"!==this.df.host&&p("Host has been set in both settings() and useEmulator(), emulator host will be used"),this.settings({host:e+":"+t,ssl:!1,merge:!0})},e.prototype.enableNetwork=function(){return this.uf(),this.lf.enableNetwork()},e.prototype.disableNetwork=function(){return this.uf(),this.lf.disableNetwork()},e.prototype.enablePersistence=function(e){if(this.lf)throw new c(u.FAILED_PRECONDITION,"Firestore has already been started and persistence can no longer be enabled. You can only call enablePersistence() before calling any other methods on a Firestore object.");var t=!1,n=!1;return e&&$a("synchronizeTabs",t=!!e.synchronizeTabs,"experimentalForceOwningTab",n=!!e.experimentalForceOwningTab),t?this.hf.enableMultiTabIndexedDbPersistence(this):this.hf.enableIndexedDbPersistence(this,n)},e.prototype.clearPersistence=function(){return Object(t.b)(this,void 0,void 0,(function(){return Object(t.d)(this,(function(e){if(void 0!==this.lf&&!this.lf.j_)throw new c(u.FAILED_PRECONDITION,"Persistence can only be cleared before a Firestore instance is initialized or after it is terminated.");return[2,this.hf.clearIndexedDbPersistence(this)]}))}))},e.prototype.terminate=function(){return this.app._removeServiceInstance("firestore"),this.INTERNAL.delete()},Object.defineProperty(e.prototype,"Tf",{get:function(){return this.uf(),this.lf.j_},enumerable:!1,configurable:!0}),e.prototype.waitForPendingWrites=function(){return this.uf(),this.lf.waitForPendingWrites()},e.prototype.onSnapshotsInSync=function(e){if(this.uf(),As(e))return this.lf.W_(e);var t={next:e};return this.lf.W_(t)},e.prototype.uf=function(){return this.lf||this.if(new Wa,new Ga),this.lf},e.prototype.If=function(){return new x(this.l_,this.af,this.df.host,this.df.ssl,this.df.experimentalForceLongPolling,this.df.experimentalAutoDetectLongPolling)},e.prototype.if=function(e,t){var n=this.If();return this.lf=new Rs(this.ff,this.rf),this.lf.start(n,e,t)},e._f=function(e){if(t=e.options,!Object.prototype.hasOwnProperty.call(t,"projectId"))throw new c(u.INVALID_ARGUMENT,'"projectId" not provided in firebase.initializeApp.');var t,n=e.options.projectId;if(!n||"string"!=typeof n)throw new c(u.INVALID_ARGUMENT,"projectId must be a string in FirebaseApp.options");return new I(n)},Object.defineProperty(e.prototype,"app",{get:function(){if(!this.cf)throw new c(u.FAILED_PRECONDITION,"Firestore was not initialized using the Firebase SDK. 'app' is not available");return this.cf}
2,enumerable:!1,configurable:!0}),e.prototype.collection=function(e){return Ya("Firestore.collection","path",e),this.uf(),new Zs(F.q(e),this,null)},e.prototype.doc=function(e){return Ya("Firestore.doc","path",e),this.uf(),Ws.mf(F.q(e),this,null)},e.prototype.collectionGroup=function(e){if(Ya("Firestore.collectionGroup","collectionId",e),e.indexOf("/")>=0)throw new c(u.INVALID_ARGUMENT,"Invalid collection ID '"+e+"' passed to function Firestore.collectionGroup(). Collection IDs must not contain '/'.");return this.uf(),new Xs(function(e){return new vn(F.U(),e)}(e),this,null)},e.prototype.runTransaction=function(e){var t=this;return this.uf().transaction((function(n){return e(new Bs(t,n))}))},e.prototype.batch=function(){return this.uf(),new qs(this)},e.prototype.sf=function(){return this.df},e}(),Bs=function(){function e(e,t){this.Af=e,this.Rf=t}return e.prototype.get=function(e){var t=this,n=eu("Transaction.get",e,this.Af);return this.Rf.b_([n.__]).then((function(e){if(!e||1!==e.length)return y();var r=e[0];if(r instanceof dn)return new Hs(t.Af,n.__,null,!1,!1,n.f_);if(r instanceof hn)return new Hs(t.Af,n.__,r,!1,!1,n.f_);throw y()}))},e.prototype.set=function(e,t,n){var r=eu("Transaction.set",e,this.Af);n=Qa("Transaction.set",n);var i=nu(r.f_,t,n),o=gs(this.Af.wf,"Transaction.set",r.__,i,null!==r.f_,n);return this.Rf.set(r.__,o),this},e.prototype.update=function(e,t,n){for(var r,i,o=[],a=3;a<arguments.length;a++)o[a-3]=arguments[a];return"string"==typeof t||t instanceof es?(r=eu("Transaction.update",e,this.Af),i=_s(this.Af.wf,"Transaction.update",r.__,t,n,o)):(r=eu("Transaction.update",e,this.Af),i=bs(this.Af.wf,"Transaction.update",r.__,t)),this.Rf.update(r.__,i),this},e.prototype.delete=function(e){var t=eu("Transaction.delete",e,this.Af);return this.Rf.delete(t.__),this},e}(),qs=function(){function e(e){this.Af=e,this.Pf=[],this.gf=!1}return e.prototype.set=function(e,t,n){this.Vf();var r=eu("WriteBatch.set",e,this.Af);n=Qa("WriteBatch.set",n);var i=nu(r.f_,t,n),o=gs(this.Af.wf,"WriteBatch.set",r.__,i,null!==r.f_,n);return this.Pf=this.Pf.concat(o.d_(r.__,Ht.ze())),this},e.prototype.update=function(e,t,n){for(var r,i,o=[],a=3;a<arguments.length;a++)o[a-3]=arguments[a];return this.Vf(),"string"==typeof t||t instanceof es?(r=eu("WriteBatch.update",e,this.Af),i=_s(this.Af.wf,"WriteBatch.update",r.__,t,n,o)):(r=eu("WriteBatch.update",e,this.Af),i=bs(this.Af.wf,"WriteBatch.update",r.__,t)),this.Pf=this.Pf.concat(i.d_(r.__,Ht.exists(!0))),this},e.prototype.delete=function(e){this.Vf();var t=eu("WriteBatch.delete",e,this.Af);return this.Pf=this.Pf.concat(new an(t.__,Ht.ze())),this},e.prototype.commit=function(){return this.Vf(),this.gf=!0,this.Pf.length>0?this.Af.uf().write(this.Pf):Promise.resolve()},e.prototype.Vf=function(){if(this.gf)throw new c(u.FAILED_PRECONDITION,"A write batch can no longer be used after commit() has been called.")},e}(),Ws=function(e){function n(t,n,r){var i=this;return(i=e.call(this,n.l_,t,r)||this).__=t,i.firestore=n,i.f_=r,i.lf=i.firestore.uf(),i}return Object(t.c)(n,e),n.mf=function(e,t,r){if(e.length%2!=0)throw new c(u.INVALID_ARGUMENT,"Invalid document reference. Document references must have an even number of segments, but "+e.B()+" has "+e.length);return new n(new B(e),t,r)},Object.defineProperty(n.prototype,"id",{get:function(){return this.__.path.O()},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"parent",{get:function(){return new Zs(this.__.path.F(),this.firestore,this.f_)},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"path",{get:function(){return this.__.path.B()},enumerable:!1,configurable:!0}),n.prototype.collection=function(e){if(Ya("DocumentReference.collection","path",e),!e)throw new c(u.INVALID_ARGUMENT,"Must provide a non-empty collection name to collection()");var t=F.q(e);return new Zs(this.__.path.child(t),this.firestore,null)},n.prototype.isEqual=function(e){return e instanceof n&&this.firestore===e.firestore&&this.__.isEqual(e.__)&&this.f_===e.f_},n.prototype.set=function(e,t){t=Qa("DocumentReference.set",t);var n=nu(this.f_,e,t),r=gs(this.firestore.wf,"DocumentReference.set",this.__,n,null!==this.f_,t);return this.lf.write(r.d_(this.__,Ht.ze()))},n.prototype.update=function(e,t){for(var n,r=[],i=2;i<arguments.length;i++)r[i-2]=arguments[i];return n="string"==typeof e||e instanceof es?_s(this.firestore.wf,"DocumentReference.update",this.__,e,t,r):bs(this.firestore.wf,"DocumentReference.update",this.__,e),this.lf.write(n.d_(this.__,Ht.exists(!0)))},n.prototype.delete=function(){return this.lf.write([new an(this.__,Ht.ze())])},n.prototype.onSnapshot=function(){for(var e,t,n,r=this,i=[],o=0;o<arguments.length;o++)i[o]=arguments[o];var a={includeMetadataChanges:!1},s=0;"object"!=typeof i[s]||As(i[s])||(a=i[s],s++);var u={includeMetadataChanges:a.includeMetadataChanges};if(As(i[s])){var c=i[s];
2i[s]=null===(e=c.next)||void 0===e?void 0:e.bind(c),i[s+1]=null===(t=c.error)||void 0===t?void 0:t.bind(c),i[s+2]=null===(n=c.complete)||void 0===n?void 0:n.bind(c)}var l={next:function(e){i[s]&&i[s](r.yf(e))},error:i[s+1],complete:i[s+2]};return this.lf.listen(mn(this.__.path),u,l)},n.prototype.get=function(e){var t=this,n=this.firestore.uf();return e&&"cache"===e.source?n.q_(this.__).then((function(e){return new Hs(t.firestore,t.__,e,!0,e instanceof hn&&e.Ye,t.f_)})):n.U_(this.__,e).then((function(e){return t.yf(e)}))},n.prototype.withConverter=function(e){return new n(this.__,this.firestore,e)},n.prototype.yf=function(e){var t=e.docs.get(this.__);return new Hs(this.firestore,this.__,t,e.fromCache,e.hasPendingWrites,this.f_)},n}(hs),zs=function(){function e(e,t){this.hasPendingWrites=e,this.fromCache=t}return e.prototype.isEqual=function(e){return this.hasPendingWrites===e.hasPendingWrites&&this.fromCache===e.fromCache},e}(),Hs=function(){function e(e,t,n,r,i,o){this.Af=e,this.__=t,this.pf=n,this.bf=r,this.vf=i,this.f_=o}return e.prototype.data=function(e){var t=this;if(void 0===e&&(e={}),this.pf){if(this.f_){var n=new Gs(this.Af,this.__,this.pf,this.bf,this.vf,null);return this.f_.fromFirestore(n,e)}return new Ms(this.Af.l_,e.serverTimestamps||"none",(function(e){return new Ws(e,t.Af,null)}),(function(e){return new P(e)})).J_(this.pf.rn())}},e.prototype.get=function(e,t){var n=this;if(void 0===t&&(t={}),this.pf){var r=this.pf.data().field(Ts("DocumentSnapshot.get",e,this.__));if(null!==r)return new Ms(this.Af.l_,t.serverTimestamps||"none",(function(e){return new Ws(e,n.Af,n.f_)}),(function(e){return new P(e)})).J_(r)}},Object.defineProperty(e.prototype,"id",{get:function(){return this.__.path.O()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"ref",{get:function(){return new Ws(this.__,this.Af,this.f_)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"exists",{get:function(){return null!==this.pf},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"metadata",{get:function(){return new zs(this.vf,this.bf)},enumerable:!1,configurable:!0}),e.prototype.isEqual=function(t){return t instanceof e&&this.Af===t.Af&&this.bf===t.bf&&this.__.isEqual(t.__)&&(null===this.pf?null===t.pf:this.pf.isEqual(t.pf))&&this.f_===t.f_},e}(),Gs=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return Object(t.c)(n,e),n.prototype.data=function(t){return e.prototype.data.call(this,t)},n}(Hs);function Ks(e,t,n){if("string"==typeof n){if(""===n)throw new c(u.INVALID_ARGUMENT,"Invalid query. When querying with FieldPath.documentId(), you must provide a valid document ID, but it was an empty string.");if(!kn(t)&&-1!==n.indexOf("/"))throw new c(u.INVALID_ARGUMENT,"Invalid query. When querying a collection by FieldPath.documentId(), you must provide a plain document ID, but '"+n+"' contains a '/' character.");var r=t.path.child(F.q(n));if(!B.X(r))throw new c(u.INVALID_ARGUMENT,"Invalid query. When querying a collection group by FieldPath.documentId(), the value provided must result in a valid document path, but '"+r+"' is not because it has an odd number of segments ("+r.length+").");return We(e,new B(r))}if(n instanceof hs)return We(e,n.__);throw new c(u.INVALID_ARGUMENT,"Invalid query. When querying with FieldPath.documentId(), you must provide a valid string or a DocumentReference, but it was: "+Xa(n)+".")}function Ys(e,t){if(!Array.isArray(e)||0===e.length)throw new c(u.INVALID_ARGUMENT,"Invalid Query. A non-empty array is required for '"+t.toString()+"' filters.");if(e.length>10)throw new c(u.INVALID_ARGUMENT,"Invalid Query. '"+t.toString()+"' filters support a maximum of 10 elements in the value array.")}function Qs(e,t,n){if(!n.isEqual(t))throw new c(u.INVALID_ARGUMENT,"Invalid query. You have a where filter with an inequality (<, <=, >, or >=) on field '"+t.toString()+"' and so you must also use '"+t.toString()+"' as your first orderBy(), but your first orderBy() is on field '"+n.toString()+"' instead.")}function $s(e){if(bn(e)&&0===e.on.length)throw new c(u.UNIMPLEMENT
2ED,"limitToLast() queries require specifying at least one orderBy() clause")}var Xs=function(){function e(e,t,n){this.Sf=e,this.firestore=t,this.f_=n}return e.prototype.where=function(t,n,r){var i=Ts("Query.where",t),o=function(e,t,n,r,i,o,a){var s;if(i.W()){if("array-contains"===o||"array-contains-any"===o)throw new c(u.INVALID_ARGUMENT,"Invalid Query. You can't perform '"+o+"' queries on FieldPath.documentId().");if("in"===o||"not-in"===o){Ys(a,o);for(var l=[],f=0,h=a;f<h.length;f++){var d=h[f];l.push(Ks(r,e,d))}s={arrayValue:{values:l}}}else s=Ks(r,e,a)}else"in"!==o&&"not-in"!==o&&"array-contains-any"!==o||Ys(a,o),s=ws(n,"Query.where",a,"in"===o||"not-in"===o);var p=An.create(i,o,s);return function(e,t){if(t.un()){var n=wn(e);if(null!==n&&!n.isEqual(t.field))throw new c(u.INVALID_ARGUMENT,"Invalid query. All where filters with an inequality (<, <=, >, or >=) must be on the same field. But you have inequality filters on '"+n.toString()+"' and '"+t.field.toString()+"'");var r=_n(e);null!==r&&Qs(0,t.field,r)}var i=function(e,t){for(var n=0,r=e.filters;n<r.length;n++){var i=r[n];if(t.indexOf(i.op)>=0)return i.op}return null}(e,function(e){switch(e){case"!=":return["!=","not-in"];case"array-contains":return["array-contains","array-contains-any","not-in"];case"in":return["array-contains-any","in","not-in"];case"array-contains-any":return["array-contains","array-contains-any","in","not-in"];case"not-in":return["array-contains","array-contains-any","in","not-in","!="];default:return[]}}(t.op));if(null!==i)throw i===t.op?new c(u.INVALID_ARGUMENT,"Invalid query. You cannot use more than one '"+t.op.toString()+"' filter."):new c(u.INVALID_ARGUMENT,"Invalid query. You cannot use '"+t.op.toString()+"' filters with '"+i.toString()+"' filters.")}(e,p),p}(this.Sf,0,this.firestore.wf,this.firestore.l_,i,n,r);return new e(function(e,t){var n=e.filters.concat([t]);return new vn(e.path,e.collectionGroup,e.on.slice(),n,e.limit,e.an,e.startAt,e.endAt)}(this.Sf,o),this.firestore,this.f_)},e.prototype.orderBy=function(t,n){var r;if(void 0===n||"asc"===n)r="asc";else{if("desc"!==n)throw new c(u.INVALID_ARGUMENT,"Function Query.orderBy() has unknown direction '"+n+"', expected 'asc' or 'desc'.");r="desc"}var i=Ts("Query.orderBy",t),o=function(e,t,n){if(null!==e.startAt)throw new c(u.INVALID_ARGUMENT,"Invalid query. You must not call startAt() or startAfter() before calling orderBy().");if(null!==e.endAt)throw new c(u.INVALID_ARGUMENT,"Invalid query. You must not call endAt() or endBefore() before calling orderBy().");var r=new Gn(t,n);return function(e,t){if(null===_n(e)){var n=wn(e);null!==n&&Qs(0,n,t.field)}}(e,r),r}(this.Sf,i,r);return new e(function(e,t){var n=e.on.concat([t]);return new vn(e.path,e.collectionGroup,n,e.filters.slice(),e.limit,e.an,e.startAt,e.endAt)}(this.Sf,o),this.firestore,this.f_)},e.prototype.limit=function(t){return Ja("Query.limit",t),new e(En(this.Sf,t,"F"),this.firestore,this.f_)},e.prototype.limitToLast=function(t){return Ja("Query.limitToLast",t),new e(En(this.Sf,t,"L"),this.firestore,this.f_)},e.prototype.startAt=function(t){for(var n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];var i=this.Df("Query.startAt",t,n,!0);return new e(Tn(this.Sf,i),this.firestore,this.f_)},e.prototype.startAfter=function(t){for(var n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];var i=this.Df("Query.startAfter",t,n,!1);return new e(Tn(this.Sf,i),this.firestore,this.f_)},e.prototype.endBefore=function(t){for(var n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];var i=this.Df("Query.endBefore",t,n,!0);return new e(Cn(this.Sf,i),this.firestore,this.f_)},e.prototype.endAt=function(t){for(var n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];var i=this.Df("Query.endAt",t,n,!1);return new e(Cn(this.Sf,i),this.firestore,this.f_)},e.prototype.isEqual=function(t){return t instanceof e&&this.firestore===t.firestore&&Pn(this.Sf,t.Sf)&&this.f_===t.f_},e.prototype.withConverter=function(t){return new e(this.Sf,this.firestore,t)},e.prototype.Df=function(e,t,n,r){if(t instanceof Hs)return function(e,t,n,r,i){if(!r)throw new c(u.NOT_FOUND,"Can't use a DocumentSnapshot that doesn't exist for "+n+"().");for(var o=[],a=0,s=Sn(e);a<s.length;a++){var l=s[a];if(l.field.W())o.push(We(t,r.key));else{var f=r.field(l.field);if(xe(f))throw new c(u.INVALID_ARGUMENT,'Invalid query. You are trying to start or end a query using a document for which the field "'+l.field+'" is an uncommitted server timestamp. (Since the value of this field is unknown, you cannot start/end a query with it.)');if(null===f){var h=l.field.B();throw new c(u.INVALID_ARGUMENT,"Invalid query. You are trying to start or end a query using a document for which the field '"+h+"' (used as the orderBy) does not exist.")}o.push(f)}}return new qn(o,i)}(this.Sf,this.firestore.l_,e,t.pf,r);var i=[t].concat(n);return function(e,t,n,r,i,o){var a=e.on;if(i.length>a.length)throw new c(u.INVALID_ARGUMENT,"Too many arguments provided to "+r+"(). The number of arguments must be less than or equal to the number of orderBy() clauses");for(var s=[],l=0;l<i.length;l++){var f=i[l];if(a[l].field.W()){if("string"!=typeof f)throw new c(u.INVALID_ARGUMENT,"Invalid query. Expected a string for document ID in "+r+"(), but got a "+typeof f);if(!kn(e)&&-1!==f.indexOf("/"))throw new c(u.INVALID_ARGUMENT,"Invalid query. When querying a collection and ordering by FieldPath.documentId(), the value passed to "+r+"() must be a plain document ID, but '"+f+"' contains a slash.");var h=e.path.child(F.q(f));if(!B.X(h))throw new c(u.INVALID_ARGUMENT,"Invalid query. When querying a collection group and ordering by FieldPath.documentId(), the value passed to "+r+"() must result in a valid document path, but '"+h+"' is not because it c
2ontains an odd number of segments.");var d=new B(h);s.push(We(t,d))}else{var p=ws(n,r,f);s.push(p)}}return new qn(s,o)}(this.Sf,this.firestore.l_,this.firestore.wf,e,i,r)},e.prototype.onSnapshot=function(){for(var e,t,n,r=this,i=[],o=0;o<arguments.length;o++)i[o]=arguments[o];var a={},s=0;if("object"!=typeof i[s]||As(i[s])||(a=i[s],s++),As(i[s])){var u=i[s];i[s]=null===(e=u.next)||void 0===e?void 0:e.bind(u),i[s+1]=null===(t=u.error)||void 0===t?void 0:t.bind(u),i[s+2]=null===(n=u.complete)||void 0===n?void 0:n.bind(u)}var c={next:function(e){i[s]&&i[s](new Js(r.firestore,r.Sf,e,r.f_))},error:i[s+1],complete:i[s+2]};return $s(this.Sf),this.firestore.uf().listen(this.Sf,a,c)},e.prototype.get=function(e){var t=this;$s(this.Sf);var n=this.firestore.uf();return(e&&"cache"===e.source?n.K_(this.Sf):n.Q_(this.Sf,e)).then((function(e){return new Js(t.firestore,t.Sf,e,t.f_)}))},e}(),Js=function(){function e(e,t,n,r){this.Af=e,this.Cf=t,this.Nf=n,this.f_=r,this.xf=null,this.Ff=null,this.metadata=new zs(n.hasPendingWrites,n.fromCache)}return Object.defineProperty(e.prototype,"docs",{get:function(){var e=[];return this.forEach((function(t){return e.push(t)})),e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"empty",{get:function(){return this.Nf.docs.P()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"size",{get:function(){return this.Nf.docs.size},enumerable:!1,configurable:!0}),e.prototype.forEach=function(e,t){var n=this;this.Nf.docs.forEach((function(r){e.call(t,n.kf(r,n.metadata.fromCache,n.Nf.Qt.has(r.key)))}))},Object.defineProperty(e.prototype,"query",{get:function(){return new Xs(this.Cf,this.Af,this.f_)},enumerable:!1,configurable:!0}),e.prototype.docChanges=function(e){var t=!(!e||!e.includeMetadataChanges);if(t&&this.Nf.jt)throw new c(u.INVALID_ARGUMENT,"To include metadata changes with your document changes, you must also pass { includeMetadataChanges:true } to onSnapshot().");return this.xf&&this.Ff===t||(this.xf=function(e,t,n){if(e.Kt.P()){var r=0;return e.docChanges.map((function(t){var i=n(t.doc,e.fromCache,e.Qt.has(t.doc.key));return t.doc,{type:"added",doc:i,oldIndex:-1,newIndex:r++}}))}var i=e.Kt;return e.docChanges.filter((function(e){return t||3!==e.type})).map((function(t){var r=n(t.doc,e.fromCache,e.Qt.has(t.doc.key)),o=-1,a=-1;return 0!==t.type&&(o=i.indexOf(t.doc.key),i=i.delete(t.doc.key)),1!==t.type&&(a=(i=i.add(t.doc)).indexOf(t.doc.key)),{type:tu(t.type),doc:r,oldIndex:o,newIndex:a}}))}(this.Nf,t,this.kf.bind(this)),this.Ff=t),this.xf},e.prototype.isEqual=function(t){return t instanceof e&&this.Af===t.Af&&Pn(this.Cf,t.Cf)&&this.Nf.isEqual(t.Nf)&&this.f_===t.f_},e.prototype.kf=function(e,t,n){return new Gs(this.Af,e.key,e,t,n,this.f_)},e}(),Zs=function(e){function n(t,n,r){var i=this;if((i=e.call(this,mn(t),n,r)||this).Of=t,t.length%2!=1)throw new c(u.INVALID_ARGUMENT,"Invalid collection reference. Collection references must have an odd number of segments, but "+t.B()+" has "+t.length);return i}return Object(t.c)(n,e),Object.defineProperty(n.prototype,"id",{get:function(){return this.Sf.path.O()},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"parent",{get:function(){var e=this.Sf.path.F();return e.P()?null:new Ws(new B(e),this.firestore,null)},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"path",{get:function(){return this.Sf.path.B()},enumerable:!1,configurable:!0}),n.prototype.doc=function(e){0===arguments.length&&(e=_.t()),Ya("CollectionReference.doc","path",e);var t=F.q(e);return Ws.mf(this.Sf.path.child(t),this.firestore,this.f_)},n.prototype.add=function(e){var t=this.f_?this.f_.toFirestore(e):e,n=this.doc();return new Ws(n.__,this.firestore,null).set(t).then((function(){return n}))},n.prototype.withConverter=function(e){return new n(this.Of,this.firestore,e)},n}(Xs);function eu(e,t,n){var r=function(e,t){if(!(e instanceof t)){if(t.name===e.constructor.name)throw new c(u.INVALID_ARGUMENT,"Type does not match the expected instance. Did you pass a reference from a different Firestore SDK?");var n=Xa(e);throw new c(u.INVALID_ARGUMENT,"Expected type '"+t.name+"', but it was: "+n)}return e}(t,Ws);if(r.firestore!==n)throw new c(u.INVALID_ARGUMENT,"Provided document reference is from a different Firestore instance.");return r}function tu(e){switch(e){case 0:return"added";case 2:case 3:return"modified";case 1:return"removed";default:return y()}}function nu(e,t,n){return e?n&&(n.merge||n.mergeFields)?e.toFirestore(t,n):e.toFirestore(t):t}var ru,iu=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return Object(t.c)(n,e),n.serverTimestamp=function(){var e=new os("serverTimestamp");return e.t_="FieldValue.serverTimestamp",new n(e)},n.delete=function(){var e=new rs("deleteField");return e.t_="FieldValue.delete",new n(e)},n.arrayUnion=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return new as("arrayUnion",e)}.apply(void 0,e);return r.t_="FieldValue.arrayUnion",new n(r)},n.arrayRemove=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return new ss("arrayRemove",e)}.apply(void 0,e);return r.t_="FieldValue.arrayRemove",new n(r)},n.increment=function(e){var t=function(e){return new us("increment",e)}(e);return t.t_="FieldValue.increment",new n(t)},n.prototype.isEqual=function(e){return this.u_.isEqual(e.u_)},n}(ls),ou={Firestore:Vs,GeoPoint:cs,Timestamp:N,Blob:P,Transaction:Bs,WriteBatch:qs,DocumentReference:Ws,DocumentSnapshot:Hs,Query:Xs,QueryDocumentSnapshot:Gs,QuerySnapsh
2ot:Js,CollectionReference:Zs,FieldPath:es,FieldValue:iu,setLogLevel:function(e){var t;t=e,l.setLogLevel(t)},CACHE_SIZE_UNLIMITED:Ns};(function(e,t){e.INTERNAL.registerComponent(new s.a("firestore",(function(e){return function(e,t){return new Vs(e,t,new Us)}(e.getProvider("app").getImmediate(),e.getProvider("auth-internal"))}),"PUBLIC").setServiceProps(Object.assign({},ou)))})(ru=r.a),ru.registerVersion("@firebase/firestore","2.0.0")}).call(this,n(98))},function(e,t,n){"use strict";n(319)},function(e,t,n){"use strict";(function(e,t){var r=n(11),i=n(2),o=n(3),a=n(37),s=n(33),u=function(){function e(e){this.domStorage_=e,this.prefix_="firebase:"}return e.prototype.set=function(e,t){null==t?this.domStorage_.removeItem(this.prefixedName_(e)):this.domStorage_.setItem(this.prefixedName_(e),Object(o.J)(t))},e.prototype.get=function(e){var t=this.domStorage_.getItem(this.prefixedName_(e));return null==t?null:Object(o.D)(t)},e.prototype.remove=function(e){this.domStorage_.removeItem(this.prefixedName_(e))},e.prototype.prefixedName_=function(e){return this.prefix_+e},e.prototype.toString=function(){return this.domStorage_.toString()},e}(),c=function(){function e(){this.cache_={},this.isInMemoryStorage=!0}return e.prototype.set=function(e,t){null==t?delete this.cache_[e]:this.cache_[e]=t},e.prototype.get=function(e){return Object(o.k)(this.cache_,e)?this.cache_[e]:null},e.prototype.remove=function(e){delete this.cache_[e]},e}(),l=function(e){try{if("undefined"!==typeof window&&"undefined"!==typeof window[e]){var t=window[e];return t.setItem("firebase:sentinel","cache"),t.removeItem("firebase:sentinel"),new u(t)}}catch(n){}return new c},f=l("localStorage"),h=l("sessionStorage"),d=new a.b("@firebase/database"),p=function(){var e=1;return function(){return e++}}(),v=function(e){var t=Object(o.I)(e),n=new o.d;n.update(t);var r=n.digest();return o.h.encodeByteArray(r)},y=function e(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];for(var r="",i=0;i<t.length;i++){var a=t[i];Array.isArray(a)||a&&"object"===typeof a&&"number"===typeof a.length?r+=e.apply(null,a):r+="object"===typeof a?Object(o.J)(a):a,r+=" "}return r},m=null,g=!0,b=function(e,t){Object(o.f)(!t||!0===e||!1===e,"Can't turn on custom loggers persistently."),!0===e?(d.logLevel=a.a.VERBOSE,m=d.log.bind(d),t&&h.set("logging_enabled",!0)):"function"===typeof e?m=e:(m=null,h.remove("logging_enabled"))},_=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];if(!0===g&&(g=!1,null===m&&!0===h.get("logging_enabled")&&b(!0)),m){var n=y.apply(null,e);m(n)}},w=function(e){return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];_.apply(void 0,Object(i.f)([e],t))}},k=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n="FIREBASE INTERNAL ERROR: "+y.apply(void 0,Object(i.f)(e));d.error(n)},S=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n="FIREBASE FATAL ERROR: "+y.apply(void 0,Object(i.f)(e));throw d.error(n),new Error(n)},O=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n="FIREBASE WARNING: "+y.apply(void 0,Object(i.f)(e));d.warn(n)},E=function(e){return"number"===typeof e&&(e!==e||e===Number.POSITIVE_INFINITY||e===Number.NEGATIVE_INFINITY)},T="[MIN_NAME]",C="[MAX_NAME]",P=function(e,t){if(e===t)return 0;if(e===T||t===C)return-1;if(t===T||e===C)return 1;var n=L(e),r=L(t);return null!==n?null!==r?n-r===0?e.length-t.length:n-r:-1:null!==r?1:e<t?-1:1},x=function(e,t){return e===t?0:e<t?-1:1},I=function(e,t){if(t&&e in t)return t[e];throw new Error("Missing required key ("+e+") in object: "+Object(o.J)(t))},j=function e(t){if("object"!==typeof t||null===t)return Object(o.J)(t);var n=[];for(var r in t)n.push(r);n.sort();for(var i="{",a=0;a<n.length;a++)0!==a&&(i+=","),i+=Object(o.J)(n[a]),i+=":",i+=e(t[n[a]]);return i+="}"},R=function(e,t){var n=e.length;if(n<=t)return[e];for(var r=[],i=0;i<n;i+=t)i+t>n?r.push(e.substring(i,n)):r.push(e.substring(i,i+t));return r};function A(e,t){for(var n in e)e.hasOwnProperty(n)&&t(n,e[n])}var M=function(e){Object(o.f)(!E(e),"Invalid JSON number");var t,n,r,i,a,s=1023;0===e?(n=0,r=0,t=1/e===-1/0?1:0):(t=e<0,(e=Math.abs(e))>=Math.pow(2,-1022)?(n=(i=Math.min(Math.floor(Math.log(e)/Math.LN2),s))+s,r=Math.round(e*Math.pow(2,52-i)-Math.pow(2,52))):(n=0,r=Math.round(e/Math.pow(2,-1074))));var u=[];for(a=52;a;a-=1)u.push(r%2?1:0),r=Math.floor(r/2);for(a=11;a;a-=1)u.push(n%2?1:0),n=Math.floor(n/2);u.push(t?1:0),u.reverse();var c=u.join(""),l="";for(a=0;a<64;a+=8){var f=parseInt(c.substr(a,8),2).toString(16);1===f.length&&(f="0"+f),l+=f}return l.toLowerCase()},N=new RegExp("^-?(0*)\\d{1,10}$"),L=function(e){if(N.test(e)){var t=Number(e);if(t>=-2147483648&&t<=2147483647)return t}return null},D=function(e){try{e()}catch(t){setTimeout((function(){var e=t.stack||"";throw O("Exception was thrown by user callback.",e),t}),Math.floor(0))}},F=function(e,t){var n=setTimeout(e,t);return"object"===typeof n&&n.unref&&n.unref(),n},U=function(){function e(e,t){if(void 0===t){this.pieces_=e.split("/");for(var n=0,r=0;r<this.pieces_.length;r++)this.pieces_[r].length>0&&(this.pieces_[n]=this.pieces_[r],n++);this.pieces_.length=n,this.pieceNum_=0}else this.pieces_=e,this.pieceNum_=t}return Object.defineProperty(e,"Empty",{get:function(){return new e("")}
2,enumerable:!1,configurable:!0}),e.prototype.getFront=function(){return this.pieceNum_>=this.pieces_.length?null:this.pieces_[this.pieceNum_]},e.prototype.getLength=function(){return this.pieces_.length-this.pieceNum_},e.prototype.popFront=function(){var t=this.pieceNum_;return t<this.pieces_.length&&t++,new e(this.pieces_,t)},e.prototype.getBack=function(){return this.pieceNum_<this.pieces_.length?this.pieces_[this.pieces_.length-1]:null},e.prototype.toString=function(){for(var e="",t=this.pieceNum_;t<this.pieces_.length;t++)""!==this.pieces_[t]&&(e+="/"+this.pieces_[t]);return e||"/"},e.prototype.toUrlEncodedString=function(){for(var e="",t=this.pieceNum_;t<this.pieces_.length;t++)""!==this.pieces_[t]&&(e+="/"+encodeURIComponent(String(this.pieces_[t])));return e||"/"},e.prototype.slice=function(e){return void 0===e&&(e=0),this.pieces_.slice(this.pieceNum_+e)},e.prototype.parent=function(){if(this.pieceNum_>=this.pieces_.length)return null;for(var t=[],n=this.pieceNum_;n<this.pieces_.length-1;n++)t.push(this.pieces_[n]);return new e(t,0)},e.prototype.child=function(t){for(var n=[],r=this.pieceNum_;r<this.pieces_.length;r++)n.push(this.pieces_[r]);if(t instanceof e)for(r=t.pieceNum_;r<t.pieces_.length;r++)n.push(t.pieces_[r]);else{var i=t.split("/");for(r=0;r<i.length;r++)i[r].length>0&&n.push(i[r])}return new e(n,0)},e.prototype.isEmpty=function(){return this.pieceNum_>=this.pieces_.length},e.relativePath=function(t,n){var r=t.getFront(),i=n.getFront();if(null===r)return n;if(r===i)return e.relativePath(t.popFront(),n.popFront());throw new Error("INTERNAL ERROR: innerPath ("+n+") is not within outerPath ("+t+")")},e.comparePaths=function(e,t){for(var n=e.slice(),r=t.slice(),i=0;i<n.length&&i<r.length;i++){var o=P(n[i],r[i]);if(0!==o)return o}return n.length===r.length?0:n.length<r.length?-1:1},e.prototype.equals=function(e){if(this.getLength()!==e.getLength())return!1;for(var t=this.pieceNum_,n=e.pieceNum_;t<=this.pieces_.length;t++,n++)if(this.pieces_[t]!==e.pieces_[n])return!1;return!0},e.prototype.contains=function(e){var t=this.pieceNum_,n=e.pieceNum_;if(this.getLength()>e.getLength())return!1;for(;t<this.pieces_.length;){if(this.pieces_[t]!==e.pieces_[n])return!1;++t,++n}return!0},e}(),V=function(){function e(e,t){this.errorPrefix_=t,this.parts_=e.slice(),this.byteLength_=Math.max(1,this.parts_.length);for(var n=0;n<this.parts_.length;n++)this.byteLength_+=Object(o.H)(this.parts_[n]);this.checkValid_()}return Object.defineProperty(e,"MAX_PATH_DEPTH",{get:function(){return 32},enumerable:!1,configurable:!0}),Object.defineProperty(e,"MAX_PATH_LENGTH_BYTES",{get:function(){return 768},enumerable:!1,configurable:!0}),e.prototype.push=function(e){this.parts_.length>0&&(this.byteLength_+=1),this.parts_.push(e),this.byteLength_+=Object(o.H)(e),this.checkValid_()},e.prototype.pop=function(){var e=this.parts_.pop();this.byteLength_-=Object(o.H)(e),this.parts_.length>0&&(this.byteLength_-=1)},e.prototype.checkValid_=function(){if(this.byteLength_>e.MAX_PATH_LENGTH_BYTES)throw new Error(this.errorPrefix_+"has a key path longer than "+e.MAX_PATH_LENGTH_BYTES+" bytes ("+this.byteLength_+").");if(this.parts_.length>e.MAX_PATH_DEPTH)throw new Error(this.errorPrefix_+"path specified exceeds the maximum depth that can be written ("+e.MAX_PATH_DEPTH+") or object contains a cycle "+this.toErrorString())},e.prototype.toErrorString=function(){return 0===this.parts_.length?"":"in property '"+this.parts_.join(".")+"'"},e}(),B="5",q="firebaseio.com",W="websocket",z="long_polling",H=function(){function e(e,t,n,r,i,o,a){void 0===i&&(i=!1),void 0===o&&(o=""),void 0===a&&(a=!1),this.secure=t,this.namespace=n,this.webSocketOnly=r,this.nodeAdmin=i,this.persistenceKey=o,this.includeNamespaceInQueryParams=a,this.host=e.toLowerCase(),this.domain=this.host.substr(this.host.indexOf(".")+1),this.internalHost=f.get("host:"+e)||this.host}return e.prototype.needsQueryParam=function(){return this.host!==this.internalHost||this.isCustomHost()||this.includeNamespaceInQueryParams},e.prototype.isCacheableHost=function(){return"s-"===this.internalHost.substr(0,2)},e.prototype.isDemoHost=function(){return"firebaseio-demo.com"===this.domain},e.prototype.isCustomHost=function(){return"firebaseio.com"!==this.domain&&"firebaseio-demo.com"!==this.domain},e.prototype.updateHost=function(e){e!==this.internalHost&&(this.internalHost=e,this.isCacheableHost()&&f.set("host:"+this.host,this.internalHost))},e.prototype.connectionURL=function(e,t){var n;if(Object(o.f)("string"===typeof e,"typeof type must == string"),Object(o.f)("object"===typeof t,"typeof params must == object"),e===W)n=(this.secure?"wss://":"ws://")+this.internalHost+"/.ws?";else{if(e!==z)throw new Error("Unknown connection type: "+e);n=(this.secure?"https://":"http://")+this.internalHost+"/.lp?"}this.needsQueryParam()&&(t.ns=this.namespace);var r=[];return A(t,(function(e,t){r.push(e+"="+t)}
2)),n+r.join("&")},e.prototype.toString=function(){var e=this.toURLString();return this.persistenceKey&&(e+="<"+this.persistenceKey+">"),e},e.prototype.toURLString=function(){return(this.secure?"https://":"http://")+this.host},e}();var G,K,Y=function(e,t){var n=Q(e),r=n.namespace;"firebase.com"===n.domain&&S(n.host+" is no longer supported. Please use <YOUR FIREBASE>.firebaseio.com instead"),r&&"undefined"!==r||"localhost"===n.domain||S("Cannot parse Firebase url. Please use https://<YOUR FIREBASE>.firebaseio.com"),n.secure||"undefined"!==typeof window&&window.location&&window.location.protocol&&-1!==window.location.protocol.indexOf("https:")&&O("Insecure Firebase access from a secure page. Please use https in calls to new Firebase().");var i="ws"===n.scheme||"wss"===n.scheme;return{repoInfo:new H(n.host,n.secure,r,t,i,"",r!==n.subdomain),path:new U(n.pathString)}},Q=function(e){var t="",n="",r="",o="",a="",s=!0,u="https",c=443;if("string"===typeof e){var l=e.indexOf("//");l>=0&&(u=e.substring(0,l-1),e=e.substring(l+2));var f=e.indexOf("/");-1===f&&(f=e.length);var h=e.indexOf("?");-1===h&&(h=e.length),t=e.substring(0,Math.min(f,h)),f<h&&(o=function(e){for(var t="",n=e.split("/"),r=0;r<n.length;r++)if(n[r].length>0){var i=n[r];try{i=decodeURIComponent(i.replace(/\+/g," "))}catch(o){}t+="/"+i}return t}(e.substring(f,h)));var d=function(e){var t,n,r={};"?"===e.charAt(0)&&(e=e.substring(1));try{for(var o=Object(i.h)(e.split("&")),a=o.next();!a.done;a=o.next()){var s=a.value;if(0!==s.length){var u=s.split("=");2===u.length?r[decodeURIComponent(u[0])]=decodeURIComponent(u[1]):O("Invalid query segment '"+s+"' in query '"+e+"'")}}}catch(c){t={error:c}}finally{try{a&&!a.done&&(n=o.return)&&n.call(o)}finally{if(t)throw t.error}}return r}(e.substring(Math.min(e.length,h)));(l=t.indexOf(":"))>=0?(s="https"===u||"wss"===u,c=parseInt(t.substring(l+1),10)):l=t.length;var p=t.slice(0,l);if("localhost"===p.toLowerCase())n="localhost";else if(p.split(".").length<=2)n=p;else{var v=t.indexOf(".");r=t.substring(0,v).toLowerCase(),n=t.substring(v+1),a=r}"ns"in d&&(a=d.ns)}return{host:t,port:c,domain:n,subdomain:r,secure:s,scheme:u,pathString:o,namespace:a}},$=/[\[\].#$\/\u0000-\u001F\u007F]/,X=/[\[\].#$\u0000-\u001F\u007F]/,J=10485760,Z=function(e){return"string"===typeof e&&0!==e.length&&!$.test(e)},ee=function(e){return"string"===typeof e&&0!==e.length&&!X.test(e)},te=function(e){return null===e||"string"===typeof e||"number"===typeof e&&!E(e)||e&&"object"===typeof e&&Object(o.k)(e,".sv")},ne=function(e,t,n,r,i){i&&void 0===n||re(Object(o.o)(e,t,i),n,r)},re=function e(t,n,r){var i=r instanceof U?new V(r,t):r;if(void 0===n)throw new Error(t+"contains undefined "+i.toErrorString());if("function"===typeof n)throw new Error(t+"contains a function "+i.toErrorString()+" with contents = "+n.toString());if(E(n))throw new Error(t+"contains "+n.toString()+" "+i.toErrorString());if("string"===typeof n&&n.length>J/3&&Object(o.H)(n)>J)throw new Error(t+"contains a string greater than "+"10485760 utf8 bytes "+i.toErrorString()+" ('"+n.substring(0,50)+"...')");if(n&&"object"===typeof n){var a=!1,s=!1;if(A(n,(function(n,r){if(".value"===n)a=!0;else if(".priority"!==n&&".sv"!==n&&(s=!0,!Z(n)))throw new Error(t+" contains an invalid key ("+n+") "+i.toErrorString()+'. Keys must be non-empty strings and can\'t contain ".", "#", "$", "/", "[", or "]"');i.push(n),e(t,r,i),i.pop()})),a&&s)throw new Error(t+' contains ".value" child '+i.toErrorString()+" in addition to actual children.")}},ie=function(e,t,n,r,i){if(!i||void 0!==n){var a=Object(o.o)(e,t,i);if(!n||"object"!==typeof n||Array.isArray(n))throw new Error(a+" must be an object containing the children to replace.");var s=[];A(n,(function(e,t){var n=new U(e);if(re(a,t,r.child(n)),".priority"===n.getBack()&&!te(t))throw new Error(a+"contains an invalid value for '"+n.toString()+"', which must be a valid Firebase priority (a string, finite number, server value, or null).");s.push(n)})),function(e,t){var n,r;for(n=0;n<t.length;n++)for(var i=(r=t[n]).slice(),o=0;o<i.length;o++)if(".priority"===i[o]&&o===i.length-1);
2else if(!Z(i[o]))throw new Error(e+"contains an invalid key ("+i[o]+") in path "+r.toString()+'. Keys must be non-empty strings and can\'t contain ".", "#", "$", "/", "[", or "]"');t.sort(U.comparePaths);var a=null;for(n=0;n<t.length;n++){if(r=t[n],null!==a&&a.contains(r))throw new Error(e+"contains a path "+a.toString()+" that is ancestor of another path "+r.toString());a=r}}(a,s)}},oe=function(e,t,n,r){if(!r||void 0!==n){if(E(n))throw new Error(Object(o.o)(e,t,r)+"is "+n.toString()+", but must be a valid Firebase priority (a string, finite number, server value, or null).");if(!te(n))throw new Error(Object(o.o)(e,t,r)+"must be a valid Firebase priority (a string, finite number, server value, or null).")}},ae=function(e,t,n,r){if(!r||void 0!==n)switch(n){case"value":case"child_added":case"child_removed":case"child_changed":case"child_moved":break;default:throw new Error(Object(o.o)(e,t,r)+'must be a valid event type = "value", "child_added", "child_removed", "child_changed", or "child_moved".')}},se=function(e,t,n,r){if((!r||void 0!==n)&&!Z(n))throw new Error(Object(o.o)(e,t,r)+'was an invalid key = "'+n+'". Firebase keys must be non-empty strings and can\'t contain ".", "#", "$", "/", "[", or "]").')},ue=function(e,t,n,r){if((!r||void 0!==n)&&!ee(n))throw new Error(Object(o.o)(e,t,r)+'was an invalid path = "'+n+'". Paths must be non-empty strings and can\'t contain ".", "#", "$", "[", or "]"')},ce=function(e,t,n,r){n&&(n=n.replace(/^\/*\.info(\/|$)/,"/")),ue(e,t,n,r)},le=function(e,t){if(".info"===t.getFront())throw new Error(e+" failed = Can't modify data under /.info/")},fe=function(e,t,n){var r=n.path.toString();if("string"!==typeof n.repoInfo.host||0===n.repoInfo.host.length||!Z(n.repoInfo.namespace)&&"localhost"!==n.repoInfo.host.split(":")[0]||0!==r.length&&!function(e){return e&&(e=e.replace(/^\/*\.info(\/|$)/,"/")),ee(e)}(r))throw new Error(Object(o.o)(e,t,!1)+'must be a valid firebase URL and the path can\'t contain ".", "#", "$", "[", or "]".')},he=function(e,t,n,r){if((!r||void 0!==n)&&"boolean"!==typeof n)throw new Error(Object(o.o)(e,t,r)+"must be a boolean.")},de=function(){function e(e,t){this.repo_=e,this.path_=t}return e.prototype.cancel=function(e){Object(o.K)("OnDisconnect.cancel",0,1,arguments.length),Object(o.L)("OnDisconnect.cancel",1,e,!0);var t=new o.a;return this.repo_.onDisconnectCancel(this.path_,t.wrapCallback(e)),t.promise},e.prototype.remove=function(e){Object(o.K)("OnDisconnect.remove",0,1,arguments.length),le("OnDisconnect.remove",this.path_),Object(o.L)("OnDisconnect.remove",1,e,!0);var t=new o.a;return this.repo_.onDisconnectSet(this.path_,null,t.wrapCallback(e)),t.promise},e.prototype.set=function(e,t){Object(o.K)("OnDisconnect.set",1,2,arguments.length),le("OnDisconnect.set",this.path_),ne("OnDisconnect.set",1,e,this.path_,!1),Object(o.L)("OnDisconnect.set",2,t,!0);var n=new o.a;return this.repo_.onDisconnectSet(this.path_,e,n.wrapCallback(t)),n.promise},e.prototype.setWithPriority=function(e,t,n){Object(o.K)("OnDisconnect.setWithPriority",2,3,arguments.length),le("OnDisconnect.setWithPriority",this.path_),ne("OnDisconnect.setWithPriority",1,e,this.path_,!1),oe("OnDisconnect.setWithPriority",2,t,!1),Object(o.L)("OnDisconnect.setWithPriority",3,n,!0);var r=new o.a;return this.repo_.onDisconnectSetWithPriority(this.path_,e,t,r.wrapCallback(n)),r.promise},e.prototype.update=function(e,t){if(Object(o.K)("OnDisconnect.update",1,2,arguments.length),le("OnDisconnect.update",this.path_),Array.isArray(e)){for(var n={},r=0;r<e.length;++r)n[""+r]=e[r];e=n,O("Passing an Array to firebase.database.onDisconnect().update() is deprecated. Use set() if you want to overwrite the existing data, or an Object with integer keys if you really do want to only update some of the children.")}ie("OnDisconnect.update",1,e,this.path_,!1),Object(o.L)("OnDisconnect.update",2,t,!0);var i=new o.a;return this.repo_.onDisconnectUpdate(this.path_,e,i.wrapCallback(t)),i.promise},e}(),pe=function(){function e(e,t){this.committed=e,this.snapshot=t}return e.prototype.toJSON=function(){return Object(o.K)("TransactionResult.toJSON",0,1,arguments.length),{committed:this.committed,snapshot:this.snapshot.toJSON()}},e}(),ve=function(){var e="-0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ_abcdefghijklmnopqrstuvwxyz",t=0,n=[];return function(r){var i,a=r===t;t=r;var s=new Array(8);for(i=7;i>=0;i--)s[i]=e.charAt(r%64),r=Math.floor(r/64);Object(o.f)(0===r,"Cannot push at time == 0");var u=s.join("");if(a){for(i=11;i>=0&&63===n[i];i--)n[i]=0;n[i]++}else for(i=0;i<12;i++)n[i]=Math.floor(64*Math.random());for(i=0;i<12;i++)u+=e.charAt(n[i]);return Object(o.f)(20===u.length,"nextPushId: Length should be 20."),u}}(),ye=function(){function e(e,t){this.name=e,this.node=t}return e.Wrap=function(t,n){return new e(t,n)},e}(),me=function(){function e(){}return e.prototype.getCompare=function(){return this.compare.bind(this)},e.prototype.indexedValueChanged=function(e,t){var n=new ye(T,e),r=new ye(T,t);return 0!==this.compare(n,r)},e.prototype.minPost=function(){return ye.MIN},e}(),ge=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Object(i.c)(t,e),Object.defineProperty(t,"__EMPTY_NODE",{get:function(){return G},set:function(e){G=e}
2,enumerable:!1,configurable:!0}),t.prototype.compare=function(e,t){return P(e.name,t.name)},t.prototype.isDefinedOn=function(e){throw Object(o.g)("KeyIndex.isDefinedOn not expected to be called.")},t.prototype.indexedValueChanged=function(e,t){return!1},t.prototype.minPost=function(){return ye.MIN},t.prototype.maxPost=function(){return new ye(C,G)},t.prototype.makePost=function(e,t){return Object(o.f)("string"===typeof e,"KeyIndex indexValue must always be a string."),new ye(e,G)},t.prototype.toString=function(){return".key"},t}(me),be=new ge;var _e,we,ke,Se=function(e){return"number"===typeof e?"number:"+M(e):"string:"+e},Oe=function(e){if(e.isLeafNode()){var t=e.val();Object(o.f)("string"===typeof t||"number"===typeof t||"object"===typeof t&&Object(o.k)(t,".sv"),"Priority must be a string or number.")}else Object(o.f)(e===K||e.isEmpty(),"priority of unexpected type.");Object(o.f)(e===K||e.getPriority().isEmpty(),"Priority nodes can't have a priority of their own.")},Ee=function(){function e(t,n){void 0===n&&(n=e.__childrenNodeConstructor.EMPTY_NODE),this.value_=t,this.priorityNode_=n,this.lazyHash_=null,Object(o.f)(void 0!==this.value_&&null!==this.value_,"LeafNode shouldn't be created with null/undefined value."),Oe(this.priorityNode_)}return Object.defineProperty(e,"__childrenNodeConstructor",{get:function(){return _e},set:function(e){_e=e},enumerable:!1,configurable:!0}),e.prototype.isLeafNode=function(){return!0},e.prototype.getPriority=function(){return this.priorityNode_},e.prototype.updatePriority=function(t){return new e(this.value_,t)},e.prototype.getImmediateChild=function(t){return".priority"===t?this.priorityNode_:e.__childrenNodeConstructor.EMPTY_NODE},e.prototype.getChild=function(t){return t.isEmpty()?this:".priority"===t.getFront()?this.priorityNode_:e.__childrenNodeConstructor.EMPTY_NODE},e.prototype.hasChild=function(){return!1},e.prototype.getPredecessorChildName=function(e,t){return null},e.prototype.updateImmediateChild=function(t,n){return".priority"===t?this.updatePriority(n):n.isEmpty()&&".priority"!==t?this:e.__childrenNodeConstructor.EMPTY_NODE.updateImmediateChild(t,n).updatePriority(this.priorityNode_)},e.prototype.updateChild=function(t,n){var r=t.getFront();return null===r?n:n.isEmpty()&&".priority"!==r?this:(Object(o.f)(".priority"!==r||1===t.getLength(),".priority must be the last token in a path"),this.updateImmediateChild(r,e.__childrenNodeConstructor.EMPTY_NODE.updateChild(t.popFront(),n)))},e.prototype.isEmpty=function(){return!1},e.prototype.numChildren=function(){return 0},e.prototype.forEachChild=function(e,t){return!1},e.prototype.val=function(e){return e&&!this.getPriority().isEmpty()?{".value":this.getValue(),".priority":this.getPriority().val()}:this.getValue()},e.prototype.hash=function(){if(null===this.lazyHash_){var e="";this.priorityNode_.isEmpty()||(e+="priority:"+Se(this.priorityNode_.val())+":");var t=typeof this.value_;e+=t+":",e+="number"===t?M(this.value_):this.value_,this.lazyHash_=v(e)}return this.lazyHash_},e.prototype.getValue=function(){return this.value_},e.prototype.compareTo=function(t){return t===e.__childrenNodeConstructor.EMPTY_NODE?1:t instanceof e.__childrenNodeConstructor?-1:(Object(o.f)(t.isLeafNode(),"Unknown node type"),this.compareToLeafNode_(t))},e.prototype.compareToLeafNode_=function(t){var n=typeof t.value_,r=typeof this.value_,i=e.VALUE_TYPE_ORDER.indexOf(n),a=e.VALUE_TYPE_ORDER.indexOf(r);return Object(o.f)(i>=0,"Unknown leaf type: "+n),Object(o.f)(a>=0,"Unknown leaf type: "+r),i===a?"object"===r?0:this.value_<t.value_?-1:this.value_===t.value_?0:1:a-i},e.prototype.withIndex=function(){return this},e.prototype.isIndexed=function(){return!0},e.prototype.equals=function(e){if(e===this)return!0;if(e.isLeafNode()){var t=e;return this.value_===t.value_&&this.priorityNode_.equals(t.priorityNode_)}return!1},e.VALUE_TYPE_ORDER=["object","boolean","number","string"],e}();var Te,Ce,Pe=new(function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Object(i.c)(t,e),t.prototype.compare=function(e,t){var n=e.node.getPriority(),r=t.node.getPriority(),i=n.compareTo(r);return 0===i?P(e.name,t.name):i},t.prototype.isDefinedOn=function(e){return!e.getPriority().isEmpty()},t.prototype.indexedValueChanged=function(e,t){return!e.getPriority().equals(t.getPriority())},t.prototype.minPost=function(){return ye.MIN},t.prototype.maxPost=function(){return new ye(C,new Ee("[PRIORITY-POST]",ke))},t.prototype.makePost=function(e,t){var n=we(e);return new ye(t,new Ee("[PRIORITY-POST]",n))},t.prototype.toString=function(){return".priority"},t}(me)),xe=function(){function e(e,t,n,r,i){void 0===i&&(i=null),this.isReverse_=r,this.resultGenerator_=i,this.nodeStack_=[];for(var o=1;!e.isEmpty();)if(e=e,o=t?n(e.key,t):1,r&&(o*=-1),o<0)e=this.isReverse_?e.left:e.right;else{if(0===o){this.nodeStack_.push(e);break}this.nodeStack_.push(e),e=this.isReverse_?e.right:e.left}}return e.prototype.getNext=function(){if(0===this.nodeStack_.length)return null;var e,t=this.nodeStack_.pop();if(e=this.resultGenerator_?this.resultGenerator_(t.key,t.value):{key:t.key,value:t.value},this.isReverse_)for(t=t.left;!t.isEmpty();)this.nodeStack_.push(t),t=t.right;else for(t=t.right;!t.isEmpty();)this.nodeStack_.push(t),t=t.left;return e},e.prototype.hasNext=function(){return this.nodeStack_.length>0},e.prototype.peek=function(){if(0===this.nodeStack_.length)return null;var e=this.nodeStack_[this.nodeStack_.length-1];return this.resultGenerator_?this.resultGenerator_(e.key,e.value):{key:e.key,value:e.value}},e}(),Ie=function(){function e(t,n,r,i,o){this.key=t,this.value=n,this.color=null!=r?r:e.RED,this.left=null!=i?i:Re.EMPTY_NODE,this.right=null!=o?o:Re.EMPTY_NODE}return e.prototype.copy=function(t,n,r,i,o){return new e(null!=t?t:this.key,null!=n?n:this.value,
2null!=r?r:this.color,null!=i?i:this.left,null!=o?o:this.right)},e.prototype.count=function(){return this.left.count()+1+this.right.count()},e.prototype.isEmpty=function(){return!1},e.prototype.inorderTraversal=function(e){return this.left.inorderTraversal(e)||!!e(this.key,this.value)||this.right.inorderTraversal(e)},e.prototype.reverseTraversal=function(e){return this.right.reverseTraversal(e)||e(this.key,this.value)||this.left.reverseTraversal(e)},e.prototype.min_=function(){return this.left.isEmpty()?this:this.left.min_()},e.prototype.minKey=function(){return this.min_().key},e.prototype.maxKey=function(){return this.right.isEmpty()?this.key:this.right.maxKey()},e.prototype.insert=function(e,t,n){var r=this,i=n(e,r.key);return(r=i<0?r.copy(null,null,null,r.left.insert(e,t,n),null):0===i?r.copy(null,t,null,null,null):r.copy(null,null,null,null,r.right.insert(e,t,n))).fixUp_()},e.prototype.removeMin_=function(){if(this.left.isEmpty())return Re.EMPTY_NODE;var e=this;return e.left.isRed_()||e.left.left.isRed_()||(e=e.moveRedLeft_()),(e=e.copy(null,null,null,e.left.removeMin_(),null)).fixUp_()},e.prototype.remove=function(e,t){var n,r;if(t(e,(n=this).key)<0)n.left.isEmpty()||n.left.isRed_()||n.left.left.isRed_()||(n=n.moveRedLeft_()),n=n.copy(null,null,null,n.left.remove(e,t),null);else{if(n.left.isRed_()&&(n=n.rotateRight_()),n.right.isEmpty()||n.right.isRed_()||n.right.left.isRed_()||(n=n.moveRedRight_()),0===t(e,n.key)){if(n.right.isEmpty())return Re.EMPTY_NODE;r=n.right.min_(),n=n.copy(r.key,r.value,null,null,n.right.removeMin_())}n=n.copy(null,null,null,null,n.right.remove(e,t))}return n.fixUp_()},e.prototype.isRed_=function(){return this.color},e.prototype.fixUp_=function(){var e=this;return e.right.isRed_()&&!e.left.isRed_()&&(e=e.rotateLeft_()),e.left.isRed_()&&e.left.left.isRed_()&&(e=e.rotateRight_()),e.left.isRed_()&&e.right.isRed_()&&(e=e.colorFlip_()),e},e.prototype.moveRedLeft_=function(){var e=this.colorFlip_();return e.right.left.isRed_()&&(e=(e=(e=e.copy(null,null,null,null,e.right.rotateRight_())).rotateLeft_()).colorFlip_()),e},e.prototype.moveRedRight_=function(){var e=this.colorFlip_();return e.left.left.isRed_()&&(e=(e=e.rotateRight_()).colorFlip_()),e},e.prototype.rotateLeft_=function(){var t=this.copy(null,null,e.RED,null,this.right.left);return this.right.copy(null,null,this.color,t,null)},e.prototype.rotateRight_=function(){var t=this.copy(null,null,e.RED,this.left.right,null);return this.left.copy(null,null,this.color,null,t)},e.prototype.colorFlip_=function(){var e=this.left.copy(null,null,!this.left.color,null,null),t=this.right.copy(null,null,!this.right.color,null,null);return this.copy(null,null,!this.color,e,t)},e.prototype.checkMaxDepth_=function(){var e=this.check_();return Math.pow(2,e)<=this.count()+1},e.prototype.check_=function(){if(this.isRed_()&&this.left.isRed_())throw new Error("Red node has red child("+this.key+","+this.value+")");
2if(this.right.isRed_())throw new Error("Right child of ("+this.key+","+this.value+") is red");var e=this.left.check_();if(e!==this.right.check_())throw new Error("Black depths differ");return e+(this.isRed_()?0:1)},e.RED=!0,e.BLACK=!1,e}(),je=function(){function e(){}return e.prototype.copy=function(e,t,n,r,i){return this},e.prototype.insert=function(e,t,n){return new Ie(e,t,null)},e.prototype.remove=function(e,t){return this},e.prototype.count=function(){return 0},e.prototype.isEmpty=function(){return!0},e.prototype.inorderTraversal=function(e){return!1},e.prototype.reverseTraversal=function(e){return!1},e.prototype.minKey=function(){return null},e.prototype.maxKey=function(){return null},e.prototype.check_=function(){return 0},e.prototype.isRed_=function(){return!1},e}(),Re=function(){function e(t,n){void 0===n&&(n=e.EMPTY_NODE),this.comparator_=t,this.root_=n}return e.prototype.insert=function(t,n){return new e(this.comparator_,this.root_.insert(t,n,this.comparator_).copy(null,null,Ie.BLACK,null,null))},e.prototype.remove=function(t){return new e(this.comparator_,this.root_.remove(t,this.comparator_).copy(null,null,Ie.BLACK,null,null))},e.prototype.get=function(e){for(var t,n=this.root_;!n.isEmpty();){if(0===(t=this.comparator_(e,n.key)))return n.value;t<0?n=n.left:t>0&&(n=n.right)}return null},e.prototype.getPredecessorKey=function(e){for(var t,n=this.root_,r=null;!n.isEmpty();){if(0===(t=this.comparator_(e,n.key))){if(n.left.isEmpty())return r?r.key:null;for(n=n.left;!n.right.isEmpty();)n=n.right;return n.key}t<0?n=n.left:t>0&&(r=n,n=n.right)}throw new Error("Attempted to find predecessor key for a nonexistent key. What gives?")},e.prototype.isEmpty=function(){return this.root_.isEmpty()},e.prototype.count=function(){return this.root_.count()},e.prototype.minKey=function(){return this.root_.minKey()},e.prototype.maxKey=function(){return this.root_.maxKey()},e.prototype.inorderTraversal=function(e){return this.root_.inorderTraversal(e)},e.prototype.reverseTraversal=function(e){return this.root_.reverseTraversal(e)},e.prototype.getIterator=function(e){return new xe(this.root_,null,this.comparator_,!1,e)},e.prototype.getIteratorFrom=function(e,t){return new xe(this.root_,e,this.comparator_,!1,t)},e.prototype.getReverseIteratorFrom=function(e,t){return new xe(this.root_,e,this.comparator_,!0,t)},e.prototype.getReverseIterator=function(e){return new xe(this.root_,null,this.comparator_,!0,e)},e.EMPTY_NODE=new je,e}(),Ae=Math.log(2),Me=function(){function e(e){var t;this.count=(t=e+1,parseInt(Math.log(t)/Ae,10)),this.current_=this.count-1;var n,r=(n=this.count,parseInt(Array(n+1).join("1"),2));this.bits_=e+1&r}return e.prototype.nextBitIsOne=function(){var e=!(this.bits_&1<<this.current_);return this.current_--,e},e}(),Ne=function(e,t,n,r){e.sort(t);var i=function t(r,i){var o,a,s=i-r;if(0===s)return null;if(1===s)return o=e[r],a=n?n(o):o,new Ie(a,o.node,Ie.BLACK,null,null);var u=parseInt(s/2,10)+r,c=t(r,u),l=t(u+1,i);return o=e[u],a=n?n(o):o,new Ie(a,o.node,Ie.BLACK,c,l)},o=function(t){for(var r=null,o=null,a=e.length,s=function(t,r){var o=a-t,s=a;a-=t;var c=i(o+1,s),l=e[o],f=n?n(l):l;u(new Ie(f,l.node,r,null,c))},u=function(e){r?(r.left=e,r=e):(o=e,r=e)},c=0;c<t.count;++c){var l=t.nextBitIsOne(),f=Math.pow(2,t.count-(c+1));l?s(f,Ie.BLACK):(s(f,Ie.BLACK),s(f,Ie.RED))}return o}(new Me(e.length));return new Re(r||t,o)},Le={},De=function(){function e(e,t){this.indexes_=e,this.indexSet_=t}return Object.defineProperty(e,"Default",{get:function(){return Object(o.f)(Le&&Pe,"ChildrenNode.ts has not been loaded"),Te=Te||new e({".priority":Le},{".priority":Pe})},enumerable:!1,configurable:!0}),e.prototype.get=function(e){var t=Object(o.G)(this.indexes_,e);if(!t)throw new Error("No index defined for "+e);return t instanceof Re?t:null},e.prototype.hasIndex=function(e){return Object(o.k)(this.indexSet_,e.toString())},e.prototype.addIndex=function(t,n){Object(o.f)(t!==be,"KeyIndex always exists and isn't meant to be added to the IndexMap.");for(var r,a=[],s=!1,u=n.getIterator(ye.Wrap),c=u.getNext();c;)s=s||t.isDefinedOn(c.node),a.push(c),c=u.getNext();r=s?Ne(a,t.getCompare()):Le;var l=t.toString(),f=Object(i.a)({},this.indexSet_);f[l]=t;var h=Object(i.a)({},this.indexes_);return h[l]=r,new e(h,f)},e.prototype.addToIndexes=function(t,n){var r=this;return new e(Object(o.E)(this.indexes_,(function(e,i){var a=Object(o.G)(r.indexSet_,i);if(Object(o.f)(a,"Missing index implementation for "+i),e===Le){if(a.isDefinedOn(t.node)){for(var s=[],u=n.getIterator(ye.Wrap),c=u.getNext();c;)c.name!==t.name&&s.push(c),c=u.getNext();return s.push(t),Ne(s,a.getCompare())}return Le}var l=n.get(t.name),f=e;return l&&(f=f.remove(new ye(t.name,l))),f.insert(t,t.node)})),this.indexSet_)}
2,e.prototype.removeFromIndexes=function(t,n){return new e(Object(o.E)(this.indexes_,(function(e){if(e===Le)return e;var r=n.get(t.name);return r?e.remove(new ye(t.name,r)):e})),this.indexSet_)},e}();function Fe(e,t){return P(e.name,t.name)}function Ue(e,t){return P(e,t)}var Ve=function(){function e(e,t,n){this.children_=e,this.priorityNode_=t,this.indexMap_=n,this.lazyHash_=null,this.priorityNode_&&Oe(this.priorityNode_),this.children_.isEmpty()&&Object(o.f)(!this.priorityNode_||this.priorityNode_.isEmpty(),"An empty node cannot have a priority")}return Object.defineProperty(e,"EMPTY_NODE",{get:function(){return Ce||(Ce=new e(new Re(Ue),null,De.Default))},enumerable:!1,configurable:!0}),e.prototype.isLeafNode=function(){return!1},e.prototype.getPriority=function(){return this.priorityNode_||Ce},e.prototype.updatePriority=function(t){return this.children_.isEmpty()?this:new e(this.children_,t,this.indexMap_)},e.prototype.getImmediateChild=function(e){if(".priority"===e)return this.getPriority();var t=this.children_.get(e);return null===t?Ce:t},e.prototype.getChild=function(e){var t=e.getFront();return null===t?this:this.getImmediateChild(t).getChild(e.popFront())},e.prototype.hasChild=function(e){return null!==this.children_.get(e)},e.prototype.updateImmediateChild=function(t,n){if(Object(o.f)(n,"We should always be passing snapshot nodes"),".priority"===t)return this.updatePriority(n);var r=new ye(t,n),i=void 0,a=void 0;n.isEmpty()?(i=this.children_.remove(t),a=this.indexMap_.removeFromIndexes(r,this.children_)):(i=this.children_.insert(t,n),a=this.indexMap_.addToIndexes(r,this.children_));var s=i.isEmpty()?Ce:this.priorityNode_;return new e(i,s,a)},e.prototype.updateChild=function(e,t){var n=e.getFront();if(null===n)return t;Object(o.f)(".priority"!==e.getFront()||1===e.getLength(),".priority must be the last token in a path");var r=this.getImmediateChild(n).updateChild(e.popFront(),t);return this.updateImmediateChild(n,r)},e.prototype.isEmpty=function(){return this.children_.isEmpty()},e.prototype.numChildren=function(){return this.children_.count()},e.prototype.val=function(t){if(this.isEmpty())return null;var n={},r=0,i=0,o=!0;if(this.forEachChild(Pe,(function(a,s){n[a]=s.val(t),r++,o&&e.INTEGER_REGEXP_.test(a)?i=Math.max(i,Number(a)):o=!1})),!t&&o&&i<2*r){var a=[];for(var s in n)a[s]=n[s];return a}return t&&!this.getPriority().isEmpty()&&(n[".priority"]=this.getPriority().val()),n},e.prototype.hash=function(){if(null===this.lazyHash_){var e="";this.getPriority().isEmpty()||(e+="priority:"+Se(this.getPriority().val())+":"),this.forEachChild(Pe,(function(t,n){var r=n.hash();""!==r&&(e+=":"+t+":"+r)})),this.lazyHash_=""===e?"":v(e)}return this.lazyHash_},e.prototype.getPredecessorChildName=function(e,t,n){var r=this.resolveIndex_(n);if(r){var i=r.getPredecessorKey(new ye(e,t));return i?i.name:null}return this.children_.getPredecessorKey(e)},e.prototype.getFirstChildName=function(e){var t=this.resolveIndex_(e);if(t){var n=t.minKey();return n&&n.name}return this.children_.minKey()},e.prototype.getFirstChild=function(e){var t=this.getFirstChildName(e);return t?new ye(t,this.children_.get(t)):null},e.prototype.getLastChildName=function(e){var t=this.resolveIndex_(e);if(t){var n=t.maxKey();return n&&n.name}return this.children_.maxKey()},e.prototype.getLastChild=function(e){var t=this.getLastChildName(e);return t?new ye(t,this.children_.get(t)):null},e.prototype.forEachChild=function(e,t){var n=this.resolveIndex_(e);return n?n.inorderTraversal((function(e){return t(e.name,e.node)})):this.children_.inorderTraversal(t)},e.prototype.getIterator=function(e){return this.getIteratorFrom(e.minPost(),e)},e.prototype.getIteratorFrom=function(e,t){var n=this.resolveIndex_(t);if(n)return n.getIteratorFrom(e,(function(e){return e}));for(var r=this.children_.getIteratorFrom(e.name,ye.Wrap),i=r.peek();null!=i&&t.compare(i,e)<0;)r.getNext(),i=r.peek();return r},e.prototype.getReverseIterator=function(e){return this.getReverseIteratorFrom(e.maxPost(),e)},e.prototype.getReverseIteratorFrom=function(e,t){var n=this.resolveIndex_(t);if(n)return n.getReverseIteratorFrom(e,(function(e){return e}));for(var r=this.children_.getReverseIteratorFrom(e.name,ye.Wrap),i=r.peek();null!=i&&t.compare(i,e)>0;)r.getNext(),i=r.peek();return r},e.prototype.compareTo=function(e){return this.isEmpty()?e.isEmpty()?0:-1:e.isLeafNode()||e.isEmpty()?1:e===Be?-1:0},e.prototype.withIndex=function(t){if(t===be||this.indexMap_.hasIndex(t))return this;var n=this.indexMap_.addIndex(t,this.children_);return new e(this.children_,this.priorityNode_,n)},e.prototype.isIndexed=function(e){return e===be||this.indexMap_.hasIndex(e)},e.prototype.equals=function(e){if(e===this)return!0;
2if(e.isLeafNode())return!1;var t=e;if(this.getPriority().equals(t.getPriority())){if(this.children_.count()===t.children_.count()){for(var n=this.getIterator(Pe),r=t.getIterator(Pe),i=n.getNext(),o=r.getNext();i&&o;){if(i.name!==o.name||!i.node.equals(o.node))return!1;i=n.getNext(),o=r.getNext()}return null===i&&null===o}return!1}return!1},e.prototype.resolveIndex_=function(e){return e===be?null:this.indexMap_.get(e.toString())},e.INTEGER_REGEXP_=/^(0|[1-9]\d*)$/,e}(),Be=new(function(e){function t(){return e.call(this,new Re(Ue),Ve.EMPTY_NODE,De.Default)||this}return Object(i.c)(t,e),t.prototype.compareTo=function(e){return e===this?0:1},t.prototype.equals=function(e){return e===this},t.prototype.getPriority=function(){return this},t.prototype.getImmediateChild=function(e){return Ve.EMPTY_NODE},t.prototype.isEmpty=function(){return!1},t}(Ve));Object.defineProperties(ye,{MIN:{value:new ye(T,Ve.EMPTY_NODE)},MAX:{value:new ye(C,Be)}}),ge.__EMPTY_NODE=Ve.EMPTY_NODE,Ee.__childrenNodeConstructor=Ve,K=Be,function(e){ke=e}(Be);function qe(e,t){if(void 0===t&&(t=null),null===e)return Ve.EMPTY_NODE;if("object"===typeof e&&".priority"in e&&(t=e[".priority"]),Object(o.f)(null===t||"string"===typeof t||"number"===typeof t||"object"===typeof t&&".sv"in t,"Invalid priority type found: "+typeof t),"object"===typeof e&&".value"in e&&null!==e[".value"]&&(e=e[".value"]),"object"!==typeof e||".sv"in e)return new Ee(e,qe(t));if(e instanceof Array){var n=Ve.EMPTY_NODE;return A(e,(function(t,r){if(Object(o.k)(e,t)&&"."!==t.substring(0,1)){var i=qe(r);!i.isLeafNode()&&i.isEmpty()||(n=n.updateImmediateChild(t,i))}})),n.updatePriority(qe(t))}
2var r=[],i=!1;if(A(e,(function(e,t){if("."!==e.substring(0,1)){var n=qe(t);n.isEmpty()||(i=i||!n.getPriority().isEmpty(),r.push(new ye(e,n)))}})),0===r.length)return Ve.EMPTY_NODE;var a=Ne(r,Fe,(function(e){return e.name}),Ue);if(i){var s=Ne(r,Pe.getCompare());return new Ve(a,qe(t),new De({".priority":s},{".priority":Pe}))}return new Ve(a,qe(t),De.Default)}!function(e){we=e}(qe);var We,ze=new(function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Object(i.c)(t,e),t.prototype.compare=function(e,t){var n=e.node.compareTo(t.node);return 0===n?P(e.name,t.name):n},t.prototype.isDefinedOn=function(e){return!0},t.prototype.indexedValueChanged=function(e,t){return!e.equals(t)},t.prototype.minPost=function(){return ye.MIN},t.prototype.maxPost=function(){return ye.MAX},t.prototype.makePost=function(e,t){var n=qe(e);return new ye(t,n)},t.prototype.toString=function(){return".value"},t}(me)),He=function(e){function t(t){var n=e.call(this)||this;return n.indexPath_=t,Object(o.f)(!t.isEmpty()&&".priority"!==t.getFront(),"Can't create PathIndex with empty path or .priority key"),n}return Object(i.c)(t,e),t.prototype.extractChild=function(e){return e.getChild(this.indexPath_)},t.prototype.isDefinedOn=function(e){return!e.getChild(this.indexPath_).isEmpty()},t.prototype.compare=function(e,t){var n=this.extractChild(e.node),r=this.extractChild(t.node),i=n.compareTo(r);return 0===i?P(e.name,t.name):i},t.prototype.makePost=function(e,t){var n=qe(e),r=Ve.EMPTY_NODE.updateChild(this.indexPath_,n);return new ye(t,r)},t.prototype.maxPost=function(){var e=Ve.EMPTY_NODE.updateChild(this.indexPath_,Be);return new ye(C,e)},t.prototype.toString=function(){return this.indexPath_.slice().join("/")},t}(me),Ge=function(){function e(e,t,n){this.node_=e,this.ref_=t,this.index_=n}return e.prototype.val=function(){return Object(o.K)("DataSnapshot.val",0,0,arguments.length),this.node_.val()},e.prototype.exportVal=function(){return Object(o.K)("DataSnapshot.exportVal",0,0,arguments.length),this.node_.val(!0)},e.prototype.toJSON=function(){return Object(o.K)("DataSnapshot.toJSON",0,1,arguments.length),this.exportVal()},e.prototype.exists=function(){return Object(o.K)("DataSnapshot.exists",0,0,arguments.length),!this.node_.isEmpty()},e.prototype.child=function(t){Object(o.K)("DataSnapshot.child",0,1,arguments.length),t=String(t),ue("DataSnapshot.child",1,t,!1);var n=new U(t),r=this.ref_.child(n);return new e(this.node_.getChild(n),r,Pe)},e.prototype.hasChild=function(e){Object(o.K)("DataSnapshot.hasChild",1,1,arguments.length),ue("DataSnapshot.hasChild",1,e,!1);var t=new U(e);return!this.node_.getChild(t).isEmpty()},e.prototype.getPriority=function(){return Object(o.K)("DataSnapshot.getPriority",0,0,arguments.length),this.node_.getPriority().val()},e.prototype.forEach=function(t){var n=this;if(Object(o.K)("DataSnapshot.forEach",1,1,arguments.length),Object(o.L)("DataSnapshot.forEach",1,t,!1),this.node_.isLeafNode())return!1;var r=this.node_;return!!r.forEachChild(this.index_,(function(r,i){return t(new e(i,n.ref_.child(r),Pe))}))},e.prototype.hasChildren=function(){return Object(o.K)("DataSnapshot.hasChildren",0,0,arguments.length),!this.node_.isLeafNode()&&!this.node_.isEmpty()},Object.defineProperty(e.prototype,"key",{get:function(){return this.ref_.getKey()},enumerable:!1,configurable:!0}),e.prototype.numChildren=function(){return Object(o.K)("DataSnapshot.numChildren",0,0,arguments.length),this.node_.numChildren()},e.prototype.getRef=function(){return Object(o.K)("DataSnapshot.ref",0,0,arguments.length),this.ref_},Object.defineProperty(e.prototype,"ref",{get:function(){return this.getRef()},enumerable:!1,configurable:!0}),e}(),Ke=function(){function e(e,t,n,r){this.eventType=e,this.eventRegistration=t,this.snapshot=n,this.prevName=r}return e.prototype.getPath=function(){var e=this.snapshot.getRef();return"value"===this.eventType?e.path:e.getParent().path},e.prototype.getEventType=function(){return this.eventType},e.prototype.getEventRunner=function(){return this.eventRegistration.getEventRunner(this)},e.prototype.toString=function(){return this.getPath().toString()+":"+this.eventType+":"+Object(o.J)(this.snapshot.exportVal())},e}(),Ye=function(){function e(e,t,n){this.eventRegistration=e,this.error=t,this.path=n}return e.prototype.getPath=function(){return this.path},e.prototype.getEventType=function(){return"cancel"},e.prototype.getEventRunner=function(){return this.eventRegistration.getEventRunner(this)},e.prototype.toString=function(){return this.path.toString()+":cancel"},e}(),Qe=function(){function e(e,t,n){this.callback_=e,this.cancelCallback_=t,this.context_=n}return e.prototype.respondsTo=function(e){return"value"===e},e.prototype.createEvent=function(e,t){var n=t.getQueryParams().getIndex();return new Ke("value",this,new Ge(e.snapshotNode,t.getRef(),n))},e.prototype.getEventRunner=function(e){var t=this.context_;if("cancel"===e.getEventType()){Object(o.f)(this.cancelCallback_,"Raising a cancel event on a listener with no cancel callback");var n=this.cancelCallback_;return function(){n.call(t,e.error)}}var r=this.callback_;return function(){r.call(t,e.snapshot)}},e.prototype.createCancelEvent=function(e,t){return this.cancelCallback_?new Ye(this,e,t):null},e.prototype.matches=function(t){return t instanceof e&&(!t.callback_||!this.callback_||t.callback_===this.callback_&&t.context_===this.context_)},e.prototype.hasAnyCallback=function(){return null!==this.callback_},e}(),$e=function(){function e(e,t,n){this.callbacks_=e,this.cancelCallback_=t,this.context_=n}return e.prototype.respondsTo=function(e){var t="children_added"===e?"child_added":e;return t="children_removed"===t?"child_removed":t,Object(o.k)(this.callbacks_,t)},e.prototype.createCancelEvent=function(e,t){return this.cancelCallback_?new Ye(this,e,t):null},e.prototype.createEvent=function(e,t){Object(o.f)(null!=e.childName,"Child events should have a childName.");var n=t.getRef().child(e.childName),r=t.getQueryParams().getIndex();return new Ke(e.type,this,new Ge(e.snapshotNode,n,r),e.prevName)},e.prototype.getEventRunner=function(e){var t=this.context_;if("cancel"===e.getEventType()){Object(o.f)(this.cancelCallback_,"Raising a cancel event on a listener with no cancel callback");var n=this.cancelCallback_;return function(){n.call(t,e.error)}}var r=this.callbacks_[e.eventType];return function(){r.call(t,e.snapshot,e.prevName)}},e.prototype.matches=function(t){var n=this;if(t instanceof e){if(!this.callbacks_||!t.callbacks_)return!0;
2if(this.context_===t.context_){var r=Object.keys(t.callbacks_),i=Object.keys(this.callbacks_),o=r.length;if(o===i.length){if(1===o){var a=r[0],s=i[0];return s===a&&(!t.callbacks_[a]||!this.callbacks_[s]||t.callbacks_[a]===this.callbacks_[s])}return i.every((function(e){return t.callbacks_[e]===n.callbacks_[e]}))}}}return!1},e.prototype.hasAnyCallback=function(){return null!==this.callbacks_},e}(),Xe=function(){function e(e,t,n,r){this.repo=e,this.path=t,this.queryParams_=n,this.orderByCalled_=r}return Object.defineProperty(e,"__referenceConstructor",{get:function(){return Object(o.f)(We,"Reference.ts has not been loaded"),We},set:function(e){We=e},enumerable:!1,configurable:!0}),e.validateQueryEndpoints_=function(e){var t=null,n=null;if(e.hasStart()&&(t=e.getIndexStartValue()),e.hasEnd()&&(n=e.getIndexEndValue()),e.getIndex()===be){var r="Query: When ordering by key, you may only pass one argument to startAt(), endAt(), or equalTo().",i="Query: When ordering by key, the argument passed to startAt(), endAt(),or equalTo() must be a string.";if(e.hasStart()){if(e.getIndexStartName()!==T)throw new Error(r);if("string"!==typeof t)throw new Error(i)}if(e.hasEnd()){if(e.getIndexEndName()!==C)throw new Error(r);if("string"!==typeof n)throw new Error(i)}}else if(e.getIndex()===Pe){if(null!=t&&!te(t)||null!=n&&!te(n))throw new Error("Query: When ordering by priority, the first argument passed to startAt(), endAt(), or equalTo() must be a valid priority value (null, a number, or a string).")}else if(Object(o.f)(e.getIndex()instanceof He||e.getIndex()===ze,"unknown index type."),null!=t&&"object"===typeof t||null!=n&&"object"===typeof n)throw new Error("Query: First argument passed to startAt(), endAt(), or equalTo() cannot be an object.")},e.validateLimit_=function(e){if(e.hasStart()&&e.hasEnd()&&e.hasLimit()&&!e.hasAnchoredLimit())throw new Error("Query: Can't combine startAt(), endAt(), and limit(). Use limitToFirst() or limitToLast() instead.")},e.prototype.validateNoPreviousOrderByCall_=function(e){if(!0===this.orderByCalled_)throw new Error(e+": You can't combine multiple orderBy calls.")},e.prototype.getQueryParams=function(){return this.queryParams_},e.prototype.getRef=function(){return Object(o.K)("Query.ref",0,0,arguments.length),new e.__referenceConstructor(this.repo,this.path)},e.prototype.on=function(t,n,r,i){Object(o.K)("Query.on",2,4,arguments.length),ae("Query.on",1,t,!1),Object(o.L)("Query.on",2,n,!1);var a=e.getCancelAndContextArgs_("Query.on",r,i);if("value"===t)this.onValueEvent(n,a.cancel,a.context);else{var s={};s[t]=n,this.onChildEvent(s,a.cancel,a.context)}return n},e.prototype.onValueEvent=function(e,t,n){var r=new Qe(e,t||null,n||null);this.repo.addEventCallbackForQuery(this,r)},e.prototype.onChildEvent=function(e,t,n){var r=new $e(e,t,n);this.repo.addEventCallbackForQuery(this,r)},e.prototype.off=function(e,t,n){Object(o.K)("Query.off",0,3,arguments.length),ae("Query.off",1,e,!0),Object(o.L)("Query.off",2,t,!0),Object(o.M)("Query.off",3,n,!0);var r=null,i=null;if("value"===e){var a=t||null;r=new Qe(a,null,n||null)}else e&&(t&&((i={})[e]=t),r=new $e(i,null,n||null));this.repo.removeEventCallbackForQuery(this,r)},e.prototype.once=function(t,n,r,i){var a=this;Object(o.K)("Query.once",1,4,arguments.length),ae("Query.once",1,t,!1),Object(o.L)("Query.once",2,n,!0);var s=e.getCancelAndContextArgs_("Query.once",r,i),u=!0,c=new o.a;c.promise.catch((function(){}));var l=function e(r){u&&(u=!1,a.off(t,e),n&&n.bind(s.context)(r),c.resolve(r))};return this.on(t,l,(function(e){a.off(t,l),s.cancel&&s.cancel.bind(s.context)(e),c.reject(e)})),c.promise},e.prototype.limitToFirst=function(t){if(Object(o.K)("Query.limitToFirst",1,1,arguments.length),"number"!==typeof t||Math.floor(t)!==t||t<=0)throw new Error("Query.limitToFirst: First argument must be a positive integer.");if(this.queryParams_.hasLimit())throw new Error("Query.limitToFirst: Limit was already set (by another call to limit, limitToFirst, or limitToLast).");return new e(this.repo,this.path,this.queryParams_.limitToFirst(t),this.orderByCalled_)},e.prototype.limitToLast=function(t){if(Object(o.K)("Query.limitToLast",1,1,arguments.length),"number"!==typeof t||Math.floor(t)!==t||t<=0)throw new Error("Query.limitToLast: First argument must be a positive integer.");if(this.queryParams_.hasLimit())throw new Error("Query.limitToLast: Limit was already set
2(by another call to limit, limitToFirst, or limitToLast).");return new e(this.repo,this.path,this.queryParams_.limitToLast(t),this.orderByCalled_)},e.prototype.orderByChild=function(t){if(Object(o.K)("Query.orderByChild",1,1,arguments.length),"$key"===t)throw new Error('Query.orderByChild: "$key" is invalid. Use Query.orderByKey() instead.');if("$priority"===t)throw new Error('Query.orderByChild: "$priority" is invalid. Use Query.orderByPriority() instead.');if("$value"===t)throw new Error('Query.orderByChild: "$value" is invalid. Use Query.orderByValue() instead.');ue("Query.orderByChild",1,t,!1),this.validateNoPreviousOrderByCall_("Query.orderByChild");var n=new U(t);if(n.isEmpty())throw new Error("Query.orderByChild: cannot pass in empty path. Use Query.orderByValue() instead.");var r=new He(n),i=this.queryParams_.orderBy(r);return e.validateQueryEndpoints_(i),new e(this.repo,this.path,i,!0)},e.prototype.orderByKey=function(){Object(o.K)("Query.orderByKey",0,0,arguments.length),this.validateNoPreviousOrderByCall_("Query.orderByKey");var t=this.queryParams_.orderBy(be);return e.validateQueryEndpoints_(t),new e(this.repo,this.path,t,!0)},e.prototype.orderByPriority=function(){Object(o.K)("Query.orderByPriority",0,0,arguments.length),this.validateNoPreviousOrderByCall_("Query.orderByPriority");var t=this.queryParams_.orderBy(Pe);return e.validateQueryEndpoints_(t),new e(this.repo,this.path,t,!0)},e.prototype.orderByValue=function(){Object(o.K)("Query.orderByValue",0,0,arguments.length),this.validateNoPreviousOrderByCall_("Query.orderByValue");var t=this.queryParams_.orderBy(ze);return e.validateQueryEndpoints_(t),new e(this.repo,this.path,t,!0)},e.prototype.startAt=function(t,n){void 0===t&&(t=null),Object(o.K)("Query.startAt",0,2,arguments.length),ne("Query.startAt",1,t,this.path,!0),se("Query.startAt",2,n,!0);var r=this.queryParams_.startAt(t,n);if(e.validateLimit_(r),e.validateQueryEndpoints_(r),this.queryParams_.hasStart())throw new Error("Query.startAt: Starting point was already set (by another call to startAt or equalTo).");return void 0===t&&(t=null,n=null),new e(this.repo,this.path,r,this.orderByCalled_)},e.prototype.endAt=function(t,n){void 0===t&&(t=null),Object(o.K)("Query.endAt",0,2,arguments.length),ne("Query.endAt",1,t,this.path,!0),se("Query.endAt",2,n,!0);var r=this.queryParams_.endAt(t,n);if(e.validateLimit_(r),e.validateQueryEndpoints_(r),this.queryParams_.hasEnd())throw new Error("Query.endAt: Ending point was already set (by another call to endAt or equalTo).");return new e(this.repo,this.path,r,this.orderByCalled_)},e.prototype.equalTo=function(e,t){if(Object(o.K)("Query.equalTo",1,2,arguments.length),ne("Query.equalTo",1,e,this.path,!1),se("Query.equalTo",2,t,!0),this.queryParams_.hasStart())throw new Error("Query.equalTo: Starting point was already set (by another call to startAt or equalTo).");if(this.queryParams_.hasEnd())throw new Error("Query.equalTo: Ending point was already set (by another call to endAt or equalTo).");return this.startAt(e,t).endAt(e,t)},e.prototype.toString=function(){return Object(o.K)("Query.toString",0,0,arguments.length),this.repo.toString()+this.path.toUrlEncodedString()},e.prototype.toJSON=function(){return Object(o.K)("Query.toJSON",0,1,arguments.length),this.toString()},e.prototype.queryObject=function(){return this.queryParams_.getQueryObject()},e.prototype.queryIdentifier=function(){var e=this.queryObject(),t=j(e);return"{}"===t?"default":t},e.prototype.isEqual=function(t){if(Object(o.K)("Query.isEqual",1,1,arguments.length),!(t instanceof e)){var n="Query.isEqual failed: First argument must be an instance of firebase.database.Query.";throw new Error(n)}
2var r=this.repo===t.repo,i=this.path.equals(t.path),a=this.queryIdentifier()===t.queryIdentifier();return r&&i&&a},e.getCancelAndContextArgs_=function(e,t,n){var r={cancel:null,context:null};if(t&&n)r.cancel=t,Object(o.L)(e,3,r.cancel,!0),r.context=n,Object(o.M)(e,4,r.context,!0);else if(t)if("object"===typeof t&&null!==t)r.context=t;else{if("function"!==typeof t)throw new Error(Object(o.o)(e,3,!0)+" must either be a cancel callback or a context object.");r.cancel=t}return r},Object.defineProperty(e.prototype,"ref",{get:function(){return this.getRef()},enumerable:!1,configurable:!0}),e}(),Je=function(){function e(e){this.node_=e}return e.prototype.getImmediateChild=function(t){return new e(this.node_.getImmediateChild(t))},e.prototype.node=function(){return this.node_},e}(),Ze=function(){function e(e,t){this.syncTree_=e,this.path_=t}return e.prototype.getImmediateChild=function(t){var n=this.path_.child(t);return new e(this.syncTree_,n)},e.prototype.node=function(){return this.syncTree_.calcCompleteEventCache(this.path_)},e}(),et=function(e,t,n){return e&&"object"===typeof e?(Object(o.f)(".sv"in e,"Unexpected leaf node or priority contents"),"string"===typeof e[".sv"]?tt(e[".sv"],t,n):"object"===typeof e[".sv"]?nt(e[".sv"],t):void Object(o.f)(!1,"Unexpected server value: "+JSON.stringify(e,null,2))):e},tt=function(e,t,n){switch(e){case"timestamp":return n.timestamp;default:Object(o.f)(!1,"Unexpected server value: "+e)}},nt=function(e,t,n){e.hasOwnProperty("increment")||Object(o.f)(!1,"Unexpected server value: "+JSON.stringify(e,null,2));var r=e.increment;"number"!==typeof r&&Object(o.f)(!1,"Unexpected increment value: "+r);var i=t.node();if(Object(o.f)(null!==i&&"undefined"!==typeof i,"Expected ChildrenNode.EMPTY_NODE for nulls"),!i.isLeafNode())return r;var a=i.getValue();return"number"!==typeof a?r:a+r},rt=function(e,t,n,r){return ot(t,new Ze(n,e),r)},it=function(e,t,n){return ot(e,new Je(t),n)};function ot(e,t,n){var r,i=e.getPriority().val(),o=et(i,t.getImmediateChild(".priority"),n);if(e.isLeafNode()){var a=e,s=et(a.getValue(),t,n);return s!==a.getValue()||o!==a.getPriority().val()?new Ee(s,qe(o)):e}var u=e;return r=u,o!==u.getPriority().val()&&(r=r.updatePriority(new Ee(o))),u.forEachChild(Pe,(function(e,i){var o=ot(i,t.getImmediateChild(e),n);o!==i&&(r=r.updateImmediateChild(e,o))})),r}var at,st=function(){function e(){this.value=null,this.children=new Map}return e.prototype.find=function(e){if(null!=this.value)return this.value.getChild(e);if(!e.isEmpty()&&this.children.size>0){var t=e.getFront();return e=e.popFront(),this.children.has(t)?this.children.get(t).find(e):null}return null},e.prototype.remember=function(t,n){if(t.isEmpty())this.value=n,this.children.clear();else if(null!==this.value)this.value=this.value.updateChild(t,n);else{var r=t.getFront();this.children.has(r)||this.children.set(r,new e);var i=this.children.get(r);t=t.popFront(),i.remember(t,n)}},e.prototype.forget=function(e){if(e.isEmpty())return this.value=null,this.children.clear(),!0;if(null!==this.value){if(this.value.isLeafNode())return!1;var t=this.value;this.value=null;var n=this;return t.forEachChild(Pe,(function(e,t){n.remember(new U(e),t)})),this.forget(e)}if(this.children.size>0){var r=e.getFront();if(e=e.popFront(),this.children.has(r))this.children.get(r).forget(e)&&this.children.delete(r);return 0===this.children.size}return!0},e.prototype.forEachTree=function(e,t){null!==this.value?t(e,this.value):this.forEachChild((function(n,r){var i=new U(e.toString()+"/"+n);r.forEachTree(i,t)}))},e.prototype.forEachChild=function(e){this.children.forEach((function(t,n){e(n,t)}))},e}();!function(e){e[e.OVERWRITE=0]="OVERWRITE",e[e.MERGE=1]="MERGE",e[e.ACK_USER_WRITE=2]="ACK_USER_WRITE",e[e.LISTEN_COMPLETE=3]="LISTEN_COMPLETE"}(at||(at={}));var ut,ct,lt=function(){function e(e,t,n,r){this.fromUser=e,this.fromServer=t,this.queryId=n,this.tagged=r,Object(o.f)(!r||t,"Tagged queries must be from server.")}return e.User=new e(!0,!1,null,!1),e.Server=new e(!1,!0,null,!1),e.forServerTaggedQuery=function(t){return new e(!1,!0,t,!0)},e}(),ft=function(){function e(e,t,n){this.path=e,this.affectedTree=t,this.revert=n,this.type=at.ACK_USER_WRITE,this.source=lt.User}return e.prototype.operationForChild=function(t){if(this.path.isEmpty()){if(null!=this.affectedTree.value)return Object(o.f)(this.affectedTree.children.isEmpty(),"affectedTree should not have overlapping affected paths."),this;var n=this.affectedTree.subtree(new U(t));return new e(U.Empty,n,this.revert)}return Object(o.f)(this.path.getFront()===t,"operationForChild called for unrelated child."),new e(this.path.popFront(),this.affectedTree,this.revert)},e}(),ht=function(){function e(e,t){void 0===t&&(ut||(ut=new Re(x)),t=ut),this.value=e,this.children=t}return e.fromObject=function(t){var n=e.Empty;return A(t,(function(e,t){n=n.set(new U(e),t)})),n},e.prototype.isEmpty=function(){return null===this.value&&this.children.isEmpty()},e.prototype.findRootMostMatchingPathAndValue=function(e,t){if(null!=this.value&&t(this.value))return{path:U.Empty,value:this.value};if(e.isEmpty())return null;var n=e.getFront(),r=this.children.get(n);if(null!==r){var i=r.findRootMostMatchingPathAndValue(e.popFront(),t);return null!=i?{path:new U(n).child(i.path),value:i.value}:null}return null},e.prototype.findRootMostValueAndPath=function(e){return this.findRootMostMatchingPathAndValue(e,(function(){return!0}))},e.prototype.subtree=function(t){if(t.isEmpty())return this;var n=t.getFront(),r=this.children.get(n);return null!==r?r.subtree(t.popFront()):e.Empty},e.prototype.set=function(t,n){if(t.isEmpty())return new e(n,this.children);var r=t.getFront(),i=(this.children.get(r)||e.Empty).set(t.popFront(),n),o=this.children.insert(r,i);return new e(this.value,o)},e.prototype.remove=function(t){if(t.isEmpty())return this.children.isEmpty()?e.Empty:new e(null,this.children);var n=t.getFront(),r=this.children.get(n);if(r){var i=r.remove(t.popFront()),o=void 0;return o=i.isEmpty()?this.children.remove(n):this.children.insert(n,i),null===this.value&&o.isEmpty()?e.Empty:new e(this.value,o)}return this},e.prototype.get=function(e){if(e.isEmpty())return this.value;var t=e.getFront(),n=this.children.get(t);return n?n.get(e.popFront()):null},e.prototype.setTree=function(t,n){if(t.isEmpty())return n;var r=t.getFront(),i=(this.children.get(r)||e.Empty).setTree(t.popFront(),n),o=void 0;return o=i.isEmpty()?this.children.remove(r):this.children.insert(r,i),new e(this.value,o)},e.prototype.fold=function(e){return this.fold_(U.Empty,e)}
2,e.prototype.fold_=function(e,t){var n={};return this.children.inorderTraversal((function(r,i){n[r]=i.fold_(e.child(r),t)})),t(e,this.value,n)},e.prototype.findOnPath=function(e,t){return this.findOnPath_(e,U.Empty,t)},e.prototype.findOnPath_=function(e,t,n){var r=!!this.value&&n(t,this.value);if(r)return r;if(e.isEmpty())return null;var i=e.getFront(),o=this.children.get(i);return o?o.findOnPath_(e.popFront(),t.child(i),n):null},e.prototype.foreachOnPath=function(e,t){return this.foreachOnPath_(e,U.Empty,t)},e.prototype.foreachOnPath_=function(t,n,r){if(t.isEmpty())return this;this.value&&r(n,this.value);var i=t.getFront(),o=this.children.get(i);return o?o.foreachOnPath_(t.popFront(),n.child(i),r):e.Empty},e.prototype.foreach=function(e){this.foreach_(U.Empty,e)},e.prototype.foreach_=function(e,t){this.children.inorderTraversal((function(n,r){r.foreach_(e.child(n),t)})),this.value&&t(e,this.value)},e.prototype.foreachChild=function(e){this.children.inorderTraversal((function(t,n){n.value&&e(t,n.value)}))},e.Empty=new e(null),e}(),dt=function(){function e(e,t){this.source=e,this.path=t,this.type=at.LISTEN_COMPLETE}return e.prototype.operationForChild=function(t){return this.path.isEmpty()?new e(this.source,U.Empty):new e(this.source,this.path.popFront())},e}(),pt=function(){function e(e,t,n){this.source=e,this.path=t,this.snap=n,this.type=at.OVERWRITE}return e.prototype.operationForChild=function(t){return this.path.isEmpty()?new e(this.source,U.Empty,this.snap.getImmediateChild(t)):new e(this.source,this.path.popFront(),this.snap)},e}(),vt=function(){function e(e,t,n){this.source=e,this.path=t,this.children=n,this.type=at.MERGE}return e.prototype.operationForChild=function(t){if(this.path.isEmpty()){var n=this.children.subtree(new U(t));return n.isEmpty()?null:n.value?new pt(this.source,U.Empty,n.value):new e(this.source,U.Empty,n)}return Object(o.f)(this.path.getFront()===t,"Can't get a merge for a child not on the path of the operation"),new e(this.source,this.path.popFront(),this.children)},e.prototype.toString=function(){return"Operation("+this.path+": "+this.source.toString()+" merge: "+this.children.toString()+")"},e}(),yt=function(){function e(e,t,n){this.node_=e,this.fullyInitialized_=t,this.filtered_=n}return e.prototype.isFullyInitialized=function(){return this.fullyInitialized_},e.prototype.isFiltered=function(){return this.filtered_},e.prototype.isCompleteForPath=function(e){if(e.isEmpty())return this.isFullyInitialized()&&!this.filtered_;var t=e.getFront();return this.isCompleteForChild(t)},e.prototype.isCompleteForChild=function(e){return this.isFullyInitialized()&&!this.filtered_||this.node_.hasChild(e)},e.prototype.getNode=function(){return this.node_},e}(),mt=function(){function e(e,t){this.eventCache_=e,this.serverCache_=t}return e.prototype.updateEventSnap=function(t,n,r){return new e(new yt(t,n,r),this.serverCache_)},e.prototype.updateServerSnap=function(t,n,r){return new e(this.eventCache_,new yt(t,n,r))},e.prototype.getEventCache=function(){return this.eventCache_},e.prototype.getCompleteEventSnap=function(){return this.eventCache_.isFullyInitialized()?this.eventCache_.getNode():null},e.prototype.getServerCache=function(){return this.serverCache_},e.prototype.getCompleteServerSnap=function(){return this.serverCache_.isFullyInitialized()?this.serverCache_.getNode():null},e.Empty=new e(new yt(Ve.EMPTY_NODE,!1,!1),new yt(Ve.EMPTY_NODE,!1,!1)),e}(),gt=function(){function e(e,t,n,r,i){this.type=e,this.snapshotNode=t,this.childName=n,this.oldSnap=r,this.prevName=i}return e.valueChange=function(t){return new e(e.VALUE,t)},e.childAddedChange=function(t,n){return new e(e.CHILD_ADDED,n,t)},e.childRemovedChange=function(t,n){return new e(e.CHILD_REMOVED,n,t)},e.childChangedChange=function(t,n,r){return new e(e.CHILD_CHANGED,n,t,r)},e.childMovedChange=function(t,n){return new e(e.CHILD_MOVED,n,t)},e.CHILD_ADDED="child_added",e.CHILD_REMOVED="child_removed",e.CHILD_CHANGED="child_changed",e.CHILD_MOVED="child_moved",e.VALUE="value",e}(),bt=function(){function e(e){this.index_=e}return e.prototype.updateChild=function(e,t,n,r,i,a){Object(o.f)(e.isIndexed(this.index_),"A node must be indexed if only a child is updated");var s=e.getImmediateChild(t);return s.getChild(r).equals(n.getChild(r))&&s.isEmpty()===n.isEmpty()?e:(null!=a&&(n.isEmpty()?e.hasChild(t)?a.trackChildChange(gt.childRemovedChange(t,s)):Object(o.f)(e.isLeafNode(),"A child remove without an old child only makes sense on a leaf node"):s.isEmpty()?a.trackChildChange(gt.childAddedChange(t,n)):a.trackChildChange(gt.childChangedChange(t,n,s))),e.isLeafNode()&&n.isEmpty()?e:e.updateImmediateChild(t,n).withIndex(this.index_))},e.prototype.updateFullNode=function(e,t,n){return null!=n&&(e.isLeafNode()||e.forEachChild(Pe,(function(e,r){t.hasChild(e)||n.trackChildChange(gt.childRemovedChange(e,r))})),t.isLeafNode()||t.forEachChild(Pe,(function(t,r){if(e.hasChild(t)){var i=e.getImmediateChild(t);i.equals(r)||n.trackChildChange(gt.childChangedChange(t,r,i))}else n.trackChildChange(gt.childAddedChange(t,r))}))),t.withIndex(this.index_)},e.prototype.updatePriority=function(e,t){return e.isEmpty()?Ve.EMPTY_NODE:e.updatePriority(t)},e.prototype.filtersNodes=function(){return!1},e.prototype.getIndexedFilter=function(){return this},e.prototype.getIndex=function(){return this.index_},e}(),_t=function(){function e(){this.changeMap=new Map}return e.prototype.trackChildChange=function(e){var t=e.type,n=e.childName;Object(o.f)(t===gt.CHILD_ADDED||t===gt.CHILD_CHANGED||t===gt.CHILD_REMOVED,"Only child changes supported for tracking"),Object(o.f)(".priority"!==n,"Only non-priority child changes can be tracked.");var r=this.changeMap.get(n);if(r){var i=r.type;if(t===gt.CHILD_ADDED&&i===gt.CHILD_REMOVED)this.changeMap.set(n,gt.childChangedChange(n,e.snapshotNode,r.snapshotNode));else if(t===gt.CHILD_REMOVED&&i===gt.CHILD_ADDED)this.changeMap.delete(n);else if(t===gt.CHILD_REMOVED&&i===gt.CHILD_CHANGED)this.changeMap.set(n,gt.childRemovedChange(n,r.oldSnap));else if(t===gt.CHILD_CHANGED&&i===gt.CHILD_ADDED)this.changeMap.set(n,gt.childAddedChange(n,e.snapshotNode));else{if(t!==gt.CHILD_CHANGED||i!==gt.CHILD_CHANGED)throw Object(o.g)("Illegal combination of changes: "+e+" occurred after "+r);this.changeMap.set(n,gt.childChangedChange(n,e.snapshotNode,r.oldSnap))}}else this.changeMap.set(n,e)},e.prototype.getChanges=function(){return Array.from(this.changeMap.values())},e}(),wt=new(function(){function e(){}return e.prototype.getCompleteChild=function(e){return null},e.prototype.getChildAfterChild=function(e,t,n){return null},e}()),kt=function(){function e(e,t,n){void 0===n&&(n=null),this.writes_=e,this.viewCache_=t,this.optCompleteServerCache_=n}return e.prototype.getCompleteChild=function(e){var t=this.viewCache_.getEventCache();if(t.isCompleteForChild(e))return t.getNode().getImmediateChild(e);var n=null!=this.optCompleteServerCache_?new yt(this.optCompleteServerCache_,!0,!1):this.viewCache_.getServerCache();return this.writes_.calcCompleteChild(e,n)},e.prototype.getChildAfterChild=function(e,t,n){var r=null!=this.optCompleteServerCache_?this.optCompleteServerCache_:this.viewCache_.getCompleteServerSnap(),i=this.writes_.calcIndexedSlice(r,t,1,n,e);return 0===i.length?null:i[0]},e}(),St=function(e,t){this.viewCache=e,this.changes=t},Ot=function(){function e(e){this.filter_=e}return e.prototype.assertIndexed=function(e){Object(o.f)(e.getEventCache().getNode().isIndexed(this.filter_.getIndex()),"Event snap not indexed"),Object(o.f)(e.getServerCache().getNode().isIndexed(this.filter_.getIndex()),"Server snap not indexed")},e.prototype.applyOperation=function(t,n,r,i){var a,s,u=new _t;if(n.type===at.OVERWRITE){var c=n;c.source.fromUser?a=this.applyUserOverwrite_(t,c.path,c.snap,r,i,u):(Object(o.f)(c.source.fromServer,"Unknown source."),s=c.source.tagged||t.getServerCache().isFiltered()&&!c.path.isEmpty(),a=this.applyServerOverwrite_(t,c.path,c.snap,r,i,s,u))}else if(n.type===at.MERGE){var l=n;l.source.fromUser?a=this.applyUserMerge_(t,l.path,l.children,r,i,u):(Object(o.f)(l.source.fromServer,"Unknown source."),s=l.source.tagged||t.getServerCache().isFiltered(),a=this.applyServerMerge_(t,l.path,l.children,r,i,s,u))}else if(n.type===at.ACK_USER_WRITE){var f=n;a=f.revert?this.revertUserWrite_(t,f.path,r,i,u):this.ackUserWrite_(t,f.path,f.affectedTree,r,i,u)}else{if(n.type!==at.LISTEN_COMPLETE)throw Object(o.g)("Unknown operation type: "+n.type);a=this.listenComplete_(t,n.path,r,u)}var h=u.getChanges();return e.maybeAddValueEvent_(t,a,h),new St(a,h)},e.maybeAddValueEvent_=function(e,t,n){var r=t.getEventCache();if(r.isFullyInitialized()){var i=r.getNode().isLeafNode()||r.getNode().isEmpty(),o=e.getCompleteEventSnap();(n.length>
20||!e.getEventCache().isFullyInitialized()||i&&!r.getNode().equals(o)||!r.getNode().getPriority().equals(o.getPriority()))&&n.push(gt.valueChange(t.getCompleteEventSnap()))}},e.prototype.generateEventCacheAfterServerEvent_=function(e,t,n,r,i){var a=e.getEventCache();if(null!=n.shadowingWrite(t))return e;var s=void 0,u=void 0;if(t.isEmpty())if(Object(o.f)(e.getServerCache().isFullyInitialized(),"If change path is empty, we must have complete server data"),e.getServerCache().isFiltered()){var c=e.getCompleteServerSnap(),l=c instanceof Ve?c:Ve.EMPTY_NODE,f=n.calcCompleteEventChildren(l);s=this.filter_.updateFullNode(e.getEventCache().getNode(),f,i)}else{var h=n.calcCompleteEventCache(e.getCompleteServerSnap());s=this.filter_.updateFullNode(e.getEventCache().getNode(),h,i)}else{var d=t.getFront();if(".priority"===d){Object(o.f)(1===t.getLength(),"Can't have a priority with additional path components");var p=a.getNode();u=e.getServerCache().getNode();var v=n.calcEventCacheAfterServerOverwrite(t,p,u);s=null!=v?this.filter_.updatePriority(p,v):a.getNode()}else{var y=t.popFront(),m=void 0;if(a.isCompleteForChild(d)){u=e.getServerCache().getNode();var g=n.calcEventCacheAfterServerOverwrite(t,a.getNode(),u);m=null!=g?a.getNode().getImmediateChild(d).updateChild(y,g):a.getNode().getImmediateChild(d)}else m=n.calcCompleteChild(d,e.getServerCache());s=null!=m?this.filter_.updateChild(a.getNode(),d,m,y,r,i):a.getNode()}}return e.updateEventSnap(s,a.isFullyInitialized()||t.isEmpty(),this.filter_.filtersNodes())},e.prototype.applyServerOverwrite_=function(e,t,n,r,i,o,a){var s,u=e.getServerCache(),c=o?this.filter_:this.filter_.getIndexedFilter();if(t.isEmpty())s=c.updateFullNode(u.getNode(),n,null);else if(c.filtersNodes()&&!u.isFiltered()){var l=u.getNode().updateChild(t,n);s=c.updateFullNode(u.getNode(),l,null)}else{var f=t.getFront();if(!u.isCompleteForPath(t)&&t.getLength()>1)return e;var h=t.popFront(),d=u.getNode().getImmediateChild(f).updateChild(h,n);s=".priority"===f?c.updatePriority(u.getNode(),d):c.updateChild(u.getNode(),f,d,h,wt,null)}var p=e.updateServerSnap(s,u.isFullyInitialized()||t.isEmpty(),c.filtersNodes()),v=new kt(r,p,i);return this.generateEventCacheAfterServerEvent_(p,t,r,v,a)},e.prototype.applyUserOverwrite_=function(e,t,n,r,i,o){var a,s,u=e.getEventCache(),c=new kt(r,e,i);if(t.isEmpty())s=this.filter_.updateFullNode(e.getEventCache().getNode(),n,o),a=e.updateEventSnap(s,!0,this.filter_.filtersNodes());else{var l=t.getFront();if(".priority"===l)s=this.filter_.updatePriority(e.getEventCache().getNode(),n),a=e.updateEventSnap(s,u.isFullyInitialized(),u.isFiltered());else{var f=t.popFront(),h=u.getNode().getImmediateChild(l),d=void 0;if(f.isEmpty())d=n;else{var p=c.getCompleteChild(l);d=null!=p?".priority"===f.getBack()&&p.getChild(f.parent()).isEmpty()?p:p.updateChild(f,n):Ve.EMPTY_NODE}if(h.equals(d))a=e;else{var v=this.filter_.updateChild(u.getNode(),l,d,f,c,o);a=e.updateEventSnap(v,u.isFullyInitialized(),this.filter_.filtersNodes())}}}return a},e.cacheHasChild_=function(e,t){return e.getEventCache().isCompleteForChild(t)},e.prototype.applyUserMerge_=function(t,n,r,i,o,a){var s=this,u=t;return r.foreach((function(r,c){var l=n.child(r);e.cacheHasChild_(t,l.getFront())&&(u=s.applyUserOverwrite_(u,l,c,i,o,a))})),r.foreach((function(r,c){var l=n.child(r);e.cacheHasChild_(t,l.getFront())||(u=s.applyUserOverwrite_(u,l,c,i,o,a))})),u},e.prototype.applyMerge_=function(e,t){return t.foreach((function(t,n){e=e.updateChild(t,n)})),e},e.prototype.applyServerMerge_=function(e,t,n,r,i,o,a){var s=this;if(e.getServerCache().getNode().isEmpty()&&!e.getServerCache().isFullyInitialized())return e;var u,c=e;u=t.isEmpty()?n:ht.Empty.setTree(t,n);var l=e.getServerCache().getNode();return u.children.inorderTraversal((function(t,n){if(l.hasChild(t)){var u=e.getServerCache().getNode().getImmediateChild(t),f=s.applyMerge_(u,n);c=s.applyServerOverwrite_(c,new U(t),f,r,i,o,a)}})),u.children.inorderTraversal((function(t,n){var u=!e.getServerCache().isCompleteForChild(t)&&null==n.value;if(!l.hasChild(t)&&!u){var f=e.getServerCache().getNode().getImmediateChild(t),h=s.applyMerge_(f,n);c=s.applyServerOverwrite_(c,new U(t),h,r,i,o,a)}})),c},e.prototype.ackUserWrite_=function(e,t,n,r,i,o){if(null!=r.shadowingWrite(t))return e;var a=e.getServerCache().isFiltered(),s=e.getServerCache();if(null!=n.value){if(t.isEmpty()&&s.isFullyInitialized()||s.isCompleteForPath(t))return this.applyServerOverwrite_(e,t,s.getNode().getChild(t),r,i,a,o);if(t.isEmpty()){var u=ht.Empty;
2return s.getNode().forEachChild(be,(function(e,t){u=u.set(new U(e),t)})),this.applyServerMerge_(e,t,u,r,i,a,o)}return e}var c=ht.Empty;return n.foreach((function(e,n){var r=t.child(e);s.isCompleteForPath(r)&&(c=c.set(e,s.getNode().getChild(r)))})),this.applyServerMerge_(e,t,c,r,i,a,o)},e.prototype.listenComplete_=function(e,t,n,r){var i=e.getServerCache(),o=e.updateServerSnap(i.getNode(),i.isFullyInitialized()||t.isEmpty(),i.isFiltered());return this.generateEventCacheAfterServerEvent_(o,t,n,wt,r)},e.prototype.revertUserWrite_=function(e,t,n,r,i){var a;if(null!=n.shadowingWrite(t))return e;var s=new kt(n,e,r),u=e.getEventCache().getNode(),c=void 0;if(t.isEmpty()||".priority"===t.getFront()){var l=void 0;if(e.getServerCache().isFullyInitialized())l=n.calcCompleteEventCache(e.getCompleteServerSnap());else{var f=e.getServerCache().getNode();Object(o.f)(f instanceof Ve,"serverChildren would be complete if leaf node"),l=n.calcCompleteEventChildren(f)}l=l,c=this.filter_.updateFullNode(u,l,i)}else{var h=t.getFront(),d=n.calcCompleteChild(h,e.getServerCache());null==d&&e.getServerCache().isCompleteForChild(h)&&(d=u.getImmediateChild(h)),(c=null!=d?this.filter_.updateChild(u,h,d,t.popFront(),s,i):e.getEventCache().getNode().hasChild(h)?this.filter_.updateChild(u,h,Ve.EMPTY_NODE,t.popFront(),s,i):u).isEmpty()&&e.getServerCache().isFullyInitialized()&&(a=n.calcCompleteEventCache(e.getCompleteServerSnap())).isLeafNode()&&(c=this.filter_.updateFullNode(c,a,i))}return a=e.getServerCache().isFullyInitialized()||null!=n.shadowingWrite(U.Empty),e.updateEventSnap(c,a,this.filter_.filtersNodes())},e}(),Et=function(){function e(e){this.query_=e,this.index_=this.query_.getQueryParams().getIndex()}return e.prototype.generateEventsForChanges=function(e,t,n){var r=this,i=[],o=[];return e.forEach((function(e){e.type===gt.CHILD_CHANGED&&r.index_.indexedValueChanged(e.oldSnap,e.snapshotNode)&&o.push(gt.childMovedChange(e.childName,e.snapshotNode))})),this.generateEventsForType_(i,gt.CHILD_REMOVED,e,n,t),this.generateEventsForType_(i,gt.CHILD_ADDED,e,n,t),this.generateEventsForType_(i,gt.CHILD_MOVED,o,n,t),this.generateEventsForType_(i,gt.CHILD_CHANGED,e,n,t),this.generateEventsForType_(i,gt.VALUE,e,n,t),i},e.prototype.generateEventsForType_=function(e,t,n,r,i){var o=this,a=n.filter((function(e){return e.type===t}));a.sort(this.compareChanges_.bind(this)),a.forEach((function(t){var n=o.materializeSingleChange_(t,i);r.forEach((function(r){r.respondsTo(t.type)&&e.push(r.createEvent(n,o.query_))}))}))},e.prototype.materializeSingleChange_=function(e,t){return"value"===e.type||"child_removed"===e.type||(e.prevName=t.getPredecessorChildName(e.childName,e.snapshotNode,this.index_)),e},e.prototype.compareChanges_=function(e,t){if(null==e.childName||null==t.childName)throw Object(o.g)("Should only compare child_ events.");var n=new ye(e.childName,e.snapshotNode),r=new ye(t.childName,t.snapshotNode);return this.index_.compare(n,r)},e}(),Tt=function(){function e(e,t){this.query_=e,this.eventRegistrations_=[];var n=this.query_.getQueryParams(),r=new bt(n.getIndex()),i=n.getNodeFilter();this.processor_=new Ot(i);var o=t.getServerCache(),a=t.getEventCache(),s=r.updateFullNode(Ve.EMPTY_NODE,o.getNode(),null),u=i.updateFullNode(Ve.EMPTY_NODE,a.getNode(),null),c=new yt(s,o.isFullyInitialized(),r.filtersNodes()),l=new yt(u,a.isFullyInitialized(),i.filtersNodes());this.viewCache_=new mt(l,c),this.eventGenerator_=new Et(this.query_)}return e.prototype.getQuery=function(){return this.query_},e.prototype.getServerCache=function(){return this.viewCache_.getServerCache().getNode()},e.prototype.getCompleteServerCache=function(e){var t=this.viewCache_.getCompleteServerSnap();return t&&(this.query_.getQueryParams().loadsAllData()||!e.isEmpty()&&!t.getImmediateChild(e.getFront()).isEmpty())?t.getChild(e):null},e.prototype.isEmpty=function(){return 0===this.eventRegistrations_.length},e.prototype.addEventRegistration=function(e){this.eventRegistrations_.push(e)},e.prototype.removeEventRegistration=function(e,t){var n=[];if(t){Object(o.f)(null==e,"A cancel should cancel all event registrations.");var r=this.query_.path;this.eventRegistrations_.forEach((function(e){t=t;var i=e.createCancelEvent(t,r);i&&n.push(i)}))}if(e){for(var i=[],a=0;a<this.eventRegistrations_.length;++a){var s=this.eventRegistrations_[a];if(s.matches(e)){if(e.hasAnyCallback()){i=i.concat(this.eventRegistrations_.slice(a+1));break}}else i.push(s)}this.eventRegistrations_=i}else this.eventRegistrations_=[];return n},e.prototype.applyOperation=function(e,t,n){e.type===at.MERGE&&null!==e.source.queryId&&(Object(o.f)(this.viewCache_.getCompleteServerSnap(),"We should always have a full c
2ache before handling merges"),Object(o.f)(this.viewCache_.getCompleteEventSnap(),"Missing event cache, even though we have a server cache"));var r=this.viewCache_,i=this.processor_.applyOperation(r,e,t,n);return this.processor_.assertIndexed(i.viewCache),Object(o.f)(i.viewCache.getServerCache().isFullyInitialized()||!r.getServerCache().isFullyInitialized(),"Once a server snap is complete, it should never go back"),this.viewCache_=i.viewCache,this.generateEventsForChanges_(i.changes,i.viewCache.getEventCache().getNode(),null)},e.prototype.getInitialEvents=function(e){var t=this.viewCache_.getEventCache(),n=[];t.getNode().isLeafNode()||t.getNode().forEachChild(Pe,(function(e,t){n.push(gt.childAddedChange(e,t))}));return t.isFullyInitialized()&&n.push(gt.valueChange(t.getNode())),this.generateEventsForChanges_(n,t.getNode(),e)},e.prototype.generateEventsForChanges_=function(e,t,n){var r=n?[n]:this.eventRegistrations_;return this.eventGenerator_.generateEventsForChanges(e,t,r)},e}(),Ct=function(){function e(){this.views=new Map}return Object.defineProperty(e,"__referenceConstructor",{get:function(){return Object(o.f)(ct,"Reference.ts has not been loaded"),ct},set:function(e){Object(o.f)(!ct,"__referenceConstructor has already been defined"),ct=e},enumerable:!1,configurable:!0}),e.prototype.isEmpty=function(){return 0===this.views.size},e.prototype.applyOperation=function(e,t,n){var r,a,s=e.source.queryId;if(null!==s){var u=this.views.get(s);return Object(o.f)(null!=u,"SyncTree gave us an op for an invalid query."),u.applyOperation(e,t,n)}var c=[];try{for(var l=Object(i.h)(this.views.values()),f=l.next();!f.done;f=l.next()){u=f.value;c=c.concat(u.applyOperation(e,t,n))}}catch(h){r={error:h}}finally{try{f&&!f.done&&(a=l.return)&&a.call(l)}finally{if(r)throw r.error}}return c},e.prototype.addEventRegistration=function(e,t,n,r,i){var o=e.queryIdentifier(),a=this.views.get(o);if(!a){var s=n.calcCompleteEventCache(i?r:null),u=!1;s?u=!0:r instanceof Ve?(s=n.calcCompleteEventChildren(r),u=!1):(s=Ve.EMPTY_NODE,u=!1);var c=new mt(new yt(s,u,!1),new yt(r,i,!1));a=new Tt(e,c),this.views.set(o,a)}return a.addEventRegistration(t),a.getInitialEvents(t)},e.prototype.removeEventRegistration=function(t,n,r){var o,a,s=t.queryIdentifier(),u=[],c=[],l=this.hasCompleteView();if("default"===s)try{for(var f=Object(i.h)(this.views.entries()),h=f.next();!h.done;h=f.next()){var d=Object(i.e)(h.value,2),p=d[0],v=d[1];c=c.concat(v.removeEventRegistration(n,r)),v.isEmpty()&&(this.views.delete(p),v.getQuery().getQueryParams().loadsAllData()||u.push(v.getQuery()))}}catch(y){o={error:y}}finally{try{h&&!h.done&&(a=f.return)&&a.call(f)}finally{if(o)throw o.error}}else(v=this.views.get(s))&&(c=c.concat(v.removeEventRegistration(n,r)),v.isEmpty()&&(this.views.delete(s),v.getQuery().getQueryParams().loadsAllData()||u.push(v.getQuery())));return l&&!this.hasCompleteView()&&u.push(new e.__referenceConstructor(t.repo,t.path)),{removed:u,events:c}},e.prototype.getQueryViews=function(){var e,t,n=[];try{for(var r=Object(i.h)(this.views.values()),o=r.next();!o.done;o=r.next()){var a=o.value;a.getQuery().getQueryParams().loadsAllData()||n.push(a)}}catch(s){e={error:s}}finally{try{o&&!o.done&&(t=r.return)&&t.call(r)}finally{if(e)throw e.error}}return n},e.prototype.getCompleteServerCache=function(e){var t,n,r=null;try{for(var o=Object(i.h)(this.views.values()),a=o.next();!a.done;a=o.next()){var s=a.value;r=r||s.getCompleteServerCache(e)}}catch(u){t={error:u}}finally{try{a&&!a.done&&(n=o.return)&&n.call(o)}finally{if(t)throw t.error}}return r},e.prototype.viewForQuery=function(e){if(e.getQueryParams().loadsAllData())return this.getCompleteView();var t=e.queryIdentifier();return this.views.get(t)},e.prototype.viewExistsForQuery=function(e){return null!=this.viewForQuery(e)},e.prototype.hasCompleteView=function(){return null!=this.getCompleteView()},e.prototype.getCompleteView=function(){var e,t;try{for(var n=Object(i.h)(this.views.values()),r=n.next();!r.done;r=n.next()){var o=r.value;if(o.getQuery().getQueryParams().loadsAllData())return o}}catch(a){e={error:a}}finally{try{r&&!r.done&&(t=n.return)&&t.call(n)}finally{if(e)throw e.error}}return null},e}(),Pt=function(){function e(e){this.writeTree_=e}return e.prototype.addWrite=function(t,n){if(t.isEmpty())return new e(new ht(n));var r=this.writeTree_.findRootMostValueAndPath(t);if(null!=r){var i=r.path,o=r.value,a=U.relativePath(i,t);return o=o.updateChild(a,n),new e(this.writeTree_.set(i,o))}var s=new ht(n);return new e(this.writeTree_.setTree(t,s))},e.prototype.addWrites=function(e,t){var n=this;return A(t,(function(t,r){n=n.addWrite(e.child(t),r)})),n},e.prototype.removeWrite=function(t){return t.isEmpty()?e.Empty:new e(this.writeTree_.setTree(t,ht.Empty))},e.prototype.hasCompleteWrite=function(e){return null!=this.getCompleteNode(e)},e.prototype.getCompleteNode=function(e){var t=this.writeTree_.findRootMostValueAndPath(e);return null!=t?this.writeTree_.get(t.path).getChild(U.relativePath(t.path,e)):null},e.prototype.getCompleteChildren=function(){var e=[],t=this.writeTree_.value;return null!=t?t.isLeafNode()||t.forEachChild(Pe,(function(t,n){e.push(new ye(t,n))})):this.writeTree_.children.inorderTraversal((function(t,n){null!=n.value&&e.push(new ye(t,n.value))})),e},e.prototype.childCompoundWrite=function(t){if(t.isEmpty())return this;var n=this.getCompleteNode(t);return new e(null!=n?new ht(n):this.writeTree_.subtree(t))},e.prototype.isEmpty=function(){return this.writeTree_.isEmpty()},e.prototype.apply=function(e){return xt(U.Empty,this.writeTree_,e)},e.Empty=new e(new ht(null)),e}();function xt(e,t,n){if(null!=t.value)return n.updateChild(e,t.value);var r=null;return t.children.inorderTraversal((function(t,i){".priority"===t?(Object(o.f)(null!==i.value,"Priority writes must al
2ways be leaf nodes"),r=i.value):n=xt(e.child(t),i,n)})),n.getChild(e).isEmpty()||null===r||(n=n.updateChild(e.child(".priority"),r)),n}var It=function(){function e(){this.visibleWrites_=Pt.Empty,this.allWrites_=[],this.lastWriteId_=-1}return e.prototype.childWrites=function(e){return new jt(e,this)},e.prototype.addOverwrite=function(e,t,n,r){Object(o.f)(n>this.lastWriteId_,"Stacking an older write on top of newer ones"),void 0===r&&(r=!0),this.allWrites_.push({path:e,snap:t,writeId:n,visible:r}),r&&(this.visibleWrites_=this.visibleWrites_.addWrite(e,t)),this.lastWriteId_=n},e.prototype.addMerge=function(e,t,n){Object(o.f)(n>this.lastWriteId_,"Stacking an older merge on top of newer ones"),this.allWrites_.push({path:e,children:t,writeId:n,visible:!0}),this.visibleWrites_=this.visibleWrites_.addWrites(e,t),this.lastWriteId_=n},e.prototype.getWrite=function(e){for(var t=0;t<this.allWrites_.length;t++){var n=this.allWrites_[t];if(n.writeId===e)return n}return null},e.prototype.removeWrite=function(e){var t=this,n=this.allWrites_.findIndex((function(t){return t.writeId===e}));Object(o.f)(n>=0,"removeWrite called with nonexistent writeId.");var r=this.allWrites_[n];this.allWrites_.splice(n,1);for(var i=r.visible,a=!1,s=this.allWrites_.length-1;i&&s>=0;){var u=this.allWrites_[s];u.visible&&(s>=n&&this.recordContainsPath_(u,r.path)?i=!1:r.path.contains(u.path)&&(a=!0)),s--}if(i){if(a)return this.resetTree_(),!0;r.snap?this.visibleWrites_=this.visibleWrites_.removeWrite(r.path):A(r.children,(function(e){t.visibleWrites_=t.visibleWrites_.removeWrite(r.path.child(e))}));return!0}return!1},e.prototype.getCompleteWriteData=function(e){return this.visibleWrites_.getCompleteNode(e)},e.prototype.calcCompleteEventCache=function(t,n,r,i){if(r||i){var o=this.visibleWrites_.childCompoundWrite(t);if(!i&&o.isEmpty())return n;if(i||null!=n||o.hasCompleteWrite(U.Empty)){var a=e.layerTree_(this.allWrites_,(function(e){return(e.visible||i)&&(!r||!~r.indexOf(e.writeId))&&(e.path.contains(t)||t.contains(e.path))}),t);c=n||Ve.EMPTY_NODE;return a.apply(c)}return null}var s=this.visibleWrites_.getCompleteNode(t);if(null!=s)return s;var u=this.visibleWrites_.childCompoundWrite(t);if(u.isEmpty())return n;if(null!=n||u.hasCompleteWrite(U.Empty)){var c=n||Ve.EMPTY_NODE;return u.apply(c)}return null},e.prototype.calcCompleteEventChildren=function(e,t){var n=Ve.EMPTY_NODE,r=this.visibleWrites_.getCompleteNode(e);if(r)return r.isLeafNode()||r.forEachChild(Pe,(function(e,t){n=n.updateImmediateChild(e,t)})),n;if(t){var i=this.visibleWrites_.childCompoundWrite(e);return t.forEachChild(Pe,(function(e,t){var r=i.childCompoundWrite(new U(e)).apply(t);n=n.updateImmediateChild(e,r)}
2)),i.getCompleteChildren().forEach((function(e){n=n.updateImmediateChild(e.name,e.node)})),n}return this.visibleWrites_.childCompoundWrite(e).getCompleteChildren().forEach((function(e){n=n.updateImmediateChild(e.name,e.node)})),n},e.prototype.calcEventCacheAfterServerOverwrite=function(e,t,n,r){Object(o.f)(n||r,"Either existingEventSnap or existingServerSnap must exist");var i=e.child(t);if(this.visibleWrites_.hasCompleteWrite(i))return null;var a=this.visibleWrites_.childCompoundWrite(i);return a.isEmpty()?r.getChild(t):a.apply(r.getChild(t))},e.prototype.calcCompleteChild=function(e,t,n){var r=e.child(t),i=this.visibleWrites_.getCompleteNode(r);return null!=i?i:n.isCompleteForChild(t)?this.visibleWrites_.childCompoundWrite(r).apply(n.getNode().getImmediateChild(t)):null},e.prototype.shadowingWrite=function(e){return this.visibleWrites_.getCompleteNode(e)},e.prototype.calcIndexedSlice=function(e,t,n,r,i,o){var a,s=this.visibleWrites_.childCompoundWrite(e),u=s.getCompleteNode(U.Empty);if(null!=u)a=u;else{if(null==t)return[];a=s.apply(t)}if((a=a.withIndex(o)).isEmpty()||a.isLeafNode())return[];for(var c=[],l=o.getCompare(),f=i?a.getReverseIteratorFrom(n,o):a.getIteratorFrom(n,o),h=f.getNext();h&&c.length<r;)0!==l(h,n)&&c.push(h),h=f.getNext();return c},e.prototype.recordContainsPath_=function(e,t){if(e.snap)return e.path.contains(t);for(var n in e.children)if(e.children.hasOwnProperty(n)&&e.path.child(n).contains(t))return!0;return!1},e.prototype.resetTree_=function(){this.visibleWrites_=e.layerTree_(this.allWrites_,e.DefaultFilter_,U.Empty),this.allWrites_.length>0?this.lastWriteId_=this.allWrites_[this.allWrites_.length-1].writeId:this.lastWriteId_=-1},e.DefaultFilter_=function(e){return e.visible},e.layerTree_=function(e,t,n){for(var r=Pt.Empty,i=0;i<e.length;++i){var a=e[i];if(t(a)){var s=a.path,u=void 0;if(a.snap)n.contains(s)?(u=U.relativePath(n,s),r=r.addWrite(u,a.snap)):s.contains(n)&&(u=U.relativePath(s,n),r=r.addWrite(U.Empty,a.snap.getChild(u)));else{if(!a.children)throw Object(o.g)("WriteRecord should have .snap or .children");if(n.contains(s))u=U.relativePath(n,s),r=r.addWrites(u,a.children);else if(s.contains(n))if((u=U.relativePath(s,n)).isEmpty())r=r.addWrites(U.Empty,a.children);else{var c=Object(o.G)(a.children,u.getFront());if(c){var l=c.getChild(u.popFront());r=r.addWrite(U.Empty,l)}}}}}return r},e}(),jt=function(){function e(e,t){this.treePath_=e,this.writeTree_=t}return e.prototype.calcCompleteEventCache=function(e,t,n){return this.writeTree_.calcCompleteEventCache(this.treePath_,e,t,n)},e.prototype.calcCompleteEventChildren=function(e){return this.writeTree_.calcCompleteEventChildren(this.treePath_,e)},e.prototype.calcEventCacheAfterServerOverwrite=function(e,t,n){return this.writeTree_.calcEventCacheAfterServerOverwrite(this.treePath_,e,t,n)},e.prototype.shadowingWrite=function(e){return this.writeTree_.shadowingWrite(this.treePath_.child(e))},e.prototype.calcIndexedSlice=function(e,t,n,r,i){return this.writeTree_.calcIndexedSlice(this.treePath_,e,t,n,r,i)},e.prototype.calcCompleteChild=function(e,t){return this.writeTree_.calcCompleteChild(this.treePath_,e,t)},e.prototype.child=function(t){return new e(this.treePath_.child(t),this.writeTree_)},e}(),Rt=function(){function e(e){this.listenProvider_=e,this.syncPointTree_=ht.Empty,this.pendingWriteTree_=new It,this.tagToQueryMap=new Map,this.queryToTagMap=new Map}return e.prototype.applyUserOverwrite=function(e,t,n,r){return this.pendingWriteTree_.addOverwrite(e,t,n,r),r?this.applyOperationToSyncPoints_(new pt(lt.User,e,t)):[]},e.prototype.applyUserMerge=function(e,t,n){this.pendingWriteTree_.addMerge(e,t,n);var r=ht.fromObject(t);return this.applyOperationToSyncPoints_(new vt(lt.User,e,r))},e.prototype.ackUserWrite=function(e,t){void 0===t&&(t=!1);var n=this.pendingWriteTree_.getWrite(e);if(this.pendingWriteTree_.removeWrite(e)){var r=ht.Empty;return null!=n.snap?r=r.set(U.Empty,!0):A(n.children,(function(e,t){r=r.set(new U(e),t)})),this.applyOperationToSyncPoints_(new ft(n.path,r,t))}return[]},e.prototype.applyServerOverwrite=function(e,t){return this.applyOperationToSyncPoints_(new pt(lt.Server,e,t))},e.prototype.applyServerMerge=function(e,t){var n=ht.fromObject(t);
2return this.applyOperationToSyncPoints_(new vt(lt.Server,e,n))},e.prototype.applyListenComplete=function(e){return this.applyOperationToSyncPoints_(new dt(lt.Server,e))},e.prototype.applyTaggedQueryOverwrite=function(t,n,r){var i=this.queryKeyForTag_(r);if(null!=i){var o=e.parseQueryKey_(i),a=o.path,s=o.queryId,u=U.relativePath(a,t),c=new pt(lt.forServerTaggedQuery(s),u,n);return this.applyTaggedOperation_(a,c)}return[]},e.prototype.applyTaggedQueryMerge=function(t,n,r){var i=this.queryKeyForTag_(r);if(i){var o=e.parseQueryKey_(i),a=o.path,s=o.queryId,u=U.relativePath(a,t),c=ht.fromObject(n),l=new vt(lt.forServerTaggedQuery(s),u,c);return this.applyTaggedOperation_(a,l)}return[]},e.prototype.applyTaggedListenComplete=function(t,n){var r=this.queryKeyForTag_(n);if(r){var i=e.parseQueryKey_(r),o=i.path,a=i.queryId,s=U.relativePath(o,t),u=new dt(lt.forServerTaggedQuery(a),s);return this.applyTaggedOperation_(o,u)}return[]},e.prototype.addEventRegistration=function(t,n){var r=t.path,i=null,a=!1;this.syncPointTree_.foreachOnPath(r,(function(e,t){var n=U.relativePath(e,r);i=i||t.getCompleteServerCache(n),a=a||t.hasCompleteView()}));var s,u=this.syncPointTree_.get(r);(u?(a=a||u.hasCompleteView(),i=i||u.getCompleteServerCache(U.Empty)):(u=new Ct,this.syncPointTree_=this.syncPointTree_.set(r,u)),null!=i)?s=!0:(s=!1,i=Ve.EMPTY_NODE,this.syncPointTree_.subtree(r).foreachChild((function(e,t){var n=t.getCompleteServerCache(U.Empty);n&&(i=i.updateImmediateChild(e,n))})));var c=u.viewExistsForQuery(t);if(!c&&!t.getQueryParams().loadsAllData()){var l=e.makeQueryKey_(t);Object(o.f)(!this.queryToTagMap.has(l),"View does not exist, but we have a tag");var f=e.getNextQueryTag_();this.queryToTagMap.set(l,f),this.tagToQueryMap.set(f,l)}var h=this.pendingWriteTree_.childWrites(r),d=u.addEventRegistration(t,n,h,i,s);if(!c&&!a){var p=u.viewForQuery(t);d=d.concat(this.setupListener_(t,p))}return d},e.prototype.removeEventRegistration=function(t,n,r){var i=this,o=t.path,a=this.syncPointTree_.get(o),s=[];if(a&&("default"===t.queryIdentifier()||a.viewExistsForQuery(t))){var u=a.removeEventRegistration(t,n,r);a.isEmpty()&&(this.syncPointTree_=this.syncPointTree_.remove(o));var c=u.removed;s=u.events;var l=-1!==c.findIndex((function(e){return e.getQueryParams().loadsAllData()})),f=this.syncPointTree_.findOnPath(o,(function(e,t){return t.hasCompleteView()}));if(l&&!f){var h=this.syncPointTree_.subtree(o);if(!h.isEmpty())for(var d=this.collectDistinctViewsForSubTree_(h),p=0;p<d.length;++p){var v=d[p],y=v.getQuery(),m=this.createListenerForView_(v);this.listenProvider_.startListening(e.queryForListening_(y),this.tagForQuery_(y),m.hashFn,m.onComplete)}}if(!f&&c.length>0&&!r)if(l){this.listenProvider_.stopListening(e.queryForListening_(t),null)}else c.forEach((function(t){var n=i.queryToTagMap.get(e.makeQueryKey_(t));i.listenProvider_.stopListening(e.queryForListening_(t),n)}));this.removeTags_(c)}return s},e.prototype.calcCompleteEventCache=function(e,t){var n=this.pendingWriteTree_,r=this.syncPointTree_.findOnPath(e,(function(t,n){var r=U.relativePath(t,e),i=n.getCompleteServerCache(r);if(i)return i}));return n.calcCompleteEventCache(e,r,t,!0)},e.prototype.collectDistinctViewsForSubTree_=function(e){return e.fold((function(e,t,n){if(t&&t.hasCompleteView())return[t.getCompleteView()];var r=[];return t&&(r=t.getQueryViews()),A(n,(function(e,t){r=r.concat(t)})),r}))},e.prototype.removeTags_=function(t){for(var n=0;n<t.length;++n){var r=t[n];if(!r.getQueryParams().loadsAllData()){var i=e.makeQueryKey_(r),o=this.queryToTagMap.get(i);this.queryToTagMap.delete(i),this.tagToQueryMap.delete(o)}}},e.queryForListening_=function(e){return e.getQueryParams().loadsAllData()&&
2!e.getQueryParams().isDefault()?e.getRef():e},e.prototype.setupListener_=function(t,n){var r=t.path,i=this.tagForQuery_(t),a=this.createListenerForView_(n),s=this.listenProvider_.startListening(e.queryForListening_(t),i,a.hashFn,a.onComplete),u=this.syncPointTree_.subtree(r);if(i)Object(o.f)(!u.value.hasCompleteView(),"If we're adding a query, it shouldn't be shadowed");else for(var c=u.fold((function(e,t,n){if(!e.isEmpty()&&t&&t.hasCompleteView())return[t.getCompleteView().getQuery()];var r=[];return t&&(r=r.concat(t.getQueryViews().map((function(e){return e.getQuery()})))),A(n,(function(e,t){r=r.concat(t)})),r})),l=0;l<c.length;++l){var f=c[l];this.listenProvider_.stopListening(e.queryForListening_(f),this.tagForQuery_(f))}return s},e.prototype.createListenerForView_=function(e){var t=this,n=e.getQuery(),r=this.tagForQuery_(n);return{hashFn:function(){return(e.getServerCache()||Ve.EMPTY_NODE).hash()},onComplete:function(e){if("ok"===e)return r?t.applyTaggedListenComplete(n.path,r):t.applyListenComplete(n.path);var i=function(e,t){var n="Unknown Error";"too_big"===e?n="The data requested exceeds the maximum size that can be accessed with a single request.":"permission_denied"===e?n="Client doesn't have permission to access the desired data.":"unavailable"===e&&(n="The service is unavailable");var r=new Error(e+" at "+t.path.toString()+": "+n);return r.code=e.toUpperCase(),r}(e,n);return t.removeEventRegistration(n,null,i)}}},e.makeQueryKey_=function(e){return e.path.toString()+"$"+e.queryIdentifier()},e.parseQueryKey_=function(e){var t=e.indexOf("$");return Object(o.f)(-1!==t&&t<e.length-1,"Bad queryKey."),{queryId:e.substr(t+1),path:new U(e.substr(0,t))}},e.prototype.queryKeyForTag_=function(e){return this.tagToQueryMap.get(e)},e.prototype.tagForQuery_=function(t){var n=e.makeQueryKey_(t);return this.queryToTagMap.get(n)},e.getNextQueryTag_=function(){return e.nextQueryTag_++},e.prototype.applyTaggedOperation_=function(e,t){var n=this.syncPointTree_.get(e);Object(o.f)(n,"Missing sync point for query tag that we're tracking");var r=this.pendingWriteTree_.childWrites(e);return n.applyOperation(t,r,null)},e.prototype.applyOperationToSyncPoints_=function(e){return this.applyOperationHelper_(e,this.syncPointTree_,null,this.pendingWriteTree_.childWrites(U.Empty))},e.prototype.applyOperationHelper_=function(e,t,n,r){if(e.path.isEmpty())return this.applyOperationDescendantsHelper_(e,t,n,r);var i=t.get(U.Empty);null==n&&null!=i&&(n=i.getCompleteServerCache(U.Empty));var o=[],a=e.path.getFront(),s=e.operationForChild(a),u=t.children.get(a);if(u&&s){var c=n?n.getImmediateChild(a):null,l=r.child(a);o=o.concat(this.applyOperationHelper_(s,u,c,l))}return i&&(o=o.concat(i.applyOperation(e,r,n))),o},e.prototype.applyOperationDescendantsHelper_=function(e,t,n,r){var i=this,o=t.get(U.Empty);null==n&&null!=o&&(n=o.getCompleteServerCache(U.Empty));var a=[];return t.children.inorderTraversal((function(t,o){var s=n?n.getImmediateChild(t):null,u=r.child(t),c=e.operationForChild(t);c&&(a=a.concat(i.applyOperationDescendantsHelper_(c,o,s,u)))})),o&&(a=a.concat(o.applyOperation(e,r,n))),a},e.nextQueryTag_=1,e}(),At=function(){function e(){this.rootNode_=Ve.EMPTY_NODE}return e.prototype.getNode=function(e){return this.rootNode_.getChild(e)},e.prototype.updateSnapshot=function(e,t){this.rootNode_=this.rootNode_.updateChild(e,t)},e}(),Mt=function(){function e(){this.counters_={}}return e.prototype.incrementCounter=function(e,t){void 0===t&&(t=1),Object(o.k)(this.counters_,e)||(this.counters_[e]=0),this.counters_[e]+=t},e.prototype.get=function(){return Object(o.m)(this.counters_)},e}(),Nt=function(){function e(){}return e.getCollection=function(e){var t=e.toString();return this.collections_[t]||(this.collections_[t]=new Mt),this.collections_[t]},e.getOrCreateReporter=function(e,t){var n=e.toString();return this.reporters_[n]||(this.reporters_[n]=t()),this.reporters_[n]},e.collections_={},e.reporters_={},e}(),Lt=function(){function e(e){this.collection_=e,this.last_=null}return e.prototype.get=function(){var e=this.collection_.get(),t=Object(i.a)({},e);return this.last_&&A(this.last_,(function(e,n){t[e]=t[e]-n})),this.last_=e,t},e}(),Dt=function(){function e(e,t){this.server_=t,this.statsToReport_={},this.statsListener_=new Lt(e);var n=1e4+2e4*Math.random();F(this.reportStats_.bind(this),Math.floor(n))}return e.prototype.includeStat=function(e){this.statsToReport_[e]=!0},e.prototype.reportStats_=function(){var e=this,t=this.statsListener_.get(),n={},r=!1;A(t,(function(t,i){i>0&&Object(o.k)(e.statsToReport_,t)&&(n[t]=i,r=!0)})),r&&this.server_.reportStats(n),F(this.reportStats_.bind(this),Math.floor(2*Math.random()*3e5))},e}(),Ft=function(){function e(){this.eventLists_=[],this.recursionDepth_=0}return e.prototype.queueEvents=function(e){for(var t=null,n=0;n<e.length;n++){var r=e[n],i=r.getPath();null===t||i.equals(t.getPath())||(this.eventLists_.push(t),t=null),null===t&&(t=new Ut(i)),t.add(r)}t&&this.eventLists_.push(t)},e.prototype.raiseEventsAtPath=function(e,t){this.queueEvents(t),this.raiseQueuedEventsMatchingPredicate_((function(t){return t.equals(e)}))},e.prototype.raiseEventsForChangedPath=function(e,t){this.queueEvents(t),this.raiseQueuedEventsMatchingPredicate_((function(t){return t.contains(e)||e.contains(t)}))},e.prototype.raiseQueuedEventsMatchingPredicate_=function(e){this.recursionDepth_++;for(var t=!0,n=0;n<this.eventLists_.length;n++){var r=this.eventLists_[n];if(r)e(r.getPath())?(this.eventLists_[n].raise(),this.eventLists_[n]=null):t=!1}t&&(this.eventLists_=[]),this.recursionDepth_--},e}(),Ut=function(){function e(e){this.path_=e,this.events_=[]}
2return e.prototype.add=function(e){this.events_.push(e)},e.prototype.raise=function(){for(var e=0;e<this.events_.length;e++){var t=this.events_[e];if(null!==t){this.events_[e]=null;var n=t.getEventRunner();m&&_("event: "+t.toString()),D(n)}}},e.prototype.getPath=function(){return this.path_},e}(),Vt=function(){function e(e){this.allowedEvents_=e,this.listeners_={},Object(o.f)(Array.isArray(e)&&e.length>0,"Requires a non-empty array")}return e.prototype.trigger=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];if(Array.isArray(this.listeners_[e]))for(var r=Object(i.f)(this.listeners_[e]),o=0;o<r.length;o++)r[o].callback.apply(r[o].context,t)},e.prototype.on=function(e,t,n){this.validateEventType_(e),this.listeners_[e]=this.listeners_[e]||[],this.listeners_[e].push({callback:t,context:n});var r=this.getInitialEvent(e);r&&t.apply(n,r)},e.prototype.off=function(e,t,n){this.validateEventType_(e);for(var r=this.listeners_[e]||[],i=0;i<r.length;i++)if(r[i].callback===t&&(!n||n===r[i].context))return void r.splice(i,1)},e.prototype.validateEventType_=function(e){Object(o.f)(this.allowedEvents_.find((function(t){return t===e})),"Unknown event: "+e)},e}(),Bt=function(e){function t(){var t,n,r=e.call(this,["visible"])||this;return"undefined"!==typeof document&&"undefined"!==typeof document.addEventListener&&("undefined"!==typeof document.hidden?(n="visibilitychange",t="hidden"):"undefined"!==typeof document.mozHidden?(n="mozvisibilitychange",t="mozHidden"):"undefined"!==typeof document.msHidden?(n="msvisibilitychange",t="msHidden"):"undefined"!==typeof document.webkitHidden&&(n="webkitvisibilitychange",t="webkitHidden")),r.visible_=!0,n&&document.addEventListener(n,(function(){var e=!document[t];e!==r.visible_&&(r.visible_=e,r.trigger("visible",e))}),!1),r}return Object(i.c)(t,e),t.getInstance=function(){return new t},t.prototype.getInitialEvent=function(e){return Object(o.f)("visible"===e,"Unknown event type: "+e),[this.visible_]},t}(Vt),qt=function(e){function t(){var t=e.call(this,["online"])||this;return t.online_=!0,"undefined"===typeof window||"undefined"===typeof window.addEventListener||Object(o.x)()||(window.addEventListener("online",(function(){t.online_||(t.online_=!0,t.trigger("online",!0))}),!1),window.addEventListener("offline",(function(){t.online_&&(t.online_=!1,t.trigger("online",!1))}),!1)),t}return Object(i.c)(t,e),t.getInstance=function(){return new t},t.prototype.getInitialEvent=function(e){return Object(o.f)("online"===e,"Unknown event type: "+e),[this.online_]},t.prototype.currentlyOnline=function(){return this.online_},t}(Vt),Wt=function(){function e(e){this.onMessage_=e,this.pendingResponses=[],this.currentResponseNum=0,this.closeAfterResponse=-1,this.onClose=null}return e.prototype.closeAfter=function(e,t){this.closeAfterResponse=e,this.onClose=t,this.closeAfterResponse<this.currentResponseNum&&(this.onClose(),this.onClose=null)},e.prototype.handleResponse=function(e,t){var n=this;this.pendingResponses[e]=t;for(var r=function(){var e=i.pendingResponses[i.currentResponseNum];delete i.pendingResponses[i.currentResponseNum];for(var t=function(t){e[t]&&D((function(){n.onMessage_(e[t])}))},r=0;r<e.length;++r)t(r);if(i.currentResponseNum===i.closeAfterResponse)return i.onClose&&(i.onClose(),i.onClose=null),"break";i.currentResponseNum++},i=this;this.pendingResponses[this.currentResponseNum];){if("break"===r())break}},e}(),zt="start",Ht="close",Gt=function(){function e(e,t,n,r,i){this.connId=e,this.repoInfo=t,this.applicationId=n,this.transportSessionId=r,this.lastSessionId=i,this.bytesSent=0,this.bytesReceived=0,this.everConnected_=!1,this.log_=w(e),this.stats_=Nt.getCollection(t),this.urlFn=function(e){return t.connectionURL(z,e)}}return e.prototype.open=function(e,t){var n=this;this.curSegmentNum=0,this.onDisconnect_=t,this.myPacketOrderer=new Wt(e),this.isClosed_=!1,this.connectTimeoutTimer_=setTimeout((function(){n.log_("Timed out trying to connect."),n.onClosed_(),n.connectTimeoutTimer_=null}),Math.floor(3e4)),function(e){if(Object(o.z)()||"complete"===document.readyState)e();else{var t=!1,n=function n(){document.body?t||(t=!0,e()):setTimeout(n,Math.floor(10))};document.addEventListener?(document.addEventListener("DOMContentLoaded",n,!1),window.addEventListener("load",n,!1)):document.attachEvent&&(document.attachEvent("onreadystatechange",(function(){"complete"===document.readyState&&n()})),window.attachEvent("onload",n))}}((function(){if(!n.isClosed_){n.scriptTagHolder=new Kt((function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=Object(i.e)(e,5),o=r[0],a=r[1],s=r[2];r[3],r[4];if(n.incrementIncomingBytes_(e),n.scriptTagHolder)if(n.connectTimeoutTimer_&&(clearTimeout(n.connectTimeoutTimer_),n.connectTimeoutTimer_=null),n.everConnected_=!0,o===zt)n.id=a,n.password=s;else{if(o!==Ht)throw new Error("Unrecognized command received: "+o);a?(n.scriptTagHolder.sendNewPolls=!1,n.myPacketOrderer.closeAfter(a,(function(){n.onClosed_()}))):n.onClosed_()}}),(function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=Object(i.e)(e,2),o=r[0],a=r[1];n.incrementIncomingBytes_(e),n.myPacketOrderer.handleResponse(o,a)}),(function(){n.onClosed_()}),n.urlFn);var e={start:"t"};e.ser=Math.floor(1e8*Math.random()),n.scriptTagHolder.uniqueCallbackIdentifier&&(e.cb=n.scriptTagHolder.uniqueCallbackIdentifier),e.v=B,n.transportSessionId&&(e.s=n.transportSessionId),n.lastSessionId&&(e.ls=n.lastSessionId),n.applicationId&&(e.p=n.applicationId),"undefined"!==typeof location&&location.href&&-1!==location.href.indexOf(q)&&(e.r="f");var t=n.urlFn(e);n.log_("Connecting via long-poll to "+t),n.scriptTagHolder.addTag(t,(function(){}))}}))},e.prototype.start=function(){this.scriptTagHolder.startLongPoll(this.id,this.password),this.addDisconnectPingFrame(this.id,this.password)},e.forceAllow=function(){e.forceAllow_=!0},e.forceDisallow=function(){e.forceDisallow_=!0},e.isAvailable=function(){return!Object(o.z)()&&(!!e.forceAllow_||!e.forceDisallow_&&"undefined"!==typeof document&&null!=document.createElement&&!("object"===typeof window&&window.chrome&&window.chrome.extension&&!/^chrome/.test(window.location.href))&&!("object"===typeof Windows&&"object"===typeof Windows.UI))},e.prototype.markConnectionHealthy=function(){},e.prototype.shutdown_=function(){this.isClosed_=!0,this.scriptTagHolder&&(this.scriptTagHolder.close(),this.scriptTagHolder=null),this.myDisconnFrame&&(document.body.removeChild(this.myDisconnFrame),this.myDisconnFrame=null),this.connectTimeoutTimer_&&(clearTimeout(this.connectTimeoutTimer_),this.connectTimeoutTimer_=null)},e.prototype.onClosed_=function(){this.isClosed_||(this.log_("Longpoll is closing itself"),this.shutdown_(),this.onDisconnect_&&(this.onDisconnect_(this.everConnected_),this.onDisconnect_=null))},e.prototype.close=function(){this.isClosed_||(this.log_("Longpoll is being closed."),this.shutdown_())},e.prototype.send=function(e){var t=Object(o.J)(e);this.bytesSent+=t.length,this.stats_.incrementCounter("bytes_sent",t.length);
2for(var n=Object(o.i)(t),r=R(n,1840),i=0;i<r.length;i++)this.scriptTagHolder.enqueueSegment(this.curSegmentNum,r.length,r[i]),this.curSegmentNum++},e.prototype.addDisconnectPingFrame=function(e,t){if(!Object(o.z)()){this.myDisconnFrame=document.createElement("iframe");var n={dframe:"t"};n.id=e,n.pw=t,this.myDisconnFrame.src=this.urlFn(n),this.myDisconnFrame.style.display="none",document.body.appendChild(this.myDisconnFrame)}},e.prototype.incrementIncomingBytes_=function(e){var t=Object(o.J)(e).length;this.bytesReceived+=t,this.stats_.incrementCounter("bytes_received",t)},e}(),Kt=function(){function e(t,n,r,i){if(this.onDisconnect=r,this.urlFn=i,this.outstandingRequests=new Set,this.pendingSegs=[],this.currentSerial=Math.floor(1e8*Math.random()),this.sendNewPolls=!0,Object(o.z)())this.commandCB=t,this.onMessageCB=n;else{this.uniqueCallbackIdentifier=p(),window["pLPCommand"+this.uniqueCallbackIdentifier]=t,window["pRTLPCB"+this.uniqueCallbackIdentifier]=n,this.myIFrame=e.createIFrame_();var a="";if(this.myIFrame.src&&"javascript:"===this.myIFrame.src.substr(0,"javascript:".length))a='<script>document.domain="'+document.domain+'";<\/script>';var s="<html><body>"+a+"</body></html>";try{this.myIFrame.doc.open(),this.myIFrame.doc.write(s),this.myIFrame.doc.close()}catch(u){_("frame writing exception"),u.stack&&_(u.stack),_(u)}}}return e.createIFrame_=function(){var e=document.createElement("iframe");if(e.style.display="none",!document.body)throw"Document body has not initialized. Wait to initialize Firebase until after the document is ready.";document.body.appendChild(e);try{e.contentWindow.document||_("No IE domain setting required")}catch(n){var t=document.domain;e.src="javascript:void((function(){document.open();document.domain='"+t+"';document.close();})())"}return e.contentDocument?e.doc=e.contentDocument:e.contentWindow?e.doc=e.contentWindow.document:e.document&&(e.doc=e.document),e},e.prototype.close=function(){var e=this;this.alive=!1,this.myIFrame&&(this.myIFrame.doc.body.innerHTML="",setTimeout((function(){null!==e.myIFrame&&(document.body.removeChild(e.myIFrame),e.myIFrame=null)}),Math.floor(0)));var t=this.onDisconnect;t&&(this.onDisconnect=null,t())},e.prototype.startLongPoll=function(e,t){for(this.myID=e,this.myPW=t,this.alive=!0;this.newRequest_(););},e.prototype.newRequest_=function(){if(this.alive&&this.sendNewPolls&&this.outstandingRequests.size<(this.pendingSegs.length>0?2:1)){this.currentSerial++;var e={};e.id=this.myID,e.pw=this.myPW,e.ser=this.currentSerial;for(var t=this.urlFn(e),n="",r=0;this.pendingSegs.length>0;){if(!(this.pendingSegs[0].d.length+30+n.length<=1870))break;var i=this.pendingSegs.shift();n=n+"&seg"+r+"="+i.seg+"&ts"+r+"="+i.ts+"&d"+r+"="+i.d,r++}return t+=n,this.addLongPollTag_(t,this.currentSerial),!0}return!1},e.prototype.enqueueSegment=function(e,t,n){this.pendingSegs.push({seg:e,ts:t,d:n}),this.alive&&this.newRequest_()},e.prototype.addLongPollTag_=function(e,t){var n=this;this.outstandingRequests.add(t);var r=function(){n.outstandingRequests.delete(t),n.newRequest_()},i=setTimeout(r,Math.floor(25e3));this.addTag(e,(function(){clearTimeout(i),r()}))},e.prototype.addTag=function(e,t){var n=this;Object(o.z)()?this.doNodeLongPoll(e,t):setTimeout((function(){try{if(!n.sendNewPolls)return;var r=n.myIFrame.doc.createElement("script");r.type="text/javascript",r.async=!0,r.src=e,r.onload=r.onreadystatechange=function(){var e=r.readyState;e&&"loaded"!==e&&"complete"!==e||(r.onload=r.onreadystatechange=null,r.parentNode&&r.parentNode.removeChild(r),t())},r.onerror=function(){_("Long-poll script failed to load: "+e),n.sendNewPolls=!1,n.close()},n.myIFrame.doc.body.appendChild(r)}catch(i){}}),Math.floor(1))},e}(),Yt="";function Qt(e){Yt=e}var $t=null;"undefined"!==typeof MozWebSocket?$t=MozWebSocket:"undefined"!==typeof WebSocket&&($t=WebSocket);var Xt=function(){function t(e,n,r,i,o){this.connId=e,this.applicationId=r,this.keepaliveTimer=null,this.frames=null,this.totalFrames=0,this.bytesSent=0,this.bytesReceived=0,this.log_=w(this.connId),this.stats_=Nt.getCollection(n),this.connURL=t.connectionURL_(n,i,o),this.nodeAdmin=n.nodeAdmin}return t.connectionURL_=function(e,t,n){var r={};return r.v=B,!Object(o.z)()&&"undefined"!==typeof location&&location.href&&-1!==location.href.indexOf(q)&&(r.r="f"),t&&(r.s=t),n&&(r.ls=n),e.connectionURL(W,r)},t.prototype.open=function(t,n){var r=this;this.onDisconnect=n,this.onMessage=t,this.log_("Websocket connecting to "+this.connURL),this.everConnected_=!1,f.set("previous_websocket_failure",!0);try{if(Object(o.z)()){var i=this.nodeAdmin?"AdminNode":"Node",a={headers:{"User-Agent":"Firebase/5/"+Yt+"/"+e.platform+"/"+i,"X-Firebase-GMPID":this.applicationId||""}},s=Object({NODE_ENV:"production",PUBLIC_URL:"",WDS_SOCKET_HOST:void 0,WDS_SOCKET_PATH:void 0,WDS_SOCKET_PORT:void 0,FAST_REFRESH:!0}),u=0===this.connURL.indexOf("wss://")?s.HTTPS_PROXY||s.https_proxy:s.HTTP_PROXY||s.http_proxy;u&&(a.proxy={origin:u}),this.mySock=new $t(this.connURL,[],a)}else{a={headers:{"X-Firebase-GMPID":this.applicationId||""}};this.mySock=new $t(this.connURL,[],a)}}catch(l){this.log_("Error instantiating WebSocket.");var c=l.message||l.data;return c&&this.log_(c),void this.onClosed_()}this.mySock.onopen=function(){r.log_("Websocket connected."),r.everConnected_=!0}
2,this.mySock.onclose=function(){r.log_("Websocket connection was disconnected."),r.mySock=null,r.onClosed_()},this.mySock.onmessage=function(e){r.handleIncomingFrame(e)},this.mySock.onerror=function(e){r.log_("WebSocket error. Closing connection.");var t=e.message||e.data;t&&r.log_(t),r.onClosed_()}},t.prototype.start=function(){},t.forceDisallow=function(){t.forceDisallow_=!0},t.isAvailable=function(){var e=!1;if("undefined"!==typeof navigator&&navigator.userAgent){var n=navigator.userAgent.match(/Android ([0-9]{0,}\.[0-9]{0,})/);n&&n.length>1&&parseFloat(n[1])<4.4&&(e=!0)}return!e&&null!==$t&&!t.forceDisallow_},t.previouslyFailed=function(){return f.isInMemoryStorage||!0===f.get("previous_websocket_failure")},t.prototype.markConnectionHealthy=function(){f.remove("previous_websocket_failure")},t.prototype.appendFrame_=function(e){if(this.frames.push(e),this.frames.length===this.totalFrames){var t=this.frames.join("");this.frames=null;var n=Object(o.D)(t);this.onMessage(n)}},t.prototype.handleNewFrameCount_=function(e){this.totalFrames=e,this.frames=[]},t.prototype.extractFrameCount_=function(e){if(Object(o.f)(null===this.frames,"We already have a frame buffer"),e.length<=6){var t=Number(e);if(!isNaN(t))return this.handleNewFrameCount_(t),null}return this.handleNewFrameCount_(1),e},t.prototype.handleIncomingFrame=function(e){if(null!==this.mySock){var t=e.data;if(this.bytesReceived+=t.length,this.stats_.incrementCounter("bytes_received",t.length),this.resetKeepAlive(),null!==this.frames)this.appendFrame_(t);else{var n=this.extractFrameCount_(t);null!==n&&this.appendFrame_(n)}}},t.prototype.send=function(e){this.resetKeepAlive();var t=Object(o.J)(e);this.bytesSent+=t.length,this.stats_.incrementCounter("bytes_sent",t.length);var n=R(t,16384);n.length>1&&this.sendString_(String(n.length));for(var r=0;r<n.length;r++)this.sendString_(n[r])},t.prototype.shutdown_=function(){this.isClosed_=!0,this.keepaliveTimer&&(clearInterval(this.keepaliveTimer),this.keepaliveTimer=null),this.mySock&&(this.mySock.close(),this.mySock=null)},t.prototype.onClosed_=function(){this.isClosed_||(this.log_("WebSocket is closing itself"),this.shutdown_(),this.onDisconnect&&(this.onDisconnect(this.everConnected_),this.onDisconnect=null))},t.prototype.close=function(){this.isClosed_||(this.log_("WebSocket is being closed"),this.shutdown_())},t.prototype.resetKeepAlive=function(){var e=this;clearInterval(this.keepaliveTimer),this.keepaliveTimer=setInterval((function(){e.mySock&&e.sendString_("0"),e.resetKeepAlive()}),Math.floor(45e3))},t.prototype.sendString_=function(e){try{this.mySock.send(e)}catch(t){this.log_("Exception thrown from WebSocket.send():",t.message||t.data,"Closing connection."),setTimeout(this.onClosed_.bind(this),0)}},t.responsesRequiredToBeHealthy=2,t.healthyTimeout=3e4,t}(),Jt=function(){function e(e){this.initTransports_(e)}return Object.defineProperty(e,"ALL_TRANSPORTS",{get:function(){return[Gt,Xt]},enumerable:!1,configurable:!0}),e.prototype.initTransports_=function(t){var n,r,o=Xt&&Xt.isAvailable(),a=o&&!Xt.previouslyFailed();if(t.webSocketOnly&&(o||O("wss:// URL used, but browser isn't known to support websockets. Trying anyway."),a=!0),a)this.transports_=[Xt];else{var s=this.transports_=[];try{for(var u=Object(i.h)(e.ALL_TRANSPORTS),c=u.next();!c.done;c=u.next()){var l=c.value;l&&l.isAvailable()&&s.push(l)}}catch(f){n={error:f}}finally{try{c&&!c.done&&(r=u.return)&&r.call(u)}finally{if(n)throw n.error}}}},e.prototype.initialTransport=function(){if(this.transports_.length>0)return this.transports_[0];throw new Error("No transports available")},e.prototype.upgradeTransport=function(){return this.transports_.length>1?this.transports_[1]:null},e}(),Zt=function(){function e(e,t,n,r,i,o,a,s){this.id=e,this.repoInfo_=t,this.applicationId_=n,this.onMessage_=r,this.onReady_=i,this.onDisconnect_=o,this.onKill_=a,this.lastSessionId=s,this.connectionCount=0,this.pendingDataMessages=[],this.state_=0,this.log_=w("c:"+this.id+":"),this.transportManager_=new Jt(t),this.log_("Connection created"),this.start_()}return e.prototype.start_=function(){var e=this,t=this.transportManager_.initialTransport();this.conn_=new t(this.nextTransportId_(),this.repoInfo_,this.applicationId_,void 0,this.lastSessionId),this.primaryResponsesRequired_=t.responsesRequiredToBeHealthy||0;var n=this.connReceiver_(this.conn_),r=this.disconnReceiver_(this.conn_);this.tx_=this.conn_,this.rx_=this.conn_,this.secondaryConn_=null,this.isHealthy_=!1,setTimeout((function(){e.conn_&&e.conn_.open(n,r)}),Math.floor(0));var i=t.healthyTimeout||0;i>0&&(this.healthyTimeout_=F((function(){e.healthyTimeout_=null,e.isHealthy_||(e.conn_&&e.conn_.bytesReceived>
2102400?(e.log_("Connection exceeded healthy timeout but has received "+e.conn_.bytesReceived+" bytes. Marking connection healthy."),e.isHealthy_=!0,e.conn_.markConnectionHealthy()):e.conn_&&e.conn_.bytesSent>10240?e.log_("Connection exceeded healthy timeout but has sent "+e.conn_.bytesSent+" bytes. Leaving connection alive."):(e.log_("Closing unhealthy connection after timeout."),e.close()))}),Math.floor(i)))},e.prototype.nextTransportId_=function(){return"c:"+this.id+":"+this.connectionCount++},e.prototype.disconnReceiver_=function(e){var t=this;return function(n){e===t.conn_?t.onConnectionLost_(n):e===t.secondaryConn_?(t.log_("Secondary connection lost."),t.onSecondaryConnectionLost_()):t.log_("closing an old connection")}},e.prototype.connReceiver_=function(e){var t=this;return function(n){2!==t.state_&&(e===t.rx_?t.onPrimaryMessageReceived_(n):e===t.secondaryConn_?t.onSecondaryMessageReceived_(n):t.log_("message on old connection"))}},e.prototype.sendRequest=function(e){var t={t:"d",d:e};this.sendData_(t)},e.prototype.tryCleanupConnection=function(){this.tx_===this.secondaryConn_&&this.rx_===this.secondaryConn_&&(this.log_("cleaning up and promoting a connection: "+this.secondaryConn_.connId),this.conn_=this.secondaryConn_,this.secondaryConn_=null)},e.prototype.onSecondaryControl_=function(e){if("t"in e){var t=e.t;"a"===t?this.upgradeIfSecondaryHealthy_():"r"===t?(this.log_("Got a reset on secondary, closing it"),this.secondaryConn_.close(),this.tx_!==this.secondaryConn_&&this.rx_!==this.secondaryConn_||this.close()):"o"===t&&(this.log_("got pong on secondary."),this.secondaryResponsesRequired_--,this.upgradeIfSecondaryHealthy_())}},e.prototype.onSecondaryMessageReceived_=function(e){var t=I("t",e),n=I("d",e);if("c"===t)this.onSecondaryControl_(n);else{if("d"!==t)throw new Error("Unknown protocol layer: "+t);this.pendingDataMessages.push(n)}},e.prototype.upgradeIfSecondaryHealthy_=function(){this.secondaryResponsesRequired_<=0?(this.log_("Secondary connection is healthy."),this.isHealthy_=!0,this.secondaryConn_.markConnectionHealthy(),this.proceedWithUpgrade_()):(this.log_("sending ping on secondary."),this.secondaryConn_.send({t:"c",d:{t:"p",d:{}}}))},e.prototype.proceedWithUpgrade_=function(){this.secondaryConn_.start(),this.log_("sending client ack on secondary"),this.secondaryConn_.send({t:"c",d:{t:"a",d:{}}}),this.log_("Ending transmission on primary"),this.conn_.send({t:"c",d:{t:"n",d:{}}}),this.tx_=this.secondaryConn_,this.tryCleanupConnection()},e.prototype.onPrimaryMessageReceived_=function(e){var t=I("t",e),n=I("d",e);"c"===t?this.onControl_(n):"d"===t&&this.onDataMessage_(n)},e.prototype.onDataMessage_=function(e){this.onPrimaryResponse_(),this.onMessage_(e)},e.prototype.onPrimaryResponse_=function(){this.isHealthy_||(this.primaryResponsesRequired_--,this.primaryResponsesRequired_<=0&&(this.log_("Primary connection is healthy."),this.isHealthy_=!0,this.conn_.markConnectionHealthy()))},e.prototype.onControl_=function(e){var t=I("t",e);if("d"in e){var n=e.d;if("h"===t)this.onHandshake_(n);else if("n"===t){this.log_("recvd end transmission on primary"),this.rx_=this.secondaryConn_;for(var r=0;r<this.pendingDataMessages.length;++r)this.onDataMessage_(this.pendingDataMessages[r]);this.pendingDataMessages=[],this.tryCleanupConnection()}else"s"===t?this.onConnectionShutdown_(n):"r"===t?this.onReset_(n):"e"===t?k("Server Error: "+n):"o"===t?(this.log_("got pong on primary."),this.onPrimaryResponse_(),this.sendPingOnPrimaryIfNecessary_()):k("Unknown control packet command: "+t)}},e.prototype.onHandshake_=function(e){var t=e.ts,n=e.v,r=e.h;this.sessionId=e.s,this.repoInfo_.updateHost(r),0===this.state_&&(this.conn_.start(),this.onConnectionEstablished_(this.conn_,t),B!==n&&O("Protocol version mismatch detected"),this.tryStartUpgrade_())},e.prototype.tryStartUpgrade_=function(){var e=this.transportManager_.upgradeTransport();e&&this.startUpgrade_(e)},e.prototype.startUpgrade_=function(e){var t=this;this.secondaryConn_=new e(this.nextTransportId_(),this.repoInfo_,this.applicationId_,this.sessionId),this.secondaryResponsesRequired_=e.responsesRequiredToBeHealthy||0;var n=this.connReceiver_(this.secondaryConn_),r=this.disconnReceiver_(this.secondaryConn_);this.secondaryConn_.open(n,r),F((function(){t.secondaryConn_&&(t.log_("Timed out trying to upgrade."),t.secondaryConn_.close())}),Math.floor(6e4))},e.prototype.onReset_=function(e){this.log_("Reset packet received. New host: "+e),this.repoInfo_.updateHost(e),1===this.state_?this.close():(this.closeConnections_(),this.start_())},e.prototype.onConnectionEstablished_=function(e,t){var n=this;this.log_("Realtime connection established."),this.conn_=e,this.state_=1,this.onReady_&&(this.onReady_(t,this.sessionId),this.onReady_=null),0===this.primaryResponsesRequired_?(this.log_("Primary connection is healthy."),this.isHealthy_=!0):F((function(){n.sendPingOnPrimaryIfNecessary_()}),Math.floor(5e3))},e.prototype.sendPingOnPrimaryIfNecessary_=function(){this.isHealthy_||1!==this.state_||(this.log_("sending ping on primary."),this.sendData_({t:"c",d:{t:"p",d:{}}}))},e.prototype.onSecondaryConnectionLost_=function(){var e=this.secondaryConn_;this.secondaryConn_=null,this.tx_!==e&&this.rx_!==e||this.close()},e.prototype.onConnectionLost_=function(e){this.conn_=null,e||0!==this.state_?1===this.state_&&this.log_("Realtime connection lost."):(this.log_("Realtime connection failed."),this.repoInfo_.isCacheableHost()&&(f.remove("host:"+this.repoInfo_.host),this.repoInfo_.internalHost=this.repoInfo_.host)),this.close()},e.prototype.onConnectionShutdown_=function(e){this.log_("Connection shutdown command received. Shutting down..."),this.onKill_&&(this.onKill_(e),this.onKill_=null),this.onDisconnect_=null,this.close()},e.prototype.sendData_=function(e){if(1!==this.state_)throw"Connection is not connected";this.tx_.send(e)},e.prototype.close=function(){2!==this.state_&&(this.log_("Closing realtime connection."),this.state_=2,this.closeConnections_(),this.onDisconnect_&&(this.onDisconnect_(),this.onDisconnect_=null))},e.prototype.closeConnections_=function(){this.log_("Shutting down all connections"),this.conn_&&(this.conn_.close(),this.conn_=null),this.secondaryConn_&&(this.secondaryConn_.close(),this.secondaryConn_=null),this.healthyTimeout_&&(clearTimeout(this.healthyTimeout_),this.healthyTimeout_=null)},e}(),en=function(){function e(){}return e.prototype.put=function(e,t,n,r){},e.prototype.merge=function(e,t,n,r){},e.prototype.refreshAuthToken=function(e){},e.prototype.onDisconnectPut=function(e,t,n){},e.prototype.onDisconnectMerge=function(e,t,n){},e.prototype.onDisconnectCancel=function(e,t){},e.prototype.reportStats=function(e){},e}(),tn=1e3,nn=function(e){function t(n,r,i,a,s,u,c){var l=e.call(this)||this;if(l.repoInfo_=n,l.applicationId_=r,l.onDataUpdate_=i,l.onConnectStatus_=a,l.onServerInfoUpdate_=s,l.authTokenProvider_=u,l.authOverride_=c,l.id=t.nextPersistentConnectionId_++,l.log_=w("p:"+l.id+":"),l.interruptReasons_={},l.listens=new Map,l.outstandingPuts_=[],l.outstandingPutCount_=0,l.onDisconnectRequestQueue_=[],l.connected_=!1,l.reconnectDelay_=tn,l.maxReconnectDelay_=3e5,l.securityDebugCallback_=null,l.lastSessionId=null,l.establishConnectionTimer_=null,l.visible_=!1,l.requestCBHash_={},l.requestNumber_=0,l.realtime_=null,l.authToken_=null,l.forceTokenRefresh_=!1,l.invali
2dAuthTokenCount_=0,l.firstConnection_=!0,l.lastConnectionAttemptTime_=null,l.lastConnectionEstablishedTime_=null,c&&!Object(o.z)())throw new Error("Auth override specified in options, but not supported on non Node.js platforms");return l.scheduleConnect_(0),Bt.getInstance().on("visible",l.onVisible_,l),-1===n.host.indexOf("fblocal")&&qt.getInstance().on("online",l.onOnline_,l),l}return Object(i.c)(t,e),t.prototype.sendRequest=function(e,t,n){var r=++this.requestNumber_,i={r:r,a:e,b:t};this.log_(Object(o.J)(i)),Object(o.f)(this.connected_,"sendRequest call when we're not connected not allowed."),this.realtime_.sendRequest(i),n&&(this.requestCBHash_[r]=n)},t.prototype.listen=function(e,t,n,r){var i=e.queryIdentifier(),a=e.path.toString();this.log_("Listen called for "+a+" "+i),this.listens.has(a)||this.listens.set(a,new Map),Object(o.f)(e.getQueryParams().isDefault()||!e.getQueryParams().loadsAllData(),"listen() called for non-default but complete query"),Object(o.f)(!this.listens.get(a).has(i),"listen() called twice for same path/queryId.");var s={onComplete:r,hashFn:t,query:e,tag:n};this.listens.get(a).set(i,s),this.connected_&&this.sendListen_(s)},t.prototype.sendListen_=function(e){var n=this,r=e.query,i=r.path.toString(),o=r.queryIdentifier();this.log_("Listen on "+i+" for "+o);var a={p:i};e.tag&&(a.q=r.queryObject(),a.t=e.tag),a.h=e.hashFn(),this.sendRequest("q",a,(function(a){var s=a.d,u=a.s;t.warnOnListenWarnings_(s,r),(n.listens.get(i)&&n.listens.get(i).get(o))===e&&(n.log_("listen response",a),"ok"!==u&&n.removeListen_(i,o),e.onComplete&&e.onComplete(u,s))}))},t.warnOnListenWarnings_=function(e,t){if(e&&"object"===typeof e&&Object(o.k)(e,"w")){var n=Object(o.G)(e,"w");if(Array.isArray(n)&&~n.indexOf("no_index")){var r='".indexOn": "'+t.getQueryParams().getIndex().toString()+'"',i=t.path.toString();O("Using an unspecified index. Your data will be downloaded and filtered on the client. Consider adding "+r+" at "+i+" to your security rules for better performance.")}}},t.prototype.refreshAuthToken=function(e){this.authToken_=e,this.log_("Auth token refreshed"),this.authToken_?this.tryAuth():this.connected_&&this.sendRequest("unauth",{},(function(){})),this.reduceReconnectDelayIfAdminCredential_(e)},t.prototype.reduceReconnectDelayIfAdminCredential_=function(e){(e&&40===e.length||Object(o.q)(e))&&(this.log_("Admin auth credential detected. Reducing max reconnect time."),this.maxReconnectDelay_=3e4)},t.prototype.tryAuth=function(){var e=this;if(this.connected_&&this.authToken_){var t=this.authToken_,n=Object(o.C)(t)?"auth":"gauth",r={cred:t};null===this.authOverride_?r.noauth=!0:"object"===typeof this.authOverride_&&(r.authvar=this.authOverride_),this.sendRequest(n,r,(function(n){var r=n.s,i=n.d||"error";e.authToken_===t&&("ok"===r?e.invalidAuthTokenCount_=0:e.onAuthRevoked_(r,i))}))}},t.prototype.unlisten=function(e,t){var n=e.path.toString(),r=e.queryIdentifier();this.log_("Unlisten called for "+n+" "+r),Object(o.f)(e.getQueryParams().isDefault()||!e.getQueryParams().loadsAllData(),"unlisten() called for non-default but complete query"),this.removeListen_(n,r)&&this.connected_&&this.sendUnlisten_(n,r,e.queryObject(),t)},t.prototype.sendUnlisten_=function(e,t,n,r){this.log_("Unlisten on "+e+" for "+t);var i={p:e};r&&(i.q=n,i.t=r),this.sendRequest("n",i)},t.prototype.onDisconnectPut=function(e,t,n){this.connected_?this.sendOnDisconnect_("o",e,t,n):this.onDisconnectRequestQueue_.push({pathString:e,action:"o",data:t,onComplete:n})},t.prototype.onDisconnectMerge=function(e,t,n){this.connected_?this.sendOnDisconnect_("om",e,t,n):this.onDisconnectRequestQueue_.push({pathString:e,action:"om",data:t,onComplete:n})},t.prototype.onDisconnectCancel=function(e,t){this.connected_?this.sendOnDisconnect_("oc",e,null,t):this.onDisconnectRequestQueue_.push({pathString:e,action:"oc",data:null,onComplete:t})},t.prototype.sendOnDisconnect_=function(e,t,n,r){var i={p:t,d:n};this.log_("onDisconnect "+e,i),this.sendRequest(e,i,(function(e){r&&setTimeout((function(){r(e.s,e.d)}),Math.floor(0))}))},t.prototype.put=function(e,t,n,r){this.putInternal("p",e,t,n,r)},t.prototype.merge=function(e,t,n,r){this.putInternal("m",e,t,n,r)},t.prototype.putInternal=function(e,t,n,r,i){var o={p:t,d:n};void 0!==i&&(o.h=i),this.outstandingPuts_.push({action:e,request:o,onComplete:r}),this.outstandingPutCount_++;var a=this.outstandingPuts_.length-1;this.connected_?this.sendPut_(a):this.log_("Buffering put: "+t)},t.prototype.sendPut_=function(e){var t=this,n=this.outstandingPuts_[e].action,r=this.outstandingPuts_[e].request,i=this.outstandingPuts_[e].onComplete;this.outstandingPuts_[e].queued=this.connected_,this.sendRequest(n,r,(function(r){t.log_(n+" response",r),delete t.outstandingPuts_[e],t.outstandingPutCount_--,0===t.outstandingPutCount_&&(t.outstandingPuts_=[]),i&&i(r.s,r.d)}))},t.prototype.reportStats=function(e){var t=this;if(this.connected_){var n={c:e};this.log_("reportStats",n),this.sendRequest("s",n,(function(e){if("ok"!==e.s){var n=e.d;t.log_("reportStats","Error sending stats: "+n)}}))}},t.prototype.onDataMessage_=function(e){if("r"in e){this.log_("from server: "+Object(o.J)(e));var t=e.r,n=this.requestCBHash_[t];n&&(delete this.requestCBHash_[t],n(e.b))}else{if("error"in e)throw"A server-side error has occurred: "+e.error;"a"in e&&this.onDataPush_(e.a,e.b)}},t.prototype.onDataPush_=function(e,t){this.log_("handleServerMessage",e,t),"d"===e?this.onDataUpdate_(t.p,t.d,!1,t.t):"m"===e?this.onDataUpdate_(t.p,t.d,!0,t.t):"c"===e?this.onListenRevoked_(t.p,t.q):"ac"===e?this.onAuthRevoked_(t.s,t.d):"sd"===e?this.onSecurityDebugPacket_(t):k("Unrecognized action received from server: "+Object(o.J)(e)+"\nAre you using the latest client?")},t.prototype.onReady_=function(e,t){this.log_("connection ready"),this.connected_=!0,this.lastConnectionEstablishedTime_=(new Date).getTime(),this.handleTimestamp_(e),this.lastSessionId=t,this.firstConnection_&&this.sendConnectStats_(),this.restoreState_(),this.firstConnection_=!1,this.onConnectStatus_(!0)},t.prototype.scheduleConnect_=function(e){var t=this;Object(o.f)(!this.realtime_,"Scheduling a connect when we're already connected/ing?"),this.establishConnectionTimer_&&clearTimeout(this.establishConnectionTimer_),this.establishConnectionTimer_=setTimeout((function(){t.establishConnectionTimer_=null,t.establishConnection_()}),Math.floor(e))},t.prototype.onVisible_=function(e){e&&!this.visible_&&this.reconnectDelay_===this.maxReconnectDelay_&&(this.log_("Window became visible. Reducing delay."),this.reconnectDelay_=tn,this.realtime_||this.scheduleConnect_(0)),this.visible_=e},t.prototype.onOnline_=function(e){e?(this.log_("Browser went online."),this.reconnectDelay_=tn,this.realtime_||this.scheduleConnect_(0)):(this.log_("Browser went offline. Killing connection."),this.realtime_&&this.realtime_.close())},t.prototype.onRealtimeDisconnect_=function(){if(this.log_("data client disconnected"),this.connected_=!1,this.realtime_=null,this.cancelSentTransactions_(),this.requestCBHash_={},this.shouldReconnect_()){if(this.visible_){if(this.lastConnectionEstablishedTime_){(new Date).getTime()-this.lastConnectionEstablishedTime_>3e4&&(this.reconnectDelay_=tn),this.lastConnectionEstablishedTime_=null}}else this.log_("Window isn't visible. Delaying reconnect."),this.reconnectDelay_=this.maxReconnectDelay_,this.lastConnectionAttemptTime_=(new Date).getTime();var e=(new Date).getTime()-this.lastConnectionAttemptTime_,t=Math.max(0,this.reconnectDelay_-e);
2t=Math.random()*t,this.log_("Trying to reconnect in "+t+"ms"),this.scheduleConnect_(t),this.reconnectDelay_=Math.min(this.maxReconnectDelay_,1.3*this.reconnectDelay_)}this.onConnectStatus_(!1)},t.prototype.establishConnection_=function(){var e=this;if(this.shouldReconnect_()){this.log_("Making a connection attempt"),this.lastConnectionAttemptTime_=(new Date).getTime(),this.lastConnectionEstablishedTime_=null;var n=this.onDataMessage_.bind(this),r=this.onReady_.bind(this),i=this.onRealtimeDisconnect_.bind(this),a=this.id+":"+t.nextConnectionId_++,s=this,u=this.lastSessionId,c=!1,l=null,f=function(){l?l.close():(c=!0,i())};this.realtime_={close:f,sendRequest:function(e){Object(o.f)(l,"sendRequest call when we're not connected not allowed."),l.sendRequest(e)}};var h=this.forceTokenRefresh_;this.forceTokenRefresh_=!1,this.authTokenProvider_.getToken(h).then((function(e){c?_("getToken() completed but was canceled"):(_("getToken() completed. Creating connection."),s.authToken_=e&&e.accessToken,l=new Zt(a,s.repoInfo_,s.applicationId_,n,r,i,(function(e){O(e+" ("+s.repoInfo_.toString()+")"),s.interrupt("server_kill")}),u))})).then(null,(function(t){s.log_("Failed to get token: "+t),c||(e.repoInfo_.nodeAdmin&&O(t),f())}))}},t.prototype.interrupt=function(e){_("Interrupting connection for reason: "+e),this.interruptReasons_[e]=!0,this.realtime_?this.realtime_.close():(this.establishConnectionTimer_&&(clearTimeout(this.establishConnectionTimer_),this.establishConnectionTimer_=null),this.connected_&&this.onRealtimeDisconnect_())},t.prototype.resume=function(e){_("Resuming connection for reason: "+e),delete this.interruptReasons_[e],Object(o.u)(this.interruptReasons_)&&(this.reconnectDelay_=tn,this.realtime_||this.scheduleConnect_(0))},t.prototype.handleTimestamp_=function(e){var t=e-(new Date).getTime();this.onServerInfoUpdate_({serverTimeOffset:t})},t.prototype.cancelSentTransactions_=function(){for(var e=0;e<this.outstandingPuts_.length;e++){var t=this.outstandingPuts_[e];t&&"h"in t.request&&t.queued&&(t.onComplete&&t.onComplete("disconnect"),delete this.outstandingPuts_[e],this.outstandingPutCount_--)}0===this.outstandingPutCount_&&(this.outstandingPuts_=[])},t.prototype.onListenRevoked_=function(e,t){var n;n=t?t.map((function(e){return j(e)})).join("$"):"default";var r=this.removeListen_(e,n);r&&r.onComplete&&r.onComplete("permission_denied")},t.prototype.removeListen_=function(e,t){var n,r=new U(e).toString();if(this.listens.has(r)){var i=this.listens.get(r);n=i.get(t),i.delete(t),0===i.size&&this.listens.delete(r)}else n=void 0;return n},t.prototype.onAuthRevoked_=function(e,t){_("Auth token revoked: "+e+"/"+t),this.authToken_=null,this.forceTokenRefresh_=!0,this.realtime_.close(),"invalid_token"!==e&&"permission_denied"!==e||(this.invalidAuthTokenCount_++,this.invalidAuthTokenCount_>=3&&(this.reconnectDelay_=3e4,this.authTokenProvider_.notifyForInvalidToken()))},t.prototype.onSecurityDebugPacket_=function(e){this.securityDebugCallback_?this.securityDebugCallback_(e):"msg"in e&&console.log("FIREBASE: "+e.msg.replace("\n","\nFIREBASE: "))},t.prototype.restoreState_=function(){var e,t,n,r;this.tryAuth();try{for(var o=Object(i.h)(this.listens.values()),a=o.next();!a.done;a=o.next()){var s=a.value;try{for(var u=(n=void 0,Object(i.h)(s.values())),c=u.next();!c.done;c=u.next()){var l=c.value;this.sendListen_(l)}}catch(d){n={error:d}}finally{try{c&&!c.done&&(r=u.return)&&r.call(u)}finally{if(n)throw n.error}}}}catch(p){e={error:p}}finally{try{a&&!a.done&&(t=o.return)&&t.call(o)}finally{if(e)throw e.error}}for(var f=0;f<this.outstandingPuts_.length;f++)this.outstandingPuts_[f]&&this.sendPut_(f);for(;this.onDisconnectRequestQueue_.length;){var h=this.onDisconnectRequestQueue_.shift();this.sendOnDisconnect_(h.action,h.pathString,h.data,h.onComplete)}},t.prototype.sendConnectStats_=function(){var e={},t="js";Object(o.z)()&&(t=this.repoInfo_.nodeAdmin?"admin_node":"node"),e["sdk."+t+"."+Yt.replace(/\./g,"-")]=1,Object(o.x)()?e["framework.cordova"]=1:Object(o.A)()&&(e["framework.reactnative"]=1),this.reportStats(e)},t.prototype.shouldReconnect_=function(){var e=qt.getInstance().currentlyOnline();return Object(o.u)(this.interruptReasons_)&&e},t.nextPersistentConnectionId_=0,t.nextConnectionId_=0,t}
2(en),rn=function(e){function t(t,n,r){var i=e.call(this)||this;return i.repoInfo_=t,i.onDataUpdate_=n,i.authTokenProvider_=r,i.log_=w("p:rest:"),i.listens_={},i}return Object(i.c)(t,e),t.prototype.reportStats=function(e){throw new Error("Method not implemented.")},t.getListenId_=function(e,t){return void 0!==t?"tag$"+t:(Object(o.f)(e.getQueryParams().isDefault(),"should have a tag if it's not a default query."),e.path.toString())},t.prototype.listen=function(e,n,r,i){var a=this,s=e.path.toString();this.log_("Listen called for "+s+" "+e.queryIdentifier());var u=t.getListenId_(e,r),c={};this.listens_[u]=c;var l=e.getQueryParams().toRestQueryStringParameters();this.restRequest_(s+".json",l,(function(e,t){var n=t;(404===e&&(n=null,e=null),null===e&&a.onDataUpdate_(s,n,!1,r),Object(o.G)(a.listens_,u)===c)&&i(e?401===e?"permission_denied":"rest_error:"+e:"ok",null)}))},t.prototype.unlisten=function(e,n){var r=t.getListenId_(e,n);delete this.listens_[r]},t.prototype.refreshAuthToken=function(e){},t.prototype.restRequest_=function(e,t,n){var r=this;void 0===t&&(t={}),t.format="export",this.authTokenProvider_.getToken(!1).then((function(i){var a=i&&i.accessToken;a&&(t.auth=a);var s=(r.repoInfo_.secure?"https://":"http://")+r.repoInfo_.host+e+"?ns="+r.repoInfo_.namespace+Object(o.F)(t);r.log_("Sending REST request for "+s);var u=new XMLHttpRequest;u.onreadystatechange=function(){if(n&&4===u.readyState){r.log_("REST Response for "+s+" received. status:",u.status,"response:",u.responseText);var e=null;if(u.status>=200&&u.status<300){try{e=Object(o.D)(u.responseText)}catch(t){O("Failed to parse JSON response for "+s+": "+u.responseText)}n(null,e)}else 401!==u.status&&404!==u.status&&O("Got unsuccessful REST response for "+s+" Status: "+u.status),n(u.status);n=null}},u.open("GET",s,!0),u.send()}))},t}(en),on="repo_interrupt",an=function(){function e(e,t,n,r){this.repoInfo_=e,this.forceRestClient_=t,this.app=n,this.authTokenProvider_=r,this.dataUpdateCount=0,this.statsListener_=null,this.eventQueue_=new Ft,this.nextWriteId_=1,this.interceptServerDataCallback_=null,this.onDisconnect_=new st,this.persistentConnection_=null,this.key=this.repoInfo_.toURLString()}return e.prototype.start=function(){var e=this;if(this.stats_=Nt.getCollection(this.repoInfo_),this.forceRestClient_||("object"===typeof window&&window.navigator&&window.navigator.userAgent||"").search(/googlebot|google webmaster tools|bingbot|yahoo! slurp|baiduspider|yandexbot|duckduckbot/i)>=0)this.server_=new rn(this.repoInfo_,this.onDataUpdate_.bind(this),this.authTokenProvider_),setTimeout(this.onConnectStatus_.bind(this,!0),0);else{var t=this.app.options.databaseAuthVariableOverride;if("undefined"!==typeof t&&null!==t){if("object"!==typeof t)throw new Error("Only objects are supported for option databaseAuthVariableOverride");try{Object(o.J)(t)}catch(n){throw new Error("Invalid authOverride provided: "+n)}}this.persistentConnection_=new nn(this.repoInfo_,this.app.options.appId,this.onDataUpdate_.bind(this),this.onConnectStatus_.bind(this),this.onServerInfoUpdate_.bind(this),this.authTokenProvider_,t),this.server_=this.persistentConnection_}this.authTokenProvider_.addTokenChangeListener((function(t){e.server_.refreshAuthToken(t)})),this.statsReporter_=Nt.getOrCreateReporter(this.repoInfo_,(function(){return new Dt(e.stats_,e.server_)})),this.transactionsInit_(),this.infoData_=new At,this.infoSyncTree_=new Rt({startListening:function(t,n,r,i){var o=[],a=e.infoData_.getNode(t.path);return a.isEmpty()||(o=e.infoSyncTree_.applyServerOverwrite(t.path,a),setTimeout((function(){i("ok")}),0)),o},stopListening:function(){}}),this.updateInfo_("connected",!1),this.serverSyncTree_=new Rt({startListening:function(t,n,r,i){return e.server_.listen(t,r,n,(function(n,r){var o=i(n,r);e.eventQueue_.raiseEventsForChangedPath(t.path,o)})),[]},stopListening:function(t,n){e.server_.unlisten(t,n)}})},e.prototype.toString=function(){return(this.repoInfo_.secure?"https://":"http://")+this.repoInfo_.host},e.prototype.name=function(){return this.repoInfo_.namespace},e.prototype.serverTime=function(){var e=this.infoData_.getNode(new U(".info/serverTimeOffset")).val()||0;return(new Date).getTime()+e}
2,e.prototype.generateServerValues=function(){return(e=(e={timestamp:this.serverTime()})||{}).timestamp=e.timestamp||(new Date).getTime(),e;var e},e.prototype.onDataUpdate_=function(e,t,n,r){this.dataUpdateCount++;var i=new U(e);t=this.interceptServerDataCallback_?this.interceptServerDataCallback_(e,t):t;var a=[];if(r)if(n){var s=Object(o.E)(t,(function(e){return qe(e)}));a=this.serverSyncTree_.applyTaggedQueryMerge(i,s,r)}else{var u=qe(t);a=this.serverSyncTree_.applyTaggedQueryOverwrite(i,u,r)}else if(n){var c=Object(o.E)(t,(function(e){return qe(e)}));a=this.serverSyncTree_.applyServerMerge(i,c)}else{var l=qe(t);a=this.serverSyncTree_.applyServerOverwrite(i,l)}var f=i;a.length>0&&(f=this.rerunTransactions_(i)),this.eventQueue_.raiseEventsForChangedPath(f,a)},e.prototype.interceptServerData_=function(e){this.interceptServerDataCallback_=e},e.prototype.onConnectStatus_=function(e){this.updateInfo_("connected",e),!1===e&&this.runOnDisconnectEvents_()},e.prototype.onServerInfoUpdate_=function(e){var t=this;A(e,(function(e,n){t.updateInfo_(e,n)}))},e.prototype.updateInfo_=function(e,t){var n=new U("/.info/"+e),r=qe(t);this.infoData_.updateSnapshot(n,r);var i=this.infoSyncTree_.applyServerOverwrite(n,r);this.eventQueue_.raiseEventsForChangedPath(n,i)},e.prototype.getNextWriteId_=function(){return this.nextWriteId_++},e.prototype.setWithPriority=function(e,t,n,r){var i=this;this.log_("set",{path:e.toString(),value:t,priority:n});var o=this.generateServerValues(),a=qe(t,n),s=this.serverSyncTree_.calcCompleteEventCache(e),u=it(a,s,o),c=this.getNextWriteId_(),l=this.serverSyncTree_.applyUserOverwrite(e,u,c,!0);this.eventQueue_.queueEvents(l),this.server_.put(e.toString(),a.val(!0),(function(t,n){var o="ok"===t;o||O("set at "+e+" failed: "+t);var a=i.serverSyncTree_.ackUserWrite(c,!o);i.eventQueue_.raiseEventsForChangedPath(e,a),i.callOnCompleteCallback(r,t,n)}));var f=this.abortTransactions_(e);this.rerunTransactions_(f),this.eventQueue_.raiseEventsForChangedPath(f,[])},e.prototype.update=function(e,t,n){var r=this;this.log_("update",{path:e.toString(),value:t});var i=!0,o=this.generateServerValues(),a={};if(A(t,(function(t,n){i=!1,a[t]=rt(e.child(t),qe(n),r.serverSyncTree_,o)})),i)_("update() called with empty data. Don't do anything."),this.callOnCompleteCallback(n,"ok");else{var s=this.getNextWriteId_(),u=this.serverSyncTree_.applyUserMerge(e,a,s);this.eventQueue_.queueEvents(u),this.server_.merge(e.toString(),t,(function(t,i){var o="ok"===t;o||O("update at "+e+" failed: "+t);var a=r.serverSyncTree_.ackUserWrite(s,!o),u=a.length>0?r.rerunTransactions_(e):e;r.eventQueue_.raiseEventsForChangedPath(u,a),r.callOnCompleteCallback(n,t,i)})),A(t,(function(t){var n=r.abortTransactions_(e.child(t));r.rerunTransactions_(n)})),this.eventQueue_.raiseEventsForChangedPath(e,[])}},e.prototype.runOnDisconnectEvents_=function(){var e=this;this.log_("onDisconnectEvents");var t=this.generateServerValues(),n=new st;this.onDisconnect_.forEachTree(U.Empty,(function(r,i){var o=rt(r,i,e.serverSyncTree_,t);n.remember(r,o)}));var r=[];n.forEachTree(U.Empty,(function(t,n){r=r.concat(e.serverSyncTree_.applyServerOverwrite(t,n));var i=e.abortTransactions_(t);e.rerunTransactions_(i)})),this.onDisconnect_=new st,this.eventQueue_.raiseEventsForChangedPath(U.Empty,r)},e.prototype.onDisconnectCancel=function(e,t){var n=this;this.server_.onDisconnectCancel(e.toString(),(function(r,i){"ok"===r&&n.onDisconnect_.forget(e),n.callOnCompleteCallback(t,r,i)}))},e.prototype.onDisconnectSet=function(e,t,n){var r=this,i=qe(t);this.server_.onDisconnectPut(e.toString(),i.val(!0),(function(t,o){"ok"===t&&r.onDisconnect_.remember(e,i),r.callOnCompleteCallback(n,t,o)}))},e.prototype.onDisconnectSetWithPriority=function(e,t,n,r){var i=this,o=qe(t,n);this.server_.onDisconnectPut(e.toString(),o.val(!0),(function(t,n){"ok"===t&&i.onDisconnect_.remember(e,o),i.callOnCompleteCallback(r,t,n)}))},e.prototype.onDisconnectUpdate=function(e,t,n){var r=this;if(Object(o.u)(t))return _("onDisconnect().update() called with empty data. Don't do anything."),void this.callOnCompleteCallback(n,"ok");this.server_.onDisconnectMerge(e.toString(),t,(function(i,o){"ok"===i&&A(t,(function(t,n){var i=qe(n);r.onDisconnect_.remember(e.child(t),i)})),r.callOnCompleteCallback(n,i,o)}))},e.prototype.addEventCallbackForQuery=function(e,t){var n;n=".info"===e.path.getFront()?this.infoSyncTree_.addEventRegistration(e,t):this.serverSyncTree_.addEventRegistration(e,t),this.eventQueue_.raiseEventsAtPath(e.path,n)},e.prototype.removeEventCallbackForQuery=function(e,t){var n;n=".info"===e.path.getFront()?this.infoSyncTree_.removeEventRegistration(e,t):this.serverSyncTree_.removeEventRegistration(e,t),this.eventQueue_.raiseEventsAtPath(e.path,n)},e.prototype.interrupt=function(){this.persistentConnection_&&this.persistentConnection_.interrupt(on)},e.prototype.resume=function(){this.persistentConnection_&&this.persistentConnection_.resume(on)},e.prototype.stats=function(e){if(void 0===e&&(e=!1),"undefined"!==typeof console){var t;e?(this.statsListener_||(this.statsListener_=new Lt(this.stats_)),t=this.statsListener_.get()):t=this.stats_.get();var n=Object.keys(t).reduce((function(e,t){return Math.max(t.length,e)}),0);A(t,(function(e,t){for(var r=e,i=e.length;i<n+2;i++)r+=" ";console.log(r+t)}))}},e.prototype.statsIncrementCounter=function(e){this.stats_.incrementCounter(e),this.statsReporter_.includeStat(e)},e.prototype.log_=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n="";this.persistentConnection_&&(n=this.persistentConnection_.id+":"),_.apply(void 0,Object(i.f)([n],e))},e.prototype.callOnCompleteCallback=function(e,t,n){e&&D((function(){if("ok"===t)e(null);else{var r=(t||"error").toUpperCase(),i=r;n&&(i+=": "+n);var o=new Error(i);o.code=r,e(o)}}))},Object.defineProperty(e.prototype,"database",{get:function(){return this.__database||(this.__database=new gn(this))}
2,enumerable:!1,configurable:!0}),e}(),sn=function(){function e(t){this.indexedFilter_=new bt(t.getIndex()),this.index_=t.getIndex(),this.startPost_=e.getStartPost_(t),this.endPost_=e.getEndPost_(t)}return e.prototype.getStartPost=function(){return this.startPost_},e.prototype.getEndPost=function(){return this.endPost_},e.prototype.matches=function(e){return this.index_.compare(this.getStartPost(),e)<=0&&this.index_.compare(e,this.getEndPost())<=0},e.prototype.updateChild=function(e,t,n,r,i,o){return this.matches(new ye(t,n))||(n=Ve.EMPTY_NODE),this.indexedFilter_.updateChild(e,t,n,r,i,o)},e.prototype.updateFullNode=function(e,t,n){t.isLeafNode()&&(t=Ve.EMPTY_NODE);var r=t.withIndex(this.index_);r=r.updatePriority(Ve.EMPTY_NODE);var i=this;return t.forEachChild(Pe,(function(e,t){i.matches(new ye(e,t))||(r=r.updateImmediateChild(e,Ve.EMPTY_NODE))})),this.indexedFilter_.updateFullNode(e,r,n)},e.prototype.updatePriority=function(e,t){return e},e.prototype.filtersNodes=function(){return!0},e.prototype.getIndexedFilter=function(){return this.indexedFilter_},e.prototype.getIndex=function(){return this.index_},e.getStartPost_=function(e){if(e.hasStart()){var t=e.getIndexStartName();return e.getIndex().makePost(e.getIndexStartValue(),t)}return e.getIndex().minPost()},e.getEndPost_=function(e){if(e.hasEnd()){var t=e.getIndexEndName();return e.getIndex().makePost(e.getIndexEndValue(),t)}return e.getIndex().maxPost()},e}(),un=function(){function e(e){this.rangedFilter_=new sn(e),this.index_=e.getIndex(),this.limit_=e.getLimit(),this.reverse_=!e.isViewFromLeft()}return e.prototype.updateChild=function(e,t,n,r,i,o){return this.rangedFilter_.matches(new ye(t,n))||(n=Ve.EMPTY_NODE),e.getImmediateChild(t).equals(n)?e:e.numChildren()<this.limit_?this.rangedFilter_.getIndexedFilter().updateChild(e,t,n,r,i,o):this.fullLimitUpdateChild_(e,t,n,i,o)},e.prototype.updateFullNode=function(e,t,n){var r;if(t.isLeafNode()||t.isEmpty())r=Ve.EMPTY_NODE.withIndex(this.index_);else if(2*this.limit_<t.numChildren()&&t.isIndexed(this.index_)){r=Ve.EMPTY_NODE.withIndex(this.index_);var i=void 0;i=this.reverse_?t.getReverseIteratorFrom(this.rangedFilter_.getEndPost(),this.index_):t.getIteratorFrom(this.rangedFilter_.getStartPost(),this.index_);for(var o=0;i.hasNext()&&o<this.limit_;){var a=i.getNext();if(!(this.reverse_?this.index_.compare(this.rangedFilter_.getStartPost(),a)<=0:this.index_.compare(a,this.rangedFilter_.getEndPost())<=0))break;r=r.updateImmediateChild(a.name,a.node),o++}}else{r=(r=t.withIndex(this.index_)).updatePriority(Ve.EMPTY_NODE);var s=void 0,u=void 0,c=void 0;i=void 0;if(this.reverse_){i=r.getReverseIterator(this.index_),s=this.rangedFilter_.getEndPost(),u=this.rangedFilter_.getStartPost();var l=this.index_.getCompare();c=function(e,t){return l(t,e)}}else i=r.getIterator(this.index_),s=this.rangedFilter_.getStartPost(),u=this.rangedFilter_.getEndPost(),c=this.index_.getCompare();o=0;for(var f=!1;i.hasNext();){a=i.getNext();!f&&c(s,a)<=0&&(f=!0),f&&o<this.limit_&&c(a,u)<=0?o++:r=r.updateImmediateChild(a.name,Ve.EMPTY_NODE)}}return this.rangedFilter_.getIndexedFilter().updateFullNode(e,r,n)},e.prototype.updatePriority=function(e,t){return e},e.prototype.filtersNodes=function(){return!0},e.prototype.getIndexedFilter=function(){return this.rangedFilter_.getIndexedFilter()},e.prototype.getIndex=function(){return this.index_},e.prototype.fullLimitUpdateChild_=function(e,t,n,r,i){var a;if(this.reverse_){var s=this.index_.getCompare();a=function(e,t){return s(t,e)}}else a=this.index_.getCompare();var u=e;Object(o.f)(u.numChildren()===this.limit_,"");var c=new ye(t,n),l=this.reverse_?u.getFirstChild(this.index_):u.getLastChild(this.index_),f=this.rangedFilter_.matches(c);if(u.hasChild(t)){for(var h=u.getImmediateChild(t),d=r.getChildAfterChild(this.index_,l,this.reverse_);null!=d&&(d.name===t||u.hasChild(d.name));)d=r.getChildAfterChild(this.index_,d,this.reverse_);var p=null==d?1:a(d,c);if(f&&!n.isEmpty()&&p>=0)return null!=i&&i.trackChildChange(gt.childChangedChange(t,n,h)),u.updateImmediateChild(t,n);null!=i&&i.trackChildChange(gt.childRemovedChange(t,h));var v=u.updateImmediateChild(t,Ve.EMPTY_NODE);return null!=d&&this.rangedFilter_.matches(d)?(null!=i&&i.trackChildChange(gt.childAddedChange(d.name,d.node)),v.updateImmediateChild(d.name,d.node)):v}return n.isEmpty()?e:f&&a(l,c)>=0?(null!=i&&(i.trackChildChange(gt.childRemovedChange(l.name,l.node)),i.trackChildChange(gt.childAddedChange(t,n))),u.updateImmediateChild(t,n).updateImmediateChild(l.name,Ve.EMPTY_NODE)):e},e}(),cn=function(){function e(){this.limitSet_=!1,this.startSet_=!1,this.startNameSet_=!1,this.endSet_=!1,this.endNameSet_=!1,this.limit_=0,this.viewFrom_="",this.indexStartValue_=null,this.indexStartName_="",this.indexEndValue_=null,this.indexEndName_="",this.index_=Pe}return e.prototype.hasStart=function(){return this.startSet_},e.prototype.isViewFromLeft=function(){return""===this.viewFrom_?this.startSet_:this.viewFrom_===e.WIRE_PROTOCOL_CONSTANTS_.VIEW_FROM_LEFT},e.prototype.getIndexStartValue=function(){return Object(o.f)(this.startSet_,"Only valid if start has been set"),this.indexStartValue_},e.prototype.getIndexStartName=function(){return Object(o.f)(this.startSet_,"Only valid if start has been set"),this.startNameSet_?this.indexStartName_:T},e.prototype.hasEnd=function(){return this.endSet_},e.prototype.getIndexEndValue=function(){return Object(o.f)(this.endSet_,"Only valid if end has been set"),this.indexEndValue_},e.prototype.getIndexEndName=function(){return Object(o.f)(this.endSet_,"Only valid if end has been set"),this.endNameSet_?this.indexEndName_:C},e.prototype.hasLimit=function(){return this.limitSet_},e.prototype.hasAnchoredLimit=function(){return this.limitSet_&&""!==this.viewFrom_},e.prototype.getLimit=function(){return Object(o.f)(this.limitSet_,"Only valid if limit has been set"),this.limit_},e.prototype.getIndex=function(){return this.index_},e.prototype.copy_=function(){var t=new e;return t.limitSet_=this.limitSet_,t.limit_=this.limit_,t.startSet_=this.startSet_,t.indexStartValue_=this.indexStartValue_,t.startNameSet_=this.startNameSet_,t.indexStartName_=this.indexStartName_,t.endSet_=this.endSet_,t.indexEndValue_=this.indexEndValue_,t.endNameSet_=this.endNameSet_,t.indexEndName_=this.indexEndName_,t.index_
2=this.index_,t.viewFrom_=this.viewFrom_,t},e.prototype.limit=function(e){var t=this.copy_();return t.limitSet_=!0,t.limit_=e,t.viewFrom_="",t},e.prototype.limitToFirst=function(t){var n=this.copy_();return n.limitSet_=!0,n.limit_=t,n.viewFrom_=e.WIRE_PROTOCOL_CONSTANTS_.VIEW_FROM_LEFT,n},e.prototype.limitToLast=function(t){var n=this.copy_();return n.limitSet_=!0,n.limit_=t,n.viewFrom_=e.WIRE_PROTOCOL_CONSTANTS_.VIEW_FROM_RIGHT,n},e.prototype.startAt=function(e,t){var n=this.copy_();return n.startSet_=!0,void 0===e&&(e=null),n.indexStartValue_=e,null!=t?(n.startNameSet_=!0,n.indexStartName_=t):(n.startNameSet_=!1,n.indexStartName_=""),n},e.prototype.endAt=function(e,t){var n=this.copy_();return n.endSet_=!0,void 0===e&&(e=null),n.indexEndValue_=e,void 0!==t?(n.endNameSet_=!0,n.indexEndName_=t):(n.endNameSet_=!1,n.indexEndName_=""),n},e.prototype.orderBy=function(e){var t=this.copy_();return t.index_=e,t},e.prototype.getQueryObject=function(){var t=e.WIRE_PROTOCOL_CONSTANTS_,n={};if(this.startSet_&&(n[t.INDEX_START_VALUE]=this.indexStartValue_,this.startNameSet_&&(n[t.INDEX_START_NAME]=this.indexStartName_)),this.endSet_&&(n[t.INDEX_END_VALUE]=this.indexEndValue_,this.endNameSet_&&(n[t.INDEX_END_NAME]=this.indexEndName_)),this.limitSet_){n[t.LIMIT]=this.limit_;var r=this.viewFrom_;""===r&&(r=this.isViewFromLeft()?t.VIEW_FROM_LEFT:t.VIEW_FROM_RIGHT),n[t.VIEW_FROM]=r}return this.index_!==Pe&&(n[t.INDEX]=this.index_.toString()),n},e.prototype.loadsAllData=function(){return!(this.startSet_||this.endSet_||this.limitSet_)},e.prototype.isDefault=function(){return this.loadsAllData()&&this.index_===Pe},e.prototype.getNodeFilter=function(){return this.loadsAllData()?new bt(this.getIndex()):this.hasLimit()?new un(this):new sn(this)},e.prototype.toRestQueryStringParameters=function(){var t,n=e.REST_QUERY_CONSTANTS_,r={};return this.isDefault()||(this.index_===Pe?t=n.PRIORITY_INDEX:this.index_===ze?t=n.VALUE_INDEX:this.index_===be?t=n.KEY_INDEX:(Object(o.f)(this.index_ instanceof He,"Unrecognized index type!"),t=this.index_.toString()),r[n.ORDER_BY]=Object(o.J)(t),this.startSet_&&(r[n.START_AT]=Object(o.J)(this.indexStartValue_),this.startNameSet_&&(r[n.START_AT]+=","+Object(o.J)(this.indexStartName_))),this.endSet_&&(r[n.END_AT]=Object(o.J)(this.indexEndValue_),this.endNameSet_&&(r[n.END_AT]+=","+Object(o.J)(this.indexEndName_))),this.limitSet_&&(this.isViewFromLeft()?r[n.LIMIT_TO_FIRST]=this.limit_:r[n.LIMIT_TO_LAST]=this.limit_)),r},e.WIRE_PROTOCOL_CONSTANTS_={INDEX_START_VALUE:"sp",INDEX_START_NAME:"sn",INDEX_END_VALUE:"ep",INDEX_END_NAME:"en",LIMIT:"l",VIEW_FROM:"vf",VIEW_FROM_LEFT:"l",VIEW_FROM_RIGHT:"r",INDEX:"i"},e.REST_QUERY_CONSTANTS_={ORDER_BY:"orderBy",PRIORITY_INDEX:"$priority",VALUE_INDEX:"$value",KEY_INDEX:"$key",START_AT:"startAt",END_AT:"endAt",LIMIT_TO_FIRST:"limitToFirst",LIMIT_TO_LAST:"limitToLast"},e.DEFAULT=new e,e}(),ln=function(e){function t(t,n){if(!(t instanceof an))throw new Error("new Reference() no longer supported - use app.database().");return e.call(this,t,n,cn.DEFAULT,!1)||this}return Object(i.c)(t,e),t.prototype.getKey=function(){return Object(o.K)("Reference.key",0,0,arguments.length),this.path.isEmpty()?null:this.path.getBack()},t.prototype.child=function(e){return Object(o.K)("Reference.child",1,1,arguments.length),"number"===typeof e?e=String(e):e instanceof U||(null===this.path.getFront()?ce("Reference.child",1,e,!1):ue("Reference.child",1,e,!1)),new t(this.repo,this.path.child(e))},t.prototype.getParent=function(){Object(o.K)("Reference.parent",0,0,arguments.length);var e=this.path.parent();return null===e?null:new t(this.repo,e)},t.prototype.getRoot=function(){Object(o.K)("Reference.root",0,0,arguments.length);for(var e=this;null!==e.getParent();)e=e.getParent();return e},t.prototype.databaseProp=function(){return this.repo.database},t.prototype.set=function(e,t){Object(o.K)("Reference.set",1,2,arguments.length),le("Reference.set",this.path),ne("Reference.set",1,e,this.path,!1),Object(o.L)("Reference.set",2,t,!0);var n=new o.a;return this.repo.setWithPriority(this.path,e,null,n.wrapCallback(t)),n.promise},t.prototype.update=function(e,t){if(Object(o.K)("Reference.update",1,2,arguments.length),le("Reference.update",this.path),Array.isArray(e)){for(var n={},r=0;r<e.length;++r)n[""+r]=e[r];
2e=n,O("Passing an Array to Firebase.update() is deprecated. Use set() if you want to overwrite the existing data, or an Object with integer keys if you really do want to only update some of the children.")}ie("Reference.update",1,e,this.path,!1),Object(o.L)("Reference.update",2,t,!0);var i=new o.a;return this.repo.update(this.path,e,i.wrapCallback(t)),i.promise},t.prototype.setWithPriority=function(e,t,n){if(Object(o.K)("Reference.setWithPriority",2,3,arguments.length),le("Reference.setWithPriority",this.path),ne("Reference.setWithPriority",1,e,this.path,!1),oe("Reference.setWithPriority",2,t,!1),Object(o.L)("Reference.setWithPriority",3,n,!0),".length"===this.getKey()||".keys"===this.getKey())throw"Reference.setWithPriority failed: "+this.getKey()+" is a read-only object.";var r=new o.a;return this.repo.setWithPriority(this.path,e,t,r.wrapCallback(n)),r.promise},t.prototype.remove=function(e){return Object(o.K)("Reference.remove",0,1,arguments.length),le("Reference.remove",this.path),Object(o.L)("Reference.remove",1,e,!0),this.set(null,e)},t.prototype.transaction=function(e,t,n){if(Object(o.K)("Reference.transaction",1,3,arguments.length),le("Reference.transaction",this.path),Object(o.L)("Reference.transaction",1,e,!1),Object(o.L)("Reference.transaction",2,t,!0),he("Reference.transaction",3,n,!0),".length"===this.getKey()||".keys"===this.getKey())throw"Reference.transaction failed: "+this.getKey()+" is a read-only object.";void 0===n&&(n=!0);var r=new o.a;"function"===typeof t&&r.promise.catch((function(){}));var i=function(e,n,i){e?r.reject(e):r.resolve(new pe(n,i)),"function"===typeof t&&t(e,n,i)};return this.repo.startTransaction(this.path,e,i,n),r.promise},t.prototype.setPriority=function(e,t){Object(o.K)("Reference.setPriority",1,2,arguments.length),le("Reference.setPriority",this.path),oe("Reference.setPriority",1,e,!1),Object(o.L)("Reference.setPriority",2,t,!0);var n=new o.a;return this.repo.setWithPriority(this.path.child(".priority"),e,null,n.wrapCallback(t)),n.promise},t.prototype.push=function(e,t){Object(o.K)("Reference.push",0,2,arguments.length),le("Reference.push",this.path),ne("Reference.push",1,e,this.path,!0),Object(o.L)("Reference.push",2,t,!0);var n,r=this.repo.serverTime(),i=ve(r),a=this.child(i),s=this.child(i);return n=null!=e?a.set(e,t).then((function(){return s})):Promise.resolve(s),a.then=n.then.bind(n),a.catch=n.then.bind(n,void 0),"function"===typeof t&&n.catch((function(){})),a},t.prototype.onDisconnect=function(){return le("Reference.onDisconnect",this.path),new de(this.repo,this.path)},Object.defineProperty(t.prototype,"database",{get:function(){return this.databaseProp()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"key",{get:function(){return this.getKey()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"parent",{get:function(){return this.getParent()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"root",{get:function(){return this.getRoot()},enumerable:!1,configurable:!0}),t}(Xe);Xe.__referenceConstructor=ln,Ct.__referenceConstructor=ln;var fn,hn=function(){this.children={},this.childCount=0,this.value=null},dn=function(){function e(e,t,n){void 0===e&&(e=""),void 0===t&&(t=null),void 0===n&&(n=new hn),this.name_=e,this.parent_=t,this.node_=n}return e.prototype.subTree=function(t){for(var n=t instanceof U?t:new U(t),r=this,i=n.getFront();null!==i;){r=new e(i,r,Object(o.G)(r.node_.children,i)||new hn),i=(n=n.popFront()).getFront()}return r},e.prototype.getValue=function(){return this.node_.value},e.prototype.setValue=function(e){Object(o.f)("undefined"!==typeof e,"Cannot set value to undefined"),this.node_.value=e,this.updateParents_()},e.prototype.clear=function(){this.node_.value=null,this.node_.children={},this.node_.childCount=0,this.updateParents_()},e.prototype.hasChildren=function(){return this.node_.childCount>0},e.prototype.isEmpty=function(){return null===this.getValue()&&!this.hasChildren()},e.prototype.forEachChild=function(t){var n=this;A(this.node_.children,(function(r,i){t(new e(r,n,i))}))},e.prototype.forEachDescendant=function(e,t,n){t&&!n&&e(this),this.forEachChild((function(t){t.forEachDescendant(e,!0,n)})),t&&n&&e(this)},e.prototype.forEachAncestor=function(e,t){for(var n=t?this:this.parent();null!==n;){if(e(n))return!0;n=n.parent()}return!1},e.prototype.forEachImmediateDescendantWithValue=function(e){this.forEachChild((function(t){null!==t.getValue()?e(t):t.forEachImmediateDescendantWithValue(e)}))},e.prototype.path=function(){return new U(null===this.parent_?this.name_:this.parent_.path()+"/"+this.name_)},e.prototype.name=function(){return this.name_},e.prototype.parent=function(){return this.parent_},e.prototype.updateParents_=function(){null!==this.parent_&&this.parent_.updateChild_(this.name_,this)},e.prototype.updateChild_=function(e,t){var n=t.isEmpty(),r=Object(o.k)(this.node_.children,e);n&&r?(delete this.node_.children[e],this.node_.childCount--,this.updateParents_()):n||r||(this.node_.children[e]=t.node_,this.node_.childCount++,this.updateParents_())},e}();!function(e){e[e.RUN=0]="RUN",e[e.SENT=1]="SENT",e[e.COMPLETED=2]="COMPLETED",e[e.SENT_NEEDS_ABORT=3]="SENT_NEEDS_ABORT",e[e.NEEDS_ABORT=4]="NEEDS_ABORT"}(fn||(fn={})),an.MAX_TRANSACTION_RETRIES_=25,an.prototype.transactionsInit_=function(){this.transactionQueueTree_=new dn},an.prototype.startTransaction=function(e,t,n,r){this.log_("transaction on "+e);var i=function(){},a=new ln(this,e);a.on("value",i);var s={path:e,update:t,onComplete:n,status:null,order:p(),applyLocally:r,retryCount:0,unwatcher:function(){a.off("value",i)},abortReason:null,currentWriteId:null,currentInputSnapshot:null,currentOutputSnapshotRaw:null,currentOutputSnapshotResolved:null},u=this.getLatestState_(e);s.currentInputSnapshot=u;var c=s.update(u.val());if(void 0===c){if(s.unwatcher(),s.currentOutputSnapshotRaw=null,s.currentOutputSnapshotResolved=null,s.onComplete){var l=new Ge(s.currentInputSnapshot,new ln(this,s.path),Pe);s.onComplete(null,!1,l)}}else{re("transaction failed: Data returned ",c,s.path),s.status=fn.RUN;var f=this.transactionQueueTree_.subTree(e),h=f.getValue()||[];h.push(s),f.setValue(h);var d=void 0;if("object"===typeof c&&null!==c&&Object(o.k)(c,".priority"))d=Object(o.G)(c,".priority"),Object(o.f)(te(d),"Invalid priority returned by transaction. Priority must be a valid string, finite number, server value, or null.");else d=(this.serverSyncTree_.calcCompleteEventCache(e)||Ve.EMPTY_NODE).getPriority().val();d=d;var v=this.generateServerValues(),y=qe(c,d),m=it(y,u,v);s.currentOutputSnapshotRaw=y,s.currentOutputSnapshotResolved=m,s.currentWriteId=this.getNextWriteId_();var g=this.serverSyncTree_.applyUserOverwrite(e,m,s.currentWriteId,s.applyLocally);this.eventQueue_.raiseEventsForChangedPath(e,g),this.sendReadyTransactions_()}},an.prototype.getLatestState_=function(e,t){return this.serverSyncTree_.calcCompleteEventCache(e,t)||Ve.EMPTY_NODE},an.prototype.sendReadyTransactions_=function(e){var t=this;if(void 0===e&&(e=this.transactionQueueTree_),e||this.pruneCompletedTransactionsBelowNode_(e),null!==e.getValue()){var n=this.buildTransactionQueue_(e);Object(o.f)(n.length>0,"Sending zero length transaction queue"),n.every((function(e){return e.status===fn.RUN}))&&this.sendTransactionQueue_(e.path(),n)}else e.hasChildren()&&e.forEachChild((function(e){t.sendReadyTransactions_(e)}))},an.prototype.sendTransactionQueue_=function(e,t){for(var n=this,r=t.map((function(e){return e.currentWriteId})),i=this.getLatestState_(e,r),a=i,s=i.hash(),u=0;u<t.length;u++){var c=t[u];Object(o.f)(c.status===fn.RUN,"tryToSendTransactionQueue_: items in queue should all be run."),c.status=fn.SENT,c.retryCount++;var l=U.relativePath(e,c.path);a=a.updateChild(l,c.currentOutputSnapshotRaw)}var f=a.val(!0),h=e;this.server_.put(h.toString(),f,(function(r){n.log_("transaction put response",{path:h.toString(),status:r});var i=[];if("ok"===r){for(var o=[],a=0;a<t.length;
2a++){if(t[a].status=fn.COMPLETED,i=i.concat(n.serverSyncTree_.ackUserWrite(t[a].currentWriteId)),t[a].onComplete){var s=t[a].currentOutputSnapshotResolved,u=new ln(n,t[a].path),c=new Ge(s,u,Pe);o.push(t[a].onComplete.bind(null,null,!0,c))}t[a].unwatcher()}n.pruneCompletedTransactionsBelowNode_(n.transactionQueueTree_.subTree(e)),n.sendReadyTransactions_(),n.eventQueue_.raiseEventsForChangedPath(e,i);for(a=0;a<o.length;a++)D(o[a])}else{if("datastale"===r)for(a=0;a<t.length;a++)t[a].status===fn.SENT_NEEDS_ABORT?t[a].status=fn.NEEDS_ABORT:t[a].status=fn.RUN;else{O("transaction at "+h.toString()+" failed: "+r);for(a=0;a<t.length;a++)t[a].status=fn.NEEDS_ABORT,t[a].abortReason=r}n.rerunTransactions_(e)}}),s)},an.prototype.rerunTransactions_=function(e){var t=this.getAncestorTransactionNode_(e),n=t.path(),r=this.buildTransactionQueue_(t);return this.rerunTransactionQueue_(r,n),n},an.prototype.rerunTransactionQueue_=function(e,t){if(0!==e.length){for(var n,r=[],i=[],a=e.filter((function(e){return e.status===fn.RUN})).map((function(e){return e.currentWriteId})),s=0;s<e.length;s++){var u=e[s],c=U.relativePath(t,u.path),l=!1,f=void 0;if(Object(o.f)(null!==c,"rerunTransactionsUnderNode_: relativePath should not be null."),u.status===fn.NEEDS_ABORT)l=!0,f=u.abortReason,i=i.concat(this.serverSyncTree_.ackUserWrite(u.currentWriteId,!0));else if(u.status===fn.RUN)if(u.retryCount>=an.MAX_TRANSACTION_RETRIES_)l=!0,f="maxretry",i=i.concat(this.serverSyncTree_.ackUserWrite(u.currentWriteId,!0));else{var h=this.getLatestState_(u.path,a);u.currentInputSnapshot=h;var d=e[s].update(h.val());if(void 0!==d){re("transaction failed: Data returned ",d,u.path);var p=qe(d);"object"===typeof d&&null!=d&&Object(o.k)(d,".priority")||(p=p.updatePriority(h.getPriority()));var v=u.currentWriteId,y=this.generateServerValues(),m=it(p,h,y);u.currentOutputSnapshotRaw=p,u.currentOutputSnapshotResolved=m,u.currentWriteId=this.getNextWriteId_(),a.splice(a.indexOf(v),1),i=(i=i.concat(this.serverSyncTree_.applyUserOverwrite(u.path,m,u.currentWriteId,u.applyLocally))).concat(this.serverSyncTree_.ackUserWrite(v,!0))}else l=!0,f="nodata",i=i.concat(this.serverSyncTree_.ackUserWrite(u.currentWriteId,!0))}if(this.eventQueue_.raiseEventsForChangedPath(t,i),i=[],l&&(e[s].status=fn.COMPLETED,n=e[s].unwatcher,setTimeout(n,Math.floor(0)),e[s].onComplete))if("nodata"===f){var g=new ln(this,e[s].path),b=e[s].currentInputSnapshot,_=new Ge(b,g,Pe);r.push(e[s].onComplete.bind(null,null,!1,_))}else r.push(e[s].onComplete.bind(null,new Error(f),!1,null))}this.pruneCompletedTransactionsBelowNode_(this.transactionQueueTree_);for(s=0;s<r.length;s++)D(r[s]);this.sendReadyTransactions_()}},an.prototype.getAncestorTransactionNode_=function(e){var t,n=this.transactionQueueTree_;for(t=e.getFront();null!==t&&null===n.getValue();)n=n.subTree(t),t=(e=e.popFront()).getFront();return n},an.prototype.buildTransactionQueue_=function(e){var t=[];return this.aggregateTransactionQueuesForNode_(e,t),t.sort((function(e,t){return e.order-t.order})),t},an.prototype.aggregateTransactionQueuesForNode_=function(e,t){var n=this,r=e.getValue();if(null!==r)for(var i=0;i<r.length;i++)t.push(r[i]);e.forEachChild((function(e){n.aggregateTransactionQueuesForNode_(e,t)}))},an.prototype.pruneCompletedTransactionsBelowNode_=function(e){var t=this,n=e.getValue();if(n){for(var r=0,i=0;i<n.length;i++)n[i].status!==fn.COMPLETED&&(n[r]=n[i],r++);n.length=r,e.setValue(n.length>0?n:null)}e.forEachChild((function(e){t.pruneCompletedTransactionsBelowNode_(e)}))},an.prototype.abortTransactions_=function(e){var t=this,n=this.getAncestorTransactionNode_(e).path(),r=this.transactionQueueTree_.subTree(e);return r.forEachAncestor((function(e){t.abortTransactionsOnNode_(e)})),this.abortTransactionsOnNode_(r),r.forEachDescendant((function(e){t.abortTransactionsOnNode_(e)})),n},an.prototype.abortTransactionsOnNode_=function(e){var t=e.getValue();if(null!==t){for(var n=[],r=[],i=-1,a=0;a<t.length;a++)if(t[a].status===fn.SENT_NEEDS_ABORT);else if(t[a].status===fn.SENT)Object(o.f)(i===a-1,"All SENT items should be at beginning of queue."),i=a,t[a].status=fn.SENT_NEEDS_ABORT,t[a].abortReason="set";else if(Object(o.f)(t[a].status===fn.RUN,"Unexpected transaction status in abort"),t[a].unwatcher(),r
2=r.concat(this.serverSyncTree_.ackUserWrite(t[a].currentWriteId,!0)),t[a].onComplete){n.push(t[a].onComplete.bind(null,new Error("set"),!1,null))}-1===i?e.setValue(null):t.length=i+1,this.eventQueue_.raiseEventsForChangedPath(e.path(),r);for(a=0;a<n.length;a++)D(n[a])}};var pn,vn=function(){function e(e,t){var n=this;this.app_=e,this.authProvider_=t,this.auth_=null,this.auth_=t.getImmediate({optional:!0}),this.auth_||t.get().then((function(e){return n.auth_=e}))}return e.prototype.getToken=function(e){return this.auth_?this.auth_.getToken(e).catch((function(e){return e&&"auth/token-not-initialized"===e.code?(_("Got auth/token-not-initialized error. Treating as null token."),null):Promise.reject(e)})):Promise.resolve(null)},e.prototype.addTokenChangeListener=function(e){this.auth_?this.auth_.addAuthTokenListener(e):(setTimeout((function(){return e(null)}),0),this.authProvider_.get().then((function(t){return t.addAuthTokenListener(e)})))},e.prototype.removeTokenChangeListener=function(e){this.authProvider_.get().then((function(t){return t.removeAuthTokenListener(e)}))},e.prototype.notifyForInvalidToken=function(){var e='Provided authentication credentials for the app named "'+this.app_.name+'" are invalid. This usually indicates your app was not initialized correctly. ';"credential"in this.app_.options?e+='Make sure the "credential" property provided to initializeApp() is authorized to access the specified "databaseURL" and is from the correct project.':"serviceAccount"in this.app_.options?e+='Make sure the "serviceAccount" property provided to initializeApp() is authorized to access the specified "databaseURL" and is from the correct project.':e+='Make sure the "apiKey" and "databaseURL" properties provided to initializeApp() match the values provided for your app at https://console.firebase.google.com/.',O(e)},e}(),yn=function(){function e(){}return e.prototype.getToken=function(t){return Promise.resolve({accessToken:e.EMULATOR_AUTH_TOKEN})},e.prototype.addTokenChangeListener=function(t){t(e.EMULATOR_AUTH_TOKEN)},e.prototype.removeTokenChangeListener=function(e){},e.prototype.notifyForInvalidToken=function(){},e.EMULATOR_AUTH_TOKEN="owner",e}(),mn=function(){function t(){this.repos_={},this.useRestClient_=!1}return t.getInstance=function(){return pn||(pn=new t),pn},t.prototype.interrupt=function(){var e,t,n,r;try{for(var o=Object(i.h)(Object.keys(this.repos_)),a=o.next();!a.done;a=o.next()){var s=a.value;try{for(var u=(n=void 0,Object(i.h)(Object.keys(this.repos_[s]))),c=u.next();!c.done;c=u.next()){var l=c.value;this.repos_[s][l].interrupt()}}catch(f){n={error:f}}finally{try{c&&!c.done&&(r=u.return)&&r.call(u)}finally{if(n)throw n.error}}}}catch(h){e={error:h}}finally{try{a&&!a.done&&(t=o.return)&&t.call(o)}finally{if(e)throw e.error}}},t.prototype.resume=function(){var e,t,n,r;try{for(var o=Object(i.h)(Object.keys(this.repos_)),a=o.next();!a.done;a=o.next()){var s=a.value;try{for(var u=(n=void 0,Object(i.h)(Object.keys(this.repos_[s]))),c=u.next();!c.done;c=u.next()){var l=c.value;this.repos_[s][l].resume()}}catch(f){n={error:f}}finally{try{c&&!c.done&&(r=u.return)&&r.call(u)}finally{if(n)throw n.error}}}}catch(h){e={error:h}}finally{try{a&&!a.done&&(t=o.return)&&t.call(o)}finally{if(e)throw e.error}}},t.prototype.applyEmulatorSettings=function(e,t,n){e.repoInfo_=new H(t+":"+n,!1,e.repoInfo_.namespace,e.repoInfo_.webSocketOnly,e.repoInfo_.nodeAdmin,e.repoInfo_.persistenceKey,e.repoInfo_.includeNamespaceInQueryParams),e.repoInfo_.nodeAdmin&&(e.authTokenProvider_=new yn)},t.prototype.databaseFromApp=function(t,n,r,i){var o=r||t.options.databaseURL;void 0===o&&(t.options.projectId||S("Can't determine Firebase Database URL. Be sure to include a Project ID when calling firebase.initializeApp()."),_("Using default host for project ",t.options.projectId),o=t.options.projectId+"-default-rtdb.firebaseio.com");var a,s=Y(o,i),u=s.repoInfo,c=void 0;"undefined"!==typeof e&&(c=Object({NODE_ENV:"production",PUBLIC_URL:"",WDS_SOCKET_HOST:void 0,WDS_SOCKET_PATH:void 0,WDS_SOCKET_PORT:void 0,FAST_REFRESH:!0}).FIREBASE_DATABASE_EMULATOR_HOST),c?(a=!0,o="http://"+c+"?ns="+u.namespace,u=(s=Y(o,i)
2).repoInfo):a=!s.repoInfo.secure;var l=i&&a?new yn:new vn(t,n);return fe("Invalid Firebase Database URL",1,s),s.path.isEmpty()||S("Database URL must point to the root of a Firebase Database (not including a child path)."),this.createRepo(u,t,l).database},t.prototype.deleteRepo=function(e){var t=Object(o.G)(this.repos_,e.app.name);t&&Object(o.G)(t,e.key)===e||S("Database "+e.app.name+"("+e.repoInfo_+") has already been deleted."),e.interrupt(),delete t[e.key]},t.prototype.createRepo=function(e,t,n){var r=Object(o.G)(this.repos_,t.name);r||(r={},this.repos_[t.name]=r);var i=Object(o.G)(r,e.toURLString());return i&&S("Database initialized multiple times. Please make sure the format of the database URL matches with each database() call."),i=new an(e,this.useRestClient_,t,n),r[e.toURLString()]=i,i},t.prototype.forceRestClient=function(e){this.useRestClient_=e},t}(),gn=function(){function e(e){var t=this;this.repoInternal_=e,this.instanceStarted_=!1,this.INTERNAL={delete:function(){return Object(i.b)(t,void 0,void 0,(function(){return Object(i.d)(this,(function(e){return this.checkDeleted_("delete"),mn.getInstance().deleteRepo(this.repo_),this.repoInternal_=null,this.rootInternal_=null,[2]}))}))}},e instanceof an||S("Don't call new Database() directly - please use firebase.database().")}return Object.defineProperty(e.prototype,"repo_",{get:function(){return this.instanceStarted_||(this.repoInternal_.start(),this.instanceStarted_=!0),this.repoInternal_},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"root_",{get:function(){return this.rootInternal_||(this.rootInternal_=new ln(this.repo_,U.Empty)),this.rootInternal_},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"app",{get:function(){return this.repo_.app},enumerable:!1,configurable:!0}),e.prototype.useEmulator=function(e,t){this.checkDeleted_("useEmulator"),this.instanceStarted_?S("Cannot call useEmulator() after instance has already been initialized."):mn.getInstance().applyEmulatorSettings(this.repoInternal_,e,t)},e.prototype.ref=function(e){return this.checkDeleted_("ref"),Object(o.K)("database.ref",0,1,arguments.length),e instanceof ln?this.refFromURL(e.toString()):void 0!==e?this.root_.child(e):this.root_},e.prototype.refFromURL=function(e){var t="database.refFromURL";this.checkDeleted_(t),Object(o.K)(t,1,1,arguments.length);var n=Y(e,this.repo_.repoInfo_.nodeAdmin);fe(t,1,n);var r=n.repoInfo;return r.isCustomHost()||r.host===this.repo_.repoInfo_.host||S(t+": Host name does not match the current database: (found "+r.host+" but expected "+this.repo_.repoInfo_.host+")"),this.ref(n.path.toString())},e.prototype.checkDeleted_=function(e){null===this.repoInternal_&&S("Cannot call "+e+" on a deleted database.")},e.prototype.goOffline=function(){Object(o.K)("database.goOffline",0,0,arguments.length),this.checkDeleted_("goOffline"),this.repo_.interrupt()},e.prototype.goOnline=function(){Object(o.K)("database.goOnline",0,0,arguments.length),this.checkDeleted_("goOnline"),this.repo_.resume()},e.ServerValue={TIMESTAMP:{".sv":"timestamp"},increment:function(e){return{".sv":{increment:e}}}},e}();var bn=Object.freeze({__proto__:null,forceLongPolling:function(){Xt.forceDisallow(),Gt.forceAllow()},forceWebSockets:function(){Gt.forceDisallow()},isWebSocketsAvailable:function(){return Xt.isAvailable()},setSecurityDebugCallback:function(e,t){e.repo.persistentConnection_.securityDebugCallback_=t},stats:function(e,t){e.repo.stats(t)},statsIncrementCounter:function(e,t){e.repo.statsIncrementCounter(t)},dataUpdateCount:function(e){return e.repo.dataUpdateCount},interceptServerData:function(e,t){return e.repo.interceptServerData_(t)},initStandalone:function(e){var t=e.app,n=e.url,r=e.version,i=e.customAuthImpl,o=e.namespace,a=e.nodeAdmin,u=void 0!==a&&a;Qt(r);var c=new s.c("auth-internal",new s.b("database-standalone"));return c.setComponent(new s.a("auth-internal",(function(){return i}),"PRIVATE")),{instance:mn.getInstance().databaseFromApp(t,c,n,u),namespace:o}}}),_n=nn;nn.prototype.simpleListen=function(e,t){this.sendRequest("q",{p:e},t)},nn.prototype.echo=function(e,t){this.sendRequest("echo",{d:e},t)};var wn=Zt,kn=H,Sn=Object.freeze({__proto__:null,DataConnection:_n,RealTimeConnection:wn,hijackHash:function(e){var t=nn.prototype.put;return nn.prototype.put=function(n,r,i,o){void 0!==o&&(o=e()),t.call(this,n,r,i,o)},function(){nn.prototype.put=t}},ConnectionTarget:kn,queryIdentifier:function(e){return e.queryIdentifier()},forceRestClient:function(e){mn.getInstance().forceRestClient(e)}}),On=gn.ServerValue;!function(e){Qt(e.SDK_VERSION);var n=e.INTERNAL.registerComponent(new s.a("database",(function(e,t){var n=e.getProvider("app").getImmediate(),r=e.getProvider("auth-internal");return mn.getInstance().databaseFromApp(n,r,t)}),"PUBLIC").setServiceProps({Reference:ln,Query:Xe,Database:gn,DataSnapshot:Ge,enableLogging:b,INTERNAL:bn,ServerValue:On,TEST_ACCESS:Sn}).setMultipleInstances(!0));e.registerVersion("@firebase/database","0.7.0"),Object(o.z)()&&(t.exports=n)}(r.a)}).call(this,n(98),n(320)(e))},function(e,t){e.exports=function(e){if(!e.webpackPolyfill){var t=Object.create(e);t.children||(t.children=[]),Object.defineProperty(t,"loaded",{enumerable:!0,get:function(){return t.l}}),Object.defineProperty(t,"id",{enumerable:!0,get:function(){return t.i}}),Object.defineProperty(t,"exports",{enumerable:!0}),t.webpackPolyfill=1}return t}},function(e,t,n){(function(e,t){!function(e,n){"use strict";if(!e.setImmediate){var r,i=1,o={},a=!1,s=e.document,u=Object.getPrototypeOf&&Object.getPrototypeOf(e);u=u&&u.setTimeout?u:e,"[object process]"==={}.toString.call(e.process)?r=function(e){t.nextTick((function(){l(e)}))}:function(){if(e.postMessage&&!e.importScripts){var t=!0,n=e.onmessage;return e.onmessage=function(){t=!1},e.postMessage("","*"),e.onmessage=n,t}}()?function(){var t="setImmediate$"+Math.random()+"$",n=function(n){n.source===e&&"string"===typeof n.data&&0===n.data.indexOf(t)&&l(+n.data.slice(t.length))};e.addEventListener?e.addEventListener("message",n,!1):e.attachEvent("onmessage",n),r=function(n){e.postMessage(t+n,"*")}}():e.MessageChannel?function(){var e=new MessageChannel;e.port1.onmessage=function(e){l(e.data)},r=function(t){e.port2.postMessage(t)}}():s&&"onreadystatechange"in s.createElement("script")?function(){var e=s.documentElement;
2r=function(t){var n=s.createElement("script");n.onreadystatechange=function(){l(t),n.onreadystatechange=null,e.removeChild(n),n=null},e.appendChild(n)}}():r=function(e){setTimeout(l,0,e)},u.setImmediate=function(e){"function"!==typeof e&&(e=new Function(""+e));for(var t=new Array(arguments.length-1),n=0;n<t.length;n++)t[n]=arguments[n+1];var a={callback:e,args:t};return o[i]=a,r(i),i++},u.clearImmediate=c}function c(e){delete o[e]}function l(e){if(a)setTimeout(l,0,e);else{var t=o[e];if(t){a=!0;try{!function(e){var t=e.callback,n=e.args;switch(n.length){case 0:t();break;case 1:t(n[0]);break;case 2:t(n[0],n[1]);break;case 3:t(n[0],n[1],n[2]);break;default:t.apply(void 0,n)}}(t)}finally{c(e),a=!1}}}}}("undefined"===typeof self?"undefined"===typeof e?this:e:self)}).call(this,n(44),n(98))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=n(4),i=n(41),o=n(46);function a(e){return(a="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function s(){if("function"!==typeof WeakMap)return null;var e=new WeakMap;return s=function(){return e},e}function u(e){if(e&&e.__esModule)return e;if(null===e||"object"!==a(e)&&"function"!==typeof e)return{default:e};var t=s();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if(Object.prototype.hasOwnProperty.call(e,i)){var o=r?Object.getOwnPropertyDescriptor(e,i):null;o&&(o.get||o.set)?Object.defineProperty(n,i,o):n[i]=e[i]}return n.default=e,t&&t.set(e,n),n}var c=[{key:"youtube",name:"YouTube",canPlay:o.canPlay.youtube,lazyPlayer:(0,r.lazy)((function(){return Promise.resolve().then((function(){return u(n(324))}))}))},{key:"soundcloud",name:"SoundCloud",canPlay:o.canPlay.soundcloud,lazyPlayer:(0,r.lazy)((function(){return Promise.resolve().then((function(){return u(n(325))}))}))},{key:"vimeo",name:"Vimeo",canPlay:o.canPlay.vimeo,lazyPlayer:(0,r.lazy)((function(){return Promise.resolve().then((function(){return u(n(326))}))}))},{key:"facebook",name:"Facebook",canPlay:o.canPlay.facebook,lazyPlayer:(0,r.lazy)((function(){return Promise.resolve().then((function(){return u(n(327))}))}))},{key:"streamable",name:"Streamable",canPlay:o.canPlay.streamable,lazyPlayer:(0,r.lazy)((function(){return Promise.resolve().then((function(){return u(n(328))}))}))},{key:"wistia",name:"Wistia",canPlay:o.canPlay.wistia,lazyPlayer:(0,r.lazy)((function(){return Promise.resolve().then((function(){return u(n(329))}))}))},{key:"twitch",name:"Twitch",canPlay:o.canPlay.twitch,lazyPlayer:(0,r.lazy)((function(){return Promise.resolve().then((function(){return u(n(330))}))}))},{key:"dailymotion",name:"DailyMotion",canPlay:o.canPlay.dailymotion,lazyPlayer:(0,r.lazy)((function(){return Promise.resolve().then((function(){return u(n(331))}))}))},{key:"mixcloud",name:"Mixcloud",canPlay:o.canPlay.mixcloud,lazyPlayer:(0,r.lazy)((function(){return Promise.resolve().then((function(){return u(n(332))}))}))},{key:"vidyard",name:"Vidyard",canPlay:o.canPlay.vidyard,lazyPlayer:(0,r.lazy)((function(){return Promise.resolve().then((function(){return u(n(333))}))}))},{key:"kaltura",name:"Kaltura",canPlay:o.canPlay.kaltura,lazyPlayer:(0,r.lazy)((function(){return Promise.resolve().then((function(){return u(n(334))}))}))},{key:"file",name:"FilePlayer",canPlay:o.canPlay.file,canEnablePIP:function(e){return o.canPlay.file(e)&&(document.pictureInPictureEnabled||(0,i.supportsWebKitPresentationMode)())&&!o.AUDIO_EXTENSIONS.test(e)},lazyPlayer:(0,r.lazy)((function(){return Promise.resolve().then((function(){return u(n(335))}))}))}];t.default=c},function(e,t){function n(e,t){e.onload=function(){this.onerror=this.onload=null,t(null,e)},e.onerror=function(){this.onerror=this.onload=null,t(new Error("Failed to load "+this.src),e)}}function r(e,t){e.onreadystatechange=function(){"complete"!=this.readyState&&"loaded"!=this.readyState||(this.onreadystatechange=null,t(null,e))}}e.exports=function(e,t,i){var o=document.head||document.getElementsByTagName("head")[0],a=document.createElement("script");"function"===typeof t&&(i=t,t={}),t=t||{},i=i||function(){},a.type=t.type||"text/javascript",a.charset=t.charset||"utf8",a.async=!("async"in t)||!!t.async,a.src=e,t.attrs&&function(e,t){for(var n in t)e.setAttribute(n,t[n])}(a,t.attrs),t.text&&(a.text=""+t.text),("onload"in a?n:r)(a,i),a.onload||n(a,i),o.appendChild(a)}},function(e,t,n){"use strict";function r(e){return(r="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}
2Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!==r(e)&&"function"!==typeof e)return{default:e};var t=s();if(t&&t.has(e))return t.get(e);var n={},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if(Object.prototype.hasOwnProperty.call(e,o)){var a=i?Object.getOwnPropertyDescriptor(e,o):null;a&&(a.get||a.set)?Object.defineProperty(n,o,a):n[o]=e[o]}n.default=e,t&&t.set(e,n);return n}(n(4)),o=n(41),a=n(46);function s(){if("function"!==typeof WeakMap)return null;var e=new WeakMap;return s=function(){return e},e}function u(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function c(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?u(Object(n),!0).forEach((function(t){b(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):u(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function l(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"===typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,i=!1,o=void 0;try{for(var a,s=e[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(u){i=!0,o=u}finally{try{r||null==s.return||s.return()}finally{if(i)throw o}}return n}(e,t)||function(e,t){if(!e)return;if("string"===typeof e)return f(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return f(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function f(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function h(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function d(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function p(e,t){return(p=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function v(e){var t=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=g(e);if(t){var i=g(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return y(this,n)}}function y(e,t){return!t||"object"!==r(t)&&"function"!==typeof t?m(e):t}function m(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function g(e){return(g=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function b(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var _="YT",w=/[?&](?:list|channel)=([a-zA-Z0-9_-]+)/,k=/user\/([a-zA-Z0-9_-]+)\/?/,S=/youtube-nocookie\.com/,O=function(e){!function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&p(e,t)}(u,e);var t,n,r,s=v(u);function u(){var e;h(this,u);for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return b(m(e=s.call.apply(s,[this].concat(n))),"callPlayer",o.callPlayer),b(m(e),"parsePlaylist",(function(t){return t instanceof Array?{listType:"playlist",playlist:t.map(e.getID).join(",")}:w.test(t)?{listType:"playlist",list:l(t.match(w),2)[1].replace(/^UC/,"UU")}:k.test(t)?{listType:"user_uploads",list:l(t.match(k),2)[1]}:{}})),b(m(e),"onStateChange",(function(t){var n=t.data,r=e.props,i=r.onPlay,o=r.onPause,a=r.onBuffer,s=r.onBufferEnd,u=r.onEnded,c=r.onReady,l=r.loop,f=r.config,h=f.playerVars,d=f.onUnstarted,p=window.YT.PlayerState,v=p.UNSTARTED,y=p.PLAYING,m=p.PAUSED,g=p.BUFFERING,b
vendor: 4,218 bytes, line 2
2=p.ENDED,_=p.CUED;if(n===v&&d(),n===y&&(i(),s()),n===m&&o(),n===g&&a(),n===b){var w=!!e.callPlayer("getPlaylist");l&&!w&&(h.start?e.seekTo(h.start):e.play()),u()}n===_&&c()})),b(m(e),"mute",(function(){e.callPlayer("mute")})),b(m(e),"unmute",(function(){e.callPlayer("unMute")})),b(m(e),"ref",(function(t){e.container=t})),e}return t=u,(n=[{key:"componentDidMount",value:function(){this.props.onMount&&this.props.onMount(this)}},{key:"getID",value:function(e){return!e||e instanceof Array||w.test(e)?null:e.match(a.MATCH_URL_YOUTUBE)[1]}},{key:"load",value:function(e,t){var n=this,r=this.props,i=r.playing,a=r.muted,s=r.playsinline,u=r.controls,l=r.loop,f=r.config,h=r.onError,d=f.playerVars,p=f.embedOptions,v=this.getID(e);if(t)return w.test(e)||k.test(e)||e instanceof Array?void this.player.loadPlaylist(this.parsePlaylist(e)):void this.player.cueVideoById({videoId:v,startSeconds:(0,o.parseStartTime)(e)||d.start,endSeconds:(0,o.parseEndTime)(e)||d.end});(0,o.getSDK)("https://www.youtube.com/iframe_api",_,"onYouTubeIframeAPIReady",(function(e){return e.loaded})).then((function(t){n.container&&(n.player=new t.Player(n.container,c({width:"100%",height:"100%",videoId:v,playerVars:c(c({autoplay:i?1:0,mute:a?1:0,controls:u?1:0,start:(0,o.parseStartTime)(e),end:(0,o.parseEndTime)(e),origin:window.location.origin,playsinline:s?1:0},n.parsePlaylist(e)),d),events:{onReady:function(){l&&n.player.setLoop(!0),n.props.onReady()},onStateChange:n.onStateChange,onError:function(e){return h(e.data)}},host:S.test(e)?"https://www.youtube-nocookie.com":void 0},p)))}),h),p.events&&console.warn("Using `embedOptions.events` will likely break things. Use ReactPlayer\u2019s callback props instead, eg onReady, onPlay, onPause")}},{key:"play",value:function(){this.callPlayer("playVideo")}},{key:"pause",value:function(){this.callPlayer("pauseVideo")}},{key:"stop",value:function(){document.body.contains(this.callPlayer("getIframe"))&&this.callPlayer("stopVideo")}},{key:"seekTo",value:function(e){this.callPlayer("seekTo",e),this.props.playing||this.pause()}},{key:"setVolume",value:function(e){this.callPlayer("setVolume",100*e)}},{key:"setPlaybackRate",value:function(e){this.callPlayer("setPlaybackRate",e)}},{key:"setLoop",value:function(e){this.callPlayer("setLoop",e)}},{key:"getDuration",value:function(){return this.callPlayer("getDuration")}},{key:"getCurrentTime",value:function(){return this.callPlayer("getCurrentTime")}},{key:"getSecondsLoaded",value:function(){return this.callPlayer("getVideoLoadedFraction")*this.getDuration()}},{key:"render",value:function(){var e={width:"100%",height:"100%",display:this.props.display};return i.default.createElement("div",{style:e},i.default.createElement("div",{ref:this.ref}))}}])&&d(t.prototype,n),r&&d(t,r),u}(i.Component);t.default=O,b(O,"displayName","YouTube"),b(O,"canPlay",a.canPlay.youtube)},function(e,t,n){"use strict";function r(e){return(r="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!==r(e)&&"function"!==typeof e)return{default:e};var t=s();if(t&&t.has(e))return t.get(e);var n={},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if(Object.prototype.hasOwnProperty.call(e,o)){var a=i?Object.getOwnPropertyDescriptor(e,o):null;a&&(a.get||a.set)?Object.defineProperty(n,o,a):n[o]=e[o]}n.default=e,t&&t.set(e,n);return n}(n(4)),o=n(41),a=n(46);function s(){if("function"!==typeof WeakMap)return null;var e=new WeakMap;return s=function(){return e},e}function u(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function c(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?u(Object(n),!0).forEach((function(t){m(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):u(Object(n)).forEac
2h((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function l(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function f(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function h(e,t){return(h=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function d(e){var t=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=y(e);if(t){var i=y(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return p(this,n)}}function p(e,t){return!t||"object"!==r(t)&&"function"!==typeof t?v(e):t}function v(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function y(e){return(y=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function m(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var g=function(e){!function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&h(e,t)}(s,e);var t,n,r,a=d(s);function s(){var e;l(this,s);for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return m(v(e=a.call.apply(a,[this].concat(n))),"callPlayer",o.callPlayer),m(v(e),"duration",null),m(v(e),"currentTime",null),m(v(e),"fractionLoaded",null),m(v(e),"mute",(function(){e.setVolume(0)})),m(v(e),"unmute",(function(){null!==e.props.volume&&e.setVolume(e.props.volume)})),m(v(e),"ref",(function(t){e.iframe=t})),e}return t=s,(n=[{key:"componentDidMount",value:function(){this.props.onMount&&this.props.onMount(this)}},{key:"load",value:function(e,t){var n=this;(0,o.getSDK)("https://w.soundcloud.com/player/api.js","SC").then((function(r){if(n.iframe){var i=r.Widget.Events,o=i.PLAY,a=i.PLAY_PROGRESS,s=i.PAUSE,u=i.FINISH,l=i.ERROR;t||(n.player=r.Widget(n.iframe),n.player.bind(o,n.props.onPlay),n.player.bind(s,(function(){n.duration-n.currentTime<.05||n.props.onPause()})),n.player.bind(a,(function(e){n.currentTime=e.currentPosition/1e3,n.fractionLoaded=e.loadedProgress})),n.player.bind(u,(function(){return n.props.onEnded()})),n.player.bind(l,(function(e){return n.props.onError(e)}))),n.player.load(e,c(c({},n.props.config.options),{},{callback:function(){n.player.getDuration((function(e){n.duration=e/1e3,n.props.onReady()}))}}))}}))}},{key:"play",value:function(){this.callPlayer("play")}},{key:"pause",value:function(){this.callPlayer("pause")}},{key:"stop",value:function(){}},{key:"seekTo",value:function(e){this.callPlayer("seekTo",1e3*e)}},{key:"setVolume",value:function(e){this.callPlayer("setVolume",100*e)}},{key:"getDuration",value:function(){return this.duration}},{key:"getCurrentTime",value:function(){return this.currentTime}},{key:"getSecondsLoaded",value:function(){return this.fractionLoaded*this.duration}},{key:"render",value:function(){var e={width:"100%",height:"100%",display:this.props.display};return i.default.createElement("iframe",{ref:this.ref,src:"https://w.soundcloud.com/player/?url=".concat(encodeURIComponent(this.props.url)),style:e,frameBorder:0,allow:"autoplay"})}}])&&f(t.prototype,n),r&&f(t,r),s}(i.Component);t.default=g,m(g,"displayName","SoundCloud"),m(g,"canPlay",a.canPlay.soundcloud),m(g,"loopOnEnded",!0)},function(e,t,n){"use strict";function r(e){return(r="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;
2var i=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!==r(e)&&"function"!==typeof e)return{default:e};var t=s();if(t&&t.has(e))return t.get(e);var n={},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if(Object.prototype.hasOwnProperty.call(e,o)){var a=i?Object.getOwnPropertyDescriptor(e,o):null;a&&(a.get||a.set)?Object.defineProperty(n,o,a):n[o]=e[o]}n.default=e,t&&t.set(e,n);return n}(n(4)),o=n(41),a=n(46);function s(){if("function"!==typeof WeakMap)return null;var e=new WeakMap;return s=function(){return e},e}function u(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function c(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function l(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function f(e,t){return(f=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function h(e){var t=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=v(e);if(t){var i=v(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return d(this,n)}}function d(e,t){return!t||"object"!==r(t)&&"function"!==typeof t?p(e):t}function p(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function v(e){return(v=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function y(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var m=function(e){!function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&f(e,t)}(s,e);var t,n,r,a=h(s);function s(){var e;c(this,s);for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return y(p(e=a.call.apply(a,[this].concat(n))),"callPlayer",o.callPlayer),y(p(e),"duration",null),y(p(e),"currentTime",null),y(p(e),"secondsLoaded",null),y(p(e),"mute",(function(){e.setVolume(0)})),y(p(e),"unmute",(function(){null!==e.props.volume&&e.setVolume(e.props.volume)})),y(p(e),"ref",(function(t){e.container=t})),e}return t=s,(n=[{key:"componentDidMount",value:function(){this.props.onMount&&this.props.onMount(this)}},{key:"load",value:function(e){var t=this;this.duration=null,(0,o.getSDK)("https://player.vimeo.com/api/player.js","Vimeo").then((function(n){t.container&&(t.player=new n.Player(t.container,function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?u(Object(n),!0).forEach((function(t){y(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):u(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({url:e,autoplay:t.props.playing,muted:t.props.muted,loop:t.props.loop,playsinline:t.props.playsinline,controls:t.props.controls},t.props.config.playerOptions)),t.player.ready().then((function(){var e=t.container.querySelector("iframe");e.style.width="100%",e.style.height="100%"})).catch(t.props.onError),t.player.on("loaded",(function(){t.props.onReady(),t.refreshDuration()})),t.player.on("play",(function(){t.props.onPlay(),t.refreshDuration()})),t.player.on("pause",t.props.onPause),t.player.on("seeked",(function(e){return t.props.onSeek(e.seconds)})),t.player.on("ended",t.props.onEnded),t.player.on("error",t.props.onError),t.player.on("timeupdate",(function(e){var n=e.seconds;t.currentTime=n})),t.player.on("progress",(function(e){var n=e.seconds;t.secondsLoaded=n})),t.player.on("bufferstart",t.props.onBuffer),t.player.on("bufferend",t.props.onBufferEnd))}),this.props.onError)}},{key:"refreshDuration",value:function(){var e=this;this.player.getDuration().then((function(t){e.duration=t}))}},{key:"play",value:function(){var e=this.callPlayer("play");e&&e.catch(this.props.onError)}},{key:"pause",value:function(){this.callPlayer("pause")}},{key:"stop",value:function(){this.callPlayer("unload")}},{key:"seekTo",value:function(e){this.callPlayer("setCurrentTime",e)}
2},{key:"setVolume",value:function(e){this.callPlayer("setVolume",e)}},{key:"setLoop",value:function(e){this.callPlayer("setLoop",e)}},{key:"setPlaybackRate",value:function(e){this.callPlayer("setPlaybackRate",e)}},{key:"getDuration",value:function(){return this.duration}},{key:"getCurrentTime",value:function(){return this.currentTime}},{key:"getSecondsLoaded",value:function(){return this.secondsLoaded}},{key:"render",value:function(){var e={width:"100%",height:"100%",overflow:"hidden",display:this.props.display};return i.default.createElement("div",{key:this.props.url,ref:this.ref,style:e})}}])&&l(t.prototype,n),r&&l(t,r),s}(i.Component);t.default=m,y(m,"displayName","Vimeo"),y(m,"canPlay",a.canPlay.vimeo),y(m,"forceLoad",!0)},function(e,t,n){"use strict";function r(e){return(r="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!==r(e)&&"function"!==typeof e)return{default:e};var t=s();if(t&&t.has(e))return t.get(e);var n={},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if(Object.prototype.hasOwnProperty.call(e,o)){var a=i?Object.getOwnPropertyDescriptor(e,o):null;a&&(a.get||a.set)?Object.defineProperty(n,o,a):n[o]=e[o]}n.default=e,t&&t.set(e,n);return n}(n(4)),o=n(41),a=n(46);function s(){if("function"!==typeof WeakMap)return null;var e=new WeakMap;return s=function(){return e},e}function u(){return(u=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function c(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function l(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function f(e,t){return(f=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function h(e){var t=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=v(e);if(t){var i=v(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return d(this,n)}}function d(e,t){return!t||"object"!==r(t)&&"function"!==typeof t?p(e):t}function p(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function v(e){return(v=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function y(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}
2var m="https://connect.facebook.net/en_US/sdk.js",g="fbAsyncInit",b="facebook-player-",_=function(e){!function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&f(e,t)}(s,e);var t,n,r,a=h(s);function s(){var e;c(this,s);for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return y(p(e=a.call.apply(a,[this].concat(n))),"callPlayer",o.callPlayer),y(p(e),"playerID",e.props.config.playerId||"".concat(b).concat((0,o.randomString)())),y(p(e),"mute",(function(){e.callPlayer("mute")})),y(p(e),"unmute",(function(){e.callPlayer("unmute")})),e}return t=s,(n=[{key:"componentDidMount",value:function(){this.props.onMount&&this.props.onMount(this)}},{key:"load",value:function(e,t){var n=this;t?(0,o.getSDK)(m,"FB",g).then((function(e){return e.XFBML.parse()})):(0,o.getSDK)(m,"FB",g).then((function(e){e.init({appId:n.props.config.appId,xfbml:!0,version:n.props.config.version}),e.Event.subscribe("xfbml.render",(function(e){n.props.onLoaded()})),e.Event.subscribe("xfbml.ready",(function(e){"video"===e.type&&e.id===n.playerID&&(n.player=e.instance,n.player.subscribe("startedPlaying",n.props.onPlay),n.player.subscribe("paused",n.props.onPause),n.player.subscribe("finishedPlaying",n.props.onEnded),n.player.subscribe("startedBuffering",n.props.onBuffer),n.player.subscribe("finishedBuffering",n.props.onBufferEnd),n.player.subscribe("error",n.props.onError),n.props.muted?n.callPlayer("mute"):n.callPlayer("unmute"),n.props.onReady(),document.getElementById(n.playerID).querySelector("iframe").style.visibility="visible")}))}))}},{key:"play",value:function(){this.callPlayer("play")}},{key:"pause",value:function(){this.callPlayer("pause")}},{key:"stop",value:function(){}},{key:"seekTo",value:function(e){this.callPlayer("seek",e)}},{key:"setVolume",value:function(e){this.callPlayer("setVolume",e)}},{key:"getDuration",value:function(){return this.callPlayer("getDuration")}},{key:"getCurrentTime",value:function(){return this.callPlayer("getCurrentPosition")}},{key:"getSecondsLoaded",value:function(){return null}},{key:"render",value:function(){var e=this.props.config.attributes;return i.default.createElement("div",u({style:{width:"100%",height:"100%"},id:this.playerID,className:"fb-video","data-href":this.props.url,"data-autoplay":this.props.playing?"true":"false","data-allowfullscreen":"true","data-controls":this.props.controls?"true":"false"},e))}}])&&l(t.prototype,n),r&&l(t,r),s}(i.Component);t.default=_,y(_,"displayName","Facebook"),y(_,"canPlay",a.canPlay.facebook),y(_,"loopOnEnded",!0)},function(e,t,n){"use strict";function r(e){return(r="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!==r(e)&&"function"!==typeof e)return{default:e};var t=s();if(t&&t.has(e))return t.get(e);var n={},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if(Object.prototype.hasOwnProperty.call(e,o)){var a=i?Object.getOwnPropertyDescriptor(e,o):null;a&&(a.get||a.set)?Object.defineProperty(n,o,a):n[o]=e[o]}n.default=e,t&&t.set(e,n);return n}(n(4)),o=n(41),a=n(46);function s(){if("function"!==typeof WeakMap)return null;var e=new WeakMap;return s=function(){return e},e}function u(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function c(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function l(e,t){return(l=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function f(e){var t=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=p(e);if(t){var i=p(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return h(this,n)}}function h(e,t){return!t||"object"!==r(t)&&"function"!==typeof t?d(e):t}function d(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}
2function p(e){return(p=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function v(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var y=function(e){!function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&l(e,t)}(h,e);var t,n,r,s=f(h);function h(){var e;u(this,h);for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return v(d(e=s.call.apply(s,[this].concat(n))),"callPlayer",o.callPlayer),v(d(e),"duration",null),v(d(e),"currentTime",null),v(d(e),"secondsLoaded",null),v(d(e),"mute",(function(){e.callPlayer("mute")})),v(d(e),"unmute",(function(){e.callPlayer("unmute")})),v(d(e),"ref",(function(t){e.iframe=t})),e}return t=h,(n=[{key:"componentDidMount",value:function(){this.props.onMount&&this.props.onMount(this)}},{key:"load",value:function(e){var t=this;(0,o.getSDK)("https://cdn.embed.ly/player-0.1.0.min.js","playerjs").then((function(e){t.iframe&&(t.player=new e.Player(t.iframe),t.player.setLoop(t.props.loop),t.player.on("ready",t.props.onReady),t.player.on("play",t.props.onPlay),t.player.on("pause",t.props.onPause),t.player.on("seeked",t.props.onSeek),t.player.on("ended",t.props.onEnded),t.player.on("error",t.props.onError),t.player.on("timeupdate",(function(e){var n=e.duration,r=e.seconds;t.duration=n,t.currentTime=r})),t.player.on("buffered",(function(e){var n=e.percent;t.duration&&(t.secondsLoaded=t.duration*n)})),t.props.muted&&t.player.mute())}),this.props.onError)}},{key:"play",value:function(){this.callPlayer("play")}},{key:"pause",value:function(){this.callPlayer("pause")}},{key:"stop",value:function(){}},{key:"seekTo",value:function(e){this.callPlayer("setCurrentTime",e)}},{key:"setVolume",value:function(e){this.callPlayer("setVolume",100*e)}},{key:"setLoop",value:function(e){this.callPlayer("setLoop",e)}},{key:"getDuration",value:function(){return this.duration}},{key:"getCurrentTime",value:function(){return this.currentTime}},{key:"getSecondsLoaded",value:function(){return this.secondsLoaded}},{key:"render",value:function(){var e=this.props.url.match(a.MATCH_URL_STREAMABLE)[1];return i.default.createElement("iframe",{ref:this.ref,src:"https://streamable.com/o/".concat(e),frameBorder:"0",scrolling:"no",style:{width:"100%",height:"100%"},allowFullScreen:!0})}}])&&c(t.prototype,n),r&&c(t,r),h}(i.Component);t.default=y,v(y,"displayName","Streamable"),v(y,"canPlay",a.canPlay.streamable)},function(e,t,n){"use strict";function r(e){return(r="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!==r(e)&&"function"!==typeof e)return{default:e};var t=s();if(t&&t.has(e))return t.get(e);var n={},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if(Object.prototype.hasOwnProperty.call(e,o)){var a=i?Object.getOwnPropertyDescriptor(e,o):null;a&&(a.get||a.set)?Object.defineProperty(n,o,a):n[o]=e[o]}n.default=e,t&&t.set(e,n);return n}(n(4)),o=n(41),a=n(46);function s(){if("function"!==typeof WeakMap)return null;var e=new WeakMap;return s=function(){return e},e}function u(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function c(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?u(Object(n),!0).forEach((function(t){m(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):u(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function l(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function f(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}
2function h(e,t){return(h=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function d(e){var t=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=y(e);if(t){var i=y(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return p(this,n)}}function p(e,t){return!t||"object"!==r(t)&&"function"!==typeof t?v(e):t}function v(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function y(e){return(y=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function m(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var g="wistia-player-",b=function(e){!function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&h(e,t)}(u,e);var t,n,r,s=d(u);function u(){var e;l(this,u);for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return m(v(e=s.call.apply(s,[this].concat(n))),"callPlayer",o.callPlayer),m(v(e),"playerID",e.props.config.playerId||"".concat(g).concat((0,o.randomString)())),m(v(e),"onPlay",(function(){var t;return(t=e.props).onPlay.apply(t,arguments)})),m(v(e),"onPause",(function(){var t;return(t=e.props).onPause.apply(t,arguments)})),m(v(e),"onSeek",(function(){var t;return(t=e.props).onSeek.apply(t,arguments)})),m(v(e),"onEnded",(function(){var t;return(t=e.props).onEnded.apply(t,arguments)})),m(v(e),"mute",(function(){e.callPlayer("mute")})),m(v(e),"unmute",(function(){e.callPlayer("unmute")})),e}return t=u,(n=[{key:"componentDidMount",value:function(){this.props.onMount&&this.props.onMount(this)}},{key:"load",value:function(e){var t=this,n=this.props,r=n.playing,i=n.muted,a=n.controls,s=n.onReady,u=n.config,l=n.onError;(0,o.getSDK)("https://fast.wistia.com/assets/external/E-v1.js","Wistia").then((function(e){u.customControls&&u.customControls.forEach((function(t){return e.defineControl(t)})),window._wq=window._wq||[],window._wq.push({id:t.playerID,options:c({autoPlay:r,silentAutoPlay:"allow",muted:i,controlsVisibleOnLoad:a,fullscreenButton:a,playbar:a,playbackRateControl:a,qualityControl:a,volumeControl:a,settingsControl:a,smallPlayButton:a},u.options),onReady:function(e){t.player=e,t.unbind(),t.player.bind("play",t.onPlay),t.player.bind("pause",t.onPause),t.player.bind("seek",t.onSeek),t.player.bind("end",t.onEnded),s()}})}),l)}},{key:"unbind",value:function(){this.player.unbind("play",this.onPlay),this.player.unbind("pause",this.onPause),this.player.unbind("seek",this.onSeek),this.player.unbind("end",this.onEnded)}},{key:"play",value:function(){this.callPlayer("play")}},{key:"pause",value:function(){this.callPlayer("pause")}},{key:"stop",value:function(){this.unbind(),this.callPlayer("remove")}},{key:"seekTo",value:function(e){this.callPlayer("time",e)}},{key:"setVolume",value:function(e){this.callPlayer("volume",e)}},{key:"setPlaybackRate",value:function(e){this.callPlayer("playbackRate",e)}},{key:"getDuration",value:function(){return this.callPlayer("duration")}},{key:"getCurrentTime",value:function(){return this.callPlayer("time")}},{key:"getSecondsLoaded",value:function(){return null}},{key:"render",value:function(){var e=this.props.url,t=e&&e.match(a.MATCH_URL_WISTIA)[1],n="wistia_embed wistia_async_".concat(t);return i.default.createElement("div",{id:this.playerID,key:t,className:n,style:{width:"100%",height:"100%"}})}}])&&f(t.prototype,n),r&&f(t,r),u}(i.Component);t.default=b,m(b,"displayName","Wistia"),m(b,"canPlay",a.canPlay.wistia),m(b,"loopOnEnded",!0)},function(e,t,n){"use strict";function r(e){return(r="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}
2Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!==r(e)&&"function"!==typeof e)return{default:e};var t=s();if(t&&t.has(e))return t.get(e);var n={},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if(Object.prototype.hasOwnProperty.call(e,o)){var a=i?Object.getOwnPropertyDescriptor(e,o):null;a&&(a.get||a.set)?Object.defineProperty(n,o,a):n[o]=e[o]}n.default=e,t&&t.set(e,n);return n}(n(4)),o=n(41),a=n(46);function s(){if("function"!==typeof WeakMap)return null;var e=new WeakMap;return s=function(){return e},e}function u(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function c(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function l(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function f(e,t){return(f=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function h(e){var t=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=v(e);if(t){var i=v(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return d(this,n)}}function d(e,t){return!t||"object"!==r(t)&&"function"!==typeof t?p(e):t}function p(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function v(e){return(v=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function y(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var m="twitch-player-",g=function(e){!function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&f(e,t)}(d,e);var t,n,r,s=h(d);function d(){var e;c(this,d);for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return y(p(e=s.call.apply(s,[this].concat(n))),"callPlayer",o.callPlayer),y(p(e),"playerID",e.props.config.playerId||"".concat(m).concat((0,o.randomString)())),y(p(e),"mute",(function(){e.callPlayer("setMuted",!0)})),y(p(e),"unmute",(function(){e.callPlayer("setMuted",!1)})),e}return t=d,(n=[{key:"componentDidMount",value:function(){this.props.onMount&&this.props.onMount(this)}},{key:"load",value:function(e,t){var n=this,r=this.props,i=r.playsinline,s=r.onError,c=r.config,l=r.controls,f=a.MATCH_URL_TWITCH_CHANNEL.test(e),h=f?e.match(a.MATCH_URL_TWITCH_CHANNEL)[1]:e.match(a.MATCH_URL_TWITCH_VIDEO)[1];t?f?this.player.setChannel(h):this.player.setVideo("v"+h):(0,o.getSDK)("https://player.twitch.tv/js/embed/v1.js","Twitch").then((function(t){n.player=new t.Player(n.playerID,function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?u(Object(n),!0).forEach((function(t){y(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):u(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({video:f?"":h,channel:f?h:"",height:"100%",width:"100%",playsinline:i,autoplay:n.props.playing,muted:n.props.muted,controls:!!f||l,time:(0,o.parseStartTime)(e)},c.options));var r=t.Player,a=r.READY,s=r.PLAYING,d=r.PAUSE,p=r.ENDED,v=r.ONLINE,m=r.OFFLINE;n.player.addEventListener(a,n.props.onReady),n.player.addEventListener(s,n.props.onPlay),n.player.addEventListener(d,n.props.onPause),n.player.addEventListener(p,n.props.onEnded),n.player.addEventListener(v,n.props.onLoaded),n.player.addEventListener(m,n.props.onLoaded)}),s)}},{key:"play",value:function(){this.callPlayer("play")}},{key:"pause",value:function(){this.callPlayer("pause")}},{key:"stop",value:function(){this.callPlayer("pause")}},{key:"seekTo",value:function(e){this.callPlayer("seek",e)}},{key:"setVolume",value:function(e){this.callPlayer("setVolume",e)}},{key:"getDuration",value:function(){return this.callPlayer("getDuration")}},{key:"getCurrentTime",value:function(){return this.callPlayer("getCurrentTime")}},{key:"getSecondsLoaded",value:function(){return null}},{key:"render",value:function(){return i.default.createElement("div",{style:{width:"100%",height:"100%"},id:this.playerID})}}])&&l(t.prototype,n),r&&l(t,r),d}(i.Component);t.default=g,y(g,"displayName","Twitch"),y(g,"canPlay",a.canPlay.twitch),y(g,"loopOnEnded",!0)},function(e,t,n){"use strict";function r(e){return(r="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}
2Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!==r(e)&&"function"!==typeof e)return{default:e};var t=s();if(t&&t.has(e))return t.get(e);var n={},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if(Object.prototype.hasOwnProperty.call(e,o)){var a=i?Object.getOwnPropertyDescriptor(e,o):null;a&&(a.get||a.set)?Object.defineProperty(n,o,a):n[o]=e[o]}n.default=e,t&&t.set(e,n);return n}(n(4)),o=n(41),a=n(46);function s(){if("function"!==typeof WeakMap)return null;var e=new WeakMap;return s=function(){return e},e}function u(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function c(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?u(Object(n),!0).forEach((function(t){b(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):u(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function l(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"===typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,i=!1,o=void 0;try{for(var a,s=e[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(u){i=!0,o=u}finally{try{r||null==s.return||s.return()}finally{if(i)throw o}}return n}(e,t)||function(e,t){if(!e)return;if("string"===typeof e)return f(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return f(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function f(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function h(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function d(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function p(e,t){return(p=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function v(e){var t=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=g(e);if(t){var i=g(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return y(this,n)}}function y(e,t){return!t||"object"!==r(t)&&"function"!==typeof t?m(e):t}function m(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function g(e){return(g=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function b(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var _=function(e){!function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&p(e,t)}(u,e);var t,n,r,s=v(u);function u(){var e;h(this,u);for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return b(m(e=s.call.apply(s,[this].concat(n))),"callPlayer",o.callPlayer),b(m(e),"onDurationChange",(function(){var t=e.getDuration();e.props.onDuration(t)})),b(m(e),"mute",(function(){e.callPlayer("setMuted",!0)})),b(m(e),"unmute",(function(){e.callPlayer("setMuted",!1)})),b(m(e),"ref",(function(t){e.container=t})),e}return t=u,(n=[{key:"componentDidMount",value:function(){this.props.onMount&&this.props.onMount(this)}},{key:"load",value:function(e){var t=this,n=this.props,r=n.controls,i=n.config,s=n.onError,u=n.playing,f=l(e.match(a.MATCH_URL_DAILYMOTION),2)[1];this.player?this.player.load(f,{start:(0,o.parseStartTime)(e),autoplay:u}):(0,o.getSDK)("https://api.dmcdn.net/all.js","DM","dmAsyncInit",(function(e){return e.player})).then((function(n){if(t.container){var a=n.player;t.player=new a(t.container,{width:"100%",height:"100%",video:f,params:c({controls:r,autoplay:t.props.playing,mute:t.props.muted,start:(0,o.parseStartTime)(e),origin:window.location.origin},i.params),events:{apiready:t.props.onReady,seeked:function(){return t.props.onSeek(t.player.currentTime)},video_end:t.props.onEnded,durationchange:t.onDurationChange,pause:t.props.onPause,playing:t.props.onPlay,waiting:t.props.onBuffer,error:function(e){return s(e)}}})}}),s)}},{key:"play",value:function(){this.callPlayer("play")}},{key:"pause",value:function(){this.callPlayer("pause")}},{key:"stop",value:function(){}},{key:"seekTo",value:function(e){this.callPlayer("seek",e)}},{key:"setVolume",value:function(e){this.callPlayer("setVolume",e)}},{key:"getDuration",value:function(){return this.player.duration||null}},{key:"getCurrentTime",value:function(){return this.player.currentTime}},{key:"getSecondsLoaded",value:function(){return this.player.bufferedTime}}
2,{key:"render",value:function(){var e={width:"100%",height:"100%",display:this.props.display};return i.default.createElement("div",{style:e},i.default.createElement("div",{ref:this.ref}))}}])&&d(t.prototype,n),r&&d(t,r),u}(i.Component);t.default=_,b(_,"displayName","DailyMotion"),b(_,"canPlay",a.canPlay.dailymotion),b(_,"loopOnEnded",!0)},function(e,t,n){"use strict";function r(e){return(r="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!==r(e)&&"function"!==typeof e)return{default:e};var t=s();if(t&&t.has(e))return t.get(e);var n={},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if(Object.prototype.hasOwnProperty.call(e,o)){var a=i?Object.getOwnPropertyDescriptor(e,o):null;a&&(a.get||a.set)?Object.defineProperty(n,o,a):n[o]=e[o]}n.default=e,t&&t.set(e,n);return n}(n(4)),o=n(41),a=n(46);function s(){if("function"!==typeof WeakMap)return null;var e=new WeakMap;return s=function(){return e},e}function u(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function c(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?u(Object(n),!0).forEach((function(t){m(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):u(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function l(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function f(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function h(e,t){return(h=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function d(e){var t=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=y(e);if(t){var i=y(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return p(this,n)}}function p(e,t){return!t||"object"!==r(t)&&"function"!==typeof t?v(e):t}function v(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function y(e){return(y=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function m(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var g=function(e){!function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&h(e,t)}(u,e);var t,n,r,s=d(u);function u(){var e;l(this,u);for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return m(v(e=s.call.apply(s,[this].concat(n))),"callPlayer",o.callPlayer),m(v(e),"duration",null),m(v(e),"currentTime",null),m(v(e),"secondsLoaded",null),m(v(e),"mute",(function(){})),m(v(e),"unmute",(function(){})),m(v(e),"ref",(function(t){e.iframe=t})),e}return t=u,(n=[{key:"componentDidMount",value:function(){this.props.onMount&&this.props.onMount(this)}},{key:"load",value:function(e){var t=this;(0,o.getSDK)("https://widget.mixcloud.com/media/js/widgetApi.js","Mixcloud").then((function(e){t.player=e.PlayerWidget(t.iframe),t.player.ready.then((function(){t.player.events.play.on(t.props.onPlay),t.player.events.pause.on(t.props.onPause),t.player.events.ended.on(t.props.onEnded),t.player.events.error.on(t.props.error),t.player.events.progress.on((function(e,n){t.currentTime=e,t.duration=n})),t.props.onReady()}))}),this.props.onError)}},{key:"play",value:function(){this.callPlayer("play")}},{key:"pause",value:function(){this.callPlayer("pause")}},{key:"stop",value:function(){}},{key:"seekTo",value:function(e){this.callPlayer("seek",e)}},{key:"setVolume",value:function(e){}},{key:"getDuration",value:function(){return this.duration}},{key:"getCurrentTime",value:function(){return this.currentTime}},{key:"getSecondsLoaded",value:function(){return null}},{key:"render",value:function(){var e=this.props,t=e.url,n=e.config,r=t.match(a.MATCH_URL_MIXCLOUD)[1],s=(0,o.queryString)(c(c({},n.options),{},{feed:"/".concat(r,"/")}));return i.default.createElement("iframe",{key:r,ref:this.ref,style:{width:"100%",height:"100%"},src:"https://www.mixcloud.com/widget/iframe/?".concat(s),frameBorder:"0"})}}])&&f(t.prototype,n),r&&f(t,r),u}(i.Component);t.default=g,m(g,"displayName","Mixcloud"),m(g,"canPlay",a.canPlay.mixcloud),m(g,"loopOnEnded",!0)},function(e,t,n){"use strict";function r(e){return(r="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}
2Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!==r(e)&&"function"!==typeof e)return{default:e};var t=s();if(t&&t.has(e))return t.get(e);var n={},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if(Object.prototype.hasOwnProperty.call(e,o)){var a=i?Object.getOwnPropertyDescriptor(e,o):null;a&&(a.get||a.set)?Object.defineProperty(n,o,a):n[o]=e[o]}n.default=e,t&&t.set(e,n);return n}(n(4)),o=n(41),a=n(46);function s(){if("function"!==typeof WeakMap)return null;var e=new WeakMap;return s=function(){return e},e}function u(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function c(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function l(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function f(e,t){return(f=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function h(e){var t=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=v(e);if(t){var i=v(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return d(this,n)}}function d(e,t){return!t||"object"!==r(t)&&"function"!==typeof t?p(e):t}function p(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function v(e){return(v=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function y(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var m=function(e){!function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&f(e,t)}(d,e);var t,n,r,s=h(d);function d(){var e;c(this,d);for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return y(p(e=s.call.apply(s,[this].concat(n))),"callPlayer",o.callPlayer),y(p(e),"mute",(function(){e.setVolume(0)})),y(p(e),"unmute",(function(){null!==e.props.volume&&e.setVolume(e.props.volume)})),y(p(e),"ref",(function(t){e.container=t})),e}return t=d,(n=[{key:"componentDidMount",value:function(){this.props.onMount&&this.props.onMount(this)}},{key:"load",value:function(e){var t=this,n=this.props,r=n.playing,i=n.config,s=n.onError,c=n.onDuration,l=e&&e.match(a.MATCH_URL_VIDYARD)[1];this.player&&this.stop(),(0,o.getSDK)("https://play.vidyard.com/embed/v4.js","VidyardV4","onVidyardAPI").then((function(e){t.container&&(e.api.addReadyListener((function(e,n){t.player=n,t.player.on("ready",t.props.onReady),t.player.on("play",t.props.onPlay),t.player.on("pause",t.props.onPause),t.player.on("seek",t.props.onSeek),t.player.on("playerComplete",t.props.onEnded)}),l),e.api.renderPlayer(function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?u(Object(n),!0).forEach((function(t){y(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):u(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({uuid:l,container:t.container,autoplay:r?1:0},i.options)),e.api.getPlayerMetadata(l).then((function(e){t.duration=e.length_in_seconds,c(e.length_in_seconds)})))}),s)}},{key:"play",value:function(){this.callPlayer("play")}},{key:"pause",value:function(){this.callPlayer("pause")}},{key:"stop",value:function(){window.VidyardV4.api.destroyPlayer(this.player)}},{key:"seekTo",value:function(e){this.callPlayer("seek",e)}},{key:"setVolume",value:function(e){this.callPlayer("setVolume",e)}},{key:"setPlaybackRate",value:function(e){this.callPlayer("setPlaybackSpeed",e)}},{key:"getDuration",value:function(){return this.duration}},{key:"getCurrentTime",value:function(){return this.callPlayer("currentTime")}},{key:"getSecondsLoaded",value:function(){return null}}
2,{key:"render",value:function(){var e={width:"100%",height:"100%",display:this.props.display};return i.default.createElement("div",{style:e},i.default.createElement("div",{ref:this.ref}))}}])&&l(t.prototype,n),r&&l(t,r),d}(i.Component);t.default=m,y(m,"displayName","Vidyard"),y(m,"canPlay",a.canPlay.vidyard)},function(e,t,n){"use strict";function r(e){return(r="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!==r(e)&&"function"!==typeof e)return{default:e};var t=s();if(t&&t.has(e))return t.get(e);var n={},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if(Object.prototype.hasOwnProperty.call(e,o)){var a=i?Object.getOwnPropertyDescriptor(e,o):null;a&&(a.get||a.set)?Object.defineProperty(n,o,a):n[o]=e[o]}n.default=e,t&&t.set(e,n);return n}(n(4)),o=n(41),a=n(46);function s(){if("function"!==typeof WeakMap)return null;var e=new WeakMap;return s=function(){return e},e}function u(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function c(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function l(e,t){return(l=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function f(e){var t=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=p(e);if(t){var i=p(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return h(this,n)}}function h(e,t){return!t||"object"!==r(t)&&"function"!==typeof t?d(e):t}function d(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function p(e){return(p=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function v(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var y=function(e){!function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&l(e,t)}(s,e);var t,n,r,a=f(s);function s(){var e;u(this,s);for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return v(d(e=a.call.apply(a,[this].concat(n))),"callPlayer",o.callPlayer),v(d(e),"duration",null),v(d(e),"currentTime",null),v(d(e),"secondsLoaded",null),v(d(e),"mute",(function(){e.callPlayer("mute")})),v(d(e),"unmute",(function(){e.callPlayer("unmute")})),v(d(e),"ref",(function(t){e.iframe=t})),e}return t=s,(n=[{key:"componentDidMount",value:function(){this.props.onMount&&this.props.onMount(this)}},{key:"load",value:function(e){var t=this;(0,o.getSDK)("https://cdn.embed.ly/player-0.1.0.min.js","playerjs").then((function(e){t.iframe&&(t.player=new e.Player(t.iframe),t.player.on("ready",(function(){t.player.isReady=!0,t.player.on("play",t.props.onPlay),t.player.on("pause",t.props.onPause),t.player.on("seeked",t.props.onSeek),t.player.on("ended",t.props.onEnded),t.player.on("error",t.props.onError),t.player.on("timeupdate",(function(e){var n=e.duration,r=e.seconds;t.duration=n,t.currentTime=r})),t.player.on("buffered",(function(e){var n=e.percent;t.duration&&(t.secondsLoaded=t.duration*n)})),t.player.setLoop(t.props.loop),t.props.muted&&t.player.mute(),setTimeout((function(){t.props.onReady()}))})))}),this.props.onError)}},{key:"play",value:function(){this.callPlayer("play")}},{key:"pause",value:function(){this.callPlayer("pause")}},{key:"stop",value:function(){}},{key:"seekTo",value:function(e){this.callPlayer("setCurrentTime",e)}
2},{key:"setVolume",value:function(e){this.callPlayer("setVolume",e)}},{key:"setLoop",value:function(e){this.callPlayer("setLoop",e)}},{key:"getDuration",value:function(){return this.duration}},{key:"getCurrentTime",value:function(){return this.currentTime}},{key:"getSecondsLoaded",value:function(){return this.secondsLoaded}},{key:"render",value:function(){return i.default.createElement("iframe",{ref:this.ref,src:this.props.url,frameBorder:"0",scrolling:"no",style:{width:"100%",height:"100%"},allowFullScreen:!0,allow:"encrypted-media",referrerPolicy:"no-referrer-when-downgrade"})}}])&&c(t.prototype,n),r&&c(t,r),s}(i.Component);t.default=y,v(y,"displayName","Kaltura"),v(y,"canPlay",a.canPlay.kaltura)},function(e,t,n){"use strict";function r(e){return(r="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!==r(e)&&"function"!==typeof e)return{default:e};var t=s();if(t&&t.has(e))return t.get(e);var n={},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if(Object.prototype.hasOwnProperty.call(e,o)){var a=i?Object.getOwnPropertyDescriptor(e,o):null;a&&(a.get||a.set)?Object.defineProperty(n,o,a):n[o]=e[o]}n.default=e,t&&t.set(e,n);return n}(n(4)),o=n(41),a=n(46);function s(){if("function"!==typeof WeakMap)return null;var e=new WeakMap;return s=function(){return e},e}function u(){return(u=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function c(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function l(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function f(e,t){return(f=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function h(e){var t=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=v(e);if(t){var i=v(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return d(this,n)}}function d(e,t){return!t||"object"!==r(t)&&"function"!==typeof t?p(e):t}function p(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function v(e){return(v=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function y(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var m="undefined"!==typeof navigator,g=m&&"MacIntel"===navigator.platform&&navigator.maxTouchPoints>1,b=m&&(/iPad|iPhone|iPod/.test(navigator.userAgent)||g)&&!window.MSStream,_=/www\.dropbox\.com\/.+/,w=/https:\/\/watch\.cloudflarestream\.com\/([a-z0-9]+)/,k=function(e){!function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&f(e,t)}(d,e);var t,n,r,s=h(d);function d(){var e;c(this,d);for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return y(p(e=s.call.apply(s,[this].concat(n))),"onReady",(function(){var t;return(t=e.props).onReady.apply(t,arguments)})),y(p(e),"onPlay",(function(){var t;return(t=e.props).onPlay.apply(t,arguments)})),y(p(e),"onBuffer",(function(){var t;return(t=e.props).onBuffer.apply(t,arguments)})),y(p(e),"onBufferEnd",(function(){var t;return(t=e.props).onBufferEnd.apply(t,arguments)})),y(p(e),"onPause",(function(){var t;return(t=e.props).onPause.apply(t,arguments)})),y(p(e),"onEnded",(function(){var t;return(t=e.props).onEnded.apply(t,arguments)})),y(p(e),"onError",(function(){var t;return(t=e.props).onError.apply(t,arguments)})),y(p(e),"onEnablePIP",(function(){var t;return(t=e.props).onEnablePIP.apply(t,arguments)})),y(p(e),"onDisablePIP",(function(t){var n=e.props,r=n.onDisablePIP,i=n.playing;r(t),i&&e.play()})),y(p(e),"onPresentationModeChange",(function(t){if(e.player&&(0,o.supportsWebKitPresentationMode)(e.player)){var n=e.player.webkitPresentationMode;"picture-in-picture"===n?e.onEnablePIP(t):"inline"===n&&e.onDisablePIP(t)}})),y(p(e),"onSeek",(function(t){e.props.onSeek(t.target.currentTime)})),y(p(e),"mute",(function(){e.player.muted=!0}
vendor: 6,697 bytes, line 2
2)),y(p(e),"unmute",(function(){e.player.muted=!1})),y(p(e),"renderSourceElement",(function(e,t){return"string"===typeof e?i.default.createElement("source",{key:t,src:e}):i.default.createElement("source",u({key:t},e))})),y(p(e),"renderTrack",(function(e,t){return i.default.createElement("track",u({key:t},e))})),y(p(e),"ref",(function(t){e.player&&(e.prevPlayer=e.player),e.player=t})),e}return t=d,(n=[{key:"componentDidMount",value:function(){this.props.onMount&&this.props.onMount(this),this.addListeners(this.player),b&&this.player.load()}},{key:"componentDidUpdate",value:function(e){this.shouldUseAudio(this.props)!==this.shouldUseAudio(e)&&(this.removeListeners(this.prevPlayer,e.url),this.addListeners(this.player)),this.props.url===e.url||(0,o.isMediaStream)(this.props.url)||(this.player.srcObject=null)}},{key:"componentWillUnmount",value:function(){this.removeListeners(this.player),this.hls&&this.hls.destroy()}},{key:"addListeners",value:function(e){var t=this.props,n=t.url,r=t.playsinline;e.addEventListener("play",this.onPlay),e.addEventListener("waiting",this.onBuffer),e.addEventListener("playing",this.onBufferEnd),e.addEventListener("pause",this.onPause),e.addEventListener("seeked",this.onSeek),e.addEventListener("ended",this.onEnded),e.addEventListener("error",this.onError),e.addEventListener("enterpictureinpicture",this.onEnablePIP),e.addEventListener("leavepictureinpicture",this.onDisablePIP),e.addEventListener("webkitpresentationmodechanged",this.onPresentationModeChange),this.shouldUseHLS(n)||e.addEventListener("canplay",this.onReady),r&&(e.setAttribute("playsinline",""),e.setAttribute("webkit-playsinline",""),e.setAttribute("x5-playsinline",""))}},{key:"removeListeners",value:function(e,t){e.removeEventListener("canplay",this.onReady),e.removeEventListener("play",this.onPlay),e.removeEventListener("waiting",this.onBuffer),e.removeEventListener("playing",this.onBufferEnd),e.removeEventListener("pause",this.onPause),e.removeEventListener("seeked",this.onSeek),e.removeEventListener("ended",this.onEnded),e.removeEventListener("error",this.onError),e.removeEventListener("enterpictureinpicture",this.onEnablePIP),e.removeEventListener("leavepictureinpicture",this.onDisablePIP),e.removeEventListener("webkitpresentationmodechanged",this.onPresentationModeChange),this.shouldUseHLS(t)||e.removeEventListener("canplay",this.onReady)}},{key:"shouldUseAudio",value:function(e){return!e.config.forceVideo&&!e.config.attributes.poster&&(a.AUDIO_EXTENSIONS.test(e.url)||e.config.forceAudio)}},{key:"shouldUseHLS",value:function(e){return!!this.props.config.forceHLS||!b&&(a.HLS_EXTENSIONS.test(e)||w.test(e))}},{key:"shouldUseDASH",value:function(e){return a.DASH_EXTENSIONS.test(e)||this.props.config.forceDASH}},{key:"shouldUseFLV",value:function(e){return a.FLV_EXTENSIONS.test(e)||this.props.config.forceFLV}},{key:"load",value:function(e){var t=this,n=this.props.config,r=n.hlsVersion,i=n.hlsOptions,a=n.dashVersion,s=n.flvVersion;if(this.hls&&this.hls.destroy(),this.dash&&this.dash.reset(),this.shouldUseHLS(e)&&(0,o.getSDK)("https://cdn.jsdelivr.net/npm/hls.js@VERSION/dist/hls.min.js".replace("VERSION",r),"Hls").then((function(n){if(t.hls=new n(i),t.hls.on(n.Events.MANIFEST_PARSED,(function(){t.props.onReady()})),t.hls.on(n.Events.ERROR,(function(e,r){t.props.onError(e,r,t.hls,n)})),w.test(e)){var r=e.match(w)[1];t.hls.loadSource("https://videodelivery.net/{id}/manifest/video.m3u8".replace("{id}",r))}else t.hls.loadSource(e);t.hls.attachMedia(t.player),t.props.onLoaded()})),this.shouldUseDASH(e)&&(0,o.getSDK)("https://cdnjs.cloudflare.com/ajax/libs/dashjs/VERSION/dash.all.min.js".replace("VERSION",a),"dashjs").then((function(n){t.dash=n.MediaPlayer().create(),t.dash.initialize(t.player,e,t.props.playing),t.dash.on("error",t.props.onError),parseInt(a)<3?t.dash.getDebug().setLogToBrowserConsole(!1):t.dash.updateSettings({debug:{logLevel:n.Debug.LOG_LEVEL_NONE}}),t.props.onLoaded()})),this.shouldUseFLV(e)&&(0,o.getSDK)("https://cdn.jsdelivr.net/npm/flv.js@VERSION/dist/flv.min.js".replace("VERSION",s),"flvjs").then((function(n){t.flv=n.createPlayer({type:"flv",url:e}),t.flv.attachMediaElement(t.player),t.flv.load(),t.props.onLoaded()})),e instanceof Array)this.player.load();else if((0,o.isMediaStream)(e))try{this.player.srcObject=e}catch(u){this.player.src=window.URL.createObjectURL(e)}}},{key:"play",value:function(){var e=this.player.play();e&&e.catch(this.props.onError)}},{key:"pause",value:function(){this.player.pause()}},{key:"stop",value:function(){this.player.removeAttribute("src"),this.dash&&this.dash.reset()}},{key:"seekTo",value:function(e){this.player.currentTime=e}},{key:"setVolume",value:function(e){this.player.volume=e}},{key:"enablePIP",value:function(){this.player.requestPictureInPicture&&document.pictureInPictureElement!==this.player?this.player.requestPictureInPicture():(0,o.supportsWebKitPresentationMode)(this.player)&&"picture-in-picture"!==this.player.webkitPresentationMode&&this.player.webkitSetPresentationMode("picture-in-picture")}},{key:"disablePIP",value:function(){document.exitPictureInPicture&&document.pictureInPictureElement===this.player?document.exitPictureInPicture():(0,o.supportsWebKitPresentationMode)(this.player)&&"inline"!==this.player.webkitPresentationMode&&this.player.webkitSetPresentationMode("inline")}},{key:"setPlaybackRate",value:function(e){this.player.playbackRate=e}},{key:"getDuration",value:function(){if(!this.player)return null;var e=this.player,t=e.duration,n=e.seekable;return t===1/0&&n.length>0?n.end(n.length-1):t}},{key:"getCurrentTime",value:function(){return this.player?this.player.currentTime:null}},{key:"getSecondsLoaded",value:function(){if(!this.player)return null;var e=this.player.buffered;if(0===e.length)return 0;var t=e.end(e.length-1),n=this.getDuration();return t>n?n:t}},{key:"getSource",value:function(e){var t=this.shouldUseHLS(e),n=this.shouldUseDASH(e),r=this.shouldUseFLV(e);if(!(e instanceof Array||(0,o.isMediaStream)(e)||t||n||r))return _.test(e)?e.replace("www.dropbox.com","dl.dropboxusercontent.com"):e}},{key:"render",value:function(){var e=this.props,t=e.url,n=e.playing,r=e.loop,o=e.controls,a=e.muted,s=e.config,c=e.width,l=e.height,f=this.shouldUseAudio(this.props)?"audio":"video",h={width:"auto"===c?c:"100%",height:"auto"===l?l:"100%"};return i.default.createElement(f,u({ref:this.ref,src:this.getSource(t),style:h,preload:"auto",autoPlay:n||void 0,controls:o,muted:a,loop:r},s.attributes),t instanceof Array&&t.map(this.renderSourceElement),s.tracks.map(this.renderTrack))}}])&&l(t.prototype,n),r&&l(t,r),d}(i.Component);t.default=k,y(k,"displayName","FilePlayer"),y(k,"canPlay",a.canPlay.file)},function(e,t,n){"use strict";
2(function(e){Object.defineProperty(t,"__esModule",{value:!0}),t.createReactPlayer=void 0;var r=T(n(4)),i=l(n(176)),o=l(n(337)),a=l(n(177)),s=n(178),u=n(41),c=l(n(340));function l(e){return e&&e.__esModule?e:{default:e}}function f(e){return(f="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function h(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function d(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?h(Object(n),!0).forEach((function(t){O(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):h(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function p(){return(p=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function v(e){return function(e){if(Array.isArray(e))return y(e)}(e)||function(e){if("undefined"!==typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"===typeof e)return y(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return y(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function y(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function m(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function g(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function b(e,t){return(b=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function _(e){var t=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=S(e);if(t){var i=S(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return w(this,n)}}function w(e,t){return!t||"object"!==f(t)&&"function"!==typeof t?k(e):t}function k(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function S(e){return(S=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function O(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function E(){if("function"!==typeof WeakMap)return null;var e=new WeakMap;return E=function(){return e},e}function T(e){if(e&&e.__esModule)return e;if(null===e||"object"!==f(e)&&"function"!==typeof e)return{default:e};var t=E();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if(Object.prototype.hasOwnProperty.call(e,i)){var o=r?Object.getOwnPropertyDescriptor(e,i):null;o&&(o.get||o.set)?Object.defineProperty(n,i,o):n[i]=e[i]}return n.default=e,t&&t.set(e,n),n}var C=(0,r.lazy)((function(){return Promise.resolve().then((function(){return T(n(341))}))})),P="undefined"!==typeof window&&window.document,x="undefined"!==typeof e&&e.window&&e.window.document,I=Object.keys(s.propTypes),j=P||x?r.Suspense:function(){return null},R=[];t.createReactPlayer=function(e,t){var n,l;return l=n=function(n){!function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&b(e,t)}(w,n);var l,f,h,y=_(w);function w(){var n;m(this,w);for(var a=arguments.length,l=new Array(a),f=0;f<a;f++)l[f]=arguments[f];return O(k(n=y.call.apply(y,[this].concat(l))),"state",{showPreview:!!n.props.light}),O(k(n),"references",{wrapper:function(e){n.wrapper=e},player:function(e){n.player=e}}),O(k(n),"handleClickPreview",(function(e){n.setState({showPreview:!1}),n.props.onClickPreview(e)})),O(k(n),"showPreview",(function(){n.setState({showPreview:!0})})),O(k(n),"getDuration",(function(){return n.player?n.player.getDuration():null})),O(k(n),"getCurrentTime",(function(){return n.player?n.player.getCurrentTime():null})),O(k(n),"getSecondsLoaded",(function(){return n.player?n.player.getSecondsLoaded():null})),O(k(n),"getInternalPlayer",(function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"player";return n.player?n.player.getInternalPlayer(e):null})),O(k(n),"seekTo",(function(e,t){if(!n.player)return null;n.player.seekTo(e,t)})),O(k(n),"handleReady",(function(){n.props.onReady(k(n))})),O(k(n),"getActivePlayer",(0,o.default)((function(n){for(var r=0,i=[].concat(R,v(e));r<i.length;r++){var o=i[r];
2if(o.canPlay(n))return o}return t||null}))),O(k(n),"getConfig",(0,o.default)((function(e,t){var r=n.props.config;return i.default.all([s.defaultProps.config,s.defaultProps.config[t]||{},r,r[t]||{}])}))),O(k(n),"getAttributes",(0,o.default)((function(e){return(0,u.omit)(n.props,I)}))),O(k(n),"renderActivePlayer",(function(e){if(!e)return null;var t=n.getActivePlayer(e);if(!t)return null;var i=n.getConfig(e,t.key);return r.default.createElement(c.default,p({},n.props,{key:t.key,ref:n.references.player,config:i,activePlayer:t.lazyPlayer||t,onReady:n.handleReady}))})),n}return l=w,(f=[{key:"shouldComponentUpdate",value:function(e,t){return!(0,a.default)(this.props,e)||!(0,a.default)(this.state,t)}},{key:"componentDidUpdate",value:function(e){var t=this.props.light;!e.light&&t&&this.setState({showPreview:!0}),e.light&&!t&&this.setState({showPreview:!1})}},{key:"renderPreview",value:function(e){if(!e)return null;var t=this.props,n=t.light,i=t.playIcon,o=t.previewTabIndex;return r.default.createElement(C,{url:e,light:n,playIcon:i,previewTabIndex:o,onClick:this.handleClickPreview})}},{key:"render",value:function(){var e=this.props,t=e.url,n=e.style,i=e.width,o=e.height,a=e.fallback,s=e.wrapper,u=this.state.showPreview,c=this.getAttributes(t);return r.default.createElement(s,p({ref:this.references.wrapper,style:d(d({},n),{},{width:i,height:o})},c),r.default.createElement(j,{fallback:a},u?this.renderPreview(t):this.renderActivePlayer(t)))}}])&&g(l.prototype,f),h&&g(l,h),w}(r.Component),O(n,"displayName","ReactPlayer"),O(n,"propTypes",s.propTypes),O(n,"defaultProps",s.defaultProps),O(n,"addCustomPlayer",(function(e){R.push(e)})),O(n,"removeCustomPlayers",(function(){R.length=0})),O(n,"canPlay",(function(t){for(var n=0,r=[].concat(R,v(e));n<r.length;n++){if(r[n].canPlay(t))return!0}return!1})),O(n,"canEnablePIP",(function(t){for(var n=0,r=[].concat(R,v(e));n<r.length;n++){var i=r[n];if(i.canEnablePIP&&i.canEnablePIP(t))return!0}return!1})),l}}).call(this,n(44))},function(e,t,n){"use strict";n.r(t);var r=Number.isNaN||function(e){return"number"===typeof e&&e!==e};function i(e,t){if(e.length!==t.length)return!1;for(var n=0;n<e.length;n++)if(i=e[n],o=t[n],!(i===o||r(i)&&r(o)))return!1;var i,o;return!0}t.default=function(e,t){var n;void 0===t&&(t=i);var r,o=[],a=!1;return function(){for(var i=[],s=0;s<arguments.length;s++)i[s]=arguments[s];return a&&n===this&&t(i,o)||(r=e.apply(this,i),a=!0,n=this,o=i),r}}},function(e,t,n){"use strict";var r=n(339);function i(){}function o(){}o.resetWarningCache=i,e.exports=function(){function e(e,t,n,i,o,a){if(a!==r){var s=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw s.name="Invariant Violation",s}}function t(){return e}e.isRequired=e;var n={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:o,resetWarningCache:i}
2;return n.PropTypes=n,n}},function(e,t,n){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},function(e,t,n){"use strict";function r(e){return(r="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i,o=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!==r(e)&&"function"!==typeof e)return{default:e};var t=u();if(t&&t.has(e))return t.get(e);var n={},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if(Object.prototype.hasOwnProperty.call(e,o)){var a=i?Object.getOwnPropertyDescriptor(e,o):null;a&&(a.get||a.set)?Object.defineProperty(n,o,a):n[o]=e[o]}n.default=e,t&&t.set(e,n);return n}(n(4)),a=(i=n(177))&&i.__esModule?i:{default:i},s=n(178);function u(){if("function"!==typeof WeakMap)return null;var e=new WeakMap;return u=function(){return e},e}function c(){return(c=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function l(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function f(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function h(e,t){return(h=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function d(e){var t=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=y(e);if(t){var i=y(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return p(this,n)}}function p(e,t){return!t||"object"!==r(t)&&"function"!==typeof t?v(e):t}function v(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function y(e){return(y=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function m(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var g=function(e){!function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&h(e,t)}(s,e);var t,n,r,i=d(s);function s(){var e;l(this,s);for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return m(v(e=i.call.apply(i,[this].concat(n))),"mounted",!1),m(v(e),"isReady",!1),m(v(e),"isPlaying",!1),m(v(e),"isLoading",!0),m(v(e),"loadOnReady",null),m(v(e),"startOnPlay",!0),m(v(e),"seekOnPlay",null),m(v(e),"onDurationCalled",!1),m(v(e),"handlePlayerMount",(function(t){e.player=t,e.player.load(e.props.url),e.progress()})),m(v(e),"getInternalPlayer",(function(t){return e.player?e.player[t]:null})),m(v(e),"progress",(function(){if(e.props.url&&e.player&&e.isReady){var t=e.getCurrentTime()||0,n=e.getSecondsLoaded(),r=e.getDuration();if(r){var i={playedSeconds:t,played:t/r};null!==n&&(i.loadedSeconds=n,i.loaded=n/r),i.playedSeconds===e.prevPlayed&&i.loadedSeconds===e.prevLoaded||e.props.onProgress(i),e.prevPlayed=i.playedSeconds,e.prevLoaded=i.loadedSeconds}}e.progressTimeout=setTimeout(e.progress,e.props.progressFrequency||e.props.progressInterval)})),m(v(e),"handleReady",(function(){if(e.mounted){e.isReady=!0,e.isLoading=!1;var t=e.props,n=t.onReady,r=t.playing,i=t.volume,o=t.muted;n(),o||null===i||e.player.setVolume(i),e.loadOnReady?(e.player.load(e.loadOnReady,!0),e.loadOnReady=null):r&&e.player.play(),e.handleDurationCheck()}})),m(v(e),"handlePlay",(function(){e.isPlaying=!0,e.isLoading=!1;var t=e.props,n=t.onStart,r=t.onPlay,i=t.playbackRate;e.startOnPlay&&(e.player.setPlaybackRate&&1!==i&&e.player.setPlaybackRate(i),n(),e.startOnPlay=!1),r(),e.seekOnPlay&&(e.seekTo(e.seekOnPlay),e.seekOnPlay=null),e.handleDurationCheck()})),m(v(e),"handlePause",(function(t){e.isPlaying=!1,e.isLoading||e.props.onPause(t)})),m(v(e),"handleEnded",(function(){var t=e.props,n=t.activePlayer,r=t.loop,i=t.onEnded;n.loopOnEnded&&r&&e.seekTo(0),r||(e.isPlaying=!1,i())})),m(v(e),"handleError",(function(){var t;e.isLoading=!1,(t=e.props).onError.apply(t,arguments)})),m(v(e),"handleDurationCheck",(function(){clearTimeout(e.durationCheckTimeout);var t=e.getDuration();t?e.onDurationCalled||(e.props.onDuration(t),e.onDurationCalled=!0):e.durationCheckTimeout=setTimeout(e.handleDurationCheck,100)})),m(v(e),"handleLoaded",(function(){e.isLoading=!1})),e}return t=s,(n=[{key:"componentDidMount",value:function(){this.mounted=!0}},{key:"componentWillUnmount",value:function(){clearTimeout(this.progressTimeout),clearTimeout(this.durationCheckTimeout),this.isReady&&this.props.stopOnUnmount&&(this.player.stop(),this.player.disablePIP&&this.player.disablePIP(
2)),this.mounted=!1}},{key:"componentDidUpdate",value:function(e){var t=this;if(this.player){var n=this.props,r=n.url,i=n.playing,o=n.volume,s=n.muted,u=n.playbackRate,c=n.pip,l=n.loop,f=n.activePlayer;if(!(0,a.default)(e.url,r)){if(this.isLoading&&!f.forceLoad)return console.warn("ReactPlayer: the attempt to load ".concat(r," is being deferred until the player has loaded")),void(this.loadOnReady=r);this.isLoading=!0,this.startOnPlay=!0,this.onDurationCalled=!1,this.player.load(r,this.isReady)}e.playing||!i||this.isPlaying||this.player.play(),e.playing&&!i&&this.isPlaying&&this.player.pause(),!e.pip&&c&&this.player.enablePIP&&this.player.enablePIP(),e.pip&&!c&&this.player.disablePIP&&this.player.disablePIP(),e.volume!==o&&null!==o&&this.player.setVolume(o),e.muted!==s&&(s?this.player.mute():(this.player.unmute(),null!==o&&setTimeout((function(){return t.player.setVolume(o)})))),e.playbackRate!==u&&this.player.setPlaybackRate&&this.player.setPlaybackRate(u),e.loop!==l&&this.player.setLoop&&this.player.setLoop(l)}}},{key:"getDuration",value:function(){return this.isReady?this.player.getDuration():null}},{key:"getCurrentTime",value:function(){return this.isReady?this.player.getCurrentTime():null}},{key:"getSecondsLoaded",value:function(){return this.isReady?this.player.getSecondsLoaded():null}},{key:"seekTo",value:function(e,t){var n=this;if(!this.isReady&&0!==e)return this.seekOnPlay=e,void setTimeout((function(){n.seekOnPlay=null}),5e3);if(t?"fraction"===t:e>0&&e<1){var r=this.player.getDuration();return r?void this.player.seekTo(r*e):void console.warn("ReactPlayer: could not seek using fraction \u2013\xa0duration not yet available")}this.player.seekTo(e)}},{key:"render",value:function(){var e=this.props.activePlayer;return e?o.default.createElement(e,c({},this.props,{onMount:this.handlePlayerMount,onReady:this.handleReady,onPlay:this.handlePlay,onPause:this.handlePause,onEnded:this.handleEnded,onLoaded:this.handleLoaded,onError:this.handleError})):null}}])&&f(t.prototype,n),r&&f(t,r),s}(o.Component);t.default=g,m(g,"displayName","Player"),m(g,"propTypes",s.propTypes),m(g,"defaultProps",s.defaultProps)},function(e,t,n){"use strict";function r(e){return(r="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!==r(e)&&"function"!==typeof e)return{default:e};var t=o();if(t&&t.has(e))return t.get(e);var n={},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var s=i?Object.getOwnPropertyDescriptor(e,a):null;s&&(s.get||s.set)?Object.defineProperty(n,a,s):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(4));function o(){if("function"!==typeof WeakMap)return null;var e=new WeakMap;return o=function(){return e},e}function a(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function s(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?a(Object(n),!0).forEach((function(t){v(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):a(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function u(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function c(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function l(e,t){return(l=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function f(e){var t=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=p(e);if(t){var i=p(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return h(this,n)}}function h(e,t){return!t||"object"!==r(t)&&"function"!==typeof t?d(e):t}function d(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}
2function p(e){return(p=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function v(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var y="64px",m={},g=function(e){!function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&l(e,t)}(a,e);var t,n,r,o=f(a);function a(){var e;u(this,a);for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return v(d(e=o.call.apply(o,[this].concat(n))),"mounted",!1),v(d(e),"state",{image:null}),v(d(e),"handleKeyPress",(function(t){"Enter"!==t.key&&" "!==t.key||e.props.onClick()})),e}return t=a,(n=[{key:"componentDidMount",value:function(){this.mounted=!0,this.fetchImage(this.props)}},{key:"componentDidUpdate",value:function(e){var t=this.props,n=t.url,r=t.light;e.url===n&&e.light===r||this.fetchImage(this.props)}},{key:"componentWillUnmount",value:function(){this.mounted=!1}},{key:"fetchImage",value:function(e){var t=this,n=e.url,r=e.light;if("string"!==typeof r){if(!m[n])return this.setState({image:null}),window.fetch("https://noembed.com/embed?url=".concat(n)).then((function(e){return e.json()})).then((function(e){if(e.thumbnail_url&&t.mounted){var r=e.thumbnail_url.replace("height=100","height=480");t.setState({image:r}),m[n]=r}}));this.setState({image:m[n]})}else this.setState({image:r})}},{key:"render",value:function(){var e=this.props,t=e.onClick,n=e.playIcon,r=e.previewTabIndex,o=this.state.image,a={display:"flex",alignItems:"center",justifyContent:"center"},u={preview:s({width:"100%",height:"100%",backgroundImage:o?"url(".concat(o,")"):void 0,backgroundSize:"cover",backgroundPosition:"center",cursor:"pointer"},a),shadow:s({background:"radial-gradient(rgb(0, 0, 0, 0.3), rgba(0, 0, 0, 0) 60%)",borderRadius:y,width:y,height:y},a),playIcon:{borderStyle:"solid",borderWidth:"16px 0 16px 26px",borderColor:"transparent transparent transparent white",marginLeft:"7px"}},c=i.default.createElement("div",{style:u.shadow,className:"react-player__shadow"},i.default.createElement("div",{style:u.playIcon,className:"react-player__play-icon"}));return i.default.createElement("div",{style:u.preview,className:"react-player__preview",onClick:t,tabIndex:r,onKeyPress:this.handleKeyPress},n||c)}}])&&c(t.prototype,n),r&&c(t,r),a}(i.Component);t.default=g},,function(e,t,n){"use strict";var r=n(47),i=n(181),o=n(344),a=n(187);function s(e){var t=new o(e),n=i(o.prototype.request,t);return r.extend(n,o.prototype,t),r.extend(n,t),n}var u=s(n(184));u.Axios=o,u.create=function(e){return s(a(u.defaults,e))},u.Cancel=n(188),u.CancelToken=n(357),u.isCancel=n(183),u.all=function(e){return Promise.all(e)},u.spread=n(358),e.exports=u,e.exports.default=u},function(e,t,n){"use strict";var r=n(47),i=n(182),o=n(345),a=n(346),s=n(187);function u(e){this.defaults=e,this.interceptors={request:new o,response:new o}}u.prototype.request=function(e){"string"===typeof e?(e=arguments[1]||{}).url=arguments[0]:e=e||{},(e=s(this.defaults,e)).method?e.method=e.method.toLowerCase():this.defaults.method?e.method=this.defaults.method.toLowerCase():e.method="get";var t=[a,void 0],n=Promise.resolve(e);for(this.interceptors.request.forEach((function(e){t.unshift(e.fulfilled,e.rejected)})),this.interceptors.response.forEach((function(e){t.push(e.fulfilled,e.rejected)}));t.length;)n=n.then(t.shift(),t.shift());return n},u.prototype.getUri=function(e){return e=s(this.defaults,e),i(e.url,e.params,e.paramsSerializer).replace(/^\?/,"")},r.forEach(["delete","get","head","options"],(function(e){u.prototype[e]=function(t,n){return this.request(s(n||{},{method:e,url:t,data:(n||{}).data}))}})),r.forEach(["post","put","patch"],(function(e){u.prototype[e]=function(t,n,r){return this.request(s(r||{},{method:e,url:t,data:n}))}})),e.exports=u},function(e,t,n){"use strict";var r=n(47);function i(){this.handlers=[]}i.prototype.use=function(e,t){return this.handlers.push({fulfilled:e,rejected:t}),this.handlers.length-1},i.prototype.eject=function(e){this.handlers[e]&&(this.handlers[e]=null)},i.prototype.forEach=function(e){r.forEach(this.handlers,(function(t){null!==t&&e(t)}))},e.exports=i},function(e,t,n){"use strict";var r=n(47),i=n(347),o=n(183),a=n(184);function s(e){e.cancelToken&&e.cancelToken.throwIfRequested()}e.exports=function(e){return s(e),e.headers=e.headers||{},e.data=i(e.data,e.headers,e.transformRequest),e.headers=r.merge(e.headers.common||{},e.headers[e.method]||{},e.headers),r.forEach(["delete","get","head","post","put","patch","common"],(function(t){delete e.headers[t]})),(e.adapter||a.adapter)(e).then((function(t){return s(e),t.data=i(t.data,t.headers,e.transformResponse),t}),(function(t){return o(t)||(s(e),t&&t.response&&(t.response.data=i(t.response.data,t.response.headers,e.transformResponse))),Promise.reject(t)}))}},function(e,t,n){"use strict";var r=n(47);e.exports=function(e,t,n){return r.forEach(n,(function(n){e=n(e,t)})),e}},function(e,t,n){"use strict";var r=n(47);e.exports=function(e,t){r.forEach(e,(function(n,r){r!==t&&r.toUpperCase()===t.toUpperCase()&&(e[t]=n,delete e[r])}))}},function(e,t,n){"use strict";var r=n(186);e.exports=function(e,t,n){var i=n.config.validateStatus;
2n.status&&i&&!i(n.status)?t(r("Request failed with status code "+n.status,n.config,null,n.request,n)):e(n)}},function(e,t,n){"use strict";e.exports=function(e,t,n,r,i){return e.config=t,n&&(e.code=n),e.request=r,e.response=i,e.isAxiosError=!0,e.toJSON=function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:this.config,code:this.code}},e}},function(e,t,n){"use strict";var r=n(47);e.exports=r.isStandardBrowserEnv()?{write:function(e,t,n,i,o,a){var s=[];s.push(e+"="+encodeURIComponent(t)),r.isNumber(n)&&s.push("expires="+new Date(n).toGMTString()),r.isString(i)&&s.push("path="+i),r.isString(o)&&s.push("domain="+o),!0===a&&s.push("secure"),document.cookie=s.join("; ")},read:function(e){var t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove:function(e){this.write(e,"",Date.now()-864e5)}}:{write:function(){},read:function(){return null},remove:function(){}}},function(e,t,n){"use strict";var r=n(353),i=n(354);e.exports=function(e,t){return e&&!r(t)?i(e,t):t}},function(e,t,n){"use strict";e.exports=function(e){return/^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(e)}},function(e,t,n){"use strict";e.exports=function(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e}},function(e,t,n){"use strict";var r=n(47),i=["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"];e.exports=function(e){var t,n,o,a={};return e?(r.forEach(e.split("\n"),(function(e){if(o=e.indexOf(":"),t=r.trim(e.substr(0,o)).toLowerCase(),n=r.trim(e.substr(o+1)),t){if(a[t]&&i.indexOf(t)>=0)return;a[t]="set-cookie"===t?(a[t]?a[t]:[]).concat([n]):a[t]?a[t]+", "+n:n}})),a):a}},function(e,t,n){"use strict";var r=n(47);e.exports=r.isStandardBrowserEnv()?function(){var e,t=/(msie|trident)/i.test(navigator.userAgent),n=document.createElement("a");function i(e){var r=e;return t&&(n.setAttribute("href",r),r=n.href),n.setAttribute("href",r),{href:n.href,protocol:n.protocol?n.protocol.replace(/:$/,""):"",host:n.host,search:n.search?n.search.replace(/^\?/,""):"",hash:n.hash?n.hash.replace(/^#/,""):"",hostname:n.hostname,port:n.port,pathname:"/"===n.pathname.charAt(0)?n.pathname:"/"+n.pathname}}return e=i(window.location.href),function(t){var n=r.isString(t)?i(t):t;return n.protocol===e.protocol&&n.host===e.host}}():function(){return!0}},function(e,t,n){"use strict";var r=n(188);function i(e){if("function"!==typeof e)throw new TypeError("executor must be a function.");var t;this.promise=new Promise((function(e){t=e}));var n=this;e((function(e){n.reason||(n.reason=new r(e),t(n.reason))}))}i.prototype.throwIfRequested=function(){if(this.reason)throw this.reason},i.source=function(){var e;return{token:new i((function(t){e=t})),cancel:e}},e.exports=i},function(e,t,n){"use strict";e.exports=function(e){return function(t){return e.apply(null,t)}}},function(e,t,n){},function(e,t,n){"use strict";var r=n(48).inherits,i=n(363);function o(e,t){var n=new i(e,t);return Object.setPrototypeOf(n,o.prototype),n}r(o,i),e.exports=o},function(e,t){e.exports=function(e){return e&&"object"===typeof e&&"function"===typeof e.copy&&"function"===typeof e.fill&&"function"===typeof e.readUInt8}},function(e,t){"function"===typeof Object.create?e.exports=function(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}:e.exports=function(e,t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}},function(e,t,n){"use strict";var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),i=function e(t,n,r){null===t&&(t=Function.prototype);var i=Object.getOwnPropertyDescriptor(t,n);if(void 0===i){var o=Object.getPrototypeOf(t);return null===o?void 0:e(o,n,r)}if("value"in i)return i.value;var a=i.get;return void 0!==a?a.call(r):void 0};var o=n(189),a=function(e){function t(e,n){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,n))}return function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),r(t,[{key:"toString",value:function(){return"[LocalAudioTrack #"+this._instanceId+": "+this.id+"]"}},{key:"attach",value:function(e){return(e=i(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"attach",this).call(this,e)).muted=!0,e}},{key:"_end",value:function(){return i(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"_end",this).apply(this,arguments)}},{key:"disable",value:function(){return i(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"disable",this).apply(this,arguments)}},{key:"enable",value:function(){return i(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"enable",this).apply(this,arguments)}},{key:"restart",value:function(){return i(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"restart",this).apply(this,arguments)}},{key:"stop",value:function(){return i(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"stop",this).apply(this,arguments)}}]),t}(n(196)(o));e.exports=a},function(e,t,n){"use strict";var r=n(26).flatMap,i=n(26).guessBrowser,o=n(26).guessBrowserVersion,a=n(87).getSdpFormat,s=i(),u=o(),c="chrome"===s,l="firefox"===s,f="safari"===s,h=c?u.major:null;function d(e){var t=Array.from(e.values()).find((function(e){return"candidate-pair"===e.type&&e.nominated}));if(!t)return null;var n=e.get(t.localCandidateId),r=e.get(t.remoteCandidateId),i=[{key:"candidateType",type:"string"},{key:"ip",type:"string"},{key:"port",type:"number"},{key:"priority",type:"number"},{key:"protocol",type:"string"},{key:"url",type:"string"}],o=i.concat([{key:"deleted",type:"boolean"},{key:"relayProtocol",type:"string"}]),a=n?o.reduce((function(e,t){return e[t.key]=typeof n[t.key]===t.type?n[t.key]:"deleted"!==t.key&&null,e}),{}):null,s=r?i.reduce((function(e,t){return e[t.key]=typeof r[t.key]===t.type?r[t.key]:null,e}),{}):null;return[{key:"availableIncomingBitrate",type:"number"},{key:"availableOutgoingBitrate",type:"number"},{key:"bytesReceived",type:"number"},{key:"bytesSent",type:"number"},{key:"consentRequestsSent",type:"number"},{key:"currentRoundTripTime",type:"number"},{key:"lastPacketReceivedTimestamp",type:"number"},{key:"lastPacketSentTimestamp",type:"number"},{key:"nominated",type:"boolean"},{key:"priority",type:"number"},{key:"readable",type:"boolean"},{key:"requestsReceived",type:"number"},{key:"requestsSent",type:"number"},{key:"responsesReceived",type:"number"},{key:"responsesSent",type:"number"},{key:"retransmissionsReceived",type:"number"},{key:"retransmissionsSent",type:"number"},{key:"state",type:"string",fixup:function(e){return"inprogress"===e?"in-
2progress":e}},{key:"totalRoundTripTime",type:"number"},{key:"transportId",type:"string"},{key:"writable",type:"boolean"}].reduce((function(e,n){return e[n.key]=typeof t[n.key]===n.type?n.fixup?n.fixup(t[n.key]):t[n.key]:null,e}),{localCandidate:a,remoteCandidate:s})}function p(e){var t=Array.from(e.values()).find((function(e){return"candidate-pair"===e.type&&e.nominated}));if(!t)return null;var n=e.get(t.localCandidateId),r=e.get(t.remoteCandidateId),i=[{key:"candidateType",type:"string"},{key:"ip",ffKeys:["address","ipAddress"],type:"string"},{key:"port",ffKeys:["portNumber"],type:"number"},{key:"priority",type:"number"},{key:"protocol",ffKeys:["transport"],type:"string"},{key:"url",type:"string"}],o=i.concat([{key:"deleted",type:"boolean"},{key:"relayProtocol",type:"string"}]),a={host:"host",peerreflexive:"prflx",relayed:"relay",serverreflexive:"srflx"},s=n?o.reduce((function(e,t){var r=t.ffKeys&&t.ffKeys.find((function(e){return e in n}))||t.key;return e[t.key]=typeof n[r]===t.type?"candidateType"===r&&a[n[r]]||n[r]:"deleted"!==r&&null,e}),{}):null,u=r?i.reduce((function(e,t){var n=t.ffKeys&&t.ffKeys.find((function(e){return e in r}))||t.key;return e[t.key]=typeof r[n]===t.type?"candidateType"===n&&a[r[n]]||r[n]:null,e}),{}):null;return[{key:"availableIncomingBitrate",type:"number"},{key:"availableOutgoingBitrate",type:"number"},{key:"bytesReceived",type:"number"},{key:"bytesSent",type:"number"},{key:"consentRequestsSent",type:"number"},{key:"currentRoundTripTime",type:"number"},{key:"lastPacketReceivedTimestamp",type:"number"},{key:"lastPacketSentTimestamp",type:"number"},{key:"nominated",type:"boolean"},{key:"priority",type:"number"},{key:"readable",type:"boolean"},{key:"requestsReceived",type:"number"},{key:"requestsSent",type:"number"},{key:"responsesReceived",type:"number"},{key:"responsesSent",type:"number"},{key:"retransmissionsReceived",type:"number"},{key:"retransmissionsSent",type:"number"},{key:"state",type:"string"},{key:"totalRoundTripTime",type:"number"},{key:"transportId",type:"string"},{key:"writable",type:"boolean"}].reduce((function(e,n){return e[n.key]=typeof t[n.key]===n.type?t[n.key]:null,e}),{localCandidate:s,remoteCandidate:u})}function v(e,t,n){var i="local"===n?"getSenders":"getReceivers";return e[i]?e[i]().map((function(e){return e.track})).filter((function(e){return e&&e.kind===t})):r(e["local"===n?"getLocalStreams":"getRemoteStreams"](),(function(e){return e["audio"===t?"getAudioTracks":"getVideoTracks"]()}))}function y(e,t){return new Promise((function(n,r){h&&h<67?e.getStats((function(e){n([m(e,t)])}),null,r):e.getStats(t).then((function(e){n(function(e){var t=null,n=[],r=null,i=null,o=null,a=null;
2e.forEach((function(e){switch(e.type){case"inbound-rtp":t=e;break;case"outbound-rtp":n.push(e);break;case"track":o=e;break;case"codec":a=e;break;case"remote-inbound-rtp":r=e;break;case"remote-outbound-rtp":i=e}}));var s=o&&o.remoteSource,u=[],c=s?i:r;return(s?[t]:n).forEach((function(e){var t={},n=[e,o,a,c&&c.ssrc===e.ssrc?c:null];function r(e){var t=n.find((function(t){return t&&"undefined"!==typeof t[e]}))||null;return t?t[e]:null}var i=r("ssrc");"number"===typeof i&&(t.ssrc=String(i));var l=r("timestamp");t.timestamp=Math.round(l);var f=r("mimeType");"string"===typeof f&&(f=f.split("/"),t.codecName=f[f.length-1]);var h=r("roundTripTime");"number"===typeof h&&(t.roundTripTime=Math.round(1e3*h));var d=r("jitter");"number"===typeof d&&(t.jitter=Math.round(1e3*d));var p=r("frameWidth");"number"===typeof p&&(s?t.frameWidthReceived=p:t.frameWidthSent=p);var v=r("frameHeight");"number"===typeof v&&(s?t.frameHeightReceived=v:t.frameHeightSent=v);var y=r("framesPerSecond");"number"===typeof y&&(t.frameRateSent=y);var m=r("bytesReceived");"number"===typeof m&&(t.bytesReceived=m);var g=r("bytesSent");"number"===typeof g&&(t.bytesSent=g);var b=r("packetsLost");"number"===typeof b&&(t.packetsLost=b);var _=r("packetsReceived");"number"===typeof _&&(t.packetsReceived=_);var w=r("packetsSent");"number"===typeof w&&(t.packetsSent=w);var k=r("audioLevel");"number"===typeof k&&(k=Math.round(32767*k),s?t.audioOutputLevel=k:t.audioInputLevel=k),u.push(t)})),u}(e))}),r)}))}function m(e,t){var n=e.result().find((function(e){return"ssrc"===e.type&&e.stat("googTrackId")===t.id})),r={};return n&&(r.timestamp=Math.round(Number(n.timestamp)),r=n.names().reduce((function(e,t){switch(t){case"googCodecName":e.codecName=n.stat(t);break;case"googRtt":e.roundTripTime=Number(n.stat(t));break;case"googJitterReceived":e.jitter=Number(n.stat(t));break;case"googFrameWidthInput":e.frameWidthInput=Number(n.stat(t));break;case"googFrameHeightInput":e.frameHeightInput=Number(n.stat(t));break;case"googFrameWidthSent":e.frameWidthSent=Number(n.stat(t));break;case"googFrameHeightSent":e.frameHeightSent=Number(n.stat(t));break;case"googFrameWidthReceived":e.frameWidthReceived=Number(n.stat(t));break;case"googFrameHeightReceived":e.frameHeightReceived=Number(n.stat(t));break;case"googFrameRateInput":e.frameRateInput=Number(n.stat(t));break;case"googFrameRateSent":e.frameRateSent=Number(n.stat(t));break;case"googFrameRateReceived":e.frameRateReceived=Number(n.stat(t));break;case"ssrc":e[t]=n.stat(t);break;case"bytesReceived":case"bytesSent":case"packetsLost":case"packetsReceived":case"packetsSent":case"audioInputLevel":case"audioOutputLevel":e[t]=Number(n.stat(t))}return e}),r)),r}function g(e,t){e=e||new Map;var n=null,r=null;
2e.forEach((function(t){if(!t.isRemote)switch(t.type){case"inbound-rtp":n=t,r=e.get(t.remoteId);break;case"outbound-rtp":r=t,n=e.get(t.remoteId)}}));var i=t?n:r,o=t?r:n;function a(e){return i&&"undefined"!==typeof i[e]?i[e]:o&&"undefined"!==typeof o[e]?o[e]:null}var s={},u=a("timestamp");s.timestamp=Math.round(u);var c=a("ssrc");"number"===typeof c&&(s.ssrc=String(c));var l=a("bytesSent");"number"===typeof l&&(s.bytesSent=l);var f=a("packetsLost");"number"===typeof f&&(s.packetsLost=f);var h=a("packetsSent");"number"===typeof h&&(s.packetsSent=h);var d=a("roundTripTime");"number"===typeof d&&(s.roundTripTime=Math.round(1e3*d));var p=a("jitter");"number"===typeof p&&(s.jitter=Math.round(1e3*p));var v=a("framerateMean");"number"===typeof v&&(s.frameRateSent=Math.round(v));var y=a("bytesReceived");"number"===typeof y&&(s.bytesReceived=y);var m=a("packetsReceived");"number"===typeof m&&(s.packetsReceived=m);var g=a("framerateMean");return"number"===typeof g&&(s.frameRateReceived=Math.round(g)),s}e.exports=function(e,t){return e&&"function"===typeof e.getStats?function(e,t){var n=v(e,"audio","local"),i=v(e,"video","local"),o=v(e,"audio"),s=v(e,"video"),u={activeIceCandidatePair:null,localAudioTrackStats:[],localVideoTrackStats:[],remoteAudioTrackStats:[],remoteVideoTrackStats:[]},h=r([[n,"localAudioTrackStats",!1],[i,"localVideoTrackStats",!1],[o,"remoteAudioTrackStats",!0],[s,"remoteVideoTrackStats",!0]],(function(n){var r=n[0],i=n[1],o=n[2];return r.map((function(n){return function(e,t,n){if("undefined"!==typeof(n=n||{}).testForChrome||c)return y(e,t);if("undefined"!==typeof n.testForFirefox||l)return function(e,t,n){return new Promise((function(r,i){e.getStats(t).then((function(e){r([g(e,n)])}),i)}))}(e,t,n.isRemote);if("undefined"!==typeof n.testForSafari||f)return"undefined"!==typeof n.testForSafari||"unified"===a()?y(e,t):Promise.reject(new Error(["getStats() is not supported on this version of Safari","due to this bug: https://bugs.webkit.org/show_bug.cgi?id=192601"].join(" ")));return Promise.reject(new Error("RTCPeerConnection#getStats() not supported"))}(e,n,Object.assign({isRemote:o},t)).then((function(e){e.forEach((function(e){e.trackId=n.id,u[i].push(e)}))}))}))}));return Promise.all(h).then((function(){return function(e,t){if("undefined"!==typeof(t=t||{}).testForChrome||c||"undefined"!==typeof t.testForSafari||f)return e.getStats().then(d);if("undefined"!==typeof t.testForFirefox||l)return e.getStats().then(p);return Promise.reject(new Error("RTCPeerConnection#getStats() not supported"))}(e,t)})).then((function(e){return u.activeIceCandidatePair=e,u}))}(e,t):Promise.reject(new Error("Given PeerConnection does not support getStats"))}},function(e,t,n){"use strict";e.exports=function(e){return"object"===typeof navigator&&"object"===typeof navigator.mediaDevices&&"function"===typeof navigator.mediaDevices.getUserMedia?(e=e||{audio:!0,video:!0},navigator.mediaDevices.getUserMedia(e)):Promise.reject(new Error("getUserMedia is not supported"))}},function(e,t,n){"use strict";"function"===typeof MediaStreamTrack?e.exports=MediaStreamTrack:e.exports=function(){throw new Error("MediaStreamTrack is not supported")}},function(e,t,n){"use strict";"function"===typeof RTCIceCandidate?e.exports=RTCIceCandidate:e.exports=function(){throw new Error("RTCIceCandidate is not supported")}},function(e,t,n){"use strict";if("function"===typeof RTCPeerConnection)switch((0,n(26).guessBrowser)()){case"chrome":e.exports=n(369);break;case"firefox":e.exports=n(371);break;case"safari":e.exports=n(372);break;default:e.exports=RTCPeerConnection}else e.exports=function(){throw new Error("RTCPeerConnection is not supported")}},function(e,t,n){"use strict";var r=n(192),i=n(131),o=n(48).inherits,a=n(193),s=n(191),u=n(370),c=n(87),l=n(26);function f(e,t){if(!(this instanceof f))return new f(e,t);i.call(this),e=e||{};var n=Object.assign(e.iceTransportPolicy?{iceTransports:e.iceTransportPolicy}:{},e);l.interceptEvent(this,"datachannel"),l.interceptEvent(this,"signalingstatechange");var r=c.getSdpFormat(n.sdpSemantics),o=new RTCPeerConnection(n,t);Object.defineProperties(this,{_appliedTracksToSSRCs:{value:new Map,writable:!0}
2,_localStream:{value:new s},_peerConnection:{value:o},_pendingLocalOffer:{value:null,writable:!0},_pendingRemoteOffer:{value:null,writable:!0},_rolledBackTracksToSSRCs:{value:new Map,writable:!0},_sdpFormat:{value:r},_senders:{value:new Map},_signalingStateLatch:{value:new a},_tracksToSSRCs:{value:new Map,writable:!0},localDescription:{enumerable:!0,get:function(){return this._pendingLocalOffer?this._pendingLocalOffer:o.localDescription}},remoteDescription:{enumerable:!0,get:function(){return this._pendingRemoteOffer?this._pendingRemoteOffer:o.remoteDescription}},signalingState:{enumerable:!0,get:function(){return this._pendingLocalOffer?"have-local-offer":this._pendingRemoteOffer?"have-remote-offer":o.signalingState}}});var u=this;o.addEventListener("datachannel",(function(e){v(e.channel),u.dispatchEvent(e)})),o.addEventListener("signalingstatechange",(function(){"stable"===o.signalingState&&(u._appliedTracksToSSRCs=new Map(u._tracksToSSRCs)),u._pendingLocalOffer||u._pendingRemoteOffer||u.dispatchEvent.apply(u,arguments)})),o.ontrack=function(){},"function"!==typeof RTCPeerConnection.prototype.addTrack&&o.addStream(this._localStream),l.proxyProperties(RTCPeerConnection.prototype,this,o)}function h(e,t,n){var r,i,o=t?e._pendingLocalOffer:e._pendingRemoteOffer,a=t?e._pendingRemoteOffer:e._pendingLocalOffer,s=t?"have-local-offer":"have-remote-offer",u=t?"setLocalDescription":"setRemoteDescription";if(!t&&a&&"answer"===n.type)r=function(e,t){var n=e._pendingLocalOffer;return e._peerConnection.setLocalDescription(n).then((function(){return e._pendingLocalOffer=null,e.setRemoteDescription(t)})).then((function(){e._signalingStateLatch.lower()}))}(e,n);else if("offer"===n.type){if(e.signalingState!==s&&"stable"!==e.signalingState)return Promise.reject(new Error("Cannot set "+(t?"local":"remote")+" offer in state "+e.signalingState));o||"low"!==e._signalingStateLatch.state||e._signalingStateLatch.raise();var c=e.signalingState;i=d(n),t?e._pendingLocalOffer=i:e._pendingRemoteOffer=i,r=Promise.resolve(),e.signalingState!==c&&r.then((function(){e.dispatchEvent(new Event("signalingstatechange"))}))}else"rollback"===n.type&&(e.signalingState!==s?r=Promise.reject(new Error("Cannot rollback "+(t?"local":"remote")+" description in "+e.signalingState)):(t?e._pendingLocalOffer=null:e._pendingRemoteOffer=null,e._rolledBackTracksToSSRCs=new Map(e._tracksToSSRCs),e._tracksToSSRCs=new Map(e._appliedTracksToSSRCs),(r=Promise.resolve()).then((function(){e.dispatchEvent(new Event("signalingstatechange"))}))));return r||e._peerConnection[u](d(n))}function d(e){return e instanceof r&&e._description?e._description:new RTCSessionDescription(e)}function p(){return"maxRetransmitTime"in RTCDataChannel.prototype&&!("maxPacketLifeTime"in RTCDataChannel.prototype)}function v(e){return Object.defineProperty(e,"maxRetransmits",{value:65535===e.maxRetransmits?null:e.maxRetransmits}),p()&&Object.defineProperty(e,"maxPacketLifeTime",{value:65535===e.maxRetransmitTime?null:e.maxRetransmitTime}),e}function y(e,t,n){return"unified"===e?c.updateUnifiedPlanTrackIdsToSSRCs(t,n):c.updatePlanBTrackIdsToSSRCs(t,n)}o(f,i),"function"!==typeof RTCPeerConnection.prototype.addTrack?(f.prototype.addTrack=function(){var e=[].slice.call(arguments),t=e[0];if("closed"===this._peerConnection.signalingState)throw new Error("Cannot add MediaStreamTrack ["+t.id+", "+t.kind+"]: RTCPeerConnection is closed");var n=this._senders.get(t);if(n&&n.track)throw new Error("Cannot add MediaStreamTrack ["+t.id+", "+t.kind+"]: RTCPeerConnection already has it");return this._peerConnection.removeStream(this._localStream),this._localStream.addTrack(t),this._peerConnection.addStream(this._localStream),n=new u(t),this._senders.set(t,n),n},f.prototype.removeTrack=function(e){if("closed"===this._peerConnection.signalingState)throw new Error("Cannot remove MediaStreamTrack: RTCPeerConnection is closed");var t=e.track;t&&(e=this._senders.get(t))&&e.track&&(e.track=null,this._peerConnection.removeStream(this._localStream),this._localStream.removeTrack(t),this._peerConnection.addStream(this._localStream))},f.prototype.getSenders=function(){return Array.from(this._senders.values())}):f.prototype.removeTrack=function(e){if("closed"===this._peerConnection.signalingState)throw new Error("Cannot remove MediaStreamTrack: RTCPeerConnection is closed");try{this._peerConnection.removeTrack(e)}catch(t){}},f.prototype.addIceCandidate=function(e){var t,n=[].slice.call(arguments),r=this;return t="have-remote-offer"===this.signalingState?this._signalingStateLatch.when("low").then((function(){return r._peerConnection.addIceCandidate(e)})):this._peerConnection.addIceCandidate(e),n.length>1?l.legacyPromise(t,n[1],n[2]):t},f.prototype.close=function(){"closed"!==this.signalingState&&(this._pe
2ndingLocalOffer=null,this._pendingRemoteOffer=null,this._peerConnection.close())},f.prototype.createAnswer=function(){var e,t=[].slice.call(arguments),n=this;return e=this._pendingRemoteOffer?this._peerConnection.setRemoteDescription(this._pendingRemoteOffer).then((function(){return n._signalingStateLatch.lower(),n._peerConnection.createAnswer()})).then((function(e){return n._pendingRemoteOffer=null,n._rolledBackTracksToSSRCs.clear(),new r({type:"answer",sdp:y(n._sdpFormat,n._tracksToSSRCs,e.sdp)})}),(function(e){throw n._pendingRemoteOffer=null,e})):this._peerConnection.createAnswer().then((function(e){return n._rolledBackTracksToSSRCs.clear(),new r({type:"answer",sdp:y(n._sdpFormat,n._tracksToSSRCs,e.sdp)})})),t.length>1?l.legacyPromise(e,t[0],t[1]):e},f.prototype.createOffer=function(){var e=[].slice.call(arguments),t=(e.length>1?e[2]:e[0])||{},n=this,i=this._peerConnection.createOffer(t).then((function(e){return n._rolledBackTracksToSSRCs.clear(),new r({type:e.type,sdp:y(n._sdpFormat,n._tracksToSSRCs,e.sdp)})}));return e.length>1?l.legacyPromise(i,e[0],e[1]):i},f.prototype.createDataChannel=function(e,t){t=function(e){e=Object.assign({},e),p()&&"maxPacketLifeTime"in e&&(e.maxRetransmitTime=e.maxPacketLifeTime);return e}(t);var n=this._peerConnection.createDataChannel(e,t);return v(n),n},f.prototype.setLocalDescription=function(){var e=[].slice.call(arguments),t=e[0];this._rolledBackTracksToSSRCs.size>0&&(this._tracksToSSRCs=new Map(this._rolledBackTracksToSSRCs),this._rolledBackTracksToSSRCs.clear());var n=h(this,!0,t);return e.length>1?l.legacyPromise(n,e[1],e[2]):n},f.prototype.setRemoteDescription=function(){var e=[].slice.call(arguments),t=e[0];this._rolledBackTracksToSSRCs.clear();var n=h(this,!1,t);return e.length>1?l.legacyPromise(n,e[1],e[2]):n},l.delegateMethods(RTCPeerConnection.prototype,f.prototype,"_peerConnection"),e.exports=f},function(e,t,n){"use strict";e.exports=function(e){Object.defineProperties(this,{track:{enumerable:!0,value:e,writable:!0}})}},function(e,t,n){"use strict";var r=n(131),i=n(194),o=n(48).inherits,a=n(87).updateUnifiedPlanTrackIdsToSSRCs,s=n(26),u="object"===typeof navigator&&navigator.userAgent&&(navigator.userAgent.match(/Firefox\/61/)||navigator.userAgent.match(/Firefox\/62/));function c(e){if(!(this instanceof c))return new c(e);r.call(this),s.interceptEvent(this,"signalingstatechange");var t=new RTCPeerConnection(e);Object.defineProperties(this,{_initiallyNegotiatedDtlsRole:{value:null,writable:!0},_isClosed:{value:!1,writable:!0},_peerConnection:{value:t},_rollingBack:{value:!1,writable:!0},_tracksToSSRCs:{value:new Map},iceGatheringState:{enumerable:!0,get:function(){return this._isClosed?"complete":this._peerConnection.iceGatheringState}},localDescription:{enumerable:!0,get:function(){return h(this._peerConnection.localDescription,this._initiallyNegotiatedDtlsRole)}},signalingState:{enumerable:!0,get:function(){return this._isClosed?"closed":this._peerConnection.signalingState}}});var n,i=this;t.addEventListener("signalingstatechange",(function(){if(!i._rollingBack&&i.signalingState!==n){n=i.signalingState;var e=i.dispatchEvent.apply.bind(i.dispatchEvent,i,arguments);i._isClosed?setTimeout(e):e()}})),s.proxyProperties(RTCPeerConnection.prototype,this,t)}function l(e,t,n){var r=t?"setLocalDescription":"setRemoteDescription";return e._rollingBack=!0,e._peerConnection[r](new i({type:"rollback"})).then(n).then((function(t){return e._rollingBack=!1,t}),(function(t){throw e._rollingBack=!1,t}))}function f(e,t,n){if(!e._initiallyNegotiatedDtlsRole&&"offer"!==t.type){var r=t.sdp.match(/a=setup:([a-z]+)/);if(r){var i=r[1];e._initiallyNegotiatedDtlsRole=n?{active:"passive",passive:"active"}[i]:i}}}function h(e,t){return e&&"answer"===e.type&&t?new i({type:e.type,sdp:e.sdp.replace(/a=setup:[a-z]+/g,"a=setup:"+t)}):e}o(c,r),Object.defineProperty(c.prototype,"peerIdentity",{enumerable:!0,value:Promise.resolve({idp:"",name:""})}),u&&(c.prototype.addTrack=function(){var e=arguments[0],t=this._peerConnection.addTrack.apply(this._peerConnection,arguments);return t.replaceTrack(e),t}),c.prototype.createAnswer=function(){var e,t=[].slice.call(arguments),n=this;return e=this._peerConnection.createAnswer().then((function(e){return f(n,e),h(e,n._initiallyNegotiatedDtlsRole)})),"function"===typeof t[0]?s.legacyPromise(e,t[0],t[1]):e},c.prototype.createOffer=function(){var e,t=[].slice.call(arguments),n=(t.length>1?t[2]:t[0])||{},r=this;if("have-local-offer"===this.signalingState||"have-remote-offer"===this.signalingState){var o="have-local-offer"===this.signalingState;e=l(this,o,(function(){return r.createOffer(n)}))}else e=r._peerConnection.createOffer(n);return e=e.then((function(e){return new i({type:e.type,sdp:a(r._tracksToSSRCs,e.s
2dp)})})),t.length>1?s.legacyPromise(e,t[0],t[1]):e},c.prototype.setLocalDescription=function(){var e,t=[].slice.call(arguments),n=t[0];return n&&"answer"===n.type&&"have-local-offer"===this.signalingState&&(e=Promise.reject(new Error("Cannot set local answer in state have-local-offer"))),e?t.length>1?s.legacyPromise(e,t[1],t[2]):e:this._peerConnection.setLocalDescription.apply(this._peerConnection,t)},c.prototype.setRemoteDescription=function(){var e,t=[].slice.call(arguments),n=t[0],r=this;return n&&"have-remote-offer"===this.signalingState&&("answer"===n.type?e=Promise.reject(new Error("Cannot set remote answer in state have-remote-offer")):"offer"===n.type&&(e=l(this,!1,(function(){return r._peerConnection.setRemoteDescription(n)})))),e||(e=this._peerConnection.setRemoteDescription(n)),e=e.then((function(){f(r,n,!0)})),t.length>1?s.legacyPromise(e,t[1],t[2]):e},c.prototype.close=function(){"closed"!==this.signalingState&&(this._isClosed=!0,this._peerConnection.close())},s.delegateMethods(RTCPeerConnection.prototype,c.prototype,"_peerConnection"),e.exports=c},function(e,t,n){"use strict";var r=n(131),i=n(48).inherits,o=n(193),a=n(87),s=n(26),u="unified"===a.getSdpFormat(),c=u?a.updateUnifiedPlanTrackIdsToSSRCs:a.updatePlanBTrackIdsToSSRCs;function l(e){if(!(this instanceof l))return new l(e);r.call(this),s.interceptEvent(this,"datachannel"),s.interceptEvent(this,"iceconnectionstatechange"),s.interceptEvent(this,"signalingstatechange"),s.interceptEvent(this,"track");var t=new RTCPeerConnection(e);Object.defineProperties(this,{_appliedTracksToSSRCs:{value:new Map,writable:!0},_audioTransceiver:{value:null,writable:!0},_isClosed:{value:!1,writable:!0},_peerConnection:{value:t},_pendingLocalOffer:{value:null,writable:!0},_pendingRemoteOffer:{value:null,writable:!0},_rolledBackTracksToSSRCs:{value:new Map,writable:!0},_signalingStateLatch:{value:new o},_tracksToSSRCs:{value:new Map,writable:!0},_videoTransceiver:{value:null,writable:!0},localDescription:{enumerable:!0,get:function(){return this._pendingLocalOffer||this._peerConnection.localDescription}},iceConnectionState:{enumerable:!0,get:function(){return this._isClosed?"closed":this._peerConnection.iceConnectionState}},iceGatheringState:{enumerable:!0,get:function(){return this._isClosed?"complete":this._peerConnection.iceGatheringState}},remoteDescription:{enumerable:!0,get:function(){return this._pendingRemoteOffer||this._peerConnection.remoteDescription}},signalingState:{enumerable:!0,get:function(){return this._isClosed?"closed":this._pe
2ndingLocalOffer?"have-local-offer":this._pendingRemoteOffer?"have-remote-offer":this._peerConnection.signalingState}}});var n=this;t.addEventListener("datachannel",(function(e){d(e.channel),n.dispatchEvent(e)})),t.addEventListener("iceconnectionstatechange",(function(){n._isClosed||n.dispatchEvent.apply(n,arguments)})),t.addEventListener("signalingstatechange",(function(){n._isClosed||("stable"===t.signalingState&&(n._appliedTracksToSSRCs=new Map(n._tracksToSSRCs)),n._pendingLocalOffer||n._pendingRemoteOffer||n.dispatchEvent.apply(n,arguments))})),t.addEventListener("track",(function(e){n._pendingRemoteOffer=null,n.dispatchEvent(e)})),s.proxyProperties(RTCPeerConnection.prototype,this,t)}function f(e,t,n){var r,i=t?e._pendingLocalOffer:e._pendingRemoteOffer,o=t?e._pendingRemoteOffer:e._pendingLocalOffer,a=t?"have-local-offer":"have-remote-offer",s=t?"setLocalDescription":"setRemoteDescription";if(!t&&o&&"answer"===n.type)return function(e,t){var n=e._pendingLocalOffer;return e._peerConnection.setLocalDescription(n).then((function(){return e._pendingLocalOffer=null,e.setRemoteDescription(t)})).then((function(){e._signalingStateLatch.lower()}))}(e,n);if("offer"===n.type){if(e.signalingState!==a&&"stable"!==e.signalingState)return Promise.reject(new Error("Cannot set "+(t?"local":"remote")+" offer in state "+e.signalingState));i||"low"!==e._signalingStateLatch.state||e._signalingStateLatch.raise();var u=e.signalingState;return r=n,t?e._pendingLocalOffer=r:e._pendingRemoteOffer=r,e.signalingState!==u?Promise.resolve().then((function(){e.dispatchEvent(new Event("signalingstatechange"))})):Promise.resolve()}return"rollback"===n.type?e.signalingState!==a?Promise.reject(new Error("Cannot rollback "+(t?"local":"remote")+" description in "+e.signalingState)):(t?e._pendingLocalOffer=null:e._pendingRemoteOffer=null,e._rolledBackTracksToSSRCs=new Map(e._tracksToSSRCs),e._tracksToSSRCs=new Map(e._appliedTracksToSSRCs),Promise.resolve().then((function(){e.dispatchEvent(new Event("signalingstatechange"))}))):e._peerConnection[s](n)}function h(e,t){return!!e.getTransceivers().find((function(e){return e.receiver&&e.receiver.track&&e.receiver.track.kind===t}))}function d(e){return Object.defineProperties(e,{maxPacketLifeTime:{value:65535===e.maxPacketLifeTime?null:e.maxPacketLifeTime},maxRetransmits:{value:65535===e.maxRetransmits?null:e.maxRetransmits}})}i(l,r),l.prototype.addIceCandidate=function(e){var t=this;return"have-remote-offer"===this.signalingState?this._signalingStateLatch.when("low").then((function(){return t._peerConnection.addIceCandidate(e)})):this._peerConnection.addIceCandidate(e)},l.prototype.createOffer=function(e){e=Object.assign({},e);var t=this;if(e.offerToReceiveAudio&&!this._audioTransceiver&&(!u||!h(this,"audio"))){delete e.offerToReceiveAudio;try{this._audioTransceiver=u?this.addTransceiver("audio",{direction:"recvonly"}):this.addTransceiver("audio")}catch(n){return Promise.reject(n)}}if(e.offerToReceiveVideo&&!this._videoTransceiver&&(!u||!h(this,"video"))){delete e.offerToReceiveVideo;try{this._videoTransceiver=u?this.addTransceiver("video",{direction:"recvonly"}):this.addTransceiver("video")}catch(n){return Promise.reject(n)}}return this._peerConnection.createOffer(e).then((function(e){return t._rolledBackTracksToSSRCs.clear(),new RTCSessionDescription({type:e.type,sdp:c(t._tracksToSSRCs,e.sdp)})}))},l.prototype.createAnswer=function(e){var t=this;return this._pendingRemoteOffer?this._peerConnection.setRemoteDescription(this._pendingRemoteOffer).then((function(){return t._signalingStateLatch.lower(),t._peerConnection.createAnswer()})).then((function(e){return t._pendingRemoteOffer=null,t._rolledBackTracksToSSRCs.clear(),u?new RTCSessionDescription({type:e.type,sdp:c(t._tracksToSSRCs,e.sdp)}):e}),(function(e){throw t._pendingRemoteOffer=null,e})):this._peerConnection.createAnswer(e).then((function(e){return t._rolledBackTracksToSSRCs.clear(),u?new RTCSessionDescription({type:e.type,sdp:c(t._tracksToSSRCs,e.sdp)}):e}))},l.prototype.createDataChannel=function(e,t){var n=this._peerConnection.createDataChannel(e,t);return d(n),n},l.prototype.removeTrack=function(e){e.replaceTrack(null),this._peerConnection.removeTrack(e)},l.prototype.setLocalDescription=function(e){return this._rolledBackTracksToSSRCs.size>0&&(this._tracksToSSRCs=new Map(this._rolledBackTracksToSSRCs),this._rolledBackTracksToSSRCs.clear()),f(this,!0,e)},l.prototype.setRemoteDescription=function(e){return this._rolledBackTracksToSSRCs.clear(),f(this,!1,e)},l.prototype.close=function(){if(!this._isClosed){this._isClosed=!0,this._peerConnection.close();var e=this;setTimeout((function(){e.dispatchEvent(new Event("iceconnectionstatechange")),e.dispatchEvent(new Event("signalingstatechange"))}))}},s.delegateMethods(RTCPeerConnection.prototype,l.prototype,"_peerConnection"),e.exports=l},function(e,t,n){"use strict";if("function"===typeof RTCSessionDescription)switch((0,n(26).guessBrowser)()){case"chrome":e.exports=n(192);break;case"firefox":e.exports=n(194);break;default:e.exports=RTCSessionDescription}else e.exports=function(){throw new Error("RTCSessionDescription is not supported")}},function(e){e.exports=JSON.parse('{"_args":[["@twilio/[email protected]","C:\\\\Users\\\\DJ 2020\\\\Downloads\\\\diageo-video-call-master\\\\diageo-video-call-master"]],"_from":"@twilio/[email protected]","_id":"@twilio/[email protected]","_inBundle":false,"_integrity":"sha512-3gIq7XDI3vBoikRBchCnocFmlRQt45KC7v0DKkat+TV6WBXYJx+Hub22PR18PAROkwl5dAmIziByjYWWVhCHgA==","_location":"/@twilio/webrtc","_phantomChildren":{},"_requested":{"type":"version","registry":true,"raw":"@twilio/[email protected]","name":"@twilio/webrtc","escapedName":"@twilio%2fwebrtc","scope":"@twilio","rawSpec":"4.3.2","saveSpec":null,"fetchSpec":"4.3.2"},"_requiredBy":["/twilio-video"],"_resolved":"https://registry.npmjs.org/@twilio/webrtc/-/webrtc-4.3.2.tgz","_spec":"4.3.2","_where":"C:\\\\Users\\\\DJ 2020\\\\Downloads\\\\diageo-video-call-master\\\\diageo-video-call-master","author":{"name":"Manjesh Malavalli","email":"[email protected]"},"bugs":{"url":"https://github.com/twilio/twilio-webrtc.js/issues"},"contributors":[{"name":"Mark Roberts","email":"[email protected]"},{"name":"Ryan Rowland","email":"[email protected]"},{"name":"Makarand Patwardhan","email":"[email protected]"}],"description":"WebRTC-related APIs and shims used by twilio-video.js","devDependencies":{"browserify":"^14.4.0","electron":"^5.0.0","envify":"^4.1.0","eslint":"^4.4.1","is-docker":"^2.0.0","istanbul":"^0.4.5","karma":"^1.7.0","karma-browserify":"^5.1.1","karma-chrome-launcher":"^2.2.0","karma-edgium-launcher":"^4.0.0-0","karma-electron":"^
26.1.0","karma-firefox-launcher":"^1.0.1","karma-htmlfile-reporter":"^0.3.8","karma-junit-reporter":"^1.2.0","karma-mocha":"^1.3.0","karma-safari-launcher":"~0.1","karma-spec-reporter":"0.0.31","mocha":"^3.5.0","npm-run-all":"^4.0.2","rimraf":"^2.6.1","simple-git":"^2.4.0","twilio-release-tool":"^1.0.0","watchify":"^3.9.0","webrtc-adapter":"^6.4.8"},"homepage":"https://github.com/twilio/twilio-webrtc.js#readme","keywords":["shim","twilio","video","webrtc"],"license":"BSD-3-Clause","main":"./lib/index.js","name":"@twilio/webrtc","repository":{"type":"git","url":"git+https://github.com/twilio/twilio-webrtc.js.git"},"scripts":{"build":"npm-run-all clean lint test","clean":"rimraf coverage","lint":"eslint ./lib","test":"npm-run-all test:*","test:integration":"npm-run-all test:integration:*","test:integration:adapter":"karma start karma/integration.adapter.conf.js","test:integration:native":"karma start karma/integration.conf.js","test:unit":"istanbul cover node_modules/mocha/bin/_mocha -- ./test/unit/index.js"},"version":"4.3.2"}')},function(e,t,n){"use strict";var r=n(197);e.exports=function(e){var t=n(133),i={},o=t.getOrCreate(i),a=3;return function t(){return a--,r(o,e.srcObject,250).then((function(e){return!!e&&(!(a>0)||t())})).catch((function(){return!0}))}().finally((function(){t.release(i)}))}},function(e,t,n){"use strict";var r=n(48).inherits,i=n(377);function o(e,t){var n=new i(e,t);return Object.setPrototypeOf(n,o.prototype),n}r(o,i),e.exports=o},function(e,t,n){"use strict";var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),i=function e(t,n,r){null===t&&(t=Function.prototype);var i=Object.getOwnPropertyDescriptor(t,n);if(void 0===i){var o=Object.getPrototypeOf(t);return null===o?void 0:e(o,n,r)}if("value"in i)return i.value;var a=i.get;return void 0!==a?a.call(r):void 0};var o=n(26).guessBrowser,a=n(198),s=function(e){function t(e,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),n=Object.assign({workaroundSilentLocalVideo:"safari"===o()&&"undefined"!==typeof document&&"function"===typeof document.createElement},n);var r=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,n));return Object.defineProperties(r,{_workaroundSilentLocalVideo:{value:n.workaroundSilentLocalVideo?u:null},_workaroundSilentLocalVideoCleanup:{value:null,writable:!0}}),r._workaroundSilentLocalVideo&&(r._workaroundSilentLocalVideoCleanup=r._workaroundSilentLocalVideo(r,document)),r}return function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),r(t,[{key:"toString",value:function(){return"[LocalVideoTrack #"+this._instanceId+": "+this.id+"]"}},{key:"_end",value:function(){return i(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"_end",this).apply(this,arguments)}},{key:"disable",value:function(){return i(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"disable",this).apply(this,arguments)}},{key:"enable",value:function(){return i(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"enable",this).apply(this,arguments)}},{key:"restart",value:function(){var e=this;this._workaroundSilentLocalVideoCleanup&&(this._workaroundSilentLocalVideoCleanup(),this._workaroundSilentLocalVideoCleanup=null);var n=i(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"restart",this).apply(this,arguments);return this._workaroundSilentLocalVideo&&n.finally((function(){e._workaroundSilentLocalVideoCleanup=e._workaroundSilentLocalVideo(e,document)})),n}},{key:"stop",value:function(){return this._workaroundSilentLocalVideoCleanup&&(this._workaroundSilentLocalVideoCleanup(),this._workaroundSilentLocalVideoCleanup=null),i(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"stop",this).apply(this,arguments)}}]),t}(n(196)(n(204)));function u(e,t){var n=e._log,r=e._dummyEl,i=e.mediaStreamTrack;function o(){e.isEnabled&&(n.info("Unmuted, checking silence"),r.play().then((function(){return a(r,t)})).then((function(t){if(t)return n.warn("Silence detected, restarting"),e._stop(),e._restart();n.info("Non-silent frames detected, so no need to restart")})).catch((function(e){n.warn("Failed to detect silence and restart:",e)})).finally((function(){(r=e._dummyEl).paused||r.pause(),i.removeEventListener("unmute",o),(i=e.mediaStreamTrack).addEventListener("unmute",o)})))}return i.addEventListener("unmute",o),function(){i.removeEventListener("unmute",o)}}e.exports=s},function(e,t,n){"use strict";var r=n(48).inherits,i=n(379);function o(e){var t=new i(e);return Object.setPrototypeOf(t,o.prototype),t}r(o,i),e.exports=o},function(e,t,n){"use strict";var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();var i=n(132),o=n(380),a=function(e){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var n=new(0,(e=Object.assign({DataTrackSender:o,maxPacketLifeTime:null,maxRetransmits:null,ordered:!0}
2,e)).DataTrackSender)(e.maxPacketLifeTime,e.maxRetransmits,e.ordered),r=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,n.id,"data",e));return Object.defineProperties(r,{_trackSender:{value:n},id:{enumerable:!0,value:n.id},maxPacketLifeTime:{enumerable:!0,value:e.maxPacketLifeTime},maxRetransmits:{enumerable:!0,value:e.maxRetransmits},ordered:{enumerable:!0,value:e.ordered},reliable:{enumerable:!0,value:null===e.maxPacketLifeTime&&null===e.maxRetransmits}}),r}return function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),r(t,[{key:"send",value:function(e){this._trackSender.send(e)}}]),t}(i);e.exports=a},function(e,t,n){"use strict";var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),i=function e(t,n,r){null===t&&(t=Function.prototype);var i=Object.getOwnPropertyDescriptor(t,n);if(void 0===i){var o=Object.getPrototypeOf(t);return null===o?void 0:e(o,n,r)}if("value"in i)return i.value;var a=i.get;return void 0!==a?a.call(r):void 0};var o=n(205),a=n(22).makeUUID,s=function(e){function t(e,n,r){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var i=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,a(),e,n,r));return Object.defineProperties(i,{_clones:{value:new Set},_dataChannels:{value:new Set}}),i}return function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),r(t,[{key:"_addClone",value:function(e){this._clones.add(e)}},{key:"removeClone",value:function(e){this._clones.delete(e)}},{key:"addDataChannel",value:function(e){return this._dataChannels.add(e),this}},{key:"clone",value:function(){var e=this,n=new t(this.maxPacketLifeTime,this.maxRetransmits,this.ordered);return this._addClone(n),n.once("stopped",(function(){return e.removeClone(n)})),n}},{key:"removeDataChannel",value:function(e){return this._dataChannels.delete(e),this}},{key:"send",value:function(e){return this._dataChannels.forEach((function(t){try{t.send(e)}catch(n){}})),this._clones.forEach((function(t){try{t.send(e)}catch(n){}})),this}},{key:"stop",value:function(){this._dataChannels.forEach((function(e){return e.close()})),this._clones.forEach((function(e){return e.stop()})),i(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"stop",this).call(this)}}]),t}(o);e.exports=s},function(e,t,n){"use strict";var r=n(69).MediaStreamTrack,i=n(26),o=i.guessBrowser,a=i.guessBrowserVersion,s=n(382),u=n(135),c=n(383),l=n(384),f=n(112),h=f.LocalAudioTrack,d=f.LocalDataTrack,p=f.LocalVideoTrack,v=n(394),y=n(395),m=n(401),g=n(22),b=g.asLocalTrack,_=g.buildLogLevels,w=g.filterObject,k=g.isNonArrayObject,S=n(35),O=S.DEFAULT_ENVIRONMENT,E=S.DEFAULT_LOG_LEVEL,T=S.DEFAULT_LOGGER_NAME,C=S.DEFAULT_REALM,P=S.DEFAULT_REGION,x=S.WS_SERVER,I=S.typeErrors,j=n(134),R=n(458),A=n(88),M=n(207).validateBandwidthProfile,N="safari"===o()&&a(),L=0,D=!1,F=!1;if(N){var U=N.major,V=N.minor;F=U<12||12===U&&V<1}var B=new Set([{didWarn:!1,shouldDelete:!0,name:"abortOnIceServersTimeout"},{didWarn:!1,shouldDelete:!0,name:"dscpTagging",newName:"enableDscp"},{didWarn:!1,shouldDelete:!0,name:"iceServersTimeout"},{didWarn:!1,shouldDelete:!1,name:"eventListener",newName:"Video.Logger"},{didWarn:!1,shouldDelete:!1,name:"logLevel",newName:"Video.Logger"}]);function q(e,t,n,r,i,o){var a=e.createLocalParticipantSignaling(n,r);return t.debug("Creating a new LocalParticipant:",a),new i.LocalParticipant(a,o,i)}function W(e,t,n){var r=new y(t,n,e),i=e.log;return i.debug("Creating a new Room:",r),n.on("stateChanged",(function e(t){"disconnected"===t&&(i.info("Disconnected from Room:",r.toString()),n.removeListener("stateChanged",e))})),r}function z(e,t,n,r,i,o){return t.log.debug("Creating a new RoomSignaling"),n.connect(o._signaling,e,r,i,t)}function H(e,t){var n=e.log;return e.shouldStopLocalTracks=!e.tracks,e.shouldStopLocalTracks?n.info("LocalTracks were not provided, so they will be acquired automatically before connecting to the Room. LocalTracks will be released if connecting to the Room fails or if the Room is disconnected"):(n.info("Getting LocalTracks"),n.debug("Options:",e)),e.createLocalTracks(e).then((function(r){var i=t(r);return i.catch((function(){e.shouldStopLocalTracks&&(n.info("The automatically acquired LocalTracks will now be stopped"),r.forEach((function(e){e.stop()})))})),i}))}function G(e){var t="string"===typeof e?{codec:e}:e;switch(t.codec.toLowerCase()){case"opus":return Object.assign({dtx:!0}
2,t);case"vp8":return Object.assign({simulcast:!1},t);default:return t}}e.exports=function(e,t){if("undefined"===typeof t&&(t={}),!k(t))return j.reject(I.INVALID_TYPE("options","object"));var n=t.Log||A,i=t.loggerName||T,o=t.logLevel||E,a=_(o),f="[connect #"+ ++L+"]",y=void 0;try{y=new n("default",f,a,i)}catch(U){return j.reject(U)}!function(e,t){B.forEach((function(n){var r=n.didWarn,i=n.name,o=n.newName,a=n.shouldDelete;i in e&&"undefined"!==typeof e[i]&&(o&&a&&(e[o]=e[i]),a&&delete e[i],r||["error","off"].includes(t.level)||(t.warn('The ConnectOptions "'+i+'" is '+(o?'deprecated and scheduled for removal. Please use "'+o+'" instead.':"no longer applicable and will be ignored.")),n.didWarn=!0))}))}(t,y),t=Object.assign({automaticSubscription:!0,createLocalTracks:u,dominantSpeaker:!1,enableDscp:!1,environment:O,eventListener:null,insights:!0,LocalAudioTrack:h,LocalDataTrack:d,LocalParticipant:l,LocalVideoTrack:p,Log:n,MediaStreamTrack:r,loggerName:i,logLevel:o,maxAudioBitrate:null,maxVideoBitrate:null,name:null,networkMonitor:!0,networkQuality:!1,preferredAudioCodecs:[],preferredVideoCodecs:[],realm:C,region:P,signaling:m},w(t));var g=x(t.environment,t.region),S=new R(Date.now(),y,t.eventListener);if((t=Object.assign({eventObserver:S,wsServer:g},t)).log=y,F&&!D&&"error"!==y.logLevel&&"off"!==y.logLevel&&(D=!0,y.warn(["Support for Safari 12.0 and below is limited because it does not support VP8.","This means you may experience codec issues in Group Rooms. You may also","experience codec issues in Peer-to-Peer (P2P) Rooms containing Android- or","iOS-based Participants who do not support H.264. However, P2P Rooms","with browser-based Participants should work. For more information, please","refer to this guide: https://www.twilio.com/docs/video/javascript-v2-developing-safari-11"].join(" "))),"string"!==typeof e)return j.reject(I.INVALID_TYPE("token","string"));var N=Object.assign({},t);if(delete N.name,"tracks"in t){if(!Array.isArray(t.tracks))return j.reject(I.INVALID_TYPE("options.tracks","Array of LocalAudioTrack, LocalVideoTrack or MediaStreamTrack"));try{t.tracks=t.tracks.map((function(e){return b(e,N)}))}catch(U){return j.reject(U)}}var U=M(t.bandwidthProfile);if(U)return j.reject(U);var V=new(0,t.signaling)(t.wsServer,t);y.info("Connecting to a Room"),y.debug("Options:",t);var K=new c({maxAudioBitrate:t.maxAudioBitrate,maxVideoBitrate:t.maxVideoBitrate}),Y={audio:t.preferredAudioCodecs.map(G),video:t.preferredVideoCodecs.map(G)},Q=new v(k(t.networkQuality)?t.networkQuality:{});t.networkQuality=k(t.networkQuality)||t.networkQuality;var $=s(H.bind(null,t),q.bind(null,V,y,K,Q,t),z.bind(null,e,t,V,K,Y),W.bind(null,t));return $.then((function(e){return y.info("Connected to Room:",e.toString()),y.info("Room name:",e.name),y.debug("Room:",e),e}),(function(e){$._isCanceled?y.info("Attempt to connect to a Room was canceled"):y.info("Error while connecting to a Room:",e)})),$}},function(e,t,n){"use strict";var r=n(134);e.exports=function(e,t,n,i){var o=void 0,a=new Error("Canceled");return new r((function(s,u,c){var l=void 0;e((function(e){return c()?r.reject(a):(l=t(e),n(l).then((function(e){if(c())throw a;return o=e()})))})).then((function(e){if(c())throw e.disconnect(),a;s(i(l,e))})).catch((function(e){u(e)}))}),(function(){o&&o.cancel()}))}},function(e,t,n){"use strict";var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();var i=function(e){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var n=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return e=Object.assign({maxAudioBitrate:null,maxVideoBitrate:null},e),Object.defineProperties(n,{maxAudioBitrate:{value:e.maxAudioBitrate,writable:!0},maxVideoBitrate:{value:e.maxVideoBitrate,writable:!0}}),n}return function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),r(t,[{key:"toJSON",value:function(){return{maxAudioBitrate:this.maxAudioBitrate,maxVideoBitrate:this.maxVideoBitrate}}},{key:"update",value:function(e){var t=this;e=Object.assign({maxAudioBitrate:this.maxAudioBitrate,maxVideoBitrate:this.maxVideoBitrate},e),["maxAudioBitrate","maxVideoBitrate"].reduce((function(n,r){return t[r]!==e[r]&&(t[r]=e[r],n=!0),n}
2),!1)&&this.emit("changed")}}]),t}(n(18).EventEmitter);e.exports=i},function(e,t,n){"use strict";var r="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),o=function e(t,n,r){null===t&&(t=Function.prototype);var i=Object.getOwnPropertyDescriptor(t,n);if(void 0===i){var o=Object.getPrototypeOf(t);return null===o?void 0:e(o,n,r)}if("value"in i)return i.value;var a=i.get;return void 0!==a?a.call(r):void 0};var a=n(69).MediaStreamTrack,s=n(22),u=s.asLocalTrack,c=s.asLocalTrackPublication,l=s.trackClass,f=n(35),h=f.typeErrors,d=f.trackPriority,p=n(207).validateLocalTrack,v=n(112),y=v.LocalAudioTrack,m=v.LocalDataTrack,g=v.LocalVideoTrack,b=n(385),_=n(386),w=n(387),k=function(e){function t(e,n,r){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var i=(r=Object.assign({LocalAudioTrack:y,LocalVideoTrack:g,LocalDataTrack:m,MediaStreamTrack:a,LocalAudioTrackPublication:b,LocalVideoTrackPublication:w,LocalDataTrackPublication:_,shouldStopLocalTracks:!1,tracks:n},r)).shouldStopLocalTracks?new Set(n.filter((function(e){return"data"!==e.kind}))):new Set,o=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,r));return Object.defineProperties(o,{_LocalAudioTrack:{value:r.LocalAudioTrack},_LocalDataTrack:{value:r.LocalDataTrack},_LocalVideoTrack:{value:r.LocalVideoTrack},_MediaStreamTrack:{value:r.MediaStreamTrack},_LocalAudioTrackPublication:{value:r.LocalAudioTrackPublication},_LocalDataTrackPublication:{value:r.LocalDataTrackPublication},_LocalVideoTrackPublication:{value:r.LocalVideoTrackPublication},_tracksToStop:{value:i},signalingRegion:{enumerable:!0,get:function(){return e.signalingRegion}}}),o._handleTrackSignalingEvents(),o}return function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),i(t,[{key:"_addTrack",value:function(e,n,r){var i=o(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"_addTrack",this).call(this,e,n);return i&&"disconnected"!==this.state&&this._addLocalTrack(e,r),i}},{key:"_addLocalTrack",value:function(e,t){this._signaling.addTrack(e._trackSender,e.name,t),this._log.info("Added a new "+l(e,!0)+":",e.id),this._log.debug(l(e,!0)+":",e)}},{key:"_removeTrack",value:function(e,n){var r=o(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"_removeTrack",this).call(this,e,n);return r&&"disconnected"!==this.state&&(this._signaling.removeTrack(e._trackSender),this._log.info("Removed a "+l(e,!0)+":",e.id),this._log.debug(l(e,!0)+":",e)),r}},{key:"_getTrackEvents",value:function(){return o(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"_getTrackEvents",this).call(this).concat([["disabled","trackDisabled"],["enabled","trackEnabled"],["stopped","trackStopped"]])}},{key:"toString",value:function(){return"[LocalParticipant #"+this._instanceId+(this.sid?": "+this.sid:"")+"]"}},{key:"_handleTrackSignalingEvents",value:function(){var e=this,t=this._log;if("disconnected"!==this.state){var n=this._signaling;this.on("trackDisabled",i),this.on("trackEnabled",o),this.on("trackStopped",a),this._tracks.forEach((function(n){e._addLocalTrack(n,d.PRIORITY_STANDARD),e._getOrCreateLocalTrackPublication(n).catch((function(e){t.warn("Failed to get or create LocalTrackPublication for "+n+":",e)}))}));var r=this;n.on("stateChanged",(function e(s){t.debug("Transitioned to state:",s),"disconnected"===s?(t.debug("Removing LocalTrack event listeners"),n.removeListener("stateChanged",e),r.removeListener("trackDisabled",i),r.removeListener("trackEnabled",o),r.removeListener("trackStopped",a),r._tracks.forEach((function(e){var t=a(e);t&&e._trackSender.removeClone(t._trackTransceiver)})),t.info("LocalParticipant disconnected. Stopping "+r._tracksToStop.size+" automatically-acquired LocalTracks"),r._tracksToStop.forEac
2h((function(e){e.stop()}))):"connected"===s&&(t.info("reconnected"),setTimeout((function(){return r.emit("reconnected")}),0))}))}function i(e){var r=n.getPublication(e._trackSender);r&&(r.disable(),t.debug("Disabled the "+l(e,!0)+":",e.id))}function o(e){var r=n.getPublication(e._trackSender);r&&(r.enable(),t.debug("Enabled the "+l(e,!0)+":",e.id))}function a(e){var t=n.getPublication(e._trackSender);return t&&t.stop(),t}}},{key:"_getOrCreateLocalTrackPublication",value:function(e){var t=S(this.tracks,e);if(t)return Promise.resolve(t);var n=this._log,r=this,i=this._signaling.getPublication(e._trackSender);if(!i)return Promise.reject(new Error("Unexpected error: The "+e+" cannot be published"));function o(e){r.unpublishTrack(e.track)}return new Promise((function(a,s){i.on("updated",(function u(){var f=i.error;if(f)return i.removeListener("updated",u),n.warn("Failed to publish the "+l(e,!0)+": "+f.message),r._removeTrack(e,e.id),setTimeout((function(){r.emit("trackPublicationFailed",f,e)})),void s(f);if(!r._tracks.has(e.id))return i.removeListener("updated",u),void s(new Error("The "+e+" was unpublished"));if(i.sid){i.removeListener("updated",u);var h={log:n,LocalAudioTrackPublication:r._LocalAudioTrackPublication,LocalDataTrackPublication:r._LocalDataTrackPublication,LocalVideoTrackPublication:r._LocalVideoTrackPublication};(t=S(r.tracks,e))||(t=c(e,i,o,h),r._addTrackPublication(t)),"connected"===r._signaling.state&&setTimeout((function(){r.emit("trackPublished",t)})),a(t)}}))}))}},{key:"publishTrack",value:function(e,t){var n=S(this.tracks,e);if(n)return Promise.resolve(n);t=Object.assign({log:this._log,priority:d.PRIORITY_STANDARD,LocalAudioTrack:this._LocalAudioTrack,LocalDataTrack:this._LocalDataTrack,LocalVideoTrack:this._LocalVideoTrack,MediaStreamTrack:this._MediaStreamTrack},t);var r=void 0;try{r=u(e,t)}catch(a){return Promise.reject(a)}var i=Object.values(d);if(!i.includes(t.priority))return Promise.reject(h.INVALID_VALUE("LocalTrackPublishOptions.priority",i));var o=this._addTrack(r,r.id,t.priority)||this._tracks.get(r.id);return this._getOrCreateLocalTrackPublication(o)}},{key:"publishTracks",value:function(e){if(!Array.isArray(e))throw h.INVALID_TYPE("tracks","Array of LocalAudioTrack, LocalVideoTrack, LocalDataTrack, or MediaStreamTrack");return Promise.all(e.map(this.publishTrack,this))}},{key:"setBandwidthProfile",value:function(){this._log.warn("setBandwidthProfile is not implemented yet and may be available in future versions of twilio-video.js")}},{key:"setNetworkQualityConfiguration",value:function(e){if("object"!==("undefined"===typeof e?"undefined":r(e))||null===e)throw h.INVALID_TYPE("networkQualityConfiguration","NetworkQualityConfiguration");return["local","remote"].forEach((function(t){if(t in e&&("number"!==typeof e[t]||isNaN(e[t])))throw h.INVALID_TYPE("networkQualityConfiguration."+t,"number")})),this._signaling.setNetworkQualityConfiguration(e),this}},{key:"setParameters",value:function(e){if("undefined"!==typeof e&&"object"!==("undefined"===typeof e?"undefined":r(e)))throw h.INVALID_TYPE("encodingParameters","EncodingParameters, null or undefined");return e?["maxAudioBitrate","maxVideoBitrate"].forEach((function(t){if("undefined"!==typeof e[t]&&"number"!==typeof e[t]&&null!==e[t])throw h.INVALID_TYPE("encodingParameters."+t,"number, null or undefined")})):null===e&&(e={maxAudioBitrate:null,maxVideoBitrate:null}),this._signaling.setParameters(e),this}},{key:"unpublishTrack",value:function(e){p(e,{LocalAudioTrack:this._LocalAudioTrack,LocalDataTrack:this._LocalDataTrack,LocalVideoTrack:this._LocalVideoTrack,MediaStreamTrack:this._MediaStreamTrack});var t=this._tracks.get(e.id);if(!t)return null;if(this._signaling.getPublication(t._trackSender).publishFailed(new Error("The "+t+" was unpublished")),!(t=this._removeTrack(t,t.id)))return null;var n=S(this.tracks,t);return n&&this._removeTrackPublication(n),n}},{key:"unpublishTracks",value:function(e){var t=this;if(!Array.isArray(e))throw h.INVALID_TYPE("tracks","Array of LocalAudioTrack, LocalVideoTrack, LocalDataTrack, or MediaStreamTrack");return e.reduce((function(e,n){var r=t.unpublishTrack(n);return r?e.concat(r):e}),[])}}]),t}(n(209));function S(e,t){return Array.from(e.values()).find((function(e){return e.track===t||e.track.mediaStreamTrack===t}))||null}e.exports=k},function(e,t,n){"use strict";var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();var i=function(e){function t(e,n,r,i){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,n,r,i))}return function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),r(t,[{key:"toString",value:function(){return"[LocalAudioTrackPublication #"+this._instanceId+": "+this.trackSid+"]"}}]),t}(n(136));e.exports=i},function(e,t,n){"use strict";var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();var i=function(e){function t(e,n,r,i){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,n,r,i))}return function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),r(t,[{key:"toString",value:function(){return"[LocalDataTrackPublication #"+this._instanceId+": "+this.trackSid+"]"}}]),t}(n(136));e.exports=i},function(e,t,n){"use strict";var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();var i=function(e){function t(e,n,r,i){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,n,r,i))}return function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),r(t,[{key:"toString",value:function(){return"[LocalVideoTrackPublication #"+this._instanceId+": "+this.trackSid+"]"}}]),t}(n(136));e.exports=i},function(e,t,n){"use strict";var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),i=function e(t,n,r){null===t&&(t=Function.prototype);var i=Object.getOwnPropertyDescriptor(t,n);if(void 0===i){var o=Object.getPrototypeOf(t);return null===o?void 0:e(o,n,r)}if("value"in i)return i.value;var a=i.get;return void 0!==a?a.call(r):void 0};var o=n(189),a=function(e){function t(e,n,r,i,o){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,n,r,i,o))}return function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),r(t,[{key:"toString",value:function(){return"[RemoteAudioTrack #"+this._instanceId+": "+this.sid+"]"}},{key:"setPriority",value:function(e){return i(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"setPriority",this).call(this,e)}}]),t}(n(210)(o));e.exports=a},function(e,t,n){"use strict";var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();var i=function(e){function t(e,n){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,n))}return function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),r(t,[{key:"toString",value:function(){return"[RemoteAudioTrackPublication #"+this._instanceId+": "+this.trackSid+"]"}}]),t}(n(137));e.exports=i},function(e,t,n){"use strict";var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();var i=n(132),o=n(35),a=o.typeErrors,s=o.trackPriority,u=function(e){function t(e,n,r){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var i=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,n.id,"data",r));return Object.defineProperties(i,{_isSwitchedOff:{value:!1,writable:!0},_priority:{value:null,writable:!0},isEnabled:{enumerable:!0,value:!0},isSwitchedOff:{enumerable:!0,get:function(){return this._isSwitchedOff}},maxPacketLifeTime:{enumerable:!0,value:n.maxPacketLifeTime},maxRetransmits:{enumerable:!0,value:n.maxRetransmits},ordered:{enumerable:!0,value:n.ordered},priority:{enumerable:!0,get:function(){return this._priority}},reliable:{enumerable:!0,value:null===n.maxPacketLifeTime&&null===n.maxRetransmits},sid:{enumerable:!0,value:e}}),n.on("message",(function(e){i.emit("message",e,i)})),i}return function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),r(t,[{key:"setPriority",value:function(e){var t=[null].concat(function(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)}(Object.values(s)));if(!t.includes(e))throw a.INVALID_VALUE("priority",t);return this._priority=e,this}},{key:"_setEnabled",value:function(){}},{key:"_setSwitchedOff",value:function(e){this._isSwitchedOff!==e&&(this._isSwitchedOff=e,this.emit
2(e?"switchedOff":"switchedOn",this))}}]),t}(i);e.exports=u},function(e,t,n){"use strict";var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();var i=function(e){function t(e,n){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,n))}return function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),r(t,[{key:"toString",value:function(){return"[RemoteDataTrackPublication #"+this._instanceId+": "+this.trackSid+"]"}}]),t}(n(137));e.exports=i},function(e,t,n){"use strict";var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),i=function e(t,n,r){null===t&&(t=Function.prototype);var i=Object.getOwnPropertyDescriptor(t,n);if(void 0===i){var o=Object.getPrototypeOf(t);return null===o?void 0:e(o,n,r)}if("value"in i)return i.value;var a=i.get;return void 0!==a?a.call(r):void 0};var o=function(e){function t(e,n,r,i,o){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,n,r,i,o))}return function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),r(t,[{key:"toString",value:function(){return"[RemoteVideoTrack #"+this._instanceId+": "+this.sid+"]"}},{key:"setPriority",value:function(e){return i(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"setPriority",this).call(this,e)}}]),t}(n(210)(n(204)));e.exports=o},function(e,t,n){"use strict";var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();var i=function(e){function t(e,n){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,n))}return function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),r(t,[{key:"toString",value:function(){return"[RemoteVideoTrackPublication #"+this._instanceId+": "+this.trackSid+"]"}}]),t}(n(137));e.exports=i},function(e,t,n){"use strict";var r=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],r=!0,i=!1,o=void 0;try{for(var a,s=e[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(u){i=!0,o=u}finally{try{!r&&s.return&&s.return()}finally{if(i)throw o}}return n}(e,t);
2throw new TypeError("Invalid attempt to destructure non-iterable instance")},i=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();var o=n(18).EventEmitter,a=n(35),s=a.DEFAULT_NQ_LEVEL_LOCAL,u=a.DEFAULT_NQ_LEVEL_REMOTE,c=a.MAX_NQ_LEVEL,l=n(22).inRange,f=function(e){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var n=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return e=Object.assign({local:s,remote:u},e),Object.defineProperties(n,{local:{value:l(e.local,s,c)?e.local:s,writable:!0},remote:{value:l(e.remote,u,c)?e.remote:u,writable:!0}}),n}return function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),i(t,[{key:"update",value:function(e){var t=this;e=Object.assign({local:this.local,remote:this.remote},e),[["local",s,3],["remote",u,3]].forEach((function(n){var i=r(n,3),o=i[0],a=i[1],s=i[2];t[o]="number"===typeof e[o]&&l(e[o],a,s)?e[o]:a}))}}]),t}(o);e.exports=f},function(e,t,n){"use strict";var r=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],r=!0,i=!1,o=void 0;try{for(var a,s=e[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(u){i=!0,o=u}finally{try{!r&&s.return&&s.return()}finally{if(i)throw o}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")},i=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();function o(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)}var a=n(113),s=n(396),u=n(211),c=n(22).valueToJSON,l=0,f=function(e){function t(e,n,r){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var i,o,a=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this)),s=r.log.createLog("default",a),u=new Map;return Object.defineProperties(a,{_log:{value:s},_instanceId:{value:++l},_options:{value:r},_participants:{value:u},_signaling:{value:n},dominantSpeaker:{enumerable:!0,get:function(){return this.participants.get(n.dominantSpeakerSid)||null}},isRecording:{enumerable:!0,get:function(){return n.recording.isEnabled||!1}},localParticipant:{enumerable:!0,value:e},name:{enumerable:!0,value:n.name},participants:{enumerable:!0,value:u},sid:{enumerable:!0,value:n.sid},state:{enumerable:!0,get:function(){return n.state}},mediaRegion:{enumerable:!0,value:n.mediaRegion}}),i=a,(o=n.recording).on("updated",(function(){var e=o.isEnabled;i._log.info("Recording "+(e?"started":"stopped")),i.emit("recording"+(e?"Started":"Stopped"))})),function(e,t){var n=e._log;n.debug("Creating a new RemoteParticipant for each ParticipantSignaling in the RoomSignaling"),t.participants.forEac
2h(d.bind(null,e)),n.debug("Setting up RemoteParticipant creation for all subsequent ParticipantSignalings that connect to the RoomSignaling"),t.on("participantConnected",d.bind(null,e)),t.on("dominantSpeakerChanged",(function(){return e.emit("dominantSpeakerChanged",e.dominantSpeaker)})),t.on("stateChanged",(function r(i,o){switch(n.info("Transitioned to state:",i),i){case"disconnected":e.participants.forEach((function(e){e._unsubscribeTracks()})),e.emit(i,e,o),e.localParticipant.tracks.forEach((function(e){e.unpublish()})),t.removeListener("stateChanged",r);break;case"reconnecting":setTimeout((function(){return e.emit("reconnecting",o)}),0);break;default:setTimeout((function(){return e.emit("reconnected")}),0)}}))}(a,n),s.info("Created a new Room:",a.name),s.debug("Initial RemoteParticipants:",Array.from(a._participants.values())),a}return function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),i(t,[{key:"toString",value:function(){return"[Room #"+this._instanceId+": "+this.sid+"]"}},{key:"disconnect",value:function(){return this._log.info("Disconnecting"),this._signaling.disconnect(),this}},{key:"getStats",value:function(){var e=this;return this._signaling.getStats().then((function(t){return Array.from(t).map((function(t){var n=r(t,2),i=n[0],o=n[1];return new u(i,Object.assign({},o,{localAudioTrackStats:h(e,o.localAudioTrackStats),localVideoTrackStats:h(e,o.localVideoTrackStats)}))}))}))}},{key:"toJSON",value:function(){return c(this)}}]),t}(a);function h(e,t){var n=e.localParticipant._signaling;return t.reduce((function(e,t){var r=n.tracks.get(t.trackId),i=n.getSender(r);return i?[Object.assign({},t,{trackId:i.id})].concat(e):e}),[])}function d(e,t){var n=e._log,i=new s(t,{log:n});n.info("A new RemoteParticipant connected:",i),e._participants.set(i.sid,i),e.emit("participantConnected",i);var a=[["reconnected","participantReconnected"],["reconnecting","participantReconnecting"],"trackDimensionsChanged","trackDisabled","trackEnabled","trackMessage","trackPublished","trackPublishPriorityChanged","trackStarted","trackSubscribed","trackSubscriptionFailed","trackSwitchedOff","trackSwitchedOn","trackUnpublished","trackUnsubscribed"].map((function(t){var n=Array.isArray(t)?t:[t,t],a=r(n,2),s=a[0],u=a[1];function c(){var t=[].slice.call(arguments);t.unshift(u),t.push(i),e.emit.apply(e,o(t))}return i.on(s,c),[s,c]}));i.once("disconnected",(function(){var t=e.dominantSpeaker;n.info("RemoteParticipant disconnected:",i),e._participants.delete(i.sid),a.forEach((function(e){i.removeListener(e[0],e[1])})),e.emit("participantDisconnected",i),i===t&&e.emit("dominantSpeakerChanged",e.dominantSpeaker)}))}
2e.exports=f},function(e,t,n){"use strict";var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),i=function e(t,n,r){null===t&&(t=Function.prototype);var i=Object.getOwnPropertyDescriptor(t,n);if(void 0===i){var o=Object.getPrototypeOf(t);return null===o?void 0:e(o,n,r)}if("value"in i)return i.value;var a=i.get;return void 0!==a?a.call(r):void 0};var o=function(e){function t(e,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var r=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,n));return r._handleTrackSignalingEvents(),r.once("disconnected",r._unsubscribeTracks.bind(r)),r}return function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),r(t,[{key:"toString",value:function(){return"[RemoteParticipant #"+this._instanceId+(this.sid?": "+this.sid:"")+"]"}},{key:"_addTrack",value:function(e,n,r){return i(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"_addTrack",this).call(this,e,r)?(n._subscribed(e),this.emit("trackSubscribed",e,n),e):null}},{key:"_addTrackPublication",value:function(e){var n=i(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"_addTrackPublication",this).call(this,e);return n?(this.emit("trackPublished",n),n):null}},{key:"_getTrackPublicationEvents",value:function(){return[].concat(function(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)}(i(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"_getTrackPublicationEvents",this).call(this)),[["subscriptionFailed","trackSubscriptionFailed"],["trackDisabled","trackDisabled"],["trackEnabled","trackEnabled"],["publishPriorityChanged","trackPublishPriorityChanged"],["trackSwitchedOff","trackSwitchedOff"],["trackSwitchedOn","trackSwitchedOn"]])}},{key:"_unsubscribeTracks",value:function(){var e=this;this.tracks.forEach((function(t){if(t.isSubscribed){var n=t.track;t._unsubscribe(),e.emit("trackUnsubscribed",n,t)}}))}},{key:"_removeTrack",value:function(e,n,r){var o=this._tracks.get(r);return o?(i(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"_removeTrack",this).call(this,o,r),n._unsubscribe(),this.emit("trackUnsubscribed",o,n),o):null}},{key:"_removeTrackPublication",value:function(e){var n=i(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"_removeTrackPublication",this).call(this,e);return n?(this.emit("trackUnpublished",n),n):null}}]),t}(n(209));e.exports=o},function(e,t,n){"use strict";var r=function(e){function t(e,n,r){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var i=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,n,r));return Object.defineProperties(i,{audioLevel:{value:"number"===typeof n.audioInputLevel?n.audioInputLevel:null,enumerable:!0},jitter:{value:"number"===typeof n.jitter?n.jitter:null,enumerable:!0}}),i}return function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),t}(n(212));e.exports=r},function(e,t,n){"use strict";var r=function(e){function t(e,n,r){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var i=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,n,r)),o=null;"number"===typeof n.frameWidthInput&&"number"===typeof n.frameHeightInput&&(o={},Object.defineProperties(o,{width:{value:n.frameWidthInput,enumerable:!0},height:{value:n.frameHeightInput,enumerable:!0}}));var a=null;return"number"===typeof n.frameWidthSent&&"number"===typeof n.frameHeightSent&&(a={},Object.defineProperties(a,{width:{value:n.frameWidthSent,enumerable:!0},height:{value:n.frameHeightSent,enumerable:!0}})),Object.defineProperties(i,{captureDimensions:{value:o,enumerable:!0},dimensions:{value:a,enumerable:!0},captureFrameRate:{value:"number"===typeof n.frameRateInput?n.frameRateInput:null,enumerable:!0},frameRate:{value:"number"===typeof n.frameRateSent?n.frameRateSent:null,enumerable:!0}}),i}return function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),t}(n(212));e.exports=r},function(e,t,n){"use strict";var r=function(e){function t(e,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var r=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,n));return Object.defineProperties(r,{audioLevel:{value:"number"===typeof n.audioOutputLevel?n.audioOutputLevel:null,enumerable:!0},jitter:{value:"number"===typeof n.jitter?n.jitter:null,enumerable:!0}}),r}return function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),t}(n(214));e.exports=r},function(e,t,n){"use strict";var r=function(e){function t(e,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var r=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,n)),i=null;return"number"===typeof n.frameWidthReceived&&"number"===typeof n.frameHeightReceived&&(i={},Object.defineProperties(i,{width:{value:n.frameWidthReceived,enumerable:!0},height:{value:n.frameHeightReceived,enumerable:!0}})),Object.defineProperties(r,{dimensions:{value:i,enumerable:!0},frameRate:{value:"number"===typeof n.frameRateReceived?n.frameRateReceived:null,enumerable:!0}}),r}return function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),t}(n(214));e.exports=r},function(e,t,n){"use strict";var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();var i=n(402),o=n(453),a=function(e){function t(e,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),n=Object.assign({createCancelableRoomSignalingPromise:i},n);var r=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return Object.defineProperties(r,{_createCancelableRoomSignalingPromise:{value:n.createCancelableRoomSignalingPromise},_options:{value:n},_wsServer:{value:e}}),r}return function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),r(t,[{key:"_connect",value:function(e,t,n,r,i){return i=Object.assign({},this._options,i),this._createCancelableRoomSignalingPromise.bind(null,t,this._wsServer,e,n,r,i)}},{key:"createLocalParticipantSignaling",value:function(e,t){return new o(e,t)}}]),t}(n(457));e.exports=a},function(e,t,n){"use strict";var r=n(134),i=n(403),o=n(422),a=n(448),s=n(77),u=s.SignalingConnectionDisconnectedError,c=s.SignalingIncomingMessageInvalidError,l=n(22),f=l.flatMap,h=l.createRoomConnectEventPayload;e.exports=function(e,t,n,s,l,d){var p=d=Object.assign({PeerConnectionManager:i,RoomV2:o,Transport:a},d),v=p.PeerConnectionManager,y=p.RoomV2,m=p.Transport,g=p.iceServers,b=p.log,_=new v(s,l,d),w=f(n.tracks,(function(e){return[e.trackTransceiver]}));_.setTrackSenders(w);var k=new Error("Canceled"),S=void 0,O=new r((function(r,i,o){var a=d,s=a.InsightsPublisher,l=a.NullInsightsPublisher,f=a.automaticSubscription,p=a.bandwidthProfile,v=a.dominantSpeaker,w=a.environment,O=a.eventObserver,E=a.loggerName,T=a.logLevel,C=a.name,P=a.networkMonitor,x=a.networkQuality,I=a.insights,j=a.realm,R=a.sdpSemantics,A=a.wsServerInsights,M=Object.assign({automaticSubscription:f,dominantSpeaker:v,environment:w,eventObserver:O,loggerName:E,logLevel:T,networkMonitor:P,networkQuality:x,iceServers:g,insights:I,onIced:function(e){return o()?(i(k),Promise.reject(k)):(b.debug("Got ICE servers:",e),d.iceServers=e,_.setConfiguration(d),_.createAndOffer().then((function(){if(o())throw i(k),k;b.debug("createAndOffer() succeeded."),_.dequeue("description")})).catch((function(e){throw b.error("createAndOffer() failed:",e),i(e),e})))},realm:j,sdpSemantics:R},"string"===typeof A?{wsServerInsights:A}:{},s?{InsightsPublisher:s}:{},l?{NullInsightsPublisher:l}:{},p?{bandwidthProfile:p}:{});S=new m(C,e,n,_,t,M);var N=h(d);O.emit("event",N),S.once("connected",(function(e){if(b.debug("Trans
2port connected:",e),o())i(k);else if(e.participant){var t=e.options.signaling_region;n.setSignalingRegion(t),r(new y(n,e,S,_,d))}else i(new c)})),S.once("stateChanged",(function(e,t){"disconnected"===e?(S=null,i(t||new u)):b.debug("Transport state changed:",e)}))}),(function(){S&&(S.disconnect(),S=null)}));return O.catch((function(){S&&(S.disconnect(),S=null),_.close()})),O}},function(e,t,n){"use strict";var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();function i(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)}var o=n(26).guessBrowser,a=n(404),s=n(201),u=n(421),c=n(22),l=n(77).MediaConnectionError,f="firefox"===o(),h=function(e){function t(e,r,i){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var o=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this)),u=(i=Object.assign({audioContextFactory:f?n(133):null,PeerConnectionV2:a},i)).audioContextFactory?i.audioContextFactory.getOrCreate(o):null,l=u?{offerToReceiveVideo:!0}:{offerToReceiveAudio:!0,offerToReceiveVideo:!0};return Object.defineProperties(o,{_audioContextFactory:{value:i.audioContextFactory},_closedPeerConnectionIds:{value:new Set},_configuration:{writable:!0,value:null},_configurationDeferred:{writable:!0,value:c.defer()},_connectionState:{value:"new",writable:!0},_dummyAudioTrackSender:{value:u?new s(d(u)):null},_encodingParameters:{value:e},_iceConnectionState:{writable:!0,value:"new"},_dataTrackSenders:{writable:!0,value:new Set},_lastConnectionState:{value:"new",writable:!0},_lastIceConnectionState:{writable:!0,value:"new"},_mediaTrackSenders:{writable:!0,value:new Set},_offerOptions:{value:l},_peerConnections:{value:new Map},_preferredCodecs:{value:r},_sessionTimeout:{value:null,writable:!0},_PeerConnectionV2:{value:i.PeerConnectionV2}}),o}return function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),r(t,[{key:"_closeAbsentPeerConnections",value:function(e){var t=new Set(e.map((function(e){return e.id})));return this._peerConnections.forEach((function(e){t.has(e.id)||e._close()})),this}},{key:"_getConfiguration",value:function(){return this._configurationDeferred.promise}},{key:"_getOrCreate",value:function(e,t){var n=this,r=this,i=this._peerConnections.get(e);if(!i){var o=this._PeerConnectionV2,a=Object.assign({dummyAudioMediaStreamTrack:this._dummyAudioTrackSender?this._dummyAudioTrackSender.track:null,offerOptions:this._offerOptions},this._sessionTimeout?{sessionTimeout:this._sessionTimeout}:{},t);try{i=new o(e,this._encodingParameters,this._preferredCodecs,a)}catch(s){throw new l}this._peerConnections.set(i.id,i),i.on("candidates",this.queue.bind(this,"candidates")),i.on("description",this.queue.bind(this,"description")),i.on("trackAdded",this.queue.bind(this,"trackAdded")),i.on("stateChanged",(function e(t){"closed"===t&&(i.removeListener("stateChanged",e),r._peerConnections.delete(i.id),r._closedPeerConnectionIds.add(i.id),w(r),_(r))})),i.on("connectionStateChanged",(function(){return w(n)})),i.on("iceConnectionStateChanged",(function(){return _(n)})),this._dataTrackSenders.forEach(i.addDataTrackSender,i),this._mediaTrackSenders.forEach(i.addMediaTrackSender,i),_(this)}return i}},{key:"close",value:function(){return this._peerConnections.forEach((function(e){e.close()})),this._dummyAudioTrackSender&&this._dummyAudioTrackSender.stop(),this._audioContextFactory&&this._audioContextFactory.release(this),_(this),this}},{key:"createAndOffer",value:function(){var e=this;return this._getConfiguration().then((function(t){var n=void 0;do{n=c.makeUUID()}while(e._peerConnections.has(n));return e._getOrCreate(n,t)})).then((function(e){return e.offer()})).then((function(){return e}))}},{key:"getTrackReceivers",value:function(){return c.flatMap(this._peerConnections,(function(e){return e.getTrackReceivers()}))}},{key:"getStates",value:function(){var e=[];return this._peerConnections.forEach((function(t){var n=t.getState();n&&e.push(n)})),e}},{key:"setConfiguration",value:function(e){return this._configuration&&(this._configurationDeferred=c.defer(),this._peerConnections.forEach((function(t){t.setConfiguration(e)}))),this._configuration=e,this._configurationDeferred.resolve(e),this}},{key:"setIceReconnectTimeout",value:function(e){return null===this._sessionTimeout&&(this._peerConnections.forEach((function(t){t.setIceReconnectTimeout(e)})),this._sessionTimeout=e),this}},{key:"setTrackSenders",value:function(e){var t=new Set(e.filter((function(e){return"data"===e.kind}))),n=new Set(e.filter((function(e){return e&&("audio"===e.kind||"video"===e.kind)}))),r=function(e,t,n){return{data:p(e,t),media:v(e,n)}}(this,t,n);return this._dataTrackSenders=t,this._mediaTrackSenders=n,function(e,t){(t.data.add.size||t.data.remove.size||t.media.add.size||t.media.remove.size)&&e._peerConnections.forEach((function(e){t.data.remove.forEach(e.removeDataTrackSender,e),t.media.remove.forEach(e.removeMediaTrackSender,e),t.data.add.forEac
2h(e.addDataTrackSender,e),t.media.add.forEach(e.addMediaTrackSender,e),(t.media.add.size||t.media.remove.size||t.data.add.size&&!e.isApplicationSectionNegotiated)&&e.offer()}))}(this,r),this}},{key:"update",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return n&&this._closeAbsentPeerConnections(e),this._getConfiguration().then((function(n){return Promise.all(e.map((function(e){return t._closedPeerConnectionIds.has(e.id)?null:t._getOrCreate(e.id,n).update(e)})))})).then((function(){return t}))}},{key:"getStats",value:function(){var e=Array.from(this._peerConnections.values());return Promise.all(e.map((function(e){return e.getStats().then((function(t){return[e.id,t]}))}))).then((function(e){return new Map(e)}))}},{key:"connectionState",get:function(){return this._connectionState}},{key:"iceConnectionState",get:function(){return this._iceConnectionState}}]),t}(u);function d(e){return e.createMediaStreamDestination().stream.getAudioTracks()[0]}function p(e,t){return{add:c.difference(t,e._dataTrackSenders),remove:c.difference(e._dataTrackSenders,t)}}function v(e,t){return{add:c.difference(t,e._mediaTrackSenders),remove:c.difference(e._mediaTrackSenders,t)}}var y={new:0,checking:1,connecting:2,connected:3,completed:4,disconnected:-1,failed:-2,closed:-3},m=void 0;function g(){return Object.keys(y).reduce((function(e,t){return Object.assign(e,(i=t,(r=y[t])in(n={})?Object.defineProperty(n,r,{value:i,enumerable:!0,configurable:!0,writable:!0}):n[r]=i,n));var n,r,i}),{})}function b(e){return e.length?(m=m||g(),e.reduce((function(e,t){return m[Math.max(y[e],y[t])]}))):"new"}function _(e){e._lastIceConnectionState=e.iceConnectionState,e._iceConnectionState=b([].concat(i(e._peerConnections.values())).map((function(e){return e.iceConnectionState}))),e.iceConnectionState!==e._lastIceConnectionState&&e.emit("iceConnectionStateChanged")}function w(e){e._lastConnectionState=e.connectionState,e._connectionState=b([].concat(i(e._peerConnections.values())).map((function(e){return e.connectionState}))),e.connectionState!==e._lastConnectionState&&e.emit("connectionStateChanged")}e.exports=h},function(e,t,n){"use strict";var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();var i=n(215),o=n(69),a=o.MediaStream,s=o.RTCIceCandidate,u=o.RTCPeerConnection,c=o.RTCSessionDescription,l=o.getStats,f=n(26).guessBrowser,h=n(87).getSdpFormat,d=n(35),p=d.DEFAULT_ICE_GATHERING_TIMEOUT_MS,v=d.DEFAULT_LOG_LEVEL,y=d.DEFAULT_SESSION_TIMEOUT_SEC,m=d.iceRestartBackoffConfig,g=n(99),b=g.createCodecMapForMediaSection,_=g.disableRtx,w=g.enableDtxForOpus,k=g.getMediaSections,S=g.removeSSRCAttributes,O=g.revertSimulcastForNonVP8MediaSections,E=g.setBitrateParameters,T=g.setCodecPreferences,C=g.setSimulcast,P=g.unifiedPlanAddOrRewriteNewTrackIds,x=g.unifiedPlanAddOrRewriteTrackIds,I=g.unifiedPlanFilterLocalCodecs,j=n(114),R=n(77),A=R.MediaClientLocalDescFailedError,M=R.MediaClientRemoteDescFailedError,N=n(22),L=N.buildLogLevels,D=N.isChromeScreenShareTrack,F=N.oncePerTick,U=n(411),V=n(413),B=n(414),q=n(416),W=n(89),z=n(88),H=n(417),G=n(418),K=n(419),Y=n(420),Q=f(),$="chrome"===Q,X="firefox"===Q,J="safari"===Q,Z="undefined"!==typeof RTCRtpSender&&"function"===typeof RTCRtpSender.prototype.getParameters&&"function"===typeof RTCRtpSender.prototype.setParameters,ee=0,te={open:["closed","updating"],updating:["closed","open"],closed:[]},ne=function(e){function t(e,n,r,o){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var l=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,"open",te)),f=ae(o=Object.assign({enableDscp:!1,dummyAudioMediaStreamTrack:null,isChromeScreenShareTrack:D,iceServers:[],isRTCRtpSenderParamsSupported:Z,logLevel:v,offerOptions:{},revertSimulcastForNonVP8MediaSections:O,sessionTimeout:1e3*y,setBitrateParameters:E,setCodecPreferences:T,setSimulcast:C,Backoff:i,IceConnectionMonitor:V,MediaStream:a,RTCIceCandidate:s,RTCPeerConnection:u,RTCSessionDescription:c,Timeout:j},o)),d=h(f.sdpSemantics),g="unified"===d,b=g?null:new o.MediaStream,_=L(o.logLevel),w=o.RTCPeerConnection;!0===o.enableDscp&&(o.chromeSpecificConstraints=o.chromeSpecificConstraints||{},o.chromeSpecificConstraints.optional=o.chromeSpecificConstraints.optional||[],o.chromeSpecificConstraints.optional.pu
2sh({googDscp:!0}));var k=o.log?o.log.createLog("webrtc",l):new z("webrtc",l,_,o.loggerName),S=new w(f,o.chromeSpecificConstraints);o.dummyAudioMediaStreamTrack&&S.addTrack(o.dummyAudioMediaStreamTrack,b||new o.MediaStream),Object.defineProperties(l,{_appliedTrackIdsToAttributes:{value:new Map,writable:!0},_dataChannels:{value:new Map},_dataTrackReceivers:{value:new Set},_descriptionRevision:{writable:!0,value:0},_didGenerateLocalCandidates:{writable:!0,value:!1},_enableDscp:{value:o.enableDscp},_encodingParameters:{value:n},_isChromeScreenShareTrack:{value:o.isChromeScreenShareTrack},_iceGatheringFailed:{value:!1,writable:!0},_iceGatheringTimeout:{value:new o.Timeout((function(){return l._handleIceGatheringTimeout()}),p,!1)},_iceRestartBackoff:{value:o.Backoff.exponential(m)},_instanceId:{value:++ee},_isIceConnectionInactive:{writable:!0,value:!1},_isIceLite:{writable:!0,value:!1},_isIceRestartBackoffInProgress:{writable:!0,value:!1},_isRestartingIce:{writable:!0,value:!1},_isUnifiedPlan:{value:g},_isRTCRtpSenderParamsSupported:{value:o.isRTCRtpSenderParamsSupported},_lastIceConnectionState:{writable:!0,value:null},_lastStableDescriptionRevision:{writable:!0,value:0},_localCandidates:{writable:!0,value:[]},_localCodecs:{value:new Set},_localCandidatesRevision:{writable:!0,value:1},_localDescriptionWithoutSimulcast:{writable:!0,value:null},_localDescription:{writable:!0,value:null},_localMediaStream:{value:b},_localUfrag:{writable:!0,value:null},_log:{value:k},_remoteCodecMaps:{value:new Map},_rtpSenders:{value:new Map},_iceConnectionMonitor:{value:new o.IceConnectionMonitor(S)},_mediaTrackReceivers:{value:new Set},_needsAnswer:{writable:!0,value:!1},_negotiationRole:{writable:!0,value:null},_offerOptions:{writable:!0,value:o.offerOptions},_onEncodingParametersChanged:{value:F((function(){l._isRTCRtpSenderParamsSupported?l._needsAnswer||ce(l):l.offer()}))},_peerConnection:{value:S},_preferredAudioCodecs:{value:r.audio},_preferredVideoCodecs:{value:r.video},_shouldApplyDtx:{value:r.audio.every((function(e){return"opus"!==e.codec}))||r.audio.some((function(e){var t=e.codec,n=e.dtx;return"opus"===t&&n}))},_shouldApplySimulcast:{value:($||J)&&r.video.some((function(e){return"vp8"===e.codec.toLowerCase()&&e.simulcast}))},_queuedDescription:{writable:!0,value:null},_iceReconnectTimeout:{value:new o.Timeout((function(){k.debug("ICE reconnect timed out"),l.close()}),o.sessionTimeout,!1)},_recycledTransceivers:{value:{audio:[],video:[]}},_replaceTrackPromises:{value:new Map},_remoteCandidates:{writable:!0,value:new U},_sdpFormat:{value:d},_setBitrateParameters:{value:o.setBitrateParameters},_setCodecPreferences:{value:o.setCodecPreferences},_setSimulcast:{value:o.setSimulcast},_revertSimulcastForNonVP8MediaSections:{value:o.revertSimulcastForNonVP8MediaSections},_RTCIceCandidate:{value:o.RTCIceCandidate},_RTCPeerConnection:{value:o.RTCPeerConnection},_RTCSessionDescription:{value:o.RTCSessionDescription},_shouldOffer:{writable:!0,value:!1},_shouldRestartIce:{writable:!0,value:!1},_trackIdsToAttributes:{value:new Map,writable:!0},_trackMatcher:{writable:!0,value:null},id:{enumerable:!0,value:e}}),n.on("changed",l._onEncodingParametersChanged),S.addEventListener("connectionstatechange",l._handleConnectionStateChange.bind(l)),S.addEventListener("datachannel",l._handleDataChannelEvent.bind(l)),S.addEventListener("icecandidate",l._handleIceCandidateEvent.bind(l)),S.addEventListener("iceconnectionstatechange",l._handleIceConnectionStateChange.bind(l)),S.addEventListener("icegatheringstatechange",l._handleIceGatheringStateChange.bind(l)),S.addEventListener("signalingstatechange",l._handleSignalingStateChange.bind(l)),S.addEventListener("track",l._handleTrackEvent.bind(l)),l._iceRestartBackoff.on("ready",(function(){return l._initiateIceRestart()}));var P=l;return l.on("stateChanged",(function e(t){"closed"===t&&(P.removeListener("stateChanged",e),P._dataChannels.forEach((function(e,t){P.removeDataTrackSender(t)})))})),l}return function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),r(t,[{key:"toString",value:function(){return"[PeerConnectionV2 #"+this._instanceId+": "+this.id+"]"}},{key:"_addIceCandidate",value:function(e){var t=this;return Promise.resolve().then((function(){return e=new t._RTCIceCandidate(e),t._peerConnection.addIceCandidate(e)})).catch((function(n){t._log.warn("Failed to add RTCIceCandidate "+(e?'"'+e.candidate+'"'
2:"null")+": "+n.message)}))}},{key:"_addIceCandidates",value:function(e){return Promise.all(e.map(this._addIceCandidate,this)).then((function(){}))}},{key:"_addOrUpdateTransceiver",value:function(e){var t=this,n=function(e,t){var n={audio:e._preferredAudioCodecs.map((function(e){return e.codec.toLowerCase()})),video:e._preferredVideoCodecs.map((function(e){return e.codec.toLowerCase()}))}[t],r=e._recycledTransceivers[t],i=n.find((function(t){return e._localCodecs.has(t)}));if(!i)return r.shift();var o=r.find((function(t){var n=e._remoteCodecMaps.get(t.mid);return n&&n.has(i)}));o&&r.splice(r.indexOf(o),1);return o}(this,e.kind);if(n&&n.sender){var r=n.sender.track?n.sender.track.id:null;return r&&this._log.warn("Reusing transceiver: "+n.mid+"] "+r+" => "+e.id),this._replaceTrackPromises.set(n,n.sender.replaceTrack(e).then((function(){n.direction="sendrecv"}),(function(){})).finally((function(){t._replaceTrackPromises.delete(n)}))),n}return this._peerConnection.addTransceiver(e)}},{key:"_checkIceBox",value:function(e){var t=oe(e);if(!t)return Promise.resolve();var n=this._remoteCandidates.setUfrag(t);return this._addIceCandidates(n)}},{key:"_answer",value:function(e){var t=this;return Promise.resolve().then((function(){return t._negotiationRole||(t._negotiationRole="answerer"),t._setRemoteDescription(e)})).catch((function(){throw new M})).then((function(){return t._peerConnection.createAnswer()})).then((function(n){n=X?new t._RTCSessionDescription({sdp:_(n.sdp),type:n.type}):Y(n);var r=S(n.sdp,["mslabel","label"]);if(t._shouldApplySimulcast){var i=r;r=t._setSimulcast(i,t._sdpFormat,t._trackIdsToAttributes),r=t._revertSimulcastForNonVP8MediaSections(r,i,e.sdp)}return r=r.replace(/42e015/g,"42e01f"),t._setLocalDescription({type:n.type,sdp:r})})).then((function(){return t._checkIceBox(e)})).then((function(){return t._queuedDescription&&t._updateDescription(t._queuedDescription)})).then((function(){return t._queuedDescription=null,t._maybeReoffer(t._peerConnection.localDescription)})).catch((function(e){throw e instanceof M?e:new A}))}},{key:"_close",value:function(){return this._iceConnectionMonitor.stop(),"closed"!==this._peerConnection.signalingState&&(this._peerConnection.close(),this.preempt("closed"),this._encodingParameters.removeListener("changed",this._onEncodingParametersChanged),!0)}},{key:"_handleConnectionStateChange",value:function(){this.emit("connectionStateChanged")}},{key:"_handleDataChannelEvent",value:function(e){var t=this,n=e.channel,r=new B(n);this._dataTrackReceivers.add(r),n.addEventListener("close",(function(){t._dataTrackReceivers.delete(r)})),this.emit("trackAdded",r)}},{key:"_handleGlare",value:function(e){var t=this;return this._log.debug("Glare detected; rolling back"),this._isRestartingIce&&(this._log.debug("An ICE restart was in progress; we'll need to restart ICE again after rolling back"),this._isRestartingIce=!1,this._shouldRestartIce=!0),Promise.resolve().then((function(){return t._trackIdsToAttributes=new Map(t._appliedTrackIdsToAttributes),t._setLocalDescription({type:"rollback"})})).then((function(){return t._needsAnswer=!1,t._answer(e)})).then((function(e){return e?Promise.resolve():t._offer()}))}},{key:"_handleIceCandidateEvent",value:function(e){e.candidate&&(this._log.debug("Clearing ICE gathering timeout"),this._didGenerateLocalCandidates=!0,this._iceGatheringTimeout.clear(),this._localCandidates.push(e.candidate));var t={ice:{candidates:this._isIceLite?[]:this._localCandidates.slice(),ufrag:this._localUfrag},id:this.id};e.candidate||(t.ice.complete=!0),this._isIceLite&&e.candidate||(t.ice.revision=this._localCandidatesRevision++,this.emit("candidates",t))}},{key:"_handleIceConnectionStateChange",value:function(){var e=this,t=this._peerConnection.iceConnectionState,n=["connected","completed"].includes(t),r=this._log;r.debug('ICE connection state is "'+t+'"'),n&&(this._iceReconnectTimeout.clear(),this._iceRestartBackoff.reset()),"failed"===this._lastIceConnectionState||"failed"!==t||this._shouldRestartIce||this._isRestartingIce?["disconnected","failed"].includes(this._lastIceConnectionState)&&n&&r.debug("ICE reconnected"):(r.warn("ICE failed"),this._initiateIceRestartBackoff()),"connected"===t?(this._isIceConnectionInactive=!1,this._iceConnectionMonitor.start((function(){e._iceConnectionMonitor.stop(),e._shouldRestartIce||e._isRestartingIce||(r.warn("ICE Connection Monitor detected inactivity"),e._isIceConnectionInactive=!0,e._initiateIceRestartBackoff(),e.emit("iceConnectionStateChanged"),e.emit("connectionStateChanged"))}))):["disconnected","completed"].includes(t)||(this._iceConnectionMonitor.stop(),this._isIceConnectionInactive=!1),this._lastIceConnectionState=t,this.emit
2("iceConnectionStateChanged")}},{key:"_handleIceGatheringTimeout",value:function(){this._log.warn("ICE failed to gather any local candidates"),this._iceGatheringFailed=!0,this._initiateIceRestartBackoff(),this.emit("iceConnectionStateChanged"),this.emit("connectionStateChanged")}},{key:"_handleIceGatheringStateChange",value:function(){var e=this._peerConnection.iceGatheringState,t=this._log;t.debug('ICE gathering state is "'+e+'"');var n=this._iceGatheringTimeout,r=n.delay,i=n.isSet;"gathering"!==e||this._didGenerateLocalCandidates||i||(t.debug("Starting ICE gathering timeout: "+r),this._iceGatheringFailed=!1,this._iceGatheringTimeout.start())}},{key:"_handleSignalingStateChange",value:function(){"stable"===this._peerConnection.signalingState&&(this._appliedTrackIdsToAttributes=new Map(this._trackIdsToAttributes))}},{key:"_handleTrackEvent",value:function(e){var t=this,n=this._peerConnection.remoteDescription?this._peerConnection.remoteDescription.sdp:null;this._trackMatcher||(this._trackMatcher=e.transceiver&&e.transceiver.mid?new K:J||this._isUnifiedPlan?new G:new H),this._trackMatcher.update(n);var r=e.track,i=this._trackMatcher.match(e)||r.id,o=new q(i,r);this._mediaTrackReceivers.forEach((function(e){e.track.id===o.track.id&&t._mediaTrackReceivers.delete(e)})),this._mediaTrackReceivers.add(o),r.addEventListener("ended",(function(){return t._mediaTrackReceivers.delete(o)})),this.emit("trackAdded",o)}},{key:"_initiateIceRestart",value:function(){if("closed"!==this._peerConnection.signalingState){var e=this._log;e.warn("Attempting to restart ICE"),this._didGenerateLocalCandidates=!1,this._isIceRestartBackoffInProgress=!1,this._shouldRestartIce=!0;var t=this._iceReconnectTimeout,n=t.delay;t.isSet||(e.debug("Starting ICE reconnect timeout: "+n),this._iceReconnectTimeout.start()),this.offer()}}},{key:"_initiateIceRestartBackoff",value:function(){"closed"===this._peerConnection.signalingState||this._isIceRestartBackoffInProgress||(this._log.warn("An ICE restart has been scheduled"),this._isIceRestartBackoffInProgress=!0,this._iceRestartBackoff.backoff())}},{key:"_maybeReoffer",value:function(e){var t=this._shouldOffer;if(e&&e.sdp){if(this._isUnifiedPlan){var n=this._peerConnection.getSenders().filter((function(e){return e.track}));t=["audio","video"].reduce((function(t,r){var i=k(e.sdp,r,"(sendrecv|sendonly)"),o=n.filter(se.bind(null,r));return t||i.length<o.length}),t)}var r=this._dataChannels.size>0,i=k(e.sdp,"application").length>0;t=t||r&&!i}return(t?this._offer():Promise.resolve()).then((function(){return t}))}},{key:"_offer",value:function(){var e=this,t=Object.assign({},this._offerOptions);return this._needsAnswer=!0,this._shouldRestartIce&&(this._shouldRestartIce=!1,this._isRestartingIce=!0,t.iceRestart=!0),Promise.all(this._replaceTrackPromises.values()).then((function(){return e._peerConnection.createOffer(t)})).catch((function(){throw new A})).then((function(t){t=X?new e._RTCSessionDescription({sdp:_(t.sdp),type:t.type}):Y(t);var n=S(t.sdp,["mslabel","label"]);n=e._isUnifiedPlan&&e._peerConnection.remoteDescription?I(n,e._peerConnection.remoteDescription.sdp):n;var r=e._setCodecPreferences(n,e._preferredAudioCodecs,e._preferredVideoCodecs);return e._shouldOffer=!1,e._negotiationRole||(e._negotiationRole="offerer"),e._shouldApplySimulcast&&(e._localDescriptionWithoutSimulcast={type:"offer",sdp:r},r=e._setSimulcast(r,e._sdpFormat,e._trackIdsToAttributes)),e._setLocalDescription({type:"offer",sdp:r})}))}},{key:"_getMediaTrackSenderId",value:function(e){var t=Array.from(this._rtpSenders.keys()).find((function(t){return t.track.id===e}));return t?t.id:e}},{key:"_addOrRewriteLocalTrackIds",value:function(e){var t=this,n=this._peerConnection.getTransceivers().filter((function(e){var t=e.sender;return!e.stopped&&t&&t.track})),r=n.filter((function(e){return e.mid})),i=new Map(r.map((function(e){var n=e.mid,r=e.sender;return[n,t._getMediaTrackSenderId(r.track.id)]}))),o=x(e.sdp,i),a=n.filter((function(e){return!e.mid})),s=new Map(["audio","video"].map((function(e){return[e,a.filter((function(t){return t.sender.track.kind===e})).map((function(e){var n=e.sender;return t._getMediaTrackSenderId(n.track.id)}))]}))),u=P(o,i,s);return new this._RTCSessionDescription({sdp:u,type:e.type})}},{key:"_rollbackAndApplyOffer",value:function(e){var t=this;return this._setLocalDescription({type:"rollback"}).then((function(){return t._setLocalDescription(e)}))}}
2,{key:"_setLocalDescription",value:function(e){var t=this;return"rollback"!==e.type&&this._shouldApplyDtx&&(e=new this._RTCSessionDescription({sdp:w(e.sdp),type:e.type})),this._peerConnection.setLocalDescription(e).catch((function(n){throw t._log.warn('Calling setLocalDescription with an RTCSessionDescription of type "'+e.type+'" failed with the error "'+n.message+'".'),e.sdp&&t._log.warn("The SDP was "+e.sdp),new A})).then((function(){"rollback"!==e.type&&(t._localDescription=t._isUnifiedPlan?t._addOrRewriteLocalTrackIds(e):e,t._shouldApplyDtx&&(t._localDescription=new t._RTCSessionDescription({sdp:w(t._localDescription.sdp,[]),type:t._localDescription.type})),t._localCandidates=[],"offer"===e.type?t._descriptionRevision++:"answer"===e.type&&(t._lastStableDescriptionRevision=t._descriptionRevision,ue(t)),t._localUfrag=oe(e),t.emit("description",t.getState()))}))}},{key:"_setRemoteDescription",value:function(e){var t=this;return e.sdp&&(this._isRTCRtpSenderParamsSupported||(e.sdp=this._setBitrateParameters(e.sdp,X?"TIAS":"AS",this._encodingParameters.maxAudioBitrate,this._encodingParameters.maxVideoBitrate)),e.sdp=this._setCodecPreferences(e.sdp,this._preferredAudioCodecs,this._preferredVideoCodecs),this._shouldApplyDtx?e.sdp=w(e.sdp):e.sdp=w(e.sdp,[]),X&&(e.sdp=e.sdp.replace(/a=msid:[^ ]+ /g,"a=msid:- ")),this._peerConnection.remoteDescription||(this._isIceLite=/a=ice-lite/.test(e.sdp))),e=new this._RTCSessionDescription(e),Promise.resolve().then((function(){if("answer"===e.type&&t._shouldApplySimulcast){var n=t._revertSimulcastForNonVP8MediaSections(t._localDescription.sdp,t._localDescriptionWithoutSimulcast.sdp,e.sdp);if(n!==t._localDescription.sdp)return t._rollbackAndApplyOffer({type:t._localDescription.type,sdp:n})}})).then((function(){return t._peerConnection.setRemoteDescription(e)})).then((function(){"answer"===e.type&&(t._isRestartingIce&&(t._log.debug("An ICE restart was in-progress and is now completed"),t._isRestartingIce=!1),ue(t))}),(function(n){throw t._log.warn('Calling setRemoteDescription with an RTCSessionDescription of type "'+e.type+'" failed with the error "'+n.message+'".'),e.sdp&&t._log.warn("The SDP was "+e.sdp),n}))}},{key:"_updateDescription",value:function(e){var t=this;switch(e.type){case"answer":case"pranswer":if(e.revision!==this._descriptionRevision||"have-local-offer"!==this._peerConnection.signalingState)return Promise.resolve();this._descriptionRevision=e.revision;break;case"close":return this._close();case"create-offer":return e.revision<=this._lastStableDescriptionRevision?Promise.resolve():this._needsAnswer?(this._queuedDescription=e,Promise.resolve()):(this._descriptionRevision=e.revision,this._offer());case"offer":return e.revision<=this._lastStableDescriptionRevision||"closed"===this._peerConnection.signalingState?Promise.resolve():"have-local-offer"===this._peerConnection.signalingState?this._needsAnswer&&0===this._lastStableDescriptionRevision?(this._queuedDescription=e,Promise.resolve()):(this._descriptionRevision=e.revision,this._handleGlare(e)):(this._descriptionRevision=e.revision,this._answer(e).then((function(){})))}var n=e.revision;return Promise.resolve().then((function(){return t._setRemoteDescription(e)})).catch((function(){throw new M})).then((function(){return t._lastStableDescriptionRevision=n,t._needsAnswer=!1,t._checkIceBox(e)})).then((function(){return t._queuedDescription&&t._updateDescription(t._queuedDescription)})).then((function(){return t._queuedDescription=null,t._maybeReoffer(t._peerConnection.localDescription).then((function(){}))}))}},{key:"_updateIce",value:function(e){var t=this._remoteCandidates.update(e);return this._addIceCandidates(t)}},{key:"addDataTrackSender",value:function(e){if(!this._dataChannels.has(e))try{var t={ordered:e.ordered};null!==e.maxPacketLifeTime&&(t.maxPacketLifeTime=e.maxPacketLifeTime),null!==e.maxRetransmits&&(t.maxRetransmits=e.maxRetransmits);var n=this._peerConnection.createDataChannel(e.id,t);e.addDataChannel(n),this._dataChannels.set(e,n)}catch(r){this._log.warn('Error creating an RTCDataChannel for DataTrack "'+e.id+'": '+r.message)}}},{key:"addMediaTrackSender",value:function(e){if("closed"!==this._peerConnection.signalingState&&!this._rtpSe
2nders.has(e)){var t=void 0;if(this._localMediaStream)this._localMediaStream.addTrack(e.track),t=this._peerConnection.addTrack(e.track,this._localMediaStream);else t=this._addOrUpdateTransceiver(e.track).sender;e.addSender(t),this._rtpSenders.set(e,t)}}},{key:"close",value:function(){this._close()&&(this._descriptionRevision++,this._localDescription={type:"close"},this.emit("description",this.getState()))}},{key:"getTrackReceivers",value:function(){return Array.from(this._dataTrackReceivers).concat(Array.from(this._mediaTrackReceivers))}},{key:"getState",value:function(){if(!this._localDescription)return null;var e="answer"===this._localDescription.type?this._lastStableDescriptionRevision:this._descriptionRevision,t={type:this._localDescription.type,revision:e};return this._localDescription.sdp&&(t.sdp=this._localDescription.sdp),{description:t,id:this.id}}},{key:"offer",value:function(){var e=this;return this._needsAnswer||this._isRestartingIce?(this._shouldOffer=!0,Promise.resolve()):this.bracket("offering",(function(t){return e.transition("updating",t),(e._needsAnswer||e._isRestartingIce?Promise.resolve():e._offer()).then((function(){e.tryTransition("open",t)}),(function(n){throw e.tryTransition("open",t),n}))}))}},{key:"removeDataTrackSender",value:function(e){var t=this._dataChannels.get(e);t&&(e.removeDataChannel(t),this._dataChannels.delete(e),t.close())}},{key:"removeMediaTrackSender",value:function(e){if("closed"!==this._peerConnection.signalingState&&this._rtpSe
2nders.has(e)){var t=this._rtpSenders.get(e);this._peerConnection.removeTrack(t),this._localMediaStream&&this._localMediaStream.removeTrack(e.track),e.removeSender(t),this._rtpSenders.delete(e)}}},{key:"setConfiguration",value:function(e){"function"===typeof this._peerConnection.setConfiguration&&this._peerConnection.setConfiguration(ae(e))}},{key:"setIceReconnectTimeout",value:function(e){return this._iceReconnectTimeout.setDelay(e),this._log.debug("Updated ICE reconnection timeout period:",this._iceReconnectTimeout.delay),this}},{key:"update",value:function(e){var t=this;return this.bracket("updating",(function(n){if("closed"===t.state)return Promise.resolve();t.transition("updating",n);var r=[];return e.ice&&r.push(t._updateIce(e.ice)),e.description&&r.push(t._updateDescription(e.description)),Promise.all(r).then((function(){t.tryTransition("open",n)}),(function(e){throw t.tryTransition("open",n),e}))}))}},{key:"getStats",value:function(){var e=this;return l(this._peerConnection).then((function(t){return function(e,t){return Object.assign(t,{remoteAudioTrackStats:t.remoteAudioTrackStats.map((function(t){return ie(e,t)})),remoteVideoTrackStats:t.remoteVideoTrackStats.map((function(t){return ie(e,t)})),localAudioTrackStats:t.localAudioTrackStats.map((function(t){return re(e,t)})),localVideoTrackStats:t.localVideoTrackStats.map((function(t){return re(e,t)}))})}(e,t)}))}},{key:"connectionState",get:function(){return"failed"===this.iceConnectionState?"failed":this._peerConnection.connectionState||this.iceConnectionState}},{key:"iceConnectionState",get:function(){return this._isIceConnectionInactive&&"disconnected"===this._peerConnection.iceConnectionState||this._iceGatheringFailed?"failed":this._peerConnection.iceConnectionState}},{key:"isApplicationSectionNegotiated",get:function(){return"closed"===this._peerConnection.signalingState||!!this._peerConnection.localDescription&&k(this._peerConnection.localDescription.sdp,"application").length>0}}]),t}(W);function re(e,t){var n=e._getMediaTrackSenderId(t.trackId);return Object.assign(t,{trackId:n})}function ie(e,t){var n=[].concat(function(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)}(e._mediaTrackReceivers)).find((function(e){return e.track.id===t.trackId})),r=n?n.id:null;return Object.assign(t,{trackId:r})}function oe(e){if(e.sdp){var t=e.sdp.match(/^a=ice-ufrag:([a-zA-Z0-9+/]+)/m);if(t)return t[1]}return null}function ae(e){return Object.assign({bundlePolicy:"max-bundle",rtcpMuxPolicy:"require"},e)}function se(e,t){var n=t.track;return n&&n.kind===e&&"ended"!==n.readyState}function ue(e){e._isUnifiedPlan&&(function(e){e._recycledTransceivers.audio=[],e._recycledTransceivers.video=[],e._peerConnection.getTransceivers().forEach((function(t){if(function(e,t){return!e.stopped&&!t._replaceTrackPromises.has(e)&&["inactive","recvonly"].includes(e.direction)}(t,e)){var n=t.receiver.track;e._recycledTransceivers[n.kind].push(t)}}))}(e),function(e){var t=e._peerConnection.localDescription;t&&k(t.sdp).forEach((function(t){b(t).forEach((function(t,n){return e._localCodecs.add(n)}))}))}(e),function(e){var t=e._peerConnection.remoteDescription;t&&k(t.sdp).forEach((function(t){var n=t.match(/^a=mid:(.+)$/m)[1],r=b(t);e._remoteCodecMaps.set(n,r)}))}(e)),e._isRTCRtpSenderParamsSupported&&ce(e)}function ce(e){var t=e._encodingParameters,n=t.maxAudioBitrate,r=t.maxVideoBitrate,i=new Map([["audio",n],["video",r]]);e._peerConnection.getSenders().filter((function(e){return e.track})).forEach((function(t){var n=i.get(t.track.kind),r=t.getParameters();null===n||0===n?function(e){Array.isArray(e.encodings)&&e.encodings.forEac
2h((function(e){return delete e.maxBitrate}))}(r):e._isChromeScreenShareTrack(t.track)?e._log.warn("Not setting maxBitrate for "+t.track.kind+" Track "+t.track.id+" because it appears to be screen share track: "+t.track.label):function(e,t){X?e.encodings=[{maxBitrate:t}]:e.encodings.forEach((function(e){e.maxBitrate=t}))}(r,n),!X&&e._enableDscp&&r.encodings.length>0&&(r.encodings[0].networkPriority="high"),t.setParameters(r).catch((function(n){e._log.warn("Error while setting encodings parameters for "+t.track.kind+" Track "+t.track.id+": "+(n.message||n.name))}))}))}e.exports=ne},function(e,t,n){var r=n(48),i=e.exports=n(406);function o(e,t,n,i){n=n||"";var o=new e(r.format.apply(this,[n].concat(i)));throw Error.captureStackTrace(o,t),o}function a(e,t,n){o(i.IllegalArgumentError,e,t,n)}function s(e,t,n){o(i.IllegalStateError,e,t,n)}function u(e){var t=typeof e;if("object"==t){if(!e)return"null";if(e instanceof Array)return"array"}return t}function c(e){return function(t,n){var r=u(t);if(r==e)return t;a(arguments.callee,n||'Expected "'+e+'" but got "'+r+'".',Array.prototype.slice.call(arguments,2))}}e.exports.checkArgument=function(e,t){e||a(arguments.callee,t,Array.prototype.slice.call(arguments,2))},e.exports.checkState=function(e,t){e||s(arguments.callee,t,Array.prototype.slice.call(arguments,2))},e.exports.checkIsDef=function(e,t){if(void 0!==e)return e;a(arguments.callee,t||"Expected value to be defined but was undefined.",Array.prototype.slice.call(arguments,2))},e.exports.checkIsDefAndNotNull=function(e,t){if(null!=e)return e;a(arguments.callee,t||'Expected value to be defined and not null but got "'+u(e)+'".',Array.prototype.slice.call(arguments,2))},e.exports.checkIsString=c("string"),e.exports.checkIsArray=c("array"),e.exports.checkIsNumber=c("number"),e.exports.checkIsBoolean=c("boolean"),e.exports.checkIsFunction=c("function"),e.exports.checkIsObject=c("object")},function(e,t,n){var r=n(48);function i(e){Error.call(this,e),this.message=e}function o(e){Error.call(this,e),this.message=e}r.inherits(i,Error),i.prototype.name="IllegalArgumentError",r.inherits(o,Error),o.prototype.name="IllegalStateError",e.exports.IllegalStateError=o,e.exports.IllegalArgumentError=i},function(e,t,n){var r=n(48),i=n(138),o=n(217);function a(e){o.call(this,e),this.backoffDelay_=0,this.nextBackoffDelay_=this.getInitialDelay(),this.factor_=a.DEFAULT_FACTOR,e&&void 0!==e.factor&&(i.checkArgument(e.factor>1,"Exponential factor should be greater than 1 but got %s.",e.factor),this.factor_=e.factor)}r.inherits(a,o),a.DEFAULT_FACTOR=2,a.prototype.next_=function(){return this.backoffDelay_=Math.min(this.nextBackoffDelay_,this.getMaxDelay()),this.nextBackoffDelay_=this.backoffDelay_*this.factor_,this.backoffDelay_},a.prototype.reset_=function(){this.backoffDelay_=0,this.nextBackoffDelay_=this.getInitialDelay()},e.exports=a},function(e,t,n){var r=n(18),i=n(138),o=n(48),a=n(216),s=n(218);function u(e,t,n){r.EventEmitter.call(this),i.checkIsFunction(e,"Expected fn to be a function."),i.checkIsArray(t,"Expected args to be an array."),i.checkIsFunction(n,"Expected callback to be a function."),this.function_=e,this.arguments_=t,this.callback_=n,this.lastResult_=[],this.numRetries_=0,this.backoff_=null,this.strategy_=null,this.failAfter_=-1,this.retryPredicate_=u.DEFAULT_RETRY_PREDICATE_,this.state_=u.State_.PENDING}o.inherits(u,r.EventEmitter),u.State_={PENDING:0,RUNNING:1,COMPLETED:2,ABORTED:3},u.DEFAULT_RETRY_PREDICATE_=function(e){return!0},u.prototype.isPending=function(){return this.state_==u.State_.PENDING},u.prototype.isRunning=function(){return this.state_==u.State_.RUNNING},u.prototype.isCompleted=function(){return this.state_==u.State_.COMPLETED},u.prototype.isAborted=function(){return this.state_==u.State_.ABORTED},u.prototype.setStrategy=function(e){return i.checkState(this.isPending(),"FunctionCall in progress."),this.strategy_=e,this},u.prototype.retryIf=function(e){return i.checkState(this.isPending(),"FunctionCall in progress."),this.retryPredicate_=e,this},u.prototype.getLastResult=function(){return this.lastResult_.concat()},u.prototype.getNumRetries=function(){return this.numRetries_},u.prototype.failAfter=function(e){return i.checkState(this.isPending(),"FunctionCall in progress."),this.failAfter_=e,this},u.prototype.abort=function(){this.isCompleted()||this.isAborted()||(this.isRunning()&&this.backoff_.reset(),this.state_=u.State_.ABORTED,this.lastResult_=[new Error("Backoff aborted.")],this.emit
2("abort"),this.doCallback_())},u.prototype.start=function(e){i.checkState(!this.isAborted(),"FunctionCall is aborted."),i.checkState(this.isPending(),"FunctionCall already started.");var t=this.strategy_||new s;this.backoff_=e?e(t):new a(t),this.backoff_.on("ready",this.doCall_.bind(this,!0)),this.backoff_.on("fail",this.doCallback_.bind(this)),this.backoff_.on("backoff",this.handleBackoff_.bind(this)),this.failAfter_>0&&this.backoff_.failAfter(this.failAfter_),this.state_=u.State_.RUNNING,this.doCall_(!1)},u.prototype.doCall_=function(e){e&&this.numRetries_++;var t=["call"].concat(this.arguments_);r.EventEmitter.prototype.emit.apply(this,t);var n=this.handleFunctionCallback_.bind(this);this.function_.apply(null,this.arguments_.concat(n))},u.prototype.doCallback_=function(){this.callback_.apply(null,this.lastResult_)},u.prototype.handleFunctionCallback_=function(){if(!this.isAborted()){var e=Array.prototype.slice.call(arguments);this.lastResult_=e,r.EventEmitter.prototype.emit.apply(this,["callback"].concat(e));var t=e[0];t&&this.retryPredicate_(t)?this.backoff_.backoff(t):(this.state_=u.State_.COMPLETED,this.doCallback_())}},u.prototype.handleBackoff_=function(e,t,n){this.emit("backoff",e,t,n)},e.exports=u},function(e,t,n){"use strict";var r=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],r=!0,i=!1,o=void 0;try{for(var a,s=e[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(u){i=!0,o=u}finally{try{!r&&s.return&&s.return()}finally{if(i)throw o}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")},i=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();var o=n(22).difference,a=n(22).flatMap;function s(){return String(Math.floor(4294967295*Math.random()))}var u=function(){function e(t,n,r){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),Object.defineProperties(this,{cName:{enumerable:!0,value:r},isSimulcastEnabled:{enumerable:!0,value:!1,writable:!0},primarySSRCs:{enumerable:!0,value:new Set},rtxPairs:{enumerable:!0,value:new Map},streamId:{enumerable:!0,value:n},trackId:{enumerable:!0,value:t}})}return i(e,[{key:"addSimulcastSSRCs",value:function(){if(!this.isSimulcastEnabled){var e=[s(),s()];e.forEach((function(e){this.primarySSRCs.add(e)}),this),this.rtxPairs.size&&e.forEach((function(e){this.rtxPairs.set(s(),e)}),this)}}},{key:"addSSRC",value:function(e,t,n){t?this.rtxPairs.set(e,t):this.primarySSRCs.add(e),this.isSimulcastEnabled=this.isSimulcastEnabled||n}},{key:"toSdpLines",value:function(e){var t=this,n=e?[]:Array.from(this.rtxPairs.entries()).map((function(e){return e.reverse()})),r=Array.from(this.primarySSRCs.values()),i=n.length?a(n):r,o=a(i,(function(e){return["a=ssrc:"+e+" cname:"+t.cName,"a=ssrc:"+e+" msid:"+t.streamId+" "+t.trackId]})),s=n.map((function(e){return"a=ssrc-group:FID "+e.join(" ")})),u=["a=ssrc-group:SIM "+r.join(" ")];return s.concat(o).concat(u)}}]),e}();function c(e,t){return(e.match(new RegExp(t,"gm"))||[]).map((function(e){return(e.match(new RegExp(t))||[]).slice(1)}))}function l(e){return c(e,"^a=ssrc:([0-9]+) msid:([^\\s]+) ([^\\s]+)$")}function f(e){var t=a(c(e,"^a=msid:(.+) (.+)$")),n=r(t,2),i=n[0],o=n[1];return a(c(e,"^a=ssrc:(.+) cname:.+$")).map((function(e){return[e,i,o]}))}function h(e,t){var n=function(e){return new Set(a(c(e,"^a=ssrc-group:SIM ([0-9]+) ([0-9]+) ([0-9]+)$")))}(e),r=function(e){return new Map(c(e,"^a=ssrc-group:FID ([0-9]+) ([0-9]+)$").map((function(e){return e.reverse()})))}(e);return function(e,t){return{planb:l,unified:f}[t](e)}(e,t).reduce((function(t,i){var o=i[0],a=i[1],s=i[2],c=t.get(s)||new u(s,a,function(e,t,n){var r="a=ssrc:"+t+" "+n+":(.+)";return e.match(new RegExp(r))[1]}(e,o,"cname")),l=r.get(o)||null;return c.addSSRC(o,l,n.has(o)),t.set(s,c)}),new Map)}e.exports=function(e,t,n){var r=h(e,t),i=Array.from(r.keys()),s=Array.from(n.keys()),u=o(i,s),c=o(s,i);a(u,(function(e){return r.get(e)}
2)).forEach((function(e){e.addSimulcastSSRCs(),n.set(e.trackId,e)})),s=Array.from(n.keys());var l=o(s,c),f=a(l,(function(e){return n.get(e)})),d=!e.match(/a=rtpmap:[0-9]+ rtx/),p=a(f,(function(e){return e.toSdpLines(d)})),v=a(new Set(e.split("\r\n").concat(p))),y="a=x-google-flag:conference";return e.match(y)||v.push(y),v.join("\r\n")}},function(e,t,n){"use strict";var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();function i(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}var s=function(e){function t(e){var n;o(this,t);var r=[].slice.call(arguments,1),s=a(this,(n=t.__proto__||Object.getPrototypeOf(t)).call.apply(n,[this].concat(i(r)))),u=Error.apply(s,r);return u.name="TwilioError",Object.defineProperty(s,"code",{value:e,enumerable:!0}),Object.getOwnPropertyNames(u).forEach((function(e){Object.defineProperty(this,e,{value:u[e],enumerable:!0})}),s),s}return function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,Error),r(t,[{key:"toString",value:function(){var e=this.message?": "+this.message:"";return this.name+" "+this.code+e}}]),t}();e.exports=s},function(e,t,n){"use strict";var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();var i=n(412),o=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),Object.defineProperties(this,{_filter:{value:new i({getKey:function(e){return e.ufrag},isLessThanOrEqualTo:function(e,t){return e.revision<=t.revision}})},_ufrag:{writable:!0,value:null},ufrag:{enumerable:!0,get:function(){return this._ufrag}}})}return r(e,[{key:"setUfrag",value:function(e){this._ufrag=e;var t=this._filter.toMap().get(e);return t?t.candidates:[]}},{key:"update",value:function(e){e.candidates=e.candidates||[];var t=this._filter.toMap().get(e.ufrag),n=t?t.candidates:[];return this._filter.update(e)&&this._ufrag===e.ufrag?e.candidates.slice(n.length):[]}}]),e}();e.exports=o},function(e,t,n){"use strict";var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();var i=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),t=Object.assign({getKey:function(e){return e},getValue:function(e){return e},isLessThanOrEqualTo:function(e,t){return e<=t}},t),Object.defineProperties(this,{_getKey:{value:t.getKey},_getValue:{value:t.getValue},_isLessThanOrEqualTo:{value:t.isLessThanOrEqualTo},_map:{value:new Map}})}return r(e,[{key:"toMap",value:function(){return new Map(this._map)}},{key:"updateAndFilter",value:function(e){return e.filter(this.update,this)}},{key:"update",value:function(e){var t=this._getKey(e),n=this._getValue(e);return(!this._map.has(t)||!this._isLessThanOrEqualTo(n,this._map.get(t)))&&(this._map.set(t,n),!0)}}]),e}();e.exports=i},function(e,t,n){"use strict";var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();var i=n(35),o=i.ICE_ACTIVITY_CHECK_PERIOD_MS,a=i.ICE_INACTIVITY_THRESHOLD_MS,s=function(){function e(t,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),n=Object.assign({activityCheckPeriodMs:o,inactivityThresholdMs:a},n),Object.defineProperties(this,{_activityCheckPeriodMs:{value:n.activityCheckPeriodMs},_inactivityThresholdMs:{value:n.inactivityThresholdMs},_lastActivity:{value:null,writable:!0},_peerConnection:{value:t},_timer:{value:null,writable:!0},_onIceConnectionStateChanged:{value:null,writable:!0}})}return r(e,[{key:"_getActivePairStat",value:function(e){var t=Array.from(e.values());return t.find((function(e){return"inbound-rtp"===e.type}))?t.find((function(e){return"candidate-pair"===e.type&&e.nominated}))||{bytesReceived:0,timestamp:Math.round((new Date).getTime())}:null}},{key:"_getIceConnectionStats",value:function(){var e=this;return this._peerConnection.getStats().then((function(t){return e._getActivePairStat(t)}
2)).catch((function(){return null}))}},{key:"_scheduleInactivityCallback",value:function(e){var t=this;e&&null===this._onIceConnectionStateChanged?(this._onIceConnectionStateChanged=function(){"disconnected"===t._peerConnection.iceConnectionState&&e()},this._peerConnection.addEventListener("iceconnectionstatechange",this._onIceConnectionStateChanged)):!e&&this._onIceConnectionStateChanged&&(this._peerConnection.removeEventListener("iceconnectionstatechange",this._onIceConnectionStateChanged),this._onIceConnectionStateChanged=null)}},{key:"start",value:function(e){var t=this;this.stop(),this._timer=setInterval((function(){t._getIceConnectionStats().then((function(n){n&&(t._lastActivity&&t._lastActivity.bytesReceived===n.bytesReceived||(t._lastActivity=n,t._scheduleInactivityCallback(null)),n.timestamp-t._lastActivity.timestamp>=t._inactivityThresholdMs&&("disconnected"===t._peerConnection.iceConnectionState?e():null===t._onIceConnectionStateChanged&&t._scheduleInactivityCallback(e)))}))}),this._activityCheckPeriodMs)}},{key:"stop",value:function(){this._scheduleInactivityCallback(null),null!==this._timer&&(clearInterval(this._timer),this._timer=null,this._lastActivity=null)}}]),e}();e.exports=s},function(e,t,n){"use strict";var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),i=function e(t,n,r){null===t&&(t=Function.prototype);var i=Object.getOwnPropertyDescriptor(t,n);if(void 0===i){var o=Object.getPrototypeOf(t);return null===o?void 0:e(o,n,r)}if("value"in i)return i.value;var a=i.get;return void 0!==a?a.call(r):void 0};var o=n(205),a=n(415),s=function(e){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var n=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e.label,e.maxPacketLifeTime,e.maxRetransmits,e.ordered));return Object.defineProperties(n,{_dataChannel:{value:e}}),e.binaryType="arraybuffer",e.addEventListener("message",(function(e){n.emit("message",e.data)})),e.addEventListener("close",(function(){n.emit("close")})),n}return function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),r(t,[{key:"stop",value:function(){this._dataChannel.close(),i(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"stop",this).call(this)}},{key:"toDataTransport",value:function(){return new a(this._dataChannel)}}]),t}(o);e.exports=s},function(e,t,n){"use strict";var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();var i=function(e){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var n=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return Object.defineProperties(n,{_dataChannel:{value:e},_messageQueue:{value:[]}}),e.addEventListener("open",(function(){n._messageQueue.splice(0).forEach((function(e){return n._publish(e)}))})),e.addEventListener("message",(function(e){var t=e.data;try{var r=JSON.parse(t);n.emit("message",r)}catch(i){}})),n.publish({type:"ready"}),n}return function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),r(t,[{key:"_publish",value:function(e){var t=JSON.stringify(e);try{this._dataChannel.send(t)}catch(n){}}},{key:"publish",value:function(e){var t=this._dataChannel;return"closing"!==t.readyState&&"closed"!==t.readyState&&("connecting"===t.readyState?(this._messageQueue.push(e),!0):(this._publish(e),!0))}}]),t}(n(18).EventEmitter);e.exports=i},function(e,t,n){"use strict";var r=function(e){function t(e,n){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,n))}return function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),t}(n(202));e.exports=r},function(e,t,n){"use strict";var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();var i=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}return r(e,[{key:"match",value:function(e){return e.track.id}},{key:"update",value:function(){}}]),e}();e.exports=i},function(e,t,n){"use strict";var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();var i=n(22),o=n(99).getMediaSections;function a(){return{matched:new Set,unmatched:new Set}}var s=function(){function e(){if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),!(this instanceof e))return new e;Object.defineProperties(this,{audio:{enumerable:!0,value:a()},video:{enumerable:!0,value:a()}})}return r(e,[{key:"match",value:function(e){return function(e){var t=Array.from(e.unmatched);if(!t.length)return null;var n=t[0];return e.matched.add(n),e.unmatched.delete(n),n}(this[e.track.kind])}},{key:"update",value:function(e){["audio","video"].forEach((function(t){var n,r;n=this[t],r=function(e,t){var n=o(t,e),r="msid: ?(.+) +(.+) ?$";return new Set(i.flatMap(n,(function(e){return e.match(new RegExp(r,"mg"))||[]})).map((function(e){return e.match(new RegExp(r))[2]})))}(t,e),r=new Set(r),i.difference(n.matched,r).forEach(n.matched.delete,n.matched),n.unmatched=i.difference(r,n.matched)}),this)}}]),e}();e.exports=s},function(e,t,n){"use strict";var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();var i=n(99).getMediaSections,o=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),Object.defineProperties(this,{_midsToTrackIds:{value:new Map,writable:!0}})}return r(e,[{key:"match",value:function(e){return this._midsToTrackIds.get(e.transceiver.mid)||null}},{key:"update",value:function(e){var t=i(e,"(audio|video)");this._midsToTrackIds=t.reduce((function(e,t){var n=t.match(/^a=mid:(.+)$/m)||[],r=t.match(/^a=msid:.+ (.+)$/m)||[],i=n[1],o=r[1];return i&&o?e.set(i,o):e}),this._midsToTrackIds)}}]),e}();e.exports=o},function(e,t,n){"use strict";var r=n(69).RTCSessionDescription,i=n(99).createPtToCodecName,o=n(99).getMediaSections;function a(e){var t=i(e);e=function(e,t){return Array.from(t.keys()).reduce((function(e,n){var r=new RegExp("^a=rtpmap:"+n+" rtx.+$","gm");return(e.match(r)||[]).slice("rtx"===t.get(n)?1:0).reduce((function(e,t){var r=new RegExp("\r\n"+t),i=new RegExp("\r\na=fmtp:"+n+" apt=[0-9]+");return e.replace(r,"").replace(i,"")}),e)}),e)}(e,t);var n=function(e){var t=new Map;return e.forEach((function(e,n){var r=t.get(e)||new Set;return t.set(e,r.add(n))})),t}(t),r=n.get("rtx")||new Set,o=new Set,a=function(e,t){var n=Array.from(e).reduce((function(e,t){var n=t[0],r=t[1],i=e.get(r)||new Set;return e.set(r,i.add(n))}),new Map);return Array.from(n).reduce((function(e,n){var r=n[0],i=Array.from(n[1]);return i.length>1?(i.forEach((function(e){t.add(e)})),e):e.set(r,i[0])}),new Map)}(function(e,t,n,r){return Array.from(n).reduce((function(n,i){var o=new RegExp("a=fmtp:"+i+" apt=(\\d+)"),a=e.match(o);if(!a)return r.add(i),n;var s=Number.parseInt(a[1]);return t.has(s)?"rtx"===t.get(s)?(r.add(i),n):n.set(i,s):(r.add(i),n)}),new Map)}(e,t,r,o),o),u=Array.from(o);return["h264","vp8","vp9"].reduce((function(e,t){var r=n.get(t)||new Set;return Array.from(r).reduce((function(e,t){return a.has(t)?e:e.add(t)}),e)}),new Set).forEach((function(t){if(u.length){var n=u.shift();e=function(e,t,n){return e.endsWith("\r\n")?e+"a=fmtp:"+t+" apt="+n+"\r\n":e+"\r\na=fmtp:"+t+" apt="+n}(e=s(e,n),n,t)}})),u.forEach((function(t){e=function(e,t){var n=new RegExp("a=rtpmap:"+t+".*\r\n","gm");return e.replace(n,"")}(e=s(e,t),t)})),e}function s(e,t){var n=new RegExp("a=fmtp:"+t+".*\r\n","gm");return e.replace(n,"")}e.exports=function(e){var t={type:e.type};return"rollback"!==e.type&&(t.sdp=function(e){var t=o(e);return[e.split("\r\nm=")[0]].concat(t.map(a)).join("\r\n")}(e.sdp)),new r(t)}},function(e,t,n){"use strict";var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();function i(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)}var o=function(e){function t(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var e=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return Object.defineProperties(e,{_queuedEvents:{value:new Map}}),e}return function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),r(t,[{key:"dequeue",value:function(e){var t=this,n=!0;
2if(!e)return this._queuedEvents.forEach((function(e,t){n=this.dequeue(t)&&n}),this),n;var r=this._queuedEvents.get(e)||[];return this._queuedEvents.delete(e),r.reduce((function(n,r){return t.emit.apply(t,i([e].concat(r)))&&n}),n)}},{key:"queue",value:function(){var e=[].slice.call(arguments);if(this.emit.apply(this,i(e)))return!0;var t=e[0];return this._queuedEvents.has(t)||this._queuedEvents.set(t,[]),this._queuedEvents.get(t).push(e.slice(1)),!1}}]),t}(n(18).EventEmitter);e.exports=o},function(e,t,n){"use strict";var r=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],r=!0,i=!1,o=void 0;try{for(var a,s=e[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(u){i=!0,o=u}finally{try{!r&&s.return&&s.return()}finally{if(i)throw o}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")},i=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),o=function e(t,n,r){null===t&&(t=Function.prototype);var i=Object.getOwnPropertyDescriptor(t,n);if(void 0===i){var o=Object.getPrototypeOf(t);return null===o?void 0:e(o,n,r)}if("value"in i)return i.value;var a=i.get;return void 0!==a?a.call(r):void 0};var a=n(423),s=n(424),u=n(431),c=n(433),l=n(226),f=n(434),h=n(211),d=n(446),p=n(447),v=n(22),y=v.constants.DEFAULT_SESSION_TIMEOUT_SEC,m=v.createBandwidthProfilePayload,g=v.defer,b=v.filterObject,_=v.flatMap,w=v.oncePerTick,k=n(77).createTwilioError,S=function(e){function t(e,n,r,i,o){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),n.options=Object.assign({session_timeout:y},n.options),o=Object.assign({DominantSpeakerSignaling:a,NetworkQualityMonitor:s,NetworkQualitySignaling:u,RecordingSignaling:c,RemoteParticipantV2:f,TrackPrioritySignaling:d,TrackSwitchOffSignaling:p,bandwidthProfile:null,sessionTimeout:1e3*n.options.session_timeout,statsPublishIntervalMs:1e4},o),e.setBandwidthProfile(o.bandwidthProfile),i.setIceReconnectTimeout(o.sessionTimeout);var l=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,n.sid,n.name,o));return Object.defineProperties(l,{_dominantSpeakerSignaling:{value:null,writable:!0},_DominantSpeakerSignaling:{value:o.DominantSpeakerSignaling},_dominantSpeakerSignalingPromise:{value:null,writable:!0},_disconnectedParticipantSids:{value:new Set},_NetworkQualityMonitor:{value:o.NetworkQualityMonitor},_NetworkQualitySignaling:{value:o.NetworkQualitySignaling},_lastBandwidthProfileRevision:{value:e.bandwidthProfileRevision,writable:!0},_networkQualityMonitor:{value:null,writable:!0},_networkQualityMonitorPromise:{value:null,writable:!0},_networkQualityConfiguration:{value:e.networkQualityConfiguration},_peerConnectionManager:{value:i},_published:{value:new Map},_publishedRevision:{value:0,writable:!0},_RemoteParticipantV2:{value:o.RemoteParticipantV2},_subscribed:{value:new Map},_subscribedRevision:{value:0,writable:!0},_subscriptionFailures:{value:new Map},_trackPriorityPromise:{value:null,writable:!0},_trackPrioritySignaling:{value:null,writable:!0},_trackSwitchOffPromise:{value:null,writable:!0},_trackSwitchOffSignaling:{value:null,writable:!0},_TrackPrioritySignaling:{value:o.TrackPrioritySignaling},_TrackSwitchOffSignaling:{value:o.TrackSwitchOffSignaling},_transport:{value:r},_trackReceiverDeferreds:{value:new Map},mediaRegion:{enumerable:!0,value:n.options.media_region||null}}),function(e,t){var n=w((function(){e._publishNewLocalParticipantState()})),r=w((function(){var n=_(t.tracks,(function(e){return e.trackTransceiver}));e._peerConnectionManager.setTrackSenders(n)}));t.on("trackAdded",r),t.on("trackRemoved",r),t.on("updated",n),e.on("stateChanged",(function i(o){"disconnected"===o&&(t.removeListener("trackAdded",r),t.removeListener("trackRemoved",r),t.removeListener("updated",n),e.removeListener("stateChanged",i),t.disconnect())}
2)),e.on("signalingConnectionStateChanged",(function(){var t=e.localParticipant,n=e.signalingConnectionState,r=t.identity,i=t.sid;switch(n){case"connected":t.connect(i,r);break;case"reconnecting":t.reconnecting()}}))}(l,e),function(e,t){t.on("description",(function(t){e._publishPeerConnectionState(t)})),t.dequeue("description"),t.on("candidates",(function(t){e._publishPeerConnectionState(t)})),t.dequeue("candidates"),t.on("trackAdded",e._addTrackReceiver.bind(e)),t.dequeue("trackAdded"),t.getTrackReceivers().forEach(e._addTrackReceiver,e),t.on("connectionStateChanged",(function(){e.emit("connectionStateChanged")})),t.on("iceConnectionStateChanged",(function(){e.emit("iceConnectionStateChanged"),"failed"===e.iceConnectionState&&(null!==e.localParticipant.networkQualityLevel&&e.localParticipant.setNetworkQualityLevel(0),e.participants.forEach((function(e){null!==e.networkQualityLevel&&e.setNetworkQualityLevel(0)})))}))}(l,i),function(e,t){t.on("message",e._update.bind(e)),t.on("stateChanged",(function n(r,i){"disconnected"===r&&("disconnected"!==e.state&&e._disconnect(i),t.removeListener("stateChanged",n)),e.emit("signalingConnectionStateChanged")}))}(l,r),function(e,t,n){var r=!1,i=setInterval((function(){e.getStats().then((function(e){r=!r,e.forEach((function(e,n){var i=new h(n,e,!0);if(t.publishEvent("quality","stats-report",{audioTrackStats:i.remoteAudioTrackStats,localAudioTrackStats:i.localAudioTrackStats,localVideoTrackStats:i.localVideoTrackStats,peerConnectionId:i.peerConnectionId,videoTrackStats:i.remoteVideoTrackStats}),r){var o=function(e,t){return(e=Object.assign({availableIncomingBitrate:0,availableOutgoingBitrate:0,bytesReceived:0,bytesSent:0,consentRequestsSent:0,currentRoundTripTime:0,lastPacketReceivedTimestamp:0,lastPacketSentTimestamp:0,nominated:!1,peerConnectionId:t,priority:0,readable:!1,requestsReceived:0,requestsSent:0,responsesReceived:0,responsesSent:0,retransmissionsReceived:0,retransmissionsSent:0,state:"failed",totalRoundTripTime:0,transportId:"",writable:!1},b(e||{},null))).localCandidate=Object.assign({candidateType:"host",deleted:!1,ip:"",port:0,priority:0,protocol:"udp",relayProtocol:"udp",url:""},b(e.localCandidate||{},null)),e.remoteCandidate=Object.assign({candidateType:"host",ip:"",port:0,priority:0,protocol:"udp",url:""},b(e.remoteCandidate||{},null)),e}(e.activeIceCandidatePair,i.peerConnectionId);t.publishEvent("quality","active-ice-candidate-pair",o)}}))}),(function(){}))}),n);e.on("stateChanged",(function t(n){"disconnected"===n&&(clearInterval(i),e.removeListener("stateChanged",t))}))}(l,r,o.statsPublishIntervalMs),l._update(n),l}return function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),i(t,[{key:"_deleteTrackReceiverDeferred",value:function(e){return this._trackReceiverDeferreds.delete(e)}},{key:"_getOrCreateTrackReceiverDeferred",value:function(e){var t=this._trackReceiverDeferreds.get(e)||g(),n=this._peerConnectionManager.getTrackReceivers().find((function(t){return t.id===e&&"ended"!==t.readyState}));return n?t.resolve(n):this._trackReceiverDeferreds.set(e,t),t}},{key:"_addTrackReceiver",value:function(e){return this._getOrCreateTrackReceiverDeferred(e.id).resolve(e),this}},{key:"_disconnect",value:function(e){var n=o(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"_disconnect",this).call(this,e);return n&&(this._teardownDominantSpeakerSignaling(),this._teardownNetworkQualityMonitor(),this._transport.disconnect(),this._peerConnectionManager.close()),this.localParticipant.tracks.forEach((function(t){t.publishFailed(e||new Error("LocalParticipant disconnected"))})),n}},{key:"_getTrackReceiver",value:function(e){var t=this;return this._getOrCreateTrackReceiverDeferred(e).promise.then((function(n){return t._deleteTrackReceiverDeferred(e),n}))}},{key:"_getTrackSidsToTrackSignalings",value:function(){var e=_(this.participants,(function(e){return Array.from(e.tracks)}));return new Map(e)}},{key:"_getOrCreateRemoteParticipant",value:function(e){var t=this._RemoteParticipantV2,n=this.participants.get(e.sid),r=this;return n||((n=new t(e,this._getTrackReceiver.bind(this))).on("stateChanged",(function e(t){"disconnected"===t&&(n.removeListener("stateChanged",e),r.participants.delete(n.sid),r._disconnectedParticipantSids.add(n.sid))})),this.connectParticipant(n),n.setTrackPrioritySignaling(this._trackPrioritySignaling)),n}},{key:"_getState",value:function(){return{participant:this.localParticipant.getState()}}},{key:"_maybeAddBandwidthProfile",value:function(e){var t=this.localParticipant,n=t.bandwidthProfile,r=t.bandwidthProfileRevision;return n&&this._lastBandwidthProfileRevision<r?(this._lastBandwidthProfileRevision=r,Object.assign({bandwidth_profile:m(n)},e)):e}}
2,{key:"_publishNewLocalParticipantState",value:function(){this._transport.publish(this._maybeAddBandwidthProfile(this._getState()))}},{key:"_publishPeerConnectionState",value:function(e){this._transport.publish(Object.assign({peer_connections:[e]},this._getState()))}},{key:"_update",value:function(e){var t=this;if(e.subscribed&&e.subscribed.revision>this._subscribedRevision){this._subscribedRevision=e.subscribed.revision,e.subscribed.tracks.forEach((function(e){e.id?(t._subscriptionFailures.delete(e.sid),t._subscribed.set(e.sid,e.id)):e.error&&!t._subscriptionFailures.has(e.sid)&&t._subscriptionFailures.set(e.sid,e.error)}));var n=new Set(e.subscribed.tracks.filter((function(e){return!!e.id})).map((function(e){return e.sid})));this._subscribed.forEach((function(e,r){n.has(r)||t._subscribed.delete(r)}))}var r=new Set;return(e.participants||[]).forEach((function(e){if(e.sid!==t.localParticipant.sid&&!t._disconnectedParticipantSids.has(e.sid)){var n=t._getOrCreateRemoteParticipant(e);n.update(e),r.add(n)}})),"synced"===e.type&&this.participants.forEac
2h((function(e){r.has(e)||e.disconnect()})),function(e){var t=e._getTrackSidsToTrackSignalings();e._subscriptionFailures.forEach((function(n,r){var i=t.get(r);i&&(e._subscriptionFailures.delete(r),i.subscribeFailed(k(n.code,n.message)))})),t.forEach((function(t){var n=e._subscribed.get(t.sid);(!n||t.isSubscribed&&t.trackTransceiver.id!==n)&&t.setTrackTransceiver(null),n&&e._getTrackReceiver(n).then((function(e){return t.setTrackTransceiver(e)}))}))}(this),e.peer_connections&&this._peerConnectionManager.update(e.peer_connections,"synced"===e.type),e.recording&&this.recording.update(e.recording),e.published&&e.published.revision>this._publishedRevision&&(this._publishedRevision=e.published.revision,e.published.tracks.forEach((function(e){e.sid&&t._published.set(e.id,e.sid)})),this.localParticipant.update(e.published)),e.participant&&this.localParticipant.connect(e.participant.sid,e.participant.identity),!this._dominantSpeakerSignalingPromise&&e.media_signaling&&e.media_signaling.active_speaker&&e.media_signaling.active_speaker.transport&&"data-channel"===e.media_signaling.active_speaker.transport.type&&this._setupDataTransportBackedDominantSpeakerSignaling(e.media_signaling.active_speaker.transport.label),!this._networkQualityMonitorPromise&&e.media_signaling&&e.media_signaling.network_quality&&e.media_signaling.network_quality.transport&&"data-channel"===e.media_signaling.network_quality.transport.type&&this._setupDataTransportBackedNetworkQualityMonitor(e.media_signaling.network_quality.transport.label),!this._trackPriorityPromise&&e.media_signaling&&e.media_signaling.track_priority&&e.media_signaling.track_priority.transport&&"data-channel"===e.media_signaling.track_priority.transport.type&&this._setupTrackPrioritySignaling(e.media_signaling.track_priority.transport.label),!this._trackSwitchOffPromise&&e.media_signaling&&e.media_signaling.track_switch_off&&e.media_signaling.track_switch_off.transport&&"data-channel"===e.media_signaling.track_switch_off.transport.type&&this._setupTrackSwitchOffMonitor(e.media_signaling.track_switch_off.transport.label),this}},{key:"_setupTrackPrioritySignaling",value:function(e){var t=this;this._teardownTrackPrioritySignaling();var n=this._getTrackReceiver(e).then((function(e){if("data"!==e.kind)throw new Error("Expected a DataTrackReceiver");t._trackPriorityPromise===n&&(e.once("close",(function(){return t._teardownTrackPrioritySignaling()})),t._trackPrioritySignaling=new t._TrackPrioritySignaling(e.toDataTransport()),[].concat(function(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)}(t.participants.values())).forEach((function(e){e.setTrackPrioritySignaling(t._trackPrioritySignaling)})))}));this._trackPriorityPromise=n}},{key:"_setupTrackSwitchOff",value:function(e){var t=this;this._trackSwitchOffSignaling=e,e.on("updated",(function(e,n){t.participants.forEac
2h((function(t){t.tracks.forEach((function(t){e.includes(t.sid)&&t.setSwitchedOff(!0),n.includes(t.sid)&&t.setSwitchedOff(!1)}))}))}))}},{key:"_setupTrackSwitchOffMonitor",value:function(e){var t=this;this._teardownTrackSwitchOff();var n=this._getTrackReceiver(e).then((function(e){if("data"!==e.kind)throw new Error("Expected a DataTrackReceiver");if(t._trackSwitchOffPromise===n){e.once("close",(function(){return t._teardownTrackSwitchOff()}));var r=new t._TrackSwitchOffSignaling(e.toDataTransport());t._setupTrackSwitchOff(r)}}));this._trackSwitchOffPromise=n}},{key:"_setupDataTransportBackedDominantSpeakerSignaling",value:function(e){var t=this;this._teardownDominantSpeakerSignaling();var n=this._getTrackReceiver(e).then((function(e){if("data"!==e.kind)throw new Error("Expected a DataTrackReceiver");if(t._dominantSpeakerSignalingPromise===n){e.once("close",(function(){return t._teardownDominantSpeakerSignaling()}));var r=new t._DominantSpeakerSignaling(e.toDataTransport());t._setDominantSpeakerSignaling(r)}}));this._dominantSpeakerSignalingPromise=n}},{key:"_setupDataTransportBackedNetworkQualityMonitor",value:function(e){var t=this,n=this;this._teardownNetworkQualityMonitor();var r=this._getTrackReceiver(e).then((function(e){if("data"!==e.kind)throw new Error("Expected a DataTrackReceiver");if(t._networkQualityMonitorPromise===r){e.once("close",(function(){return t._teardownNetworkQualityMonitor()}));var i=new t._NetworkQualitySignaling(e.toDataTransport(),n._networkQualityConfiguration),o=new t._NetworkQualityMonitor(t._peerConnectionManager,i);t._setNetworkQualityMonitor(o)}}));this._networkQualityMonitorPromise=r}},{key:"_setDominantSpeakerSignaling",value:function(e){var t=this;this._dominantSpeakerSignaling=e,e.on("updated",(function(){return t.setDominantSpeaker(e.loudestParticipantSid)}))}},{key:"_setNetworkQualityMonitor",value:function(e){var t=this;this._networkQualityMonitor=e,e.on("updated",(function(){"failed"!==t.iceConnectionState&&(t.localParticipant.setNetworkQualityLevel(e.level,e.levels),t.participants.forEac
2h((function(t){var n=e.remoteLevels.get(t.sid);n&&t.setNetworkQualityLevel(n.level,n)})))})),e.start()}},{key:"_teardownDominantSpeakerSignaling",value:function(){this._dominantSpeakerSignalingPromise=null,this._dominantSpeakerSignaling=null}},{key:"_teardownNetworkQualityMonitor",value:function(){this._networkQualityMonitorPromise=null,this._networkQualityMonitor&&(this._networkQualityMonitor.stop(),this._networkQualityMonitor=null)}},{key:"_teardownTrackPrioritySignaling",value:function(){this._trackPrioritySignaling=null,this._trackPriorityPromise=null,this.localParticipant.setTrackPrioritySignaling(null),this.participants.forEach((function(e){e.setTrackPrioritySignaling(null)}))}},{key:"_teardownTrackSwitchOff",value:function(){this._trackSwitchOffSignaling=null,this._trackSwitchOffPromise=null}},{key:"getStats",value:function(){var e=this;return this._peerConnectionManager.getStats().then((function(t){return new Map(Array.from(t).map((function(t){var n=r(t,2),i=n[0],o=n[1];return[i,Object.assign({},o,{localAudioTrackStats:E(e,o.localAudioTrackStats),localVideoTrackStats:E(e,o.localVideoTrackStats),remoteAudioTrackStats:T(e,o.remoteAudioTrackStats),remoteVideoTrackStats:T(e,o.remoteVideoTrackStats)})]})))}))}},{key:"connectionState",get:function(){return this._peerConnectionManager.connectionState}},{key:"signalingConnectionState",get:function(){return"syncing"===this._transport.state?"reconnecting":this._transport.state}},{key:"iceConnectionState",get:function(){return this._peerConnectionManager.iceConnectionState}}]),t}(l);function O(e,t){return t.reduce((function(t,n){var r=e.get(n.trackId);return r?[Object.assign({},n,{trackSid:r})].concat(t):t}),[])}function E(e,t){return O(e._published,t)}function T(e,t){return O(new Map(Array.from(e._subscribed.entries()).map((function(e){var t=r(e,2),n=t[0];return[t[1],n]}))),t)}e.exports=S},function(e,t,n){"use strict";var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();var i=function(e){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var n=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return Object.defineProperties(n,{_loudestParticipantSid:{value:null,writable:!0}}),e.on("message",(function(e){switch(e.type){case"active_speaker":n._setLoudestParticipantSid(e.participant)}})),n}return function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),r(t,[{key:"_setLoudestParticipantSid",value:function(e){this.loudestParticipantSid!==e&&(this._loudestParticipantSid=e,this.emit("updated"))}},{key:"loudestParticipantSid",get:function(){return this._loudestParticipantSid}}]),t}(n(18).EventEmitter);e.exports=i},function(e,t,n){"use strict";var r=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],r=!0,i=!1,o=void 0;try{for(var a,s=e[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(u){i=!0,o=u}finally{try{!r&&s.return&&s.return()}finally{if(i)throw o}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")},i=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();var o=n(18),a=n(425),s=function(e){function t(e,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var r=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return Object.defineProperties(r,{_factories:{value:new WeakMap},_manager:{value:e},_signaling:{value:n}}),n.on("updated",(function(){return r.emit("updated")})),r}return function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),i(t,[{key:"start",value:function(){var e=this;this.stop();var t=setTimeout((function(){e._timeout===t&&function(e){var t=(e._manager._peerConnections?Array.from(e._manager._peerConnections.values()):[]).map((function(e){return e._peerConnection})).filter((function(e){return"closed"!==e.signalingState})).map((function(t){if(e._factories.has(t))return e._factories.get(t);var n=new a(t);return e._factories.set(t,n),n})).map((function(e){return e.next().catch((function(){return null}))}));return Promise.all(t).then((function(e){return e.filter((function(e){return e})).map((function(e){return e.summarize()}))}))}(e).then((function(n){if(e._timeout===t){if(n.length){var i=r(n,1)[0];e._signaling.put(i)}e.start()}}))}),200);this._timeout=t}},{key:"stop",value:function(){clearTimeout(this._timeout),this._timeout=null}},{key:"level",get:function(){return this._signaling.level}},{key:"levels",get:function(){return this._signaling.levels}},{key:"remoteLevels",get:function(){return this._signaling.remoteLevels}}]),t}(o);e.exports=s},function(e,t,n){"use strict";var r=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],r=!0,i=!1,o=void 0;try{for(var a,s=e[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(u){i=!0,o=u}finally{try{!r&&s.return&&s.return()}finally{if(i)throw o}}return n}(e,t);
2throw new TypeError("Invalid attempt to destructure non-iterable instance")},i=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();function o(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)}var a=n(26).guessBrowser,s=n(426),u=n(428),c=n(429),l=n(430),f=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),Object.defineProperties(this,{pc:{enumerable:!0,value:t},ice:{enumerable:!0,value:new s},audio:{enumerable:!0,value:{send:new Map,recv:new Map}},video:{enumerable:!0,value:{send:new Map,recv:new Map}},lastReport:{enumerable:!0,value:null,writable:!0}})}return i(e,[{key:"next",value:function(){var e,t=this;return("firefox"===a()?function(e){var t=e.pc.getTransceivers().filter((function(e){return e.currentDirection&&e.currentDirection.match(/send/)&&e.sender.track})).map((function(e){return e.sender})),n=e.pc.getTransceivers().filter((function(e){return e.currentDirection&&e.currentDirection.match(/recv/)})).map((function(e){return e.receiver}));return Promise.all([h(t),h(n),e.pc.getStats()]).then((function(t){var n=r(t,3),i=n[0],o=n[1],a=n[2],s=p(e),u=g(e);i.forEach((function(t,n){return _(e,t,u,n)})),k(s,u);var c=v(e),l=b(e);o.forEach((function(t,n){return w(e,t,l,n)})),k(c,l),S(e.ice,a)}))}(this):(e=this).pc.getStats().then((function(t){var n=p(e),r=g(e);_(e,t,r),k(n,r);var i=v(e),o=b(e);w(e,t,o),k(i,o),S(e.ice,t)}))).then((function(){var e=[].concat(o(t.audio.send.values())),n=[].concat(o(t.video.send.values())),r=[].concat(o(t.audio.recv.values())),i=[].concat(o(t.video.recv.values())),a=new u(t.ice.lastReport,{send:e.map((function(e){return e.lastReport})).filter((function(e){return e})),recv:r.map((function(e){return e.lastReport})).filter((function(e){return e}))},{send:n.map((function(e){return e.lastReport})).filter((function(e){return e})),recv:i.map((function(e){return e.lastReport})).filter((function(e){return e}))});return t.lastReport=a,a}))}}]),e}();function h(e){return Promise.all(e.map((function(e){var t=e.track.id;return e.getStats().then((function(e){var n=!0,r=!1,i=void 0;try{for(var o,a=e.values()[Symbol.iterator]();!(n=(o=a.next()).done);n=!0){var s=o.value;"inbound-rtp"===s.type&&(s.id=t+"-"+s.id)}}catch(u){r=!0,i=u}finally{try{!n&&a.return&&a.return()}finally{if(r)throw i}}return[t,e]}))}))).then((function(e){return new Map(e)}))}function d(e,t,n,r,i){var o=t[r.mediaType];if(!i){var a=n.get(r.trackId);a&&(i=a.trackIdentifier)}if(o&&i){if(o.has(r.id))return o.get(r.id);var s=new e(i,r);o.set(r.id,s)}return null}function p(e){return{audio:e.audio.send,video:e.video.send}}function v(e){return{audio:e.audio.recv,video:e.video.recv}}function y(e,t,n,r){return d(l,p(e),t,n,r)}function m(e,t,n,r){return d(c,v(e),t,n,r)}function g(e){return{audio:new Set(e.audio.send.keys()),video:new Set(e.video.send.keys())}}function b(e){return{audio:new Set(e.audio.recv.keys()),video:new Set(e.video.recv.keys())}}function _(e,t,n,r){var i=!0,o=!1,s=void 0;try{for(var u,c=t.values()[Symbol.iterator]();!(i=(u=c.next()).done);i=!0){var l=u.value;if("outbound-rtp"===l.type&&!l.isRemote){if("firefox"!==a()&&!l.trackId)continue;var f=n[l.mediaType];f&&f.delete(l.id);var h=y(e,t,l,r);if(h){var d=t.get(l.remoteId);h.next(r||h.trackId,l,d)}}}}catch(p){o=!0,s=p}finally{try{!i&&c.return&&c.return()}finally{if(o)throw s}}}function w(e,t,n,r){var i=!0,o=!1,a=void 0;try{for(var s,u=t.values()[Symbol.iterator]();!(i=(s=u.next()).done);i=!0){var c=s.value;if("inbound-rtp"===c.type&&!c.isRemote){var l=n[c.mediaType];l&&l.delete(c.id);var f=m(e,t,c,r);f&&f.next(r||f.trackId,c)}}}catch(h){o=!0,a=h}finally{try{!i&&u.return&&u.return()}finally{if(o)throw a}}}function k(e,t){var n=function(n){var r=e[n];t[n].forEach((function(e){return r.delete(e)}))};for(var r in t)n(r)}function S(e,t){var n=void 0,r=!0,i=!1,o=void 0;try{for(var a,s=t.values()[Symbol.iterator]();!(r=(a=s.next()).done);r=!0){var u=a.value;"transport"===u.type&&(n=t.get(u.selectedCandidatePairId))}}catch(v){i=!0,o=v}finally{try{!r&&s.return&&s.return()}finally{if(i)throw o}}if(n)e.next(n);else{var c=!0,l=!1,f=void 0;try{for(var h,d=t.values()[Symbol.iterator]();!(c=(h=d.next()).done);c=!0){var p=h.value;"candidate-pair"!==p.type||!p.nominated||"selected"in p&&!p.selected||e.next(p)}}catch(v){l=!0,f=v}finally{try{!c&&d.return&&d.return()}finally{if(l)throw f}}}}e.exports=f},function(e,t,n){"use strict";var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();var i=n(427),o=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),Object.defineProperties(this,{lastReport:{enumerable:!0,value:new i(0,0),writable:!0},lastStats:{enumerable:!0,value:null,writable:!0}})}return r(e,[{key:"next",value:function(e){var t=this.lastStats;if(this.lastStats=e,t){var n=t.id===e.id?i.of(t,e):new i(0,0);this.lastReport=n}return this.lastReport}}]),e}();e.exports=o},function(e,t,n){"use strict";var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();var i=function(){function e(t,n,r,i){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),Object.defineProperties(this,{availableSend:{enumerable:!0,value:r},recv:{enumerable:!0,value:n},rtt:{enumerable:!0,value:i},send:{enumerable:!0,value:t}})}return r(e,null,[{key:"of",value:function(t,n){var r=(n.timestamp-t.timestamp)/1e3,i=n.bytesSent-t.bytesSent,o=n.bytesReceived-t.bytesReceived;return new e(r>0?i/r*8:0,r>0?o/r*8:0,n.availableOutgoingBitrate,n.currentRoundTripTime)}}]),e}();e.exports=i},function(e,t,n){"use strict";var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();var i=n(219),o=n(223),a=function(){function e(t,n,r){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),Object.defineProperties(this,{ice:{enumerable:!0,value:t},audio:{enumerable:!0,value:n},video:{enumerable:!0,value:r}})}return r(e,[{key:"summarize",value:function(){var e=this.audio.send.concat(this.video.send),t=o.summarize(e),n=this.audio.recv.concat(this.video.recv),r=i.summarize(n);return{ice:this.ice,send:t,recv:r,audio:{send:o.summarize(this.audio.send),recv:i.summarize(this.audio.recv)},video:{send:o.summarize(this.video.send),recv:i.summarize(this.video.recv)}}}}]),e}();e.exports=a},function(e,t,n){"use strict";var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();var i=n(219),o=function(e){function t(e,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var r=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,n.id,e,n));return Object.defineProperties(r,{lastReport:{enumerable:!0,value:null,writable:!0}}),r}return function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),r(t,[{key:"next",value:function(e,t){var n=this.lastStats;this.lastStats=t,this.trackId=e;var r=i.of(e,n,t);return this.lastReport=r,r}}]),t}(n(224));e.exports=o},function(e,t,n){"use strict";var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();var i=n(224),o=n(223),a=function(e){function t(e,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var r=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,n.id,e,n));return Object.defineProperties(r,{lastReport:{enumerable:!0,value:null,writable:!0}}),r}return function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),r(t,[{key:"next",value:function(e,t,n){var r=this.lastStats;this.lastStats=t,this.trackId=e;var i=o.of(e,r,t,n);return this.lastReport=i,i}}]),t}(i);e.exports=a},function(e,t,n){"use strict";var r="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();var o=n(18).EventEmitter,a=n(432),s=function(e){function t(e,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var r=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return Object.defineProperties(r,{_level:{value:null,writable:!0},_levels:{value:null,writable:!0},_remoteLevels:{value:new Map,writable:!0},_mediaSignalingTransport:{value:e},_networkQualityInputs:{value:new a},_networkQualityReportLevels:{get:function(){return{reportLevel:n.local,remoteReportLevel:n.remote}}}}),e.on("message",(function(e){switch(e.type){case"network_quality":r._handleNetworkQualityMessage(e)}})),r._sendNetworkQualityInputs(),r}return function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),i(t,[{key:"_handleNetworkQualityMessage",value:function(e){var t=this,n=!1,i=null,o=e?e.local:null;"number"===typeof o?(i=o,this._levels=null):"object"===("undefined"===typeof o?"undefined":r(o))&&o&&(this._levels=o,i="number"===typeof o.level?o.level:Math.min(o.audio.send,o.audio.recv,o.video.send,o.video.recv)),null!==i&&this.level!==i&&(this._level=i,n=!0),this._remoteLevels=e&&e.remotes?e.remotes.reduce((function(e,r){return(t._remoteLevels.get(r.sid)||{}).level!==r.level&&(n=!0),e.set(r.sid,r)}
2),new Map):this._remoteLevels,n&&this.emit("updated"),setTimeout((function(){return t._sendNetworkQualityInputs()}),1e3)}},{key:"_sendNetworkQualityInputs",value:function(){var e=this;return this._networkQualityInputs.take().then((function(t){e._mediaSignalingTransport.publish(function(e,t){return Object.assign({type:"network_quality"},e,t)}(t,e._networkQualityReportLevels))}))}},{key:"put",value:function(e){this._networkQualityInputs.put(e)}},{key:"level",get:function(){return this._level}},{key:"levels",get:function(){return this._levels}},{key:"remoteLevels",get:function(){return this._remoteLevels}}]),t}(o);e.exports=s},function(e,t,n){"use strict";var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();var i=n(22).defer,o=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),Object.defineProperties(this,{_deferreds:{value:[]},_hasValue:{value:!1,writable:!0},_value:{value:null,writable:!0}})}return r(e,[{key:"put",value:function(e){this._hasValue=!0,this._value=e;var t=this._deferreds.shift();return t&&t.resolve(e),this}},{key:"take",value:function(){var e=this;if(this._hasValue&&!this._deferreds.length)return this._hasValue=!1,Promise.resolve(this._value);var t=i();return this._deferreds.push(t),t.promise.then((function(t){return e._hasValue=!1,t}))}}]),e}();e.exports=o},function(e,t,n){"use strict";var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();var i=function(e){function t(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var e=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return Object.defineProperties(e,{_revision:{value:1,writable:!0}}),e}return function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),r(t,[{key:"update",value:function(e){return e.revision<this._revision?this:(this._revision=e.revision,this.enable(e.is_recording))}}]),t}(n(225));e.exports=i},function(e,t,n){"use strict";var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}var o=n(435),a=n(444),s=function(e){function t(e,n,r){var o;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var s=i(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e.sid,e.identity));return r=Object.assign({RemoteTrackPublicationV2:a},r),Object.defineProperties(s,{_revision:{writable:!0,value:null},_RemoteTrackPublicationV2:{value:r.RemoteTrackPublicationV2},_getTrackReceiver:{value:n},revision:{enumerable:!0,get:function(){return this._revision}}}),o=s.update(e),i(s,o)}return function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),r(t,[{key:"_getOrCreateTrack",value:function(e){var t=this._RemoteTrackPublicationV2,n=this.tracks.get(e.sid);return n||(n=new t(e),this.addTrack(n)),n}},{key:"update",value:function(e){var t=this;if(null!==this.revision&&e.revision<=this.revision)return this;this._revision=e.revision;var n=new Set;switch(e.tracks.forEach((function(e){var r=t._getOrCreateTrack(e);r.update(e),n.add(r)})),this.tracks.forEach((function(e){n.has(e)||t.removeTrack(e)})),e.state){case"disconnected":this.disconnect();break;
2case"reconnecting":this.reconnecting();break;case"connected":this.connect(this.sid,this.identity)}return this}}]),t}(o);e.exports=s},function(e,t,n){"use strict";var r=function(e){function t(e,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var r=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return r.connect(e,n),r}return function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),t}(n(139));e.exports=r},function(e,t,n){"use strict";var r=n(437),i=n(443);e.exports=function e(t){var n=t.level,o=t.audio,a=t.video;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),Object.defineProperties(this,{level:{value:n,enumerable:!0},audio:{value:o?new r(o):null,enumerable:!0},video:{value:a?new i(a):null,enumerable:!0}})}},function(e,t,n){"use strict";var r=function(e){function t(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e))}return function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),t}(n(227));e.exports=r},function(e,t,n){"use strict";var r=function(e){function t(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e))}return function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),t}(n(228));e.exports=r},function(e,t,n){"use strict";e.exports=function e(t){var n=t.actual,r=void 0===n?null:n,i=t.available,o=void 0===i?null:i,a=t.level,s=void 0===a?null:a;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),Object.defineProperties(this,{actual:{value:r,enumerable:!0},available:{value:o,enumerable:!0},level:{value:s,enumerable:!0}})}},function(e,t,n){"use strict";e.exports=function e(t){var n=t.fractionLost,r=void 0===n?null:n,i=t.level,o=void 0===i?null:i;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),Object.defineProperties(this,{fractionLost:{value:r,enumerable:!0},level:{value:o,enumerable:!0}})}},function(e,t,n){"use strict";e.exports=function e(t){var n=t.jitter,r=void 0===n?null:n,i=t.rtt,o=void 0===i?null:i,a=t.level,s=void 0===a?null:a;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),Object.defineProperties(this,{jitter:{value:r,enumerable:!0},rtt:{value:o,enumerable:!0},level:{value:s,enumerable:!0}})}},function(e,t,n){"use strict";var r=function(e){function t(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e))}return function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),t}(n(228));e.exports=r},function(e,t,n){"use strict";var r=function(e){function t(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e))}return function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),t}(n(227));e.exports=r},function(e,t,n){"use strict";var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();var i=function(e){function t(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e.sid,e.name,e.kind,e.enabled,e.priority))}return function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),r(t,[{key:"update",value:function(e){return this.enable(e.enabled),this.setPriority(e.priority),this}}]),t}(n(445));e.exports=i},function(e,t,n){"use strict";var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();var i=function(e){function t(e,n,r,i,o){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var a=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,n,r,i,o));return Object.defineProperties(a,{_isSwitchedOff:{value:!1,writable:!0}}),a.setSid(e),a}return function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),r(t,[{key:"subscribeFailed",value:function(e){return this.error||(this._error=e,this.emit
2("updated")),this}},{key:"setPriority",value:function(e){return this._priority!==e&&(this._priority=e,this.emit("updated")),this}},{key:"setSwitchedOff",value:function(e){return this._isSwitchedOff!==e&&(this._isSwitchedOff=e,this.emit("updated")),this}},{key:"isSubscribed",get:function(){return!!this.trackTransceiver}},{key:"isSwitchedOff",get:function(){return this._isSwitchedOff}}]),t}(n(229));e.exports=i},function(e,t,n){"use strict";var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();var i=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),Object.defineProperties(this,{_mediaSignalingTransport:{value:t}})}return r(e,[{key:"sendTrackPriorityUpdate",value:function(e,t,n){var r,i,o;this._mediaSignalingTransport.publish((o=n,(i=t)in(r={type:"track_priority",track:e})?Object.defineProperty(r,i,{value:o,enumerable:!0,configurable:!0,writable:!0}):r[i]=o,r))}}]),e}();e.exports=i},function(e,t,n){"use strict";var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();var i=function(e){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var n=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return e.on("message",(function(e){switch(e.type){case"track_switch_off":n._setTrackSwitchOffUpdates(e.off||[],e.on||[])}})),n}return function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),r(t,[{key:"_setTrackSwitchOffUpdates",value:function(e,t){this.emit("updated",e,t)}}]),t}(n(18).EventEmitter);e.exports=i},function(e,t,n){"use strict";var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();var i=n(87).getSdpFormat,o=n(206),a=n(449),s=n(450),u=n(89),c=n(451),l=n(215),f=n(35).reconnectBackoffConfig,h=n(114),d=n(22),p=d.createBandwidthProfilePayload,v=d.createMediaSignalingPayload,y=d.createSubscribePayload,m=d.getUserAgent,g=n(77),b=g.createTwilioError,_=g.RoomCompletedError,w=g.SignalingConnectionError,k=g.SignalingServerBusyError,S=o.name+".js",O=o.version,E={connecting:["connected","disconnected"],connected:["disconnected","syncing"],syncing:["connected","disconnected"],disconnected:[]},T=function(e){function t(e,n,r,o,u,h){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),h=Object.assign({Backoff:l,InsightsPublisher:a,NullInsightsPublisher:s,TwilioConnection:c,iceServers:null,sdpFormat:i(h.sdpSemantics),trackPriority:!0,trackSwitchOff:!0,userAgent:m()},h);var d=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,"connecting",E)),p={};h.wsServerInsights&&(p.gateway=h.wsServerInsights);var v=h.insights?h.InsightsPublisher:h.NullInsightsPublisher;return Object.defineProperties(d,{_accessToken:{value:n},_automaticSubscription:{value:h.automaticSubscription},_bandwidthProfile:{value:h.bandwidthProfile},_dominantSpeaker:{value:h.dominantSpeaker},_eventPublisher:{value:new v(n,S,O,h.environment,h.realm,p)},_iceServersStatus:{value:Array.isArray(h.iceServers)?"overrode":"acquire"},_localParticipant:{value:r},_name:{value:e},_networkQuality:{value:h.networkQuality},_options:{value:h},_peerConnectionManager:{value:o},_sessionTimer:{value:null,writable:!0},_sessionTimeoutMS:{value:0,writable:!0},_reconnectBackoff:{value:h.Backoff.exponential(f)},_session:{value:null,writable:!0},_trackPriority:{value:h.trackPriority},_trackSwitchOff:{value:h.trackSwitchOff},_twilioConnection:{value:null,writable:!0},_updatesReceived:{value:[]},_updatesToSend:{value:[]},_userAgent:{value:h.userAgent},_wsServer:{value:u}}),h.eventObserver&&h.eventObserver.setPublisher(d._eventPublisher),function(e){function t(){if("disconnected"!==e.state){e._twilioConnection&&e._twilioConnection.removeListener("message",r);var t=e._iceServersStatus,i=e._options,o=e._wsServer,a=e.state,s=i.TwilioConnection,u=new s(o,Ob
2ject.assign({helloBody:"connecting"===a&&"acquire"===t?e._createIceMessage():e._createConnectOrSyncOrDisconnectMessage()},i));u.once("close",(function(e){e===s.CloseReason.LOCAL?n():n(new Error(e))})),u.on("message",r),e._twilioConnection=u}}function n(n){if("disconnected"!==e.state)if(n){var r=e._getReconnectTimer();if(r)"connected"===e.state&&e.preempt("syncing"),r.then(t);else{var i=n.message===c.CloseReason.BUSY?new k:new w;e.disconnect(i)}}else e.disconnect()}function r(t){if("disconnected"!==e.state)if("error"!==t.type)switch(e.state){case"connected":switch(t.type){case"connected":case"synced":case"update":return void e.emit("message",t);case"disconnected":return void e.disconnect("completed"===t.status?new _:null);default:return}case"connecting":switch(t.type){case"iced":return void e._options.onIced(t.ice_servers).then((function(){e._sendConnectOrSyncOrDisconnectMessage()}));case"connected":return e._setSession(t.session,t.options.session_timeout),e.emit("connected",t),void e.preempt("connected");case"synced":case"update":return void e._updatesReceived.push(t);case"disconnected":return void e.disconnect("completed"===t.status?new _:null);default:return}case"syncing":switch(t.type){case"connected":case"update":return void e._updatesReceived.push(t);case"synced":return e._clearReconnectTimer(),e.emit("message",t),void e.preempt("connected");case"disconnected":return void e.disconnect("completed"===t.status?new _:null);default:return}default:return}else e.disconnect(b(t.code,t.message))}e.on("stateChanged",(function t(n){switch(n){case"connected":var i=e._updatesToSend.splice(0);return i.length&&e.publish(function(e){return e.reduce((function(e,t){return(!e.participant&&t.participant||e.participant&&t.participant&&t.participant.revision>e.participant.revision)&&(e.participant=t.participant),!e.peer_connections&&t.peer_connections?e.peer_connections=C(t.peer_connections):e.peer_connections&&t.peer_connections&&(e.peer_connections=C(e.peer_connections.concat(t.peer_connections))),e}),{})}(i)),void e._updatesReceived.splice(0).forEach((function(t){return e.emit("message",t)}));case"disconnected":return e._twilioConnection.removeListener("message",r),void e.removeListener("stateChanged",t);case"syncing":default:return}}));var i=e._options,o=e._iceServersStatus,a=i.iceServers,s=i.onIced;"overrode"===o?s(a).then(t):t()}(d),d.once("connected",(function(e){var t=e.sid,n=e.participant;d._eventPublisher.connect(t,n.sid)})),d}return function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),r(t,[{key:"_createConnectOrSyncOrDisconnectMessage",value:function(){if("connected"===this.state)return null;if("disconnected"===this.state)return{session:this._session,type:"disconnect",version:2};var e={connecting:"connect",syncing:"sync"}[this.state],t={name:this._name,participant:this._localParticipant.getState(),peer_connections:this._peerConnectionManager.getStates(),type:e,version:2};if("connect"===t.type){t.ice_servers=this._iceServersStatus,t.publisher={name:S,sdk_version:O,user_agent:this._userAgent},this._bandwidthProfile&&(t.bandwidth_profile=p(this._bandwidthProfile)),t.media_signaling=v(this._dominantSpeaker,this._networkQuality,this._trackPriority,this._trackSwitchOff),t.subscribe=y(this._automaticSubscription);var n=this._options.sdpFormat;n&&(t.format=n),t.token=this._accessToken}else"sync"===t.type?(t.session=this._session,t.token=this._accessToken):"update"===t.type&&(t.session=this._session);return t}},{key:"_createIceMessage",value:function(){return{edge:"roaming",token:this._accessToken,type:"ice",version:1}}},{key:"_sendConnectOrSyncOrDisconnectMessage",value:function(){var e=this._createConnectOrSyncOrDisconnectMessage();e&&this._twilioConnection.sendMessage(e)}},{key:"disconnect",value:function(e){return"disconnected"!==this.state&&(this.preempt("disconnected",null,[e]),this._sendConnectOrSyncOrDisconnectMessage(),this._twilioConnection.close(),this._eventPublisher.disconnect(),!0)}},{key:"publish",value:function(e){switch(this.state){case"connected":return this._twilioConnection.sendMessage(Object.assign({session:this._session,type:"update",version:2},e)),!0;case"connecting":case"syncing":return this._updatesToSend.push(e),!0;case"disconnected":default:return!1}}},{key:"publishEvent",value:function(e,t,n){return this._eventPublisher.publish(e,t,n)}},{key:"sync",value:function(){return"connected"===this.state&&(this.preempt("syncing"),this._sendConnectOrSyncOrDisconnectMessage(),!0)}},{key:"_setSession",value:function(e,t){this._session=e,this._sessionTimeoutMS=1e3*t}},{key:"_getReconnectTimer",value:function(){var e=this;return 0===this._sessionTimeoutMS?null:(this._sessionTimer||(this._sessionTimer=new h((function(){e._sessionTimer&&(e._sessionTimeoutMS=0)}),this._sessionTimeoutMS)),new Promise((function(t){e._reconnectBackoff.once("ready",t),e._reconnectBackoff.backoff()})))}},{key:"_clearReconnectTimer",value:function(){this._reconnectBackoff.reset(),this._sessionTimer&&(this._sessionTimer.clear(),this._sessionTimer=null)}}]),t}(u);function C(e){return Array.from(e.reduce((function(e,t){var n=e.get(t.id)||t;return(!n.description&&t.description||n.description&&t.description&&t.description.revision>n.description.revision)&&(n.description=t.description),(!n.ice&&t.ice||n.ice&&t.ice&&t.ice.revision>n.ice.revision)&&(n.ice=t.ice),e.set(n.id,n),e}),new Map).values())}
2e.exports=T},function(e,t,n){"use strict";(function(t){var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();var i=n(18).EventEmitter,o=n(22).getUserAgent,a=t.window||t,s=a.WebSocket?a.WebSocket:n(230),u=n(22),c=function(e){function t(e,n,r,i,a,c){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var h=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return c=Object.assign({gateway:f(i,a)+"/v1/VideoEvents",maxReconnectAttempts:5,reconnectIntervalMs:50,userAgent:o(),WebSocket:s},c),Object.defineProperties(h,{_connectTimestamp:{value:0,writable:!0},_eventQueue:{value:[]},_readyToConnect:{value:u.defer()},_reconnectAttemptsLeft:{value:c.maxReconnectAttempts,writable:!0},_ws:{value:null,writable:!0},_WebSocket:{value:c.WebSocket}}),h._readyToConnect.promise.then((function(t){var i=t.roomSid,o=t.participantSid,a=h;h.on("disconnected",(function t(s){if(a._session=null,s&&a._reconnectAttemptsLeft>0)return a.emit("reconnecting"),void function(e,t,n,r,i,o,a){var s=Date.now()-e._connectTimestamp,u=a.reconnectIntervalMs-s;if(u>0)return void setTimeout((function(){l(e,t,n,r,i,o,a)}),u);l(e,t,n,r,i,o,a)}(a,e,n,r,i,o,c);a.removeListener("disconnected",t)})),l(h,e,n,r,i,o,c)})).catch((function(){})),h}return function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),r(t,[{key:"connect",value:function(e,t){this._readyToConnect.resolve({roomSid:e,participantSid:t})}},{key:"_publish",value:function(e){e.session=this._session,this._ws.send(JSON.stringify(e))}},{key:"disconnect",value:function(){if(null===this._ws||this._ws.readyState===this._WebSocket.CLOSING||this._ws.readyState===this._WebSocket.CLOSED)return!1;try{this._ws.close()}catch(e){}return this.emit("disconnected"),!0}},{key:"publish",value:function(e,t,n){return(null===this._ws||this._ws.readyState!==this._WebSocket.CLOSING&&this._ws.readyState!==this._WebSocket.CLOSED)&&(("string"===typeof this._session?this._publish.bind(this):this._eventQueue.push.bind(this._eventQueue))({group:e,name:t,payload:n,timestamp:Date.now(),type:"event",version:1}),!0)}}]),t}(i);function l(e,t,n,r,i,o,a){e._connectTimestamp=Date.now(),e._reconnectAttemptsLeft--,e._ws=new a.WebSocket(a.gateway);var s=e._ws;s.addEventListener("close",(function(t){1e3!==t.code?e.emit("disconnected",new Error("WebSocket Error "+t.code+": "+t.reason)):e.emit("disconnected")})),s.addEventListener("message",(function(t){!function(e,t,n){switch(t.type){case"connected":e._session=t.session,e._reconnectAttemptsLeft=n.maxReconnectAttempts,e._eventQueue.splice(0).forEach(e._publish,e),e.emit("connected");break;case"error":e._ws.close(),e.emit("disconnected",new Error(t.message))}}(e,JSON.parse(t.data),a)})),s.addEventListener("open",(function(){var e={type:"connect",token:t,version:1};e.publisher={name:n,sdkVersion:r,userAgent:a.userAgent,participantSid:o,roomSid:i},s.send(JSON.stringify(e))}))}function f(e,t){return"prod"===e?"wss://sdkgw."+t+".twilio.com":"wss://sdkgw."+e+"-"+t+".twilio.com"}e.exports=c}).call(this,n(44))},function(e,t,n){"use strict";var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();var i=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),Object.defineProperties(this,{_connected:{writable:!0,value:!0}})}
2return r(e,[{key:"connect",value:function(){}},{key:"disconnect",value:function(){return!!this._connected&&(this._connected=!1,!0)}},{key:"publish",value:function(){return this._connected}}]),e}();e.exports=i},function(e,t,n){"use strict";(function(t){var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();var i=n(89),o=n(22),a=o.buildLogLevels,s=o.makeUUID,u=n(88),c=n(452),l=n(114),f=0,h={closed:[],connecting:["closed","open","waiting"],early:["closed","connecting"],open:["closed"],waiting:["closed","connecting","early","open"]},d={closed:"close",open:"open",waiting:"waiting"},p=3e3,v=3001,y=3002,m=3003,g=3005,b=3006,_=t.window||t,w=_.WebSocket?_.WebSocket:n(230),k={BUSY:"busy",FAILED:"failed",LOCAL:"local",REMOTE:"remote",TIMEOUT:"timeout"},S=new Map([[p,k.TIMEOUT],[v,k.TIMEOUT],[y,k.FAILED],[m,k.FAILED],[3004,k.TIMEOUT],[b,k.BUSY],[3007,k.TIMEOUT]]),O=function(e){function t(e,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var r=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,"early",h));n=Object.assign({helloBody:null,maxConsecutiveFailedHellos:3,maxConsecutiveMissedHeartbeats:3,requestedHeartbeatTimeout:5e3,openTimeout:15e3,welcomeTimeout:5e3,Log:u,WebSocket:w},n);var i=a(n.logLevel),o=new n.Log("default",r,i,n.loggerName),s=n.networkMonitor?new c((function(){var e=s.type,t="Network changed"+(e?" to "+e:"");o.debug(t),r._close({code:3004,reason:t})})):null;Object.defineProperties(r,{_busyWaitTimeout:{value:null,writable:!0},_consecutiveHeartbeatsMissed:{value:0,writable:!0},_cookie:{value:null,writable:!0},_eventObserver:{value:n.eventObserver},_heartbeatTimeout:{value:null,writable:!0},_hellosLeft:{value:n.maxConsecutiveFailedHellos,writable:!0},_instanceId:{value:++f},_log:{value:o},_messageQueue:{value:[]},_networkMonitor:{value:s},_options:{value:n},_openTimeout:{value:null,writable:!0},_sendHeartbeatTimeout:{value:null,writable:!0},_serverUrl:{value:e},_welcomeTimeout:{value:null,writable:!0},_ws:{value:null,writable:!0}});var l={connecting:"info",early:"info",open:"info",waiting:"warning",closed:"info"};return r.on("stateChanged",(function(e){for(var t=arguments.length,n=Array(t>1?t-1:0),i=1;i<t;i++)n[i-1]=arguments[i];e in d&&r.emit.apply(r,[d[e]].concat(n));var o={name:e,group:"signaling",level:l[r.state]};if("closed"===e){var a=n[0];o.payload={reason:a},o.level=a===k.LOCAL?"info":"error"}r._eventObserver.emit("event",o)})),r._eventObserver.emit("event",{name:r.state,group:"signaling",level:l[r.state]}),r._connect(),r}return function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),r(t,[{key:"toString",value:function(){return"[TwilioConnection #"+this._instanceId+": "+this._ws.url+"]"}},{key:"_close",value:function(e){var t=e.code,n=e.reason;if("closed"!==this.state){this._openTimeout&&this._openTimeout.clear(),this._welcomeTimeout&&this._welcomeTimeout.clear(),this._heartbeatTimeout&&this._heartbeatTimeout.clear(),this._sendHeartbeatTimeout&&this._sendHeartbeatTimeout.clear(),this._networkMonitor&&this._networkMonitor.stop(),this._busyWaitTimeout&&t!==g&&this._busyWaitTimeout.clear(),this._messageQueue.splice(0);var r=this._log;1e3===t?(r.debug("Closed"),this.transition("closed",null,[k.LOCAL])):(r.warn("Closed: "+t+" - "+n),t!==g&&this.transition("closed",null,[S.get(t)||k.REMOTE]));var i=this._ws.readyState,o=this._options.WebSocket;i!==o.CLOSING&&i!==o.CLOSED&&this._ws.close(t,n)}}},{key:"_connect",value:function(){var e=this,t=this._log;if("waiting"===this.state)this.transition("early");else if("early"!==this.state)return void t.warn('Unexpected state "'+this.state+'" for connecting to the TCMP server.');this._ws=new this._options.WebSocket(this._serverUrl);var n=this._ws;t.debug("Created a new WebSocket:",n),n.addEventListener("close",(function(t){return e._close(t)}));var r=this._options.openTimeout;this._openTimeout=new l((function(){var t="Failed to open in "+r+" ms";e._close({code:3007,reason:t})}),r),n.addEventListener("open",(function(){t.debug("WebSocket opened:",n),e._openTimeout.clear(),e._startHandshake(),e._networkMonitor&&e._networkMonitor.start()})),n.addEventListener("message",(function(n){t.debug("Incoming: "+n.data);try{n=JSON.parse(n.data)}catch(r){return void e.emit("error",r)}switch(n.type){case"bad":e._handleBad(n);break;case"busy":e._handleBusy(n);break;case"bye":break;case"msg":e._handleMessage(n);case"heartbeat":e._handleHeartbeat();break;case"welcome":e._handleWelcome(n);break;default:e._log.debug("Unknown message type: "+n.type),e.emit("error",new Error("Unknown message type: "+n.type))}}))}},{key:"_handleBad",value:function(e){var t=e.reason,n=this._log;
2if(["connecting","open"].includes(this.state)){if("connecting"===this.state)return n.warn("Closing: 3002 - "+t),void this._close({code:y,reason:t});n.debug("Error: "+t),this.emit("error",new Error(t))}else n.warn('Unexpected state "'+this.state+'" for handling a "bad" message from the TCMP server.')}},{key:"_handleBusy",value:function(e){var t=this,n=e.cookie,r=e.keepAlive,i=e.retryAfter,o=this._log;if(["connecting","waiting"].includes(this.state)){this._busyWaitTimeout&&this._busyWaitTimeout.clear(),this._welcomeTimeout&&this._welcomeTimeout.clear();var a=i<0?'Received terminal "busy" message':'Received "busy" message, retrying after '+i+" ms";if(i<0)return o.warn("Closing: 3006 - "+a),void this._close({code:b,reason:a});var s=this._options.maxConsecutiveFailedHellos;this._hellosLeft=s,this._cookie=n||null,r?(o.warn(a),this._busyWaitTimeout=new l((function(){return t._startHandshake()}),i)):(o.warn("Closing: 3005 - "+a),this._close({code:g,reason:a}),this._busyWaitTimeout=new l((function(){return t._connect()}),i)),this.transition("waiting",null,[r,i])}else o.warn('Unexpected state "'+this.state+'" for handling a "busy" message from the TCMP server.')}},{key:"_handleHeartbeat",value:function(){"open"===this.state?this._heartbeatTimeout.reset():this._log.warn('Unexpected state "'+this.state+'" for handling a "heartbeat" message from the TCMP server.')}},{key:"_handleHeartbeatTimeout",value:function(){if("open"===this.state){var e=this._log,t=this._options.maxConsecutiveMissedHeartbeats;e.debug("Consecutive heartbeats missed: "+t);var n="Missed "+t+' "heartbeat" messages';e.warn("Closing: 3001 - "+n),this._close({code:v,reason:n})}}},{key:"_handleMessage",value:function(e){var t=e.body;"open"===this.state?this.emit("message",t):this._log.warn('Unexpected state "'+this.state+'" for handling a "msg" message from the TCMP server.')}},{key:"_handleWelcome",value:function(e){var t=this,n=e.negotiatedTimeout,r=this._log;if(["connecting","waiting"].includes(this.state)){"waiting"===this.state&&(r.debug('Received "welcome" message, no need to retry connection.'),this._busyWaitTimeout.clear());var i=n*this._options.maxConsecutiveMissedHeartbeats,o=n-200;this._welcomeTimeout.clear(),this._heartbeatTimeout=new l((function(){return t._handleHeartbeatTimeout()}),i),this._messageQueue.splice(0).forEach((function(e){return t._send(e)})),this._sendHeartbeatTimeout=new l((function(){return t._sendHeartbeat()}),o),this.transition("open")}else r.warn('Unexpected state "'+this.state+'" for handling a "welcome" message from the TCMP server.')}},{key:"_handleWelcomeTimeout",value:function(){if("connecting"===this.state){var e=this._log;if(this._hellosLeft<=0){var t="All handshake attempts failed";return e.warn("Closing: 3000 - "+t),void this._close({code:p,reason:t})}var n=this._options.maxConsecutiveFailedHellos;e.warn("Handshake attempt "+(n-this._hellosLeft)+" failed"),this._startHandshake()}}},{key:"_send",value:function(e){if(this._ws.readyState===this._options.WebSocket.OPEN){var t=JSON.stringify(e);this._log.debug("Outgoing: "+t);try{this._ws.send(t),this._sendHeartbeatTimeout&&this._sendHeartbeatTimeout.reset()}catch(r){var n="Failed to send message";this._log.warn("Closing: 3003 - "+n),this._close({code:m,reason:n})}}}},{key:"_sendHeartbeat",value:function(){"closed"!==this.state&&this._send({type:"heartbeat"})}},{key:"_sendHello",value:function(){var e=this._options,t=e.helloBody,n=e.requestedHeartbeatTimeout,r={id:s(),timeout:n,type:"hello",version:2};this._cookie&&(r.cookie=this._cookie),t&&(r.body=t),this._send(r)}},{key:"_sendOrEnqueue",value:function(e){var t=this;"closed"!==this.state&&("open"===this.state?function(e){return t._send(e)}:function(e){return t._messageQueue.push(e)})(e)}},{key:"_startHandshake",value:function(){var e=this;if(["early","waiting"].includes(this.state)&&this.transition("connecting"),"connecting"===this.state){this._hellosLeft--,this._sendHello();var t=this._options.welcomeTimeout;this._welcomeTimeout=new l((function(){return e._handleWelcomeTimeout()}),t)}}},{key:"close",value:function(){"closed"!==this.state&&(this._sendOrEnqueue({type:"bye"}),this._close({code:1e3,reason:"Normal"}))}},{key:"sendMessage",value:function(e){this._sendOrEnqueue({body:e,type:"msg"})}}]),t}(i);O.CloseReason=k,e.exports=O}).call(this,n(44))},function(e,t,n){"use strict";var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();var i=function(){function e(t,n){var r=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e);var i=(n=Object.assign({navigator:navigator,window:window},n)).navigator,o=i.connection||{type:null},a=o.type,s=o.type?{_events:{value:["change","typechange"]},_listener:{value:function(){var e=a!==r.type&&r.isOnline;a=r.type,e&&t()}},_target:{value:o}}:{_events:{value:["online"]},_listener:{value:t},_target:{value:n.window}},u=s._events,c=s._listener,l=s._target;Object.defineProperties(this,{isOnline:{enumerable:!0,get:function(){return"boolean"!==typeof i.onLine||i.onLine}},type:{enumerable:!0,get:function(){return o.type||null}},_listener:c,_events:u,_target:l})}return r(e,[{key:"start",value:function(){var e=this;
2this._events.forEach((function(t){e._target.addEventListener(t,e._listener)}))}},{key:"stop",value:function(){var e=this;this._events.forEach((function(t){e._target.removeEventListener(t,e._listener)}))}}]),e}();e.exports=i},function(e,t,n){"use strict";var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),i=function e(t,n,r){null===t&&(t=Function.prototype);var i=Object.getOwnPropertyDescriptor(t,n);if(void 0===i){var o=Object.getPrototypeOf(t);return null===o?void 0:e(o,n,r)}if("value"in i)return i.value;var a=i.get;return void 0!==a?a.call(r):void 0};var o=n(454),a=n(455),s=n(22).isDeepEqual,u=function(e){function t(e,n,r){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),r=Object.assign({LocalTrackPublicationV2:a},r);var i=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return Object.defineProperties(i,{_bandwidthProfile:{value:null,writable:!0},_bandwidthProfileRevision:{value:0,writable:!0},_encodingParameters:{value:e},_removeListeners:{value:new Map},_LocalTrackPublicationV2:{value:r.LocalTrackPublicationV2},_publishedRevision:{writable:!0,value:0},_revision:{writable:!0,value:1},_signalingRegion:{value:null,writable:!0},bandwidthProfile:{enumerable:!0,get:function(){return this._bandwidthProfile}},bandwidthProfileRevision:{enumerable:!0,get:function(){return this._bandwidthProfileRevision}},networkQualityConfiguration:{enumerable:!0,value:n},revision:{enumerable:!0,get:function(){return this._revision}},signalingRegion:{enumerable:!0,get:function(){return this._signalingRegion}}}),i}return function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),r(t,[{key:"setSignalingRegion",value:function(e){this._signalingRegion||(this._signalingRegion=e)}},{key:"setBandwidthProfile",value:function(e){s(this._bandwidthProfile,e)||(this._bandwidthProfile=JSON.parse(JSON.stringify(e)),this._bandwidthProfileRevision++,this.didUpdate())}},{key:"setParameters",value:function(e){return this._encodingParameters.update(e),this}},{key:"update",value:function(e){return this._publishedRevision>=e.revision||(this._publishedRevision=e.revision,e.tracks.forEach((function(e){var t=this.tracks.get(e.id);t&&t.update(e)}),this)),this}},{key:"_createLocalTrackPublicationSignaling",value:function(e,t,n){return new this._LocalTrackPublicationV2(e,t,n)}},{key:"addTrack",value:function(e,n,r){var o=this;i(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"addTrack",this).call(this,e,n,r);var a=this.getPublication(e),s=a.isEnabled,u=a.updatedPriority,c=function(){s===a.isEnabled&&u===a.updatedPriority||(o.didUpdate(),s=a.isEnabled,u=a.updatedPriority)};return a.on("updated",c),this._removeListener(a),this._removeListeners.set(a,(function(){return a.removeListener("updated",c)})),this.didUpdate(),this}},{key:"_removeListener",value:function(e){var t=this._removeListeners.get(e);t&&t()}},{key:"getState",value:function(){return{revision:this.revision,tracks:Array.from(this.tracks.values()).map((function(e){return e.getState()}))}}},{key:"didUpdate",value:function(){this._revision++,this.emit("updated")}},{key:"removeTrack",value:function(e){var n=i(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"removeTrack",this).call(this,e);return n&&(e.removeClone(n.trackTransceiver),this._removeListener(n),this.didUpdate()),n}},{key:"setNetworkQualityConfiguration",value:function(e){this.networkQualityConfiguration.update(e)}}]),t}(o);e.exports=u},function(e,t,n){"use strict";var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),i=function e(t,n,r){null===t&&(t=Function.prototype);var i=Object.getOwnPropertyDescriptor(t,n);if(void 0===i){var o=Object.getPrototypeOf(t);return null===o?void 0:e(o,n,r)}if("value"in i)return i.value;var a=i.get;return void 0!==a?a.call(r):void 0};var o=function(e){function t(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var e=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return Object.defineProperties(e,{_publicationsToTrackSenders:{value:new Map},_trackSendersToPublications:{value:new Map}}),e}return function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),r(t,[{key:"addTrack",value:function(e,n,r){var o=this._createLocalTrackPublicationSignaling(e,n,r);return this._trackSendersToPublications.set(e,o),this._publicationsToTrackSenders.set(o,e),i(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"addTrack",this).call(this,o),this}},{key:"getPublication",value:function(e){return this._trackSendersToPublications.get(e)||null}},{key:"getSender",value:function(e){return this._publicationsToTrackSenders.get(e)||null}},{key:"removeTrack",value:function(e){var n=this._trackSendersToPublications.get(e);return n?(this._trackSendersToPublications.delete(e),this._publicationsToTrackSenders.delete(n),i(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"removeTrack",this).call(this,n)&&n.stop(),n):null}}]),t}(n(139));e.exports=o},function(e,t,n){"use strict";var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();
2var i=n(456),o=n(77).createTwilioError,a=function(e){function t(e,n,r){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,n,r))}return function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),r(t,[{key:"getState",value:function(){return{enabled:this.isEnabled,id:this.id,kind:this.kind,name:this.name,priority:this.updatedPriority}}},{key:"update",value:function(e){switch(e.state){case"ready":this.setSid(e.sid);break;case"failed":var t=e.error;this.publishFailed(o(t.code,t.message))}return this}}]),t}(i);e.exports=a},function(e,t,n){"use strict";var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),i=function e(t,n,r){null===t&&(t=Function.prototype);var i=Object.getOwnPropertyDescriptor(t,n);if(void 0===i){var o=Object.getPrototypeOf(t);return null===o?void 0:e(o,n,r)}if("value"in i)return i.value;var a=i.get;return void 0!==a?a.call(r):void 0};var o=function(e){function t(e,n,r){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var i="data"===(e=e.clone()).kind||e.track.enabled,o=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,n,e.kind,i,r));return o.setTrackTransceiver(e),Object.defineProperties(o,{_updatedPriority:{value:r,writable:!0},id:{enumerable:!0,value:e.id}}),o}return function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),r(t,[{key:"enable",value:function(e){return e="boolean"!==typeof e||e,this.trackTransceiver.track.enabled=e,i(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"enable",this).call(this,e)}},{key:"publishFailed",value:function(e){return function(e,t){if(null!==e._sid||e._error)return!1;return e._error=t,!0}(this,e)&&this.emit("updated"),this}},{key:"setPriority",value:function(e){return this._updatedPriority!==e&&(this._updatedPriority=e,this.emit("updated")),this}},{key:"setSid",value:function(e){return this._error?this:i(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"setSid",this).call(this,e)}},{key:"stop",value:function(){this.trackTransceiver.stop()}},{key:"updatedPriority",get:function(){return this._updatedPriority}}]),t}(n(229));e.exports=o},function(e,t,n){"use strict";var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();var i=n(139),o=n(226),a=n(89),s={closed:["opening"],opening:["closed","open"],open:["closed","closing"],closing:["closed","open"]},u=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,"closed",s))}return function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),r(t,[{key:"_close",value:function(e){return this.transition("closing",e),this.transition("closed",e),Promise.resolve(this)}},{key:"_connect",value:function(e,t,n,r,i){e.connect("PA00000000000000000000000000000000","test");var a=Promise.resolve(new o(e,"RM00000000000000000000000000000000",i));return a.cancel=function(){},a}},{key:"_open",value:function(e){return this.transition("opening",e),this.transition("open",e),Promise.resolve(this)}},{key:"close",value:function(){var e=this;return this.bracket("close",(function(t){switch(e.state){case"closed":return e;case"open":return e._close(t);default:throw new Error('Unexpected Signaling state "'+e.state+'"')}}))}},{key:"connect",value:function(e,t,n,r,i){var o=this;return this.bracket("connect",(function a(s){switch(o.state){case"closed":return o._open(s).then(a.bind(null,s));case"open":return o.releaseLockCompletely(s),o._connect(e,t,n,r,i);default:throw new Error('Unexpected Signaling state "'+o.state+'"')}}))}},{key:"createLocalParticipantSignaling",value:function(){return new i}},{key:"open",value:function(){var e=this;return this.bracket("open",(function(t){switch(e.state){case"closed":return e._open(t);case"open":return e;default:throw new Error('Unexpected Signaling state "'+e.state+'"')}}))}}]),t}(a);e.exports=u},function(e,t,n){"use strict";var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}var a=n(18).EventEmitter,s=["signaling","room"],u=["debug","error","info","warning"],c=function(e){function t(e,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;i(this,t);var a=o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return Object.defineProperties(a,{_publisher:{value:null,writable:!0}}),a.on("event",(function(t){var i=t.name,o=t.group,c=t.level,l=t.payload;if("string"!==typeof i)throw new Error("Unexpected name: ",i);if(!s.includes(o))throw new Error("Unexpected group: ",o);if(!u.includes(c))throw new Error("Unexpected level: ",c);var f=Date.now(),h=f-e;if(a._publisher){var d=Object.assign(l||{},{elapsedTime:h,level:c});a._publisher.publish(o,i,d)}var p=Object.assign(l?{payload:l}:{},{elapsedTime:h,group:o,level:c,name:i,timestamp:f});if(n[{debug:"debug",error:"error",info:"info",warning:"warn"}[c]]("event",p),r&&"signaling"===o){var v=Object.assign(l?{payload:l}:{},{elapsedTime:h,group:o,level:c,name:i,timestamp:f});r.emit("event",v)}})),a}return function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),r(t,[{key:"setPublisher",value:function(e){this._publisher=e}}]),t}(a);e.exports=c},function(e,t,n){"use strict";var r=n(26),i=r.guessBrowser,o=r.support,a=["edg","edge","electron","headlesschrome"];function s(e){if("chrome"!==e)return null;if("brave"in navigator)return"brave";var t,n=(function(e){for(var t=[],n=[],r=0;r<e.length;r++)if("("===e[r])t.push(r);else if(")"===e[r]&&t.length>0){var i=t.pop();0===t.length&&n.push(e.substring(i,r+1))}return n}(navigator.userAgent).reduce((function(e,t){return e.replace(t,"")}),navigator.userAgent).match(/[^\s]+/g)||[]).map((function(e){return e.split("/")[0].toLowerCase()}));return(t=n,Array.isArray(t)?t:Array.from(t)).slice(2).find((function(e){return!["chrome","mobile","safari"].includes(e)}))||null}e.exports=function(){var e=i(),t=s(e);return!!e&&o()&&(!t||a.includes(t))&&!function(e){return"chrome"===e&&/Edge/.test(navigator.userAgent)&&("undefined"===typeof chrome||"undefined"===typeof chrome.runtime)}(e)}},,,function(e,t,n){"use strict";var r=h(n(38)),i=h(n(232)),o=h(n(40)),a=h(n(49)),s=h(n(62)),u=h(n(24)),c=h(n(63)),l=h(n(64)),f=h(n(23));
2function h(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var d=n(18),p=n(53),v=n(503),y=n(255);t.User=y.User;var m=n(508),g=n(509),b=n(265),_=n(529),w=n(107),k=n(272),S=n(573),O=n(587),E=n(595),T=n(605),C=n(623),P=n(626),x=n(627),I=n(628),j=n(629);t.PushNotification=j.PushNotification;var R=n(54),A=p.Logger.scope("Client"),M=n(293).version,N="A valid Twilio token should be provided",L=function e(){(0,f.default)(this,e)},D=function(e){function t(e,n){(0,f.default)(this,t);var r=(0,c.default)(this,(t.__proto__||(0,s.default)(t)).call(this));r.connectionState="connecting",r.sessionPromise=null,r.channelsPromise=null,r.version=M,r.parsePushNotification=t.parsePushNotification,r.options=n||{},r.options.disableDeepClone||(r.options=R.deepClone(r.options)),r.options.logLevel=r.options.logLevel||"silent",A.setLevel(r.options.logLevel);var i=r.options.productId="ip_messaging";if(r.options.clientMetadata=r.options.clientMetadata||{},r.options.clientMetadata.hasOwnProperty("type")||(r.options.clientMetadata.type="chat"),r.options.clientMetadata.hasOwnProperty("sdk")||(r.options.clientMetadata.sdk="JS",r.options.clientMetadata.sdkv=M),r.options.Sync=r.options.Sync||{},"undefined"===typeof r.options.Sync.enableSessionStorage&&(r.options.Sync.enableSessionStorage=!0),r.options.region&&(r.options.Sync.region=r.options.region),!e)throw new Error(N);return r.services=new L,r.config=new v.Configuration(r.options),r.options.twilsockClient=r.options.twilsockClient||new w.Twilsock(e,i,r.options),r.options.transport=r.options.transport||r.options.twilsockClient,r.options.notificationsClient=r.options.notificationsClient||new k.Notifications(e,r.options),r.options.syncClient=r.options.syncClient||new S.SyncClient(e,r.options),r.services.syncClient=r.options.syncClient,r.services.transport=r.options.transport,r.services.twilsockClient=r.options.twilsockClient,r.services.notificationClient=r.options.notificationsClient,r.services.session=new E.Session(r.services,r.config),r.sessionPromise=r.services.session.initialize(),r.services.network=new g.Network(r.config,r.services),r.services.users=new C.Users({session:r.services.session,network:r.services.network,syncClient:r.services.syncClient}),r.services.users.on("userSubscribed",r.emit.bind(r,"userSubscribed")),r.services.users.on("userUpdated",(function(e){return r.emit("userUpdated",e)})),r.services.users.on("userUnsubscribed",r.emit.bind(r,"userUnsubscribed")),r.services.twilsockClient.on("tokenAboutToExpire",(function(e){return r.emit("tokenAboutToExpire",e)})),r.services.twilsockClient.on("tokenExpired",(function(){return r.emit("tokenExpired")})),r.services.twilsockClient.on("connectionError",(function(e){return r.emit("connectionError",e)})),r.services.consumptionHorizon=new x.ConsumptionHorizon(r.services),r.services.typingIndicator=new P.TypingIndicator(r.config,{transport:r.services.twilsockClient,notificationClient:r.services.notificationClient},r.getChannelBySid.bind(r)),r.services.syncList=new _.SyncList(r.services),r.channels=new T.Channels(r.services),r.channelsPromise=r.sessionPromise.then((function(){return r.channels.on("channelAdded",r.emit.bind(r,"channelAdded")),r.channels.on("channelRemoved",r.emit.bind(r,"channelRemoved")),r.channels.on("channelInvited",r.emit.bind(r,"channelInvited")),r.channels.on("channelJoined",r.emit.bind(r,"channelJoined")),r.channels.on("channelLeft",r.emit.bind(r,"channelLeft")),r.channels.on("channelUpdated",(function(e){return r.emit("channelUpdated",e)})),r.channels.on("memberJoined",r.emit.bind(r,"memberJoined")),r.channels.on("memberLeft",r.emit.bind(r,"memberLeft")),r.channels.on("memberUpdated",(function(e){return r.emit("memberUpdated",e)})),r.channels.on("messageAdded",r.emit.bind(r,"messageAdded")),r.channels.on("messageUpdated",(function(e){return r.emit("messageUpdated",e)})),r.channels.on("messageRemoved",r.emit.bind(r,"messageRemoved")),r.channels.on("typingStarted",r.emit.bind(r,"typingStarted")),r.channels.on("typingEnded",r.emit.bind(r,"typingEnded")),r.channels.fetchChannels()})).then((function(){return r.channels})),r.services.notificationClient.on("connectionStateChanged",(function(e){var t=null;switch(e){case"connected":t="connected";break;case"denied":t="denied";break;case"disconnecting":t="disconnecting";break;case"disconnected":t="disconnected";break;default:t="connecting"}t!==r.connectionState&&(r.connectionState=t,r.emit("connectionStateChanged",r.connectionState))})),r.fpaToken=e,r}return(0,l.default)(t,e),(0,u.default)(t,[{key:"subscribeToPushNotifications",value:function(e){var t=this,n=[];return[b.NotificationTypes.NEW_MESSAGE,b.NotificationTypes.ADDED_TO_CHANNEL,b.NotificationTypes.INVITED_TO_CHANNEL,b.NotificationTypes.REMOVED_FROM_CHANNEL,b.NotificationTypes.TYPING_INDICATOR,b.NotificationTypes.CONSUMPTION_UPDATE].forEac
2h((function(r){n.push(t.services.notificationClient.subscribe(r,e))})),a.default.all(n)}},{key:"unsubscribeFromPushNotifications",value:function(e){var t=this,n=[];return[b.NotificationTypes.NEW_MESSAGE,b.NotificationTypes.ADDED_TO_CHANNEL,b.NotificationTypes.INVITED_TO_CHANNEL,b.NotificationTypes.REMOVED_FROM_CHANNEL,b.NotificationTypes.TYPING_INDICATOR,b.NotificationTypes.CONSUMPTION_UPDATE].forEach((function(r){n.push(t.services.notificationClient.unsubscribe(r,e))})),a.default.all(n)}},{key:"initialize",value:function(){var e=(0,o.default)(r.default.mark((function e(){var n,o,a=this;return r.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.sessionPromise;case 2:return t.supportedPushChannels.forEach((function(e){return a.subscribeToPushNotifications(e)})),e.next=5,this.services.session.getSessionLinks();case 5:return n=e.sent,this.services.publicChannels=new m.PublicChannels(this,this.services,n.publicChannelsUrl),this.services.userChannels=new I.UserChannels(this,this.services,n.myChannelsUrl),(o=(0,i.default)(this.options)).transport=null,this.services.mcsClient=new O.McsClient(this.fpaToken,n.mediaServiceUrl,o),e.next=13,this.services.typingIndicator.initialize();case 13:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"shutdown",value:function(){var e=(0,o.default)(r.default.mark((function e(){return r.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.services.twilsockClient.disconnect();case 2:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"updateToken",value:function(){var e=(0,o.default)(r.default.mark((function e(t){var n=this;return r.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(A.info("updateToken"),t){e.next=3;break}throw new Error(N);case 3:if(this.fpaToken!==t){e.next=5;break}return e.abrupt("return",this);case 5:return e.next=7,this.services.twilsockClient.updateToken(t).then((function(){return n.fpaToken=t})).then((function(){return n.services.mcsClient.updateToken(t)})).then((function(){return n.sessionPromise}));case 7:return e.abrupt("return",this);case 8:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"getChannelBySid",value:function(){var e=(0,o.default)(r.default.mark((function e(t){var n=this;return r.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t&&"string"===typeof t){e.next=2;break}throw new Error("Client.getChannelBySid requires a <String>channelSid parameter");case 2:return e.abrupt("return",this.channels.syncListRead.promise.then((function(){return n.channels.getChannel(t).then((function(e){return e||n.services.publicChannels.getChannelBySid(t).then((function(e){return n.channels.pushChannel(e)}))}))})));case 3:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"getChannelByUniqueName",value:function(){var e=(0,o.default)(r.default.mark((function e(t){var n=this;return r.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t&&"string"===typeof t){e.next=2;break}throw new Error("Client.getChannelByUniqueName requires a <String>uniqueName parameter");case 2:return e.abrupt("return",this.channels.syncListRead.promise.then((function(){return n.services.publicChannels.getChannelByUniqueName(t).then((function(e){return n.channels.pushChannel(e)}))})));case 3:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"getSubscribedChannels",value:function(e){return this.channelsPromise.then((function(t){return t.getChannels(e)}))}},{key:"getLocalChannels",value:function(e){return this.channelsPromise.then((function(n){var r=[];n.channels.forEach((function(e){r.push(e)}));var i="ascending";if(e&&e.order)if("descending"===e.order)i="descending";else if("ascending"!==e.order)throw new Error("Sorting order should be `ascending` or `descending`");if(e&&e.criteria)if("lastMessage"===e.criteria)r.sort((function(e,n){return t.compareChannelsByLastMessage(e,n,i)}));else if("uniqueName"===e.criteria)r.sort((function(e,n){return t.compareChannelsByStringProperty(e.uniqueName,n.uniqueName,i)}));else{if("friendlyName"!==e.criteria)throw new Error("Sorting criteria should be one of `lastMessage`, `uniqueName` or `friendlyName`");r.sort((function(e,n){return t.compareChannelsByStringProperty(e.friendlyName,n.friendlyName,i)}))}return r}))}},{key:"getPublicChannelDescriptors",value:function(){return this.services.publicChannels.getChannels()}},{key:"getUserChannelDescriptors",value:function(){return this.services.userChannels.getChannels()}},{key:"createChannel",value:function(e){return e=e||{},this.channelsPromise.then((function(t){return t.addChannel(e)}))}},{key:"setPushRegistrationId",value:function(){var e=(0,o.default)(r.default.mark((function e(n,i){var o=this;return r.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(-1!==t.supportedPushChannels.indexOf(n)){e.next=2;break}throw new Error("Invalid or unsupported channelType: "+n);case 2:return e.next=4,this.subscribeToPushNotifications(n).then((function(){return o.services.notificationClient.setPushRegistrationId(i,n)}));case 4:case"end":return e.stop()}}),e,this)})));return function(t,n){return e.apply(this,arguments)}}()},{key:"unsetPushRegistrationId",value:function(){var e=(0,o.default)(r.default.mark((function e(n){return r.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(-1!==t.supportedPushChannels.indexOf(n)){e.next=2;break}throw new Error("Invalid or unsupported channelType: "+n);case 2:return e.next=4,this.unsubscribeFromPushNotifications(n);case 4:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"handlePushNotification",value:function(){var e=(0,o.default)(r.default.mark((function e(n){return r.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:A.debug("handlePushNotification, notificationPayload=",n),this.emit
2("pushNotification",t.parsePushNotification(n));case 2:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"getUser",value:function(e){return this.services.users.getUser(e)}},{key:"getUserDescriptor",value:function(){var e=(0,o.default)(r.default.mark((function e(t){return r.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",this.services.users.getUserDescriptor(t));case 1:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"getSubscribedUsers",value:function(){var e=(0,o.default)(r.default.mark((function e(){return r.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",this.services.users.getSubscribedUsers());case 1:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"user",get:function(){return this.services.users.myself}},{key:"reachabilityEnabled",get:function(){return this.services.session.reachabilityEnabled}},{key:"token",get:function(){return this.fpaToken}}],[{key:"create",value:function(){var e=(0,o.default)(r.default.mark((function e(n,i){var o;return r.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return o=new t(n,i),e.next=3,o.initialize();case 3:return e.abrupt("return",o);case 4:case"end":return e.stop()}}),e,this)})));return function(t,n){return e.apply(this,arguments)}}()},{key:"compareChannelsByLastMessage",value:function(e,t,n){if(e.lastMessage&&t.lastMessage){if(e.lastMessage.dateCreated&&t.lastMessage.dateCreated)return e.lastMessage.dateCreated.getTime()<t.lastMessage.dateCreated.getTime()?"ascending"===n?-1:1:"ascending"===n?1:-1;if(e.lastMessage.dateCreated)return-1;if(t.lastMessage.dateCreated)return 1}return e.lastMessage?-1:t.lastMessage?1:0}},{key:"compareChannelsByStringProperty",value:function(e,t,n){return e&&t?"ascending"===n?e.localeCompare(t):-1*e.localeCompare(t):e?-1:t?1:0}},{key:"parsePushNotificationChatData",value:function(e){var n={};for(var r in t.supportedPushDataFields)"undefined"!==typeof e[r]&&null!==e[r]&&("message_index"===r?null!==R.parseToNumber(e[r])&&(n[t.supportedPushDataFields[r]]=Number(e[r])):n[t.supportedPushDataFields[r]]=e[r]);return n}},{key:"parsePushNotification",value:function(e){if(A.debug("parsePushNotification, notificationPayload=",e),"undefined"===typeof e||null===e)throw new Error("Push notification payload should be provided");if("undefined"!==typeof e.aps){if(!e.twi_message_type)throw new Error("Provided push notification payload does not contain Programmable Chat push notification type");var n=t.parsePushNotificationChatData(e),r=e.aps,i=null,o=null;return"string"===typeof r.alert?i=r.alert||null:(i=r.alert.body||null,o=r.alert.title||null),new j.PushNotification({title:o,body:i,sound:r.sound||null,badge:r.badge||null,action:r.category||null,type:e.twi_message_type,data:n})}if("undefined"!==typeof e.data){var a=e.data;if(!a.twi_message_type)throw new Error("Provided push notification payload does not contain Programmable Chat push notification type");var s=t.parsePushNotificationChatData(e.data);return new j.PushNotification({title:a.twi_title||null,body:a.twi_body||null,sound:a.twi_sound||null,badge:null,action:a.twi_action||null,type:a.twi_message_type,data:s})}throw new Error("Provided push notification payload is not Programmable Chat notification")}}]),t}(d.EventEmitter);t.Client=D,D.version=M,D.supportedPushChannels=["fcm","apn","gcm"],D.supportedPushDataFields={channel_sid:"channelSid",message_sid:"messageSid",message_index:"messageIndex"},t.default=D},function(e,t,n){var r=function(){return this}()||Function("return this")(),i=r.regeneratorRuntime&&Object.getOwnPropertyNames(r).indexOf("regeneratorRuntime")>=0,o=i&&r.regeneratorRuntime;if(r.regeneratorRuntime=void 0,e.exports=n(464),i)r.regeneratorRuntime=o;else try{delete r.regeneratorRuntime}catch(a){r.regeneratorRuntime=void 0}},function(e,t){!function(t){"use strict";var n,r=Object.prototype,i=r.hasOwnProperty,o="function"===typeof Symbol?Symbol:{},a=o.iterator||"@@iterator",s=o.asyncIterator||"@@asyncIterator",u=o.toStringTag||"@@toStringTag",c="object"===typeof e,l=t.regeneratorRuntime;if(l)c&&(e.exports=l);else{(l=t.regeneratorRuntime=c?e.exports:{}).wrap=_;var f="suspendedStart",h="suspendedYield",d="executing",p="completed",v={},y={};y[a]=function(){return this};var m=Object.getPrototypeOf,g=m&&m(m(j([])));g&&g!==r&&i.call(g,a)&&(y=g);var b=O.prototype=k.prototype=Object.create(y);S.prototype=b.constructor=O,O.constructor=S,O[u]=S.displayName="GeneratorFunction",l.isGeneratorFunction=function(e){var t="function"===typeof e&&e.constructor;return!!t&&(t===S||"GeneratorFunction"===(t.displayName||t.name))},l.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,O):(e.__proto__=O,u in e||(e[u]="GeneratorFunction")),e.prototype=Object.create(b),e},l.awrap=function(e){return{__await:e}},E(T.prototype),T.prototype[s]=function(){return this},l.AsyncIterator=T,l.async=function(e,t,n,r){var i=new T(_(e,t,n,r));return l.isGeneratorFunction(t)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},E(b),b[u]="Generator",b[a]=function(){return this},b.toString=function(){return"[object Generator]"},l.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}},l.values=j,I.prototype={constructor:I,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=n,this.done=!1,this.delegate=null,this.method="next",this.arg=n,this.tryEntries.forEac
vendor: 4,284 bytes, line 2
2h(x),!e)for(var t in this)"t"===t.charAt(0)&&i.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=n)},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(r,i){return s.type="throw",s.arg=e,t.next=r,i&&(t.method="next",t.arg=n),!!i}for(var o=this.tryEntries.length-1;o>=0;--o){var a=this.tryEntries[o],s=a.completion;if("root"===a.tryLoc)return r("end");if(a.tryLoc<=this.prev){var u=i.call(a,"catchLoc"),c=i.call(a,"finallyLoc");if(u&&c){if(this.prev<a.catchLoc)return r(a.catchLoc,!0);if(this.prev<a.finallyLoc)return r(a.finallyLoc)}else if(u){if(this.prev<a.catchLoc)return r(a.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return r(a.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var r=this.tryEntries[n];if(r.tryLoc<=this.prev&&i.call(r,"finallyLoc")&&this.prev<r.finallyLoc){var o=r;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=e,a.arg=t,o?(this.method="next",this.next=o.finallyLoc,v):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),v},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),x(n),v}},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 i=r.arg;x(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:j(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=n),v}}}function _(e,t,n,r){var i=t&&t.prototype instanceof k?t:k,o=Object.create(i.prototype),a=new I(r||[]);return o._invoke=function(e,t,n){var r=f;return function(i,o){if(r===d)throw new Error("Generator is already running");if(r===p){if("throw"===i)throw o;return R()}for(n.method=i,n.arg=o;;){var a=n.delegate;if(a){var s=C(a,n);if(s){if(s===v)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(r===f)throw r=p,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r=d;var u=w(e,t,n);if("normal"===u.type){if(r=n.done?p:h,u.arg===v)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(r=p,n.method="throw",n.arg=u.arg)}}}(e,n,a),o}function w(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(r){return{type:"throw",arg:r}}}function k(){}function S(){}function O(){}function E(e){["next","throw","return"].forEach((function(t){e[t]=function(e){return this._invoke(t,e)}}))}function T(e){function t(n,r,o,a){var s=w(e[n],e,r);if("throw"!==s.type){var u=s.arg,c=u.value;return c&&"object"===typeof c&&i.call(c,"__await")?Promise.resolve(c.__await).then((function(e){t("next",e,o,a)}),(function(e){t("throw",e,o,a)})):Promise.resolve(c).then((function(e){u.value=e,o(u)}),a)}a(s.arg)}var n;this._invoke=function(e,r){function i(){return new Promise((function(n,i){t(e,r,n,i)}))}return n=n?n.then(i,i):i()}}function C(e,t){var r=e.iterator[t.method];if(r===n){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=n,C(e,t),"throw"===t.method))return v;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return v}var i=w(r,e.iterator,t.arg);if("throw"===i.type)return t.method="throw",t.arg=i.arg,t.delegate=null,v;var o=i.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=n),t.delegate=null,v):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,v)}function P(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 x(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function I(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(P,this),this.reset(!0)}function j(e){if(e){var t=e[a];if(t)return t.call(e);
vendor: 4,063 bytes, line 2
2if("function"===typeof e.next)return e;if(!isNaN(e.length)){var r=-1,o=function t(){for(;++r<e.length;)if(i.call(e,r))return t.value=e[r],t.done=!1,t;return t.value=n,t.done=!0,t};return o.next=o}}return{next:R}}function R(){return{value:n,done:!0}}}(function(){return this}()||Function("return this")())},function(e,t,n){n(466),e.exports=n(25).Object.assign},function(e,t,n){var r=n(36);r(r.S+r.F,"Object",{assign:n(467)})},function(e,t,n){"use strict";var r=n(60),i=n(101),o=n(148),a=n(118),s=n(80),u=n(142),c=Object.assign;e.exports=!c||n(71)((function(){var e={},t={},n=Symbol(),r="abcdefghijklmnopqrst";return e[n]=7,r.split("").forEach((function(e){t[e]=e})),7!=c({},e)[n]||Object.keys(c({},t)).join("")!=r}))?function(e,t){for(var n=s(e),c=arguments.length,l=1,f=o.f,h=a.f;c>l;)for(var d,p=u(arguments[l++]),v=f?i(p).concat(f(p)):i(p),y=v.length,m=0;y>m;)d=v[m++],r&&!h.call(p,d)||(n[d]=p[d]);return n}:c},function(e,t,n){var r=n(90),i=n(116),o=n(469);e.exports=function(e){return function(t,n,a){var s,u=r(t),c=i(u.length),l=o(a,c);if(e&&n!=n){for(;c>l;)if((s=u[l++])!=s)return!0}else for(;c>l;l++)if((e||l in u)&&u[l]===n)return e||l||0;return!e&&-1}}},function(e,t,n){var r=n(144),i=Math.max,o=Math.min;e.exports=function(e,t){return(e=r(e))<0?i(e+t,0):o(e,t)}},function(e,t,n){n(119),n(81),n(92),n(476),n(479),n(480),e.exports=n(25).Promise},function(e,t,n){var r=n(144),i=n(143);e.exports=function(e){return function(t,n){var o,a,s=String(i(t)),u=r(n),c=s.length;return u<0||u>=c?e?"":void 0:(o=s.charCodeAt(u))<55296||o>56319||u+1===c||(a=s.charCodeAt(u+1))<56320||a>57343?e?s.charAt(u):o:e?s.slice(u,u+2):a-56320+(o-55296<<10)+65536}}},function(e,t,n){"use strict";var r=n(104),i=n(100),o=n(105),a={};n(70)(a,n(42)("iterator"),(function(){return this})),e.exports=function(e,t,n){e.prototype=r(a,{next:i(1,n)}),o(e,t+" Iterator")}},function(e,t,n){var r=n(58),i=n(59),o=n(101);e.exports=n(60)?Object.defineProperties:function(e,t){i(e);for(var n,a=o(t),s=a.length,u=0;s>u;)r.f(e,n=a[u++],t[n]);return e}},function(e,t,n){"use strict";var r=n(475),i=n(238),o=n(91),a=n(90);e.exports=n(149)(Array,"Array",(function(e,t){this._t=a(e),this._i=0,this._k=t}),(function(){var e=this._t,t=this._k,n=this._i++;return!e||n>=e.length?(this._t=void 0,i(1)):i(0,"keys"==t?n:"values"==t?e[n]:[n,e[n]])}),"values"),o.Arguments=o.Array,r("keys"),r("values"),r("entries")},function(e,t){e.exports=function(){}},function(e,t,n){"use strict";var r,i,o,a,s=n(103),u=n(39),c=n(65),l=n(120),f=n(36),h=n(45),d=n(78),p=n(150),v=n(106),y=n(241),m=n(242).set,g=n(477)(),b=n(152),_=n(244),w=n(478),k=n(245),S="Promise",O=u.TypeError,E=u.process,T=E&&E.versions,C=T&&T.v8||"",P=u.Promise,x="process"==l(E),I=function(){},j=i=b.f,R=!!function(){try{var e=P.resolve(1),t=(e.constructor={})[n(42)("species")]=function(e){e(I,I)};return(x||"function"==typeof PromiseRejectionEvent)&&e.then(I)instanceof t&&0!==C.indexOf("6.6")&&-1===w.indexOf("Chrome/66")}catch(r){}}(),A=function(e){var t;return!(!h(e)||"function"!=typeof(t=e.then))&&t},M=function(e,t){if(!e._n){e._n=!0;var n=e._c;g((function(){for(var r=e._v,i=1==e._s,o=0,a=function(t){var n,o,a,s=i?t.ok:t.fail,u=t.resolve,c=t.reject,l=t.domain;try{s?(i||(2==e._h&&D(e),e._h=1),!0===s?n=r:(l&&l.enter(),n=s(r),l&&(l.exit(),a=!0)),n===t.promise?c(O("Promise-chain cycle")):(o=A(n))?o.call(n,u,c):u(n)):c(r)}catch(f){l&&!a&&l.exit(),c(f)}};n.length>o;)a(n[o++]);e._c=[],e._n=!1,t&&!e._h&&N(e)}))}},N=function(e){m.call(u,(function(){var t,n,r,i=e._v,o=L(e);if(o&&(t=_((function(){x?E.emit("unhandledRejection",i,e):(n=u.onunhandledrejection)?n({promise:e,reason:i}):(r=u.console)&&r.error&&r.error("Unhandled promise rejection",i)})),e._h=x||L(e)?2:1),e._a=void 0,o&&t.e)throw t.v}))},L=function(e){return 1!==e._h&&0===(e._a||e._c).length},D=function(e){m.call(u,(function(){var t;x?E.emit("rejectionHandled",e):(t=u.onrejectionhandled)&&t({promise:e,reason:e._v})}))},F=function(e){var t=this;t._d||(t._d=!0,(t=t._w||t)._v=e,t._s=2,t._a||(t._a=t._c.slice()),M(t,!0))},U=function e(t){var n,r=this;if(!r._d){r._d=!0,r=r._w||r;
vendor: 3,532 bytes, line 2
2try{if(r===t)throw O("Promise can't be resolved itself");(n=A(t))?g((function(){var i={_w:r,_d:!1};try{n.call(t,c(e,i,1),c(F,i,1))}catch(o){F.call(i,o)}})):(r._v=t,r._s=1,M(r,!1))}catch(i){F.call({_w:r,_d:!1},i)}}};R||(P=function(e){p(this,P,S,"_h"),d(e),r.call(this);try{e(c(U,this,1),c(F,this,1))}catch(t){F.call(this,t)}},(r=function(e){this._c=[],this._a=void 0,this._s=0,this._d=!1,this._v=void 0,this._h=0,this._n=!1}).prototype=n(153)(P.prototype,{then:function(e,t){var n=j(y(this,P));return n.ok="function"!=typeof e||e,n.fail="function"==typeof t&&t,n.domain=x?E.domain:void 0,this._c.push(n),this._a&&this._a.push(n),this._s&&M(this,!1),n.promise},catch:function(e){return this.then(void 0,e)}}),o=function(){var e=new r;this.promise=e,this.resolve=c(U,e,1),this.reject=c(F,e,1)},b.f=j=function(e){return e===P||e===a?new o(e):i(e)}),f(f.G+f.W+f.F*!R,{Promise:P}),n(105)(P,S),n(246)(S),a=n(25).Promise,f(f.S+f.F*!R,S,{reject:function(e){var t=j(this);return(0,t.reject)(e),t.promise}}),f(f.S+f.F*(s||!R),S,{resolve:function(e){return k(s&&this===a?P:this,e)}}),f(f.S+f.F*!(R&&n(247)((function(e){P.all(e).catch(I)}))),S,{all:function(e){var t=this,n=j(t),r=n.resolve,i=n.reject,o=_((function(){var n=[],o=0,a=1;v(e,!1,(function(e){var s=o++,u=!1;n.push(void 0),a++,t.resolve(e).then((function(e){u||(u=!0,n[s]=e,--a||r(n))}),i)})),--a||r(n)}));return o.e&&i(o.v),n.promise},race:function(e){var t=this,n=j(t),r=n.reject,i=_((function(){v(e,!1,(function(e){t.resolve(e).then(n.resolve,r)}))}));return i.e&&r(i.v),n.promise}})},function(e,t,n){var r=n(39),i=n(242).set,o=r.MutationObserver||r.WebKitMutationObserver,a=r.process,s=r.Promise,u="process"==n(102)(a);e.exports=function(){var e,t,n,c=function(){var r,i;for(u&&(r=a.domain)&&r.exit();e;){i=e.fn,e=e.next;try{i()}catch(o){throw e?n():t=void 0,o}}t=void 0,r&&r.enter()};if(u)n=function(){a.nextTick(c)};else if(!o||r.navigator&&r.navigator.standalone)if(s&&s.resolve){var l=s.resolve(void 0);n=function(){l.then(c)}}else n=function(){i.call(r,c)};else{var f=!0,h=document.createTextNode("");new o(c).observe(h,{characterData:!0}),n=function(){h.data=f=!f}}return function(r){var i={fn:r,next:void 0};t&&(t.next=i),e||(e=i,n()),t=i}}},function(e,t,n){var r=n(39).navigator;e.exports=r&&r.userAgent||""},function(e,t,n){"use strict";var r=n(36),i=n(25),o=n(39),a=n(241),s=n(245);r(r.P+r.R,"Promise",{finally:function(e){var t=a(this,i.Promise||o.Promise),n="function"==typeof e;return this.then(n?function(n){return s(t,e()).then((function(){return n}))}:e,n?function(n){return s(t,e()).then((function(){throw n}))}:e)}})},function(e,t,n){"use strict";var r=n(36),i=n(152),o=n(244);r(r.S,"Promise",{try:function(e){var t=i.f(this),n=o(e);return(n.e?t.reject:t.resolve)(n.v),t.promise}})},function(e,t,n){n(482),e.exports=n(25).Object.getPrototypeOf},function(e,t,n){var r=n(80),i=n(237);n(248)("getPrototypeOf",(function(){return function(e){return i(r(e))}}))},function(e,t,n){e.exports={default:n(484),__esModule:!0}},function(e,t,n){n(485);var r=n(25).Object;e.exports=function(e,t,n){return r.defineProperty(e,t,n)}},function(e,t,n){var r=n(36);r(r.S+r.F*!n(60),"Object",{defineProperty:n(58).f})},function(e,t,n){e.exports={default:n(487),__esModule:!0}},function(e,t,n){n(81),n(92),e.exports=n(154).f("iterator")},function(e,t,n){e.exports={default:n(489),__esModule:!0}},function(e,t,n){n(490),n(119),n(493),n(494),e.exports=n(25).Symbol},function(e,t,n){"use strict";var r=n(39),i=n(79),o=n(60),a=n(36),s=n(235),u=n(155).KEY,c=n(71),l=n(146),f=n(105),h=n(117
vendor: 5,218 bytes, line 2
2),d=n(42),p=n(154),v=n(156),y=n(491),m=n(250),g=n(59),b=n(45),_=n(80),w=n(90),k=n(141),S=n(100),O=n(104),E=n(492),T=n(252),C=n(148),P=n(58),x=n(101),I=T.f,j=P.f,R=E.f,A=r.Symbol,M=r.JSON,N=M&&M.stringify,L=d("_hidden"),D=d("toPrimitive"),F={}.propertyIsEnumerable,U=l("symbol-registry"),V=l("symbols"),B=l("op-symbols"),q=Object.prototype,W="function"==typeof A&&!!C.f,z=r.QObject,H=!z||!z.prototype||!z.prototype.findChild,G=o&&c((function(){return 7!=O(j({},"a",{get:function(){return j(this,"a",{value:7}).a}})).a}))?function(e,t,n){var r=I(q,t);r&&delete q[t],j(e,t,n),r&&e!==q&&j(q,t,r)}:j,K=function(e){var t=V[e]=O(A.prototype);return t._k=e,t},Y=W&&"symbol"==typeof A.iterator?function(e){return"symbol"==typeof e}:function(e){return e instanceof A},Q=function(e,t,n){return e===q&&Q(B,t,n),g(e),t=k(t,!0),g(n),i(V,t)?(n.enumerable?(i(e,L)&&e[L][t]&&(e[L][t]=!1),n=O(n,{enumerable:S(0,!1)})):(i(e,L)||j(e,L,S(1,{})),e[L][t]=!0),G(e,t,n)):j(e,t,n)},$=function(e,t){g(e);for(var n,r=y(t=w(t)),i=0,o=r.length;o>i;)Q(e,n=r[i++],t[n]);return e},X=function(e){var t=F.call(this,e=k(e,!0));return!(this===q&&i(V,e)&&!i(B,e))&&(!(t||!i(this,e)||!i(V,e)||i(this,L)&&this[L][e])||t)},J=function(e,t){if(e=w(e),t=k(t,!0),e!==q||!i(V,t)||i(B,t)){var n=I(e,t);return!n||!i(V,t)||i(e,L)&&e[L][t]||(n.enumerable=!0),n}},Z=function(e){for(var t,n=R(w(e)),r=[],o=0;n.length>o;)i(V,t=n[o++])||t==L||t==u||r.push(t);return r},ee=function(e){for(var t,n=e===q,r=R(n?B:w(e)),o=[],a=0;r.length>a;)!i(V,t=r[a++])||n&&!i(q,t)||o.push(V[t]);return o};W||(s((A=function(){if(this instanceof A)throw TypeError("Symbol is not a constructor!");var e=h(arguments.length>0?arguments[0]:void 0),t=function t(n){this===q&&t.call(B,n),i(this,L)&&i(this[L],e)&&(this[L][e]=!1),G(this,e,S(1,n))};return o&&H&&G(q,e,{configurable:!0,set:t}),K(e)}).prototype,"toString",(function(){return this._k})),T.f=J,P.f=Q,n(251).f=E.f=Z,n(118).f=X,C.f=ee,o&&!n(103)&&s(q,"propertyIsEnumerable",X,!0),p.f=function(e){return K(d(e))}),a(a.G+a.W+a.F*!W,{Symbol:A});for(var te="hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables".split(","),ne=0;te.length>ne;)d(te[ne++]);for(var re=x(d.store),ie=0;re.length>ie;)v(re[ie++]);a(a.S+a.F*!W,"Symbol",{for:function(e){return i(U,e+="")?U[e]:U[e]=A(e)},keyFor:function(e){if(!Y(e))throw TypeError(e+" is not a symbol!");for(var t in U)if(U[t]===e)return t},useSetter:function(){H=!0},useSimple:function(){H=!1}}),a(a.S+a.F*!W,"Object",{create:function(e,t){return void 0===t?O(e):$(O(e),t)},defineProperty:Q,defineProperties:$,getOwnPropertyDescriptor:J,getOwnPropertyNames:Z,getOwnPropertySymbols:ee});var oe=c((function(){C.f(1)}));a(a.S+a.F*oe,"Object",{getOwnPropertySymbols:function(e){return C.f(_(e))}}),M&&a(a.S+a.F*(!W||c((function(){var e=A();return"[null]"!=N([e])||"{}"!=N({a:e})||"{}"!=N(Object(e))}))),"JSON",{stringify:function(e){for(var t,n,r=[e],i=1;arguments.length>i;)r.push(arguments[i++]);if(n=t=r[1],(b(t)||void 0!==e)&&!Y(e))return m(t)||(t=function(e,t){if("function"==typeof n&&(t=n.call(this,e,t)),!Y(t))return t}),r[1]=t,N.apply(M,r)}}),A.prototype[D]||n(70)(A.prototype,D,A.prototype.valueOf),f(A,"Symbol"),f(Math,"Math",!0),f(r.JSON,"JSON",!0)},function(e,t,n){var r=n(101),i=n(148),o=n(118);e.exports=function(e){var t=r(e),n=i.f;if(n)for(var a,s=n(e),u=o.f,c=0;s.length>c;)u.call(e,a=s[c++])&&t.push(a);return t}},function(e,t,n){var r=n(90),i=n(251).f,o={}.toString,a="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];e.exports.f=function(e){return a&&"[object Window]"==o.call(e)?function(e){try{return i(e)}catch(t){return a.slice()}}(e):i(r(e))}},function(e,t,n){n(156)("asyncIterator")},function(e,t,n){n(156)("observable")},function(e,t,n){n(496),e.exports=n(25).Object.setPrototypeOf},function(e,t,n){var r=n(36);r(r.S,"Object",{setPrototypeOf:n(497).set})},function(e,t,n){var r=n(45),i=n(59),o=function(e,t){if(i(e),!r(t)&&null!==t)throw TypeError(t+": can't set as prototype!")};e.exports={set:Object.setPrototypeOf||("__proto__"in{}?function(e,t,r){try{(r=n(65)(Function.call,n(252).f(Object.prototype,"__proto__").set,2))(e,[]),t=!(e instanceof Array)}catch(i){t=!0}return function(e,n){return o(e,n),t?e.__proto__=n:r(e,n),e}}({},!1):void 0),check:o}},function(e,t,n){n(499);var r=n(25).Object;e.exports=function(e,t){return r.create(e,t)}},function(e,t,n){var r=n(36);r(r.S,"Object",{create:n(104)})},function(e,t,n){n(81),n(501),e.exports=n(25).Array.from},function(e,t,n){"use strict";var r=n(65),i=n(36),o=n(80),a=n(239),s=n(240),u=n(116),c=n(502),l=n(151);i(i.S+i.F*!n(247)((function(e){Array.from(e)})),"Array",{from:function(e){var t,n,i,f,h=o(e),d="function"==typeof this?this:Array,p=arguments.length,v=p>1?arguments[1]:void 0,y=void 0!==v,m=0,g=l(h);if(y&&(v=r(v,p>2?arguments[2]:void 0,2)),void 0==g||d==Array&&s(g))for(n=new d(t=u(h.length));t>m;m++)c(n,m,y?v(h[m],m):h[m]);else for(f=g.call(h),n=new d;!(i=f.next()).done;m++)c(n,m,y?a(f,v,[i.value,m],!0):i.value);return n.length=m,n}})},function(e,t,n){"use strict";var r=n(58),i=n(100);e.exports=function(e,t,n){t in e?r.f(e,t,i(0,n)):e[t]=n}},function(e,t,n){"use strict";var r=o(n(23)),i=o(n(24));
2function o(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var a=function(){function e(t){(0,r.default)(this,e);var n=(t=t||{}).Chat||t.IPMessaging||t||{};this.region=n.region||t.region,this.baseUrl=n.apiUri||n.typingUri||(this.region&&"us1"!==this.region?"https://aim."+this.region+".twilio.com":"https://aim.twilio.com"),this.typingIndicatorUri=this.baseUrl+"/v1/typing",this.typingIndicatorTimeoutOverride=n.typingIndicatorTimeoutOverride,this.httpCacheIntervalOverride=n.httpCacheIntervalOverride,this.consumptionReportIntervalOverride=n.consumptionReportIntervalOverride,this.userInfosToSubscribeOverride=n.userInfosToSubscribeOverride,this.retryWhenThrottledOverride=n.retryWhenThrottledOverride,this.backoffConfigOverride=n.backoffConfigOverride}return(0,i.default)(e,[{key:"typingIndicatorTimeoutDefault",get:function(){return 5e3}},{key:"httpCacheIntervalDefault",get:function(){return"PT5S"}},{key:"consumptionReportIntervalDefault",get:function(){return"PT5S"}},{key:"userInfosToSubscribeDefault",get:function(){return 100}},{key:"retryWhenThrottledDefault",get:function(){return true}},{key:"backoffConfigDefault",get:function(){return{min:1e3,max:4e3,maxAttemptsCount:3}}}]),e}();t.Configuration=a},function(e,t,n){var r=n(25),i=r.JSON||(r.JSON={stringify:JSON.stringify});e.exports=function(e){return i.stringify.apply(i,arguments)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createTests=t.createPatch=t.applyPatch=void 0;var r=n(256),i=n(506),o=n(507);function a(e,t){var n=r.Pointer.fromJSON(t).evaluate(e);if(void 0!==n)return{op:"test",path:t,value:n.value}}t.applyPatch=function(e,t){return t.map((function(t){return i.apply(e,t)}))},t.createPatch=function(e,t,n){var i=new r.Pointer;return(n?function(e){return function t(n,r,i){var a=e(n,r,i);return Array.isArray(a)?a:o.diffAny(n,r,i,t)}}(n):o.diffAny)(e,t,i)},t.createTests=function(e,t){var n=new Array;return t.filter(o.isDestructive).forEach((function(t){var r=a(e,t.path);if(r&&n.push(r),"from"in t){var i=a(e,t.from);i&&n.push(i)}})),n}},function(e,t,n){"use strict";var r=this&&this.__extends||function(){var e=function(t,n){return(e=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])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(t,"__esModule",{value:!0}),t.apply=t.InvalidOperationError=t.test=t.copy=t.move=t.replace=t.remove=t.add=t.TestError=t.MissingError=void 0;var i=n(256),o=n(158),a=n(257),s=function(e){function t(t){var n=e.call(this,"Value required at path: "+t)||this;return n.path=t,n.name="MissingError",n}return r(t,e),t}(Error);t.MissingError=s;var u=function(e){function t(t,n){var r=e.call(this,"Test failed: "+t+" != "+n)||this;return r.actual=t,r.expected=n,r.name="TestError",r}return r(t,e),t}(Error);function c(e,t,n){if(Array.isArray(e))if("-"==t)e.push(n);else{var r=parseInt(t,10);e.splice(r,0,n)}else e[t]=n}function l(e,t){if(Array.isArray(e)){var n=parseInt(t,10);e.splice(n,1)}else delete e[t]}function f(e,t){var n=i.Pointer.fromJSON(t.path).evaluate(e);return void 0===n.parent?new s(t.path):(c(n.parent,n.key,o.clone(t.value)),null)}function h(e,t){var n=i.Pointer.fromJSON(t.path).evaluate(e);return void 0===n.value?new s(t.path):(l(n.parent,n.key),null)}function d(e,t){var n=i.Pointer.fromJSON(t.path).evaluate(e);if(null===n.parent)return new s(t.path);if(Array.isArray(n.parent)){if(parseInt(n.key,10)>=n.parent.length)return new s(t.path)}else if(void 0===n.value)return new s(t.path);return n.parent[n.key]=t.value,null}function p(e,t){var n=i.Pointer.fromJSON(t.from).evaluate(e);if(void 0===n.value)return new s(t.from);var r=i.Pointer.fromJSON(t.path).evaluate(e);return void 0===r.parent?new s(t.path):(l(n.parent,n.key),c(r.parent,r.key,n.value),null)}function v(e,t){var n=i.Pointer.fromJSON(t.from).evaluate(e);if(void 0===n.value)return new s(t.from);var r=i.Pointer.fromJSON(t.path).evaluate(e);return void 0===r.parent?new s(t.path):(c(r.parent,r.key,o.clone(n.value)),null)}function y(e,t){var n=i.Pointer.fromJSON(t.path).evaluate(e);return a.compare(n.value,t.value)?null:new u(n.value,t.value)}t.TestError=u,t.add=f,t.remove=h,t.replace=d,t.move=p,t.copy=v,t.test=y;var m=function(e){function t(t){var n=e.call(this,"Invalid operation: "+t.op)||this;return n.operation=t,n.name="InvalidOperationError",n}return r(t,e),t}(Error);t.InvalidOperationError=m,t.apply=function(e,t){switch(t.op){case"add":return f(e,t);case"remove":return h(e,t);case"replace":return d(e,t);case"move":return p(e,t);case"copy":return v(e,t);case"test":return y(e,t)}return new m(t)}},function(e,t,n){"use strict";
2Object.defineProperty(t,"__esModule",{value:!0}),t.diffAny=t.diffObjects=t.diffArrays=t.intersection=t.subtract=t.isDestructive=void 0;var r=n(257),i=n(158);function o(e,t){var n={};for(var r in e)i.hasOwnProperty.call(e,r)&&void 0!==e[r]&&(n[r]=1);for(var o in t)i.hasOwnProperty.call(t,o)&&void 0!==t[o]&&delete n[o];return Object.keys(n)}function a(e){for(var t=e.length,n={},r=0;r<t;r++){var o=e[r];for(var a in o)i.hasOwnProperty.call(o,a)&&void 0!==o[a]&&(n[a]=(n[a]||0)+1)}for(var a in n)n[a]<t&&delete n[a];return Object.keys(n)}function s(e,t){return{operations:e.operations.concat(t),cost:e.cost+1}}function u(e,t,n,i){void 0===i&&(i=l);var o={"0,0":{operations:[],cost:0}};var a=isNaN(e.length)||e.length<=0?0:e.length,u=isNaN(t.length)||t.length<=0?0:t.length;return function n(i,a){var u=i+","+a,c=o[u];if(void 0===c){if(i>0&&a>0&&r.compare(e[i-1],t[a-1]))c=n(i-1,a-1);else{var l=[];if(i>0){var f=n(i-1,a),h={op:"remove",index:i-1};l.push(s(f,h))}if(a>0){var d=n(i,a-1),p={op:"add",index:i-1,value:t[a-1]};l.push(s(d,p))}if(i>0&&a>0){var v=n(i-1,a-1),y={op:"replace",index:i-1,original:e[i-1],value:t[a-1]};l.push(s(v,y))}c=l.sort((function(e,t){return e.cost-t.cost}))[0]}o[u]=c}return c}(a,u).operations.reduce((function(e,t){var r=e[0],o=e[1];if(function(e){return"add"===e.op}(t)){var s=t.index+1+o,u=s<a+o?String(s):"-",c={op:t.op,path:n.add(u).toString(),value:t.value};return[r.concat(c),o+1]}if(function(e){return"remove"===e.op}(t)){c={op:t.op,path:n.add(String(t.index+o)).toString()};return[r.concat(c),o-1]}var l=n.add(String(t.index+o)),f=i(t.original,t.value,l);return[r.concat.apply(r,f),o]}),[[],0])[0]}function c(e,t,n,r){void 0===r&&(r=l);var i=[];return o(e,t).forEach((function(e){i.push({op:"remove",path:n.add(e).toString()})})),o(t,e).forEach((function(e){i.push({op:"add",path:n.add(e).toString(),value:t[e]})})),a([e,t]).forEach((function(o){i.push.apply(i,r(e[o],t[o],n.add(o)))})),i}function l(e,t,n,r){if(void 0===r&&(r=l),e===t)return[];var o=i.objectType(e),a=i.objectType(t);return"array"==o&&"array"==a?u(e,t,n,r):"object"==o&&"object"==a?c(e,t,n,r):[{op:"replace",path:n.toString(),value:t}]}t.isDestructive=function(e){var t=e.op;return"remove"===t||"replace"===t||"copy"===t||"move"===t},t.subtract=o,t.intersection=a,t.diffArrays=u,t.diffObjects=c,t.diffAny=l},function(e,t,n){"use strict";var r=s(n(38)),i=s(n(40)),o=s(n(23)),a=s(n(24));function s(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var u=n(54),c=n(121),l=n(258),f=function(){function e(t,n,r){(0,o.default)(this,e),this.client=t,this.services=n,this.url=r}return(0,a.default)(e,[{key:"getChannels",value:function(){var e=(0,i.default)(r.default.mark((function e(){var t,n,i=this,o=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return r.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=new u.UriBuilder(this.url).arg("PageToken",o.pageToken).build(),e.next=3,this.services.network.get(t);case 3:return n=e.sent,e.abrupt("return",new c.RestPaginator(n.body.channels.map((function(e){return new l.ChannelDescriptor(i.client,e)})),(function(e){return i.getChannels({pageToken:e})}),n.body.meta.previous_token,n.body.meta.next_token));case 5:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"getChannelBySid",value:function(){var e=(0,i.default)(r.default.mark((function e(t){var n,i;return r.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=new u.UriBuilder(this.url).path(t).build(),e.next=3,this.services.network.get(n);case 3:return i=e.sent,e.abrupt("return",new l.ChannelDescriptor(this.client,i.body));case 5:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"getChannelByUniqueName",value:function(){var e=(0,i.default)(r.default.mark((function e(t){var n,i;return r.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=new u.UriBuilder(this.url).path(t).build(),e.next=3,this.services.network.get(n);case 3:return i=e.sent,e.abrupt("return",new l.ChannelDescriptor(this.client,i.body));case 5:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()}]),e}();t.PublicChannels=f},function(e,t,n){"use strict";var r=h(n(38)),i=h(n(40)),o=h(n(49)),a=h(n(159)),s=h(n(512)),u=h(n(232)),c=h(n(72)),l=h(n(23)),f=h(n(24));
2function h(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var d=n(93),p=function(){function e(t,n){var r=this;(0,l.default)(this,e),this.config=t,this.services=n,this.cache=new c.default,this.cacheLifetime=0,this.services.session.getHttpCacheInterval().then((function(e){r.cacheLifetime=1e3*e,r.cleanupCache()}))}return(0,f.default)(e,[{key:"backoffConfig",value:function(){return(0,u.default)(this.config.backoffConfigDefault,this.config.backoffConfigOverride)}},{key:"retryWhenThrottled",value:function(){return"undefined"!==typeof this.config.retryWhenThrottledOverride?this.config.retryWhenThrottledOverride:"undefined"!==typeof this.config.retryWhenThrottledDefault&&this.config.retryWhenThrottledDefault}},{key:"isExpired",value:function(e){return!this.cacheLifetime||Date.now()-e>this.cacheLifetime}},{key:"cleanupCache",value:function(){var e=!0,t=!1,n=void 0;try{for(var r,i=(0,a.default)(this.cache);!(e=(r=i.next()).done);e=!0){var o=r.value,u=(0,s.default)(o,2),c=u[0],l=u[1];this.isExpired(l.timestamp)&&this.cache.delete(c)}}catch(f){t=!0,n=f}finally{try{!e&&i.return&&i.return()}finally{if(t)throw n}}0===this.cache.size&&clearInterval(this.timer)}},{key:"pokeTimer",value:function(){var e=this;this.timer=this.timer||setInterval((function(){return e.cleanupCache()}),2*this.cacheLifetime)}},{key:"executeWithRetry",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return new o.default((function(r,i){var o=[502,503,504];n&&o.push(429);var a=new d.Retrier(t.backoffConfig());a.on("attempt",(function(){e().then((function(e){return a.succeeded(e)})).catch((function(e){o.indexOf(e.status)>-1||"Twilsock disconnected"===e.message?a.failed(e):(a.removeAllListeners(),a.cancel(),i(e))}))})),a.on("succeeded",(function(e){r(e)})),a.on("cancelled",(function(e){return i(e)})),a.on("failed",(function(e){return i(e)})),a.start()}))}},{key:"get",value:function(){var e=(0,i.default)(r.default.mark((function e(t){var n,i,o,a=this;return r.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!(n=this.cache.get(t))||this.isExpired(n.timestamp)){e.next=3;break}return e.abrupt("return",n.response);case 3:return i={},e.next=6,this.executeWithRetry((function(){return a.services.transport.get(t,i)}),this.retryWhenThrottled());case 6:return o=e.sent,this.cache.set(t,{response:o,timestamp:Date.now()}),this.pokeTimer(),e.abrupt("return",o);case 10:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()}]),e}();t.Network=p},function(e,t,n){n(92),n(81),e.exports=n(511)},function(e,t,n){var r=n(59),i=n(151);e.exports=n(25).getIterator=function(e){var t=i(e);if("function"!=typeof t)throw TypeError(e+" is not iterable!");return r(t.call(e))}},function(e,t,n){"use strict";t.__esModule=!0;var r=o(n(513)),i=o(n(159));function o(e){return e&&e.__esModule?e:{default:e}}t.default=function(e,t){if(Array.isArray(e))return e;if((0,r.default)(Object(e)))return function(e,t){var n=[],r=!0,o=!1,a=void 0;try{for(var s,u=(0,i.default)(e);!(r=(s=u.next()).done)&&(n.push(s.value),!t||n.length!==t);r=!0);}catch(c){o=!0,a=c}finally{try{!r&&u.return&&u.return()}finally{if(o)throw a}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")}},function(e,t,n){e.exports={default:n(514),__esModule:!0}},function(e,t,n){n(92),n(81),e.exports=n(515)},function(e,t,n){var r=n(120),i=n(42)("iterator"),o=n(91);e.exports=n(25).isIterable=function(e){var t=Object(e);return void 0!==t[i]||"@@iterator"in t||o.hasOwnProperty(r(t))}},function(e,t,n){n(119),n(81),n(92),n(517),n(521),n(523),n(524),e.exports=n(25).Map},function(e,t,n){"use strict";var r=n(259),i=n(160),o="Map";e.exports=n(260)(o,(function(e){return function(){return e(this,arguments.length>0?arguments[0]:void 0)}}),{get:function(e){var t=r.getEntry(i(this,o),e);return t&&t.v},set:function(e,t){return r.def(i(this,o),0===e?0:e,t)}},r,!0)},function(e,t,n){var r=n(65),i=n(142),o=n(80),a=n(116),s=n(519);e.exports=function(e,t){var n=1==e,u=2==e,c=3==e,l=4==e,f=6==e,h=5==e||f,d=t||s;return function(t,s,p){for(var v,y,m=o(t),g=i(m),b=r(s,p,3),_=a(g.length),w=0,k=n?d(t,_):u?d(t,0):void 0;_>w;w++)if((h||w in g)&&(y=b(v=g[w],w,m),e))if(n)k[w]=y;else if(y)switch(e){case 3:return!0;case 5:return v;case 6:return w;case 2:k.push(v)}else if(l)return!1;return f?-1:c||l?l:k}}},function(e,t,n){var r=n(520);e.exports=function(e,t){return new(r(e))(t)}},function(e,t,n){var r=n(45),i=n(250),o=n(42)("species");e.exports=function(e){var t;return i(e)&&("function"!=typeof(t=e.constructor)||t!==Array&&!i(t.prototype)||(t=void 0),r(t)&&null===(t=t[o])&&(t=void 0)),void 0===t?Array:t}},function(e,t,n){var r=n(36);r(r.P+r.R,"Map",{toJSON:n(261)("Map")})},function(e,t,n){var r=n(106);e.exports=function(e,t){var n=[];return r(e,!1,n.push,n,t),n}},function(e,t,n){n(262)("Map")},function(e,t,n){n(263)("Map")},function(e,t,n){"use strict";var r=n(9),i=n(17),o=n(20),a=n(21);
2Object.defineProperty(t,"__esModule",{value:!0});var s=function(e){o(n,e);var t=a(n);function n(e){var i;return r(this,n),(i=t.call(this)).minDelay=e.min,i.maxDelay=e.max,i.initialDelay=e.initial||0,i.maxAttemptsCount=e.maxAttemptsCount||0,i.maxAttemptsTime=e.maxAttemptsTime||0,i.randomness=e.randomness||0,i.inProgress=!1,i.attemptNum=0,i.prevDelay=0,i.currDelay=0,i}return i(n,[{key:"attempt",value:function(){clearTimeout(this.timeout),this.attemptNum++,this.timeout=null,this.emit("attempt",this)}},{key:"nextDelay",value:function(e){if("number"===typeof e)return this.prevDelay=0,this.currDelay=e,e;if(0==this.attemptNum)return this.initialDelay;if(1==this.attemptNum)return this.currDelay=this.minDelay,this.currDelay;this.prevDelay=this.currDelay;var t=this.currDelay+this.prevDelay;return this.maxDelay&&t>this.maxDelay&&(this.currDelay=this.maxDelay,t=this.maxDelay),this.currDelay=t,t}},{key:"randomize",value:function(e){var t=e*this.randomness,n=Math.round(Math.random()*t*2-t);return Math.max(0,e+n)}},{key:"scheduleAttempt",value:function(e){var t=this;if(this.maxAttemptsCount&&this.attemptNum>=this.maxAttemptsCount)return this.cleanup(),this.emit("failed",new Error("Maximum attempt count limit reached")),void this.reject(new Error("Maximum attempt count reached"));var n=this.nextDelay(e);if(n=this.randomize(n),this.maxAttemptsTime&&this.startTimestamp+this.maxAttemptsTime<Date.now()+n)return this.cleanup(),this.emit("failed",new Error("Maximum attempt time limit reached")),void this.reject(new Error("Maximum attempt time limit reached"));this.timeout=setTimeout((function(){return t.attempt()}),n)}},{key:"cleanup",value:function(){clearTimeout(this.timeout),this.timeout=null,this.inProgress=!1,this.attemptNum=0,this.prevDelay=0,this.currDelay=0}},{key:"start",value:function(){var e=this;if(this.inProgress)throw new Error("Retrier is already in progress");return this.inProgress=!0,new Promise((function(t,n){e.resolve=t,e.reject=n,e.startTimestamp=Date.now(),e.scheduleAttempt(e.initialDelay)}))}},{key:"cancel",value:function(){this.timeout&&(clearTimeout(this.timeout),this.timeout=null,this.inProgress=!1,this.emit("cancelled"),this.reject(new Error("Cancelled")))}},{key:"succeeded",value:function(e){this.emit("succeeded",e),this.resolve(e)}},{key:"failed",value:function(e,t){if(this.timeout)throw new Error("Retrier attempt is already in progress");this.scheduleAttempt(t)}},{key:"run",value:function(e){var t=this;return this.on("attempt",(function(){e().then((function(e){return t.succeeded(e)})).catch((function(e){return t.failed(e)}))})),this.start()}}]),n}(n(18).EventEmitter);t.Retrier=s,t.default=s},function(e,t,n){var r=n(527),i=n(83);e.exports=function(e,t){return!t||"object"!==r(t)&&"function"!==typeof t?i(e):t}},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){"use strict";var r=n(9),i=n(17),o=n(20),a=n(21);function s(e){return void 0!==e&&null!==e}Object.defineProperty(t,"__esModule",{value:!0});var u=function(e){o(n,e);var t=a(n);function n(e){var i;if(r(this,n),i=t.call(this),s((e=e||{}).initialDelay)&&e.initialDelay<1)throw new Error("The initial timeout must be equal to or greater than 1.");if(s(e.maxDelay)&&e.maxDelay<=1)throw new Error("The maximal timeout must be greater than 1.");if(s(e.randomisationFactor)&&(e.randomisationFactor<0||e.randomisationFactor>1))throw new Error("The randomisation factor must be between 0 and 1.");if(s(e.factor)&&e.factor<=1)throw new Error("Exponential factor should be greater than 1.");if(i.initialDelay=e.initialDelay||100,i.maxDelay=e.maxDelay||1e4,i.maxDelay<=i.initialDelay)throw new Error("The maximal backoff delay must be greater than the initial backoff delay.");return i.randomisationFactor=e.randomisationFactor||0,i.factor=e.factor||2,i.maxNumberOfRetry=-1,i.reset(),i}return i(n,[{key:"backoff",value:function(e){null==this.timeoutID&&(this.backoffNumber===this.maxNumberOfRetry?(this.emit
2("fail",e),this.reset()):(this.backoffDelay=this.next(),this.timeoutID=setTimeout(this.onBackoff.bind(this),this.backoffDelay),this.emit("backoff",this.backoffNumber,this.backoffDelay,e)))}},{key:"reset",value:function(){this.backoffDelay=0,this.nextBackoffDelay=this.initialDelay,this.backoffNumber=0,clearTimeout(this.timeoutID),this.timeoutID=null}},{key:"failAfter",value:function(e){if(e<=0)throw new Error("Expected a maximum number of retry greater than 0 but got ".concat(e));this.maxNumberOfRetry=e}},{key:"next",value:function(){this.backoffDelay=Math.min(this.nextBackoffDelay,this.maxDelay),this.nextBackoffDelay=this.backoffDelay*this.factor;var e=1+Math.random()*this.randomisationFactor;return Math.min(this.maxDelay,Math.round(this.backoffDelay*e))}},{key:"onBackoff",value:function(){this.timeoutID=null,this.emit("ready",this.backoffNumber,this.backoffDelay),this.backoffNumber++}}],[{key:"exponential",value:function(e){return new n(e)}}]),n}(n(18).EventEmitter);t.Backoff=u,t.default=u},function(e,t,n){"use strict";var r=s(n(38)),i=s(n(40)),o=s(n(23)),a=s(n(24));function s(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var u=n(54),c=n(121),l=n(530),f=function(){function e(t){(0,o.default)(this,e),this.services=t}return(0,a.default)(e,[{key:"getPage",value:function(){var e=(0,i.default)(r.default.mark((function e(t){var n,i,o,a=this;return r.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=t||{},e.next=3,this.services.session.getSessionLinks();case 3:return n=e.sent,i=new u.UriBuilder(n.syncListUrl).arg("PageToken",t.pageToken).build(),e.next=7,this.services.network.get(i);case 7:return o=e.sent,e.abrupt("return",new c.RestPaginator(o.body.channels.map((function(e){return new l.SyncListDescriptor(e)})),(function(e){return a.getPage({pageToken:e})}),o.body.meta.previous_token,o.body.meta.next_token));case 9:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()}]),e}();t.SyncList=f},function(e,t,n){"use strict";var r,i=n(23),o=(r=i)&&r.__esModule?r:{default:r};Object.defineProperty(t,"__esModule",{value:!0});t.SyncListDescriptor=function e(t){(0,o.default)(this,e),this.descriptor=t,this.channel_sid=t.channel_sid,this.status=t.status,this.channel=t.channel,this.messages=t.messages,this.roster=t.roster,this.lastConsumedMessageIndex=t.last_consumed_message_index,this.notificationLevel=t.notification_level,this.status=t.status}},function(e,t,n){"use strict";var r=n(6),i=n(27),o=n(17),a=n(94),s=n(66),u=n(20),c=n(21),l=n(9);Object.defineProperty(t,"__esModule",{value:!0}),t.Twilsock=t.TwilsockClient=t.TelemetryEvents=void 0;var f=n(18),h=n(73),d=n(533),p=n(534),v=n(547),y=n(549),m=n(551),g=n(552),b=n(554),_=n(67),w=n(555),k=n(556),S=n(557),O=function e(){l(this,e)};t.TelemetryEvents=O,O.TWILSOCK_CONNECT="twilsock.sdk.connect",O.TWILSOCK_INIT="twilsock.sdk.init";var E=function(e){u(n,e);var t=c(n);function n(e,r){var i,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};l(this,n),(i=t.call(this)).offlineStorageDeferred=new b.Deferred,o.continuationToken=o.continuationToken?o.continuationToken:k.TokenStorage.getStoredToken(r);var a=i.config=new d.Configuration(e,r,o);h.log.setLevel(a.logLevel);var s=new y.WebSocketChannel(a.url),u=o.transport?o.transport:new v.PacketInterface(s,a);return i.channel=o.channel?o.channel:new p.TwilsockImpl(s,u,a),i.registrations=o.registrations?o.registrations:new m.Registrations(u),i.upstream=new g.Upstream(u,i.channel,a),i.telemetryTracker=new S.TelemetryTracker(a,u),i.channel.on("initialized",(function(){return i.telemetryTracker.canSendTelemetry=!0})),s.on("disconnected",(function(){return i.telemetryTracker.canSendTelemetry=!1})),i.registrations.on("registered",(function(e){return i.emit("registered",e)})),i.channel.on("message",(function(e,t){return setTimeout((function(){return i.emit("message",e,t)}),0)})),i.channel.on("stateChanged",(function(e){return setTimeout((function(){return i.emit("stateChanged",e)}),0)})),i.channel.on("connectionError",(function(e){return setTimeout((function(){return i.emit("connectionError",e)}),0)})),i.channel.on("tokenAboutToExpire",(function(){return setTimeout((function(){return i.emit("tokenAboutToExpire")}),0)})),i.channel.on("tokenExpired",(function(){return setTimeout((function(){return i.emit("tokenExpired")}),0)})),i.channel.on("connected",(function(){return i.registrations.updateRegistrations()})),i.channel.on("connected",(function(){return i.upstream.sendPendingMessages()})),i.channel.on("connected",(function(){return setTimeout((function(){return i.emit("connected")}),0)})),i.channel.on("beforeConnect",(function(){return i.telemetryTracker.addPartialEvent(new S.TelemetryEventDescription("Establish WebSocket connection","",new Date),O.TWILSOCK_CONNECT,S.TelemetryPoint.Start)})),i.channel.on("connected",(function(){return i.telemetryTracker.addPartialEvent(new S.TelemetryEventDescription("Establish WebSocket connection","",new Date,new Date),O.TWILSOCK_CONNECT,S.TelemetryPoint.End)})),i.channel.on("beforeSendInit",(function(){return i.telemetryTracker.addPartialEvent(new S.TelemetryEventDescription("Send Twilsock init","",new Date),O.TWILSOCK_INIT,S.TelemetryPoint.Start)})),i.channel.on("initialized",(function(){return i.telemetryTracker.addPartialEvent(new S.TelemetryEventDescription("Send Twilsock init","Succeeded",new Date,new Date),O.TWILSOCK_INIT,S.TelemetryPoint.End)})),i.channel.on("sendInitFailed",(function(){return i.telemetryTracker.addPartialEvent(new S.TelemetryEventDescription("Send Twilsock init","Failed",new Date,new Date),O.TWILSOCK_INIT,S.TelemetryPoint.End)})),i.channel.on("initialized",(function(e){i.handleStorageId(r,e),k.TokenStorage.storeToken(e.continuationToken,r),setTimeout((function(){return i.emit("initialized",e)}),0)})),i.channel.on("disconnected",(function(){return setTimeout((function(){return i.emit("disconnected")}),0)})),i.channel.on("disconnected",(function(){return i.upstream.rejectPendingMessages()})),i.channel.on("disconnected",(function(){return i.offlineStorageDeferred.fail(new _.TwilsockError("Client disconnected"))})),i.offlineStorageDeferred.promise.catch((function(){})),i}return o(n,[{key:"emit",value:function(e){for(var t,r=arguments.length,i=new Array(r>1?r-1:0),o=1;o<r;o++)i[o-1]=arguments[o];return h.log.debug("Emitting ".concat(e.toString(),"(").concat(i.map((function(e){return JSON.stringify(e)})).join(", "),")")),(t=a(s(n.prototype),"emit",this)).call.apply(t,[this,e].concat(i))}},{key:"handleStorageId",value:function(e,t){if(t.offlineStorage)if(t.offlineStorage.hasOwnProperty(e))try{this.offlineStorageDeferred.set(w.OfflineProductStorage.create(t.offlineStorage[e])),h.log.debug("Offline storage for '".concat(e,"' product: ").concat(JSON.stringify(t.offlineStorage[e]),"."))}catch(n){this.offlineStorageDeferred.fail(new _.TwilsockError("Failed to parse offline storage for ".concat(e," ").concat(JSON.stringify(t.offlineStorage[e]),". ").concat(n,".")))}else this.offlineStorageDeferred.fail(new _.TwilsockError("No offline storage id for '".concat(e,"' product: ").concat(JSON.stringify(t.offlineStorage))));else this.offlineStorageDeferred.fail(new _.TwilsockError("No offline storage id"))}},{key:"storageId",value:function(){return this.offlineStorageDeferred.promise}},{key:"updateToken",value:function(){var e=i(r.mark((function e(t){return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(h.log.trace("updating token '".concat(t,"'")),this.config.token!==t){e.next=3;break}return e.abrupt("return");case 3:return this.config.updateToken(t),e.abrupt("return",this.channel.updateToken(t));case 5:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"setNotificationsContext",value:function(e,t){this.registrations.setNotificationsContext(e,t)}},{key:"removeNotificationsContext",value:function(e){this.registrations.removeNotificationsContext(e)}},{key:"connect",value:function(){return this.channel.connect()}},{key:"disconnect",value:function(){return this.telemetryTracker.sendTelemetry(S.EventSendingLimitation.AnyEventsIncludingUnfinished),this.channel.disconnect()}},{key:"get",value:function(e,t){return this.telemetryTracker.sendTelemetry(S.EventSendingLimitation.AnyEvents),this.upstream.send("GET",e,t)}},{key:"post",value:function(e,t,n){return this.telemetryTracker.sendTelemetry(S.EventSendingLimitation.AnyEvents),this.upstream.send("POST",e,t,n)}},{key:"put",value:function(e,t,n){return this.telemetryTracker.sendTelemetry(S.EventSendingLimitation.AnyEvents),this.upstream.send("PUT",e,t,n)}},{key:"delete",value:function(e,t){return this.telemetryTracker.sendTelemetry(S.EventSendingLimitation.AnyEvents),this.upstream.send("DELETE",e,t)}},{key:"addTelemetryEvent",value:function(e){this.telemetryTracker.addTelemetryEvent(e),this.telemetryTracker.sendTelemetryIfMinimalPortionCollected()}},{key:"addPartialTelemetryEvent",value:function(e,t,n){this.telemetryTracker.addPartialEvent(e,t,n),n===S.TelemetryPoint.End&&this.telemetryTracker.sendTelemetryIfMinimalPortionCollected()}},{key:"isConnected",get:function(){return this.channel.isConnected}},{key:"state",get:function(){return this.channel.state}}]),n}(f.EventEmitter);t.TwilsockClient=E,t.Twilsock=E},function(e,t,n){var r=n(66);e.exports=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=r(e)););return e}},function(e,t,n){"use strict";var r=n(9),i=n(17);
2Object.defineProperty(t,"__esModule",{value:!0}),t.Configuration=void 0;var o="0.5.14",a=function(){function e(t,n){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};r(this,e),this.confirmedCapabilities=new Set,this.activeGrant=n,this._token=t;var a=i.region||"us1",s="wss://tsock.".concat(a,".twilio.com/v3/wsconnect"),u=i.twilsock||i.Twilsock||{};this.url=u.uri||s,this._continuationToken=i.continuationToken?i.continuationToken:null,this.logLevel=i.logLevel?i.logLevel:"error",this.retryPolicy=i.retryPolicy?i.retryPolicy:{min:1e3,max:12e4,randomness:.2},this.clientMetadata=i.clientMetadata?i.clientMetadata:{},this.clientMetadata.ver=o,this.initRegistrations=i.initRegistrations?i.initRegistrations:null,this.tweaks=i.tweaks?i.tweaks:null}return i(e,[{key:"updateToken",value:function(e){this._token=e}},{key:"updateContinuationToken",value:function(e){this._continuationToken=e}},{key:"token",get:function(){return this._token}},{key:"continuationToken",get:function(){return this._continuationToken}}]),e}();t.Configuration=a},function(e,t,n){"use strict";var r=n(6),i=n(27),o=n(17),a=n(20),s=n(21),u=n(9);Object.defineProperty(t,"__esModule",{value:!0}),t.TwilsockImpl=t.TwilsockChannel=t.Response=void 0;var c=n(18),l=n(535),f=n(73),h=n(162),d=n(269),p=n(270),v=n(546);t.Response=function e(){u(this,e)};var y=function(e){a(n,e);var t=s(n);function n(e,r,i){var o;return u(this,n),(o=t.call(this)).terminalStates=["disconnected","rejected"],o.lastEmittedState=void 0,o.tokenExpiredSasCode=20104,o.terminationReason="Connection is not initialized",o.websocket=e,o.websocket.on("connected",(function(){return o.fsm.socketConnected()})),o.websocket.on("disconnected",(function(e){return o.fsm.socketClosed()})),o.websocket.on("message",(function(e){return o.onIncomingMessage(e)})),o.websocket.on("socketError",(function(e){return o.emit("connectionError",{terminal:!1,message:e.message,httpStatusCode:null,errorCode:null})})),o.transport=r,o.config=i,o.retrier=new v.BackoffRetrier(i.retryPolicy),o.retrier.on("attempt",(function(){return o.retry()})),o.retrier.on("failed",(function(e){f.log.warn("Retrying failed: ".concat(e.message)),o.disconnect()})),"undefined"!==typeof window&&"undefined"!==typeof window.addEventListener&&(window.addEventListener("online",(function(){f.log.debug("Browser reported connectivity state: online"),o.fsm.systemOnline()})),window.addEventListener("offline",(function(){f.log.debug("Browser reported connectivity state: offline"),o.websocket.close(),o.fsm.socketClosed()}))),o.fsm=new l({init:"disconnected",transitions:[{name:"userConnect",from:["disconnected","rejected"],to:"connecting"},{name:"userConnect",from:["connecting","connected"]},{name:"userDisconnect",from:["connecting","initialising","connected","updating","retrying","rejected","waitSocketClosed","waitOffloadSocketClosed"],to:"disconnecting"},{name:"userRetry",from:["retrying"],to:"connecting"},{name:"socketConnected",from:["connecting"],to:"initialising"},{name:"socketClosed",from:["connecting","initialising","connected","updating","error","waitOffloadSocketClosed"],to:"retrying"},{name:"socketClosed",from:["disconnecting"],to:"disconnected"},{name:"socketClosed",from:["waitSocketClosed"],to:"disconnected"},{name:"socketClosed",from:["rejected"],to:"rejected"},{name:"initSuccess",from:["initialising"],to:"connected"},{name:"initError",from:["initialising"],to:"error"},{name:"tokenRejected",from:["initialising","updating"],to:"rejected"},{name:"protocolError",from:["initialising","connected","updating"],to:"error"},{name:"receiveClose",from:["initialising","connected","updating"],to:"waitSocketClosed"},{name:"receiveOffload",from:["initialising","connected","updating"],to:"waitOffloadSocketClosed"},{name:"unsupportedProtocol",from:["initialising","connected","updating"],to:"unsupported"},{name:"receiveFatalClose",from:["initialising","connected","updating"],to:"unsupported"},{name:"userUpdateToken",from:["disconnected","rejected","connecting","retrying"],to:"connecting"},{name:"userUpdateToken",from:["connected"],to:"updating"},{name:"updateSuccess",from:["updating"],to:"connected"},{name:"updateError",from:["updating"],to:"error"},{name:"userSend",from:["connected"],to:"connected"},{name:"systemOnline",from:["retrying"],to:"connecting"}],methods:{onConnecting:function(){o.setupSocket(),o.emit("connecting")},onEnterInitialising:function(){o.sendInit()},onLeaveInitialising:function(){o.cancelInit()},onEnterUpdating:function(){o.sendUpdate()},onLeaveUpdating:function(){o.cancelUpdate()},onEnterRetrying:function(){o.initRetry(),o.emit("connecting")},onEnterConnected:function(){o.resetBackoff(),o.onConnected()},onUserUpdateToken:function(){o.resetBackoff()},onTokenRejected:function(){o.resetBackoff(),o.closeSocket(!0),o.finalizeSocket()},onUserDisconnect:function(){o.closeSocket(!0)},onEnterDisconnecting:function(){o.startDisconnectTimer()},onLeaveDisconnecting:function(){o.cancelDisconnectTimer()},onEnterWaitSocketClosed:function(){o.startDisconnectTimer()},onLeaveWaitSocketClosed:function(){o.cancelDisconnectTimer()},onEnterWaitOffloadSocketClosed:function(){o.startDisconnectTimer()},onLeaveWaitOffloadSocketClosed:function(){o.cancelDisconnectTimer()},onDisconnected:function(){o.resetBackoff(),o.finalizeSocket()},onReceiveClose:function(e,t){o.onCloseReceived(t)},onReceiveOffload:function(e,t){f.log.debug("onreceiveoffload: ",t),o.modifyBackoff(t.body),o.onCloseReceived(t.status)},onUnsupported:function(){o.closeSocket(!0),o.finalizeSocket()},onError:function(e,t){o.closeSocket(t),o.finalizeSocket()},onEnterState:function(e){"none"!==e.from&&o.changeState(e)},onInvalidTransition:function(e,t,n){f.log.warn("FSM: unexpected transition",t,n)}}}),o}return o(n,[{key:"changeState",value:function(e){f.log.debug("FSM: ".concat(e.transition,": ").concat(e.from," --\x3e ").concat(e.to)),this.lastEmittedState!==this.state&&(this.lastEmittedState=this.state,this.emit
2("stateChanged",this.state))}},{key:"resetBackoff",value:function(){f.log.trace("resetBackoff"),this.retrier.stop()}},{key:"modifyBackoff",value:function(e){f.log.trace("modifyBackoff",e);var t=e?e.backoff_policy:null;t&&"number"===typeof t.reconnect_min_ms&&this.retrier.modifyBackoff(t.reconnect_min_ms)}},{key:"startDisconnectTimer",value:function(){var e=this;f.log.trace("startDisconnectTimer"),this.disconnectingTimer&&(clearTimeout(this.disconnectingTimer),this.disconnectingTimer=null),this.disconnectingTimer=setTimeout((function(){f.log.debug("disconnecting is timed out"),e.closeSocket(!0)}),3e3)}},{key:"cancelDisconnectTimer",value:function(){f.log.trace("cancelDisconnectTimer"),this.disconnectingTimer&&(clearTimeout(this.disconnectingTimer),this.disconnectingTimer=null)}},{key:"initRetry",value:function(){f.log.debug("initRetry"),this.retrier.inProgress?this.retrier.attemptFailed():this.retrier.start()}},{key:"retry",value:function(){"connecting"!=this.fsm.state?(f.log.trace("retry"),this.websocket.close(),this.fsm.userRetry()):f.log.trace("can\t retry as already connecting")}},{key:"onConnected",value:function(){this.emit("connected")}},{key:"finalizeSocket",value:function(){f.log.trace("finalizeSocket"),this.websocket.close(),this.emit("disconnected"),this.disconnectedPromiseResolve&&(this.disconnectedPromiseResolve(),this.disconnectedPromiseResolve=null)}},{key:"setupSocket",value:function(){f.log.trace("setupSocket:",this.config.token),this.emit("beforeConnect"),this.websocket.connect()}},{key:"onIncomingMessage",value:function(e){var t=d.Parser.parse(e),n=t.method,r=t.header,i=t.payload;if("reply"!==n&&this.confirmReceiving(r),"notification"===n)this.emit("message",r.message_type,i);else if("reply"===r.method)this.transport.processReply({id:r.id,status:r.status,header:r,body:i});else if("client_update"===r.method)"token_about_to_expire"===r.client_update_type&&this.emit("tokenAboutToExpire");else if("close"===r.method)if(308===r.status.code)f.log.debug("Connection has been offloaded"),this.fsm.receiveOffload({status:r.status.status,body:i});else if(406===r.status.code){var o="Server closed connection because can't parse protocol: ".concat(JSON.stringify(r.status));this.emitReplyConnectionError(o,r,!0),f.log.error(o),this.fsm.receiveFatalClose()}else 417===r.status.code?(f.log.error("Server closed connection because can't parse client reply: ".concat(JSON.stringify(r.status))),this.fsm.receiveFatalClose(r.status.status)):410===r.status.code?(f.log.warn("Server closed connection: ".concat(JSON.stringify(r.status))),this.fsm.receiveClose(r.status.status),this.emit("tokenExpired")):401===r.status.code?(f.log.error("Server closed connection: ".concat(JSON.stringify(r.status))),this.fsm.receiveClose(r.status.status)):(f.log.warn("unexpected message: ",r.status),this.fsm.receiveOffload({status:r.status.status,body:null}))}},{key:"sendInit",value:function(){var e=i(r.mark((function e(){var t,n;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return f.log.trace("sendInit"),e.prev=1,this.emit("beforeSendInit"),e.next=5,this.transport.sendInit();case 5:t=e.sent,this.config.updateContinuationToken(t.continuationToken),this.config.confirmedCapabilities=t.confirmedCapabilities,this.fsm.initSuccess(t),this.emit("initialized",t),this.emit("tokenUpdated"),e.next=17;break;case 13:e.prev=13,e.t0=e.catch(1),e.t0 instanceof p.TwilsockReplyError?(n=!1,f.log.warn("Init rejected by server: ".concat(JSON.stringify(e.t0.reply.status))),this.emit("sendInitFailed"),401===e.t0.reply.status.code||403===e.t0.reply.status.code?(n=!0,this.fsm.tokenRejected(e.t0.reply.status),e.t0.reply.status.errorCode===this.tokenExpiredSasCode&&this.emit("tokenExpired")):429===e.t0.reply.status.code?(this.modifyBackoff(e.t0.reply.body),this.fsm.initError(!0)):500===e.t0.reply.status.code?this.fsm.initError(!1):this.fsm.initError(!0),this.emitReplyConnectionError(e.t0.message,e.t0.reply,n)):(this.terminationReason=e.t0.message,this.emit("connectionError",{terminal:!0,message:e.t0.message,httpStatusCode:null,errorCode:null}
2),this.fsm.initError(!0)),this.emit("tokenUpdated",e.t0);case 17:case"end":return e.stop()}}),e,this,[[1,13]])})));return function(){return e.apply(this,arguments)}}()},{key:"sendUpdate",value:function(){var e=i(r.mark((function e(){var t,n,i;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return f.log.trace("sendUpdate"),t=new h.Update(this.config.token),e.prev=2,e.next=5,this.transport.sendWithReply(t);case 5:n=e.sent,this.fsm.updateSuccess(n.body),this.emit("tokenUpdated"),e.next=14;break;case 10:e.prev=10,e.t0=e.catch(2),e.t0 instanceof p.TwilsockReplyError?(i=!1,f.log.warn("Token update rejected by server: ".concat(JSON.stringify(e.t0.reply.status))),401===e.t0.reply.status.code||403===e.t0.reply.status.code?(i=!0,this.fsm.tokenRejected(e.t0.reply.status),e.t0.reply.status.errorCode===this.tokenExpiredSasCode&&this.emit("tokenExpired")):429===e.t0.reply.status.code?(this.modifyBackoff(e.t0.reply.body),this.fsm.updateError(e.t0.reply.status)):this.fsm.updateError(e.t0.reply.status),this.emitReplyConnectionError(e.t0.message,e.t0.reply,i)):(this.emit("error",!1,e.t0.message,null,null),this.fsm.updateError(e.t0)),this.emit("tokenUpdated",e.t0);case 14:case"end":return e.stop()}}),e,this,[[2,10]])})));return function(){return e.apply(this,arguments)}}()},{key:"emitReplyConnectionError",value:function(e,t,n){var r=t.status&&t.status.description?t.status.description:e,i=t.status.code,o=t.status&&t.status.errorCode?t.status.errorCode:null;n&&(this.terminationReason=r),this.emit("connectionError",{terminal:n,message:r,httpStatusCode:i,errorCode:o})}},{key:"cancelInit",value:function(){f.log.trace("cancelInit")}},{key:"cancelUpdate",value:function(){f.log.trace("cancelUpdate")}},{key:"confirmReceiving",value:function(e){f.log.trace("confirmReceiving");try{this.transport.send(new h.Reply(e.id))}catch(t){f.log.debug("failed to confirm packet receiving",t)}}},{key:"closeSocket",value:function(e){var t=this;f.log.trace("closeSocket (graceful: ".concat(e,")")),e&&this.transport.isConnected&&this.transport.sendClose(),this.websocket.close(),setTimeout((function(){return t.fsm.socketClosed()}),0)}},{key:"connect",value:function(){f.log.trace("connect"),this.fsm.userConnect()}},{key:"disconnect",value:function(){var e=this;return f.log.trace("disconnect"),this.fsm.is("disconnected")?Promise.resolve():new Promise((function(t){e.disconnectedPromiseResolve=t,e.fsm.userDisconnect()}))}},{key:"updateToken",value:function(e){var t=this;return f.log.trace("updateToken:",e),new Promise((function(e,n){t.once("tokenUpdated",(function(t){t?n(t):e()})),t.fsm.userUpdateToken()}))}},{key:"onCloseReceived",value:function(e){this.websocket.close()}},{key:"isConnected",get:function(){return"connected"===this.state&&this.websocket.isConnected}},{key:"state",get:function(){switch(this.fsm.state){case"connecting":case"initialising":case"retrying":case"error":return"connecting";case"updating":case"connected":return"connected";case"rejected":return"rejected";case"disconnecting":case"waitSocketClosed":case"waitOffloadSocketClosed":return"disconnecting";case"disconnected":default:return"disconnected"}}},{key:"isTerminalState",get:function(){return-1!==this.terminalStates.indexOf(this.fsm.state)}},{key:"getTerminationReason",get:function(){return this.terminationReason}}]),n}(c.EventEmitter);t.TwilsockChannel=y,t.TwilsockImpl=y},function(e,t,n){var r;r=function(){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.i=function(e){return e},n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get: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=5)}([function(e,t,n){"use strict";e.exports=function(e,t){var n,r,i;for(n=1;n<arguments.length;n++)for(i in r=arguments[n])r.hasOwnProperty(i)&&(e[i]=r[i]);return e}},function(e,t,n){"use strict";var r=n(0);e.exports={build:function(e,t){var n,i,o,a=t.plugins;for(n=0,i=a.length;n<i;n++)(o=a[n]).methods&&r(e,o.methods),o.properties&&Object.defineProperties(e,o.properties)},hook:function(e,t,n){var r,i,o,a,s=e.config.plugins,u=[e.context];for(n&&(u=u.concat(n)),r=0,i=s.length;r<i;r++)a=s[r],(o=s[r][t])&&o.apply(a,u)}}},function(e,t,n){"use strict";function r(e){if(0===e.length)return e;var t,n,r=e.split(/[_-]/);if(1===r.length&&r[0][0].toLowerCase()===r[0][0])return e;for(n=r[0].toLowerCase(),t=1;t<r.length;t++)n=n+r[t].charAt(0).toUpperCase()+r[t].substring(1).toLowerCase();return n}r.prepended=function(e,t){return e+(t=r(t))[0].toUpperCase()+t.substring(1)},e.exports=r},function(e,t,n){"use strict";var r=n(0),i=n(2);function o(e,t){e=e||{},this.options=e,this.defaults=t.defaults,this.states=[],this.transitions=[],this.map={},this.lifecycle=this.configureLifecycle(),this.init=this.configureInitTransition(e.init),this.data=this.configureData(e.data),this.methods=this.configureMethods(e.methods),this.map[this.defaults.wildcard]={},this.configureTransitions(e.transitions||[]),this.plugins=this.configurePlugins(e.plugins,t.plugin)}r(o.prototype,{addState:function(e){this.map[e]||(this.states.push(e),this.addStateLifecycleNames(e),this.map[e]={})},addStateLifecycleNames:function(e){this.lifecycle.onEnter[e]=i.prepended("onEnter",e),this.lifecycle.onLeave[e]=i.prepended("onLeave",e),this.lifecycle.on[e]=i.prepended("on",e)},addTransition:function(e){this.transitions.indexOf(e)<0&&(this.transitions.push(e),this.addTransitionLifecycleNames(e))},addTransitionLifecycleNames:function(e){this.lifecycle.onBefore[e]=i.prepended("onBefore",e),this.lifecycle.onAfter[e]=i.prepended("onAfter",e),this.lifecycle.on[e]=i.prepended("on",e)},mapTransition:function(e){var t=e.name,n=e.from,r=e.to;return this.addState(n),"function"!==typeof r&&this.addState(r),this.addTransition(t),this.map[n][t]=e,e},configureLifecycle:function(){return{onBefore:{transition:"onBeforeTransition"},onAfter:{transition:"onAfterTransition"},onEnter:{state:"onEnterState"},onLeave:{state:"onLeaveState"},on:{transition:"onTransition"}}},configureInitTransition:function(e){return"string"===typeof e?this.mapTransition(r({},this.defaults.init,{to:e,active:!0})):"object"===typeof e?this.mapTransition(r({},this.defaults.init,e,{active:!0})):(this.addState(this.defaults.init.from),this.defaults.init)},configureData:function(e){return"function"===typeof e?e:"object"===typeof e?function(){return e}:function(){return{}}},configureMethods:function(e){return e||{}},configurePlugins:function(e,t){var n,r,i;for(n=0,r=(e=e||[]).length;n<r;n++)"function"===typeof(i=e[n])&&(e[n]=i=i()),i.configure&&i.configure(this);return e},configureTransitions:function(e){var t,n,r,i,o,a=this.defaults.wildcard;for(n=0;n<e.length;n++)for(r=e[n],i=Array.isArray(r.from)?r.from:[r.from||a],o=r.to||a,t=0;t<i.length;t++)this.mapTransition({name:r.name,from:i[t],to:o})},transitionFor:function(e,t){var n=this.defaults.wildcard;return this.map[e][t]||this.map[n][t]},transitionsFor:function(e){var t=this.defaults.wildcard;return Object.keys(this.map[e]).concat(Object.keys(this.map[t]))},allStates:function(){return this.states},allTransitions:function(){return this.transitions}}),e.exports=o},function(e,t,n){var r=n(0),i=n(6),o=n(1),a=[null,[]];function s(e,t){this.context=e,this.config=t,this.state=t.init.from,this.observers=[e]}r(s.prototype,{init:function(e){if(r(this.context,this.config.data.apply(this.context,e)),o.hook(this,"init"),this.config.init.active)return this.fire(this.config.init.name,[])},is:function(e){return Array.isArray(e)?e.indexOf(this.state)>=0:this.state===e},isPending:function(){return this.pending},can:function(e){return!this.isPending()&&!!this.seek(e)},cannot:function(e){return!this.can(e)},allStates:function(){return this.config.allStates()},allTransitions:function(){return this.config.allTransitions()},transitions:function(){return this.config.transitionsFor(this.state)},seek:function(e,t){var n=this.config.defaults.wildcard,r=this.config.transitionFor(this.state,e),i=r&&r.to;return"function"===typeof i?i.apply(this.context,t):i===n?this.state:i},fire:function(e,t){return this.transit(e,this.state,this.seek(e,t),t)},transit:function(e,t,n,r){var i=this.config.lifecycle,o=this.config.options.observeUnchangedState||t!==n;return n?this.isPending()?this.context.onPendingTransition(e,t,n):(this.config.addState(n),this.beginTransit(),r.unshift({transition:e,from:t,to:n,fsm:this.context}),this.observeEvents([this.observersForEvent(i.onBefore.transition),this.observersForEvent(i.onBefore[e]),o?this.observersForEvent(i.onLeave.state):a,o?this.observersForEvent(i.onLeave[t]):a,this.observersForEvent(i.on.transition),o?["doTransit",[this]]:a,o?this.observersForEvent(i.onEnter.state):a,o?this.observersForEvent(i.onEnter[n]):a,o?this.observersForEvent(i.on[n]):a,this.observersForEvent(i.onAfter.transition),this.observersForEvent(i.onAfter[e]),this.observersForEvent(i.on[e])],r)):this.context.onInvalidTransition(e,t,n)},beginTransit:function(){this.pending=!0},endTransit:function(e){return this.pending=!1,e},failTransit:function(e){throw this.pending=!1,e},doTransit:function(e){this.state=e.to},observe:function(e){if(2===e.length){var t={};t[e[0]]=e[1],this.observers.push(t)}else this.observers.push(e[0])},observersForEvent:function(e){for(var t,n=0,r=this.observers.length,i=[];n<r;n++)(t=this.observers[n])[e]&&i.push(t);return[e,i,!0]},observeEvents:function(e,t,n,r){if(0===e.length)return this.endTransit(void 0===r||r);var i=e[0][0],a=e[0][1],s=e[0][2];if(t[0].event=i,i&&s&&i!==n&&o.hook(this,"lifecycle",t),0===a.length)return e.shift(),this.observeEvents(e,t,i,r);var u=a.shift(),c=u[i].apply(u,t);return c&&"function"===typeof c.then?c.then(this.observeEvents.bind(this,e,t,i)).catch(this.failTransit.bind(this)):!1===c?this.endTransit(!1):this.observeEvents(e,t,i,c)},onInvalidTransition:function(e,t,n){throw new i("transition is invali
2d in current state",e,t,n,this.state)},onPendingTransition:function(e,t,n){throw new i("transition is invalid while previous transition is still in progress",e,t,n,this.state)}}),e.exports=s},function(e,t,n){"use strict";var r=n(0),i=n(2),o=n(1),a=n(3),s=n(4),u={is:function(e){return this._fsm.is(e)},can:function(e){return this._fsm.can(e)},cannot:function(e){return this._fsm.cannot(e)},observe:function(){return this._fsm.observe(arguments)},transitions:function(){return this._fsm.transitions()},allTransitions:function(){return this._fsm.allTransitions()},allStates:function(){return this._fsm.allStates()},onInvalidTransition:function(e,t,n){return this._fsm.onInvalidTransition(e,t,n)},onPendingTransition:function(e,t,n){return this._fsm.onPendingTransition(e,t,n)}},c={state:{configurable:!1,enumerable:!0,get:function(){return this._fsm.state},set:function(e){throw Error("use transitions to change state")}}};function l(e){return f(this||{},e)}function f(e,t){return h(e,new a(t,l)),e._fsm(),e}function h(e,t){if("object"!==typeof e||Array.isArray(e))throw Error("StateMachine can only be applied to objects");o.build(e,t),Object.defineProperties(e,c),r(e,u),r(e,t.methods),t.allTransitions().forEach((function(t){e[i(t)]=function(){return this._fsm.fire(t,[].slice.call(arguments))}})),e._fsm=function(){this._fsm=new s(this,t),this._fsm.init(arguments)}}l.version="3.0.1",l.factory=function(){var e,t;"function"===typeof arguments[0]?(e=arguments[0],t=arguments[1]||{}):(e=function(){this._fsm.apply(this,arguments)},t=arguments[0]||{});var n=new a(t,l);return h(e.prototype,n),e.prototype._fsm.config=n,e},l.apply=f,l.defaults={wildcard:"*",init:{name:"init",from:"none"}},e.exports=l},function(e,t,n){"use strict";e.exports=function(e,t,n,r,i){this.message=e,this.transition=t,this.from=n,this.to=r,this.current=i}}])},e.exports=r()},function(e,t,n){"use strict";var r=n(9),i=n(20),o=n(21);Object.defineProperty(t,"__esModule",{value:!0}),t.Init=void 0;var a=function(e){i(n,e);var t=o(n);function n(e,i,o){var a,s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,u=arguments.length>4&&void 0!==arguments[4]?arguments[4]:null;return r(this,n),(a=t.call(this)).method="init",a.token=e,a.continuation_token=i,a.metadata=o,a.registrations=s,a.tweaks=u,a.capabilities=["client_update","offline_storage","telemetry.v1"],a}return n}(n(84).AbstractMessage);t.Init=a},function(e,t,n){var r,i,o=n(266),a=n(267),s=0,u=0;e.exports=function(e,t,n){var c=t&&n||0,l=t||[],f=(e=e||{}).node||r,h=void 0!==e.clockseq?e.clockseq:i;if(null==f||null==h){var d=o();null==f&&(f=r=[1|d[0],d[1],d[2],d[3],d[4],d[5]]),null==h&&(h=i=16383&(d[6]<<8|d[7]))}var p=void 0!==e.msecs?e.msecs:(new Date).getTime(),v=void 0!==e.nsecs?e.nsecs:u+1,y=p-s+(v-u)/1e4;if(y<0&&void 0===e.clockseq&&(h=h+1&16383),(y<0||p>s)&&void 0===e.nsecs&&(v=0),v>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");s=p,u=v,i=h;var m=(1e4*(268435455&(p+=122192928e5))+v)%4294967296;l[c++]=m>>>24&255,l[c++]=m>>>16&255,l[c++]=m>>>8&255,l[c++]=255&m;var g=p/4294967296*1e4&268435455;l[c++]=g>>>8&255,l[c++]=255&g,l[c++]=g>>>24&15|16,l[c++]=g>>>16&255,l[c++]=h>>>8|128,l[c++]=255&h;for(var b=0;b<6;++b)l[c+b]=f[b];return t||a(l)}},function(e,t,n){var r=n(266),i=n(267);e.exports=function(e,t,n){var o=t&&n||0;"string"==typeof e&&(t="binary"===e?new Array(16):null,e=null);var a=(e=e||{}).random||(e.rng||r)();if(a[6]=15&a[6]|64,a[8]=63&a[8]|128,t)for(var s=0;s<16;++s)t[o+s]=a[s];return t||i(a)}},function(e,t,n){"use strict";var r=n(20),i=n(21),o=n(9);Object.defineProperty(t,"__esModule",{value:!0}),t.InitReply=t.ContinuationTokenStatus=void 0;var a=n(84);t.ContinuationTokenStatus=function e(){o(this,e)};var s=function(e){r(n,e);var t=i(n);function n(e,r,i,a,s,u,c){var l;return o(this,n),(l=t.call(this,e)).continuationToken=r,l.continuationTokenStatus=i,l.offlineStorage=a,l.initRegistrations=s,l.debugInfo=u,l.confirmedCapabilities=c,l}return n}(a.AbstractMessage);t.InitReply=s},function(e,t,n){"use strict";var r=n(9),i=n(20),o=n(21);Object.defineProperty(t,"__esModule",{value:!0}),t.Update=void 0;var a=function(e){i(n,e);var t=o(n);function n(e){var i;return r(this,n),(i=t.call(this)).method="update",i.token=e,i}return n}(n(84).AbstractMessage);t.Update=a},function(e,t,n){"use strict";var r=n(9),i=n(20),o=n(21);
2Object.defineProperty(t,"__esModule",{value:!0}),t.Message=void 0;var a=function(e){i(n,e);var t=o(n);function n(e,i,o){var a;return r(this,n),(a=t.call(this)).method="message",a.active_grant=e,a.payload_type=i,a.http_request=o,a}return n}(n(84).AbstractMessage);t.Message=a},function(e,t,n){"use strict";var r=n(9),i=n(20),o=n(21);Object.defineProperty(t,"__esModule",{value:!0}),t.Reply=void 0;var a=function(e){i(n,e);var t=o(n);function n(e){var i;return r(this,n),(i=t.call(this,e)).method="reply",i.payload_type="application/json",i.status={code:200,status:"OK"},i}return n}(n(84).AbstractMessage);t.Reply=a},function(e,t,n){"use strict";var r=n(9),i=n(20),o=n(21);Object.defineProperty(t,"__esModule",{value:!0}),t.Close=void 0;var a=function(e){i(n,e);var t=o(n);function n(){var e;return r(this,n),(e=t.call(this)).method="close",e}return n}(n(84).AbstractMessage);t.Close=a},function(e,t){e.exports=function(e){return-1!==Function.toString.call(e).indexOf("[native code]")}},function(e,t,n){var r=n(161),i=n(264);function o(t,n,a){return i()?e.exports=o=Reflect.construct:e.exports=o=function(e,t,n){var i=[null];i.push.apply(i,t);var o=new(Function.bind.apply(e,i));return n&&r(o,n.prototype),o},o.apply(null,arguments)}e.exports=o},function(e,t,n){"use strict";var r=n(9),i=n(17),o=n(20),a=n(21);Object.defineProperty(t,"__esModule",{value:!0}),t.BackoffRetrier=void 0;var s=n(18),u=n(93),c=function(e){o(n,e);var t=a(n);function n(e){var i;return r(this,n),(i=t.call(this)).options=e?Object.assign({},e):{},i}return i(n,[{key:"start",value:function(){if(this.inProgress)throw new Error("Already waiting for next attempt, call finishAttempt(success : boolean) to finish it");this.createRetrier()}},{key:"stop",value:function(){this.cleanRetrier(),this.newBackoff=null,this.usedBackoff=null}},{key:"modifyBackoff",value:function(e){this.newBackoff=e}},{key:"attemptFailed",value:function(){if(!this.inProgress)throw new Error("No attempt is in progress");this.newBackoff?!this.usedBackoff||this.usedBackoff<this.newBackoff?this.createRetrier():this.retrier.failed(new Error):this.retrier.failed(new Error)}},{key:"cancel",value:function(){this.retrier&&this.retrier.cancel()}},{key:"cleanRetrier",value:function(){this.retrier&&(this.retrier.removeAllListeners(),this.retrier.cancel(),this.retrier=null)}},{key:"getRetryPolicy",value:function(){var e=Object.assign({},this.options);return this.newBackoff&&(e.min=this.newBackoff,e.max=this.options.max&&this.options.max>this.newBackoff?this.options.max:this.newBackoff),e.maxAttemptsCount=this.options.maxAttemptsCount?this.options.maxAttemptsCount+1:void 0,e}},{key:"createRetrier",value:function(){var e=this;this.cleanRetrier();var t=this.getRetryPolicy();this.retrier=new u.Retrier(t),this.retrier.once("attempt",(function(){e.retrier.on("attempt",(function(){return e.emit("attempt")})),e.retrier.failed(new Error("Skipping first attempt"))})),this.retrier.on("failed",(function(t){return e.emit("failed",t)})),this.usedBackoff=this.newBackoff,this.newBackoff=null,this.retrier.start().catch((function(e){}))}},{key:"inProgress",get:function(){return!!this.retrier}}]),n}(s.EventEmitter);t.BackoffRetrier=c},function(e,t,n){"use strict";var r=n(6),i=n(27),o=n(17),a=n(9);Object.defineProperty(t,"__esModule",{value:!0}),t.PacketInterface=t.PacketResponse=void 0;var s=n(73),u=n(163),c=n(67),l=n(270),f=n(269),h=n(162),d=n(548);t.PacketResponse=function e(){a(this,e)};var p=function(){function e(t,n){var r=this;a(this,e),this.config=n,this.activeRequests=new Map,this.channel=t,this.channel.on("reply",(function(e){return r.processReply(e)})),this.channel.on("disconnected",(function(){r.activeRequests.forEach((function(e){clearTimeout(e.timeout),e.reject(new c.TwilsockError("disconnected"))})),r.activeRequests.clear()}))}return o(e,[{key:"processReply",value:function(e){var t,n=this.activeRequests.get(e.id);n&&(clearTimeout(n.timeout),this.activeRequests.delete(e.id),(t=e.status.code)>=200&&t<300?n.resolve(e):(n.reject(new l.TwilsockReplyError("Transport failure: "+e.status.status,e)),s.log.trace("message rejected")))}},{key:"storeRequest",value:function(e,t,n){var r={resolve:t,reject:n,timeout:setTimeout((function(){s.log.trace("request",e,"is timed out"),n(new c.TwilsockError("Twilsock: request timeout: "+e))}),3e4)};this.activeRequests.set(e,r)}}
2,{key:"shutdown",value:function(){this.activeRequests.forEach((function(e){clearTimeout(e.timeout),e.reject(new c.TwilsockError("Twilsock: request cancelled by user"))})),this.activeRequests.clear()}},{key:"sendInit",value:function(){var e=i(r.mark((function e(){var t,n,i;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return s.log.trace("sendInit"),t=d.Metadata.getMetadata(this.config),n=new h.Init(this.config.token,this.config.continuationToken,t,this.config.initRegistrations,this.config.tweaks),e.next=5,this.sendWithReply(n);case 5:return i=e.sent,e.abrupt("return",new h.InitReply(i.id,i.header.continuation_token,i.header.continuation_token_status,i.header.offline_storage,i.header.init_registrations,i.header.debug_info,new Set(i.header.capabilities)));case 7:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"sendClose",value:function(){var e=new h.Close;this.send(e)}},{key:"sendWithReply",value:function(e,t){var n=this;return new Promise((function(r,i){var o=n.send(e,t);n.storeRequest(o,r,i)}))}},{key:"send",value:function(e,t){e.id=e.id||"TM".concat(u.v4());var n=f.Parser.createPacket(e,function(e){switch(typeof e){case"undefined":return"";case"object":return JSON.stringify(e);default:return e}}(t));try{return this.channel.send(n),e.id}catch(r){throw s.log.debug("failed to send ",e,r),s.log.trace(r.stack),r}}},{key:"isConnected",get:function(){return this.channel.isConnected}}]),e}();t.PacketInterface=p},function(e,t,n){"use strict";var r=n(9),i=n(17);Object.defineProperty(t,"__esModule",{value:!0}),t.Metadata=void 0;var o=n(165),a=function(){function e(){r(this,e)}return i(e,null,[{key:"getMetadata",value:function(e){"undefined"!==typeof navigator&&o.parse(navigator.userAgent);var t=e&&e.clientMetadata?e.clientMetadata:{},n={env:o.name,envv:o.version,os:o.os.family,osv:o.os.version,osa:o.os.architecture,sdk:"js-default"},r={};return["ver","env","envv","os","osv","osa","type","sdk","sdkv","dev","devv","devt","app","appv"].filter((function(e){return e in t||e in n})).forEach((function(e){return r[e]=e in t?t[e]:n[e]})),r}}]),e}();t.Metadata=a},function(e,t,n){"use strict";(function(e){var r=n(9),i=n(17),o=n(20),a=n(21);Object.defineProperty(t,"__esModule",{value:!0}),t.WebSocketChannel=void 0;var s=n(18),u=n(73),c=function(t){o(c,t);var s=a(c);function c(t){var i;return r(this,c),(i=s.call(this)).url=t,i.WebSocket=e.WebSocket||e.MozWebSocket||n(550),i}return i(c,[{key:"connect",value:function(){var e=this;u.log.trace("connecting to socket");var t=new this.WebSocket(this.url);t.binaryType="arraybuffer",t.onopen=function(){u.log.debug("socket opened ".concat(e.url)),e.emit("connected")},t.onclose=function(t){u.log.debug("socket closed",t),e.emit("disconnected",t)},t.onerror=function(t){u.log.debug("error:",t),e.emit("socketError",t)},t.onmessage=function(t){e.emit("message",t.data)},this.socket=t}},{key:"send",value:function(e){this.socket.send(e)}},{key:"close",value:function(){if(u.log.trace("closing socket"),this.socket){this.socket.onopen=null,this.socket.onclose=null,this.socket.onerror=null,this.socket.onmessage=null;try{this.socket.close()}finally{}}}},{key:"isConnected",get:function(){return this.socket&&1===this.socket.readyState}}]),c}(s.EventEmitter);t.WebSocketChannel=c}).call(this,n(44))},,function(e,t,n){"use strict";var r=n(6),i=n(27),o=n(9),a=n(17),s=n(20),u=n(21);Object.defineProperty(t,"__esModule",{value:!0}),t.Registrations=void 0;var c=n(73),l=n(18),f=n(163),h=n(67),d=function(e){s(n,e);var t=u(n);function n(e){var r;return o(this,n),(r=t.call(this)).transport=e,r.registrations=new Map,r.registrationsInProgress=new Map,r}return a(n,[{key:"putNotificationContext",value:function(){var e=i(r.mark((function e(t,n){var i;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i={method:"put_notification_ctx",notification_ctx_id:t},e.next=3,this.transport.sendWithReply(i,n);case 3:e.sent;case 4:case"end":return e.stop()}}),e,this)})));return function(t,n){return e.apply(this,arguments)}}()},{key:"deleteNotificationContext",value:function(){var e=i(r.mark((function e(t){var n;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n={method:"delete_notification_ctx",notification_ctx_id:t},e.next=3,this.transport.sendWithReply(n);case 3:e.sent;case 4:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"updateRegistration",value:function(){var e=i(r.mark((function e(t,n){var i,o;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return c.log.debug("update registration for context",t),(i=this.registrationsInProgress.get(t))||(i=new Set,this.registrationsInProgress.set(t,i)),o=f.v4(),i.add(o),e.prev=5,e.next=8,this.putNotificationContext(t,n);
2case 8:c.log.debug("registration attempt succeeded for context",n),i.delete(o),0===i.size&&(this.registrationsInProgress.delete(t),this.emit("registered",t)),e.next=19;break;case 13:e.prev=13,e.t0=e.catch(5),c.log.warn("registration attempt failed for context",n),c.log.debug(e.t0),i.delete(o),0===i.size&&(this.registrationsInProgress.delete(t),this.emit("registrationFailed",t,e.t0));case 19:case"end":return e.stop()}}),e,this,[[5,13]])})));return function(t,n){return e.apply(this,arguments)}}()},{key:"updateRegistrations",value:function(){var e=this;c.log.trace("refreshing ".concat(this.registrations.size," registrations")),this.registrations.forEach((function(t,n){e.updateRegistration(n,t)}))}},{key:"setNotificationsContext",value:function(e,t){if(!e||!t)throw new h.TwilsockError("Invalid arguments provided");this.registrations.set(e,t),this.transport.isConnected&&this.updateRegistration(e,t)}},{key:"removeNotificationsContext",value:function(){var e=i(r.mark((function e(t){return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.registrations.has(t)){e.next=2;break}return e.abrupt("return");case 2:return e.next=4,this.deleteNotificationContext(t);case 4:this.transport.isConnected&&this.registrations.delete(t);case 5:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()}]),n}(l.EventEmitter);t.Registrations=d},function(e,t,n){"use strict";var r=n(6),i=n(27),o=n(17),a=n(9);Object.defineProperty(t,"__esModule",{value:!0}),t.Upstream=void 0;var s=n(73),u=n(67),c=n(553),l=n(162),f=n(271);function h(e,t){var n=function(e){var t=e.match(/^(https?\:)\/\/(([^:\/?#]*)(?:\:([0-9]+))?)(\/[^?#]*)(\?[^#]*|)(#.*|)$/);if(t){var n={protocol:t[1],host:t[2],hostname:t[3],port:t[4],pathname:t[5],search:t[6],hash:t[7],params:null};if(n.search.length>0){var r=n.search.substring(1);n.params=r.split("&").map((function(e){return e.split("=")})).reduce((function(e,t){return e.hasOwnProperty(t[0])?Array.isArray(e[t[0]])?e[t[0]].push(t[1]):e[t[0]]=[e[t[0]],t[1]]:e[t[0]]=t[1],e}),{})}return n}throw new u.TwilsockError("Incorrect URI: "+e)}(t),r={method:e,host:n.host,path:n.pathname};return n.params&&(r.params=n.params),r}function d(e,t,n,r){return{to:h(e,t),headers:n,body:r}}var p=function(){function e(t,n,r){a(this,e),this.config=r,this.transport=t,this.pendingMessages=[],this.twilsock=n}return o(e,[{key:"saveMessage",value:function(e){var t=this;return new Promise((function(n,r){var i={message:e,resolve:n,reject:r,alreadyRejected:!1,timeout:setTimeout((function(){s.log.debug("request is timed out"),r(new u.TwilsockError("Twilsock: request timeout")),i.alreadyRejected=!0}),2e4)};t.pendingMessages.push(i)}))}},{key:"sendPendingMessages",value:function(){for(var e=this,t=function(){var t=e.pendingMessages[0];if(!t.alreadyRejected)try{var n=t.message;e.actualSend(n).then((function(e){return t.resolve(e)})).catch((function(e){return t.reject(e)})),clearTimeout(t.timeout)}catch(r){return s.log.debug("Failed to send pending message",r),"break"}e.pendingMessages.splice(0,1)};this.pendingMessages.length;){if("break"===t())break}}},{key:"rejectPendingMessages",value:function(){var e=this;this.pendingMessages.forEach((function(t){t.reject(new f.TransportUnavailableError("Unable to connect: "+e.twilsock.getTerminationReason)),clearTimeout(t.timeout)})),this.pendingMessages.splice(0,this.pendingMessages.length)}},{key:"actualSend",value:function(){var e=i(r.mark((function e(t){var n,i,o,a,s,u;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t.to,i=t.headers,o=t.body,a={host:n.host,path:n.path,method:n.method,params:n.params,headers:i},s=new l.Message(this.config.activeGrant,i["Content-Type"]||"application/json",a),e.next=7,this.transport.sendWithReply(s,o);case 7:if(u=e.sent,!((f=u)&&f.header&&f.header.http_status)||(r=u.header.http_status.code)>=200&&r<300){e.next=10;break}throw new c.TwilsockUpstreamError(u.header.http_status.code,u.header.http_status.status,u.body);case 10:return e.abrupt("return",{status:u.header.http_status,headers:u.header.http_headers,body:u.body});case 11:case"end":return e.stop()}var r,f}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"send",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=arguments.length>3?arguments[3]:void 0;if(this.twilsock.isTerminalState)return Promise.reject(new f.TransportUnavailableError("Unable to connect: "+this.twilsock.getTerminationReason));var i=d(e,t,n,r);return this.twilsock.isConnected?this.actualSend(i):this.saveMessage(i)}}]),e}();t.Upstream=p},function(e,t,n){"use strict";var r=n(9),i=n(20),o=n(21);
2Object.defineProperty(t,"__esModule",{value:!0}),t.TwilsockUpstreamError=void 0;var a=function(e){i(n,e);var t=o(n);function n(e,i,o){var a;return r(this,n),(a=t.call(this,i)).status=e,a.description=i,a.body=o,a}return n}(n(67).TwilsockError);t.TwilsockUpstreamError=a},function(e,t,n){"use strict";var r=n(9),i=n(17);Object.defineProperty(t,"__esModule",{value:!0}),t.Deferred=void 0;var o=function(){function e(){var t=this;r(this,e),this._promise=new Promise((function(e,n){t._resolve=e,t._reject=n}))}return i(e,[{key:"update",value:function(e){this._resolve(e)}},{key:"set",value:function(e){this.current=e,this._resolve(e)}},{key:"fail",value:function(e){this._reject(e)}},{key:"promise",get:function(){return this._promise}}]),e}();t.Deferred=o},function(e,t,n){"use strict";var r=n(9),i=n(17);Object.defineProperty(t,"__esModule",{value:!0}),t.OfflineProductStorage=void 0;var o=n(67),a=function(){function e(t){r(this,e),this.id=t}return i(e,null,[{key:"create",value:function(t){if(t instanceof Object&&"storage_id"in t)return new e(t.storage_id);throw new o.TwilsockError('Field "storage_id" is missing')}}]),e}();t.OfflineProductStorage=a},function(e,t,n){"use strict";(function(e){var r=n(9),i=n(17);Object.defineProperty(t,"__esModule",{value:!0}),t.TokenStorage=void 0;var o=function(){function t(){r(this,t)}return i(t,null,[{key:"storeToken",value:function(e,n){t.canStore&&t.sessionStorage.setItem(t.getKeyName(n),e)}},{key:"getStoredToken",value:function(e){return t.canStore?t.sessionStorage.getItem(t.getKeyName(e)):null}},{key:"initialize",value:function(){t.canStore&&(t.sessionStorage.getItem(t.initializedFlag)&&this.clear(),t.sessionStorage.setItem(t.initializedFlag,"true"),t.window.addEventListener("unload",(function(){t.sessionStorage.removeItem(t.initializedFlag)})))}},{key:"clear",value:function(){if(t.canStore){for(var e=[],n=0;n<t.sessionStorage.length;n++){var r=t.sessionStorage.key(n);0===r.indexOf(t.tokenStoragePrefix)&&e.push(r)}e.forEach((function(e){return t.sessionStorage.removeItem(e)})),t.sessionStorage.removeItem(t.initializedFlag)}}},{key:"getKeyName",value:function(e){return"".concat(t.tokenStoragePrefix).concat(e)}},{key:"sessionStorage",get:function(){try{return e.sessionStorage}catch(t){return null}}},{key:"window",get:function(){try{return e.window}catch(t){return null}}},{key:"canStore",get:function(){return t.sessionStorage&&t.window}}]),t}();t.TokenStorage=o,o.initializedFlag="twilio_twilsock_token_storage",o.tokenStoragePrefix="twilio_continuation_token_",o.initialize()}).call(this,n(44))},function(e,t,n){"use strict";var r=n(9),i=n(17);Object.defineProperty(t,"__esModule",{value:!0}),t.EventSendingLimitation=t.TelemetryPoint=t.TelemetryEventDescription=t.TelemetryTracker=void 0;var o,a,s=n(268),u=n(73),c=function(){function e(t,n,i,o,a,s){r(this,e),this.title=t,this.details=n,this.start=i,this.type=a,this.id=s,this.end=o}return i(e,[{key:"toTelemetryEvent",value:function(){var e=new Date,t=this.start,n=this.end?this.end:e;if(n<t){var r=n;n=t,t=r}var i=t.getTime()-e.getTime(),o=n.getTime()-e.getTime();return new s.TelemetryEvent(i,o,this.title,this.details,this.id,this.type)}}]),e}();t.TelemetryEventDescription=c,function(e){e[e.Start=0]="Start",e[e.End=1]="End"}(o||(o={})),t.TelemetryPoint=o,function(e){e[e.MinEventsPortion=0]="MinEventsPortion",e[e.AnyEvents=1]="AnyEvents",e[e.AnyEventsIncludingUnfinished=2]="AnyEventsIncludingUnfinished"}(a||(a={})),t.EventSendingLimitation=a;var l=function(){function e(t,n){r(this,e),this.minEventsPortionToSend=50,this.maxEventsPortionToSend=100,this.pendingEvents=new Map,this.readyEvents=[],this.hasInitializationFinished=!1,this._canSendTelemetry=!1,this.config=t,this.packetInterface=n}return i(e,[{key:"addTelemetryEvent",value:function(e){!this.canSendTelemetry&&this.hasInitializationFinished||this.readyEvents.push(e)}},{key:"addPartialEvent",value:function(e,t,n){u.log.debug("Adding ".concat(n===o.Start?"starting":"ending"," timepoint for '").concat(t,"' event"));var r=this.pendingEvents.has(t);if(n===o.Start)r&&u.log.debug("Overwriting starting point for '".concat(t,"' event")),this.pendingEvents.set(t,e);else{if(!r)return void u.log.error("Could not find started event for '".concat(t,"' event"));
2this.addTelemetryEvent(this.merge(this.pendingEvents.get(t),e)),this.pendingEvents.delete(t)}}},{key:"getTelemetryToSend",value:function(e){return this.canSendTelemetry&&0!=this.readyEvents.length?e==a.MinEventsPortion&&this.readyEvents.length<this.minEventsPortionToSend?[]:this.getTelemetryPortion(e==a.AnyEventsIncludingUnfinished):[]}},{key:"getTelemetryPortion",value:function(e){var t=this,n=Math.min(this.readyEvents.length,this.maxEventsPortionToSend),r=this.readyEvents.splice(0,n);return e&&r.length<this.maxEventsPortionToSend&&this.pendingEvents.forEach((function(e,n){if(!(r.length>=t.maxEventsPortionToSend)){var i=t.pendingEvents.get(n);t.pendingEvents.delete(n),r.push(new c("[UNFINISHED] ".concat(i.title),i.details,i.start,null,i.type,i.id))}})),r}},{key:"merge",value:function(e,t){return new c(t.title?t.title:e.title,t.details?t.details:e.details,e.start,t.end,t.type?t.type:e.type,t.id?t.id:e.id)}},{key:"sendTelemetryIfMinimalPortionCollected",value:function(){this.sendTelemetry(a.MinEventsPortion)}},{key:"sendTelemetry",value:function(e){var t=this.getTelemetryToSend(e);if(0!==t.length)try{this.packetInterface.send(new s.Telemetry(t.map((function(e){return e.toTelemetryEvent()}))))}catch(n){u.log.debug("Error while sending ".concat(t.length," telemetry events due to ").concat(n,"; they will be resubmitted")),this.readyEvents=this.readyEvents.concat(t)}}},{key:"isTelemetryEnabled",get:function(){return this.config.confirmedCapabilities.has("telemetry.v1")}},{key:"canSendTelemetry",get:function(){return this._canSendTelemetry&&this.isTelemetryEnabled},set:function(e){u.log.debug("TelemetryTracker.canSendTelemetry: ".concat(e," TelemetryTracker.isTelemetryEnabled: ").concat(this.isTelemetryEnabled)),this._canSendTelemetry&&!e&&(this.pendingEvents.clear(),this.readyEvents=[]),this._canSendTelemetry=e,e&&this.sendTelemetry(a.AnyEvents),e&&!this.hasInitializationFinished&&(this.hasInitializationFinished=!0)}}]),e}();t.TelemetryTracker=l},function(e,t,n){"use strict";var r=n(6),i=n(27),o=n(9),a=n(17),s=n(83),u=n(20),c=n(21);Object.defineProperty(t,"__esModule",{value:!0}),t.Client=void 0;var l=n(18),f=n(107),h=n(559),d=n(560),p=n(166),v=function(e){u(n,e);var t=c(n);function n(e){var r,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(o(this,n),r=t.call(this),!e||0===e.length)throw new Error("Token is required for Notifications client");i.logLevel=i.logLevel||"error",p.log.setLevel(i.logLevel);i.minTokenRefreshInterval;var a=i.productId||"notifications";return i.twilsockClient=i.twilsockClient||new f.TwilsockClient(e,a,i),i.transport=i.transport||i.twilsockClient,r.services={twilsock:i.twilsockClient,transport:i.transport,config:new h.Configuration(null,i)},r.registrar=new d.Registrar(a,r.services.transport,r.services.twilsock,r.services.config),r.reliableTransportState={overall:!1,transport:!1,registration:!1,lastEmitted:null},r._onTransportStateChange(r.services.twilsock.isConnected),r.registrar.on("transportReady",(function(e){r._onRegistrationStateChange(e?"registered":"")})),r.registrar.on("stateChanged",(function(e){r._onRegistrationStateChange(e)})),r.registrar.on("needReliableTransport",r._onNeedReliableTransport.bind(s(r))),r.services.twilsock.on("message",(function(e,t){return r._routeMessage(e,t)})),r.services.twilsock.on("connected",(function(e){r._onTransportStateChange(!0),r.registrar.setNotificationId("twilsock",e)})),r.services.twilsock.on("disconnected",(function(){r._onTransportStateChange(!1)})),r.services.config.updateToken(e),r.registrar.updateToken(e),r}return a(n,[{key:"_routeMessage",value:function(e,t){p.log.trace("Message arrived: ",e,t),this.emit("message",e,t)}},{key:"_onNeedReliableTransport",value:function(e){e?this.services.twilsock.connect():this.services.twilsock.disconnect()}},{key:"_onRegistrationStateChange",value:function(e){this.reliableTransportState.registration="registered"===e,this._updateTransportState()}},{key:"_onTransportStateChange",value:function(e){this.reliableTransportState.transport=e,this._updateTransportState()}},{key:"_updateTransportState",value:function(){var e=this.reliableTransportState.transport&&this.reliableTransportState.registration;this.reliableTransportState.overall!==e&&(this.reliableTransportState.overall=e,p.log.info("Transport ready:",e),this.emit
2("transportReady",e)),this.reliableTransportState.lastEmitted!==this.connectionState&&(this.reliableTransportState.lastEmitted=this.connectionState,this.emit("connectionStateChanged",this.connectionState))}},{key:"subscribe",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"twilsock";return p.log.trace("Add subscriptions for message type: ",e,t),this.registrar.subscribe(e,t)}},{key:"unsubscribe",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"twilsock";return p.log.trace("Remove subscriptions for message type: ",e,t),this.registrar.unsubscribe(e,t)}},{key:"handlePushNotification",value:function(e){return{messageType:e.twi_message_type,payload:e.payload}}},{key:"setPushRegistrationId",value:function(e,t){p.log.trace("Set push registration id",e,t),this.registrar.setNotificationId(t,e)}},{key:"updateToken",value:function(){var e=i(r.mark((function e(t){return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(p.log.info("authTokenUpdated"),this.services.config.token!==t){e.next=3;break}return e.abrupt("return");case 3:return e.next=5,this.services.twilsock.updateToken(t);case 5:this.services.config.updateToken(t),this.registrar.updateToken(t);case 7:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"connectionState",get:function(){return"disconnected"===this.services.twilsock.state?"disconnected":"disconnecting"===this.services.twilsock.state?"disconnecting":"connected"===this.services.twilsock.state&&this.reliableTransportState.registration?"connected":"rejected"===this.services.twilsock.state?"denied":"connecting"}}]),n}(l.EventEmitter);t.Client=v},function(e,t,n){"use strict";var r=n(9),i=n(17);Object.defineProperty(t,"__esModule",{value:!0}),t.Configuration=void 0;var o=function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};r(this,e);var i=n.notifications||{},o=i.region||n.region||"us1",a="https://ers.".concat(o,".twilio.com/v1/registrations");this.registrarUrl=i.ersUrl||a,this._token=t}return i(e,[{key:"updateToken",value:function(e){this._token=e}},{key:"token",get:function(){return this._token}}]),e}();t.Configuration=o},function(e,t,n){"use strict";var r=n(9),i=n(17),o=n(20),a=n(21);Object.defineProperty(t,"__esModule",{value:!0}),t.Registrar=void 0;var s=n(18),u=n(561),c=n(569),l=function(e){o(n,e);var t=a(n);function n(e,i,o,a){var s;r(this,n),(s=t.call(this)).config=a,s.connectors=new Map;var l=s.detectPlatform();return s.connectors.set("gcm",new u.RegistrarConnector("gcm",{protocolVersion:3,productId:e,platform:l},i,a)),s.connectors.set("fcm",new u.RegistrarConnector("fcm",{protocolVersion:3,productId:e,platform:l},i,a)),s.connectors.set("apn",new u.RegistrarConnector("apn",{protocolVersion:4,productId:e,platform:l},i,a)),s.connectors.set("twilsock",new c.TwilsockConnector({productId:e,platform:l},o,a)),s.connectors.get("twilsock").on("transportReady",(function(e){return s.emit("transportReady",e)})),s}return i(n,[{key:"setNotificationId",value:function(e,t){this.connector(e).setNotificationId(t)}},{key:"subscribe",value:function(e,t){return this.connector(t).subscribe(e)}},{key:"unsubscribe",value:function(e,t){return this.connector(t).unsubscribe(e)}},{key:"updateToken",value:function(e){this.connectors.forEach((function(t){return t.updateToken(e)}))}},{key:"connector",value:function(e){var t=this.connectors.get(e);if(!t)throw new Error("Unknown channel type: ".concat(e));return t}},{key:"detectPlatform",value:function(){var e="";return"undefined"!==typeof navigator?(e="unknown","undefined"!==typeof navigator.product&&(e=navigator.product),"undefined"!==typeof navigator.userAgent&&(e=navigator.userAgent)):e="web",e.substring(0,128)}}]),n}(s.EventEmitter);t.Registrar=l},function(e,t,n){"use strict";var r=n(6),i=n(27),o=n(9),a=n(17),s=n(20),u=n(21);Object.defineProperty(t,"__esModule",{value:!0}),t.RegistrarConnector=t.Connector=void 0;var c=n(93),l=n(166),f=n(273);Object.defineProperty(t,"Connector",{enumerable:!0,get:function(){return f.Connector}});var h={min:2e3,max:12e4,randomness:.2},d=function(e){s(n,e);var t=u(n);function n(e,r,i,a){var s;return o(this,n),(s=t.call(this,a)).channelType=e,s.context=r,s.transport=i,s}return a(n,[{key:"updateRegistration",value:function(){var e=i(r.mark((function e(t,n){return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!n.has("notificationId")){e.next=3;break}return e.next=3,this.removeRegistration();case 3:if(t.notificationId&&t.notificationId.length){e.next=5;break}return e.abrupt("return",t);case 5:return e.next=7,this.register(t);case 7:return e.abrupt("return",t);case 8:case"end":return e.stop()}}),e,this)})));return function(t,n){return e.apply(this,arguments)}}()},{key:"removeRegistration",value:function(){var e=i(r.mark((function e(){var t,n,i=this;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.registrationId){e.next=2;break}return e.abrupt("return");case 2:return t="".concat(this.config.registrarUrl,"/").concat(this.registrationId,"?productId=").concat(this.context.productId),n={"Content-Type":"application/json","X-Twilio-Token":this.config.token},e.prev=4,l.log.trace("Removing registration for ",this.channelType),e.next=8,new c.Retrier(Object.assign(h,{maxAttemptsCount:3})).run((function(){return i.transport.delete(t,n)}));case 8:l.log.debug("Registration removed for",this.channelType),e.next=15;break;case 11:throw e.prev=11,e.t0=e.catch(4),l.log.error("Failed to remove of registration ",this.channelType,e.t0),e.t0;case 15:case"end":return e.stop()}}),e,this,[[4,11]])})));return function(){return e.apply(this,arguments)}}()},{key:"register",value:function(){var e=i(r.mark((function e(t){var n,i,o,a,s=this;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return l.log.trace("Registering",this.channelType,t),n={endpoint_platform:this.context.platform,channel_type:this.channelType,version:this.context.protocolVersion.toString(),message_types:Array.from(t.messageTypes),data:{registration_id:t.notificationId},ttl:"PT24H"},i="".concat(this.config.registrarUrl,"?productId=").concat(this.context.productId),o={"Content-Type":"application/json","X-Twilio-Token":t.token},l.log.trace("Creating registration for channel ",this.channelType),e.prev=5,e.next=8,new c.Retrier(h).run((function(){return s.transport.post(i,o,n)}));case 8:a=e.sent,this.registrationId=a.body.id,l.log.debug("Registration created: ",a),e.next=17;break;case 13:throw e.prev=13,e.t0=e.catch(5),l.log.error("Registration failed: ",e.t0),e.t0;case 17:case"end":return e.stop()}}),e,this,[[5,13]])})));return function(t){return e.apply(this,arguments)}}()}]),n}(f.Connector);t.RegistrarConnector=d},function(e,t){e.exports=function(e){if(Array.isArray(e))return e}},function(e,t){e.exports=function(e,t){if("undefined"!==typeof Symbol&&Symbol.iterator in Object(e)){var n=[],r=!0,i=!1,o=void 0;try{for(var a,s=e[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(u){i=!0,o=u}finally{try{r||null==s.return||s.return()}finally{if(i)throw o}}return n}}},function(e,t){e.exports=function(){throw new TypeError("Invalid attempt to de
2structure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}},function(e,t,n){var r=n(566),i=n(567),o=n(168),a=n(568);e.exports=function(e){return r(e)||i(e)||o(e)||a()}},function(e,t,n){var r=n(274);e.exports=function(e){if(Array.isArray(e))return r(e)}},function(e,t){e.exports=function(e){if("undefined"!==typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}},function(e,t){e.exports=function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}},function(e,t,n){"use strict";var r=n(6),i=n(27),o=n(9),a=n(17),s=n(20),u=n(21);Object.defineProperty(t,"__esModule",{value:!0}),t.TwilsockConnector=void 0;var c=n(570),l=function(e){s(n,e);var t=u(n);function n(e,r,i){var a;return o(this,n),(a=t.call(this,i)).twilsock=r,a.context=e,e.id=c.v4(),a.twilsock.on("stateChanged",(function(e){"connected"!==e&&a.emit("transportReady",!1)})),a.twilsock.on("registered",(function(t){e&&t===e.id&&"connected"===r.state&&a.emit("transportReady",!0)})),a}return a(n,[{key:"setNotificationId",value:function(){}},{key:"updateToken",value:function(e){}},{key:"updateContextRequest",value:function(){var e=i(r.mark((function e(t){var n;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n={product_id:this.context.productId,notification_protocol_version:4,endpoint_platform:this.context.platform,message_types:t},this.emit("transportReady",!1),e.next=4,this.twilsock.setNotificationsContext(this.context.id,n);case 4:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"updateRegistration",value:function(){var e=i(r.mark((function e(t,n){return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n.has("messageType")){e.next=2;break}return e.abrupt("return");case 2:return e.next=4,this.updateContextRequest(Array.from(t.messageTypes));case 4:return e.abrupt("return",t);case 5:case"end":return e.stop()}}),e,this)})));return function(t,n){return e.apply(this,arguments)}}()},{key:"removeRegistration",value:function(){return this.twilsock.removeNotificationsContext(this.context.id)}}]),n}(n(273).Connector);t.TwilsockConnector=l},function(e,t,n){var r=n(571),i=n(572),o=i;o.v1=r,o.v4=i,e.exports=o},function(e,t,n){var r,i,o=n(275),a=n(276),s=0,u=0;e.exports=function(e,t,n){var c=t&&n||0,l=t||[],f=(e=e||{}).node||r,h=void 0!==e.clockseq?e.clockseq:i;if(null==f||null==h){var d=o();null==f&&(f=r=[1|d[0],d[1],d[2],d[3],d[4],d[5]]),null==h&&(h=i=16383&(d[6]<<8|d[7]))}var p=void 0!==e.msecs?e.msecs:(new Date).getTime(),v=void 0!==e.nsecs?e.nsecs:u+1,y=p-s+(v-u)/1e4;if(y<0&&void 0===e.clockseq&&(h=h+1&16383),(y<0||p>s)&&void 0===e.nsecs&&(v=0),v>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");s=p,u=v,i=h;var m=(1e4*(268435455&(p+=122192928e5))+v)%4294967296;l[c++]=m>>>24&255,l[c++]=m>>>16&255,l[c++]=m>>>8&255,l[c++]=255&m;var g=p/4294967296*1e4&268435455;l[c++]=g>>>8&255,l[c++]=255&g,l[c++]=g>>>24&15|16,l[c++]=g>>>16&255,l[c++]=h>>>8|128,l[c++]=255&h;for(var b=0;b<6;++b)l[c+b]=f[b];return t||a(l)}},function(e,t,n){var r=n(275),i=n(276);e.exports=function(e,t,n){var o=t&&n||0;"string"==typeof e&&(t="binary"===e?new Array(16):null,e=null);var a=(e=e||{}).random||(e.rng||r)();if(a[6]=15&a[6]|64,a[8]=63&a[8]|128,t)for(var s=0;s<16;++s)t[o+s]=a[s];return t||i(a)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SyncMapItem=t.SyncMap=t.SyncListItem=t.SyncList=t.SyncDocument=t.SyncClient=void 0;var r=n(574);Object.defineProperty(t,"SyncClient",{enumerable:!0,get:function(){return r.SyncClient}});var i=n(280);Object.defineProperty(t,"SyncDocument",{enumerable:!0,get:function(){return i.SyncDocument}});var o=n(281);Object.defineProperty(t,"SyncList",{enumerable:!0,get:function(){return o.SyncList}});var a=n(282);Object.defineProperty(t,"SyncListItem",{enumerable:!0,get:function(){return a.ListItem}});var s=n(284);Object.defineProperty(t,"SyncMap",{enumerable:!0,get:function(){return s.SyncMap}});var u=n(285);Object.defineProperty(t,"SyncMapItem",{enumerable:!0,get:function(){return u.MapItem}}),t.default=r.SyncClient,e.exports=r.SyncClient,e.exports.SyncCl
2ient=r.SyncClient},function(e,t,n){"use strict";var r=n(6),i=n(27),o=n(9),a=n(17),s=n(20),u=n(21);Object.defineProperty(t,"__esModule",{value:!0}),t.SyncClient=t.Client=void 0;var c=n(18),l=n(107),f=n(272),h=n(122),d=n(74),p=n(108),v=n(75),y=n(575),m=n(576),g=n(577),b=n(578),_=n(280),w=n(281),k=n(284),S=n(582),O=n(583),E=n(584),T=n(585),C=n(286),P=n(286),x="data_sync",I=n(586).version;function j(e){if(e){if("string"===typeof e)return{id:e,mode:"open_or_create"};p.validateOptionalTtl(e.ttl),p.validateId(e.id);var t=e.mode||(e.id?"open_or_create":"create_new");return Object.assign(Object.assign({},e),{mode:t})}return{mode:"create_new"}}var R=function(e){s(n,e);var t=u(n);function n(e){var r,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(o(this,n),r=t.call(this),!e)throw new Error("Sync library needs a valid Twilio token to be passed");i.hasOwnProperty("logLevel")?v.default.setLevel(i.logLevel):v.default.setLevel("silent");var a=i.productId=i.productId||x;i.clientMetadata=i.clientMetadata||{},i.clientMetadata.hasOwnProperty("type")||(i.clientMetadata.type="sync"),i.clientMetadata.hasOwnProperty("sdk")||(i.clientMetadata.sdk="JS",i.clientMetadata.sdkv=I);var s=i.twilsockClient=i.twilsockClient||new l.Twilsock(e,a,i);s.on("tokenAboutToExpire",(function(e){return r.emit("tokenAboutToExpire",e)})),s.on("tokenExpired",(function(){return r.emit("tokenExpired")})),s.on("connectionError",(function(e){return r.emit("connectionError",e)}));var u=i.notificationsClient=i.notificationsClient||new f.Notifications(e,i),c=new y.Configuration(i),h=new b.NetworkService(new S.ClientInfo(I),c,s),d=new E.SessionStorage(c);r.localStorageId=null,s.connect(),r.services={config:c,twilsock:s,notifications:u,network:h,storage:d,router:null,subscriptions:null};var p=new m.Subscriptions(r.services),_=new g.Router({config:c,subscriptions:p,notifications:u});return r.services.router=_,r.services.subscriptions=p,r.entities=new O.EntitiesCache,u.on("connectionStateChanged",(function(){r.emit("connectionStateChanged",r.services.notifications.connectionState)})),r}return a(n,[{key:"ensureReady",value:function(){var e=i(r.mark((function e(){var t;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.services.config.sessionStorageEnabled){e.next=2;break}return e.abrupt("return");case 2:return e.prev=2,e.next=5,this.services.twilsock.storageId();case 5:t=e.sent,this.services.storage.updateStorageId(t.id),e.next=12;break;case 9:e.prev=9,e.t0=e.catch(2),v.default.warn("Failed to initialize storage",e.t0);case 12:case"end":return e.stop()}}),e,this,[[2,9]])})));return function(){return e.apply(this,arguments)}}()},{key:"storeRootInSessionCache",value:function(e,t,n){if(this.services.config.sessionStorageEnabled&&t){var r=p.deepClone(n);e!==w.SyncList.type&&e!==k.SyncMap.type||(r.last_event_id=null,delete r.items),this.services.storage.store(e,t,r)}}},{key:"readRootFromSessionCache",value:function(e,t){return this.services.config.sessionStorageEnabled&&t?this.services.storage.read(e,t):null}},{key:"_get",value:function(){var e=i(r.mark((function e(t,n){var i,o,a,s=arguments;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=s.length>2&&void 0!==s[2]&&s[2],n){e.next=3;break}throw new d.SyncError("Cannot get entity without id",404);case 3:return o=new h.UriBuilder(t).pathSegment(n).queryParam("Include",i?"items":void 0).build(),e.next=6,this.services.network.get(o);case 6:return a=e.sent,e.abrupt("return",a.body);case 8:case"end":return e.stop()}}),e,this)})));return function(t,n){return e.apply(this,arguments)}}()},{key:"_createDocument",value:function(e,t,n){var r={unique_name:e,data:t||{}};return void 0!==n&&(r.ttl=n),this.services.network.post(this.services.config.documentsUri,r).then((function(e){return e.body.data=r.data,e.body}))}},{key:"_getDocument",value:function(){var e=i(r.mark((function e(t){return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",this.readRootFromSessionCache(_.SyncDocument.type,t)||this._get(this.services.config.documentsUri,t));case 1:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"_createList",value:function(e,t,n,r){var i={unique_name:e,purpose:t,context:n};return void 0!==r&&(i.ttl=r),this.services.network.post(this.services.config.listsUri,i).then((function(e){return e.body}))}},{key:"_getList",value:function(){var e=i(r.mark((function e(t){return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",this.readRootFromSessionCache(w.SyncList.type,t)||this._get(this.services.config.listsUri,t));case 1:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"_createMap",value:function(e,t){var n={unique_name:e};return void 0!==t&&(n.ttl=t),this.services.network.post(this.services.config.mapsUri,n).then((function(e){return e.body}))}},{key:"_getMap",value:function(){var e=i(r.mark((function e(t){var n,i=arguments;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=i.length>1&&void 0!==i[1]&&i[1],e.abrupt("return",this.readRootFromSessionCache(k.SyncMap.type,t)||this._get(this.services.config.mapsUri,t,n));case 2:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"_getStream",value:function(){var e=i(r.mark((function e(t){return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",this.readRootFromSessionCache(T.SyncStream.type,t)||this._get(this.services.config.streamsUri,t,!1));case 1:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"_createStream",value:function(){var e=i(r.mark((function e(t,n){var i,o;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i={unique_name:t},void 0!==n&&(i.ttl=n),e.next=4,this.services.network.post(this.services.config.streamsUri,i);case 4:return o=e.sent,e.abrupt("return",o.body);case 6:case"end":return e.stop()}}),e,this)})));return function(t,n){return e.apply(this,arguments)}}()},{key:"_getLiveQuery",value:function(e){return this.readRootFromSessionCache(C.LiveQuery.type,e)}},{key:"getCached",value:function(e,t){return e&&this.entities.get(e,t)||null}},{key:"removeFromCacheAndSession",value:function(e,t,n){this.entities.remove(t),this.services.config.sessionStorageEnabled&&this.services.storage.remove(e,t,n)}},{key:"document",value:function(){var e=i(r.mark((function e(t){var n,i,o,a,s=this;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.ensureReady();case 2:if("create_new"!==(n=j(t)).mode){e.next=9;break}return e.next=6,this._createDocument(n.id,n.value,n.ttl);case 6:i=e.sent,e.next=39;break;case 9:if(!(o=this.getCached(n.id,_.SyncDocument.type))){e.next=14;break}return e.abrupt("return",new _.SyncDocument(o));case 14:return e.prev=14,e.next=17,this._getDocument(n.id);case 17:i=e.sent,e.next=39;break;case 20:if(e.prev=20,e.t0=e.catch(14),404===e.t0.status&&"open_existing"!==n.mode){e.next=26;break}throw e.t0;case 26:return e.prev=26,e.next=29,this._createDocument(n.id,n.value,n.ttl);case 29:i=e.sent,e.next=39;break;case 32:if(e.prev=32,e.t1=e.catch(26),409!==e.t1.status){e.next=38;break}return e.abrupt("return",this.document(t));case 38:throw e.t1;case 39:return this.storeRootInSessionCache(_.SyncDocument.type,n.id,i),a=new _.SyncDocumentImpl(this.services,i,(function(e,t,n){return s.removeFromCacheAndSession(e,t,n)})),a=this.entities.store(a),e.abrupt("return",new _.SyncDocument(a));case 43:case"end":return e.stop()}}),e,this,[[14,20],[26,32]])})));return function(t){return e.apply(this,arguments)}}()},{key:"map",value:function(){var e=i(r.mark((function e(t){var n,i,o,a,s=this;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.ensureReady();case 2:if("create_new"!==(n=j(t)).mode){e.next=9;break}return e.next=6,this._createMap(n.id,n.ttl);case 6:i=e.sent,e.next=39;break;case 9:if(!(o=this.getCached(n.id,k.SyncMap.type))){e.next=14;break}
2return e.abrupt("return",new k.SyncMap(o));case 14:return e.prev=14,e.next=17,this._getMap(n.id,n.includeItems);case 17:i=e.sent,e.next=39;break;case 20:if(e.prev=20,e.t0=e.catch(14),404===e.t0.status&&"open_existing"!==n.mode){e.next=26;break}throw e.t0;case 26:return e.prev=26,e.next=29,this._createMap(n.id,n.ttl);case 29:i=e.sent,e.next=39;break;case 32:if(e.prev=32,e.t1=e.catch(26),409!==e.t1.status){e.next=38;break}return e.abrupt("return",this.map(t));case 38:throw e.t1;case 39:return this.storeRootInSessionCache(k.SyncMap.type,n.id,i),a=new k.SyncMapImpl(this.services,i,(function(e,t,n){return s.removeFromCacheAndSession(e,t,n)})),a=this.entities.store(a),e.abrupt("return",new k.SyncMap(a));case 43:case"end":return e.stop()}}),e,this,[[14,20],[26,32]])})));return function(t){return e.apply(this,arguments)}}()},{key:"list",value:function(){var e=i(r.mark((function e(t){var n,i,o,a,s=this;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.ensureReady();case 2:if("create_new"!==(n=j(t)).mode){e.next=9;break}return e.next=6,this._createList(n.id,n.purpose,n.context,n.ttl);case 6:i=e.sent,e.next=39;break;case 9:if(!(o=this.getCached(n.id,w.SyncList.type))){e.next=14;break}return e.abrupt("return",new w.SyncList(o));case 14:return e.prev=14,e.next=17,this._getList(n.id);case 17:i=e.sent,e.next=39;break;case 20:if(e.prev=20,e.t0=e.catch(14),404===e.t0.status&&"open_existing"!==n.mode){e.next=26;break}throw e.t0;case 26:return e.prev=26,e.next=29,this._createList(n.id,n.purpose,n.context,n.ttl);case 29:i=e.sent,e.next=39;break;case 32:if(e.prev=32,e.t1=e.catch(26),409!==e.t1.status){e.next=38;break}return e.abrupt("return",this.list(t));case 38:throw e.t1;case 39:return this.storeRootInSessionCache(w.SyncList.type,n.id,i),a=new w.SyncListImpl(this.services,i,(function(e,t,n){return s.removeFromCacheAndSession(e,t,n)})),a=this.entities.store(a),e.abrupt("return",new w.SyncList(a));case 43:case"end":return e.stop()}}),e,this,[[14,20],[26,32]])})));return function(t){return e.apply(this,arguments)}}()},{key:"stream",value:function(){var e=i(r.mark((function e(t){var n,i,o,a,s,u=this;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.ensureReady();case 2:if("create_new"!==(n=j(t)).mode){e.next=9;break}return e.next=6,this._createStream(n.id,n.ttl);case 6:i=e.sent,e.next=39;break;case 9:if(!(o=this.getCached(n.id,T.SyncStream.type))){e.next=14;break}return e.abrupt("return",new T.SyncStream(o));case 14:return e.prev=14,e.next=17,this._getStream(n.id);case 17:i=e.sent,e.next=39;break;case 20:if(e.prev=20,e.t0=e.catch(14),404===e.t0.status&&"open_existing"!==n.mode){e.next=26;break}throw e.t0;case 26:return e.prev=26,e.next=29,this._createStream(n.id,n.ttl);case 29:i=e.sent,e.next=39;break;case 32:if(e.prev=32,e.t1=e.catch(26),409!==e.t1.status){e.next=38;break}return e.abrupt("return",this.stream(t));case 38:throw e.t1;case 39:return this.storeRootInSessionCache(T.SyncStream.type,n.id,i),a=function(e,t,n){return u.removeFromCacheAndSession(e,t,n)},s=new T.SyncStreamImpl(this.services,i,a),s=this.entities.store(s),e.abrupt("return",new T.SyncStream(s));case 44:case"end":return e.stop()}}),e,this,[[14,20],[26,32]])})));return function(t){return e.apply(this,arguments)}}()},{key:"shutdown",value:function(){var e=i(r.mark((function e(){return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.services.subscriptions.shutdown();case 2:return e.next=4,this.services.twilsock.disconnect();case 4:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"updateToken",value:function(e){return e?this.services.twilsock.updateToken(e):Promise.reject(new Error("A valid Twilio token should be provided"))}},{key:"liveQuery",value:function(){var e=i(r.mark((function e(t,n){var i,o,a,s,u,c=this;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.ensureReady();case 2:if(t&&"string"===typeof t){e.next=4;break}throw new Error("Index name must contain a non-empty string value");
2case 4:return i=new h.UriBuilder(this.services.config.insightsUri).pathSegment(t).pathSegment("Items").build(),e.next=7,P.queryItems({network:this.services.network,uri:i,queryString:n,type:C.LiveQuery.type});case 7:return o=e.sent,(a=this.getCached(o.query_id,C.LiveQuery.type))||((s=this._getLiveQuery(o.query_id))||(s={indexName:t,queryExpression:n,sid:o.query_id,queryUri:i,last_event_id:o.last_event_id}),u=function(e,t,n){return c.removeFromCacheAndSession(e,t,n)},a=new C.LiveQueryImpl(s,this.services,u,o.items)),this.storeRootInSessionCache(C.LiveQuery.type,o.query_id,a.liveQueryDescriptor),a=this.entities.store(a),e.abrupt("return",new C.LiveQuery(a));case 13:case"end":return e.stop()}}),e,this)})));return function(t,n){return e.apply(this,arguments)}}()},{key:"instantQuery",value:function(){var e=i(r.mark((function e(t){var n,i,o=this;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.ensureReady();case 2:return n=function(e,t){return o.liveQuery(e,t)},i=new C.InstantQuery({indexName:t,network:this.services.network,insightsUri:this.services.config.insightsUri,liveQueryCreator:n}),e.abrupt("return",i);case 5:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"connectionState",get:function(){return this.services.notifications.connectionState}}],[{key:"version",get:function(){return I}}]),n}(c.EventEmitter);t.Client=R,t.SyncClient=R,t.default=R},function(e,t,n){"use strict";var r=n(9),i=n(17);Object.defineProperty(t,"__esModule",{value:!0}),t.Configuration=void 0;var o="/v4/Subscriptions",a="/v3/Maps",s="/v3/Lists",u="/v3/Documents",c="/v3/Streams",l="/v3/Insights";function f(e,t,n){return e&&"undefined"!==typeof e[t]?e[t]:n}var h=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};r(this,e);var n=t.region||"us1",i="https://cds.".concat(n,".twilio.com"),h=t.cdsUri||i;this.settings={subscriptionsUri:h+o,documentsUri:h+u,listsUri:h+s,mapsUri:h+a,streamsUri:h+c,insightsUri:h+l,sessionStorageEnabled:f(t.Sync,"enableSessionStorage",!0)}}return i(e,[{key:"subscriptionsUri",get:function(){return this.settings.subscriptionsUri}},{key:"documentsUri",get:function(){return this.settings.documentsUri}},{key:"listsUri",get:function(){return this.settings.listsUri}},{key:"mapsUri",get:function(){return this.settings.mapsUri}},{key:"streamsUri",get:function(){return this.settings.streamsUri}},{key:"insightsUri",get:function(){return this.settings.insightsUri}},{key:"backoffConfig",get:function(){return this.settings.backoffConfig||{}}},{key:"sessionStorageEnabled",get:function(){return this.settings.sessionStorageEnabled}}]),e}();t.Configuration=h},function(e,t,n){"use strict";var r=n(6),i=n(27),o=n(167),a=n(123),s=n(9),u=n(17);Object.defineProperty(t,"__esModule",{value:!0}),t.Subscriptions=void 0;var c=n(93),l=n(74),f=n(75),h=n(107),d=function(){function e(t){s(this,e),this.localObject=t,this.pendingCorrelationId=null,this.pendingAction=null,this.established=!1,this.retryCount=0}return u(e,[{key:"update",value:function(e,t){this.localObject._update(e,t)}},{key:"updatePending",value:function(e,t){this.pendingAction=e,this.pendingCorrelationId=t}},{key:"reset",value:function(){this.updatePending(null,null),this.retryCount=0,this.established=!1,this.setSubscriptionState("none")}},{key:"markAsFailed",value:function(e){this.rejectedWithError=e.error,this.updatePending(null,null),this.localObject.reportFailure(new l.SyncError("Failed to subscribe on service events: ".concat(e.error.message),e.error.status,e.error.code))}},{key:"complete",value:function(e){this.updatePending(null,null),this.established=!0,this.localObject._advanceLastEventId(e)}},{key:"setSubscriptionState",value:function(e){this.localObject._setSubscriptionState(e)}},{key:"sid",get:function(){return this.localObject.sid}},{key:"type",get:function(){return this.localObject.type}},{key:"lastEventId",get:function(){return this.localObject.lastEventId}},{key:"indexName",get:function(){return this.localObject.indexName}},{key:"queryString",get:function(){return this.localObject.queryString}},{key:"isEstablished",get:function(){return this.established}}]),e}(),p=function(){function e(t){var n=this;s(this,e),this.isConnected=!1,this.maxBatchSize=100,this.subscriptionTtlTimer=null,this.pendingPokeReason=null,this.services=t,this.subscriptions=new Map,this.persisted=new Map,this.latestPokeResponseArrivalTimestampByCorrelationId=new Map;this.backoff=c.Backoff.exponential(Object.assign({randomisationFactor:.2,initialDelay:100,maxDelay:12e4},this.services.config.backoffConfig)),this.backoff.on("ready",(function(){var e=n.getSubscriptionUpdateBatch(),t=e.action,r=e.subscriptions;t?n.applyNewSubscriptionUpdateBatch(t,r):(n.backoff.reset(),f.default.debug("All subscriptions resolved."))}))}return u(e,[{key:"getSubscriptionUpdateBatch",value:function(){function e(e,t,n,r){var i,s=[],u=a(e);try{for(u.s();!(i=u.n()).done;){var c=o(i.value,2),l=c[0],f=c[1];if(!t.get(l)&&n!==f.pendingAction&&!f.rejectedWithError&&(s.push(f),r&&s.length>=r))break}}catch(h){u.e(h)}finally{u.f()}return s}var t=e(this.subscriptions,this.persisted,"establish",this.maxBatchSize);if(t.length>0)return{action:"establish",subscriptions:t};var n=e(this.persisted,this.subscriptions,"cancel",this.maxBatchSize);return n.length>0?{action:"cancel",subscriptions:n}:{action:null,subscriptions:null}}},{key:"persist",value:function(){this.backoff.backoff()}},{key:"applyNewSubscriptionUpdateBatch",value:function(){var e=i(r.mark((function e(t,n){var i,o,s,u,c,l,d,p,v,y,m,g,b,_,w=this;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.isConnected){e.next=4;break}return f.default.debug("Twilsock connection (required for subscription) not ready; waiting\u2026"),this.backoff.reset(),e.abrupt("return");case 4:n=this.processLocalActions(t,n),i=(new Date).getTime(),o=a(n);try{for(o.s();!(s=o.n()).done;)u=s.value,this.recordActionAttemptOn(u,t,i)}catch(r){o.e(r)}finally{o.f()}return c=this.pendingPokeReason,this.pendingPokeReason=null,e.prev=10,e.next=13,this.request(t,i,c,n);case 13:l=e.sent,d=l.body.max_batch_size,!isNaN(parseInt(d))&&isFinite(d)&&d>0&&(this.maxBatchSize=d),this.subscriptionTtlTimer||(p=l.body.ttl_in_s,v=!isNaN(parseFloat(p))&&isFinite(p),v&&p>0&&(this.subscriptionTtlTimer=setTimeout((function(){return w.onSubscriptionTtlElapsed()}),1e3*p))),"establish"===t&&(y=l.body.estimated_delivery_in_ms,m=!isNaN(parseFloat(y))&&isFinite(y),m&&y>0?setTimeout((function(){return w.verifyPokeDelivery(i,y,n)}),y):f.default.error("Invalid timeout: ".concat(y)),n.filter((function(e){return e.pendingCorrelationId===i}
2)).forEach((function(e){return e.setSubscriptionState("response_in_flight")}))),this.backoff.reset(),e.next=26;break;case 21:e.prev=21,e.t0=e.catch(10),g=a(n);try{for(g.s();!(b=g.n()).done;)_=b.value,this.recordActionFailureOn(_,t)}catch(r){g.e(r)}finally{g.f()}e.t0 instanceof h.TransportUnavailableError?(f.default.debug("Twilsock connection (required for subscription) not ready (c:".concat(i,"); waiting\u2026")),this.backoff.reset()):(f.default.debug("Failed an attempt to ".concat(t," subscriptions (c:").concat(i,"); retrying"),e.t0),this.persist());case 26:case"end":return e.stop()}}),e,this,[[10,21]])})));return function(t,n){return e.apply(this,arguments)}}()},{key:"verifyPokeDelivery",value:function(e,t,n){var r=this,i=this.latestPokeResponseArrivalTimestampByCorrelationId.get(e),o=i?(new Date).getTime()-i:t;o>=t?(n.filter((function(t){return t.pendingCorrelationId===e})).forEach((function(e){e.updatePending(null,null),e.retryCount++,r.persisted.delete(e.sid)})),this.persist(),this.latestPokeResponseArrivalTimestampByCorrelationId.delete(e)):setTimeout((function(){return r.verifyPokeDelivery(e,t,n)}),t-o)}},{key:"processLocalActions",value:function(e,t){return"cancel"===e?t.filter((function(e){return!e.rejectedWithError})):t}},{key:"recordActionAttemptOn",value:function(e,t,n){if(e.setSubscriptionState("request_in_flight"),"establish"===t)this.persisted.set(e.sid,e),e.updatePending(t,n);else{var r=this.persisted.get(e.sid);r&&r.updatePending(t,n)}}},{key:"recordActionFailureOn",value:function(e,t){e.setSubscriptionState("none"),e.updatePending(null,null),"establish"===t&&this.persisted.delete(e.sid)}},{key:"request",value:function(e,t,n,r){var i=r.map((function(t){return{object_sid:t.sid,object_type:t.type,last_event_id:"establish"===e?t.lastEventId:void 0,index_name:"establish"===e?t.indexName:void 0,query_string:"establish"===e?t.queryString:void 0}})),o=r.filter((function(e){return e.retryCount>0})).length;f.default.debug("Attempting '".concat(e,"' request (c:").concat(t,"):"),i);var a={event_protocol_version:3,action:e,correlation_id:t,retried_requests:o,ttl_in_s:-1,requests:i};return"ttl"===n&&(a.reason=n),this.services.network.post(this.services.config.subscriptionsUri,a)}},{key:"add",value:function(e,t){f.default.debug("Establishing intent to subscribe to ".concat(e));var n=this.subscriptions.get(e);n&&t&&n.lastEventId===t.lastEventId||(this.persisted.delete(e),this.subscriptions.set(e,new d(t)),this.persist())}},{key:"remove",value:function(e){f.default.debug("Establishing intent to unsubscribe from ".concat(e)),this.subscriptions.delete(e)&&this.persist()}},{key:"acceptMessage",value:function(e,t){var n;switch(f.default.trace("Subscriptions received",e),e.correlation_id&&this.latestPokeResponseArrivalTimestampByCorrelationId.set(e.correlation_id,(new Date).getTime()),e.event_type){case"subscription_established":this.applySubscriptionEstablishedMessage(e.event,e.correlation_id);break;case"subscription_canceled":this.applySubscriptionCancelledMessage(e.event,e.correlation_id);break;case"subscription_failed":this.applySubscriptionFailedMessage(e.event,e.correlation_id);break;case(n=e.event_type.match(/^(?:map|list|document|stream|live_query)_/)||{}).input:var r;switch(n[0]){case"map_":r=e.event.map_sid;break;case"list_":r=e.event.list_sid;break;case"document_":r=e.event.document_sid;break;case"stream_":r=e.event.stream_sid;break;case"live_query_":r=e.event.query_id,t=!1,!0===e.strictly_ordered&&(t=!0);break;default:r=void 0}this.applyEventToSubscribedEntity(r,e,t);break;default:f.default.debug("Dropping unknown message type ".concat(e.event_type))}}},{key:"applySubscriptionEstablishedMessage",value:function(e,t){var n=e.object_sid,r=this.persisted.get(e.object_sid);r&&r.pendingCorrelationId===t?"interrupted"===e.replay_status?(f.default.debug("Event Replay for subscription to ".concat(n," (c:").concat(t,") interrupted; continuing eagerly.")),r.updatePending(null,null),this.persisted.delete(r.sid),this.backoff.reset()):"completed"===e.replay_status&&(f.default.debug("Event Replay for subscription to ".concat(n," (c:").concat(t,") completed. Subscription is ready.")),r.complete(e.last_event_id),this.persisted.set(e.object_sid,r),r.setSubscriptionState("established"),this.backoff.reset()):f.default.debug("Late message for ".concat(e.object_sid," (c:").concat(t,") dropped.")),this.persist()}},{key:"applySubscriptionCancelledMessage",value:function(e,t){var n=this.persisted.get(e.object_sid);n&&n.pendingCorrelationId===t?(n.updatePending(null,null),n.setSubscriptionState("none"),this.persisted.delete(e.object_sid)):f.default.debug("Late message for ".concat(e.object_sid," (c:").concat(t,") dropped.")),this.persist()}},{key:"applySubscriptionFailedMessage",value:function(e,t){var n=e.object_sid,r=this.subscriptions.get(n),i=this.persisted.get(n);r&&i?i.pendingCorrelationId===t&&(f.default.error("Failed to subscribe on ".concat(i.sid),e.error),i.markAsFailed(e),i.setSubscriptionState("none")):!r&&i&&(this.persisted.delete(n),i.setSubscriptionState("none")),this.persist()}},{key:"applyEventToSubscribedEntity",value:function(e,t,n){var r=this;if(e){n=n||function(){var t=r.persisted.get(e);return t&&t.isEstablished}();var i=this.subscriptions.get(e);i?(t.event.type=t.event_type,i.update(t.event,n)):f.default.debug("Message dropped for SID '".concat(e,"', for which there is no subscription."))}}},{key:"onConnectionStateChanged",value:function(e){this.isConnected=e,e&&this.poke("reconnect")}},{key:"onSubscriptionTtlElapsed",value:function(){this.isConnected&&this.poke("ttl")}},{key:"poke",value:function(e){f.default.debug("Triggering event replay for all subscriptions, reason=".concat(e)),this.pendingPokeReason=e,this.subscriptionTtlTimer&&(clearTimeout(this.subscriptionTtlTimer),this.subscriptionTtlTimer=null);var t,n=[],r=a(this.persisted.values());try{for(r.s();!(t=r.n()).done;){var i=t.value;i.reset(),i.rejectedWithError&&n.push(i)}}catch(c){r.e(c)}finally{r.f()}this.persisted.clear();for(var o=0,s=n;o<s.length;o++){var u=s[o];this.persisted.set(u.sid,u)}this.persist()}},{key:"shutdown",value:function(){this.backoff.reset(),this.subscriptions.clear()}}]),e}();t.Subscriptions=p},function(e,t,n){"use strict";var r=n(9),i=n(17);
2Object.defineProperty(t,"__esModule",{value:!0}),t.Router=void 0;var o=n(75),a="com.twilio.rtd.cds.document",s="com.twilio.rtd.cds.list",u="com.twilio.rtd.cds.map",c="twilio.sync.event",l=function(){function e(t){var n=this;r(this,e),this.config=t.config,this.subscriptions=t.subscriptions,this.notifications=t.notifications,this.notifications.subscribe(c),this.notifications.subscribe(a),this.notifications.subscribe(s),this.notifications.subscribe(u),this.notifications.on("message",(function(e,t){return n.onMessage(e,t)})),this.notifications.on("transportReady",(function(e){return n.onConnectionStateChanged(e)}))}return i(e,[{key:"onMessage",value:function(e,t){switch(o.default.trace("Notification type:",e,"content:",t),e){case a:case s:case u:this.subscriptions.acceptMessage(t,!1);break;case c:this.subscriptions.acceptMessage(t,!0)}}},{key:"subscribe",value:function(e,t){this.subscriptions.add(e,t)}},{key:"unsubscribe",value:function(e){this.subscriptions.remove(e)}},{key:"onConnectionStateChanged",value:function(e){this.subscriptions.onConnectionStateChanged(e)}}]),e}();t.Router=l,t.default=l},function(e,t,n){"use strict";var r=n(9),i=n(17);Object.defineProperty(t,"__esModule",{value:!0}),t.NetworkService=void 0;var o=n(277),a=n(74),s=n(75),u=n(93),c=n(107);function l(e){if(e.body&&e.body.message)return e.body.message;switch(e.status){case 429:return"Throttled by server";case 404:return"Not found from server";default:return"Error from server"}}function f(e){return e.body?e.body.code:0}function h(e){return 409===e.status?new a.SyncNetworkError(l(e),e.status,f(e),e.body):e.status?new a.SyncError(l(e),e.status,f(e)):e instanceof c.TransportUnavailableError?e:new a.SyncError(e.message,0,0)}var d=function(){function e(t,n,i){r(this,e),this.clientInfo=t,this.config=n,this.transport=i}return i(e,[{key:"createHeaders",value:function(){return{"Content-Type":"application/json","Twilio-Sync-Client-Info":JSON.stringify(this.clientInfo),"Twilio-Request-Id":"RQ"+o.v4().replace(/-/g,"")}}},{key:"backoffConfig",value:function(){return Object.assign({min:4e3,max:6e4,maxAttemptsTime:9e4,randomness:.2},this.config.backoffConfig)}},{key:"executeWithRetry",value:function(e){var t=this,n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return new Promise((function(r,i){var o=[502,503,504];n&&o.push(429);var a=new u.Retrier(t.backoffConfig());a.on("attempt",(function(){e().then((function(e){return a.succeeded(e)})).catch((function(e){if(o.includes(e.status)){var t=parseInt(e.headers?e.headers["Retry-After"]:null);a.failed(h(e),isNaN(t)?null:1e3*t)}else"Twilsock disconnected"===e.message?a.failed(h(e)):(a.removeAllListeners(),a.cancel(),i(h(e)))}))})),a.on("succeeded",(function(e){r(e)})),a.on("cancelled",(function(e){return i(h(e))})),a.on("failed",(function(e){return i(h(e))})),a.start()}))}},{key:"get",value:function(e){var t=this,n=this.createHeaders();return s.default.debug("GET",e,"ID:",n["Twilio-Request-Id"]),this.executeWithRetry((function(){return t.transport.get(e,n)}),!0)}},{key:"post",value:function(e,t,n){var r=this,i=arguments.length>3&&void 0!==arguments[3]&&arguments[3],o=this.createHeaders();return"undefined"!==typeof n&&null!==n&&(o["If-Match"]=n),s.default.debug("POST",e,"ID:",o["Twilio-Request-Id"]),this.executeWithRetry((function(){return r.transport.post(e,o,t)}),i)}},{key:"put",value:function(e,t,n){var r=this,i=this.createHeaders();return"undefined"!==typeof n&&null!==n&&(i["If-Match"]=n),s.default.debug("PUT",e,"ID:",i["Twilio-Request-Id"]),this.executeWithRetry((function(){return r.transport.put(e,i,t)}),!1)}},{key:"delete",value:function(e){var t=this,n=this.createHeaders();return s.default.debug("DELETE",e,"ID:",n["Twilio-Request-Id"]),this.executeWithRetry((function(){return t.transport.delete(e,n)}),!1)}}]),e}();t.NetworkService=d},function(e,t,n){var r,i,o=n(278),a=n(279),s=0,u=0;e.exports=function(e,t,n){var c=t&&n||0,l=t||[],f=(e=e||{}).node||r,h=void 0!==e.clockseq?e.clockseq:i;if(null==f||null==h){var d=o();null==f&&(f=r=[1|d[0],d[1],d[2],d[3],d[4],d[5]]),null==h&&(h=i=16383&(d[6]<<8|d[7]))}var p=void 0!==e.msecs?e.msecs:(new Date).getTime(),v=void 0!==e.nsecs?e.nsecs:u+1,y=p-s+(v-u)/1e4;if(y<0&&void 0===e.clockseq&&(h=h+1&16383),(y<0||p>s)&&void 0===e.nsecs&&(v=0),v>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");s=p,u=v,i=h;var m=(1e4*(268435455&(p+=122192928e5))+v)%4294967296;l[c++]=m>>>24&255,l[c++]=m>>>16&255,l[c++]=m>>>8&255,l[c++]=255&m;var g=p/4294967296*1e4&268435455;l[c++]=g>>>8&255,l[c++]=255&g,l[c++]=g>>>24&15|16,l[c++]=g>>>16&255,l[c++]=h>>>8|128,l[c++]=255&h;for(var b=0;b<6;++b)l[c+b]=f[b];return t||a(l)}},function(e,t,n){var r=n(278),i=n(279);e.exports=function(e,t,n){var o=t&&n||0;"string"==typeof e&&(t="binary"===e?new Array(16):null,e=null);var a=(e=e||{}).random||(e.rng||r)();if(a[6]=15&a[6]|64,a[8]=63&a[8]|128,t)for(var s=0;s<16;++s)t[o+s]=a[s];return t||i(a)}},function(e,t,n){"use strict";var r=n(6),i=n(123),o=n(9),a=n(17);
2Object.defineProperty(t,"__esModule",{value:!0}),t.TreeMap=void 0;var s=function(){function e(t,n){o(this,e),this.balanceFactor=0,this.key=t,this.value=n,this.parent=null,this.left=null,this.right=null}return a(e,[{key:"update",value:function(e){this.value=e}},{key:"replace",value:function(e,t){e&&(this.left===t?this.left=t:this.right===t&&(this.right=t))}},{key:"isRoot",get:function(){return null===this.parent}},{key:"isLeaf",get:function(){return null===this.left&&null===this.right}},{key:"isLeftChild",get:function(){return this.parent.left===this}}]),e}(),u=function(){function e(t,n){o(this,e),this.isLessThan=t||function(e,t){return e<t},this.isEqual=n||function(e,t){return e===t},this.root=null,this.count=null}return a(e,[{key:"clear",value:function(){this.root=null,this.count=0}},{key:"set",value:function(e,t){var n=this.getNode(e);n?n.update(t):this.insert(e,t)}},{key:"insert",value:function(e,t){var n=new s(e,t);if(this.count++,this.root){for(var r=this.root;;)if(this.isLessThan(e,r.key)){if(!r.left){r.left=n;break}r=r.left}else{if(!r.right){r.right=n;break}r=r.right}for(n.parent=r,r=n;r.parent;){var i=r.parent,o=i.balanceFactor;if(r.isLeftChild?i.balanceFactor++:i.balanceFactor--,Math.abs(i.balanceFactor)<Math.abs(o))break;if(i.balanceFactor<-1||i.balanceFactor>1){this.rebalance(i);break}r=i}}else this.root=n}},{key:"get",value:function(e){for(var t=this.root;t;){if(this.isEqual(e,t.key))return t.value;t=this.isLessThan(e,t.key)?t.left:t.right}return null}},{key:"delete",value:function(e){var t=this.getNode(e);if(!t||t.key!==e)return null;var n=t.parent,r=t.left,i=t.right;if(!!r!==!!i){var o=r||i;n||o?n&&!o?this.root=o:(n.replace(t,null),this.rebalance(n)):this.root=null}else{for(var a=t.left;a.right;)a=a.right;if(t.left===a)t.isRoot?(this.root=a,a.parent=null):(t.isLeftChild?t.parent.left=a:t.parent.right=a,a.parent=t.parent),a.right=t.right,a.right.parent=a,a.balanceFactor=t.balanceFactor,t={parent:a,isLeftChild:!0};else{var s=a.parent,u=a.left;s.right=u,u&&(u.parent=s),t.isRoot?(this.root=a,a.parent=null):(t.isLeftChild?t.parent.left=a:t.parent.right=a,a.parent=t.parent),a.right=t.right,a.right.parent=a,a.left=t.left,a.left.parent=a,a.balanceFactor=t.balanceFactor,t={parent:s,isLeftChild:!1}}}for(this.count--;t.parent;){var c=t.parent,l=c.balanceFactor;if(t.isLeftChild?c.balanceFactor-=1:c.balanceFactor+=1,Math.abs(c.balanceFactor)>Math.abs(l)){if(!(c.balanceFactor<-1||c.balanceFactor>1))break;if(this.rebalance(c),0!==c.parent.balanceFactor)break;t=c.parent}else t=c}return null}},{key:"getNode",value:function(e){for(var t=this.root;t;){if(this.isEqual(e,t.key))return t;t=this.isLessThan(e,t.key)?t.left:t.right}return null}},{key:"rebalance",value:function(e){e.balanceFactor<0?e.right.balanceFactor>0?(this.rotateRight(e.right),this.rotateLeft(e)):this.rotateLeft(e):e.balanceFactor>0&&(e.left.balanceFactor<0?(this.rotateLeft(e.left),this.rotateRight(e)):this.rotateRight(e))}},{key:"rotateLeft",value:function(e){var t=e.right;e.right=t.left,null!==t.left&&(t.left.parent=e),t.parent=e.parent,null===t.parent?this.root=t:e.isLeftChild?t.parent.left=t:t.parent.right=t,t.left=e,e.parent=t,e.balanceFactor=e.balanceFactor+1-Math.min(t.balanceFactor,0),t.balanceFactor=t.balanceFactor+1-Math.max(e.balanceFactor,0)}},{key:"rotateRight",value:function(e){var t=e.left;e.left=t.right,null!==t.right&&(t.right.parent=e),t.parent=e.parent,null===t.parent?this.root=t:e.isLeftChild?t.parent.left=t:t.parent.right=t,t.right=e,e.parent=t,e.balanceFactor=e.balanceFactor-1-Math.min(t.balanceFactor,0),t.balanceFactor=t.balanceFactor-1-Math.max(e.balanceFactor,0)}},{key:Symbol.iterator,value:r.mark((function e(){var t,n,o;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t=i(this.getIterator()),e.prev=1,t.s();case 3:if((n=t.n()).done){e.next=9;break}return o=n.value,e.next=7,o;case 7:e.next=3;break;case 9:e.next=14;break;case 11:e.prev=11,e.t0=e.catch(1),t.e(e.t0);case 14:return e.prev=14,t.f(),e.finish(14);case 17:case"end":return e.stop()}}),e,this,[[1,11,14,17]])}))},{key:"getIterator",value:r.mark((function e(){var t,n,i,o=arguments;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t=o.length>0&&void 0!==o[0]?o[0]:null,n=this.root;case 2:if(!n){e.next=8;break}if(!this.isEqual(t,n.key)&&(null!==t||n.left)){e.next=5;break}return e.abrupt("break",8);
2case 5:n=this.isLessThan(t,n.key)||null===t?n.left:n.right,e.next=2;break;case 8:if(n){e.next=10;break}return e.abrupt("return",null);case 10:i=!0;case 11:if(!i){e.next=29;break}return e.next=14,[n.key,n.value];case 14:if(i=!1,!n.right){e.next=21;break}for(n=n.right;n.left;)n=n.left;i=!0,e.next=27;break;case 21:if(!n.parent){e.next=26;break}i=n.parent.left===n,n=n.parent,e.next=27;break;case 26:return e.abrupt("break",37);case 27:e.next=35;break;case 29:if(!n.parent){e.next=34;break}i=n.parent.left===n,n=n.parent,e.next=35;break;case 34:return e.abrupt("break",37);case 35:e.next=11;break;case 37:return e.abrupt("return",null);case 38:case"end":return e.stop()}}),e,this)}))},{key:"getReverseIterator",value:r.mark((function e(){var t,n,i,o=arguments;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t=o.length>0&&void 0!==o[0]?o[0]:null,n=this.root;case 2:if(!n){e.next=8;break}if(!this.isEqual(t,n.key)&&(null!==t||n.right)){e.next=5;break}return e.abrupt("break",8);case 5:n=this.isLessThan(t,n.key)&&null!==t?n.left:n.right,e.next=2;break;case 8:if(n){e.next=10;break}return e.abrupt("return",null);case 10:i=!0;case 11:if(!i){e.next=29;break}return e.next=14,[n.key,n.value];case 14:if(i=!1,!n.left){e.next=21;break}for(n=n.left;n.right;)n=n.right;i=!0,e.next=27;break;case 21:if(!n.parent){e.next=26;break}i=n.parent.right===n,n=n.parent,e.next=27;break;case 26:return e.abrupt("break",37);case 27:e.next=35;break;case 29:if(!n.parent){e.next=34;break}i=n.parent.right===n,n=n.parent,e.next=35;break;case 34:return e.abrupt("break",37);case 35:e.next=11;break;case 37:return e.abrupt("return",null);case 38:case"end":return e.stop()}}),e,this)}))},{key:"size",get:function(){return this.count}}]),e}();t.TreeMap=u},function(e,t,n){"use strict";var r=n(9);Object.defineProperty(t,"__esModule",{value:!0}),t.ClientInfo=void 0;var i=n(165),o=function e(t){r(this,e),this.sdk="js",this.sdkVer=t,this.os=i.os.family,this.osVer=i.os.version,this.pl=i.name,this.plVer=i.version};t.ClientInfo=o,t.default=o},function(e,t,n){"use strict";var r=n(9),i=n(17);Object.defineProperty(t,"__esModule",{value:!0}),t.EntitiesCache=void 0;var o=function(){function e(){r(this,e),this.names=new Map,this.entities=new Map}return i(e,[{key:"store",value:function(e){var t=this.entities.get(e.sid);return t||(this.entities.set(e.sid,e),e.uniqueName&&this.names.set(e.type+"::"+e.uniqueName,e.sid),e)}},{key:"getResolved",value:function(e,t){var n=this.names.get(t+"::"+e);return n?this.entities.get(n):null}},{key:"get",value:function(e,t){return this.entities.get(e)||this.getResolved(e,t)||null}},{key:"remove",value:function(e){var t=this.entities.get(e);t&&(this.entities.delete(e),t.uniqueName&&this.names.delete(t.type+"::"+t.uniqueName))}}]),e}();t.EntitiesCache=o},function(e,t,n){"use strict";var r=n(9),i=n(17);Object.defineProperty(t,"__esModule",{value:!0}),t.SessionStorage=void 0;var o=function(){function e(t,n){r(this,e),this.config=t,this.storageId=null;try{this.storage=n||sessionStorage}catch(i){}}return i(e,[{key:"storageKey",value:function(e,t){return"".concat(this.storageId,"::").concat(e,"::").concat(t)}},{key:"updateStorageId",value:function(e){this.storageId=e}},{key:"store",value:function(e,t,n){return this.isReady?this._store(this.storageKey(e,t),n):null}},{key:"read",value:function(e,t){return this.isReady?this._read(this.storageKey(e,t)):null}},{key:"remove",value:function(e,t,n){if(!this.isReady)return null;try{this.storage.removeItem(this.storageKey(e,t)),n&&this.storage.removeItem(this.storageKey(e,n))}catch(r){}}},{key:"update",value:function(e,t,n,r){if(!this.isReady)return null;this._apply(this.storageKey(e,t),r),n&&this._apply(this.storageKey(e,n),r)}},{key:"_store",value:function(e,t){try{this.storage.setItem(e,JSON.stringify(t))}catch(n){}}},{key:"_read",value:function(e){try{var t=this.storage.getItem(e);if(t)return JSON.parse(t)}catch(n){}return null}},{key:"_apply",value:function(e,t){var n=this._read(e);if(!n)return!1;this._store(e,Object.assign(n,t))}},{key:"isReady",get:function(){return this.config.sessionStorageEnabled&&!!this.storageId}}]),e}();t.SessionStorage=o},function(e,t,n){"use strict";var r=n(83),i=n(94),o=n(66),a=n(6),s=n(27),u=n(9),c=n(17),l=n(20),f=n(21);
2Object.defineProperty(t,"__esModule",{value:!0}),t.SyncStreamImpl=t.SyncStream=void 0;var h=n(109),d=n(108),p=n(110),v=function(e){l(n,e);var t=f(n);function n(e,r,i){var o;return u(this,n),(o=t.call(this,e,i)).descriptor=r,o}return c(n,[{key:"publishMessage",value:function(){var e=s(a.mark((function e(t){var n,r,i,o;return a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n={data:t},e.next=3,this.services.network.post(this.links.messages,n);case 3:return r=e.sent,i=r.body,o=this._handleMessagePublished(i.sid,t,!1),e.abrupt("return",o);case 7:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"setTtl",value:function(){var e=s(a.mark((function e(t){var n,r;return a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return d.validateMandatoryTtl(t),e.prev=1,n={ttl:t},e.next=5,this.services.network.post(this.uri,n);case 5:r=e.sent,this.descriptor.date_expires=r.body.date_expires,e.next=13;break;case 9:throw e.prev=9,e.t0=e.catch(1),404===e.t0.status&&this.onRemoved(!1),e.t0;case 13:case"end":return e.stop()}}),e,this,[[1,9]])})));return function(t){return e.apply(this,arguments)}}()},{key:"removeStream",value:function(){var e=s(a.mark((function e(){return a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.services.network.delete(this.uri);case 2:this.onRemoved(!0);case 3:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"_update",value:function(e){switch(e.type){case"stream_message_published":this._handleMessagePublished(e.message_sid,e.message_data,!0);break;case"stream_removed":this.onRemoved(!1)}}},{key:"_handleMessagePublished",value:function(e,t,n){var r={sid:e,value:t};return this.broadcastEventToListeners("messagePublished",{message:r,isLocal:!n}),r}},{key:"onRemoved",value:function(e){this._unsubscribe(),this.removalHandler(this.type,this.sid,this.uniqueName),this.broadcastEventToListeners("removed",{isLocal:e})}},{key:"uri",get:function(){return this.descriptor.url}},{key:"links",get:function(){return this.descriptor.links}},{key:"dateExpires",get:function(){return this.descriptor.date_expires}},{key:"type",get:function(){return"stream"}},{key:"lastEventId",get:function(){return null}},{key:"indexName",get:function(){}},{key:"queryString",get:function(){}},{key:"sid",get:function(){return this.descriptor.sid}},{key:"uniqueName",get:function(){return this.descriptor.unique_name||null}}],[{key:"type",get:function(){return"stream"}}]),n}(h.SyncEntity);t.SyncStreamImpl=v;var y=function(e){l(n,e);var t=f(n);function n(e){var i;return u(this,n),(i=t.call(this)).syncStreamImpl=e,i.syncStreamImpl.attach(r(i)),i}return c(n,[{key:"publishMessage",value:function(){var e=s(a.mark((function e(t){return a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this.ensureNotClosed(),e.abrupt("return",this.syncStreamImpl.publishMessage(t));case 2:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"setTtl",value:function(){var e=s(a.mark((function e(t){return a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this.ensureNotClosed(),e.abrupt("return",this.syncStreamImpl.setTtl(t));case 2:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"removeStream",value:function(){var e=s(a.mark((function e(){return a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this.ensureNotClosed(),e.abrupt("return",this.syncStreamImpl.removeStream());case 2:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"close",value:function(){i(o(n.prototype),"close",this).call(this),this.syncStreamImpl.detach(this.listenerUuid)}},{key:"uri",get:function(){return this.syncStreamImpl.uri}},{key:"links",get:function(){return this.syncStreamImpl.links}},{key:"dateExpires",get:function(){return this.syncStreamImpl.dateExpires}},{key:"type",get:function(){return v.type}},{key:"lastEventId",get:function(){return null}},{key:"sid",get:function(){return this.syncStreamImpl.sid}},{key:"uniqueName",get:function(){return this.syncStreamImpl.uniqueName}}],[{key:"type",get:function(){return v.type}}]),n}(p.default);t.SyncStream=y,t.default=y},function(e){e.exports=JSON.parse('{"_args":[["[email protected]","C:\\\\Users\\\\DJ 2020\\\\Downloads\\\\diageo-video-call-master\\\\diageo-video-call-master"]],"_from":"[email protected]","_id":"[email protected]","_inBundle":false,"_integrity":"sha512-9kJFRXIE0kAykB6Gerxf2+hMSIrTFPenlWDo05WYU1zjz0npg
262zrmrq1s/7Zff1IKe1M24b6tmU0j9h/0uvdg==","_location":"/twilio-sync","_phantomChildren":{},"_requested":{"type":"version","registry":true,"raw":"[email protected]","name":"twilio-sync","escapedName":"twilio-sync","rawSpec":"0.12.4","saveSpec":null,"fetchSpec":"0.12.4"},"_requiredBy":["/twilio-chat"],"_resolved":"https://registry.npmjs.org/twilio-sync/-/twilio-sync-0.12.4.tgz","_spec":"0.12.4","_where":"C:\\\\Users\\\\DJ 2020\\\\Downloads\\\\diageo-video-call-master\\\\diageo-video-call-master","author":{"name":"Twilio"},"browserify":{"transform":["babelify"]},"dependencies":{"loglevel":"^1.6.3","operation-retrier":"^3.0.0","platform":"^1.3.5","twilio-notifications":"^0.5.11","twilsock":"^0.5.14","uuid":"^3.3.2"},"description":"Twilio Sync client library","devDependencies":{"@types/chai":"^4.1.7","@types/chai-as-promised":"7.1.0","@types/chai-string":"^1.4.1","@types/mocha":"^5.2.7","@types/node":"^12.0.4","@types/sinon":"^7.0.12","@types/sinon-chai":"^3.2.2","async-test-tools":"^1.0.7","babel-core":"^6.26.0","babel-plugin-transform-builtin-extend":"^1.1.2","babel-plugin-transform-runtime":"^6.23.0","babel-preset-env":"^1.6.1","babel-runtime":"^6.26.0","babelify":"^8.0.0","browserify":"^16.2.3","chai":"^4.2.0","chai-as-promised":"^7.1.1","chai-string":"^1.5.0","cheerio":"^1.0.0-rc.2","cross-env":"^5.2.0","del":"^4.1.1","fancy-log":"^1.3.3","fs":"0.0.2","gulp":"^4.0.2","gulp-babel":"^7.0.1","gulp-derequire":"^2.1.0","gulp-if":"^2.0.2","gulp-insert":"^0.5.0","gulp-rename":"^1.4.0","gulp-sourcemaps":"^2.6.5","gulp-tap":"^1.0.1","gulp-tslint":"^8.1.4","gulp-typescript":"^5.0.1","gulp-uglify-es":"^1.0.4","ink-docstrap":"^1.3.2","jsdoc":"~3.5.5","jsonwebtoken":"^8.5.1","karma":"^4.1.0","karma-browserify":"^6.0.0","karma-browserstack-launcher":"^1.5.1","karma-mocha":"^1.3.0","karma-mocha-reporter":"^2.2.5","mocha":"^6.1.4","nyc":"^14.1.1","path":"^0.12.7","sinon":"^7.3.2","sinon-chai":"^3.3.0","source-map-explorer":"^1.8.0","ts-node":"^8.2.0","tslint":"^5.17.0","twilio":"^3.31.1","typescript":"^3.5.1","uglify-es":"^3.3.10","uglify-save-license":"^0.4.1","underscore":"^1.9.1","vinyl-buffer":"^1.0.1","vinyl-source-stream":"^2.0.0","watchify":"^3.11.1"},"engines":{"node":">=8"},"license":"MIT","main":"lib/index.js","name":"twilio-sync","types":"./lib/index.d.ts","version":"0.12.4"}')},function(e,t,n){"use strict";var r=n(588);e.exports=r},function(e,t,n){"use strict";var r=n(6),i=n(27),o=n(9),a=n(17);Object.defineProperty(t,"__esModule",{value:!0});var s=n(287),u=n(288),c=n(589);t.Media=c.Media,t.McsMedia=c.Media;var l=n(590),f=n(593),h=s.Logger.scope(""),d=n(594).version,p="A valid Twilio token should be provided",v=function(){function e(t,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(o(this,e),this.options=r,this.options.logLevel=this.options.logLevel||"silent",this.config=new u.Configuration(t,n,this.options),!t)throw new Error(p);h.setLevel(this.options.logLevel),this.options.transport=this.options.transport||new l.Transport,this.transport=this.options.transport,this.network=new f.Network(this.config,this.transport)}return a(e,[{key:"updateToken",value:function(e){if(h.info("updateToken"),!e)throw new Error(p);this.config.updateToken(e)}},{key:"get",value:function(){var e=i(r.mark((function e(t){var n;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.network.get("".concat(this.config.baseUrl,"/").concat(t));case 2:return n=e.sent,e.abrupt("return",new c.Media(this.config,this.network,n.body));case 4:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"post",value:function(){var e=i(r.mark((function e(t,n){var i;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.network.post(this.config.baseUrl,n,t);case 2:return i=e.sent,e.abrupt("return",new c.Media(this.config,this.network,i.body));case 4:case"end":return e.stop()}}),e,this)})));return function(t,n){return e.apply(this,arguments)}}()},{key:"postFormData",value:function(){var e=i(r.mark((function e(t){var n;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.network.post(this.config.baseUrl,t);case 2:return n=e.sent,e.abrupt("return",new c.Media(this.config,this.network,n.body));case 4:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()}]),e}();t.Client=v,t.McsClient=v,v.version=d,t.default=v},function(e,t,n){"use strict";var r=n(6),i=n(27),o=n(9),a=n(17);
2Object.defineProperty(t,"__esModule",{value:!0});var s=function(){function e(t,n,r){o(this,e),this.config=t,this.network=n,this._update(r)}return a(e,[{key:"getContentUrl",value:function(){var e=i(r.mark((function e(){var t;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.network.get("".concat(this.config.baseUrl,"/").concat(this.sid));case 2:return t=e.sent,this._update(t.body),e.abrupt("return",Promise.resolve(this.state.contentDirectUrl));case 5:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"_update",value:function(e){this.state={sid:e.sid,serviceSid:e.service_sid,channelSid:e.channel_sid,messageSid:e.message_sid,dateCreated:e.date_created?new Date(e.date_created):null,dateUpdated:e.date_updated?new Date(e.date_updated):null,size:e.size,contentType:e.content_type,url:e.url,contentUrl:e.links.content,contentDirectUrl:e.links.content_direct_temporary,filename:e.filename?e.filename:null}}},{key:"sid",get:function(){return this.state.sid}},{key:"serviceSid",get:function(){return this.state.serviceSid}},{key:"dateCreated",get:function(){return this.state.dateCreated}},{key:"dateUpdated",get:function(){return this.state.dateUpdated}},{key:"contentType",get:function(){return this.state.contentType}},{key:"size",get:function(){return this.state.size}},{key:"fileName",get:function(){return this.state.filename}}]),e}();t.Media=s},function(e,t,n){"use strict";(function(e){var r=n(9),i=n(17);Object.defineProperty(t,"__esModule",{value:!0});var o=n(591),a=e.XMLHttpRequest||n(592).XMLHttpRequest;var s=function(){function e(){r(this,e)}return i(e,[{key:"get",value:function(t,n){return e.request("GET",t,n)}},{key:"post",value:function(t,n,r){return e.request("POST",t,n,r)}}],[{key:"request",value:function(e,t,n,r){return new Promise((function(i,s){var u=new a;for(var c in u.open(e,t,!0),u.onreadystatechange=function(){if(4===u.readyState){var e,t=(e=u.getAllResponseHeaders())?e.split("\r\n").map((function(e){return e.split(": ")})).filter((function(e){return 2===e.length&&e[1].length>0})).reduce((function(e,t){return e[t[0]]=t[1],e}),{}):{},n=function(e){var t=e.getResponseHeader("Content-Type");if(!t||0!==t.indexOf("application/json")||0===e.responseText.length)return e.responseText;try{return JSON.parse(e.responseText)}catch(n){return e.responseText}}(u);if(200<=u.status&&u.status<300)i({status:u.status,headers:t,body:n});else{var r,a=u.statusText&&u.statusText.code?u.statusText.code:"NONE";r="string"===typeof n?n&&1===n.split("\n",2).length?n:"":JSON.stringify(n);var c="".concat(u.status,": [").concat(a,"] ").concat(r);s(new o.TransportError(c,u.status,n,a,t))}}},n)u.setRequestHeader(c,n[c]),"Content-Type"===c&&"application/json"===n[c]&&(r=JSON.stringify(r));u.send(r)}))}}]),e}();t.Transport=s}).call(this,n(44))},function(e,t,n){"use strict";var r=n(9),i=n(20),o=n(21),a=n(164);Object.defineProperty(t,"__esModule",{value:!0});var s=function(e){i(n,e);var t=o(n);function n(e,i,o,a,s){var u;return r(this,n),(u=t.call(this,e)).code=i,u.body=o,u.status=a,u.headers=s,u}return n}(a(Error));t.TransportError=s},,function(e,t,n){"use strict";var r=n(6),i=n(27),o=n(9),a=n(17);Object.defineProperty(t,"__esModule",{value:!0});var s=n(93),u=n(287),c=n(288),l=u.Logger.scope("Network"),f=function(){function e(t,n){o(this,e),this.config=t,this.transport=n}return a(e,[{key:"backoffConfig",value:function(){return Object.assign(c.Configuration.backoffConfigDefault,this.config.backoffConfigOverride)}},{key:"retryWhenThrottled",value:function(){return"undefined"!==typeof this.config.retryWhenThrottledOverride?this.config.retryWhenThrottledOverride:"undefined"!==typeof c.Configuration.retryWhenThrottledDefault&&c.Configuration.retryWhenThrottledDefault}},{key:"executeWithRetry",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return new Promise((function(r,i){var o=[502,503,504];n&&o.push(429);var a=new s.Retrier(t.backoffConfig());a.on("attempt",(function(){e().then((function(e){return a.succeeded(e)})).catch((function(e){o.indexOf(e.status)>-1||"Twilsock disconnected"===e.message?a.failed(e):(a.removeAllListeners(),a.cancel(),i(e))}))})),a.on("succeeded",(function(e){r(e)})),a.on("cancelled",(function(e){return i(e)})),a.on("failed",(function(e){return i(e)})),a.start()}))}},{key:"get",value:function(){var e=i(r.mark((function e(t){var n,i,o=this;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n={"X-Twilio-Token":this.config.token},l.trace("sending GET request to ",t," headers ",n),e.next=4,this.executeWithRetry((function(){return o.transport.get(t,n)}),this.retryWhenThrottled());case 4:return i=e.sent,l.trace("response",i),e.abrupt("return",i);case 7:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"post",value:function(){var e=i(r.mark((function e(t,n,i){var o,a;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return o={"X-Twilio-Token":this.config.token},"undefined"!==typeof FormData&&n instanceof FormData||!i||Object.assign(o,{"Content-Type":i}),l.trace("sending POST request to ",t," headers ",o),e.prev=3,e.next=6,this.transport.post(t,o,n);case 6:a=e.sent,e.next=17;break;case 9:if(e.prev=9,e.t0=e.catch(3),!(e.t0 instanceof TypeError)){e.next=16;break}throw l.trace("got error in post response",e.t0),new TypeError("Posting FormData supported only with browser engine's FormData");case 16:throw e.t0;case 17:return l.trace("response",a),e.abrupt("return",a);case 19:case"end":return e.stop()}}),e,this,[[3,9]])})));return function(t,n,r){return e.apply(this,arguments)}}()}]),e}();t.Network=f}
2,function(e){e.exports=JSON.parse('{"_args":[["[email protected]","C:\\\\Users\\\\DJ 2020\\\\Downloads\\\\diageo-video-call-master\\\\diageo-video-call-master"]],"_from":"[email protected]","_id":"[email protected]","_inBundle":false,"_integrity":"sha512-lNnVITgLg14HBG2oshnwjAeyBxhuqJeAIQE/KUDCGLHwtA6moE49SE1RRtUr5hhziyDSCTjm5X8YeP0m/lL7QA==","_location":"/twilio-mcs-client","_phantomChildren":{},"_requested":{"type":"version","registry":true,"raw":"[email protected]","name":"twilio-mcs-client","escapedName":"twilio-mcs-client","rawSpec":"0.3.3","saveSpec":null,"fetchSpec":"0.3.3"},"_requiredBy":["/twilio-chat"],"_resolved":"https://registry.npmjs.org/twilio-mcs-client/-/twilio-mcs-client-0.3.3.tgz","_spec":"0.3.3","_where":"C:\\\\Users\\\\DJ 2020\\\\Downloads\\\\diageo-video-call-master\\\\diageo-video-call-master","author":{"name":"Twilio"},"browser":{"xmlhttprequest":false},"browserify":{"transform":["babelify"]},"dependencies":{"loglevel":"^1.6.4","operation-retrier":"^3.0.1","xmlhttprequest":"^1.8.0"},"description":"Twilio Media Content Service client library","devDependencies":{"@types/chai":"^4.2.2","@types/chai-as-promised":"^7.1.2","@types/chai-datetime":"0.0.33","@types/chai-string":"^1.4.2","@types/core-js":"^2.5.2","@types/mocha":"^5.2.7","@types/node":"^12.7.4","@types/sinon":"^7.0.13","@types/sinon-chai":"^3.2.3","async":"^3.1.0","async-test-tools":"^1.0.7","babel-core":"^6.26.0","babel-plugin-transform-builtin-extend":"^1.1.2","babel-plugin-transform-runtime":"^6.23.0","babel-preset-env":"^1.6.1","babel-runtime":"^6.26.0","babelify":"^8.0.0","browserify":"^16.0.0","chai":"^4.2.0","chai-as-promised":"^7.1.1","chai-datetime":"^1.5.0","chai-string":"^1.5.0","cheerio":"^1.0.0-rc.2","cross-env":"^5.2.1","del":"^5.1.0","dotenv":"^8.1.0","express":"^4.17.1","gulp":"^4.0.2","gulp-babel":"^7.0.1","gulp-derequire":"^2.1.0","gulp-if":"^3.0.0","gulp-insert":"^0.5.0","gulp-mocha":"^7.0.1","gulp-rename":"^1.4.0","gulp-sourcemaps":"^2.6.5","gulp-tap":"^2.0.0","gulp-tslint":"^8.1.4","gulp-typescript":"^5.0.1","gulp-uglify-es":"^1.0.0","ink-docstrap":"^1.3.2","isomorphic-form-data":"^2.0.0","jsdoc":"~3.5.5","jsdoc-strip-async-await":"^0.1.0","mocha":"^6.2.0","ngrok":"^3.2.5","nyc":"^14.1.1","sinon":"^7.4.2","sinon-chai":"^3.3.0","source-map-explorer":"^2.0.1","ts-node":"^8.3.0","tslint":"^5.19.0","twilio":"^3.34.0","typescript":"^3.6.2","uglify-save-license":"^0.4.1","vinyl-buffer":"^1.0.1","vinyl-source-stream":"^2.0.0"},"engines":{"node":">=6"},"license":"MIT","main":"lib/index.js","name":"twilio-mcs-client","scripts":{},"types":"./lib/client.d.ts","version":"0.3.3"}')},function(e,t,n){"use strict";var r=c(n(38)),i=c(n(40)),o=c(n(49)),a=c(n(72)),s=c(n(24)),u=c(n(23));function c(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var l=n(596),f=n(165),h=n(599),d=n(53),p=n(291),v=n(292),y=n(604),m=n(293).version,g=d.Logger.scope("Session"),b=function e(){(0,u.default)(this,e)};var _=function(){function e(t,n){(0,u.default)(this,e);var r="undefined"!==typeof navigator?f.parse(navigator.userAgent):f;this.services=t,this.config=n,this.sessionInfo=new v.Deferred,this.currentContext={},this.pendingCommands=new a.default,this.sessionStreamPromise=null,this.endpointPlatform=["JS",m,r.os,r.name,r.version].join("|")}return(0,s.default)(e,[{key:"handleContextUpdate",value:function(e){var t;(g.info("Session context updated"),g.debug("new session context:",e),this.currentContext=e,t=e,["identity","userInfo","links","myChannels","channels"].some((function(e){return!t.hasOwnProperty(e)})))||(g.info("new session context accepted"),this.sessionInfo.set(e))}},{key:"initialize",value:function(){var e=this,t={type:"IpMsgSession",apiVersion:"3",endpointPlatform:this.endpointPlatform};return this.sessionStreamPromise=this.services.syncClient.list({purpose:"com.twilio.rtd.ipmsg",context:t}).then((function(t){return g.info("Session created",t.sid),t.on("itemAdded",(function(t){return e.processCommandResponse(t.item)})),t.on("itemUpdated",(function(t){return e.processCommandResponse(t.item)})),t.on("contextUpdated",(function(t){return e.handleContextUpdate(t.context)})),t})).catch((function(e){throw g.error("Failed to create session",e),e})),this.sessionStreamPromise}},{key:"addCommand",value:function(e,t){return this.processCommand(e,t)}},{key:"processCommand",value:function(e,t){var n=this,r=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],i=new b;return i.request=t,i.request.action=e,i.commandId=l.v4(),g.info("Adding command: ",e,i.commandId),g.debug("command arguments:",t,r),new o.default((function(o,a){n.sessionStreamPromise.then((function(e){return n.pendingCommands.set(i.commandId,{resolve:o,reject:a,commandId:i.commandId,request:i.request}),e.push(i)})).then((function(){return g.debug("Command accepted by server",i.commandId)})).catch((function(s){n.pendingCommands.delete(i.commandId),g.error("Failed to add a command to the session",s),s.code!=h.ResponseCodes.ACCESS_FORBIDDEN_FOR_IDENTITY&&s.code!==h.ResponseCodes.LIST_NOT_FOUND||!r?a(new Error("Can't add command: "+s.message)):(g.info("recreating session..."),n.initialize(),o(n.processCommand(e,t,!1)))}))}))}},{key:"processCommandResponse",value:function(e){if(e.value.hasOwnProperty("response")&&e.value.hasOwnProperty("commandId")&&this.pendingCommands.has(e.value.commandId)){var t=e.value,n=e.value.commandId;if(t.response.status===h.ResponseCodes.HTTP_200_OK){g.debug("Command succeeded: ",t);var r=this.pendingCommands.get(n).resolve;this.pendingCommands.delete(n),r(t.response)}else{g.error("Command failed: ",t);var i=this.pendingCommands.get(n).reject;this.pendingCommands.delete(n),i(new p.SessionError(t.response.statusText,t.response.status))}}}},{key:"getSessionContext",value:function(){return this.sessionStreamPromise.then((function(e){return e.getContext()}))}},{key:"getSessionLinks",value:function(){var e=(0,i.default)(r.default.mark((function e(){var t;return r.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.sessionInfo.promise;case 2:return t=e.sent,e.abrupt("return",{publicChannelsUrl:this.config.baseUrl+t.links.publicChannelsUrl,myChannelsUrl:this.config.baseUrl+t.links.myChannelsUrl,typingUrl:this.config.baseUrl+t.links.typingUrl,syncListUrl:this.config.baseUrl+t.links.syncListUrl,usersUrl:this.config.baseUrl+t.links.usersUrl,mediaServiceUrl:t.links.mediaServiceUrl});case 4:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"getChannelsId",value:function(){var e=(0,i.default)(r.default.mark((function e(){var t;return r.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.sessionInfo.promise;case 2:return t=e.sent,e.abrupt("return",t.channels);case 4:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"getMyChannelsId",value:function(){var e=(0,i.default)(r.default.mark((function e(){var t;return r.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.sessionInfo.promise;case 2:return t=e.sent,e.abrupt("return",t.myChannels);case 4:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"getMaxUserInfosToSubscribe",value:function(){var e=(0,i.default)(r.default.mark((function e(){var t;return r.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.sessionInfo.promise;case 2:return t=e.sent,e.abrupt("return",this.config.userInfosToSubscribeOverride||t.userInfosToSubscribe||this.config.userInfosToSubscribeDefault);case 4:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"getUsersData",value:function(){return this.sessionInfo.promise.then((function(e){return{user:e.userInfo,identity:e.identity}}))}},{key:"getConsumptionReportInterval",value:function(){var e=(0,i.default)(r.default.mark((function e(){var t,n;return r.default.wrap((function(e){for(;;
2)switch(e.prev=e.next){case 0:return e.next=2,this.getSessionContext();case 2:return t=e.sent,n=this.config.consumptionReportIntervalOverride||t.consumptionReportInterval||this.config.consumptionReportIntervalDefault,e.prev=4,e.abrupt("return",y.toSeconds(y.parse(n)));case 8:return e.prev=8,e.t0=e.catch(4),g.error("Failed to parse consumption report interval",n,"using default value",this.config.consumptionReportIntervalDefault),e.abrupt("return",y.toSeconds(y.parse(this.config.consumptionReportIntervalDefault)));case 12:case"end":return e.stop()}}),e,this,[[4,8]])})));return function(){return e.apply(this,arguments)}}()},{key:"getHttpCacheInterval",value:function(){var e=(0,i.default)(r.default.mark((function e(){var t,n;return r.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.getSessionContext();case 2:return t=e.sent,n=this.config.httpCacheIntervalOverride||t.httpCacheInterval||this.config.httpCacheIntervalDefault,e.prev=4,e.abrupt("return",y.toSeconds(y.parse(n)));case 8:return e.prev=8,e.t0=e.catch(4),g.error("Failed to parse cache interval",n,"using default value",this.config.httpCacheIntervalDefault),e.abrupt("return",y.toSeconds(y.parse(this.config.httpCacheIntervalDefault)));case 12:case"end":return e.stop()}}),e,this,[[4,8]])})));return function(){return e.apply(this,arguments)}}()},{key:"identity",get:function(){return this.sessionInfo.current.identity}},{key:"reachabilityEnabled",get:function(){return this.currentContext.reachabilityEnabled}}]),e}();t.Session=_},function(e,t,n){var r=n(597),i=n(598),o=i;o.v1=r,o.v4=i,e.exports=o},function(e,t,n){var r,i,o=n(289),a=n(290),s=0,u=0;e.exports=function(e,t,n){var c=t&&n||0,l=t||[],f=(e=e||{}).node||r,h=void 0!==e.clockseq?e.clockseq:i;if(null==f||null==h){var d=o();null==f&&(f=r=[1|d[0],d[1],d[2],d[3],d[4],d[5]]),null==h&&(h=i=16383&(d[6]<<8|d[7]))}var p=void 0!==e.msecs?e.msecs:(new Date).getTime(),v=void 0!==e.nsecs?e.nsecs:u+1,y=p-s+(v-u)/1e4;if(y<0&&void 0===e.clockseq&&(h=h+1&16383),(y<0||p>s)&&void 0===e.nsecs&&(v=0),v>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");s=p,u=v,i=h;var m=(1e4*(268435455&(p+=122192928e5))+v)%4294967296;l[c++]=m>>>24&255,l[c++]=m>>>16&255,l[c++]=m>>>8&255,l[c++]=255&m;var g=p/4294967296*1e4&268435455;l[c++]=g>>>8&255,l[c++]=255&g,l[c++]=g>>>24&15|16,l[c++]=g>>>16&255,l[c++]=h>>>8|128,l[c++]=255&h;for(var b=0;b<6;++b)l[c+b]=f[b];return t||a(l)}},function(e,t,n){var r=n(289),i=n(290);e.exports=function(e,t,n){var o=t&&n||0;"string"==typeof e&&(t="binary"===e?new Array(16):null,e=null);var a=(e=e||{}).random||(e.rng||r)();if(a[6]=15&a[6]|64,a[8]=63&a[8]|128,t)for(var s=0;s<16;++s)t[o+s]=a[s];return t||i(a)}},function(e,t,n){"use strict";var r,i=n(23),o=(r=i)&&r.__esModule?r:{default:r};Object.defineProperty(t,"__esModule",{value:!0});var a=function e(){(0,o.default)(this,e)};t.ResponseCodes=a,a.HTTP_200_OK=200,a.HTTP_400_BAD_REQUEST=400,a.HTTP_404_NOT_FOUND=404,a.ACCESS_FORBIDDEN_FOR_IDENTITY=54007,a.LIST_NOT_FOUND=54150},function(e,t,n){e.exports={default:n(601),__esModule:!0}},function(e,t,n){n(602),e.exports=n(25).Reflect.construct},function(e,t,n){var r=n(36),i=n(104),o=n(78),a=n(59),s=n(45),u=n(71),c=n(603),l=(n(39).Reflect||{}).construct,f=u((function(){function e(){}return!(l((function(){}),[],e)instanceof e)})),h=!u((function(){l((function(){}))}));r(r.S+r.F*(f||h),"Reflect",{construct:function(e,t){o(e),a(t);var n=arguments.length<3?e:o(arguments[2]);if(h&&!f)return l(e,t,n);if(e==n){switch(t.length){case 0:return new e;case 1:return new e(t[0]);case 2:return new e(t[0],t[1]);case 3:return new e(t[0],t[1],t[2]);case 4:return new e(t[0],t[1],t[2],t[3])}var r=[null];return r.push.apply(r,t),new(c.apply(e,r))}var u=n.prototype,d=i(s(u)?u:Object.prototype),p=Function.apply.call(e,d,t);return s(p)?p:d}})},function(e,t,n){"use strict";var r=n(78),i=n(45),o=n(243),a=[].slice,s={},u=function(e,t,n){if(!(t in s)){for(var r=[],i=0;i<t;i++)r[i]="a["+i+"]";s[t]=Function("F,a","return new F("+r.join(",")+")")}return s[t](e,n)};e.exports=Function.bind||function(e){var t=r(this),n=a.call(arguments,1
2),s=function r(){var i=n.concat(a.call(arguments));return this instanceof r?u(t,i.length,i):o(t,i,e)};return i(t.prototype)&&(s.prototype=t.prototype),s}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=["weeks","years","months","days","hours","minutes","seconds"],i=t.pattern=new RegExp("P(?:(\\d+(?:[\\.,]\\d+)?W)|(\\d+(?:[\\.,]\\d+)?Y)?(\\d+(?:[\\.,]\\d+)?M)?(\\d+(?:[\\.,]\\d+)?D)?(?:T(\\d+(?:[\\.,]\\d+)?H)?(\\d+(?:[\\.,]\\d+)?M)?(\\d+(?:[\\.,]\\d+)?S)?)?)"),o=t.parse=function(e){return e.match(i).slice(1).reduce((function(e,t,n){return e[r[n]]=parseFloat(t)||0,e}),{})},a=t.end=function(e,t){var n=t?t.getTime():Date.now(),r=new Date(n);return r.setFullYear(r.getFullYear()+e.years),r.setMonth(r.getMonth()+e.months),r.setDate(r.getDate()+e.days),r.setHours(r.getHours()+e.hours),r.setMinutes(r.getMinutes()+e.minutes),r.setMilliseconds(r.getMilliseconds()+1e3*e.seconds),r.setDate(r.getDate()+7*e.weeks),r},s=t.toSeconds=function(e,t){var n=t?t.getTime():Date.now(),r=new Date(n);return(a(e,r).getTime()-r.getTime())/1e3};t.default={end:a,toSeconds:s,pattern:i,parse:o}},function(e,t,n){"use strict";var r=p(n(49)),i=p(n(38)),o=p(n(82)),a=p(n(40)),s=p(n(294)),u=p(n(72)),c=p(n(62)),l=p(n(23)),f=p(n(24)),h=p(n(63)),d=p(n(64));function p(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var v=n(18),y=n(53),m=n(611);t.Channel=m.Channel;var g=n(292),b=n(54),_=y.Logger.scope("Channels"),w=function(e){function t(e){(0,l.default)(this,t);var n=(0,h.default)(this,(t.__proto__||(0,c.default)(t)).call(this));return n.services=e,n.channels=new u.default,n.thumbstones=new s.default,n.syncListFetched=!1,n.syncListRead=new g.Deferred,n}return(0,d.default)(t,e),(0,f.default)(t,[{key:"getMap",value:function(){var e=this;return this.services.session.getMyChannelsId().then((function(t){return e.services.syncClient.map({id:t,mode:"open_existing"})}))}},{key:"addChannel",value:function(){var e=(0,a.default)(i.default.mark((function e(t){var n,r,a,s,u,c;return i.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=void 0,n="undefined"===typeof t.attributes?{}:t.attributes,e.next=4,this.services.session.addCommand("createChannel",{friendlyName:t.friendlyName,uniqueName:t.uniqueName,type:t.isPrivate?"private":"public",attributes:(0,o.default)(n)});case 4:if(r=e.sent,a="channelSid"in r?r.channelSid:null,s="channel"in r?r.channel:null,!(u=this.channels.get(a))){e.next=12;break}return e.next=11,u._subscribe();case 11:return e.abrupt("return",u);case 12:return c=new m.Channel(this.services,{channel:s,entityName:null,uniqueName:null,attributes:null,createdBy:null,friendlyName:null,lastConsumedMessageIndex:null,type:t.isPrivate?"private":"public",dateCreated:null,dateUpdated:null},a),this.channels.set(c.sid,c),this.registerForEvents(c),e.next=17,c._subscribe();case 17:return this.emit("channelAdded",c),e.abrupt("return",c);case 19:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"fetchChannels",value:function(){var e=this;this.getMap().then(function(){var t=(0,a.default)(i.default.mark((function t(n){var o,a;return i.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n.on("itemAdded",(function(t){_.debug("itemAdded: "+t.item.key),e.upsertChannel("sync",t.item.key,t.item.value)})),n.on("itemRemoved",(function(t){_.debug("itemRemoved: "+t.key);var n=t.key;e.syncListFetched||e.thumbstones.add(n);var r=e.channels.get(n);r&&("joined"!==r.status&&"invited"!==r.status||(r._setStatus("notParticipating","sync"),e.emit("channelLeft",r)),r.isPrivate&&(e.channels.delete(n),e.emit("channelRemoved",r),r.emit("removed",r)))})),n.on("itemUpdated",(function(t){_.debug("itemUpdated: "+t.item.key),e.upsertChannel("sync",t.item.key,t.item.value)})),o=[],t.next=6,e.services.syncList.getPage();case 6:a=t.sent,a.items.forEach((function(t){o.push(e.upsertChannel("synclist",t.channel_sid,t))}));case 9:if(!a.hasNextPage){t.next=16;break}return t.next=12,a.nextPage();case 12:(a=t.sent).items.forEach((function(t){o.push(e.upsertChannel("synclist",t.channel_sid,t))})),t.next=9;break;case 16:return e.syncListRead.set(!0),t.abrupt("return",r.default.all(o));case 18:case"end":return t.stop()}}),t,e)}
2)));return function(e){return t.apply(this,arguments)}}()).then((function(){e.syncListFetched=!0,e.thumbstones.clear(),_.debug("Channels list fetched")})).then((function(){return e})).catch((function(t){throw"disconnected"!=e.services.syncClient.connectionState&&_.error("Failed to get channels list",t),_.debug("ERROR: Failed to get channels list",t),t}))}},{key:"_wrapPaginator",value:function(e,t){var n=this;return t(e.items).then((function(r){return{items:r,hasNextPage:e.hasNextPage,hasPrevPage:e.hasPrevPage,nextPage:function(){return e.nextPage().then((function(e){return n._wrapPaginator(e,t)}))},prevPage:function(){return e.prevPage().then((function(e){return n._wrapPaginator(e,t)}))}}}))}},{key:"getChannels",value:function(e){var t=this;return this.getMap().then((function(t){return t.getItems(e)})).then((function(e){return t._wrapPaginator(e,(function(e){return r.default.all(e.map((function(e){return t.upsertChannel("sync",e.key,e.value)})))}))}))}},{key:"getChannel",value:function(e){var t=this;return this.getMap().then((function(t){return t.getItems({key:e})})).then((function(e){return e.items.map((function(e){return t.upsertChannel("sync",e.key,e.value)}))})).then((function(e){return e.length>0?e[0]:null}))}},{key:"pushChannel",value:function(e){var t=e.sid,n={entityName:null,lastConsumedMessageIndex:e.lastConsumedMessageIndex,type:e.type,status:e.status,friendlyName:e.friendlyName,dateUpdated:e.dateUpdated,dateCreated:e.dateCreated,uniqueName:e.uniqueName,createdBy:e.createdBy,attributes:e.attributes,channel:e.channel,notificationLevel:e.notificationLevel,sid:t};return this.upsertChannel("chat",t,n)}},{key:"upsertChannel",value:function(e,t,n){var r=this;_.trace("upsertChannel(sid="+t+", data=",n);var i=this.channels.get(t);if(i){if(_.trace("upsertChannel: channel "+t+" is known and it's status is known from source "+i._statusSource()+" and update came from source "+e,i),"undefined"===typeof i._statusSource()||e===i._statusSource()||"synclist"===e&&"sync"!==i._statusSource()||"sync"===e)if("joined"===n.status&&"joined"!==i.status){i._setStatus("joined",e);var o={};"undefined"!==typeof n.notificationLevel&&(o.notificationLevel=n.notificationLevel),"undefined"!==typeof n.lastConsumedMessageIndex&&(o.lastConsumedMessageIndex=n.lastConsumedMessageIndex),b.isDeepEqual(o,{})||i._update(o),i._subscribe().then((function(){r.emit("channelJoined",i)}))}else if("invited"===n.status&&"invited"!==i.status){i._setStatus("invited",e);var a={};"undefined"!==typeof n.notificationLevel&&(a.notificationLevel=n.notificationLevel),"undefined"!==typeof n.lastConsumedMessageIndex&&(a.lastConsumedMessageIndex=n.lastConsumedMessageIndex),b.isDeepEqual(a,{})||i._update(a),i._subscribe().then((function(){r.emit("channelInvited",i)}))}else"notParticipating"!==n.status||"invited"!==i.status&&"joined"!==i.status?"notParticipating"===n.status&&"private"===n.type?i._subscribe():i._update(n):(i._setStatus("notParticipating",e),i._update(n),i._subscribe().then((function(){r.emit("channelLeft",i)})));else _.trace("upsertChannel: channel is known from sync and came from chat, ignoring",{sid:t,data:n.status,channel:i.status});return i._subscribe().then((function(){return i}))}if("chat"!==e&&"synclist"!==e||!this.thumbstones.has(t))return _.trace("upsertChannel: creating local channel object with sid "+t,n),i=new m.Channel(this.services,n,t),this.channels.set(t,i),i._subscribe().then((function(){return r.registerForEvents(i),r.emit("channelAdded",i),"joined"===n.status?(i._setStatus("joined",e),r.emit("channelJoined",i)):"invited"===n.status&&(i._setStatus("invited",e),r.emit("channelInvited",i)),i}));_.trace("upsertChannel: channel is deleted and came again from chat, ignoring",t)}},{key:"onChannelRemoved",value:function(e){var t=this.channels.get(e);t&&(this.channels.delete(e),this.emit("channelRemoved",t))}},{key:"registerForEvents",value:function(e){var t=this;e.on("removed",(function(){return t.onChannelRemoved(e.sid)})),e.on("updated",(function(e){return t.emit("channelUpdated",e)})),e.on("memberJoined",this.emit.bind(this,"memberJoined")),e.on("memberLeft",this.emit.bind(this,"memberLeft")),e.on("memberUpdated",(function(e){return t.emit("memberUpdated",e)})),e.on("messageAdded",this.emit.bind(this,"messageAdded")),e.on("messageUpdated",(function(e){return t.emit("messageUpdated",e)})),e.on("messageRemoved",this.emit.bind(this,"messageRemoved")),e.on("typingStarted",this.emit.bind(this,"typingStarted")),e.on("typingEnded",this.emit.bind(this,"typingEnded"))}}]),t}(v.EventEmitter);t.Channels=w},function(e,t,n){n(119),n(81),n(92),n(607),n(608),n(609),n(610),e.exports=n(25).Set},function(e,t,n){"use strict";var r=n(259),i=n(160);e.exports=n(260)("Set",(function(e){return function(){return e(this,arguments.length>0?arguments[0]:void 0)}}),{add:function(e){return r.def(i(this,"Set"),e=0===e?0:e,e)}},r)},function(e,t,n){var r=n(36);r(r.P+r.R,"Set",{toJSON:n(261)("Set")})},function(e,t,n){n(262)("Set")},function(e,t,n){n(263)("Set")},function(e,t,n){"use strict";
2var r=g(n(612)),i=g(n(159)),o=g(n(615)),a=g(n(294)),s=g(n(38)),u=g(n(49)),c=g(n(40)),l=g(n(72)),f=g(n(82)),h=g(n(295)),d=g(n(62)),p=g(n(23)),v=g(n(24)),y=g(n(63)),m=g(n(64));function g(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var b=n(18),_=n(53),w=n(619),k=n(296),S=n(620),O=n(54),E=_.Logger.scope("Channel"),T={lastMessage:"lastMessage",attributes:"attributes",createdBy:"createdBy",dateCreated:"dateCreated",dateUpdated:"dateUpdated",friendlyName:"friendlyName",lastConsumedMessageIndex:"lastConsumedMessageIndex",notificationLevel:"notificationLevel",sid:"sid",status:"status",type:"type",uniqueName:"uniqueName",state:"state"};function C(e){try{return new Date(e)}catch(t){return null}}var P=function(e){function t(e,n,r){(0,p.default)(this,t);var i=(0,y.default)(this,(t.__proto__||(0,d.default)(t)).call(this)),o=n.attributes||{},a=n.createdBy,s=C(n.dateCreated),u=C(n.dateUpdated),c=n.friendlyName||null,v=(0,h.default)(n.lastConsumedMessageIndex)?n.lastConsumedMessageIndex:null,m=n.uniqueName||null;try{(0,f.default)(o)}catch(g){throw new Error("Attributes must be a valid JSON object.")}return i.services=e,i.sid=r,i.entityName=n.channel,i.channelState={uniqueName:m,status:"notParticipating",type:n.type,attributes:o,createdBy:a,dateCreated:s,dateUpdated:u,friendlyName:c,lastConsumedMessageIndex:v},n.notificationLevel&&(i.channelState.notificationLevel=n.notificationLevel),i.members=new l.default,i.membersEntity=new w.Members(i,i.services,i.members),i.membersEntity.on("memberJoined",i.emit.bind(i,"memberJoined")),i.membersEntity.on("memberLeft",i.emit.bind(i,"memberLeft")),i.membersEntity.on("memberUpdated",(function(e){return i.emit("memberUpdated",e)})),i.messagesEntity=new S.Messages(i,e),i.messagesEntity.on("messageAdded",(function(e){return i._onMessageAdded(e)})),i.messagesEntity.on("messageUpdated",(function(e){return i.emit("messageUpdated",e)})),i.messagesEntity.on("messageRemoved",i.emit.bind(i,"messageRemoved")),i}return(0,m.default)(t,e),(0,v.default)(t,[{key:"_subscribe",value:function(){var e=this;return this.entityPromise?this.entityPromise:this.entityPromise=this.entityPromise||this.services.syncClient.document({id:this.entityName,mode:"open_existing"}).then((function(t){return e.entity=t,e.entity.on("updated",(function(t){e._update(t.value)})),e.entity.on("removed",(function(){return e.emit("removed",e)})),e._update(e.entity.value),t})).catch((function(t){throw e.entity=null,e.entityPromise=null,"disconnected"!=e.services.syncClient.connectionState&&E.error("Failed to get channel object",t),E.debug("ERROR: Failed to get channel object",t),t}))}},{key:"_subscribeStreams",value:function(){var e=(0,c.default)(s.default.mark((function e(){var t,n;return s.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,this._subscribe();case 3:return E.trace("_subscribeStreams, this.entity.value=",this.entity.value),t=this.entity.value.messages,n=this.entity.value.roster,e.next=8,u.default.all([this.messagesEntity.subscribe(t),this.membersEntity.subscribe(n)]);case 8:e.next=15;break;case 10:throw e.prev=10,e.t0=e.catch(0),"disconnected"!==this.services.syncClient.connectionState&&E.error("Failed to subscribe on channel objects",this.sid,e.t0),E.debug("ERROR: Failed to subscribe on channel objects",this.sid,e.t0),e.t0;case 15:case"end":return e.stop()}}),e,this,[[0,10]])})));return function(){return e.apply(this,arguments)}}()},{key:"_unsubscribe",value:function(){var e=(0,c.default)(s.default.mark((function e(){return s.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!this.isPrivate||!this.entity){e.next=5;break}return e.next=3,this.entity.close();case 3:this.entity=null,this.entityPromise=null;case 5:return e.abrupt("return",u.default.all([this.membersEntity.unsubscribe(),this.messagesEntity.unsubscribe()]));case 6:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"_setStatus",value:function(e,t){var n=this;this.statusSource=t,this.channelState.status!==e&&(this.channelState.status=e,"joined"===e?this._subscribeStreams().catch((function(t){if(E.debug("ERROR while setting channel status "+e,t),"disconnected"!==n.services.syncClient.connectionState)throw t})):"invited"===e?this._subscribe().catch((function(t){if(E.debug("ERROR while setting channel status "+e,t),"disconnected"!==n.services.syncClient.connectionState)throw t})):this.entityPromise&&this._unsubscribe().catch((function(t){if(E.debug("ERROR while setting channel status "+e,t),"disconnected"!==n.services.syncClient.connectionState)throw t})))}},{key:"_statusSource",value:function(){return this.statusSource}},{key:"_update",value:function(e){var n,s,u,c,l;E.trace("_update",e),t.preprocessUpdate(e,this.sid);var f=new a.default,h=!0,d=!1,p=void 0;try{for(var v,y=(0,i.default)((0,r.default)(e));!(h=(v=y.next()).done);h=!0){var m=v.value,g=T[m];if(g)switch(g){case T.status:if(!e.status||"unknown"===e.status||this.channelState.status===e.status)break;this.channelState.status=e.status,f.add(g);break;case T.attributes:if(O.isDeepEqual(this.channelState.attributes,e.attributes))break;this.channelState.attributes=e.attributes,f.add(g);break;
2case T.lastConsumedMessageIndex:if(void 0===e.lastConsumedMessageIndex||e.lastConsumedMessageIndex===this.channelState.lastConsumedMessageIndex)break;this.channelState.lastConsumedMessageIndex=e.lastConsumedMessageIndex,f.add(g);break;case T.lastMessage:if(this.channelState.lastMessage&&!e.lastMessage){delete this.channelState.lastMessage,f.add(g);break}this.channelState.lastMessage=this.channelState.lastMessage||{},void 0!==(null===(n=e.lastMessage)||void 0===n?void 0:n.index)&&e.lastMessage.index!==this.channelState.lastMessage.index&&(this.channelState.lastMessage.index=e.lastMessage.index,f.add(g)),void 0!==(null===(s=e.lastMessage)||void 0===s?void 0:s.timestamp)&&(null===(c=null===(u=this.channelState.lastMessage)||void 0===u?void 0:u.dateCreated)||void 0===c?void 0:c.getTime())!==e.lastMessage.timestamp.getTime()&&(this.channelState.lastMessage.dateCreated=e.lastMessage.timestamp,f.add(g)),O.isDeepEqual(this.channelState.lastMessage,{})&&delete this.channelState.lastMessage;break;case T.state:var b=e.state||void 0;if(void 0!==b&&(b.dateUpdated=new Date(b.dateUpdated)),O.isDeepEqual(this.channelState.state,b))break;this.channelState.state=b,f.add(g);break;default:var _=e[m]instanceof Date,w=_&&(null===(l=this.channelState[g])||void 0===l?void 0:l.getTime())===e[m].getTime(),k=!_&&this[g]===e[m];if(w||k)break;this.channelState[g]=e[m],f.add(g)}}}catch(S){d=!0,p=S}finally{try{!h&&y.return&&y.return()}finally{if(d)throw p}}f.size>0&&this.emit("updated",{channel:this,updateReasons:[].concat((0,o.default)(f))})}},{key:"_onMessageAdded",value:function(e){var t=!0,n=!1,r=void 0;try{for(var o,a=(0,i.default)(this.members.values());!(t=(o=a.next()).done);t=!0){var s=o.value;if(s.identity===e.author){s._endTyping();break}}}catch(u){n=!0,r=u}finally{try{!t&&a.return&&a.return()}finally{if(n)throw r}}this.emit("messageAdded",e)}},{key:"add",value:function(){var e=(0,c.default)(s.default.mark((function e(t){return s.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t&&"string"===typeof t){e.next=2;break}throw new Error("Channel.add requires an <String>identity parameter");case 2:return e.abrupt("return",this.membersEntity.add(t));case 3:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"advanceLastConsumedMessageIndex",value:function(){var e=(0,c.default)(s.default.mark((function e(t){return s.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if((0,h.default)(t)){e.next=2;break}throw new Error("Channel.advanceLastConsumedMessageIndex requires an integral <Number>index parameter");case 2:return e.next=4,this._subscribeStreams();case 4:return e.abrupt("return",this.services.consumptionHorizon.advanceLastConsumedMessageIndexForChannel(this.sid,t,this.lastConsumedMessageIndex));case 5:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"decline",value:function(){var e=(0,c.default)(s.default.mark((function e(){return s.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.services.session.addCommand("declineInvitation",{channelSid:this.sid});case 2:return e.abrupt("return",this);case 3:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"delete",value:function(){var e=(0,c.default)(s.default.mark((function e(){return s.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.services.session.addCommand("destroyChannel",{channelSid:this.sid});case 2:return e.abrupt("return",this);case 3:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"getAttributes",value:function(){var e=(0,c.default)(s.default.mark((function e(){return s.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this._subscribe();case 2:return e.abrupt("return",this.attributes);case 3:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"getMessages",value:function(){var e=(0,c.default)(s.default.mark((function e(t,n,r){return s.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if("undefined"===typeof n||(0,h.default)(n)){e.next=2;break}throw new Error("Anchor should be a valid message index");case 2:return e.next=4,this._subscribeStreams();case 4:return e.abrupt("return",this.messagesEntity.getMessages(t,
2n,r));case 5:case"end":return e.stop()}}),e,this)})));return function(t,n,r){return e.apply(this,arguments)}}()},{key:"getMembers",value:function(){var e=(0,c.default)(s.default.mark((function e(){return s.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this._subscribeStreams();case 2:return e.abrupt("return",this.membersEntity.getMembers());case 3:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"getMembersCount",value:function(){var e=(0,c.default)(s.default.mark((function e(){var t,n,r;return s.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.services.session.getSessionLinks();case 2:return t=e.sent,n=new O.UriBuilder(t.publicChannelsUrl).path(this.sid).build(),e.next=6,this.services.network.get(n);case 6:return r=e.sent,e.abrupt("return",r.body.members_count);case 8:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"getMemberBySid",value:function(){var e=(0,c.default)(s.default.mark((function e(t){return s.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t&&"string"===typeof t){e.next=2;break}throw new Error("Channel.getMemberBySid requires a <String>memberSid parameter");case 2:return e.abrupt("return",this.membersEntity.getMemberBySid(t));case 3:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"getMemberByIdentity",value:function(){var e=(0,c.default)(s.default.mark((function e(t){return s.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t&&"string"===typeof t){e.next=2;break}throw new Error("Channel.getMemberByIdentity requires a <String>identity parameter");case 2:return e.abrupt("return",this.membersEntity.getMemberByIdentity(t));case 3:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"getMessagesCount",value:function(){var e=(0,c.default)(s.default.mark((function e(){var t,n,r;return s.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.services.session.getSessionLinks();case 2:return t=e.sent,n=new O.UriBuilder(t.publicChannelsUrl).path(this.sid).build(),e.next=6,this.services.network.get(n);case 6:return r=e.sent,e.abrupt("return",r.body.messages_count);case 8:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"getUnconsumedMessagesCount",value:function(){var e=(0,c.default)(s.default.mark((function e(){var t,n,r;return s.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.services.session.getSessionLinks();case 2:return t=e.sent,n=new O.UriBuilder(t.myChannelsUrl).arg("ChannelSid",this.sid).build(),e.next=6,this.services.network.get(n);case 6:if(!(r=e.sent).body.channels.length||r.body.channels[0].channel_sid!=this.sid){e.next=11;break}if("undefined"===typeof r.body.channels[0].unread_messages_count||null==r.body.channels[0].unread_messages_count){e.next=10;break}return e.abrupt("return",r.body.channels[0].unread_messages_count);case 10:return e.abrupt("return",null);case 11:throw new Error("Channel is not in user channels list");case 12:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"invite",value:function(){var e=(0,c.default)(s.default.mark((function e(t){return s.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if("string"===typeof t&&t.length){e.next=2;break}throw new Error("Channel.invite requires an <String>identity parameter");case 2:return e.next=4,this.membersEntity.invite(t);case 4:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"join",value:function(){var e=(0,c.default)(s.default.mark((function e(){return s.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.services.session.addCommand("joinChannelV2",{channelSid:this.sid});case 2:return e.abrupt("return",this);case 3:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"leave",value:function(){var e=(0,c.default)(s.default.mark((function e(){return s.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if("joined"!==this.channelState.status){e.next=3;break}return e.next=3,this.services.session.addCommand("leaveChannel",{channelSid:this.sid});case 3:return e.abrupt("return",this);case 4:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"removeMember",value:function(){var e=(0,c.default)(s.default.mark((function e(t){return s.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t&&("string"===typeof t||t instanceof k.Member)){e.next=2;break}throw new Error("Channel.removeMember requires a <String|Member>member parameter.");case 2:if(!(t instanceof k.Member)){e.next=7;break}return e.next=5,this.membersEntity.removeBySid(t.sid);case 5:e.next=9;break;case 7:return e.next=9,this.membersEntity.removeByIdentity(t);case 9:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"sendMessage",value:function(){var e=(0,c.default)(s.default.mark((function e(t,n){var r,i;return s.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if("undefined"!==typeof t){e.next=2;break}throw new Error("Message is required parameter");case 2:if("string"!==typeof t&&null!==t){e.next=9;break}return e.next=5,this.messagesEntity.send(t,n);case 5:return r=e.sent,e.abrupt("return",O.parseToNumber(r.messageId));
2case 9:return e.next=11,this.messagesEntity.sendMedia(t,n);case 11:return i=e.sent,e.abrupt("return",O.parseToNumber(i.messageId));case 13:case"end":return e.stop()}}),e,this)})));return function(t,n){return e.apply(this,arguments)}}()},{key:"setAllMessagesConsumed",value:function(){var e=(0,c.default)(s.default.mark((function e(){var t;return s.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this._subscribeStreams();case 2:return e.next=4,this.getMessages(1);case 4:if(!((t=e.sent).items.length>0)){e.next=7;break}return e.abrupt("return",this.advanceLastConsumedMessageIndex(t.items[0].index));case 7:return e.abrupt("return",u.default.resolve(0));case 8:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"setNoMessagesConsumed",value:function(){var e=(0,c.default)(s.default.mark((function e(){return s.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this._subscribeStreams();case 2:return e.abrupt("return",this.services.consumptionHorizon.updateLastConsumedMessageIndexForChannel(this.sid,null));case 3:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"setUserNotificationLevel",value:function(){var e=(0,c.default)(s.default.mark((function e(t){return s.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t){e.next=2;break}throw new Error("notificationLevel can't be null");case 2:return e.next=4,this.services.session.addCommand("editNotificationLevel",{channelSid:this.sid,notificationLevel:t});case 4:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"typing",value:function(){return this.services.typingIndicator.send(this.sid)}},{key:"updateAttributes",value:function(){var e=(0,c.default)(s.default.mark((function e(t){return s.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if("undefined"!==typeof t){e.next=2;break}throw new Error("Attributes is required parameter");case 2:return e.next=4,this.services.session.addCommand("editAttributes",{channelSid:this.sid,attributes:(0,f.default)(t)});case 4:return e.abrupt("return",this);case 5:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"updateFriendlyName",value:function(){var e=(0,c.default)(s.default.mark((function e(t){return s.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.channelState.friendlyName===t){e.next=3;break}return e.next=3,this.services.session.addCommand("editFriendlyName",{channelSid:this.sid,friendlyName:t});case 3:return e.abrupt("return",this);case 4:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"updateLastConsumedMessageIndex",value:function(){var e=(0,c.default)(s.default.mark((function e(t){return s.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if((0,h.default)(t)||null===t){e.next=2;break}throw new Error('Incorrect argument "index": integer number or null expected');case 2:return e.next=4,this._subscribeStreams();case 4:return e.abrupt("return",this.services.consumptionHorizon.updateLastConsumedMessageIndexForChannel(this.sid,t));case 5:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"updateUniqueName",value:function(){var e=(0,c.default)(s.default.mark((function e(t){return s.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.channelState.uniqueName===t){e.next=4;break}return t||(t=""),e.next=4,this.services.session.addCommand("editUniqueName",{channelSid:this.sid,uniqueName:t});case 4:return e.abrupt("return",this);case 5:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"getUserDescriptors",value:function(){var e=(0,c.default)(s.default.mark((function e(){return s.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",this.services.users.getChannelUserDescriptors(this.sid));case 1:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"status",get:function(){return this.channelState.status}},{key:"type",get:function(){return this.channelState.type}},{key:"uniqueName",get:function(){return this.channelState.uniqueName}},{key:"isPrivate",get:function(){return"private"===this.channelState.type}},{key:"friendlyName",get:function(){return this.channelState.friendlyName}},{key:"dateUpdated",get:function(){return this.channelState.dateUpdated}},{key:"dateCreated",get:function(){return this.channelState.dateCreated}},{key:"createdBy",get:function(){return this.channelState.createdBy}},{key:"attributes",get:function(){return this.channelState.attributes}},{key:"lastConsumedMessageIndex",get:function(){return this.channelState.lastConsumedMessageIndex}},{key:"lastMessage",get:function(){return this.channelState.lastMessage}},{key:"notificationLevel",get:function(){return this.channelState.notificationLevel}},{key:"state",get:function(){return this.channelState.state}}],[{key:"preprocessUpdate",value:function(e,t){try{"string"===typeof e.attributes?e.attributes=JSON.parse(e.attributes):e.attributes&&(0,f.default)(e.attributes)}catch(n){E.warn("Retrieved malformed attributes from the server for channel: "+t),e.attributes={}}try{e.dateCreated&&(e.dateCreated=new Date(e.dateCreated))}catch(n){E.warn("Retrieved malformed dateCreated from the server for channel: "+t),delete e.dateCreated}try{e.dateUpdated&&(e.dateUpdated=new Date(e.dateUpdated))}catch(n){E.warn("Retrieved malformed dateUpdated from the server for channel: "+t),delete e.dateUpdated}try{e.lastMessage&&e.lastMessage.timestamp&&(e.lastMessage.timestamp=new Date(e.lastMessage.timestamp))}catch(n){E.warn("Retrieved malformed lastMessage.timestamp from the server for channel: "+t),delete e.lastMessage.timestamp}}}]),t}(b.EventEmitter);t.Channel=P},function(e,t,n){e.exports={default:n(613),__esModule:!0}},function(e,t,n){n(614),e.exports=n(25).Object.keys},function(e,t,n){var r=n(80),i=n(101);n(248)("keys",(function(){return function(e){return i(r(e))}}))},function(e,t,n){"use strict";t.__esModule=!0;var r,i=n(157),o=(r=i)&&r.__esModule?r:{default:r};t.default=function(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return(0,o.default)(e)}},function(e,t,n){n(617),e.exports=n(25).Number.isInteger},function(e,t,n){var r=n(36);r(r.S,"Number",{isInteger:n(618)})},function(e,t,n){var r=n(45),i=Math.floor;e.exports=function(e){return!r(e)&&isFinite(e)&&i(e)===e}},function(e,t,n){"use strict";var r=f(n(49)),i=f(n(38)),o=f(n(40)),a=f(n(62)),s=f(n(23)),u=f(n(24)),c=f(n(63)),l=f(n(64));
2function f(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var h=n(18),d=n(296),p=n(53).Logger.scope("Members"),v=function(e){function t(e,n,r){(0,s.default)(this,t);var i=(0,c.default)(this,(t.__proto__||(0,a.default)(t)).call(this));return i.services=n,i.channel=e,i.members=r,i}return(0,l.default)(t,e),(0,u.default)(t,[{key:"unsubscribe",value:function(){var e=(0,o.default)(i.default.mark((function e(){return i.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!this.rosterEntityPromise){e.next=6;break}return e.next=3,this.rosterEntityPromise;case 3:e.sent.close(),this.rosterEntityPromise=null;case 6:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"subscribe",value:function(e){var t=this;return this.rosterEntityPromise=this.rosterEntityPromise||this.services.syncClient.map({id:e,mode:"open_existing"}).then((function(e){e.on("itemAdded",(function(e){p.debug(t.channel.sid+" itemAdded: "+e.item.key),t.upsertMember(e.item.key,e.item.value).then((function(e){t.emit("memberJoined",e)}))})),e.on("itemRemoved",(function(e){p.debug(t.channel.sid+" itemRemoved: "+e.key);var n=e.key;if(t.members.has(n)){var r=t.members.get(n);t.members.delete(n),t.emit("memberLeft",r)}})),e.on("itemUpdated",(function(e){p.debug(t.channel.sid+" itemUpdated: "+e.item.key),t.upsertMember(e.item.key,e.item.value)}));var n=[],i=t;return e.getItems().then((function e(t){return t.items.forEach((function(e){n.push(i.upsertMember(e.key,e.value))})),t.hasNextPage?t.nextPage().then(e):null})).then((function(){return r.default.all(n)})).then((function(){return e}))})).catch((function(e){throw t.rosterEntityPromise=null,"disconnected"!=t.services.syncClient.connectionState&&p.error("Failed to get roster object for channel",t.channel.sid,e),p.debug("ERROR: Failed to get roster object for channel",t.channel.sid,e),e}))}},{key:"upsertMember",value:function(){var e=(0,o.default)(i.default.mark((function e(t,n){var r,o=this;return i.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!(r=this.members.get(t))){e.next=3;break}return e.abrupt("return",r._update(n));case 3:return r=new d.Member(this.services,this.channel,n,t),this.members.set(t,r),r.on("updated",(function(e){return o.emit("memberUpdated",e)})),e.abrupt("return",r);case 7:case"end":return e.stop()}}),e,this)})));return function(t,n){return e.apply(this,arguments)}}()},{key:"getMembers",value:function(){var e=this;return this.rosterEntityPromise.then((function(){var t=[];return e.members.forEach((function(e){return t.push(e)})),t}))}},{key:"getMemberBySid",value:function(){var e=(0,o.default)(i.default.mark((function e(t){var n=this;return i.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",this.rosterEntityPromise.then((function(){var e=n.members.get(t);if(!e)throw new Error("Member with SID "+t+" was not found");return e})));case 1:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"getMemberByIdentity",value:function(){var e=(0,o.default)(i.default.mark((function e(t){var n,r=this;return i.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=null,e.abrupt("return",this.rosterEntityPromise.then((function(){if(r.members.forEach((function(e){e.identity===t&&(n=e)})),!n)throw new Error("Member with identity "+t+" was not found");return n})));case 2:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"add",value:function(e){return this.services.session.addCommand("addMemberV2",{channelSid:this.channel.sid,username:e})}},{key:"invite",value:function(e){return this.services.session.addCommand("inviteMember",{channelSid:this.channel.sid,username:e})}},{key:"removeByIdentity",value:function(e){return this.services.session.addCommand("removeMember",{channelSid:this.channel.sid,username:e})}},{key:"removeBySid",value:function(e){return this.services.session.addCommand("removeMember",{channelSid:this.channel.sid,memberSid:e})}}]),t}(h.EventEmitter);t.Members=v},function(e,t,n){"use strict";var r=d(n(49)),i=d(n(82)),o=d(n(38)),a=d(n(40)),s=d(n(72)),u=d(n(62)),c=d(n(23)),l=d(n(24)),f=d(n(63)),h=d(n(64));
2function d(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var p=n(18),v=n(53),y=n(621),m=v.Logger.scope("Messages"),g=function(e){function t(e,n){(0,c.default)(this,t);var r=(0,f.default)(this,(t.__proto__||(0,u.default)(t)).call(this));return r.channel=e,r.services=n,r.messagesByIndex=new s.default,r.messagesListPromise=null,r}return(0,h.default)(t,e),(0,l.default)(t,[{key:"subscribe",value:function(e){var t=this;return this.messagesListPromise=this.messagesListPromise||this.services.syncClient.list({id:e,mode:"open_existing"}).then((function(e){return e.on("itemAdded",(function(e){m.debug(t.channel.sid+" itemAdded: "+e.item.index);var n=new y.Message(t.channel,t.services,e.item.index,e.item.value);t.messagesByIndex.has(n.index)?m.debug("Message arrived, but already known and ignored",t.channel.sid,n.index):(t.messagesByIndex.set(n.index,n),n.on("updated",(function(e){return t.emit("messageUpdated",e)})),t.emit("messageAdded",n))})),e.on("itemRemoved",(function(e){m.debug(t.channel.sid+" itemRemoved: "+e.index);var n=e.index;if(t.messagesByIndex.has(n)){var r=t.messagesByIndex.get(n);t.messagesByIndex.delete(r.index),r.removeAllListeners("updated"),t.emit("messageRemoved",r)}})),e.on("itemUpdated",(function(e){m.debug(t.channel.sid+" itemUpdated: "+e.item.index);var n=t.messagesByIndex.get(e.item.index);n&&n._update(e.item.value)})),e})).catch((function(e){throw t.messagesListPromise=null,"disconnected"!=t.services.syncClient.connectionState&&m.error("Failed to get messages object for channel",t.channel.sid,e),m.debug("ERROR: Failed to get messages object for channel",t.channel.sid,e),e}))}},{key:"unsubscribe",value:function(){var e=(0,a.default)(o.default.mark((function e(){return o.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!this.messagesListPromise){e.next=6;break}return e.next=3,this.messagesListPromise;case 3:e.sent.close(),this.messagesListPromise=null;case 6:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"send",value:function(){var e=(0,a.default)(o.default.mark((function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return o.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return m.debug("Sending text message",t,n),e.abrupt("return",this.services.session.addCommand("sendMessage",{channelSid:this.channel.sid,text:t,attributes:(0,i.default)(n)}));case 2:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"sendMedia",value:function(){var e=(0,a.default)(o.default.mark((function e(t){var n,r,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return o.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(m.debug("Sending media message",t,a),n=void 0,!("undefined"!==typeof FormData&&t instanceof FormData)){e.next=9;break}return m.debug("Sending media message as FormData",t,a),e.next=6,this.services.mcsClient.postFormData(t);case 6:n=e.sent,e.next=16;break;case 9:if(m.debug("Sending media message as SendMediaOptions",t,a),(r=t).contentType&&r.media){e.next=13;break}throw new Error("Media content <Channel#SendMediaOptions> must contain non-empty contentType and media");case 13:return e.next=15,this.services.mcsClient.post(r.contentType,r.media);case 15:n=e.sent;case 16:return e.abrupt("return",this.services.session.addCommand("sendMediaMessage",{channelSid:this.channel.sid,mediaSid:n.sid,attributes:(0,i.default)(a)}));case 17:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"getMessages",value:function(e,t,n){return t="undefined"!==typeof t?t:"end",n=n||"backwards",this._getMessages(e,t,n)}},{key:"wrapPaginator",value:function(e,t,n){var r=this,i="desc"===e,o=function(){return t.nextPage().then((function(t){return r.wrapPaginator(e,t,n)}))},a=function(){return t.prevPage().then((function(t){return r.wrapPaginator(e,t,n)}))};return n(t.items).then((function(e){return{items:e.sort((function(e,t){return e.index-t.index})),hasPrevPage:i?t.hasNextPage:t.hasPrevPage,hasNextPage:i?t.hasPrevPage:t.hasNextPage,prevPage:i?o:a,nextPage:i?a:o}}))}},{key:"_upsertMessage",value:function(e,t){var n=this,r=this.messagesByIndex.get(e);if(r)return r;var i=new y.Message(this.channel,this.services,e,t);return this.messagesByIndex.set(i.index,i),i.on("updated",(function(e){return n.emit("messageUpdated",e)})),i}},{key:"_getMessages",value:function(e,t,n){var i=this;t="undefined"!==typeof t?t:"end",e=e||30;var o="backwards"===n?"desc":"asc";return this.messagesListPromise.then((function(n){return n.getItems({from:"end"!==t?t:void 0,pageSize:e,order:o})})).then((function(e){return i.wrapPaginator(o,e,(function(e){return r.default.all(e.map((function(e){return i._upsertMessage(e.index,e.value)})))}))}))}}]),t}(p.EventEmitter);t.Messages=g},function(e,t,n){"use strict";var r=f(n(82)),i=f(n(38)),o=f(n(40)),a=f(n(62)),s=f(n(23)),u=f(n(24)),c=f(n(63)),l=f(n(64));
2function f(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var h=n(18),d=n(54),p=n(53),v=n(622),y=p.Logger.scope("Message"),m=function(e){function t(e,n,r,i){(0,s.default)(this,t);var o=(0,c.default)(this,(t.__proto__||(0,a.default)(t)).call(this));return o.channel=e,o.services=n,o.state={sid:i.sid,index:r,author:null==i.author?null:i.author,body:i.text,timestamp:i.timestamp?new Date(i.timestamp):null,dateUpdated:i.dateUpdated?new Date(i.dateUpdated):null,lastUpdatedBy:i.lastUpdatedBy?i.lastUpdatedBy:null,attributes:d.parseAttributes(i.attributes,"Got malformed attributes for the message "+i.sid,y),type:i.type?i.type:"text",media:i.type&&"media"===i.type&&i.media?new v.Media(i.media,o.services):null,memberSid:null==i.memberSid?null:i.memberSid},o}return(0,l.default)(t,e),(0,u.default)(t,[{key:"_update",value:function(e){var t=[];!e.text&&"string"!==typeof e.text||e.text===this.state.body||(this.state.body=e.text,t.push("body")),e.lastUpdatedBy&&e.lastUpdatedBy!==this.state.lastUpdatedBy&&(this.state.lastUpdatedBy=e.lastUpdatedBy,t.push("lastUpdatedBy")),e.author&&e.author!==this.state.author&&(this.state.author=e.author,t.push("author")),e.dateUpdated&&new Date(e.dateUpdated).getTime()!==(this.state.dateUpdated&&this.state.dateUpdated.getTime())&&(this.state.dateUpdated=new Date(e.dateUpdated),t.push("dateUpdated")),e.timestamp&&new Date(e.timestamp).getTime()!==(this.state.timestamp&&this.state.timestamp.getTime())&&(this.state.timestamp=new Date(e.timestamp),t.push("dateCreated"));var n=d.parseAttributes(e.attributes,"Got malformed attributes for the message "+this.sid,y);d.isDeepEqual(this.state.attributes,n)||(this.state.attributes=n,t.push("attributes")),t.length>0&&this.emit("updated",{message:this,updateReasons:t})}},{key:"getMember",value:function(){var e=(0,o.default)(i.default.mark((function e(){var t,n,r=this;return i.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t=null,!this.state.memberSid){e.next=5;break}return e.next=4,this.channel.getMemberBySid(this.memberSid).catch((function(){return y.debug('Member with sid "'+r.memberSid+'" not found for message '+r.sid),null}));case 4:t=e.sent;case 5:if(t||!this.state.author){e.next=9;break}return e.next=8,this.channel.getMemberByIdentity(this.state.author).catch((function(){return y.debug('Member with identity "'+r.author+'" not found for message '+r.sid),null}));case 8:t=e.sent;case 9:if(!t){e.next=11;break}return e.abrupt("return",t);case 11:throw n="Member with ",this.state.memberSid&&(n+="SID '"+this.state.memberSid+"' "),this.state.author&&(this.state.memberSid&&(n+="or "),n+="identity '"+this.state.author+"' "),"Member with "===n&&(n="Member "),n+="was not found",new Error(n);case 17:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"remove",value:function(){var e=(0,o.default)(i.default.mark((function e(){return i.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.services.session.addCommand("deleteMessage",{channelSid:this.channel.sid,messageIdx:this.index.toString()});case 2:return e.abrupt("return",this);case 3:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"updateBody",value:function(){var e=(0,o.default)(i.default.mark((function e(t){return i.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if("string"===typeof t){e.next=2;break}throw new Error("Body <String> is a required parameter for updateBody");case 2:return e.next=4,this.services.session.addCommand("editMessage",{channelSid:this.channel.sid,messageIdx:this.index.toString(),text:t});case 4:return e.abrupt("return",this);case 5:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"updateAttributes",value:function(){var e=(0,o.default)(i.default.mark((function e(t){return i.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if("undefined"!==typeof t){e.next=2;break}throw new Error("Attributes is required parameter");case 2:return e.next=4,this.services.session.addCommand("editMessageAttributes",{channelSid:this.channel.sid,messageIdx:this.index,attributes:(0,r.default)(t)});case 4:return e.abrupt("return",this);case 5:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"sid",get:function(){return this.state.sid}},{key:"author",get:function(){return this.state.author}},{key:"body",get:function(){return"media"===this.type?null:this.state.body}},{key:"dateUpdated",get:function(){return this.state.dateUpdated}},{key:"index",get:function(){return this.state.index}},{key:"lastUpdatedBy",get:function(){return this.state.lastUpdatedBy}},{key:"dateCreated",get:function(){return this.state.timestamp}},{key:"attributes",get:function(){return this.state.attributes}},{key:"type",get:function(){return this.state.type}},{key:"media",get:function(){return this.state.media}},{key:"memberSid",get:function(){return this.state.memberSid}}]),t}(h.EventEmitter);t.Message=m},function(e,t,n){"use strict";var r=s(n(38)),i=s(n(40)),o=s(n(23)),a=s(n(24));
2function s(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var u=function(){function e(t,n){(0,o.default)(this,e),this.mcsMedia=null,this.services=n,this.state={sid:t.sid,filename:t.filename,contentType:t.contentType,size:t.size}}return(0,a.default)(e,[{key:"getContentTemporaryUrl",value:function(){var e=(0,i.default)(r.default.mark((function e(){return r.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.mcsMedia){e.next=8;break}if(!this.services.mcsClient){e.next=7;break}return e.next=4,this.services.mcsClient.get(this.state.sid);case 4:this.mcsMedia=e.sent,e.next=8;break;case 7:throw new Error("Media Content Service is unavailable");case 8:return e.abrupt("return",this.mcsMedia.getContentUrl());case 9:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"sid",get:function(){return this.state.sid}},{key:"filename",get:function(){return this.state.filename}},{key:"contentType",get:function(){return this.state.contentType}},{key:"size",get:function(){return this.state.size}}]),e}();t.Media=u},function(e,t,n){"use strict";var r=f(n(38)),i=f(n(40)),o=f(n(72)),a=f(n(62)),s=f(n(23)),u=f(n(24)),c=f(n(63)),l=f(n(64));function f(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var h=n(18),d=n(255),p=n(624),v=function(e){function t(e){(0,s.default)(this,t);var n=(0,c.default)(this,(t.__proto__||(0,a.default)(t)).call(this));return n.services=e,n.fifoStack=[],n.fifoStackMaxLength=100,n.myself=new d.User(null,null,n.services),n.myself.on("updated",(function(e){return n.emit("userUpdated",e)})),n.myself.on("userSubscribed",(function(){return n.emit("userSubscribed",n.myself)})),n.myself.on("userUnsubscribed",(function(){n.emit("userUnsubscribed",n.myself),n.myself._ensureFetched()})),n.services=e,n.subscribedUsers=new o.default,n.userDescriptorsPromise=n.services.session.getSessionLinks().then((function(e){return n.userDescriptors=new p.UserDescriptors({users:n,network:n.services.network},e.usersUrl),n.userDescriptors})),n.services.session.getMaxUserInfosToSubscribe().then((function(e){n.fifoStackMaxLength=e})),n.services.session.getUsersData().then((function(e){return n.myself.identity=e.identity,n.myself.entityName=e.user,n.myself._ensureFetched()})),n}return(0,l.default)(t,e),(0,u.default)(t,[{key:"handleUnsubscribeUser",value:function(e){this.subscribedUsers.has(e.identity)&&this.subscribedUsers.delete(e.identity);var t=-1;this.fifoStack.find((function(n,r){return n==e.identity&&(t=r,!0)}))&&this.fifoStack.splice(t,1),this.emit("userUnsubscribed",e)}},{key:"handleSubscribeUser",value:function(e){this.subscribedUsers.has(e.identity)||(this.fifoStack.length>=this.fifoStackMaxLength&&this.subscribedUsers.get(this.fifoStack.shift()).unsubscribe(),this.fifoStack.push(e.identity),this.subscribedUsers.set(e.identity,e),this.emit("userSubscribed",e))}},{key:"getUser",value:function(){var e=(0,i.default)(r.default.mark((function e(t){var n,i,o=this,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return r.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.services.session.getUsersData();case 2:return e.next=4,this.myself._ensureFetched();case 4:if(t!=this.myself.identity){e.next=6;break}return e.abrupt("return",this.myself);case 6:if(n=this.subscribedUsers.get(t)){e.next=19;break}if(a){e.next=13;break}return e.next=11,this.getUserDescriptor(t);case 11:i=e.sent,a=i._getDescriptor().sync_unique_name;case 13:return(n=new d.User(t,a,this.services)).on("updated",(function(e){return o.emit("userUpdated",e)})),n.on("userSubscribed",(function(){return o.handleSubscribeUser(n)})),n.on("userUnsubscribed",(function(){return o.handleUnsubscribeUser(n)})),e.next=19,n._ensureFetched();case 19:return e.abrupt("return",n);case 20:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"getUserDescriptor",value:function(){var e=(0,i.default)(r.default.mark((function e(t){return r.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.userDescriptorsPromise;case 2:return e.abrupt("return",this.userDescriptors.getUserDescriptor(t));case 3:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"getChannelUserDescriptors",value:function(){var e=(0,i.default)(r.default.mark((function e(t){return r.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.userDescriptorsPromise;case 2:return e.abrupt("return",this.userDescriptors.getChannelUserDescriptors(t));case 3:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"getSubscribedUsers",value:function(){var e=(0,i.default)(r.default.mark((function e(){var t;return r.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.services.session.getUsersData();case 2:return e.next=4,this.myself._ensureFetched();
2case 4:return t=[this.myself],this.subscribedUsers.forEach((function(e){return t.push(e)})),e.abrupt("return",t);case 7:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()}]),t}(h.EventEmitter);t.Users=v},function(e,t,n){"use strict";var r=s(n(38)),i=s(n(40)),o=s(n(23)),a=s(n(24));function s(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var u=n(54),c=n(121),l=n(625),f=function(){function e(t,n){(0,o.default)(this,e),this.services=t,this.url=n}return(0,a.default)(e,[{key:"getUserDescriptor",value:function(){var e=(0,i.default)(r.default.mark((function e(t){var n,i;return r.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=new u.UriBuilder(this.url).path(t).build(),e.next=3,this.services.network.get(n);case 3:return i=e.sent,e.abrupt("return",new l.UserDescriptor(this.services,i.body));case 5:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"getChannelUserDescriptors",value:function(){var e=(0,i.default)(r.default.mark((function e(t){var n,i,o=this,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return r.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=new u.UriBuilder(this.url).arg("ChannelSid",t).arg("PageToken",a.pageToken).build(),e.next=3,this.services.network.get(n);case 3:return i=e.sent,e.abrupt("return",new c.RestPaginator(i.body.users.map((function(e){return new l.UserDescriptor(o.services,e)})),(function(e){return o.getChannelUserDescriptors(t,{pageToken:e})}),i.body.meta.prev_token,i.body.meta.next_token));case 5:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()}]),e}();t.UserDescriptors=f},function(e,t,n){"use strict";var r=o(n(23)),i=o(n(24));function o(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var a=n(53),s=n(54),u=a.Logger.scope("UserDescriptor"),c=function(){function e(t,n){(0,r.default)(this,e),this.services=t,this.descriptor=n,this.identity=n.identity,this.friendlyName=n.friendly_name,this.attributes=s.parseAttributes(n.attributes,"Failed to parse user attributes",u),this.online=n.is_online,this.notifiable=n.is_notifiable}return(0,i.default)(e,[{key:"subscribe",value:function(){return this.services.users.getUser(this.identity,this.descriptor.sync_unique_name)}},{key:"_getDescriptor",value:function(){return this.descriptor}}]),e}();t.UserDescriptor=c},function(e,t,n){"use strict";var r=s(n(49)),i=s(n(72)),o=s(n(23)),a=s(n(24));function s(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var u=n(53),c=n(265),l=u.Logger.scope("TypingIndicator"),f=function(){function e(t,n,r){(0,o.default)(this,e),this.config=t,this.services=n,this.getChannel=r,this.serviceTypingTimeout=null,this.sentUpdates=new i.default}return(0,a.default)(e,[{key:"initialize",value:function(){var e=this;this.services.notificationClient.subscribe(c.NotificationTypes.TYPING_INDICATOR,"twilsock"),this.services.notificationClient.on("message",(function(t,n){t===c.NotificationTypes.TYPING_INDICATOR&&e.handleRemoteTyping(n)}))}},{key:"handleRemoteTyping",value:function(e){var t=this;l.trace("Got new typing indicator ",e),this.getChannel(e.channel_sid).then((function(n){n&&n.members.forEach((function(n){if(n.identity===e.identity){var r=t.config.typingIndicatorTimeoutOverride+1e3||1e3*e.typing_timeout;n._startTyping(r)}}))})).catch((function(e){throw l.error(e),e}))}},{key:"send",value:function(e){var t=this.sentUpdates.get(e);return t&&t>Date.now()-this.typingTimeout?r.default.resolve():(this.sentUpdates.set(e,Date.now()),this._send(e))}},{key:"_send",value:function(e){var t=this;l.trace("Sending typing indicator");var n=this.config.typingIndicatorUri,r="ChannelSid="+e;return this.services.transport.post(n,{"Content-Type":"application/x-www-form-urlencoded"},r).then((function(e){e.body.hasOwnProperty("typing_timeout")&&(t.serviceTypingTimeout=1e3*e.body.typing_timeout)})).catch((function(e){throw l.error("Failed to send typing indicator:",e),e}))}},{key:"typingTimeout",get:function(){return this.config.typingIndicatorTimeoutOverride||this.serviceTypingTimeout||this.config.typingIndicatorTimeoutDefault}}]),e}();t.TypingIndicator=f},function(e,t,n){"use strict";var r=s(n(49)),i=s(n(72)),o=s(n(24)),a=s(n(23));
2function s(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var u=n(291),c=function(){function e(t){(0,a.default)(this,e),this.services=t,this.consumptionHorizonRequests=new i.default,this.consumptionHorizonUpdateTimer=null}return(0,o.default)(e,[{key:"getReportInterval",value:function(){return this.services.session.getConsumptionReportInterval().then((function(e){return 1e3*e}))}},{key:"delayedSendConsumptionHorizon",value:function(e){var t=this;null===this.consumptionHorizonUpdateTimer&&(this.sendConsumptionReport(!0),this.consumptionHorizonUpdateTimer=setTimeout((function(){t.sendConsumptionReport(!1)}),e))}},{key:"sendConsumptionReport",value:function(e){var t=this,n=[],r=new i.default;this.consumptionHorizonRequests.forEach((function(e,t){n.push(e.entry),r.set(t,e.promises)})),n.length>0&&this.services.session.addCommand("consumptionReportV2",{report:n}).then((function(e){return t.processConsumptionReportResponse(e,r)})).catch((function(e){return t.processConsumptionReportError(e,r)})),e||(this.consumptionHorizonUpdateTimer=null),this.consumptionHorizonRequests.clear()}},{key:"processConsumptionReportResponse",value:function(e,t){e&&e.report&&Array.isArray(e.report)&&e.report.length>0&&e.report.forEach((function(e){var n=e;if(t.has(n.channelSid)){var r=null;"undefined"!==typeof n.unreadMessagesCount&&null!=n.unreadMessagesCount&&(r=n.unreadMessagesCount),t.get(n.channelSid).forEach((function(e){return e.resolve(r)})),t.delete(n.channelSid)}})),this.processConsumptionReportError(new u.SessionError("Error while setting LastConsumedMessageIndex",null),t)}},{key:"processConsumptionReportError",value:function(e,t){t.forEach((function(t){return t.forEach((function(t){return t.reject(e)}))}))}},{key:"updateLastConsumedMessageIndexForChannel",value:function(e,t){var n=this;return new r.default((function(r,i){n.addPendingConsumptionHorizonRequest(e,{channelSid:e,messageIdx:t},{resolve:r,reject:i}),n.getReportInterval().then((function(e){return n.delayedSendConsumptionHorizon(e)}))}))}},{key:"advanceLastConsumedMessageIndexForChannel",value:function(e,t,n){var i=this,o=this.consumptionHorizonRequests.get(e);return new r.default((function(r,a){o&&o.entry?o.entry.messageIdx>=t?i.addPendingConsumptionHorizonRequest(e,o.entry,{resolve:r,reject:a}):i.addPendingConsumptionHorizonRequest(e,{channelSid:e,messageIdx:t},{resolve:r,reject:a}):null!==n&&t<n?i.addPendingConsumptionHorizonRequest(e,{channelSid:e,messageIdx:n},{resolve:r,reject:a}):i.addPendingConsumptionHorizonRequest(e,{channelSid:e,messageIdx:t},{resolve:r,reject:a}),i.getReportInterval().then((function(e){return i.delayedSendConsumptionHorizon(e)}))}))}},{key:"addPendingConsumptionHorizonRequest",value:function(e,t,n){if(this.consumptionHorizonRequests.has(e)){var r=this.consumptionHorizonRequests.get(e);r.entry=t,r.promises.push(n)}else this.consumptionHorizonRequests.set(e,{entry:t,promises:[n]})}}]),e}();t.ConsumptionHorizon=c},function(e,t,n){"use strict";var r=s(n(38)),i=s(n(40)),o=s(n(23)),a=s(n(24));function s(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var u=n(54),c=n(121),l=n(258),f=function(){function e(t,n,r){(0,o.default)(this,e),this.client=t,this.services=n,this.url=r}return(0,a.default)(e,[{key:"getChannels",value:function(){var e=(0,i.default)(r.default.mark((function e(){var t,n,i=this,o=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return r.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=new u.UriBuilder(this.url).arg("PageToken",o.pageToken).build(),e.next=3,this.services.network.get(t);case 3:return n=e.sent,e.abrupt("return",new c.RestPaginator(n.body.channels.map((function(e){return new l.ChannelDescriptor(i.client,e)})),(function(e){return i.getChannels({pageToken:e})}),n.body.meta.previous_token,n.body.meta.next_token));case 5:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()}]),e}();t.UserChannels=f},function(e,t,n){"use strict";var r,i=n(23),o=(r=i)&&r.__esModule?r:{default:r};
2Object.defineProperty(t,"__esModule",{value:!0});t.PushNotification=function e(t){(0,o.default)(this,e),this.title=t.title||null,this.body=t.body||null,this.sound=t.sound||null,this.badge=t.badge||null,this.action=t.action||null,this.type=t.type||null,this.data=t.data||{}}},,,function(e,t,n){"use strict";var r="function"===typeof Symbol&&Symbol.for,i=r?Symbol.for("react.element"):60103,o=r?Symbol.for("react.portal"):60106,a=r?Symbol.for("react.fragment"):60107,s=r?Symbol.for("react.strict_mode"):60108,u=r?Symbol.for("react.profiler"):60114,c=r?Symbol.for("react.provider"):60109,l=r?Symbol.for("react.context"):60110,f=r?Symbol.for("react.async_mode"):60111,h=r?Symbol.for("react.concurrent_mode"):60111,d=r?Symbol.for("react.forward_ref"):60112,p=r?Symbol.for("react.suspense"):60113,v=r?Symbol.for("react.suspense_list"):60120,y=r?Symbol.for("react.memo"):60115,m=r?Symbol.for("react.lazy"):60116,g=r?Symbol.for("react.block"):60121,b=r?Symbol.for("react.fundamental"):60117,_=r?Symbol.for("react.responder"):60118,w=r?Symbol.for("react.scope"):60119;function k(e){if("object"===typeof e&&null!==e){var t=e.$$typeof;switch(t){case i:switch(e=e.type){case f:case h:case a:case u:case s:case p:return e;default:switch(e=e&&e.$$typeof){case l:case d:case m:case y:case c:return e;default:return t}}case o:return t}}}function S(e){return k(e)===h}t.AsyncMode=f,t.ConcurrentMode=h,t.ContextConsumer=l,t.ContextProvider=c,t.Element=i,t.ForwardRef=d,t.Fragment=a,t.Lazy=m,t.Memo=y,t.Portal=o,t.Profiler=u,t.StrictMode=s,t.Suspense=p,t.isAsyncMode=function(e){return S(e)||k(e)===f},t.isConcurrentMode=S,t.isContextConsumer=function(e){return k(e)===l},t.isContextProvider=function(e){return k(e)===c},t.isElement=function(e){return"object"===typeof e&&null!==e&&e.$$typeof===i},t.isForwardRef=function(e){return k(e)===d},t.isFragment=function(e){return k(e)===a},t.isLazy=function(e){return k(e)===m},t.isMemo=function(e){return k(e)===y},t.isPortal=function(e){return k(e)===o},t.isProfiler=function(e){return k(e)===u},t.isStrictMode=function(e){return k(e)===s},t.isSuspense=function(e){return k(e)===p},t.isValidElementType=function(e){return"string"===typeof e||"function"===typeof e||e===a||e===h||e===u||e===s||e===p||e===v||"object"===typeof e&&null!==e&&(e.$$typeof===m||e.$$typeof===y||e.$$typeof===c||e.$$typeof===l||e.$$typeof===d||e.$$typeof===b||e.$$typeof===_||e.$$typeof===w||e.$$typeof===g)},t.typeOf=k},function(e,t){e.exports=Array.isArray||function(e){return"[object Array]"==Object.prototype.toString.call(e)}},,,function(e,t,n){"use strict";var r,i=n(2),o=n(11),a=n(33),s=n(3),u=n(298),c="0.4.18",l=1e4,f="w:0.4.18",h="FIS_v2",d=36e5,p=((r={})["missing-app-config-values"]='Missing App configuration value: "{$valueName}"',r["not-registered"]="Firebase Installation is not registered.",r["installation-not-found"]="Firebase Installation not found.",r["request-failed"]='{$requestName} request failed with error "{$serverCode} {$serverStatus}: {$serverMessage}"',r["app-offline"]="Could not process request. Application offline.",r["delete-pending-registration"]="Can't delete installation while there is a pending registration request.",r),v=new s.b("installations","Installations",p);function y(e){return e instanceof s.c&&e.code.includes("request-failed")}function m(e){return"https://firebaseinstallations.googleapis.com/v1/projects/"+e.projectId+"/installations"}function g(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 Object(i.b)(this,void 0,void 0,(function(){var n,r;return Object(i.d)(this,(function(i){switch(i.label){case 0:return[4,t.json()];case 1:return n=i.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",function(e){return"FIS_v2 "+e}(n)),r}function k(e){return Object(i.b)(this,void 0,void 0,(function(){var t;return Object(i.d)(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 S(e,t){var n=t.fid;return Object(i.b)(this,void 0,void 0,(function(){var t,r,o,a,s,u;return Object(i.d)(this,(function(i){switch(i.label){case 0:return t=m(e),r=_(e),o={fid:n,authVersion:h,appId:e.appId,sdkVersion:f},a={method:"POST",headers:r,body:JSON.stringify(o)},[4,k((function(){return fetch(t,a)}))];case 1:return(s=i.sent()).ok?[4,s.json()]:[3,3];case 2:return u=i.sent(),[2,{fid:u.fid||n,registrationStatus:2,refreshToken:u.refreshToken,authToken:g(u.authToken)}];case 3:return[4,b("Create Installation",s)];case 4:throw i.sent()}}))}))}function O(e){return new Promise((function(t){setTimeout(t,e)}))}var E=/^[cdef][\w-]{21}$/;function T(){try{var e=new Uint8Array(17);(self.crypto||self.msCrypto).getRandomValues(e),e[0]=112+e[0]%16;var t=function(e){return(t=e,btoa(String.fromCharCode.apply(String,Object(i.f)(t))).replace(/\+/g,"-").replace(/\//g,"_")).substr(0,22);var t}(e);return E.test(t)?t:""}catch(n){return""}}function C(e){return e.appName+"!"+e.appId}var P=new Map;function x(e,t){var n=C(e);I(n,t),function(e,t){var n=R();n&&n.postMessage({key:e,fid:t});A()}(n,t)}function I(e,t){var n,r,o=P.get(e);if(o)try{for(var a=Object(i.h)(o),s=a.next();!s.done;s=a.next()){(0,s.value)(t)}}catch(u){n={error:u}}finally{try{s&&!s.done&&(r=a.return)&&r.call(a)}finally{if(n)throw n.error}}}var j=null;function R(){return!j&&"BroadcastChannel"in self&&((j=new BroadcastChannel("[Firebase] FID Change")).onmessage=function(e){I(e.data.key,e.data.fid)}),j}function A(){0===P.size&&j&&(j.close(),j=null)}var M,N="firebase-installations-store",L=null;function D(){return L||(L=Object(u.openDb)("firebase-installations-database",1,(function(e){switch(e.oldVersion){case 0:e.createObjectStore(N)}}))),L}function F(e,t){return Object(i.b)(this,void 0,void 0,(function(){var n,r,o,a,s;return Object(i.d)(this,(function(i){switch(i.label){case 0:return n=C(e),[4,D()];case 1:return r=i.sent(),o=r.transaction(N,"readwrite"),[4,(a=o.objectStore(N)).get(n)];case 2:return s=i.sent(),[4,a.put(t,n)];case 3:return i.sent(),[4,o.complete];case 4:return i.sent(),s&&s.fid===t.fid||x(e,t.fid),[2,t]}}))}))}function U(e){return Object(i.b)(this,void 0,void 0,(function(){var t,n,r;return Object(i.d)(this,(function(i){switch(i.label){case 0:return t=C(e),[4,D()];case 1:return n=i.sent(),[4,(r=n.transaction(N,"readwrite")).objectStore(N).delete(t)];case 2:return i.sent(),[4,r.complete];case 3:return i.sent(),[2]}}))}))}function V(e,t){return Object(i.b)(this,void 0,void 0,(function(){var n,r,o,a,s,u;return Object(i.d)(this,(function(i){switch(i.label){case 0:return n=C(e),[4,D()];case 1:return r=i.sent(),o=r.transaction(N,"readwrite"),[4,(a=o.objectStore(N)).get(n)];case 2:return s=i.sent(),void 0!==(u=t(s))?[3,4]:[4,a.delete(n)];case 3:return i.sent(),[3,6];case 4:return[4,a.put(u,n)];case 5:i.sent(),i.label=6;case 6:return[4,o.complete];case 7:return i.sent(),!u||s&&s.fid===u.fid||x(e,u.fid),[2,u]}}))}))}function B(e){return Object(i.b)(this,void 0,void 0,(function(){var t,n,r;return Object(i.d)(this,(function(o){switch(o.label){case 0:return[4,V(e,(function(n){var r=function(e){return z(e||{fid:T(),registrationStatus:0})}(n),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()};return{installationEntry:n,registrationPromise:function(e,t){return Object(i.b)(this,void 0,void 0,(function(){var n,r;return Object(i.d)(this,(function(i){switch(i.label){case 0:return i.trys.push([0,2,,7]),[4,S(e,t)];case 1:return n=i.sent(),[2,F(e,n)];case 2:return y(r=i.sent())&&409===r.customData.serverCode?[4,U(e)]:[3,4];case 3:return i.sent(),[3,6];case 4:return[4,F(e,{fid:t.fid,registrationStatus:0})];case 5:i.sent(),i.label=6;case 6:throw r;case 7:return[2]}}
2))}))}(e,n)}}return 1===t.registrationStatus?{installationEntry:t,registrationPromise:q(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 q(e){return Object(i.b)(this,void 0,void 0,(function(){var t,n,r,o;return Object(i.d)(this,(function(i){switch(i.label){case 0:return[4,W(e)];case 1:t=i.sent(),i.label=2;case 2:return 1!==t.registrationStatus?[3,5]:[4,O(100)];case 3:return i.sent(),[4,W(e)];case 4:return t=i.sent(),[3,2];case 5:return 0!==t.registrationStatus?[3,7]:[4,B(e)];case 6:return n=i.sent(),r=n.installationEntry,(o=n.registrationPromise)?[2,o]:[2,r];case 7:return[2,t]}}))}))}function W(e){return V(e,(function(e){if(!e)throw v.create("installation-not-found");return z(e)}))}function z(e){return 1===(t=e).registrationStatus&&t.registrationTime+l<Date.now()?{fid:e.fid,registrationStatus:0}:e;var t}function H(e,t){var n=e.appConfig,r=e.platformLoggerProvider;return Object(i.b)(this,void 0,void 0,(function(){var e,o,a,s,u,c,l;return Object(i.d)(this,(function(i){switch(i.label){case 0:return e=function(e,t){var n=t.fid;return m(e)+"/"+n+"/authTokens:generate"}(n,t),o=w(n,t),(a=r.getImmediate({optional:!0}))&&o.append("x-firebase-client",a.getPlatformInfoString()),s={installation:{sdkVersion:f}},u={method:"POST",headers:o,body:JSON.stringify(s)},[4,k((function(){return fetch(e,u)}))];case 1:return(c=i.sent()).ok?[4,c.json()]:[3,3];case 2:return l=i.sent(),[2,g(l)];case 3:return[4,b("Generate Auth Token",c)];case 4:throw i.sent()}}))}))}function G(e,t){return void 0===t&&(t=!1),Object(i.b)(this,void 0,void 0,(function(){var n,r,o;return Object(i.d)(this,(function(a){switch(a.label){case 0:return[4,V(e.appConfig,(function(r){if(!Y(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+d}(e)}(o))return r;if(1===o.requestStatus)return n=function(e,t){return Object(i.b)(this,void 0,void 0,(function(){var n,r;return Object(i.d)(this,(function(i){switch(i.label){case 0:return[4,K(e.appConfig)];case 1:n=i.sent(),i.label=2;case 2:return 1!==n.authToken.requestStatus?[3,5]:[4,O(100)];case 3:return i.sent(),[4,K(e.appConfig)];case 4:return n=i.sent(),[3,2];case 5:return 0===(r=n.authToken).requestStatus?[2,G(e,t)]:[2,r]}}))}))}(e,t),r;if(!navigator.onLine)throw v.create("app-offline");var a=function(e){var t={requestStatus:1,requestTime:Date.now()};return Object(i.a)(Object(i.a)({},e),{authToken:t})}(r);return n=function(e,t){return Object(i.b)(this,void 0,void 0,(function(){var n,r,o;return Object(i.d)(this,(function(a){switch(a.label){case 0:return a.trys.push([0,3,,8]),[4,H(e,t)];case 1:return n=a.sent(),o=Object(i.a)(Object(i.a)({},t),{authToken:n}),[4,F(e.appConfig,o)];case 2:return a.sent(),[2,n];case 3:return!y(r=a.sent())||401!==r.customData.serverCode&&404!==r.customData.serverCode?[3,5]:[4,U(e.appConfig)];case 4:return a.sent(),[3,7];case 5:return o=Object(i.a)(Object(i.a)({},t),{authToken:{requestStatus:0}}),[4,F(e.appConfig,o)];case 6:a.sent(),a.label=7;case 7:throw r;case 8:return[2]}}
2))}))}(e,a),a}))];case 1:return r=a.sent(),n?[4,n]:[3,3];case 2:return o=a.sent(),[3,4];case 3:o=r.authToken,a.label=4;case 4:return[2,o]}}))}))}function K(e){return V(e,(function(e){if(!Y(e))throw v.create("not-registered");var t,n=e.authToken;return 1===(t=n).requestStatus&&t.requestTime+l<Date.now()?Object(i.a)(Object(i.a)({},e),{authToken:{requestStatus:0}}):e}))}function Y(e){return void 0!==e&&2===e.registrationStatus}function Q(e){return Object(i.b)(this,void 0,void 0,(function(){var t;return Object(i.d)(this,(function(n){switch(n.label){case 0:return[4,B(e)];case 1:return(t=n.sent().registrationPromise)?[4,t]:[3,3];case 2:n.sent(),n.label=3;case 3:return[2]}}))}))}function $(e,t){return Object(i.b)(this,void 0,void 0,(function(){var n,r,o,a;return Object(i.d)(this,(function(i){switch(i.label){case 0:return n=function(e,t){var n=t.fid;return m(e)+"/"+n}(e,t),r=w(e,t),o={method:"DELETE",headers:r},[4,k((function(){return fetch(n,o)}))];case 1:return(a=i.sent()).ok?[3,3]:[4,b("Delete Installation",a)];case 2:throw i.sent();case 3:return[2]}}
2))}))}function X(e,t){var n=e.appConfig;return function(e,t){R();var n=C(e),r=P.get(n);r||(r=new Set,P.set(n,r)),r.add(t)}(n,t),function(){!function(e,t){var n=C(e),r=P.get(n);r&&(r.delete(t),0===r.size&&P.delete(n),A())}(n,t)}}function J(e){return v.create("missing-app-config-values",{valueName:e})}(M=o.a).INTERNAL.registerComponent(new a.a("installations",(function(e){var t=e.getProvider("app").getImmediate(),n={appConfig:function(e){var t,n;if(!e||!e.options)throw J("App Configuration");if(!e.name)throw J("App Name");try{for(var r=Object(i.h)(["projectId","apiKey","appId"]),o=r.next();!o.done;o=r.next()){var a=o.value;if(!e.options[a])throw J(a)}}catch(s){t={error:s}}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 Object(i.b)(this,void 0,void 0,(function(){var t,n,r;return Object(i.d)(this,(function(i){switch(i.label){case 0:return[4,B(e.appConfig)];case 1:return t=i.sent(),n=t.installationEntry,(r=t.registrationPromise)?r.catch(console.error):G(e).catch(console.error),[2,n.fid]}}))}))}(n)},getToken:function(e){return function(e,t){return void 0===t&&(t=!1),Object(i.b)(this,void 0,void 0,(function(){return Object(i.d)(this,(function(n){switch(n.label){case 0:return[4,Q(e.appConfig)];case 1:return n.sent(),[4,G(e,t)];case 2:return[2,n.sent().token]}}))}))}(n,e)},delete:function(){return function(e){return Object(i.b)(this,void 0,void 0,(function(){var t,n;return Object(i.d)(this,(function(r){switch(r.label){case 0:return[4,V(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,$(t,n)];case 4:return r.sent(),[4,U(t)];case 5:r.sent(),r.label=6;case 6:return[2]}}
2))}))}(n)},onIdChange:function(e){return X(n,e)}}}),"PUBLIC")),M.registerVersion("@firebase/installations",c);var Z,ee,te=n(37),ne="https://www.googletagmanager.com/gtag/js";!function(e){e.EVENT="event",e.SET="set",e.CONFIG="config"}(Z||(Z={})),function(e){e.ADD_SHIPPING_INFO="add_shipping_info",e.ADD_PAYMENT_INFO="add_payment_info",e.ADD_TO_CART="add_to_cart",e.ADD_TO_WISHLIST="add_to_wishlist",e.BEGIN_CHECKOUT="begin_checkout",e.CHECKOUT_PROGRESS="checkout_progress",e.EXCEPTION="exception",e.GENERATE_LEAD="generate_lead",e.LOGIN="login",e.PAGE_VIEW="page_view",e.PURCHASE="purchase",e.REFUND="refund",e.REMOVE_FROM_CART="remove_from_cart",e.SCREEN_VIEW="screen_view",e.SEARCH="search",e.SELECT_CONTENT="select_content",e.SELECT_ITEM="select_item",e.SELECT_PROMOTION="select_promotion",e.SET_CHECKOUT_OPTION="set_checkout_option",e.SHARE="share",e.SIGN_UP="sign_up",e.TIMING_COMPLETE="timing_complete",e.VIEW_CART="view_cart",e.VIEW_ITEM="view_item",e.VIEW_ITEM_LIST="view_item_list",e.VIEW_PROMOTION="view_promotion",e.VIEW_SEARCH_RESULTS="view_search_results"}(ee||(ee={}));var re,ie=new te.b("@firebase/analytics");function oe(e,t,n,r,o,a){return Object(i.b)(this,void 0,void 0,(function(){var s,u,c,l;return Object(i.d)(this,(function(i){switch(i.label){case 0:s=r[o],i.label=1;case 1:return i.trys.push([1,7,,8]),s?[4,t[s]]:[3,3];case 2:return i.sent(),[3,6];case 3:return[4,Promise.all(n)];case 4:return u=i.sent(),(c=u.find((function(e){return e.measurementId===o})))?[4,t[c.appId]]:[3,6];case 5:i.sent(),i.label=6;case 6:return[3,8];case 7:return l=i.sent(),ie.error(l),[3,8];case 8:return e(Z.CONFIG,o,a),[2]}}))}))}function ae(e,t,n,r,o){return Object(i.b)(this,void 0,void 0,(function(){var a,s,u,c,l,f,h,d;return Object(i.d)(this,(function(i){switch(i.label){case 0:return i.trys.push([0,4,,5]),a=[],o&&o.send_to?(s=o.send_to,Array.isArray(s)||(s=[s]),[4,Promise.all(n)]):[3,2];case 1:for(u=i.sent(),c=function(e){var n=u.find((function(t){return t.measurementId===e})),r=n&&t[n.appId];if(!r)return a=[],"break";a.push(r)},l=0,f=s;l<f.length&&(h=f[l],"break"!==c(h));l++);i.label=2;case 2:return 0===a.length&&(a=Object.values(t)),[4,Promise.all(a)];case 3:return i.sent(),e(Z.EVENT,r,o||{}),[3,5];case 4:return d=i.sent(),ie.error(d),[3,5];case 5:return[2]}}
2))}))}function se(e,t,n,r,o){var a=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];window[r].push(arguments)};return window[o]&&"function"===typeof window[o]&&(a=window[o]),window[o]=function(e,t,n,r){return function(o,a,s){return Object(i.b)(this,void 0,void 0,(function(){var u;return Object(i.d)(this,(function(i){switch(i.label){case 0:return i.trys.push([0,6,,7]),o!==Z.EVENT?[3,2]:[4,ae(e,t,n,a,s)];case 1:return i.sent(),[3,5];case 2:return o!==Z.CONFIG?[3,4]:[4,oe(e,t,n,r,a,s)];case 3:return i.sent(),[3,5];case 4:e(Z.SET,a),i.label=5;case 5:return[3,7];case 6:return u=i.sent(),ie.error(u),[3,7];case 7:return[2]}}))}))}}(a,e,t,n),{gtagCore:a,wrappedGtag:window[o]}}var ue=((re={})["already-exists"]="A Firebase Analytics instance with the appId {$id} already exists. Only one Firebase Analytics instance can be created for each appId.",re["already-initialized"]="Firebase Analytics has already been initialized.settings() must be called before initializing any Analytics instanceor it will have no effect.",re["interop-component-reg-failed"]="Firebase Analytics Interop Component failed to instantiate: {$reason}",re["invalid-analytics-context"]="Firebase Analytics is not supported in this environment. Wrap initialization of analytics in analytics.isSupported() to prevent initialization in unsupported environments. Details: {$errorInfo}",re["indexeddb-unavailable"]="IndexedDB unavailable or restricted in this environment. Wrap initialization of analytics in analytics.isSupported() to prevent initialization in unsupported environments. Details: {$errorInfo}",re["fetch-throttle"]="The config fetch request timed out while in an exponential backoff state. Unix timestamp in milliseconds when fetch request throttling ends: {$throttleEndTimeMillis}.",re["config-fetch-failed"]="Dynamic config fetch failed: [{$httpStatus}] {$responseMessage}",re["no-api-key"]='The "apiKey" field is empty in the local Firebase config. Firebase Analytics requires this field tocontain a valid API key.',re["no-app-id"]='The "appId" field is empty in the local Firebase config. Firebase Analytics requires this field tocontain a valid app ID.',re),ce=new s.b("analytics","Analytics",ue),le=new(function(){function e(e,t){void 0===e&&(e={}),void 0===t&&(t=1e3),this.throttleMetadata=e,this.intervalMillis=t}return e.prototype.getThrottleMetadata=function(e){return this.throttleMetadata[e]},e.prototype.setThrottleMetadata=function(e,t){this.throttleMetadata[e]=t},e.prototype.deleteThrottleMetadata=function(e){delete this.throttleMetadata[e]},e}());function fe(e){return new Headers({Accept:"application/json","x-goog-api-key":e})}function he(e){var t;return Object(i.b)(this,void 0,void 0,(function(){var n,r,o,a,s,u,c;return Object(i.d)(this,(function(i){switch(i.label){case 0:return n=e.appId,r=e.apiKey,o={method:"GET",headers:fe(r)},a="https://firebase.googleapis.com/v1alpha/projects/-/apps/{app-id}/webConfig".replace("{app-id}",n),[4,fetch(a,o)];case 1:if(200===(s=i.sent()).status||304===s.status)return[3,6];u="",i.label=2;case 2:return i.trys.push([2,4,,5]),[4,s.json()];case 3:return c=i.sent(),(null===(t=c.error)||void 0===t?void 0:t.message)&&(u=c.error.message),[3,5];case 4:return i.sent(),[3,5];case 5:throw ce.create("config-fetch-failed",{httpStatus:s.status,responseMessage:u});case 6:return[2,s.json()]}}))}))}function de(e,t,n,r){var o=t.throttleEndTimeMillis,a=t.backoffCount;return void 0===r&&(r=le),Object(i.b)(this,void 0,void 0,(function(){var t,u,c,l,f,h,d;return Object(i.d)(this,(function(i){switch(i.label){case 0:t=e.appId,u=e.measurementId,i.label=1;case 1:return i.trys.push([1,3,,4]),[4,pe(n,o)];case 2:return i.sent(),[3,4];case 3:if(c=i.sent(),u)return ie.warn("Timed out fetching this Firebase app's measurement ID from the server. Falling back to the measurement ID "+u+' provided in the "measurementId" field in the local Firebase config. ['+c.message+"]"),[2,{appId:t,measurementId:u}];throw c;case 4:return i.trys.push([4,6,,7]),[4,he(e)];case 5:return l=i.sent(),r.deleteThrottleMetadata(t),[2,l];case 6:if(!function(e){if(!(e instanceof s.c)||!e.customData)return!1;var t=Number(e.customData.httpStatus);return 429===t||500===t||503===t||504===t}(f=i.sent())){if(r.deleteThrottleMetadata(t),u)return ie.warn("Failed to fetch this Firebase app's measurement ID from the server. Falling back to the measurement ID "+u+' provided in the "measurementId" field in the local Firebase config. ['+f.message+"]"),[2,{appId:t,measurementId:u}];throw f}
2return h=503===Number(f.customData.httpStatus)?Object(s.j)(a,r.intervalMillis,30):Object(s.j)(a,r.intervalMillis),d={throttleEndTimeMillis:Date.now()+h,backoffCount:a+1},r.setThrottleMetadata(t,d),ie.debug("Calling attemptFetch again in "+h+" millis"),[2,de(e,d,n,r)];case 7:return[2]}}))}))}function pe(e,t){return new Promise((function(n,r){var i=Math.max(t-Date.now(),0),o=setTimeout(n,i);e.addEventListener((function(){clearTimeout(o),r(ce.create("fetch-throttle",{throttleEndTimeMillis:t}))}))}))}var ve=function(){function e(){this.listeners=[]}return e.prototype.addEventListener=function(e){this.listeners.push(e)},e.prototype.abort=function(){this.listeners.forEach((function(e){return e()}))},e}();function ye(e,t,n,r,o){return Object(i.b)(this,void 0,void 0,(function(){var a,u,c,l,f,h,d;return Object(i.d)(this,(function(p){switch(p.label){case 0:return(a=function(e,t,n){return void 0===t&&(t=le),Object(i.b)(this,void 0,void 0,(function(){var r,o,a,s,u,c,l=this;return Object(i.d)(this,(function(f){if(r=e.options,o=r.appId,a=r.apiKey,s=r.measurementId,!o)throw ce.create("no-app-id");if(!a){if(s)return[2,{measurementId:s,appId:o}];throw ce.create("no-api-key")}return u=t.getThrottleMetadata(o)||{backoffCount:0,throttleEndTimeMillis:Date.now()},c=new ve,setTimeout((function(){return Object(i.b)(l,void 0,void 0,(function(){return Object(i.d)(this,(function(e){return c.abort(),[2]}))}))}),void 0!==n?n:6e4),[2,de({appId:o,apiKey:a,measurementId:s},u,c,t)]}))}))}(e)).then((function(t){n[t.measurementId]=t.appId,e.options.measurementId&&t.measurementId!==e.options.measurementId&&ie.warn("The measurement ID in the local Firebase config ("+e.options.measurementId+") does not match the measurement ID fetched from the server ("+t.measurementId+"). To ensure analytics events are always sent to the correct Analytics property, update the measurement ID field in the local config or remove it from the local config.")})).catch((function(e){return ie.error(e)})),t.push(a),u=function(){return Object(i.b)(this,void 0,void 0,(function(){var e;return Object(i.d)(this,(function(t){switch(t.label){case 0:return Object(s.w)()?[3,1]:(ie.warn(ce.create("indexeddb-unavailable",{errorInfo:"IndexedDB is not available in this environment."}).message),[2,!1]);case 1:return t.trys.push([1,3,,4]),[4,Object(s.N)()];case 2:return t.sent(),[3,4];case 3:return e=t.sent(),ie.warn(ce.create("indexeddb-unavailable",{errorInfo:e}).message),[2,!1];case 4:return[2,!0]}}))}))}().then((function(e){return e?r.getId():void 0})),[4,Promise.all([a,u])];case 1:return c=p.sent(),l=c[0],f=c[1],o("js",new Date),(d={}).origin="firebase",d.update=!0,h=d,null!=f&&(h.firebase_id=f),o(Z.CONFIG,l.measurementId,h),[2,l.measurementId]}}))}))}var me,ge,be={},_e=[],we={},ke="dataLayer",Se="gtag",Oe=!1;function Ee(e){if(Oe)throw ce.create("already-initialized");e.dataLayerName&&(ke=e.dataLayerName),e.gtagName&&(Se=e.gtagName)}function Te(e,t){!function(){var e=[];if(Object(s.s)()&&e.push("This is a browser extension environment."),Object(s.e)()||e.push("Cookies are not available."),e.length>0){var t=e.map((function(e,t){return"("+(t+1)+") "+e})).join(" "),n=ce.create("invalid-analytics-context",{errorInfo:t});ie.warn(n.message)}}();var n=e.options.appId;if(!n)throw ce.create("no-app-id");if(!e.options.apiKey){if(!e.options.measurementId)throw ce.create("no-api-key");ie.warn('The "apiKey" field is empty in the local Firebase config. This is needed to fetch the latest measurement ID for this Firebase app. Falling back to the measurement ID '+e.options.measurementId+' provided in the "measurementId" field in the local Firebase config.')}if(null!=be[n])throw ce.create("already-exists",{id:n});if(!Oe){(function(){for(var e=window.document.getElementsByTagName("script"),t=0,n=Object.values(e);t<n.length;t++){var r=n[t];if(r.src&&r.src.includes(ne))return r}return null})()||function(e){var t=document.createElement("script");t.src=ne+"?l="+e,t.async=!0,document.head.appendChild(t)}(ke),function(e){var t=[];Array.isArray(window[e])?t=window[e]:window[e]=t}(ke);var r=se(be,_e,we,ke,Se),o=r.wrappedGtag,a=r.gtagCore;ge=o,me=a,Oe=!0}return be[n]=ye(e,_e,we,t,me),{app:e,logEvent:function(e,t,r){(function(e,t,n,r,o){return Object(i.b)(this,void 0,void 0,(function(){var a,s;return Object(i.d)(this,(function(u){switch(u.label){case 0:return o&&o.global?(e(Z.EVENT,n,r),[2]):[3,1];case 1:return[4,t];case 2:a=u.sent(),s=Object(i.a)(Object(i.a)({},r),{send_to:a}),e(Z.EVENT,n,s),u.label=3;case 3:return[2]}}
2))}))})(ge,be[n],e,t,r).catch((function(e){return ie.error(e)}))},setCurrentScreen:function(e,t){(function(e,t,n,r){return Object(i.b)(this,void 0,void 0,(function(){var o;return Object(i.d)(this,(function(i){switch(i.label){case 0:return r&&r.global?(e(Z.SET,{screen_name:n}),[2,Promise.resolve()]):[3,1];case 1:return[4,t];case 2:o=i.sent(),e(Z.CONFIG,o,{update:!0,screen_name:n}),i.label=3;case 3:return[2]}}))}))})(ge,be[n],e,t).catch((function(e){return ie.error(e)}))},setUserId:function(e,t){(function(e,t,n,r){return Object(i.b)(this,void 0,void 0,(function(){var o;return Object(i.d)(this,(function(i){switch(i.label){case 0:return r&&r.global?(e(Z.SET,{user_id:n}),[2,Promise.resolve()]):[3,1];case 1:return[4,t];case 2:o=i.sent(),e(Z.CONFIG,o,{update:!0,user_id:n}),i.label=3;case 3:return[2]}}))}))})(ge,be[n],e,t).catch((function(e){return ie.error(e)}))},setUserProperties:function(e,t){(function(e,t,n,r){return Object(i.b)(this,void 0,void 0,(function(){var o,a,s,u,c;return Object(i.d)(this,(function(i){switch(i.label){case 0:if(!r||!r.global)return[3,1];for(o={},a=0,s=Object.keys(n);a<s.length;a++)u=s[a],o["user_properties."+u]=n[u];return e(Z.SET,o),[2,Promise.resolve()];case 1:return[4,t];case 2:c=i.sent(),e(Z.CONFIG,c,{update:!0,user_properties:n}),i.label=3;case 3:return[2]}}
2))}))})(ge,be[n],e,t).catch((function(e){return ie.error(e)}))},setAnalyticsCollectionEnabled:function(e){(function(e,t){return Object(i.b)(this,void 0,void 0,(function(){var n;return Object(i.d)(this,(function(r){switch(r.label){case 0:return[4,e];case 1:return n=r.sent(),window["ga-disable-"+n]=!t,[2]}}))}))})(be[n],e).catch((function(e){return ie.error(e)}))},INTERNAL:{delete:function(){return delete be[n],Promise.resolve()}}}}var Ce="analytics";function Pe(){return Object(i.b)(this,void 0,void 0,(function(){return Object(i.d)(this,(function(e){switch(e.label){case 0:if(Object(s.s)())return[2,!1];if(!Object(s.e)())return[2,!1];if(!Object(s.w)())return[2,!1];e.label=1;case 1:return e.trys.push([1,3,,4]),[4,Object(s.N)()];case 2:return[2,e.sent()];case 3:return e.sent(),[2,!1];case 4:return[2]}}))}))}!function(e){e.INTERNAL.registerComponent(new a.a(Ce,(function(e){return Te(e.getProvider("app").getImmediate(),e.getProvider("installations").getImmediate())}),"PUBLIC").setServiceProps({settings:Ee,EventName:ee,isSupported:Pe})),e.INTERNAL.registerComponent(new a.a("analytics-internal",(function(e){try{return{logEvent:e.getProvider(Ce).getImmediate().logEvent}}catch(t){throw ce.create("interop-component-reg-failed",{reason:t})}}),"PRIVATE")),e.registerVersion("@firebase/analytics","0.6.1")}(o.a)},function(e,t,n){"use strict";var r=n(11),i=n(2),o=n(3),a=n(33),s="firebasestorage.googleapis.com",u=function(e){function t(n,r){var i=e.call(this,T(n),"Firebase Storage: "+r)||this;return i.customData={serverResponse:null},Object.setPrototypeOf(i,t.prototype),i}return Object(i.c)(t,e),t.prototype.codeEquals=function(e){return T(e)===this.code},Object.defineProperty(t.prototype,"message",{get:function(){return this.customData.serverResponse?this.message+"\n"+this.customData.serverResponse:this.message},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"serverResponse",{get:function(){return this.customData.serverResponse},set:function(e){this.customData.serverResponse=e},enumerable:!1,configurable:!0}),t}(o.c),c="unknown",l="object-not-found",f="quota-exceeded",h="unauthenticated",d="unauthorized",p="retry-limit-exceeded",v="canceled",y="invalid-url",m="invalid-default-bucket",g="cannot-slice-blob",b="server-file-wrong-size",_="no-download-url",w="invalid-argument",k="app-deleted",S="invalid-root-operation",O="invalid-format",E="internal-error";function T(e){return"storage/"+e}function C(){return new u(c,"An unknown error occurred, please check the error payload for server response.")}function P(){return new u(v,"User canceled the upload/download.")}function x(){return new u(g,"Cannot slice blob for upload. Please retry the upload.")}function I(){return new u(k,"The Firebase app was deleted.")}function j(e,t){return new u(O,"String does not match format '"+e+"': "+t)}function R(e){throw new u(E,"Internal error: "+e)}var A={RAW:"raw",BASE64:"base64",BASE64URL:"base64url",DATA_URL:"data_url"},M=function(e,t){this.data=e,this.contentType=t||null};function N(e,t){switch(e){case A.RAW:return new M(L(t));case A.BASE64:case A.BASE64URL:return new M(D(e,t));case A.DATA_URL:return new M(function(e){var t=new F(e);return t.base64?D(A.BASE64,t.rest):function(e){var t;try{t=decodeURIComponent(e)}catch(n){throw j(A.DATA_URL,"Malformed data URL.")}return L(t)}(t.rest)}(t),new F(t).contentType)}throw C()}function L(e){for(var t=[],n=0;n<e.length;n++){var r=e.charCodeAt(n);if(r<=127)t.push(r);else if(r<=2047)t.push(192|r>>6,128|63&r);else if(55296===(64512&r))if(n<e.length-1&&56320===(64512&e.charCodeAt(n+1)))r=65536|(1023&r)<<10|1023&e.charCodeAt(++n),t.push(240|r>>18,128|r>>12&63,128|r>>6&63,128|63&r);else t.push(239,191,189);else 56320===(64512&r)?t.push(239,191,189):t.push(224|r>>12,128|r>>6&63,128|63&r)}return new Uint8Array(t)}function D(e,t){switch(e){case A.BASE64:var n=-1!==t.indexOf("-"),r=-1!==t.indexOf("_");if(n||r)throw j(e,"Invalid character '"+(n?"-":"_")+"' found: is it base64url encoded?");break;case A.BASE64URL:var i=-1!==t.indexOf("+"),o=-1!==t.indexOf("/");if(i||o)throw j(e,"Invalid character '"+(i?"+":"/")+"' found: is it base64 encoded?");t=t.replace(/-/g,"+").replace(/_/g,"/")}var a;try{a=atob(t)}catch(c){throw j(e,"Invalid character found")}for(var s=new Uint8Array(a.length),u=0;u<a.length;
2u++)s[u]=a.charCodeAt(u);return s}var F=function(e){this.base64=!1,this.contentType=null;var t=e.match(/^data:([^,]+)?,/);if(null===t)throw j(A.DATA_URL,"Must be formatted 'data:[<mediatype>][;base64],<data>");var n=t[1]||null;null!=n&&(this.base64=(r=n,i=";base64",r.length>=i.length&&r.substring(r.length-i.length)===i),this.contentType=this.base64?n.substring(0,n.length-";base64".length):n),this.rest=e.substring(e.indexOf(",")+1);var r,i};var U,V={STATE_CHANGED:"state_changed"},B="running",q="pausing",W="paused",z="success",H="canceling",G="canceled",K="error",Y={RUNNING:"running",PAUSED:"paused",SUCCESS:"success",CANCELED:"canceled",ERROR:"error"};function Q(e){switch(e){case B:case q:case H:return Y.RUNNING;case W:return Y.PAUSED;case z:return Y.SUCCESS;case G:return Y.CANCELED;case K:default:return Y.ERROR}}function $(e){return null!=e}function X(e){return"string"===typeof e||e instanceof String}function J(e){return Z()&&e instanceof Blob}function Z(){return"undefined"!==typeof Blob}function ee(e,t,n,r){if(r<t)throw new u(w,"Invalid value for '"+e+"'. Expected "+t+" or greater.");if(r>n)throw new u(w,"Invalid value for '"+e+"'. Expected "+n+" or less.")}!function(e){e[e.NO_ERROR=0]="NO_ERROR",e[e.NETWORK_ERROR=1]="NETWORK_ERROR",e[e.ABORT=2]="ABORT"}(U||(U={}));var te=function(){function e(){var e=this;this.sent_=!1,this.xhr_=new XMLHttpRequest,this.errorCode_=U.NO_ERROR,this.sendPromise_=new Promise((function(t){e.xhr_.addEventListener("abort",(function(){e.errorCode_=U.ABORT,t(e)})),e.xhr_.addEventListener("error",(function(){e.errorCode_=U.NETWORK_ERROR,t(e)})),e.xhr_.addEventListener("load",(function(){t(e)}))}))}return e.prototype.send=function(e,t,n,r){if(this.sent_)throw R("cannot .send() more than once");if(this.sent_=!0,this.xhr_.open(t,e,!0),$(r))for(var i in r)r.hasOwnProperty(i)&&this.xhr_.setRequestHeader(i,r[i].toString());return $(n)?this.xhr_.send(n):this.xhr_.send(),this.sendPromise_},e.prototype.getErrorCode=function(){if(!this.sent_)throw R("cannot .getErrorCode() before sending");return this.errorCode_},e.prototype.getStatus=function(){if(!this.sent_)throw R("cannot .getStatus() before sending");try{return this.xhr_.status}catch(e){return-1}},e.prototype.getResponseText=function(){if(!this.sent_)throw R("cannot .getResponseText() before sending");return this.xhr_.responseText},e.prototype.abort=function(){this.xhr_.abort()},e.prototype.getResponseHeader=function(e){return this.xhr_.getResponseHeader(e)},e.prototype.addUploadProgressListener=function(e){$(this.xhr_.upload)&&this.xhr_.upload.addEventListener("progress",e)},e.prototype.removeUploadProgressListener=function(e){$(this.xhr_.upload)&&this.xhr_.upload.removeEventListener("progress",e)},e}(),ne=function(){function e(){}return e.prototype.createXhrIo=function(){return new te},e}();function re(){return"undefined"!==typeof BlobBuilder?BlobBuilder:"undefined"!==typeof WebKitBlobBuilder?WebKitBlobBuilder:void 0}function ie(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=re();if(void 0!==n){for(var r=new n,i=0;i<e.length;i++)r.append(e[i]);return r.getBlob()}if(Z())return new Blob(e);throw Error("This browser doesn't seem to support creating Blobs")}var oe=function(){function e(e,t){var n=0,r="";J(e)?(this.data_=e,n=e.size,r=e.type):e instanceof ArrayBuffer?(t?this.data_=new Uint8Array(e):(this.data_=new Uint8Array(e.byteLength),this.data_.set(new Uint8Array(e))),n=this.data_.length):e instanceof Uint8Array&&(t?this.data_=e:(this.data_=new Uint8Array(e.length),this.data_.set(e)),n=e.length),this.size_=n,this.type_=r}return e.prototype.size=function(){return this.size_},e.prototype.type=function(){return this.type_},e.prototype.slice=function(t,n){if(J(this.data_)){var r=function(e,t,n){return e.webkitSlice?e.webkitSlice(t,n):e.mozSlice?e.mozSlice(t,n):e.slice?e.slice(t,n):null}(this.data_,t,n);return null===r?null:new e(r)}return new e(new Uint8Array(this.data_.buffer,t,n-t),!0)},e.getBlob=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];if(Z()){var r=t.map((function(t){return t instanceof e?t.data_:t}));return new e(ie.apply(null,r))}var i=t.map((function(e){return X(e)?N(A.RAW,e).data:e.data_})),o=0;
2i.forEach((function(e){o+=e.byteLength}));var a=new Uint8Array(o),s=0;return i.forEach((function(e){for(var t=0;t<e.length;t++)a[s++]=e[t]})),new e(a,!0)},e.prototype.uploadData=function(){return this.data_},e}(),ae=function(){function e(e,t){this.bucket=e,this.path_=t}return Object.defineProperty(e.prototype,"path",{get:function(){return this.path_},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isRoot",{get:function(){return 0===this.path.length},enumerable:!1,configurable:!0}),e.prototype.fullServerUrl=function(){var e=encodeURIComponent;return"/b/"+e(this.bucket)+"/o/"+e(this.path)},e.prototype.bucketOnlyServerUrl=function(){return"/b/"+encodeURIComponent(this.bucket)+"/o"},e.makeFromBucketSpec=function(t){var n;try{n=e.makeFromUrl(t)}catch(r){return new e(t,"")}if(""===n.path)return n;throw new u(m,"Invalid default bucket '"+t+"'.")},e.makeFromUrl=function(t){var n=null,r="([A-Za-z0-9.\\-_]+)";var i=new RegExp("^gs://"+r+"(/(.*))?$","i");function o(e){e.path_=decodeURIComponent(e.path)}for(var a=s.replace(/[.]/g,"\\."),c=[{regex:i,indices:{bucket:1,path:3},postModify:function(e){"/"===e.path.charAt(e.path.length-1)&&(e.path_=e.path_.slice(0,-1))}},{regex:new RegExp("^https?://"+a+"/v[A-Za-z0-9_]+/b/"+r+"/o(/([^?#]*).*)?$","i"),indices:{bucket:1,path:3},postModify:o},{regex:new RegExp("^https?://(?:storage.googleapis.com|storage.cloud.google.com)/"+r+"/([^?#]*)","i"),indices:{bucket:1,path:2},postModify:o}],l=0;l<c.length;l++){var f=c[l],h=f.regex.exec(t);if(h){var d=h[f.indices.bucket],p=h[f.indices.path];p||(p=""),n=new e(d,p),f.postModify(n);break}}if(null==n)throw function(e){return new u(y,"Invalid URL '"+e+"'.")}(t);return n},e}();function se(e){var t,n;try{t=JSON.parse(e)}catch(r){return null}return"object"!==typeof(n=t)||Array.isArray(n)?null:t}function ue(e){var t=e.lastIndexOf("/",e.length-2);return-1===t?e:e.slice(t+1)}function ce(e){return"https://"+s+"/v0"+e}function le(e){var t=encodeURIComponent,n="?";for(var r in e){if(e.hasOwnProperty(r))n=n+(t(r)+"="+t(e[r]))+"&"}return n=n.slice(0,-1)}function fe(e,t){return t}var he=function(e,t,n,r){this.server=e,this.local=t||e,this.writable=!!n,this.xform=r||fe},de=null;function pe(){if(de)return de;var e=[];e.push(new he("bucket")),e.push(new he("generation")),e.push(new he("metageneration")),e.push(new he("name","fullPath",!0));var t=new he("name");t.xform=function(e,t){return function(e){return!X(e)||e.length<2?e:ue(e)}(t)},e.push(t);var n=new he("size");return n.xform=function(e,t){return $(t)?Number(t):t},e.push(n),e.push(new he("timeCreated")),e.push(new he("updated")),e.push(new he("md5Hash",null,!0)),e.push(new he("cacheControl",null,!0)),e.push(new he("contentDisposition",null,!0)),e.push(new he("contentEncoding",null,!0)),e.push(new he("contentLanguage",null,!0)),e.push(new he("contentType",null,!0)),e.push(new he("metadata","customMetadata",!0)),de=e}function ve(e,t,n){for(var r={type:"file"},i=n.length,o=0;o<i;o++){var a=n[o];r[a.local]=a.xform(r,t[a.server])}return function(e,t){Object.defineProperty(e,"ref",{get:function(){var n=e.bucket,r=e.fullPath,i=new ae(n,r);return t.makeStorageReference(i)}})}(r,e),r}function ye(e,t,n){var r=se(t);return null===r?null:ve(e,r,n)}function me(e,t){for(var n={},r=t.length,i=0;i<r;i++){var o=t[i];o.writable&&(n[o.server]=e[o.local])}return JSON.stringify(n)}function ge(e,t,n){var r=se(n);return null===r?null:function(e,t,n){var r={prefixes:[],items:[],nextPageToken:n.nextPageToken};if(n.prefixes)for(var i=0,o=n.prefixes;i<o.length;i++){var a=o[i].replace(/\/$/,""),s=e.makeStorageReference(new ae(t,a));r.prefixes.push(s)}if(n.items)for(var u=0,c=n.items;u<c.length;u++){var l=c[u];s=e.makeStorageReference(new ae(t,l.name)),r.items.push(s)}return r}(e,t,r)}var be=function(e,t,n,r){this.url=e,this.method=t,this.handler=n,this.timeout=r,this.urlParams={},this.headers={},this.body=null,this.errorHandler=null,this.progressCallback=null,this.successCodes=[200],this.additionalRetryCodes=[]};function _e(e){if(!e)throw C()}function we(e,t){return function(n,r){var i=ye(e,r,t);return _e(null!==i),i}}function ke(e,t){return function(n,r){var i=ye(e,r,t);return _e(null!==i),function(e,t){var n=se(t);if(null===n)return null;if(!X(n.downloadTokens))return null;var r=n.downloadTokens;if(0===r.length)return null;var i=encodeURIComponent;return r.split(",").map((function(t){var n=e.bucket,r=e.fullPath;return ce("/b/"+i(n)+"/o/"+i(r))+le({alt:"media",token:t})}))[0]}(i,r)}}function Se(e){return function(t,n){var r,i,o;return 401===t.getStatus()?r=new u(h,"User is not authenticated, please authenticate using Firebase Authentication and try again."):402===t.getStatus()?(o=e.bucket,r=new u(f,"Quota for bucket '"+o+"' exceeded, please view quota on https://firebase.google.com/pricing/.")):403===t.getStatus()?(i=e.path,r=new u(d,"User does not have permission to access '"+i+"'.")):r=n,r.serverResponse=n.serverResponse,r}}function Oe(e){var t=Se(e);return function(n,r){var i,o=t(n,r);
2return 404===n.getStatus()&&(i=e.path,o=new u(l,"Object '"+i+"' does not exist.")),o.serverResponse=r.serverResponse,o}}function Ee(e,t,n){var r=ce(t.fullServerUrl()),i=e.maxOperationRetryTime,o=new be(r,"GET",we(e,n),i);return o.errorHandler=Oe(t),o}function Te(e,t,n,r,i){var o={};t.isRoot?o.prefix="":o.prefix=t.path+"/",n&&n.length>0&&(o.delimiter=n),r&&(o.pageToken=r),i&&(o.maxResults=i);var a=ce(t.bucketOnlyServerUrl()),s=e.maxOperationRetryTime,u=new be(a,"GET",function(e,t){return function(n,r){var i=ge(e,t,r);return _e(null!==i),i}}(e,t.bucket),s);return u.urlParams=o,u.errorHandler=Se(t),u}function Ce(e,t,n){var r=Object.assign({},n);return r.fullPath=e.path,r.size=t.size(),r.contentType||(r.contentType=function(e,t){return e&&e.contentType||t&&t.type()||"application/octet-stream"}(null,t)),r}var Pe=function(e,t,n,r){this.current=e,this.total=t,this.finalized=!!n,this.metadata=r||null};function xe(e,t){var n=null;try{n=e.getResponseHeader("X-Goog-Upload-Status")}catch(r){_e(!1)}return _e(!!n&&-1!==(t||["active"]).indexOf(n)),n}var Ie=262144;function je(e,t,n,r,i,o,a,s){var c=new Pe(0,0);if(a?(c.current=a.current,c.total=a.total):(c.current=0,c.total=r.size()),r.size()!==c.total)throw new u(b,"Server recorded incorrect upload file size, please retry the upload.");var l=c.total-c.current,f=l;i>0&&(f=Math.min(f,i));var h=c.current,d=h+f,p={"X-Goog-Upload-Command":f===l?"upload, finalize":"upload","X-Goog-Upload-Offset":c.current},v=r.slice(h,d);if(null===v)throw x();var y=t.maxUploadRetryTime,m=new be(n,"POST",(function(e,n){var i,a=xe(e,["active","final"]),s=c.current+f,u=r.size();return i="final"===a?we(t,o)(e,n):null,new Pe(s,u,"final"===a,i)}),y);return m.headers=p,m.body=v.uploadData(),m.progressCallback=s||null,m.errorHandler=Se(e),m}var Re=function(e,t,n){if("function"===typeof e||$(t)||$(n))this.next=e,this.error=t||null,this.complete=n||null;else{var r=e;this.next=r.next||null,this.error=r.error||null,this.complete=r.complete||null}},Ae=function(e,t,n,r,i,o){this.bytesTransferred=e,this.totalBytes=t,this.state=n,this.metadata=r,this.task=i,this.ref=o};function Me(e){return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];Promise.resolve().then((function(){return e.apply(void 0,t)}))}}var Ne=function(){function e(e,t,n,r,i,o){var a=this;void 0===o&&(o=null),this.transferred_=0,this.needToFetchStatus_=!1,this.needToFetchMetadata_=!1,this.observers_=[],this.error_=null,this.uploadUrl_=null,this.request_=null,this.chunkMultiplier_=1,this.resolve_=null,this.reject_=null,this.ref_=e,this.service_=t,this.location_=n,this.blob_=i,this.metadata_=o,this.mappings_=r,this.resumable_=this.shouldDoResumable_(this.blob_),this.state_=B,this.errorHandler_=function(e){a.request_=null,a.chunkMultiplier_=1,e.codeEquals(v)?(a.needToFetchStatus_=!0,a.completeTransitions_()):(a.error_=e,a.transition_(K))},this.metadataErrorHandler_=function(e){a.request_=null,e.codeEquals(v)?a.completeTransitions_():(a.error_=e,a.transition_(K))},this.promise_=new Promise((function(e,t){a.resolve_=e,a.reject_=t,a.start_()})),this.promise_.then(null,(function(){}))}return e.prototype.makeProgressCallback_=function(){var e=this,t=this.transferred_;return function(n){return e.updateProgress_(t+n)}},e.prototype.shouldDoResumable_=function(e){return e.size()>262144},e.prototype.start_=function(){this.state_===B&&null===this.request_&&(this.resumable_?null===this.uploadUrl_?this.createResumable_():this.needToFetchStatus_?this.fetchStatus_():this.needToFetchMetadata_?this.fetchMetadata_():this.continueUpload_():this.oneShotUpload_())},e.prototype.resolveToken_=function(e){var t=this;this.service_.getAuthToken().then((function(n){switch(t.state_){case B:e(n);break;case H:t.transition_(G);break;case q:t.transition_(W)}}))},e.prototype.createResumable_=function(){var e=this;this.resolveToken_((function(t){var n=function(e,t,n,r,i){var o=t.bucketOnlyServerUrl(),a=Ce(t,r,i),s={name:a.fullPath},u=ce(o),c={"X-Goog-Upload-Protocol":"resumable","X-Goog-Upload-Command":"start","X-Goog-Upload-Header-Content-Length":r.size(),"X-Goog-Upload-Header-Content-Type":a.contentType,"Content-Type":"application/json; charset=utf-8"},l=me(a,n),f=e.maxUploadRetryTime,h=new be(u,"POST",(function(e){var t;xe(e);try{t=e.getResponseHeader("X-Goog-Upload-URL")}catch(n){_e(!1)}return _e(X(t)),t}),f);
2return h.urlParams=s,h.headers=c,h.body=l,h.errorHandler=Se(t),h}(e.service_,e.location_,e.mappings_,e.blob_,e.metadata_),r=e.service_.makeRequest(n,t);e.request_=r,r.getPromise().then((function(t){e.request_=null,e.uploadUrl_=t,e.needToFetchStatus_=!1,e.completeTransitions_()}),e.errorHandler_)}))},e.prototype.fetchStatus_=function(){var e=this,t=this.uploadUrl_;this.resolveToken_((function(n){var r=function(e,t,n,r){var i=e.maxUploadRetryTime,o=new be(n,"POST",(function(e){var t=xe(e,["active","final"]),n=null;try{n=e.getResponseHeader("X-Goog-Upload-Size-Received")}catch(o){_e(!1)}n||_e(!1);var i=Number(n);return _e(!isNaN(i)),new Pe(i,r.size(),"final"===t)}),i);return o.headers={"X-Goog-Upload-Command":"query"},o.errorHandler=Se(t),o}(e.service_,e.location_,t,e.blob_),i=e.service_.makeRequest(r,n);e.request_=i,i.getPromise().then((function(t){t=t,e.request_=null,e.updateProgress_(t.current),e.needToFetchStatus_=!1,t.finalized&&(e.needToFetchMetadata_=!0),e.completeTransitions_()}),e.errorHandler_)}))},e.prototype.continueUpload_=function(){var e=this,t=Ie*this.chunkMultiplier_,n=new Pe(this.transferred_,this.blob_.size()),r=this.uploadUrl_;this.resolveToken_((function(i){var o;try{o=je(e.location_,e.service_,r,e.blob_,t,e.mappings_,n,e.makeProgressCallback_())}catch(s){return e.error_=s,void e.transition_(K)}var a=e.service_.makeRequest(o,i);e.request_=a,a.getPromise().then((function(t){e.increaseMultiplier_(),e.request_=null,e.updateProgress_(t.current),t.finalized?(e.metadata_=t.metadata,e.transition_(z)):e.completeTransitions_()}),e.errorHandler_)}))},e.prototype.increaseMultiplier_=function(){Ie*this.chunkMultiplier_<33554432&&(this.chunkMultiplier_*=2)},e.prototype.fetchMetadata_=function(){var e=this;this.resolveToken_((function(t){var n=Ee(e.service_,e.location_,e.mappings_),r=e.service_.makeRequest(n,t);e.request_=r,r.getPromise().then((function(t){e.request_=null,e.metadata_=t,e.transition_(z)}),e.metadataErrorHandler_)}))},e.prototype.oneShotUpload_=function(){var e=this;this.resolveToken_((function(t){var n=function(e,t,n,r,i){var o=t.bucketOnlyServerUrl(),a={"X-Goog-Upload-Protocol":"multipart"},s=function(){for(var e="",t=0;t<2;t++)e+=Math.random().toString().slice(2);return e}();a["Content-Type"]="multipart/related; boundary="+s;var u=Ce(t,r,i),c="--"+s+"\r\nContent-Type: application/json; charset=utf-8\r\n\r\n"+me(u,n)+"\r\n--"+s+"\r\nContent-Type: "+u.contentType+"\r\n\r\n",l="\r\n--"+s+"--",f=oe.getBlob(c,r,l);if(null===f)throw x();var h={name:u.fullPath},d=ce(o),p=e.maxUploadRetryTime,v=new be(d,"POST",we(e,n),p);return v.urlParams=h,v.headers=a,v.body=f.uploadData(),v.errorHandler=Se(t),v}(e.service_,e.location_,e.mappings_,e.blob_,e.metadata_),r=e.service_.makeRequest(n,t);e.request_=r,r.getPromise().then((function(t){e.request_=null,e.metadata_=t,e.updateProgress_(e.blob_.size()),e.transition_(z)}),e.errorHandler_)}))},e.prototype.updateProgress_=function(e){var t=this.transferred_;this.transferred_=e,this.transferred_!==t&&this.notifyObservers_()},e.prototype.transition_=function(e){if(this.state_!==e)switch(e){case H:case q:this.state_=e,null!==this.request_&&this.request_.cancel();break;case B:var t=this.state_===W;this.state_=e,t&&(this.notifyObservers_(),this.start_());break;case W:this.state_=e,this.notifyObservers_();break;case G:this.error_=P(),this.state_=e,this.notifyObservers_();break;case K:case z:this.state_=e,this.notifyObservers_()}},e.prototype.completeTransitions_=function(){switch(this.state_){case q:this.transition_(W);break;case H:this.transition_(G);break;case B:this.start_()}},Object.defineProperty(e.prototype,"snapshot",{get:function(){var e=Q(this.state_);return new Ae(this.transferred_,this.blob_.size(),e,this.metadata_,this,this.ref_)},enumerable:!1,configurable:!0}),e.prototype.on=function(e,t,n,r){var i=this,o=new Re(t,n,r);return this.addObserver_(o),function(){i.removeObserver_(o)}},e.prototype.then=function(e,t){return this.promise_.then(e,t)},e.prototype.catch=function(e){return this.then(null,e)},e.prototype.addObserver_=function(e){this.observers_.push(e),this.notifyObserver_(e)},e.prototype.removeObserver_=function(e){var t=this.observers_.indexOf(e);-1!==t&&this.observers_.splice(t,1)},e.prototype.notifyObservers_=function(){var e=this;
2this.finishPromise_(),this.observers_.slice().forEach((function(t){e.notifyObserver_(t)}))},e.prototype.finishPromise_=function(){if(null!==this.resolve_){var e=!0;switch(Q(this.state_)){case Y.SUCCESS:Me(this.resolve_.bind(null,this.snapshot))();break;case Y.CANCELED:case Y.ERROR:Me(this.reject_.bind(null,this.error_))();break;default:e=!1}e&&(this.resolve_=null,this.reject_=null)}},e.prototype.notifyObserver_=function(e){switch(Q(this.state_)){case Y.RUNNING:case Y.PAUSED:e.next&&Me(e.next.bind(e,this.snapshot))();break;case Y.SUCCESS:e.complete&&Me(e.complete.bind(e))();break;case Y.CANCELED:case Y.ERROR:e.error&&Me(e.error.bind(e,this.error_))();break;default:e.error&&Me(e.error.bind(e,this.error_))()}},e.prototype.resume=function(){var e=this.state_===W||this.state_===q;return e&&this.transition_(B),e},e.prototype.pause=function(){var e=this.state_===B;return e&&this.transition_(q),e},e.prototype.cancel=function(){var e=this.state_===B||this.state_===q;return e&&this.transition_(H),e},e}(),Le=function(){function e(e,t){this.service=e,this.location=t instanceof ae?t:ae.makeFromUrl(t)}return e.prototype.toString=function(){return"gs://"+this.location.bucket+"/"+this.location.path},e.prototype.newRef=function(t,n){return new e(t,n)},e.prototype.mappings=function(){return pe()},e.prototype.child=function(e){var t=function(e,t){var n=t.split("/").filter((function(e){return e.length>0})).join("/");return 0===e.length?n:e+"/"+n}(this.location.path,e),n=new ae(this.location.bucket,t);return this.newRef(this.service,n)},Object.defineProperty(e.prototype,"parent",{get:function(){var e=function(e){if(0===e.length)return null;var t=e.lastIndexOf("/");return-1===t?"":e.slice(0,t)}(this.location.path);if(null===e)return null;var t=new ae(this.location.bucket,e);return this.newRef(this.service,t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"root",{get:function(){var e=new ae(this.location.bucket,"");return this.newRef(this.service,e)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"bucket",{get:function(){return this.location.bucket},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"fullPath",{get:function(){return this.location.path},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"name",{get:function(){return ue(this.location.path)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"storage",{get:function(){return this.service},enumerable:!1,configurable:!0}),e.prototype.put=function(e,t){return void 0===t&&(t=null),this.throwIfRoot_("put"),new Ne(this,this.service,this.location,this.mappings(),new oe(e),t)},e.prototype.putString=function(e,t,n){void 0===t&&(t=A.RAW),this.throwIfRoot_("putString");var r=N(t,e),i=Object.assign({},n);return!$(i.contentType)&&$(r.contentType)&&(i.contentType=r.contentType),new Ne(this,this.service,this.location,this.mappings(),new oe(r.data,!0),i)},e.prototype.delete=function(){var e=this;return this.throwIfRoot_("delete"),this.service.getAuthToken().then((function(t){var n=function(e,t){var n=ce(t.fullServerUrl()),r=e.maxOperationRetryTime,i=new be(n,"DELETE",(function(e,t){}),r);return i.successCodes=[200,204],i.errorHandler=Oe(t),i}(e.service,e.location);return e.service.makeRequest(n,t).getPromise()}))},e.prototype.listAll=function(){var e={prefixes:[],items:[]};return this.listAllHelper(e).then((function(){return e}))},e.prototype.listAllHelper=function(e,t){return Object(i.b)(this,void 0,void 0,(function(){var n,r,o,a;return Object(i.d)(this,(function(i){switch(i.label){case 0:return n={pageToken:t},[4,this.list(n)];case 1:return r=i.sent(),(o=e.prefixes).push.apply(o,r.prefixes),(a=e.items).push.apply(a,r.items),null==r.nextPageToken?[3,3]:[4,this.listAllHelper(e,r.nextPageToken)];case 2:i.sent(),i.label=3;case 3:return[2]}}
2))}))},e.prototype.list=function(e){var t=this,n=e||{};return"number"===typeof n.maxResults&&ee("options.maxResults",1,1e3,n.maxResults),this.service.getAuthToken().then((function(e){var r=Te(t.service,t.location,"/",n.pageToken,n.maxResults);return t.service.makeRequest(r,e).getPromise()}))},e.prototype.getMetadata=function(){var e=this;return this.throwIfRoot_("getMetadata"),this.service.getAuthToken().then((function(t){var n=Ee(e.service,e.location,e.mappings());return e.service.makeRequest(n,t).getPromise()}))},e.prototype.updateMetadata=function(e){var t=this;return this.throwIfRoot_("updateMetadata"),this.service.getAuthToken().then((function(n){var r=function(e,t,n,r){var i=ce(t.fullServerUrl()),o=me(n,r),a=e.maxOperationRetryTime,s=new be(i,"PATCH",we(e,r),a);return s.headers={"Content-Type":"application/json; charset=utf-8"},s.body=o,s.errorHandler=Oe(t),s}(t.service,t.location,e,t.mappings());return t.service.makeRequest(r,n).getPromise()}))},e.prototype.getDownloadURL=function(){var e=this;return this.throwIfRoot_("getDownloadURL"),this.service.getAuthToken().then((function(t){var n=function(e,t,n){var r=ce(t.fullServerUrl()),i=e.maxOperationRetryTime,o=new be(r,"GET",ke(e,n),i);return o.errorHandler=Oe(t),o}(e.service,e.location,e.mappings());return e.service.makeRequest(n,t).getPromise().then((function(e){if(null===e)throw new u(_,"The given file does not have any download URLs.");return e}))}))},e.prototype.throwIfRoot_=function(e){if(""===this.location.path)throw function(e){return new u(S,"The operation '"+e+"' cannot be performed on a root reference, create a non-root reference using child, such as .child('file.png').")}(e)},e}(),De=function(){function e(e){this.promise_=Promise.reject(e)}return e.prototype.getPromise=function(){return this.promise_},e.prototype.cancel=function(e){},e}();var Fe=function(){function e(e,t,n,r,i,o,a,s,u,c,l){var f=this;this.pendingXhr_=null,this.backoffId_=null,this.canceled_=!1,this.appDelete_=!1,this.url_=e,this.method_=t,this.headers_=n,this.body_=r,this.successCodes_=i.slice(),this.additionalRetryCodes_=o.slice(),this.callback_=a,this.errorCallback_=s,this.progressCallback_=c,this.timeout_=u,this.pool_=l,this.promise_=new Promise((function(e,t){f.resolve_=e,f.reject_=t,f.start_()}))}return e.prototype.start_=function(){var e=this;function t(t,n){var r,i=e.resolve_,o=e.reject_,a=n.xhr;if(n.wasSuccessCode)try{var s=e.callback_(a,a.getResponseText());void 0!==s?i(s):i()}catch(c){o(c)}else null!==a?((r=C()).serverResponse=a.getResponseText(),e.errorCallback_?o(e.errorCallback_(a,r)):o(r)):n.canceled?o(r=e.appDelete_?I():P()):o(r=new u(p,"Max retry time for operation exceeded, please try again."))}this.canceled_?t(0,new Ue(!1,null,!0)):this.backoffId_=function(e,t,n){var r=1,o=null,a=!1,s=0;function u(){return 2===s}var c=!1;function l(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];c||(c=!0,t.apply(null,e))}function f(t){o=setTimeout((function(){o=null,e(h,u())}),t)}function h(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];if(!c)if(e)l.call.apply(l,Object(i.g)([null,e],t));else{var o;u()||a?l.call.apply(l,Object(i.g)([null,e],t)):(r<64&&(r*=2),1===s?(s=2,o=0):o=1e3*(r+Math.random()),f(o))}}var d=!1;function p(e){d||(d=!0,c||(null!==o?(e||(s=2),clearTimeout(o),f(0)):e||(s=1)))}return f(0),setTimeout((function(){a=!0,p(!0)}),n),p}((function(t,n){if(n)t(!1,new Ue(!1,null,!0));else{var r=e.pool_.createXhrIo();e.pendingXhr_=r,null!==e.progressCallback_&&r.addUploadProgressListener(i),r.send(e.url_,e.method_,e.body_,e.headers_).then((function(n){null!==e.progressCallback_&&n.removeUploadProgressListener(i),e.pendingXhr_=null;var r=(n=n).getErrorCode()===U.NO_ERROR,o=n.getStatus();if(r&&!e.isRetryStatusCode_(o)){var a=-1!==e.successCodes_.indexOf(o);t(!0,new Ue(a,n))}else{var s=n.getErrorCode()===U.ABORT;t(!1,new Ue(!1,null,s))}}))}function i(t){var n=t.loaded,r=t.lengthComputable?t.total:-1;null!==e.progressCallback_&&e.progressCallback_(n,r)}}),t,this.timeout_)},e.prototype.getPromise=function(){return this.promise_},e.prototype.cancel=function(e){this.canceled_=!0,this.appDelete_=e||!1,null!==this.backoffId_&&(0,this.backoffId_)(!1),null!==this.pendingXhr_&&this.pendingXhr_.abort()},e.prototype.isRetryStatusCode_=function(e){var t=e>=500&&e<600,n=-1!==[408,429].indexOf(e),r=-1!==this.additionalRetryCodes_.indexOf(e);return t||n||r},e}(),Ue=function(e,t,n){this.wasSuccessCode=e,this.xhr=t,this.canceled=!!n};
2function Ve(e,t,n,i){var o=le(e.urlParams),a=e.url+o,s=Object.assign({},e.headers);return function(e,t){t&&(e["X-Firebase-GMPID"]=t)}(s,t),function(e,t){null!==t&&t.length>0&&(e.Authorization="Firebase "+t)}(s,n),function(e){var t="undefined"!==typeof r.a?r.a.SDK_VERSION:"AppManager";e["X-Firebase-Storage-Version"]="webjs/"+t}(s),new Fe(a,e.method,s,e.body,e.successCodes,e.additionalRetryCodes,e.handler,e.errorHandler,e.timeout,e.progressCallback,i)}var Be=function(){function e(t,n,r,i){var o;this.bucket_=null,this.appId_=null,this.deleted_=!1,this.app_=t,this.authProvider_=n,this.maxOperationRetryTime_=12e4,this.maxUploadRetryTime_=6e5,this.requests_=new Set,this.pool_=r,this.bucket_=null!=i?ae.makeFromBucketSpec(i):e.extractBucket_(null===(o=this.app_)||void 0===o?void 0:o.options),this.internals_=new qe(this)}return e.extractBucket_=function(e){var t=null===e||void 0===e?void 0:e.storageBucket;return null==t?null:ae.makeFromBucketSpec(t)},e.prototype.getAuthToken=function(){return Object(i.b)(this,void 0,void 0,(function(){var e,t;return Object(i.d)(this,(function(n){switch(n.label){case 0:return(e=this.authProvider_.getImmediate({optional:!0}))?[4,e.getToken()]:[3,2];case 1:if(null!==(t=n.sent()))return[2,t.accessToken];n.label=2;case 2:return[2,null]}}))}))},e.prototype.deleteApp=function(){this.deleted_=!0,this.app_=null,this.requests_.forEach((function(e){return e.cancel()})),this.requests_.clear()},e.prototype.makeStorageReference=function(e){return new Le(this,e)},e.prototype.makeRequest=function(e,t){var n=this;if(this.deleted_)return new De(I());var r=Ve(e,this.appId_,t,this.pool_);return this.requests_.add(r),r.getPromise().then((function(){return n.requests_.delete(r)}),(function(){return n.requests_.delete(r)})),r},e.prototype.ref=function(e){if(/^[A-Za-z]+:\/\//.test(e))throw new u(w,"Expected child path but got a URL, use refFromURL instead.");if(null==this.bucket_)throw new Error("No Storage Bucket defined in Firebase Options.");var t=new Le(this,this.bucket_);return null!=e?t.child(e):t},e.prototype.refFromURL=function(e){if(!/^[A-Za-z]+:\/\//.test(e))throw new u(w,"Expected full URL but got a child path, use ref instead.");try{ae.makeFromUrl(e)}catch(t){throw new u(w,"Expected valid full URL but got an invalid one.")}return new Le(this,e)},Object.defineProperty(e.prototype,"maxUploadRetryTime",{get:function(){return this.maxUploadRetryTime_},enumerable:!1,configurable:!0}),e.prototype.setMaxUploadRetryTime=function(e){ee("time",0,Number.POSITIVE_INFINITY,e),this.maxUploadRetryTime_=e},Object.defineProperty(e.prototype,"maxOperationRetryTime",{get:function(){return this.maxOperationRetryTime_},enumerable:!1,configurable:!0}),e.prototype.setMaxOperationRetryTime=function(e){ee("time",0,Number.POSITIVE_INFINITY,e),this.maxOperationRetryTime_=e},Object.defineProperty(e.prototype,"app",{get:function(){return this.app_},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"INTERNAL",{get:function(){return this.internals_},enumerable:!1,configurable:!0}),e}(),qe=function(){function e(e){this.service_=e}return e.prototype.delete=function(){return this.service_.deleteApp(),Promise.resolve()},e}();function We(e,t){var n=e.getProvider("app").getImmediate(),r=e.getProvider("auth-internal");return new Be(n,r,new ne,t)}!function(e){var t={TaskState:Y,TaskEvent:V,StringFormat:A,Storage:Be,Reference:Le};e.INTERNAL.registerComponent(new a.a("storage",We,"PUBLIC").setServiceProps(t).setMultipleInstances(!0)),e.registerVersion("@firebase/storage","0.4.0")}(r.a)},,,,,,,,,,,,,,function(e,t,n){"use strict";var r=n(43);function i(e,t){if(null==e)return{};var n,i,o=Object(r.a)(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)n=a[i],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var o=n(7),a=n(4),s=n.n(a),u=(n(14),n(31)),c=n(128),l=n.n(c),f="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},h="object"===("undefined"===typeof window?"undefined":f(window))&&"object"===("undefined"===typeof document?"undefined":f(document))&&9===document.nodeType;n(68);function d(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function p(e,t,n){return t&&d(e.prototype,t),n&&d(e,n),e}var v=n(30);function y(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}var m={}.constructor;function g(e){if(null==e||"object"!==typeof e)return e;if(Array.isArray(e))return e.map(g);if(e.constructor!==m)return e;var t={};for(var n in e)t[n]=g(e[n]);return t}function b(e,t,n){void 0===e&&(e="unnamed");var r=n.jss,i=g(t),o=r.plugins.onCreateRule(e,i,n);return o||(e[0],null)}var _=function(e,t){for(var n="",r=0;r<e.length&&"!important"!==e[r];r++)n&&(n+=t),n+=e[r];return n},w=function(e,t){if(void 0===t&&(t=!1),!Array.isArray(e))return e;var n="";if(Array.isArray(e[0]))for(var r=0;r<e.length&&"!important"!==e[r];r++)n&&(n+=", "),n+=_(e[r]," ");else n=_(e,", ");return t||"!important"!==e[e.length-1]||(n+=" !important"),n};function k(e,t){for(var n="",r=0;r<t;r++)n+=" ";return n+e}function S(e,t,n){void 0===n&&(n={});var r="";if(!t)return r;var i=n.indent,o=void 0===i?0:i,a=t.fallbacks;
vendor: 6,135 bytes, line 2
2if(e&&o++,a)if(Array.isArray(a))for(var s=0;s<a.length;s++){var u=a[s];for(var c in u){var l=u[c];null!=l&&(r&&(r+="\n"),r+=""+k(c+": "+w(l)+";",o))}}else for(var f in a){var h=a[f];null!=h&&(r&&(r+="\n"),r+=""+k(f+": "+w(h)+";",o))}for(var d in t){var p=t[d];null!=p&&"fallbacks"!==d&&(r&&(r+="\n"),r+=""+k(d+": "+w(p)+";",o))}return(r||n.allowEmpty)&&e?(r&&(r="\n"+r+"\n"),k(e+" {"+r,--o)+k("}",o)):r}var O=/([[\].#*$><+~=|^:(),"'`\s])/g,E="undefined"!==typeof CSS&&CSS.escape,T=function(e){return E?E(e):e.replace(O,"\\$1")},C=function(){function e(e,t,n){this.type="style",this.key=void 0,this.isProcessed=!1,this.style=void 0,this.renderer=void 0,this.renderable=void 0,this.options=void 0;var r=n.sheet,i=n.Renderer;this.key=e,this.options=n,this.style=t,r?this.renderer=r.renderer:i&&(this.renderer=new i)}return e.prototype.prop=function(e,t,n){if(void 0===t)return this.style[e];var r=!!n&&n.force;if(!r&&this.style[e]===t)return this;var i=t;n&&!1===n.process||(i=this.options.jss.plugins.onChangeValue(t,e,this));var o=null==i||!1===i,a=e in this.style;if(o&&!a&&!r)return this;var s=o&&a;if(s?delete this.style[e]:this.style[e]=i,this.renderable&&this.renderer)return s?this.renderer.removeProperty(this.renderable,e):this.renderer.setProperty(this.renderable,e,i),this;var u=this.options.sheet;return u&&u.attached,this},e}(),P=function(e){function t(t,n,r){var i;(i=e.call(this,t,n,r)||this).selectorText=void 0,i.id=void 0,i.renderable=void 0;var o=r.selector,a=r.scoped,s=r.sheet,u=r.generateId;return o?i.selectorText=o:!1!==a&&(i.id=u(y(y(i)),s),i.selectorText="."+T(i.id)),i}Object(v.a)(t,e);var n=t.prototype;return n.applyTo=function(e){var t=this.renderer;if(t){var n=this.toJSON();for(var r in n)t.setProperty(e,r,n[r])}return this},n.toJSON=function(){var e={};for(var t in this.style){var n=this.style[t];"object"!==typeof n?e[t]=n:Array.isArray(n)&&(e[t]=w(n))}return e},n.toString=function(e){var t=this.options.sheet,n=!!t&&t.options.link?Object(o.a)({},e,{allowEmpty:!0}):e;return S(this.selectorText,this.style,n)},p(t,[{key:"selector",set:function(e){if(e!==this.selectorText){this.selectorText=e;var t=this.renderer,n=this.renderable;if(n&&t)t.setSelector(n,e)||t.replaceRule(n,this)}},get:function(){return this.selectorText}}]),t}(C),x={onCreateRule:function(e,t,n){return"@"===e[0]||n.parent&&"keyframes"===n.parent.type?null:new P(e,t,n)}},I={indent:1,children:!0},j=/@([\w-]+)/,R=function(){function e(e,t,n){this.type="conditional",this.at=void 0,this.key=void 0,this.query=void 0,this.rules=void 0,this.options=void 0,this.isProcessed=!1,this.renderable=void 0,this.key=e;var r=e.match(j);for(var i in this.at=r?r[1]:"unknown",this.query=n.name||"@"+this.at,this.options=n,this.rules=new te(Object(o.a)({},n,{parent:this})),t)this.rules.add(i,t[i]);this.rules.process()}var t=e.prototype;return t.getRule=function(e){return this.rules.get(e)},t.indexOf=function(e){return this.rules.indexOf(e)},t.addRule=function(e,t,n){var r=this.rules.add(e,t,n);return r?(this.options.jss.plugins.onProcessRule(r),r):null},t.toString=function(e){if(void 0===e&&(e=I),null==e.indent&&(e.indent=I.indent),null==e.children&&(e.children=I.children),!1===e.children)return this.query+" {}";var t=this.rules.toString(e);return t?this.query+" {\n"+t+"\n}":""},e}(),A=/@media|@supports\s+/,M={onCreateRule:function(e,t,n){return A.test(e)?new R(e,t,n):null}},N={indent:1,children:!0},L=/@keyframes\s+([\w-]+)/,D=function(){function e(e,t,n){this.type="keyframes",this.at="@keyframes",this.key=void 0,this.name=void 0,this.id=void 0,this.rules=void 0,this.options=void 0,this.isProcessed=!1,this.renderable=void 0;var r=e.match(L);r&&r[1]?this.name=r[1]:this.name="noname",this.key=this.type+"-"+this.name,this.options=n;var i=n.scoped,a=n.sheet,s=n.generateId;for(var u in this.id=!1===i?this.name:T(s(this,a)),this.rules=new te(Object(o.a)({},n,{parent:this})),t)this.rules.add(u,t[u],Object(o.a)({},n,{parent:this}));this.rules.process()}return e.prototype.toString=function(e){if(void 0===e&&(e=N),null==e.indent&&(e.indent=N.indent),null==e.children&&(e.children=N.children),!1===e.children)return this.at+" "+this.id+" {}";var t=this.rules.toString(e);return t&&(t="\n"+t+"\n"),this.at+" "+this.id+" {"+t+"}"},e}(),F=/@keyframes\s+/,U=/\$([\w-]+)/g,V=function(e,t){return"string"===typeof e?e.replace(U,(function(e,n){return n in t?t[n]:e})):e},B=function(e,t,n){var r=e[t],i=V(r,n);i!==r&&(e[t]=i)},q={onCreateRule:function(e,t,n){return"string"===typeof e&&F.test(e)?new D(e,t,n):null},onProcessStyle:function(e,t,n){return"style"===t.type&&n?("animation-name"in e&&B(e,"animation-name",n.keyframes),"animation"in e&&B(e,"animation",n.keyframes),e):e},onChangeValue:function(e,t,n){var r=n.options.sheet;if(!r)return e;switch(t){case"animation":case"animation-name":return V(e,r.keyframes);default:return e}}},W=function(e){function t(){for(var t,n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return(t=e.call.apply(e,[this].concat(r))||this).renderable=void 0,t}return Object(v.a)(t,e),t.prototype.toString=function(e){var t=this.options.sheet,n=!!t&&t.options.link?Object(o.a)({},e,{allowEmpty:!0}):e;return S(this.key,this.style,n)},t}(C),z={onCreateRule:function(e,t,n){return n.parent&&"keyframes"===n.parent.type?new W(e,t,n):null}},H=function(){function e(e,t,n){this.type="font-face",this.at="@font-face",this.key=void 0,this.style=void 0,this.options=void 0,this.isProcessed=!1,this.renderable=void 0,this.key=e,this.style=t,this.options=n}return e.prototype.toString=function(e){if(Array.isArray(this.style)){for(var t="",n=0;n<this.style.length;n++)t+=S(this.at,this.style[n]),this.style[n+1]&&(t+="\n");return t}return S(this.at,this.style,e)},e}(),G=/@font-face/,K={onCreateRule:function(e,t,n){return G.test(e)?new H(e,t,n):null}},Y=function(){function e(e,t,n){this.type="viewport",this.at="@viewport",this.key=void 0,this.style=void 0,this.options=void 0,this.isProcessed=!1,this.renderable=void 0,this.key=e,this.style=t,this.options=n}return e.prototype.toString=function(e){return S(this.key,this.style,e)},e}(),Q={onCreateRule:function(e,t,n){return"@viewport"===e||"@-ms-v
2iewport"===e?new Y(e,t,n):null}},$=function(){function e(e,t,n){this.type="simple",this.key=void 0,this.value=void 0,this.options=void 0,this.isProcessed=!1,this.renderable=void 0,this.key=e,this.value=t,this.options=n}return e.prototype.toString=function(e){if(Array.isArray(this.value)){for(var t="",n=0;n<this.value.length;n++)t+=this.key+" "+this.value[n]+";",this.value[n+1]&&(t+="\n");return t}return this.key+" "+this.value+";"},e}(),X={"@charset":!0,"@import":!0,"@namespace":!0},J=[x,M,q,z,K,Q,{onCreateRule:function(e,t,n){return e in X?new $(e,t,n):null}}],Z={process:!0},ee={force:!0,process:!0},te=function(){function e(e){this.map={},this.raw={},this.index=[],this.counter=0,this.options=void 0,this.classes=void 0,this.keyframes=void 0,this.options=e,this.classes=e.classes,this.keyframes=e.keyframes}var t=e.prototype;return t.add=function(e,t,n){var r=this.options,i=r.parent,a=r.sheet,s=r.jss,u=r.Renderer,c=r.generateId,l=r.scoped,f=Object(o.a)({classes:this.classes,parent:i,sheet:a,jss:s,Renderer:u,generateId:c,scoped:l,name:e,keyframes:this.keyframes,selector:void 0},n),h=e;e in this.raw&&(h=e+"-d"+this.counter++),this.raw[h]=t,h in this.classes&&(f.selector="."+T(this.classes[h]));var d=b(h,t,f);if(!d)return null;this.register(d);var p=void 0===f.index?this.index.length:f.index;return this.index.splice(p,0,d),d},t.get=function(e){return this.map[e]},t.remove=function(e){this.unregister(e),delete this.raw[e.key],this.index.splice(this.index.indexOf(e),1)},t.indexOf=function(e){return this.index.indexOf(e)},t.process=function(){var e=this.options.jss.plugins;this.index.slice(0).forEach(e.onProcessRule,e)},t.register=function(e){this.map[e.key]=e,e instanceof P?(this.map[e.selector]=e,e.id&&(this.classes[e.key]=e.id)):e instanceof D&&this.keyframes&&(this.keyframes[e.name]=e.id)},t.unregister=function(e){delete this.map[e.key],e instanceof P?(delete this.map[e.selector],delete this.classes[e.key]):e instanceof D&&delete this.keyframes[e.name]},t.update=function(){var e,t,n;if("string"===typeof(arguments.length<=0?void 0:arguments[0])?(e=arguments.length<=0?void 0:arguments[0],t=arguments.length<=1?void 0:arguments[1],n=arguments.length<=2?void 0:arguments[2]):(t=arguments.length<=0?void 0:arguments[0],n=arguments.length<=1?void 0:arguments[1],e=null),e)this.updateOne(this.map[e],t,n);else for(var r=0;r<this.index.length;r++)this.updateOne(this.index[r],t,n)},t.updateOne=function(t,n,r){void 0===r&&(r=Z);var i=this.options,o=i.jss.plugins,a=i.sheet;if(t.rules instanceof e)t.rules.update(n,r);else{var s=t,u=s.style;if(o.onUpdate(n,t,a,r),r.process&&u&&u!==s.style){for(var c in o.onProcessStyle(s.style,s,a),s.style){var l=s.style[c];l!==u[c]&&s.prop(c,l,ee)}for(var f in u){var h=s.style[f],d=u[f];null==h&&h!==d&&s.prop(f,null,ee)}}}},t.toString=function(e){for(var t="",n=this.options.sheet,r=!!n&&n.options.link,i=0;i<this.index.length;i++){var o=this.index[i].toString(e);(o||r)&&(t&&(t+="\n"),t+=o)}return t},e}(),ne=function(){function e(e,t){for(var n in this.options=void 0,this.deployed=void 0,this.attached=void 0,this.rules=void 0,this.renderer=void 0,this.classes=void 0,this.keyframes=void 0,this.queue=void 0,this.attached=!1,this.deployed=!1,this.classes={},this.keyframes={},this.options=Object(o.a)({},t,{sheet:this,parent:this,classes:this.classes,keyframes:this.keyframes}),t.Renderer&&(this.renderer=new t.Renderer(this)),this.rules=new te(this.options),e)this.rules.add(n,e[n]);this.rules.process()}var t=e.prototype;return t.attach=function(){return this.attached||(this.renderer&&this.renderer.attach(),this.attached=!0,this.deployed||this.deploy()),this},t.detach=function(){return this.attached?(this.renderer&&this.renderer.detach(),this.attached=!1,this):this},t.addRule=function(e,t,n){var r=this.queue;this.attached&&!r&&(this.queue=[]);var i=this.rules.add(e,t,n);return i?(this.options.jss.plugins.onProcessRule(i),this.attached?this.deployed?(r?r.push(i):(this.insertRule(i),this.queue&&(this.queue.forEach(this.insertRule,this),this.queue=void 0)),i):i:(this.deployed=!1,i)):null},t.insertRule=function(e){this.renderer&&this.renderer.insertRule(e)},t.addRules=function(e,t){var n=[];for(var r in e){var i=this.addRule(r,e[r],t);i&&n.push(i)}return n},t.getRule=function(e){return this.rules.get(e)},t.deleteRule=function(e){var t="object"===typeof e?e:this.rules.get(e);return!(!t||this.attached&&!t.renderable)&&(this.rules.remove(t),!(this.attached&&t.renderable&&this.renderer)||this.renderer.deleteRule(t.renderable))},t.indexOf=function(e){return this.rules.indexOf(e)},t.deploy=function(){return this.renderer&&this.renderer.deploy(),this.deployed=!0,this},t.update=function(){var e;return(e=this.rules).update.apply(e,arguments),this},t.updateOne=function(e,t,n){return this.rules.updateOne(e,t,n),this},t.toString=function(e){return this.rules.toString(e)},e}(),re=function(){function e(){this.plugins={internal:[],external:[]},this.registry=void 0}var t=e.prototype;return t.onCreateRule=function(e,t,n){for(var r=0;r<this.registry.onCreateRule.length;r++){var i=this.registry.onCreateRule[r](e,t,n);if(i)return i}return null},t.onProcessRule=function(e){if(!e.isProcessed){for(var t=e.options.sheet,n=0;n<this.registry.onProcessRule.length;n++)this.registry.onProcessRule[n](e,t);e.style&&this.onProcessStyle(e.style,e,t),e.isProcessed=!0}},t.onProcessStyle=function(e,t,n){for(var r=0;r<this.registry.onProcessStyle.length;r++)t.style=this.registry.onProcessStyle[r](t.style,t,n)},t.onProcessSheet=function(e){for(var t=0;t<this.registry.onProcessSheet.length;t++)this.registry.onProcessSheet[t](e)},t.onUpdate=function(e,t,n,r){for(var i=0;i<this.registry.onUpdate.length;i++)this.registry.onUpdate[i](e,t,n,r)},t.onChangeValue=function(e,t,n){for(var r=e,i=0;i<this.registry.onChangeValue.length;i++)r=this.registry.onChangeValue[i](r,t,n);return r},t.use=function(e,t){void 0===t&&(t={queue:"external"});var n=this.plugins[t.queue];-1===n.indexOf(e)&&(n.push(e),this.registry=[].concat(this.plugins.external,this.plugins.internal).reduce((function(e,t){for(var n in t)n in e&&e[n].push(t[n]);return e}),{onCreateRule:[],onProcessRule:[],onProcessStyle:[],onProcessSheet:[],onChangeValue:[],onUpdate:[]}))},e}(),ie=new(function(){function e(){this.registry=[]}var t=e.prototype;return t.add=function(e){var t=this.registry,n=e.options.index;if(-1===t.indexOf(e))if(0===t.length||n>=this.index)t.push(e);else for(var r=0;r<t.length;r++)if(t[r].options.index>n)return void t.splice(r,0,e)},t.reset=function(){this.registry=[]},t.remove=function(e){var t=this.registry.indexOf(e);this.registry.splice(t,1)},t.toString=function(e){for(var t=void 0===e?{}:e,n=t.attached,i=Object(r.a)(t,["attached"]),o="",a=0;a<this.registry.length;a++){var s=this.registry[a];null!=n&&s.attached!==n||(o&&(o+="\n"),o+=s.toString(i))}return o},p(e,[{key:"index",get:function(){return 0===this.registry.length?0:this.registry[this.registry.length-1].options.index}}]),e}()),oe="undefined"!==typeof globalThis?globalThis:"undefined"!==typeof window&&window.Math===Math?window:"undefined"!==typeof self&&self.Math===Math?self:Function("return this")(),ae="2f1acc6c3a606b082e5eef5e54414ffb";null==oe[ae]&&(oe[ae]=0);var se=oe[ae]++,ue=function(e){void 0===e&&(e={});var t=0;return function(n,r){t+=1;var i="",o="";return r&&(r.options.classNamePrefix&&(o=r.options.classNamePrefix),null!=r.options.jss.id&&(i=String(r.options.jss.id))),e.minify?""+(o||"c")+se+i+t:o+n.key+"-"+se+(i?"-"+i:"")+"-"+t}},ce=function(e){var t;return function(){return t||(t=e()),t}},le=function(e,t){try{return e.attributeStyleMap?e.attributeStyleMap.get(t):e.style.getPropertyValue(t)}catch(n){return""}},fe=function(e,t,n){try{var r=n;if(Array.isArray(n)&&(r=w(n,!0),"!important"===n[n.length-1]))return e.style.setProperty(t,r,"
2important"),!0;e.attributeStyleMap?e.attributeStyleMap.set(t,r):e.style.setProperty(t,r)}catch(i){return!1}return!0},he=function(e,t){try{e.attributeStyleMap?e.attributeStyleMap.delete(t):e.style.removeProperty(t)}catch(n){}},de=function(e,t){return e.selectorText=t,e.selectorText===t},pe=ce((function(){return document.querySelector("head")}));function ve(e){var t=ie.registry;if(t.length>0){var n=function(e,t){for(var n=0;n<e.length;n++){var r=e[n];if(r.attached&&r.options.index>t.index&&r.options.insertionPoint===t.insertionPoint)return r}return null}(t,e);if(n&&n.renderer)return{parent:n.renderer.element.parentNode,node:n.renderer.element};if((n=function(e,t){for(var n=e.length-1;n>=0;n--){var r=e[n];if(r.attached&&r.options.insertionPoint===t.insertionPoint)return r}return null}(t,e))&&n.renderer)return{parent:n.renderer.element.parentNode,node:n.renderer.element.nextSibling}}var r=e.insertionPoint;if(r&&"string"===typeof r){var i=function(e){for(var t=pe(),n=0;n<t.childNodes.length;n++){var r=t.childNodes[n];if(8===r.nodeType&&r.nodeValue.trim()===e)return r}return null}(r);if(i)return{parent:i.parentNode,node:i.nextSibling}}return!1}var ye=ce((function(){var e=document.querySelector('meta[property="csp-nonce"]');return e?e.getAttribute("content"):null})),me=function(e,t,n){try{if("insertRule"in e)e.insertRule(t,n);else if("appendRule"in e){e.appendRule(t)}}catch(r){return!1}return e.cssRules[n]},ge=function(e,t){var n=e.cssRules.length;return void 0===t||t>n?n:t},be=function(){function e(e){this.getPropertyValue=le,this.setProperty=fe,this.removeProperty=he,this.setSelector=de,this.element=void 0,this.sheet=void 0,this.hasInsertedRules=!1,this.cssRules=[],e&&ie.add(e),this.sheet=e;var t=this.sheet?this.sheet.options:{},n=t.media,r=t.meta,i=t.element;this.element=i||function(){var e=document.createElement("style");return e.textContent="\n",e}(),this.element.setAttribute("data-jss",""),n&&this.element.setAttribute("media",n),r&&this.element.setAttribute("data-meta",r);var o=ye();o&&this.element.setAttribute("nonce",o)}var t=e.prototype;return t.attach=function(){if(!this.element.parentNode&&this.sheet){!function(e,t){var n=t.insertionPoint,r=ve(t);if(!1!==r&&r.parent)r.parent.insertBefore(e,r.node);else if(n&&"number"===typeof n.nodeType){var i=n,o=i.parentNode;o&&o.insertBefore(e,i.nextSibling)}else pe().appendChild(e)}(this.element,this.sheet.options);var e=Boolean(this.sheet&&this.sheet.deployed);this.hasInsertedRules&&e&&(this.hasInsertedRules=!1,this.deploy())}},t.detach=function(){if(this.sheet){var e=this.element.parentNode;e&&e.removeChild(this.element),this.sheet.options.link&&(this.cssRules=[],this.element.textContent="\n")}},t.deploy=function(){var e=this.sheet;e&&(e.options.link?this.insertRules(e.rules):this.element.textContent="\n"+e.toString()+"\n")},t.insertRules=function(e,t){for(var n=0;n<e.index.length;n++)this.insertRule(e.index[n],n,t)},t.insertRule=function(e,t,n){if(void 0===n&&(n=this.element.sheet),e.rules){var r=e,i=n;if("conditional"===e.type||"keyframes"===e.type){var o=ge(n,t);if(!1===(i=me(n,r.toString({children:!1}),o)))return!1;this.refCssRule(e,o,i)}return this.insertRules(r.rules,i),i}var a=e.toString();if(!a)return!1;var s=ge(n,t),u=me(n,a,s);return!1!==u&&(this.hasInsertedRules=!0,this.refCssRule(e,s,u),u)},t.refCssRule=function(e,t,n){e.renderable=n,e.options.parent instanceof ne&&(this.cssRules[t]=n)},t.deleteRule=function(e){var t=this.element.sheet,n=this.indexOf(e);return-1!==n&&(t.deleteRule(n),this.cssRules.splice(n,1),!0)},t.indexOf=function(e){return this.cssRules.indexOf(e)},t.replaceRule=function(e,t){var n=this.indexOf(e);return-1!==n&&(this.element.sheet.deleteRule(n),this.cssRules.splice(n,1),this.insertRule(t,n))},t.getRules=function(){return this.element.sheet.cssRules},e}(),_e=0,we=function(){function e(e){this.id=_e++,this.version="10.6.0",this.plugins=new re,this.options={id:{minify:!1},createGenerateId:ue,Renderer:h?be:null,plugins:[]},this.generateId=ue({minify:!1});for(var t=0;t<J.length;t++)this.plugins.use(J[t],{queue:"internal"});this.setup(e)}var t=e.prototype;return t.setup=function(e){return void 0===e&&(e={}),e.createGenerateId&&(this.options.createGenerateId=e.createGenerateId),e.id&&(this.options.id=Object(o.a)({}
2,this.options.id,e.id)),(e.createGenerateId||e.id)&&(this.generateId=this.options.createGenerateId(this.options.id)),null!=e.insertionPoint&&(this.options.insertionPoint=e.insertionPoint),"Renderer"in e&&(this.options.Renderer=e.Renderer),e.plugins&&this.use.apply(this,e.plugins),this},t.createStyleSheet=function(e,t){void 0===t&&(t={});var n=t.index;"number"!==typeof n&&(n=0===ie.index?0:ie.index+1);var r=new ne(e,Object(o.a)({},t,{jss:this,generateId:t.generateId||this.generateId,insertionPoint:this.options.insertionPoint,Renderer:this.options.Renderer,index:n}));return this.plugins.onProcessSheet(r),r},t.removeStyleSheet=function(e){return e.detach(),ie.remove(e),this},t.createRule=function(e,t,n){if(void 0===t&&(t={}),void 0===n&&(n={}),"object"===typeof e)return this.createRule(void 0,e,t);var r=Object(o.a)({},n,{name:e,jss:this,Renderer:this.options.Renderer});r.generateId||(r.generateId=this.generateId),r.classes||(r.classes={}),r.keyframes||(r.keyframes={});var i=b(e,t,r);return i&&this.plugins.onProcessRule(i),i},t.use=function(){for(var e=this,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return n.forEach((function(t){e.plugins.use(t)})),this},e}();function ke(e){var t=null;for(var n in e){var r=e[n],i=typeof r;if("function"===i)t||(t={}),t[n]=r;else if("object"===i&&null!==r&&!Array.isArray(r)){var o=ke(r);o&&(t||(t={}),t[n]=o)}}return t}var Se="object"===typeof CSS&&null!=CSS&&"number"in CSS,Oe=function(e){return new we(e)};Oe();function Ee(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.baseClasses,n=e.newClasses;e.Component;if(!n)return t;var r=Object(o.a)({},t);return Object.keys(n).forEach((function(e){n[e]&&(r[e]="".concat(t[e]," ").concat(n[e]))})),r}var Te={set:function(e,t,n,r){var i=e.get(t);i||(i=new Map,e.set(t,i)),i.set(n,r)},get:function(e,t,n){var r=e.get(t);return r?r.get(n):void 0},delete:function(e,t,n){e.get(t).delete(n)}};var Ce=s.a.createContext(null);function Pe(){return s.a.useContext(Ce)}var xe="function"===typeof Symbol&&Symbol.for?Symbol.for("mui.nested"):"__THEME_NESTED__",Ie=["checked","disabled","error","focused","focusVisible","required","expanded","selected"];var je=Date.now(),Re="fnValues"+je,Ae="fnStyle"+ ++je,Me=function(){return{onCreateRule:function(e,t,n){if("function"!==typeof t)return null;var r=b(e,{},n);return r[Ae]=t,r},onProcessStyle:function(e,t){if(Re in t||Ae in t)return e;var n={};for(var r in e){var i=e[r];"function"===typeof i&&(delete e[r],n[r]=i)}return t[Re]=n,e},onUpdate:function(e,t,n,r){var i=t,o=i[Ae];o&&(i.style=o(e)||{});var a=i[Re];if(a)for(var s in a)i.prop(s,a[s](e),r)}}},Ne="@global",Le="@global ",De=function(){function e(e,t,n){for(var r in this.type="global",this.at=Ne,this.rules=void 0,this.options=void 0,this.key=void 0,this.isProcessed=!1,this.key=e,this.options=n,this.rules=new te(Object(o.a)({},n,{parent:this})),t)this.rules.add(r,t[r]);this.rules.process()}var t=e.prototype;return t.getRule=function(e){return this.rules.get(e)},t.addRule=function(e,t,n){var r=this.rules.add(e,t,n);return r&&this.options.jss.plugins.onProcessRule(r),r},t.indexOf=function(e){return this.rules.indexOf(e)},t.toString=function(){return this.rules.toString()},e}(),Fe=function(){function e(e,t,n){this.type="global",this.at=Ne,this.options=void 0,this.rule=void 0,this.isProcessed=!1,this.key=void 0,this.key=e,this.options=n;var r=e.substr(Le.length);this.rule=n.jss.createRule(r,t,Object(o.a)({},n,{parent:this}))}return e.prototype.toString=function(e){return this.rule?this.rule.toString(e):""},e}(),Ue=/\s*,\s*/g;function Ve(e,t){for(var n=e.split(Ue),r="",i=0;i<n.length;i++)r+=t+" "+n[i].trim(),n[i+1]&&(r+=", ");return r}var Be=function(){return{onCreateRule:function(e,t,n){if(!e)return null;if(e===Ne)return new De(e,t,n);if("@"===e[0]&&e.substr(0,Le.length)===Le)return new Fe(e,t,n);var r=n.parent;return r&&("global"===r.type||r.options.parent&&"global"===r.options.parent.type)&&(n.scoped=!1),!1===n.scoped&&(n.selector=e),null},onProcessRule:function(e,t){"style"===e.type&&t&&(function(e,t){var n=e.options,r=e.style,i=r?r[Ne]:null;if(i){for(var a in i)t.addRule(a,i[a],Object(o.a)({},n,{selector:Ve(a,e.selector)}));delete r[Ne]}}(e,t),function(e,t){var n=e.options,r=e.style;for(var i in r)if("@"===i[0]&&i.substr(0,Ne.length)===Ne){var a=Ve(i.substr(Ne.length),e.selector);t.addRule(a,r[i],Object(o.a)({},n,{selector:a})),delete r[i]}}(e,t))}}},qe=/\s*,\s*/g,We=/&/g,ze=/\$([\w-]+)/g;var He=function(){function e(e,t){return function(n,r){var i=e.getRule(r)||t&&t.getRule(r);return i?(i=i).selector:r}}function t(e,t){for(var n=t.split(qe),r=e.split(qe),i="",o=0;o<n.length;o++)for(var a=n[o],s=0;s<r.length;s++){var u=r[s];i&&(i+=", "),i+=-1!==u.indexOf("&")?u.replace(We,a):a+" "+u}return i}function n(e,t,n){if(n)return Object(o.a)({},n,{index:n.index+1});var r=e.options.nestingLevel;r=void 0===r?1:r+1;var i=Object(o.a)({},e.options,{nestingLevel:r,index:t.indexOf(e)+1});return delete i.name,i}return{onProcessStyle:function(r,i,a){if("style"!==i.type)return r;var s,u,c=i,l=c.options.parent;for(var f in r){var h=-1!==f.indexOf("&"),d="@"===f[0];if(h||d){if(s=n(c,l,s),h){var p=t(f,c.selector);u||(u=e(l,a)),p=p.replace(ze,u),l.addRule(p,r[f],Object(o.a)({},s,{selector:p}))}else d&&l.addRule(f,{},s).addRule(c.key,r[f],{selector:c.selector});delete r[f]}}return r}}},Ge=/[A-Z]/g,Ke=/^ms-/,Ye={};function Qe(e){return"-"+e.toLowerCase()}var $e=function(e){if(Ye.hasOwnProperty(e))return Ye[e];var t=e.replace(Ge,Qe);return Ye[e]=Ke.test(t)?"-"+t:t};function Xe(e){var t={};for(var n in e){t[0===n.indexOf("--")?n:$e(n)]=e[n]}return e.fallbacks&&(Array.isArray(e.fallbacks)?t.fallbacks=e.fallbacks.map(Xe):t.fallbacks=Xe(e.fallbacks)),t}var Je=function(){return{onProcessStyle:function(e){if(Array.isArray(e)){for(var t=0;t<e.length;t++)e[t]=Xe(e[t]);return e}return Xe(e)},onChangeValue:function(e,t,n){if(0===t.indexOf("--"))return e;var r=$e(t);return t===r?e:(n.prop(r,e),null)}}},Ze=Se&&CSS?CSS.px:"px",et=Se&&CSS?CSS.ms:"ms",tt=Se&&CSS?CSS.percent:"%";function nt(e){var t=/(-[a-z])/g,n=function(e){return e[1].toUpperCase()},r={};for(var i in e)r[i]=e[i],r[i.replace(t,n)]=e[i];return r}var rt=nt({"animation-delay":et,"animation-duration":et,"background-position":Ze,"background-position-x":Ze,"background-position-y":Ze,"background-size":Ze,border:Ze,"border-bottom":Ze,"border-bottom-left-radius":Ze,"border-bottom-right-radius":Ze,"border-bottom-width":Ze,"border-left":Ze,"border-left-width":Ze,"border-radius":Ze,"border-right":Ze,"border-right-width":Ze,"border-top":Ze,"border-top-left-radius":Ze,"border-top-right-radius":Ze,"border-top-width":Ze,"border-width":Ze,"border-block":Ze,"border-block-end":Ze,"border-block-end-width":Ze,"border-block-start":Ze,"border-block-start-width":Ze,"border-block-width":Ze,"border-inline":Ze,"border-inline-end":Ze,"border-inline-end-width":Ze,"border-inline-start":Ze,"border-inline-start-width":Ze,"border-inline-width":Ze,"border-start-start-radius":Ze,"border-start-end-radius":Ze,"border-end-start-radius":Ze,"border-end-end-radius":Ze,margin:Ze,"margin-bottom":Ze,"margin-left":Ze,"margin-right":Ze,"margin-top":Ze,"margin-block":Ze,"margin-block-end":Ze,"margin-block-start":Ze,"margin-inline":Ze,"margin-inline-end":Ze,"margin-inline-start":Ze,padding:Ze,"padding-bottom":Ze,"padding-left":Ze,"padding-right":Ze,"padding-top":Ze,"padding-block":Ze,"padding-block-end":Ze,"padding-block-start":Ze,"padding-inline":Ze,"padding-inline-end":Ze,"padding-inline-start":Ze,"mask-
2position-x":Ze,"mask-position-y":Ze,"mask-size":Ze,height:Ze,width:Ze,"min-height":Ze,"max-height":Ze,"min-width":Ze,"max-width":Ze,bottom:Ze,left:Ze,top:Ze,right:Ze,inset:Ze,"inset-block":Ze,"inset-block-end":Ze,"inset-block-start":Ze,"inset-inline":Ze,"inset-inline-end":Ze,"inset-inline-start":Ze,"box-shadow":Ze,"text-shadow":Ze,"column-gap":Ze,"column-rule":Ze,"column-rule-width":Ze,"column-width":Ze,"font-size":Ze,"font-size-delta":Ze,"letter-spacing":Ze,"text-decoration-thickness":Ze,"text-indent":Ze,"text-stroke":Ze,"text-stroke-width":Ze,"word-spacing":Ze,motion:Ze,"motion-offset":Ze,outline:Ze,"outline-offset":Ze,"outline-width":Ze,perspective:Ze,"perspective-origin-x":tt,"perspective-origin-y":tt,"transform-origin":tt,"transform-origin-x":tt,"transform-origin-y":tt,"transform-origin-z":tt,"transition-delay":et,"transition-duration":et,"vertical-align":Ze,"flex-basis":Ze,"shape-margin":Ze,size:Ze,gap:Ze,grid:Ze,"grid-gap":Ze,"row-gap":Ze,"grid-row-gap":Ze,"grid-column-gap":Ze,"grid-template-rows":Ze,"grid-template-columns":Ze,"grid-auto-rows":Ze,"grid-auto-columns":Ze,"box-shadow-x":Ze,"box-shadow-y":Ze,"box-shadow-blur":Ze,"box-shadow-spread":Ze,"font-line-height":Ze,"text-shadow-x":Ze,"text-shadow-y":Ze,"text-shadow-blur":Ze});function it(e,t,n){if(null==t)return t;if(Array.isArray(t))for(var r=0;r<t.length;r++)t[r]=it(e,t[r],n);else if("object"===typeof t)if("fallbacks"===e)for(var i in t)t[i]=it(i,t[i],n);else for(var o in t)t[o]=it(e+"-"+o,t[o],n);else if("number"===typeof t&&!1===isNaN(t)){var a=n[e]||rt[e];return!a||0===t&&a===Ze?t.toString():"function"===typeof a?a(t).toString():""+t+a}return t}var ot=function(e){void 0===e&&(e={});var t=nt(e);return{onProcessStyle:function(e,n){if("style"!==n.type)return e;for(var r in e)e[r]=it(r,e[r],t);return e},onChangeValue:function(e,n){return it(n,e,t)}}};function at(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function st(e,t){if(e){if("string"===typeof e)return at(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?at(e,t):void 0}}function ut(e){return function(e){if(Array.isArray(e))return at(e)}(e)||function(e){if("undefined"!==typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||st(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var ct="",lt="",ft="",ht="",dt=h&&"ontouchstart"in document.documentElement;if(h){var pt={Moz:"-moz-",ms:"-ms-",O:"-o-",Webkit:"-webkit-"},vt=document.createElement("p").style;for(var yt in pt)if(yt+"Transform"in vt){ct=yt,lt=pt[yt];break}"Webkit"===ct&&"msHyphens"in vt&&(ct="ms",lt=pt.ms,ht="edge"),"Webkit"===ct&&"-apple-trailing-word"in vt&&(ft="apple")}var mt=ct,gt=lt,bt=ft,_t=ht,wt=dt;var kt={noPrefill:["appearance"],supportedProperty:function(e){return"appearance"===e&&("ms"===mt?"-webkit-"+e:gt+e)}},St={noPrefill:["color-adjust"],supportedProperty:function(e){return"color-adjust"===e&&("Webkit"===mt?gt+"print-"+e:e)}},Ot=/[-\s]+(.)?/g;function Et(e,t){return t?t.toUpperCase():""}function Tt(e){return e.replace(Ot,Et)}function Ct(e){return Tt("-"+e)}var Pt,xt={noPrefill:["mask"],supportedProperty:function(e,t){if(!/^mask/.test(e))return!1;if("Webkit"===mt){var n="mask-image";if(Tt(n)in t)return e;if(mt+Ct(n)in t)return gt+e}return e}},It={noPrefill:["text-orientation"],supportedProperty:function(e){return"text-orientation"===e&&("apple"!==bt||wt?e:gt+e)}},jt={noPrefill:["transform"],supportedProperty:function(e,t,n){return"transform"===e&&(n.transform?e:gt+e)}},Rt={noPrefill:["transition"],supportedProperty:function(e,t,n){return"transition"===e&&(n.transition?e:gt+e)}},At={noPrefill:["writing-mode"],supportedProperty:function(e){return"writing-mode"===e&&("Webkit"===mt||"ms"===mt&&"edge"!==_t?gt+e:e)}},Mt={noPrefill:["user-select"],supportedProperty:function(e){return"user-select"===e&&("Moz"===mt||"ms"===mt||"apple"===bt?gt+e:e)}},Nt={supportedProperty:function(e,t){return!!/^break-/.test(e)&&("Webkit"===mt?"WebkitColumn"+Ct(e)in t&>+"column-"+e:"Moz"===mt&&("page"+Ct(e)in t&&"page-"+e))}},Lt={supportedProperty:function(e,t){if(!/^(border|margin|padding)-inline/.test(e))return!1;if("Moz"===mt)return e;var n=e.replace("-inline","");return mt+Ct(n)in t&>+n}},Dt={supportedProperty:function(e,t){return Tt(e)in t&&e}},Ft={supportedProperty:function(e,t){var n=Ct(e);return"-"===e[0]||"-"===e[0]&&"-"===e[1]?e:mt+n in t?gt+e:"Webkit"!==mt&&"Webkit"+n in t&&"-webkit-"+e}},Ut={supportedProperty:function(e){return"scroll-snap"===e.substring(0,11)&&("ms"===mt?""+gt+e:e)}},Vt={supportedProperty:function(e){return"overscroll-behavior"===e&&("ms"===mt?gt+"scroll-chaining":e)}},Bt={"flex-grow":"flex-positive","flex-shrink":"flex-negative","flex-basis":"flex-preferred-size","justify-content":"flex-pack",order:"flex-order","align-items":"flex-align","align-content":"flex-line-pack"}
vendor: 4,321 bytes, line 2
2,qt={supportedProperty:function(e,t){var n=Bt[e];return!!n&&(mt+Ct(n)in t&>+n)}},Wt={flex:"box-flex","flex-grow":"box-flex","flex-direction":["box-orient","box-direction"],order:"box-ordinal-group","align-items":"box-align","flex-flow":["box-orient","box-direction"],"justify-content":"box-pack"},zt=Object.keys(Wt),Ht=function(e){return gt+e},Gt=[kt,St,xt,It,jt,Rt,At,Mt,Nt,Lt,Dt,Ft,Ut,Vt,qt,{supportedProperty:function(e,t,n){var r=n.multiple;if(zt.indexOf(e)>-1){var i=Wt[e];if(!Array.isArray(i))return mt+Ct(i)in t&>+i;if(!r)return!1;for(var o=0;o<i.length;o++)if(!(mt+Ct(i[0])in t))return!1;return i.map(Ht)}return!1}}],Kt=Gt.filter((function(e){return e.supportedProperty})).map((function(e){return e.supportedProperty})),Yt=Gt.filter((function(e){return e.noPrefill})).reduce((function(e,t){return e.push.apply(e,ut(t.noPrefill)),e}),[]),Qt={};if(h){Pt=document.createElement("p");var $t=window.getComputedStyle(document.documentElement,"");for(var Xt in $t)isNaN(Xt)||(Qt[$t[Xt]]=$t[Xt]);Yt.forEach((function(e){return delete Qt[e]}))}function Jt(e,t){if(void 0===t&&(t={}),!Pt)return e;if(null!=Qt[e])return Qt[e];"transition"!==e&&"transform"!==e||(t[e]=e in Pt.style);for(var n=0;n<Kt.length&&(Qt[e]=Kt[n](e,Pt.style,t),!Qt[e]);n++);try{Pt.style[e]=""}catch(r){return!1}return Qt[e]}var Zt,en={},tn={transition:1,"transition-property":1,"-webkit-transition":1,"-webkit-transition-property":1},nn=/(^\s*[\w-]+)|, (\s*[\w-]+)(?![^()]*\))/g;function rn(e,t,n){if("var"===t)return"var";if("all"===t)return"all";if("all"===n)return", all";var r=t?Jt(t):", "+Jt(n);return r||(t||n)}function on(e,t){var n=t;if(!Zt||"content"===e)return t;if("string"!==typeof n||!isNaN(parseInt(n,10)))return n;var r=e+n;if(null!=en[r])return en[r];try{Zt.style[e]=n}catch(i){return en[r]=!1,!1}if(tn[e])n=n.replace(nn,rn);else if(""===Zt.style[e]&&("-ms-flex"===(n=gt+n)&&(Zt.style[e]="-ms-flexbox"),Zt.style[e]=n,""===Zt.style[e]))return en[r]=!1,!1;return Zt.style[e]="",en[r]=n,en[r]}h&&(Zt=document.createElement("p"));var an=function(){function e(t){for(var n in t){var r=t[n];if("fallbacks"===n&&Array.isArray(r))t[n]=r.map(e);else{var i=!1,o=Jt(n);o&&o!==n&&(i=!0);var a=!1,s=on(o,w(r));s&&s!==r&&(a=!0),(i||a)&&(i&&delete t[n],t[o||n]=s||r)}}return t}return{onProcessRule:function(e){if("keyframes"===e.type){var t=e;t.at="-"===(n=t.at)[1]||"ms"===mt?n:"@"+gt+"keyframes"+n.substr(10)}var n},onProcessStyle:function(t,n){return"style"!==n.type?t:e(t)},onChangeValue:function(e,t){return on(t,w(e))||e}}};var sn=function(){var e=function(e,t){return e.length===t.length?e>t?1:-1:e.length-t.length};return{onProcessStyle:function(t,n){if("style"!==n.type)return t;for(var r={},i=Object.keys(t).sort(e),o=0;o<i.length;o++)r[i[o]]=t[i[o]];return r}}};function un(){return{plugins:[Me(),Be(),He(),Je(),ot(),"undefined"===typeof window?null:an(),sn()]}}var cn=Oe(un()),ln={disableGeneration:!1,generateClassName:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.disableGlobal,n=void 0!==t&&t,r=e.productionPrefix,i=void 0===r?"jss":r,o=e.seed,a=void 0===o?"":o,s=""===a?"":"".concat(a,"-"),u=0,c=function(){return u+=1};return function(e,t){var r=t.options.name;if(r&&0===r.indexOf("Mui")&&!t.options.link&&!n){if(-1!==Ie.indexOf(e.key))return"Mui-".concat(e.key);var o="".concat(s).concat(r,"-").concat(e.key);return t.options.theme[xe]&&""===a?"".concat(o,"-").concat(c()):o}return"".concat(s).concat(i).concat(c())}}(),jss:cn,sheetsCache:null,sheetsManager:new Map,sheetsRegistry:null},fn=s.a.createContext(ln);var hn=-1e9;function dn(){return hn+=1}function pn(e){return(pn="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function vn(e){return e&&"object"===pn(e)&&e.constructor===Object}function yn(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{clone:!0},r=n.clone?Object(o.a)({},e):e;return vn(e)&&vn(t)&&Object.keys(t).forEach((function(i){"__proto__"!==i&&(vn(t[i])&&i in e?r[i]=yn(e[i],t[i],n):r[i]=t[i])})),r}function mn(e){var t="function"===typeof e;return{create:function(n,r){var i;try{i=t?e(n):e}catch(u){throw u}if(!r||!n.overrides||!n.overrides[r])return i;var a=n.overrides[r],s=Object(o.a)({},i);
2return Object.keys(a).forEach((function(e){s[e]=yn(s[e],a[e])})),s},options:{}}}var gn={};function bn(e,t,n){var r=e.state;if(e.stylesOptions.disableGeneration)return t||{};r.cacheClasses||(r.cacheClasses={value:null,lastProp:null,lastJSS:{}});var i=!1;return r.classes!==r.cacheClasses.lastJSS&&(r.cacheClasses.lastJSS=r.classes,i=!0),t!==r.cacheClasses.lastProp&&(r.cacheClasses.lastProp=t,i=!0),i&&(r.cacheClasses.value=Ee({baseClasses:r.cacheClasses.lastJSS,newClasses:t,Component:n})),r.cacheClasses.value}function _n(e,t){var n=e.state,r=e.theme,i=e.stylesOptions,a=e.stylesCreator,s=e.name;if(!i.disableGeneration){var u=Te.get(i.sheetsManager,a,r);u||(u={refs:0,staticSheet:null,dynamicStyles:null},Te.set(i.sheetsManager,a,r,u));var c=Object(o.a)({},a.options,i,{theme:r,flip:"boolean"===typeof i.flip?i.flip:"rtl"===r.direction});c.generateId=c.serverGenerateClassName||c.generateClassName;var l=i.sheetsRegistry;if(0===u.refs){var f;i.sheetsCache&&(f=Te.get(i.sheetsCache,a,r));var h=a.create(r,s);f||((f=i.jss.createStyleSheet(h,Object(o.a)({link:!1},c))).attach(),i.sheetsCache&&Te.set(i.sheetsCache,a,r,f)),l&&l.add(f),u.staticSheet=f,u.dynamicStyles=ke(h)}if(u.dynamicStyles){var d=i.jss.createStyleSheet(u.dynamicStyles,Object(o.a)({link:!0},c));d.update(t),d.attach(),n.dynamicSheet=d,n.classes=Ee({baseClasses:u.staticSheet.classes,newClasses:d.classes}),l&&l.add(d)}else n.classes=u.staticSheet.classes;u.refs+=1}}function wn(e,t){var n=e.state;n.dynamicSheet&&n.dynamicSheet.update(t)}function kn(e){var t=e.state,n=e.theme,r=e.stylesOptions,i=e.stylesCreator;if(!r.disableGeneration){var o=Te.get(r.sheetsManager,i,n);o.refs-=1;var a=r.sheetsRegistry;0===o.refs&&(Te.delete(r.sheetsManager,i,n),r.jss.removeStyleSheet(o.staticSheet),a&&a.remove(o.staticSheet)),t.dynamicSheet&&(r.jss.removeStyleSheet(t.dynamicSheet),a&&a.remove(t.dynamicSheet))}}function Sn(e,t){var n,r=s.a.useRef([]),i=s.a.useMemo((function(){return{}}),t);r.current!==i&&(r.current=i,n=e()),s.a.useEffect((function(){return function(){n&&n()}}),[i])}function On(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.name,r=t.classNamePrefix,a=t.Component,u=t.defaultTheme,c=void 0===u?gn:u,l=i(t,["name","classNamePrefix","Component","defaultTheme"]),f=mn(e),h=n||r||"makeStyles";f.options={index:dn(),name:n,meta:h,classNamePrefix:h};var d=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=Pe()||c,r=Object(o.a)({},s.a.useContext(fn),l),i=s.a.useRef(),u=s.a.useRef();Sn((function(){var o={name:n,state:{},stylesCreator:f,stylesOptions:r,theme:t};return _n(o,e),u.current=!1,i.current=o,function(){kn(o)}}),[t,f]),s.a.useEffect((function(){u.current&&wn(i.current,e),u.current=!0}));var h=bn(i.current,e.classes,a);return h};return d}function En(e){var t=e.theme,n=e.name,r=e.props;if(!t||!t.props||!t.props[n])return r;var i,o=t.props[n];for(i in o)void 0===r[i]&&(r[i]=o[i]);return r}var Tn=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return function(n){var r=t.defaultTheme,a=t.withTheme,u=void 0!==a&&a,c=t.name,f=i(t,["defaultTheme","withTheme","name"]);var h=c,d=On(e,Object(o.a)({defaultTheme:r,Component:n,name:c||n.displayName,classNamePrefix:h},f)),p=s.a.forwardRef((function(e,t){e.classes;var a,l=e.innerRef,f=i(e,["classes","innerRef"]),h=d(Object(o.a)({},n.defaultProps,e)),p=f;return("string"===typeof c||u)&&(a=Pe()||r,c&&(p=En({theme:a,name:c,props:f})),u&&!p.theme&&(p.theme=a)),s.a.createElement(n,Object(o.a)({ref:l||t,classes:h},p))}));return l()(p,n),p}};function Cn(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Pn=["xs","sm","md","lg","xl"];function xn(e){var t=e.values,n=void 0===t?{xs:0,sm:600,md:960,lg:1280,xl:1920}:t,r=e.unit,a=void 0===r?"px":r,s=e.step,u=void 0===s?5:s,c=i(e,["values","unit","step"]);function l(e){var t="number"===typeof n[e]?n[e]:e;return"@media (min-width:".concat(t).concat(a,")")}function f(e,t){var r=Pn.indexOf(t);return r===Pn.length-1?l(e):"@media (min-width:".concat("number"===typeof n[e]?n[e]:e).concat(a,") and ")+"(max-width:".concat((-1!==r&&"number"===typeof n[Pn[r+1]]?n[Pn[r+1]]:t)-u/100).c
vendor: 9,831 bytes, line 2
2oncat(a,")")}return Object(o.a)({keys:Pn,values:n,up:l,down:function(e){var t=Pn.indexOf(e)+1,r=n[Pn[t]];return t===Pn.length?l("xs"):"@media (max-width:".concat(("number"===typeof r&&t>0?r:e)-u/100).concat(a,")")},between:f,only:function(e){return f(e,e)},width:function(e){return n[e]}},c)}function In(e,t,n){var r;return Object(o.a)({gutters:function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return Object(o.a)({paddingLeft:t(2),paddingRight:t(2)},n,Cn({},e.up("sm"),Object(o.a)({paddingLeft:t(3),paddingRight:t(3)},n[e.up("sm")])))},toolbar:(r={minHeight:56},Cn(r,"".concat(e.up("xs")," and (orientation: landscape)"),{minHeight:48}),Cn(r,e.up("sm"),{minHeight:64}),r)},n)}function jn(e){for(var t="https://material-ui.com/production-error/?code="+e,n=1;n<arguments.length;n+=1)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified Material-UI error #"+e+"; visit "+t+" for the full message."}var Rn={black:"#000",white:"#fff"},An={50:"#fafafa",100:"#f5f5f5",200:"#eeeeee",300:"#e0e0e0",400:"#bdbdbd",500:"#9e9e9e",600:"#757575",700:"#616161",800:"#424242",900:"#212121",A100:"#d5d5d5",A200:"#aaaaaa",A400:"#303030",A700:"#616161"},Mn={50:"#e8eaf6",100:"#c5cae9",200:"#9fa8da",300:"#7986cb",400:"#5c6bc0",500:"#3f51b5",600:"#3949ab",700:"#303f9f",800:"#283593",900:"#1a237e",A100:"#8c9eff",A200:"#536dfe",A400:"#3d5afe",A700:"#304ffe"},Nn={50:"#fce4ec",100:"#f8bbd0",200:"#f48fb1",300:"#f06292",400:"#ec407a",500:"#e91e63",600:"#d81b60",700:"#c2185b",800:"#ad1457",900:"#880e4f",A100:"#ff80ab",A200:"#ff4081",A400:"#f50057",A700:"#c51162"},Ln={50:"#ffebee",100:"#ffcdd2",200:"#ef9a9a",300:"#e57373",400:"#ef5350",500:"#f44336",600:"#e53935",700:"#d32f2f",800:"#c62828",900:"#b71c1c",A100:"#ff8a80",A200:"#ff5252",A400:"#ff1744",A700:"#d50000"},Dn={50:"#fff3e0",100:"#ffe0b2",200:"#ffcc80",300:"#ffb74d",400:"#ffa726",500:"#ff9800",600:"#fb8c00",700:"#f57c00",800:"#ef6c00",900:"#e65100",A100:"#ffd180",A200:"#ffab40",A400:"#ff9100",A700:"#ff6d00"},Fn={50:"#e3f2fd",100:"#bbdefb",200:"#90caf9",300:"#64b5f6",400:"#42a5f5",500:"#2196f3",600:"#1e88e5",700:"#1976d2",800:"#1565c0",900:"#0d47a1",A100:"#82b1ff",A200:"#448aff",A400:"#2979ff",A700:"#2962ff"},Un={50:"#e8f5e9",100:"#c8e6c9",200:"#a5d6a7",300:"#81c784",400:"#66bb6a",500:"#4caf50",600:"#43a047",700:"#388e3c",800:"#2e7d32",900:"#1b5e20",A100:"#b9f6ca",A200:"#69f0ae",A400:"#00e676",A700:"#00c853"};function Vn(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;return Math.min(Math.max(t,e),n)}function Bn(e){if(e.type)return e;if("#"===e.charAt(0))return Bn(function(e){e=e.substr(1);var t=new RegExp(".{1,".concat(e.length>=6?2:1,"}"),"g"),n=e.match(t);return n&&1===n[0].length&&(n=n.map((function(e){return e+e}))),n?"rgb".concat(4===n.length?"a":"","(").concat(n.map((function(e,t){return t<3?parseInt(e,16):Math.round(parseInt(e,16)/255*1e3)/1e3})).join(", "),")"):""}(e));var t=e.indexOf("("),n=e.substring(0,t);if(-1===["rgb","rgba","hsl","hsla"].indexOf(n))throw new Error(jn(3,e));var r=e.substring(t+1,e.length-1).split(",");return{type:n,values:r=r.map((function(e){return parseFloat(e)}))}}function qn(e){var t=e.type,n=e.values;return-1!==t.indexOf("rgb")?n=n.map((function(e,t){return t<3?parseInt(e,10):e})):-1!==t.indexOf("hsl")&&(n[1]="".concat(n[1],"%"),n[2]="".concat(n[2],"%")),"".concat(t,"(").concat(n.join(", "),")")}function Wn(e){var t="hsl"===(e=Bn(e)).type?Bn(function(e){var t=(e=Bn(e)).values,n=t[0],r=t[1]/100,i=t[2]/100,o=r*Math.min(i,1-i),a=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:(e+n/30)%12;return i-o*Math.max(Math.min(t-3,9-t,1),-1)},s="rgb",u=[Math.round(255*a(0)),Math.round(255*a(8)),Math.round(255*a(4))];return"hsla"===e.type&&(s+="a",u.push(t[3])),qn({type:s,values:u})}(e)).values:e.values;return t=t.map((function(e){return(e/=255)<=.03928?e/12.92:Math.pow((e+.055)/1.055,2.4)})),Number((.2126*t[0]+.7152*t[1]+.0722*t[2]).toFixed(3))}function zn(e,t){return e=Bn(e),t=Vn(t),"rgb"!==e.type&&"hsl"!==e.type||(e.type+="a"),e.values[3]=t,qn(e)}function Hn(e,t){if(e=Bn(e),t=Vn(t),-1!==e.type.indexOf("hsl"))e.values[2]*=1-t;else if(-1!==e.type.indexOf("rgb"))for(var n=0;n<3;n+=1)e.values[n]*=1-t;return qn(e)}function Gn(e,t){if(e=Bn(e),t=Vn(t),-1!==e.type.indexOf("hsl"))e.values[2]+=(100-e.values[2])*t;else if(-1!==e.type.indexOf("rgb"))for(var n=0;n<3;n+=1)e.values[n]+=(255-e.values[n])*t;return qn(e)}var Kn={text:{primary:"rgba(0, 0, 0, 0.87)",secondary:"rgba(0, 0, 0, 0.54)",disabled:"rgba(0, 0, 0, 0.38)",hint:"rgba(0, 0, 0, 0.38)"},divider:"rgba(0, 0, 0, 0.12)",background:{paper:Rn.white,default:An[50]},action:{active:"rgba(0, 0, 0, 0.54)",hover:"rgba(0, 0, 0, 0.04)",hoverOpacity:.04,selected:"rgba(0, 0, 0, 0.08)",selectedOpacity:.08,disabled:"rgba(0, 0, 0, 0.26)",disabledBackground:"rgba(0, 0, 0, 0.12)",disabledOpacity:.38,focus:"rgba(0, 0, 0, 0.12)",focusOpacity:.12,activatedOpacity:.12}},Yn={text:{primary:Rn.white,secondary:"rgba(255, 255, 255, 0.7)",disabled:"rgba(255, 255, 255, 0.5)",hint:"rgba(255, 255, 255, 0.5)",icon:"rgba(255, 255, 255, 0.5)"},divider:"rgba(255, 255, 255, 0.12)",background:{paper:An[800],default:"#303030"},action:{active:Rn.white,hover:"rgba(255, 255, 255, 0.08)",hoverOpacity:.08,selected:"rgba(255, 255, 255, 0.16)",selectedOpacity:.16,disabled:"rgba(255, 255, 255, 0.3)",disabledBackground:"rgba(255, 255, 255, 0.12)",disabledOpacity:.38,focus:"rgba(255, 255, 255, 0.12)",focusOpacity:.12,activatedOpacity:.24}};function Qn(e,t,n,r){var i=r.light||r,o=r.dark||1.5*r;e[t]||(e.hasOwnProperty(n)?e[t]=e[n]:"light"===t?e.light=Gn(e.main,i):"dark"===t&&(e.dark=Hn(e.main,o)))}function $n(e){var t=e.primary,n=void 0===t?{light:Mn[300],main:Mn[500],dark:Mn[700]}:t,r=e.secondary,a=void 0===r?{light:Nn.A200,main:Nn.A400,dark:Nn.A700}:r,s=e.error,u=void 0===s?{light:Ln[300],main:Ln[500],dark:Ln[700]}:s,c=e.warning,l=void 0===c?{light:Dn[300],main:Dn[500],dark:Dn[700]}:c,f=e.info,h=void 0===f?{light:Fn[300],main:Fn[500],dark:Fn[700]}:f,d=e.success,p=void 0===d?{light:Un[300],main:Un[500],dark:Un[700]}:d,v=e.type,y=void 0===v?"light":v,m=e.contrastThreshold,g=void 0===m?3:m,b=e.tonalOffset,_=void 0===b?.2:b,w=i(e,["primary","secondary","error","warning","info","success","type","contrastThreshold","tonalOffset"]);function k(e){return function(e,t){var n=Wn(e),r=Wn(t);return(Math.max(n,r)+.05)/(Math.min(n,r)+.05)}(e,Yn.text.primary)>=g?Yn.text.primary:Kn.text.primary}var S=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:500,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:300,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:700;if(!(e=Object(o.a)({},e)).main&&e[t]&&(e.main=e[t]),!e.main)throw new Error(jn(4,t));if("string"!==typeof e.main)throw new Error(jn(5,JSON.stringify(e.main)));return Qn(e,"light",n,_),Qn(e,"dark",r,_),e.contrastText||(e.contrastText=k(e.main)),e},O={dark:Yn,light:Kn};return yn(Object(o.a)({common:Rn,type:y,primary:S(n),secondary:S(a,"A400","A200","A700"),error:S(u),warning:S(l),info:S(h),success:S(p),grey:An,contrastThreshold:g,getContrastText:k,augmentColor:S,tonalOffset:_},O[y]),w)}function Xn(e){return Math.round(1e5*e)/1e5}var Jn={textTransform:"uppercase"},Zn='"Roboto", "Helvetica", "Arial", sans-serif';function er(e,t){var n="function"===typeof t?t(e):t,r=n.fontFamily,a=void 0===r?Zn:r,s=n.fontSize,u=void 0===s?14:s,c=n.fontWeightLight,l=void 0===c?300:c,f=n.fontWeightRegular,h=void 0===f?400:f,d=n.fontWeightMedium,p=void 0===d?500:d,v=n.fontWeightBold,y=void 0===v?700:v,m=n.htmlFontSize,g=void 0===m?16:m,b=n.allVariants,_=n.pxToRem,w=i(n,["fontFamily","fontSize","fontWeightLight","fontWeightRegular","fontWeightMedium","fontWeightBold","htmlFontSize","allVariants","pxToRem"]);var k=u/14,S=_||function(e){return"".concat(e/g*k,"rem")},O=function(e,t,n,r,i){return Object(o.a)({fontFamily:a,fontWeight:e,fontSize:S(t),lineHeight:n},a===Zn?{letterSpacing:"".concat(Xn(r/t),"em")}:{},i,b)},E={h1:O(l,96,1.167,-1.5),h2:O(l,60,1.2,-.5),h3:O(h,48,1.167,0),h4:O(h,34,1.235,.25),h5:O(h,24,1.334,0),h6:O(p,20,1.6,.15),subtitle1:O(h,16,1.75,.15),subtitle2:O(p,14,1.57,.1),body1:O(h,16,1.5,.15),body2:O(h,14,1.43,.15),button:O(p,14,1.75,.4,Jn),caption:O(h,12,1.66,.4),overline:O(h,12,2.66,1,Jn)};return yn(Object(o.a)({htmlFontSize:g,pxToRem:S,round:Xn,fontFamily:a,fontSize:u,fontWeightLight:l,fontWeightRegular:h,fontWeightMedium:p,fontWeightBold:y},E),w,{clone:!1})}function tr(){return["".concat(arguments.length<=0?void 0:arguments[0],"px ").concat(arguments.length<=1?void 0:arguments[1],"px ").concat(arguments.length<=2?void 0:arguments[2],"px ").concat(arguments.length<=3?void 0:arguments[3],"px rgba(0,0,0,").concat(.2,")"),"".concat(arguments.length<=4?void 0:arguments[4],"px ").concat(arguments.length<=5?void 0:arguments[5],"px ").concat(arguments.length<=6?void 0:arguments[6],"px ").concat(arguments.length<=7?void 0:arguments[7],"px rgba(0,0,0,").concat(.14,")"),"".concat(arguments.length<=8?void 0:arguments[8],"px ").concat(arguments.length<=9?void 0:arguments[9],"px ").concat(arguments.length<=10?void 0:arguments[10],"px ").concat(arguments.length<=11?void 0:arguments[11],"px rgba(0,0,0,").concat(.12,")")].join(",")}var nr=["none",tr(0,2,1,-1,0,1,1,0,0,1,3,0),tr(0,3,1,-2,0,2,2,0,0,1,5,0),tr(0,3,3,-2,0,3,4,0,0,1,8,0),tr(0,2,4,-1,0,4,5,0,0,1,10,0),tr(0,3,5,-1,0,5,8,0,0,1,14,0),tr(0,3,5,-1,0,6,10,0,0,1,18,0),tr(0,4,5,-2,0,7,10,1,0,2,16,1),tr(0,5,5,-3,0,8,10,1,0,3,14,2),tr(0,5,6,-3,0,9,12,1,0,3,16,2),tr(0,6,6,-3,0,10,14,1,0,4,18,3),tr(0,6,7,-4,0,11,15,1,0,4,20,3),tr(0,7,8,-4,0,12,17,2,0,5,22,4),tr(0,7,8,-4,0,13,19,2,0,5,24,4),tr(0,7,9,-4,0,14,21,2,0,5,26,4),tr(0,8,9,-5,0,15,22,2,0,6,28,5),tr(0,8,10,-5,0,16,24,2,0,6,30,5),tr(0,8,11,-5,0,17,26,2,0,6,32,5),tr(0,9,11,-5,0,18,28,2,0,7,34,6),tr(0,9,12,-6,0,19,29,2,0,7,36,6
2),tr(0,10,13,-6,0,20,31,3,0,8,38,7),tr(0,10,13,-6,0,21,33,3,0,8,40,7),tr(0,10,14,-6,0,22,35,3,0,8,42,7),tr(0,11,14,-7,0,23,36,3,0,9,44,8),tr(0,11,15,-7,0,24,38,3,0,9,46,8)],rr={borderRadius:4};function ir(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"!==typeof Symbol&&Symbol.iterator in Object(e)){var n=[],r=!0,i=!1,o=void 0;try{for(var a,s=e[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(u){i=!0,o=u}finally{try{r||null==s.return||s.return()}finally{if(i)throw o}}return n}}(e,t)||st(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var or=function(e,t){return t?yn(e,t,{clone:!1}):e},ar={xs:0,sm:600,md:960,lg:1280,xl:1920},sr={keys:["xs","sm","md","lg","xl"],up:function(e){return"@media (min-width:".concat(ar[e],"px)")}};var ur={m:"margin",p:"padding"},cr={t:"Top",r:"Right",b:"Bottom",l:"Left",x:["Left","Right"],y:["Top","Bottom"]},lr={marginX:"mx",marginY:"my",paddingX:"px",paddingY:"py"},fr=function(e){var t={};return function(n){return void 0===t[n]&&(t[n]=e(n)),t[n]}}((function(e){if(e.length>2){if(!lr[e])return[e];e=lr[e]}var t=ir(e.split(""),2),n=t[0],r=t[1],i=ur[n],o=cr[r]||"";return Array.isArray(o)?o.map((function(e){return i+e})):[i+o]})),hr=["m","mt","mr","mb","ml","mx","my","p","pt","pr","pb","pl","px","py","margin","marginTop","marginRight","marginBottom","marginLeft","marginX","marginY","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","paddingX","paddingY"];function dr(e){var t=e.spacing||8;return"number"===typeof t?function(e){return t*e}:Array.isArray(t)?function(e){return t[e]}:"function"===typeof t?t:function(){}}function pr(e,t){return function(n){return e.reduce((function(e,r){return e[r]=function(e,t){if("string"===typeof t||null==t)return t;var n=e(Math.abs(t));return t>=0?n:"number"===typeof n?-n:"-".concat(n)}(t,n),e}),{})}}function vr(e){var t=dr(e.theme);return Object.keys(e).map((function(n){if(-1===hr.indexOf(n))return null;var r=pr(fr(n),t),i=e[n];return function(e,t,n){if(Array.isArray(t)){var r=e.theme.breakpoints||sr;return t.reduce((function(e,i,o){return e[r.up(r.keys[o])]=n(t[o]),e}),{})}if("object"===pn(t)){var i=e.theme.breakpoints||sr;return Object.keys(t).reduce((function(e,r){return e[i.up(r)]=n(t[r]),e}),{})}return n(t)}(e,i,r)})).reduce(or,{})}vr.propTypes={},vr.filterProps=hr;function yr(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:8;if(e.mui)return e;var t=dr({spacing:e}),n=function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return 0===n.length?t(1):1===n.length?t(n[0]):n.map((function(e){if("string"===typeof e)return e;var n=t(e);return"number"===typeof n?"".concat(n,"px"):n})).join(" ")};return Object.defineProperty(n,"unit",{get:function(){return e}}),n.mui=!0,n}var mr={easeInOut:"cubic-bezier(0.4, 0, 0.2, 1)",easeOut:"cubic-bezier(0.0, 0, 0.2, 1)",easeIn:"cubic-bezier(0.4, 0, 1, 1)",sharp:"cubic-bezier(0.4, 0, 0.6, 1)"},gr={shortest:150,shorter:200,short:250,standard:300,complex:375,enteringScreen:225,leavingScreen:195};function br(e){return"".concat(Math.round(e),"ms")}var _r={easing:mr,duration:gr,create:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:["all"],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.duration,r=void 0===n?gr.standard:n,o=t.easing,a=void 0===o?mr.easeInOut:o,s=t.delay,u=void 0===s?0:s;i(t,["duration","easing","delay"]);return(Array.isArray(e)?e:[e]).map((function(e){return"".concat(e," ").concat("string"===typeof r?r:br(r)," ").concat(a," ").concat("string"===typeof u?u:br(u))})).join(",")},getAutoHeightDuration:function(e){if(!e)return 0;var t=e/36;return Math.round(10*(4+15*Math.pow(t,.25)+t/5))}},wr={mobileStepper:1e3,speedDial:1050,appBar:1100,drawer:1200,modal:1300,snackbar:1400,tooltip:1500};var kr=function(){for(var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.breakpoints,n=void 0===t?{}:t,r=e.mixins,o=void 0===r?{}:r,a=e.palette,s=void 0===a?{}:a,u=e.spacing,c=e.typography,l=void 0===c?{}:c,f=i(e,["breakpoints","mixins","palette","spacing","typography"]),h=$n(s),d=xn(n),p=yr(u),v=yn({breakpoints:d,direction:"ltr",mixins:In(d,p,o),overrides:{},palette:h,props:{},shadows:nr,typography:er(h,l),spacing:p,shape:rr,transitions:_r,zIndex:wr},f),y=arguments.length,m=new Array(y>1?y-1:0),g=1;g<y;g++)m[g-1]=arguments[g];return v=m.reduce((function(e,t){return yn(e,t)}),v)}();var Sr=function(e,t){return Tn(e,Object(o.a)({defaultTheme:kr},t))},Or=n(55);function Er(e,t){"function"===typeof e?e(t):e&&(e.current=t)}function Tr(e,t){return a.useMemo((function(){return null==e&&null==t?null:function(n){Er(e,n),Er(t,n)}}),[e,t])}var Cr="undefined"!==typeof window?a.useLayoutEffect:a.useEffect;function Pr(e){var t=a.useRef(e);return Cr((function(){t.current=e})),a.useCallback((function(){return t.current.apply(void 0,arguments)}),[])}var xr=!0,Ir=!1,jr=null,Rr={text:!0,search:!0,url:!0,tel:!0,email:!0,password:!0,number:!0,date:!0,month:!0,week:!0,time:!0,datetime:!0,"datetime-local":!0};function Ar(e){e.metaKey||e.altKey||e.ctrlKey||(xr=!0)}function Mr(){xr=!1}function Nr(){"hidden"===this.visibilityState&&Ir&&(xr=!0)}function Lr(e){var t=e.target;try{return t.matches(":focus-visible")}catch(n){}return xr||function(e){var t=e.type,n=e.tagName;return!("INPUT"!==n||!Rr[t]||e.readOnly)||"TEXTAREA"===n&&!e.readOnly||!!e.isContentEditable}(t)}function Dr(){Ir=!0,window.clearTimeout(jr),jr=window.setTimeout((function(){Ir=!1}),100)}function Fr(){return{isFocusVisible:Lr,onBlurVisible:Dr,ref:a.useCallback((function(e){var t,n=Or.findDOMNode(e);null!=n&&((t=n.ownerDocument).addEventListener("keydown",Ar,!0),t.addEventListener("mousedown",Mr,!0),t.addEventListener("pointerdown",Mr,!0),t.addEventListener("touchstart",Mr,!0),t.addEventListener("visibilitychange",Nr,!0))}),[])}}var Ur=n(96);function Vr(e,t){var n=Object.create(null);return e&&a.Children.map(e,(function(e){return e}
vendor: 1,505 bytes, line 2
2)).forEach((function(e){n[e.key]=function(e){return t&&Object(a.isValidElement)(e)?t(e):e}(e)})),n}function Br(e,t,n){return null!=n[t]?n[t]:e.props[t]}function qr(e,t,n){var r=Vr(e.children),i=function(e,t){function n(n){return n in t?t[n]:e[n]}e=e||{},t=t||{};var r,i=Object.create(null),o=[];for(var a in e)a in t?o.length&&(i[a]=o,o=[]):o.push(a);var s={};for(var u in t){if(i[u])for(r=0;r<i[u].length;r++){var c=i[u][r];s[i[u][r]]=n(c)}s[u]=n(u)}for(r=0;r<o.length;r++)s[o[r]]=n(o[r]);return s}(t,r);return Object.keys(i).forEach((function(o){var s=i[o];if(Object(a.isValidElement)(s)){var u=o in t,c=o in r,l=t[o],f=Object(a.isValidElement)(l)&&!l.props.in;!c||u&&!f?c||!u||f?c&&u&&Object(a.isValidElement)(l)&&(i[o]=Object(a.cloneElement)(s,{onExited:n.bind(null,s),in:l.props.in,exit:Br(s,"exit",e),enter:Br(s,"enter",e)})):i[o]=Object(a.cloneElement)(s,{in:!1}):i[o]=Object(a.cloneElement)(s,{onExited:n.bind(null,s),in:!0,exit:Br(s,"exit",e),enter:Br(s,"enter",e)})}})),i}var Wr=Object.values||function(e){return Object.keys(e).map((function(t){return e[t]}))},zr=function(e){function t(t,n){var r,i=(r=e.call(this,t,n)||this).handleExited.bind(y(r));return r.state={contextValue:{isMounting:!0},handleExited:i,firstRender:!0},r}Object(v.a)(t,e);var n=t.prototype;return n.componentDidMount=function(){this.mounted=!0,this.setState({contextValue:{isMounting:!1}})},n.componentWillUnmount=function(){this.mounted=!1},t.getDerivedStateFromProps=function(e,t){var n,r,i=t.children,o=t.handleExited;
vendor: 4,587 bytes, line 2
2return{children:t.firstRender?(n=e,r=o,Vr(n.children,(function(e){return Object(a.cloneElement)(e,{onExited:r.bind(null,e),in:!0,appear:Br(e,"appear",n),enter:Br(e,"enter",n),exit:Br(e,"exit",n)})}))):qr(e,i,o),firstRender:!1}},n.handleExited=function(e,t){var n=Vr(this.props.children);e.key in n||(e.props.onExited&&e.props.onExited(t),this.mounted&&this.setState((function(t){var n=Object(o.a)({},t.children);return delete n[e.key],{children:n}})))},n.render=function(){var e=this.props,t=e.component,n=e.childFactory,i=Object(r.a)(e,["component","childFactory"]),o=this.state.contextValue,a=Wr(this.state.children).map(n);return delete i.appear,delete i.enter,delete i.exit,null===t?s.a.createElement(Ur.a.Provider,{value:o},a):s.a.createElement(Ur.a.Provider,{value:o},s.a.createElement(t,i,a))},t}(s.a.Component);zr.propTypes={},zr.defaultProps={component:"div",childFactory:function(e){return e}};var Hr=zr,Gr="undefined"===typeof window?a.useEffect:a.useLayoutEffect;var Kr=function(e){var t=e.classes,n=e.pulsate,r=void 0!==n&&n,i=e.rippleX,o=e.rippleY,s=e.rippleSize,c=e.in,l=e.onExited,f=void 0===l?function(){}:l,h=e.timeout,d=a.useState(!1),p=d[0],v=d[1],y=Object(u.a)(t.ripple,t.rippleVisible,r&&t.ripplePulsate),m={width:s,height:s,top:-s/2+o,left:-s/2+i},g=Object(u.a)(t.child,p&&t.childLeaving,r&&t.childPulsate),b=Pr(f);return Gr((function(){if(!c){v(!0);var e=setTimeout(b,h);return function(){clearTimeout(e)}}}),[b,c,h]),a.createElement("span",{className:y,style:m},a.createElement("span",{className:g}))},Yr=a.forwardRef((function(e,t){var n=e.center,r=void 0!==n&&n,s=e.classes,c=e.className,l=i(e,["center","classes","className"]),f=a.useState([]),h=f[0],d=f[1],p=a.useRef(0),v=a.useRef(null);a.useEffect((function(){v.current&&(v.current(),v.current=null)}),[h]);var y=a.useRef(!1),m=a.useRef(null),g=a.useRef(null),b=a.useRef(null);a.useEffect((function(){return function(){clearTimeout(m.current)}}),[]);var _=a.useCallback((function(e){var t=e.pulsate,n=e.rippleX,r=e.rippleY,i=e.rippleSize,o=e.cb;d((function(e){return[].concat(ut(e),[a.createElement(Kr,{key:p.current,classes:s,timeout:550,pulsate:t,rippleX:n,rippleY:r,rippleSize:i})])})),p.current+=1,v.current=o}),[s]),w=a.useCallback((function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2?arguments[2]:void 0,i=t.pulsate,o=void 0!==i&&i,a=t.center,s=void 0===a?r||t.pulsate:a,u=t.fakeElement,c=void 0!==u&&u;if("mousedown"===e.type&&y.current)y.current=!1;else{"touchstart"===e.type&&(y.current=!0);var l,f,h,d=c?null:b.current,p=d?d.getBoundingClientRect():{width:0,height:0,left:0,top:0};if(s||0===e.clientX&&0===e.clientY||!e.clientX&&!e.touches)l=Math.round(p.width/2),f=Math.round(p.height/2);else{var v=e.touches?e.touches[0]:e,w=v.clientX,k=v.clientY;l=Math.round(w-p.left),f=Math.round(k-p.top)}if(s)(h=Math.sqrt((2*Math.pow(p.width,2)+Math.pow(p.height,2))/3))%2===0&&(h+=1);else{var S=2*Math.max(Math.abs((d?d.clientWidth:0)-l),l)+2,O=2*Math.max(Math.abs((d?d.clientHeight:0)-f),f)+2;h=Math.sqrt(Math.pow(S,2)+Math.pow(O,2))}e.touches?null===g.current&&(g.current=function(){_({pulsate:o,rippleX:l,rippleY:f,rippleSize:h,cb:n})},m.current=setTimeout((function(){g.current&&(g.current(),g.current=null)}),80)):_({pulsate:o,rippleX:l,rippleY:f,rippleSize:h,cb:n})}}),[r,_]),k=a.useCallback((function(){w({},{pulsate:!0})}),[w]),S=a.useCallback((function(e,t){if(clearTimeout(m.current),"touchend"===e.type&&g.current)return e.persist(),g.current(),g.current=null,void(m.current=setTimeout((function(){S(e,t)})));g.current=null,d((function(e){return e.length>0?e.slice(1):e})),v.current=t}),[]);return a.useImperativeHandle(t,(function(){return{pulsate:k,start:w,stop:S}}),[k,w,S]),a.createElement("span",Object(o.a)({className:Object(u.a)(s.root,c),ref:b},l),a.createElement(Hr,{component:null,exit:!0},h))})),Qr=Sr((function(e){return{root:{overflow:"hidden",pointerEvents:"none",position:"absolute",zIndex:0,top:0,right:0,bottom:0,left:0,borderRadius:"inherit"},ripple:{opacity:0,position:"absolute"},rippleVisible:{opacity:.3,transform:"scale(1)",animation:"$enter ".concat(550,"ms ").concat(e.transitions.easing.easeInOut)},ripplePulsate:{animationDuration:"".concat(e.transitions.duration.shorter,"ms")},child:{opacity:1,display:"block",width:"100%",height:"100%",borderRadius:"50%",backgroundColor:"currentColor"},childLeaving:{opacity:0,animation:"$exit ".concat(550,"ms ").concat(e.transitions.easing.easeInOut)},childPulsate:{position:"absolute",left:0,top:0,animation:"$pulsate 2500m
2s ".concat(e.transitions.easing.easeInOut," 200ms infinite")},"@keyframes enter":{"0%":{transform:"scale(0)",opacity:.1},"100%":{transform:"scale(1)",opacity:.3}},"@keyframes exit":{"0%":{opacity:1},"100%":{opacity:0}},"@keyframes pulsate":{"0%":{transform:"scale(1)"},"50%":{transform:"scale(0.92)"},"100%":{transform:"scale(1)"}}}}),{flip:!1,name:"MuiTouchRipple"})(a.memo(Yr)),$r=a.forwardRef((function(e,t){var n=e.action,r=e.buttonRef,s=e.centerRipple,c=void 0!==s&&s,l=e.children,f=e.classes,h=e.className,d=e.component,p=void 0===d?"button":d,v=e.disabled,y=void 0!==v&&v,m=e.disableRipple,g=void 0!==m&&m,b=e.disableTouchRipple,_=void 0!==b&&b,w=e.focusRipple,k=void 0!==w&&w,S=e.focusVisibleClassName,O=e.onBlur,E=e.onClick,T=e.onFocus,C=e.onFocusVisible,P=e.onKeyDown,x=e.onKeyUp,I=e.onMouseDown,j=e.onMouseLeave,R=e.onMouseUp,A=e.onTouchEnd,M=e.onTouchMove,N=e.onTouchStart,L=e.onDragLeave,D=e.tabIndex,F=void 0===D?0:D,U=e.TouchRippleProps,V=e.type,B=void 0===V?"button":V,q=i(e,["action","buttonRef","centerRipple","children","classes","className","component","disabled","disableRipple","disableTouchRipple","focusRipple","focusVisibleClassName","onBlur","onClick","onFocus","onFocusVisible","onKeyDown","onKeyUp","onMouseDown","onMouseLeave","onMouseUp","onTouchEnd","onTouchMove","onTouchStart","onDragLeave","tabIndex","TouchRippleProps","type"]),W=a.useRef(null);var z=a.useRef(null),H=a.useState(!1),G=H[0],K=H[1];y&&G&&K(!1);var Y=Fr(),Q=Y.isFocusVisible,$=Y.onBlurVisible,X=Y.ref;function J(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:_;return Pr((function(r){return t&&t(r),!n&&z.current&&z.current[e](r),!0}))}a.useImperativeHandle(n,(function(){return{focusVisible:function(){K(!0),W.current.focus()}}}),[]),a.useEffect((function(){G&&k&&!g&&z.current.pulsate()}),[g,k,G]);var Z=J("start",I),ee=J("stop",L),te=J("stop",R),ne=J("stop",(function(e){G&&e.preventDefault(),j&&j(e)})),re=J("start",N),ie=J("stop",A),oe=J("stop",M),ae=J("stop",(function(e){G&&($(e),K(!1)),O&&O(e)}),!1),se=Pr((function(e){W.current||(W.current=e.currentTarget),Q(e)&&(K(!0),C&&C(e)),T&&T(e)})),ue=function(){var e=Or.findDOMNode(W.current);return p&&"button"!==p&&!("A"===e.tagName&&e.href)},ce=a.useRef(!1),le=Pr((function(e){k&&!ce.current&&G&&z.current&&" "===e.key&&(ce.current=!0,e.persist(),z.current.stop(e,(function(){z.current.start(e)}))),e.target===e.currentTarget&&ue()&&" "===e.key&&e.preventDefault(),P&&P(e),e.target===e.currentTarget&&ue()&&"Enter"===e.key&&!y&&(e.preventDefault(),E&&E(e))})),fe=Pr((function(e){k&&" "===e.key&&z.current&&G&&!e.defaultPrevented&&(ce.current=!1,e.persist(),z.current.stop(e,(function(){z.current.pulsate(e)}))),x&&x(e),E&&e.target===e.currentTarget&&ue()&&" "===e.key&&!e.defaultPrevented&&E(e)})),he=p;"button"===he&&q.href&&(he="a");var de={};"button"===he?(de.type=B,de.disabled=y):("a"===he&&q.href||(de.role="button"),de["aria-disabled"]=y);var pe=Tr(r,t),ve=Tr(X,W),ye=Tr(pe,ve),me=a.useState(!1),ge=me[0],be=me[1];a.useEffect((function(){be(!0)}),[]);var _e=ge&&!g&&!y;return a.createElement(he,Object(o.a)({className:Object(u.a)(f.root,h,G&&[f.focusVisible,S],y&&f.disabled),onBlur:ae,onClick:E,onFocus:se,onKeyDown:le,onKeyUp:fe,onMouseDown:Z,onMouseLeave:ne,onMouseUp:te,onDragLeave:ee,onTouchEnd:ie,onTouchMove:oe,onTouchStart:re,ref:ye,tabIndex:y?-1:F},de,q),l,_e?a.createElement(Qr,Object(o.a)({ref:z,center:c},U)):null)})),Xr=Sr({root:{display:"inline-flex",alignItems:"center",justifyContent:"center",position:"relative",WebkitTapHighlightColor:"transparent",backgroundColor:"transparent",outline:0,border:0,margin:0,borderRadius:0,padding:0,cursor:"pointer",userSelect:"none",verticalAlign:"middle","-moz-appearance":"none","-webkit-appearance":"none",textDecoration:"none",color:"inherit","&::-moz-focus-inner":{borderStyle:"none"},"&$disabled":{pointerEvents:"none",cursor:"default"},"@media print":{colorAdjust:"exact"}},disabled:{},focusVisible:{}},{name:"MuiButtonBase"})($r);function Jr(e){if("string"!==typeof e)throw new Error(jn(7));return e.charAt(0).toUpperCase()+e.slice(1)}var Zr=a.forwardRef((function(e,t){var n=e.children,r=e.classes,s=e.className,c=e.color,l=void 0===c?"default":c,f=e.component,h=void 0===f?"button":f,d=e.disabled,p=void 0!==d&&d,v=e.disableElevation,y=void 0!==v&&v,m=e.disableFocusRipple,g=void 0!==m&&m,b=e.endIcon,_=e.focu
vendor: 5,024 bytes, lines 2-3
2sVisibleClassName,w=e.fullWidth,k=void 0!==w&&w,S=e.size,O=void 0===S?"medium":S,E=e.startIcon,T=e.type,C=void 0===T?"button":T,P=e.variant,x=void 0===P?"text":P,I=i(e,["children","classes","className","color","component","disabled","disableElevation","disableFocusRipple","endIcon","focusVisibleClassName","fullWidth","size","startIcon","type","variant"]),j=E&&a.createElement("span",{className:Object(u.a)(r.startIcon,r["iconSize".concat(Jr(O))])},E),R=b&&a.createElement("span",{className:Object(u.a)(r.endIcon,r["iconSize".concat(Jr(O))])},b);return a.createElement(Xr,Object(o.a)({className:Object(u.a)(r.root,r[x],s,"inherit"===l?r.colorInherit:"default"!==l&&r["".concat(x).concat(Jr(l))],"medium"!==O&&[r["".concat(x,"Size").concat(Jr(O))],r["size".concat(Jr(O))]],y&&r.disableElevation,p&&r.disabled,k&&r.fullWidth),component:h,disabled:p,focusRipple:!g,focusVisibleClassName:Object(u.a)(r.focusVisible,_),ref:t,type:C},I),a.createElement("span",{className:r.label},j,n,R))}));t.a=Sr((function(e){return{root:Object(o.a)({},e.typography.button,{boxSizing:"border-box",minWidth:64,padding:"6px 16px",borderRadius:e.shape.borderRadius,color:e.palette.text.primary,transition:e.transitions.create(["background-color","box-shadow","border"],{duration:e.transitions.duration.short}),"&:hover":{textDecoration:"none",backgroundColor:zn(e.palette.text.primary,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"},"&$disabled":{backgroundColor:"transparent"}},"&$disabled":{color:e.palette.action.disabled}}),label:{width:"100%",display:"inherit",alignItems:"inherit",justifyContent:"inherit"},text:{padding:"6px 8px"},textPrimary:{color:e.palette.primary.main,"&:hover":{backgroundColor:zn(e.palette.primary.main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},textSecondary:{color:e.palette.secondary.main,"&:hover":{backgroundColor:zn(e.palette.secondary.main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},outlined:{padding:"5px 15px",border:"1px solid ".concat("light"===e.palette.type?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)"),"&$disabled":{border:"1px solid ".concat(e.palette.action.disabledBackground)}},outlinedPrimary:{color:e.palette.primary.main,border:"1px solid ".concat(zn(e.palette.primary.main,.5)),"&:hover":{border:"1px solid ".concat(e.palette.primary.main),backgroundColor:zn(e.palette.primary.main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},outlinedSecondary:{color:e.palette.secondary.main,border:"1px solid ".concat(zn(e.palette.secondary.main,.5)),"&:hover":{border:"1px solid ".concat(e.palette.secondary.main),backgroundColor:zn(e.palette.secondary.main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},"&$disabled":{border:"1px solid ".concat(e.palette.action.disabled)}},contained:{color:e.palette.getContrastText(e.palette.grey[300]),backgroundColor:e.palette.grey[300],boxShadow:e.shadows[2],"&:hover":{backgroundColor:e.palette.grey.A100,boxShadow:e.shadows[4],"@media (hover: none)":{boxShadow:e.shadows[2],backgroundColor:e.palette.grey[300]},"&$disabled":{backgroundColor:e.palette.action.disabledBackground}},"&$focusVisible":{boxShadow:e.shadows[6]},"&:active":{boxShadow:e.shadows[8]},"&$disabled":{color:e.palette.action.disabled,boxShadow:e.shadows[0],backgroundColor:e.palette.action.disabledBackground}},containedPrimary:{color:e.palette.primary.contrastText,backgroundColor:e.palette.primary.main,"&:hover":{backgroundColor:e.palette.primary.dark,"@media (hover: none)":{backgroundColor:e.palette.primary.main}}},containedSecondary:{color:e.palette.secondary.contrastText,backgroundColor:e.palette.secondary.main,"&:hover":{backgroundColor:e.palette.secondary.dark,"@media (hover: none)":{backgroundColor:e.palette.secondary.main}}},disableElevation:{boxShadow:"none","&:hover":{boxShadow:"none"},"&$focusVisible":{boxShadow:"none"},"&:active":{boxShadow:"none"},"&$disabled":{boxShadow:"none"}},focusVisible:{},disabled:{},colorInherit:{color:"inherit",borderColor:"currentColor"},textSizeSmall:{padding:"4px 5px",fontSize:e.typography.pxToRem(13)},textSizeLarge:{padding:"8px 11px",fontSize:e.typography.pxToRem(15)},outlinedSizeSmall:{padding:"3px 9px",fontSize:e.typography.pxToRem(13)},outlinedSizeLarge:{padding:"7px 21px",fontSize:e.typography.pxToRem(15)},containedSizeSmall:{padding:"4px 10px",fontSize:e.typography.pxToRem(13)},containedSizeLarge:{padding:"8px 22px",fontSize:e.typography.pxToRem(15)},sizeSmall:{},sizeLarge:{},fullWidth:{width:"100%"},startIcon:{display:"inherit",marginRight:8,marginLeft:-4,"&$iconSizeSmall":{marginLeft:-2}},endIcon:{display:"inherit",marginRight:-4,marginLeft:8,"&$iconSizeSmall":{marginRight:-2}},iconSizeSmall:{"& > *:first-child":{fontSize:18}},iconSizeMedium:{"& > *:first-child":{fontSize:20}},iconSizeLarge:{"& > *:first-child":{fontSize:22}}}}),{name:"MuiButton"})(Zr)}]]); 3//# sourceMappingURL=2.b3adc127.chunk.js.map
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.