Files
im_webapp/umd/index.prod.js
T

2 lines
528 KiB
JavaScript
Raw Blame History

This file contains invisible Unicode characters
This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
!function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this).Webapp=e()}}(function(){return function(){return function e(t,n,r){function i(o,s){if(!n[o]){if(!t[o]){var l="function"==typeof require&&require;if(!s&&l)return l(o,!0);if(a)return a(o,!0);var c=new Error("Cannot find module '"+o+"'");throw c.code="MODULE_NOT_FOUND",c}var u=n[o]={exports:{}};t[o][0].call(u.exports,function(e){return i(t[o][1][e]||e)},u,u.exports,e,t,n,r)}return n[o].exports}for(var a="function"==typeof require&&require,o=0;o<r.length;o++)i(r[o]);return i}}()({1:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var r=e("@firebase/util"),i=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},a="[DEFAULT]",o=[],s=function(){function e(e,t,n){this.firebase_=n,this.isDeleted_=!1,this.services_={},this.name_=t.name,this._automaticDataCollectionEnabled=t.automaticDataCollectionEnabled||!1,this.options_=r.deepCopy(e),this.INTERNAL={getUid:function(){return null},getToken:function(){return Promise.resolve(null)},addAuthTokenListener:function(e){o.push(e),setTimeout(function(){return e(null)},0)},removeAuthTokenListener:function(e){o=o.filter(function(t){return t!==e})}}}return Object.defineProperty(e.prototype,"automaticDataCollectionEnabled",{get:function(){return this.checkDestroyed_(),this._automaticDataCollectionEnabled},set:function(e){this.checkDestroyed_(),this._automaticDataCollectionEnabled=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"name",{get:function(){return this.checkDestroyed_(),this.name_},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"options",{get:function(){return this.checkDestroyed_(),this.options_},enumerable:!0,configurable:!0}),e.prototype.delete=function(){var e=this;return new Promise(function(t){e.checkDestroyed_(),t()}).then(function(){e.firebase_.INTERNAL.removeApp(e.name_);var t=[];return Object.keys(e.services_).forEach(function(n){Object.keys(e.services_[n]).forEach(function(r){t.push(e.services_[n][r])})}),Promise.all(t.map(function(e){return e.INTERNAL.delete()}))}).then(function(){e.isDeleted_=!0,e.services_={}})},e.prototype._getService=function(e,t){if(void 0===t&&(t=a),this.checkDestroyed_(),this.services_[e]||(this.services_[e]={}),!this.services_[e][t]){var n=t!==a?t:void 0,r=this.firebase_.INTERNAL.factories[e](this,this.extendApp.bind(this),n);this.services_[e][t]=r}return this.services_[e][t]},e.prototype.extendApp=function(e){var t=this;r.deepExtend(this,e),e.INTERNAL&&e.INTERNAL.addAuthTokenListener&&(o.forEach(function(e){t.INTERNAL.addAuthTokenListener(e)}),o=[])},e.prototype.checkDestroyed_=function(){this.isDeleted_&&l("app-deleted",{name:this.name_})},e}();function l(e,t){throw c.create(e,t)}s.prototype.name&&s.prototype.options||s.prototype.delete||console.log("dc");var c=new r.ErrorFactory("app","Firebase",{"no-app":"No Firebase App '{$name}' has been created - call Firebase App.initializeApp()","bad-app-name":"Illegal App name: '{$name}","duplicate-app":"Firebase App named '{$name}' already exists","app-deleted":"Firebase App named '{$name}' already deleted","duplicate-service":"Firebase service named '{$name}' already registered","sa-not-supported":"Initializing the Firebase SDK with a service account is only allowed in a Node.js environment. On client devices, you should instead initialize the SDK with an api key and auth domain","invalid-app-argument":"firebase.{$name}() takes either no argument or a Firebase App instance."}),u=function e(){var t={},n={},o={},c={__esModule:!0,initializeApp:function(e,n){if(void 0===n&&(n={}),"object"!=typeof n||null===n){var r=n;n={name:r}}var o=n;void 0===o.name&&(o.name=a);var u=o.name;"string"==typeof u&&u||l("bad-app-name",{name:u+""}),i(t,u)&&l("duplicate-app",{name:u});var d=new s(e,o,c);return t[u]=d,p(d,"create"),d},app:u,apps:null,Promise:Promise,SDK_VERSION:"5.5.0",INTERNAL:{registerService:function(e,t,i,a,p){n[e]&&l("duplicate-service",{name:e}),n[e]=t,a&&(o[e]=a,d().forEach(function(e){a("create",e)}));var h=function(t){return void 0===t&&(t=u()),"function"!=typeof t[e]&&l("invalid-app-argument",{name:e}),t[e]()};return void 0!==i&&r.deepExtend(h,i),c[e]=h,s.prototype[e]=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return this._getService.bind(this,e).apply(this,p?t:[])},h},createFirebaseNamespace:e,extendNamespace:function(e){r.deepExtend(c,e)},createSubscribe:r.createSubscribe,ErrorFactory:r.ErrorFactory,removeApp:function(e){p(t[e],"delete"),delete t[e]},factories:n,useAsService:h,Promise:Promise,deepExtend:r.deepExtend}};function u(e){return i(t,e=e||a)||l("no-app",{name:e}),t[e]}function d(){return Object.keys(t).map(function(e){return t[e]})}function p(e,t){Object.keys(n).forEach(function(n){var r=h(e,n);null!==r&&o[r]&&o[r](t,e)})}function h(e,t){if("serverAuth"===t)return null;var n=t;return e.options,n}return r.patchProperty(c,"default",c),Object.defineProperty(c,"apps",{get:d}),r.patchProperty(u,"App",s),c}();n.firebase=u,n.default=u},{"@firebase/util":4}],2:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var r,i,a,o,s=e("@firebase/util"),l=e("tslib"),c=(r=e("@firebase/app"))&&"object"==typeof r&&"default"in r?r.default:r,u={AVAILABLE_IN_WINDOW:"only-available-in-window",AVAILABLE_IN_SW:"only-available-in-sw",SHOULD_BE_INHERITED:"should-be-overriden",BAD_SENDER_ID:"bad-sender-id",INCORRECT_GCM_SENDER_ID:"incorrect-gcm-sender-id",PERMISSION_DEFAULT:"permission-default",PERMISSION_BLOCKED:"permission-blocked",UNSUPPORTED_BROWSER:"unsupported-browser",NOTIFICATIONS_BLOCKED:"notifications-blocked",FAILED_DEFAULT_REGISTRATION:"failed-serviceworker-registration",SW_REGISTRATION_EXPECTED:"sw-registration-expected",GET_SUBSCRIPTION_FAILED:"get-subscription-failed",INVALID_SAVED_TOKEN:"invalid-saved-token",SW_REG_REDUNDANT:"sw-reg-redundant",TOKEN_SUBSCRIBE_FAILED:"token-subscribe-failed",TOKEN_SUBSCRIBE_NO_TOKEN:"token-subscribe-no-token",TOKEN_SUBSCRIBE_NO_PUSH_SET:"token-subscribe-no-push-set",TOKEN_UNSUBSCRIBE_FAILED:"token-unsubscribe-failed",TOKEN_UPDATE_FAILED:"token-update-failed",TOKEN_UPDATE_NO_TOKEN:"token-update-no-token",USE_SW_BEFORE_GET_TOKEN:"use-sw-before-get-token",INVALID_DELETE_TOKEN:"invalid-delete-token",DELETE_TOKEN_NOT_FOUND:"delete-token-not-found",DELETE_SCOPE_NOT_FOUND:"delete-scope-not-found",BG_HANDLER_FUNCTION_EXPECTED:"bg-handler-function-expected",NO_WINDOW_CLIENT_TO_MSG:"no-window-client-to-msg",UNABLE_TO_RESUBSCRIBE:"unable-to-resubscribe",NO_FCM_TOKEN_FOR_RESUBSCRIBE:"no-fcm-token-for-resubscribe",FAILED_TO_DELETE_TOKEN:"failed-to-delete-token",NO_SW_IN_REG:"no-sw-in-reg",BAD_SCOPE:"bad-scope",BAD_VAPID_KEY:"bad-vapid-key",BAD_SUBSCRIPTION:"bad-subscription",BAD_TOKEN:"bad-token",BAD_PUSH_SET:"bad-push-set",FAILED_DELETE_VAPID_KEY:"failed-delete-vapid-key",INVALID_PUBLIC_VAPID_KEY:"invalid-public-vapid-key",USE_PUBLIC_KEY_BEFORE_GET_TOKEN:"use-public-key-before-get-token",PUBLIC_KEY_DECRYPTION_FAILED:"public-vapid-key-decryption-failed"},d=((i={})[u.AVAILABLE_IN_WINDOW]="This method is available in a Window context.",i[u.AVAILABLE_IN_SW]="This method is available in a service worker context.",i[u.SHOULD_BE_INHERITED]="This method should be overriden by extended classes.",i[u.BAD_SENDER_ID]="Please ensure that 'messagingSenderId' is set correctly in the options passed into firebase.initializeApp().",i[u.PERMISSION_DEFAULT]="The required permissions were not granted and dismissed instead.",i[u.PERMISSION_BLOCKED]="The required permissions were not granted and blocked instead.",i[u.UNSUPPORTED_BROWSER]="This browser doesn't support the API's required to use the firebase SDK.",i[u.NOTIFICATIONS_BLOCKED]="Notifications have been blocked.",i[u.FAILED_DEFAULT_REGISTRATION]="We are unable to register the default service worker. {$browserErrorMessage}",i[u.SW_REGISTRATION_EXPECTED]="A service worker registration was the expected input.",i[u.GET_SUBSCRIPTION_FAILED]="There was an error when trying to get any existing Push Subscriptions.",i[u.INVALID_SAVED_TOKEN]="Unable to access details of the saved token.",i[u.SW_REG_REDUNDANT]="The service worker being used for push was made redundant.",i[u.TOKEN_SUBSCRIBE_FAILED]="A problem occured while subscribing the user to FCM: {$message}",i[u.TOKEN_SUBSCRIBE_NO_TOKEN]="FCM returned no token when subscribing the user to push.",i[u.TOKEN_SUBSCRIBE_NO_PUSH_SET]="FCM returned an invalid response when getting an FCM token.",i[u.TOKEN_UNSUBSCRIBE_FAILED]="A problem occured while unsubscribing the user from FCM: {$message}",i[u.TOKEN_UPDATE_FAILED]="A problem occured while updating the user from FCM: {$message}",i[u.TOKEN_UPDATE_NO_TOKEN]="FCM returned no token when updating the user to push.",i[u.USE_SW_BEFORE_GET_TOKEN]="The useServiceWorker() method may only be called once and must be called before calling getToken() to ensure your service worker is used.",i[u.INVALID_DELETE_TOKEN]="You must pass a valid token into deleteToken(), i.e. the token from getToken().",i[u.DELETE_TOKEN_NOT_FOUND]="The deletion attempt for token could not be performed as the token was not found.",i[u.DELETE_SCOPE_NOT_FOUND]="The deletion attempt for service worker scope could not be performed as the scope was not found.",i[u.BG_HANDLER_FUNCTION_EXPECTED]="The input to setBackgroundMessageHandler() must be a function.",i[u.NO_WINDOW_CLIENT_TO_MSG]="An attempt was made to message a non-existant window client.",i[u.UNABLE_TO_RESUBSCRIBE]="There was an error while re-subscribing the FCM token for push messaging. Will have to resubscribe the user on next visit. {$message}",i[u.NO_FCM_TOKEN_FOR_RESUBSCRIBE]="Could not find an FCM token and as a result, unable to resubscribe. Will have to resubscribe the user on next visit.",i[u.FAILED_TO_DELETE_TOKEN]="Unable to delete the currently saved token.",i[u.NO_SW_IN_REG]="Even though the service worker registration was successful, there was a problem accessing the service worker itself.",i[u.INCORRECT_GCM_SENDER_ID]="Please change your web app manifest's 'gcm_sender_id' value to '103953800507' to use Firebase messaging.",i[u.BAD_SCOPE]="The service worker scope must be a string with at least one character.",i[u.BAD_VAPID_KEY]="The public VAPID key is not a Uint8Array with 65 bytes.",i[u.BAD_SUBSCRIPTION]="The subscription must be a valid PushSubscription.",i[u.BAD_TOKEN]="The FCM Token used for storage / lookup was not a valid token string.",i[u.BAD_PUSH_SET]="The FCM push set used for storage / lookup was not not a valid push set string.",i[u.FAILED_DELETE_VAPID_KEY]="The VAPID key could not be deleted.",i[u.INVALID_PUBLIC_VAPID_KEY]="The public VAPID key must be a string.",i[u.PUBLIC_KEY_DECRYPTION_FAILED]="The public VAPID key did not equal 65 bytes when decrypted.",i),p=new s.ErrorFactory("messaging","Messaging",d),h=new Uint8Array([4,51,148,247,223,161,235,177,220,3,162,94,21,113,219,72,211,46,237,237,178,52,219,183,71,58,12,143,196,204,225,111,60,140,132,223,171,182,102,62,242,12,212,139,254,227,249,118,47,20,28,99,8,106,111,45,177,26,149,176,206,55,192,156,110]),f="https://fcm.googleapis.com";function m(e,t){if(null==e||null==t)return!1;if(e===t)return!0;if(e.byteLength!==t.byteLength)return!1;for(var n=new DataView(e),r=new DataView(t),i=0;i<e.byteLength;i++)if(n.getUint8(i)!==r.getUint8(i))return!1;return!0}function g(e){return function(e){var t=new Uint8Array(e);return btoa(String.fromCharCode.apply(null,t))}(e).replace(/=/g,"").replace(/\+/g,"-").replace(/\//g,"_")}!function(e){e.TYPE_OF_MSG="firebase-messaging-msg-type",e.DATA="firebase-messaging-msg-data"}(a||(a={})),function(e){e.PUSH_MSG_RECEIVED="push-msg-received",e.NOTIFICATION_CLICKED="notification-clicked"}(o||(o={}));var v=function(){function e(){}return e.prototype.getToken=function(e,t,n){return l.__awaiter(this,void 0,void 0,function(){var r,i,a,o,s,c,d,v;return l.__generator(this,function(l){switch(l.label){case 0:r=g(t.getKey("p256dh")),i=g(t.getKey("auth")),a="authorized_entity="+e+"&endpoint="+t.endpoint+"&encryption_key="+r+"&encryption_auth="+i,m(n.buffer,h.buffer)||(o=g(n),a+="&application_pub_key="+o),(s=new Headers).append("Content-Type","application/x-www-form-urlencoded"),c={method:"POST",headers:s,body:a},l.label=1;case 1:return l.trys.push([1,4,,5]),[4,fetch(f+"/fcm/connect/subscribe",c)];case 2:return[4,l.sent().json()];case 3:return d=l.sent(),[3,5];case 4:throw l.sent(),p.create(u.TOKEN_SUBSCRIBE_FAILED);case 5:if(d.error)throw v=d.error.message,p.create(u.TOKEN_SUBSCRIBE_FAILED,{message:v});if(!d.token)throw p.create(u.TOKEN_SUBSCRIBE_NO_TOKEN);if(!d.pushSet)throw p.create(u.TOKEN_SUBSCRIBE_NO_PUSH_SET);return[2,{token:d.token,pushSet:d.pushSet}]}})})},e.prototype.updateToken=function(e,t,n,r,i){return l.__awaiter(this,void 0,void 0,function(){var a,o,s,c,d,v,b,y;return l.__generator(this,function(l){switch(l.label){case 0:a=g(r.getKey("p256dh")),o=g(r.getKey("auth")),s="push_set="+n+"&token="+t+"&authorized_entity="+e+"&endpoint="+r.endpoint+"&encryption_key="+a+"&encryption_auth="+o,m(i.buffer,h.buffer)||(c=g(i),s+="&application_pub_key="+c),(d=new Headers).append("Content-Type","application/x-www-form-urlencoded"),v={method:"POST",headers:d,body:s},l.label=1;case 1:return l.trys.push([1,4,,5]),[4,fetch(f+"/fcm/connect/subscribe",v)];case 2:return[4,l.sent().json()];case 3:return b=l.sent(),[3,5];case 4:throw l.sent(),p.create(u.TOKEN_UPDATE_FAILED);case 5:if(b.error)throw y=b.error.message,p.create(u.TOKEN_UPDATE_FAILED,{message:y});if(!b.token)throw p.create(u.TOKEN_UPDATE_NO_TOKEN);return[2,b.token]}})})},e.prototype.deleteToken=function(e,t,n){return l.__awaiter(this,void 0,void 0,function(){var r,i,a,o,s;return l.__generator(this,function(l){switch(l.label){case 0:r="authorized_entity="+e+"&token="+t+"&pushSet="+n,(i=new Headers).append("Content-Type","application/x-www-form-urlencoded"),a={method:"POST",headers:i,body:r},l.label=1;case 1:return l.trys.push([1,4,,5]),[4,fetch(f+"/fcm/connect/unsubscribe",a)];case 2:return[4,l.sent().json()];case 3:if((o=l.sent()).error)throw s=o.error.message,p.create(u.TOKEN_UNSUBSCRIBE_FAILED,{message:s});return[3,5];case 4:throw l.sent(),p.create(u.TOKEN_UNSUBSCRIBE_FAILED);case 5:return[2]}})})},e}();function b(e){for(var t=(e+"=".repeat((4-e.length%4)%4)).replace(/\-/g,"+").replace(/_/g,"/"),n=atob(t),r=new Uint8Array(n.length),i=0;i<n.length;++i)r[i]=n.charCodeAt(i);return r}var y="undefined",w="fcm_token_object_Store";function E(){var e=indexedDB.open(y);e.onerror=function(e){},e.onsuccess=function(t){!function(e){if(e.objectStoreNames.contains(w)){var t=e.transaction(w).objectStore(w),n=new v,r=t.openCursor();r.onerror=function(e){console.warn("Unable to cleanup old IDB.",e)},r.onsuccess=function(){var t=r.result;if(t){var i=t.value;n.deleteToken(i.fcmSenderId,i.fcmToken,i.fcmPushSet),t.continue()}else e.close(),indexedDB.deleteDatabase(y)}}}(e.result)}}var _=function(){function e(){this.dbPromise=null}return e.prototype.get=function(e){return this.createTransaction(function(t){return t.get(e)})},e.prototype.getIndex=function(e,t){return this.createTransaction(function(n){return n.index(e).get(t)})},e.prototype.put=function(e){return this.createTransaction(function(t){return t.put(e)},"readwrite")},e.prototype.delete=function(e){return this.createTransaction(function(t){return t.delete(e)},"readwrite")},e.prototype.closeDatabase=function(){return l.__awaiter(this,void 0,void 0,function(){return l.__generator(this,function(e){switch(e.label){case 0:return this.dbPromise?[4,this.dbPromise]:[3,2];case 1:e.sent().close(),this.dbPromise=null,e.label=2;case 2:return[2]}})})},e.prototype.createTransaction=function(e,t){return void 0===t&&(t="readonly"),l.__awaiter(this,void 0,void 0,function(){var n,r,i,a;return l.__generator(this,function(o){switch(o.label){case 0:return[4,this.getDb()];case 1:return n=o.sent(),r=n.transaction(this.objectStoreName,t),i=r.objectStore(this.objectStoreName),[4,function(e){return new Promise(function(t,n){e.onsuccess=function(){t(e.result)},e.onerror=function(){n(e.error)}})}(e(i))];case 2:return a=o.sent(),[2,new Promise(function(e,t){r.oncomplete=function(){e(a)},r.onerror=function(){t(r.error)}})]}})})},e.prototype.getDb=function(){var e=this;return this.dbPromise||(this.dbPromise=new Promise(function(t,n){var r=indexedDB.open(e.dbName,e.dbVersion);r.onsuccess=function(){t(r.result)},r.onerror=function(){e.dbPromise=null,n(r.error)},r.onupgradeneeded=function(t){return e.onDbUpgrade(r,t)}})),this.dbPromise},e}();var S=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.dbName="fcm_token_details_db",t.dbVersion=3,t.objectStoreName="fcm_token_object_Store",t}return l.__extends(t,e),t.prototype.onDbUpgrade=function(e,t){var n=e.result;switch(t.oldVersion){case 0:(r=n.createObjectStore(this.objectStoreName,{keyPath:"swScope"})).createIndex("fcmSenderId","fcmSenderId",{unique:!1}),r.createIndex("fcmToken","fcmToken",{unique:!0});case 1:E();case 2:var r,i=(r=e.transaction.objectStore(this.objectStoreName)).openCursor();i.onsuccess=function(){var e=i.result;if(e){var t=e.value,n=l.__assign({},t);t.createTime||(n.createTime=Date.now()),"string"==typeof t.vapidKey&&(n.vapidKey=b(t.vapidKey)),"string"==typeof t.auth&&(n.auth=b(t.auth).buffer),"string"==typeof t.auth&&(n.p256dh=b(t.p256dh).buffer),e.update(n),e.continue()}}}},t.prototype.getTokenDetailsFromToken=function(e){return l.__awaiter(this,void 0,void 0,function(){return l.__generator(this,function(t){if(!e)throw p.create(u.BAD_TOKEN);return T({fcmToken:e}),[2,this.getIndex("fcmToken",e)]})})},t.prototype.getTokenDetailsFromSWScope=function(e){return l.__awaiter(this,void 0,void 0,function(){return l.__generator(this,function(t){if(!e)throw p.create(u.BAD_SCOPE);return T({swScope:e}),[2,this.get(e)]})})},t.prototype.saveTokenDetails=function(e){return l.__awaiter(this,void 0,void 0,function(){return l.__generator(this,function(t){if(!e.swScope)throw p.create(u.BAD_SCOPE);if(!e.vapidKey)throw p.create(u.BAD_VAPID_KEY);if(!e.endpoint||!e.auth||!e.p256dh)throw p.create(u.BAD_SUBSCRIPTION);if(!e.fcmSenderId)throw p.create(u.BAD_SENDER_ID);if(!e.fcmToken)throw p.create(u.BAD_TOKEN);if(!e.fcmPushSet)throw p.create(u.BAD_PUSH_SET);return T(e),[2,this.put(e)]})})},t.prototype.deleteToken=function(e){return l.__awaiter(this,void 0,void 0,function(){var t;return l.__generator(this,function(n){switch(n.label){case 0:return"string"!=typeof e||0===e.length?[2,Promise.reject(p.create(u.INVALID_DELETE_TOKEN))]:[4,this.getTokenDetailsFromToken(e)];case 1:if(!(t=n.sent()))throw p.create(u.DELETE_TOKEN_NOT_FOUND);return[4,this.delete(t.swScope)];case 2:return n.sent(),[2,t]}})})},t}(_);function T(e){if(e.fcmToken&&("string"!=typeof e.fcmToken||0===e.fcmToken.length))throw p.create(u.BAD_TOKEN);if(e.swScope&&("string"!=typeof e.swScope||0===e.swScope.length))throw p.create(u.BAD_SCOPE);if(e.vapidKey&&(!(e.vapidKey instanceof Uint8Array)||65!==e.vapidKey.length))throw p.create(u.BAD_VAPID_KEY);if(e.endpoint&&("string"!=typeof e.endpoint||0===e.endpoint.length))throw p.create(u.BAD_SUBSCRIPTION);if(e.auth&&!(e.auth instanceof ArrayBuffer))throw p.create(u.BAD_SUBSCRIPTION);if(e.p256dh&&!(e.p256dh instanceof ArrayBuffer))throw p.create(u.BAD_SUBSCRIPTION);if(e.fcmSenderId&&("string"!=typeof e.fcmSenderId||0===e.fcmSenderId.length))throw p.create(u.BAD_SENDER_ID);if(e.fcmPushSet&&("string"!=typeof e.fcmPushSet||0===e.fcmPushSet.length))throw p.create(u.BAD_PUSH_SET)}var C=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.dbName="fcm_vapid_details_db",t.dbVersion=1,t.objectStoreName="fcm_vapid_object_Store",t}return l.__extends(t,e),t.prototype.onDbUpgrade=function(e){e.result.createObjectStore(this.objectStoreName,{keyPath:"swScope"})},t.prototype.getVapidFromSWScope=function(e){return l.__awaiter(this,void 0,void 0,function(){var t;return l.__generator(this,function(n){switch(n.label){case 0:if("string"!=typeof e||0===e.length)throw p.create(u.BAD_SCOPE);return[4,this.get(e)];case 1:return[2,(t=n.sent())?t.vapidKey:void 0]}})})},t.prototype.saveVapidDetails=function(e,t){return l.__awaiter(this,void 0,void 0,function(){var n;return l.__generator(this,function(r){if("string"!=typeof e||0===e.length)throw p.create(u.BAD_SCOPE);if(null===t||65!==t.length)throw p.create(u.BAD_VAPID_KEY);return n={swScope:e,vapidKey:t},[2,this.put(n)]})})},t.prototype.deleteVapidDetails=function(e){return l.__awaiter(this,void 0,void 0,function(){var t;return l.__generator(this,function(n){switch(n.label){case 0:return[4,this.getVapidFromSWScope(e)];case 1:if(!(t=n.sent()))throw p.create(u.DELETE_SCOPE_NOT_FOUND);return[4,this.delete(e)];case 2:return n.sent(),[2,t]}})})},t}(_),k="messagingSenderId",x=function(){function e(e){var t=this;if(!e.options[k]||"string"!=typeof e.options[k])throw p.create(u.BAD_SENDER_ID);this.messagingSenderId=e.options[k],this.tokenDetailsModel=new S,this.vapidDetailsModel=new C,this.iidModel=new v,this.app=e,this.INTERNAL={delete:function(){return t.delete()}}}return e.prototype.getToken=function(){return l.__awaiter(this,void 0,void 0,function(){var e,t,n,r,i;return l.__generator(this,function(a){switch(a.label){case 0:if("denied"===(e=this.getNotificationPermission_()))throw p.create(u.NOTIFICATIONS_BLOCKED);return"granted"!==e?[2,null]:[4,this.getSWRegistration_()];case 1:return t=a.sent(),[4,this.getPublicVapidKey_()];case 2:return n=a.sent(),[4,this.getPushSubscription(t,n)];case 3:return r=a.sent(),[4,this.tokenDetailsModel.getTokenDetailsFromSWScope(t.scope)];case 4:return(i=a.sent())?[2,this.manageExistingToken(t,r,n,i)]:[2,this.getNewToken(t,r,n)]}})})},e.prototype.manageExistingToken=function(e,t,n,r){return l.__awaiter(this,void 0,void 0,function(){return l.__generator(this,function(i){switch(i.label){case 0:return function(e,t,n){if(!n.vapidKey||!m(t.buffer,n.vapidKey.buffer))return!1;var r=e.endpoint===n.endpoint,i=m(e.getKey("auth"),n.auth),a=m(e.getKey("p256dh"),n.p256dh);return r&&i&&a}(t,n,r)?Date.now()<r.createTime+6048e5?[2,r.fcmToken]:[2,this.updateToken(e,t,n,r)]:[4,this.deleteTokenFromDB(r.fcmToken)];case 1:return i.sent(),[2,this.getNewToken(e,t,n)]}})})},e.prototype.updateToken=function(e,t,n,r){return l.__awaiter(this,void 0,void 0,function(){var i,a,o;return l.__generator(this,function(s){switch(s.label){case 0:return s.trys.push([0,4,,6]),[4,this.iidModel.updateToken(this.messagingSenderId,r.fcmToken,r.fcmPushSet,t,n)];case 1:return i=s.sent(),a={swScope:e.scope,vapidKey:n,fcmSenderId:this.messagingSenderId,fcmToken:i,fcmPushSet:r.fcmPushSet,createTime:Date.now(),endpoint:t.endpoint,auth:t.getKey("auth"),p256dh:t.getKey("p256dh")},[4,this.tokenDetailsModel.saveTokenDetails(a)];case 2:return s.sent(),[4,this.vapidDetailsModel.saveVapidDetails(e.scope,n)];case 3:return s.sent(),[2,i];case 4:return o=s.sent(),[4,this.deleteToken(r.fcmToken)];case 5:throw s.sent(),o;case 6:return[2]}})})},e.prototype.getNewToken=function(e,t,n){return l.__awaiter(this,void 0,void 0,function(){var r,i;return l.__generator(this,function(a){switch(a.label){case 0:return[4,this.iidModel.getToken(this.messagingSenderId,t,n)];case 1:return r=a.sent(),i={swScope:e.scope,vapidKey:n,fcmSenderId:this.messagingSenderId,fcmToken:r.token,fcmPushSet:r.pushSet,createTime:Date.now(),endpoint:t.endpoint,auth:t.getKey("auth"),p256dh:t.getKey("p256dh")},[4,this.tokenDetailsModel.saveTokenDetails(i)];case 2:return a.sent(),[4,this.vapidDetailsModel.saveVapidDetails(e.scope,n)];case 3:return a.sent(),[2,r.token]}})})},e.prototype.deleteToken=function(e){return l.__awaiter(this,void 0,void 0,function(){var t,n;return l.__generator(this,function(r){switch(r.label){case 0:return[4,this.deleteTokenFromDB(e)];case 1:return r.sent(),[4,this.getSWRegistration_()];case 2:return(t=r.sent())?[4,t.pushManager.getSubscription()]:[3,4];case 3:if(n=r.sent())return[2,n.unsubscribe()];r.label=4;case 4:return[2,!0]}})})},e.prototype.deleteTokenFromDB=function(e){return l.__awaiter(this,void 0,void 0,function(){var t;return l.__generator(this,function(n){switch(n.label){case 0:return[4,this.tokenDetailsModel.deleteToken(e)];case 1:return t=n.sent(),[4,this.iidModel.deleteToken(t.fcmSenderId,t.fcmToken,t.fcmPushSet)];case 2:return n.sent(),[2]}})})},e.prototype.getPushSubscription=function(e,t){return e.pushManager.getSubscription().then(function(n){return n||e.pushManager.subscribe({userVisibleOnly:!0,applicationServerKey:t})})},e.prototype.requestPermission=function(){throw p.create(u.AVAILABLE_IN_WINDOW)},e.prototype.useServiceWorker=function(e){throw p.create(u.AVAILABLE_IN_WINDOW)},e.prototype.usePublicVapidKey=function(e){throw p.create(u.AVAILABLE_IN_WINDOW)},e.prototype.onMessage=function(e,t,n){throw p.create(u.AVAILABLE_IN_WINDOW)},e.prototype.onTokenRefresh=function(e,t,n){throw p.create(u.AVAILABLE_IN_WINDOW)},e.prototype.setBackgroundMessageHandler=function(e){throw p.create(u.AVAILABLE_IN_SW)},e.prototype.delete=function(){return l.__awaiter(this,void 0,void 0,function(){return l.__generator(this,function(e){switch(e.label){case 0:return[4,Promise.all([this.tokenDetailsModel.closeDatabase(),this.vapidDetailsModel.closeDatabase()])];case 1:return e.sent(),[2]}})})},e.prototype.getNotificationPermission_=function(){return Notification.permission},e.prototype.getTokenDetailsModel=function(){return this.tokenDetailsModel},e.prototype.getVapidDetailsModel=function(){return this.vapidDetailsModel},e.prototype.getIidModel=function(){return this.iidModel},e}();var P=function(e){function t(t){var n=e.call(this,t)||this;return n.bgMessageHandler=null,self.addEventListener("push",function(e){n.onPush(e)}),self.addEventListener("pushsubscriptionchange",function(e){n.onSubChange(e)}),self.addEventListener("notificationclick",function(e){n.onNotificationClick(e)}),n}return l.__extends(t,e),t.prototype.onPush=function(e){e.waitUntil(this.onPush_(e))},t.prototype.onSubChange=function(e){e.waitUntil(this.onSubChange_(e))},t.prototype.onNotificationClick=function(e){e.waitUntil(this.onNotificationClick_(e))},t.prototype.onPush_=function(e){return l.__awaiter(this,void 0,void 0,function(){var t,n,r,i,a,o;return l.__generator(this,function(s){switch(s.label){case 0:if(!e.data)return[2];try{t=e.data.json()}catch(e){return[2]}return[4,this.hasVisibleClients_()];case 1:return s.sent()?[2,this.sendMessageToWindowClients_(t)]:(n=this.getNotificationData_(t))?(r=n.title||"",[4,this.getSWRegistration_()]):[3,3];case 2:return i=s.sent(),a=n.actions,o=Notification.maxActions,a&&o&&a.length>o&&console.warn("This browser only supports "+o+" actions.The remaining actions will not be displayed."),[2,i.showNotification(r,n)];case 3:return this.bgMessageHandler?[4,this.bgMessageHandler(t)]:[3,5];case 4:return s.sent(),[2];case 5:return[2]}})})},t.prototype.onSubChange_=function(e){return l.__awaiter(this,void 0,void 0,function(){var e,t,n,r;return l.__generator(this,function(i){switch(i.label){case 0:return i.trys.push([0,2,,3]),[4,this.getSWRegistration_()];case 1:return e=i.sent(),[3,3];case 2:throw t=i.sent(),p.create(u.UNABLE_TO_RESUBSCRIBE,{message:t});case 3:return i.trys.push([3,5,,8]),[4,e.pushManager.getSubscription()];case 4:return i.sent(),[3,8];case 5:return n=i.sent(),[4,this.getTokenDetailsModel().getTokenDetailsFromSWScope(e.scope)];case 6:if(!(r=i.sent()))throw n;return[4,this.deleteToken(r.fcmToken)];case 7:throw i.sent(),n;case 8:return[2]}})})},t.prototype.onNotificationClick_=function(e){return l.__awaiter(this,void 0,void 0,function(){var t,n,r,i;return l.__generator(this,function(a){switch(a.label){case 0:return e.notification&&e.notification.data&&e.notification.data.FCM_MSG?e.action?[2]:(e.stopImmediatePropagation(),e.notification.close(),(t=e.notification.data.FCM_MSG).notification&&(n=t.fcmOptions&&t.fcmOptions.link||t.notification.click_action)?[4,this.getWindowClient_(n)]:[2]):[2];case 1:return(r=a.sent())?[3,3]:[4,self.clients.openWindow(n)];case 2:return r=a.sent(),[3,5];case 3:return[4,r.focus()];case 4:r=a.sent(),a.label=5;case 5:return r?(delete t.notification,delete t.fcmOptions,i=M(o.NOTIFICATION_CLICKED,t),[2,this.attemptToMessageClient_(r,i)]):[2]}})})},t.prototype.getNotificationData_=function(e){if(e&&"object"==typeof e.notification){var t,n=l.__assign({},e.notification);return n.data=l.__assign({},e.notification.data,((t={}).FCM_MSG=e,t)),n}},t.prototype.setBackgroundMessageHandler=function(e){if(!e||"function"!=typeof e)throw p.create(u.BG_HANDLER_FUNCTION_EXPECTED);this.bgMessageHandler=e},t.prototype.getWindowClient_=function(e){return l.__awaiter(this,void 0,void 0,function(){var t,n,r,i;return l.__generator(this,function(a){switch(a.label){case 0:return t=new URL(e,self.location.href).href,[4,N()];case 1:for(n=a.sent(),r=null,i=0;i<n.length;i++)if(new URL(n[i].url,self.location.href).href===t){r=n[i];break}return[2,r]}})})},t.prototype.attemptToMessageClient_=function(e,t){return l.__awaiter(this,void 0,void 0,function(){return l.__generator(this,function(n){if(!e)throw p.create(u.NO_WINDOW_CLIENT_TO_MSG);return e.postMessage(t),[2]})})},t.prototype.hasVisibleClients_=function(){return l.__awaiter(this,void 0,void 0,function(){return l.__generator(this,function(e){switch(e.label){case 0:return[4,N()];case 1:return[2,e.sent().some(function(e){return"visible"===e.visibilityState})]}})})},t.prototype.sendMessageToWindowClients_=function(e){return l.__awaiter(this,void 0,void 0,function(){var t,n,r=this;return l.__generator(this,function(i){switch(i.label){case 0:return[4,N()];case 1:return t=i.sent(),n=M(o.PUSH_MSG_RECEIVED,e),[4,Promise.all(t.map(function(e){return r.attemptToMessageClient_(e,n)}))];case 2:return i.sent(),[2]}})})},t.prototype.getSWRegistration_=function(){return l.__awaiter(this,void 0,void 0,function(){return l.__generator(this,function(e){return[2,self.registration]})})},t.prototype.getPublicVapidKey_=function(){return l.__awaiter(this,void 0,void 0,function(){var e,t;return l.__generator(this,function(n){switch(n.label){case 0:return[4,this.getSWRegistration_()];case 1:if(!(e=n.sent()))throw p.create(u.SW_REGISTRATION_EXPECTED);return[4,this.getVapidDetailsModel().getVapidFromSWScope(e.scope)];case 2:return null==(t=n.sent())?[2,h]:[2,t]}})})},t}(x);function N(){return self.clients.matchAll({type:"window",includeUncontrolled:!0})}function M(e,t){return(n={})[a.TYPE_OF_MSG]=e,n[a.DATA]=t,n;var n}var D=function(e){function t(t){var n=e.call(this,t)||this;return n.registrationToUse=null,n.publicVapidKeyToUse=null,n.manifestCheckPromise=null,n.messageObserver=null,n.tokenRefreshObserver=null,n.onMessageInternal=s.createSubscribe(function(e){n.messageObserver=e}),n.onTokenRefreshInternal=s.createSubscribe(function(e){n.tokenRefreshObserver=e}),n.setupSWMessageListener_(),n}return l.__extends(t,e),t.prototype.getToken=function(){return l.__awaiter(this,void 0,void 0,function(){return l.__generator(this,function(t){switch(t.label){case 0:return this.manifestCheckPromise||(this.manifestCheckPromise=function(){return l.__awaiter(this,void 0,void 0,function(){var e,t;return l.__generator(this,function(n){switch(n.label){case 0:if(!(e=document.querySelector('link[rel="manifest"]')))return[2];n.label=1;case 1:return n.trys.push([1,4,,5]),[4,fetch(e.href)];case 2:return[4,n.sent().json()];case 3:return t=n.sent(),[3,5];case 4:return n.sent(),[2];case 5:if(!t||!t.gcm_sender_id)return[2];if("103953800507"!==t.gcm_sender_id)throw p.create(u.INCORRECT_GCM_SENDER_ID);return[2]}})})}()),[4,this.manifestCheckPromise];case 1:return t.sent(),[2,e.prototype.getToken.call(this)]}})})},t.prototype.requestPermission=function(){return l.__awaiter(this,void 0,void 0,function(){var e;return l.__generator(this,function(t){switch(t.label){case 0:return"granted"===this.getNotificationPermission_()?[2]:[4,Notification.requestPermission()];case 1:if("granted"===(e=t.sent()))return[2];throw"denied"===e?p.create(u.PERMISSION_BLOCKED):p.create(u.PERMISSION_DEFAULT)}})})},t.prototype.useServiceWorker=function(e){if(!(e instanceof ServiceWorkerRegistration))throw p.create(u.SW_REGISTRATION_EXPECTED);if(null!=this.registrationToUse)throw p.create(u.USE_SW_BEFORE_GET_TOKEN);this.registrationToUse=e},t.prototype.usePublicVapidKey=function(e){if("string"!=typeof e)throw p.create(u.INVALID_PUBLIC_VAPID_KEY);if(null!=this.publicVapidKeyToUse)throw p.create(u.USE_PUBLIC_KEY_BEFORE_GET_TOKEN);var t=b(e);if(65!==t.length)throw p.create(u.PUBLIC_KEY_DECRYPTION_FAILED);this.publicVapidKeyToUse=t},t.prototype.onMessage=function(e,t,n){return"function"==typeof e?this.onMessageInternal(e,t,n):this.onMessageInternal(e)},t.prototype.onTokenRefresh=function(e,t,n){return"function"==typeof e?this.onTokenRefreshInternal(e,t,n):this.onTokenRefreshInternal(e)},t.prototype.waitForRegistrationToActivate_=function(e){var t=e.installing||e.waiting||e.active;return new Promise(function(n,r){if(t)if("activated"!==t.state)if("redundant"!==t.state){var i=function(){if("activated"===t.state)n(e);else{if("redundant"!==t.state)return;r(p.create(u.SW_REG_REDUNDANT))}t.removeEventListener("statechange",i)};t.addEventListener("statechange",i)}else r(p.create(u.SW_REG_REDUNDANT));else n(e);else r(p.create(u.NO_SW_IN_REG))})},t.prototype.getSWRegistration_=function(){var e=this;return this.registrationToUse?this.waitForRegistrationToActivate_(this.registrationToUse):(this.registrationToUse=null,navigator.serviceWorker.register("/firebase-messaging-sw.js",{scope:"/firebase-cloud-messaging-push-scope"}).catch(function(e){throw p.create(u.FAILED_DEFAULT_REGISTRATION,{browserErrorMessage:e.message})}).then(function(t){return e.waitForRegistrationToActivate_(t).then(function(){return e.registrationToUse=t,t.update(),t})}))},t.prototype.getPublicVapidKey_=function(){return l.__awaiter(this,void 0,void 0,function(){return l.__generator(this,function(e){return this.publicVapidKeyToUse?[2,this.publicVapidKeyToUse]:[2,h]})})},t.prototype.setupSWMessageListener_=function(){var e=this;navigator.serviceWorker.addEventListener("message",function(t){if(t.data&&t.data[a.TYPE_OF_MSG]){var n=t.data;switch(n[a.TYPE_OF_MSG]){case o.PUSH_MSG_RECEIVED:case o.NOTIFICATION_CLICKED:var r=n[a.DATA];e.messageObserver&&e.messageObserver.next(r)}}},!1)},t}(x);function A(e){var t={isSupported:O};e.INTERNAL.registerService("messaging",function(e){if(!O())throw p.create(u.UNSUPPORTED_BROWSER);return self&&"ServiceWorkerGlobalScope"in self?new P(e):new D(e)},t)}function O(){return self&&"ServiceWorkerGlobalScope"in self?"PushManager"in self&&"Notification"in self&&ServiceWorkerRegistration.prototype.hasOwnProperty("showNotification")&&PushSubscription.prototype.hasOwnProperty("getKey"):navigator.cookieEnabled&&"serviceWorker"in navigator&&"PushManager"in window&&"Notification"in window&&"fetch"in window&&ServiceWorkerRegistration.prototype.hasOwnProperty("showNotification")&&PushSubscription.prototype.hasOwnProperty("getKey")}A(c),n.registerMessaging=A,n.isSupported=O},{"@firebase/app":1,"@firebase/util":4,tslib:31}],3:[function(e,t,n){(function(t,n){"use strict";e("whatwg-fetch");var r=setTimeout;function i(){}function a(e){if(!(this instanceof a))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=[],u(e,this)}function o(e,t){for(;3===e._state;)e=e._value;0!==e._state?(e._handled=!0,a._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 l(t.promise,e)}s(t.promise,r)}else(1===e._state?s:l)(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 a)return e._state=3,e._value=t,void c(e);if("function"==typeof n)return void u((r=n,i=t,function(){r.apply(i,arguments)}),e)}e._state=1,e._value=t,c(e)}catch(t){l(e,t)}var r,i}function l(e,t){e._state=2,e._value=t,c(e)}function c(e){2===e._state&&0===e._deferreds.length&&a._immediateFn(function(){e._handled||a._unhandledRejectionFn(e._value)});for(var t=0,n=e._deferreds.length;t<n;t++)o(e,e._deferreds[t]);e._deferreds=null}function u(e,t){var n=!1;try{e(function(e){n||(n=!0,s(t,e))},function(e){n||(n=!0,l(t,e))})}catch(e){if(n)return;n=!0,l(t,e)}}a.prototype.catch=function(e){return this.then(null,e)},a.prototype.then=function(e,t){var n=new this.constructor(i);return o(this,new function(e,t,n){this.onFulfilled="function"==typeof e?e:null,this.onRejected="function"==typeof t?t:null,this.promise=n}(e,t,n)),n},a.prototype.finally=function(e){var t=this.constructor;return this.then(function(n){return t.resolve(e()).then(function(){return n})},function(n){return t.resolve(e()).then(function(){return t.reject(n)})})},a.all=function(e){return new a(function(t,n){if(!e||void 0===e.length)throw new TypeError("Promise.all accepts an array");var r=Array.prototype.slice.call(e);if(0===r.length)return t([]);var i=r.length;function a(e,o){try{if(o&&("object"==typeof o||"function"==typeof o)){var s=o.then;if("function"==typeof s)return void s.call(o,function(t){a(e,t)},n)}r[e]=o,0==--i&&t(r)}catch(e){n(e)}}for(var o=0;o<r.length;o++)a(o,r[o])})},a.resolve=function(e){return e&&"object"==typeof e&&e.constructor===a?e:new a(function(t){t(e)})},a.reject=function(e){return new a(function(t,n){n(e)})},a.race=function(e){return new a(function(t,n){for(var r=0,i=e.length;r<i;r++)e[r].then(t,n)})},a._immediateFn="function"==typeof n&&function(e){n(e)}||function(e){r(e,0)},a._unhandledRejectionFn=function(e){"undefined"!=typeof console&&console&&console.warn("Possible Unhandled Promise Rejection:",e)};var d=function(){if("undefined"!=typeof self)return self;if("undefined"!=typeof window)return window;if(void 0!==t)return t;throw new Error("unable to locate global object")}();function p(e,t){return e(t={exports:{}},t.exports),t.exports}d.Promise||(d.Promise=a);var h=p(function(e){var t=e.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=t)}),f=p(function(e){var t=e.exports={version:"2.5.5"};"number"==typeof __e&&(__e=t)}),m=(f.version,function(e){return"object"==typeof e?null!==e:"function"==typeof e}),g=function(e){if(!m(e))throw TypeError(e+" is not an object!");return e},v=function(e){try{return!!e()}catch(e){return!0}},b=!v(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a}),y=h.document,w=m(y)&&m(y.createElement),E=function(e){return w?y.createElement(e):{}},_=!b&&!v(function(){return 7!=Object.defineProperty(E("div"),"a",{get:function(){return 7}}).a}),S=function(e,t){if(!m(e))return e;var n,r;if(t&&"function"==typeof(n=e.toString)&&!m(r=n.call(e)))return r;if("function"==typeof(n=e.valueOf)&&!m(r=n.call(e)))return r;if(!t&&"function"==typeof(n=e.toString)&&!m(r=n.call(e)))return r;throw TypeError("Can't convert object to primitive value")},T=Object.defineProperty,C={f:b?Object.defineProperty:function(e,t,n){if(g(e),t=S(t,!0),g(n),_)try{return T(e,t,n)}catch(e){}if("get"in n||"set"in n)throw TypeError("Accessors not supported!");return"value"in n&&(e[t]=n.value),e}},k=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}},x=b?function(e,t,n){return C.f(e,t,k(1,n))}:function(e,t,n){return e[t]=n,e},P={}.hasOwnProperty,N=function(e,t){return P.call(e,t)},M=0,D=Math.random(),A=function(e){return"Symbol(".concat(void 0===e?"":e,")_",(++M+D).toString(36))},O=p(function(e){var t=A("src"),n=Function.toString,r=(""+n).split("toString");f.inspectSource=function(e){return n.call(e)},(e.exports=function(e,n,i,a){var o="function"==typeof i;o&&(N(i,"name")||x(i,"name",n)),e[n]!==i&&(o&&(N(i,t)||x(i,t,e[n]?""+e[n]:r.join(String(n)))),e===h?e[n]=i:a?e[n]?e[n]=i:x(e,n,i):(delete e[n],x(e,n,i)))})(Function.prototype,"toString",function(){return"function"==typeof this&&this[t]||n.call(this)})}),I=function(e,t,n){if(function(e){if("function"!=typeof e)throw TypeError(e+" is not a function!")}(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)}},R=function(e,t,n){var r,i,a,o,s=e&R.F,l=e&R.G,c=e&R.S,u=e&R.P,d=e&R.B,p=l?h:c?h[t]||(h[t]={}):(h[t]||{}).prototype,m=l?f:f[t]||(f[t]={}),g=m.prototype||(m.prototype={});for(r in l&&(n=t),n)a=((i=!s&&p&&void 0!==p[r])?p:n)[r],o=d&&i?I(a,h):u&&"function"==typeof a?I(Function.call,a):a,p&&O(p,r,a,e&R.U),m[r]!=a&&x(m,r,o),u&&g[r]!=a&&(g[r]=a)};h.core=f,R.F=1,R.G=2,R.S=4,R.P=8,R.B=16,R.W=32,R.U=64,R.R=128;var U=R,F={}.toString,L=function(e){return F.call(e).slice(8,-1)},j=Object("z").propertyIsEnumerable(0)?Object:function(e){return"String"==L(e)?e.split(""):Object(e)},W=function(e){if(void 0==e)throw TypeError("Can't call method on "+e);return e},B=function(e){return Object(W(e))},z=Math.ceil,V=Math.floor,q=function(e){return isNaN(e=+e)?0:(e>0?V:z)(e)},H=Math.min,K=function(e){return e>0?H(q(e),9007199254740991):0},G=Array.isArray||function(e){return"Array"==L(e)},$=h["__core-js_shared__"]||(h["__core-js_shared__"]={}),Y=function(e){return $[e]||($[e]={})},Q=p(function(e){var t=Y("wks"),n=h.Symbol,r="function"==typeof n;(e.exports=function(e){return t[e]||(t[e]=r&&n[e]||(r?n:A)("Symbol."+e))}).store=t}),X=Q("species"),J=function(e,t){return new(function(e){var t;return G(e)&&("function"!=typeof(t=e.constructor)||t!==Array&&!G(t.prototype)||(t=void 0),m(t)&&null===(t=t[X])&&(t=void 0)),void 0===t?Array:t}(e))(t)},Z=function(e,t){var n=1==e,r=2==e,i=3==e,a=4==e,o=6==e,s=5==e||o,l=t||J;return function(t,c,u){for(var d,p,h=B(t),f=j(h),m=I(c,u,3),g=K(f.length),v=0,b=n?l(t,g):r?l(t,0):void 0;g>v;v++)if((s||v in f)&&(p=m(d=f[v],v,h),e))if(n)b[v]=p;else if(p)switch(e){case 3:return!0;case 5:return d;case 6:return v;case 2:b.push(d)}else if(a)return!1;return o?-1:i||a?a:b}},ee=Q("unscopables"),te=Array.prototype;void 0==te[ee]&&x(te,ee,{});var ne=function(e){te[ee][e]=!0},re=Z(5),ie=!0;"find"in[]&&Array(1).find(function(){ie=!1}),U(U.P+U.F*ie,"Array",{find:function(e){return re(this,e,arguments.length>1?arguments[1]:void 0)}}),ne("find");f.Array.find;var ae=Z(6),oe=!0;"findIndex"in[]&&Array(1).findIndex(function(){oe=!1}),U(U.P+U.F*oe,"Array",{findIndex:function(e){return ae(this,e,arguments.length>1?arguments[1]:void 0)}}),ne("findIndex");f.Array.findIndex;var se,le=function(e){return j(W(e))},ce=Math.max,ue=Math.min,de=Y("keys"),pe=function(e){return de[e]||(de[e]=A(e))},he=(se=!1,function(e,t,n){var r,i=le(e),a=K(i.length),o=function(e,t){return(e=q(e))<0?ce(e+t,0):ue(e,t)}(n,a);if(se&&t!=t){for(;a>o;)if((r=i[o++])!=r)return!0}else for(;a>o;o++)if((se||o in i)&&i[o]===t)return se||o||0;return!se&&-1}),fe=pe("IE_PROTO"),me=function(e,t){var n,r=le(e),i=0,a=[];for(n in r)n!=fe&&N(r,n)&&a.push(n);for(;t.length>i;)N(r,n=t[i++])&&(~he(a,n)||a.push(n));return a},ge="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(","),ve=Object.keys||function(e){return me(e,ge)},be={f:Object.getOwnPropertySymbols},ye={f:{}.propertyIsEnumerable},we=Object.assign,Ee=!we||v(function(){var e={},t={},n=Symbol(),r="abcdefghijklmnopqrst";return e[n]=7,r.split("").forEach(function(e){t[e]=e}),7!=we({},e)[n]||Object.keys(we({},t)).join("")!=r})?function(e,t){for(var n=B(e),r=arguments.length,i=1,a=be.f,o=ye.f;r>i;)for(var s,l=j(arguments[i++]),c=a?ve(l).concat(a(l)):ve(l),u=c.length,d=0;u>d;)o.call(l,s=c[d++])&&(n[s]=l[s]);return n}:we;U(U.S+U.F,"Object",{assign:Ee});f.Object.assign;var _e=Q("match"),Se=function(e,t,n){if(m(r=t)&&(void 0!==(i=r[_e])?i:"RegExp"==L(r)))throw TypeError("String#"+n+" doesn't accept regex!");var r,i;return String(W(e))},Te=Q("match"),Ce="".startsWith;U(U.P+U.F*function(e){var t=/./;try{"/./"[e](t)}catch(n){try{return t[Te]=!1,!"/./"[e](t)}catch(e){}}return!0}("startsWith"),"String",{startsWith:function(e){var t=Se(this,e,"startsWith"),n=K(Math.min(arguments.length>1?arguments[1]:void 0,t.length)),r=String(e);return Ce?Ce.call(t,r,n):t.slice(n,n+r.length)===r}});f.String.startsWith;U(U.P,"String",{repeat:function(e){var t=String(W(this)),n="",r=q(e);if(r<0||r==1/0)throw RangeError("Count can't be negative");for(;r>0;(r>>>=1)&&(t+=t))1&r&&(n+=t);return n}});f.String.repeat;var ke=p(function(e){var t=A("meta"),n=C.f,r=0,i=Object.isExtensible||function(){return!0},a=!v(function(){return i(Object.preventExtensions({}))}),o=function(e){n(e,t,{value:{i:"O"+ ++r,w:{}}})},s=e.exports={KEY:t,NEED:!1,fastKey:function(e,n){if(!m(e))return"symbol"==typeof e?e:("string"==typeof e?"S":"P")+e;if(!N(e,t)){if(!i(e))return"F";if(!n)return"E";o(e)}return e[t].i},getWeak:function(e,n){if(!N(e,t)){if(!i(e))return!0;if(!n)return!1;o(e)}return e[t].w},onFreeze:function(e){return a&&s.NEED&&i(e)&&!N(e,t)&&o(e),e}}}),xe=(ke.KEY,ke.NEED,ke.fastKey,ke.getWeak,ke.onFreeze,C.f),Pe=Q("toStringTag"),Ne=function(e,t,n){e&&!N(e=n?e:e.prototype,Pe)&&xe(e,Pe,{configurable:!0,value:t})},Me={f:Q},De=C.f,Ae=function(e){var t=f.Symbol||(f.Symbol=h.Symbol||{});"_"==e.charAt(0)||e in t||De(t,e,{value:Me.f(e)})},Oe=b?Object.defineProperties:function(e,t){g(e);for(var n,r=ve(t),i=r.length,a=0;i>a;)C.f(e,n=r[a++],t[n]);return e},Ie=h.document,Re=Ie&&Ie.documentElement,Ue=pe("IE_PROTO"),Fe=function(){},Le=function(){var e,t=E("iframe"),n=ge.length;for(t.style.display="none",Re.appendChild(t),t.src="javascript:",(e=t.contentWindow.document).open(),e.write("<script>document.F=Object<\/script>"),e.close(),Le=e.F;n--;)delete Le.prototype[ge[n]];return Le()},je=Object.create||function(e,t){var n;return null!==e?(Fe.prototype=g(e),n=new Fe,Fe.prototype=null,n[Ue]=e):n=Le(),void 0===t?n:Oe(n,t)},We=ge.concat("length","prototype"),Be={f:Object.getOwnPropertyNames||function(e){return me(e,We)}},ze=Be.f,Ve={}.toString,qe="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],He={f:function(e){return qe&&"[object Window]"==Ve.call(e)?function(e){try{return ze(e)}catch(e){return qe.slice()}}(e):ze(le(e))}},Ke=Object.getOwnPropertyDescriptor,Ge={f:b?Ke:function(e,t){if(e=le(e),t=S(t,!0),_)try{return Ke(e,t)}catch(e){}if(N(e,t))return k(!ye.f.call(e,t),e[t])}},$e=ke.KEY,Ye=Ge.f,Qe=C.f,Xe=He.f,Je=h.Symbol,Ze=h.JSON,et=Ze&&Ze.stringify,tt=Q("_hidden"),nt=Q("toPrimitive"),rt={}.propertyIsEnumerable,it=Y("symbol-registry"),at=Y("symbols"),ot=Y("op-symbols"),st=Object.prototype,lt="function"==typeof Je,ct=h.QObject,ut=!ct||!ct.prototype||!ct.prototype.findChild,dt=b&&v(function(){return 7!=je(Qe({},"a",{get:function(){return Qe(this,"a",{value:7}).a}})).a})?function(e,t,n){var r=Ye(st,t);r&&delete st[t],Qe(e,t,n),r&&e!==st&&Qe(st,t,r)}:Qe,pt=function(e){var t=at[e]=je(Je.prototype);return t._k=e,t},ht=lt&&"symbol"==typeof Je.iterator?function(e){return"symbol"==typeof e}:function(e){return e instanceof Je},ft=function(e,t,n){return e===st&&ft(ot,t,n),g(e),t=S(t,!0),g(n),N(at,t)?(n.enumerable?(N(e,tt)&&e[tt][t]&&(e[tt][t]=!1),n=je(n,{enumerable:k(0,!1)})):(N(e,tt)||Qe(e,tt,k(1,{})),e[tt][t]=!0),dt(e,t,n)):Qe(e,t,n)},mt=function(e,t){g(e);for(var n,r=function(e){var t=ve(e),n=be.f;if(n)for(var r,i=n(e),a=ye.f,o=0;i.length>o;)a.call(e,r=i[o++])&&t.push(r);return t}(t=le(t)),i=0,a=r.length;a>i;)ft(e,n=r[i++],t[n]);return e},gt=function(e){var t=rt.call(this,e=S(e,!0));return!(this===st&&N(at,e)&&!N(ot,e))&&(!(t||!N(this,e)||!N(at,e)||N(this,tt)&&this[tt][e])||t)},vt=function(e,t){if(e=le(e),t=S(t,!0),e!==st||!N(at,t)||N(ot,t)){var n=Ye(e,t);return!n||!N(at,t)||N(e,tt)&&e[tt][t]||(n.enumerable=!0),n}},bt=function(e){for(var t,n=Xe(le(e)),r=[],i=0;n.length>i;)N(at,t=n[i++])||t==tt||t==$e||r.push(t);return r},yt=function(e){for(var t,n=e===st,r=Xe(n?ot:le(e)),i=[],a=0;r.length>a;)!N(at,t=r[a++])||n&&!N(st,t)||i.push(at[t]);return i};lt||(O((Je=function(){if(this instanceof Je)throw TypeError("Symbol is not a constructor!");var e=A(arguments.length>0?arguments[0]:void 0),t=function(n){this===st&&t.call(ot,n),N(this,tt)&&N(this[tt],e)&&(this[tt][e]=!1),dt(this,e,k(1,n))};return b&&ut&&dt(st,e,{configurable:!0,set:t}),pt(e)}).prototype,"toString",function(){return this._k}),Ge.f=vt,C.f=ft,Be.f=He.f=bt,ye.f=gt,be.f=yt,b&&O(st,"propertyIsEnumerable",gt,!0),Me.f=function(e){return pt(Q(e))}),U(U.G+U.W+U.F*!lt,{Symbol:Je});for(var wt="hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables".split(","),Et=0;wt.length>Et;)Q(wt[Et++]);for(var _t=ve(Q.store),St=0;_t.length>St;)Ae(_t[St++]);U(U.S+U.F*!lt,"Symbol",{for:function(e){return N(it,e+="")?it[e]:it[e]=Je(e)},keyFor:function(e){if(!ht(e))throw TypeError(e+" is not a symbol!");for(var t in it)if(it[t]===e)return t},useSetter:function(){ut=!0},useSimple:function(){ut=!1}}),U(U.S+U.F*!lt,"Object",{create:function(e,t){return void 0===t?je(e):mt(je(e),t)},defineProperty:ft,defineProperties:mt,getOwnPropertyDescriptor:vt,getOwnPropertyNames:bt,getOwnPropertySymbols:yt}),Ze&&U(U.S+U.F*(!lt||v(function(){var e=Je();return"[null]"!=et([e])||"{}"!=et({a:e})||"{}"!=et(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],(m(t)||void 0!==e)&&!ht(e))return G(t)||(t=function(e,t){if("function"==typeof n&&(t=n.call(this,e,t)),!ht(t))return t}),r[1]=t,et.apply(Ze,r)}}),Je.prototype[nt]||x(Je.prototype,nt,Je.prototype.valueOf),Ne(Je,"Symbol"),Ne(Math,"Math",!0),Ne(h.JSON,"JSON",!0);var Tt=Q("toStringTag"),Ct="Arguments"==L(function(){return arguments}()),kt={};kt[Q("toStringTag")]="z",kt+""!="[object z]"&&O(Object.prototype,"toString",function(){return"[object "+(void 0===(e=this)?"Undefined":null===e?"Null":"string"==typeof(n=function(e,t){try{return e[t]}catch(e){}}(t=Object(e),Tt))?n:Ct?L(t):"Object"==(r=L(t))&&"function"==typeof t.callee?"Arguments":r)+"]";var e,t,n,r},!0),Ae("asyncIterator"),Ae("observable");f.Symbol;var xt={},Pt={};x(Pt,Q("iterator"),function(){return this});var Nt,Mt=function(e,t,n){e.prototype=je(Pt,{next:k(1,n)}),Ne(e,t+" Iterator")},Dt=pe("IE_PROTO"),At=Object.prototype,Ot=Object.getPrototypeOf||function(e){return e=B(e),N(e,Dt)?e[Dt]:"function"==typeof e.constructor&&e instanceof e.constructor?e.constructor.prototype:e instanceof Object?At:null},It=Q("iterator"),Rt=!([].keys&&"next"in[].keys()),Ut=function(){return this},Ft=function(e,t,n,r,i,a,o){Mt(n,t,r);var s,l,c,u=function(e){if(!Rt&&e in f)return f[e];switch(e){case"keys":case"values":return function(){return new n(this,e)}}return function(){return new n(this,e)}},d=t+" Iterator",p="values"==i,h=!1,f=e.prototype,m=f[It]||f["@@iterator"]||i&&f[i],g=m||u(i),v=i?p?u("entries"):g:void 0,b="Array"==t&&f.entries||m;if(b&&(c=Ot(b.call(new e)))!==Object.prototype&&c.next&&(Ne(c,d,!0),"function"!=typeof c[It]&&x(c,It,Ut)),p&&m&&"values"!==m.name&&(h=!0,g=function(){return m.call(this)}),(Rt||h||!f[It])&&x(f,It,g),xt[t]=g,xt[d]=Ut,i)if(s={values:p?g:u("values"),keys:a?g:u("keys"),entries:v},o)for(l in s)l in f||O(f,l,s[l]);else U(U.P+U.F*(Rt||h),t,s);return s},Lt=(Nt=!0,function(e,t){var n,r,i=String(W(e)),a=q(t),o=i.length;return a<0||a>=o?Nt?"":void 0:(n=i.charCodeAt(a))<55296||n>56319||a+1===o||(r=i.charCodeAt(a+1))<56320||r>57343?Nt?i.charAt(a):n:Nt?i.slice(a,a+2):r-56320+(n-55296<<10)+65536});Ft(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=Lt(t,n),this._i+=e.length,{value:e,done:!1})});var jt=function(e,t){return{value:t,done:!!e}},Wt=Ft(Array,"Array",function(e,t){this._t=le(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,jt(1)):jt(0,"keys"==t?n:"values"==t?e[n]:[n,e[n]])},"values");xt.Arguments=xt.Array,ne("keys"),ne("values"),ne("entries");for(var Bt=Q("iterator"),zt=Q("toStringTag"),Vt=xt.Array,qt={CSSRuleList:!0,CSSStyleDeclaration:!1,CSSValueList:!1,ClientRectList:!1,DOMRectList:!1,DOMStringList:!1,DOMTokenList:!0,DataTransferItemList:!1,FileList:!1,HTMLAllCollection:!1,HTMLCollection:!1,HTMLFormElement:!1,HTMLSelectElement:!1,MediaList:!0,MimeTypeArray:!1,NamedNodeMap:!1,NodeList:!0,PaintRequestList:!1,Plugin:!1,PluginArray:!1,SVGLengthList:!1,SVGNumberList:!1,SVGPathSegList:!1,SVGPointList:!1,SVGStringList:!1,SVGTransformList:!1,SourceBufferList:!1,StyleSheetList:!0,TextTrackCueList:!1,TextTrackList:!1,TouchList:!1},Ht=ve(qt),Kt=0;Kt<Ht.length;Kt++){var Gt,$t=Ht[Kt],Yt=qt[$t],Qt=h[$t],Xt=Qt&&Qt.prototype;if(Xt&&(Xt[Bt]||x(Xt,Bt,Vt),Xt[zt]||x(Xt,zt,$t),xt[$t]=Vt,Yt))for(Gt in Wt)Xt[Gt]||O(Xt,Gt,Wt[Gt],!0)}Me.f("iterator")}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("timers").setImmediate)},{timers:37,"whatwg-fetch":32}],4:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var r=e("tslib"),i={NODE_CLIENT:!1,NODE_ADMIN:!1,SDK_VERSION:"${JSCORE_VERSION}"},a=function(e,t){if(!e)throw o(t)},o=function(e){return new Error("Firebase Database ("+i.SDK_VERSION+") INTERNAL ASSERT FAILED: "+e)},s=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 a=e[i],o=i+1<e.length,s=o?e[i+1]:0,l=i+2<e.length,c=l?e[i+2]:0,u=a>>2,d=(3&a)<<4|s>>4,p=(15&s)<<2|c>>6,h=63&c;l||(h=64,o||(p=64)),r.push(n[u],n[d],n[p],n[h])}return r.join("")},encodeString:function(e,t){return this.HAS_NATIVE_SUPPORT&&!t?btoa(e):this.encodeByteArray(s(e),t)},decodeString:function(e,t){return this.HAS_NATIVE_SUPPORT&&!t?atob(e):function(e){for(var t=[],n=0,r=0;n<e.length;){var i=e[n++];if(i<128)t[r++]=String.fromCharCode(i);else if(i>191&&i<224){var a=e[n++];t[r++]=String.fromCharCode((31&i)<<6|63&a)}else if(i>239&&i<365){var o=((7&i)<<18|(63&(a=e[n++]))<<12|(63&(s=e[n++]))<<6|63&e[n++])-65536;t[r++]=String.fromCharCode(55296+(o>>10)),t[r++]=String.fromCharCode(56320+(1023&o))}else{a=e[n++];var s=e[n++];t[r++]=String.fromCharCode((15&i)<<12|(63&a)<<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 a=n[e.charAt(i++)],o=i<e.length?n[e.charAt(i)]:0,s=++i<e.length?n[e.charAt(i)]:64,l=++i<e.length?n[e.charAt(i)]:64;if(++i,null==a||null==o||null==s||null==l)throw Error();var c=a<<2|o>>4;if(r.push(c),64!=s){var u=o<<4&240|s>>2;if(r.push(u),64!=l){var d=s<<6&192|l;r.push(d)}}}return r},init_:function(){if(!this.byteToCharMap_){this.byteToCharMap_={},this.charToByteMap_={},this.byteToCharMapWebSafe_={},this.charToByteMapWebSafe_={};for(var e=0;e<this.ENCODED_VALS.length;e++)this.byteToCharMap_[e]=this.ENCODED_VALS.charAt(e),this.charToByteMap_[this.byteToCharMap_[e]]=e,this.byteToCharMapWebSafe_[e]=this.ENCODED_VALS_WEBSAFE.charAt(e),this.charToByteMapWebSafe_[this.byteToCharMapWebSafe_[e]]=e,e>=this.ENCODED_VALS_BASE.length&&(this.charToByteMap_[this.ENCODED_VALS_WEBSAFE.charAt(e)]=e,this.charToByteMapWebSafe_[this.ENCODED_VALS.charAt(e)]=e)}}},c=function(e){try{return l.decodeString(e,!0)}catch(e){console.error("base64Decode failed: ",e)}return null};function u(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]=u(e[n],t[n]));return e}var d=function(){function e(){var e=this;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}(),p=function(){return"undefined"!=typeof navigator&&"string"==typeof navigator.userAgent?navigator.userAgent:""},h="FirebaseError",f=Error.captureStackTrace;var m=function(){return function(e,t){if(this.code=e,this.message=t,f)f(this,g.prototype.create);else try{throw Error.apply(this,arguments)}catch(e){this.name=h,Object.defineProperty(this,"stack",{get:function(){return e.stack}})}}}();m.prototype=Object.create(Error.prototype),m.prototype.constructor=m,m.prototype.name=h;var g=function(){function e(e,t,n){this.service=e,this.serviceName=t,this.errors=n,this.pattern=/\{\$([^}]+)}/g}return e.prototype.create=function(e,t){void 0===t&&(t={});var n,r=this.errors[e],i=this.service+"/"+e;n=void 0===r?"Error":r.replace(this.pattern,function(e,n){var r=t[n];return void 0!==r?r.toString():"<"+n+"?>"}),n=this.serviceName+": "+n+" ("+i+").";var a=new m(i,n);for(var o in t)t.hasOwnProperty(o)&&"_"!==o.slice(-1)&&(a[o]=t[o]);return a},e}();function v(e){return JSON.parse(e)}var b=function(e){var t={},n={},r={},i="";try{var a=e.split(".");t=v(c(a[0])||""),n=v(c(a[1])||""),i=a[2],r=n.d||{},delete n.d}catch(e){}return{header:t,claims:n,data:r,signature:i}},y=function(e,t){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t(n,e[n])},w=function(e,t){return y(t,function(t,n){e[t]=n}),e},E=function(e,t,n){for(var r in e)if(t.call(n,e[r],r,e))return r},_=function(e){function t(){var t=e.call(this)||this;t.chain_=[],t.buf_=[],t.W_=[],t.pad_=[],t.inbuf_=0,t.total_=0,t.blockSize=64,t.pad_[0]=128;for(var n=1;n<t.blockSize;++n)t.pad_[n]=0;return t.reset(),t}return r.__extends(t,e),t.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},t.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 a,o,s=this.chain_[0],l=this.chain_[1],c=this.chain_[2],u=this.chain_[3],d=this.chain_[4];for(r=0;r<80;r++){r<40?r<20?(a=u^l&(c^u),o=1518500249):(a=l^c^u,o=1859775393):r<60?(a=l&c|u&(l|c),o=2400959708):(a=l^c^u,o=3395469782);i=(s<<5|s>>>27)+a+d+o+n[r]&4294967295;d=u,u=c,c=4294967295&(l<<30|l>>>2),l=s,s=i}this.chain_[0]=this.chain_[0]+s&4294967295,this.chain_[1]=this.chain_[1]+l&4294967295,this.chain_[2]=this.chain_[2]+c&4294967295,this.chain_[3]=this.chain_[3]+u&4294967295,this.chain_[4]=this.chain_[4]+d&4294967295},t.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_,a=this.inbuf_;r<t;){if(0==a)for(;r<=n;)this.compress_(e,r),r+=this.blockSize;if("string"==typeof e){for(;r<t;)if(i[a]=e.charCodeAt(r),++r,++a==this.blockSize){this.compress_(i),a=0;break}}else for(;r<t;)if(i[a]=e[r],++r,++a==this.blockSize){this.compress_(i),a=0;break}}this.inbuf_=a,this.total_+=t}},t.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},t}(function(){return function(){this.blockSize=-1}}());var S=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=T),void 0===r.error&&(r.error=T),void 0===r.complete&&(r.complete=T);var a=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),a},e.prototype.unsubscribeOne=function(e){void 0!==this.observers&&void 0!==this.observers[e]&&(delete this.observers[e],this.observerCount-=1,0===this.observerCount&&void 0!==this.onNoObservers&&this.onNoObservers(this))},e.prototype.forEachObserver=function(e){if(!this.finalized)for(var t=0;t<this.observers.length;t++)this.sendOne(t,e)},e.prototype.sendOne=function(e,t){var n=this;this.task.then(function(){if(void 0!==n.observers&&void 0!==n.observers[e])try{t(n.observers[e])}catch(e){"undefined"!=typeof console&&console.error&&console.error(e)}})},e.prototype.close=function(e){var t=this;this.finalized||(this.finalized=!0,void 0!==e&&(this.finalError=e),this.task.then(function(){t.observers=void 0,t.onNoObservers=void 0}))},e}();function T(){}function C(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 "}n.assert=a,n.assertionError=o,n.base64=l,n.base64Decode=c,n.base64Encode=function(e){var t=s(e);return l.encodeByteArray(t,!0)},n.CONSTANTS=i,n.deepCopy=function(e){return u(void 0,e)},n.deepExtend=u,n.patchProperty=function(e,t,n){e[t]=n},n.Deferred=d,n.getUA=p,n.isMobileCordova=function(){return"undefined"!=typeof window&&!!(window.cordova||window.phonegap||window.PhoneGap)&&/ios|iphone|ipod|ipad|android|blackberry|iemobile/i.test(p())},n.isNodeSdk=function(){return!0===i.NODE_CLIENT||!0===i.NODE_ADMIN},n.isReactNative=function(){return"object"==typeof navigator&&"ReactNative"===navigator.product},n.ErrorFactory=g,n.FirebaseError=m,n.patchCapture=function(e){var t=f;return f=e,t},n.jsonEval=v,n.stringify=function(e){return JSON.stringify(e)},n.decode=b,n.isAdmin=function(e){var t=b(e).claims;return"object"==typeof t&&!0===t.admin},n.issuedAtTime=function(e){var t=b(e).claims;return"object"==typeof t&&t.hasOwnProperty("iat")?t.iat:null},n.isValidFormat=function(e){var t=b(e).claims;return!!t&&"object"==typeof t&&t.hasOwnProperty("iat")},n.isValidTimestamp=function(e){var t,n,r=b(e).claims,i=Math.floor((new Date).getTime()/1e3);return"object"==typeof r&&(r.hasOwnProperty("nbf")?t=r.nbf:r.hasOwnProperty("iat")&&(t=r.iat),n=r.hasOwnProperty("exp")?r.exp:t+86400),i&&t&&n&&i>=t&&i<=n},n.clone=function(e){return w({},e)},n.contains=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.every=function(e,t){for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&!t(n,e[n]))return!1;return!0},n.extend=w,n.findKey=E,n.findValue=function(e,t,n){var r=E(e,t,n);return r&&e[r]},n.forEach=y,n.getAnyKey=function(e){for(var t in e)return t},n.getCount=function(e){var t=0;for(var n in e)t++;return t},n.getValues=function(e){var t=[],n=0;for(var r in e)t[n++]=e[r];return t},n.isEmpty=function(e){for(var t in e)return!1;return!0},n.isNonNullObject=function(e){return"object"==typeof e&&null!==e},n.map=function(e,t,n){var r={};for(var i in e)r[i]=t.call(n,e[i],i,e);return r},n.safeGet=function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]},n.querystring=function(e){var t=[];return y(e,function(e,n){Array.isArray(n)?n.forEach(function(n){t.push(encodeURIComponent(e)+"="+encodeURIComponent(n))}):t.push(encodeURIComponent(e)+"="+encodeURIComponent(n))}),t.length?"&"+t.join("&"):""},n.querystringDecode=function(e){var t={};return e.replace(/^\?/,"").split("&").forEach(function(e){if(e){var n=e.split("=");t[n[0]]=n[1]}}),t},n.Sha1=_,n.async=function(e,t){return function(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];Promise.resolve(!0).then(function(){e.apply(void 0,n)}).catch(function(e){t&&t(e)})}},n.createSubscribe=function(e,t){var n=new S(e,t);return n.subscribe.bind(n)},n.errorPrefix=C,n.validateArgCount=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+".")},n.validateCallback=function(e,t,n,r){if((!r||n)&&"function"!=typeof n)throw new Error(C(e,t,r)+"must be a valid function.")},n.validateContextObject=function(e,t,n,r){if((!r||n)&&("object"!=typeof n||null===n))throw new Error(C(e,t,r)+"must be a valid context object.")},n.validateNamespace=function(e,t,n,r){if((!r||n)&&"string"!=typeof n)throw new Error(C(e,t,r)+"must be a valid firebase namespace.")},n.stringLength=function(e){for(var t=0,n=0;n<e.length;n++){var r=e.charCodeAt(n);r<128?t++:r<2048?t+=2:r>=55296&&r<=56319?(t+=4,n++):t+=3}return t},n.stringToByteArray=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;a(++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}},{tslib:31}],5:[function(e,t,n){"use strict";var r=!("undefined"==typeof window||!window.document||!window.document.createElement),i={canUseDOM:r,canUseWorkers:"undefined"!=typeof Worker,canUseEventListeners:r&&!(!window.addEventListener&&!window.attachEvent),canUseViewport:r&&!!window.screen,isInWorker:!r};t.exports=i},{}],6:[function(e,t,n){"use strict";var r=/-(.)/g;t.exports=function(e){return e.replace(r,function(e,t){return t.toUpperCase()})}},{}],7:[function(e,t,n){"use strict";var r=e("./camelize"),i=/^-ms-/;t.exports=function(e){return r(e.replace(i,"ms-"))}},{"./camelize":6}],8:[function(e,t,n){"use strict";var r=e("./isTextNode");t.exports=function e(t,n){return!(!t||!n)&&(t===n||!r(t)&&(r(n)?e(t,n.parentNode):"contains"in t?t.contains(n):!!t.compareDocumentPosition&&!!(16&t.compareDocumentPosition(n))))}},{"./isTextNode":16}],9:[function(e,t,n){"use strict";function r(e){return function(){return e}}var i=function(){};i.thatReturns=r,i.thatReturnsFalse=r(!1),i.thatReturnsTrue=r(!0),i.thatReturnsNull=r(null),i.thatReturnsThis=function(){return this},i.thatReturnsArgument=function(e){return e},t.exports=i},{}],10:[function(e,t,n){(function(e){"use strict";var n={};"production"!==e.env.NODE_ENV&&Object.freeze(n),t.exports=n}).call(this,e("_process"))},{_process:36}],11:[function(e,t,n){"use strict";t.exports=function(e){if(void 0===(e=e||("undefined"!=typeof document?document:void 0)))return null;try{return e.activeElement||e.body}catch(t){return e.body}}},{}],12:[function(e,t,n){"use strict";var r=/([A-Z])/g;t.exports=function(e){return e.replace(r,"-$1").toLowerCase()}},{}],13:[function(e,t,n){"use strict";var r=e("./hyphenate"),i=/^ms-/;t.exports=function(e){return r(e).replace(i,"-ms-")}},{"./hyphenate":12}],14:[function(e,t,n){(function(e){"use strict";var n=function(e){};"production"!==e.env.NODE_ENV&&(n=function(e){if(void 0===e)throw new Error("invariant requires an error message argument")}),t.exports=function(e,t,r,i,a,o,s,l){if(n(t),!e){var c;if(void 0===t)c=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var u=[r,i,a,o,s,l],d=0;(c=new Error(t.replace(/%s/g,function(){return u[d++]}))).name="Invariant Violation"}throw c.framesToPop=1,c}}}).call(this,e("_process"))},{_process:36}],15:[function(e,t,n){"use strict";t.exports=function(e){var t=(e?e.ownerDocument||e:document).defaultView||window;return!(!e||!("function"==typeof t.Node?e instanceof t.Node:"object"==typeof e&&"number"==typeof e.nodeType&&"string"==typeof e.nodeName))}},{}],16:[function(e,t,n){"use strict";var r=e("./isNode");t.exports=function(e){return r(e)&&3==e.nodeType}},{"./isNode":15}],17:[function(e,t,n){"use strict";var r=Object.prototype.hasOwnProperty;function i(e,t){return e===t?0!==e||0!==t||1/e==1/t:e!=e&&t!=t}t.exports=function(e,t){if(i(e,t))return!0;if("object"!=typeof e||null===e||"object"!=typeof t||null===t)return!1;var n=Object.keys(e),a=Object.keys(t);if(n.length!==a.length)return!1;for(var o=0;o<n.length;o++)if(!r.call(t,n[o])||!i(e[n[o]],t[n[o]]))return!1;return!0}},{}],18:[function(e,t,n){(function(n){"use strict";var r=e("./emptyFunction");if("production"!==n.env.NODE_ENV){r=function(e,t){if(void 0===t)throw new Error("`warning(condition, format, ...args)` requires a warning message argument");if(0!==t.indexOf("Failed Composite propType: ")&&!e){for(var n=arguments.length,r=Array(n>2?n-2:0),i=2;i<n;i++)r[i-2]=arguments[i];(function(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];var i=0,a="Warning: "+e.replace(/%s/g,function(){return n[i++]});"undefined"!=typeof console&&console.error(a);try{throw new Error(a)}catch(e){}}).apply(void 0,[t].concat(r))}}}t.exports=r}).call(this,e("_process"))},{"./emptyFunction":9,_process:36}],19:[function(e,t,n){"use strict";e("@firebase/polyfill");var r,i=(r=e("@firebase/app"))&&"object"==typeof r&&"default"in r?r.default:r;t.exports=i},{"@firebase/app":1,"@firebase/polyfill":3}],20:[function(e,t,n){"use strict";e("@firebase/messaging")},{"@firebase/messaging":2}],21:[function(e,t,n){"use strict";var r=Object.getOwnPropertySymbols,i=Object.prototype.hasOwnProperty,a=Object.prototype.propertyIsEnumerable;t.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(e){return!1}}()?Object.assign:function(e,t){for(var n,o,s=function(e){if(null===e||void 0===e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}(e),l=1;l<arguments.length;l++){for(var c in n=Object(arguments[l]))i.call(n,c)&&(s[c]=n[c]);if(r){o=r(n);for(var u=0;u<o.length;u++)a.call(n,o[u])&&(s[o[u]]=n[o[u]])}}return s}},{}],22:[function(e,t,n){(function(n){"use strict";var r=function(){};if("production"!==n.env.NODE_ENV){var i=e("./lib/ReactPropTypesSecret"),a={};r=function(e){var t="Warning: "+e;"undefined"!=typeof console&&console.error(t);try{throw new Error(t)}catch(e){}}}t.exports=function(e,t,o,s,l){if("production"!==n.env.NODE_ENV)for(var c in e)if(e.hasOwnProperty(c)){var u;try{if("function"!=typeof e[c]){var d=Error((s||"React class")+": "+o+" type `"+c+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof e[c]+"`.");throw d.name="Invariant Violation",d}u=e[c](t,c,s,o,null,i)}catch(e){u=e}if(!u||u instanceof Error||r((s||"React class")+": type specification of "+o+" `"+c+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof u+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),u instanceof Error&&!(u.message in a)){a[u.message]=!0;var p=l?l():"";r("Failed "+o+" type: "+u.message+(null!=p?p:""))}}}}).call(this,e("_process"))},{"./lib/ReactPropTypesSecret":23,_process:36}],23:[function(e,t,n){"use strict";t.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},{}],24:[function(e,t,n){(function(n){"use strict";"production"!==n.env.NODE_ENV&&function(){var n=e("fbjs/lib/invariant"),r=e("react"),i=e("fbjs/lib/warning"),a=e("fbjs/lib/ExecutionEnvironment"),o=e("object-assign"),s=e("fbjs/lib/emptyFunction"),l=e("prop-types/checkPropTypes"),c=e("fbjs/lib/getActiveElement"),u=e("fbjs/lib/shallowEqual"),d=e("fbjs/lib/containsNode"),p=e("fbjs/lib/emptyObject"),h=e("fbjs/lib/hyphenateStyleName"),f=e("fbjs/lib/camelizeStyleName");r||n(!1,"ReactDOM was loaded before React. Make sure you load the React package before loading ReactDOM.");var m=function(e,t,n,r,i,a,o,s,l){this._hasCaughtError=!1,this._caughtError=null;var c=Array.prototype.slice.call(arguments,3);try{t.apply(n,c)}catch(e){this._caughtError=e,this._hasCaughtError=!0}};if("undefined"!=typeof window&&"function"==typeof window.dispatchEvent&&"undefined"!=typeof document&&"function"==typeof document.createEvent){var g=document.createElement("react");m=function(e,t,r,i,a,o,s,l,c){"undefined"==typeof document&&n(!1,"The `document` global was defined when React was initialized, but is not defined anymore. This can happen in a test environment if a component schedules an update from an asynchronous callback, but the test has already finished running. To solve this, you can either unmount the component at the end of your test (and ensure that any asynchronous operations get canceled in `componentWillUnmount`), or you can change the test itself to be asynchronous.");var u=document.createEvent("Event"),d=!0,p=Array.prototype.slice.call(arguments,3);var h=void 0,f=!1,m=!1;function v(e){h=e.error,f=!0,null===h&&0===e.colno&&0===e.lineno&&(m=!0)}var b="react-"+(e||"invokeguardedcallback");window.addEventListener("error",v),g.addEventListener(b,function e(){g.removeEventListener(b,e,!1),t.apply(r,p),d=!1},!1),u.initEvent(b,!1,!1),g.dispatchEvent(u),d?(f?m&&(h=new Error("A cross-origin error was thrown. React doesn't have access to the actual error object in development. See https://fb.me/react-crossorigin-error for more information.")):h=new Error("An error was thrown inside one of your components, but React doesn't know what it was. This is likely due to browser flakiness. React does its best to preserve the \"Pause on exceptions\" behavior of the DevTools, which requires some DEV-mode only tricks. It's possible that these don't work in your browser. Try triggering the error in production mode, or switching to a modern browser. If you suspect that this is actually an issue with React, please file an issue."),this._hasCaughtError=!0,this._caughtError=h):(this._hasCaughtError=!1,this._caughtError=null),window.removeEventListener("error",v)}}var v=m,b={_caughtError:null,_hasCaughtError:!1,_rethrowError:null,_hasRethrowError:!1,invokeGuardedCallback:function(e,t,n,r,i,a,o,s,l){v.apply(b,arguments)},invokeGuardedCallbackAndCatchFirstError:function(e,t,n,r,i,a,o,s,l){if(b.invokeGuardedCallback.apply(this,arguments),b.hasCaughtError()){var c=b.clearCaughtError();b._hasRethrowError||(b._hasRethrowError=!0,b._rethrowError=c)}},rethrowCaughtError:function(){return y.apply(b,arguments)},hasCaughtError:function(){return b._hasCaughtError},clearCaughtError:function(){if(b._hasCaughtError){var e=b._caughtError;return b._caughtError=null,b._hasCaughtError=!1,e}n(!1,"clearCaughtError was called but no error was captured. This error is likely caused by a bug in React. Please file an issue.")}},y=function(){if(b._hasRethrowError){var e=b._rethrowError;throw b._rethrowError=null,b._hasRethrowError=!1,e}},w=null,E={};function _(){if(w)for(var e in E){var t=E[e],r=w.indexOf(e);if(r>-1||n(!1,"EventPluginRegistry: Cannot inject event plugins that do not exist in the plugin ordering, `%s`.",e),!C[r]){t.extractEvents||n(!1,"EventPluginRegistry: Event plugins must implement an `extractEvents` method, but `%s` does not.",e),C[r]=t;var i=t.eventTypes;for(var a in i)S(i[a],t,a)||n(!1,"EventPluginRegistry: Failed to publish event `%s` for plugin `%s`.",a,e)}}}function S(e,t,r){k.hasOwnProperty(r)&&n(!1,"EventPluginHub: More than one plugin attempted to publish the same event name, `%s`.",r),k[r]=e;var i=e.phasedRegistrationNames;if(i){for(var a in i){if(i.hasOwnProperty(a))T(i[a],t,r)}return!0}return!!e.registrationName&&(T(e.registrationName,t,r),!0)}function T(e,t,r){x[e]&&n(!1,"EventPluginHub: More than one plugin attempted to publish the same registration name, `%s`.",e),x[e]=t,P[e]=t.eventTypes[r].dependencies;var i=e.toLowerCase();N[i]=e,"onDoubleClick"===e&&(N.ondblclick=e)}var C=[],k={},x={},P={},N={};function M(e){w&&n(!1,"EventPluginRegistry: Cannot inject event plugin ordering more than once. You are likely trying to load more than one copy of React."),w=Array.prototype.slice.call(e),_()}function D(e){var t=!1;for(var r in e)if(e.hasOwnProperty(r)){var i=e[r];E.hasOwnProperty(r)&&E[r]===i||(E[r]&&n(!1,"EventPluginRegistry: Cannot inject two different event plugins using the same name, `%s`.",r),E[r]=i,t=!0)}t&&_()}var A=Object.freeze({plugins:C,eventNameDispatchConfigs:k,registrationNameModules:x,registrationNameDependencies:P,possibleRegistrationNames:N,injectEventPluginOrder:M,injectEventPluginsByName:D}),O=null,I=null,R=null,U=function(e){O=e.getFiberCurrentPropsFromNode,I=e.getInstanceFromNode,(R=e.getNodeFromInstance)&&I||i(!1,"EventPluginUtils.injection.injectComponentTree(...): Injected module is missing getNodeFromInstance or getInstanceFromNode.")},F=void 0;function L(e,t,n,r){var i=e.type||"unknown-event";e.currentTarget=R(r),b.invokeGuardedCallbackAndCatchFirstError(i,n,void 0,e),e.currentTarget=null}function j(e,t){return null==t&&n(!1,"accumulateInto(...): Accumulated items must not be null or undefined."),null==e?t:Array.isArray(e)?Array.isArray(t)?(e.push.apply(e,t),e):(e.push(t),e):Array.isArray(t)?[e].concat(t):[e,t]}function W(e,t,n){Array.isArray(e)?e.forEach(t,n):e&&t.call(n,e)}F=function(e){var t=e._dispatchListeners,n=e._dispatchInstances,r=Array.isArray(t),a=r?t.length:t?1:0,o=Array.isArray(n),s=o?n.length:n?1:0;(o!==r||s!==a)&&i(!1,"EventPluginUtils: Invalid `event`.")};var B=null,z=function(e,t){e&&(!function(e,t){var n=e._dispatchListeners,r=e._dispatchInstances;if(F(e),Array.isArray(n))for(var i=0;i<n.length&&!e.isPropagationStopped();i++)L(e,0,n[i],r[i]);else n&&L(e,0,n,r);e._dispatchListeners=null,e._dispatchInstances=null}(e),e.isPersistent()||e.constructor.release(e))},V=function(e){return z(e)},q=function(e){return z(e)};var H={injectEventPluginOrder:M,injectEventPluginsByName:D};function K(e,t){var r,i=e.stateNode;if(!i)return null;var a=O(i);return a?(r=a[t],function(e,t,n){switch(e){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":return!(!n.disabled||(r=t,"button"!==r&&"input"!==r&&"select"!==r&&"textarea"!==r));default:return!1}var r}(t,e.type,a)?null:(r&&"function"!=typeof r&&n(!1,"Expected `%s` listener to be a function, instead got a value of `%s` type.",t,typeof r),r)):null}function G(e,t){null!==e&&(B=j(B,e));var r=B;B=null,r&&(W(r,t?V:q),B&&n(!1,"processEventQueue(): Additional events were enqueued while processing an event queue. Support for this has not yet been implemented."),b.rethrowCaughtError())}function $(e,t,n,r){G(function(e,t,n,r){for(var i=null,a=0;a<C.length;a++){var o=C[a];if(o){var s=o.extractEvents(e,t,n,r);s&&(i=j(i,s))}}return i}(e,t,n,r),!1)}var Y=Object.freeze({injection:H,getListener:K,runEventsInBatch:G,runExtractedEventsInBatch:$}),Q=0,X=1,J=2,Z=3,ee=4,te=5,ne=6,re=10,ie=11,ae=12,oe=13,se=14,le=15,ce=16,ue=Math.random().toString(36).slice(2),de="__reactInternalInstance$"+ue,pe="__reactEventHandlers$"+ue;function he(e,t){t[de]=e}function fe(e){if(e[de])return e[de];for(;!e[de];){if(!e.parentNode)return null;e=e.parentNode}var t=e[de];return t.tag===te||t.tag===ne?t:null}function me(e){var t=e[de];return t&&(t.tag===te||t.tag===ne)?t:null}function ge(e){if(e.tag===te||e.tag===ne)return e.stateNode;n(!1,"getNodeFromInstance: Invalid argument.")}function ve(e){return e[pe]||null}function be(e,t){e[pe]=t}var ye=Object.freeze({precacheFiberNode:he,getClosestInstanceFromNode:fe,getInstanceFromNode:me,getNodeFromInstance:ge,getFiberCurrentPropsFromNode:ve,updateFiberProps:be});function we(e){do{e=e.return}while(e&&e.tag!==te);return e||null}function Ee(e,t,n){for(var r=[];e;)r.push(e),e=we(e);var i=void 0;for(i=r.length;i-- >0;)t(r[i],"captured",n);for(i=0;i<r.length;i++)t(r[i],"bubbled",n)}function _e(e,t,n,r,i){for(var a=e&&t?function(e,t){for(var n=0,r=e;r;r=we(r))n++;for(var i=0,a=t;a;a=we(a))i++;for(;n-i>0;)e=we(e),n--;for(;i-n>0;)t=we(t),i--;for(var o=n;o--;){if(e===t||e===t.alternate)return e;e=we(e),t=we(t)}return null}(e,t):null,o=[];e&&e!==a;){var s=e.alternate;if(null!==s&&s===a)break;o.push(e),e=we(e)}for(var l=[];t&&t!==a;){var c=t.alternate;if(null!==c&&c===a)break;l.push(t),t=we(t)}for(var u=0;u<o.length;u++)n(o[u],"bubbled",r);for(var d=l.length;d-- >0;)n(l[d],"captured",i)}function Se(e,t,n){e||i(!1,"Dispatching inst must not be null");var r=function(e,t,n){return K(e,t.dispatchConfig.phasedRegistrationNames[n])}(e,n,t);r&&(n._dispatchListeners=j(n._dispatchListeners,r),n._dispatchInstances=j(n._dispatchInstances,e))}function Te(e){e&&e.dispatchConfig.phasedRegistrationNames&&Ee(e._targetInst,Se,e)}function Ce(e){if(e&&e.dispatchConfig.phasedRegistrationNames){var t=e._targetInst;Ee(t?we(t):null,Se,e)}}function ke(e,t,n){if(e&&n&&n.dispatchConfig.registrationName){var r=K(e,n.dispatchConfig.registrationName);r&&(n._dispatchListeners=j(n._dispatchListeners,r),n._dispatchInstances=j(n._dispatchInstances,e))}}function xe(e){e&&e.dispatchConfig.registrationName&&ke(e._targetInst,0,e)}function Pe(e){W(e,Te)}function Ne(e,t,n,r){_e(n,r,ke,e,t)}var Me=Object.freeze({accumulateTwoPhaseDispatches:Pe,accumulateTwoPhaseDispatchesSkipTarget:function(e){W(e,Ce)},accumulateEnterLeaveDispatches:Ne,accumulateDirectDispatches:function(e){W(e,xe)}});function De(e){return e}function Ae(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n["ms"+e]="MS"+t,n["O"+e]="o"+t.toLowerCase(),n}var Oe={animationend:Ae("Animation","AnimationEnd"),animationiteration:Ae("Animation","AnimationIteration"),animationstart:Ae("Animation","AnimationStart"),transitionend:Ae("Transition","TransitionEnd")},Ie={},Re={};function Ue(e){if(Ie[e])return Ie[e];if(!Oe[e])return e;var t=Oe[e];for(var n in t)if(t.hasOwnProperty(n)&&n in Re)return Ie[e]=t[n];return e}a.canUseDOM&&(Re=document.createElement("div").style,"AnimationEvent"in window||(delete Oe.animationend.animation,delete Oe.animationiteration.animation,delete Oe.animationstart.animation),"TransitionEvent"in window||delete Oe.transitionend.transition);var Fe=De("abort"),Le=De(Ue("animationend")),je=De(Ue("animationiteration")),We=De(Ue("animationstart")),Be=De("blur"),ze=De("canplay"),Ve=De("canplaythrough"),qe=De("cancel"),He=De("change"),Ke=De("click"),Ge=De("close"),$e=De("compositionend"),Ye=De("compositionstart"),Qe=De("compositionupdate"),Xe=De("contextmenu"),Je=De("copy"),Ze=De("cut"),et=De("dblclick"),tt=De("drag"),nt=De("dragend"),rt=De("dragenter"),it=De("dragexit"),at=De("dragleave"),ot=De("dragover"),st=De("dragstart"),lt=De("drop"),ct=De("durationchange"),ut=De("emptied"),dt=De("encrypted"),pt=De("ended"),ht=De("error"),ft=De("focus"),mt=De("gotpointercapture"),gt=De("input"),vt=De("invalid"),bt=De("keydown"),yt=De("keypress"),wt=De("keyup"),Et=De("load"),_t=De("loadstart"),St=De("loadeddata"),Tt=De("loadedmetadata"),Ct=De("lostpointercapture"),kt=De("mousedown"),xt=De("mousemove"),Pt=De("mouseout"),Nt=De("mouseover"),Mt=De("mouseup"),Dt=De("paste"),At=De("pause"),Ot=De("play"),It=De("playing"),Rt=De("pointercancel"),Ut=De("pointerdown"),Ft=De("pointermove"),Lt=De("pointerout"),jt=De("pointerover"),Wt=De("pointerup"),Bt=De("progress"),zt=De("ratechange"),Vt=De("reset"),qt=De("scroll"),Ht=De("seeked"),Kt=De("seeking"),Gt=De("selectionchange"),$t=De("stalled"),Yt=De("submit"),Qt=De("suspend"),Xt=De("textInput"),Jt=De("timeupdate"),Zt=De("toggle"),en=De("touchcancel"),tn=De("touchend"),nn=De("touchmove"),rn=De("touchstart"),an=De(Ue("transitionend")),on=De("volumechange"),sn=De("waiting"),ln=De("wheel"),cn=[Fe,ze,Ve,ct,ut,dt,pt,ht,St,Tt,_t,At,Ot,It,Bt,zt,Ht,Kt,$t,Qt,Jt,on,sn];function un(e){return function(e){return e}(e)}var dn=null;function pn(){return!dn&&a.canUseDOM&&(dn="textContent"in document.documentElement?"textContent":"innerText"),dn}var hn={_root:null,_startText:null,_fallbackText:null};function fn(){if(hn._fallbackText)return hn._fallbackText;var e=void 0,t=hn._startText,n=t.length,r=void 0,i=mn(),a=i.length;for(e=0;e<n&&t[e]===i[e];e++);var o=n-e;for(r=1;r<=o&&t[n-r]===i[a-r];r++);var s=r>1?1-r:void 0;return hn._fallbackText=i.slice(e,s),hn._fallbackText}function mn(){return"value"in hn._root?hn._root.value:hn._root[pn()]}var gn=!1,vn=10,bn=["dispatchConfig","_targetInst","nativeEvent","isDefaultPrevented","isPropagationStopped","_dispatchListeners","_dispatchInstances"],yn={type:null,target:null,currentTarget:s.thatReturnsNull,eventPhase:null,bubbles:null,cancelable:null,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:null,isTrusted:null};function wn(e,t,n,r){delete this.nativeEvent,delete this.preventDefault,delete this.stopPropagation,this.dispatchConfig=e,this._targetInst=t,this.nativeEvent=n;var i=this.constructor.Interface;for(var a in i)if(i.hasOwnProperty(a)){delete this[a];var o=i[a];o?this[a]=o(n):"target"===a?this.target=r:this[a]=n[a]}var l=null!=n.defaultPrevented?n.defaultPrevented:!1===n.returnValue;return this.isDefaultPrevented=l?s.thatReturnsTrue:s.thatReturnsFalse,this.isPropagationStopped=s.thatReturnsFalse,this}function En(e,t){var n="function"==typeof t;return{configurable:!0,set:function(e){return r(n?"setting the method":"setting the property","This is effectively a no-op"),e},get:function(){return r(n?"accessing the method":"accessing the property",n?"This is a no-op function":"This is set to null"),t}};function r(t,n){i(!1,"This synthetic event is reused for performance reasons. If you're seeing this, you're %s `%s` on a released/nullified synthetic event. %s. If you must keep the original synthetic event around, use event.persist(). See https://fb.me/react-event-pooling for more information.",t,e,n)}}function _n(e,t,n,r){if(this.eventPool.length){var i=this.eventPool.pop();return this.call(i,e,t,n,r),i}return new this(e,t,n,r)}function Sn(e){e instanceof this||n(!1,"Trying to release an event instance into a pool of a different type."),e.destructor(),this.eventPool.length<vn&&this.eventPool.push(e)}function Tn(e){e.eventPool=[],e.getPooled=_n,e.release=Sn}o(wn.prototype,{preventDefault:function(){this.defaultPrevented=!0;var e=this.nativeEvent;e&&(e.preventDefault?e.preventDefault():"unknown"!=typeof e.returnValue&&(e.returnValue=!1),this.isDefaultPrevented=s.thatReturnsTrue)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():"unknown"!=typeof e.cancelBubble&&(e.cancelBubble=!0),this.isPropagationStopped=s.thatReturnsTrue)},persist:function(){this.isPersistent=s.thatReturnsTrue},isPersistent:s.thatReturnsFalse,destructor:function(){var e=this.constructor.Interface;for(var t in e)Object.defineProperty(this,t,En(t,e[t]));for(var n=0;n<bn.length;n++)this[bn[n]]=null;Object.defineProperty(this,"nativeEvent",En("nativeEvent",null)),Object.defineProperty(this,"preventDefault",En("preventDefault",s)),Object.defineProperty(this,"stopPropagation",En("stopPropagation",s))}}),wn.Interface=yn,wn.extend=function(e){var t=this,n=function(){};n.prototype=t.prototype;var r=new n;function i(){return t.apply(this,arguments)}return o(r,i.prototype),i.prototype=r,i.prototype.constructor=i,i.Interface=o({},t.Interface,e),i.extend=t.extend,Tn(i),i},"function"==typeof Proxy&&!Object.isSealed(new Proxy({},{}))&&(wn=new Proxy(wn,{construct:function(e,t){return this.apply(e,Object.create(e.prototype),t)},apply:function(e,t,n){return new Proxy(e.apply(t,n),{set:function(e,t,n){return"isPersistent"===t||e.constructor.Interface.hasOwnProperty(t)||-1!==bn.indexOf(t)||(gn||e.isPersistent()||i(!1,"This synthetic event is reused for performance reasons. If you're seeing this, you're adding a new property in the synthetic event object. The property is never released. See https://fb.me/react-event-pooling for more information."),gn=!0),e[t]=n,!0}})}})),Tn(wn);var Cn=wn,kn=Cn.extend({data:null}),xn=Cn.extend({data:null}),Pn=[9,13,27,32],Nn=229,Mn=a.canUseDOM&&"CompositionEvent"in window,Dn=null;a.canUseDOM&&"documentMode"in document&&(Dn=document.documentMode);var An=a.canUseDOM&&"TextEvent"in window&&!Dn,On=a.canUseDOM&&(!Mn||Dn&&Dn>8&&Dn<=11),In=32,Rn=String.fromCharCode(In),Un={beforeInput:{phasedRegistrationNames:{bubbled:"onBeforeInput",captured:"onBeforeInputCapture"},dependencies:[$e,yt,Xt,Dt]},compositionEnd:{phasedRegistrationNames:{bubbled:"onCompositionEnd",captured:"onCompositionEndCapture"},dependencies:[Be,$e,bt,yt,wt,kt]},compositionStart:{phasedRegistrationNames:{bubbled:"onCompositionStart",captured:"onCompositionStartCapture"},dependencies:[Be,Ye,bt,yt,wt,kt]},compositionUpdate:{phasedRegistrationNames:{bubbled:"onCompositionUpdate",captured:"onCompositionUpdateCapture"},dependencies:[Be,Qe,bt,yt,wt,kt]}},Fn=!1;function Ln(e,t){switch(e){case wt:return-1!==Pn.indexOf(t.keyCode);case bt:return t.keyCode!==Nn;case yt:case kt:case Be:return!0;default:return!1}}function jn(e){var t=e.detail;return"object"==typeof t&&"data"in t?t.data:null}var Wn=!1;function Bn(e,t,n,r){var i=void 0,a=void 0;if(Mn?i=function(e){switch(e){case Ye:return Un.compositionStart;case $e:return Un.compositionEnd;case Qe:return Un.compositionUpdate}}(e):Wn?Ln(e,n)&&(i=Un.compositionEnd):function(e,t){return e===bt&&t.keyCode===Nn}(e,n)&&(i=Un.compositionStart),!i)return null;On&&(Wn||i!==Un.compositionStart?i===Un.compositionEnd&&Wn&&(a=fn()):Wn=function(e){return hn._root=e,hn._startText=mn(),!0}(r));var o=kn.getPooled(i,t,n,r);if(a)o.data=a;else{var s=jn(n);null!==s&&(o.data=s)}return Pe(o),o}function zn(e,t){if(Wn){if(e===$e||!Mn&&Ln(e,t)){var n=fn();return hn._root=null,hn._startText=null,hn._fallbackText=null,Wn=!1,n}return null}switch(e){case Dt:return null;case yt:if(!function(e){return(e.ctrlKey||e.altKey||e.metaKey)&&!(e.ctrlKey&&e.altKey)}(t)){if(t.char&&t.char.length>1)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case $e:return On?null:t.data;default:return null}}function Vn(e,t,n,r){var i=void 0;if(!(i=An?function(e,t){switch(e){case $e:return jn(t);case yt:return t.which!==In?null:(Fn=!0,Rn);case Xt:var n=t.data;return n===Rn&&Fn?null:n;default:return null}}(e,n):zn(e,n)))return null;var a=xn.getPooled(Un.beforeInput,t,n,r);return a.data=i,Pe(a),a}var qn={eventTypes:Un,extractEvents:function(e,t,n,r){var i=Bn(e,t,n,r),a=Vn(e,t,n,r);return null===i?a:null===a?i:[i,a]}},Hn=null,Kn=null,Gn=null;function $n(e){var t=I(e);if(t){Hn&&"function"==typeof Hn.restoreControlledState||n(!1,"Fiber needs to be injected to handle a fiber target for controlled events. This error is likely caused by a bug in React. Please file an issue.");var r=O(t.stateNode);Hn.restoreControlledState(t.stateNode,t.type,r)}}var Yn={injectFiberControlledHostComponent:function(e){Hn=e}};function Qn(e){Kn?Gn?Gn.push(e):Gn=[e]:Kn=e}function Xn(){return null!==Kn||null!==Gn}function Jn(){if(Kn){var e=Kn,t=Gn;if(Kn=null,Gn=null,$n(e),t)for(var n=0;n<t.length;n++)$n(t[n])}}var Zn=Object.freeze({injection:Yn,enqueueStateRestore:Qn,needsStateRestore:Xn,restoreStateIfNeeded:Jn}),er=function(e,t){return e(t)},tr=function(e,t,n){return e(t,n)},nr=function(){},rr=!1;function ir(e,t){if(rr)return e(t);rr=!0;try{return er(e,t)}finally{rr=!1,Xn()&&(nr(),Jn())}}var ar=function(e){er=e.batchedUpdates,tr=e.interactiveUpdates,nr=e.flushInteractiveUpdates},or={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 sr(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return"input"===t?!!or[e.type]:"textarea"===t}var lr=1,cr=3,ur=8,dr=9,pr=11;function hr(e){var t=e.target||e.srcElement||window;return t.correspondingUseElement&&(t=t.correspondingUseElement),t.nodeType===cr?t.parentNode:t}function fr(e,t){if(!a.canUseDOM||t&&!("addEventListener"in document))return!1;var n="on"+e,r=n in document;if(!r){var i=document.createElement("div");i.setAttribute(n,"return;"),r="function"==typeof i[n]}return r}function mr(e){var t=e.type,n=e.nodeName;return n&&"input"===n.toLowerCase()&&("checkbox"===t||"radio"===t)}function gr(e){return e._valueTracker}function vr(e){gr(e)||(e._valueTracker=function(e){var t=mr(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&void 0!==n&&"function"==typeof n.get&&"function"==typeof n.set){var i=n.get,a=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(e){r=""+e,a.call(this,e)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(e){r=""+e},stopTracking:function(){!function(e){e._valueTracker=null}(e),delete e[t]}}}}(e))}function br(e){if(!e)return!1;var t=gr(e);if(!t)return!0;var n=t.getValue(),r=function(e){var t="";return e?t=mr(e)?e.checked?"true":"false":e.value:t}(e);return r!==n&&(t.setValue(r),!0)}var yr=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,wr=yr.ReactCurrentOwner,Er=yr.ReactDebugCurrentFrame,_r=function(e,t,n){return"\n in "+(e||"Unknown")+(t?" (at "+t.fileName.replace(/^.*[\\\/]/,"")+":"+t.lineNumber+")":n?" (created by "+n+")":"")},Sr="function"==typeof Symbol&&Symbol.for,Tr=Sr?Symbol.for("react.element"):60103,Cr=Sr?Symbol.for("react.portal"):60106,kr=Sr?Symbol.for("react.fragment"):60107,xr=Sr?Symbol.for("react.strict_mode"):60108,Pr=Sr?Symbol.for("react.profiler"):60114,Nr=Sr?Symbol.for("react.provider"):60109,Mr=Sr?Symbol.for("react.context"):60110,Dr=Sr?Symbol.for("react.async_mode"):60111,Ar=Sr?Symbol.for("react.forward_ref"):60112,Or=Sr?Symbol.for("react.timeout"):60113,Ir="function"==typeof Symbol&&Symbol.iterator,Rr="@@iterator";function Ur(e){if(null===e||void 0===e)return null;var t=Ir&&e[Ir]||e[Rr];return"function"==typeof t?t:null}function Fr(e){var t=e.type;if("function"==typeof t)return t.displayName||t.name;if("string"==typeof t)return t;switch(t){case Dr:return"AsyncMode";case Mr:return"Context.Consumer";case kr:return"ReactFragment";case Cr:return"ReactPortal";case Pr:return"Profiler("+e.pendingProps.id+")";case Nr:return"Context.Provider";case xr:return"StrictMode";case Or:return"Timeout"}if("object"==typeof t&&null!==t)switch(t.$$typeof){case Ar:var n=t.render.displayName||t.render.name||"";return""!==n?"ForwardRef("+n+")":"ForwardRef"}return null}function Lr(e){switch(e.tag){case Q:case X:case J:case te:var t=e._debugOwner,n=e._debugSource,r=Fr(e),i=null;return t&&(i=Fr(t)),_r(r,n,i);default:return""}}function jr(e){var t="",n=e;do{t+=Lr(n),n=n.return}while(n);return t}function Wr(){var e=Br.current;return null===e?null:jr(e)}var Br={current:null,phase:null,resetCurrentFiber:function(){Er.getCurrentStack=null,Br.current=null,Br.phase=null},setCurrentFiber:function(e){Er.getCurrentStack=Wr,Br.current=e,Br.phase=null},setCurrentPhase:function(e){Br.phase=e},getCurrentFiberOwnerName:function(){var e=Br.current;if(null===e)return null;var t=e._debugOwner;return null!==t&&void 0!==t?Fr(t):null},getCurrentFiberStackAddendum:Wr},zr=0,Vr=2,qr=3,Hr=4,Kr=5,Gr=6,$r=":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",Yr=$r+"\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040",Qr="data-reactroot",Xr=new RegExp("^["+$r+"]["+Yr+"]*$"),Jr=Object.prototype.hasOwnProperty,Zr={},ei={};function ti(e){return!!Jr.call(ei,e)||!Jr.call(Zr,e)&&(Xr.test(e)?(ei[e]=!0,!0):(Zr[e]=!0,i(!1,"Invalid attribute name: `%s`",e),!1))}function ni(e,t,n){return null!==t?t.type===zr:!n&&(e.length>2&&("o"===e[0]||"O"===e[0])&&("n"===e[1]||"N"===e[1]))}function ri(e,t,n,r){if(null!==n&&n.type===zr)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":if(r)return!1;if(null!==n)return!n.acceptsBooleans;var i=e.toLowerCase().slice(0,5);return"data-"!==i&&"aria-"!==i;default:return!1}}function ii(e,t,n,r){if(null===t||void 0===t)return!0;if(ri(e,t,n,r))return!0;if(r)return!1;if(null!==n)switch(n.type){case qr:return!t;case Hr:return!1===t;case Kr:return isNaN(t);case Gr:return isNaN(t)||t<1}return!1}function ai(e){return si.hasOwnProperty(e)?si[e]:null}function oi(e,t,n,r,i){this.acceptsBooleans=t===Vr||t===qr||t===Hr,this.attributeName=r,this.attributeNamespace=i,this.mustUseProperty=n,this.propertyName=e,this.type=t}var si={};["children","dangerouslySetInnerHTML","defaultValue","defaultChecked","innerHTML","suppressContentEditableWarning","suppressHydrationWarning","style"].forEach(function(e){si[e]=new oi(e,zr,!1,e,null)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0],n=e[1];si[t]=new oi(t,1,!1,n,null)}),["contentEditable","draggable","spellCheck","value"].forEach(function(e){si[e]=new oi(e,Vr,!1,e.toLowerCase(),null)}),["autoReverse","externalResourcesRequired","preserveAlpha"].forEach(function(e){si[e]=new oi(e,Vr,!1,e,null)}),["allowFullScreen","async","autoFocus","autoPlay","controls","default","defer","disabled","formNoValidate","hidden","loop","noModule","noValidate","open","playsInline","readOnly","required","reversed","scoped","seamless","itemScope"].forEach(function(e){si[e]=new oi(e,qr,!1,e.toLowerCase(),null)}),["checked","multiple","muted","selected"].forEach(function(e){si[e]=new oi(e,qr,!0,e.toLowerCase(),null)}),["capture","download"].forEach(function(e){si[e]=new oi(e,Hr,!1,e.toLowerCase(),null)}),["cols","rows","size","span"].forEach(function(e){si[e]=new oi(e,Gr,!1,e.toLowerCase(),null)}),["rowSpan","start"].forEach(function(e){si[e]=new oi(e,Kr,!1,e.toLowerCase(),null)});var li=/[\-\:]([a-z])/g,ci=function(e){return e[1].toUpperCase()};function ui(e,t,n,r){if(r.mustUseProperty)return e[r.propertyName];var i=r.attributeName,a=null;if(r.type===Hr){if(e.hasAttribute(i)){var o=e.getAttribute(i);return""===o||(ii(t,n,r,!1)?o:o===""+n?n:o)}}else if(e.hasAttribute(i)){if(ii(t,n,r,!1))return e.getAttribute(i);if(r.type===qr)return n;a=e.getAttribute(i)}return ii(t,n,r,!1)?null===a?n:a:a===""+n?n:a}function di(e,t,n){if(ti(t)){if(!e.hasAttribute(t))return void 0===n?void 0:null;var r=e.getAttribute(t);return r===""+n?n:r}}function pi(e,t,n,r){var i=ai(t);if(!ni(t,i,r))if(ii(t,n,i,r)&&(n=null),r||null===i){if(ti(t)){var a=t;null===n?e.removeAttribute(a):e.setAttribute(a,""+n)}}else if(i.mustUseProperty){var o=i.propertyName;if(null===n){var s=i.type;e[o]=s!==qr&&""}else e[o]=n}else{var l=i.attributeName,c=i.attributeNamespace;if(null===n)e.removeAttribute(l);else{var u=i.type,d=void 0;d=u===qr||u===Hr&&!0===n?"":""+n,c?e.setAttributeNS(c,l,d):e.setAttribute(l,d)}}}["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"].forEach(function(e){var t=e.replace(li,ci);si[t]=new oi(t,1,!1,e,null)}),["xlink:actuate","xlink:arcrole","xlink:href","xlink:role","xlink:show","xlink:title","xlink:type"].forEach(function(e){var t=e.replace(li,ci);si[t]=new oi(t,1,!1,e,"http://www.w3.org/1999/xlink")}),["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(li,ci);si[t]=new oi(t,1,!1,e,"http://www.w3.org/XML/1998/namespace")}),si.tabIndex=new oi("tabIndex",1,!1,"tabindex",null);var hi={checkPropTypes:null},fi={button:!0,checkbox:!0,image:!0,hidden:!0,radio:!0,reset:!0,submit:!0},mi={value:function(e,t,n){return!e[t]||fi[e.type]||e.onChange||e.readOnly||e.disabled?null:new Error("You provided a `value` prop to a form field without an `onChange` handler. This will render a read-only field. If the field should be mutable use `defaultValue`. Otherwise, set either `onChange` or `readOnly`.")},checked:function(e,t,n){return!e[t]||e.onChange||e.readOnly||e.disabled?null:new Error("You provided a `checked` prop to a form field without an `onChange` handler. This will render a read-only field. If the field should be mutable use `defaultChecked`. Otherwise, set either `onChange` or `readOnly`.")}};hi.checkPropTypes=function(e,t,n){l(mi,t,"prop",e,n)};var gi=Br.getCurrentFiberOwnerName,vi=Br.getCurrentFiberStackAddendum,bi=!1,yi=!1,wi=!1,Ei=!1;function _i(e){return"checkbox"===e.type||"radio"===e.type?null!=e.checked:null!=e.value}function Si(e,t){var n=e,r=t.checked;return o({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:null!=r?r:n._wrapperState.initialChecked})}function Ti(e,t){hi.checkPropTypes("input",t,vi),void 0===t.checked||void 0===t.defaultChecked||yi||(i(!1,"%s contains an input of type %s with both checked and defaultChecked props. Input elements must be either controlled or uncontrolled (specify either the checked prop, or the defaultChecked prop, but not both). Decide between using a controlled or uncontrolled input element and remove one of these props. More info: https://fb.me/react-controlled-components",gi()||"A component",t.type),yi=!0),void 0===t.value||void 0===t.defaultValue||bi||(i(!1,"%s contains an input of type %s with both value and defaultValue props. Input elements must be either controlled or uncontrolled (specify either the value prop, or the defaultValue prop, but not both). Decide between using a controlled or uncontrolled input element and remove one of these props. More info: https://fb.me/react-controlled-components",gi()||"A component",t.type),bi=!0);var n=e,r=null==t.defaultValue?"":t.defaultValue;n._wrapperState={initialChecked:null!=t.checked?t.checked:t.defaultChecked,initialValue:Mi(null!=t.value?t.value:r),controlled:_i(t)}}function Ci(e,t){var n=e,r=t.checked;null!=r&&pi(n,"checked",r,!1)}function ki(e,t){var n=e,r=_i(t);n._wrapperState.controlled||!r||Ei||(i(!1,"A component is changing an uncontrolled input of type %s to be controlled. Input elements should not switch from uncontrolled to controlled (or vice versa). Decide between using a controlled or uncontrolled input element for the lifetime of the component. More info: https://fb.me/react-controlled-components%s",t.type,vi()),Ei=!0),!n._wrapperState.controlled||r||wi||(i(!1,"A component is changing a controlled input of type %s to be uncontrolled. Input elements should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled input element for the lifetime of the component. More info: https://fb.me/react-controlled-components%s",t.type,vi()),wi=!0),Ci(e,t);var a=Mi(t.value);null!=a&&("number"===t.type?(0===a&&""===n.value||n.value!=a)&&(n.value=""+a):n.value!==""+a&&(n.value=""+a)),t.hasOwnProperty("value")?Ni(n,t.type,a):t.hasOwnProperty("defaultValue")&&Ni(n,t.type,Mi(t.defaultValue)),null==t.checked&&null!=t.defaultChecked&&(n.defaultChecked=!!t.defaultChecked)}function xi(e,t,n){var r=e;if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var i=""+r._wrapperState.initialValue,a=r.value;n||i!==a&&(r.value=i),r.defaultValue=i}var o=r.name;""!==o&&(r.name=""),r.defaultChecked=!r.defaultChecked,r.defaultChecked=!r.defaultChecked,""!==o&&(r.name=o)}function Pi(e,t){var r=e;ki(r,t),function(e,t){var r=t.name;if("radio"===t.type&&null!=r){for(var i=e;i.parentNode;)i=i.parentNode;for(var a=i.querySelectorAll("input[name="+JSON.stringify(""+r)+'][type="radio"]'),o=0;o<a.length;o++){var s=a[o];if(s!==e&&s.form===e.form){var l=ve(s);l||n(!1,"ReactDOMInput: Mixing React and non-React radio inputs with the same `name` is not supported."),br(s),ki(s,l)}}}}(r,t)}function Ni(e,t,n){"number"===t&&e.ownerDocument.activeElement===e||(null==n?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}function Mi(e){switch(typeof e){case"boolean":case"number":case"object":case"string":case"undefined":return e;default:return""}}var Di={change:{phasedRegistrationNames:{bubbled:"onChange",captured:"onChangeCapture"},dependencies:[Be,He,Ke,ft,gt,bt,wt,Gt]}};function Ai(e,t,n){var r=Cn.getPooled(Di.change,e,t,n);return r.type="change",Qn(n),Pe(r),r}var Oi=null,Ii=null;function Ri(e){G(e,!1)}function Ui(e){if(br(ge(e)))return e}function Fi(e,t){if(e===He)return t}var Li=!1;function ji(){Oi&&(Oi.detachEvent("onpropertychange",Wi),Oi=null,Ii=null)}function Wi(e){"value"===e.propertyName&&Ui(Ii)&&function(e){ir(Ri,Ai(Ii,e,hr(e)))}(e)}function Bi(e,t,n){e===ft?(ji(),function(e,t){Ii=t,(Oi=e).attachEvent("onpropertychange",Wi)}(t,n)):e===Be&&ji()}function zi(e,t){if(e===Gt||e===wt||e===bt)return Ui(Ii)}function Vi(e,t){if(e===Ke)return Ui(t)}function qi(e,t){if(e===gt||e===He)return Ui(t)}a.canUseDOM&&(Li=fr("input")&&(!document.documentMode||document.documentMode>9));var Hi={eventTypes:Di,_isInputEventSupported:Li,extractEvents:function(e,t,n,r){var i,a,o,s,l=t?ge(t):window,c=void 0,u=void 0;if("select"===(a=(i=l).nodeName&&i.nodeName.toLowerCase())||"input"===a&&"file"===i.type?c=Fi:sr(l)?Li?c=qi:(c=zi,u=Bi):function(e){var t=e.nodeName;return t&&"input"===t.toLowerCase()&&("checkbox"===e.type||"radio"===e.type)}(l)&&(c=Vi),c){var d=c(e,t);if(d)return Ai(d,n,r)}u&&u(e,l,t),e===Be&&(s=(o=l)._wrapperState)&&s.controlled&&"number"===o.type&&Ni(o,"number",o.value)}},Ki=Cn.extend({view:null,detail:null}),Gi={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function $i(e){var t=this.nativeEvent;if(t.getModifierState)return t.getModifierState(e);var n=Gi[e];return!!n&&!!t[n]}function Yi(e){return $i}var Qi=Ki.extend({screenX:null,screenY:null,clientX:null,clientY:null,pageX:null,pageY:null,ctrlKey:null,shiftKey:null,altKey:null,metaKey:null,getModifierState:Yi,button:null,buttons:null,relatedTarget:function(e){return e.relatedTarget||(e.fromElement===e.srcElement?e.toElement:e.fromElement)}}),Xi=Qi.extend({pointerId:null,width:null,height:null,pressure:null,tiltX:null,tiltY:null,pointerType:null,isPrimary:null}),Ji={mouseEnter:{registrationName:"onMouseEnter",dependencies:[Pt,Nt]},mouseLeave:{registrationName:"onMouseLeave",dependencies:[Pt,Nt]},pointerEnter:{registrationName:"onPointerEnter",dependencies:[Lt,jt]},pointerLeave:{registrationName:"onPointerLeave",dependencies:[Lt,jt]}},Zi={eventTypes:Ji,extractEvents:function(e,t,n,r){var i=e===Nt||e===jt,a=e===Pt||e===Lt;if(i&&(n.relatedTarget||n.fromElement))return null;if(!a&&!i)return null;var o=void 0;if(r.window===r)o=r;else{var s=r.ownerDocument;o=s?s.defaultView||s.parentWindow:window}var l=void 0,c=void 0;if(a){l=t;var u=n.relatedTarget||n.toElement;c=u?fe(u):null}else l=null,c=t;if(l===c)return null;var d=void 0,p=void 0,h=void 0,f=void 0;e===Pt||e===Nt?(d=Qi,p=Ji.mouseLeave,h=Ji.mouseEnter,f="mouse"):e!==Lt&&e!==jt||(d=Xi,p=Ji.pointerLeave,h=Ji.pointerEnter,f="pointer");var m=null==l?o:ge(l),g=null==c?o:ge(c),v=d.getPooled(p,l,n,r);v.type=f+"leave",v.target=m,v.relatedTarget=g;var b=d.getPooled(h,c,n,r);return b.type=f+"enter",b.target=g,b.relatedTarget=m,Ne(v,b,l,c),[v,b]}};function ea(e){return e._reactInternalFiber}var ta=0,na=1,ra=2,ia=4,aa=6,oa=8,sa=16,la=32,ca=64,ua=128,da=256,pa=511,ha=512,fa=1024,ma=1,ga=2,va=3;function ba(e){var t=e;if(e.alternate)for(;t.return;)t=t.return;else{if((t.effectTag&ra)!==ta)return ma;for(;t.return;)if(((t=t.return).effectTag&ra)!==ta)return ma}return t.tag===Z?ga:va}function ya(e){return ba(e)===ga}function wa(e){ba(e)!==ga&&n(!1,"Unable to find node on an unmounted component.")}function Ea(e){var t=e.alternate;if(!t){var r=ba(e);return r===va&&n(!1,"Unable to find node on an unmounted component."),r===ma?null:e}for(var i=e,a=t;;){var o=i.return,s=o?o.alternate:null;if(!o||!s)break;if(o.child===s.child){for(var l=o.child;l;){if(l===i)return wa(o),e;if(l===a)return wa(o),t;l=l.sibling}n(!1,"Unable to find node on an unmounted component.")}if(i.return!==a.return)i=o,a=s;else{for(var c=!1,u=o.child;u;){if(u===i){c=!0,i=o,a=s;break}if(u===a){c=!0,a=o,i=s;break}u=u.sibling}if(!c){for(u=s.child;u;){if(u===i){c=!0,i=s,a=o;break}if(u===a){c=!0,a=s,i=o;break}u=u.sibling}c||n(!1,"Child was not found in either parent set. This indicates a bug in React related to the return pointer. Please file an issue.")}}i.alternate!==a&&n(!1,"Return fibers should always be each others' alternates. This error is likely caused by a bug in React. Please file an issue.")}return i.tag!==Z&&n(!1,"Unable to find node on an unmounted component."),i.stateNode.current===i?e:t}function _a(e){var t=Ea(e);if(!t)return null;for(var n=t;;){if(n.tag===te||n.tag===ne)return n;if(n.child)n.child.return=n,n=n.child;else{if(n===t)return null;for(;!n.sibling;){if(!n.return||n.return===t)return null;n=n.return}n.sibling.return=n.return,n=n.sibling}}return null}var Sa=Cn.extend({animationName:null,elapsedTime:null,pseudoElement:null}),Ta=Cn.extend({clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),Ca=Ki.extend({relatedTarget:null});function ka(e){var t=void 0,n=e.keyCode;return"charCode"in e?0===(t=e.charCode)&&13===n&&(t=13):t=n,10===t&&(t=13),t>=32||13===t?t:0}var xa={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Pa={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"};var Na=Ki.extend({key:function(e){if(e.key){var t=xa[e.key]||e.key;if("Unidentified"!==t)return t}if("keypress"===e.type){var n=ka(e);return 13===n?"Enter":String.fromCharCode(n)}return"keydown"===e.type||"keyup"===e.type?Pa[e.keyCode]||"Unidentified":""},location:null,ctrlKey:null,shiftKey:null,altKey:null,metaKey:null,repeat:null,locale:null,getModifierState:Yi,charCode:function(e){return"keypress"===e.type?ka(e):0},keyCode:function(e){return"keydown"===e.type||"keyup"===e.type?e.keyCode:0},which:function(e){return"keypress"===e.type?ka(e):"keydown"===e.type||"keyup"===e.type?e.keyCode:0}}),Ma=Qi.extend({dataTransfer:null}),Da=Ki.extend({touches:null,targetTouches:null,changedTouches:null,altKey:null,metaKey:null,ctrlKey:null,shiftKey:null,getModifierState:Yi}),Aa=Cn.extend({propertyName:null,elapsedTime:null,pseudoElement:null}),Oa=Qi.extend({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:null,deltaMode:null}),Ia=[[Fe,"abort"],[Le,"animationEnd"],[je,"animationIteration"],[We,"animationStart"],[ze,"canPlay"],[Ve,"canPlayThrough"],[tt,"drag"],[rt,"dragEnter"],[it,"dragExit"],[at,"dragLeave"],[ot,"dragOver"],[ct,"durationChange"],[ut,"emptied"],[dt,"encrypted"],[pt,"ended"],[ht,"error"],[mt,"gotPointerCapture"],[Et,"load"],[St,"loadedData"],[Tt,"loadedMetadata"],[_t,"loadStart"],[Ct,"lostPointerCapture"],[xt,"mouseMove"],[Pt,"mouseOut"],[Nt,"mouseOver"],[It,"playing"],[Ft,"pointerMove"],[Lt,"pointerOut"],[jt,"pointerOver"],[Bt,"progress"],[qt,"scroll"],[Kt,"seeking"],[$t,"stalled"],[Qt,"suspend"],[Jt,"timeUpdate"],[Zt,"toggle"],[nn,"touchMove"],[an,"transitionEnd"],[sn,"waiting"],[ln,"wheel"]],Ra={},Ua={};function Fa(e,t){var n=e[0],r=e[1],i="on"+(r[0].toUpperCase()+r.slice(1)),a={phasedRegistrationNames:{bubbled:i,captured:i+"Capture"},dependencies:[n],isInteractive:t};Ra[r]=a,Ua[n]=a}[[Be,"blur"],[qe,"cancel"],[Ke,"click"],[Ge,"close"],[Xe,"contextMenu"],[Je,"copy"],[Ze,"cut"],[et,"doubleClick"],[nt,"dragEnd"],[st,"dragStart"],[lt,"drop"],[ft,"focus"],[gt,"input"],[vt,"invalid"],[bt,"keyDown"],[yt,"keyPress"],[wt,"keyUp"],[kt,"mouseDown"],[Mt,"mouseUp"],[Dt,"paste"],[At,"pause"],[Ot,"play"],[Rt,"pointerCancel"],[Ut,"pointerDown"],[Wt,"pointerUp"],[zt,"rateChange"],[Vt,"reset"],[Ht,"seeked"],[Yt,"submit"],[en,"touchCancel"],[tn,"touchEnd"],[rn,"touchStart"],[on,"volumeChange"]].forEach(function(e){Fa(e,!0)}),Ia.forEach(function(e){Fa(e,!1)});var La=[Fe,qe,ze,Ve,Ge,ct,ut,dt,pt,ht,gt,vt,Et,St,Tt,_t,At,Ot,It,Bt,zt,Vt,Ht,Kt,$t,Yt,Qt,Jt,Zt,on,sn],ja={eventTypes:Ra,isInteractiveTopLevelEventType:function(e){var t=Ua[e];return void 0!==t&&!0===t.isInteractive},extractEvents:function(e,t,n,r){var a=Ua[e];if(!a)return null;var o=void 0;switch(e){case yt:if(0===ka(n))return null;case bt:case wt:o=Na;break;case Be:case ft:o=Ca;break;case Ke:if(2===n.button)return null;case et:case kt:case xt:case Mt:case Pt:case Nt:case Xe:o=Qi;break;case tt:case nt:case rt:case it:case at:case ot:case st:case lt:o=Ma;break;case en:case tn:case nn:case rn:o=Da;break;case Le:case je:case We:o=Sa;break;case an:o=Aa;break;case qt:o=Ki;break;case ln:o=Oa;break;case Je:case Ze:case Dt:o=Ta;break;case mt:case Ct:case Rt:case Ut:case Ft:case Lt:case jt:case Wt:o=Xi;break;default:-1===La.indexOf(e)&&i(!1,"SimpleEventPlugin: Unhandled event type, `%s`. This warning is likely caused by a bug in React. Please file an issue.",e),o=Cn}var s=o.getPooled(a,t,n,r);return Pe(s),s}},Wa=ja.isInteractiveTopLevelEventType,Ba=10,za=[];function Va(e){for(;e.return;)e=e.return;return e.tag!==Z?null:e.stateNode.containerInfo}function qa(e){var t=e.targetInst,n=t;do{if(!n){e.ancestors.push(n);break}var r=Va(n);if(!r)break;e.ancestors.push(n),n=fe(r)}while(n);for(var i=0;i<e.ancestors.length;i++)t=e.ancestors[i],$(e.topLevelType,t,e.nativeEvent,hr(e.nativeEvent))}var Ha=!0;function Ka(e){Ha=!!e}function Ga(){return Ha}function $a(e,t){if(!t)return null;var n=Wa(e)?Qa:Xa;!function(e,t,n){e.addEventListener(t,n,!1)}(t,un(e),n.bind(null,e))}function Ya(e,t){if(!t)return null;var n=Wa(e)?Qa:Xa;!function(e,t,n){e.addEventListener(t,n,!0)}(t,un(e),n.bind(null,e))}function Qa(e,t){tr(Xa,e,t)}function Xa(e,t){if(Ha){var n=fe(hr(t));null===n||"number"!=typeof n.tag||ya(n)||(n=null);var r,i=function(e,t,n){if(za.length){var r=za.pop();return r.topLevelType=e,r.nativeEvent=t,r.targetInst=n,r}return{topLevelType:e,nativeEvent:t,targetInst:n,ancestors:[]}}(e,t,n);try{ir(qa,i)}finally{(r=i).topLevelType=null,r.nativeEvent=null,r.targetInst=null,r.ancestors.length=0,za.length<Ba&&za.push(r)}}}var Ja=Object.freeze({get _enabled(){return Ha},setEnabled:Ka,isEnabled:Ga,trapBubbledEvent:$a,trapCapturedEvent:Ya,dispatchEvent:Xa}),Za={},eo=0,to="_reactListenersID"+(""+Math.random()).slice(2);function no(e){return Object.prototype.hasOwnProperty.call(e,to)||(e[to]=eo++,Za[e[to]]={}),Za[e[to]]}function ro(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function io(e){for(;e;){if(e.nextSibling)return e.nextSibling;e=e.parentNode}}function ao(e,t){for(var n=ro(e),r=0,i=0;n;){if(n.nodeType===cr){if(i=r+n.textContent.length,r<=t&&i>=t)return{node:n,offset:t-r};r=i}n=ro(io(n))}}function oo(e){var t=window.getSelection&&window.getSelection();if(!t||0===t.rangeCount)return null;var n=t.anchorNode,r=t.anchorOffset,i=t.focusNode,a=t.focusOffset;try{n.nodeType,i.nodeType}catch(e){return null}return function(e,t,n,r,i){var a=0,o=-1,s=-1,l=0,c=0,u=e,d=null;e:for(;;){for(var p=null;u!==t||0!==n&&u.nodeType!==cr||(o=a+n),u!==r||0!==i&&u.nodeType!==cr||(s=a+i),u.nodeType===cr&&(a+=u.nodeValue.length),null!==(p=u.firstChild);)d=u,u=p;for(;;){if(u===e)break e;if(d===t&&++l===n&&(o=a),d===r&&++c===i&&(s=a),null!==(p=u.nextSibling))break;d=(u=d).parentNode}u=p}if(-1===o||-1===s)return null;return{start:o,end:s}}(e,n,r,i,a)}function so(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)}function lo(){var e=c();return{focusedElem:e,selectionRange:so(e)?function(e){var t=void 0;t="selectionStart"in e?{start:e.selectionStart,end:e.selectionEnd}:oo(e);return t||{start:0,end:0}}(e):null}}function co(e){var t,n=c(),r=e.focusedElem,i=e.selectionRange;if(n!==r&&(t=r,d(document.documentElement,t))){null!==i&&so(r)&&function(e,t){var n=t.start,r=t.end;void 0===r&&(r=n);"selectionStart"in e?(e.selectionStart=n,e.selectionEnd=Math.min(r,e.value.length)):function(e,t){if(window.getSelection){var n=window.getSelection(),r=e[pn()].length,i=Math.min(t.start,r),a=void 0===t.end?i:Math.min(t.end,r);if(!n.extend&&i>a){var o=a;a=i,i=o}var s=ao(e,i),l=ao(e,a);if(s&&l){if(1===n.rangeCount&&n.anchorNode===s.node&&n.anchorOffset===s.offset&&n.focusNode===l.node&&n.focusOffset===l.offset)return;var c=document.createRange();c.setStart(s.node,s.offset),n.removeAllRanges(),i>a?(n.addRange(c),n.extend(l.node,l.offset)):(c.setEnd(l.node,l.offset),n.addRange(c))}}}(e,t)}(r,i);for(var a=[],o=r;o=o.parentNode;)o.nodeType===lr&&a.push({element:o,left:o.scrollLeft,top:o.scrollTop});"function"==typeof r.focus&&r.focus();for(var s=0;s<a.length;s++){var l=a[s];l.element.scrollLeft=l.left,l.element.scrollTop=l.top}}}var uo=a.canUseDOM&&"documentMode"in document&&document.documentMode<=11,po={select:{phasedRegistrationNames:{bubbled:"onSelect",captured:"onSelectCapture"},dependencies:[Be,Xe,ft,bt,wt,kt,Mt,Gt]}},ho=null,fo=null,mo=null,go=!1;function vo(e,t){if(go||null==ho||ho!==c())return null;var n=function(e){if("selectionStart"in e&&so(e))return{start:e.selectionStart,end:e.selectionEnd};if(window.getSelection){var t=window.getSelection();return{anchorNode:t.anchorNode,anchorOffset:t.anchorOffset,focusNode:t.focusNode,focusOffset:t.focusOffset}}}(ho);if(!mo||!u(mo,n)){mo=n;var r=Cn.getPooled(po.select,fo,e,t);return r.type="select",r.target=ho,Pe(r),r}return null}var bo={eventTypes:po,extractEvents:function(e,t,n,r){var i=r.window===r?r.document:r.nodeType===dr?r:r.ownerDocument;if(!i||!function(e,t){for(var n=no(t),r=P[e],i=0;i<r.length;i++){var a=r[i];if(!n.hasOwnProperty(a)||!n[a])return!1}return!0}("onSelect",i))return null;var a=t?ge(t):window;switch(e){case ft:(sr(a)||"true"===a.contentEditable)&&(ho=a,fo=t,mo=null);break;case Be:ho=null,fo=null,mo=null;break;case kt:go=!0;break;case Xe:case Mt:return go=!1,vo(n,r);case Gt:if(uo)break;case bt:case wt:return vo(n,r)}return null}};H.injectEventPluginOrder(["ResponderEventPlugin","SimpleEventPlugin","TapEventPlugin","EnterLeaveEventPlugin","ChangeEventPlugin","SelectEventPlugin","BeforeInputEventPlugin"]),U(ye),H.injectEventPluginsByName({SimpleEventPlugin:ja,EnterLeaveEventPlugin:Zi,ChangeEventPlugin:Hi,SelectEventPlugin:bo,BeforeInputEventPlugin:qn});var yo="function"==typeof requestAnimationFrame?requestAnimationFrame:void 0,wo=Date,Eo=setTimeout,_o=clearTimeout,So=void 0;if("object"==typeof performance&&"function"==typeof performance.now){var To=performance;So=function(){return To.now()}}else So=function(){return wo.now()};var Co=void 0,ko=void 0;if(a.canUseDOM){"function"!=typeof yo&&i(!1,"React depends on requestAnimationFrame. Make sure that you load a polyfill in older browsers. https://fb.me/react-polyfills");var xo="function"==typeof yo?yo:function(e){n(!1,"React depends on requestAnimationFrame. Make sure that you load a polyfill in older browsers. https://fb.me/react-polyfills")},Po=null,No=null,Mo=-1,Do=!1,Ao=!1,Oo=0,Io=33,Ro=33,Uo={didTimeout:!1,timeRemaining:function(){var e=Oo-So();return e>0?e:0}},Fo=function(e,t){var n=e.scheduledCallback,r=!1;try{n(t),r=!0}finally{ko(e),r||(Do=!0,window.postMessage(Lo,"*"))}},Lo="__reactIdleCallback$"+Math.random().toString(36).slice(2);window.addEventListener("message",function(e){if(e.source===window&&e.data===Lo&&(Do=!1,null!==Po)){!function(){if(null!==Po){var e=So();if(!(-1===Mo||Mo>e)){for(var t=-1,n=[],r=Po;null!==r;){var i=r.timeoutTime;-1!==i&&i<=e?n.push(r):-1!==i&&(-1===t||i<t)&&(t=i),r=r.next}if(n.length>0){Uo.didTimeout=!0;for(var a=0,o=n.length;a<o;a++)Fo(n[a],Uo)}Mo=t}}}();for(var t=So();Oo-t>0&&null!==Po;){var n=Po;Uo.didTimeout=!1,Fo(n,Uo),t=So()}null!==Po&&(Ao||(Ao=!0,xo(jo)))}},!1);var jo=function(e){Ao=!1;var t=e-Oo+Ro;t<Ro&&Io<Ro?(t<8&&(t=8),Ro=t<Io?Io:t):Io=t,Oo=e+Ro,Do||(Do=!0,window.postMessage(Lo,"*"))};Co=function(e,t){var n=-1;null!=t&&"number"==typeof t.timeout&&(n=So()+t.timeout),(-1===Mo||-1!==n&&n<Mo)&&(Mo=n);var r={scheduledCallback:e,timeoutTime:n,prev:null,next:null};if(null===Po)Po=r,No=r;else{r.prev=No;null!==No&&(No.next=r),No=r}return Ao||(Ao=!0,xo(jo)),r},ko=function(e){if(null!==e.prev||Po===e){var t=e.next,n=e.prev;return e.next=null,e.prev=null,null!==t?null!==n?(n.next=t,void(t.prev=n)):(t.prev=null,void(Po=t)):null!==n?(n.next=null,void(No=n)):(Po=null,void(No=null))}}}else{var Wo=new Map;Co=function(e,t){var n={scheduledCallback:e,timeoutTime:0,next:null,prev:null},r=Eo(function(){e({timeRemaining:function(){return 1/0},didTimeout:!1})});return Wo.set(e,r),n},ko=function(e){var t=e.scheduledCallback,n=Wo.get(t);Wo.delete(e),_o(n)}}var Bo=!1;function zo(e,t){null==t.selected||Bo||(i(!1,"Use the `defaultValue` or `value` props on <select> instead of setting `selected` on <option>."),Bo=!0)}function Vo(e,t){var n=o({children:void 0},t),i=function(e){var t="";return r.Children.forEach(e,function(e){null!=e&&("string"!=typeof e&&"number"!=typeof e||(t+=e))}),t}(t.children);return i&&(n.children=i),n}var qo=Br.getCurrentFiberOwnerName,Ho=Br.getCurrentFiberStackAddendum,Ko=void 0;function Go(){var e=qo();return e?"\n\nCheck the render method of `"+e+"`.":""}Ko=!1;var $o=["value","defaultValue"];function Yo(e,t,n,r){var i=e.options;if(t){for(var a=n,o={},s=0;s<a.length;s++)o["$"+a[s]]=!0;for(var l=0;l<i.length;l++){var c=o.hasOwnProperty("$"+i[l].value);i[l].selected!==c&&(i[l].selected=c),c&&r&&(i[l].defaultSelected=!0)}}else{for(var u=""+n,d=null,p=0;p<i.length;p++){if(i[p].value===u)return i[p].selected=!0,void(r&&(i[p].defaultSelected=!0));null!==d||i[p].disabled||(d=i[p])}null!==d&&(d.selected=!0)}}function Qo(e,t){return o({},t,{value:void 0})}function Xo(e,t){var n=e;!function(e){hi.checkPropTypes("select",e,Ho);for(var t=0;t<$o.length;t++){var n=$o[t];if(null!=e[n]){var r=Array.isArray(e[n]);e.multiple&&!r?i(!1,"The `%s` prop supplied to <select> must be an array if `multiple` is true.%s",n,Go()):!e.multiple&&r&&i(!1,"The `%s` prop supplied to <select> must be a scalar value if `multiple` is false.%s",n,Go())}}}(t);var r=t.value;n._wrapperState={initialValue:null!=r?r:t.defaultValue,wasMultiple:!!t.multiple},void 0===t.value||void 0===t.defaultValue||Ko||(i(!1,"Select elements must be either controlled or uncontrolled (specify either the value prop, or the defaultValue prop, but not both). Decide between using a controlled or uncontrolled select element and remove one of these props. More info: https://fb.me/react-controlled-components"),Ko=!0)}var Jo=Br.getCurrentFiberStackAddendum,Zo=!1;function es(e,t){var r=e;return null!=t.dangerouslySetInnerHTML&&n(!1,"`dangerouslySetInnerHTML` does not make sense on <textarea>."),o({},t,{value:void 0,defaultValue:void 0,children:""+r._wrapperState.initialValue})}function ts(e,t){var r=e;hi.checkPropTypes("textarea",t,Jo),void 0===t.value||void 0===t.defaultValue||Zo||(i(!1,"Textarea elements must be either controlled or uncontrolled (specify either the value prop, or the defaultValue prop, but not both). Decide between using a controlled or uncontrolled textarea and remove one of these props. More info: https://fb.me/react-controlled-components"),Zo=!0);var a=t.value;if(null==a){var o=t.defaultValue,s=t.children;null!=s&&(i(!1,"Use the `defaultValue` or `value` props instead of setting children on <textarea>."),null!=o&&n(!1,"If you supply `defaultValue` on a <textarea>, do not pass children."),Array.isArray(s)&&(s.length<=1||n(!1,"<textarea> can only have at most one child."),s=s[0]),o=""+s),null==o&&(o=""),a=o}r._wrapperState={initialValue:""+a}}function ns(e,t){var n=e,r=t.value;if(null!=r){var i=""+r;i!==n.value&&(n.value=i),null==t.defaultValue&&(n.defaultValue=i)}null!=t.defaultValue&&(n.defaultValue=t.defaultValue)}function rs(e,t){var n=e,r=n.textContent;r===n._wrapperState.initialValue&&(n.value=r)}var is="http://www.w3.org/1999/xhtml",as="http://www.w3.org/1998/Math/MathML",os="http://www.w3.org/2000/svg",ss={html:is,mathml:as,svg:os};function ls(e){switch(e){case"svg":return os;case"math":return as;default:return is}}function cs(e,t){return null==e||e===is?ls(t):e===os&&"foreignObject"===t?is:e}var us,ds=void 0,ps=(us=function(e,t){if(e.namespaceURI!==ss.svg||"innerHTML"in e)e.innerHTML=t;else{(ds=ds||document.createElement("div")).innerHTML="<svg>"+t+"</svg>";for(var n=ds.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;n.firstChild;)e.appendChild(n.firstChild)}},"undefined"!=typeof MSApp&&MSApp.execUnsafeLocalFunction?function(e,t,n,r){MSApp.execUnsafeLocalFunction(function(){return us(e,t,n,r)})}:us),hs=function(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===cr)return void(n.nodeValue=t)}e.textContent=t},fs={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,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};var ms=["Webkit","ms","Moz","O"];function gs(e,t,n){return null==t||"boolean"==typeof t||""===t?"":n||"number"!=typeof t||0===t||fs.hasOwnProperty(e)&&fs[e]?(""+t).trim():t+"px"}Object.keys(fs).forEach(function(e){ms.forEach(function(t){fs[function(e,t){return e+t.charAt(0).toUpperCase()+t.substring(1)}(t,e)]=fs[e]})});var vs=/^(?:webkit|moz|o)[A-Z]/,bs=/;\s*$/,ys={},ws={},Es=!1,_s=!1,Ss=function(e,t,n){e.indexOf("-")>-1?function(e,t){ys.hasOwnProperty(e)&&ys[e]||(ys[e]=!0,i(!1,"Unsupported style property %s. Did you mean %s?%s",e,f(e),t()))}(e,n):vs.test(e)?function(e,t){ys.hasOwnProperty(e)&&ys[e]||(ys[e]=!0,i(!1,"Unsupported vendor-prefixed style property %s. Did you mean %s?%s",e,e.charAt(0).toUpperCase()+e.slice(1),t()))}(e,n):bs.test(t)&&function(e,t,n){ws.hasOwnProperty(t)&&ws[t]||(ws[t]=!0,i(!1,'Style property values shouldn\'t contain a semicolon. Try "%s: %s" instead.%s',e,t.replace(bs,""),n()))}(e,t,n),"number"==typeof t&&(isNaN(t)?function(e,t,n){Es||(Es=!0,i(!1,"`NaN` is an invalid value for the `%s` css style property.%s",e,n()))}(e,0,n):isFinite(t)||function(e,t,n){_s||(_s=!0,i(!1,"`Infinity` is an invalid value for the `%s` css style property.%s",e,n()))}(e,0,n))};function Ts(e){var t="",n="";for(var r in e)if(e.hasOwnProperty(r)){var i=e[r];if(null!=i){var a=0===r.indexOf("--");t+=n+h(r)+":",t+=gs(r,i,a),n=";"}}return t||null}function Cs(e,t,n){var r=e.style;for(var i in t)if(t.hasOwnProperty(i)){var a=0===i.indexOf("--");a||Ss(i,t[i],n);var o=gs(i,t[i],a);"float"===i&&(i="cssFloat"),a?r.setProperty(i,o):r[i]=o}}var ks=o({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}),xs="__html";function Ps(e,t,r){t&&(ks[e]&&(null!=t.children||null!=t.dangerouslySetInnerHTML)&&n(!1,"%s is a void element tag and must neither have `children` nor use `dangerouslySetInnerHTML`.%s",e,r()),null!=t.dangerouslySetInnerHTML&&(null!=t.children&&n(!1,"Can only set one of `children` or `props.dangerouslySetInnerHTML`."),"object"==typeof t.dangerouslySetInnerHTML&&xs in t.dangerouslySetInnerHTML||n(!1,"`props.dangerouslySetInnerHTML` must be in the form `{__html: ...}`. Please visit https://fb.me/react-invariant-dangerously-set-inner-html for more information.")),!t.suppressContentEditableWarning&&t.contentEditable&&null!=t.children&&i(!1,"A component is `contentEditable` and contains `children` managed by React. It is now your responsibility to guarantee that none of those nodes are unexpectedly modified or duplicated. This is probably not intentional.%s",r()),null!=t.style&&"object"!=typeof t.style&&n(!1,"The `style` prop expects a mapping from style properties to values, not a string. For example, style={{marginRight: spacing + 'em'}} when using JSX.%s",r()))}function Ns(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}}var Ms={accept:"accept",acceptcharset:"acceptCharset","accept-charset":"acceptCharset",accesskey:"accessKey",action:"action",allowfullscreen:"allowFullScreen",alt:"alt",as:"as",async:"async",autocapitalize:"autoCapitalize",autocomplete:"autoComplete",autocorrect:"autoCorrect",autofocus:"autoFocus",autoplay:"autoPlay",autosave:"autoSave",capture:"capture",cellpadding:"cellPadding",cellspacing:"cellSpacing",challenge:"challenge",charset:"charSet",checked:"checked",children:"children",cite:"cite",class:"className",classid:"classID",classname:"className",cols:"cols",colspan:"colSpan",content:"content",contenteditable:"contentEditable",contextmenu:"contextMenu",controls:"controls",controlslist:"controlsList",coords:"coords",crossorigin:"crossOrigin",dangerouslysetinnerhtml:"dangerouslySetInnerHTML",data:"data",datetime:"dateTime",default:"default",defaultchecked:"defaultChecked",defaultvalue:"defaultValue",defer:"defer",dir:"dir",disabled:"disabled",download:"download",draggable:"draggable",enctype:"encType",for:"htmlFor",form:"form",formmethod:"formMethod",formaction:"formAction",formenctype:"formEncType",formnovalidate:"formNoValidate",formtarget:"formTarget",frameborder:"frameBorder",headers:"headers",height:"height",hidden:"hidden",high:"high",href:"href",hreflang:"hrefLang",htmlfor:"htmlFor",httpequiv:"httpEquiv","http-equiv":"httpEquiv",icon:"icon",id:"id",innerhtml:"innerHTML",inputmode:"inputMode",integrity:"integrity",is:"is",itemid:"itemID",itemprop:"itemProp",itemref:"itemRef",itemscope:"itemScope",itemtype:"itemType",keyparams:"keyParams",keytype:"keyType",kind:"kind",label:"label",lang:"lang",list:"list",loop:"loop",low:"low",manifest:"manifest",marginwidth:"marginWidth",marginheight:"marginHeight",max:"max",maxlength:"maxLength",media:"media",mediagroup:"mediaGroup",method:"method",min:"min",minlength:"minLength",multiple:"multiple",muted:"muted",name:"name",nomodule:"noModule",nonce:"nonce",novalidate:"noValidate",open:"open",optimum:"optimum",pattern:"pattern",placeholder:"placeholder",playsinline:"playsInline",poster:"poster",preload:"preload",profile:"profile",radiogroup:"radioGroup",readonly:"readOnly",referrerpolicy:"referrerPolicy",rel:"rel",required:"required",reversed:"reversed",role:"role",rows:"rows",rowspan:"rowSpan",sandbox:"sandbox",scope:"scope",scoped:"scoped",scrolling:"scrolling",seamless:"seamless",selected:"selected",shape:"shape",size:"size",sizes:"sizes",span:"span",spellcheck:"spellCheck",src:"src",srcdoc:"srcDoc",srclang:"srcLang",srcset:"srcSet",start:"start",step:"step",style:"style",summary:"summary",tabindex:"tabIndex",target:"target",title:"title",type:"type",usemap:"useMap",value:"value",width:"width",wmode:"wmode",wrap:"wrap",about:"about",accentheight:"accentHeight","accent-height":"accentHeight",accumulate:"accumulate",additive:"additive",alignmentbaseline:"alignmentBaseline","alignment-baseline":"alignmentBaseline",allowreorder:"allowReorder",alphabetic:"alphabetic",amplitude:"amplitude",arabicform:"arabicForm","arabic-form":"arabicForm",ascent:"ascent",attributename:"attributeName",attributetype:"attributeType",autoreverse:"autoReverse",azimuth:"azimuth",basefrequency:"baseFrequency",baselineshift:"baselineShift","baseline-shift":"baselineShift",baseprofile:"baseProfile",bbox:"bbox",begin:"begin",bias:"bias",by:"by",calcmode:"calcMode",capheight:"capHeight","cap-height":"capHeight",clip:"clip",clippath:"clipPath","clip-path":"clipPath",clippathunits:"clipPathUnits",cliprule:"clipRule","clip-rule":"clipRule",color:"color",colorinterpolation:"colorInterpolation","color-interpolation":"colorInterpolation",colorinterpolationfilters:"colorInterpolationFilters","color-interpolation-filters":"colorInterpolationFilters",colorprofile:"colorProfile","color-profile":"colorProfile",colorrendering:"colorRendering","color-rendering":"colorRendering",contentscripttype:"contentScriptType",contentstyletype:"contentStyleType",cursor:"cursor",cx:"cx",cy:"cy",d:"d",datatype:"datatype",decelerate:"decelerate",descent:"descent",diffuseconstant:"diffuseConstant",direction:"direction",display:"display",divisor:"divisor",dominantbaseline:"dominantBaseline","dominant-baseline":"dominantBaseline",dur:"dur",dx:"dx",dy:"dy",edgemode:"edgeMode",elevation:"elevation",enablebackground:"enableBackground","enable-background":"enableBackground",end:"end",exponent:"exponent",externalresourcesrequired:"externalResourcesRequired",fill:"fill",fillopacity:"fillOpacity","fill-opacity":"fillOpacity",fillrule:"fillRule","fill-rule":"fillRule",filter:"filter",filterres:"filterRes",filterunits:"filterUnits",floodopacity:"floodOpacity","flood-opacity":"floodOpacity",floodcolor:"floodColor","flood-color":"floodColor",focusable:"focusable",fontfamily:"fontFamily","font-family":"fontFamily",fontsize:"fontSize","font-size":"fontSize",fontsizeadjust:"fontSizeAdjust","font-size-adjust":"fontSizeAdjust",fontstretch:"fontStretch","font-stretch":"fontStretch",fontstyle:"fontStyle","font-style":"fontStyle",fontvariant:"fontVariant","font-variant":"fontVariant",fontweight:"fontWeight","font-weight":"fontWeight",format:"format",from:"from",fx:"fx",fy:"fy",g1:"g1",g2:"g2",glyphname:"glyphName","glyph-name":"glyphName",glyphorientationhorizontal:"glyphOrientationHorizontal","glyph-orientation-horizontal":"glyphOrientationHorizontal",glyphorientationvertical:"glyphOrientationVertical","glyph-orientation-vertical":"glyphOrientationVertical",glyphref:"glyphRef",gradienttransform:"gradientTransform",gradientunits:"gradientUnits",hanging:"hanging",horizadvx:"horizAdvX","horiz-adv-x":"horizAdvX",horizoriginx:"horizOriginX","horiz-origin-x":"horizOriginX",ideographic:"ideographic",imagerendering:"imageRendering","image-rendering":"imageRendering",in2:"in2",in:"in",inlist:"inlist",intercept:"intercept",k1:"k1",k2:"k2",k3:"k3",k4:"k4",k:"k",kernelmatrix:"kernelMatrix",kernelunitlength:"kernelUnitLength",kerning:"kerning",keypoints:"keyPoints",keysplines:"keySplines",keytimes:"keyTimes",lengthadjust:"lengthAdjust",letterspacing:"letterSpacing","letter-spacing":"letterSpacing",lightingcolor:"lightingColor","lighting-color":"lightingColor",limitingconeangle:"limitingConeAngle",local:"local",markerend:"markerEnd","marker-end":"markerEnd",markerheight:"markerHeight",markermid:"markerMid","marker-mid":"markerMid",markerstart:"markerStart","marker-start":"markerStart",markerunits:"markerUnits",markerwidth:"markerWidth",mask:"mask",maskcontentunits:"maskContentUnits",maskunits:"maskUnits",mathematical:"mathematical",mode:"mode",numoctaves:"numOctaves",offset:"offset",opacity:"opacity",operator:"operator",order:"order",orient:"orient",orientation:"orientation",origin:"origin",overflow:"overflow",overlineposition:"overlinePosition","overline-position":"overlinePosition",overlinethickness:"overlineThickness","overline-thickness":"overlineThickness",paintorder:"paintOrder","paint-order":"paintOrder",panose1:"panose1","panose-1":"panose1",pathlength:"pathLength",patterncontentunits:"patternContentUnits",patterntransform:"patternTransform",patternunits:"patternUnits",pointerevents:"pointerEvents","pointer-events":"pointerEvents",points:"points",pointsatx:"pointsAtX",pointsaty:"pointsAtY",pointsatz:"pointsAtZ",prefix:"prefix",preservealpha:"preserveAlpha",preserveaspectratio:"preserveAspectRatio",primitiveunits:"primitiveUnits",property:"property",r:"r",radius:"radius",refx:"refX",refy:"refY",renderingintent:"renderingIntent","rendering-intent":"renderingIntent",repeatcount:"repeatCount",repeatdur:"repeatDur",requiredextensions:"requiredExtensions",requiredfeatures:"requiredFeatures",resource:"resource",restart:"restart",result:"result",results:"results",rotate:"rotate",rx:"rx",ry:"ry",scale:"scale",security:"security",seed:"seed",shaperendering:"shapeRendering","shape-rendering":"shapeRendering",slope:"slope",spacing:"spacing",specularconstant:"specularConstant",specularexponent:"specularExponent",speed:"speed",spreadmethod:"spreadMethod",startoffset:"startOffset",stddeviation:"stdDeviation",stemh:"stemh",stemv:"stemv",stitchtiles:"stitchTiles",stopcolor:"stopColor","stop-color":"stopColor",stopopacity:"stopOpacity","stop-opacity":"stopOpacity",strikethroughposition:"strikethroughPosition","strikethrough-position":"strikethroughPosition",strikethroughthickness:"strikethroughThickness","strikethrough-thickness":"strikethroughThickness",string:"string",stroke:"stroke",strokedasharray:"strokeDasharray","stroke-dasharray":"strokeDasharray",strokedashoffset:"strokeDashoffset","stroke-dashoffset":"strokeDashoffset",strokelinecap:"strokeLinecap","stroke-linecap":"strokeLinecap",strokelinejoin:"strokeLinejoin","stroke-linejoin":"strokeLinejoin",strokemiterlimit:"strokeMiterlimit","stroke-miterlimit":"strokeMiterlimit",strokewidth:"strokeWidth","stroke-width":"strokeWidth",strokeopacity:"strokeOpacity","stroke-opacity":"strokeOpacity",suppresscontenteditablewarning:"suppressContentEditableWarning",suppresshydrationwarning:"suppressHydrationWarning",surfacescale:"surfaceScale",systemlanguage:"systemLanguage",tablevalues:"tableValues",targetx:"targetX",targety:"targetY",textanchor:"textAnchor","text-anchor":"textAnchor",textdecoration:"textDecoration","text-decoration":"textDecoration",textlength:"textLength",textrendering:"textRendering","text-rendering":"textRendering",to:"to",transform:"transform",typeof:"typeof",u1:"u1",u2:"u2",underlineposition:"underlinePosition","underline-position":"underlinePosition",underlinethickness:"underlineThickness","underline-thickness":"underlineThickness",unicode:"unicode",unicodebidi:"unicodeBidi","unicode-bidi":"unicodeBidi",unicoderange:"unicodeRange","unicode-range":"unicodeRange",unitsperem:"unitsPerEm","units-per-em":"unitsPerEm",unselectable:"unselectable",valphabetic:"vAlphabetic","v-alphabetic":"vAlphabetic",values:"values",vectoreffect:"vectorEffect","vector-effect":"vectorEffect",version:"version",vertadvy:"vertAdvY","vert-adv-y":"vertAdvY",vertoriginx:"vertOriginX","vert-origin-x":"vertOriginX",vertoriginy:"vertOriginY","vert-origin-y":"vertOriginY",vhanging:"vHanging","v-hanging":"vHanging",videographic:"vIdeographic","v-ideographic":"vIdeographic",viewbox:"viewBox",viewtarget:"viewTarget",visibility:"visibility",vmathematical:"vMathematical","v-mathematical":"vMathematical",vocab:"vocab",widths:"widths",wordspacing:"wordSpacing","word-spacing":"wordSpacing",writingmode:"writingMode","writing-mode":"writingMode",x1:"x1",x2:"x2",x:"x",xchannelselector:"xChannelSelector",xheight:"xHeight","x-height":"xHeight",xlinkactuate:"xlinkActuate","xlink:actuate":"xlinkActuate",xlinkarcrole:"xlinkArcrole","xlink:arcrole":"xlinkArcrole",xlinkhref:"xlinkHref","xlink:href":"xlinkHref",xlinkrole:"xlinkRole","xlink:role":"xlinkRole",xlinkshow:"xlinkShow","xlink:show":"xlinkShow",xlinktitle:"xlinkTitle","xlink:title":"xlinkTitle",xlinktype:"xlinkType","xlink:type":"xlinkType",xmlbase:"xmlBase","xml:base":"xmlBase",xmllang:"xmlLang","xml:lang":"xmlLang",xmlns:"xmlns","xml:space":"xmlSpace",xmlnsxlink:"xmlnsXlink","xmlns:xlink":"xmlnsXlink",xmlspace:"xmlSpace",y1:"y1",y2:"y2",y:"y",ychannelselector:"yChannelSelector",z:"z",zoomandpan:"zoomAndPan"},Ds={"aria-current":0,"aria-details":0,"aria-disabled":0,"aria-hidden":0,"aria-invalid":0,"aria-keyshortcuts":0,"aria-label":0,"aria-roledescription":0,"aria-autocomplete":0,"aria-checked":0,"aria-expanded":0,"aria-haspopup":0,"aria-level":0,"aria-modal":0,"aria-multiline":0,"aria-multiselectable":0,"aria-orientation":0,"aria-placeholder":0,"aria-pressed":0,"aria-readonly":0,"aria-required":0,"aria-selected":0,"aria-sort":0,"aria-valuemax":0,"aria-valuemin":0,"aria-valuenow":0,"aria-valuetext":0,"aria-atomic":0,"aria-busy":0,"aria-live":0,"aria-relevant":0,"aria-dropeffect":0,"aria-grabbed":0,"aria-activedescendant":0,"aria-colcount":0,"aria-colindex":0,"aria-colspan":0,"aria-controls":0,"aria-describedby":0,"aria-errormessage":0,"aria-flowto":0,"aria-labelledby":0,"aria-owns":0,"aria-posinset":0,"aria-rowcount":0,"aria-rowindex":0,"aria-rowspan":0,"aria-setsize":0},As={},Os=new RegExp("^(aria)-["+Yr+"]*$"),Is=new RegExp("^(aria)[A-Z]["+Yr+"]*$"),Rs=Object.prototype.hasOwnProperty;function Us(){var e=Er.getStackAddendum();return null!=e?e:""}function Fs(e,t){if(Rs.call(As,t)&&As[t])return!0;if(Is.test(t)){var n="aria-"+t.slice(4).toLowerCase(),r=Ds.hasOwnProperty(n)?n:null;if(null==r)return i(!1,"Invalid ARIA attribute `%s`. ARIA attributes follow the pattern aria-* and must be lowercase.%s",t,Us()),As[t]=!0,!0;if(t!==r)return i(!1,"Invalid ARIA attribute `%s`. Did you mean `%s`?%s",t,r,Us()),As[t]=!0,!0}if(Os.test(t)){var a=t.toLowerCase(),o=Ds.hasOwnProperty(a)?a:null;if(null==o)return As[t]=!0,!1;if(t!==o)return i(!1,"Unknown ARIA attribute `%s`. Did you mean `%s`?%s",t,o,Us()),As[t]=!0,!0}return!0}function Ls(e,t){Ns(e,t)||function(e,t){var n=[];for(var r in t)Fs(0,r)||n.push(r);var a=n.map(function(e){return"`"+e+"`"}).join(", ");1===n.length?i(!1,"Invalid aria prop %s on <%s> tag. For details, see https://fb.me/invalid-aria-prop%s",a,e,Us()):n.length>1&&i(!1,"Invalid aria props %s on <%s> tag. For details, see https://fb.me/invalid-aria-prop%s",a,e,Us())}(e,t)}var js=!1;function Ws(){var e=Er.getStackAddendum();return null!=e?e:""}function Bs(){var e=Er.getStackAddendum();return null!=e?e:""}var zs,Vs={},qs=Object.prototype.hasOwnProperty,Hs=/^on./,Ks=/^on[^A-Z]/,Gs=new RegExp("^(aria)-["+Yr+"]*$"),$s=new RegExp("^(aria)[A-Z]["+Yr+"]*$");zs=function(e,t,n,r){if(qs.call(Vs,t)&&Vs[t])return!0;var a=t.toLowerCase();if("onfocusin"===a||"onfocusout"===a)return i(!1,"React uses onFocus and onBlur instead of onFocusIn and onFocusOut. All React events are normalized to bubble, so onFocusIn and onFocusOut are not needed/supported by React."),Vs[t]=!0,!0;if(r){if(x.hasOwnProperty(t))return!0;var o=N.hasOwnProperty(a)?N[a]:null;if(null!=o)return i(!1,"Invalid event handler property `%s`. Did you mean `%s`?%s",t,o,Bs()),Vs[t]=!0,!0;if(Hs.test(t))return i(!1,"Unknown event handler property `%s`. It will be ignored.%s",t,Bs()),Vs[t]=!0,!0}else if(Hs.test(t))return Ks.test(t)&&i(!1,"Invalid event handler property `%s`. React events use the camelCase naming convention, for example `onClick`.%s",t,Bs()),Vs[t]=!0,!0;if(Gs.test(t)||$s.test(t))return!0;if("innerhtml"===a)return i(!1,"Directly setting property `innerHTML` is not permitted. For more information, lookup documentation on `dangerouslySetInnerHTML`."),Vs[t]=!0,!0;if("aria"===a)return i(!1,"The `aria` attribute is reserved for future use in React. Pass individual `aria-` attributes instead."),Vs[t]=!0,!0;if("is"===a&&null!==n&&void 0!==n&&"string"!=typeof n)return i(!1,"Received a `%s` for a string attribute `is`. If this is expected, cast the value to a string.%s",typeof n,Bs()),Vs[t]=!0,!0;if("number"==typeof n&&isNaN(n))return i(!1,"Received NaN for the `%s` attribute. If this is expected, cast the value to a string.%s",t,Bs()),Vs[t]=!0,!0;var s=ai(t),l=null!==s&&s.type===zr;if(Ms.hasOwnProperty(a)){var c=Ms[a];if(c!==t)return i(!1,"Invalid DOM property `%s`. Did you mean `%s`?%s",t,c,Bs()),Vs[t]=!0,!0}else if(!l&&t!==a)return i(!1,"React does not recognize the `%s` prop on a DOM element. If you intentionally want it to appear in the DOM as a custom attribute, spell it as lowercase `%s` instead. If you accidentally passed it from a parent component, remove it from the DOM element.%s",t,a,Bs()),Vs[t]=!0,!0;return"boolean"==typeof n&&ri(t,n,s,!1)?(n?i(!1,'Received `%s` for a non-boolean attribute `%s`.\n\nIf you want to write it to the DOM, pass a string instead: %s="%s" or %s={value.toString()}.%s',n,t,t,n,t,Bs()):i(!1,'Received `%s` for a non-boolean attribute `%s`.\n\nIf you want to write it to the DOM, pass a string instead: %s="%s" or %s={value.toString()}.\n\nIf you used to conditionally omit it with %s={condition && value}, pass %s={condition ? value : undefined} instead.%s',n,t,t,n,t,t,t,Bs()),Vs[t]=!0,!0):!!l||(!ri(t,n,s,!1)||(Vs[t]=!0,!1))};var Ys=function(e,t,n){var r=[];for(var a in t){zs(0,a,t[a],n)||r.push(a)}var o=r.map(function(e){return"`"+e+"`"}).join(", ");1===r.length?i(!1,"Invalid value for prop %s on <%s> tag. Either remove it from the element, or pass a string or number value to keep it in the DOM. For details, see https://fb.me/react-attribute-behavior%s",o,e,Bs()):r.length>1&&i(!1,"Invalid values for props %s on <%s> tag. Either remove them from the element, or pass a string or number value to keep them in the DOM. For details, see https://fb.me/react-attribute-behavior%s",o,e,Bs())};var Qs,Xs=Br.getCurrentFiberOwnerName,Js=Br.getCurrentFiberStackAddendum,Zs=!1,el=!1,tl="dangerouslySetInnerHTML",nl="suppressContentEditableWarning",rl="suppressHydrationWarning",il="autoFocus",al="children",ol="style",sl="__html",ll=ss.html,cl=s.thatReturns(""),ul=void 0,dl=void 0,pl=void 0,hl=void 0,fl=void 0,ml=void 0,gl=void 0,vl=void 0;cl=Js,ul={time:!0,dialog:!0},pl=function(e,t){Ls(e,t),function(e,t){"input"!==e&&"textarea"!==e&&"select"!==e||null==t||null!==t.value||js||(js=!0,"select"===e&&t.multiple?i(!1,"`value` prop on `%s` should not be null. Consider using an empty array when `multiple` is set to `true` to clear the component or `undefined` for uncontrolled components.%s",e,Ws()):i(!1,"`value` prop on `%s` should not be null. Consider using an empty string to clear the component or `undefined` for uncontrolled components.%s",e,Ws()))}(e,t),function(e,t,n){Ns(e,t)||Ys(e,t,n)}(e,t,!0)};var bl=/\r\n?/g,yl=/\u0000|\uFFFD/g;function wl(e,t){!function(e,t){for(var n=no(t),r=P[e],i=0;i<r.length;i++){var a=r[i];if(!n.hasOwnProperty(a)||!n[a]){switch(a){case qt:Ya(qt,t);break;case ft:case Be:Ya(ft,t),Ya(Be,t),n[Be]=!0,n[ft]=!0;break;case qe:case Ge:fr(un(a),!0)&&Ya(a,t);break;case vt:case Yt:case Vt:break;default:-1!==cn.indexOf(a)||$a(a,t)}n[a]=!0}}}(t,e.nodeType===dr||e.nodeType===pr?e:e.ownerDocument)}function El(e){return e.nodeType===dr?e:e.ownerDocument}function _l(e){e.onclick=s}function Sl(e,t,n,r){var a=void 0,o=El(n),s=void 0,l=r;if(l===ll&&(l=ls(e)),l===ll)if((a=Ns(e,t))||e===e.toLowerCase()||i(!1,"<%s /> is using incorrect casing. Use PascalCase for React components, or lowercase for HTML elements.",e),"script"===e){var c=o.createElement("div");c.innerHTML="<script><\/script>";var u=c.firstChild;s=c.removeChild(u)}else s="string"==typeof t.is?o.createElement(e,{is:t.is}):o.createElement(e);else s=o.createElementNS(l,e);return l===ll&&(a||"[object HTMLUnknownElement]"!==Object.prototype.toString.call(s)||Object.prototype.hasOwnProperty.call(ul,e)||(ul[e]=!0,i(!1,"The tag <%s> is unrecognized in this browser. If you meant to render a React component, start its name with an uppercase letter.",e))),s}function Tl(e,t){return El(t).createTextNode(e)}function Cl(e,t,n,r){var a=Ns(t,n);pl(t,n),a&&!el&&e.shadyRoot&&(i(!1,"%s is using shady DOM. Using shady DOM with React can cause things to break subtly.",Xs()||"A component"),el=!0);var o=void 0;switch(t){case"iframe":case"object":$a(Et,e),o=n;break;case"video":case"audio":for(var s=0;s<cn.length;s++)$a(cn[s],e);o=n;break;case"source":$a(ht,e),o=n;break;case"img":case"image":case"link":$a(ht,e),$a(Et,e),o=n;break;case"form":$a(Vt,e),$a(Yt,e),o=n;break;case"details":$a(Zt,e),o=n;break;case"input":Ti(e,n),o=Si(e,n),$a(vt,e),wl(r,"onChange");break;case"option":zo(0,n),o=Vo(0,n);break;case"select":Xo(e,n),o=Qo(0,n),$a(vt,e),wl(r,"onChange");break;case"textarea":ts(e,n),o=es(e,n),$a(vt,e),wl(r,"onChange");break;default:o=n}switch(Ps(t,o,cl),function(e,t,n,r,i){for(var a in r)if(r.hasOwnProperty(a)){var o=r[a];if(a===ol)o&&Object.freeze(o),Cs(t,o,cl);else if(a===tl){var s=o?o[sl]:void 0;null!=s&&ps(t,s)}else a===al?"string"==typeof o?("textarea"!==e||""!==o)&&hs(t,o):"number"==typeof o&&hs(t,""+o):a===nl||a===rl||a===il||(x.hasOwnProperty(a)?null!=o&&("function"!=typeof o&&gl(a,o),wl(n,a)):null!=o&&pi(t,a,o,i))}}(t,e,r,o,a),t){case"input":vr(e),xi(e,n,!1);break;case"textarea":vr(e),rs(e);break;case"option":!function(e,t){null!=t.value&&e.setAttribute("value",t.value)}(e,n);break;case"select":!function(e,t){var n=e;n.multiple=!!t.multiple;var r=t.value;null!=r?Yo(n,!!t.multiple,r,!1):null!=t.defaultValue&&Yo(n,!!t.multiple,t.defaultValue,!0)}(e,n);break;default:"function"==typeof o.onClick&&_l(e)}}function kl(e,t,n,r,i){pl(t,r);var a=null,o=void 0,s=void 0;switch(t){case"input":o=Si(e,n),s=Si(e,r),a=[];break;case"option":o=Vo(0,n),s=Vo(0,r),a=[];break;case"select":o=Qo(0,n),s=Qo(0,r),a=[];break;case"textarea":o=es(e,n),s=es(e,r),a=[];break;default:s=r,"function"!=typeof(o=n).onClick&&"function"==typeof s.onClick&&_l(e)}Ps(t,s,cl);var l=void 0,c=void 0,u=null;for(l in o)if(!s.hasOwnProperty(l)&&o.hasOwnProperty(l)&&null!=o[l])if(l===ol){var d=o[l];for(c in d)d.hasOwnProperty(c)&&(u||(u={}),u[c]="")}else l===tl||l===al||l===nl||l===rl||l===il||(x.hasOwnProperty(l)?a||(a=[]):(a=a||[]).push(l,null));for(l in s){var p=s[l],h=null!=o?o[l]:void 0;if(s.hasOwnProperty(l)&&p!==h&&(null!=p||null!=h))if(l===ol)if(p&&Object.freeze(p),h){for(c in h)!h.hasOwnProperty(c)||p&&p.hasOwnProperty(c)||(u||(u={}),u[c]="");for(c in p)p.hasOwnProperty(c)&&h[c]!==p[c]&&(u||(u={}),u[c]=p[c])}else u||(a||(a=[]),a.push(l,u)),u=p;else if(l===tl){var f=p?p[sl]:void 0,m=h?h[sl]:void 0;null!=f&&m!==f&&(a=a||[]).push(l,""+f)}else l===al?h===p||"string"!=typeof p&&"number"!=typeof p||(a=a||[]).push(l,""+p):l===nl||l===rl||(x.hasOwnProperty(l)?(null!=p&&("function"!=typeof p&&gl(l,p),wl(i,l)),a||h===p||(a=[])):(a=a||[]).push(l,p))}return u&&(a=a||[]).push(ol,u),a}function xl(e,t,n,r,i){"input"===n&&"radio"===i.type&&null!=i.name&&Ci(e,i);Ns(n,r);switch(function(e,t,n,r){for(var i=0;i<t.length;i+=2){var a=t[i],o=t[i+1];a===ol?Cs(e,o,cl):a===tl?ps(e,o):a===al?hs(e,o):pi(e,a,o,r)}}(e,t,0,Ns(n,i)),n){case"input":ki(e,i);break;case"textarea":ns(e,i);break;case"select":!function(e,t){var n=e;n._wrapperState.initialValue=void 0;var r=n._wrapperState.wasMultiple;n._wrapperState.wasMultiple=!!t.multiple;var i=t.value;null!=i?Yo(n,!!t.multiple,i,!1):r!==!!t.multiple&&(null!=t.defaultValue?Yo(n,!!t.multiple,t.defaultValue,!0):Yo(n,!!t.multiple,t.multiple?[]:"",!1))}(e,i)}}function Pl(e,t,n,r,a){var o,s=void 0;switch(dl=!0===n[rl],o=Ns(t,n),pl(t,n),o&&!el&&e.shadyRoot&&(i(!1,"%s is using shady DOM. Using shady DOM with React can cause things to break subtly.",Xs()||"A component"),el=!0),t){case"iframe":case"object":$a(Et,e);break;case"video":case"audio":for(var l=0;l<cn.length;l++)$a(cn[l],e);break;case"source":$a(ht,e);break;case"img":case"image":case"link":$a(ht,e),$a(Et,e);break;case"form":$a(Vt,e),$a(Yt,e);break;case"details":$a(Zt,e);break;case"input":Ti(e,n),$a(vt,e),wl(a,"onChange");break;case"option":zo(0,n);break;case"select":Xo(e,n),$a(vt,e),wl(a,"onChange");break;case"textarea":ts(e,n),$a(vt,e),wl(a,"onChange")}Ps(t,n,cl),s=new Set;for(var c=e.attributes,u=0;u<c.length;u++){switch(c[u].name.toLowerCase()){case"data-reactroot":case"value":case"checked":case"selected":break;default:s.add(c[u].name)}}var d,p=null;for(var h in n)if(n.hasOwnProperty(h)){var f=n[h];if(h===al)"string"==typeof f?e.textContent!==f&&(dl||hl(e.textContent,f),p=[al,f]):"number"==typeof f&&e.textContent!==""+f&&(dl||hl(e.textContent,f),p=[al,""+f]);else if(x.hasOwnProperty(h))null!=f&&("function"!=typeof f&&gl(h,f),wl(a,h));else if("boolean"==typeof o){var m=void 0,g=ai(h);if(dl);else if(h===nl||h===rl||"value"===h||"checked"===h||"selected"===h);else if(h===tl){var v=f&&f[sl]||"",b=e.innerHTML,y=vl(e,v);y!==b&&fl(h,b,y)}else if(h===ol){s.delete(h);var w=Ts(f);w!==(m=e.getAttribute("style"))&&fl(h,m,w)}else if(o)s.delete(h.toLowerCase()),f!==(m=di(e,h,f))&&fl(h,m,f);else if(!ni(h,g,o)&&!ii(h,f,g,o)){var E=!1;if(null!==g)s.delete(g.attributeName),m=ui(e,h,f,g);else{var _=r;if(_===ll&&(_=ls(t)),_===ll)s.delete(h.toLowerCase());else{var S=(void 0,d=h.toLowerCase(),Ms.hasOwnProperty(d)&&Ms[d]||null);null!==S&&S!==h&&(E=!0,s.delete(S)),s.delete(h)}m=di(e,h,f)}f===m||E||fl(h,m,f)}}}switch(s.size>0&&!dl&&ml(s),t){case"input":vr(e),xi(e,n,!0);break;case"textarea":vr(e),rs(e);break;case"select":case"option":break;default:"function"==typeof n.onClick&&_l(e)}return p}function Nl(e,t){return e.nodeValue!==t}function Ml(e,t){hl(e.nodeValue,t)}function Dl(e,t){Zs||(Zs=!0,i(!1,"Did not expect server HTML to contain a <%s> in <%s>.",t.nodeName.toLowerCase(),e.nodeName.toLowerCase()))}function Al(e,t){Zs||(Zs=!0,i(!1,'Did not expect server HTML to contain the text node "%s" in <%s>.',t.nodeValue,e.nodeName.toLowerCase()))}function Ol(e,t,n){Zs||(Zs=!0,i(!1,"Expected server HTML to contain a matching <%s> in <%s>.",t,e.nodeName.toLowerCase()))}function Il(e,t){""!==t&&(Zs||(Zs=!0,i(!1,'Expected server HTML to contain a matching text node for "%s" in <%s>.',t,e.nodeName.toLowerCase())))}Qs=function(e){return("string"==typeof e?e:""+e).replace(bl,"\n").replace(yl,"")},hl=function(e,t){if(!Zs){var n=Qs(t),r=Qs(e);r!==n&&(Zs=!0,i(!1,'Text content did not match. Server: "%s" Client: "%s"',r,n))}},fl=function(e,t,n){if(!Zs){var r=Qs(n),a=Qs(t);a!==r&&(Zs=!0,i(!1,"Prop `%s` did not match. Server: %s Client: %s",e,JSON.stringify(a),JSON.stringify(r)))}},ml=function(e){if(!Zs){Zs=!0;var t=[];e.forEach(function(e){t.push(e)}),i(!1,"Extra attributes from the server: %s",t)}},gl=function(e,t){!1===t?i(!1,"Expected `%s` listener to be a function, instead got `false`.\n\nIf you used to conditionally omit it with %s={condition && value}, pass %s={condition ? value : undefined} instead.%s",e,e,e,Js()):i(!1,"Expected `%s` listener to be a function, instead got a value of `%s` type.%s",e,typeof t,Js())},vl=function(e,t){var n=e.namespaceURI===ll?e.ownerDocument.createElement(e.tagName):e.ownerDocument.createElementNS(e.namespaceURI,e.tagName);return n.innerHTML=t,n.innerHTML};var Rl,Ul=Object.freeze({createElement:Sl,createTextNode:Tl,setInitialProperties:Cl,diffProperties:kl,updateProperties:xl,diffHydratedProperties:Pl,diffHydratedText:Nl,warnForUnmatchedText:Ml,warnForDeletedHydratableElement:Dl,warnForDeletedHydratableText:Al,warnForInsertedHydratedElement:Ol,warnForInsertedHydratedText:Il,restoreControlledState:function(e,t,n){switch(t){case"input":return void Pi(e,n);case"textarea":return void function(e,t){ns(e,t)}(e,n);case"select":return void function(e,t){var n=e,r=t.value;null!=r&&Yo(n,!!t.multiple,r,!1)}(e,n)}}}),Fl=Br.getCurrentFiberStackAddendum,Ll=["address","applet","area","article","aside","base","basefont","bgsound","blockquote","body","br","button","caption","center","col","colgroup","dd","details","dir","div","dl","dt","embed","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","iframe","img","input","isindex","li","link","listing","main","marquee","menu","menuitem","meta","nav","noembed","noframes","noscript","object","ol","p","param","plaintext","pre","script","section","select","source","style","summary","table","tbody","td","template","textarea","tfoot","th","thead","title","tr","track","ul","wbr","xmp"],jl=["applet","caption","html","table","td","th","marquee","object","template","foreignObject","desc","title"],Wl=jl.concat(["button"]),Bl=["dd","dt","li","option","optgroup","p","rp","rt"],zl={current:null,formTag:null,aTagInScope:null,buttonTagInScope:null,nobrTagInScope:null,pTagInButtonScope:null,listItemTagAutoclosing:null,dlItemTagAutoclosing:null},Vl={};(Rl=function(e,t,n){var r=(n=n||zl).current,a=r&&r.tag;null!=t&&(null!=e&&i(!1,"validateDOMNesting: when childText is passed, childTag should be null"),e="#text");var o=function(e,t){switch(t){case"select":return"option"===e||"optgroup"===e||"#text"===e;case"optgroup":return"option"===e||"#text"===e;case"option":return"#text"===e;case"tr":return"th"===e||"td"===e||"style"===e||"script"===e||"template"===e;case"tbody":case"thead":case"tfoot":return"tr"===e||"style"===e||"script"===e||"template"===e;case"colgroup":return"col"===e||"template"===e;case"table":return"caption"===e||"colgroup"===e||"tbody"===e||"tfoot"===e||"thead"===e||"style"===e||"script"===e||"template"===e;case"head":return"base"===e||"basefont"===e||"bgsound"===e||"link"===e||"meta"===e||"title"===e||"noscript"===e||"noframes"===e||"style"===e||"script"===e||"template"===e;case"html":return"head"===e||"body"===e;case"#document":return"html"===e}switch(e){case"h1":case"h2":case"h3":case"h4":case"h5":case"h6":return"h1"!==t&&"h2"!==t&&"h3"!==t&&"h4"!==t&&"h5"!==t&&"h6"!==t;case"rp":case"rt":return-1===Bl.indexOf(t);case"body":case"caption":case"col":case"colgroup":case"frame":case"head":case"html":case"tbody":case"td":case"tfoot":case"th":case"thead":case"tr":return null==t}return!0}(e,a)?null:r,s=o?null:function(e,t){switch(e){case"address":case"article":case"aside":case"blockquote":case"center":case"details":case"dialog":case"dir":case"div":case"dl":case"fieldset":case"figcaption":case"figure":case"footer":case"header":case"hgroup":case"main":case"menu":case"nav":case"ol":case"p":case"section":case"summary":case"ul":case"pre":case"listing":case"table":case"hr":case"xmp":case"h1":case"h2":case"h3":case"h4":case"h5":case"h6":return t.pTagInButtonScope;case"form":return t.formTag||t.pTagInButtonScope;case"li":return t.listItemTagAutoclosing;case"dd":case"dt":return t.dlItemTagAutoclosing;case"button":return t.buttonTagInScope;case"a":return t.aTagInScope;case"nobr":return t.nobrTagInScope}return null}(e,n),l=o||s;if(l){var c=l.tag,u=Fl(),d=!!o+"|"+e+"|"+c+"|"+u;if(!Vl[d]){Vl[d]=!0;var p=e,h="";if("#text"===e?/\S/.test(t)?p="Text nodes":(p="Whitespace text nodes",h=" Make sure you don't have any extra whitespace between tags on each line of your source code."):p="<"+e+">",o){var f="";"table"===c&&"tr"===e&&(f+=" Add a <tbody> to your code to match the DOM tree generated by the browser."),i(!1,"validateDOMNesting(...): %s cannot appear as a child of <%s>.%s%s%s",p,c,h,f,u)}else i(!1,"validateDOMNesting(...): %s cannot appear as a descendant of <%s>.%s",p,c,u)}}}).updatedAncestorInfo=function(e,t,n){var r=o({},e||zl),i={tag:t,instance:n};return-1!==jl.indexOf(t)&&(r.aTagInScope=null,r.buttonTagInScope=null,r.nobrTagInScope=null),-1!==Wl.indexOf(t)&&(r.pTagInButtonScope=null),-1!==Ll.indexOf(t)&&"address"!==t&&"div"!==t&&"p"!==t&&(r.listItemTagAutoclosing=null,r.dlItemTagAutoclosing=null),r.current=i,"form"===t&&(r.formTag=i),"a"===t&&(r.aTagInScope=i),"button"===t&&(r.buttonTagInScope=i),"nobr"===t&&(r.nobrTagInScope=i),"p"===t&&(r.pTagInButtonScope=i),"li"===t&&(r.listItemTagAutoclosing=i),"dd"!==t&&"dt"!==t||(r.dlItemTagAutoclosing=i),r};var ql=Rl;function Hl(){n(!1,"The current renderer does not support persistence. This error is likely caused by a bug in React. Please file an issue.")}var Kl=!1,Gl=Hl,$l=Hl,Yl=Hl,Ql=Hl,Xl=Hl,Jl=Sl,Zl=Tl,ec=Cl,tc=kl,nc=xl,rc=Pl,ic=Nl,ac=Ml,oc=Dl,sc=Al,lc=Ol,cc=Il,uc=ql.updatedAncestorInfo,dc=he,pc=be,hc=void 0;hc="suppressHydrationWarning";var fc=null,mc=null;function gc(e,t){switch(e){case"button":case"input":case"select":case"textarea":return!!t.autoFocus}return!1}function vc(e){return e}function bc(e,t,n,r,i){return ec(e,t,n,r),gc(t,n)}function yc(e,t){return"textarea"===e||"string"==typeof t.children||"number"==typeof t.children||"object"==typeof t.dangerouslySetInnerHTML&&null!==t.dangerouslySetInnerHTML&&"string"==typeof t.dangerouslySetInnerHTML.__html}function wc(e,t){return!!t.hidden}function Ec(e,t,n,r){ql(null,e,n.ancestorInfo);var i=Zl(e,t);return dc(r,i),i}var _c=So,Sc=!0,Tc=Co,Cc=ko,kc=!0;function xc(e){hs(e,"")}function Pc(e,t){e.appendChild(t)}function Nc(e,t){e.nodeType===ur?e.parentNode.insertBefore(t,e):e.appendChild(t)}function Mc(e,t,n){e.insertBefore(t,n)}function Dc(e,t){e.removeChild(t)}var Ac=!0;function Oc(e){for(var t=e.nextSibling;t&&t.nodeType!==lr&&t.nodeType!==cr;)t=t.nextSibling;return t}function Ic(e){for(var t=e.firstChild;t&&t.nodeType!==lr&&t.nodeType!==cr;)t=t.nextSibling;return t}var Rc=!0,Uc=!1,Fc=!1,Lc=!1,jc=!0,Wc=!0,Bc=!1,zc=!1,Vc=!0,qc="undefined"!=typeof performance&&"function"==typeof performance.mark&&"function"==typeof performance.clearMarks&&"function"==typeof performance.measure&&"function"==typeof performance.clearMeasures,Hc=null,Kc=null,Gc=null,$c=!1,Yc=!1,Qc=!1,Xc=0,Jc=0,Zc=!1,eu=new Set,tu=function(e){return"⚛ "+e},nu=function(e){performance.mark(tu(e))},ru=function(e,t,n){var r=tu(t),i=function(e,t){return(t?"⛔ ":"⚛ ")+e+(t?" Warning: "+t:"")}(e,n);try{performance.measure(i,r)}catch(e){}performance.clearMarks(r),performance.clearMeasures(i)},iu=function(e,t){return e+" (#"+t+")"},au=function(e,t,n){return null===n?e+" ["+(t?"update":"mount")+"]":e+"."+n},ou=function(e,t){var n=Fr(e)||"Unknown",r=e._debugID,i=null!==e.alternate,a=au(n,i,t);if($c&&eu.has(a))return!1;eu.add(a);var o=iu(a,r);return nu(o),!0},su=function(e,t){var n=Fr(e)||"Unknown",r=e._debugID,i=null!==e.alternate,a=au(n,i,t);!function(e){performance.clearMarks(tu(e))}(iu(a,r))},lu=function(e,t,n){var r=Fr(e)||"Unknown",i=e._debugID,a=null!==e.alternate,o=au(r,a,t),s=iu(o,i);ru(o,s,n)},cu=function(e){switch(e.tag){case Z:case te:case ne:case ee:case re:case oe:case ae:case ie:return!0;default:return!1}},uu=function(){null!==Kc&&null!==Gc&&su(Gc,Kc),Gc=null,Kc=null,Qc=!1},du=function(){for(var e=Hc;e;)e._debugIsCurrentlyTiming&&lu(e,null,null),e=e.return},pu=function(e){null!==e.return&&pu(e.return),e._debugIsCurrentlyTiming&&ou(e,null)},hu=function(){null!==Hc&&pu(Hc)};function fu(){Rc&&Jc++}function mu(e){if(Rc){if(!qc||cu(e))return;e._debugIsCurrentlyTiming=!1,su(e,null)}}function gu(e){if(Rc){if(!qc||cu(e))return;if(Hc=e.return,!e._debugIsCurrentlyTiming)return;e._debugIsCurrentlyTiming=!1,lu(e,null,null)}}function vu(e){if(Rc){if(!qc||cu(e))return;if(Hc=e.return,!e._debugIsCurrentlyTiming)return;e._debugIsCurrentlyTiming=!1;lu(e,null,"An error was thrown inside this error boundary")}}function bu(e,t){if(Rc){if(!qc)return;if(uu(),!ou(e,t))return;Gc=e,Kc=t}}function yu(){if(Rc){if(!qc)return;if(null!==Kc&&null!==Gc)lu(Gc,Kc,Qc?"Scheduled a cascading update":null);Kc=null,Gc=null}}function wu(e,t){if(Rc){if(!qc)return;var n=null;if(null!==e)if(e.tag===Z)n="A top-level update interrupted the previous render";else n="An update to "+(Fr(e)||"Unknown")+" interrupted the previous render";else Xc>1&&(n="There were cascading updates");Xc=0;var r=t?"(React Tree Reconciliation: Completed Root)":"(React Tree Reconciliation: Yielded)";du(),ru(r,"(React Tree Reconciliation)",n)}}var Eu=[],_u=void 0;_u=[];var Su=-1;function Tu(e){return{current:e}}function Cu(e,t){Su<0?i(!1,"Unexpected pop."):(t!==_u[Su]&&i(!1,"Unexpected Fiber popped."),e.current=Eu[Su],Eu[Su]=null,_u[Su]=null,Su--)}function ku(e,t,n){Eu[++Su]=e.current,_u[Su]=n,e.current=t}var xu=void 0;xu={};var Pu=Tu(p),Nu=Tu(!1),Mu=p;function Du(e){return Ru(e)?Mu:Pu.current}function Au(e,t,n){var r=e.stateNode;r.__reactInternalMemoizedUnmaskedChildContext=t,r.__reactInternalMemoizedMaskedChildContext=n}function Ou(e,t){var n=e.type.contextTypes;if(!n)return p;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var i={};for(var a in n)i[a]=t[a];var o=Fr(e)||"Unknown";return l(n,i,"context",o,Br.getCurrentFiberStackAddendum),r&&Au(e,t,i),i}function Iu(){return Nu.current}function Ru(e){return e.tag===J&&null!=e.type.childContextTypes}function Uu(e){Ru(e)&&(Cu(Nu,e),Cu(Pu,e))}function Fu(e){Cu(Nu,e),Cu(Pu,e)}function Lu(e,t,r){Pu.current!==p&&n(!1,"Unexpected context found on stack. This error is likely caused by a bug in React. Please file an issue."),ku(Pu,t,e),ku(Nu,r,e)}function ju(e,t){var r=e.stateNode,a=e.type.childContextTypes;if("function"!=typeof r.getChildContext){var s=Fr(e)||"Unknown";return xu[s]||(xu[s]=!0,i(!1,"%s.childContextTypes is specified but there is no getChildContext() method on the instance. You can either define getChildContext() on %s or remove childContextTypes from it.",s,s)),t}var c;for(var u in Br.setCurrentPhase("getChildContext"),bu(e,"getChildContext"),c=r.getChildContext(),yu(),Br.setCurrentPhase(null),c)u in a||n(!1,'%s.getChildContext(): key "%s" is not defined in childContextTypes.',Fr(e)||"Unknown",u);var d=Fr(e)||"Unknown";return l(a,c,"child context",d,Br.getCurrentFiberStackAddendum),o({},t,c)}function Wu(e){if(!Ru(e))return!1;var t=e.stateNode,n=t&&t.__reactInternalMemoizedMergedChildContext||p;return Mu=Pu.current,ku(Pu,n,e),ku(Nu,Nu.current,e),!0}function Bu(e,t){var r=e.stateNode;if(r||n(!1,"Expected to have an instance by this point. This error is likely caused by a bug in React. Please file an issue."),t){var i=ju(e,Mu);r.__reactInternalMemoizedMergedChildContext=i,Cu(Nu,e),Cu(Pu,e),ku(Pu,i,e),ku(Nu,t,e)}else Cu(Nu,e),ku(Nu,t,e)}var zu=1073741823,Vu=0,qu=1,Hu=zu,Ku=10,Gu=2;function $u(e){return(e/Ku|0)+Gu}function Yu(e){return(e-Gu)*Ku}function Qu(e,t,n){return Gu+(1+((e-Gu+t/Ku)/(r=n/Ku)|0))*r;var r}var Xu=0,Ju=1,Zu=2,ed=4,td=void 0;td=!1;try{var nd=Object.preventExtensions({}),rd=new Map([[nd,null]]),id=new Set([nd]);rd.set(0,0),id.add(0)}catch(e){td=!0}var ad=void 0;ad=1;var od=function(e,t,n,r){return new function(e,t,n,r){this.tag=e,this.key=n,this.type=null,this.stateNode=null,this.return=null,this.child=null,this.sibling=null,this.index=0,this.ref=null,this.pendingProps=t,this.memoizedProps=null,this.updateQueue=null,this.memoizedState=null,this.mode=r,this.effectTag=ta,this.nextEffect=null,this.firstEffect=null,this.lastEffect=null,this.expirationTime=Vu,this.alternate=null,Vc&&(this.actualDuration=0,this.actualStartTime=0,this.selfBaseTime=0,this.treeBaseTime=0),this._debugID=ad++,this._debugSource=null,this._debugOwner=null,this._debugIsCurrentlyTiming=!1,td||"function"!=typeof Object.preventExtensions||Object.preventExtensions(this)}(e,t,n,r)};function sd(e,t,n){var r=e.alternate;return null===r?((r=od(e.tag,t,e.key,e.mode)).type=e.type,r.stateNode=e.stateNode,r._debugID=e._debugID,r._debugSource=e._debugSource,r._debugOwner=e._debugOwner,r.alternate=e,e.alternate=r):(r.pendingProps=t,r.effectTag=ta,r.nextEffect=null,r.firstEffect=null,r.lastEffect=null,Vc&&(r.actualDuration=0,r.actualStartTime=0)),r.expirationTime=n,r.child=e.child,r.memoizedProps=e.memoizedProps,r.memoizedState=e.memoizedState,r.updateQueue=e.updateQueue,r.sibling=e.sibling,r.index=e.index,r.ref=e.ref,Vc&&(r.selfBaseTime=e.selfBaseTime,r.treeBaseTime=e.treeBaseTime),r}function ld(e,t,r){var i;i=e._owner;var a,o=void 0,s=e.type,l=e.key,c=e.props,u=void 0;if("function"==typeof s)u=(a=s).prototype&&a.prototype.isReactComponent?J:Q;else if("string"==typeof s)u=te;else switch(s){case kr:return cd(c.children,t,r,l);case Dr:u=ie,t|=Ju|Zu;break;case xr:u=ie,t|=Zu;break;case Pr:return function(e,t,r,i){"string"==typeof e.id&&"function"==typeof e.onRender||n(!1,'Profiler must specify an "id" string and "onRender" function as props');var a=od(le,e,i,t|ed);return a.type=Pr,a.expirationTime=r,a}(c,t,r,l);case Or:u=ce,t|=Zu;break;default:u=function(e,t){switch("object"==typeof e&&null!==e?e.$$typeof:null){case Nr:return oe;case Mr:return ae;case Ar:return se;default:var r="";(void 0===e||"object"==typeof e&&null!==e&&0===Object.keys(e).length)&&(r+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var i=t?Fr(t):null;i&&(r+="\n\nCheck the render method of `"+i+"`."),n(!1,"Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",null==e?e:typeof e,r)}}(s,i)}return(o=od(u,c,l,t)).type=s,o.expirationTime=r,o._debugSource=e._source,o._debugOwner=e._owner,o}function cd(e,t,n,r){var i=od(re,e,r,t);return i.expirationTime=n,i}function ud(e,t,n){var r=od(ne,e,null,t);return r.expirationTime=n,r}function dd(e,t,n){var r=null!==e.children?e.children:[],i=od(ee,r,e.key,t);return i.expirationTime=n,i.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},i}function pd(e,t){return null===e&&(e=od(Q,null,null,Xu)),e.tag=t.tag,e.key=t.key,e.type=t.type,e.stateNode=t.stateNode,e.return=t.return,e.child=t.child,e.sibling=t.sibling,e.index=t.index,e.ref=t.ref,e.pendingProps=t.pendingProps,e.memoizedProps=t.memoizedProps,e.updateQueue=t.updateQueue,e.memoizedState=t.memoizedState,e.mode=t.mode,e.effectTag=t.effectTag,e.nextEffect=t.nextEffect,e.firstEffect=t.firstEffect,e.lastEffect=t.lastEffect,e.expirationTime=t.expirationTime,e.alternate=t.alternate,Vc&&(e.actualDuration=t.actualDuration,e.actualStartTime=t.actualStartTime,e.selfBaseTime=t.selfBaseTime,e.treeBaseTime=t.treeBaseTime),e._debugID=t._debugID,e._debugSource=t._debugSource,e._debugOwner=t._debugOwner,e._debugIsCurrentlyTiming=t._debugIsCurrentlyTiming,e}function hd(e,t,n){var r=function(e){return od(Z,null,null,e?Ju|Zu:Xu)}(t),i={current:r,containerInfo:e,pendingChildren:null,earliestPendingTime:Vu,latestPendingTime:Vu,earliestSuspendedTime:Vu,latestSuspendedTime:Vu,latestPingedTime:Vu,pendingCommitExpirationTime:Vu,finishedWork:null,context:null,pendingContext:null,hydrate:n,remainingExpirationTime:Vu,firstBatch:null,nextScheduledRoot:null};return r.stateNode=i,i}var fd=null,md=null,gd=!1;function vd(e){return function(t){try{return e(t)}catch(e){gd||(gd=!0,i(!1,"React DevTools encountered an error: %s",e))}}}function bd(e){"function"==typeof fd&&fd(e)}function yd(e){"function"==typeof md&&md(e)}var wd=function(e,t){if(void 0===t)throw new Error("`warning(condition, format, ...args)` requires a warning message argument");if(!e){for(var n=arguments.length,r=Array(n>2?n-2:0),i=2;i<n;i++)r[i-2]=arguments[i];(function(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];var i=0,a="Warning: "+e.replace(/%s/g,function(){return n[i++]});"undefined"!=typeof console&&console.warn(a);try{throw new Error(a)}catch(e){}}).apply(void 0,[t].concat(r))}},Ed={discardPendingWarnings:function(){},flushPendingDeprecationWarnings:function(){},flushPendingUnsafeLifecycleWarnings:function(){},recordDeprecationWarnings:function(e,t){},recordUnsafeLifecycleWarnings:function(e,t){},recordLegacyContextWarning:function(e,t){},flushLegacyContextWarning:function(){}},_d={UNSAFE_componentWillMount:"componentDidMount",UNSAFE_componentWillReceiveProps:"static getDerivedStateFromProps",UNSAFE_componentWillUpdate:"componentDidUpdate"},Sd=[],Td=[],Cd=[],kd=new Map,xd=new Map,Pd=new Set,Nd=new Set,Md=new Set,Dd=function(e){var t=[];return e.forEach(function(e){t.push(e)}),t.sort().join(", ")};Ed.discardPendingWarnings=function(){Sd=[],Td=[],Cd=[],kd=new Map,xd=new Map},Ed.flushPendingUnsafeLifecycleWarnings=function(){kd.forEach(function(e,t){var n=[];if(Object.keys(e).forEach(function(t){var r=e[t];if(r.length>0){var i=new Set;r.forEach(function(e){i.add(Fr(e)||"Component"),Nd.add(e.type)});var a=t.replace("UNSAFE_",""),o=_d[t],s=Dd(i);n.push(a+": Please update the following components to use "+o+" instead: "+s)}}),n.length>0){var r=jr(t);i(!1,"Unsafe lifecycle methods were found within a strict-mode tree:%s\n\n%s\n\nLearn more about this warning here:\nhttps://fb.me/react-strict-mode-warnings",r,n.join("\n\n"))}}),kd=new Map};var Ad=function(e){for(var t=null,n=e;null!==n;)n.mode&Zu&&(t=n),n=n.return;return t};Ed.flushPendingDeprecationWarnings=function(){if(Sd.length>0){var e=new Set;Sd.forEach(function(t){e.add(Fr(t)||"Component"),Pd.add(t.type)});var t=Dd(e);wd(!1,"componentWillMount is deprecated and will be removed in the next major version. Use componentDidMount instead. As a temporary workaround, you can rename to UNSAFE_componentWillMount.\n\nPlease update the following components: %s\n\nLearn more about this warning here:\nhttps://fb.me/react-async-component-lifecycle-hooks",t),Sd=[]}if(Td.length>0){var n=new Set;Td.forEach(function(e){n.add(Fr(e)||"Component"),Pd.add(e.type)});var r=Dd(n);wd(!1,"componentWillReceiveProps is deprecated and will be removed in the next major version. Use static getDerivedStateFromProps instead.\n\nPlease update the following components: %s\n\nLearn more about this warning here:\nhttps://fb.me/react-async-component-lifecycle-hooks",r),Td=[]}if(Cd.length>0){var i=new Set;Cd.forEach(function(e){i.add(Fr(e)||"Component"),Pd.add(e.type)});var a=Dd(i);wd(!1,"componentWillUpdate is deprecated and will be removed in the next major version. Use componentDidUpdate instead. As a temporary workaround, you can rename to UNSAFE_componentWillUpdate.\n\nPlease update the following components: %s\n\nLearn more about this warning here:\nhttps://fb.me/react-async-component-lifecycle-hooks",a),Cd=[]}},Ed.recordDeprecationWarnings=function(e,t){Pd.has(e.type)||("function"==typeof t.componentWillMount&&!0!==t.componentWillMount.__suppressDeprecationWarning&&Sd.push(e),"function"==typeof t.componentWillReceiveProps&&!0!==t.componentWillReceiveProps.__suppressDeprecationWarning&&Td.push(e),"function"==typeof t.componentWillUpdate&&!0!==t.componentWillUpdate.__suppressDeprecationWarning&&Cd.push(e))},Ed.recordUnsafeLifecycleWarnings=function(e,t){var n=Ad(e);if(null!==n){if(!Nd.has(e.type)){var r=void 0;kd.has(n)?r=kd.get(n):(r={UNSAFE_componentWillMount:[],UNSAFE_componentWillReceiveProps:[],UNSAFE_componentWillUpdate:[]},kd.set(n,r));var a=[];("function"==typeof t.componentWillMount&&!0!==t.componentWillMount.__suppressDeprecationWarning||"function"==typeof t.UNSAFE_componentWillMount)&&a.push("UNSAFE_componentWillMount"),("function"==typeof t.componentWillReceiveProps&&!0!==t.componentWillReceiveProps.__suppressDeprecationWarning||"function"==typeof t.UNSAFE_componentWillReceiveProps)&&a.push("UNSAFE_componentWillReceiveProps"),("function"==typeof t.componentWillUpdate&&!0!==t.componentWillUpdate.__suppressDeprecationWarning||"function"==typeof t.UNSAFE_componentWillUpdate)&&a.push("UNSAFE_componentWillUpdate"),a.length>0&&a.forEach(function(t){r[t].push(e)})}}else i(!1,"Expected to find a StrictMode component in a strict mode tree. This error is likely caused by a bug in React. Please file an issue.")},Ed.recordLegacyContextWarning=function(e,t){var n=Ad(e);if(null!==n){if(!Md.has(e.type)){var r=xd.get(n);(null!=e.type.contextTypes||null!=e.type.childContextTypes||null!==t&&"function"==typeof t.getChildContext)&&(void 0===r&&(r=[],xd.set(n,r)),r.push(e))}}else i(!1,"Expected to find a StrictMode component in a strict mode tree. This error is likely caused by a bug in React. Please file an issue.")},Ed.flushLegacyContextWarning=function(){xd.forEach(function(e,t){var n=new Set;e.forEach(function(e){n.add(Fr(e)||"Component"),Md.add(e.type)});var r=Dd(n),a=jr(t);i(!1,"Legacy context API has been detected within a strict-mode tree: %s\n\nPlease update the following components: %s\n\nLearn more about this warning here:\nhttps://fb.me/react-strict-mode-warnings",a,r)})};var Od={debugTool:null};function Id(e,t){if(Fc){var n=e.earliestPendingTime;if(n===Vu)e.earliestPendingTime=e.latestPendingTime=t;else if(n>t)e.earliestPendingTime=t;else e.latestPendingTime<t&&(e.latestPendingTime=t)}}function Rd(e){if(Fc){var t=e.earliestSuspendedTime,n=e.earliestPendingTime;return t===Vu?n:n!==Vu?n:e.latestPingedTime}return e.current.expirationTime}var Ud=0,Fd=1,Ld=2,jd=3,Wd=!1,Bd=void 0,zd=void 0,Vd=void 0;function qd(e){return{expirationTime:Vu,baseState:e,firstUpdate:null,lastUpdate:null,firstCapturedUpdate:null,lastCapturedUpdate:null,firstEffect:null,lastEffect:null,firstCapturedEffect:null,lastCapturedEffect:null}}function Hd(e){return{expirationTime:e.expirationTime,baseState:e.baseState,firstUpdate:e.firstUpdate,lastUpdate:e.lastUpdate,firstCapturedUpdate:null,lastCapturedUpdate:null,firstEffect:null,lastEffect:null,firstCapturedEffect:null,lastCapturedEffect:null}}function Kd(e){return{expirationTime:e,tag:Ud,payload:null,callback:null,next:null,nextEffect:null}}function Gd(e,t,n){null===e.lastUpdate?e.firstUpdate=e.lastUpdate=t:(e.lastUpdate.next=t,e.lastUpdate=t),(e.expirationTime===Vu||e.expirationTime>n)&&(e.expirationTime=n)}function $d(e,t,n){var r=e.alternate,a=void 0,o=void 0;null===r?(o=null,null===(a=e.updateQueue)&&(a=e.updateQueue=qd(e.memoizedState))):(a=e.updateQueue,o=r.updateQueue,null===a?null===o?(a=e.updateQueue=qd(e.memoizedState),o=r.updateQueue=qd(r.memoizedState)):a=e.updateQueue=Hd(o):null===o&&(o=r.updateQueue=Hd(a))),null===o||a===o?Gd(a,t,n):null===a.lastUpdate||null===o.lastUpdate?(Gd(a,t,n),Gd(o,t,n)):(Gd(a,t,n),o.lastUpdate=t),e.tag!==J||zd!==a&&(null===o||zd!==o)||Bd||(i(!1,"An update (setState, replaceState, or forceUpdate) was scheduled from inside an update function. Update functions should be pure, with zero side-effects. Consider using componentDidUpdate or a callback."),Bd=!0)}function Yd(e,t,n){var r=e.updateQueue;null===(r=null===r?e.updateQueue=qd(e.memoizedState):Qd(e,r)).lastCapturedUpdate?r.firstCapturedUpdate=r.lastCapturedUpdate=t:(r.lastCapturedUpdate.next=t,r.lastCapturedUpdate=t),(r.expirationTime===Vu||r.expirationTime>n)&&(r.expirationTime=n)}function Qd(e,t){var n=e.alternate;return null!==n&&t===n.updateQueue&&(t=e.updateQueue=Hd(t)),t}function Xd(e,t,n,r,i,a){switch(n.tag){case Fd:var s=n.payload;return"function"==typeof s?((Lc||jc&&e.mode&Zu)&&s.call(a,r,i),s.call(a,r,i)):s;case jd:e.effectTag=e.effectTag&~fa|ca;case Ud:var l=n.payload,c=void 0;return"function"==typeof l?((Lc||jc&&e.mode&Zu)&&l.call(a,r,i),c=l.call(a,r,i)):c=l,null===c||void 0===c?r:o({},r,c);case Ld:return Wd=!0,r}return r}function Jd(e,t,n,r,i){if(Wd=!1,!(t.expirationTime===Vu||t.expirationTime>i)){t=Qd(e,t),zd=t;for(var a=t.baseState,o=null,s=Vu,l=t.firstUpdate,c=a;null!==l;){var u=l.expirationTime;if(u>i)null===o&&(o=l,a=c),(s===Vu||s>u)&&(s=u);else c=Xd(e,0,l,c,n,r),null!==l.callback&&(e.effectTag|=la,l.nextEffect=null,null===t.lastEffect?t.firstEffect=t.lastEffect=l:(t.lastEffect.nextEffect=l,t.lastEffect=l));l=l.next}var d=null;for(l=t.firstCapturedUpdate;null!==l;){var p=l.expirationTime;if(p>i)null===d&&(d=l,null===o&&(a=c)),(s===Vu||s>p)&&(s=p);else c=Xd(e,0,l,c,n,r),null!==l.callback&&(e.effectTag|=la,l.nextEffect=null,null===t.lastCapturedEffect?t.firstCapturedEffect=t.lastCapturedEffect=l:(t.lastCapturedEffect.nextEffect=l,t.lastCapturedEffect=l));l=l.next}null===o&&(t.lastUpdate=null),null===d?t.lastCapturedUpdate=null:e.effectTag|=la,null===o&&null===d&&(a=c),t.baseState=a,t.firstUpdate=o,t.firstCapturedUpdate=d,t.expirationTime=s,e.memoizedState=c,zd=null}}function Zd(e,t){"function"!=typeof e&&n(!1,"Invalid argument passed as callback. Expected a function. Instead received: %s",e),e.call(t)}function ep(){Wd=!1}function tp(){return Wd}function np(e,t,n,r){null!==t.firstCapturedUpdate&&(null!==t.lastUpdate&&(t.lastUpdate.next=t.firstCapturedUpdate,t.lastUpdate=t.lastCapturedUpdate),t.firstCapturedUpdate=t.lastCapturedUpdate=null);var i=t.firstEffect;for(t.firstEffect=t.lastEffect=null;null!==i;){var a=i.callback;null!==a&&(i.callback=null,Zd(a,n)),i=i.nextEffect}for(i=t.firstCapturedEffect,t.firstCapturedEffect=t.lastCapturedEffect=null;null!==i;){var o=i.callback;null!==o&&(i.callback=null,Zd(o,n)),i=i.nextEffect}}function rp(e,t){return{value:e,source:t,stack:jr(t)}}Bd=!1,zd=null,Vd=function(){zd=null};var ip=Tu(null),ap=Tu(null),op=Tu(0),sp=void 0;function lp(e){var t=e.type._context;Sc?(ku(op,t._changedBits,e),ku(ap,t._currentValue,e),ku(ip,e,e),t._currentValue=e.pendingProps.value,t._changedBits=e.stateNode,void 0!==t._currentRenderer&&null!==t._currentRenderer&&t._currentRenderer!==sp&&i(!1,"Detected multiple renderers concurrently rendering the same context provider. This is currently unsupported."),t._currentRenderer=sp):(ku(op,t._changedBits2,e),ku(ap,t._currentValue2,e),ku(ip,e,e),t._currentValue2=e.pendingProps.value,t._changedBits2=e.stateNode,void 0!==t._currentRenderer2&&null!==t._currentRenderer2&&t._currentRenderer2!==sp&&i(!1,"Detected multiple renderers concurrently rendering the same context provider. This is currently unsupported."),t._currentRenderer2=sp)}function cp(e){var t=op.current,n=ap.current;Cu(ip,e),Cu(ap,e),Cu(op,e);var r=e.type._context;Sc?(r._currentValue=n,r._changedBits=t):(r._currentValue2=n,r._changedBits2=t)}sp={};var up={},dp=Tu(up),pp=Tu(up),hp=Tu(up);function fp(e){return e===up&&n(!1,"Expected host context to exist. This error is likely caused by a bug in React. Please file an issue."),e}function mp(){return fp(hp.current)}function gp(e,t){ku(hp,t,e),ku(pp,e,e),ku(dp,up,e);var n=function(e){var t=void 0,n=void 0,r=e.nodeType;switch(r){case dr:case pr:t=r===dr?"#document":"#fragment";var i=e.documentElement;n=i?i.namespaceURI:cs(null,"");break;default:var a=r===ur?e.parentNode:e;n=cs(a.namespaceURI||null,t=a.tagName)}var o=t.toLowerCase();return{namespace:n,ancestorInfo:uc(null,o,null)}}(t);Cu(dp,e),ku(dp,n,e)}function vp(e){Cu(dp,e),Cu(pp,e),Cu(hp,e)}function bp(){return fp(dp.current)}function yp(e){fp(hp.current);var t,n,r,i=fp(dp.current),a=(t=i,n=e.type,{namespace:cs((r=t).namespace,n),ancestorInfo:uc(r.ancestorInfo,n,null)});i!==a&&(ku(pp,e,e),ku(dp,a,e))}function wp(e){pp.current===e&&(Cu(dp,e),Cu(pp,e))}var Ep=0;var _p=void 0;_p=[];var Sp=0,Tp=0;function Cp(){Vc&&0===Sp&&(Sp=_c())}function kp(e){Vc&&(e!==_p.pop()&&i(!1,"Unexpected Fiber (%s) popped.",Fr(e)),e.actualDuration=_c()-Tp-e.actualDuration)}function xp(){Vc&&Sp>0&&(Tp+=_c()-Sp,Sp=0)}var Pp=-1;function Np(){Vc&&(Pp=-1)}var Mp,Dp={},Ap=Array.isArray,Op=void 0,Ip=void 0,Rp=void 0,Up=void 0,Fp=void 0,Lp=void 0;Op=new Set,Ip=new Set,Rp=new Set,Up=new Set,Fp=new Set;var jp=new Set;function Wp(e,t,n){var r=e.memoizedState;(Lc||jc&&e.mode&Zu)&&t(n,r);var i=t(n,r);Lp(e,i);var a=null===i||void 0===i?r:o({},r,i);e.memoizedState=a;var s=e.updateQueue;null!==s&&s.expirationTime===Vu&&(s.baseState=a)}Mp=function(e,t){if(null!==e&&"function"!=typeof e){var n=t+"_"+e;jp.has(n)||(jp.add(n),i(!1,"%s(...): Expected the last optional `callback` argument to be a function. Instead received: %s.",t,e))}},Lp=function(e,t){if(void 0===t){var n=Fr(e)||"Component";Fp.has(n)||(Fp.add(n),i(!1,"%s.getDerivedStateFromProps(): A valid state object (or null) must be returned. You have returned undefined.",n))}},Object.defineProperty(Dp,"_processChildContext",{enumerable:!1,value:function(){n(!1,"_processChildContext is not available in React 16+. This likely means you have multiple copies of React and are attempting to nest a React 15 tree inside a React 16 tree using unstable_renderSubtreeIntoContainer, which isn't supported. Try to make sure you have only one copy of React (and ideally, switch to ReactDOM.createPortal).")}}),Object.freeze(Dp);var Bp={isMounted:function(e){var t=wr.current;if(null!==t&&t.tag===J){var n=t,r=n.stateNode;r._warnedAboutRefsInRender||i(!1,"%s is accessing isMounted inside its render() function. render() should be a pure function of props and state. It should never access something that requires stale data from the previous render, such as refs. Move this logic to componentDidMount and componentDidUpdate instead.",Fr(n)||"A component"),r._warnedAboutRefsInRender=!0}var a=ea(e);return!!a&&ba(a)===ga},enqueueSetState:function(e,t,n){var r=ea(e),i=nm(am(),r),a=Kd(i);a.payload=t,void 0!==n&&null!==n&&(Mp(n,"setState"),a.callback=n),$d(r,a,i),im(r,i)},enqueueReplaceState:function(e,t,n){var r=ea(e),i=nm(am(),r),a=Kd(i);a.tag=Fd,a.payload=t,void 0!==n&&null!==n&&(Mp(n,"replaceState"),a.callback=n),$d(r,a,i),im(r,i)},enqueueForceUpdate:function(e,t){var n=ea(e),r=nm(am(),n),i=Kd(r);i.tag=Ld,void 0!==t&&null!==t&&(Mp(t,"forceUpdate"),i.callback=t),$d(n,i,r),im(n,r)}};function zp(e,t,n,r,a,o){var s=e.stateNode,l=e.type;if("function"==typeof s.shouldComponentUpdate){bu(e,"shouldComponentUpdate");var c=s.shouldComponentUpdate(n,a,o);return yu(),void 0===c&&i(!1,"%s.shouldComponentUpdate(): Returned undefined instead of a boolean value. Make sure to return true or false.",Fr(e)||"Component"),c}return!l.prototype||!l.prototype.isPureReactComponent||(!u(t,n)||!u(r,a))}function Vp(e,t){var n;t.updater=Bp,e.stateNode=t,n=e,t._reactInternalFiber=n,t._reactInternalInstance=Dp}function qp(e,t,n){var r,a=e.type,o=Du(e),s=(r=e).tag===J&&null!=r.type.contextTypes,l=s?Ou(e,o):p;(Lc||jc&&e.mode&Zu)&&new a(t,l);var c=new a(t,l),u=e.memoizedState=null!==c.state&&void 0!==c.state?c.state:null;if(Vp(e,c),"function"==typeof a.getDerivedStateFromProps&&null===u){var d=Fr(e)||"Component";Ip.has(d)||(Ip.add(d),i(!1,"%s: Did not properly initialize state during construction. Expected state to be an object, but it was %s.",d,null===c.state?"null":"undefined"))}if("function"==typeof a.getDerivedStateFromProps||"function"==typeof c.getSnapshotBeforeUpdate){var h=null,f=null,m=null;if("function"==typeof c.componentWillMount&&!0!==c.componentWillMount.__suppressDeprecationWarning?h="componentWillMount":"function"==typeof c.UNSAFE_componentWillMount&&(h="UNSAFE_componentWillMount"),"function"==typeof c.componentWillReceiveProps&&!0!==c.componentWillReceiveProps.__suppressDeprecationWarning?f="componentWillReceiveProps":"function"==typeof c.UNSAFE_componentWillReceiveProps&&(f="UNSAFE_componentWillReceiveProps"),"function"==typeof c.componentWillUpdate&&!0!==c.componentWillUpdate.__suppressDeprecationWarning?m="componentWillUpdate":"function"==typeof c.UNSAFE_componentWillUpdate&&(m="UNSAFE_componentWillUpdate"),null!==h||null!==f||null!==m){var g=Fr(e)||"Component",v="function"==typeof a.getDerivedStateFromProps?"getDerivedStateFromProps()":"getSnapshotBeforeUpdate()";Up.has(g)||(Up.add(g),i(!1,"Unsafe legacy lifecycles will not be called for components using new component APIs.\n\n%s uses %s but also contains the following legacy lifecycles:%s%s%s\n\nThe above lifecycles should be removed. Learn more about this warning here:\nhttps://fb.me/react-async-component-lifecycle-hooks",g,v,null!==h?"\n "+h:"",null!==f?"\n "+f:"",null!==m?"\n "+m:""))}}return s&&Au(e,o,l),c}function Hp(e,t,n,r){var a=t.state;if(bu(e,"componentWillReceiveProps"),"function"==typeof t.componentWillReceiveProps&&t.componentWillReceiveProps(n,r),"function"==typeof t.UNSAFE_componentWillReceiveProps&&t.UNSAFE_componentWillReceiveProps(n,r),yu(),t.state!==a){var o=Fr(e)||"Component";Op.has(o)||(Op.add(o),i(!1,"%s.componentWillReceiveProps(): Assigning directly to this.state is deprecated (except inside a component's constructor). Use setState instead.",o)),Bp.enqueueReplaceState(t,t.state,null)}}function Kp(e,t){var n=e.type;!function(e){var t=e.stateNode,n=e.type,r=Fr(e)||"Component";t.render||(n.prototype&&"function"==typeof n.prototype.render?i(!1,"%s(...): No `render` method found on the returned component instance: did you accidentally return an object from the constructor?",r):i(!1,"%s(...): No `render` method found on the returned component instance: you may have forgotten to define `render`.",r)),!t.getInitialState||t.getInitialState.isReactClassApproved||t.state||i(!1,"getInitialState was defined on %s, a plain JavaScript class. This is only supported for classes created using React.createClass. Did you mean to define a state property instead?",r),!t.getDefaultProps||t.getDefaultProps.isReactClassApproved||i(!1,"getDefaultProps was defined on %s, a plain JavaScript class. This is only supported for classes created using React.createClass. Use a static property to define defaultProps instead.",r),!t.propTypes||i(!1,"propTypes was defined as an instance property on %s. Use a static property to define propTypes instead.",r),!t.contextTypes||i(!1,"contextTypes was defined as an instance property on %s. Use a static property to define contextTypes instead.",r),"function"!=typeof t.componentShouldUpdate||i(!1,"%s has a method called componentShouldUpdate(). Did you mean shouldComponentUpdate()? The name is phrased as a question because the function is expected to return a value.",r),n.prototype&&n.prototype.isPureReactComponent&&void 0!==t.shouldComponentUpdate&&i(!1,"%s has a method called shouldComponentUpdate(). shouldComponentUpdate should not be used when extending React.PureComponent. Please extend React.Component if shouldComponentUpdate is used.",Fr(e)||"A pure component"),"function"!=typeof t.componentDidUnmount||i(!1,"%s has a method called componentDidUnmount(). But there is no such lifecycle method. Did you mean componentWillUnmount()?",r),"function"!=typeof t.componentDidReceiveProps||i(!1,"%s has a method called componentDidReceiveProps(). But there is no such lifecycle method. If you meant to update the state in response to changing props, use componentWillReceiveProps(). If you meant to fetch data or run side-effects or mutations after React has updated the UI, use componentDidUpdate().",r),"function"!=typeof t.componentWillRecieveProps||i(!1,"%s has a method called componentWillRecieveProps(). Did you mean componentWillReceiveProps()?",r),"function"!=typeof t.UNSAFE_componentWillRecieveProps||i(!1,"%s has a method called UNSAFE_componentWillRecieveProps(). Did you mean UNSAFE_componentWillReceiveProps()?",r);var a=t.props!==e.pendingProps;void 0!==t.props&&a&&i(!1,"%s(...): When calling super() in `%s`, make sure to pass up the same props that your component's constructor was passed.",r,r),!t.defaultProps||i(!1,"Setting defaultProps as an instance property on %s is not supported and will be ignored. Instead, define defaultProps as a static property on %s.",r,r),"function"!=typeof t.getSnapshotBeforeUpdate||"function"==typeof t.componentDidUpdate||Rp.has(n)||(Rp.add(n),i(!1,"%s: getSnapshotBeforeUpdate() should be used with componentDidUpdate(). This component defines getSnapshotBeforeUpdate() only.",Fr(e))),"function"!=typeof t.getDerivedStateFromProps||i(!1,"%s: getDerivedStateFromProps() is defined as an instance method and will be ignored. Instead, declare it as a static method.",r),"function"!=typeof t.getDerivedStateFromCatch||i(!1,"%s: getDerivedStateFromCatch() is defined as an instance method and will be ignored. Instead, declare it as a static method.",r),"function"!=typeof n.getSnapshotBeforeUpdate||i(!1,"%s: getSnapshotBeforeUpdate() is defined as a static method and will be ignored. Instead, declare it as an instance method.",r);var o=t.state;o&&("object"!=typeof o||Ap(o))&&i(!1,"%s.state: must be set to an object or null",r),"function"==typeof t.getChildContext&&"object"!=typeof n.childContextTypes&&i(!1,"%s.getChildContext(): childContextTypes must be defined in order to use getChildContext().",r)}(e);var r=e.stateNode,a=e.pendingProps,o=Du(e);r.props=a,r.state=e.memoizedState,r.refs=p,r.context=Ou(e,o),e.mode&Zu&&(Ed.recordUnsafeLifecycleWarnings(e,r),Ed.recordLegacyContextWarning(e,r)),Bc&&Ed.recordDeprecationWarnings(e,r);var s=e.updateQueue;null!==s&&(Jd(e,s,a,r,t),r.state=e.memoizedState);var l=e.type.getDerivedStateFromProps;"function"==typeof l&&(Wp(e,l,a),r.state=e.memoizedState),"function"==typeof n.getDerivedStateFromProps||"function"==typeof r.getSnapshotBeforeUpdate||"function"!=typeof r.UNSAFE_componentWillMount&&"function"!=typeof r.componentWillMount||(!function(e,t){bu(e,"componentWillMount");var n=t.state;"function"==typeof t.componentWillMount&&t.componentWillMount(),"function"==typeof t.UNSAFE_componentWillMount&&t.UNSAFE_componentWillMount(),yu(),n!==t.state&&(i(!1,"%s.componentWillMount(): Assigning directly to this.state is deprecated (except inside a component's constructor). Use setState instead.",Fr(e)||"Component"),Bp.enqueueReplaceState(t,t.state,null))}(e,r),null!==(s=e.updateQueue)&&(Jd(e,s,a,r,t),r.state=e.memoizedState)),"function"==typeof r.componentDidMount&&(e.effectTag|=ia)}var Gp=Br.getCurrentFiberStackAddendum,$p=void 0,Yp=void 0,Qp=void 0,Xp=void 0,Jp=function(e){};$p=!1,Yp={},Qp={},Xp={},Jp=function(e){if(null!==e&&"object"==typeof e&&e._store&&!e._store.validated&&null==e.key){"object"!=typeof e._store&&n(!1,"React Component in warnForMissingKey should have a _store. This error is likely caused by a bug in React. Please file an issue."),e._store.validated=!0;var t='Each child in an array or iterator should have a unique "key" prop. See https://fb.me/react-warning-keys for more information.'+(Gp()||"");Qp[t]||(Qp[t]=!0,i(!1,'Each child in an array or iterator should have a unique "key" prop. See https://fb.me/react-warning-keys for more information.%s',Gp()))}};var Zp=Array.isArray;function eh(e,t,r){var a=r.ref;if(null!==a&&"function"!=typeof a&&"object"!=typeof a){if(e.mode&Zu){var o=Fr(e)||"Component";Yp[o]||(i(!1,'A string ref, "%s", has been found within a strict mode tree. String refs are a source of potential bugs and should be avoided. We recommend using createRef() instead.\n%s\n\nLearn more about using refs safely here:\nhttps://fb.me/react-strict-mode-string-ref',a,jr(e)),Yp[o]=!0)}if(r._owner){var s=r._owner,l=void 0;if(s){var c=s;c.tag!==J&&n(!1,"Stateless function components cannot have refs."),l=c.stateNode}l||n(!1,"Missing owner for string ref %s. This error is likely caused by a bug in React. Please file an issue.",a);var u=""+a;if(null!==t&&null!==t.ref&&"function"==typeof t.ref&&t.ref._stringRef===u)return t.ref;var d=function(e){var t=l.refs===p?l.refs={}:l.refs;null===e?delete t[u]:t[u]=e};return d._stringRef=u,d}"string"!=typeof a&&n(!1,"Expected ref to be a function or a string."),r._owner||n(!1,"Element ref was specified as a string (%s) but no owner was set. This could happen for one of the following reasons:\n1. You may be adding a ref to a functional component\n2. You may be adding a ref to a component that was not created inside a component's render method\n3. You have multiple copies of React loaded\nSee https://fb.me/react-refs-must-have-owner for more information.",a)}return a}function th(e,t){if("textarea"!==e.type){var r;r=" If you meant to render a collection of children, use an array instead."+(Gp()||""),n(!1,"Objects are not valid as a React child (found: %s).%s","[object Object]"===Object.prototype.toString.call(t)?"object with keys {"+Object.keys(t).join(", ")+"}":t,r)}}function nh(){var e="Functions are not valid as a React child. This may happen if you return a Component instead of <Component /> from render. Or maybe you meant to call this function rather than return it."+(Gp()||"");Xp[e]||(Xp[e]=!0,i(!1,"Functions are not valid as a React child. This may happen if you return a Component instead of <Component /> from render. Or maybe you meant to call this function rather than return it.%s",Gp()||""))}function rh(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.effectTag=oa}}function r(n,r){if(!e)return null;for(var i=r;null!==i;)t(n,i),i=i.sibling;return null}function a(e,t){for(var n=new Map,r=t;null!==r;)null!==r.key?n.set(r.key,r):n.set(r.index,r),r=r.sibling;return n}function o(e,t,n){var r=sd(e,t,n);return r.index=0,r.sibling=null,r}function s(t,n,r){if(t.index=r,!e)return n;var i=t.alternate;if(null!==i){var a=i.index;return a<n?(t.effectTag=ra,n):a}return t.effectTag=ra,n}function l(t){return e&&null===t.alternate&&(t.effectTag=ra),t}function c(e,t,n,r){if(null===t||t.tag!==ne){var i=ud(n,e.mode,r);return i.return=e,i}var a=o(t,n,r);return a.return=e,a}function u(e,t,n,r){if(null!==t&&t.type===n.type){var i=o(t,n.props,r);return i.ref=eh(e,t,n),i.return=e,i._debugSource=n._source,i._debugOwner=n._owner,i}var a=ld(n,e.mode,r);return a.ref=eh(e,t,n),a.return=e,a}function d(e,t,n,r){if(null===t||t.tag!==ee||t.stateNode.containerInfo!==n.containerInfo||t.stateNode.implementation!==n.implementation){var i=dd(n,e.mode,r);return i.return=e,i}var a=o(t,n.children||[],r);return a.return=e,a}function p(e,t,n,r,i){if(null===t||t.tag!==re){var a=cd(n,e.mode,r,i);return a.return=e,a}var s=o(t,n,r);return s.return=e,s}function h(e,t,n){if("string"==typeof t||"number"==typeof t){var r=ud(""+t,e.mode,n);return r.return=e,r}if("object"==typeof t&&null!==t){switch(t.$$typeof){case Tr:var i=ld(t,e.mode,n);return i.ref=eh(e,null,t),i.return=e,i;case Cr:var a=dd(t,e.mode,n);return a.return=e,a}if(Zp(t)||Ur(t)){var o=cd(t,e.mode,n,null);return o.return=e,o}th(e,t)}return"function"==typeof t&&nh(),null}function f(e,t,n,r){var i=null!==t?t.key:null;if("string"==typeof n||"number"==typeof n)return null!==i?null:c(e,t,""+n,r);if("object"==typeof n&&null!==n){switch(n.$$typeof){case Tr:return n.key===i?n.type===kr?p(e,t,n.props.children,r,i):u(e,t,n,r):null;case Cr:return n.key===i?d(e,t,n,r):null}if(Zp(n)||Ur(n))return null!==i?null:p(e,t,n,r,null);th(e,n)}return"function"==typeof n&&nh(),null}function m(e,t,n,r,i){if("string"==typeof r||"number"==typeof r)return c(t,e.get(n)||null,""+r,i);if("object"==typeof r&&null!==r){switch(r.$$typeof){case Tr:var a=e.get(null===r.key?n:r.key)||null;return r.type===kr?p(t,a,r.props.children,i,r.key):u(t,a,r,i);case Cr:return d(t,e.get(null===r.key?n:r.key)||null,r,i)}if(Zp(r)||Ur(r))return p(t,e.get(n)||null,r,i,null);th(t,r)}return"function"==typeof r&&nh(),null}function g(e,t){if("object"!=typeof e||null===e)return t;switch(e.$$typeof){case Tr:case Cr:Jp(e);var n=e.key;if("string"!=typeof n)break;if(null===t){(t=new Set).add(n);break}if(!t.has(n)){t.add(n);break}i(!1,"Encountered two children with the same key, `%s`. Keys should be unique so that components maintain their identity across updates. Non-unique keys may cause children to be duplicated and/or omitted — the behavior is unsupported and could change in a future version.%s",n,Gp())}return t}return function(c,u,d,p){var v="object"==typeof d&&null!==d&&d.type===kr&&null===d.key;v&&(d=d.props.children);var b="object"==typeof d&&null!==d;if(b)switch(d.$$typeof){case Tr:return l(function(e,n,i,a){for(var s=i.key,l=n;null!==l;){if(l.key===s){if(l.tag===re?i.type===kr:l.type===i.type){r(e,l.sibling);var c=o(l,i.type===kr?i.props.children:i.props,a);return c.ref=eh(e,l,i),c.return=e,c._debugSource=i._source,c._debugOwner=i._owner,c}r(e,l);break}t(e,l),l=l.sibling}if(i.type===kr){var u=cd(i.props.children,e.mode,a,i.key);return u.return=e,u}var d=ld(i,e.mode,a);return d.ref=eh(e,n,i),d.return=e,d}(c,u,d,p));case Cr:return l(function(e,n,i,a){for(var s=i.key,l=n;null!==l;){if(l.key===s){if(l.tag===ee&&l.stateNode.containerInfo===i.containerInfo&&l.stateNode.implementation===i.implementation){r(e,l.sibling);var c=o(l,i.children||[],a);return c.return=e,c}r(e,l);break}t(e,l),l=l.sibling}var u=dd(i,e.mode,a);return u.return=e,u}(c,u,d,p))}if("string"==typeof d||"number"==typeof d)return l(function(e,t,n,i){if(null!==t&&t.tag===ne){r(e,t.sibling);var a=o(t,n,i);return a.return=e,a}r(e,t);var s=ud(n,e.mode,i);return s.return=e,s}(c,u,""+d,p));if(Zp(d))return function(n,i,o,l){for(var c=null,u=0;u<o.length;u++)c=g(o[u],c);for(var d=null,p=null,v=i,b=0,y=0,w=null;null!==v&&y<o.length;y++){v.index>y?(w=v,v=null):w=v.sibling;var E=f(n,v,o[y],l);if(null===E){null===v&&(v=w);break}e&&v&&null===E.alternate&&t(n,v),b=s(E,b,y),null===p?d=E:p.sibling=E,p=E,v=w}if(y===o.length)return r(n,v),d;if(null===v){for(;y<o.length;y++){var _=h(n,o[y],l);_&&(b=s(_,b,y),null===p?d=_:p.sibling=_,p=_)}return d}for(var S=a(0,v);y<o.length;y++){var T=m(S,n,y,o[y],l);T&&(e&&null!==T.alternate&&S.delete(null===T.key?y:T.key),b=s(T,b,y),null===p?d=T:p.sibling=T,p=T)}return e&&S.forEach(function(e){return t(n,e)}),d}(c,u,d,p);if(Ur(d))return function(o,l,c,u){var d=Ur(c);"function"!=typeof d&&n(!1,"An object is not an iterable. This error is likely caused by a bug in React. Please file an issue."),c.entries===d&&($p||i(!1,"Using Maps as children is unsupported and will likely yield unexpected results. Convert it to a sequence/iterable of keyed ReactElements instead.%s",Gp()),$p=!0);var p=d.call(c);if(p)for(var v=null,b=p.next();!b.done;b=p.next())v=g(b.value,v);var y=d.call(c);null==y&&n(!1,"An iterable object provided no iterator.");for(var w=null,E=null,_=l,S=0,T=0,C=null,k=y.next();null!==_&&!k.done;T++,k=y.next()){_.index>T?(C=_,_=null):C=_.sibling;var x=f(o,_,k.value,u);if(null===x){_||(_=C);break}e&&_&&null===x.alternate&&t(o,_),S=s(x,S,T),null===E?w=x:E.sibling=x,E=x,_=C}if(k.done)return r(o,_),w;if(null===_){for(;!k.done;T++,k=y.next()){var P=h(o,k.value,u);null!==P&&(S=s(P,S,T),null===E?w=P:E.sibling=P,E=P)}return w}for(var N=a(0,_);!k.done;T++,k=y.next()){var M=m(N,o,T,k.value,u);null!==M&&(e&&null!==M.alternate&&N.delete(null===M.key?T:M.key),S=s(M,S,T),null===E?w=M:E.sibling=M,E=M)}return e&&N.forEach(function(e){return t(o,e)}),w}(c,u,d,p);if(b&&th(c,d),"function"==typeof d&&nh(),void 0===d&&!v)switch(c.tag){case J:if(c.stateNode.render._isMockFunction)break;case X:var y=c.type;n(!1,"%s(...): Nothing was returned from render. This usually means a return statement is missing. Or, to render nothing, return null.",y.displayName||y.name||"Component")}return r(c,u)}}var ih=rh(!0),ah=rh(!1);var oh=null,sh=null,lh=!1;function ch(e,t){switch(e.tag){case Z:!function(e,t){1===t.nodeType?oc(e,t):sc(e,t)}(e.stateNode.containerInfo,t);break;case te:!function(e,t,n,r){!0!==t[hc]&&(1===r.nodeType?oc(n,r):sc(n,r))}(e.type,e.memoizedProps,e.stateNode,t)}var n,r=((n=od(te,null,null,Xu)).type="DELETED",n);r.stateNode=t,r.return=e,r.effectTag=oa,null!==e.lastEffect?(e.lastEffect.nextEffect=r,e.lastEffect=r):e.firstEffect=e.lastEffect=r}function uh(e,t){switch(t.effectTag|=ra,e.tag){case Z:var n=e.stateNode.containerInfo;switch(t.tag){case te:!function(e,t,n){lc(e,t,n)}(n,t.type,t.pendingProps);break;case ne:!function(e,t){cc(e,t)}(n,t.pendingProps)}break;case te:e.type;var r=e.memoizedProps,i=e.stateNode;switch(t.tag){case te:!function(e,t,n,r,i){!0!==t[hc]&&lc(n,r,i)}(0,r,i,t.type,t.pendingProps);break;case ne:!function(e,t,n,r){!0!==t[hc]&&cc(n,r)}(0,r,i,t.pendingProps)}break;default:return}}function dh(e,t){switch(e.tag){case te:var n=e.type,r=(e.pendingProps,function(e,t,n){return e.nodeType!==lr||t.toLowerCase()!==e.nodeName.toLowerCase()?null:e}(t,n));return null!==r&&(e.stateNode=r,!0);case ne:var i=function(e,t){return""===t||e.nodeType!==cr?null:e}(t,e.pendingProps);return null!==i&&(e.stateNode=i,!0);default:return!1}}function ph(e){if(lh){var t=sh;if(!t)return uh(oh,e),lh=!1,void(oh=e);var n=t;if(!dh(e,t)){if(!(t=Oc(n))||!dh(e,t))return uh(oh,e),lh=!1,void(oh=e);ch(oh,n)}oh=e,sh=Ic(t)}}function hh(e,t,r){Ac||n(!1,"Expected prepareToHydrateHostInstance() to never be called. This error is likely caused by a bug in React. Please file an issue.");var i=function(e,t,n,r,i,a){var o;return dc(a,e),pc(e,n),o=i.namespace,rc(e,t,n,o,r)}(e.stateNode,e.type,e.memoizedProps,t,r,e);return e.updateQueue=i,null!==i}function fh(e){Ac||n(!1,"Expected prepareToHydrateHostTextInstance() to never be called. This error is likely caused by a bug in React. Please file an issue.");var t=e.stateNode,r=e.memoizedProps,i=function(e,t,n){return dc(n,e),ic(e,t)}(t,r,e);if(i){var a=oh;if(null!==a)switch(a.tag){case Z:a.stateNode.containerInfo;!function(e,t,n){ac(t,n)}(0,t,r);break;case te:a.type;var o=a.memoizedProps;a.stateNode;!function(e,t,n,r,i){!0!==t[hc]&&ac(r,i)}(0,o,0,t,r)}}return i}function mh(e){for(var t=e.return;null!==t&&t.tag!==te&&t.tag!==Z;)t=t.return;oh=t}function gh(e){if(!Ac)return!1;if(e!==oh)return!1;if(!lh)return mh(e),lh=!0,!1;var t=e.type;if(e.tag!==te||"head"!==t&&"body"!==t&&!yc(t,e.memoizedProps))for(var n=sh;n;)ch(e,n),n=Oc(n);return mh(e),sh=oh?Oc(e.stateNode):null,!0}function vh(){Ac&&(oh=null,sh=null,lh=!1)}var bh=Br.getCurrentFiberStackAddendum,yh=void 0,wh=void 0,Eh=void 0;function _h(e,t,n){Sh(e,t,n,t.expirationTime)}function Sh(e,t,n,r){t.child=null===e?ah(t,null,n,r):ih(t,e.child,n,r)}function Th(e,t){var n=t.ref;(null===e&&null!==n||null!==e&&e.ref!==n)&&(t.effectTag|=ua)}function Ch(e,t,n){var r=Wu(t),i=void 0;return null===e?null===t.stateNode?(qp(t,t.pendingProps),Kp(t,n),i=!0):i=function(e,t){var n=e.type,r=e.stateNode,i=e.memoizedProps,a=e.pendingProps;r.props=i;var o=r.context,s=Ou(e,Du(e)),l=n.getDerivedStateFromProps,c="function"==typeof l||"function"==typeof r.getSnapshotBeforeUpdate;c||"function"!=typeof r.UNSAFE_componentWillReceiveProps&&"function"!=typeof r.componentWillReceiveProps||i===a&&o===s||Hp(e,r,a,s),ep();var u=e.memoizedState,d=r.state=u,p=e.updateQueue;if(null!==p&&(Jd(e,p,a,r,t),d=e.memoizedState),i===a&&u===d&&!Iu()&&!tp())return"function"==typeof r.componentDidMount&&(e.effectTag|=ia),!1;"function"==typeof l&&(Wp(e,l,a),d=e.memoizedState);var h=tp()||zp(e,i,a,u,d,s);return h?(c||"function"!=typeof r.UNSAFE_componentWillMount&&"function"!=typeof r.componentWillMount||(bu(e,"componentWillMount"),"function"==typeof r.componentWillMount&&r.componentWillMount(),"function"==typeof r.UNSAFE_componentWillMount&&r.UNSAFE_componentWillMount(),yu()),"function"==typeof r.componentDidMount&&(e.effectTag|=ia)):("function"==typeof r.componentDidMount&&(e.effectTag|=ia),e.memoizedProps=a,e.memoizedState=d),r.props=a,r.state=d,r.context=s,h}(t,n):i=function(e,t,n){var r=t.type,i=t.stateNode,a=t.memoizedProps,o=t.pendingProps;i.props=a;var s=i.context,l=Ou(t,Du(t)),c=r.getDerivedStateFromProps,u="function"==typeof c||"function"==typeof i.getSnapshotBeforeUpdate;u||"function"!=typeof i.UNSAFE_componentWillReceiveProps&&"function"!=typeof i.componentWillReceiveProps||a===o&&s===l||Hp(t,i,o,l),ep();var d=t.memoizedState,p=i.state=d,h=t.updateQueue;if(null!==h&&(Jd(t,h,o,i,n),p=t.memoizedState),a===o&&d===p&&!Iu()&&!tp())return"function"==typeof i.componentDidUpdate&&(a===e.memoizedProps&&d===e.memoizedState||(t.effectTag|=ia)),"function"==typeof i.getSnapshotBeforeUpdate&&(a===e.memoizedProps&&d===e.memoizedState||(t.effectTag|=da)),!1;"function"==typeof c&&(Wp(t,c,o),p=t.memoizedState);var f=tp()||zp(t,a,o,d,p,l);return f?(u||"function"!=typeof i.UNSAFE_componentWillUpdate&&"function"!=typeof i.componentWillUpdate||(bu(t,"componentWillUpdate"),"function"==typeof i.componentWillUpdate&&i.componentWillUpdate(o,p,l),"function"==typeof i.UNSAFE_componentWillUpdate&&i.UNSAFE_componentWillUpdate(o,p,l),yu()),"function"==typeof i.componentDidUpdate&&(t.effectTag|=ia),"function"==typeof i.getSnapshotBeforeUpdate&&(t.effectTag|=da)):("function"==typeof i.componentDidUpdate&&(a===e.memoizedProps&&d===e.memoizedState||(t.effectTag|=ia)),"function"==typeof i.getSnapshotBeforeUpdate&&(a===e.memoizedProps&&d===e.memoizedState||(t.effectTag|=da)),t.memoizedProps=o,t.memoizedState=p),i.props=o,i.state=p,i.context=l,f}(e,t,n),kh(e,t,i,r,n)}function kh(e,t,n,r,i){Th(e,t);var a=(t.effectTag&ca)!==ta;if(!n&&!a)return r&&Bu(t,!1),Dh(e,t);var o=t.type,s=t.stateNode;wr.current=t;var l=void 0;return!a||Uc&&"function"==typeof o.getDerivedStateFromCatch?(Br.setCurrentPhase("render"),l=s.render(),(Lc||jc&&t.mode&Zu)&&s.render(),Br.setCurrentPhase(null)):(l=null,Vc&&Np()),t.effectTag|=na,a&&(Sh(e,t,null,i),t.child=null),Sh(e,t,l,i),function(e,t){e.memoizedState=t}(t,s.state),Ah(t,s.props),r&&Bu(t,!0),t.child}function xh(e){var t=e.stateNode;t.pendingContext?Lu(e,t.pendingContext,t.pendingContext!==t.context):t.context&&Lu(e,t.context,!1),gp(e,t.containerInfo)}function Ph(e,t,n){xh(t);var r=t.updateQueue;if(null!==r){var i=t.pendingProps,a=t.memoizedState,o=null!==a?a.element:null;Jd(t,r,i,null,n);var s=t.memoizedState.element;if(s===o)return vh(),Dh(e,t);var l=t.stateNode;return(null===e||null===e.child)&&l.hydrate&&function(e){if(!Ac)return!1;var t=e.stateNode.containerInfo;return sh=Ic(t),oh=e,lh=!0,!0}(t)?(t.effectTag|=ra,t.child=ah(t,null,s,n)):(vh(),_h(e,t,s)),t.child}return vh(),Dh(e,t)}function Nh(e,t,n,r){var i=e.child;for(null!==i&&(i.return=e);null!==i;){var a=void 0;switch(i.tag){case ae:var o=0|i.stateNode;if(i.type===t&&0!=(o&n)){for(var s=i;null!==s;){var l=s.alternate;if(s.expirationTime===Vu||s.expirationTime>r)s.expirationTime=r,null!==l&&(l.expirationTime===Vu||l.expirationTime>r)&&(l.expirationTime=r);else{if(null===l||!(l.expirationTime===Vu||l.expirationTime>r))break;l.expirationTime=r}s=s.return}a=null}else a=i.child;break;case oe:a=i.type===e.type?null:i.child;break;default:a=i.child}if(null!==a)a.return=i;else for(a=i;null!==a;){if(a===e){a=null;break}var c=a.sibling;if(null!==c){c.return=a.return,a=c;break}a=a.return}i=a}}function Mh(e,t,n){var r=t.type,a=t.pendingProps,o=t.memoizedProps,s=function(e){return Sc?e._currentValue:e._currentValue2}(r),l=function(e){return Sc?e._changedBits:e._changedBits2}(r);if(Iu());else if(0===l&&o===a)return Dh(e,t);t.memoizedProps=a;var c=a.unstable_observedBits;if(void 0!==c&&null!==c||(c=zu),t.stateNode=c,0!=(l&c))Nh(t,r,l,n);else if(o===a)return Dh(e,t);var u=a.children;"function"!=typeof u&&i(!1,"A context consumer was rendered with multiple children, or a child that isn't a function. A context consumer expects a single child that is a function. If you did pass a function, make sure there is no trailing or leading whitespace around it.");var d;return wr.current=t,Br.setCurrentPhase("render"),d=u(s),Br.setCurrentPhase(null),t.effectTag|=na,_h(e,t,d),t.child}function Dh(e,t){return mu(t),Vc&&Np(),function(e,t){if(null!==e&&t.child!==e.child&&n(!1,"Resuming work not yet implemented."),null!==t.child){var r=t.child,i=sd(r,r.pendingProps,r.expirationTime);for(t.child=i,i.return=t;null!==r.sibling;)r=r.sibling,(i=i.sibling=sd(r,r.pendingProps,r.expirationTime)).return=t;i.sibling=null}}(e,t),t.child}function Ah(e,t){e.memoizedProps=t}function Oh(e,t,r){var a;if(Vc&&t.mode&ed&&(a=t,Vc&&(_p.push(a),a.actualDuration=_c()-a.actualDuration-Tp,a.actualStartTime=_c())),t.expirationTime===Vu||t.expirationTime>r)return function(e,t){switch(mu(t),Vc&&Np(),t.tag){case Z:xh(t);break;case J:Wu(t);break;case ee:gp(t,t.stateNode.containerInfo);break;case oe:lp(t)}return null}(0,t);switch(t.tag){case Q:return function(e,t,r){null!==e&&n(!1,"An indeterminate component should never have mounted. This error is likely caused by a bug in React. Please file an issue.");var a,o=t.type,s=t.pendingProps,l=Ou(t,Du(t));if(o.prototype&&"function"==typeof o.prototype.render){var c=Fr(t)||"Unknown";yh[c]||(i(!1,"The <%s /> component appears to have a render method, but doesn't extend React.Component. This is likely to cause errors. Change %s to extend React.Component instead.",c,c),yh[c]=!0)}if(t.mode&Zu&&Ed.recordLegacyContextWarning(t,null),wr.current=t,a=o(s,l),t.effectTag|=na,"object"==typeof a&&null!==a&&"function"==typeof a.render&&void 0===a.$$typeof){var u=t.type;t.tag=J,t.memoizedState=null!==a.state&&void 0!==a.state?a.state:null;var d=u.getDerivedStateFromProps;"function"==typeof d&&Wp(t,d,s);var p=Wu(t);return Vp(t,a),Kp(t,r),kh(e,t,!0,p,r)}t.tag=X;var h=t.type;if(h&&h.childContextTypes&&i(!1,"%s(...): childContextTypes cannot be defined on a functional component.",h.displayName||h.name||"Component"),null!==t.ref){var f="",m=Br.getCurrentFiberOwnerName();m&&(f+="\n\nCheck the render method of `"+m+"`.");var g=m||t._debugID||"",v=t._debugSource;v&&(g=v.fileName+":"+v.lineNumber),Eh[g]||(Eh[g]=!0,i(!1,"Stateless function components cannot be given refs. Attempts to access this ref will fail.%s%s",f,Br.getCurrentFiberStackAddendum()))}if("function"==typeof o.getDerivedStateFromProps){var b=Fr(t)||"Unknown";wh[b]||(i(!1,"%s: Stateless functional components do not support getDerivedStateFromProps.",b),wh[b]=!0)}return _h(e,t,a),Ah(t,s),t.child}(e,t,r);case X:return function(e,t){var n=t.type,r=t.pendingProps;if(Iu());else if(t.memoizedProps===r)return Dh(e,t);var i,a=Ou(t,Du(t));return wr.current=t,Br.setCurrentPhase("render"),i=n(r,a),Br.setCurrentPhase(null),t.effectTag|=na,_h(e,t,i),Ah(t,r),t.child}(e,t);case J:return Ch(e,t,r);case Z:return Ph(e,t,r);case te:return function(e,t,n){yp(t),null===e&&ph(t);var r=t.type,i=t.memoizedProps,a=t.pendingProps,o=null!==e?e.memoizedProps:null;if(Iu());else if(i===a){var s=t.mode&Ju&&wc(0,a);if(s&&(t.expirationTime=Hu),!s||n!==Hu)return Dh(e,t)}var l=a.children;return yc(r,a)?l=null:o&&yc(r,o)&&(t.effectTag|=sa),Th(e,t),n!==Hu&&t.mode&Ju&&wc(0,a)?(t.expirationTime=Hu,t.memoizedProps=a,null):(_h(e,t,l),Ah(t,a),t.child)}(e,t,r);case ne:return function(e,t){return null===e&&ph(t),Ah(t,t.pendingProps),null}(e,t);case ce:return function(e,t,n){if(Fc){var r=t.pendingProps,i=t.memoizedProps,a=t.memoizedState,o=!((t.effectTag&ca)===ta);if(Iu());else if(r===i&&o===a)return Dh(e,t);var s=(0,r.children)(o);return t.memoizedProps=r,t.memoizedState=o,_h(e,t,s),t.child}return null}(e,t);case ee:return function(e,t,n){gp(t,t.stateNode.containerInfo);var r=t.pendingProps;if(Iu());else if(t.memoizedProps===r)return Dh(e,t);return null===e?(t.child=ih(t,null,r,n),Ah(t,r)):(_h(e,t,r),Ah(t,r)),t.child}(e,t,r);case se:return function(e,t){var n,r=t.type.render,i=t.pendingProps,a=t.ref;if(Iu());else if(t.memoizedProps===i&&a===(null!==e?e.ref:null))return Dh(e,t);return wr.current=t,Br.setCurrentPhase("render"),n=r(i,a),Br.setCurrentPhase(null),_h(e,t,n),Ah(t,i),t.child}(e,t);case re:return function(e,t){var n=t.pendingProps;if(Iu());else if(t.memoizedProps===n)return Dh(e,t);return _h(e,t,n),Ah(t,n),t.child}(e,t);case ie:return function(e,t){var n=t.pendingProps.children;if(Iu());else if(null===n||t.memoizedProps===n)return Dh(e,t);return _h(e,t,n),Ah(t,n),t.child}(e,t);case le:return function(e,t){var n=t.pendingProps;return Vc&&(t.effectTag|=ia),t.memoizedProps===n?Dh(e,t):(_h(e,t,n.children),Ah(t,n),t.child)}(e,t);case oe:return function(e,t,n){var r=t.type._context,a=t.pendingProps,o=t.memoizedProps,s=!0;if(Iu())s=!1;else if(o===a)return t.stateNode=0,lp(t),Dh(e,t);var c=a.value;t.memoizedProps=a;var u=t.type.propTypes;u&&l(u,a,"prop","Context.Provider",bh);var d=void 0;if(null===o)d=zu;else if(o.value===a.value){if(o.children===a.children&&s)return t.stateNode=0,lp(t),Dh(e,t);d=0}else{var p=o.value;if(p===c&&(0!==p||1/p==1/c)||p!=p&&c!=c){if(o.children===a.children&&s)return t.stateNode=0,lp(t),Dh(e,t);d=0}else if(((d="function"==typeof r._calculateChangedBits?r._calculateChangedBits(p,c):zu)&zu)!==d&&i(!1,"calculateChangedBits: Expected the return value to be a 31-bit integer. Instead received: %s",d),0==(d|=0)){if(o.children===a.children&&s)return t.stateNode=0,lp(t),Dh(e,t)}else Nh(t,r,d,n)}return t.stateNode=d,lp(t),_h(e,t,a.children),t.child}(e,t,r);case ae:return Mh(e,t,r);default:n(!1,"Unknown unit of work tag. This error is likely caused by a bug in React. Please file an issue.")}}function Ih(e){e.effectTag|=ia}function Rh(e){e.effectTag|=ua}function Uh(e,t){for(var n,r,i=t.child;null!==i;){if(i.tag===te||i.tag===ne)n=e,r=i.stateNode,n.appendChild(r);else if(i.tag===ee);else if(null!==i.child){i.child.return=i,i=i.child;continue}if(i===t)return;for(;null===i.sibling;){if(null===i.return||i.return===t)return;i=i.return}i.sibling.return=i.return,i=i.sibling}}yh={},wh={},Eh={};var Fh=void 0,Lh=void 0,jh=void 0;if(kc)Fh=function(e){},Lh=function(e,t,n,r,i,a,o,s){t.updateQueue=n,n&&Ih(t)},jh=function(e,t,n,r){n!==r&&Ih(t)};else if(Kl){Fh=function(e){var t=e.stateNode;if(null===e.firstEffect);else{var n=t.containerInfo,r=$l(n);!function(e,t){for(var n=t.child;null!==n;){if(n.tag===te||n.tag===ne)Yl(e,n.stateNode);else if(n.tag===ee);else if(null!==n.child){n.child.return=n,n=n.child;continue}if(n===t)return;for(;null===n.sibling;){if(null===n.return||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}}(r,e),t.pendingChildren=r,Ih(e),Ql(n,r)}},Lh=function(e,t,n,r,i,a,o,s){var l=null===t.firstEffect,c=e.stateNode;if(l&&null===n)t.stateNode=c;else{var u=t.stateNode,d=Gl(c,n,r,i,a,t,l,u);bc(d,r,a,o)&&Ih(t),t.stateNode=d,l?Ih(t):Uh(d,t)}},jh=function(e,t,n,r){if(n!==r){var i=mp(),a=bp();t.stateNode=Ec(r,i,a,t),Ih(t)}}}else Fh=function(e){},Lh=function(e,t,n,r,i,a,o,s){},jh=function(e,t,n,r){};function Wh(e,t,r){var i=t.pendingProps;switch(Vc&&t.mode&ed&&kp(t),t.tag){case X:return null;case J:return Uu(t),null;case Z:vp(t),Fu(t);var a=t.stateNode;return a.pendingContext&&(a.context=a.pendingContext,a.pendingContext=null),null!==e&&null!==e.child||(gh(t),t.effectTag&=~ra),Fh(t),null;case te:wp(t);var o=mp(),s=t.type;if(null!==e&&null!=t.stateNode){var l=e.memoizedProps,c=t.stateNode,u=bp(),d=function(e,t,n,r,i,a){var o=a;if(typeof r.children!=typeof n.children&&("string"==typeof r.children||"number"==typeof r.children)){var s=""+r.children,l=uc(o.ancestorInfo,t,null);ql(null,s,l)}return tc(e,t,n,r,i)}(c,s,l,i,o,u);Lh(e,t,d,s,l,i,o,u),e.ref!==t.ref&&Rh(t)}else{if(!i)return null===t.stateNode&&n(!1,"We must have new props for new mounts. This error is likely caused by a bug in React. Please file an issue."),null;var p=bp();if(gh(t))hh(t,o,p)&&Ih(t);else{var h=function(e,t,n,r,i){var a,o=r;if(ql(e,null,o.ancestorInfo),"string"==typeof t.children||"number"==typeof t.children){var s=""+t.children,l=uc(o.ancestorInfo,e,null);ql(null,s,l)}a=o.namespace;var c=Jl(e,t,n,a);return dc(i,c),pc(c,t),c}(s,i,o,p,t);Uh(h,t),bc(h,s,i,o)&&Ih(t),t.stateNode=h}null!==t.ref&&Rh(t)}return null;case ne:var f=i;if(e&&null!=t.stateNode){var m=e.memoizedProps;jh(e,t,m,f)}else{if("string"!=typeof f)return null===t.stateNode&&n(!1,"We must have new props for new mounts. This error is likely caused by a bug in React. Please file an issue."),null;var g=mp(),v=bp();gh(t)?fh(t)&&Ih(t):t.stateNode=Ec(f,g,v,t)}return null;case se:case ce:case re:case ie:case le:return null;case ee:return vp(t),Fh(t),null;case oe:return cp(t),null;case ae:return null;case Q:n(!1,"An indeterminate component should have become determinate before completing. This error is likely caused by a bug in React. Please file an issue.");default:n(!1,"Unknown unit of work tag. This error is likely caused by a bug in React. Please file an issue.")}}var Bh=b.invokeGuardedCallback,zh=b.hasCaughtError,Vh=b.clearCaughtError,qh=null;function Hh(e,t){var n=t.source,r=t.stack;null===r&&null!==n&&(r=jr(n));var i={componentName:null!==n?Fr(n):null,componentStack:null!==r?r:"",error:t.value,errorBoundary:null,errorBoundaryName:null,errorBoundaryFound:!1,willRetry:!1};null!==e&&e.tag===J&&(i.errorBoundary=e.stateNode,i.errorBoundaryName=Fr(e),i.errorBoundaryFound=!0,i.willRetry=!0);try{!function(e){var t=e.error;if(!t||!t.suppressReactErrorLogging){var n=e.componentName,r=e.componentStack,i=e.errorBoundaryName,a=e.errorBoundaryFound,o=e.willRetry,s=(n?"The above error occurred in the <"+n+"> component:":"The above error occurred in one of your React components:")+r+"\n\n"+(a&&i?o?"React will try to recreate this component tree from scratch using the error boundary you provided, "+i+".":"This error was initially handled by the error boundary "+i+".\nRecreating the tree from scratch failed so React will unmount the tree.":"Consider adding an error boundary to your tree to customize error handling behavior.\nVisit https://fb.me/react-error-boundaries to learn more about error boundaries.");console.error(s)}}(i)}catch(e){e&&e.suppressReactErrorLogging||console.error(e)}}qh=new Set;var Kh=function(e,t){bu(e,"componentWillUnmount"),t.props=e.memoizedProps,t.state=e.memoizedState,t.componentWillUnmount(),yu()};function Gh(e){var t=e.ref;null!==t&&("function"==typeof t?(Bh(null,t,null,null),zh()&&Zf(e,Vh())):t.current=null)}function $h(e,t){switch(t.tag){case J:if(t.effectTag&da&&null!==e){var r=e.memoizedProps,a=e.memoizedState;bu(t,"getSnapshotBeforeUpdate");var o=t.stateNode;o.props=t.memoizedProps,o.state=t.memoizedState;var s=o.getSnapshotBeforeUpdate(r,a),l=qh;void 0!==s||l.has(t.type)||(l.add(t.type),i(!1,"%s.getSnapshotBeforeUpdate(): A snapshot value (or null) must be returned. You have returned undefined.",Fr(t))),o.__reactInternalSnapshotBeforeUpdate=s,yu()}return;case Z:case te:case ne:case ee:return;default:n(!1,"This unit of work tag should not have side-effects. This error is likely caused by a bug in React. Please file an issue.")}}function Yh(e,t,r,i,a){switch(r.tag){case J:var o=r.stateNode;if(r.effectTag&ia)if(null===t)bu(r,"componentDidMount"),o.props=r.memoizedProps,o.state=r.memoizedState,o.componentDidMount(),yu();else{var s=t.memoizedProps,l=t.memoizedState;bu(r,"componentDidUpdate"),o.props=r.memoizedProps,o.state=r.memoizedState,o.componentDidUpdate(s,l,o.__reactInternalSnapshotBeforeUpdate),yu()}var c=r.updateQueue;return void(null!==c&&(o.props=r.memoizedProps,o.state=r.memoizedState,np(0,c,o)));case Z:var u=r.updateQueue;if(null!==u){var d=null;if(null!==r.child)switch(r.child.tag){case te:d=vc(r.child.stateNode);break;case J:d=r.child.stateNode}np(0,u,d)}return;case te:var p=r.stateNode;if(null===t&&r.effectTag&ia)!function(e,t,n,r){gc(t,n)&&e.focus()}(p,r.type,r.memoizedProps);return;case ne:case ee:case le:case ce:return;default:n(!1,"This unit of work tag should not have side-effects. This error is likely caused by a bug in React. Please file an issue.")}}function Qh(e){var t=e.ref;if(null!==t){var n=e.stateNode,r=void 0;switch(e.tag){case te:r=vc(n);break;default:r=n}"function"==typeof t?t(r):(t.hasOwnProperty("current")||i(!1,"Unexpected ref object provided for %s. Use either a ref-setter function or React.createRef().%s",Fr(e),jr(e)),t.current=r)}}function Xh(e){var t=e.ref;null!==t&&("function"==typeof t?t(null):t.current=null)}function Jh(e){switch(yd(e),e.tag){case J:Gh(e);var t=e.stateNode;return void("function"==typeof t.componentWillUnmount&&function(e,t){Bh(null,Kh,null,e,t),zh()&&Zf(e,Vh())}(e,t));case te:return void Gh(e);case ee:return void(kc?nf(e):Kl&&function(e){if(!Kl)return;var t=e.stateNode.containerInfo,n=$l(t);Xl(t,n)}(e))}}function Zh(e){for(var t=e;;)if(Jh(t),null===t.child||kc&&t.tag===ee){if(t===e)return;for(;null===t.sibling;){if(null===t.return||t.return===e)return;t=t.return}t.sibling.return=t.return,t=t.sibling}else t.child.return=t,t=t.child}function ef(e){return e.tag===te||e.tag===Z||e.tag===ee}function tf(e){if(kc){var t=function(e){for(var t=e.return;null!==t;){if(ef(t))return t;t=t.return}n(!1,"Expected to find a host parent. This error is likely caused by a bug in React. Please file an issue.")}(e),r=void 0,i=void 0;switch(t.tag){case te:r=t.stateNode,i=!1;break;case Z:case ee:r=t.stateNode.containerInfo,i=!0;break;default:n(!1,"Invalid host parent fiber. This error is likely caused by a bug in React. Please file an issue.")}t.effectTag&sa&&(xc(r),t.effectTag&=~sa);for(var a,o,s,l=function(e){var t=e;e:for(;;){for(;null===t.sibling;){if(null===t.return||ef(t.return))return null;t=t.return}for(t.sibling.return=t.return,t=t.sibling;t.tag!==te&&t.tag!==ne;){if(t.effectTag&ra)continue e;if(null===t.child||t.tag===ee)continue e;t.child.return=t,t=t.child}if(!(t.effectTag&ra))return t.stateNode}}(e),c=e;;){if(c.tag===te||c.tag===ne)l?i?(a=r,o=c.stateNode,s=l,a.nodeType===ur?a.parentNode.insertBefore(o,s):a.insertBefore(o,s)):Mc(r,c.stateNode,l):i?Nc(r,c.stateNode):Pc(r,c.stateNode);else if(c.tag===ee);else if(null!==c.child){c.child.return=c,c=c.child;continue}if(c===e)return;for(;null===c.sibling;){if(null===c.return||c.return===e)return;c=c.return}c.sibling.return=c.return,c=c.sibling}}}function nf(e){for(var t,r,i=e,a=!1,o=void 0,s=void 0;;){if(!a){var l=i.return;e:for(;;){switch(null===l&&n(!1,"Expected to find a host parent. This error is likely caused by a bug in React. Please file an issue."),l.tag){case te:o=l.stateNode,s=!1;break e;case Z:case ee:o=l.stateNode.containerInfo,s=!0;break e}l=l.return}a=!0}if(i.tag===te||i.tag===ne)Zh(i),s?(t=o,r=i.stateNode,t.nodeType===ur?t.parentNode.removeChild(r):t.removeChild(r)):Dc(o,i.stateNode);else if(i.tag===ee){if(o=i.stateNode.containerInfo,null!==i.child){i.child.return=i,i=i.child;continue}}else if(Jh(i),null!==i.child){i.child.return=i,i=i.child;continue}if(i===e)return;for(;null===i.sibling;){if(null===i.return||i.return===e)return;(i=i.return).tag===ee&&(a=!1)}i.sibling.return=i.return,i=i.sibling}}function rf(e){kc?nf(e):Zh(e),function(e){e.return=null,e.child=null,e.alternate&&(e.alternate.child=null,e.alternate.return=null)}(e)}function af(e,t){if(kc)switch(t.tag){case J:return;case te:var r=t.stateNode;if(null!=r){var i=t.memoizedProps,a=null!==e?e.memoizedProps:i,o=t.type,s=t.updateQueue;t.updateQueue=null,null!==s&&function(e,t,n,r,i,a){pc(e,i),nc(e,t,n,r,i)}(r,s,o,a,i)}return;case ne:null===t.stateNode&&n(!1,"This should have a text node initialized. This error is likely caused by a bug in React. Please file an issue.");var l=t.stateNode,c=t.memoizedProps;null!==e&&e.memoizedProps;return void function(e,t,n){e.nodeValue=n}(l,0,c);case Z:return;case le:if(Vc)(0,t.memoizedProps.onRender)(t.memoizedProps.id,null===e?"mount":"update",t.actualDuration,t.treeBaseTime,t.actualStartTime,Ep);return;case ce:return;default:n(!1,"This unit of work tag should not have side-effects. This error is likely caused by a bug in React. Please file an issue.")}else!function(e){if(Kl)switch(e.tag){case J:case te:case ne:return;case Z:case ee:var t=e.stateNode,r=t.containerInfo,i=t.pendingChildren;return void Xl(r,i);default:n(!1,"This unit of work tag should not have side-effects. This error is likely caused by a bug in React. Please file an issue.")}}(t)}function of(e){kc&&xc(e.stateNode)}function sf(e,t,n){var r=Kd(n);r.tag=jd,r.payload={element:null};var i=t.value;return r.callback=function(){Lm(i),Hh(e,t)},r}function lf(e,t,n){var r=Kd(n);r.tag=jd;var i=e.type.getDerivedStateFromCatch;if(Uc&&"function"==typeof i){var a=t.value;r.payload=function(){return i(a)}}var o=e.stateNode;return null!==o&&"function"==typeof o.componentDidCatch&&(r.callback=function(){var n;Uc&&"function"===i||(n=this,null===Rf?Rf=new Set([n]):Rf.add(n));var r=t.value,a=t.stack;Hh(e,t),this.componentDidCatch(r,{componentStack:null!==a?a:""})}),r}function cf(e){var t=nm(am(),e);$d(e,Kd(t),t),im(e,t)}function uf(e,t,n,r,i,a,o){if(n.effectTag|=ha,n.firstEffect=n.lastEffect=null,Fc&&null!==r&&"object"==typeof r&&"function"==typeof r.then){var s=r,l=Yu(a),c=o-(l-5e3);c<0&&(c=0);var u=l-o,d=t,p=-1;e:do{if(d.tag===ce){var h=d.alternate;if(null!==h&&!0===h.memoizedState){p=0;break e}var f=d.pendingProps.ms;if("number"==typeof f){if(f<=0){p=0;break e}(-1===p||f<p)&&(p=f)}else-1===p&&(p=u)}d=d.return}while(null!==d);var m=p-c;if(a===Hu||m>0){(b=m)>=0&&Mf<b&&(Mf=b);var g=function(){rm(e,a)};return void s.then(g,g)}d=t;do{switch(d.tag){case Z:r=new Error(a===qu?"A synchronous update was suspended, but no fallback UI was provided.":"An update was suspended for longer than the timeout, but no fallback UI was provided.");break;case ce:if((d.effectTag&ca)===ta){d.effectTag|=fa;var v=cf.bind(null,d);return void s.then(v,v)}}d=d.return}while(null!==d)}var b;r=rp(r,n);var y=t;do{switch(y.tag){case Z:var w=r;return y.effectTag|=fa,void Yd(y,sf(y,w,a),a);case J:var E=r,_=y.type,S=y.stateNode;if((y.effectTag&ca)===ta&&("function"==typeof _.getDerivedStateFromCatch&&Uc||null!==S&&"function"==typeof S.componentDidCatch&&!Kf(S)))return y.effectTag|=fa,void Yd(y,lf(y,E,a),a)}y=y.return}while(null!==y)}function df(e,t,n){switch(Vc&&e.mode&ed&&kp(e),e.tag){case J:Uu(e);var r=e.effectTag;return r&fa?(e.effectTag=r&~fa|ca,e):null;case Z:vp(e),Fu(e);var i=e.effectTag;return i&fa?(e.effectTag=i&~fa|ca,e):null;case te:return wp(e),null;case ce:var a=e.effectTag;return a&fa?(e.effectTag=a&~fa|ca,e):null;case ee:return vp(e),null;case oe:return cp(e),null;default:return null}}function pf(e){switch(Vc&&e.mode&ed&&(xp(),kp(e)),e.tag){case J:Uu(e);break;case Z:vp(e),Fu(e);break;case te:wp(e);break;case ee:vp(e);break;case oe:cp(e)}}var hf=b.invokeGuardedCallback,ff=b.hasCaughtError,mf=b.clearCaughtError,gf=void 0,vf=void 0,bf=void 0,yf=void 0;gf=!1,vf=!1;var wf={};bf=function(e){var t=Fr(e)||"ReactClass";wf[t]||(i(!1,"Can't call setState (or forceUpdate) on an unmounted component. This is a no-op, but it indicates a memory leak in your application. To fix, cancel all subscriptions and asynchronous tasks in the componentWillUnmount method.%s",jr(e)),wf[t]=!0)},yf=function(e){switch(Br.phase){case"getChildContext":if(vf)return;i(!1,"setState(...): Cannot call setState() inside getChildContext()"),vf=!0;break;case"render":if(gf)return;i(!1,"Cannot update during an existing state transition (such as within `render` or another component's constructor). Render methods should be a pure function of props and state; constructor side-effects are an anti-pattern, but can be moved to `componentWillMount`."),gf=!0}};var Ef=_c(),_f=$u(0),Sf=Ef,Tf=0,Cf=Vu,kf=!1,xf=null,Pf=null,Nf=Vu,Mf=-1,Df=!1,Af=null,Of=!1,If=!1,Rf=null,Uf=null,Ff=void 0,Lf=void 0,jf=void 0,Wf=void 0,Bf=void 0;function zf(){if(null!==xf)for(var e=xf.return;null!==e;)pf(e),e=e.return;Ed.discardPendingWarnings(),-1!==Su&&i(!1,"Expected an empty stack. Something was not reset properly."),Pf=null,Nf=Vu,Mf=-1,Df=!1,xf=null,If=!1}function Vf(){for(;null!==Af;){Br.setCurrentFiber(Af),fu();var e=Af.effectTag;if(e&sa&&of(Af),e&ua){var t=Af.alternate;null!==t&&Xh(t)}switch(e&(ra|ia|oa)){case ra:tf(Af),Af.effectTag&=~ra;break;case aa:tf(Af),Af.effectTag&=~ra,af(Af.alternate,Af);break;case ia:af(Af.alternate,Af);break;case oa:rf(Af)}Af=Af.nextEffect}Br.resetCurrentFiber()}function qf(){for(;null!==Af;){if(Af.effectTag&da)fu(),$h(Af.alternate,Af);Af=Af.nextEffect}}function Hf(e,t,n){for(Ed.flushPendingUnsafeLifecycleWarnings(),Bc&&Ed.flushPendingDeprecationWarnings(),zc&&Ed.flushLegacyContextWarning();null!==Af;){var r=Af.effectTag;if(r&(ia|la))fu(),Yh(0,Af.alternate,Af);r&ua&&(fu(),Qh(Af));var i=Af.nextEffect;Af.nextEffect=null,Af=i}}function Kf(e){return null!==Rf&&Rf.has(e)}function Gf(e){kf=!0,Of=!0,function(){if(Rc){if(!qc)return;$c=!0,Yc=!1,eu.clear(),nu("(Committing Changes)")}}();var t=e.stateNode;t.current===e&&n(!1,"Cannot commit the same tree as before. This is probably a bug related to the return field. This error is likely caused by a bug in React. Please file an issue.");var r=t.pendingCommitExpirationTime;r===Vu&&n(!1,"Cannot commit an incomplete root. This error is likely caused by a bug in React. Please file an issue."),t.pendingCommitExpirationTime=Vu;var a=am();wr.current=null;var o=void 0;for(e.effectTag>na?null!==e.lastEffect?(e.lastEffect.nextEffect=e,o=e.firstEffect):o=e:o=e.firstEffect,t.containerInfo,fc=Ga(),mc=lo(),Ka(!1),Af=o,function(){if(Rc){if(!qc)return;Jc=0,nu("(Committing Snapshot Effects)")}}();null!==Af;){var s=!1,l=void 0;hf(null,qf,null),ff()&&(s=!0,l=mf()),s&&(null===Af&&n(!1,"Should have next effect. This error is likely caused by a bug in React. Please file an issue."),Zf(Af,l),null!==Af&&(Af=Af.nextEffect))}for(!function(){if(Rc){if(!qc)return;var e=Jc;Jc=0,ru("(Committing Snapshot Effects: "+e+" Total)","(Committing Snapshot Effects)",null)}}(),Vc&&Vc&&(Ep=_c()),Af=o,function(){if(Rc){if(!qc)return;Jc=0,nu("(Committing Host Effects)")}}();null!==Af;){var c=!1,u=void 0;hf(null,Vf,null),ff()&&(c=!0,u=mf()),c&&(null===Af&&n(!1,"Should have next effect. This error is likely caused by a bug in React. Please file an issue."),Zf(Af,u),null!==Af&&(Af=Af.nextEffect))}for(!function(){if(Rc){if(!qc)return;var e=Jc;Jc=0,ru("(Committing Host Effects: "+e+" Total)","(Committing Host Effects)",null)}}(),t.containerInfo,co(mc),mc=null,Ka(fc),fc=null,t.current=e,Af=o,function(){if(Rc){if(!qc)return;Jc=0,nu("(Calling Lifecycle Methods)")}}();null!==Af;){var d=!1,p=void 0;hf(null,Hf,null,t,a,r),ff()&&(d=!0,p=mf()),d&&(null===Af&&n(!1,"Should have next effect. This error is likely caused by a bug in React. Please file an issue."),Zf(Af,p),null!==Af&&(Af=Af.nextEffect))}Vc&&(Vc&&0!==_p.length&&i(!1,"Expected an empty stack. Something was not reset properly."),Vc&&(Tp=0)),Of=!1,kf=!1,function(){if(Rc){if(!qc)return;var e=Jc;Jc=0,ru("(Calling Lifecycle Methods: "+e+" Total)","(Calling Lifecycle Methods)",null)}}(),function(){if(Rc){if(!qc)return;var e=null;Yc?e="Lifecycle hook scheduled a cascading update":Xc>0&&(e="Caused by a cascading update in earlier commit"),Yc=!1,Xc++,$c=!1,eu.clear(),ru("(Committing Changes)","(Committing Changes)",e)}}(),bd(e.stateNode),Od.debugTool&&Od.debugTool.onCommitWork(e),function(e,t,n){if(Fc){if(n===Vu)return e.earliestPendingTime=Vu,e.latestPendingTime=Vu,e.earliestSuspendedTime=Vu,e.latestSuspendedTime=Vu,void(e.latestPingedTime=Vu);var r=e.latestPendingTime;r!==Vu&&(r<n?e.earliestPendingTime=e.latestPendingTime=Vu:e.earliestPendingTime<n&&(e.earliestPendingTime=e.latestPendingTime));var i=e.earliestSuspendedTime;if(i===Vu)return void Id(e,n);if(n>e.latestSuspendedTime)return e.earliestSuspendedTime=Vu,e.latestSuspendedTime=Vu,e.latestPingedTime=Vu,void Id(e,n);if(n<i)Id(e,n)}}(t,0,t.current.expirationTime);var h=Rd(t);return h===Vu&&(Rf=null),h}function $f(e,t){if(t===Hu||e.expirationTime!==Hu){var n=Vu;switch(e.tag){case Z:case J:var r=e.updateQueue;null!==r&&(n=r.expirationTime)}if(Vc&&e.mode&ed){for(var i=e.selfBaseTime,a=e.child;null!==a;)i+=a.treeBaseTime,a.expirationTime!==Vu&&(n===Vu||n>a.expirationTime)&&(n=a.expirationTime),a=a.sibling;e.treeBaseTime=i}else for(var o=e.child;null!==o;)o.expirationTime!==Vu&&(n===Vu||n>o.expirationTime)&&(n=o.expirationTime),o=o.sibling;e.expirationTime=n}}function Yf(e){for(;;){var t=e.alternate;Br.setCurrentFiber(e);var n=e.return,r=e.sibling;if((e.effectTag&ha)===ta){var i=Wh(t,e);if(gu(e),$f(e,Nf),Br.resetCurrentFiber(),null!==i)return gu(e),Od.debugTool&&Od.debugTool.onCompleteWork(e),i;if(null!==n&&(n.effectTag&ha)===ta)null===n.firstEffect&&(n.firstEffect=e.firstEffect),null!==e.lastEffect&&(null!==n.lastEffect&&(n.lastEffect.nextEffect=e.firstEffect),n.lastEffect=e.lastEffect),e.effectTag>na&&(null!==n.lastEffect?n.lastEffect.nextEffect=e:n.firstEffect=e,n.lastEffect=e);if(Od.debugTool&&Od.debugTool.onCompleteWork(e),null!==r)return r;if(null!==n){e=n;continue}return If=!0,null}var a=df(e);if(e.effectTag&ca?vu(e):gu(e),Br.resetCurrentFiber(),null!==a)return gu(e),Od.debugTool&&Od.debugTool.onCompleteWork(e),a.effectTag&=pa,a;if(null!==n&&(n.firstEffect=n.lastEffect=null,n.effectTag|=ha),Od.debugTool&&Od.debugTool.onCompleteWork(e),null!==r)return r;if(null===n)return null;e=n}return null}function Qf(e){var t=e.alternate;!function(e){if(Rc){if(!qc||cu(e))return;if(Hc=e,!ou(e,null))return;e._debugIsCurrentlyTiming=!0}}(e),Br.setCurrentFiber(e),Wc&&(Ff=pd(Ff,e));var n=void 0;return Vc?(e.mode&ed&&Vc&&(-1!==Pp&&i(!1,"Cannot start base timer that is already running. This error is likely caused by a bug in React. Please file an issue."),Pp=_c()),n=Oh(t,e,Nf),e.mode&ed&&(Vc&&-1!==Pp&&(e.selfBaseTime=_c()-Pp),Np())):n=Oh(t,e,Nf),Br.resetCurrentFiber(),jf&&Bf(),Od.debugTool&&Od.debugTool.onBeginWork(e),null===n&&(n=Yf(e)),wr.current=null,n}function Xf(e){if(e){for(;null!==xf&&!Fm();)xf=Qf(xf);Vc&&Cp()}else for(;null!==xf;)xf=Qf(xf)}function Jf(e,t,r){kf&&n(!1,"renderRoot was called recursively. This error is likely caused by a bug in React. Please file an issue."),kf=!0,t===Nf&&e===Pf&&null!==xf||(zf(),Nf=t,Mf=-1,xf=sd((Pf=e).current,null,Nf),e.pendingCommitExpirationTime=Vu);var i=!1;for(Df=!r||Nf<=_f,function(e){if(Rc){if(Hc=e,!qc)return;Xc=0,nu("(React Tree Reconciliation)"),hu()}}(xf);;){try{Xf(r)}catch(t){if(Vc&&Np(),null===xf)i=!0,Lm(t);else{Vd(),Wc&&Lf(xf,t,r),null===xf&&n(!1,"Failed to replay rendering after an error. This is likely caused by a bug in React. Please file an issue with a reproducing case to help us find it.");var a=xf,o=a.return;if(null===o){i=!0,Lm(t);break}uf(e,o,a,t,0,Nf,Sf),xf=Yf(a)}}break}var s,l=!1;if(kf=!1,i)return wu(Uf,l),Uf=null,Su=-1,Eu.length=0,_u.length=0,null;if(null===xf){if(If)return wu(Uf,l=!0),Uf=null,e.pendingCommitExpirationTime=t,e.current.alternate;wu(Uf,l),Uf=null,Df&&n(!1,"Expired work should have completed. This error is likely caused by a bug in React. Please file an issue."),function(e,t){if(Fc){var n=e.earliestPendingTime,r=e.latestPendingTime;n===t?e.earliestPendingTime=r===t?e.latestPendingTime=Vu:r:r===t&&(e.latestPendingTime=n);var i=e.latestSuspendedTime;i===t&&(e.latestPingedTime=Vu);var a=e.earliestSuspendedTime;a===Vu?e.earliestSuspendedTime=e.latestSuspendedTime=t:a>t?e.earliestSuspendedTime=t:i<t&&(e.latestSuspendedTime=t)}}(e,t),Mf>=0&&setTimeout(function(){rm(e,t)},Mf);var c=Rd(e);return s=c,null===hm&&n(!1,"Should be working on a root. This error is likely caused by a bug in React. Please file an issue."),hm.remainingExpirationTime=s,null}return wu(Uf,l),Uf=null,null}function Zf(e,t){return function(e,t,r){kf&&!Of&&n(!1,"dispatch: Cannot dispatch during the render phase.");for(var i=e.return;null!==i;){switch(i.tag){case J:var a=i.type,o=i.stateNode;if("function"==typeof a.getDerivedStateFromCatch||"function"==typeof o.componentDidCatch&&!Kf(o))return $d(i,lf(i,rp(t,e),r),r),void im(i,r);break;case Z:return $d(i,sf(i,rp(t,e),r),r),void im(i,r)}i=i.return}if(e.tag===Z){var s=e;$d(s,sf(s,rp(t,s),r),r),im(s,r)}}(e,t,qu)}function em(e){return Qu(e,5e3,250)}function tm(){var e=em(am());return e<=Tf&&(e=Tf+1),Tf=e}function nm(e,t){var n=void 0;return n=Cf!==Vu?Cf:kf?Of?qu:Nf:t.mode&Ju?_m?function(e){return Qu(e,500,100)}(e):em(e):qu,_m&&(mm===Vu||n>mm)&&(mm=n),n}function rm(e,t){!function(e,t){if(Fc){var n=e.latestSuspendedTime;if(n!==Vu&&n<=t){var r=e.latestPingedTime;(r===Vu||r<t)&&(e.latestPingedTime=t)}}}(e,t);var n=Rd(e);n!==Vu&&function(e,t){(e.remainingExpirationTime===Vu||e.remainingExpirationTime<t)&&Pm(e,t)}(e,n)}function im(e,t){if(Rc&&($c&&(Yc=!0),null!==Kc&&"componentWillMount"!==Kc&&"componentWillReceiveProps"!==Kc&&(Qc=!0)),e.tag===J){var r=e.stateNode;yf(r)}for(var i=e;null!==i;){if((i.expirationTime===Vu||i.expirationTime>t)&&(i.expirationTime=t),null!==i.alternate&&(i.alternate.expirationTime===Vu||i.alternate.expirationTime>t)&&(i.alternate.expirationTime=t),null===i.return){if(i.tag!==Z)return void(e.tag===J&&bf(e));var a=i.stateNode;!kf&&Nf!==Vu&&t<Nf&&(Uf=e,zf()),Id(a,t);var o=Rd(a);kf&&!Of&&Pf===a||Pm(a,o),Cm>Tm&&n(!1,"Maximum update depth exceeded. This can happen when a component repeatedly calls setState inside componentWillUpdate or componentDidUpdate. React limits the number of nested updates to prevent infinite loops.")}i=i.return}}function am(){return Sf=_c()-Ef,_f=$u(Sf)}function om(e){var t=Cf,n=am();Cf=em(n);try{return e()}finally{Cf=t}}function sm(e,t,n,r,i){var a=Cf;Cf=qu;try{return e(t,n,r,i)}finally{Cf=a}}Wc&&(Ff=null,jf=!1,Wf=null,Lf=function(e,t,n){if(null===t||"object"!=typeof t||"function"!=typeof t.then)if(null!==Ff){switch(pd(e,Ff),e.tag){case Z:vp(e),Fu(e);break;case te:wp(e);break;case J:Uu(e);break;case ee:vp(e);break;case oe:cp(e)}jf=!0,Wf=t,hf(null,Xf,null,n),jf=!1,Wf=null,ff()?(mf(),Vc&&(e.mode&ed&&kp(e),Np())):xf=e}else i(!1,"Could not replay rendering after an error. This is likely a bug in React. Please file an issue.")},Bf=function(){throw Wf});var lm=null,cm=null,um=Vu,dm=void 0,pm=!1,hm=null,fm=Vu,mm=Vu,gm=!1,vm=!1,bm=null,ym=null,wm=!1,Em=!1,_m=!1,Sm=null,Tm=1e3,Cm=0,km=1;function xm(e){if(um!==Vu){if(e>um)return;null!==dm&&Cc(dm)}else Rc&&qc&&!Zc&&(Zc=!0,nu("(Waiting for async callback...)"));var t=_c()-Ef,n=Yu(e);um=e,dm=Tc(Mm,{timeout:n-t})}function Pm(e,t){!function(e,t){if(null===e.nextScheduledRoot)e.remainingExpirationTime=t,null===cm?(lm=cm=e,e.nextScheduledRoot=e):(cm.nextScheduledRoot=e,(cm=e).nextScheduledRoot=lm);else{var n=e.remainingExpirationTime;(n===Vu||t<n)&&(e.remainingExpirationTime=t)}}(e,t),pm||(wm?Em&&(hm=e,fm=qu,Rm(e,qu,!1)):t===qu?Dm():xm(t))}function Nm(){var e=Vu,t=null;if(null!==cm)for(var r=cm,i=lm;null!==i;){var a=i.remainingExpirationTime;if(a===Vu){if((null===r||null===cm)&&n(!1,"Should have a previous and last root. This error is likely caused by a bug in React. Please file an issue."),i===i.nextScheduledRoot){i.nextScheduledRoot=null,lm=cm=null;break}if(i===lm){var o=i.nextScheduledRoot;lm=o,cm.nextScheduledRoot=o,i.nextScheduledRoot=null}else{if(i===cm){(cm=r).nextScheduledRoot=lm,i.nextScheduledRoot=null;break}r.nextScheduledRoot=i.nextScheduledRoot,i.nextScheduledRoot=null}i=r.nextScheduledRoot}else{if((e===Vu||a<e)&&(e=a,t=i),i===cm)break;r=i,i=i.nextScheduledRoot}}null!==hm&&hm===t&&e===qu?Cm++:Cm=0,hm=t,fm=e}function Mm(e){Am(Vu,!0,e)}function Dm(){Am(qu,!1,null)}function Am(e,t,n){(ym=n,Nm(),Vc&&xp(),Rc&&null!==ym)&&function(e,t){Rc&&qc&&(Zc=!1,ru("(Waiting for async callback... will force flush in "+t+" ms)","(Waiting for async callback...)",e?"React was blocked by main thread":null))}(fm<am(),Yu(fm));if(t)for(;null!==hm&&fm!==Vu&&(e===Vu||e>=fm)&&(!gm||am()>=fm);)am(),Rm(hm,fm,!gm),Nm();else for(;null!==hm&&fm!==Vu&&(e===Vu||e>=fm);)Rm(hm,fm,!1),Nm();null!==ym&&(um=Vu,dm=null),fm!==Vu&&xm(fm),ym=null,gm=!1,Im()}function Om(e,t){pm&&n(!1,"work.commit(): Cannot commit while already rendering. This likely means you attempted to commit from inside a lifecycle method."),hm=e,fm=t,Rm(e,t,!1),Dm(),Im()}function Im(){if(Cm=0,null!==Sm){var e=Sm;Sm=null;for(var t=0;t<e.length;t++){var n=e[t];try{n._onComplete()}catch(r){vm||(vm=!0,bm=r)}}}if(vm){var r=bm;throw bm=null,vm=!1,r}}function Rm(e,t,r){if(pm&&n(!1,"performWorkOnRoot was called recursively. This error is likely caused by a bug in React. Please file an issue."),pm=!0,r){var i=e.finishedWork;null!==i?Um(e,i,t):null!==(i=Jf(e,t,!0))&&(Fm()?(e.finishedWork=i,Vc&&Cp()):Um(e,i,t))}else{var a=e.finishedWork;null!==a?Um(e,a,t):null!==(a=Jf(e,t,!1))&&Um(e,a,t)}pm=!1}function Um(e,t,n){var r=e.firstBatch;if(null!==r&&r._expirationTime<=n&&(null===Sm?Sm=[r]:Sm.push(r),r._defer))return e.finishedWork=t,void(e.remainingExpirationTime=Vu);e.finishedWork=null,e.remainingExpirationTime=Gf(t)}function Fm(){return null!==ym&&(!(ym.timeRemaining()>km)&&(gm=!0,!0))}function Lm(e){null===hm&&n(!1,"Should be working on a root. This error is likely caused by a bug in React. Please file an issue."),hm.remainingExpirationTime=Vu,vm||(vm=!0,bm=e)}function jm(e,t){var n=wm;wm=!0;try{return e(t)}finally{(wm=n)||pm||Dm()}}function Wm(e,t){if(wm&&!Em){Em=!0;try{return e(t)}finally{Em=!1}}return e(t)}function Bm(e,t){pm&&n(!1,"flushSync was called from inside a lifecycle method. It cannot be called when React is already rendering.");var r=wm;wm=!0;try{return sm(e,t)}finally{wm=r,Dm()}}function zm(e,t,n){if(_m)return e(t,n);wm||pm||mm===Vu||(Am(mm,!1,null),mm=Vu);var r=_m,i=wm;_m=!0,wm=!0;try{return e(t,n)}finally{_m=r,(wm=i)||pm||Dm()}}function Vm(e){var t=wm;wm=!0;try{sm(e)}finally{(wm=t)||pm||Am(qu,!1,null)}}var qm=void 0;function Hm(e){if(!e)return p;var t=ea(e),r=function(e){ya(e)&&e.tag===J||n(!1,"Expected subtree parent to be a mounted class component. This error is likely caused by a bug in React. Please file an issue.");for(var t=e;t.tag!==Z;){if(Ru(t))return t.stateNode.__reactInternalMemoizedMergedChildContext;var r=t.return;r||n(!1,"Found unexpected detached subtree parent. This error is likely caused by a bug in React. Please file an issue."),t=r}return t.stateNode.context}(t);return Ru(t)?ju(t,r):r}function Km(e,t,n,r,a){var o=t.current;Od.debugTool&&(null===o.alternate?Od.debugTool.onMountContainer(t):null===e?Od.debugTool.onUnmountContainer(t):Od.debugTool.onUpdateContainer(t));var s=Hm(n);return null===t.context?t.context=s:t.pendingContext=s,function(e,t,n,r){"render"!==Br.phase||null===Br.current||qm||(qm=!0,i(!1,"Render methods should be a pure function of props and state; triggering nested component updates from render is not allowed. If necessary, trigger nested updates in componentDidUpdate.\n\nCheck the render method of %s.",Fr(Br.current)||"Unknown"));var a=Kd(n);return a.payload={element:t},null!==(r=void 0===r?null:r)&&("function"!=typeof r&&i(!1,"render(...): Expected the last optional `callback` argument to be a function. Instead received: %s.",r),a.callback=r),$d(e,a,n),im(e,n),n}(o,e,r,a)}function Gm(e){var t=ea(e);void 0===t&&("function"==typeof e.render?n(!1,"Unable to find node on an unmounted component."):n(!1,"Argument appears to not be a ReactComponent. Keys: %s",Object.keys(e)));var r=_a(t);return null===r?null:r.stateNode}function $m(e,t,n){return hd(e,t,n)}function Ym(e,t,n,r){var i=t.current;return Km(e,t,n,nm(am(),i),r)}function Qm(e){var t=e.current;if(!t.child)return null;switch(t.child.tag){case te:return vc(t.child.stateNode);default:return t.child.stateNode}}function Xm(e){var t=function(e){var t=Ea(e);if(!t)return null;for(var n=t;;){if(n.tag===te||n.tag===ne)return n;if(n.child&&n.tag!==ee)n.child.return=n,n=n.child;else{if(n===t)return null;for(;!n.sibling;){if(!n.return||n.return===t)return null;n=n.return}n.sibling.return=n.return,n=n.sibling}}return null}(e);return null===t?null:t.stateNode}function Jm(e){var t=e.findFiberByHostInstance;return function(e){if("undefined"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__)return!1;var t=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(t.isDisabled)return!0;if(!t.supportsFiber)return i(!1,"The installed version of React DevTools is too old and will not work with the current version of React. Please update React DevTools. https://fb.me/react-devtools"),!0;try{var n=t.inject(e);fd=vd(function(e){return t.onCommitFiberRoot(n,e)}),md=vd(function(e){return t.onCommitFiberUnmount(n,e)})}catch(e){i(!1,"React DevTools encountered an error: %s.",e)}return!0}(o({},e,{findHostInstanceByFiber:function(e){var t=_a(e);return null===t?null:t.stateNode},findFiberByHostInstance:function(e){return t?t(e):null}}))}qm=!1;var Zm=Object.freeze({updateContainerAtExpirationTime:Km,createContainer:$m,updateContainer:Ym,flushRoot:Om,requestWork:Pm,computeUniqueAsyncExpiration:tm,batchedUpdates:jm,unbatchedUpdates:Wm,deferredUpdates:om,syncUpdates:sm,interactiveUpdates:zm,flushInteractiveUpdates:function(){pm||mm===Vu||(Am(mm,!1,null),mm=Vu)},flushControlled:Vm,flushSync:Bm,getPublicRootInstance:Qm,findHostInstance:Gm,findHostInstanceWithNoPortals:Xm,injectIntoDevTools:Jm});var eg,tg=void 0,ng=!1;function rg(e){var t=tm();this._expirationTime=t,this._root=e,this._next=null,this._callbacks=null,this._didComplete=!1,this._hasChildren=!1,this._children=null,this._defer=!0}function ig(){this._callbacks=null,this._didCommit=!1,this._onCommit=this._onCommit.bind(this)}function ag(e,t,n){var r=$m(e,t,n);this._internalRoot=r}function og(e){return!(!e||e.nodeType!==lr&&e.nodeType!==dr&&e.nodeType!==pr&&(e.nodeType!==ur||" react-mount-point-unstable "!==e.nodeValue))}function sg(e){return e?e.nodeType===dr?e.documentElement:e.firstChild:null}"function"==typeof Map&&null!=Map.prototype&&"function"==typeof Map.prototype.forEach&&"function"==typeof Set&&null!=Set.prototype&&"function"==typeof Set.prototype.clear&&"function"==typeof Set.prototype.forEach||i(!1,"React depends on Map and Set built-in types. Make sure that you load a polyfill in older browsers. https://fb.me/react-polyfills"),tg=function(e){if(e._reactRootContainer&&e.nodeType!==ur){var t=Xm(e._reactRootContainer._internalRoot.current);t&&t.parentNode!==e&&i(!1,"render(...): It looks like the React-rendered content of this container was removed without using React. This is not supported and will cause errors. Instead, call ReactDOM.unmountComponentAtNode to empty a container.")}var n=!!e._reactRootContainer,r=sg(e);!(!r||!me(r))&&!n&&i(!1,"render(...): Replacing React-rendered children with a new root component. If you intended to update the children of this node, you should instead have the existing children update their state and render the new components instead of calling ReactDOM.render."),e.nodeType===lr&&e.tagName&&"BODY"===e.tagName.toUpperCase()&&i(!1,"render(): Rendering components directly into document.body is discouraged, since its children are often manipulated by third-party scripts and browser extensions. This may lead to subtle reconciliation issues. Try rendering into a container element created for your app.")},eg=function(e,t){null!==e&&"function"!=typeof e&&i(!1,"%s(...): Expected the last optional `callback` argument to be a function. Instead received: %s.",t,e)},Yn.injectFiberControlledHostComponent(Ul),rg.prototype.render=function(e){this._defer||n(!1,"batch.render: Cannot render a batch that already committed."),this._hasChildren=!0,this._children=e;var t=this._root._internalRoot,r=this._expirationTime,i=new ig;return Km(e,t,null,r,i._onCommit),i},rg.prototype.then=function(e){if(this._didComplete)e();else{var t=this._callbacks;null===t&&(t=this._callbacks=[]),t.push(e)}},rg.prototype.commit=function(){var e=this._root._internalRoot,t=e.firstBatch;if(this._defer&&null!==t||n(!1,"batch.commit: Cannot commit a batch multiple times."),!this._hasChildren)return this._next=null,void(this._defer=!1);var r=this._expirationTime;if(t!==this){this._hasChildren&&(r=this._expirationTime=t._expirationTime,this.render(this._children));for(var i=null,a=t;a!==this;)i=a,a=a._next;null===i&&n(!1,"batch.commit: Cannot commit a batch multiple times."),i._next=a._next,this._next=t,t=e.firstBatch=this}this._defer=!1,Om(e,r);var o=this._next;this._next=null,null!==(t=e.firstBatch=o)&&t._hasChildren&&t.render(t._children)},rg.prototype._onComplete=function(){if(!this._didComplete){this._didComplete=!0;var e=this._callbacks;if(null!==e)for(var t=0;t<e.length;t++){(0,e[t])()}}},ig.prototype.then=function(e){if(this._didCommit)e();else{var t=this._callbacks;null===t&&(t=this._callbacks=[]),t.push(e)}},ig.prototype._onCommit=function(){if(!this._didCommit){this._didCommit=!0;var e=this._callbacks;if(null!==e)for(var t=0;t<e.length;t++){var r=e[t];"function"!=typeof r&&n(!1,"Invalid argument passed as callback. Expected a function. Instead received: %s",r),r()}}},ag.prototype.render=function(e,t){var n=this._internalRoot,r=new ig;return eg(t=void 0===t?null:t,"render"),null!==t&&r.then(t),Ym(e,n,null,r._onCommit),r},ag.prototype.unmount=function(e){var t=this._internalRoot,n=new ig;return eg(e=void 0===e?null:e,"render"),null!==e&&n.then(e),Ym(null,t,null,n._onCommit),n},ag.prototype.legacy_renderSubtreeIntoContainer=function(e,t,n){var r=this._internalRoot,i=new ig;return eg(n=void 0===n?null:n,"render"),null!==n&&i.then(n),Ym(t,r,e,i._onCommit),i},ag.prototype.createBatch=function(){var e=new rg(this),t=e._expirationTime,n=this._internalRoot,r=n.firstBatch;if(null===r)n.firstBatch=e,e._next=null;else{for(var i=null,a=r;null!==a&&a._expirationTime<=t;)i=a,a=a._next;e._next=a,null!==i&&(i._next=e)}return e},ar(Zm);var lg=!1;function cg(e,t){var n=t||function(e){var t=sg(e);return!(!t||t.nodeType!==lr||!t.hasAttribute(Qr))}(e);if(!n)for(var r=!1,a=void 0;a=e.lastChild;)!r&&a.nodeType===lr&&a.hasAttribute(Qr)&&(r=!0,i(!1,"render(): Target node has markup rendered by React, but there are unrelated nodes as well. This is most commonly caused by white-space inserted around server-rendered markup.")),e.removeChild(a);!n||t||lg||(lg=!0,wd(!1,"render(): Calling ReactDOM.render() to hydrate server-rendered markup will stop working in React v17. Replace the ReactDOM.render() call with ReactDOM.hydrate() if you want React to attach to the server HTML."));return new ag(e,!1,n)}function ug(e,t,r,i,a){og(r)||n(!1,"Target container is not a DOM element."),tg(r);var o=r._reactRootContainer;if(o){if("function"==typeof a){var s=a;a=function(){var e=Qm(o._internalRoot);s.call(e)}}null!=e?o.legacy_renderSubtreeIntoContainer(e,t,a):o.render(t,a)}else{if(o=r._reactRootContainer=cg(r,i),"function"==typeof a){var l=a;a=function(){var e=Qm(o._internalRoot);l.call(e)}}Wm(function(){null!=e?o.legacy_renderSubtreeIntoContainer(e,t,a):o.render(t,a)})}return Qm(o._internalRoot)}function dg(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;return og(t)||n(!1,"Target container is not a DOM element."),function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;return{$$typeof:Cr,key:null==r?null:""+r,children:e,containerInfo:t,implementation:n}}(e,t,null,r)}var pg={createPortal:dg,findDOMNode:function(e){var t=wr.current;null!==t&&null!==t.stateNode&&(t.stateNode._warnedAboutRefsInRender||i(!1,"%s is accessing findDOMNode inside its render(). render() should be a pure function of props and state. It should never access something that requires stale data from the previous render, such as refs. Move this logic to componentDidMount and componentDidUpdate instead.",Fr(t)||"A component"),t.stateNode._warnedAboutRefsInRender=!0);return null==e?null:e.nodeType===lr?e:Gm(e)},hydrate:function(e,t,n){return ug(null,e,t,!0,n)},render:function(e,t,n){return ug(null,e,t,!1,n)},unstable_renderSubtreeIntoContainer:function(e,t,r,i){return(null==e||void 0===e._reactInternalFiber)&&n(!1,"parentComponent must be a valid React Component"),ug(e,t,r,!1,i)},unmountComponentAtNode:function(e){if(og(e)||n(!1,"unmountComponentAtNode(...): Target container is not a DOM element."),e._reactRootContainer){var t=sg(e);return t&&!me(t)&&i(!1,"unmountComponentAtNode(): The node you're attempting to unmount was rendered by another copy of React."),Wm(function(){ug(null,null,e,!1,function(){e._reactRootContainer=null})}),!0}var r=sg(e),a=!(!r||!me(r)),o=1===e.nodeType&&og(e.parentNode)&&!!e.parentNode._reactRootContainer;return a&&i(!1,"unmountComponentAtNode(): The node you're attempting to unmount was rendered by React and is not a top-level container. %s",o?"You may have accidentally passed in a React root node instead of its container.":"Instead, have the parent component update its state and rerender in order to remove this component."),!1},unstable_createPortal:function(){return ng||(ng=!0,wd(!1,'The ReactDOM.unstable_createPortal() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactDOM.createPortal() instead. It has the exact same API, but without the "unstable_" prefix.')),dg.apply(void 0,arguments)},unstable_batchedUpdates:jm,unstable_deferredUpdates:om,unstable_interactiveUpdates:zm,flushSync:Bm,unstable_flushControlled:Vm,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:{EventPluginHub:Y,EventPluginRegistry:A,EventPropagators:Me,ReactControlledComponent:Zn,ReactDOMComponentTree:ye,ReactDOMEventListener:Ja},unstable_createRoot:function(e,t){return new ag(e,!0,null!=t&&!0===t.hydrate)}};if(!Jm({findFiberByHostInstance:fe,bundleType:1,version:"16.4.2",rendererPackageName:"react-dom"})&&a.canUseDOM&&window.top===window.self&&(navigator.userAgent.indexOf("Chrome")>-1&&-1===navigator.userAgent.indexOf("Edge")||navigator.userAgent.indexOf("Firefox")>-1)){var hg=window.location.protocol;/^(https?|file):$/.test(hg)&&console.info("%cDownload the React DevTools for a better development experience: https://fb.me/react-devtools"+("file:"===hg?"\nYou might need to use a local HTTP server (instead of file://): https://fb.me/react-devtools-faq":""),"font-weight:bold")}var fg=Object.freeze({default:pg}),mg=fg&&pg||fg,gg=mg.default?mg.default:mg;t.exports=gg}()}).call(this,e("_process"))},{_process:36,"fbjs/lib/ExecutionEnvironment":5,"fbjs/lib/camelizeStyleName":7,"fbjs/lib/containsNode":8,"fbjs/lib/emptyFunction":9,"fbjs/lib/emptyObject":10,"fbjs/lib/getActiveElement":11,"fbjs/lib/hyphenateStyleName":13,"fbjs/lib/invariant":14,"fbjs/lib/shallowEqual":17,"fbjs/lib/warning":18,"object-assign":21,"prop-types/checkPropTypes":22,react:29}],25:[function(e,t,n){"use strict";var r=e("fbjs/lib/invariant"),i=e("react"),a=e("fbjs/lib/ExecutionEnvironment"),o=e("object-assign"),s=e("fbjs/lib/emptyFunction"),l=e("fbjs/lib/getActiveElement"),c=e("fbjs/lib/shallowEqual"),u=e("fbjs/lib/containsNode"),d=e("fbjs/lib/emptyObject");function p(e){for(var t=arguments.length-1,n="https://reactjs.org/docs/error-decoder.html?invariant="+e,i=0;i<t;i++)n+="&args[]="+encodeURIComponent(arguments[i+1]);r(!1,"Minified React error #"+e+"; visit %s for the full message or use the non-minified dev environment for full errors and additional helpful warnings. ",n)}i||p("227");var h={_caughtError:null,_hasCaughtError:!1,_rethrowError:null,_hasRethrowError:!1,invokeGuardedCallback:function(e,t,n,r,i,a,o,s,l){(function(e,t,n,r,i,a,o,s,l){this._hasCaughtError=!1,this._caughtError=null;var c=Array.prototype.slice.call(arguments,3);try{t.apply(n,c)}catch(e){this._caughtError=e,this._hasCaughtError=!0}}).apply(h,arguments)},invokeGuardedCallbackAndCatchFirstError:function(e,t,n,r,i,a,o,s,l){if(h.invokeGuardedCallback.apply(this,arguments),h.hasCaughtError()){var c=h.clearCaughtError();h._hasRethrowError||(h._hasRethrowError=!0,h._rethrowError=c)}},rethrowCaughtError:function(){return function(){if(h._hasRethrowError){var e=h._rethrowError;throw h._rethrowError=null,h._hasRethrowError=!1,e}}.apply(h,arguments)},hasCaughtError:function(){return h._hasCaughtError},clearCaughtError:function(){if(h._hasCaughtError){var e=h._caughtError;return h._caughtError=null,h._hasCaughtError=!1,e}p("198")}};var f=null,m={};function g(){if(f)for(var e in m){var t=m[e],n=f.indexOf(e);if(-1<n||p("96",e),!b[n])for(var r in t.extractEvents||p("97",e),b[n]=t,n=t.eventTypes){var i=void 0,a=n[r],o=t,s=r;y.hasOwnProperty(s)&&p("99",s),y[s]=a;var l=a.phasedRegistrationNames;if(l){for(i in l)l.hasOwnProperty(i)&&v(l[i],o,s);i=!0}else a.registrationName?(v(a.registrationName,o,s),i=!0):i=!1;i||p("98",r,e)}}}function v(e,t,n){w[e]&&p("100",e),w[e]=t,E[e]=t.eventTypes[n].dependencies}var b=[],y={},w={},E={};function _(e){f&&p("101"),f=Array.prototype.slice.call(e),g()}function S(e){var t,n=!1;for(t in e)if(e.hasOwnProperty(t)){var r=e[t];m.hasOwnProperty(t)&&m[t]===r||(m[t]&&p("102",t),m[t]=r,n=!0)}n&&g()}var T={plugins:b,eventNameDispatchConfigs:y,registrationNameModules:w,registrationNameDependencies:E,possibleRegistrationNames:null,injectEventPluginOrder:_,injectEventPluginsByName:S},C=null,k=null,x=null;function P(e,t,n,r){t=e.type||"unknown-event",e.currentTarget=x(r),h.invokeGuardedCallbackAndCatchFirstError(t,n,void 0,e),e.currentTarget=null}function N(e,t){return null==t&&p("30"),null==e?t:Array.isArray(e)?Array.isArray(t)?(e.push.apply(e,t),e):(e.push(t),e):Array.isArray(t)?[e].concat(t):[e,t]}function M(e,t,n){Array.isArray(e)?e.forEach(t,n):e&&t.call(n,e)}var D=null;function A(e,t){if(e){var n=e._dispatchListeners,r=e._dispatchInstances;if(Array.isArray(n))for(var i=0;i<n.length&&!e.isPropagationStopped();i++)P(e,t,n[i],r[i]);else n&&P(e,t,n,r);e._dispatchListeners=null,e._dispatchInstances=null,e.isPersistent()||e.constructor.release(e)}}function O(e){return A(e,!0)}function I(e){return A(e,!1)}var R={injectEventPluginOrder:_,injectEventPluginsByName:S};function U(e,t){var n=e.stateNode;if(!n)return null;var r=C(n);if(!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":(r=!r.disabled)||(r=!("button"===(e=e.type)||"input"===e||"select"===e||"textarea"===e)),e=!r;break e;default:e=!1}return e?null:(n&&"function"!=typeof n&&p("231",t,typeof n),n)}function F(e,t){null!==e&&(D=N(D,e)),e=D,D=null,e&&(M(e,t?O:I),D&&p("95"),h.rethrowCaughtError())}function L(e,t,n,r){for(var i=null,a=0;a<b.length;a++){var o=b[a];o&&(o=o.extractEvents(e,t,n,r))&&(i=N(i,o))}F(i,!1)}var j={injection:R,getListener:U,runEventsInBatch:F,runExtractedEventsInBatch:L},W=Math.random().toString(36).slice(2),B="__reactInternalInstance$"+W,z="__reactEventHandlers$"+W;function V(e){if(e[B])return e[B];for(;!e[B];){if(!e.parentNode)return null;e=e.parentNode}return 5===(e=e[B]).tag||6===e.tag?e:null}function q(e){if(5===e.tag||6===e.tag)return e.stateNode;p("33")}function H(e){return e[z]||null}var K={precacheFiberNode:function(e,t){t[B]=e},getClosestInstanceFromNode:V,getInstanceFromNode:function(e){return!(e=e[B])||5!==e.tag&&6!==e.tag?null:e},getNodeFromInstance:q,getFiberCurrentPropsFromNode:H,updateFiberProps:function(e,t){e[z]=t}};function G(e){do{e=e.return}while(e&&5!==e.tag);return e||null}function $(e,t,n){for(var r=[];e;)r.push(e),e=G(e);for(e=r.length;0<e--;)t(r[e],"captured",n);for(e=0;e<r.length;e++)t(r[e],"bubbled",n)}function Y(e,t,n){(t=U(e,n.dispatchConfig.phasedRegistrationNames[t]))&&(n._dispatchListeners=N(n._dispatchListeners,t),n._dispatchInstances=N(n._dispatchInstances,e))}function Q(e){e&&e.dispatchConfig.phasedRegistrationNames&&$(e._targetInst,Y,e)}function X(e){if(e&&e.dispatchConfig.phasedRegistrationNames){var t=e._targetInst;$(t=t?G(t):null,Y,e)}}function J(e,t,n){e&&n&&n.dispatchConfig.registrationName&&(t=U(e,n.dispatchConfig.registrationName))&&(n._dispatchListeners=N(n._dispatchListeners,t),n._dispatchInstances=N(n._dispatchInstances,e))}function Z(e){e&&e.dispatchConfig.registrationName&&J(e._targetInst,null,e)}function ee(e){M(e,Q)}function te(e,t,n,r){if(n&&r)e:{for(var i=n,a=r,o=0,s=i;s;s=G(s))o++;s=0;for(var l=a;l;l=G(l))s++;for(;0<o-s;)i=G(i),o--;for(;0<s-o;)a=G(a),s--;for(;o--;){if(i===a||i===a.alternate)break e;i=G(i),a=G(a)}i=null}else i=null;for(a=i,i=[];n&&n!==a&&(null===(o=n.alternate)||o!==a);)i.push(n),n=G(n);for(n=[];r&&r!==a&&(null===(o=r.alternate)||o!==a);)n.push(r),r=G(r);for(r=0;r<i.length;r++)J(i[r],"bubbled",e);for(e=n.length;0<e--;)J(n[e],"captured",t)}var ne={accumulateTwoPhaseDispatches:ee,accumulateTwoPhaseDispatchesSkipTarget:function(e){M(e,X)},accumulateEnterLeaveDispatches:te,accumulateDirectDispatches:function(e){M(e,Z)}};function re(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n["ms"+e]="MS"+t,n["O"+e]="o"+t.toLowerCase(),n}var ie={animationend:re("Animation","AnimationEnd"),animationiteration:re("Animation","AnimationIteration"),animationstart:re("Animation","AnimationStart"),transitionend:re("Transition","TransitionEnd")},ae={},oe={};function se(e){if(ae[e])return ae[e];if(!ie[e])return e;var t,n=ie[e];for(t in n)if(n.hasOwnProperty(t)&&t in oe)return ae[e]=n[t];return e}a.canUseDOM&&(oe=document.createElement("div").style,"AnimationEvent"in window||(delete ie.animationend.animation,delete ie.animationiteration.animation,delete ie.animationstart.animation),"TransitionEvent"in window||delete ie.transitionend.transition);var le=se("animationend"),ce=se("animationiteration"),ue=se("animationstart"),de=se("transitionend"),pe="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),he=null;function fe(){return!he&&a.canUseDOM&&(he="textContent"in document.documentElement?"textContent":"innerText"),he}var me={_root:null,_startText:null,_fallbackText:null};function ge(){if(me._fallbackText)return me._fallbackText;var e,t,n=me._startText,r=n.length,i=ve(),a=i.length;for(e=0;e<r&&n[e]===i[e];e++);var o=r-e;for(t=1;t<=o&&n[r-t]===i[a-t];t++);return me._fallbackText=i.slice(e,1<t?1-t:void 0),me._fallbackText}function ve(){return"value"in me._root?me._root.value:me._root[fe()]}var be="dispatchConfig _targetInst nativeEvent isDefaultPrevented isPropagationStopped _dispatchListeners _dispatchInstances".split(" "),ye={type:null,target:null,currentTarget:s.thatReturnsNull,eventPhase:null,bubbles:null,cancelable:null,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:null,isTrusted:null};function we(e,t,n,r){for(var i in this.dispatchConfig=e,this._targetInst=t,this.nativeEvent=n,e=this.constructor.Interface)e.hasOwnProperty(i)&&((t=e[i])?this[i]=t(n):"target"===i?this.target=r:this[i]=n[i]);return this.isDefaultPrevented=(null!=n.defaultPrevented?n.defaultPrevented:!1===n.returnValue)?s.thatReturnsTrue:s.thatReturnsFalse,this.isPropagationStopped=s.thatReturnsFalse,this}function Ee(e,t,n,r){if(this.eventPool.length){var i=this.eventPool.pop();return this.call(i,e,t,n,r),i}return new this(e,t,n,r)}function _e(e){e instanceof this||p("223"),e.destructor(),10>this.eventPool.length&&this.eventPool.push(e)}function Se(e){e.eventPool=[],e.getPooled=Ee,e.release=_e}o(we.prototype,{preventDefault:function(){this.defaultPrevented=!0;var e=this.nativeEvent;e&&(e.preventDefault?e.preventDefault():"unknown"!=typeof e.returnValue&&(e.returnValue=!1),this.isDefaultPrevented=s.thatReturnsTrue)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():"unknown"!=typeof e.cancelBubble&&(e.cancelBubble=!0),this.isPropagationStopped=s.thatReturnsTrue)},persist:function(){this.isPersistent=s.thatReturnsTrue},isPersistent:s.thatReturnsFalse,destructor:function(){var e,t=this.constructor.Interface;for(e in t)this[e]=null;for(t=0;t<be.length;t++)this[be[t]]=null}}),we.Interface=ye,we.extend=function(e){function t(){}function n(){return r.apply(this,arguments)}var r=this;t.prototype=r.prototype;var i=new t;return o(i,n.prototype),n.prototype=i,n.prototype.constructor=n,n.Interface=o({},r.Interface,e),n.extend=r.extend,Se(n),n},Se(we);var Te=we.extend({data:null}),Ce=we.extend({data:null}),ke=[9,13,27,32],xe=a.canUseDOM&&"CompositionEvent"in window,Pe=null;a.canUseDOM&&"documentMode"in document&&(Pe=document.documentMode);var Ne=a.canUseDOM&&"TextEvent"in window&&!Pe,Me=a.canUseDOM&&(!xe||Pe&&8<Pe&&11>=Pe),De=String.fromCharCode(32),Ae={beforeInput:{phasedRegistrationNames:{bubbled:"onBeforeInput",captured:"onBeforeInputCapture"},dependencies:["compositionend","keypress","textInput","paste"]},compositionEnd:{phasedRegistrationNames:{bubbled:"onCompositionEnd",captured:"onCompositionEndCapture"},dependencies:"blur compositionend keydown keypress keyup mousedown".split(" ")},compositionStart:{phasedRegistrationNames:{bubbled:"onCompositionStart",captured:"onCompositionStartCapture"},dependencies:"blur compositionstart keydown keypress keyup mousedown".split(" ")},compositionUpdate:{phasedRegistrationNames:{bubbled:"onCompositionUpdate",captured:"onCompositionUpdateCapture"},dependencies:"blur compositionupdate keydown keypress keyup mousedown".split(" ")}},Oe=!1;function Ie(e,t){switch(e){case"keyup":return-1!==ke.indexOf(t.keyCode);case"keydown":return 229!==t.keyCode;case"keypress":case"mousedown":case"blur":return!0;default:return!1}}function Re(e){return"object"==typeof(e=e.detail)&&"data"in e?e.data:null}var Ue=!1;var Fe={eventTypes:Ae,extractEvents:function(e,t,n,r){var i=void 0,a=void 0;if(xe)e:{switch(e){case"compositionstart":i=Ae.compositionStart;break e;case"compositionend":i=Ae.compositionEnd;break e;case"compositionupdate":i=Ae.compositionUpdate;break e}i=void 0}else Ue?Ie(e,n)&&(i=Ae.compositionEnd):"keydown"===e&&229===n.keyCode&&(i=Ae.compositionStart);return i?(Me&&(Ue||i!==Ae.compositionStart?i===Ae.compositionEnd&&Ue&&(a=ge()):(me._root=r,me._startText=ve(),Ue=!0)),i=Te.getPooled(i,t,n,r),a?i.data=a:null!==(a=Re(n))&&(i.data=a),ee(i),a=i):a=null,(e=Ne?function(e,t){switch(e){case"compositionend":return Re(t);case"keypress":return 32!==t.which?null:(Oe=!0,De);case"textInput":return(e=t.data)===De&&Oe?null:e;default:return null}}(e,n):function(e,t){if(Ue)return"compositionend"===e||!xe&&Ie(e,t)?(e=ge(),me._root=null,me._startText=null,me._fallbackText=null,Ue=!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 Me?null:t.data;default:return null}}(e,n))?((t=Ce.getPooled(Ae.beforeInput,t,n,r)).data=e,ee(t)):t=null,null===a?t:null===t?a:[a,t]}},Le=null,je={injectFiberControlledHostComponent:function(e){Le=e}},We=null,Be=null;function ze(e){if(e=k(e)){Le&&"function"==typeof Le.restoreControlledState||p("194");var t=C(e.stateNode);Le.restoreControlledState(e.stateNode,e.type,t)}}function Ve(e){We?Be?Be.push(e):Be=[e]:We=e}function qe(){return null!==We||null!==Be}function He(){if(We){var e=We,t=Be;if(Be=We=null,ze(e),t)for(e=0;e<t.length;e++)ze(t[e])}}var Ke={injection:je,enqueueStateRestore:Ve,needsStateRestore:qe,restoreStateIfNeeded:He};function Ge(e,t){return e(t)}function $e(e,t,n){return e(t,n)}function Ye(){}var Qe=!1;function Xe(e,t){if(Qe)return e(t);Qe=!0;try{return Ge(e,t)}finally{Qe=!1,qe()&&(Ye(),He())}}var Je={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 Ze(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return"input"===t?!!Je[e.type]:"textarea"===t}function et(e){return(e=e.target||e.srcElement||window).correspondingUseElement&&(e=e.correspondingUseElement),3===e.nodeType?e.parentNode:e}function tt(e,t){return!(!a.canUseDOM||t&&!("addEventListener"in document))&&((t=(e="on"+e)in document)||((t=document.createElement("div")).setAttribute(e,"return;"),t="function"==typeof t[e]),t)}function nt(e){var t=e.type;return(e=e.nodeName)&&"input"===e.toLowerCase()&&("checkbox"===t||"radio"===t)}function rt(e){e._valueTracker||(e._valueTracker=function(e){var t=nt(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&void 0!==n&&"function"==typeof n.get&&"function"==typeof n.set){var i=n.get,a=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(e){r=""+e,a.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 it(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=nt(e)?e.checked?"true":"false":e.value),(e=r)!==n&&(t.setValue(e),!0)}var at=i.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,ot="function"==typeof Symbol&&Symbol.for,st=ot?Symbol.for("react.element"):60103,lt=ot?Symbol.for("react.portal"):60106,ct=ot?Symbol.for("react.fragment"):60107,ut=ot?Symbol.for("react.strict_mode"):60108,dt=ot?Symbol.for("react.profiler"):60114,pt=ot?Symbol.for("react.provider"):60109,ht=ot?Symbol.for("react.context"):60110,ft=ot?Symbol.for("react.async_mode"):60111,mt=ot?Symbol.for("react.forward_ref"):60112,gt=ot?Symbol.for("react.timeout"):60113,vt="function"==typeof Symbol&&Symbol.iterator;function bt(e){return null===e||void 0===e?null:"function"==typeof(e=vt&&e[vt]||e["@@iterator"])?e:null}function yt(e){var t=e.type;if("function"==typeof t)return t.displayName||t.name;if("string"==typeof t)return t;switch(t){case ft:return"AsyncMode";case ht:return"Context.Consumer";case ct:return"ReactFragment";case lt:return"ReactPortal";case dt:return"Profiler("+e.pendingProps.id+")";case pt:return"Context.Provider";case ut:return"StrictMode";case gt:return"Timeout"}if("object"==typeof t&&null!==t)switch(t.$$typeof){case mt:return""!==(e=t.render.displayName||t.render.name||"")?"ForwardRef("+e+")":"ForwardRef"}return null}function wt(e){var t="";do{e:switch(e.tag){case 0:case 1:case 2:case 5:var n=e._debugOwner,r=e._debugSource,i=yt(e),a=null;n&&(a=yt(n)),n=r,i="\n in "+(i||"Unknown")+(n?" (at "+n.fileName.replace(/^.*[\\\/]/,"")+":"+n.lineNumber+")":a?" (created by "+a+")":"");break e;default:i=""}t+=i,e=e.return}while(e);return t}var Et=/^[: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]*$/,_t=Object.prototype.hasOwnProperty,St={},Tt={};function Ct(e,t,n,r,i){this.acceptsBooleans=2===t||3===t||4===t,this.attributeName=r,this.attributeNamespace=i,this.mustUseProperty=n,this.propertyName=e,this.type=t}var kt={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){kt[e]=new Ct(e,0,!1,e,null)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];kt[t]=new Ct(t,1,!1,e[1],null)}),["contentEditable","draggable","spellCheck","value"].forEach(function(e){kt[e]=new Ct(e,2,!1,e.toLowerCase(),null)}),["autoReverse","externalResourcesRequired","preserveAlpha"].forEach(function(e){kt[e]=new Ct(e,2,!1,e,null)}),"allowFullScreen async autoFocus autoPlay controls default defer disabled formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){kt[e]=new Ct(e,3,!1,e.toLowerCase(),null)}),["checked","multiple","muted","selected"].forEach(function(e){kt[e]=new Ct(e,3,!0,e.toLowerCase(),null)}),["capture","download"].forEach(function(e){kt[e]=new Ct(e,4,!1,e.toLowerCase(),null)}),["cols","rows","size","span"].forEach(function(e){kt[e]=new Ct(e,6,!1,e.toLowerCase(),null)}),["rowSpan","start"].forEach(function(e){kt[e]=new Ct(e,5,!1,e.toLowerCase(),null)});var xt=/[\-:]([a-z])/g;function Pt(e){return e[1].toUpperCase()}function Nt(e,t,n,r){var i=kt.hasOwnProperty(t)?kt[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||void 0===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!!_t.call(Tt,e)||!_t.call(St,e)&&(Et.test(e)?Tt[e]=!0:(St[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))))}function Mt(e,t){var n=t.checked;return o({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:null!=n?n:e._wrapperState.initialChecked})}function Dt(e,t){var n=null==t.defaultValue?"":t.defaultValue,r=null!=t.checked?t.checked:t.defaultChecked;n=Ut(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 At(e,t){null!=(t=t.checked)&&Nt(e,"checked",t,!1)}function Ot(e,t){At(e,t);var n=Ut(t.value);null!=n&&("number"===t.type?(0===n&&""===e.value||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n)),t.hasOwnProperty("value")?Rt(e,t.type,n):t.hasOwnProperty("defaultValue")&&Rt(e,t.type,Ut(t.defaultValue)),null==t.checked&&null!=t.defaultChecked&&(e.defaultChecked=!!t.defaultChecked)}function It(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){t=""+e._wrapperState.initialValue;var r=e.value;n||t===r||(e.value=t),e.defaultValue=t}""!==(n=e.name)&&(e.name=""),e.defaultChecked=!e.defaultChecked,e.defaultChecked=!e.defaultChecked,""!==n&&(e.name=n)}function Rt(e,t,n){"number"===t&&e.ownerDocument.activeElement===e||(null==n?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}function Ut(e){switch(typeof e){case"boolean":case"number":case"object":case"string":case"undefined":return e;default:return""}}"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(xt,Pt);kt[t]=new Ct(t,1,!1,e,null)}),"xlink:actuate xlink:arcrole xlink:href xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(xt,Pt);kt[t]=new Ct(t,1,!1,e,"http://www.w3.org/1999/xlink")}),["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(xt,Pt);kt[t]=new Ct(t,1,!1,e,"http://www.w3.org/XML/1998/namespace")}),kt.tabIndex=new Ct("tabIndex",1,!1,"tabindex",null);var Ft={change:{phasedRegistrationNames:{bubbled:"onChange",captured:"onChangeCapture"},dependencies:"blur change click focus input keydown keyup selectionchange".split(" ")}};function Lt(e,t,n){return(e=we.getPooled(Ft.change,e,t,n)).type="change",Ve(n),ee(e),e}var jt=null,Wt=null;function Bt(e){F(e,!1)}function zt(e){if(it(q(e)))return e}function Vt(e,t){if("change"===e)return t}var qt=!1;function Ht(){jt&&(jt.detachEvent("onpropertychange",Kt),Wt=jt=null)}function Kt(e){"value"===e.propertyName&&zt(Wt)&&Xe(Bt,e=Lt(Wt,e,et(e)))}function Gt(e,t,n){"focus"===e?(Ht(),Wt=n,(jt=t).attachEvent("onpropertychange",Kt)):"blur"===e&&Ht()}function $t(e){if("selectionchange"===e||"keyup"===e||"keydown"===e)return zt(Wt)}function Yt(e,t){if("click"===e)return zt(t)}function Qt(e,t){if("input"===e||"change"===e)return zt(t)}a.canUseDOM&&(qt=tt("input")&&(!document.documentMode||9<document.documentMode));var Xt={eventTypes:Ft,_isInputEventSupported:qt,extractEvents:function(e,t,n,r){var i=t?q(t):window,a=void 0,o=void 0,s=i.nodeName&&i.nodeName.toLowerCase();if("select"===s||"input"===s&&"file"===i.type?a=Vt:Ze(i)?qt?a=Qt:(a=$t,o=Gt):(s=i.nodeName)&&"input"===s.toLowerCase()&&("checkbox"===i.type||"radio"===i.type)&&(a=Yt),a&&(a=a(e,t)))return Lt(a,n,r);o&&o(e,i,t),"blur"===e&&(e=i._wrapperState)&&e.controlled&&"number"===i.type&&Rt(i,"number",i.value)}},Jt=we.extend({view:null,detail:null}),Zt={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function en(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):!!(e=Zt[e])&&!!t[e]}function tn(){return en}var nn=Jt.extend({screenX:null,screenY:null,clientX:null,clientY:null,pageX:null,pageY:null,ctrlKey:null,shiftKey:null,altKey:null,metaKey:null,getModifierState:tn,button:null,buttons:null,relatedTarget:function(e){return e.relatedTarget||(e.fromElement===e.srcElement?e.toElement:e.fromElement)}}),rn=nn.extend({pointerId:null,width:null,height:null,pressure:null,tiltX:null,tiltY:null,pointerType:null,isPrimary:null}),an={mouseEnter:{registrationName:"onMouseEnter",dependencies:["mouseout","mouseover"]},mouseLeave:{registrationName:"onMouseLeave",dependencies:["mouseout","mouseover"]},pointerEnter:{registrationName:"onPointerEnter",dependencies:["pointerout","pointerover"]},pointerLeave:{registrationName:"onPointerLeave",dependencies:["pointerout","pointerover"]}},on={eventTypes:an,extractEvents:function(e,t,n,r){var i="mouseover"===e||"pointerover"===e,a="mouseout"===e||"pointerout"===e;if(i&&(n.relatedTarget||n.fromElement)||!a&&!i)return null;if(i=r.window===r?r:(i=r.ownerDocument)?i.defaultView||i.parentWindow:window,a?(a=t,t=(t=n.relatedTarget||n.toElement)?V(t):null):a=null,a===t)return null;var o=void 0,s=void 0,l=void 0,c=void 0;return"mouseout"===e||"mouseover"===e?(o=nn,s=an.mouseLeave,l=an.mouseEnter,c="mouse"):"pointerout"!==e&&"pointerover"!==e||(o=rn,s=an.pointerLeave,l=an.pointerEnter,c="pointer"),e=null==a?i:q(a),i=null==t?i:q(t),(s=o.getPooled(s,a,n,r)).type=c+"leave",s.target=e,s.relatedTarget=i,(n=o.getPooled(l,t,n,r)).type=c+"enter",n.target=i,n.relatedTarget=e,te(s,n,a,t),[s,n]}};function sn(e){var t=e;if(e.alternate)for(;t.return;)t=t.return;else{if(0!=(2&t.effectTag))return 1;for(;t.return;)if(0!=(2&(t=t.return).effectTag))return 1}return 3===t.tag?2:3}function ln(e){2!==sn(e)&&p("188")}function cn(e){var t=e.alternate;if(!t)return 3===(t=sn(e))&&p("188"),1===t?null:e;for(var n=e,r=t;;){var i=n.return,a=i?i.alternate:null;if(!i||!a)break;if(i.child===a.child){for(var o=i.child;o;){if(o===n)return ln(i),e;if(o===r)return ln(i),t;o=o.sibling}p("188")}if(n.return!==r.return)n=i,r=a;else{o=!1;for(var s=i.child;s;){if(s===n){o=!0,n=i,r=a;break}if(s===r){o=!0,r=i,n=a;break}s=s.sibling}if(!o){for(s=a.child;s;){if(s===n){o=!0,n=a,r=i;break}if(s===r){o=!0,r=a,n=i;break}s=s.sibling}o||p("189")}}n.alternate!==r&&p("190")}return 3!==n.tag&&p("188"),n.stateNode.current===n?e:t}function un(e){if(!(e=cn(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}var dn=we.extend({animationName:null,elapsedTime:null,pseudoElement:null}),pn=we.extend({clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),hn=Jt.extend({relatedTarget:null});function fn(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}var mn={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},gn={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"},vn=Jt.extend({key:function(e){if(e.key){var t=mn[e.key]||e.key;if("Unidentified"!==t)return t}return"keypress"===e.type?13===(e=fn(e))?"Enter":String.fromCharCode(e):"keydown"===e.type||"keyup"===e.type?gn[e.keyCode]||"Unidentified":""},location:null,ctrlKey:null,shiftKey:null,altKey:null,metaKey:null,repeat:null,locale:null,getModifierState:tn,charCode:function(e){return"keypress"===e.type?fn(e):0},keyCode:function(e){return"keydown"===e.type||"keyup"===e.type?e.keyCode:0},which:function(e){return"keypress"===e.type?fn(e):"keydown"===e.type||"keyup"===e.type?e.keyCode:0}}),bn=nn.extend({dataTransfer:null}),yn=Jt.extend({touches:null,targetTouches:null,changedTouches:null,altKey:null,metaKey:null,ctrlKey:null,shiftKey:null,getModifierState:tn}),wn=we.extend({propertyName:null,elapsedTime:null,pseudoElement:null}),En=nn.extend({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:null,deltaMode:null}),_n=[["abort","abort"],[le,"animationEnd"],[ce,"animationIteration"],[ue,"animationStart"],["canplay","canPlay"],["canplaythrough","canPlayThrough"],["drag","drag"],["dragenter","dragEnter"],["dragexit","dragExit"],["dragleave","dragLeave"],["dragover","dragOver"],["durationchange","durationChange"],["emptied","emptied"],["encrypted","encrypted"],["ended","ended"],["error","error"],["gotpointercapture","gotPointerCapture"],["load","load"],["loadeddata","loadedData"],["loadedmetadata","loadedMetadata"],["loadstart","loadStart"],["lostpointercapture","lostPointerCapture"],["mousemove","mouseMove"],["mouseout","mouseOut"],["mouseover","mouseOver"],["playing","playing"],["pointermove","pointerMove"],["pointerout","pointerOut"],["pointerover","pointerOver"],["progress","progress"],["scroll","scroll"],["seeking","seeking"],["stalled","stalled"],["suspend","suspend"],["timeupdate","timeUpdate"],["toggle","toggle"],["touchmove","touchMove"],[de,"transitionEnd"],["waiting","waiting"],["wheel","wheel"]],Sn={},Tn={};function Cn(e,t){var n=e[0],r="on"+((e=e[1])[0].toUpperCase()+e.slice(1));t={phasedRegistrationNames:{bubbled:r,captured:r+"Capture"},dependencies:[n],isInteractive:t},Sn[e]=t,Tn[n]=t}[["blur","blur"],["cancel","cancel"],["click","click"],["close","close"],["contextmenu","contextMenu"],["copy","copy"],["cut","cut"],["dblclick","doubleClick"],["dragend","dragEnd"],["dragstart","dragStart"],["drop","drop"],["focus","focus"],["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"]].forEach(function(e){Cn(e,!0)}),_n.forEach(function(e){Cn(e,!1)});var kn={eventTypes:Sn,isInteractiveTopLevelEventType:function(e){return void 0!==(e=Tn[e])&&!0===e.isInteractive},extractEvents:function(e,t,n,r){var i=Tn[e];if(!i)return null;switch(e){case"keypress":if(0===fn(n))return null;case"keydown":case"keyup":e=vn;break;case"blur":case"focus":e=hn;break;case"click":if(2===n.button)return null;case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":e=nn;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":e=bn;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":e=yn;break;case le:case ce:case ue:e=dn;break;case de:e=wn;break;case"scroll":e=Jt;break;case"wheel":e=En;break;case"copy":case"cut":case"paste":e=pn;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":e=rn;break;default:e=we}return ee(t=e.getPooled(i,t,n,r)),t}},xn=kn.isInteractiveTopLevelEventType,Pn=[];function Nn(e){var t=e.targetInst;do{if(!t){e.ancestors.push(t);break}var n;for(n=t;n.return;)n=n.return;if(!(n=3!==n.tag?null:n.stateNode.containerInfo))break;e.ancestors.push(t),t=V(n)}while(t);for(n=0;n<e.ancestors.length;n++)t=e.ancestors[n],L(e.topLevelType,t,e.nativeEvent,et(e.nativeEvent))}var Mn=!0;function Dn(e){Mn=!!e}function An(e,t){if(!t)return null;var n=(xn(e)?In:Rn).bind(null,e);t.addEventListener(e,n,!1)}function On(e,t){if(!t)return null;var n=(xn(e)?In:Rn).bind(null,e);t.addEventListener(e,n,!0)}function In(e,t){$e(Rn,e,t)}function Rn(e,t){if(Mn){var n=et(t);if(null===(n=V(n))||"number"!=typeof n.tag||2===sn(n)||(n=null),Pn.length){var r=Pn.pop();r.topLevelType=e,r.nativeEvent=t,r.targetInst=n,e=r}else e={topLevelType:e,nativeEvent:t,targetInst:n,ancestors:[]};try{Xe(Nn,e)}finally{e.topLevelType=null,e.nativeEvent=null,e.targetInst=null,e.ancestors.length=0,10>Pn.length&&Pn.push(e)}}}var Un={get _enabled(){return Mn},setEnabled:Dn,isEnabled:function(){return Mn},trapBubbledEvent:An,trapCapturedEvent:On,dispatchEvent:Rn},Fn={},Ln=0,jn="_reactListenersID"+(""+Math.random()).slice(2);function Wn(e){return Object.prototype.hasOwnProperty.call(e,jn)||(e[jn]=Ln++,Fn[e[jn]]={}),Fn[e[jn]]}function Bn(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function zn(e,t){var n,r=Bn(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=Bn(r)}}function Vn(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 qn=a.canUseDOM&&"documentMode"in document&&11>=document.documentMode,Hn={select:{phasedRegistrationNames:{bubbled:"onSelect",captured:"onSelectCapture"},dependencies:"blur contextmenu focus keydown keyup mousedown mouseup selectionchange".split(" ")}},Kn=null,Gn=null,$n=null,Yn=!1;function Qn(e,t){if(Yn||null==Kn||Kn!==l())return null;var n=Kn;return"selectionStart"in n&&Vn(n)?n={start:n.selectionStart,end:n.selectionEnd}:window.getSelection?n={anchorNode:(n=window.getSelection()).anchorNode,anchorOffset:n.anchorOffset,focusNode:n.focusNode,focusOffset:n.focusOffset}:n=void 0,$n&&c($n,n)?null:($n=n,(e=we.getPooled(Hn.select,Gn,e,t)).type="select",e.target=Kn,ee(e),e)}var Xn={eventTypes:Hn,extractEvents:function(e,t,n,r){var i,a=r.window===r?r.document:9===r.nodeType?r:r.ownerDocument;if(!(i=!a)){e:{a=Wn(a),i=E.onSelect;for(var o=0;o<i.length;o++){var s=i[o];if(!a.hasOwnProperty(s)||!a[s]){a=!1;break e}}a=!0}i=!a}if(i)return null;switch(a=t?q(t):window,e){case"focus":(Ze(a)||"true"===a.contentEditable)&&(Kn=a,Gn=t,$n=null);break;case"blur":$n=Gn=Kn=null;break;case"mousedown":Yn=!0;break;case"contextmenu":case"mouseup":return Yn=!1,Qn(n,r);case"selectionchange":if(qn)break;case"keydown":case"keyup":return Qn(n,r)}return null}};R.injectEventPluginOrder("ResponderEventPlugin SimpleEventPlugin TapEventPlugin EnterLeaveEventPlugin ChangeEventPlugin SelectEventPlugin BeforeInputEventPlugin".split(" ")),C=K.getFiberCurrentPropsFromNode,k=K.getInstanceFromNode,x=K.getNodeFromInstance,R.injectEventPluginsByName({SimpleEventPlugin:kn,EnterLeaveEventPlugin:on,ChangeEventPlugin:Xt,SelectEventPlugin:Xn,BeforeInputEventPlugin:Fe});var Jn="function"==typeof requestAnimationFrame?requestAnimationFrame:void 0,Zn=Date,er=setTimeout,tr=clearTimeout,nr=void 0;if("object"==typeof performance&&"function"==typeof performance.now){var rr=performance;nr=function(){return rr.now()}}else nr=function(){return Zn.now()};var ir=void 0,ar=void 0;if(a.canUseDOM){var or="function"==typeof Jn?Jn:function(){p("276")},sr=null,lr=null,cr=-1,ur=!1,dr=!1,pr=0,hr=33,fr=33,mr={didTimeout:!1,timeRemaining:function(){var e=pr-nr();return 0<e?e:0}},gr=function(e,t){var n=e.scheduledCallback,r=!1;try{n(t),r=!0}finally{ar(e),r||(ur=!0,window.postMessage(vr,"*"))}},vr="__reactIdleCallback$"+Math.random().toString(36).slice(2);window.addEventListener("message",function(e){if(e.source===window&&e.data===vr&&(ur=!1,null!==sr)){if(null!==sr){var t=nr();if(!(-1===cr||cr>t)){e=-1;for(var n=[],r=sr;null!==r;){var i=r.timeoutTime;-1!==i&&i<=t?n.push(r):-1!==i&&(-1===e||i<e)&&(e=i),r=r.next}if(0<n.length)for(mr.didTimeout=!0,t=0,r=n.length;t<r;t++)gr(n[t],mr);cr=e}}for(e=nr();0<pr-e&&null!==sr;)e=sr,mr.didTimeout=!1,gr(e,mr),e=nr();null===sr||dr||(dr=!0,or(br))}},!1);var br=function(e){dr=!1;var t=e-pr+fr;t<fr&&hr<fr?(8>t&&(t=8),fr=t<hr?hr:t):hr=t,pr=e+fr,ur||(ur=!0,window.postMessage(vr,"*"))};ir=function(e,t){var n=-1;return null!=t&&"number"==typeof t.timeout&&(n=nr()+t.timeout),(-1===cr||-1!==n&&n<cr)&&(cr=n),e={scheduledCallback:e,timeoutTime:n,prev:null,next:null},null===sr?sr=e:null!==(t=e.prev=lr)&&(t.next=e),lr=e,dr||(dr=!0,or(br)),e},ar=function(e){if(null!==e.prev||sr===e){var t=e.next,n=e.prev;e.next=null,e.prev=null,null!==t?null!==n?(n.next=t,t.prev=n):(t.prev=null,sr=t):null!==n?(n.next=null,lr=n):lr=sr=null}}}else{var yr=new Map;ir=function(e){var t={scheduledCallback:e,timeoutTime:0,next:null,prev:null},n=er(function(){e({timeRemaining:function(){return 1/0},didTimeout:!1})});return yr.set(e,n),t},ar=function(e){var t=yr.get(e.scheduledCallback);yr.delete(e),tr(t)}}function wr(e,t){return e=o({children:void 0},t),(t=function(e){var t="";return i.Children.forEach(e,function(e){null==e||"string"!=typeof e&&"number"!=typeof e||(t+=e)}),t}(t.children))&&(e.children=t),e}function Er(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=""+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 _r(e,t){var n=t.value;e._wrapperState={initialValue:null!=n?n:t.defaultValue,wasMultiple:!!t.multiple}}function Sr(e,t){return null!=t.dangerouslySetInnerHTML&&p("91"),o({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function Tr(e,t){var n=t.value;null==n&&(n=t.defaultValue,null!=(t=t.children)&&(null!=n&&p("92"),Array.isArray(t)&&(1>=t.length||p("93"),t=t[0]),n=""+t),null==n&&(n="")),e._wrapperState={initialValue:""+n}}function Cr(e,t){var n=t.value;null!=n&&((n=""+n)!==e.value&&(e.value=n),null==t.defaultValue&&(e.defaultValue=n)),null!=t.defaultValue&&(e.defaultValue=t.defaultValue)}function kr(e){var t=e.textContent;t===e._wrapperState.initialValue&&(e.value=t)}var xr={html:"http://www.w3.org/1999/xhtml",mathml:"http://www.w3.org/1998/Math/MathML",svg:"http://www.w3.org/2000/svg"};function Pr(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 Nr(e,t){return null==e||"http://www.w3.org/1999/xhtml"===e?Pr(t):"http://www.w3.org/2000/svg"===e&&"foreignObject"===t?"http://www.w3.org/1999/xhtml":e}var Mr,Dr=void 0,Ar=(Mr=function(e,t){if(e.namespaceURI!==xr.svg||"innerHTML"in e)e.innerHTML=t;else{for((Dr=Dr||document.createElement("div")).innerHTML="<svg>"+t+"</svg>",t=Dr.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 Mr(e,t)})}:Mr);function Or(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 Ir={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,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},Rr=["Webkit","ms","Moz","O"];function Ur(e,t){for(var n in e=e.style,t)if(t.hasOwnProperty(n)){var r=0===n.indexOf("--"),i=n,a=t[n];i=null==a||"boolean"==typeof a||""===a?"":r||"number"!=typeof a||0===a||Ir.hasOwnProperty(i)&&Ir[i]?(""+a).trim():a+"px","float"===n&&(n="cssFloat"),r?e.setProperty(n,i):e[n]=i}}Object.keys(Ir).forEach(function(e){Rr.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Ir[t]=Ir[e]})});var Fr=o({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 Lr(e,t,n){t&&(Fr[e]&&(null!=t.children||null!=t.dangerouslySetInnerHTML)&&p("137",e,n()),null!=t.dangerouslySetInnerHTML&&(null!=t.children&&p("60"),"object"==typeof t.dangerouslySetInnerHTML&&"__html"in t.dangerouslySetInnerHTML||p("61")),null!=t.style&&"object"!=typeof t.style&&p("62",n()))}function jr(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}}var Wr=s.thatReturns("");function Br(e,t){var n=Wn(e=9===e.nodeType||11===e.nodeType?e:e.ownerDocument);t=E[t];for(var r=0;r<t.length;r++){var i=t[r];if(!n.hasOwnProperty(i)||!n[i]){switch(i){case"scroll":On("scroll",e);break;case"focus":case"blur":On("focus",e),On("blur",e),n.blur=!0,n.focus=!0;break;case"cancel":case"close":tt(i,!0)&&On(i,e);break;case"invalid":case"submit":case"reset":break;default:-1===pe.indexOf(i)&&An(i,e)}n[i]=!0}}}function zr(e,t,n,r){return n=9===n.nodeType?n:n.ownerDocument,r===xr.html&&(r=Pr(e)),r===xr.html?"script"===e?((e=n.createElement("div")).innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):e="string"==typeof t.is?n.createElement(e,{is:t.is}):n.createElement(e):e=n.createElementNS(r,e),e}function Vr(e,t){return(9===t.nodeType?t:t.ownerDocument).createTextNode(e)}function qr(e,t,n,r){var i=jr(t,n);switch(t){case"iframe":case"object":An("load",e);var a=n;break;case"video":case"audio":for(a=0;a<pe.length;a++)An(pe[a],e);a=n;break;case"source":An("error",e),a=n;break;case"img":case"image":case"link":An("error",e),An("load",e),a=n;break;case"form":An("reset",e),An("submit",e),a=n;break;case"details":An("toggle",e),a=n;break;case"input":Dt(e,n),a=Mt(e,n),An("invalid",e),Br(r,"onChange");break;case"option":a=wr(e,n);break;case"select":_r(e,n),a=o({},n,{value:void 0}),An("invalid",e),Br(r,"onChange");break;case"textarea":Tr(e,n),a=Sr(e,n),An("invalid",e),Br(r,"onChange");break;default:a=n}Lr(t,a,Wr);var l,c=a;for(l in c)if(c.hasOwnProperty(l)){var u=c[l];"style"===l?Ur(e,u):"dangerouslySetInnerHTML"===l?null!=(u=u?u.__html:void 0)&&Ar(e,u):"children"===l?"string"==typeof u?("textarea"!==t||""!==u)&&Or(e,u):"number"==typeof u&&Or(e,""+u):"suppressContentEditableWarning"!==l&&"suppressHydrationWarning"!==l&&"autoFocus"!==l&&(w.hasOwnProperty(l)?null!=u&&Br(r,l):null!=u&&Nt(e,l,u,i))}switch(t){case"input":rt(e),It(e,n,!1);break;case"textarea":rt(e),kr(e);break;case"option":null!=n.value&&e.setAttribute("value",n.value);break;case"select":e.multiple=!!n.multiple,null!=(t=n.value)?Er(e,!!n.multiple,t,!1):null!=n.defaultValue&&Er(e,!!n.multiple,n.defaultValue,!0);break;default:"function"==typeof a.onClick&&(e.onclick=s)}}function Hr(e,t,n,r,i){var a=null;switch(t){case"input":n=Mt(e,n),r=Mt(e,r),a=[];break;case"option":n=wr(e,n),r=wr(e,r),a=[];break;case"select":n=o({},n,{value:void 0}),r=o({},r,{value:void 0}),a=[];break;case"textarea":n=Sr(e,n),r=Sr(e,r),a=[];break;default:"function"!=typeof n.onClick&&"function"==typeof r.onClick&&(e.onclick=s)}Lr(t,r,Wr),t=e=void 0;var l=null;for(e in n)if(!r.hasOwnProperty(e)&&n.hasOwnProperty(e)&&null!=n[e])if("style"===e){var c=n[e];for(t in c)c.hasOwnProperty(t)&&(l||(l={}),l[t]="")}else"dangerouslySetInnerHTML"!==e&&"children"!==e&&"suppressContentEditableWarning"!==e&&"suppressHydrationWarning"!==e&&"autoFocus"!==e&&(w.hasOwnProperty(e)?a||(a=[]):(a=a||[]).push(e,null));for(e in r){var u=r[e];if(c=null!=n?n[e]:void 0,r.hasOwnProperty(e)&&u!==c&&(null!=u||null!=c))if("style"===e)if(c){for(t in c)!c.hasOwnProperty(t)||u&&u.hasOwnProperty(t)||(l||(l={}),l[t]="");for(t in u)u.hasOwnProperty(t)&&c[t]!==u[t]&&(l||(l={}),l[t]=u[t])}else l||(a||(a=[]),a.push(e,l)),l=u;else"dangerouslySetInnerHTML"===e?(u=u?u.__html:void 0,c=c?c.__html:void 0,null!=u&&c!==u&&(a=a||[]).push(e,""+u)):"children"===e?c===u||"string"!=typeof u&&"number"!=typeof u||(a=a||[]).push(e,""+u):"suppressContentEditableWarning"!==e&&"suppressHydrationWarning"!==e&&(w.hasOwnProperty(e)?(null!=u&&Br(i,e),a||c===u||(a=[])):(a=a||[]).push(e,u))}return l&&(a=a||[]).push("style",l),a}function Kr(e,t,n,r,i){"input"===n&&"radio"===i.type&&null!=i.name&&At(e,i),jr(n,r),r=jr(n,i);for(var a=0;a<t.length;a+=2){var o=t[a],s=t[a+1];"style"===o?Ur(e,s):"dangerouslySetInnerHTML"===o?Ar(e,s):"children"===o?Or(e,s):Nt(e,o,s,r)}switch(n){case"input":Ot(e,i);break;case"textarea":Cr(e,i);break;case"select":e._wrapperState.initialValue=void 0,t=e._wrapperState.wasMultiple,e._wrapperState.wasMultiple=!!i.multiple,null!=(n=i.value)?Er(e,!!i.multiple,n,!1):t!==!!i.multiple&&(null!=i.defaultValue?Er(e,!!i.multiple,i.defaultValue,!0):Er(e,!!i.multiple,i.multiple?[]:"",!1))}}function Gr(e,t,n,r,i){switch(t){case"iframe":case"object":An("load",e);break;case"video":case"audio":for(r=0;r<pe.length;r++)An(pe[r],e);break;case"source":An("error",e);break;case"img":case"image":case"link":An("error",e),An("load",e);break;case"form":An("reset",e),An("submit",e);break;case"details":An("toggle",e);break;case"input":Dt(e,n),An("invalid",e),Br(i,"onChange");break;case"select":_r(e,n),An("invalid",e),Br(i,"onChange");break;case"textarea":Tr(e,n),An("invalid",e),Br(i,"onChange")}for(var a in Lr(t,n,Wr),r=null,n)if(n.hasOwnProperty(a)){var o=n[a];"children"===a?"string"==typeof o?e.textContent!==o&&(r=["children",o]):"number"==typeof o&&e.textContent!==""+o&&(r=["children",""+o]):w.hasOwnProperty(a)&&null!=o&&Br(i,a)}switch(t){case"input":rt(e),It(e,n,!0);break;case"textarea":rt(e),kr(e);break;case"select":case"option":break;default:"function"==typeof n.onClick&&(e.onclick=s)}return r}function $r(e,t){return e.nodeValue!==t}var Yr={createElement:zr,createTextNode:Vr,setInitialProperties:qr,diffProperties:Hr,updateProperties:Kr,diffHydratedProperties:Gr,diffHydratedText:$r,warnForUnmatchedText:function(){},warnForDeletedHydratableElement:function(){},warnForDeletedHydratableText:function(){},warnForInsertedHydratedElement:function(){},warnForInsertedHydratedText:function(){},restoreControlledState:function(e,t,n){switch(t){case"input":if(Ot(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=H(r);i||p("90"),it(r),Ot(r,i)}}}break;case"textarea":Cr(e,n);break;case"select":null!=(t=n.value)&&Er(e,!!n.multiple,t,!1)}}},Qr=null,Xr=null;function Jr(e,t){switch(e){case"button":case"input":case"select":case"textarea":return!!t.autoFocus}return!1}function Zr(e,t){return"textarea"===e||"string"==typeof t.children||"number"==typeof t.children||"object"==typeof t.dangerouslySetInnerHTML&&null!==t.dangerouslySetInnerHTML&&"string"==typeof t.dangerouslySetInnerHTML.__html}var ei=nr,ti=ir,ni=ar;function ri(e){for(e=e.nextSibling;e&&1!==e.nodeType&&3!==e.nodeType;)e=e.nextSibling;return e}function ii(e){for(e=e.firstChild;e&&1!==e.nodeType&&3!==e.nodeType;)e=e.nextSibling;return e}new Set;var ai=[],oi=-1;function si(e){return{current:e}}function li(e){0>oi||(e.current=ai[oi],ai[oi]=null,oi--)}function ci(e,t){ai[++oi]=e.current,e.current=t}var ui=si(d),di=si(!1),pi=d;function hi(e){return mi(e)?pi:ui.current}function fi(e,t){var n=e.type.contextTypes;if(!n)return d;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var i,a={};for(i in n)a[i]=t[i];return r&&((e=e.stateNode).__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=a),a}function mi(e){return 2===e.tag&&null!=e.type.childContextTypes}function gi(e){mi(e)&&(li(di),li(ui))}function vi(e){li(di),li(ui)}function bi(e,t,n){ui.current!==d&&p("168"),ci(ui,t),ci(di,n)}function yi(e,t){var n=e.stateNode,r=e.type.childContextTypes;if("function"!=typeof n.getChildContext)return t;for(var i in n=n.getChildContext())i in r||p("108",yt(e)||"Unknown",i);return o({},t,n)}function wi(e){if(!mi(e))return!1;var t=e.stateNode;return t=t&&t.__reactInternalMemoizedMergedChildContext||d,pi=ui.current,ci(ui,t),ci(di,di.current),!0}function Ei(e,t){var n=e.stateNode;if(n||p("169"),t){var r=yi(e,pi);n.__reactInternalMemoizedMergedChildContext=r,li(di),li(ui),ci(ui,r)}else li(di);ci(di,t)}function _i(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=null,this.index=0,this.ref=null,this.pendingProps=t,this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.effectTag=0,this.lastEffect=this.firstEffect=this.nextEffect=null,this.expirationTime=0,this.alternate=null}function Si(e,t,n){var r=e.alternate;return null===r?((r=new _i(e.tag,t,e.key,e.mode)).type=e.type,r.stateNode=e.stateNode,r.alternate=e,e.alternate=r):(r.pendingProps=t,r.effectTag=0,r.nextEffect=null,r.firstEffect=null,r.lastEffect=null),r.expirationTime=n,r.child=e.child,r.memoizedProps=e.memoizedProps,r.memoizedState=e.memoizedState,r.updateQueue=e.updateQueue,r.sibling=e.sibling,r.index=e.index,r.ref=e.ref,r}function Ti(e,t,n){var r=e.type,i=e.key;if(e=e.props,"function"==typeof r)var a=r.prototype&&r.prototype.isReactComponent?2:0;else if("string"==typeof r)a=5;else switch(r){case ct:return Ci(e.children,t,n,i);case ft:a=11,t|=3;break;case ut:a=11,t|=2;break;case dt:return(r=new _i(15,e,i,4|t)).type=dt,r.expirationTime=n,r;case gt:a=16,t|=2;break;default:e:{switch("object"==typeof r&&null!==r?r.$$typeof:null){case pt:a=13;break e;case ht:a=12;break e;case mt:a=14;break e;default:p("130",null==r?r:typeof r,"")}a=void 0}}return(t=new _i(a,e,i,t)).type=r,t.expirationTime=n,t}function Ci(e,t,n,r){return(e=new _i(10,e,r,t)).expirationTime=n,e}function ki(e,t,n){return(e=new _i(6,e,null,t)).expirationTime=n,e}function xi(e,t,n){return(t=new _i(4,null!==e.children?e.children:[],e.key,t)).expirationTime=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function Pi(e,t,n){return e={current:t=new _i(3,null,null,t?3:0),containerInfo:e,pendingChildren:null,earliestPendingTime:0,latestPendingTime:0,earliestSuspendedTime:0,latestSuspendedTime:0,latestPingedTime:0,pendingCommitExpirationTime:0,finishedWork:null,context:null,pendingContext:null,hydrate:n,remainingExpirationTime:0,firstBatch:null,nextScheduledRoot:null},t.stateNode=e}var Ni=null,Mi=null;function Di(e){return function(t){try{return e(t)}catch(e){}}}function Ai(e){"function"==typeof Ni&&Ni(e)}function Oi(e){"function"==typeof Mi&&Mi(e)}var Ii=!1;function Ri(e){return{expirationTime:0,baseState:e,firstUpdate:null,lastUpdate:null,firstCapturedUpdate:null,lastCapturedUpdate:null,firstEffect:null,lastEffect:null,firstCapturedEffect:null,lastCapturedEffect:null}}function Ui(e){return{expirationTime:e.expirationTime,baseState:e.baseState,firstUpdate:e.firstUpdate,lastUpdate:e.lastUpdate,firstCapturedUpdate:null,lastCapturedUpdate:null,firstEffect:null,lastEffect:null,firstCapturedEffect:null,lastCapturedEffect:null}}function Fi(e){return{expirationTime:e,tag:0,payload:null,callback:null,next:null,nextEffect:null}}function Li(e,t,n){null===e.lastUpdate?e.firstUpdate=e.lastUpdate=t:(e.lastUpdate.next=t,e.lastUpdate=t),(0===e.expirationTime||e.expirationTime>n)&&(e.expirationTime=n)}function ji(e,t,n){var r=e.alternate;if(null===r){var i=e.updateQueue,a=null;null===i&&(i=e.updateQueue=Ri(e.memoizedState))}else i=e.updateQueue,a=r.updateQueue,null===i?null===a?(i=e.updateQueue=Ri(e.memoizedState),a=r.updateQueue=Ri(r.memoizedState)):i=e.updateQueue=Ui(a):null===a&&(a=r.updateQueue=Ui(i));null===a||i===a?Li(i,t,n):null===i.lastUpdate||null===a.lastUpdate?(Li(i,t,n),Li(a,t,n)):(Li(i,t,n),a.lastUpdate=t)}function Wi(e,t,n){var r=e.updateQueue;null===(r=null===r?e.updateQueue=Ri(e.memoizedState):Bi(e,r)).lastCapturedUpdate?r.firstCapturedUpdate=r.lastCapturedUpdate=t:(r.lastCapturedUpdate.next=t,r.lastCapturedUpdate=t),(0===r.expirationTime||r.expirationTime>n)&&(r.expirationTime=n)}function Bi(e,t){var n=e.alternate;return null!==n&&t===n.updateQueue&&(t=e.updateQueue=Ui(t)),t}function zi(e,t,n,r,i,a){switch(n.tag){case 1:return"function"==typeof(e=n.payload)?e.call(a,r,i):e;case 3:e.effectTag=-1025&e.effectTag|64;case 0:if(null===(i="function"==typeof(e=n.payload)?e.call(a,r,i):e)||void 0===i)break;return o({},r,i);case 2:Ii=!0}return r}function Vi(e,t,n,r,i){if(Ii=!1,!(0===t.expirationTime||t.expirationTime>i)){for(var a=(t=Bi(e,t)).baseState,o=null,s=0,l=t.firstUpdate,c=a;null!==l;){var u=l.expirationTime;u>i?(null===o&&(o=l,a=c),(0===s||s>u)&&(s=u)):(c=zi(e,0,l,c,n,r),null!==l.callback&&(e.effectTag|=32,l.nextEffect=null,null===t.lastEffect?t.firstEffect=t.lastEffect=l:(t.lastEffect.nextEffect=l,t.lastEffect=l))),l=l.next}for(u=null,l=t.firstCapturedUpdate;null!==l;){var d=l.expirationTime;d>i?(null===u&&(u=l,null===o&&(a=c)),(0===s||s>d)&&(s=d)):(c=zi(e,0,l,c,n,r),null!==l.callback&&(e.effectTag|=32,l.nextEffect=null,null===t.lastCapturedEffect?t.firstCapturedEffect=t.lastCapturedEffect=l:(t.lastCapturedEffect.nextEffect=l,t.lastCapturedEffect=l))),l=l.next}null===o&&(t.lastUpdate=null),null===u?t.lastCapturedUpdate=null:e.effectTag|=32,null===o&&null===u&&(a=c),t.baseState=a,t.firstUpdate=o,t.firstCapturedUpdate=u,t.expirationTime=s,e.memoizedState=c}}function qi(e,t){"function"!=typeof e&&p("191",e),e.call(t)}function Hi(e,t,n){for(null!==t.firstCapturedUpdate&&(null!==t.lastUpdate&&(t.lastUpdate.next=t.firstCapturedUpdate,t.lastUpdate=t.lastCapturedUpdate),t.firstCapturedUpdate=t.lastCapturedUpdate=null),e=t.firstEffect,t.firstEffect=t.lastEffect=null;null!==e;){var r=e.callback;null!==r&&(e.callback=null,qi(r,n)),e=e.nextEffect}for(e=t.firstCapturedEffect,t.firstCapturedEffect=t.lastCapturedEffect=null;null!==e;)null!==(t=e.callback)&&(e.callback=null,qi(t,n)),e=e.nextEffect}function Ki(e,t){return{value:e,source:t,stack:wt(t)}}var Gi=si(null),$i=si(null),Yi=si(0);function Qi(e){var t=e.type._context;ci(Yi,t._changedBits),ci($i,t._currentValue),ci(Gi,e),t._currentValue=e.pendingProps.value,t._changedBits=e.stateNode}function Xi(e){var t=Yi.current,n=$i.current;li(Gi),li($i),li(Yi),(e=e.type._context)._currentValue=n,e._changedBits=t}var Ji={},Zi=si(Ji),ea=si(Ji),ta=si(Ji);function na(e){return e===Ji&&p("174"),e}function ra(e,t){ci(ta,t),ci(ea,e),ci(Zi,Ji);var n=t.nodeType;switch(n){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:Nr(null,"");break;default:t=Nr(t=(n=8===n?t.parentNode:t).namespaceURI||null,n=n.tagName)}li(Zi),ci(Zi,t)}function ia(e){li(Zi),li(ea),li(ta)}function aa(e){ea.current===e&&(li(Zi),li(ea))}function oa(e,t,n){var r=e.memoizedState;r=null===(t=t(n,r))||void 0===t?r:o({},r,t),e.memoizedState=r,null!==(e=e.updateQueue)&&0===e.expirationTime&&(e.baseState=r)}var sa={isMounted:function(e){return!!(e=e._reactInternalFiber)&&2===sn(e)},enqueueSetState:function(e,t,n){e=e._reactInternalFiber;var r=wo(),i=Fi(r=bo(r,e));i.payload=t,void 0!==n&&null!==n&&(i.callback=n),ji(e,i,r),yo(e,r)},enqueueReplaceState:function(e,t,n){e=e._reactInternalFiber;var r=wo(),i=Fi(r=bo(r,e));i.tag=1,i.payload=t,void 0!==n&&null!==n&&(i.callback=n),ji(e,i,r),yo(e,r)},enqueueForceUpdate:function(e,t){e=e._reactInternalFiber;var n=wo(),r=Fi(n=bo(n,e));r.tag=2,void 0!==t&&null!==t&&(r.callback=t),ji(e,r,n),yo(e,n)}};function la(e,t,n,r,i,a){var o=e.stateNode;return e=e.type,"function"==typeof o.shouldComponentUpdate?o.shouldComponentUpdate(n,i,a):!e.prototype||!e.prototype.isPureReactComponent||(!c(t,n)||!c(r,i))}function ca(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&&sa.enqueueReplaceState(t,t.state,null)}function ua(e,t){var n=e.type,r=e.stateNode,i=e.pendingProps,a=hi(e);r.props=i,r.state=e.memoizedState,r.refs=d,r.context=fi(e,a),null!==(a=e.updateQueue)&&(Vi(e,a,i,r,t),r.state=e.memoizedState),"function"==typeof(a=e.type.getDerivedStateFromProps)&&(oa(e,a,i),r.state=e.memoizedState),"function"==typeof n.getDerivedStateFromProps||"function"==typeof r.getSnapshotBeforeUpdate||"function"!=typeof r.UNSAFE_componentWillMount&&"function"!=typeof r.componentWillMount||(n=r.state,"function"==typeof r.componentWillMount&&r.componentWillMount(),"function"==typeof r.UNSAFE_componentWillMount&&r.UNSAFE_componentWillMount(),n!==r.state&&sa.enqueueReplaceState(r,r.state,null),null!==(a=e.updateQueue)&&(Vi(e,a,i,r,t),r.state=e.memoizedState)),"function"==typeof r.componentDidMount&&(e.effectTag|=4)}var da=Array.isArray;function pa(e,t,n){if(null!==(e=n.ref)&&"function"!=typeof e&&"object"!=typeof e){if(n._owner){var r=void 0;(n=n._owner)&&(2!==n.tag&&p("110"),r=n.stateNode),r||p("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===d?r.refs={}:r.refs;null===e?delete t[i]:t[i]=e})._stringRef=i,t)}"string"!=typeof e&&p("148"),n._owner||p("254",e)}return e}function ha(e,t){"textarea"!==e.type&&p("31","[object Object]"===Object.prototype.toString.call(t)?"object with keys {"+Object.keys(t).join(", ")+"}":t,"")}function fa(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.effectTag=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,n){return(e=Si(e,t,n)).index=0,e.sibling=null,e}function a(t,n,r){return t.index=r,e?null!==(r=t.alternate)?(r=r.index)<n?(t.effectTag=2,n):r:(t.effectTag=2,n):n}function o(t){return e&&null===t.alternate&&(t.effectTag=2),t}function s(e,t,n,r){return null===t||6!==t.tag?((t=ki(n,e.mode,r)).return=e,t):((t=i(t,n,r)).return=e,t)}function l(e,t,n,r){return null!==t&&t.type===n.type?((r=i(t,n.props,r)).ref=pa(e,t,n),r.return=e,r):((r=Ti(n,e.mode,r)).ref=pa(e,t,n),r.return=e,r)}function c(e,t,n,r){return null===t||4!==t.tag||t.stateNode.containerInfo!==n.containerInfo||t.stateNode.implementation!==n.implementation?((t=xi(n,e.mode,r)).return=e,t):((t=i(t,n.children||[],r)).return=e,t)}function u(e,t,n,r,a){return null===t||10!==t.tag?((t=Ci(n,e.mode,r,a)).return=e,t):((t=i(t,n,r)).return=e,t)}function d(e,t,n){if("string"==typeof t||"number"==typeof t)return(t=ki(""+t,e.mode,n)).return=e,t;if("object"==typeof t&&null!==t){switch(t.$$typeof){case st:return(n=Ti(t,e.mode,n)).ref=pa(e,null,t),n.return=e,n;case lt:return(t=xi(t,e.mode,n)).return=e,t}if(da(t)||bt(t))return(t=Ci(t,e.mode,n,null)).return=e,t;ha(e,t)}return null}function h(e,t,n,r){var i=null!==t?t.key:null;if("string"==typeof n||"number"==typeof n)return null!==i?null:s(e,t,""+n,r);if("object"==typeof n&&null!==n){switch(n.$$typeof){case st:return n.key===i?n.type===ct?u(e,t,n.props.children,r,i):l(e,t,n,r):null;case lt:return n.key===i?c(e,t,n,r):null}if(da(n)||bt(n))return null!==i?null:u(e,t,n,r,null);ha(e,n)}return null}function f(e,t,n,r,i){if("string"==typeof r||"number"==typeof r)return s(t,e=e.get(n)||null,""+r,i);if("object"==typeof r&&null!==r){switch(r.$$typeof){case st:return e=e.get(null===r.key?n:r.key)||null,r.type===ct?u(t,e,r.props.children,i,r.key):l(t,e,r,i);case lt:return c(t,e=e.get(null===r.key?n:r.key)||null,r,i)}if(da(r)||bt(r))return u(t,e=e.get(n)||null,r,i,null);ha(t,r)}return null}function m(i,o,s,l){for(var c=null,u=null,p=o,m=o=0,g=null;null!==p&&m<s.length;m++){p.index>m?(g=p,p=null):g=p.sibling;var v=h(i,p,s[m],l);if(null===v){null===p&&(p=g);break}e&&p&&null===v.alternate&&t(i,p),o=a(v,o,m),null===u?c=v:u.sibling=v,u=v,p=g}if(m===s.length)return n(i,p),c;if(null===p){for(;m<s.length;m++)(p=d(i,s[m],l))&&(o=a(p,o,m),null===u?c=p:u.sibling=p,u=p);return c}for(p=r(i,p);m<s.length;m++)(g=f(p,i,m,s[m],l))&&(e&&null!==g.alternate&&p.delete(null===g.key?m:g.key),o=a(g,o,m),null===u?c=g:u.sibling=g,u=g);return e&&p.forEach(function(e){return t(i,e)}),c}function g(i,o,s,l){var c=bt(s);"function"!=typeof c&&p("150"),null==(s=c.call(s))&&p("151");for(var u=c=null,m=o,g=o=0,v=null,b=s.next();null!==m&&!b.done;g++,b=s.next()){m.index>g?(v=m,m=null):v=m.sibling;var y=h(i,m,b.value,l);if(null===y){m||(m=v);break}e&&m&&null===y.alternate&&t(i,m),o=a(y,o,g),null===u?c=y:u.sibling=y,u=y,m=v}if(b.done)return n(i,m),c;if(null===m){for(;!b.done;g++,b=s.next())null!==(b=d(i,b.value,l))&&(o=a(b,o,g),null===u?c=b:u.sibling=b,u=b);return c}for(m=r(i,m);!b.done;g++,b=s.next())null!==(b=f(m,i,g,b.value,l))&&(e&&null!==b.alternate&&m.delete(null===b.key?g:b.key),o=a(b,o,g),null===u?c=b:u.sibling=b,u=b);return e&&m.forEach(function(e){return t(i,e)}),c}return function(e,r,a,s){var l="object"==typeof a&&null!==a&&a.type===ct&&null===a.key;l&&(a=a.props.children);var c="object"==typeof a&&null!==a;if(c)switch(a.$$typeof){case st:e:{for(c=a.key,l=r;null!==l;){if(l.key===c){if(10===l.tag?a.type===ct:l.type===a.type){n(e,l.sibling),(r=i(l,a.type===ct?a.props.children:a.props,s)).ref=pa(e,l,a),r.return=e,e=r;break e}n(e,l);break}t(e,l),l=l.sibling}a.type===ct?((r=Ci(a.props.children,e.mode,s,a.key)).return=e,e=r):((s=Ti(a,e.mode,s)).ref=pa(e,r,a),s.return=e,e=s)}return o(e);case lt:e:{for(l=a.key;null!==r;){if(r.key===l){if(4===r.tag&&r.stateNode.containerInfo===a.containerInfo&&r.stateNode.implementation===a.implementation){n(e,r.sibling),(r=i(r,a.children||[],s)).return=e,e=r;break e}n(e,r);break}t(e,r),r=r.sibling}(r=xi(a,e.mode,s)).return=e,e=r}return o(e)}if("string"==typeof a||"number"==typeof a)return a=""+a,null!==r&&6===r.tag?(n(e,r.sibling),(r=i(r,a,s)).return=e,e=r):(n(e,r),(r=ki(a,e.mode,s)).return=e,e=r),o(e);if(da(a))return m(e,r,a,s);if(bt(a))return g(e,r,a,s);if(c&&ha(e,a),void 0===a&&!l)switch(e.tag){case 2:case 1:p("152",(s=e.type).displayName||s.name||"Component")}return n(e,r)}}var ma=fa(!0),ga=fa(!1),va=null,ba=null,ya=!1;function wa(e,t){var n=new _i(5,null,null,0);n.type="DELETED",n.stateNode=t,n.return=e,n.effectTag=8,null!==e.lastEffect?(e.lastEffect.nextEffect=n,e.lastEffect=n):e.firstEffect=e.lastEffect=n}function Ea(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);default:return!1}}function _a(e){if(ya){var t=ba;if(t){var n=t;if(!Ea(e,t)){if(!(t=ri(n))||!Ea(e,t))return e.effectTag|=2,ya=!1,void(va=e);wa(va,n)}va=e,ba=ii(t)}else e.effectTag|=2,ya=!1,va=e}}function Sa(e){for(e=e.return;null!==e&&5!==e.tag&&3!==e.tag;)e=e.return;va=e}function Ta(e){if(e!==va)return!1;if(!ya)return Sa(e),ya=!0,!1;var t=e.type;if(5!==e.tag||"head"!==t&&"body"!==t&&!Zr(t,e.memoizedProps))for(t=ba;t;)wa(e,t),t=ri(t);return Sa(e),ba=va?ri(e.stateNode):null,!0}function Ca(){ba=va=null,ya=!1}function ka(e,t,n){xa(e,t,n,t.expirationTime)}function xa(e,t,n,r){t.child=null===e?ga(t,null,n,r):ma(t,e.child,n,r)}function Pa(e,t){var n=t.ref;(null===e&&null!==n||null!==e&&e.ref!==n)&&(t.effectTag|=128)}function Na(e,t,n,r,i){Pa(e,t);var a=0!=(64&t.effectTag);if(!n&&!a)return r&&Ei(t,!1),Aa(e,t);n=t.stateNode,at.current=t;var o=a?null:n.render();return t.effectTag|=1,a&&(xa(e,t,null,i),t.child=null),xa(e,t,o,i),t.memoizedState=n.state,t.memoizedProps=n.props,r&&Ei(t,!0),t.child}function Ma(e){var t=e.stateNode;t.pendingContext?bi(0,t.pendingContext,t.pendingContext!==t.context):t.context&&bi(0,t.context,!1),ra(e,t.containerInfo)}function Da(e,t,n,r){var i=e.child;for(null!==i&&(i.return=e);null!==i;){switch(i.tag){case 12:var a=0|i.stateNode;if(i.type===t&&0!=(a&n)){for(a=i;null!==a;){var o=a.alternate;if(0===a.expirationTime||a.expirationTime>r)a.expirationTime=r,null!==o&&(0===o.expirationTime||o.expirationTime>r)&&(o.expirationTime=r);else{if(null===o||!(0===o.expirationTime||o.expirationTime>r))break;o.expirationTime=r}a=a.return}a=null}else a=i.child;break;case 13:a=i.type===e.type?null:i.child;break;default:a=i.child}if(null!==a)a.return=i;else for(a=i;null!==a;){if(a===e){a=null;break}if(null!==(i=a.sibling)){i.return=a.return,a=i;break}a=a.return}i=a}}function Aa(e,t){if(null!==e&&t.child!==e.child&&p("153"),null!==t.child){var n=Si(e=t.child,e.pendingProps,e.expirationTime);for(t.child=n,n.return=t;null!==e.sibling;)e=e.sibling,(n=n.sibling=Si(e,e.pendingProps,e.expirationTime)).return=t;n.sibling=null}return t.child}function Oa(e,t,n){if(0===t.expirationTime||t.expirationTime>n){switch(t.tag){case 3:Ma(t);break;case 2:wi(t);break;case 4:ra(t,t.stateNode.containerInfo);break;case 13:Qi(t)}return null}switch(t.tag){case 0:null!==e&&p("155");var r=t.type,i=t.pendingProps,a=hi(t);return r=r(i,a=fi(t,a)),t.effectTag|=1,"object"==typeof r&&null!==r&&"function"==typeof r.render&&void 0===r.$$typeof?(a=t.type,t.tag=2,t.memoizedState=null!==r.state&&void 0!==r.state?r.state:null,"function"==typeof(a=a.getDerivedStateFromProps)&&oa(t,a,i),i=wi(t),r.updater=sa,t.stateNode=r,r._reactInternalFiber=t,ua(t,n),e=Na(e,t,!0,i,n)):(t.tag=1,ka(e,t,r),t.memoizedProps=i,e=t.child),e;case 1:return i=t.type,n=t.pendingProps,di.current||t.memoizedProps!==n?(i=i(n,r=fi(t,r=hi(t))),t.effectTag|=1,ka(e,t,i),t.memoizedProps=n,e=t.child):e=Aa(e,t),e;case 2:if(i=wi(t),null===e)if(null===t.stateNode){var o=t.pendingProps,s=t.type;r=hi(t);var l=2===t.tag&&null!=t.type.contextTypes;o=new s(o,a=l?fi(t,r):d),t.memoizedState=null!==o.state&&void 0!==o.state?o.state:null,o.updater=sa,t.stateNode=o,o._reactInternalFiber=t,l&&((l=t.stateNode).__reactInternalMemoizedUnmaskedChildContext=r,l.__reactInternalMemoizedMaskedChildContext=a),ua(t,n),r=!0}else{s=t.type,r=t.stateNode,l=t.memoizedProps,a=t.pendingProps,r.props=l;var c=r.context;o=fi(t,o=hi(t));var u=s.getDerivedStateFromProps;(s="function"==typeof u||"function"==typeof r.getSnapshotBeforeUpdate)||"function"!=typeof r.UNSAFE_componentWillReceiveProps&&"function"!=typeof r.componentWillReceiveProps||(l!==a||c!==o)&&ca(t,r,a,o),Ii=!1;var h=t.memoizedState;c=r.state=h;var f=t.updateQueue;null!==f&&(Vi(t,f,a,r,n),c=t.memoizedState),l!==a||h!==c||di.current||Ii?("function"==typeof u&&(oa(t,u,a),c=t.memoizedState),(l=Ii||la(t,l,a,h,c,o))?(s||"function"!=typeof r.UNSAFE_componentWillMount&&"function"!=typeof r.componentWillMount||("function"==typeof r.componentWillMount&&r.componentWillMount(),"function"==typeof r.UNSAFE_componentWillMount&&r.UNSAFE_componentWillMount()),"function"==typeof r.componentDidMount&&(t.effectTag|=4)):("function"==typeof r.componentDidMount&&(t.effectTag|=4),t.memoizedProps=a,t.memoizedState=c),r.props=a,r.state=c,r.context=o,r=l):("function"==typeof r.componentDidMount&&(t.effectTag|=4),r=!1)}else s=t.type,r=t.stateNode,a=t.memoizedProps,l=t.pendingProps,r.props=a,c=r.context,o=fi(t,o=hi(t)),(s="function"==typeof(u=s.getDerivedStateFromProps)||"function"==typeof r.getSnapshotBeforeUpdate)||"function"!=typeof r.UNSAFE_componentWillReceiveProps&&"function"!=typeof r.componentWillReceiveProps||(a!==l||c!==o)&&ca(t,r,l,o),Ii=!1,c=t.memoizedState,h=r.state=c,null!==(f=t.updateQueue)&&(Vi(t,f,l,r,n),h=t.memoizedState),a!==l||c!==h||di.current||Ii?("function"==typeof u&&(oa(t,u,l),h=t.memoizedState),(u=Ii||la(t,a,l,c,h,o))?(s||"function"!=typeof r.UNSAFE_componentWillUpdate&&"function"!=typeof r.componentWillUpdate||("function"==typeof r.componentWillUpdate&&r.componentWillUpdate(l,h,o),"function"==typeof r.UNSAFE_componentWillUpdate&&r.UNSAFE_componentWillUpdate(l,h,o)),"function"==typeof r.componentDidUpdate&&(t.effectTag|=4),"function"==typeof r.getSnapshotBeforeUpdate&&(t.effectTag|=256)):("function"!=typeof r.componentDidUpdate||a===e.memoizedProps&&c===e.memoizedState||(t.effectTag|=4),"function"!=typeof r.getSnapshotBeforeUpdate||a===e.memoizedProps&&c===e.memoizedState||(t.effectTag|=256),t.memoizedProps=l,t.memoizedState=h),r.props=l,r.state=h,r.context=o,r=u):("function"!=typeof r.componentDidUpdate||a===e.memoizedProps&&c===e.memoizedState||(t.effectTag|=4),"function"!=typeof r.getSnapshotBeforeUpdate||a===e.memoizedProps&&c===e.memoizedState||(t.effectTag|=256),r=!1);return Na(e,t,r,i,n);case 3:return Ma(t),null!==(i=t.updateQueue)?(r=null!==(r=t.memoizedState)?r.element:null,Vi(t,i,t.pendingProps,null,n),(i=t.memoizedState.element)===r?(Ca(),e=Aa(e,t)):(r=t.stateNode,(r=(null===e||null===e.child)&&r.hydrate)&&(ba=ii(t.stateNode.containerInfo),va=t,r=ya=!0),r?(t.effectTag|=2,t.child=ga(t,null,i,n)):(Ca(),ka(e,t,i)),e=t.child)):(Ca(),e=Aa(e,t)),e;case 5:return na(ta.current),(i=na(Zi.current))!==(r=Nr(i,t.type))&&(ci(ea,t),ci(Zi,r)),null===e&&_a(t),i=t.type,l=t.memoizedProps,r=t.pendingProps,a=null!==e?e.memoizedProps:null,di.current||l!==r||((l=1&t.mode&&!!r.hidden)&&(t.expirationTime=1073741823),l&&1073741823===n)?(l=r.children,Zr(i,r)?l=null:a&&Zr(i,a)&&(t.effectTag|=16),Pa(e,t),1073741823!==n&&1&t.mode&&r.hidden?(t.expirationTime=1073741823,t.memoizedProps=r,e=null):(ka(e,t,l),t.memoizedProps=r,e=t.child)):e=Aa(e,t),e;case 6:return null===e&&_a(t),t.memoizedProps=t.pendingProps,null;case 16:return null;case 4:return ra(t,t.stateNode.containerInfo),i=t.pendingProps,di.current||t.memoizedProps!==i?(null===e?t.child=ma(t,null,i,n):ka(e,t,i),t.memoizedProps=i,e=t.child):e=Aa(e,t),e;case 14:return i=t.type.render,n=t.pendingProps,r=t.ref,di.current||t.memoizedProps!==n||r!==(null!==e?e.ref:null)?(ka(e,t,i=i(n,r)),t.memoizedProps=n,e=t.child):e=Aa(e,t),e;case 10:return n=t.pendingProps,di.current||t.memoizedProps!==n?(ka(e,t,n),t.memoizedProps=n,e=t.child):e=Aa(e,t),e;case 11:return n=t.pendingProps.children,di.current||null!==n&&t.memoizedProps!==n?(ka(e,t,n),t.memoizedProps=n,e=t.child):e=Aa(e,t),e;case 15:return n=t.pendingProps,t.memoizedProps===n?e=Aa(e,t):(ka(e,t,n.children),t.memoizedProps=n,e=t.child),e;case 13:return function(e,t,n){var r=t.type._context,i=t.pendingProps,a=t.memoizedProps,o=!0;if(di.current)o=!1;else if(a===i)return t.stateNode=0,Qi(t),Aa(e,t);var s=i.value;if(t.memoizedProps=i,null===a)s=1073741823;else if(a.value===i.value){if(a.children===i.children&&o)return t.stateNode=0,Qi(t),Aa(e,t);s=0}else{var l=a.value;if(l===s&&(0!==l||1/l==1/s)||l!=l&&s!=s){if(a.children===i.children&&o)return t.stateNode=0,Qi(t),Aa(e,t);s=0}else if(s="function"==typeof r._calculateChangedBits?r._calculateChangedBits(l,s):1073741823,0==(s|=0)){if(a.children===i.children&&o)return t.stateNode=0,Qi(t),Aa(e,t)}else Da(t,r,s,n)}return t.stateNode=s,Qi(t),ka(e,t,i.children),t.child}(e,t,n);case 12:e:if(r=t.type,a=t.pendingProps,l=t.memoizedProps,i=r._currentValue,o=r._changedBits,di.current||0!==o||l!==a){if(t.memoizedProps=a,void 0!==(s=a.unstable_observedBits)&&null!==s||(s=1073741823),t.stateNode=s,0!=(o&s))Da(t,r,o,n);else if(l===a){e=Aa(e,t);break e}n=(n=a.children)(i),t.effectTag|=1,ka(e,t,n),e=t.child}else e=Aa(e,t);return e;default:p("156")}}function Ia(e){e.effectTag|=4}var Ra=void 0,Ua=void 0,Fa=void 0;function La(e,t){var n=t.pendingProps;switch(t.tag){case 1:return null;case 2:return gi(t),null;case 3:ia(),vi();var r=t.stateNode;return r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),null!==e&&null!==e.child||(Ta(t),t.effectTag&=-3),Ra(t),null;case 5:aa(t),r=na(ta.current);var i=t.type;if(null!==e&&null!=t.stateNode){var a=e.memoizedProps,o=t.stateNode,s=na(Zi.current);o=Hr(o,i,a,n,r),Ua(e,t,o,i,a,n,r,s),e.ref!==t.ref&&(t.effectTag|=128)}else{if(!n)return null===t.stateNode&&p("166"),null;if(e=na(Zi.current),Ta(t))n=t.stateNode,i=t.type,a=t.memoizedProps,n[B]=t,n[z]=a,r=Gr(n,i,a,e,r),t.updateQueue=r,null!==r&&Ia(t);else{(e=zr(i,n,r,e))[B]=t,e[z]=n;e:for(a=t.child;null!==a;){if(5===a.tag||6===a.tag)e.appendChild(a.stateNode);else if(4!==a.tag&&null!==a.child){a.child.return=a,a=a.child;continue}if(a===t)break;for(;null===a.sibling;){if(null===a.return||a.return===t)break e;a=a.return}a.sibling.return=a.return,a=a.sibling}qr(e,i,n,r),Jr(i,n)&&Ia(t),t.stateNode=e}null!==t.ref&&(t.effectTag|=128)}return null;case 6:if(e&&null!=t.stateNode)Fa(e,t,e.memoizedProps,n);else{if("string"!=typeof n)return null===t.stateNode&&p("166"),null;r=na(ta.current),na(Zi.current),Ta(t)?(r=t.stateNode,n=t.memoizedProps,r[B]=t,$r(r,n)&&Ia(t)):((r=Vr(n,r))[B]=t,t.stateNode=r)}return null;case 14:case 16:case 10:case 11:case 15:return null;case 4:return ia(),Ra(t),null;case 13:return Xi(t),null;case 12:return null;case 0:p("167");default:p("156")}}function ja(e,t){var n=t.source;null===t.stack&&null!==n&&wt(n),null!==n&&yt(n),t=t.value,null!==e&&2===e.tag&&yt(e);try{t&&t.suppressReactErrorLogging||console.error(t)}catch(e){e&&e.suppressReactErrorLogging||console.error(e)}}function Wa(e){var t=e.ref;if(null!==t)if("function"==typeof t)try{t(null)}catch(t){go(e,t)}else t.current=null}function Ba(e){switch(Oi(e),e.tag){case 2:Wa(e);var t=e.stateNode;if("function"==typeof t.componentWillUnmount)try{t.props=e.memoizedProps,t.state=e.memoizedState,t.componentWillUnmount()}catch(t){go(e,t)}break;case 5:Wa(e);break;case 4:qa(e)}}function za(e){return 5===e.tag||3===e.tag||4===e.tag}function Va(e){e:{for(var t=e.return;null!==t;){if(za(t)){var n=t;break e}t=t.return}p("160"),n=void 0}var r=t=void 0;switch(n.tag){case 5:t=n.stateNode,r=!1;break;case 3:case 4:t=n.stateNode.containerInfo,r=!0;break;default:p("161")}16&n.effectTag&&(Or(t,""),n.effectTag&=-17);e:t:for(n=e;;){for(;null===n.sibling;){if(null===n.return||za(n.return)){n=null;break e}n=n.return}for(n.sibling.return=n.return,n=n.sibling;5!==n.tag&&6!==n.tag;){if(2&n.effectTag)continue t;if(null===n.child||4===n.tag)continue t;n.child.return=n,n=n.child}if(!(2&n.effectTag)){n=n.stateNode;break e}}for(var i=e;;){if(5===i.tag||6===i.tag)if(n)if(r){var a=t,o=i.stateNode,s=n;8===a.nodeType?a.parentNode.insertBefore(o,s):a.insertBefore(o,s)}else t.insertBefore(i.stateNode,n);else r?(a=t,o=i.stateNode,8===a.nodeType?a.parentNode.insertBefore(o,a):a.appendChild(o)):t.appendChild(i.stateNode);else if(4!==i.tag&&null!==i.child){i.child.return=i,i=i.child;continue}if(i===e)break;for(;null===i.sibling;){if(null===i.return||i.return===e)return;i=i.return}i.sibling.return=i.return,i=i.sibling}}function qa(e){for(var t=e,n=!1,r=void 0,i=void 0;;){if(!n){n=t.return;e:for(;;){switch(null===n&&p("160"),n.tag){case 5:r=n.stateNode,i=!1;break e;case 3:case 4:r=n.stateNode.containerInfo,i=!0;break e}n=n.return}n=!0}if(5===t.tag||6===t.tag){e:for(var a=t,o=a;;)if(Ba(o),null!==o.child&&4!==o.tag)o.child.return=o,o=o.child;else{if(o===a)break;for(;null===o.sibling;){if(null===o.return||o.return===a)break e;o=o.return}o.sibling.return=o.return,o=o.sibling}i?(a=r,o=t.stateNode,8===a.nodeType?a.parentNode.removeChild(o):a.removeChild(o)):r.removeChild(t.stateNode)}else if(4===t.tag?r=t.stateNode.containerInfo:Ba(t),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;4===(t=t.return).tag&&(n=!1)}t.sibling.return=t.return,t=t.sibling}}function Ha(e,t){switch(t.tag){case 2:break;case 5:var n=t.stateNode;if(null!=n){var r=t.memoizedProps;e=null!==e?e.memoizedProps:r;var i=t.type,a=t.updateQueue;t.updateQueue=null,null!==a&&(n[z]=r,Kr(n,a,i,e,r))}break;case 6:null===t.stateNode&&p("162"),t.stateNode.nodeValue=t.memoizedProps;break;case 3:case 15:case 16:break;default:p("163")}}function Ka(e,t,n){(n=Fi(n)).tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){Zo(r),ja(e,t)},n}function Ga(e,t,n){(n=Fi(n)).tag=3;var r=e.stateNode;return null!==r&&"function"==typeof r.componentDidCatch&&(n.callback=function(){null===uo?uo=new Set([this]):uo.add(this);var n=t.value,r=t.stack;ja(e,t),this.componentDidCatch(n,{componentStack:null!==r?r:""})}),n}function $a(e,t,n,r,i,a){n.effectTag|=512,n.firstEffect=n.lastEffect=null,r=Ki(r,n),e=t;do{switch(e.tag){case 3:return e.effectTag|=1024,void Wi(e,r=Ka(e,r,a),a);case 2:if(t=r,n=e.stateNode,0==(64&e.effectTag)&&null!==n&&"function"==typeof n.componentDidCatch&&(null===uo||!uo.has(n)))return e.effectTag|=1024,void Wi(e,r=Ga(e,t,a),a)}e=e.return}while(null!==e)}function Ya(e){switch(e.tag){case 2:gi(e);var t=e.effectTag;return 1024&t?(e.effectTag=-1025&t|64,e):null;case 3:return ia(),vi(),1024&(t=e.effectTag)?(e.effectTag=-1025&t|64,e):null;case 5:return aa(e),null;case 16:return 1024&(t=e.effectTag)?(e.effectTag=-1025&t|64,e):null;case 4:return ia(),null;case 13:return Xi(e),null;default:return null}}Ra=function(){},Ua=function(e,t,n){(t.updateQueue=n)&&Ia(t)},Fa=function(e,t,n,r){n!==r&&Ia(t)};var Qa=ei(),Xa=2,Ja=Qa,Za=0,eo=0,to=!1,no=null,ro=null,io=0,ao=-1,oo=!1,so=null,lo=!1,co=!1,uo=null;function po(){if(null!==no)for(var e=no.return;null!==e;){var t=e;switch(t.tag){case 2:gi(t);break;case 3:ia(),vi();break;case 5:aa(t);break;case 4:ia();break;case 13:Xi(t)}e=e.return}ro=null,io=0,ao=-1,oo=!1,no=null,co=!1}function ho(e){for(;;){var t=e.alternate,n=e.return,r=e.sibling;if(0==(512&e.effectTag)){t=La(t,e);var i=e;if(1073741823===io||1073741823!==i.expirationTime){var a=0;switch(i.tag){case 3:case 2:var o=i.updateQueue;null!==o&&(a=o.expirationTime)}for(o=i.child;null!==o;)0!==o.expirationTime&&(0===a||a>o.expirationTime)&&(a=o.expirationTime),o=o.sibling;i.expirationTime=a}if(null!==t)return t;if(null!==n&&0==(512&n.effectTag)&&(null===n.firstEffect&&(n.firstEffect=e.firstEffect),null!==e.lastEffect&&(null!==n.lastEffect&&(n.lastEffect.nextEffect=e.firstEffect),n.lastEffect=e.lastEffect),1<e.effectTag&&(null!==n.lastEffect?n.lastEffect.nextEffect=e:n.firstEffect=e,n.lastEffect=e)),null!==r)return r;if(null===n){co=!0;break}e=n}else{if(null!==(e=Ya(e)))return e.effectTag&=511,e;if(null!==n&&(n.firstEffect=n.lastEffect=null,n.effectTag|=512),null!==r)return r;if(null===n)break;e=n}}return null}function fo(e){var t=Oa(e.alternate,e,io);return null===t&&(t=ho(e)),at.current=null,t}function mo(e,t,n){to&&p("243"),to=!0,t===io&&e===ro&&null!==no||(po(),io=t,ao=-1,no=Si((ro=e).current,null,io),e.pendingCommitExpirationTime=0);var r=!1;for(oo=!n||io<=Xa;;){try{if(n)for(;null!==no&&!Jo();)no=fo(no);else for(;null!==no;)no=fo(no)}catch(t){if(null===no)r=!0,Zo(t);else{null===no&&p("271");var i=(n=no).return;if(null===i){r=!0,Zo(t);break}$a(e,i,n,t,0,io),no=ho(n)}}break}if(to=!1,r)return null;if(null===no){if(co)return e.pendingCommitExpirationTime=t,e.current.alternate;oo&&p("262"),0<=ao&&setTimeout(function(){var t=e.current.expirationTime;0!==t&&(0===e.remainingExpirationTime||e.remainingExpirationTime<t)&&Vo(e,t)},ao),function(e){null===Po&&p("246"),Po.remainingExpirationTime=e}(e.current.expirationTime)}return null}function go(e,t){var n;e:{for(to&&!lo&&p("263"),n=e.return;null!==n;){switch(n.tag){case 2:var r=n.stateNode;if("function"==typeof n.type.getDerivedStateFromCatch||"function"==typeof r.componentDidCatch&&(null===uo||!uo.has(r))){ji(n,e=Ga(n,e=Ki(t,e),1),1),yo(n,1),n=void 0;break e}break;case 3:ji(n,e=Ka(n,e=Ki(t,e),1),1),yo(n,1),n=void 0;break e}n=n.return}3===e.tag&&(ji(e,n=Ka(e,n=Ki(t,e),1),1),yo(e,1)),n=void 0}return n}function vo(){var e=2+25*(1+((wo()-2+500)/25|0));return e<=Za&&(e=Za+1),Za=e}function bo(e,t){return e=0!==eo?eo:to?lo?1:io:1&t.mode?Fo?2+10*(1+((e-2+15)/10|0)):2+25*(1+((e-2+500)/25|0)):1,Fo&&(0===Mo||e>Mo)&&(Mo=e),e}function yo(e,t){for(;null!==e;){if((0===e.expirationTime||e.expirationTime>t)&&(e.expirationTime=t),null!==e.alternate&&(0===e.alternate.expirationTime||e.alternate.expirationTime>t)&&(e.alternate.expirationTime=t),null===e.return){if(3!==e.tag)break;var n=e.stateNode;!to&&0!==io&&t<io&&po();var r=n.current.expirationTime;to&&!lo&&ro===n||Vo(n,r),Wo>jo&&p("185")}e=e.return}}function wo(){return Ja=ei()-Qa,Xa=2+(Ja/10|0)}function Eo(e){var t=eo;eo=2+25*(1+((wo()-2+500)/25|0));try{return e()}finally{eo=t}}function _o(e,t,n,r,i){var a=eo;eo=1;try{return e(t,n,r,i)}finally{eo=a}}var So=null,To=null,Co=0,ko=void 0,xo=!1,Po=null,No=0,Mo=0,Do=!1,Ao=!1,Oo=null,Io=null,Ro=!1,Uo=!1,Fo=!1,Lo=null,jo=1e3,Wo=0,Bo=1;function zo(e){if(0!==Co){if(e>Co)return;null!==ko&&ni(ko)}var t=ei()-Qa;Co=e,ko=ti(Ho,{timeout:10*(e-2)-t})}function Vo(e,t){if(null===e.nextScheduledRoot)e.remainingExpirationTime=t,null===To?(So=To=e,e.nextScheduledRoot=e):(To=To.nextScheduledRoot=e).nextScheduledRoot=So;else{var n=e.remainingExpirationTime;(0===n||t<n)&&(e.remainingExpirationTime=t)}xo||(Ro?Uo&&(Po=e,No=1,Qo(e,1,!1)):1===t?Ko():zo(t))}function qo(){var e=0,t=null;if(null!==To)for(var n=To,r=So;null!==r;){var i=r.remainingExpirationTime;if(0===i){if((null===n||null===To)&&p("244"),r===r.nextScheduledRoot){So=To=r.nextScheduledRoot=null;break}if(r===So)So=i=r.nextScheduledRoot,To.nextScheduledRoot=i,r.nextScheduledRoot=null;else{if(r===To){(To=n).nextScheduledRoot=So,r.nextScheduledRoot=null;break}n.nextScheduledRoot=r.nextScheduledRoot,r.nextScheduledRoot=null}r=n.nextScheduledRoot}else{if((0===e||i<e)&&(e=i,t=r),r===To)break;n=r,r=r.nextScheduledRoot}}null!==(n=Po)&&n===t&&1===e?Wo++:Wo=0,Po=t,No=e}function Ho(e){Go(0,!0,e)}function Ko(){Go(1,!1,null)}function Go(e,t,n){if(Io=n,qo(),t)for(;null!==Po&&0!==No&&(0===e||e>=No)&&(!Do||wo()>=No);)wo(),Qo(Po,No,!Do),qo();else for(;null!==Po&&0!==No&&(0===e||e>=No);)Qo(Po,No,!1),qo();null!==Io&&(Co=0,ko=null),0!==No&&zo(No),Io=null,Do=!1,Yo()}function $o(e,t){xo&&p("253"),Po=e,No=t,Qo(e,t,!1),Ko(),Yo()}function Yo(){if(Wo=0,null!==Lo){var e=Lo;Lo=null;for(var t=0;t<e.length;t++){var n=e[t];try{n._onComplete()}catch(e){Ao||(Ao=!0,Oo=e)}}}if(Ao)throw e=Oo,Oo=null,Ao=!1,e}function Qo(e,t,n){xo&&p("245"),xo=!0,n?null!==(n=e.finishedWork)?Xo(e,n,t):null!==(n=mo(e,t,!0))&&(Jo()?e.finishedWork=n:Xo(e,n,t)):null!==(n=e.finishedWork)?Xo(e,n,t):null!==(n=mo(e,t,!1))&&Xo(e,n,t),xo=!1}function Xo(e,t,n){var r=e.firstBatch;if(null!==r&&r._expirationTime<=n&&(null===Lo?Lo=[r]:Lo.push(r),r._defer))return e.finishedWork=t,void(e.remainingExpirationTime=0);if(e.finishedWork=null,lo=to=!0,(n=t.stateNode).current===t&&p("177"),0===(r=n.pendingCommitExpirationTime)&&p("261"),n.pendingCommitExpirationTime=0,wo(),at.current=null,1<t.effectTag)if(null!==t.lastEffect){t.lastEffect.nextEffect=t;var i=t.firstEffect}else i=t;else i=t.firstEffect;Qr=Mn;var a=l();if(Vn(a)){if("selectionStart"in a)var o={start:a.selectionStart,end:a.selectionEnd};else e:{var s=window.getSelection&&window.getSelection();if(s&&0!==s.rangeCount){o=s.anchorNode;var c=s.anchorOffset,d=s.focusNode;s=s.focusOffset;try{o.nodeType,d.nodeType}catch(e){o=null;break e}var h=0,f=-1,m=-1,g=0,v=0,b=a,y=null;t:for(;;){for(var w;b!==o||0!==c&&3!==b.nodeType||(f=h+c),b!==d||0!==s&&3!==b.nodeType||(m=h+s),3===b.nodeType&&(h+=b.nodeValue.length),null!==(w=b.firstChild);)y=b,b=w;for(;;){if(b===a)break t;if(y===o&&++g===c&&(f=h),y===d&&++v===s&&(m=h),null!==(w=b.nextSibling))break;y=(b=y).parentNode}b=w}o=-1===f||-1===m?null:{start:f,end:m}}else o=null}o=o||{start:0,end:0}}else o=null;for(Xr={focusedElem:a,selectionRange:o},Dn(!1),so=i;null!==so;){a=!1,o=void 0;try{for(;null!==so;){if(256&so.effectTag){var E=so.alternate;switch((c=so).tag){case 2:if(256&c.effectTag&&null!==E){var _=E.memoizedProps,S=E.memoizedState,T=c.stateNode;T.props=c.memoizedProps,T.state=c.memoizedState;var C=T.getSnapshotBeforeUpdate(_,S);T.__reactInternalSnapshotBeforeUpdate=C}break;case 3:case 5:case 6:case 4:break;default:p("163")}}so=so.nextEffect}}catch(e){a=!0,o=e}a&&(null===so&&p("178"),go(so,o),null!==so&&(so=so.nextEffect))}for(so=i;null!==so;){E=!1,_=void 0;try{for(;null!==so;){var k=so.effectTag;if(16&k&&Or(so.stateNode,""),128&k){var x=so.alternate;if(null!==x){var P=x.ref;null!==P&&("function"==typeof P?P(null):P.current=null)}}switch(14&k){case 2:Va(so),so.effectTag&=-3;break;case 6:Va(so),so.effectTag&=-3,Ha(so.alternate,so);break;case 4:Ha(so.alternate,so);break;case 8:qa(S=so),S.return=null,S.child=null,S.alternate&&(S.alternate.child=null,S.alternate.return=null)}so=so.nextEffect}}catch(e){E=!0,_=e}E&&(null===so&&p("178"),go(so,_),null!==so&&(so=so.nextEffect))}if(P=Xr,x=l(),k=P.focusedElem,E=P.selectionRange,x!==k&&u(document.documentElement,k)){null!==E&&Vn(k)&&(x=E.start,void 0===(P=E.end)&&(P=x),"selectionStart"in k?(k.selectionStart=x,k.selectionEnd=Math.min(P,k.value.length)):window.getSelection&&(x=window.getSelection(),_=k[fe()].length,P=Math.min(E.start,_),E=void 0===E.end?P:Math.min(E.end,_),!x.extend&&P>E&&(_=E,E=P,P=_),_=zn(k,P),S=zn(k,E),_&&S&&(1!==x.rangeCount||x.anchorNode!==_.node||x.anchorOffset!==_.offset||x.focusNode!==S.node||x.focusOffset!==S.offset)&&((T=document.createRange()).setStart(_.node,_.offset),x.removeAllRanges(),P>E?(x.addRange(T),x.extend(S.node,S.offset)):(T.setEnd(S.node,S.offset),x.addRange(T))))),x=[];for(P=k;P=P.parentNode;)1===P.nodeType&&x.push({element:P,left:P.scrollLeft,top:P.scrollTop});for("function"==typeof k.focus&&k.focus(),k=0;k<x.length;k++)(P=x[k]).element.scrollLeft=P.left,P.element.scrollTop=P.top}for(Xr=null,Dn(Qr),Qr=null,n.current=t,so=i;null!==so;){i=!1,k=void 0;try{for(x=r;null!==so;){var N=so.effectTag;if(36&N){var M=so.alternate;switch(E=x,(P=so).tag){case 2:var D=P.stateNode;if(4&P.effectTag)if(null===M)D.props=P.memoizedProps,D.state=P.memoizedState,D.componentDidMount();else{var A=M.memoizedProps,O=M.memoizedState;D.props=P.memoizedProps,D.state=P.memoizedState,D.componentDidUpdate(A,O,D.__reactInternalSnapshotBeforeUpdate)}var I=P.updateQueue;null!==I&&(D.props=P.memoizedProps,D.state=P.memoizedState,Hi(P,I,D));break;case 3:var R=P.updateQueue;if(null!==R){if(_=null,null!==P.child)switch(P.child.tag){case 5:_=P.child.stateNode;break;case 2:_=P.child.stateNode}Hi(P,R,_)}break;case 5:var U=P.stateNode;null===M&&4&P.effectTag&&Jr(P.type,P.memoizedProps)&&U.focus();break;case 6:case 4:case 15:case 16:break;default:p("163")}}if(128&N){P=void 0;var F=so.ref;if(null!==F){var L=so.stateNode;switch(so.tag){case 5:P=L;break;default:P=L}"function"==typeof F?F(P):F.current=P}}var j=so.nextEffect;so.nextEffect=null,so=j}}catch(e){i=!0,k=e}i&&(null===so&&p("178"),go(so,k),null!==so&&(so=so.nextEffect))}to=lo=!1,Ai(t.stateNode),0===(t=n.current.expirationTime)&&(uo=null),e.remainingExpirationTime=t}function Jo(){return!(null===Io||Io.timeRemaining()>Bo)&&(Do=!0)}function Zo(e){null===Po&&p("246"),Po.remainingExpirationTime=0,Ao||(Ao=!0,Oo=e)}function es(e,t){var n=Ro;Ro=!0;try{return e(t)}finally{(Ro=n)||xo||Ko()}}function ts(e,t){if(Ro&&!Uo){Uo=!0;try{return e(t)}finally{Uo=!1}}return e(t)}function ns(e,t){xo&&p("187");var n=Ro;Ro=!0;try{return _o(e,t)}finally{Ro=n,Ko()}}function rs(e,t,n){if(Fo)return e(t,n);Ro||xo||0===Mo||(Go(Mo,!1,null),Mo=0);var r=Fo,i=Ro;Ro=Fo=!0;try{return e(t,n)}finally{Fo=r,(Ro=i)||xo||Ko()}}function is(e){var t=Ro;Ro=!0;try{_o(e)}finally{(Ro=t)||xo||Go(1,!1,null)}}function as(e,t,n,r,i){var a=t.current;if(n){var o;n=n._reactInternalFiber;e:{for(2===sn(n)&&2===n.tag||p("170"),o=n;3!==o.tag;){if(mi(o)){o=o.stateNode.__reactInternalMemoizedMergedChildContext;break e}(o=o.return)||p("171")}o=o.stateNode.context}n=mi(n)?yi(n,o):o}else n=d;return null===t.context?t.context=n:t.pendingContext=n,t=i,(i=Fi(r)).payload={element:e},null!==(t=void 0===t?null:t)&&(i.callback=t),ji(a,i,r),yo(a,r),r}function os(e){var t=e._reactInternalFiber;return void 0===t&&("function"==typeof e.render?p("188"):p("268",Object.keys(e))),null===(e=un(t))?null:e.stateNode}function ss(e,t,n,r){var i=t.current;return as(e,t,n,i=bo(wo(),i),r)}function ls(e){if(!(e=e.current).child)return null;switch(e.child.tag){case 5:default:return e.child.stateNode}}function cs(e){var t=e.findFiberByHostInstance;return function(e){if("undefined"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__)return!1;var t=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(t.isDisabled||!t.supportsFiber)return!0;try{var n=t.inject(e);Ni=Di(function(e){return t.onCommitFiberRoot(n,e)}),Mi=Di(function(e){return t.onCommitFiberUnmount(n,e)})}catch(e){}return!0}(o({},e,{findHostInstanceByFiber:function(e){return null===(e=un(e))?null:e.stateNode},findFiberByHostInstance:function(e){return t?t(e):null}}))}var us=es,ds=rs,ps=function(){xo||0===Mo||(Go(Mo,!1,null),Mo=0)};function hs(e){this._expirationTime=vo(),this._root=e,this._callbacks=this._next=null,this._hasChildren=this._didComplete=!1,this._children=null,this._defer=!0}function fs(){this._callbacks=null,this._didCommit=!1,this._onCommit=this._onCommit.bind(this)}function ms(e,t,n){this._internalRoot=Pi(e,t,n)}function gs(e){return!(!e||1!==e.nodeType&&9!==e.nodeType&&11!==e.nodeType&&(8!==e.nodeType||" react-mount-point-unstable "!==e.nodeValue))}function vs(e,t,n,r,i){gs(n)||p("200");var a=n._reactRootContainer;if(a){if("function"==typeof i){var o=i;i=function(){var e=ls(a._internalRoot);o.call(e)}}null!=e?a.legacy_renderSubtreeIntoContainer(e,t,i):a.render(t,i)}else{if(a=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 ms(e,!1,t)}(n,r),"function"==typeof i){var s=i;i=function(){var e=ls(a._internalRoot);s.call(e)}}ts(function(){null!=e?a.legacy_renderSubtreeIntoContainer(e,t,i):a.render(t,i)})}return ls(a._internalRoot)}function bs(e,t){var n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:null;return gs(t)||p("200"),function(e,t,n){var r=3<arguments.length&&void 0!==arguments[3]?arguments[3]:null;return{$$typeof:lt,key:null==r?null:""+r,children:e,containerInfo:t,implementation:n}}(e,t,null,n)}je.injectFiberControlledHostComponent(Yr),hs.prototype.render=function(e){this._defer||p("250"),this._hasChildren=!0,this._children=e;var t=this._root._internalRoot,n=this._expirationTime,r=new fs;return as(e,t,null,n,r._onCommit),r},hs.prototype.then=function(e){if(this._didComplete)e();else{var t=this._callbacks;null===t&&(t=this._callbacks=[]),t.push(e)}},hs.prototype.commit=function(){var e=this._root._internalRoot,t=e.firstBatch;if(this._defer&&null!==t||p("251"),this._hasChildren){var n=this._expirationTime;if(t!==this){this._hasChildren&&(n=this._expirationTime=t._expirationTime,this.render(this._children));for(var r=null,i=t;i!==this;)r=i,i=i._next;null===r&&p("251"),r._next=i._next,this._next=t,e.firstBatch=this}this._defer=!1,$o(e,n),t=this._next,this._next=null,null!==(t=e.firstBatch=t)&&t._hasChildren&&t.render(t._children)}else this._next=null,this._defer=!1},hs.prototype._onComplete=function(){if(!this._didComplete){this._didComplete=!0;var e=this._callbacks;if(null!==e)for(var t=0;t<e.length;t++)(0,e[t])()}},fs.prototype.then=function(e){if(this._didCommit)e();else{var t=this._callbacks;null===t&&(t=this._callbacks=[]),t.push(e)}},fs.prototype._onCommit=function(){if(!this._didCommit){this._didCommit=!0;var e=this._callbacks;if(null!==e)for(var t=0;t<e.length;t++){var n=e[t];"function"!=typeof n&&p("191",n),n()}}},ms.prototype.render=function(e,t){var n=this._internalRoot,r=new fs;return null!==(t=void 0===t?null:t)&&r.then(t),ss(e,n,null,r._onCommit),r},ms.prototype.unmount=function(e){var t=this._internalRoot,n=new fs;return null!==(e=void 0===e?null:e)&&n.then(e),ss(null,t,null,n._onCommit),n},ms.prototype.legacy_renderSubtreeIntoContainer=function(e,t,n){var r=this._internalRoot,i=new fs;return null!==(n=void 0===n?null:n)&&i.then(n),ss(t,r,e,i._onCommit),i},ms.prototype.createBatch=function(){var e=new hs(this),t=e._expirationTime,n=this._internalRoot,r=n.firstBatch;if(null===r)n.firstBatch=e,e._next=null;else{for(n=null;null!==r&&r._expirationTime<=t;)n=r,r=r._next;e._next=r,null!==n&&(n._next=e)}return e},Ge=us,$e=ds,Ye=ps;var ys={createPortal:bs,findDOMNode:function(e){return null==e?null:1===e.nodeType?e:os(e)},hydrate:function(e,t,n){return vs(null,e,t,!0,n)},render:function(e,t,n){return vs(null,e,t,!1,n)},unstable_renderSubtreeIntoContainer:function(e,t,n,r){return(null==e||void 0===e._reactInternalFiber)&&p("38"),vs(e,t,n,!1,r)},unmountComponentAtNode:function(e){return gs(e)||p("40"),!!e._reactRootContainer&&(ts(function(){vs(null,null,e,!1,function(){e._reactRootContainer=null})}),!0)},unstable_createPortal:function(){return bs.apply(void 0,arguments)},unstable_batchedUpdates:es,unstable_deferredUpdates:Eo,unstable_interactiveUpdates:rs,flushSync:ns,unstable_flushControlled:is,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:{EventPluginHub:j,EventPluginRegistry:T,EventPropagators:ne,ReactControlledComponent:Ke,ReactDOMComponentTree:K,ReactDOMEventListener:Un},unstable_createRoot:function(e,t){return new ms(e,!0,null!=t&&!0===t.hydrate)}};cs({findFiberByHostInstance:V,bundleType:0,version:"16.4.2",rendererPackageName:"react-dom"});var ws={default:ys},Es=ws&&ys||ws;t.exports=Es.default?Es.default:Es},{"fbjs/lib/ExecutionEnvironment":5,"fbjs/lib/containsNode":8,"fbjs/lib/emptyFunction":9,"fbjs/lib/emptyObject":10,"fbjs/lib/getActiveElement":11,"fbjs/lib/invariant":14,"fbjs/lib/shallowEqual":17,"object-assign":21,react:29}],26:[function(e,t,n){(function(n){"use strict";"production"===n.env.NODE_ENV?(!function e(){if("undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE){if("production"!==n.env.NODE_ENV)throw new Error("^_^");try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(e){console.error(e)}}}(),t.exports=e("./cjs/react-dom.production.min.js")):t.exports=e("./cjs/react-dom.development.js")}).call(this,e("_process"))},{"./cjs/react-dom.development.js":24,"./cjs/react-dom.production.min.js":25,_process:36}],27:[function(e,t,n){(function(n){"use strict";"production"!==n.env.NODE_ENV&&function(){var n=e("object-assign"),r=e("prop-types/checkPropTypes"),i="function"==typeof Symbol&&Symbol.for,a=i?Symbol.for("react.element"):60103,o=i?Symbol.for("react.portal"):60106,s=i?Symbol.for("react.fragment"):60107,l=i?Symbol.for("react.strict_mode"):60108,c=i?Symbol.for("react.profiler"):60114,u=i?Symbol.for("react.provider"):60109,d=i?Symbol.for("react.context"):60110,p=i?Symbol.for("react.async_mode"):60111,h=i?Symbol.for("react.forward_ref"):60112,f=i?Symbol.for("react.placeholder"):60113,m="function"==typeof Symbol&&Symbol.iterator,g="@@iterator";function v(e){if(null===e||"object"!=typeof e)return null;var t=m&&e[m]||e[g];return"function"==typeof t?t:null}var b=function(){};function y(e,t,n,r,i,a,o,s){if(b(t),!e){var l=void 0;if(void 0===t)l=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var c=[n,r,i,a,o,s],u=0;(l=new Error(t.replace(/%s/g,function(){return c[u++]}))).name="Invariant Violation"}throw l.framesToPop=1,l}}b=function(e){if(void 0===e)throw new Error("invariant requires an error message argument")};var w=function(e,t){if(void 0===t)throw new Error("`lowPriorityWarning(condition, format, ...args)` requires a warning message argument");if(!e){for(var n=arguments.length,r=Array(n>2?n-2:0),i=2;i<n;i++)r[i-2]=arguments[i];(function(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];var i=0,a="Warning: "+e.replace(/%s/g,function(){return n[i++]});"undefined"!=typeof console&&console.warn(a);try{throw new Error(a)}catch(e){}}).apply(void 0,[t].concat(r))}},E=function(e,t){for(var n=arguments.length,r=Array(n>2?n-2:0),i=2;i<n;i++)r[i-2]=arguments[i];if(void 0===t)throw new Error("`warningWithoutStack(condition, format, ...args)` requires a warning message argument");if(r.length>8)throw new Error("warningWithoutStack() currently supports at most 8 arguments.");if(!e){if("undefined"!=typeof console){var a=r.map(function(e){return""+e}),o=a[0],s=a[1],l=a[2],c=a[3],u=a[4],d=a[5],p=a[6],h=a[7],f="Warning: "+t;switch(r.length){case 0:console.error(f);break;case 1:console.error(f,o);break;case 2:console.error(f,o,s);break;case 3:console.error(f,o,s,l);break;case 4:console.error(f,o,s,l,c);break;case 5:console.error(f,o,s,l,c,u);break;case 6:console.error(f,o,s,l,c,u,d);break;case 7:console.error(f,o,s,l,c,u,d,p);break;case 8:console.error(f,o,s,l,c,u,d,p,h);break;default:throw new Error("warningWithoutStack() currently supports at most 8 arguments.")}}try{var m=0,g="Warning: "+t.replace(/%s/g,function(){return r[m++]});throw new Error(g)}catch(e){}}},_={};function S(e,t){var n=e.constructor,r=n&&(n.displayName||n.name)||"ReactClass",i=r+"."+t;_[i]||(E(!1,"Can't call %s on a component that is not yet mounted. This is a no-op, but it might indicate a bug in your application. Instead, assign to `this.state` directly or define a `state = {};` class property with the desired state in the %s component.",t,r),_[i]=!0)}var T={isMounted:function(e){return!1},enqueueForceUpdate:function(e,t,n){S(e,"forceUpdate")},enqueueReplaceState:function(e,t,n,r){S(e,"replaceState")},enqueueSetState:function(e,t,n,r){S(e,"setState")}},C={};function k(e,t,n){this.props=e,this.context=t,this.refs=C,this.updater=n||T}Object.freeze(C),k.prototype.isReactComponent={},k.prototype.setState=function(e,t){"object"!=typeof e&&"function"!=typeof e&&null!=e&&y(!1,"setState(...): takes an object of state variables to update or a function which returns an object of state variables."),this.updater.enqueueSetState(this,e,t,"setState")},k.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};var x={isMounted:["isMounted","Instead, make sure to clean up subscriptions and pending requests in componentWillUnmount to prevent memory leaks."],replaceState:["replaceState","Refactor your code to use setState instead (see https://github.com/facebook/react/issues/3236)."]},P=function(e,t){Object.defineProperty(k.prototype,e,{get:function(){w(!1,"%s(...) is deprecated in plain JavaScript React classes. %s",t[0],t[1])}})};for(var N in x)x.hasOwnProperty(N)&&P(N,x[N]);function M(){}function D(e,t,n){this.props=e,this.context=t,this.refs=C,this.updater=n||T}M.prototype=k.prototype;var A=D.prototype=new M;A.constructor=D,n(A,k.prototype),A.isPureReactComponent=!0;var O={current:null,currentDispatcher:null},I=/^(.*)[\\\/]/,R=1;function U(e){if(null==e)return null;if("number"==typeof e.tag&&E(!1,"Received an unexpected object in getComponentName(). This is likely a bug in React. Please file an issue."),"function"==typeof e)return e.displayName||e.name||null;if("string"==typeof e)return e;switch(e){case p:return"AsyncMode";case s:return"Fragment";case o:return"Portal";case c:return"Profiler";case l:return"StrictMode";case f:return"Placeholder"}if("object"==typeof e){switch(e.$$typeof){case d:return"Context.Consumer";case u:return"Context.Provider";case h:var t=e.render,n=t.displayName||t.name||"";return e.displayName||(""!==n?"ForwardRef("+n+")":"ForwardRef")}if("function"==typeof e.then){var r=function(e){return e._reactStatus===R?e._reactResult:null}(e);if(r)return U(r)}}return null}var F={},L=null;function j(e){L=e}F.getCurrentStack=null,F.getStackAddendum=function(){var e="";if(L){var t=U(L.type),n=L._owner;e+=function(e,t,n){var r="";if(t){var i=t.fileName,a=i.replace(I,"");if(/^index\./.test(a)){var o=i.match(I);if(o){var s=o[1];s&&(a=s.replace(I,"")+"/"+a)}}r=" (at "+a+":"+t.lineNumber+")"}else n&&(r=" (created by "+n+")");return"\n in "+(e||"Unknown")+r}(t,L._source,n&&U(n.type))}var r=F.getCurrentStack;return r&&(e+=r()||""),e};var W={ReactCurrentOwner:O,assign:n};n(W,{ReactDebugCurrentFrame:F,ReactComponentTreeHook:{}});var B=function(e,t){if(!e){for(var n=W.ReactDebugCurrentFrame.getStackAddendum(),r=arguments.length,i=Array(r>2?r-2:0),a=2;a<r;a++)i[a-2]=arguments[a];E.apply(void 0,[!1,t+"%s"].concat(i,[n]))}},z=Object.prototype.hasOwnProperty,V={key:!0,ref:!0,__self:!0,__source:!0},q=void 0,H=void 0;function K(e){if(z.call(e,"ref")){var t=Object.getOwnPropertyDescriptor(e,"ref").get;if(t&&t.isReactWarning)return!1}return void 0!==e.ref}function G(e){if(z.call(e,"key")){var t=Object.getOwnPropertyDescriptor(e,"key").get;if(t&&t.isReactWarning)return!1}return void 0!==e.key}var $=function(e,t,n,r,i,o,s){var l={$$typeof:a,type:e,key:t,ref:n,props:s,_owner:o,_store:{}};return Object.defineProperty(l._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(l,"_self",{configurable:!1,enumerable:!1,writable:!1,value:r}),Object.defineProperty(l,"_source",{configurable:!1,enumerable:!1,writable:!1,value:i}),Object.freeze&&(Object.freeze(l.props),Object.freeze(l)),l};function Y(e,t,n){var r=void 0,i={},a=null,o=null,s=null,l=null;if(null!=t)for(r in K(t)&&(o=t.ref),G(t)&&(a=""+t.key),s=void 0===t.__self?null:t.__self,l=void 0===t.__source?null:t.__source,t)z.call(t,r)&&!V.hasOwnProperty(r)&&(i[r]=t[r]);var c=arguments.length-2;if(1===c)i.children=n;else if(c>1){for(var u=Array(c),d=0;d<c;d++)u[d]=arguments[d+2];Object.freeze&&Object.freeze(u),i.children=u}if(e&&e.defaultProps){var p=e.defaultProps;for(r in p)void 0===i[r]&&(i[r]=p[r])}if(a||o){var h="function"==typeof e?e.displayName||e.name||"Unknown":e;a&&function(e,t){var n=function(){q||(q=!0,E(!1,"%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://fb.me/react-special-props)",t))};n.isReactWarning=!0,Object.defineProperty(e,"key",{get:n,configurable:!0})}(i,h),o&&function(e,t){var n=function(){H||(H=!0,E(!1,"%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://fb.me/react-special-props)",t))};n.isReactWarning=!0,Object.defineProperty(e,"ref",{get:n,configurable:!0})}(i,h)}return $(e,a,o,s,l,O.current,i)}function Q(e){return"object"==typeof e&&null!==e&&e.$$typeof===a}var X=".",J=":";var Z=!1,ee=/\/+/g;function te(e){return(""+e).replace(ee,"$&/")}var ne=10,re=[];function ie(e,t,n,r){if(re.length){var i=re.pop();return i.result=e,i.keyPrefix=t,i.func=n,i.context=r,i.count=0,i}return{result:e,keyPrefix:t,func:n,context:r,count:0}}function ae(e){e.result=null,e.keyPrefix=null,e.func=null,e.context=null,e.count=0,re.length<ne&&re.push(e)}function oe(e,t,n){return null==e?0:function e(t,n,r,i){var s=typeof t;"undefined"!==s&&"boolean"!==s||(t=null);var l=!1;if(null===t)l=!0;else switch(s){case"string":case"number":l=!0;break;case"object":switch(t.$$typeof){case a:case o:l=!0}}if(l)return r(i,t,""===n?X+se(t,0):n),1;var c=void 0,u=0,d=""===n?X:n+J;if(Array.isArray(t))for(var p=0;p<t.length;p++)u+=e(c=t[p],d+se(c,p),r,i);else{var h=v(t);if("function"==typeof h){h===t.entries&&(Z||B(!1,"Using Maps as children is unsupported and will likely yield unexpected results. Convert it to a sequence/iterable of keyed ReactElements instead."),Z=!0);for(var f=h.call(t),m=void 0,g=0;!(m=f.next()).done;)u+=e(c=m.value,d+se(c,g++),r,i)}else if("object"===s){var b;b=" If you meant to render a collection of children, use an array instead."+F.getStackAddendum();var w=""+t;y(!1,"Objects are not valid as a React child (found: %s).%s","[object Object]"===w?"object with keys {"+Object.keys(t).join(", ")+"}":w,b)}}return u}(e,"",t,n)}function se(e,t){return"object"==typeof e&&null!==e&&null!=e.key?(n=e.key,r={"=":"=0",":":"=2"},"$"+(""+n).replace(/[=:]/g,function(e){return r[e]})):t.toString(36);var n,r}function le(e,t,n){var r=e.func,i=e.context;r.call(i,t,e.count++)}function ce(e,t,n){var r,i,a=e.result,o=e.keyPrefix,s=e.func,l=e.context,c=s.call(l,t,e.count++);Array.isArray(c)?ue(c,a,n,function(e){return e}):null!=c&&(Q(c)&&(r=c,i=o+(!c.key||t&&t.key===c.key?"":te(c.key)+"/")+n,c=$(r.type,i,r.ref,r._self,r._source,r._owner,r.props)),a.push(c))}function ue(e,t,n,r,i){var a="";null!=n&&(a=te(n)+"/");var o=ie(t,a,r,i);oe(e,ce,o),ae(o)}var de=void 0;function pe(){if(O.current){var e=U(O.current.type);if(e)return"\n\nCheck the render method of `"+e+"`."}return""}de=!1;var he={};function fe(e,t){if(e._store&&!e._store.validated&&null==e.key){e._store.validated=!0;var n=function(e){var t=pe();if(!t){var n="string"==typeof e?e:e.displayName||e.name;n&&(t="\n\nCheck the top-level render call using <"+n+">.")}return t}(t);if(!he[n]){he[n]=!0;var r="";e&&e._owner&&e._owner!==O.current&&(r=" It was passed a child from "+U(e._owner.type)+"."),j(e),B(!1,'Each child in an array or iterator should have a unique "key" prop.%s%s See https://fb.me/react-warning-keys for more information.',n,r),j(null)}}}function me(e,t){if("object"==typeof e)if(Array.isArray(e))for(var n=0;n<e.length;n++){var r=e[n];Q(r)&&fe(r,t)}else if(Q(e))e._store&&(e._store.validated=!0);else if(e){var i=v(e);if("function"==typeof i&&i!==e.entries)for(var a=i.call(e),o=void 0;!(o=a.next()).done;)Q(o.value)&&fe(o.value,t)}}function ge(e){var t=e.type,n=void 0,i=void 0;if("function"==typeof t)n=t.displayName||t.name,i=t.propTypes;else{if("object"!=typeof t||null===t||t.$$typeof!==h)return;var a=t.render.displayName||t.render.name||"";n=t.displayName||(""!==a?"ForwardRef("+a+")":"ForwardRef"),i=t.propTypes}i?(j(e),r(i,e.props,"prop",n,F.getStackAddendum),j(null)):void 0===t.PropTypes||de||(de=!0,E(!1,"Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",n||"Unknown")),"function"==typeof t.getDefaultProps&&(t.getDefaultProps.isReactClassApproved||E(!1,"getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead."))}function ve(e,t,n){var r=function(e){return"string"==typeof e||"function"==typeof e||e===s||e===p||e===c||e===l||e===f||"object"==typeof e&&null!==e&&("function"==typeof e.then||e.$$typeof===u||e.$$typeof===d||e.$$typeof===h)}(e);if(!r){var i="";(void 0===e||"object"==typeof e&&null!==e&&0===Object.keys(e).length)&&(i+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var o=function(e){if(null!==e&&void 0!==e&&void 0!==e.__source){var t=e.__source;return"\n\nCheck your code at "+t.fileName.replace(/^.*[\\\/]/,"")+":"+t.lineNumber+"."}return""}(t);i+=o||pe();var m=void 0;null===e?m="null":Array.isArray(e)?m="array":void 0!==e&&e.$$typeof===a?(m="<"+(U(e.type)||"Unknown")+" />",i=" Did you accidentally export a JSX literal instead of a component?"):m=typeof e,B(!1,"React.createElement: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",m,i)}var g=Y.apply(this,arguments);if(null==g)return g;if(r)for(var v=2;v<arguments.length;v++)me(arguments[v],e);return e===s?function(e){j(e);for(var t=Object.keys(e.props),n=0;n<t.length;n++){var r=t[n];if("children"!==r&&"key"!==r){B(!1,"Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",r);break}}null!==e.ref&&B(!1,"Invalid attribute `ref` supplied to `React.Fragment`."),j(null)}(g):ge(g),g}var be={Children:{map:function(e,t,n){if(null==e)return e;var r=[];return ue(e,r,null,t,n),r},forEach:function(e,t,n){if(null==e)return e;var r=ie(null,null,t,n);oe(e,le,r),ae(r)},count:function(e){return oe(e,function(){return null},null)},toArray:function(e){var t=[];return ue(e,t,null,function(e){return e}),t},only:function(e){return Q(e)||y(!1,"React.Children.only expected to receive a single React element child."),e}},createRef:function(){var e={current:null};return Object.seal(e),e},Component:k,PureComponent:D,createContext:function(e,t){void 0===t?t=null:null!==t&&"function"!=typeof t&&E(!1,"createContext: Expected the optional second argument to be a function. Instead received: %s",t);var n={$$typeof:d,_calculateChangedBits:t,_currentValue:e,_currentValue2:e,Provider:null,Consumer:null,unstable_read:null};return n.Provider={$$typeof:u,_context:n},n.Consumer=n,n.unstable_read=function(e,t){var n=O.currentDispatcher;return null===n&&y(!1,"Context.unstable_read(): Context can only be read while React is rendering, e.g. inside the render method or getDerivedStateFromProps."),n.readContext(e,t)}.bind(null,n),n._currentRenderer=null,n._currentRenderer2=null,n},forwardRef:function(e){return"function"!=typeof e?E(!1,"forwardRef requires a render function but was given %s.",null===e?"null":typeof e):0!==e.length&&2!==e.length&&E(!1,"forwardRef render functions accept exactly two parameters: props and ref. %s",1===e.length?"Did you forget to use the ref parameter?":"Any additional parameter will be undefined."),null!=e&&(null!=e.defaultProps||null!=e.propTypes)&&E(!1,"forwardRef render functions do not support propTypes or defaultProps. Did you accidentally pass a React component?"),{$$typeof:h,render:e}},Fragment:s,StrictMode:l,unstable_AsyncMode:p,unstable_Profiler:c,createElement:ve,cloneElement:function(e,t,r){for(var i=function(e,t,r){(null===e||void 0===e)&&y(!1,"React.cloneElement(...): The argument must be a React element, but you passed %s.",e);var i=void 0,a=n({},e.props),o=e.key,s=e.ref,l=e._self,c=e._source,u=e._owner;if(null!=t){K(t)&&(s=t.ref,u=O.current),G(t)&&(o=""+t.key);var d=void 0;for(i in e.type&&e.type.defaultProps&&(d=e.type.defaultProps),t)z.call(t,i)&&!V.hasOwnProperty(i)&&(void 0===t[i]&&void 0!==d?a[i]=d[i]:a[i]=t[i])}var p=arguments.length-2;if(1===p)a.children=r;else if(p>1){for(var h=Array(p),f=0;f<p;f++)h[f]=arguments[f+2];a.children=h}return $(e.type,o,s,l,c,u,a)}.apply(this,arguments),a=2;a<arguments.length;a++)me(arguments[a],i.type);return ge(i),i},createFactory:function(e){var t=ve.bind(null,e);return t.type=e,Object.defineProperty(t,"type",{enumerable:!1,get:function(){return w(!1,"Factory.type is deprecated. Access the class directly before passing it to createFactory."),Object.defineProperty(this,"type",{value:e}),e}}),t},isValidElement:Q,version:"16.5.1",__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:W};var ye=Object.freeze({default:be}),we=ye&&be||ye,Ee=we.default||we;t.exports=Ee}()}).call(this,e("_process"))},{_process:36,"object-assign":21,"prop-types/checkPropTypes":22}],28:[function(e,t,n){"use strict";var r=e("object-assign"),i="function"==typeof Symbol&&Symbol.for,a=i?Symbol.for("react.element"):60103,o=i?Symbol.for("react.portal"):60106,s=i?Symbol.for("react.fragment"):60107,l=i?Symbol.for("react.strict_mode"):60108,c=i?Symbol.for("react.profiler"):60114,u=i?Symbol.for("react.provider"):60109,d=i?Symbol.for("react.context"):60110,p=i?Symbol.for("react.async_mode"):60111,h=i?Symbol.for("react.forward_ref"):60112;i&&Symbol.for("react.placeholder");var f="function"==typeof Symbol&&Symbol.iterator;function m(e){for(var t=arguments.length-1,n="https://reactjs.org/docs/error-decoder.html?invariant="+e,r=0;r<t;r++)n+="&args[]="+encodeURIComponent(arguments[r+1]);!function(e,t,n,r,i,a,o,s){if(!e){if(e=void 0,void 0===t)e=Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var l=[n,r,i,a,o,s],c=0;(e=Error(t.replace(/%s/g,function(){return l[c++]}))).name="Invariant Violation"}throw e.framesToPop=1,e}}(!1,"Minified React error #"+e+"; visit %s for the full message or use the non-minified dev environment for full errors and additional helpful warnings. ",n)}var g={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},v={};function b(e,t,n){this.props=e,this.context=t,this.refs=v,this.updater=n||g}function y(){}function w(e,t,n){this.props=e,this.context=t,this.refs=v,this.updater=n||g}b.prototype.isReactComponent={},b.prototype.setState=function(e,t){"object"!=typeof e&&"function"!=typeof e&&null!=e&&m("85"),this.updater.enqueueSetState(this,e,t,"setState")},b.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")},y.prototype=b.prototype;var E=w.prototype=new y;E.constructor=w,r(E,b.prototype),E.isPureReactComponent=!0;var _={current:null,currentDispatcher:null},S=Object.prototype.hasOwnProperty,T={key:!0,ref:!0,__self:!0,__source:!0};function C(e,t,n){var r=void 0,i={},o=null,s=null;if(null!=t)for(r in void 0!==t.ref&&(s=t.ref),void 0!==t.key&&(o=""+t.key),t)S.call(t,r)&&!T.hasOwnProperty(r)&&(i[r]=t[r]);var l=arguments.length-2;if(1===l)i.children=n;else if(1<l){for(var c=Array(l),u=0;u<l;u++)c[u]=arguments[u+2];i.children=c}if(e&&e.defaultProps)for(r in l=e.defaultProps)void 0===i[r]&&(i[r]=l[r]);return{$$typeof:a,type:e,key:o,ref:s,props:i,_owner:_.current}}function k(e){return"object"==typeof e&&null!==e&&e.$$typeof===a}var x=/\/+/g,P=[];function N(e,t,n,r){if(P.length){var i=P.pop();return i.result=e,i.keyPrefix=t,i.func=n,i.context=r,i.count=0,i}return{result:e,keyPrefix:t,func:n,context:r,count:0}}function M(e){e.result=null,e.keyPrefix=null,e.func=null,e.context=null,e.count=0,10>P.length&&P.push(e)}function D(e,t,n){return null==e?0:function e(t,n,r,i){var s=typeof t;"undefined"!==s&&"boolean"!==s||(t=null);var l=!1;if(null===t)l=!0;else switch(s){case"string":case"number":l=!0;break;case"object":switch(t.$$typeof){case a:case o:l=!0}}if(l)return r(i,t,""===n?"."+A(t,0):n),1;if(l=0,n=""===n?".":n+":",Array.isArray(t))for(var c=0;c<t.length;c++){var u=n+A(s=t[c],c);l+=e(s,u,r,i)}else if(u=null===t||"object"!=typeof t?null:"function"==typeof(u=f&&t[f]||t["@@iterator"])?u:null,"function"==typeof u)for(t=u.call(t),c=0;!(s=t.next()).done;)l+=e(s=s.value,u=n+A(s,c++),r,i);else"object"===s&&m("31","[object Object]"==(r=""+t)?"object with keys {"+Object.keys(t).join(", ")+"}":r,"");return l}(e,"",t,n)}function A(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 O(e,t){e.func.call(e.context,t,e.count++)}function I(e,t,n){var r=e.result,i=e.keyPrefix;e=e.func.call(e.context,t,e.count++),Array.isArray(e)?R(e,r,n,function(e){return e}):null!=e&&(k(e)&&(e=function(e,t){return{$$typeof:a,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}(e,i+(!e.key||t&&t.key===e.key?"":(""+e.key).replace(x,"$&/")+"/")+n)),r.push(e))}function R(e,t,n,r,i){var a="";null!=n&&(a=(""+n).replace(x,"$&/")+"/"),D(e,I,t=N(t,a,r,i)),M(t)}var U={Children:{map:function(e,t,n){if(null==e)return e;var r=[];return R(e,r,null,t,n),r},forEach:function(e,t,n){if(null==e)return e;D(e,O,t=N(null,null,t,n)),M(t)},count:function(e){return D(e,function(){return null},null)},toArray:function(e){var t=[];return R(e,t,null,function(e){return e}),t},only:function(e){return k(e)||m("143"),e}},createRef:function(){return{current:null}},Component:b,PureComponent:w,createContext:function(e,t){return void 0===t&&(t=null),(e={$$typeof:d,_calculateChangedBits:t,_currentValue:e,_currentValue2:e,Provider:null,Consumer:null,unstable_read:null}).Provider={$$typeof:u,_context:e},e.Consumer=e,e.unstable_read=function(e,t){var n=_.currentDispatcher;return null===n&&m("277"),n.readContext(e,t)}.bind(null,e),e},forwardRef:function(e){return{$$typeof:h,render:e}},Fragment:s,StrictMode:l,unstable_AsyncMode:p,unstable_Profiler:c,createElement:C,cloneElement:function(e,t,n){(null===e||void 0===e)&&m("267",e);var i=void 0,o=r({},e.props),s=e.key,l=e.ref,c=e._owner;if(null!=t){void 0!==t.ref&&(l=t.ref,c=_.current),void 0!==t.key&&(s=""+t.key);var u=void 0;for(i in e.type&&e.type.defaultProps&&(u=e.type.defaultProps),t)S.call(t,i)&&!T.hasOwnProperty(i)&&(o[i]=void 0===t[i]&&void 0!==u?u[i]:t[i])}if(1===(i=arguments.length-2))o.children=n;else if(1<i){u=Array(i);for(var d=0;d<i;d++)u[d]=arguments[d+2];o.children=u}return{$$typeof:a,type:e.type,key:s,ref:l,props:o,_owner:c}},createFactory:function(e){var t=C.bind(null,e);return t.type=e,t},isValidElement:k,version:"16.5.1",__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:{ReactCurrentOwner:_,assign:r}},F={default:U},L=F&&U||F;t.exports=L.default||L},{"object-assign":21}],29:[function(e,t,n){(function(n){"use strict";"production"===n.env.NODE_ENV?t.exports=e("./cjs/react.production.min.js"):t.exports=e("./cjs/react.development.js")}).call(this,e("_process"))},{"./cjs/react.development.js":27,"./cjs/react.production.min.js":28,_process:36}],30:[function(e,t,n){(function(r){!function(e){"object"==typeof n&&void 0!==t?t.exports=e():("undefined"!=typeof window?window:void 0!==r?r:"undefined"!=typeof self?self:this).Tinode=e()}(function(){var t={};const n=[{name:"ST",start:/(?:^|\W)(\*)[^\s*]/,end:/[^\s*](\*)(?=$|\W)/},{name:"EM",start:/(?:^|[\W_])(_)[^\s_]/,end:/[^\s_](_)(?=$|[\W_])/},{name:"DL",start:/(?:^|\W)(~)[^\s~]/,end:/[^\s~](~)(?=$|\W)/},{name:"CO",start:/(?:^|\W)(`)[^`]/,end:/[^`](`)(?=$|\W)/}],r=[{name:"LN",dataName:"url",pack:function(e){return/^[a-z]+:\/\//i.test(e)||(e="http://"+e),{url:e}},re:/(https?:\/\/)?(?:www\.)?[-a-zA-Z0-9@:%._\+~#=]{2,256}\.[a-z]{2,4}\b(?:[-a-zA-Z0-9@:%_\+.~#?&\/\/=]*)/g},{name:"MN",dataName:"val",pack:function(e){return{val:e.slice(1)}},re:/\B@(\w\w+)/g},{name:"HT",dataName:"val",pack:function(e){return{val:e.slice(1)}},re:/\B#(\w\w+)/g}],i={ST:{name:"b",isVoid:!1},EM:{name:"i",isVoid:!1},DL:{name:"del",isVoid:!1},CO:{name:"tt",isVoid:!1},BR:{name:"br",isVoid:!0},LN:{name:"a",isVoid:!1},MN:{name:"a",isVoid:!1},HT:{name:"a",isVoid:!1},IM:{name:"img",isVoid:!0}};function a(e,t){var n;try{n=atob(e)}catch(e){console.log("Drafty: failed to decode base64-encoded object",e.message),n=atob("")}for(var r=n.length,i=new ArrayBuffer(r),a=new Uint8Array(i),o=0;o<r;o++)a[o]=n.charCodeAt(o);return URL.createObjectURL(new Blob([i],{type:t}))}var o={ST:{open:function(){return"<b>"},close:function(){return"</b>"}},EM:{open:function(){return"<i>"},close:function(){return"</i>"}},DL:{open:function(){return"<del>"},close:function(){return"</del>"}},CO:{open:function(){return"<tt>"},close:function(){return"</tt>"}},BR:{open:function(){return""},close:function(){return"<br/>"}},LN:{open:function(e){return'<a href="'+e.url+'">'},close:function(e){return"</a>"},props:function(e){return{href:e.url,target:"_blank"}}},MN:{open:function(e){return'<a href="#'+e.val+'">'},close:function(e){return"</a>"},props:function(e){return{name:e.val}}},HT:{open:function(e){return'<a href="#'+e.val+'">'},close:function(e){return"</a>"},props:function(e){return{name:e.val}}},IM:{open:function(e){var t=a(e.val,e.mime),n=e.ref?e.ref:t,r=(e.name?'<a href="'+n+'" download="'+e.name+'">':"")+'<img src="'+t+'"'+(e.width?' width="'+e.width+'"':"")+(e.height?' height="'+e.height+'"':"")+' border="0" />';return console.log("open: "+r),r},close:function(e){return e.name?"</a>":""},props:function(e){return{src:a(e.val,e.mime),title:e.name,"data-width":e.width,"data-height":e.height,"data-name":e.name,"data-size":.75*e.val.length|0,"data-mime":e.mime}}}},s=function(){};s.parse=function(e){if("string"!=typeof e)return null;var t=[],i={},a=[];e.split(/\r?\n/).map(function(e){var o,s,l=[];if(n.map(function(t){l=l.concat(function(e,t,n,r){for(var i=[],a=0,o=e.slice(0);o.length>0;){var s=t.exec(o);if(null==s)break;var l=s.index+s[0].lastIndexOf(s[1]);o=o.slice(l+1),a=(l+=a)+1;var c=n?n.exec(o):null;if(null==c)break;var u=c.index+c[0].indexOf(c[1]);o=o.slice(u+1),a=(u+=a)+1,i.push({text:e.slice(l+1,u),children:[],start:l,end:u,type:r})}return i}(e,t.start,t.end,t.name))}),0==l.length)s={txt:e};else{l.sort(function(e,t){return e.start-t.start}),l=function e(t){if(0==t.length)return[];for(var n=[t[0]],r=t[0],i=1;i<t.length;i++)t[i].start>r.end?(n.push(t[i]),r=t[i]):t[i].end<r.end&&r.children.push(t[i]);for(var i in n)n[i].children=e(n[i].children);return n}(l);var c=function e(t,n){var r="",i=[];for(var a in t){var o=t[a];if(!o.text){var s=e(o.children,r.length+n);o.text=s.txt,i=i.concat(s.fmt)}o.type&&i.push({at:r.length+n,len:o.text.length,tp:o.type}),r+=o.text}return{txt:r,fmt:i}}(function e(t,n,r,i){var a=[];if(0==i.length)return[];for(var o in i){var s=i[o];s.start>n&&a.push({text:t.slice(n,s.start)});var l={type:s.type},c=e(t,s.start+1,s.end-1,s.children);c.length>0?l.children=c:l.text=s.text,a.push(l),n=s.end+1}return n<r&&a.push({text:t.slice(n,r)}),a}(e,0,e.length,l),0);s={txt:c.txt,fmt:c.fmt}}if((o=function(e){var t,n=[];if(r.map(function(r){for(;null!==(t=r.re.exec(e));)n.push({offset:t.index,len:t[0].length,unique:t[0],data:r.pack(t[0]),type:r.name})}),0==n.length)return n;n.sort(function(e,t){return e.offset-t.offset});var i=-1;return n=n.filter(function(e){var t=e.offset>i;return i=e.offset+e.len,t})}(s.txt)).length>0){var u=[];for(var d in o){var p=o[d],h=i[p.unique];h||(h=t.length,i[p.unique]=h,t.push({tp:p.type,data:p.data})),u.push({at:p.offset,len:p.len,key:h})}s.ent=u}a.push(s)});var o={txt:""};if(a.length>0){o.txt=a[0].txt,o.fmt=(a[0].fmt||[]).concat(a[0].ent||[]);for(var s=1;s<a.length;s++){var l=a[s],c=o.txt.length+1;o.fmt.push({tp:"BR",len:1,at:c-1}),o.txt+=" "+l.txt,l.fmt&&(o.fmt=o.fmt.concat(l.fmt.map(function(e){return e.at+=c,e}))),l.ent&&(o.fmt=o.fmt.concat(l.ent.map(function(e){return e.at+=c,e})))}0==o.fmt.length&&delete o.fmt,t.length>0&&(o.ent=t)}return o},s.insertImage=function(e,t,n,r,i,a,o,s,l){return(e=e||{txt:" "}).ent=e.ent||[],e.fmt=e.fmt||[],e.fmt.push({at:t,len:1,key:e.ent.length}),e.ent.push({tp:"IM",data:{mime:n,val:r,width:i,height:a,name:o,ref:l,size:0|s}}),e},s.attachFile=function(e,t,n,r,i,a){(e=e||{txt:""}).ent=e.ent||[],e.fmt=e.fmt||[],e.fmt.push({at:-1,len:0,key:e.ent.length});let o={tp:"EX",data:{mime:t,val:n,name:r,ref:a,size:0|i}};return a instanceof Promise&&(o.data.ref=a.then(e=>{o.data.ref=e},e=>{})),e.ent.push(o),e},s.UNSAFE_toHTML=function(e){var t,n,r,{txt:i,fmt:a,ent:s}=e,l=[];if(a)for(var c in a){var u,d=a[c],p=d.tp;if(!p){var h=s[d.key];h&&(p=h.tp,u=h.data)}o[p]&&(l.push({idx:d.at+d.len,what:o[p].close(u)}),l.push({idx:d.at,what:o[p].open(u)}))}for(var c in l.sort(function(e,t){return t.idx-e.idx}),l)l[c].what&&(t=i,n=l[c].idx,r=l[c].what,i=t.slice(0,n)+r+t.slice(n));return i},s.format=function(e,t,n){var{txt:r,fmt:a,ent:o}=e;if(r=r||"",!a)return[r];var s=[].concat(a);return s.map(function(e){e.at=e.at||0,e.len=e.len||0}),s.sort(function(e,t){return e.at-t.at==0?t.len-e.len:e.at-t.at}),s=s.map(function(e){var t,n=e.tp;return n||(e.key=e.key||0,t=o[e.key].data,n=o[e.key].tp),{tp:n,data:t,at:e.at,len:e.len}}),function e(t,n,r,a,o,s){for(var l=[],c=0;c<a.length;c++){var u=a[c];n<u.at&&(l.push(o.call(s,null,void 0,t.slice(n,u.at))),n=u.at);for(var d=[],p=c+1;p<a.length&&a[p].at<u.at+u.len;p++)d.push(a[p]),c=p;var h=i[u.tp]||{};l.push(o.call(s,u.tp,u.data,h.isVoid?null:e(t,n,u.at+u.len,d,o,s))),n=u.at+u.len}return n<r&&l.push(o.call(s,null,void 0,t.slice(n,r))),l}(r,0,r.length,s,t,n)},s.toPlainText=function(e){return"string"==typeof e?e:e.txt},s.isPlainText=function(e){return"string"==typeof e||!(e.fmt||e.ent)},s.hasAttachments=function(e){if(e.ent&&e.ent.length>0)for(var t in e.ent)if("EX"==e.ent[t].tp)return!0;return!1},s.attachments=function(e,t,n){if(e.ent&&e.ent.length>0)for(var r in e.ent)"EX"==e.ent[r].tp&&t.call(n,e.ent[r].data,r)},s.getDownloadUrl=function(e){let t=null;return e.val?t=a(e.val,e.mime):"string"==typeof e.ref&&(t=e.ref),t},s.isUploading=function(e){return e.ref instanceof Promise},s.getPreviewUrl=function(e){return e.val?a(e.val,e.mime):null},s.getEntitySize=function(e){return e.size?e.size:e.val?.75*e.val.length|0:0},s.getEntityMimeType=function(e){return e.mime||"text/plain"},s.tagName=function(e){return i[e]?i[e].name:void 0},s.attrValue=function(e,t){if(t&&o[e])return o[e].props(t)},s.getContentType=function(){return"text/x-drafty"},t=s;var l;if("function"==typeof e)var c="0.15.6-rc4";const u="0",d=c||"0.15",p="tinodejs/"+d;function h(e){return btoa(encodeURIComponent(e).replace(/%([0-9A-F]{2})/g,function(e,t){return String.fromCharCode("0x"+t)}))}function f(e,t,n){if(null==t)return e;if("object"!=typeof t)return t||e;if(t instanceof Date)return t;if(t instanceof S)return new S(t);if(t instanceof Array)return t.length>0?t:e;for(var r in e||(e=t.constructor()),t)!t.hasOwnProperty(r)||!t[r]&&!1!==t[r]||n&&n[r]||"_generated"==r||(e[r]=f(e[r],t[r]));return e}function m(e,t,n,r){return e[t]=f(e[t],n,r),e[t]}function g(){var e=null;if("withCredentials"in new XMLHttpRequest)e=new XMLHttpRequest;else{if("undefined"==typeof XDomainRequest)throw new Error("browser not supported");e=new XDomainRequest}return e}function v(e,t){if("ts"===e&&"string"==typeof t&&t.length>=20&&t.length<=24){var n=new Date(t);if(n)return n}else if("acs"===e&&"object"==typeof t)return new S(t);return t}function b(e,t){return"string"==typeof t&&t.length>128?"<"+t.length+", bytes: "+t.substring(0,12)+"..."+t.substring(t.length-12)+">":function(e,t){if(t instanceof Date)t=function(e){if(e&&0!=e.getTime()){var t=e.getUTCMilliseconds();return e.getUTCFullYear()+"-"+n(e.getUTCMonth()+1)+"-"+n(e.getUTCDate())+"T"+n(e.getUTCHours())+":"+n(e.getUTCMinutes())+":"+n(e.getUTCSeconds())+(t?"."+n(t,3):"")+"Z"}function n(e,t){return"0".repeat((t=t||2)-(""+e).length)+e}}(t);else if(null==t||!1===t||Array.isArray(t)&&0==t.length||"object"==typeof t&&0===Object.keys(t).length)return;return t}(0,t)}function y(e,t,n){var r=null;return"http"!==t&&"https"!==t&&"ws"!==t&&"wss"!==t||(r=t+"://","/"!==(r+=e).charAt(r.length-1)&&(r+="/"),r+="v"+u+"/channels","http"!==t&&"https"!==t||(r+="/lp"),r+="?apikey="+n),r}var w=function(e,t,n,r,i){let a=e,o=r,s=t;var l=i;const c=2e3,u=10,d=.3;let p=null,h=0,f=!1,m=e=>{this.logger&&this.logger(e)};function b(e){var t=null;e.connect=function(n){return t&&1===t.readyState?Promise.resolve():(n&&(a=n),new Promise(function(n,r){var i=y(a,o?"wss":"ws",s);m("Connecting to: "+i);var g=new WebSocket(i);g.onopen=function(t){f=!1,e.onOpen&&e.onOpen(),n(),l&&(window.clearTimeout(p),p=null,h=0)},g.onclose=function(n){t=null,e.onDisconnect&&e.onDisconnect(null),!f&&l&&function(){clearTimeout(p);var e=c*(Math.pow(2,h)*(1+d*Math.random()));h=h>=u?h:h+1,p=setTimeout(()=>{m("Reconnecting, iter="+h+", timeout="+e),f||this.connect().catch(function(){})},e)}.call(e)},g.onerror=function(e){r(e)},g.onmessage=function(t){e.onMessage&&e.onMessage(t.data)},t=g}))},e.disconnect=function(){t&&(f=!0,t.close()),t=null},e.sendText=function(e){if(!t||t.readyState!=t.OPEN)throw new Error("Websocket is not connected");t.send(e)},e.isConnected=function(){return t&&1===t.readyState}}function w(e){var t=null,n=null,r=null;e.connect=function(r){return r&&(a=r),new Promise(function(r,i){var l=y(a,o?"https":"http",s);m("Connecting to: "+l),(n=function n(r,i,a){var o=g();return o.onreadystatechange=function(s){if(4==o.readyState)if(201==o.status){var l=JSON.parse(o.responseText,v);o.responseText,t=r+"&sid="+l.ctrl.params.sid,(o=n(t)).send(null),e.onOpen&&e.onOpen(),i&&i()}else 200==o.status?(e.onMessage&&e.onMessage(o.responseText),(o=n(t)).send(null)):(a&&a(o.responseText),e.onMessage&&e.onMessage(o.responseText),e.onDisconnect&&e.onDisconnect(new Error(o.status+" "+o.responseText)))},o.open("GET",r,!0),o}(l,r,i)).send(null)}).catch(function(){})},e.disconnect=function(){r&&(r.abort(),r=null),n&&(n.abort(),n=null),e.onDisconnect&&e.onDisconnect(null),t=null},e.sendText=function(e){var n,i;if(n=t,(i=g()).onreadystatechange=function(e){if(4==i.readyState&&i.status>=400)throw new Error("LP sender failed, "+i.status)},i.open("POST",n,!0),!(r=i)||1!=r.readyState)throw new Error("Long poller failed to connect");r.send(e)},e.isConnected=function(){return n&&!0}}"lp"===n?w(this):"ws"===n?b(this):"object"==typeof window&&window.WebSocket?b(this):w(this),this.onMessage=void 0,this.onDisconnect=void 0,this.onOpen=void 0,this.logger=void 0},E=function(e,t,n,r,i){this._appName=e||"Undefined",this._apiKey=n,this._browser="",this._platform="undefined",this._humanLanguage="xx","undefined"!=typeof navigator&&(this._browser=function(e){var t,n=(e=(e||"").replace(" (KHTML, like Gecko)","")).match(/(AppleWebKit\/[.\d]+)/i);if(n){for(var r=["chrome","safari","mobile","version"],i=e.substr(n.index+n[0].length).split(" "),a=[],o=0;o<i.length;o++){var s=/([\w.]+)[\/]([\.\d]+)/.exec(i[o]);s&&a.push([s[1],s[2],r.findIndex(function(e){return e==s[1].toLowerCase()})])}a.sort(function(e,t){var n=e[2]-t[2];return 0!=n?n:t[0].length-e[0].length}),t=a.length>0?a[0][0]+"/"+a[0][1]:n[1]}else t=/trident/i.test(e)?(n=/(?:\brv[ :]+([.\d]+))|(?:\bMSIE ([.\d]+))/g.exec(e))?"MSIE/"+(n[1]||n[2]):"MSIE/?":/firefox/i.test(e)?(n=/Firefox\/([.\d]+)/g.exec(e))?"Firefox/"+n[1]:"Firefox/?":/presto/i.test(e)?(n=/Opera\/([.\d]+)/g.exec(e))?"Opera/"+n[1]:"Opera/?":(n=/([\w.]+)\/([.\d]+)/.exec(e))?n[1]+"/"+n[2]:(n=e.split(" "))[0];if((n=t.split("/")).length>1){var l=n[1].split(".");t=n[0]+"/"+l[0]+(l[1]?"."+l[1]:"")}return t}(navigator.userAgent),this._platform=navigator.platform,this._humanLanguage=navigator.language||"en-US"),this._loggingEnabled=!1,this._trimLongStrings=!1,this._myUID=null,this._authenticated=!1,this._login=null,this._authToken=null,this._inPacketCount=0,this._messageId=Math.floor(65535*Math.random()+65535),this._serverInfo=null,this._deviceToken=null,this._pendingPromises={},this._connection=new w(t,n,r,i,!0),this.logger=(e=>{if(this._loggingEnabled){var t=new Date,n=("0"+t.getUTCHours()).slice(-2)+":"+("0"+t.getUTCMinutes()).slice(-2)+":"+("0"+t.getUTCSeconds()).slice(-2)+":"+("0"+t.getUTCMilliseconds()).slice(-3);console.log("["+n+"] "+e)}}),this._connection.logger=this.logger,this._cache={};let a=this.cachePut=((e,t,n)=>{this._cache[e+":"+t]=n}),o=this.cacheGet=((e,t)=>this._cache[e+":"+t]),s=this.cacheDel=((e,t)=>{delete this._cache[e+":"+t]}),l=this.cacheMap=((e,t)=>{for(var n in this._cache)if(e(this._cache[n],n,t))break});this.attachCacheToTopic=(e=>{e._tinode=this,e._cacheGetUser=(e=>{var t=o("user",e);if(t)return{user:e,public:f({},t)}}),e._cachePutUser=((e,t)=>a("user",e,f({},t.public))),e._cacheDelUser=(e=>s("user",e)),e._cachePutSelf=(()=>a("topic",e.name,e)),e._cacheDelSelf=(()=>s("topic",e.name))});let c=(e,t,n,r)=>{var i=this._pendingPromises[e];i&&(delete this._pendingPromises[e],t>=200&&t<400?i.resolve&&i.resolve(n):i.reject&&i.reject(new Error("Error: "+r+" ("+t+")")))},u=e=>{var t=null;return e&&(t=new Promise((t,n)=>{this._pendingPromises[e]={resolve:t,reject:n}})),t},h=this.getNextUniqueId=(()=>0!=this._messageId?""+this._messageId++:void 0),m=()=>this._appName+" ("+(this._browser?this._browser+"; ":"")+this._platform+"); "+p;this.initPacket=((e,t)=>{switch(e){case"hi":return{hi:{id:h(),ver:d,ua:m(),dev:this._deviceToken,lang:this._humanLanguage}};case"acc":return{acc:{id:h(),user:null,scheme:null,secret:null,login:!1,tags:null,desc:{},cred:{}}};case"login":return{login:{id:h(),scheme:null,secret:null}};case"sub":return{sub:{id:h(),topic:t,set:{},get:{}}};case"leave":return{leave:{id:h(),topic:t,unsub:!1}};case"pub":return{pub:{id:h(),topic:t,noecho:!1,head:null,content:{}}};case"get":return{get:{id:h(),topic:t,what:null,desc:{},sub:{},data:{}}};case"set":return{set:{id:h(),topic:t,desc:{},sub:{},tags:[]}};case"del":return{del:{id:h(),topic:t,what:null,delseq:null,user:null,hard:!1}};case"note":return{note:{topic:t,what:null,seq:void 0}};default:throw new Error("Unknown packet type requested: "+e)}}),this.send=((e,t)=>{let n;t&&(n=u(t)),e=function e(t){return Object.keys(t).forEach(function(n){"_"==n[0]?delete t[n]:t[n]?Array.isArray(t[n])&&0==t[n].length?delete t[n]:t[n]?"object"!=typeof t[n]||t[n]instanceof Date||(e(t[n]),0==Object.getOwnPropertyNames(t[n]).length&&delete t[n]):delete t[n]:delete t[n]}),t}(e);var r=JSON.stringify(e);return this.logger("out: "+(this._trimLongStrings?JSON.stringify(e,b):r)),this._connection.sendText(r),n}),this.loginSuccessful=(e=>{this._myUID=e.params.user,this._authenticated=e&&e.code>=200&&e.code<300,e.params&&e.params.token&&e.params.expires?this._authToken={token:e.params.token,expires:new Date(e.params.expires)}:this._authToken=null,this.onLogin&&this.onLogin(e.code,e.text)}),this._connection.onMessage=(e=>{if(e){this._inPacketCount++,this.onRawMessage&&this.onRawMessage(e);var t=JSON.parse(e,v);if(t)if(this.logger("in: "+(this._trimLongStrings?JSON.stringify(t,b):e)),this.onMessage&&this.onMessage(t),t.ctrl)this.onCtrlMessage&&this.onCtrlMessage(t.ctrl),t.ctrl.id&&c(t.ctrl.id,t.ctrl.code,t.ctrl,t.ctrl.text),t.ctrl.params&&"data"==t.ctrl.params.what&&(n=o("topic",t.ctrl.topic))&&n._allMessagesReceived(t.ctrl.params.count);else if(t.meta)(n=o("topic",t.meta.topic))&&n._routeMeta(t.meta),this.onMetaMessage&&this.onMetaMessage(t.meta);else if(t.data)(n=o("topic",t.data.topic))&&n._routeData(t.data),this.onDataMessage&&this.onDataMessage(t.data);else if(t.pres)(n=o("topic",t.pres.topic))&&n._routePres(t.pres),this.onPresMessage&&this.onPresMessage(t.pres);else if(t.info){var n;(n=o("topic",t.info.topic))&&n._routeInfo(t.info),this.onInfoMessage&&this.onInfoMessage(t.info)}else this.logger("ERROR: Unknown packet received.");else this.logger("in: "+e),this.logger("ERROR: failed to parse data")}}),this._connection.onOpen=(()=>{this.hello()}),this._connection.onDisconnect=(e=>{this._inPacketCount=0,this._serverInfo=null,this._authenticated=!1,l((e,t)=>{0===t.lastIndexOf("topic:",0)&&e._resetSub()}),this.onDisconnect&&this.onDisconnect(e)})};E.credential=function(e,t,n,r){return"object"==typeof e&&({val:t,params:n,resp:r,meth:e}=e),e&&(t||r)?[{meth:e,val:t,resp:r,params:n}]:null},E.topicType=function(e){return{me:"me",fnd:"fnd",grp:"grp",new:"grp",usr:"p2p"}["string"==typeof e?e.substring(0,3):"xxx"]},E.isNewGroupTopicName=function(e){return"string"==typeof e&&"new"==e.substring(0,3)},E.getVersion=function(){return d},E.getLibrary=function(){return p},E.MESSAGE_STATUS_NONE=0,E.MESSAGE_STATUS_QUEUED=1,E.MESSAGE_STATUS_SENDING=2,E.MESSAGE_STATUS_SENT=3,E.MESSAGE_STATUS_RECEIVED=4,E.MESSAGE_STATUS_READ=5,E.MESSAGE_STATUS_TO_ME=6,E.DEL_CHAR="␡",E.prototype={connect:function(e){return this._connection.connect(e)},disconnect:function(){this._connection&&this._connection.disconnect()},isConnected:function(){return this._connection&&this._connection.isConnected()},isAuthenticated:function(){return this._authenticated},account:function(e,t,n,r,i){var a=this.initPacket("acc");return a.acc.user=e,a.acc.scheme=t,a.acc.secret=n,a.acc.login=r,i&&(a.acc.desc.defacs=i.defacs,a.acc.desc.public=i.public,a.acc.desc.private=i.private,a.acc.tags=i.tags,a.acc.cred=i.cred),this.send(a,a.acc.id)},createAccount:function(e,t,n,r){var i=this.account("new",e,t,n,r);return n&&(i=i.then(e=>(this.loginSuccessful(e),e))),i},createAccountBasic:function(e,t,n){return e=e||"",t=t||"",this.createAccount("basic",h(e+":"+t),!0,n)},updateAccountBasic:function(e,t,n){return t=t||"",n=n||"",this.account(e,"basic",h(t+":"+n),!1,null)},hello:function(){var e=this.initPacket("hi");return this.send(e,e.hi.id).then(e=>(e.params&&(this._serverInfo=e.params),this.onConnect&&this.onConnect(),e)).catch(e=>{this.onDisconnect&&this.onDisconnect(e)})},setDeviceToken:function(e,t){let n=!1;return e&&e!=this._deviceToken&&(this._deviceToken=e,t&&this.isConnected()&&this.isAuthenticated()&&(this.send({hi:{dev:e}}),n=!0)),n},login:function(e,t,n){var r=this.initPacket("login");return r.login.scheme=e,r.login.secret=t,r.login.cred=n,this.send(r,r.login.id).then(e=>(this.loginSuccessful(e),e))},loginBasic:function(e,t,n){return this.login("basic",h(e+":"+t),n).then(t=>(this._login=e,t))},loginToken:function(e,t){return this.login("token",e,t)},getAuthToken:function(){return this._authToken&&this._authToken.expires.getTime()>Date.now()?this._authToken:(this._authToken=null,null)},setAuthToken:function(e){this._authToken=e},subscribe:function(e,t,n){var r=this.initPacket("sub",e);return e||(e="new"),r.sub.get=t,n&&(n.sub&&(r.sub.set.sub=n.sub),E.isNewGroupTopicName(e)&&n.desc&&(r.sub.set.desc=n.desc),n.tags&&(r.sub.set.tags=n.tags)),this.send(r,r.sub.id)},leave:function(e,t){var n=this.initPacket("leave",e);return n.leave.unsub=t,this.send(n,n.leave.id)},createMessage:function(e,n,r){let i=this.initPacket("pub",e),a="string"==typeof n?t.parse(n):n;return a&&!t.isPlainText(a)&&(i.pub.head={mime:t.getContentType()},n=a),i.pub.noecho=r,i.pub.content=n,i.pub},publish:function(e,t,n){return this.publishMessage(this.createMessage(e,t,n))},publishMessage:function(e){return(e=Object.assign({},e)).seq=void 0,e.from=void 0,e.ts=void 0,this.send({pub:e},e.id)},getMeta:function(e,t){var n=this.initPacket("get",e);return n.get=f(n.get,t),this.send(n,n.get.id)},setMeta:function(e,t){var n=this.initPacket("set",e),r=[];return t&&["desc","sub","tags"].map(function(e){t.hasOwnProperty(e)&&(r.push(e),n.set[e]=t[e])}),0==r.length?Promise.reject(new Error("Invalid {set} parameters")):this.send(n,n.set.id)},delMessages:function(e,t,n){var r=this.initPacket("del",e);return r.del.what="msg",r.del.delseq=t,r.del.hard=n,this.send(r,r.del.id)},delTopic:function(e){var t=this.initPacket("del",e);return t.del.what="topic",this.send(t,t.del.id).then(t=>(this.cacheDel("topic",e),this.ctrl))},delSubscription:function(e,t){var n=this.initPacket("del",e);return n.del.what="sub",n.del.user=t,this.send(n,n.del.id)},note:function(e,t,n){if(n<=0||n>=268435455)throw new Error("Invalid message id "+n);var r=this.initPacket("note",e);r.note.what=t,r.note.seq=n,this.send(r)},noteKeyPress:function(e){var t=this.initPacket("note",e);t.note.what="kp",this.send(t)},getTopic:function(e){var t=this.cacheGet("topic",e);return!t&&e&&(t="me"==e?new C:"fnd"==e?new k:new T(e),this.cachePut("topic",e,t),this.attachCacheToTopic(t)),t},newTopic:function(e){var t=new T("new",e);return this.attachCacheToTopic(t),t},newGroupTopicName:function(){return"new"+this.getNextUniqueId()},newTopicWith:function(e,t){var n=new T(e,t);return this.attachCacheToTopic(n),n},getMeTopic:function(){return this.getTopic("me")},getFndTopic:function(){return this.getTopic("fnd")},getLargeFileHelper:function(){return new x(this)},getCurrentUserID:function(){return this._myUID},getCurrentLogin:function(){return this._login},getServerInfo:function(){return this._serverInfo},enableLogging:function(e,t){this._loggingEnabled=e,this._trimLongStrings=t},isTopicOnline:function(e){var t=this.getMeTopic(),n=t&&t.getContact(e);return n&&n.online},wantAkn:function(e){this._messageId=e?Math.floor(16777215*Math.random()+16777215):0},onWebsocketOpen:void 0,onConnect:void 0,onDisconnect:void 0,onLogin:void 0,onCtrlMessage:void 0,onDataMessage:void 0,onPresMessage:void 0,onMessage:void 0,onRawMessage:void 0};var _=function(e){this.topic=e;var t=e._tinode.getMeTopic();this.contact=t&&t.getContact(e.name),this.what={}};_.prototype={_get_ims:function(){let e=this.contact&&this.contact.updated,t=this.topic._lastDescUpdate||0;return e>t?e:t},withData:function(e,t,n){return this.what.data={since:e,before:t,limit:n},this},withLaterData:function(e){return this.withData(this.topic._maxSeq>0?this.topic._maxSeq+1:void 0,void 0,e)},withEarlierData:function(e){return this.withData(void 0,this.topic._minSeq>0?this.topic._minSeq:void 0,e)},withDesc:function(e){return this.what.desc={ims:e},this},withLaterDesc:function(){return this.withDesc(this._get_ims())},withSub:function(e,t,n){var r={ims:e,limit:t};return"me"==this.topic.getType()?r.topic=n:r.user=n,this.what.sub=r,this},withOneSub:function(e,t){return this.withSub(e,void 0,t)},withLaterOneSub:function(e){return this.withOneSub(this.topic._lastSubsUpdate,e)},withLaterSub:function(e){return this.withSub("p2p"==this.topic.getType()?this._get_ims():this.topic._lastSubsUpdate,e)},withTags:function(){return this.what.tags=!0,this},withDel:function(e,t){return(e||t)&&(this.what.del={since:e,limit:t}),this},withLaterDel:function(e){return this.withDel(this.topic._maxSeq>0?this.topic._maxDel+1:void 0,e)},build:function(){var e={},t=[],n=this;return["data","sub","desc","tags","del"].map(function(r){n.what.hasOwnProperty(r)&&(t.push(r),Object.getOwnPropertyNames(n.what[r]).length>0&&(e[r]=n.what[r]))}),t.length>0?e.what=t.join(" "):e=void 0,e}};var S=function(e){e&&(this.given="number"==typeof e.given?e.given:S.decode(e.given),this.want="number"==typeof e.want?e.want:S.decode(e.want),this.mode=e.mode?"number"==typeof e.mode?e.mode:S.decode(e.mode):this.given&this.want)};S._NONE=0,S._JOIN=1,S._READ=2,S._WRITE=4,S._PRES=8,S._APPROVE=16,S._SHARE=32,S._DELETE=64,S._OWNER=128,S._BITMASK=S._JOIN|S._READ|S._WRITE|S._PRES|S._APPROVE|S._SHARE|S._DELETE|S._OWNER,S._INVALID=1048576,S.decode=function(e){if(!e)return null;if("number"==typeof e)return e&S._BITMASK;if("N"===e||"n"===e)return S._NONE;for(var t={J:S._JOIN,R:S._READ,W:S._WRITE,P:S._PRES,A:S._APPROVE,S:S._SHARE,D:S._DELETE,O:S._OWNER},n=S._NONE,r=0;r<e.length;r++){var i=t[e.charAt(r).toUpperCase()];i&&(n|=i)}return n},S.encode=function(e){if(null===e||e===S._INVALID)return null;if(e===S._NONE)return"N";for(var t=["J","R","W","P","A","S","D","O"],n="",r=0;r<t.length;r++)0!=(e&1<<r)&&(n+=t[r]);return n},S.update=function(e,t){if(!t||"string"!=typeof t)return e;var n=t.charAt(0);if("+"==n||"-"==n){for(var r=e,i=t.split(/([-+])/),a=1;a<i.length-1;a+=2){n=i[a];var o=S.decode(i[a+1]);if(o==S._INVALID)return e;null!=o&&("+"===n?r|=o:"-"===n&&(r&=~o))}e=r}else(r=S.decode(t))!=S._INVALID&&(e=r);return e},S.prototype={setMode:function(e){return this.mode=S.decode(e),this},updateMode:function(e){return this.mode=S.update(this.mode,e),this},getMode:function(){return S.encode(this.mode)},setGiven:function(e){return this.given=S.decode(e),this},updateGiven:function(e){return this.given=S.update(this.given,e),this},getGiven:function(){return S.encode(this.given)},setWant:function(e){return this.want=S.decode(e),this},updateWant:function(e){return this.want=S.update(this.want,e),this},getWant:function(){return S.encode(this.want)},updateAll:function(e){return e&&(this.updateGiven(e.given),this.updateWant(e.want),this.mode=this.given&this.want),this},isOwner:function(){return 0!=(this.mode&S._OWNER)},isMuted:function(){return 0==(this.mode&S._PRES)},isPresencer:function(){return 0!=(this.mode&S._PRES)},isJoiner:function(){return 0!=(this.mode&S._JOIN)},isReader:function(){return 0!=(this.mode&S._READ)},isWriter:function(){return 0!=(this.mode&S._WRITE)},isApprover:function(){return 0!=(this.mode&S._APPROVE)},isAdmin:function(){return this.isOwner()||this.isApprover()},isSharer:function(){return 0!=(this.mode&S._SHARE)},isDeleter:function(){return 0!=(this.mode&S._DELETE)}};var T=function(e,t){this._tinode=null,this.name=e,this.created=null,this.updated=null,this.touched=null,this.acs=new S(null),this.private=null,this.public=null,this._users={},this._queuedSeqId=268435455,this._maxSeq=0,this._minSeq=0,this._noEarlierMsgs=!1,this._maxDel=0,this._tags=[],this._messages=function(e){var t=[];function n(t,n,r){for(var i=0,a=n.length-1,o=0,s=0,l=!1;i<=a;)if((s=e(n[o=(i+a)/2|0],t))<0)i=o+1;else{if(!(s>0)){l=!0;break}a=o-1}return l?o:r?-1:s<0?o+1:o}function r(e,t){var r=n(e,t,!1);return t.splice(r,0,e),t}return e=e||function(e,t){return e===t?0:e<t?-1:1},{getAt:function(e){return t[e]},put:function(){var e;for(var n in e=1==arguments.length&&Array.isArray(arguments[0])?arguments[0]:arguments)r(e[n],t)},delAt:function(e){var n=t.splice(e,1);if(n&&n.length>0)return n[0]},delRange:function(e,n){return t.splice(e,n-e)},size:function(){return t.length},reset:function(e){t=[]},forEach:function(e,n,r,i){n|=0,r=r||t.length;for(var a=n;a<r;a++)e.call(i,t[a],a)},find:function(e,r){return n(e,t,!r)}}}(function(e,t){return e.seq-t.seq}),this._subscribed=!1,this._lastDescUpdate=null,this._lastSubsUpdate=null,this._new=!0,t&&(this.onData=t.onData,this.onMeta=t.onMeta,this.onPres=t.onPres,this.onInfo=t.onInfo,this.onMetaDesc=t.onMetaDesc,this.onMetaSub=t.onMetaSub,this.onSubsUpdated=t.onSubsUpdated,this.onTagsUpdated=t.onTagsUpdated,this.onDeleteTopic=t.onDeleteTopic,this.onAllMessagesReceived=t.onAllMessagesReceived)};T.prototype={isSubscribed:function(){return this._subscribed},subscribe:function(e,t){if(this._subscribed)return Promise.resolve(this);var n=this.name;return this._tinode.subscribe(n||"new",e,t).then(e=>{if(e.code>=300)return e;if(this._subscribed=!0,this.acs=e.params&&e.params.acs?e.params.acs:this.acs,this._new){this._new=!1,this.name=e.topic,this.created=e.ts,this.updated=e.ts,this.touched=e.ts,this._cachePutSelf();var n=this._tinode.getMeTopic();n&&n._processMetaSub([{_generated:!0,topic:this.name,created:e.ts,updated:e.ts,touched:e.ts,acs:this.acs}]),t&&t.desc&&(t.desc._generated=!0,this._processMetaDesc(t.desc))}return e})},publish:function(e,t){return this.publishMessage(this.createMessage(e,t))},createMessage:function(e,t){return this._tinode.createMessage(this.name,e,t)},publishMessage:function(e){if(!this._subscribed)return Promise.reject(new Error("Cannot publish on inactive topic"));if(t.hasAttachments(e.content)){let n=[];t.attachments(e.content,e=>{n.push(e.ref)}),e.head.attachments=n}return e._sending=!0,this._tinode.publishMessage(e)},publishDraft:function(e,t){return t||this._subscribed?(e.seq=this._getQueuedSeqId(),e._generated=!0,e.ts=new Date,e.from=this._tinode.getCurrentUserID(),e.noecho=!0,this._messages.put(e),this.onData&&this.onData(e),(t||Promise.resolve()).then(()=>e._cancelled?{code:300,text:"cancelled"}:this.publishMessage(e).then(t=>(e._sending=!1,e.seq=t.params.seq,e.ts=t.ts,this._routeData(e),t)),t=>{e._sending=!1,this._messages.delAt(this._messages.find(e)),this.onData&&this.onData()})):Promise.reject(new Error("Cannot publish on inactive topic"))},leave:function(e){return this._subscribed||e?this._tinode.leave(this.name,e).then(t=>(this._resetSub(),e&&this._gone(),t)):Promise.reject(new Error("Cannot leave inactive topic"))},getMeta:function(e){return this._subscribed?this._tinode.getMeta(this.name,e):Promise.reject(new Error("Cannot query inactive topic"))},getMessagesPage:function(e,t){var n=this.startMetaQuery();t?n.withLaterData(e):n.withEarlierData(e);var r=this.getMeta(n.build());return t||(r=r.then(e=>{e&&e.params&&!e.params.count&&(this._noEarlierMsgs=!0)})),r},setMeta:function(e){return this._subscribed?(e.tags&&(e.tags=function(e){var t=[];if(Array.isArray(e)){for(var n=0,r=e.length;n<r;n++){var i=e[n];i&&(i=i.trim().toLowerCase()).length>1&&t.push(i)}t.sort().filter(function(e,t,n){return!t||e!=n[t-1]})}return 0==t.length&&t.push(E.DEL_CHAR),t}(e.tags)),this._tinode.setMeta(this.name,e).then(t=>t&&t.code>=300?t:(e.sub&&(t.params&&t.params.acs&&(e.sub.acs=t.params.acs,e.sub.updated=t.ts),e.sub.user||(e.sub.user=this._tinode.getCurrentUserID(),e.desc||(e.desc={})),e.sub._generated=!0,this._processMetaSub([e.sub])),e.desc&&(t.params&&t.params.acs&&(e.desc.acs=t.params.acs,e.desc.updated=t.ts),this._processMetaDesc(e.desc)),e.tags&&this._processMetaTags(e.tags),t))):Promise.reject(new Error("Cannot update inactive topic"))},invite:function(e,t){return this.setMeta({sub:{user:e,mode:t}})},delMessages:function(e,t){if(!this._subscribed)return Promise.reject(new Error("Cannot delete messages in inactive topic"));e.sort(function(e,t){return e.low<t.low||e.low==t.low&&(!t.hi||e.hi>=t.hi)});let n,r=e.reduce((e,t)=>(t.low<268435455&&(!t.hi||t.hi<268435455?e.push(t):e.push({low:t.low,hi:this._maxSeq+1})),e),[]);return(n=e.length>0?this._tinode.delMessages(this.name,r,t):Promise.resolve({params:{del:0}})).then(t=>(t.params.del>this._maxDel&&(this._maxDel=t.params.del),e.map(e=>{e.hi?this.flushMessageRange(e.low,e.hi):this.flushMessage(e.low)}),this.onData&&this.onData(),t))},delMessagesAll:function(e){return this.delMessages([{low:1,hi:this._maxSeq+1,_all:!0}],e)},delMessagesList:function(e,t){e.sort((e,t)=>e-t);var n=e.reduce((e,t)=>{if(0==e.length)e.push({low:t});else{let n=e[e.length-1];!n.hi&&t!=n.low+1||t>n.hi?e.push({low:t}):n.hi=n.hi?Math.max(n.hi,t+1):t+1}return e},[]);return this.delMessages(n,t)},delTopic:function(){var e=this;return this._tinode.delTopic(this.name).then(function(t){return e._resetSub(),e._gone(),t})},delSubscription:function(e){return this._subscribed?this._tinode.delSubscription(this.name,e).then(t=>(delete this._users[e],this.onSubsUpdated&&this.onSubsUpdated(Object.keys(this._users)),t)):Promise.reject(new Error("Cannot delete subscription in inactive topic"))},note:function(e,t){var n=this._users[this._tinode.getCurrentUserID()];n?((!n[e]||n[e]<t)&&(this._subscribed?this._tinode.note(this.name,e,t):this._tinode.logger("Not sending {note} on inactive topic")),n[e]=t):this._tinode.logger("note(): user not found "+this._tinode.getCurrentUserID());var r=this._tinode.getMeTopic();r&&r.setMsgReadRecv(this.name,e,t)},noteRecv:function(e){this.note("recv",e)},noteRead:function(e){this.note("read",e)},noteKeyPress:function(){this._subscribed?this._tinode.noteKeyPress(this.name):this._tinode.logger("Cannot send notification in inactive topic")},userDesc:function(e){var t=this._cacheGetUser(e);if(t)return t},subscribers:function(e,t){var n=e||this.onMetaSub;if(n)for(var r in this._users)n.call(t,this._users[r],r,this._users)},tags:function(){return this._tags.slice(0)},subscriber:function(e){return this._users[e]},messages:function(e,t,n,r){var i=e||this.onData;if(i){let e="number"==typeof t?this._messages.find({seq:t}):void 0,a="number"==typeof n?this._messages.find({seq:n},!0):void 0;-1!=e&&-1!=a&&this._messages.forEach(i,e,a,r)}},msgReceiptCount:function(e,t){var n=0,r=this._tinode.getCurrentUserID();if(t>0)for(var i in this._users){var a=this._users[i];a.user!==r&&a[e]>=t&&n++}return n},msgReadCount:function(e){return this.msgReceiptCount("read",e)},msgRecvCount:function(e){return this.msgReceiptCount("recv",e)},msgHasMoreMessages:function(e){return e?this.seq>this._maxSeq:this._minSeq>1&&!this._noEarlierMsgs},isNewMessage:function(e){return this._maxSeq<=e},flushMessage:function(e){let t=this._messages.find({seq:e});return t>=0?this._messages.delAt(t):void 0},flushMessageRange:function(e,t){let n=this._messages.find({seq:e});return n>=0?this._messages.delRange(n,this._messages.find({seq:t},!0)):[]},cancelSend:function(e){let t=this._messages.find({seq:e});if(t>=0){let e=this._messages.getAt(t);if(1==this.msgStatus(e))return e._cancelled=!0,this._messages.delAt(t),!0}return!1},getType:function(){return E.topicType(this.name)},getAccessMode:function(){return this.acs},getDefaultAccess:function(){return this.defacs},startMetaQuery:function(){return new _(this)},msgStatus:function(e){var t=0;return e.from==this._tinode.getCurrentUserID()?e._sending?t=2:e.seq>=268435455?t=1:this.msgReadCount(e.seq)>0?t=5:this.msgRecvCount(e.seq)>0?t=4:e.seq>0&&(t=3):t=6,t},_routeData:function(e){e.content&&((!this.touched||this.touched<e.ts)&&(this.touched=e.ts),e._generated||this._messages.put(e)),e.seq>this._maxSeq&&(this._maxSeq=e.seq),(e.seq<this._minSeq||0==this._minSeq)&&(this._minSeq=e.seq),this.onData&&this.onData(e);var t=this._tinode.getMeTopic();t&&t.setMsgReadRecv(this.name,"msg",e.seq,e.ts)},_routeMeta:function(e){e.desc&&(this._lastDescUpdate=e.ts,this._processMetaDesc(e.desc)),e.sub&&e.sub.length>0&&(this._lastSubsUpdate=e.ts,this._processMetaSub(e.sub)),e.del&&this._processDelMessages(e.del.clear,e.del.delseq),e.tags&&this._processMetaTags(e.tags),this.onMeta&&this.onMeta(e)},_routePres:function(e){var t;switch(e.what){case"del":this._processDelMessages(e.clear,e.delseq);break;case"on":case"off":(t=this._users[e.src])?t.online="on"==e.what:this._tinode.logger("Presence update for an unknown user",this.name,e.src);break;case"acs":let r="me"==e.src?this._tinode.getCurrentUserID():e.src;if(t=this._users[r])t.acs.updateAll(e.dacs),r==this._tinode.getCurrentUserID()&&this.acs.updateAll(e.dacs),t.acs&&t.acs.mode!=S._NONE||("p2p"==this.getType()&&this.leave(),this._processMetaSub([{user:r,deleted:new Date,_generated:!0}]));else{var n=(new S).updateAll(e.dacs);n&&n.mode!=S._NONE&&((t=this._cacheGetUser(r))?t.acs=n:(t={user:r,acs:n},this.getMeta(this.startMetaQuery().withOneSub(void 0,r).build())),t._generated=!0,t.updated=new Date,this._processMetaSub([t]))}break;default:this._tinode.logger("Ignored presence update",e.what)}this.onPres&&this.onPres(e)},_routeInfo:function(e){if("kp"!==e.what){var t=this._users[e.from];t&&(t[e.what]=e.seq)}this.onInfo&&this.onInfo(e)},_processMetaDesc:function(e,t){if(f(this,e),"string"==typeof this.created&&(this.created=new Date(this.created)),"string"==typeof this.updated&&(this.updated=new Date(this.updated)),"string"==typeof this.touched&&(this.touched=new Date(this.touched)),"me"!==this.name&&!t&&!e._generated){var n=this._tinode.getMeTopic();n&&n._processMetaSub([{_generated:!0,topic:this.name,updated:this.updated,touched:this.touched,acs:this.acs,public:this.public,private:this.private}])}this.onMetaDesc&&this.onMetaDesc(this)},_processMetaSub:function(e){var t=void 0;for(var n in e){var r=e[n];if(r.user){r.updated=new Date(r.updated),r.deleted=r.deleted?new Date(r.deleted):null;var i=null;r.deleted?(delete this._users[r.user],i=r):((i=this._users[r.user])||(i=this._cacheGetUser(r.user)),i=this._updateCachedUser(r.user,r,r._generated)),this.onMetaSub&&this.onMetaSub(i)}else r._generated||(t=r)}t&&this.onMetaDesc&&this.onMetaDesc(t),this.onSubsUpdated&&this.onSubsUpdated(Object.keys(this._users))},_processMetaTags:function(e){1==e.length&&e[0]==E.DEL_CHAR&&(e=[]),this._tags=e,this.onTagsUpdated&&this.onTagsUpdated(e)},_processDelMessages:function(e,t){this._maxDel=Math.max(e,this._maxDel),this.clear=Math.max(e,this.clear);var n=this,r=0;Array.isArray(t)&&t.map(function(e){if(e.hi)for(var t=e.low;t<e.hi;t++)r++,n.flushMessage(t);else r++,n.flushMessage(e.low)}),r>0&&this.onData&&this.onData()},_allMessagesReceived:function(e){this.onAllMessagesReceived&&this.onAllMessagesReceived(e)},_resetSub:function(){this._subscribed=!1},_gone:function(){var e=this._tinode.getMeTopic();e&&e._routePres({_generated:!0,what:"gone",topic:"me",src:this.name}),this.onDeleteTopic&&this.onDeleteTopic()},_updateCachedUser:function(e,t,n){var r=this._cacheGetUser(e);return r?r=f(r,t):(n&&this.getMeta(this.startMetaQuery().withLaterOneSub(e).build()),r=f({},t)),this._cachePutUser(e,r),m(this._users,e,r)},_getQueuedSeqId:function(){return this._queuedSeqId++}};var C=function(e){T.call(this,"me",e),this._contacts={},e&&(this.onContactUpdate=e.onContactUpdate)};C.prototype=Object.create(T.prototype,{_processMetaSub:{value:function(e){var t=0;for(var n in e){var r=e[n],i=r.topic;if("fnd"!=i&&"me"!=i){r.updated=new Date(r.updated),r.touched=r.touched?new Date(r.touched):null,r.deleted=r.deleted?new Date(r.deleted):null,r.seq=0|r.seq,r.recv=0|r.recv,r.read=0|r.read,r.unread=r.seq-r.read;var a=null;if(r.deleted)a=r,delete this._contacts[i];else if(r.seen&&r.seen.when&&(r.seen.when=new Date(r.seen.when)),a=m(this._contacts,i,r),"p2p"==E.topicType(i)&&this._cachePutUser(i,a),!r._generated){var o=this._tinode.getTopic(i);o&&o._processMetaDesc(r,!0)}t++,this.onMetaSub&&this.onMetaSub(a)}}t>0&&this.onSubsUpdated&&this.onSubsUpdated(Object.keys(this._contacts))},enumerable:!0,configurable:!0,writable:!1},_routePres:{value:function(e){var t=this._contacts[e.src];if(t){switch(e.what){case"on":t.online=!0;break;case"off":t.online&&(t.online=!1,t.seen?t.seen.when=new Date:t.seen={when:new Date});break;case"msg":t.touched=new Date,t.seq=0|e.seq,t.unread=t.seq-t.read;break;case"upd":this.getMeta(this.startMetaQuery().withLaterOneSub(e.src).build());break;case"acs":t.acs?t.acs.updateAll(e.dacs):t.acs=(new S).updateAll(e.dacs);break;case"ua":t.seen={when:new Date,ua:e.ua};break;case"recv":t.recv=t.recv?Math.max(t.recv,e.seq):0|e.seq;break;case"read":t.read=t.read?Math.max(t.read,e.seq):0|e.seq,t.unread=t.seq-t.read;break;case"gone":delete this._contacts[e.src]}this.onContactUpdate&&this.onContactUpdate(e.what,t)}else if("acs"==e.what){var n=new S(e.dacs);if(!n||n.mode==S._INVALID)return void this._tinode.logger("Invalid access mode update",e.src,e.dacs);if(n.mode==S._NONE)return void this._tinode.logger("Removing non-existent subscription",e.src,e.dacs);this.getMeta(this.startMetaQuery().withOneSub(void 0,e.src).build()),this._contacts[e.src]={topic:e.src,online:!1,acs:n}}this.onPres&&this.onPres(e)},enumerable:!0,configurable:!0,writable:!1},publish:{value:function(){return Promise.reject(new Error("Publishing to 'me' is not supported"))},enumerable:!0,configurable:!0,writable:!1},contacts:{value:function(e,t){var n=e||this.onMetaSub;if(n)for(var r in this._contacts)n.call(t,this._contacts[r],r,this._contacts)},enumerable:!0,configurable:!0,writable:!0},setMsgReadRecv:{value:function(e,t,n,r){var i,a=this._contacts[e],o=!1;a&&(n|=0,"recv"===t?(i=a.recv,a.recv=a.recv?Math.max(a.recv,n):n,o=i!=a.recv):"read"===t?(i=a.read,a.read=a.read?Math.max(a.read,n):n,a.unread=a.seq-a.read,o=i!=a.read,a.recv<a.read&&(a.recv=a.read,o=!0)):"msg"===t&&(i=a.seq,a.seq=a.seq?Math.max(a.seq,n):n,a.unread=a.seq-a.read,(!a.touched||a.touched<r)&&(a.touched=r),o=i!=a.seq),!o||a.acs&&a.acs.isMuted()||!this.onContactUpdate||this.onContactUpdate(t,a))},enumerable:!0,configurable:!0,writable:!0},getContact:{value:function(e){return this._contacts[e]},enumerable:!0,configurable:!0,writable:!0},getAccessMode:{value:function(e){var t=this._contacts[e];return t?t.acs:null},enumerable:!0,configurable:!0,writable:!0}}),C.prototype.constructor=C;var k=function(e){T.call(this,"fnd",e),this._contacts={}};k.prototype=Object.create(T.prototype,{_processMetaSub:{value:function(e){var t=Object.getOwnPropertyNames(this._contacts).length;for(var n in this._contacts={},e){var r=e[n],i=r.topic?r.topic:r.user;r.updated=new Date(r.updated),r.seen&&r.seen.when&&(r.seen.when=new Date(r.seen.when)),r=m(this._contacts,i,r),t++,this.onMetaSub&&this.onMetaSub(r)}t>0&&this.onSubsUpdated&&this.onSubsUpdated(Object.keys(this._contacts))},enumerable:!0,configurable:!0,writable:!1},publish:{value:function(){return Promise.reject(new Error("Publishing to 'fnd' is not supported"))},enumerable:!0,configurable:!0,writable:!1},setMeta:{value:function(e){var t=this;return Object.getPrototypeOf(k.prototype).setMeta.call(this,e).then(function(){Object.keys(t._contacts).length>0&&(t._contacts={},t.onSubsUpdated&&t.onSubsUpdated([]))})},enumerable:!0,configurable:!0,writable:!1},contacts:{value:function(e,t){var n=e||this.onMetaSub;if(n)for(var r in this._contacts)n.call(t,this._contacts[r],r,this._contacts)},enumerable:!0,configurable:!0,writable:!0}}),k.prototype.constructor=k;var x=function(e){this._tinode=e,this._apiKey=e._apiKey,this._authToken=e.getAuthToken(),this._msgId=e.getNextUniqueId(),this.xhr=g(),this.toResolve=null,this.toReject=null,this.onProgress=null,this.onSuccess=null,this.onFailure=null};x.prototype={upload:function(e,t,n,r){if(!this._authToken)throw new Error("Must authenticate first");var i=this;this.xhr.open("POST","/v"+u+"/file/u/",!0),this.xhr.setRequestHeader("X-Tinode-APIKey",this._apiKey),this.xhr.setRequestHeader("X-Tinode-Auth","Token "+this._authToken.token);var a=new Promise((e,t)=>{this.toResolve=e,this.toReject=t});this.onProgress=t,this.onSuccess=n,this.onFailure=r,this.xhr.upload.onprogress=function(e){e.lengthComputable&&i.onProgress&&i.onProgress(e.loaded/e.total)},this.xhr.onload=function(){var e;try{e=JSON.parse(this.response,v)}catch(e){i._tinode.logger("Invalid server response in LargeFileHelper",this.response)}this.status>=200&&this.status<300?(i.toResolve&&i.toResolve(e.ctrl.params.url),i.onSuccess&&i.onSuccess(e.ctrl)):this.status>=400?(i.toReject&&i.toReject(new Error(e.ctrl.text+" ("+e.ctrl.code+")")),i.onFailure&&i.onFailure(e.ctrl)):i._tinode.logger("Unexpected server response status",this.status,this.response)},this.xhr.onerror=function(e){i.toReject&&i.toReject(new Error("failed")),i.onFailure&&i.onFailure(null)},this.xhr.onabort=function(e){i.toReject&&i.toReject(new Error("upload cancelled by user")),i.onFailure&&i.onFailure(null)};try{var o=new FormData;o.append("file",e),o.set("id",this._msgId),this.xhr.send(o)}catch(e){this.toReject&&this.toReject(e),this.onFailure&&this.onFailure(null)}return a},download:function(e,t,n,r){if(/^(?:(?:[a-z]+:)?\/\/)/i.test(e))throw new Error("The URL '"+e+"' must be relative, not absolute");if(!this._authToken)throw new Error("Must authenticate first");var i=this;this.xhr.open("GET",e,!0),this.xhr.setRequestHeader("X-Tinode-APIKey",this._apiKey),this.xhr.setRequestHeader("X-Tinode-Auth","Token "+this._authToken.token),this.xhr.responseType="blob",this.onProgress=r,this.xhr.onprogress=function(e){i.onProgress&&i.onProgress(e.loaded)};var a=new Promise((e,t)=>{this.toResolve=e,this.toReject=t});this.xhr.onload=function(){if(200==this.status){var e=document.createElement("a");e.href=window.URL.createObjectURL(new Blob([this.response],{type:n})),e.style.display="none",e.setAttribute("download",t),document.body.appendChild(e),e.click(),document.body.removeChild(e),window.URL.revokeObjectURL(e.href),i.toResolve&&i.toResolve()}else if(this.status>=400&&i.toReject){var r=new FileReader;r.onload=function(){try{var e=JSON.parse(this.result,v);i.toReject(new Error(e.ctrl.text+" ("+e.ctrl.code+")"))}catch(e){i._tinode.logger("Invalid server response in LargeFileHelper",this.result),i.toReject(e)}},r.readAsText(this.response)}},this.xhr.onerror=function(e){i.toReject&&i.toReject(new Error("failed"))},this.xhr.onabort=function(){i.toReject&&i.toReject(null)};try{this.xhr.send()}catch(e){this.toReject&&this.toReject(e)}return a},cancel:function(){this.xhr&&this.xhr.readyState<4&&this.xhr.abort()},getId:function(){return this._msgId}};var P=function(e,t){this.status=P.STATUS_NONE,this.topic=e,this.content=t};return P.STATUS_NONE=0,P.STATUS_QUEUED=1,P.STATUS_SENDING=2,P.STATUS_SENT=3,P.STATUS_RECEIVED=4,P.STATUS_READ=5,P.STATUS_TO_ME=6,P.prototype={toJSON:function(){},fromJSON:function(e){}},P.prototype.constructor=P,(l=E).Drafty=t,l})}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],31:[function(e,t,n){(function(e){var n,r,i,a,o,s,l,c,u,d,p,h,f,m,g,v,b,y,w;!function(n){var r="object"==typeof e?e:"object"==typeof self?self:"object"==typeof this?this:{};function i(e,t){return e!==r&&("function"==typeof Object.create?Object.defineProperty(e,"__esModule",{value:!0}):e.__esModule=!0),function(n,r){return e[n]=t?t(n,r):r}}"object"==typeof t&&"object"==typeof t.exports?n(i(r,i(t.exports))):n(i(r))}(function(e){var t=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])};n=function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)},r=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},i=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&&(n[r[i]]=e[r[i]])}return n},a=function(e,t,n,r){var i,a=arguments.length,o=a<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(o=(a<3?i(o):a>3?i(t,n,o):i(t,n))||o);return a>3&&o&&Object.defineProperty(t,n,o),o},o=function(e,t){return function(n,r){t(n,r,e)}},s=function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},l=function(e,t,n,r){return new(n||(n=Promise))(function(i,a){function o(e){try{l(r.next(e))}catch(e){a(e)}}function s(e){try{l(r.throw(e))}catch(e){a(e)}}function l(e){e.done?i(e.value):new n(function(t){t(e.value)}).then(o,s)}l((r=r.apply(e,t||[])).next())})},c=function(e,t){var n,r,i,a,o={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function s(a){return function(s){return function(a){if(n)throw new TypeError("Generator is already executing.");for(;o;)try{if(n=1,r&&(i=r[2&a[0]?"return":a[0]?"throw":"next"])&&!(i=i.call(r,a[1])).done)return i;switch(r=0,i&&(a=[0,i.value]),a[0]){case 0:case 1:i=a;break;case 4:return o.label++,{value:a[1],done:!1};case 5:o.label++,r=a[1],a=[0];continue;case 7:a=o.ops.pop(),o.trys.pop();continue;default:if(!(i=(i=o.trys).length>0&&i[i.length-1])&&(6===a[0]||2===a[0])){o=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]<i[3])){o.label=a[1];break}if(6===a[0]&&o.label<i[1]){o.label=i[1],i=a;break}if(i&&o.label<i[2]){o.label=i[2],o.ops.push(a);break}i[2]&&o.ops.pop(),o.trys.pop();continue}a=t.call(e,o)}catch(e){a=[6,e],r=0}finally{n=i=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,s])}}},u=function(e,t){for(var n in e)t.hasOwnProperty(n)||(t[n]=e[n])},d=function(e){var t="function"==typeof Symbol&&e[Symbol.iterator],n=0;return t?t.call(e):{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}}},p=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,a=n.call(e),o=[];try{for(;(void 0===t||t-- >0)&&!(r=a.next()).done;)o.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=a.return)&&n.call(a)}finally{if(i)throw i.error}}return o},h=function(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(p(arguments[t]));return e},f=function(e){return this instanceof f?(this.v=e,this):new f(e)},m=function(e,t,n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r,i=n.apply(e,t||[]),a=[];return r={},o("next"),o("throw"),o("return"),r[Symbol.asyncIterator]=function(){return this},r;function o(e){i[e]&&(r[e]=function(t){return new Promise(function(n,r){a.push([e,t,n,r])>1||s(e,t)})})}function s(e,t){try{(n=i[e](t)).value instanceof f?Promise.resolve(n.value.v).then(l,c):u(a[0][2],n)}catch(e){u(a[0][3],e)}var n}function l(e){s("next",e)}function c(e){s("throw",e)}function u(e,t){e(t),a.shift(),a.length&&s(a[0][0],a[0][1])}},g=function(e){var t,n;return t={},r("next"),r("throw",function(e){throw e}),r("return"),t[Symbol.iterator]=function(){return this},t;function r(r,i){e[r]&&(t[r]=function(t){return(n=!n)?{value:f(e[r](t)),done:"return"===r}:i?i(t):t})}},v=function(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t=e[Symbol.asyncIterator];return t?t.call(e):"function"==typeof d?d(e):e[Symbol.iterator]()},b=function(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e},y=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t},w=function(e){return e&&e.__esModule?e:{default:e}},e("__extends",n),e("__assign",r),e("__rest",i),e("__decorate",a),e("__param",o),e("__metadata",s),e("__awaiter",l),e("__generator",c),e("__exportStar",u),e("__values",d),e("__read",p),e("__spread",h),e("__await",f),e("__asyncGenerator",m),e("__asyncDelegator",g),e("__asyncValues",v),e("__makeTemplateObject",b),e("__importStar",y),e("__importDefault",w)})}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],32:[function(e,t,n){!function(e){"use strict";if(!e.fetch){var t={searchParams:"URLSearchParams"in e,iterable:"Symbol"in e&&"iterator"in Symbol,blob:"FileReader"in e&&"Blob"in e&&function(){try{return new Blob,!0}catch(e){return!1}}(),formData:"FormData"in e,arrayBuffer:"ArrayBuffer"in e};if(t.arrayBuffer)var n=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],r=function(e){return e&&DataView.prototype.isPrototypeOf(e)},i=ArrayBuffer.isView||function(e){return e&&n.indexOf(Object.prototype.toString.call(e))>-1};u.prototype.append=function(e,t){e=s(e),t=l(t);var n=this.map[e];this.map[e]=n?n+","+t:t},u.prototype.delete=function(e){delete this.map[s(e)]},u.prototype.get=function(e){return e=s(e),this.has(e)?this.map[e]:null},u.prototype.has=function(e){return this.map.hasOwnProperty(s(e))},u.prototype.set=function(e,t){this.map[s(e)]=l(t)},u.prototype.forEach=function(e,t){for(var n in this.map)this.map.hasOwnProperty(n)&&e.call(t,this.map[n],n,this)},u.prototype.keys=function(){var e=[];return this.forEach(function(t,n){e.push(n)}),c(e)},u.prototype.values=function(){var e=[];return this.forEach(function(t){e.push(t)}),c(e)},u.prototype.entries=function(){var e=[];return this.forEach(function(t,n){e.push([n,t])}),c(e)},t.iterable&&(u.prototype[Symbol.iterator]=u.prototype.entries);var a=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];g.prototype.clone=function(){return new g(this,{body:this._bodyInit})},m.call(g.prototype),m.call(b.prototype),b.prototype.clone=function(){return new b(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new u(this.headers),url:this.url})},b.error=function(){var e=new b(null,{status:0,statusText:""});return e.type="error",e};var o=[301,302,303,307,308];b.redirect=function(e,t){if(-1===o.indexOf(t))throw new RangeError("Invalid status code");return new b(null,{status:t,headers:{location:e}})},e.Headers=u,e.Request=g,e.Response=b,e.fetch=function(e,n){return new Promise(function(r,i){var a=new g(e,n),o=new XMLHttpRequest;o.onload=function(){var e,t,n={status:o.status,statusText:o.statusText,headers:(e=o.getAllResponseHeaders()||"",t=new u,e.replace(/\r?\n[\t ]+/g," ").split(/\r?\n/).forEach(function(e){var n=e.split(":"),r=n.shift().trim();if(r){var i=n.join(":").trim();t.append(r,i)}}),t)};n.url="responseURL"in o?o.responseURL:n.headers.get("X-Request-URL");var i="response"in o?o.response:o.responseText;r(new b(i,n))},o.onerror=function(){i(new TypeError("Network request failed"))},o.ontimeout=function(){i(new TypeError("Network request failed"))},o.open(a.method,a.url,!0),"include"===a.credentials?o.withCredentials=!0:"omit"===a.credentials&&(o.withCredentials=!1),"responseType"in o&&t.blob&&(o.responseType="blob"),a.headers.forEach(function(e,t){o.setRequestHeader(t,e)}),o.send(void 0===a._bodyInit?null:a._bodyInit)})},e.fetch.polyfill=!0}function s(e){if("string"!=typeof e&&(e=String(e)),/[^a-z0-9\-#$%&'*+.\^_`|~]/i.test(e))throw new TypeError("Invalid character in header field name");return e.toLowerCase()}function l(e){return"string"!=typeof e&&(e=String(e)),e}function c(e){var n={next:function(){var t=e.shift();return{done:void 0===t,value:t}}};return t.iterable&&(n[Symbol.iterator]=function(){return n}),n}function u(e){this.map={},e instanceof u?e.forEach(function(e,t){this.append(t,e)},this):Array.isArray(e)?e.forEach(function(e){this.append(e[0],e[1])},this):e&&Object.getOwnPropertyNames(e).forEach(function(t){this.append(t,e[t])},this)}function d(e){if(e.bodyUsed)return Promise.reject(new TypeError("Already read"));e.bodyUsed=!0}function p(e){return new Promise(function(t,n){e.onload=function(){t(e.result)},e.onerror=function(){n(e.error)}})}function h(e){var t=new FileReader,n=p(t);return t.readAsArrayBuffer(e),n}function f(e){if(e.slice)return e.slice(0);var t=new Uint8Array(e.byteLength);return t.set(new Uint8Array(e)),t.buffer}function m(){return this.bodyUsed=!1,this._initBody=function(e){if(this._bodyInit=e,e)if("string"==typeof e)this._bodyText=e;else if(t.blob&&Blob.prototype.isPrototypeOf(e))this._bodyBlob=e;else if(t.formData&&FormData.prototype.isPrototypeOf(e))this._bodyFormData=e;else if(t.searchParams&&URLSearchParams.prototype.isPrototypeOf(e))this._bodyText=e.toString();else if(t.arrayBuffer&&t.blob&&r(e))this._bodyArrayBuffer=f(e.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer]);else{if(!t.arrayBuffer||!ArrayBuffer.prototype.isPrototypeOf(e)&&!i(e))throw new Error("unsupported BodyInit type");this._bodyArrayBuffer=f(e)}else this._bodyText="";this.headers.get("content-type")||("string"==typeof e?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):t.searchParams&&URLSearchParams.prototype.isPrototypeOf(e)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},t.blob&&(this.blob=function(){var e=d(this);if(e)return e;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){return this._bodyArrayBuffer?d(this)||Promise.resolve(this._bodyArrayBuffer):this.blob().then(h)}),this.text=function(){var e,t,n,r=d(this);if(r)return r;if(this._bodyBlob)return e=this._bodyBlob,t=new FileReader,n=p(t),t.readAsText(e),n;if(this._bodyArrayBuffer)return Promise.resolve(function(e){for(var t=new Uint8Array(e),n=new Array(t.length),r=0;r<t.length;r++)n[r]=String.fromCharCode(t[r]);return n.join("")}(this._bodyArrayBuffer));if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)},t.formData&&(this.formData=function(){return this.text().then(v)}),this.json=function(){return this.text().then(JSON.parse)},this}function g(e,t){var n,r,i=(t=t||{}).body;if(e instanceof g){if(e.bodyUsed)throw new TypeError("Already read");this.url=e.url,this.credentials=e.credentials,t.headers||(this.headers=new u(e.headers)),this.method=e.method,this.mode=e.mode,i||null==e._bodyInit||(i=e._bodyInit,e.bodyUsed=!0)}else this.url=String(e);if(this.credentials=t.credentials||this.credentials||"omit",!t.headers&&this.headers||(this.headers=new u(t.headers)),this.method=(n=t.method||this.method||"GET",r=n.toUpperCase(),a.indexOf(r)>-1?r:n),this.mode=t.mode||this.mode||null,this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&i)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(i)}function v(e){var t=new FormData;return e.trim().split("&").forEach(function(e){if(e){var n=e.split("="),r=n.shift().replace(/\+/g," "),i=n.join("=").replace(/\+/g," ");t.append(decodeURIComponent(r),decodeURIComponent(i))}}),t}function b(e,t){t||(t={}),this.type="default",this.status=void 0===t.status?200:t.status,this.ok=this.status>=200&&this.status<300,this.statusText="statusText"in t?t.statusText:"OK",this.headers=new u(t.headers),this.url=t.url||"",this._initBody(e)}}("undefined"!=typeof self?self:this)},{}],33:[function(e,t,n){var r=e("react"),i=e("react-dom"),a=e("./webapp.js");i.render(r.createElement(a,null),document.getElementById("mountPoint"))},{"./webapp.js":34,react:29,"react-dom":26}],34:[function(e,t,n){"use strict";if("function"==typeof e){if(void 0===r)var r=e("react"),i=e("react-dom");if(void 0===a)var a=e("tinode-sdk"),o=a.Drafty;if(void 0===s){var s=e("firebase/app");e("firebase/messaging")}var l=e("../version.json").version}const c="TinodeWeb/"+(l||"0.15"),u={hosted:"api.tinode.co",local:"localhost:6060"},d=u.hosted,p=new Audio("audio/msg.mp3"),h="AQEAAAABAAD_rAp4DJh05a1HAwFT3A6K",f="BOgQVPOMzIMXUpsYGpbVkZoEBc0ifKY_f2kSU5DNDGYI6i6CoKqqxDd7w7PJ3FaGRBgVGJffldETumOx831jl58",m="AIzaSyD6X4ULR-RUsobvs1zZ2bHdJuPz39q2tbQ",g="114126160546",v=3e3,b=500,y=1e3,w=4,E=640,_=13,S=128,T=24,C=195840,k=1<<23,x=768,P=["image/jpeg","image/gif","image/png","image/svg","image/svg+xml"],N=["jpg","gif","png","svg","svg"];function M(e){var t=window.navigator.userLanguage||window.navigator.language,n=new Date;return e.getFullYear()==n.getFullYear()?e.getMonth()==n.getMonth()&&e.getDate()==n.getDate()?e.toLocaleTimeString(t,{hour12:!1,hour:"2-digit",minute:"2-digit"}):e.toLocaleDateString(t,{hour12:!1,month:"short",day:"numeric",hour:"2-digit",minute:"2-digit"}):e.toLocaleDateString(t,{hour12:!1,year:"numeric",month:"short",day:"numeric",hour:"2-digit",minute:"2-digit"})}function D(e){if(!e||0==e)return"0 Bytes";var t=["Bytes","KB","MB","GB","TB","PB"],n=Math.min(0|Math.floor(Math.log2(e)/10),t.length-1),r=e/Math.pow(1024,n),i=n>0?r<3?2:r<30?1:0:0;return r.toFixed(i)+" "+t[n]}function A(e){return e&&e.type&&e.data?"data:image/"+e.type+";base64,"+e.data:null}function O(e,t,n,r,i){if(!(e&&t&&n&&r))return null;i&&(n=r=Math.min(n,r));let a=Math.min(Math.min(e,n)/e,Math.min(t,r)/t),o={dstWidth:e*a|0,dstHeight:t*a|0};return i?(o.dstWidth=o.dstHeight=Math.min(o.dstWidth,o.dstHeight),o.srcWidth=o.srcHeight=Math.min(e,t),o.xoffset=(e-o.srcWidth)/2|0,o.yoffset=(t-o.srcWidth)/2|0):(o.xoffset=o.yoffset=0,o.srcWidth=e,o.srcHeight=t),o}function I(e,t){var n=P.indexOf(t),r=N[n],i=e.lastIndexOf(".");return i>=0&&(e=e.substring(0,i)),e+"."+r}function R(e){var t=/^data:(image\/[-+a-z0-9.]+);base64/.exec(e);return t&&t.length>1?t[1]:null}function U(e){return 3*Math.floor(e/4)}function F(e,t,n,r,i,a){var o=new Image;o.crossOrigin="Anonymous",o.onerror=function(e){a("Image format unrecognized")},o.onload=function(){var o=O(this.width,this.height,t,n,r);if(o){var s=document.createElement("canvas");s.width=o.dstWidth,s.height=o.dstHeight;var l=s.getContext("2d");l.imageSmoothingEnabled=!0,l.drawImage(this,o.xoffset,o.yoffset,o.srcWidth,o.srcHeight,0,0,o.dstWidth,o.dstHeight);var c=this.width!=o.dstWidth||this.height!=o.dstHeight||P.indexOf(e.type)<0?"image/jpeg":e.type,u=s.toDataURL(c);if(c=R(u.split(",")[0])){var d=.78;if(U(u.length)>C&&(c="image/jpeg"),"image/jpeg"==c)for(;U(u.length)>C&&d>.45;)u=s.toDataURL(c,d),d*=.84;U(u.length)>C?a("The image size "+D(U(u.length))+" exceeds the "+D(C)+" limit.","err"):(s=null,i(u.split(",")[1],c,o.dstWidth,o.dstHeight,I(e.name,c)))}else a("Unsupported image format")}else a("Invalid image")},o.src=URL.createObjectURL(e)}function L(e,t,n){var r=new FileReader;r.addEventListener("load",function(){var i=r.result.split(","),a=R(i[0]);if(a){var o=new Image;o.crossOrigin="Anonymous",o.onload=function(){t(i[1],a,this.width,this.height,I(e.name,a))},o.onerror=function(e){n("Image format not recognized")},o.src=URL.createObjectURL(e)}else n("Failed to process image file")},!1),r.readAsDataURL(e)}function j(e,t,n){var r=new FileReader;r.addEventListener("load",function(){t(e.type,r.result.split(",")[1],e.name)}),r.readAsDataURL(e)}function W(e){let t=e.split("?",2),n={},r=[];return t[0]&&(r=t[0].substr(1).split("/")),t[1]&&t[1].split("&").forEach(function(e){let t=e.split("=");t[0]&&(n[decodeURIComponent(t[0])]=decodeURIComponent(t[1]))}),{path:r,params:n}}function B(e){window.location.hash=e}function z(e,t){var n=e.join("/"),r=[];for(var i in t)t.hasOwnProperty(i)&&r.push(i+"="+t[i]);return r.length>0&&(n+="?"+r.join("&")),n}function V(e,t,n){var r=W(e);return r.params[t]=n,z(r.path,r.params)}function q(e,t){var n=W(e);return delete n.params[t],z(n.path,n.params)}function H(e,t){var n=W(e);return n.path[0]=t,z(n.path,n.params)}function K(e,t){var n=W(e);return n.path[1]=t,delete n.params.info,z(n.path,n.params)}function G(){return"object"==typeof window.location&&"https:"==window.location.protocol}function $(e,t){var n=null;if((e&&e.trim()||t)&&(n={},e&&(n.fn=e.trim()),t)){var r=t.indexOf(",");n.photo={data:t.substring(r+1),type:"jpg"}}return n}function Y(e,t){if(e.length!=t.length)return!1;e.sort(),t.sort();for(var n=0,r=e.length;n<r;n++)if(e[n]!==t[n])return!1;return!0}Storage.prototype.setObject=function(e,t){this.setItem(e,JSON.stringify(t))},Storage.prototype.getObject=function(e){let t=this.getItem(e);return t&&JSON.parse(t)},Storage.prototype.updateObject=function(e,t){let n=this.getObject(e);this.setObject(e,Object.assign(n||{},t))};class Q extends r.Component{constructor(e){super(e),this.handlePageClick=this.handlePageClick.bind(this),this.handleEscapeKey=this.handleEscapeKey.bind(this),this.handleClick=this.handleClick.bind(this),this.MenuItems={topic_info:{title:"Info",handler:null},messages_clear:{title:"Clear messages",handler:(e,t)=>{this.deleteMessages(!0,!1,e,t)}},messages_clear_hard:{title:"Clear for All",handler:(e,t)=>{this.deleteMessages(!0,!0,e,t)}},message_delete:{title:"Delete",handler:(e,t)=>{this.deleteMessages(!1,!1,e,t)}},message_delete_hard:{title:"Delete for All",handler:(e,t)=>{this.deleteMessages(!1,!0,e,t)}},topic_unmute:{title:"Unmute",handler:this.topicPermissionSetter.bind(this,"+P")},topic_mute:{title:"Mute",handler:this.topicPermissionSetter.bind(this,"-P")},topic_unblock:{title:"Unblock",handler:this.topicPermissionSetter.bind(this,"+J")},topic_block:{title:"Block",handler:this.topicPermissionSetter.bind(this,"-J")},topic_delete:{title:"Delete",handler:(e,t)=>{let n=this.props.tinode.getTopic(e.topicName);n?n.delTopic().catch(e=>{t&&t(e.message,"err")}):console.log("Topic not found: ",e.topicName)}},permissions:{title:"Edit permissions",handler:null},member_delete:{title:"Remove",handler:(e,t)=>{let n=this.props.tinode.getTopic(e.topicName);n&&e.user?n.delSubscription(e.user).catch(e=>{t&&t(e.message,"err")}):console.log("Topic or user not found: '"+e.topicName+"', '"+e.user+"'")}},member_mute:{title:"Mute",handler:this.topicPermissionSetter.bind(this,"-P")},member_unmute:{title:"Unmute",handler:this.topicPermissionSetter.bind(this,"+P")},member_block:{title:"Block",handler:this.topicPermissionSetter.bind(this,"-J")},member_unblock:{title:"Unblock",handler:this.topicPermissionSetter.bind(this,"+J")}}}componentDidMount(){document.addEventListener("mousedown",this.handlePageClick,!1),document.addEventListener("keyup",this.handleEscapeKey,!1)}componentWillUnmount(){document.removeEventListener("mousedown",this.handlePageClick,!1),document.removeEventListener("keyup",this.handleEscapeKey,!1)}handlePageClick(e){i.findDOMNode(this).contains(e.target)||(e.preventDefault(),e.stopPropagation(),this.props.hide())}handleEscapeKey(e){27===e.keyCode&&this.props.hide()}handleClick(e){e.preventDefault(),e.stopPropagation(),this.props.hide();let t=this.props.items[e.currentTarget.dataset.id];"string"==typeof t&&(t=this.MenuItems[t]),t.handler(this.props.params,this.props.onError)}deleteMessages(e,t,n,r){var i=this.props.tinode.getTopic(n.topicName);if(i){if(i.cancelSend(n.seq))return new Promise.resolve;(e?i.delMessagesAll(t):i.delMessagesList([n.seq],t)).catch(e=>{r&&r(e.message,"err")})}else console.log("Topic not found: ",n.topicName)}topicPermissionSetter(e,t,n){var r=this.props.tinode.getTopic(t.topicName);if(r){var i,a;if(t.user){if(!(a=r.subscriber(t.user)))return void console.log("Subscriber not found",t.topicName+"["+t.user+"]");i=a.acs.updateGiven(e).getGiven()}else i=r.getAccessMode().updateWant(e).getWant();r.setMeta({sub:{user:t.user,mode:i}}).catch(e=>{n&&n(e.message,"err")})}else console.log("Topic not found",t.topicName)}render(){let e=0,t=[];this.props.items.map(n=>{"string"==typeof n&&(n=this.MenuItems[n]),n&&n.title&&t.push("-"==n.title?r.createElement("li",{className:"separator",key:e}):r.createElement("li",{onClick:this.handleClick,"data-id":e,key:e},n.title)),e++});var n=12*_,i=_*(.7+2.5*t.length),a={left:(this.props.bounds.right-this.props.clickAt.x<n?this.props.clickAt.x-this.props.bounds.left-n:this.props.clickAt.x-this.props.bounds.left)+"px",top:(this.props.bounds.bottom-this.props.clickAt.y<i?this.props.clickAt.y-this.props.bounds.top-i:this.props.clickAt.y-this.props.bounds.top)+"px"};return r.createElement("ul",{className:"menu",style:a},t)}}class X extends r.PureComponent{constructor(e){super(e)}render(){return r.createElement("a",{href:"javascript:;",onClick:this.props.onCancel},r.createElement("i",{className:"material-icons"},"close"))}}class J extends r.PureComponent{render(){return this.props.show?r.createElement("div",{className:"load-spinner-box"},r.createElement("div",{className:"loader-spinner"})):null}}class Z extends r.PureComponent{constructor(e){super(e),this.state={open:e.open},this.handleToggle=this.handleToggle.bind(this)}handleToggle(){let e=!this.state.open;this.setState({open:e}),this.props.onToggle&&this.props.onToggle(e)}render(){return r.createElement("label",{className:"small",onClick:this.handleToggle},this.props.title,"...",this.state.open?r.createElement("i",{className:"material-icons"},"expand_more"):r.createElement("i",{className:"material-icons"},"chevron_right"))}}class ee extends r.PureComponent{render(){let e;if(!0===this.props.avatar)if(this.props.topic&&this.props.title&&this.props.title.trim()){let t=this.props.title.trim().charAt(0),n="lettertile dark-color"+Math.abs(function(e){var t=0;e=""+e;for(var n=0;n<e.length;n++)t=(t<<5)-t+e.charCodeAt(n),t&=t;return t}(this.props.topic))%16;e=r.createElement("div",{className:n},r.createElement("div",null,t))}else e="grp"==a.topicType(this.props.topic)?r.createElement("i",{className:"material-icons"},"group"):r.createElement("i",{className:"material-icons"},"person");else e=this.props.avatar?r.createElement("img",{className:"avatar",alt:"avatar",src:this.props.avatar}):null;return e}}class te extends r.Component{constructor(e){super(e),this.state={active:e.state,initialText:e.text||"",text:e.text||""},this.handeTextChange=this.handeTextChange.bind(this),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleStartEditing=this.handleStartEditing.bind(this),this.handleEditingFinished=this.handleEditingFinished.bind(this)}static getDerivedStateFromProps(e,t){return t.initialText==e.text||t.active?null:{initialText:e.text||"",text:e.text||""}}handeTextChange(e){this.setState({text:e.target.value})}handleKeyDown(e){27===e.keyCode?this.setState({text:this.props.text,active:!1}):13===e.keyCode&&this.handleEditingFinished()}handleStartEditing(){this.props.readOnly||(i.findDOMNode(this).focus(),this.setState({active:!0}))}handleEditingFinished(){this.setState({active:!1});var e=this.state.text.trim();(e||this.props.text)&&e!==this.props.text&&this.props.onFinished(e)}render(){var e="password"===this.props.type?"••••••••":this.state.text,t="in-place-edit"+(this.props.readOnly?" disabled":"");return e||(e=this.props.placeholder,t+=" placeholder"),e.length>20&&(e=e.substring(0,19)+"..."),this.state.active?r.createElement("input",{type:this.props.type||"text",value:this.state.text,placeholder:this.props.placeholder,onChange:this.handeTextChange,onKeyDown:this.handleKeyDown,onBlur:this.handleEditingFinished,autoFocus:!0}):r.createElement("span",{className:t,onClick:this.handleStartEditing},r.createElement("span",{className:"content"},e))}}class ne extends r.PureComponent{constructor(e){super(e),this.state={hostName:e.serverAddress,changed:!1},this.handleHostNameChange=this.handleHostNameChange.bind(this),this.handleEditingFinished=this.handleEditingFinished.bind(this)}handleHostNameChange(e){this.setState({hostName:e.target.value,changed:!0})}handleEditingFinished(){this.state.changed&&(this.setState({changed:!1}),this.props.onServerAddressChange(this.state.hostName.trim()))}render(){var e=[];for(var t in u){var n=u[t];e.push(r.createElement("option",{key:n,value:n}))}return r.createElement("div",{className:"panel-form-row"},r.createElement("input",{type:"search",id:"host-name",placeholder:this.props.hostName,list:"known-hosts",className:"quoted",value:this.state.hostName,onChange:this.handleHostNameChange,onBlur:this.handleEditingFinished,required:!0}),r.createElement("datalist",{id:"known-hosts"},e))}}class re extends r.PureComponent{constructor(e){super(e),this.handleChange=this.handleChange.bind(this)}handleChange(){this.props.onChange(this.props.name,!this.props.checked)}render(){return this.props.onChange?this.props.checked?r.createElement("i",{className:"material-icons blue clickable",onClick:this.handleChange},"check_box"):r.createElement("i",{className:"material-icons blue clickable",onClick:this.handleChange},"check_box_outline_blank"):this.props.checked?r.createElement("i",{className:"material-icons"},"check_box"):r.createElement("i",{className:"material-icons"},"check_box_outline_blank")}}class ie extends r.Component{constructor(e){super(e),this.state={mode:(e.mode||"").replace("N","")},this.handleChange=this.handleChange.bind(this),this.handleSubmit=this.handleSubmit.bind(this),this.handleCancel=this.handleCancel.bind(this)}handleChange(e){let t=this.state.mode;-1==t.indexOf(e)?t+=e:t=t.replace(e,""),this.setState({mode:t})}handleSubmit(){var e=(this.state.mode||"N").split("").sort().join("");e!==(this.props.mode||"N").split("").sort().join("")?this.props.onSubmit(e):this.props.onCancel()}handleCancel(){this.props.onCancel()}render(){const e={J:"Join (J)",R:"Read (R)",W:"Write (W)",P:"Get notified (P)",A:"Approve (A)",S:"Share (S)",D:"Delete (D)",O:"Owner (O)"};let t=this.props.skip||"",n=this.state.mode,i=(this.props.compare||"").replace("N",""),a=[];for(let o=0;o<"JRWPASDO".length;o++){let s="JRWPASDO".charAt(o);t.indexOf(s)>=0&&n.indexOf(s)<0||a.push(r.createElement("tr",{key:s},r.createElement("td",null,e[s]),r.createElement("td",{className:"checkbox"},t.indexOf(s)<0?r.createElement(re,{name:s,checked:n.indexOf(s)>=0,onChange:this.handleChange}):r.createElement(re,{name:s,checked:n.indexOf(s)>=0})),this.props.compare?r.createElement("td",{className:"checkbox"},r.createElement(re,{name:s,checked:i.indexOf(s)>=0})):null))}return r.createElement("div",{className:"panel-form-column"},this.props.userTitle?r.createElement("ul",{className:"contact-box"},r.createElement(ye,{item:this.props.item,title:this.props.userTitle,avatar:A(this.props.userAvatar?this.props.userAvatar:null)})):null,r.createElement("label",{className:"small"},"Permissions"),r.createElement("table",{className:"permission-editor"},this.props.compare?r.createElement("thead",null,r.createElement("tr",null,r.createElement("th",null),r.createElement("th",null,this.props.modeTitle),r.createElement("th",null,this.props.compareTitle))):null,r.createElement("tbody",null,a)),r.createElement("br",null),r.createElement("div",{className:"dialog-buttons"},r.createElement("button",{className:"blue",onClick:this.handleSubmit},"Ok"),r.createElement("button",{className:"white",onClick:this.handleCancel},"Cancel")))}}class ae extends r.Component{constructor(e){super(e),this.state={placeholder:e.chips?"":e.prompt,sortedChips:ae.sortChips(e.chips,e.required),chipIndex:ae.indexChips(e.chips),input:"",focused:!1},this.handleTextInput=this.handleTextInput.bind(this),this.removeChipAt=this.removeChipAt.bind(this),this.handleChipCancel=this.handleChipCancel.bind(this),this.handleFocusGained=this.handleFocusGained.bind(this),this.handleFocusLost=this.handleFocusLost.bind(this),this.handleKeyDown=this.handleKeyDown.bind(this)}UNSAFE_componentWillReceiveProps(e){this.setState({sortedChips:ae.sortChips(e.chips,e.required),chipIndex:ae.indexChips(e.chips)}),e.chips.length>this.props.chips.length&&this.setState({input:""})}static indexChips(e){var t={},n=0;return e.map(function(e){t[e.user]=n,n++}),t}static sortChips(e,t){var n=[],r=[];return e.map(function(e){e.user===t?n.push(e):r.push(e)}),n.concat(r)}handleTextInput(e){this.setState({input:e.target.value}),this.props.filterFunc&&this.props.filterFunc(e.target.value)}removeChipAt(e){var t=this.state.sortedChips[e];this.props.onChipRemoved(t.user,this.state.chipIndex[t.user])}handleChipCancel(e,t){this.removeChipAt(t)}handleFocusGained(){this.setState({focused:!0})}handleFocusLost(){this.setState({focused:!1}),this.props.onFocusLost&&this.props.onFocusLost(this.state.input)}handleKeyDown(e){if("Backspace"===e.key){if(0==this.state.input.length&&this.state.sortedChips.length>0){var t=this.state.sortedChips.length-1;this.state.sortedChips[t].user!==this.props.required&&this.removeChipAt(t)}}else"Enter"===e.key?this.props.onEnter&&this.props.onEnter(this.state.input):"Escape"===e.key&&this.props.onCancel&&this.props.onCancel()}render(){var e=[],t=0;this.state.sortedChips.map(n=>{e.push(r.createElement(oe,{onCancel:this.handleChipCancel,avatar:A(n.public?n.public.photo:null),title:n.public?n.public.fn:void 0,noAvatar:this.props.avatarDisabled,topic:n.user,required:n.user===this.props.required,index:t,key:n.user})),t++});var n="chip-input"+(this.state.focused?" focused":"");return r.createElement("div",{className:n},e,r.createElement("input",{type:"text",placeholder:this.state.placeholder,onChange:this.handleTextInput,onFocus:this.handleFocusGained,onBlur:this.handleFocusLost,onKeyDown:this.handleKeyDown,value:this.state.input,autoFocus:!0}))}}class oe extends r.PureComponent{constructor(e){super(e),this.handleCancel=this.handleCancel.bind(this)}handleCancel(){this.props.onCancel(this.props.topic,this.props.index)}render(){var e=this.props.title||this.props.topic;return r.createElement("div",{className:"chip"},this.props.noAvatar?r.createElement("span",{className:"spacer"}):r.createElement("div",{className:"avatar-box"},r.createElement(ee,{avatar:this.props.avatar||!0,topic:this.props.topic,title:this.props.title})),r.createElement("span",null,e),this.props.onCancel&&!this.props.required?r.createElement("a",{href:"javascript:;",onClick:this.handleCancel},"×"):r.createElement("span",{className:"spacer"}))}}class se extends r.Component{constructor(e){super(e),this.state={onlineSubs:e.subscribers||[]}}static getDerivedStateFromProps(e,t){return{onlineSubs:e.subscribers?e.subscribers:[]}}render(){var e=[];return this.state.onlineSubs.map(t=>{e.push(r.createElement("div",{className:"avatar-box",key:t.user},r.createElement(ee,{topic:t.user,avatar:A(t.public?t.public.photo:null)||!0,title:t.public?t.public.fn:null})))}),r.createElement("div",{id:"topic-users"},e)}}class le extends r.Component{constructor(e){super(e),this.state={login:e.login,password:"",hostName:e.serverAddress,saveToken:localStorage.getObject("keep-logged-in")},this.handleLoginChange=this.handleLoginChange.bind(this),this.handlePasswordChange=this.handlePasswordChange.bind(this),this.handleToggleSaveToken=this.handleToggleSaveToken.bind(this),this.handleSubmit=this.handleSubmit.bind(this)}handleLoginChange(e){this.setState({login:e.target.value})}handlePasswordChange(e){this.setState({password:e.target.value})}handleToggleSaveToken(){localStorage.setObject("keep-logged-in",!this.state.saveToken),this.setState({saveToken:!this.state.saveToken})}handleSubmit(e){e.preventDefault(),this.props.onLogin(this.state.login.trim(),this.state.password.trim())}render(){var e="blue";return this.props.disabled&&(e+=" disabled"),r.createElement("form",{id:"login-form",onSubmit:this.handleSubmit},r.createElement("input",{type:"text",id:"inputLogin",placeholder:"Login",autoComplete:"username",value:this.state.login,onChange:this.handleLoginChange,required:!0,autoFocus:!0}),r.createElement("input",{type:"password",id:"inputPassword",placeholder:"Password",autoComplete:"current-password",value:this.state.password,onChange:this.handlePasswordChange,required:!0}),r.createElement("div",{className:"panel-form-row"},r.createElement(re,{id:"save-token",name:"save-token",checked:this.state.saveToken,onChange:this.handleToggleSaveToken}),r.createElement("label",{htmlFor:"save-token"}," Keep me logged in")),r.createElement("div",{className:"dialog-buttons"},r.createElement("button",{className:e,type:"submit"},"Sign in")))}}class ce extends r.PureComponent{constructor(e){super(e),this.state={login:"",password:"",password2:"",email:"",fn:"",imageDataUrl:null,errorCleared:!1,saveToken:localStorage.getObject("keep-logged-in")},this.handleLoginChange=this.handleLoginChange.bind(this),this.handlePasswordChange=this.handlePasswordChange.bind(this),this.handlePassword2Change=this.handlePassword2Change.bind(this),this.handleEmailChange=this.handleEmailChange.bind(this),this.handleFnChange=this.handleFnChange.bind(this),this.handleImageChanged=this.handleImageChanged.bind(this),this.handleToggleSaveToken=this.handleToggleSaveToken.bind(this),this.handleSubmit=this.handleSubmit.bind(this)}handleLoginChange(e){this.setState({login:e.target.value})}handlePasswordChange(e){this.setState({password:e.target.value})}handlePassword2Change(e){this.setState({password2:e.target.value})}handleEmailChange(e){this.setState({email:e.target.value})}handleFnChange(e){this.setState({fn:e.target.value})}handleImageChanged(e){this.setState({imageDataUrl:e})}handleToggleSaveToken(){localStorage.setObject("keep-logged-in",!this.state.saveToken),this.setState({saveToken:!this.state.saveToken})}handleSubmit(e){e.preventDefault(),this.state.password.trim()!=this.state.password2.trim()?this.props.onError("Passwords don't match","warn"):(this.setState({errorCleared:!1}),this.props.onCreateAccount(this.state.login.trim(),this.state.password.trim(),$(this.state.fn,this.state.imageDataUrl),{meth:"email",val:this.state.email}))}render(){var e="blue";return this.props.disabled&&(e+=" disabled"),r.createElement("form",{className:"panel-form-column",onSubmit:this.handleSubmit},r.createElement("div",{className:"panel-form-row"},r.createElement("div",{className:"panel-form-column"},r.createElement("input",{type:"text",placeholder:"Login",autoComplete:"user-name",value:this.state.login,onChange:this.handleLoginChange,required:!0,autoFocus:!0}),r.createElement("input",{type:"password",placeholder:"Password",autoComplete:"new-password",value:this.state.password,onChange:this.handlePasswordChange,required:!0}),r.createElement("input",{type:"password",placeholder:"Repeat password",autoComplete:"new-password",value:this.state.password2,onChange:this.handlePassword2Change,required:!0})),r.createElement(ue,{onImageChanged:this.handleImageChanged,onError:this.props.onError})),r.createElement("div",{className:"panel-form-row"},r.createElement("input",{type:"email",placeholder:"Email, e.g john.doe@example.com",autoComplete:"email",value:this.state.email,onChange:this.handleEmailChange,required:!0})),r.createElement("div",{className:"panel-form-row"},r.createElement("input",{type:"text",placeholder:"Full name, e.g. John Doe",autoComplete:"name",value:this.state.fn,onChange:this.handleFnChange,required:!0})),r.createElement("div",{className:"panel-form-row"},r.createElement(re,{id:"save-token",name:"save-token",checked:this.state.saveToken,onChange:this.handleToggleSaveToken}),r.createElement("label",{htmlFor:"save-token"}," Keep me logged in")),r.createElement("div",{className:"dialog-buttons"},r.createElement("button",{className:e,type:"submit"},"Sign up")))}}class ue extends r.Component{constructor(e){super(e),this.state={dataUrl:e.avatar},this.handleFileUpload=this.handleFileUpload.bind(this)}static getDerivedStateFromProps(e,t){return t.dataUrl!=e.avatar?{dataUrl:e.avatar}:null}handleFileUpload(e){F(e.target.files[0],S,S,!0,(e,t)=>{var n=A({data:e,type:t});this.setState({dataUrl:n}),this.props.onImageChanged(n)},e=>{this.props.onError(e,"err")}),e.target.value=""}render(){var e="file-input-avatar-"+(Math.random()+"").substr(2);return r.createElement("div",{className:"avatar-upload"},this.state.dataUrl?r.createElement("img",{src:this.state.dataUrl,className:"preview"}):this.props.readOnly&&this.props.uid?r.createElement("div",{className:"avatar-box"},r.createElement(ee,{avatar:!0,topic:this.props.uid,title:this.props.title})):r.createElement("div",{className:"blank"},"128×128"),this.props.readOnly?null:r.createElement("input",{type:"file",id:e,className:"inputfile hidden",accept:"image/*",onChange:this.handleFileUpload}),this.props.readOnly?null:r.createElement("label",{htmlFor:e,className:"round"},r.createElement("i",{className:"material-icons"},"file_upload")))}}class de extends r.PureComponent{constructor(e){super(e),this.state={transport:e.transport||"def",serverAddress:e.serverAddress},this.handleSubmit=this.handleSubmit.bind(this),this.handleTransportSelected=this.handleTransportSelected.bind(this),this.handleServerAddressChange=this.handleServerAddressChange.bind(this)}handleSubmit(e){e.preventDefault(),this.props.onUpdate({transport:this.state.transport,serverAddress:this.state.serverAddress})}handleTransportSelected(e){this.setState({transport:e.currentTarget.value})}handleServerAddressChange(e){this.setState({serverAddress:e}),this.props.onServerAddressChange(e)}render(){var e={def:"default",ws:"websocket",lp:"long polling"},t=[],n=this;return["def","ws","lp"].map(function(i){var a="transport-"+i,o=e[i];t.push(r.createElement("li",{key:i},r.createElement("input",{type:"radio",id:a,name:"transport-select",value:i,checked:n.state.transport===i,onChange:n.handleTransportSelected}),r.createElement("label",{htmlFor:a},o)))}),r.createElement("form",{id:"settings-form",className:"panel-form",onSubmit:this.handleSubmit},r.createElement("div",{className:"panel-form-row"},r.createElement("label",{className:"small"},"Server to use:")),r.createElement(ne,{serverAddress:this.state.serverAddress,onServerAddressChange:this.handleServerAddressChange}),r.createElement("div",{className:"panel-form-row"},r.createElement("label",{className:"small"},"Wire transport:")),r.createElement("div",{className:"panel-form-row"},r.createElement("ul",{className:"quoted"},t)),r.createElement("div",{className:"dialog-buttons"},r.createElement("button",{type:"submit",className:"blue"},"Update")))}}class pe extends r.PureComponent{render(){return r.createElement("div",{id:"side-caption-panel",className:"caption-panel"},r.createElement("div",{id:"self-avatar",className:"avatar-box"},r.createElement(ee,{avatar:this.props.avatar,topic:this.props.myUserId,title:this.props.title})),r.createElement("div",{id:"sidepanel-title",className:"panel-title"},this.props.title),"login"===this.props.state?r.createElement(he,{onSignUp:this.props.onSignUp,onSettings:this.props.onSettings}):"contacts"===this.props.state?r.createElement(fe,{onNewTopic:this.props.onNewTopic,onSettings:this.props.onSettings}):null,this.props.onCancel?r.createElement(X,{onCancel:this.props.onCancel}):null)}}class he extends r.PureComponent{render(){return r.createElement("div",null,r.createElement("a",{href:"javascript:;",onClick:this.props.onSignUp},r.createElement("i",{className:"material-icons"},"person_add"))," ",r.createElement("a",{href:"javascript:;",onClick:this.props.onSettings},r.createElement("i",{className:"material-icons"},"settings")))}}class fe extends r.PureComponent{render(){return r.createElement("div",null,r.createElement("a",{href:"javascript:;",onClick:this.props.onNewTopic},r.createElement("i",{className:"material-icons"},"chat"))," ",r.createElement("a",{href:"javascript:;",onClick:this.props.onSettings},r.createElement("i",{className:"material-icons"},"settings")))}}class me extends r.Component{constructor(e){super(e),this.handleLoginRequested=this.handleLoginRequested.bind(this)}handleLoginRequested(e,t){this.props.onLoginRequest(e,t)}render(){var e=null,t=!1,n=void 0,i=this.props.state||(this.props.myUserId?"contacts":"login");switch(i){case"login":e="Sign In";break;case"register":e="Create Account",n=this.props.onCancel;break;case"settings":e="Settings",n=this.props.onCancel;break;case"edit":e="Edit Account",n=this.props.onCancel;break;case"contacts":e=this.props.title,t=!this.props.avatar||this.props.avatar;break;case"newtpk":e="Start New Chat",n=this.props.onCancel;break;case"cred":e="Confirm Credentials",n=this.props.onCancel}return r.createElement("div",{id:"sidepanel",className:this.props.hideSelf?"nodisplay":null},r.createElement(pe,{state:i,title:e,avatar:t,myUserId:this.props.myUserId,onSignUp:this.props.onSignUp,onSettings:this.props.onSettings,onNewTopic:this.props.onNewTopic,onCancel:n}),r.createElement(ge,{level:this.props.errorLevel,text:this.props.errorText,onClearError:this.props.onError}),"login"===i?r.createElement(le,{login:this.props.login,disabled:this.props.loginDisabled,onLogin:this.handleLoginRequested}):"register"===i?r.createElement(ce,{onCreateAccount:this.props.onCreateAccount,onCancel:this.props.onCancel,onError:this.props.onError}):"settings"===i?r.createElement(de,{transport:this.props.transport,serverAddress:this.props.serverAddress,onServerAddressChange:this.props.onGlobalSettings,onCancel:this.props.onCancel,onUpdate:this.props.onGlobalSettings}):"edit"===i?r.createElement(ve,{tinode:this.props.tinode,myUserId:this.props.myUserId,messageSounds:this.props.messageSounds,desktopAlerts:this.props.desktopAlerts,desktopAlertsEnabled:this.props.desktopAlertsEnabled,onSubmit:this.props.onUpdateAccount,onUpdateTags:this.props.onUpdateAccountTags,onTogglePushNotifications:this.props.onTogglePushNotifications,onToggleMessageSounds:this.props.onToggleMessageSounds,onLogout:this.props.onLogout,onCancel:this.props.onCancel,onError:this.props.onError}):"contacts"===i?r.createElement(Ee,{tinode:this.props.tinode,myUserId:this.props.myUserId,connected:this.props.connected,topicSelected:this.props.topicSelected,chatList:this.props.chatList,showContextMenu:this.props.showContextMenu,onTopicSelected:this.props.onTopicSelected}):"newtpk"===i?r.createElement(Te,{searchResults:this.props.searchResults,onInitFind:this.props.onInitFind,onSearchContacts:this.props.onSearchContacts,onCreateTopic:this.props.onCreateTopic,onError:this.props.onError}):"cred"===i?r.createElement(Pe,{credCode:this.props.credCode,credMethod:this.props.credMethod,onSubmit:this.props.onValidateCredentials,onCancel:this.props.onCancel,onError:this.props.onError}):null)}}class ge extends r.PureComponent{constructor(e){super(e),this.state={show:!1},this.hide=this.hide.bind(this)}static getDerivedStateFromProps(e,t){return{show:!!e.level}}hide(){this.setState({show:!1}),this.props.onClearError&&this.props.onClearError()}render(){var e="err"==this.props.level?"error":"warning";return r.createElement("div",{className:this.state.show?"err"==this.props.level?"alert-box error":"alert-box warning":"alert-box"},r.createElement("div",{className:"icon"},r.createElement("i",{className:"material-icons"},e)),this.props.text,r.createElement("div",{className:"cancel"},r.createElement(X,{onCancel:this.hide})))}}class ve extends r.Component{constructor(e){super(e);let t=this.props.tinode.getMeTopic(),n=t.getDefaultAccess(),r=this.props.tinode.getFndTopic();this.state={fullName:t.public?t.public.fn:void 0,avatar:A(t.public?t.public.photo:null),auth:n.auth,anon:n.anon,tags:r.tags(),previousOnTags:r.onTagsUpdated},this.tnNewTags=this.tnNewTags.bind(this),this.handleFullNameUpdate=this.handleFullNameUpdate.bind(this),this.handlePasswordUpdate=this.handlePasswordUpdate.bind(this),this.handleImageChanged=this.handleImageChanged.bind(this),this.handleCheckboxClick=this.handleCheckboxClick.bind(this),this.handleTagsUpdated=this.handleTagsUpdated.bind(this)}componentDidMount(){let e=this.props.tinode.getFndTopic();e.onTagsUpdated=this.tnNewTags,e.isSubscribed()||e.subscribe(e.startMetaQuery().withLaterDesc().withTags().build()).catch(e=>{this.props.onError(e.message,"err")})}componentWillUnmount(){this.props.tinode.getFndTopic().onTagsUpdated=this.state.previousOnTags}tnNewTags(e){this.setState({tags:e})}handleFullNameUpdate(e){this.setState({fullName:e}),this.props.onSubmit(null,$(e,this.state.avatar))}handlePasswordUpdate(e){this.setState({password:e}),this.props.onSubmit(e,null)}handleImageChanged(e){this.setState({avatar:e}),this.props.onSubmit(null,$(this.state.fullName,e))}handleCheckboxClick(e,t){"sound"==e?this.props.onToggleMessageSounds(t):"alert"==e&&this.props.onTogglePushNotifications(t)}handleTagsUpdated(e){Y(this.state.tags.slice(0),e.slice(0))||this.props.onUpdateTags(e)}render(){var e=[];return this.state.tags.map(function(t){e.push(r.createElement("span",{className:"badge",key:e.length},t))}),0==e.length&&(e=r.createElement("i",null,"No tags defined. Add some.")),r.createElement("div",{id:"edit-account",className:"scrollable-panel"},r.createElement("div",{className:"panel-form-row"},r.createElement("div",{className:"panel-form-column"},r.createElement("div",null,r.createElement("label",{className:"small"},"Your name")),r.createElement("div",null,r.createElement(te,{placeholder:"Full name, e.g. John Doe",text:this.state.fullName,onFinished:this.handleFullNameUpdate})),r.createElement("div",null,r.createElement("label",{className:"small"},"Password")),r.createElement("div",null,r.createElement(te,{placeholder:"Unchanged",type:"password",onFinished:this.handlePasswordUpdate}))),r.createElement(ue,{avatar:this.state.avatar,uid:this.props.myUserId,title:this.state.fullName,onImageChanged:this.handleImageChanged,onError:this.props.onError})),r.createElement("div",{className:"hr"}),r.createElement("div",{className:"panel-form-column"},r.createElement("div",{className:"panel-form-row"},r.createElement("label",null,"Address:"),r.createElement("tt",null,this.props.myUserId)),r.createElement("div",null,r.createElement("label",{className:"small"},"Default access mode:")),r.createElement("div",{className:"quoted"},r.createElement("div",null,"Auth: ",r.createElement("tt",null,this.state.auth)),r.createElement("div",null,"Anon: ",r.createElement("tt",null,this.state.anon)))),r.createElement("div",{className:"hr"}),r.createElement("div",{className:"panel-form-row"},r.createElement("label",{htmlFor:"message-sound"},"Message sound:"),r.createElement(re,{name:"sound",id:"message-sound",checked:this.props.messageSounds,onChange:this.handleCheckboxClick})),r.createElement("div",{className:"panel-form-row"},r.createElement("label",{htmlFor:"desktop-alerts"},"Notification alerts",this.props.desktopAlertsEnabled?null:" (requires HTTPS)",":"),r.createElement(re,{name:"alert",id:"desktop-alerts",checked:this.props.desktopAlerts,onChange:this.props.desktopAlertsEnabled?this.handleCheckboxClick:null})),r.createElement("div",{className:"hr"}),r.createElement(be,{title:"Tags (user discovery)",activated:!1,tags:this.state.tags,onSubmit:this.handleTagsUpdated}),r.createElement("div",{className:"hr"}),r.createElement("div",{className:"panel-form-column"},r.createElement("a",{href:"javascript:;",className:"red flat-button",onClick:this.props.onLogout},r.createElement("i",{className:"material-icons"},"exit_to_app")," Logout")))}}class be extends r.Component{constructor(e){super(e),this.state={tags:this.props.tags,tagInput:"",activated:this.props.activated,noTagsMessage:"Add some tags"},this.handleShowTagManager=this.handleShowTagManager.bind(this),this.handleTagInput=this.handleTagInput.bind(this),this.handleAddTag=this.handleAddTag.bind(this),this.handleRemoveTag=this.handleRemoveTag.bind(this),this.handleSubmit=this.handleSubmit.bind(this),this.handleCancel=this.handleCancel.bind(this)}static getDerivedStateFromProps(e,t){return Y(e.tags,t.tags)||t.activated?null:{tags:e.tags}}handleShowTagManager(){this.setState({activated:!0})}handleTagInput(e){if(this.setState({tagInput:e}),e.length>0){var t=e[e.length-1];if(","==t||" "==t||";"==t){var n=e.substr(0,e.length-1).trim();n.length>=w&&this.handleAddTag(n)}}}handleAddTag(e){if((e=e.trim()).length>0){let t=this.state.tags.slice(0);t.push(e),this.setState({tags:t,tagInput:""}),this.props.onTagsChanged&&this.props.onTagsChanged(t)}}handleRemoveTag(e,t){var n=this.state.tags.slice(0);n.splice(t,1),this.setState({tags:n}),this.props.onTagsChanged&&this.props.onTagsChanged(n)}handleSubmit(){let e=this.state.tags.slice(0),t=this.state.tagInput.trim();t.length>0&&(e.push(t),this.props.onTagsChanged&&this.props.onTagsChanged(e)),this.props.onSubmit(e),this.setState({activated:!1,tagInput:"",tags:this.props.tags})}handleCancel(){this.setState({activated:!1,tagInput:"",tags:this.props.tags}),this.props.onCancel&&this.props.onCancel()}render(){var e=[];return this.state.activated?this.state.tags.map(function(t){e.push({user:t})}):(this.state.tags.map(function(t){e.push(r.createElement("span",{className:"badge",key:e.length},t))}),0==e.length&&(e=r.createElement("i",null,"No tags defined. Add some."))),r.createElement("div",{className:"panel-form-column"},r.createElement("div",{className:"panel-form-row"},r.createElement("label",{className:"small"},this.props.title)),this.state.activated?r.createElement("div",null,r.createElement(ae,{chips:e,avatarDisabled:!0,prompt:this.state.noTagsMessage,onEnter:this.handleAddTag,onFocusLost:this.handleAddTag,onCancel:this.handleCancel,onChipRemoved:this.handleRemoveTag,filterFunc:this.handleTagInput}),this.props.onSubmit||this.props.onCancel?r.createElement("div",{id:"tag-manager-buttons",className:"panel-form-row"},r.createElement("button",{className:"blue",onClick:this.handleSubmit},"OK"),r.createElement("button",{className:"white",onClick:this.handleCancel},"Cancel")):null):r.createElement("div",null,r.createElement("a",{href:"javascript:;",className:"flat-button",onClick:this.handleShowTagManager},r.createElement("i",{className:"material-icons"},"edit")," Manage tags"),r.createElement("span",null,e)))}}class ye extends r.Component{constructor(e){super(e),this.handleClick=this.handleClick.bind(this),this.handleContextClick=this.handleContextClick.bind(this)}handleClick(e){e.preventDefault(),e.stopPropagation(),this.props.onSelected&&this.props.onSelected(this.props.item,this.props.index,this.props.now,this.props.acs)}handleContextClick(e){e.preventDefault(),e.stopPropagation(),this.props.showContextMenu({topicName:this.props.item,y:e.pageY,x:e.pageX})}render(){var e=this.props.title;e?e.length>30&&(e=e.substring(0,28)+"..."):e=r.createElement("i",null,"unknown");var t=this.props.now?"online":"offline",n=!this.props.avatar||this.props.avatar,i=[];if(this.props.badges&&this.props.badges.length>0){var a=0;this.props.badges.map(function(e){var t="badge"+(e.color?" "+e.color:"");i.push(r.createElement("span",{className:t,key:a},e.name)),a++})}return this.props.showMode&&this.props.acs&&i.push(r.createElement("span",{className:"badge",key:"mode"},this.props.acs.getMode())),r.createElement("li",{className:!this.props.showCheckmark&&this.props.selected?"selected":null,onClick:this.handleClick},r.createElement("div",{className:"avatar-box"},r.createElement(ee,{avatar:n,title:this.props.title,topic:this.props.item}),this.props.showOnline?r.createElement("span",{className:t}):this.props.showCheckmark&&this.props.selected?r.createElement("i",{className:"checkmark material-icons"},"check_circle"):null),r.createElement("div",{className:"text-box"},r.createElement("div",null,r.createElement("span",{className:"contact-title"},e),this.props.unread>0?r.createElement(we,{count:this.props.unread}):null),this.props.comment?r.createElement("div",{className:"contact-comment"},this.props.comment):null,r.createElement("span",null,i)),this.props.showContextMenu?r.createElement("span",{className:"menuTrigger"},r.createElement("a",{href:"javascript:;",onClick:this.handleContextClick},r.createElement("i",{className:"material-icons"},"expand_more"))):null)}}class we extends r.PureComponent{render(){var e=null;if(this.props.count>0){var t=this.props.count>9?"9+":this.props.count;e=r.createElement("span",{className:"unread"},t)}return e}}class Ee extends r.Component{constructor(e){super(e),this.state=Ee.getDerivedStateFromProps(e,{})}static getDerivedStateFromProps(e,t){let n=[],r=0;return e.chatList.map(e=>{r+=e.unread>0?1:0,n.push(e)}),n.sort(function(e,t){return t.touched-e.touched}),function(e){var t=document.getElementById("shortcut-icon");if(t){var n=document.head||document.getElementsByTagName("head")[0],r=document.createElement("link");r.type="image/png",r.id="shortcut-icon",r.rel="shortcut icon",r.href="img/logo32x32"+(e>0?"a":"")+".png",n.removeChild(t),n.appendChild(r)}document.title=(e>0?"("+e+") ":"")+"Tinode"}(r),{contactList:n}}render(){return r.createElement(_e,{connected:this.props.connected,contacts:this.state.contactList,emptyListMessage:r.createElement("span",null,"You have no chats",r.createElement("br",null),"¯\\_(ツ)_/¯"),topicSelected:this.props.topicSelected,myUserId:this.props.myUserId,showOnline:!0,showUnread:!0,onTopicSelected:this.props.onTopicSelected,showContextMenu:this.props.showContextMenu})}}class _e extends r.Component{render(){var e=[],t=Array.isArray(this.props.topicSelected);return this.props.contacts&&this.props.contacts.length>0&&this.props.contacts.map(n=>{var i=n.topic?n.topic:n.user;if(this.props.filterFunc&&this.props.filter){var a=[i];if(n.private&&n.private.comment&&a.push((""+n.private.comment).toLowerCase()),n.public&&n.public.fn&&a.push((""+n.public.fn).toLowerCase()),!this.props.filterFunc(this.props.filter,a))return}var o=t?this.props.topicSelected.indexOf(i)>-1:this.props.topicSelected===i,s=[];this.props.showMode&&(i===this.props.myUserId&&s.push({name:"you",color:"green"}),n.acs&&n.acs.isOwner()&&s.push({name:"owner"}));var l=Array.isArray(n.private)?n.private.join(", "):n.private?n.private.comment:null;e.push(r.createElement(ye,{title:n.public?n.public.fn:null,avatar:A(n.public?n.public.photo:null),comment:l,unread:this.props.showUnread?n.unread:0,now:n.online&&this.props.connected,acs:n.acs,showMode:this.props.showMode,badges:s,showCheckmark:t,selected:o,showOnline:this.props.showOnline,onSelected:this.props.onTopicSelected,showContextMenu:this.props.showContextMenu,item:i,index:e.length,key:i}))},this),r.createElement("div",{className:this.props.noScroll?null:"scrollable-panel"},e.length>0?r.createElement("ul",{className:"contact-box"},e):r.createElement("div",{className:"center-medium-text"},this.props.emptyListMessage))}}class Se extends r.Component{constructor(e){super(e),this.state={members:e.members,index:Se.indexMembers(e.members),contactFilter:"",noContactsMessage:"You have no contacts :-(",selectedContacts:Se.selectedContacts(e.members)},this.handleContactSelected=this.handleContactSelected.bind(this),this.handleMemberRemoved=this.handleMemberRemoved.bind(this),this.handleContactFilter=this.handleContactFilter.bind(this),this.handleSubmit=this.handleSubmit.bind(this),this.handleCancel=this.handleCancel.bind(this)}static indexMembers(e){var t={};return e.map(function(e){t[e.user]={delta:0,present:!0}}),t}static selectedContacts(e){var t=[];return e.map(function(e){t.push(e.user)}),t}handleContactSelected(e,t){var n=this.state.index[e];if(n){if(n.present)return;n.delta+=1,n.present=!0}else n={delta:1,present:!0};var r=this.state.members.slice();r.push(this.props.contacts[t]);var i=Se.selectedContacts(r),a=this.state.index;a[e]=n,this.setState({members:r,index:a,selectedContacts:i})}handleMemberRemoved(e,t){var n=this.state.index[e];if(n&&n.present){n.present=!1,n.delta-=1;var r=this.state.members.slice();r.splice(t,1);var i=Se.selectedContacts(r),a=this.state.index;a[e]=n,this.setState({members:r,index:a,selectedContacts:i})}}handleContactFilter(e){var t=e?"No contacts match '"+e+"'":"You have no contacts :-(";this.setState({contactFilter:e,noContactsMessage:t})}static doContactFiltering(e,t){if(e){for(var n=0;n<t.length;n++)if(t[n].indexOf(e)>=0)return!0;return!1}return!0}handleSubmit(){var e=this,t=[],n=[],r=[];Object.keys(this.state.index).map(function(i){e.state.index[i].present&&t.push(i),e.state.index[i].delta>0?n.push(i):e.state.index[i].delta<0&&r.push(i)}),this.props.onSubmit(t,n,r)}handleCancel(){this.props.onCancel()}render(){return r.createElement("div",{id:"group-manager"},r.createElement("div",{className:"panel-form-row"},r.createElement("label",{className:"small"},"Group members")),r.createElement("div",{className:"panel-form-row"},r.createElement(ae,{chips:this.state.members,required:this.props.requiredMember,prompt:"add members",filterFunc:this.handleContactFilter,onChipRemoved:this.handleMemberRemoved})),r.createElement("div",{className:"panel-form-row"},r.createElement("label",{className:"small"},"All contacts")),r.createElement(_e,{contacts:this.props.contacts,myUserId:this.props.myUserId,topicSelected:this.state.selectedContacts,filter:this.state.contactFilter,filterFunc:Se.doContactFiltering,emptyListMessage:this.state.noContactsMessage,showOnline:!1,showUnread:!1,onTopicSelected:this.handleContactSelected}),r.createElement("div",{id:"group-manager-buttons",className:"panel-form-row"},r.createElement("button",{className:"blue",onClick:this.handleSubmit},"OK"),r.createElement("button",{className:"white",onClick:this.handleCancel},"Cancel")))}}class Te extends r.Component{constructor(e){super(e),this.state={tabSelected:"p2p",contactList:e.searchResults},this.handleTabClick=this.handleTabClick.bind(this),this.handleContactSelected=this.handleContactSelected.bind(this),this.handleNewGroupSubmit=this.handleNewGroupSubmit.bind(this),this.handleGroupByID=this.handleGroupByID.bind(this)}componentDidMount(){this.props.onInitFind()}static getDerivedStateFromProps(e,t){return{contactList:e.searchResults}}handleTabClick(e){e.preventDefault(),B(V(window.location.hash,"tab",e.currentTarget.dataset.id)),this.setState({tabSelected:e.currentTarget.dataset.id})}handleContactSelected(e){"p2p"===this.state.tabSelected&&(B(q(window.location.hash,"tab")),this.props.onCreateTopic(e,void 0))}handleNewGroupSubmit(e,t,n,r){B(q(window.location.hash,"tab")),this.props.onCreateTopic(void 0,$(e,t),n,r)}handleGroupByID(e){B(q(window.location.hash,"tab")),this.props.onCreateTopic(e)}render(){return r.createElement("div",{className:"flex-column"},r.createElement("ul",{className:"tabbar"},r.createElement("li",{className:"p2p"===this.state.tabSelected?"active":null},r.createElement("a",{href:"javascript:;","data-id":"p2p",onClick:this.handleTabClick},"find")),r.createElement("li",{className:"grp"===this.state.tabSelected?"active":null},r.createElement("a",{href:"javascript:;","data-id":"grp",onClick:this.handleTabClick},"new group")),r.createElement("li",{className:"byid"===this.state.tabSelected?"active":null},r.createElement("a",{href:"javascript:;","data-id":"byid",onClick:this.handleTabClick},"by id"))),"grp"===this.state.tabSelected?r.createElement(Ce,{onSubmit:this.handleNewGroupSubmit}):"byid"===this.state.tabSelected?r.createElement(xe,{onSubmit:this.handleGroupByID,onError:this.props.onError}):r.createElement("div",{className:"flex-column"},r.createElement(ke,{type:"p2p",onSearchContacts:this.props.onSearchContacts}),r.createElement(_e,{contacts:this.state.contactList,myUserId:this.props.myUserId,emptyListMessage:"Use search to find contacts",topicSelected:this.state.selectedContact,showOnline:!1,showUnread:!1,showContextMenu:!1,onTopicSelected:this.handleContactSelected})))}}class Ce extends r.PureComponent{constructor(e){super(e),this.state={fn:"",private:"",imageDataUrl:null,tags:[]},this.handleFnChange=this.handleFnChange.bind(this),this.handlePrivateChange=this.handlePrivateChange.bind(this),this.handleImageChanged=this.handleImageChanged.bind(this),this.handleTagsChanged=this.handleTagsChanged.bind(this),this.handleTagsChanged=this.handleTagsChanged.bind(this),this.handleSubmit=this.handleSubmit.bind(this)}handleFnChange(e){this.setState({fn:e.target.value})}handlePrivateChange(e){this.setState({private:e.target.value})}handleImageChanged(e){this.setState({imageDataUrl:e})}handleTagsChanged(e){this.setState({tags:e})}handleSubmit(e){e.preventDefault(),this.state.fn&&this.state.fn.trim()&&this.props.onSubmit(this.state.fn.trim(),this.state.imageDataUrl,this.state.private.trim(),this.state.tags)}render(){var e="blue";return this.props.disabled&&(e+=" disabled"),r.createElement("form",{className:"panel-form",onSubmit:this.handleSubmit},r.createElement("div",{className:"panel-form-row"},r.createElement("div",{className:"panel-form-column"},r.createElement("label",{className:"small",htmlFor:"new-topic-fn"},"Group name"),r.createElement("input",{type:"text",id:"new-topic-fn",placeholder:"Freeform name of the group",value:this.state.fn,onChange:this.handleFnChange,autoFocus:!0,required:!0}),r.createElement("br",null),r.createElement("label",{className:"small",htmlFor:"new-topic-priv"},"Private comment"),r.createElement("input",{type:"text",id:"new-topic-priv",placeholder:"Visible to you only",value:this.state.private,onChange:this.handlePrivateChange})),r.createElement(ue,{onError:this.props.onError,onImageChanged:this.handleImageChanged})),r.createElement(be,{tags:this.state.tags,activated:!0,onTagsChanged:this.handleTagsChanged,title:"Optional tags (search and discovery)"}),r.createElement("div",{className:"dialog-buttons"},r.createElement("button",{className:e},"Create")))}}class ke extends r.PureComponent{constructor(e){super(e),this.state={edited:!1,search:""},this.handleSearchChange=this.handleSearchChange.bind(this),this.handleSearch=this.handleSearch.bind(this),this.handleClear=this.handleClear.bind(this),this.handleKeyDown=this.handleKeyDown.bind(this)}componentWillUnmount(){this.state.edited&&(this.setState({search:"",edited:!1}),this.props.onSearchContacts(a.DEL_CHAR))}handleSearchChange(e){this.setState({search:e.target.value})}handleSearch(e){e.preventDefault();var t=this.state.search.trim();this.setState({edited:t.length>0}),this.props.onSearchContacts(t.length>0?t:a.DEL_CHAR)}handleClear(){this.state.edited&&this.props.onSearchContacts(a.DEL_CHAR),this.setState({search:"",edited:!1})}handleKeyDown(e){"Enter"===e.key?this.handleSearch(e):"Escape"===e.key&&this.handleClear()}render(){return r.createElement("div",{className:"panel-form"},r.createElement("div",{className:"panel-form-row"},r.createElement("i",{className:"material-icons search"},"search"),r.createElement("input",{className:"search",type:"text",placeholder:"List like email:alice@example.com, tel:17025550003...",value:this.state.search,onChange:this.handleSearchChange,onKeyDown:this.handleKeyDown,required:!0,autoFocus:!0}),r.createElement("a",{href:"javascript:;",onClick:this.handleClear},r.createElement("i",{className:"material-icons"},"close"))))}}class xe extends r.PureComponent{constructor(e){super(e),this.state={groupId:""},this.handleChange=this.handleChange.bind(this),this.handleKeyPress=this.handleKeyPress.bind(this),this.handleSubmit=this.handleSubmit.bind(this)}handleChange(e){this.setState({groupId:e.target.value})}handleKeyPress(e){"Enter"===e.key&&this.handleSubmit(e)}handleSubmit(e){if(e.preventDefault(),this.state.groupId){var t=this.state.groupId.trim();t.length>3&&("usr"==t.substr(0,3)||"grp"==t.substr(0,3))?this.props.onSubmit(t):this.props.onError("Invalid ID","err")}}render(){return r.createElement("div",{className:"panel-form"},r.createElement("div",{className:"panel-form-row"},r.createElement("input",{type:"text",placeholder:"Group or User ID",value:this.state.groupId,onChange:this.handleChange,onKeyPress:this.handleKeyPress,required:!0})),r.createElement("div",{className:"dialog-buttons"},r.createElement("button",{className:"blue",onClick:this.handleSubmit},"Subscribe")))}}class Pe extends r.PureComponent{constructor(e){super(e),this.state={code:e.credCode},this.handleChange=this.handleChange.bind(this),this.handleKeyPress=this.handleKeyPress.bind(this),this.handleSubmit=this.handleSubmit.bind(this)}static getDerivedStateFromProps(e,t){return{code:e.credCode}}handleChange(e){this.setState({code:e.target.value})}handleKeyPress(e){"Enter"===e.key&&this.handleSubmit(e)}handleSubmit(e){e.preventDefault(),this.state.code&&this.state.code.trim()&&this.props.onSubmit(this.props.credMethod,this.state.code.trim())}render(){var e={email:"email",tel:"phone"}[this.props.credMethod]||this.props.credMethod;return r.createElement("div",{className:"panel-form"},r.createElement("div",{className:"panel-form-row"},r.createElement("label",{className:"small",htmlFor:"enter-confirmation-code"},"Enter confirmation code sent to you by ",e,":")),r.createElement("div",{className:"panel-form-row"},r.createElement("input",{type:"text",id:"enter-confirmation-code",placeholder:"Numbers only",value:this.state.code,onChange:this.handleChange,onKeyPress:this.handleKeyPress,required:!0})),r.createElement("div",{className:"dialog-buttons"},r.createElement("button",{className:"blue",onClick:this.handleSubmit},"Confirm")))}}class Ne extends r.Component{constructor(e){super(e),this.state={topic:null,owner:!1,admin:!1,sharer:!1,muted:!1,address:null,groupTopic:void 0,fullName:void 0,avatar:null,private:null,selectedContact:null,access:null,modeGiven:null,modeWant:null,modeGiven2:null,modeWant2:null,auth:null,anon:null,contactList:[],tags:[],showMemberPanel:!1,showPermissionEditorFor:void 0,moreInfoExpanded:!1,previousMetaDesc:void 0,previousSubsUpdated:void 0,previousTagsUpdated:void 0},this.resetSubs=this.resetSubs.bind(this),this.resetDesc=this.resetDesc.bind(this),this.onMetaDesc=this.onMetaDesc.bind(this),this.onSubsUpdated=this.onSubsUpdated.bind(this),this.onTagsUpdated=this.onTagsUpdated.bind(this),this.handleFullNameUpdate=this.handleFullNameUpdate.bind(this),this.handlePrivateUpdate=this.handlePrivateUpdate.bind(this),this.handleImageChanged=this.handleImageChanged.bind(this),this.handleMuted=this.handleMuted.bind(this),this.handlePermissionsChanged=this.handlePermissionsChanged.bind(this),this.handleLaunchPermissionsEditor=this.handleLaunchPermissionsEditor.bind(this),this.handleHidePermissionsEditor=this.handleHidePermissionsEditor.bind(this),this.handleShowAddMembers=this.handleShowAddMembers.bind(this),this.handleHideAddMembers=this.handleHideAddMembers.bind(this),this.handleMemberUpdateRequest=this.handleMemberUpdateRequest.bind(this),this.handleLeave=this.handleLeave.bind(this),this.handleMemberSelected=this.handleMemberSelected.bind(this),this.handleMoreInfo=this.handleMoreInfo.bind(this),this.handleTagsUpdated=this.handleTagsUpdated.bind(this),this.handleContextMenu=this.handleContextMenu.bind(this)}UNSAFE_componentWillReceiveProps(e){var t=this.props.tinode.getTopic(e.topic);t&&(this.onMetaDesc!=t.onMetaDesc&&(this.previousMetaDesc=t.onMetaDesc,t.onMetaDesc=this.onMetaDesc,this.previousSubsUpdated=t.onSubsUpdated,t.onSubsUpdated=this.onSubsUpdated,"grp"==t.getType()?(this.previousTagsUpdated=t.onTagsUpdated,t.onTagsUpdated=this.onTagsUpdated):this.previousTagsUpdated=void 0),this.state.topic!=e.topic&&(this.setState({topic:e.topic}),this.resetDesc(t,e),this.resetSubs(t,e)))}componentWillUnmount(){var e=this.props.tinode.getTopic(this.props.topic);e&&(this.setState({topic:null}),e.onMetaDesc=this.previousMetaDesc,e.onSubsUpdated=this.previousSubsUpdated,e.onTagsUpdated=this.previousTagsUpdated)}resetSubs(e,t){var n={contactList:[]};if("p2p"==e.getType()){var r=e.subscriber(t.topic);r&&(n.modeGiven2=r.acs.getGiven(),n.modeWant2=r.acs.getWant())}else e.subscribers(function(e){n.contactList.push(e)},this);this.setState(n)}resetDesc(e,t){var n=e.getDefaultAccess()||{},r=e.getAccessMode();this.setState({owner:r&&r.isOwner(),admin:r&&r.isAdmin(),sharer:r&&(r.isAdmin()||r.isSharer()),muted:r&&r.isMuted(),fullName:e.public?e.public.fn:void 0,avatar:A(e.public?e.public.photo:null),private:e.private?e.private.comment:null,address:e.name,groupTopic:"grp"==e.getType(),showMemberPanel:!1,access:r?r.getMode():void 0,modeGiven:r?r.getGiven():void 0,modeWant:r?r.getWant():void 0,auth:n.auth,anon:n.anon}),"grp"===e.getType()&&r&&r.isOwner()&&e.getMeta(e.startMetaQuery().withTags().build())}onMetaDesc(e){var t=this.props.tinode.getTopic(this.props.topic);t&&(this.resetDesc(t,this.props),this.previousMetaDesc&&this.previousMetaDesc!=this.onMetaDesc&&this.previousMetaDesc(e))}onSubsUpdated(){var e=this.props.tinode.getTopic(this.props.topic);e&&(this.resetSubs(e,this.props),this.previousSubsUpdated&&this.previousSubsUpdated!=this.onSubsUpdated&&this.previousSubsUpdated())}onTagsUpdated(e){this.setState({tags:e}),this.previousTagsUpdated&&this.previousTagsUpdated!=this.onTagsUpdated&&this.previousTagsUpdated()}handleFullNameUpdate(e){this.state.fullName!==e&&(this.setState({fullName:e}),this.props.onTopicDescUpdate(this.props.topic,$(e,this.state.avatar),null))}handlePrivateUpdate(e){this.state.priv!==e&&(this.setState({private:e}),this.props.onTopicDescUpdate(this.props.topic,null,e))}handleImageChanged(e){this.setState({avatar:e}),this.props.onTopicDescUpdate(this.props.topic,$(this.state.fullName,e),null)}handleMuted(e,t){this.setState({muted:t}),this.props.onChangePermissions(this.props.topic,t?"-P":"+P")}handlePermissionsChanged(e){switch(this.state.showPermissionEditorFor){case"auth":this.props.onTopicDescUpdate(this.props.topic,null,null,{auth:e});break;case"anon":this.props.onTopicDescUpdate(this.props.topic,null,null,{anon:e});break;case"mode":case"want":this.props.onChangePermissions(this.props.topic,e);break;case"given":this.props.onChangePermissions(this.props.topic,e,this.props.topic);break;case"user":this.props.onChangePermissions(this.props.topic,e,this.state.userPermissionsEdited)}this.setState({showPermissionEditorFor:void 0})}handleLaunchPermissionsEditor(e,t){var n,r,i,a,o,s,l;switch(e){case"mode":n=this.state.access;break;case"want":n=this.state.modeWant,r=this.state.modeGiven,i=this.state.groupTopic?"O":"ASDO",a="Requested",o="Granted";break;case"given":n=this.state.modeGiven2,r=this.state.modeWant2,i=this.state.groupTopic?this.state.owner?"":"O":"ASDO",a="Granted",o="Requested";break;case"auth":n=this.state.auth,i="O";break;case"anon":n=this.state.anon,i="O";break;case"user":var c=this.props.tinode.getTopic(this.props.topic);if(!c)return;var u=c.subscriber(t);if(!u||!u.acs)return;n=u.acs.getGiven(),r=u.acs.getWant(),i=this.state.owner?"":"O",a="Granted",o="Requested",u.public&&(s=u.public.fn,l=u.public.photo);break;default:console.log("Unknown permission editing mode '"+e+"'")}this.setState({showPermissionEditorFor:e,userPermissionsEdited:t,userPermissionsTitle:s,userPermissionsAvatar:l,editedPermissions:n,immutablePermissions:r,editedPermissionsTitle:a,immutablePermissionsTitle:o,editedPermissionsSkipped:i})}handleHidePermissionsEditor(){this.setState({showPermissionEditorFor:void 0})}handleShowAddMembers(){this.props.onInitFind(),this.setState({showMemberPanel:!0})}handleHideAddMembers(){this.setState({showMemberPanel:!1})}handleMemberUpdateRequest(e,t,n){this.props.onMemberUpdateRequest(this.props.topic,t,n),this.setState({showMemberPanel:!1})}handleLeave(){this.props.onLeaveTopic(this.props.topic)}handleMemberSelected(e){this.setState({selectedContact:e})}handleMoreInfo(e){this.setState({moreInfoExpanded:e})}handleTagsUpdated(e){Y(this.state.tags.slice(0),e.slice(0))||this.props.onTopicTagsUpdate(this.props.topic,e)}handleContextMenu(e){var t=this,n=this.props.tinode.getTopic(this.props.topic);if(n){var r=n.subscriber(e.topicName);if(r&&r.acs){var i=[{title:"Edit permissions",handler:function(){t.handleLaunchPermissionsEditor("user",e.topicName)}},"member_delete",r.acs.isMuted()?"member_unmute":"member_mute",r.acs.isJoiner()?"member_block":"member_unblock"];this.props.showContextMenu({topicName:this.props.topic,x:e.x,y:e.y,user:e.topicName},i)}}}render(){return r.createElement("div",{id:"info-view"},r.createElement("div",{className:"caption-panel",id:"info-caption-panel"},r.createElement("div",{className:"panel-title",id:"info-title"},"Info"),r.createElement("div",null,r.createElement(X,{onCancel:this.props.onCancel}))),this.props.displayMobile?r.createElement(ge,{level:this.props.errorLevel,text:this.props.errorText,onClearError:this.props.onError}):null,this.state.showMemberPanel?r.createElement(Se,{members:this.state.contactList,requiredMember:this.props.myUserId,myUserId:this.props.myUserId,contacts:this.props.searchableContacts,onCancel:this.handleHideAddMembers,onSubmit:this.handleMemberUpdateRequest}):this.state.showPermissionEditorFor?r.createElement(ie,{mode:this.state.editedPermissions,compare:this.state.immutablePermissions,skip:this.state.editedPermissionsSkipped,modeTitle:this.state.editedPermissionsTitle,compareTitle:this.state.immutablePermissionsTitle,userTitle:this.state.userPermissionsTitle,item:this.state.userPermissionsEdited,userAvatar:this.state.userPermissionsAvatar,skip:this.state.editedPermissionsSkipped,onSubmit:this.handlePermissionsChanged,onCancel:this.handleHidePermissionsEditor}):r.createElement("div",{id:"info-view-content",className:"scrollable-panel"},r.createElement("div",{className:"panel-form-row"},r.createElement("div",{className:"panel-form-column"},r.createElement("div",null,r.createElement("label",{className:"small"},"Name")),r.createElement("div",null,r.createElement(te,{placeholder:"Group name",readOnly:!this.state.owner,text:this.state.fullName,onFinished:this.handleFullNameUpdate})),r.createElement("div",null,r.createElement("label",{className:"small"},"Private comment")),r.createElement("div",null,r.createElement(te,{placeholder:"Visible to you only",text:this.state.private,onFinished:this.handlePrivateUpdate}))),r.createElement(ue,{avatar:this.state.avatar,readOnly:!this.state.owner,uid:this.props.topic,title:this.state.fullName,onImageChanged:this.handleImageChanged,onError:this.props.onError})),r.createElement("div",{className:"hr"}),r.createElement("div",{className:"panel-form-column"},r.createElement("div",{className:"panel-form-row"},r.createElement("label",null,"Muted:"),r.createElement(re,{name:"P",checked:this.state.muted,onChange:this.handleMuted})),r.createElement(Z,{title:"More",open:this.state.moreInfoExpanded,onToggle:this.handleMoreInfo}),this.state.moreInfoExpanded?r.createElement("div",{className:"panel-form-column"},r.createElement("div",{className:"panel-form-row"},r.createElement("label",null,"Address:"),r.createElement("tt",null,this.state.address)),this.state.groupTopic?r.createElement("div",{className:"panel-form-row"},r.createElement("label",null,"Your permissions:"),r.createElement("tt",{className:"clickable",onClick:this.handleLaunchPermissionsEditor.bind(this,"want")},this.state.access)):r.createElement("div",null,r.createElement("div",null,r.createElement("label",{className:"small"},"Permissions:")),r.createElement("div",{className:"quoted"},r.createElement("div",null,"Yours:  ",r.createElement("tt",{className:"clickable",onClick:this.handleLaunchPermissionsEditor.bind(this,"want")},this.state.access)),r.createElement("div",null,this.state.fullName,"′s:  ",r.createElement("tt",{className:"clickable",onClick:this.handleLaunchPermissionsEditor.bind(this,"given")},this.state.modeGiven2)))),this.state.sharer&&(this.state.auth||this.state.anon)?r.createElement("div",null,r.createElement("div",null,r.createElement("label",{className:"small"},"Default access mode:")),r.createElement("div",{className:"quoted"},r.createElement("div",null,"Auth: ",this.state.admin?r.createElement("tt",{className:"clickable",onClick:this.handleLaunchPermissionsEditor.bind(this,"auth")},this.state.auth):r.createElement("tt",null,this.state.auth)),r.createElement("div",null,"Anon: ",this.state.admin?r.createElement("tt",{className:"clickable",onClick:this.handleLaunchPermissionsEditor.bind(this,"anon")},this.state.anon):r.createElement("tt",null,this.state.anon)))):null):null),r.createElement("div",{className:"hr"}),this.state.owner?r.createElement(be,{title:"Tags",tags:this.state.tags,activated:!1,onSubmit:this.handleTagsUpdated}):null,this.state.owner?r.createElement("div",{className:"hr"}):null,this.state.groupTopic?r.createElement("div",{className:"panel-form-column"},r.createElement("div",{className:"panel-form-row"},r.createElement("label",{className:"small"},"Group members:")),r.createElement("div",{className:"panel-form-row"},this.state.sharer?r.createElement("a",{href:"javascript:;",className:"flat-button",onClick:this.handleShowAddMembers},r.createElement("i",{className:"material-icons"},"person_add")," Add members"):null,this.state.owner?null:r.createElement("a",{href:"javascript:;",className:"red flat-button",onClick:this.handleLeave},r.createElement("i",{className:"material-icons"},"exit_to_app")," Leave")),r.createElement(_e,{contacts:this.state.contactList,myUserId:this.props.myUserId,emptyListMessage:"No members",topicSelected:this.state.selectedContact,showOnline:!1,showUnread:!1,showMode:!0,noScroll:!0,onTopicSelected:this.handleMemberSelected,showContextMenu:!!this.state.admin&&this.handleContextMenu})):r.createElement("div",{className:"panel-form-row"},r.createElement("a",{href:"javascript:;",className:"red flat-button",onClick:this.handleLeave},r.createElement("i",{className:"material-icons"},"exit_to_app")," Leave"))))}}class Me extends r.Component{constructor(e){super(e),this.state={progress:0},e.uploader&&(e.uploader.onProgress=this.handleProgress.bind(this)),this.handlePreviewImage=this.handlePreviewImage.bind(this),this.handleContextClick=this.handleContextClick.bind(this),this.handleCancelUpload=this.handleCancelUpload.bind(this)}handlePreviewImage(e){e.preventDefault(),this.props.onImagePreview({url:e.target.src,filename:e.target.title,width:e.target.dataset.width,height:e.target.dataset.height,size:e.target.dataset.size,type:e.target.dataset.mime})}handleContextClick(e){e.preventDefault(),e.stopPropagation(),this.props.showContextMenu({seq:this.props.seq,y:e.pageY,x:e.pageX})}handleProgress(e){this.setState({progress:e})}handleCancelUpload(){this.props.uploader.cancel()}render(){var e=0,t=this.props.sequence+" "+(this.props.response?"left":"right"),n="single"==this.props.sequence||"last"==this.props.sequence?"bubble tip":"bubble",i=this.props.userAvatar||!0,a=this.props.userFrom&&this.props.response&&("single"==this.props.sequence||"last"==this.props.sequence),s=this.props.content,l=[];return this.props.mimeType==o.getContentType()?(o.attachments(s,function(e,t){l.push(r.createElement(Oe,{tinode:this.props.tinode,downloadUrl:o.getDownloadUrl(e),filename:e.name,uploader:o.isUploading(e),mimetype:e.mime,size:o.getEntitySize(e),progress:this.state.progress,onCancelUpload:this.handleCancelUpload,onError:this.props.onError,key:t}))},this),s=r.createElement("span",null,o.format(s,function(t,n,i){e+=1;var a=o.tagName(t);if(a){var s=o.attrValue(t,n)||{};if(s.key=e,"IM"==t){var l=O(n.width,n.height,Math.min(this.props.viewportWidth-4*_,36*_),24*_,!1);s.className="inline-image",s.style=l?{width:l.dstWidth+"px",height:l.dstHeight+"px"}:null,s.onClick=this.handlePreviewImage}return r.createElement(a,s,i)}return i},this))):"string"!=typeof s&&(s=r.createElement("span",null,r.createElement("i",{className:"material-icons"},"error_outline")," ",r.createElement("i",null,"invalid content"))),r.createElement("li",{className:t},this.props.userFrom&&this.props.response?r.createElement("div",{className:"avatar-box"},a?r.createElement(ee,{topic:this.props.userFrom,title:this.props.userName,avatar:i}):null):null,r.createElement("div",null,r.createElement("div",{className:n},r.createElement("div",{className:"message-content"},s,l,r.createElement(De,{timestamp:this.props.timestamp,received:this.props.received})),r.createElement("span",{className:"menuTrigger"},r.createElement("a",{href:"javascript:;",onClick:this.handleContextClick},r.createElement("i",{className:"material-icons"},"expand_more")))),a?r.createElement("div",{className:"author"},this.props.userName):null))}}class De extends r.PureComponent{render(){var e=this.props.received<=a.MESSAGE_STATUS_SENDING?"sending ...":M(this.props.timestamp),t=null;return this.props.received<=a.MESSAGE_STATUS_SENDING?t=r.createElement("i",{className:"material-icons small"},"access_time"):this.props.received==a.MESSAGE_STATUS_SENT?t=r.createElement("i",{className:"material-icons small"},"done"):this.props.received==a.MESSAGE_STATUS_RECEIVED?t=r.createElement("i",{className:"material-icons small"},"done_all"):this.props.received==a.MESSAGE_STATUS_READ&&(t=r.createElement("i",{className:"material-icons small blue"},"done_all")),r.createElement("span",{className:"timestamp"},e," ",t)}}class Ae extends r.PureComponent{render(){return r.createElement("div",{className:"uploader"},r.createElement("div",null,r.createElement("span",{style:{width:100*this.props.progress+"%"}})),this.props.progress<.999?r.createElement("a",{href:"javascript:;",onClick:this.props.onCancel},r.createElement("i",{className:"material-icons"},"close")," cancel"):r.createElement("span",null,"finishing..."))}}class Oe extends r.Component{constructor(e){super(e),this.state={downloader:null,progress:0},this.downloadFile=this.downloadFile.bind(this),this.handleCancel=this.handleCancel.bind(this)}downloadFile(e,t,n){var r=this.props.tinode.getLargeFileHelper();this.setState({downloader:r}),r.download(e,t,n,e=>{this.setState({progress:e/this.props.size})}).then(()=>{this.setState({downloader:null,progress:0})}).catch(e=>{e&&this.props.onError("Error downloading file: "+e.message,"err"),this.setState({downloader:null,progress:0})})}handleCancel(){this.props.uploader?this.props.onCancelUpload():this.state.downloader&&this.state.downloader.cancel()}render(){let e=this.props.filename||"file_attachment";e.length>36&&(e=e.substr(0,16)+"..."+e.substr(-16));let t,n,i=this.props.size>0?r.createElement("span",{className:"small gray"},"(",D(this.props.size),")"):null;return this.props.uploader||this.state.downloader||/^(?:(?:[a-z]+:)?\/\/)/i.test(this.props.downloadUrl)?(t=this.props.downloadUrl,n=null):(t="javascript:;",n=(e=>{this.downloadFile(this.props.downloadUrl,this.props.filename,this.props.mimetype)})),r.createElement("div",{className:"attachment"},r.createElement("div",null,r.createElement("i",{className:"material-icons big gray"},"insert_drive_file")),r.createElement("div",{className:"flex-column"},r.createElement("div",null,e," ",i),this.props.uploader||this.state.downloader?r.createElement(Ae,{progress:this.props.uploader?this.props.progress:this.state.progress,onCancel:this.handleCancel}):r.createElement("div",null,r.createElement("a",{href:t,download:this.props.filename,onClick:n},r.createElement("i",{className:"material-icons"},"file_download")," save"))))}}const Ie="Not found";class Re extends r.Component{constructor(e){super(e),this.state={messages:[],onlineSubs:[],topic:"",title:"",avatar:null,scrollPosition:0,readOnly:!e.acs||!e.acs.isWriter(),writeOnly:!e.acs||!e.acs.isReader(),typingIndicator:!1,imagePreview:null},this.propsChange=this.propsChange.bind(this),this.leave=this.leave.bind(this),this.handleScrollReference=this.handleScrollReference.bind(this),this.fetchMoreMessages=this.fetchMoreMessages.bind(this),this.handleDescChange=this.handleDescChange.bind(this),this.handleSubsUpdated=this.handleSubsUpdated.bind(this),this.handleNewMessage=this.handleNewMessage.bind(this),this.handleAllMessagesReceived=this.handleAllMessagesReceived.bind(this),this.handleInfoReceipt=this.handleInfoReceipt.bind(this),this.handleImagePreview=this.handleImagePreview.bind(this),this.handleCloseImagePreview=this.handleCloseImagePreview.bind(this),this.handleContextClick=this.handleContextClick.bind(this),this.handleShowContextMenuMessage=this.handleShowContextMenuMessage.bind(this),this.handleBackNavigation=this.handleBackNavigation.bind(this)}componentDidUpdate(e,t){!this.messagesScroller||t.title==this.state.title&&t.messages.length==this.state.messages.length||(this.messagesScroller.scrollTop=this.messagesScroller.scrollHeight-this.state.scrollPosition)}componentDidMount(){this.propsChange(this.props),this.messagesScroller&&this.messagesScroller.addEventListener("scroll",this.fetchMoreMessages)}componentWillUnmount(){this.leave(),this.messagesScroller&&this.messagesScroller.removeEventListener("scroll",this.fetchMoreMessages)}UNSAFE_componentWillReceiveProps(e){this.propsChange(e)}propsChange(e){if(!e||!e.topic)return this.setState({messages:[],onlineSubs:[],topic:null}),void this.leave();if(!e.connected)return void this.setState({onlineSubs:[]});let t=this.props.tinode.getTopic(e.topic);if(!t)return;let n=a.isNewGroupTopicName(e.topic),r=!this.props.connected&&e.connected;if(e.topic!=this.state.topic){let n=[],i=[];t.onData=this.handleNewMessage,t.onAllMessagesReceived=this.handleAllMessagesReceived,t.onInfo=this.handleInfoReceipt,t.onMetaDesc=this.handleDescChange,t.onSubsUpdated=this.handleSubsUpdated,t.onPres=this.handleSubsUpdated,this.leave(),this.handleDescChange(t),t.subscribers(e=>{e.online&&e.user!=this.props.myUserId&&i.push(e)}),t.messages(function(e){e.deleted||(n=n.concat(e))}),this.setState({messages:n,onlineSubs:i,topic:e.topic,imagePreview:null,scrollPosition:0}),r=!0,this.props.readTimerHandler(null)}if(this.setState({readOnly:!e.acs||!e.acs.isWriter(),writeOnly:!e.acs||!e.acs.isReader()}),!t.isSubscribed()&&r){let r=t.startMetaQuery().withLaterDesc().withLaterSub().withLaterData(T).withLaterDel(),i=n?e.newGroupTopicParams:void 0;this.setState({fetchingMessages:!0}),t.subscribe(r.build(),i).then(t=>{this.setState({topic:t.topic}),this.props.onNewTopicCreated(e.topic,t.topic)}).catch(e=>{this.props.onError(e.message,"err"),this.setState({title:Ie,avatar:null,readOnly:!0,writeOnly:!0,fetchingMessages:!1})})}}leave(){if(!this.state.topic)return;let e=this.props.tinode.getTopic(this.state.topic);e&&e.isSubscribed()&&e.leave(!1).finally(()=>{this.setState({fetchingMessages:!1}),e.onData=void 0,e.onAllMessagesReceived=void 0,e.onInfo=void 0,e.onMetaDesc=void 0,e.onSubsUpdated=void 0,e.onPres=void 0})}handleScrollReference(e){e&&(e.addEventListener("scroll",this.fetchMoreMessages),this.messagesScroller=e)}fetchMoreMessages(e){if(e.target.scrollTop<=0){let t={scrollPosition:e.target.scrollHeight-e.target.scrollTop};this.setState((e,n)=>{if(!e.fetchingMessages){var r=this.props.tinode.getTopic(this.state.topic);r&&r.isSubscribed()&&r.msgHasMoreMessages()&&(t.fetchingMessages=!0,r.getMessagesPage(T).catch(e=>{this.setState({fetchingMessages:!1}),this.props.onError(e.message,"err")}))}return t})}}handleDescChange(e){e.public?this.setState({title:e.public.fn,avatar:A(e.public.photo)}):this.setState({title:Ie,avatar:null}),e.acs&&this.setState({readOnly:!e.acs.isWriter(),writeOnly:!e.acs.isReader()})}handleSubsUpdated(){if(this.state.topic){var e=[];this.props.tinode.getTopic(this.state.topic).subscribers(t=>{t.online&&t.user!=this.props.myUserId&&e.push(t)}),this.setState({onlineSubs:e})}}handleNewMessage(e){var t=this.props.tinode.getTopic(this.state.topic),n={messages:[]};if(t.messages(function(e){e.deleted||(n.messages=n.messages.concat(e))}),e&&!e.deleted){t.isNewMessage(e.seq)&&(n.scrollPosition=0),t.msgStatus(e)>=a.MESSAGE_STATUS_SENT&&this.props.readTimerHandler(()=>{t.noteRead(e.seq)}),this.props.onData(e)}this.setState(n)}handleAllMessagesReceived(e){this.setState({fetchingMessages:!1})}handleInfoReceipt(e){switch(e.what){case"kp":clearTimeout(this.keyPressTimer);var t=this;this.keyPressTimer=setTimeout(function(){t.setState({typingIndicator:!1})},v+1e3),this.state.typingIndicator||this.setState({typingIndicator:!0});break;case"read":case"recv":this.forceUpdate();break;default:console.log("Other change in topic: ",e.what)}}handleImagePreview(e){this.setState({imagePreview:e})}handleCloseImagePreview(){this.setState({imagePreview:null})}handleContextClick(e){e.preventDefault(),e.stopPropagation(),this.props.showContextMenu({topicName:this.state.topic,y:e.pageY,x:e.pageX})}handleShowContextMenuMessage(e){e.topicName=this.state.topic;var t=["message_delete"],n=this.props.tinode.getTopic(e.topicName);if(n){var r=n.getAccessMode();r&&r.isDeleter()&&t.push("message_delete_hard")}this.props.showContextMenu(e,t)}handleBackNavigation(){this.props.onHideMessagesView()}render(){var e=null;if(this.state.topic){for(var t=[],n=this.props.tinode.getTopic(this.state.topic),i="grp"==n.getType(),o=null,s=0;s<this.state.messages.length;s++){var l=this.state.messages[s],c=null;s+1<this.state.messages.length&&(c=this.state.messages[s+1].from);var u="single";l.from==o?u=l.from==c?"middle":"last":l.from==c&&(u="first"),o=l.from;var d,p,h,f,m=!(l.from==this.props.myUserId),g=n.msgStatus(l);if(i){var v=n.userDesc(l.from);v&&v.public&&(d=v.public.fn,p=A(v.public.photo)),h=l.from,f="chat-box group"}else f="chat-box";t.push(r.createElement(Me,{tinode:this.props.tinode,content:l.content,mimeType:l.head?l.head.mime:null,timestamp:l.ts,response:m,seq:l.seq,userFrom:h,userName:d,userAvatar:p,sequence:u,received:g,uploader:l._uploader,viewportWidth:this.props.viewportWidth,showContextMenu:this.handleShowContextMenuMessage,onImagePreview:this.handleImagePreview,onError:this.props.onError,key:l.seq}))}let w=null,E=this.props.tinode.getMeTopic().getContact(this.state.topic);E&&"p2p"==a.topicType(E.topic)&&(E.online?w="online now":E.seen&&(w="Last active: "+M(E.seen.when)));var b=this.state.avatar||!0,y=this.props.online?"online"+(this.state.typingIndicator?" typing":""):"offline";e=r.createElement("div",{id:"topic-view",className:this.props.hideSelf?"nodisplay":null},r.createElement("div",{id:"topic-caption-panel",className:"caption-panel"},this.props.displayMobile?r.createElement("a",{href:"javascript:;",id:"hide-message-view",onClick:this.handleBackNavigation},r.createElement("i",{className:"material-icons"},"arrow_back")):null,r.createElement("div",{className:"avatar-box"},r.createElement(ee,{avatar:b,topic:this.state.topic,title:this.state.title}),r.createElement("span",{className:y})),r.createElement("div",{id:"topic-title-group"},r.createElement("div",{id:"topic-title",className:"panel-title"},this.state.title),r.createElement("div",{id:"topic-last-seen"},w)),i?r.createElement(se,{subscribers:this.state.onlineSubs}):r.createElement("div",{id:"topic-users"}),r.createElement("div",null,r.createElement("a",{href:"javascript:;",onClick:this.handleContextClick},r.createElement("i",{className:"material-icons"},"more_vert")))),this.props.displayMobile?r.createElement(ge,{level:this.props.errorLevel,text:this.props.errorText,onClearError:this.props.onError}):null,r.createElement(J,{show:this.state.fetchingMessages}),r.createElement("div",{id:"messages-container"},r.createElement("div",{id:"messages-panel",ref:this.handleScrollReference},r.createElement("ul",{id:"scroller",className:f},t)),this.state.writeOnly?r.createElement("div",{id:"write-only-background"},r.createElement("div",{id:"write-only-note"},"no access to messages")):null),r.createElement(Ue,{tinode:this.props.tinode,topic:this.props.topic,disabled:this.state.readOnly,sendMessage:this.props.sendMessage,onError:this.props.onError}),this.state.imagePreview?r.createElement(Le,{content:this.state.imagePreview,onClose:this.handleCloseImagePreview}):null)}else e=r.createElement(Fe,{hideSelf:this.props.hideSelf,serverVersion:this.props.serverVersion,serverAddress:this.props.serverAddress});return e}}class Ue extends r.PureComponent{constructor(e){super(e),this.state={message:"",keypressTimestamp:(new Date).getTime()-v-1},this.handlePasteEvent=this.handlePasteEvent.bind(this),this.handleAttachImage=this.handleAttachImage.bind(this),this.handleAttachFile=this.handleAttachFile.bind(this),this.handleSend=this.handleSend.bind(this),this.handleKeyPress=this.handleKeyPress.bind(this),this.handleMessageTyping=this.handleMessageTyping.bind(this)}componentDidMount(){this.pasteFile.addEventListener("paste",this.handlePasteEvent,!1)}componentWillUnmount(){this.pasteFile.removeEventListener("paste",this.handlePasteEvent,!1)}handlePasteEvent(e){this.props.disabled||function(e,t,n,r){var i=(e.clipboardData||e.originalEvent.clipboardData||{}).items;for(var a in i){var o=i[a];if("file"===o.kind){var s=o.getAsFile();if(!s){console.log("Failed to get file object from pasted file item",o.kind,o.type);continue}return s.type&&"image"==s.type.split("/")[0]?s.size>C||P.indexOf(s.type)<0?F(s,x,x,!1,t,r):L(s,t,r):j(s,n),!0}}return!1}(e,(e,t,n,r,i)=>{this.props.sendMessage(o.insertImage(null,0,t,e,n,r,i))},(e,t,n)=>{this.props.sendMessage(o.attachFile(null,e,t,n))},this.props.onError)&&e.preventDefault()}handleAttachImage(e){if(e.target.files&&e.target.files.length>0){let t=e.target.files[0];t.size>C||P.indexOf(t.type)<0?F(t,x,x,!1,(e,t,n,r,i)=>{this.props.sendMessage(o.insertImage(null,0,t,e,n,r,i))},e=>{this.props.onError(e,"err")}):L(t,(e,t,n,r,i)=>{this.props.sendMessage(o.insertImage(null,0,t,e,n,r,i))},e=>{this.props.onError(e,"err")})}e.target.value=""}handleAttachFile(e){if(e.target.files&&e.target.files.length>0){var t=e.target.files[0];if(t.size>k)this.props.onError("The file size "+D(t.size)+" exceeds the "+D(k)+" limit.","err");else if(t.size>C){let e=this.props.tinode.getLargeFileHelper();if(!e)return void this.props.onError("Cannot initiate file upload.");let n=e.upload(t),r=o.attachFile(null,t.type,null,t.name,t.size,n);this.props.sendMessage(r,n,e)}else j(t,(e,t,n)=>{this.props.sendMessage(o.attachFile(null,e,t,n))},this.props.onError)}e.target.value=""}handleSend(){this.state.message.trim()&&(this.props.sendMessage(this.state.message.trim()),this.setState({message:""}))}handleKeyPress(e){"Enter"===e.key&&(e.shiftKey||(e.preventDefault(),e.stopPropagation(),this.handleSend()))}handleMessageTyping(e){var t={message:e.target.value},n=(new Date).getTime();if(n-this.state.keypressTimestamp>v){var r=this.props.tinode.getTopic(this.props.topic);r.isSubscribed()&&r.noteKeyPress(),t.keypressTimestamp=n}this.setState(t)}render(){var e=this.props.disabled?"Messaging disabled":"New message",t=this;return r.createElement("div",{id:"send-message-panel"},this.props.disabled?r.createElement("i",{className:"material-icons disabled"},"photo"):r.createElement("a",{href:"javascript:;",onClick:function(e){t.attachImage.click()},title:"Add image"},r.createElement("i",{className:"material-icons secondary"},"photo")),this.props.disabled?r.createElement("i",{className:"material-icons disabled"},"attach_file"):r.createElement("a",{href:"javascript:;",onClick:function(e){t.attachFile.click()},title:"Attach file"},r.createElement("i",{className:"material-icons secondary"},"attach_file")),r.createElement("textarea",{id:"sendMessage",placeholder:e,disabled:this.props.disabled,value:this.state.message,onChange:this.handleMessageTyping,onKeyPress:this.handleKeyPress,ref:function(e){t.pasteFile=e},autoFocus:!0}),this.props.disabled?r.createElement("i",{className:"material-icons disabled"},"send"):r.createElement("a",{href:"javascript:;",onClick:this.handleSend,title:"Send"},r.createElement("i",{className:"material-icons"},"send")),r.createElement("input",{type:"file",ref:function(e){t.attachFile=e},onChange:this.handleAttachFile,style:{display:"none"}}),r.createElement("input",{type:"file",ref:function(e){t.attachImage=e},accept:"image/*",onChange:this.handleAttachImage,style:{display:"none"}}))}}class Fe extends r.PureComponent{render(){var e=c+" ("+a.getLibrary()+")";return r.createElement("div",{id:"dummy-view",className:this.props.hideSelf?"nodisplay":null},r.createElement("div",null,r.createElement("a",{href:"https://github.com/tinode/chat/"},r.createElement("img",{id:"logo",alt:"logo",src:"img/logo.svg"}),r.createElement("h2",null,"Tinode Web")),r.createElement("p",null,"Client: ",e),r.createElement("p",null,"Server: ",this.props.serverVersion," (",this.props.serverAddress,")")))}}class Le extends r.PureComponent{constructor(e){super(e),this.state={}}componentDidMount(){this.setState({width:this.container.clientWidth,height:this.container.clientHeight})}render(){if(!this.props.content)return null;var e=this,t=O(this.props.content.width,this.props.content.height,this.state.width,this.state.height,!1),n=t?{width:t.dstWidth+"px",height:t.dstHeight+"px"}:this.props.content.width>this.props.content.height?{width:"100%"}:{height:"100%"};n.maxWidth="100%",n.maxHeight="100%";var i=this.props.content.filename,a=this.props.content.width/_|0;return i.length>a&&(i=i.slice(0,a-2)+"..."+i.slice(2-a)),r.createElement("div",{id:"image-preview",onClick:this.props.onClose},r.createElement("div",{id:"image-preview-caption-panel"},r.createElement("a",{href:"javascript:;",download:this.props.content.filename},r.createElement("i",{className:"material-icons"},"file_download")," download"),r.createElement("a",{href:"javascript:;",onClick:this.props.onClose},r.createElement("i",{className:"material-icons gray"},"close"))),r.createElement("div",{id:"image-preview-container",ref:function(t){e.container=t}},r.createElement("img",{src:this.props.content.url,style:n})),r.createElement("div",{id:"image-preview-footer"},r.createElement("div",null,r.createElement("div",null,r.createElement("b",null,"File name"),":"),r.createElement("div",null,r.createElement("span",{title:this.props.content.filename},i))),r.createElement("div",null,r.createElement("div",null,r.createElement("b",null,"Content type"),":"),r.createElement("div",null,this.props.content.type)),r.createElement("div",null,r.createElement("div",null,r.createElement("b",null,"Size"),":"),r.createElement("div",null,this.props.content.width," × ",this.props.content.height," px; ",D(this.props.content.size)))))}}class je extends r.Component{constructor(e){super(e),this.state=this.getBlankState(),this.handleResize=this.handleResize.bind(this),this.handleHashRoute=this.handleHashRoute.bind(this),this.handleOnline=this.handleOnline.bind(this),this.handleAppVisibility=this.handleAppVisibility.bind(this),this.handleReadTimer=this.handleReadTimer.bind(this),this.handleVisibilityEvent=this.handleVisibilityEvent.bind(this),this.handleError=this.handleError.bind(this),this.handleLoginRequest=this.handleLoginRequest.bind(this),this.handleConnected=this.handleConnected.bind(this),this.doLogin=this.doLogin.bind(this),this.handleCredentialsRequest=this.handleCredentialsRequest.bind(this),this.handleLoginSuccessful=this.handleLoginSuccessful.bind(this),this.handleDisconnect=this.handleDisconnect.bind(this),this.tnMeMetaDesc=this.tnMeMetaDesc.bind(this),this.tnMeContactUpdate=this.tnMeContactUpdate.bind(this),this.tnMeSubsUpdated=this.tnMeSubsUpdated.bind(this),this.resetContactList=this.resetContactList.bind(this),this.tnData=this.tnData.bind(this),this.tnInitFind=this.tnInitFind.bind(this),this.tnFndSubsUpdated=this.tnFndSubsUpdated.bind(this),this.handleSearchContacts=this.handleSearchContacts.bind(this),this.handleTopicSelected=this.handleTopicSelected.bind(this),this.handleHideMessagesView=this.handleHideMessagesView.bind(this),this.handleSendMessage=this.handleSendMessage.bind(this),this.handleNewAccount=this.handleNewAccount.bind(this),this.handleNewAccountRequest=this.handleNewAccountRequest.bind(this),this.handleUpdateAccountRequest=this.handleUpdateAccountRequest.bind(this),this.handleUpdateAccountTagsRequest=this.handleUpdateAccountTagsRequest.bind(this),this.handleSettings=this.handleSettings.bind(this),this.handleGlobalSettings=this.handleGlobalSettings.bind(this),this.handleToggleMessageSounds=this.handleToggleMessageSounds.bind(this),this.initDesktopAlerts=this.initDesktopAlerts.bind(this),this.togglePushToken=this.togglePushToken.bind(this),this.requestPushToken=this.requestPushToken.bind(this),this.handleSidepanelCancel=this.handleSidepanelCancel.bind(this),this.handleNewTopic=this.handleNewTopic.bind(this),this.handleNewTopicRequest=this.handleNewTopicRequest.bind(this),this.handleNewTopicCreated=this.handleNewTopicCreated.bind(this),this.handleTopicUpdateRequest=this.handleTopicUpdateRequest.bind(this),this.handleChangePermissions=this.handleChangePermissions.bind(this),this.handleTagsUpdated=this.handleTagsUpdated.bind(this),this.handleLogout=this.handleLogout.bind(this),this.handleLeaveUnsubRequest=this.handleLeaveUnsubRequest.bind(this),this.handleDialogCancel=this.handleDialogCancel.bind(this),this.handleShowContextMenu=this.handleShowContextMenu.bind(this),this.defaultTopicContextMenu=this.defaultTopicContextMenu.bind(this),this.handleHideContextMenu=this.handleHideContextMenu.bind(this),this.handleShowInfoView=this.handleShowInfoView.bind(this),this.handleHideInfoView=this.handleHideInfoView.bind(this),this.handleMemberUpdateRequest=this.handleMemberUpdateRequest.bind(this),this.handleValidateCredentialsRequest=this.handleValidateCredentialsRequest.bind(this)}getBlankState(){let e=localStorage.getObject("settings")||{};return{connected:!1,transport:e.transport||null,serverAddress:e.serverAddress||function(){let e=d;return"object"==typeof window.location&&("file:"==window.location.protocol||"localhost"==window.location.hostname?e=u.local:window.location.hostname&&(e=window.location.hostname+(window.location.port?":"+window.location.port:""))),e}(),serverVersion:"no connection",messageSounds:!e.messageSoundsOff,desktopAlerts:e.desktopAlerts,desktopAlertsEnabled:(G()||"object"==typeof window.location&&"localhost"==window.location.hostname)&&void 0!==s&&"undefined"!=typeof navigator,firebaseToken:localStorage.getObject("firebase-token"),errorText:"",errorLevel:null,sidePanelSelected:"login",sidePanelTitle:null,sidePanelAvatar:null,dialogSelected:null,contextMenuVisible:!1,login:"",password:"",myUserId:null,liveConnection:navigator.onLine,topicSelected:"",topicSelectedOnline:!1,topicSelectedAcs:null,newGroupTopicParams:null,loginDisabled:!1,displayMobile:window.innerWidth<=E,showInfoPanel:!1,mobilePanel:"sidepanel",contextMenuVisible:!1,contextMenuBounds:null,contextMenuClickAt:null,contextMenuParams:null,contextMenuItems:[],chatList:[],searchResults:[],searchableContacts:[],credMethod:void 0,credCode:void 0}}componentDidMount(){if(window.addEventListener("resize",this.handleResize),window.addEventListener("online",e=>{this.handleOnline(!0)}),window.addEventListener("offline",e=>{this.handleOnline(!1)}),window.addEventListener("hashchange",this.handleHashRoute),document.addEventListener("visibilitychange",this.handleVisibilityEvent),this.setState({viewportWidth:document.documentElement.clientWidth}),this.tinode=je.tnSetup(this.state.serverAddress,this.state.transport),this.state.desktopAlertsEnabled)try{this.fbPush=s.initializeApp({apiKey:m,messagingSenderId:g},c).messaging(),this.fbPush.usePublicVapidKey(f),navigator.serviceWorker.register("/service-worker.js").then(e=>{this.fbPush.useServiceWorker(e),this.initDesktopAlerts(),this.state.desktopAlerts&&(this.state.firebaseToken?this.tinode.setDeviceToken(this.state.firebaseToken):this.togglePushToken(!0))}).catch(e=>{console.log("Failed to register service worker:",e)})}catch(e){this.handleError("Failed to initialize push notifications","err"),console.log("Failed to initialize push notifications",e),this.setState({desktopAlertsEnabled:!1})}let e;if(this.tinode.enableLogging(!0,!0),this.tinode.onConnect=this.handleConnected,this.tinode.onDisconnect=this.handleDisconnect,localStorage.getObject("keep-logged-in")&&(e=localStorage.getObject("auth-token")),e){e.expires=new Date(e.expires),this.tinode.setAuthToken(e),this.tinode.connect().catch(e=>{this.handleError(e.message,"err")});var t=W(window.location.hash);delete t.params.info,delete t.params.tab,t.path[0]="",B(z(t.path,t.params))}else B("");this.readTimer=null,this.readTimerCallback=null,this.handleHashRoute()}componentWillUnmount(){window.removeEventListener("resize",this.handleResize),window.removeEventListener("hashchange",this.handleHashRoute),document.removeEventListener("visibilitychange",this.handleVisibilityEvent)}static tnSetup(e,t){return new a(c,e,h,t,G())}handleResize(){var e=document.documentElement.clientWidth<=E;this.setState({viewportWidth:document.documentElement.clientWidth}),this.state.displayMobile!=e&&this.setState({displayMobile:e})}handleHashRoute(){var e=W(window.location.hash);e.path&&e.path.length>0?(["register","settings","edit","cred","newtpk","contacts",""].includes(e.path[0])?this.setState({sidePanelSelected:e.path[0]}):console.log("Unknown sidepanel view",e.path[0]),e.path.length>1&&e.path[1]!=this.state.topicSelected&&this.setState({topicSelected:a.topicType(e.path[1])?e.path[1]:null})):this.setState({sidePanelSelected:""}),e.params.method&&this.setState({credMethod:e.params.method}),e.params.code&&this.setState({credCode:e.params.code}),this.setState({showInfoPanel:e.params.info,newTopicTabSelected:e.params.tab})}handleOnline(e){e?this.handleError("",null):this.handleError("No connection","warn"),this.setState({liveConnection:e})}handleAppVisibility(e,t){clearTimeout(this.readTimer),this.readTimerCallback=t,this.readTimer=e&&t?setTimeout(t,y):null}handleReadTimer(e){this.handleAppVisibility(!document.hidden,e)}handleVisibilityEvent(){this.handleAppVisibility(!document.hidden,this.readTimerCallback)}handleError(e,t){this.setState({errorText:e,errorLevel:t})}handleLoginRequest(e,t){this.setState({loginDisabled:!0,login:e,password:t}),this.handleError("",null),this.tinode.isConnected()?this.doLogin(e,t,{meth:this.state.credMethod,resp:this.state.credCode}):this.tinode.connect().catch(e=>{this.setState({loginDisabled:!1}),this.handleError(e.message,"err")})}handleConnected(){var e=this.tinode.getServerInfo();this.setState({serverVersion:e.ver+" "+(e.build?e.build:"none")+"; "}),this.doLogin(this.state.login,this.state.password,{meth:this.state.credMethod,resp:this.state.credCode})}doLogin(e,t,n){if(this.tinode.isAuthenticated())return void B("");n=a.credential(n);let r=null,i=this.tinode.getAuthToken();e&&t?(this.setState({password:null}),r=this.tinode.loginBasic(e,t,n)):i&&(r=this.tinode.loginToken(i.token,n)),r?r.then(e=>{e.code>=300&&"validate credentials"===e.text?(n&&this.handleError("Code does not match","warn"),this.handleCredentialsRequest(e.params)):this.handleLoginSuccessful()}).catch(e=>{this.setState({loginDisabled:!1,credMethod:void 0,credCode:void 0}),this.handleError(e.message,"err"),localStorage.removeItem("auth-token"),B("")}):(B(""),this.setState({loginDisabled:!1}))}handleCredentialsRequest(e){var t=W(window.location.hash);t.path[0]="cred",t.params.method=e.cred[0],B(z(t.path,t.params))}handleLoginSuccessful(){this.handleError("",null),localStorage.getObject("keep-logged-in")&&localStorage.setObject("auth-token",this.tinode.getAuthToken());var e=this.tinode.getMeTopic();e.onMetaDesc=this.tnMeMetaDesc,e.onContactUpdate=this.tnMeContactUpdate,e.onSubsUpdated=this.tnMeSubsUpdated,this.setState({connected:!0,credMethod:void 0,credCode:void 0,myUserId:this.tinode.getCurrentUserID()}),e.subscribe(e.startMetaQuery().withLaterSub().withDesc().build()).catch(e=>{localStorage.removeItem("auth-token"),this.handleError(e.message,"err"),B("")}),B(H(window.location.hash,"contacts"))}handleDisconnect(e){this.setState({connected:!1,topicSelectedOnline:!1,dialogSelected:null,errorText:e&&e.message?e.message:"Disconnected",errorLevel:e&&e.message?"err":"warn",loginDisabled:!1,contextMenuVisible:!1,serverVersion:"no connection"})}tnMeMetaDesc(e){e&&e.public&&this.setState({sidePanelTitle:e.public.fn,sidePanelAvatar:A(e.public.photo)})}tnMeContactUpdate(e,t){"on"==e||"off"==e?(this.resetContactList(),this.state.topicSelected==t.topic&&this.setState({topicSelectedOnline:"on"===e})):"read"==e?this.resetContactList():"msg"==e?this.state.topicSelected!=t.topic?(this.state.messageSounds&&p.play(),this.resetContactList()):document.hidden&&this.state.messageSounds&&p.play():"recv"==e||("gone"==e||"unsub"==e?(this.state.topicSelected==t.topic&&this.handleTopicSelected(null),this.resetContactList()):"acs"==e?this.state.topicSelected==t.topic&&this.setState({topicSelectedAcs:t.acs}):"del"==e||console.log("Unsupported (yet) presence update:"+e+" in: "+t.topic))}tnMeSubsUpdated(e){this.resetContactList()}static prepareSearchableContacts(e,t){let n={};for(const t of e)"p2p"==a.topicType(t.topic)&&(n[t.topic]={user:t.topic,updated:t.updated,public:t.public,private:t.private,acs:t.acs});for(const e of t)n[e.user]||(n[e.user]=e);return Object.values(n)}resetContactList(){let e={chatList:[]};this.tinode.getMeTopic().contacts(t=>{e.chatList.push(t),this.state.topicSelected==t.topic&&(e.topicSelectedOnline=t.online,e.topicSelectedAcs=t.acs)}),e.searchableContacts=je.prepareSearchableContacts(e.chatList,this.state.searchResults),this.setState(e)}tnData(e){let t=this.tinode.getTopic(e.topic);t.msgStatus(e)>a.MESSAGE_STATUS_SENDING&&(clearTimeout(this.receivedTimer),this.receivedTimer=setTimeout(()=>{this.receivedTimer=void 0,t.noteRecv(e.seq)},b))}tnInitFind(){let e=this.tinode.getFndTopic();e.isSubscribed()?this.tnFndSubsUpdated():(e.onSubsUpdated=this.tnFndSubsUpdated,e.subscribe(e.startMetaQuery().withSub().withTags().build()).catch(e=>{this.handleError(e.message,"err")}))}tnFndSubsUpdated(){let e=[];this.tinode.getFndTopic().contacts(t=>{e.push(t)}),this.setState({searchResults:e,searchableContacts:je.prepareSearchableContacts(this.state.chatList,e)})}handleSearchContacts(e){var t=this.tinode.getFndTopic();t.setMeta({desc:{public:e}}).then(e=>t.getMeta(t.startMetaQuery().withSub().build())).catch(e=>{this.handleError(e.message,"err")})}handleTopicSelected(e,t,n,r){e?(this.setState({errorText:"",errorLevel:null,mobilePanel:"topic-view",showInfoPanel:!1}),this.state.topicSelected!=e&&(this.setState({topicSelectedOnline:n,topicSelectedAcs:r}),B(K("",e)))):(this.setState({errorText:"",errorLevel:null,mobilePanel:"sidepanel",topicSelectedOnline:!1,topicSelectedAcs:null,showInfoPanel:!1}),this.state.topicSelected&&B(K("",null)))}handleHideMessagesView(){this.setState({mobilePanel:"sidepanel"}),B(K(window.location.hash,null))}handleSendMessage(e,t,n){let r=this.tinode.getTopic(this.state.topicSelected);(e=r.createMessage(e,!1))._uploader=n,r.isSubscribed()||(t||(t=Promise.resolve()),t=t.then(()=>r.subscribe())),t&&(t=t.catch(e=>{this.handleError(e.message,"err")})),r.publishDraft(e,t).catch(e=>{this.handleError(e.message,"err")})}handleNewAccount(){B(H(window.location.hash,"register"))}handleNewAccountRequest(e,t,n,r,i){this.tinode.connect(this.state.serverAddress).then(()=>this.tinode.createAccountBasic(e,t,{public:n,tags:i,cred:a.credential(r)})).then(e=>{e.code>=300&&"validate credentials"===e.text?this.handleCredentialsRequest(e.params):this.handleLoginSuccessful(this)}).catch(e=>{this.handleError(e.message,"err")})}handleUpdateAccountRequest(e,t,n){(t||n)&&this.tinode.getMeTopic().setMeta({desc:{public:t,private:n}}).catch(e=>{this.handleError(e.message,"err")}),e&&this.tinode.updateAccountBasic(null,this.tinode.getCurrentLogin(),e).catch(e=>{this.handleError(e.message,"err")})}handleUpdateAccountTagsRequest(e){this.tinode.getFndTopic().setMeta({tags:e}).catch(e=>{this.handleError(e.message,"err")})}handleSettings(){B(H(window.location.hash,this.state.myUserId?"edit":"settings"))}handleGlobalSettings(e){let t=e.serverAddress||this.state.serverAddress,n=e.transport||this.state.transport;this.setState({serverAddress:t,transport:n,tinode:je.tnSetup(t,n)}),localStorage.setObject("settings",{serverAddress:t,transport:n}),B(H(window.location.hash,""))}initDesktopAlerts(){this.fbPush.onTokenRefresh(()=>{this.requestPushToken(!0)}),this.fbPush.onMessage(e=>{})}togglePushToken(e){e?this.state.firebaseToken?(this.setState({desktopAlerts:!0}),localStorage.updateObject("settings",{desktopAlerts:!0})):this.fbPush.requestPermission().then(()=>{this.requestPushToken(!0)}).catch(e=>{this.handleError(e.message,"err"),this.setState({desktopAlerts:!1,firebaseToken:null}),localStorage.updateObject("settings",{desktopAlerts:!1}),console.log("Failed to get permission to notify.",e)}):this.state.firebaseToken?this.fbPush.deleteToken(this.state.firebaseToken).then(()=>{localStorage.updateObject("settings",{desktopAlerts:!1}),localStorage.removeItem("firebase-token"),this.setState({desktopAlerts:!1,firebaseToken:null})}).catch(e=>{console.log("Unable to delete token.",e)}):(this.setState({desktopAlerts:!1,firebaseToken:null}),localStorage.updateObject("settings",{desktopAlerts:!1}))}requestPushToken(e){this.fbPush.getToken().then(t=>{t!=this.state.firebaseToken&&(this.tinode.setDeviceToken(t,e),localStorage.setObject("firebase-token",t)),this.setState({firebaseToken:t,desktopAlerts:!0}),localStorage.updateObject("settings",{desktopAlerts:!0})}).catch(e=>{this.handleError(e.message,"err"),console.log("Failed to retrieve firebase token",e)})}handleToggleMessageSounds(e){this.setState({messageSounds:e}),localStorage.updateObject("settings",{messageSoundsOff:!e})}handleSidepanelCancel(){var e=W(window.location.hash);e.path[0]=this.state.myUserId?"contacts":"",e.params&&(delete e.params.code,delete e.params.method,delete e.params.tab),B(z(e.path,e.params)),this.setState({errorText:"",errorLevel:null})}handleNewTopic(){B(H(window.location.hash,"newtpk"))}handleNewTopicRequest(e,t,n,r){var i=e||this.tinode.newGroupTopicName();e?this.handleTopicSelected(i):this.setState({newGroupTopicParams:{desc:{public:t,private:{comment:n}},tags:r}},()=>{this.handleTopicSelected(i)})}handleNewTopicCreated(e,t){this.state.topicSelected==e&&e!=t&&this.setState({topicSelected:t},()=>{B(K("",t))})}handleTopicUpdateRequest(e,t,n,r){var i=this.tinode.getTopic(e);if(i){var a={};t&&(a.public=t),n&&(a.private={comment:n}),r&&(a.defacs=r),i.setMeta({desc:a}).catch(e=>{this.handleError(e.message,"err")})}}handleChangePermissions(e,t,n){var r=this.tinode.getTopic(e);if(r){var i=r.getAccessMode();n?(i.updateGiven(t),t=i.getGiven()):(i.updateWant(t),t=i.getWant()),r.setMeta({sub:{user:n,mode:t}}).catch(e=>{this.handleError(e.message,"err")})}}handleTagsUpdated(e,t){var n=this.tinode.getTopic(e);if(n){n.setMeta({tags:t}).catch(e=>{this.handleError(e.message,"err")})}}handleLogout(){localStorage.removeItem("auth-token"),this.setState(this.getBlankState()),this.tinode&&this.tinode.disconnect(),this.tinode=je.tnSetup(this.state.serverAddress,this.state.transport),B("")}handleLeaveUnsubRequest(e){var t=this.tinode.getTopic(e);t&&t.leave(!0).then(e=>{B(K(window.location.hash,""))}).catch(e=>{this.handleError(e.message,"err")})}handleDialogCancel(){this.setState({dialogSelected:null})}handleShowContextMenu(e,t){this.setState({contextMenuVisible:!0,contextMenuClickAt:{x:e.x,y:e.y},contextMenuParams:e,contextMenuItems:t||this.defaultTopicContextMenu(e.topicName),contextMenuBounds:i.findDOMNode(this).getBoundingClientRect()})}defaultTopicContextMenu(e){var t=!1,n=!1,r=!1,i=!1,a=this.tinode.getTopic(e);if(a&&a.isSubscribed()){r=!0;var o=a.getAccessMode();t=o&&o.isMuted(),n=o&&!o.isJoiner(),i=o&&o.isDeleter()}return[r?{title:"Info",handler:this.handleShowInfoView}:null,r?"messages_clear":null,r&&i?"messages_clear_hard":null,r?t?"topic_unmute":"topic_mute":null,r?n?"topic_unblock":"topic_block":null,"topic_delete"]}handleHideContextMenu(){this.setState({contextMenuVisible:!1,contextMenuClickAt:null,contextMenuParams:null,contextMenuBounds:null})}handleShowInfoView(){B(V(window.location.hash,"info",!0)),this.setState({showInfoPanel:!0})}handleHideInfoView(){B(q(window.location.hash,"info")),this.setState({showInfoPanel:!1})}handleMemberUpdateRequest(e,t,n){if(e){var r=this.tinode.getTopic(e);r&&(t&&t.length>0&&t.map(e=>{r.invite(e,null).catch(e=>{this.handleError(e.message,"err")})}),n&&n.length>0&&n.map(e=>{r.delSubscription(e).catch(e=>{this.handleError(e.message,"err")})}))}}handleValidateCredentialsRequest(e,t){this.setState({credMethod:e,credCode:t}),this.doLogin(null,null,{meth:e,resp:t})}render(){return r.createElement("div",{id:"app-container"},this.state.contextMenuVisible?r.createElement(Q,{tinode:this.tinode,bounds:this.state.contextMenuBounds,clickAt:this.state.contextMenuClickAt,params:this.state.contextMenuParams,items:this.state.contextMenuItems,hide:this.handleHideContextMenu,onAction:this.handleContextMenuAction,onError:this.handleError}):null,r.createElement(me,{tinode:this.tinode,connected:this.state.connected,displayMobile:this.state.displayMobile,hideSelf:this.state.displayMobile&&"sidepanel"!==this.state.mobilePanel,state:this.state.sidePanelSelected,title:this.state.sidePanelTitle,avatar:this.state.sidePanelAvatar,login:this.state.login,myUserId:this.state.myUserId,loginDisabled:this.state.loginDisabled,errorText:this.state.errorText,errorLevel:this.state.errorLevel,topicSelected:this.state.topicSelected,chatList:this.state.chatList,credMethod:this.state.credMethod,credCode:this.state.credCode,transport:this.state.transport,messageSounds:this.state.messageSounds,desktopAlerts:this.state.desktopAlerts,desktopAlertsEnabled:this.state.desktopAlertsEnabled,serverAddress:this.state.serverAddress,onGlobalSettings:this.handleGlobalSettings,onSignUp:this.handleNewAccount,onSettings:this.handleSettings,onLoginRequest:this.handleLoginRequest,onCreateAccount:this.handleNewAccountRequest,onUpdateAccount:this.handleUpdateAccountRequest,onUpdateAccountTags:this.handleUpdateAccountTagsRequest,onTogglePushNotifications:this.togglePushToken,onToggleMessageSounds:this.handleToggleMessageSounds,onTopicSelected:this.handleTopicSelected,onCreateTopic:this.handleNewTopicRequest,onNewTopic:this.handleNewTopic,onLogout:this.handleLogout,onCancel:this.handleSidepanelCancel,onError:this.handleError,onValidateCredentials:this.handleValidateCredentialsRequest,onInitFind:this.tnInitFind,searchResults:this.state.searchResults,onSearchContacts:this.handleSearchContacts,showContextMenu:this.handleShowContextMenu}),r.createElement(Re,{tinode:this.tinode,connected:this.state.connected,online:this.state.topicSelectedOnline,acs:this.state.topicSelectedAcs,displayMobile:this.state.displayMobile,viewportWidth:this.state.viewportWidth,hideSelf:this.state.displayMobile&&("topic-view"!==this.state.mobilePanel||this.state.showInfoPanel),topic:this.state.topicSelected,myUserId:this.state.myUserId,serverVersion:this.state.serverVersion,serverAddress:this.state.serverAddress,errorText:this.state.errorText,errorLevel:this.state.errorLevel,newGroupTopicParams:this.state.newGroupTopicParams,onHideMessagesView:this.handleHideMessagesView,onData:this.tnData,onError:this.handleError,onNewTopicCreated:this.handleNewTopicCreated,readTimerHandler:this.handleReadTimer,showContextMenu:this.handleShowContextMenu,sendMessage:this.handleSendMessage}),this.state.showInfoPanel?r.createElement(Ne,{tinode:this.tinode,connected:this.state.connected,displayMobile:this.state.displayMobile,topic:this.state.topicSelected,searchableContacts:this.state.searchableContacts,myUserId:this.state.myUserId,errorText:this.state.errorText,errorLevel:this.state.errorLevel,onTopicDescUpdate:this.handleTopicUpdateRequest,onCancel:this.handleHideInfoView,onChangePermissions:this.handleChangePermissions,onMemberUpdateRequest:this.handleMemberUpdateRequest,onLeaveTopic:this.handleLeaveUnsubRequest,onAddMember:this.handleManageGroupMembers,onTopicTagsUpdate:this.handleTagsUpdated,onInitFind:this.tnInitFind,onError:this.handleError,showContextMenu:this.handleShowContextMenu}):null)}}t.exports=je},{"../version.json":35,"firebase/app":19,"firebase/messaging":20,react:29,"react-dom":26,"tinode-sdk":30}],35:[function(e,t,n){t.exports={version:"0.15.6-rc4"}},{}],36:[function(e,t,n){var r,i,a=t.exports={};function o(){throw new Error("setTimeout has not been defined")}function s(){throw new Error("clearTimeout has not been defined")}function l(e){if(r===setTimeout)return setTimeout(e,0);if((r===o||!r)&&setTimeout)return r=setTimeout,setTimeout(e,0);try{return r(e,0)}catch(t){try{return r.call(null,e,0)}catch(t){return r.call(this,e,0)}}}!function(){try{r="function"==typeof setTimeout?setTimeout:o}catch(e){r=o}try{i="function"==typeof clearTimeout?clearTimeout:s}catch(e){i=s}}();var c,u=[],d=!1,p=-1;function h(){d&&c&&(d=!1,c.length?u=c.concat(u):p=-1,u.length&&f())}function f(){if(!d){var e=l(h);d=!0;for(var t=u.length;t;){for(c=u,u=[];++p<t;)c&&c[p].run();p=-1,t=u.length}c=null,d=!1,function(e){if(i===clearTimeout)return clearTimeout(e);if((i===s||!i)&&clearTimeout)return i=clearTimeout,clearTimeout(e);try{i(e)}catch(t){try{return i.call(null,e)}catch(t){return i.call(this,e)}}}(e)}}function m(e,t){this.fun=e,this.array=t}function g(){}a.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];u.push(new m(e,t)),1!==u.length||d||l(f)},m.prototype.run=function(){this.fun.apply(null,this.array)},a.title="browser",a.browser=!0,a.env={},a.argv=[],a.version="",a.versions={},a.on=g,a.addListener=g,a.once=g,a.off=g,a.removeListener=g,a.removeAllListeners=g,a.emit=g,a.prependListener=g,a.prependOnceListener=g,a.listeners=function(e){return[]},a.binding=function(e){throw new Error("process.binding is not supported")},a.cwd=function(){return"/"},a.chdir=function(e){throw new Error("process.chdir is not supported")},a.umask=function(){return 0}},{}],37:[function(e,t,n){(function(t,r){var i=e("process/browser.js").nextTick,a=Function.prototype.apply,o=Array.prototype.slice,s={},l=0;function c(e,t){this._id=e,this._clearFn=t}n.setTimeout=function(){return new c(a.call(setTimeout,window,arguments),clearTimeout)},n.setInterval=function(){return new c(a.call(setInterval,window,arguments),clearInterval)},n.clearTimeout=n.clearInterval=function(e){e.close()},c.prototype.unref=c.prototype.ref=function(){},c.prototype.close=function(){this._clearFn.call(window,this._id)},n.enroll=function(e,t){clearTimeout(e._idleTimeoutId),e._idleTimeout=t},n.unenroll=function(e){clearTimeout(e._idleTimeoutId),e._idleTimeout=-1},n._unrefActive=n.active=function(e){clearTimeout(e._idleTimeoutId);var t=e._idleTimeout;t>=0&&(e._idleTimeoutId=setTimeout(function(){e._onTimeout&&e._onTimeout()},t))},n.setImmediate="function"==typeof t?t:function(e){var t=l++,r=!(arguments.length<2)&&o.call(arguments,1);return s[t]=!0,i(function(){s[t]&&(r?e.apply(null,r):e.call(null),n.clearImmediate(t))}),t},n.clearImmediate="function"==typeof r?r:function(e){delete s[e]}}).call(this,e("timers").setImmediate,e("timers").clearImmediate)},{"process/browser.js":36,timers:37}]},{},[33])(33)});